@hotmeshio/long-tail 0.1.15 → 0.1.17
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/escalations/resolve.js +1 -0
- package/build/api/files.d.ts +4 -0
- package/build/api/files.js +14 -0
- package/build/api/settings.js +0 -3
- package/build/api/workflows/config.js +5 -0
- package/build/api/yaml-workflows/crud.js +25 -5
- package/build/index.d.ts +1 -2
- package/build/index.js +1 -4
- package/build/lib/db/schemas/002_seed.sql +3 -81
- package/build/lib/events/socketio.d.ts +12 -0
- package/build/lib/events/socketio.js +24 -1
- package/build/lib/storage/mime.js +20 -0
- package/build/routes/file-browser.js +30 -0
- package/build/routes/files.js +20 -18
- package/build/routes/index.js +2 -0
- package/build/routes/nats-credentials.d.ts +2 -0
- package/build/routes/nats-credentials.js +22 -0
- package/build/services/config/sql.d.ts +3 -0
- package/build/services/config/sql.js +15 -1
- package/build/services/config/write.d.ts +6 -0
- package/build/services/config/write.js +64 -0
- package/build/services/cron/index.d.ts +5 -0
- package/build/services/cron/index.js +30 -0
- package/build/services/insight/index.js +3 -0
- package/build/services/interceptor/activities/task.d.ts +1 -0
- package/build/services/interceptor/activities/task.js +2 -1
- package/build/services/interceptor/activities/workflow.js +1 -0
- package/build/services/interceptor/index.js +4 -4
- package/build/services/interceptor/lifecycle.js +1 -1
- package/build/services/mcp/db.d.ts +17 -0
- package/build/services/mcp/db.js +50 -0
- package/build/services/mcp/sql.d.ts +4 -1
- package/build/services/mcp/sql.js +9 -2
- package/build/services/oauth/index.js +4 -1
- package/build/services/oauth/providers/google.js +7 -2
- package/build/services/orchestrator/index.js +5 -0
- package/build/services/task/crud.js +1 -0
- package/build/services/task/sql.d.ts +1 -1
- package/build/services/task/sql.js +2 -2
- package/build/services/task/types.d.ts +2 -0
- package/build/services/workers/registry.js +3 -1
- package/build/services/workflow-invocation.js +8 -1
- package/build/services/yaml-workflow/workers/register.js +4 -2
- package/build/start/adapters.js +4 -1
- package/build/start/socket-auth.d.ts +13 -0
- package/build/start/socket-auth.js +32 -0
- package/build/start/workers.d.ts +2 -1
- package/build/start/workers.js +66 -6
- package/build/system/index.d.ts +12 -10
- package/build/system/index.js +240 -67
- package/build/system/mcp-servers/playwright/schemas.d.ts +12 -12
- package/build/system/seed/index.d.ts +0 -7
- package/build/system/seed/index.js +5 -46
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/startup.d.ts +59 -2
- package/dashboard/dist/assets/AdminDashboard-CsTOErp1.js +2 -0
- package/dashboard/dist/assets/{AdminDashboard-NLryl1_B.js.map → AdminDashboard-CsTOErp1.js.map} +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-BqQA3IJp.js +2 -0
- package/dashboard/dist/assets/{AvailableEscalationsPage-6vexlrk3.js.map → AvailableEscalationsPage-BqQA3IJp.js.map} +1 -1
- package/dashboard/dist/assets/BotPicker-C2xR1xay.js +2 -0
- package/dashboard/dist/assets/{BotPicker-DWhn0tr1.js.map → BotPicker-C2xR1xay.js.map} +1 -1
- package/dashboard/dist/assets/CollapsibleSection-CRtHQsAv.js +2 -0
- package/dashboard/dist/assets/{CollapsibleSection-CgYgQiOc.js.map → CollapsibleSection-CRtHQsAv.js.map} +1 -1
- package/dashboard/dist/assets/ConfirmDeleteModal-dOxidrSR.js +2 -0
- package/dashboard/dist/assets/{ConfirmDeleteModal-DCKAPXD3.js.map → ConfirmDeleteModal-dOxidrSR.js.map} +1 -1
- package/dashboard/dist/assets/CopyableId-DmLF-RqZ.js +2 -0
- package/dashboard/dist/assets/{CopyableId-DXkaAOYk.js.map → CopyableId-DmLF-RqZ.js.map} +1 -1
- package/dashboard/dist/assets/CredentialsPage-C7XT1bnO.js +2 -0
- package/dashboard/dist/assets/CredentialsPage-C7XT1bnO.js.map +1 -0
- package/dashboard/dist/assets/CustomDurationPicker-BABUv1V2.js +2 -0
- package/dashboard/dist/assets/{CustomDurationPicker-D2G1ldiF.js.map → CustomDurationPicker-BABUv1V2.js.map} +1 -1
- package/dashboard/dist/assets/DataTable-D3-wSEf0.js +2 -0
- package/dashboard/dist/assets/{DataTable-DXSUbA26.js.map → DataTable-D3-wSEf0.js.map} +1 -1
- package/dashboard/dist/assets/DropZone-DHKmMqRA.js +2 -0
- package/dashboard/dist/assets/DropZone-DHKmMqRA.js.map +1 -0
- package/dashboard/dist/assets/ElapsedCell-DrJif03B.js +2 -0
- package/dashboard/dist/assets/{ElapsedCell-CQGqkXP_.js.map → ElapsedCell-DrJif03B.js.map} +1 -1
- package/dashboard/dist/assets/EmptyState-BcsfPq9T.js +2 -0
- package/dashboard/dist/assets/EmptyState-BcsfPq9T.js.map +1 -0
- package/dashboard/dist/assets/EscalationsOverview-H6CwfeR-.js +2 -0
- package/dashboard/dist/assets/EscalationsOverview-H6CwfeR-.js.map +1 -0
- package/dashboard/dist/assets/EventTable-Dh3_9DAY.js +2 -0
- package/dashboard/dist/assets/{EventTable-BMJAPkMi.js.map → EventTable-Dh3_9DAY.js.map} +1 -1
- package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js +2 -0
- package/dashboard/dist/assets/{FilterBar-DbVbCzH2.js.map → FilterBar-Ck4K4rzu.js.map} +1 -1
- package/dashboard/dist/assets/ListToolbar-CyEkulVR.js +2 -0
- package/dashboard/dist/assets/{ListToolbar-0XNuXj0M.js.map → ListToolbar-CyEkulVR.js.map} +1 -1
- package/dashboard/dist/assets/McpOverview-ChLa6Gl7.js +2 -0
- package/dashboard/dist/assets/{McpOverview-CeYnCzBN.js.map → McpOverview-ChLa6Gl7.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryDetailPage-5Dsj6PlL.js +5 -0
- package/dashboard/dist/assets/McpQueryDetailPage-5Dsj6PlL.js.map +1 -0
- package/dashboard/dist/assets/McpQueryPage-D2DmDFPu.js +2 -0
- package/dashboard/dist/assets/McpQueryPage-D2DmDFPu.js.map +1 -0
- package/dashboard/dist/assets/McpRunDetailPage-ERVuNEEK.js +2 -0
- package/dashboard/dist/assets/{McpRunDetailPage-CZtodW_Z.js.map → McpRunDetailPage-ERVuNEEK.js.map} +1 -1
- package/dashboard/dist/assets/McpRunsPage-BKba-3Wl.js +2 -0
- package/dashboard/dist/assets/McpRunsPage-BKba-3Wl.js.map +1 -0
- package/dashboard/dist/assets/Modal-DEODGeqx.js +2 -0
- package/dashboard/dist/assets/{Modal-yyhUeKoA.js.map → Modal-DEODGeqx.js.map} +1 -1
- package/dashboard/dist/assets/OperatorDashboard-CJm_BTPU.js +2 -0
- package/dashboard/dist/assets/{OperatorDashboard-Ceh7OQtZ.js.map → OperatorDashboard-CJm_BTPU.js.map} +1 -1
- package/dashboard/dist/assets/PageHeader-B-SN5GZ2.js +2 -0
- package/dashboard/dist/assets/PageHeader-B-SN5GZ2.js.map +1 -0
- package/dashboard/dist/assets/PageHeaderWithStats-BZ3AGT5s.js +2 -0
- package/dashboard/dist/assets/PageHeaderWithStats-BZ3AGT5s.js.map +1 -0
- package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js +2 -0
- package/dashboard/dist/assets/{PriorityBadge-BrPikMFy.js.map → PriorityBadge-DfQY9St9.js.map} +1 -1
- package/dashboard/dist/assets/ProcessDetailPage-vfnCDyQK.js +2 -0
- package/dashboard/dist/assets/{ProcessDetailPage-2miaYd8G.js.map → ProcessDetailPage-vfnCDyQK.js.map} +1 -1
- package/dashboard/dist/assets/ProcessesListPage-DcAN6AJK.js +2 -0
- package/dashboard/dist/assets/ProcessesListPage-DcAN6AJK.js.map +1 -0
- package/dashboard/dist/assets/RolePill-BhVC0cc3.js +2 -0
- package/dashboard/dist/assets/{RolePill-DxbJMfJu.js.map → RolePill-BhVC0cc3.js.map} +1 -1
- package/dashboard/dist/assets/RolesPage-DYSt2aAr.js +2 -0
- package/dashboard/dist/assets/RolesPage-DYSt2aAr.js.map +1 -0
- package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js +2 -0
- package/dashboard/dist/assets/{RowActions-DurFwIwe.js.map → RowActions-Dg-Fsm5O.js.map} +1 -1
- package/dashboard/dist/assets/RunAsSelector-CD7_Dmb0.js +2 -0
- package/dashboard/dist/assets/{RunAsSelector-CNKraP6u.js.map → RunAsSelector-CD7_Dmb0.js.map} +1 -1
- package/dashboard/dist/assets/StatCard-DlgF0CJC.js +2 -0
- package/dashboard/dist/assets/{StatCard-CKplpK3w.js.map → StatCard-DlgF0CJC.js.map} +1 -1
- package/dashboard/dist/assets/StatusBadge-XQlNFwmH.js +2 -0
- package/dashboard/dist/assets/StatusBadge-XQlNFwmH.js.map +1 -0
- package/dashboard/dist/assets/StepIndicator-CuUIGxKk.js +2 -0
- package/dashboard/dist/assets/{StepIndicator-Dicx0WTZ.js.map → StepIndicator-CuUIGxKk.js.map} +1 -1
- package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js +2 -0
- package/dashboard/dist/assets/{StickyPagination-B2jYvU3-.js.map → StickyPagination-F9FZsRy9.js.map} +1 -1
- package/dashboard/dist/assets/SwimlaneTimeline-CUl5RdXU.js +2 -0
- package/dashboard/dist/assets/SwimlaneTimeline-CUl5RdXU.js.map +1 -0
- package/dashboard/dist/assets/TagInput-DftaRHDV.js +2 -0
- package/dashboard/dist/assets/{TagInput-CypDZ6Kl.js.map → TagInput-DftaRHDV.js.map} +1 -1
- package/dashboard/dist/assets/TaskDetailPage-BoA-cfwW.js +2 -0
- package/dashboard/dist/assets/TaskDetailPage-BoA-cfwW.js.map +1 -0
- package/dashboard/dist/assets/TaskQueuePill-Ce8KlXtR.js +2 -0
- package/dashboard/dist/assets/TaskQueuePill-Ce8KlXtR.js.map +1 -0
- package/dashboard/dist/assets/TasksListPage-g6XIbhju.js +2 -0
- package/dashboard/dist/assets/{TasksListPage-D7CdkAeg.js.map → TasksListPage-g6XIbhju.js.map} +1 -1
- package/dashboard/dist/assets/TimeAgo-BihIwEbB.js +2 -0
- package/dashboard/dist/assets/{TimeAgo-B5LXB2aj.js.map → TimeAgo-BihIwEbB.js.map} +1 -1
- package/dashboard/dist/assets/TimestampCell-GOFcvE-i.js +2 -0
- package/dashboard/dist/assets/{TimestampCell-Crb9b0Gw.js.map → TimestampCell-GOFcvE-i.js.map} +1 -1
- package/dashboard/dist/assets/UserName-CmMVt4vS.js +2 -0
- package/dashboard/dist/assets/{UserName-OPg-nkRa.js.map → UserName-CmMVt4vS.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowExecutionPage-soRFz_30.js +2 -0
- package/dashboard/dist/assets/{WorkflowExecutionPage-CcLVrs9b.js.map → WorkflowExecutionPage-soRFz_30.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowPill-DUDDyBsj.js +2 -0
- package/dashboard/dist/assets/{WorkflowPill-CCV4MMj7.js.map → WorkflowPill-DUDDyBsj.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowsDashboard-Be1A1zAT.js +2 -0
- package/dashboard/dist/assets/WorkflowsDashboard-Be1A1zAT.js.map +1 -0
- package/dashboard/dist/assets/WorkflowsOverview-z3Ztiz1y.js +2 -0
- package/dashboard/dist/assets/{WorkflowsOverview-DvShiYJV.js.map → WorkflowsOverview-z3Ztiz1y.js.map} +1 -1
- package/dashboard/dist/assets/YamlWorkflowsPage-C6qzcQcJ.js +2 -0
- package/dashboard/dist/assets/YamlWorkflowsPage-C6qzcQcJ.js.map +1 -0
- package/dashboard/dist/assets/{bots-Dqos20NE.js → bots-BZPXDh_y.js} +2 -2
- package/dashboard/dist/assets/{bots-Dqos20NE.js.map → bots-BZPXDh_y.js.map} +1 -1
- package/dashboard/dist/assets/escalation-DBUIq1Z4.js +2 -0
- package/dashboard/dist/assets/{escalation-A0CsbvNV.js.map → escalation-DBUIq1Z4.js.map} +1 -1
- package/dashboard/dist/assets/escalation-columns-DL4zsR8Y.js +2 -0
- package/dashboard/dist/assets/{escalation-columns-BpBJN6k4.js.map → escalation-columns-DL4zsR8Y.js.map} +1 -1
- package/dashboard/dist/assets/helpers-D50KFFkI.js +2 -0
- package/dashboard/dist/assets/{helpers-CmznCuAx.js.map → helpers-D50KFFkI.js.map} +1 -1
- package/dashboard/dist/assets/index-B-ioA6yv.js +2 -0
- package/dashboard/dist/assets/index-B-ioA6yv.js.map +1 -0
- package/dashboard/dist/assets/index-B-jzKfuv.js +2 -0
- package/dashboard/dist/assets/index-B-jzKfuv.js.map +1 -0
- package/dashboard/dist/assets/index-BMpoMc4A.js +2 -0
- package/dashboard/dist/assets/{index-Cr0Rqsj7.js.map → index-BMpoMc4A.js.map} +1 -1
- package/dashboard/dist/assets/index-BU04qgJt.js +15 -0
- package/dashboard/dist/assets/index-BU04qgJt.js.map +1 -0
- package/dashboard/dist/assets/index-BUjxYyxc.js +63 -0
- package/dashboard/dist/assets/index-BUjxYyxc.js.map +1 -0
- package/dashboard/dist/assets/index-BpoHVMV7.js +2 -0
- package/dashboard/dist/assets/index-BpoHVMV7.js.map +1 -0
- package/dashboard/dist/assets/index-CEnDYJOO.js +2 -0
- package/dashboard/dist/assets/index-CEnDYJOO.js.map +1 -0
- package/dashboard/dist/assets/index-CbuH92vk.js +6 -0
- package/dashboard/dist/assets/index-CbuH92vk.js.map +1 -0
- package/dashboard/dist/assets/index-D9_hZmsW.js +5 -0
- package/dashboard/dist/assets/{index-BYwD3kHN.js.map → index-D9_hZmsW.js.map} +1 -1
- package/dashboard/dist/assets/index-DrouIN-M.js +2 -0
- package/dashboard/dist/assets/{index-VnYkWW8r.js.map → index-DrouIN-M.js.map} +1 -1
- package/dashboard/dist/assets/index-DzICLMI7.js +2 -0
- package/dashboard/dist/assets/{index-XGOmZ117.js.map → index-DzICLMI7.js.map} +1 -1
- package/dashboard/dist/assets/index-efS5gKpv.css +1 -0
- package/dashboard/dist/assets/index-qT78AZDq.js +2 -0
- package/dashboard/dist/assets/index-qT78AZDq.js.map +1 -0
- package/dashboard/dist/assets/mcp-D0GrHRFe.js +2 -0
- package/dashboard/dist/assets/{mcp-DrWymhSu.js.map → mcp-D0GrHRFe.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-BhUxVEMS.js → mcp-query-DC5woQn5.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-BhUxVEMS.js.map → mcp-query-DC5woQn5.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-runs-DUfz4mLd.js → mcp-runs-CsoVQoPB.js} +2 -2
- package/dashboard/dist/assets/{mcp-runs-DUfz4mLd.js.map → mcp-runs-CsoVQoPB.js.map} +1 -1
- package/dashboard/dist/assets/namespaces-unpIb4gX.js +2 -0
- package/dashboard/dist/assets/{namespaces-Cm6AY5sh.js.map → namespaces-unpIb4gX.js.map} +1 -1
- package/dashboard/dist/assets/{roles-2v1Kc7BJ.js → roles--kBaFljg.js} +2 -2
- package/dashboard/dist/assets/{roles-2v1Kc7BJ.js.map → roles--kBaFljg.js.map} +1 -1
- package/dashboard/dist/assets/settings-B96YkawY.js +2 -0
- package/dashboard/dist/assets/{settings-DTQNp6tH.js.map → settings-B96YkawY.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-CS1rgG1s.js → tasks-D_1NCfOZ.js} +2 -2
- package/dashboard/dist/assets/{tasks-CS1rgG1s.js.map → tasks-D_1NCfOZ.js.map} +1 -1
- package/dashboard/dist/assets/{useEventHooks-BjXX8x3a.js → useEventHooks-BPjEkCpD.js} +2 -2
- package/dashboard/dist/assets/{useEventHooks-BjXX8x3a.js.map → useEventHooks-BPjEkCpD.js.map} +1 -1
- package/dashboard/dist/assets/{useExpandedRows-Cg9iq6Vy.js → useExpandedRows-CkcEntB-.js} +2 -2
- package/dashboard/dist/assets/{useExpandedRows-Cg9iq6Vy.js.map → useExpandedRows-CkcEntB-.js.map} +1 -1
- package/dashboard/dist/assets/{useFilterParams-CGRYFw_A.js → useFilterParams-DZCAaBC7.js} +2 -2
- package/dashboard/dist/assets/{useFilterParams-CGRYFw_A.js.map → useFilterParams-DZCAaBC7.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-BeR-nVWQ.js → useYamlActivityEvents-D3RQjfzo.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-BeR-nVWQ.js.map → useYamlActivityEvents-D3RQjfzo.js.map} +1 -1
- package/dashboard/dist/assets/{users-DYsdQ7Md.js → users-e2oatvoj.js} +2 -2
- package/dashboard/dist/assets/{users-DYsdQ7Md.js.map → users-e2oatvoj.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-CWl44VA6.js → vendor-icons-BkK55L-1.js} +103 -88
- package/dashboard/dist/assets/vendor-icons-BkK55L-1.js.map +1 -0
- package/dashboard/dist/assets/vendor-query-B2UbickB.js +18 -0
- package/dashboard/dist/assets/vendor-query-B2UbickB.js.map +1 -0
- package/dashboard/dist/assets/vendor-react-CX88sFS5.js +22 -0
- package/dashboard/dist/assets/vendor-react-CX88sFS5.js.map +1 -0
- package/dashboard/dist/assets/{workflows-2QAXh3UD.js → workflows-D6diL54s.js} +2 -2
- package/dashboard/dist/assets/{workflows-2QAXh3UD.js.map → workflows-D6diL54s.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-sx8-UEE3.js → yaml-workflows-CAKU7LUu.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-sx8-UEE3.js.map → yaml-workflows-CAKU7LUu.js.map} +1 -1
- package/dashboard/dist/index.html +5 -5
- package/docs/dashboard.md +233 -65
- package/package.json +3 -2
- package/build/examples/external-mcp-server/server.d.ts +0 -17
- package/build/examples/external-mcp-server/server.js +0 -116
- package/build/examples/index.d.ts +0 -2
- package/build/examples/index.js +0 -7
- package/build/examples/seed-data.d.ts +0 -55
- package/build/examples/seed-data.js +0 -161
- package/build/examples/seed.d.ts +0 -5
- package/build/examples/seed.js +0 -132
- package/build/examples/types/envelopes.d.ts +0 -69
- package/build/examples/types/envelopes.js +0 -8
- package/build/examples/types/index.d.ts +0 -10
- package/build/examples/types/index.js +0 -9
- package/build/examples/types/resolvers.d.ts +0 -27
- package/build/examples/types/resolvers.js +0 -9
- package/build/examples/workers.d.ts +0 -10
- package/build/examples/workers.js +0 -59
- package/build/examples/workflows/assembly-line/activities.d.ts +0 -28
- package/build/examples/workflows/assembly-line/activities.js +0 -53
- package/build/examples/workflows/assembly-line/index.d.ts +0 -17
- package/build/examples/workflows/assembly-line/index.js +0 -60
- package/build/examples/workflows/assembly-line/iterator.d.ts +0 -12
- package/build/examples/workflows/assembly-line/iterator.js +0 -54
- package/build/examples/workflows/assembly-line/reverter.d.ts +0 -18
- package/build/examples/workflows/assembly-line/reverter.js +0 -89
- package/build/examples/workflows/assembly-line/types.d.ts +0 -25
- package/build/examples/workflows/assembly-line/types.js +0 -8
- package/build/examples/workflows/assembly-line/worker.d.ts +0 -13
- package/build/examples/workflows/assembly-line/worker.js +0 -81
- package/build/examples/workflows/basic-echo/activities.d.ts +0 -20
- package/build/examples/workflows/basic-echo/activities.js +0 -55
- package/build/examples/workflows/basic-echo/index.d.ts +0 -14
- package/build/examples/workflows/basic-echo/index.js +0 -66
- package/build/examples/workflows/basic-signal/activities.d.ts +0 -17
- package/build/examples/workflows/basic-signal/activities.js +0 -18
- package/build/examples/workflows/basic-signal/index.d.ts +0 -17
- package/build/examples/workflows/basic-signal/index.js +0 -116
- package/build/examples/workflows/kitchen-sink/activities.d.ts +0 -40
- package/build/examples/workflows/kitchen-sink/activities.js +0 -46
- package/build/examples/workflows/kitchen-sink/index.d.ts +0 -22
- package/build/examples/workflows/kitchen-sink/index.js +0 -123
- package/build/examples/workflows/review-content/activities.d.ts +0 -10
- package/build/examples/workflows/review-content/activities.js +0 -44
- package/build/examples/workflows/review-content/index.d.ts +0 -10
- package/build/examples/workflows/review-content/index.js +0 -95
- package/build/examples/workflows/review-content/types.d.ts +0 -28
- package/build/examples/workflows/review-content/types.js +0 -2
- package/build/system/seed/server-definitions.d.ts +0 -3210
- package/build/system/seed/server-definitions.js +0 -232
- package/dashboard/dist/assets/AdminDashboard-NLryl1_B.js +0 -2
- package/dashboard/dist/assets/AvailableEscalationsPage-6vexlrk3.js +0 -2
- package/dashboard/dist/assets/BotPicker-DWhn0tr1.js +0 -2
- package/dashboard/dist/assets/CollapsibleSection-CgYgQiOc.js +0 -2
- package/dashboard/dist/assets/ConfirmDeleteModal-DCKAPXD3.js +0 -2
- package/dashboard/dist/assets/CopyableId-DXkaAOYk.js +0 -2
- package/dashboard/dist/assets/CredentialsPage-B361BOfU.js +0 -2
- package/dashboard/dist/assets/CredentialsPage-B361BOfU.js.map +0 -1
- package/dashboard/dist/assets/CustomDurationPicker-D2G1ldiF.js +0 -2
- package/dashboard/dist/assets/DataTable-DXSUbA26.js +0 -2
- package/dashboard/dist/assets/ElapsedCell-CQGqkXP_.js +0 -2
- package/dashboard/dist/assets/EmptyState-Dep92Wkg.js +0 -2
- package/dashboard/dist/assets/EmptyState-Dep92Wkg.js.map +0 -1
- package/dashboard/dist/assets/EscalationsOverview-DVEFVjs7.js +0 -2
- package/dashboard/dist/assets/EscalationsOverview-DVEFVjs7.js.map +0 -1
- package/dashboard/dist/assets/EventTable-BMJAPkMi.js +0 -2
- package/dashboard/dist/assets/FilterBar-DbVbCzH2.js +0 -2
- package/dashboard/dist/assets/ListToolbar-0XNuXj0M.js +0 -2
- package/dashboard/dist/assets/McpOverview-CeYnCzBN.js +0 -2
- package/dashboard/dist/assets/McpQueryDetailPage-t3qW3QNa.js +0 -5
- package/dashboard/dist/assets/McpQueryDetailPage-t3qW3QNa.js.map +0 -1
- package/dashboard/dist/assets/McpQueryPage-CfUcdzaj.js +0 -2
- package/dashboard/dist/assets/McpQueryPage-CfUcdzaj.js.map +0 -1
- package/dashboard/dist/assets/McpRunDetailPage-CZtodW_Z.js +0 -2
- package/dashboard/dist/assets/McpRunsPage-Dzgq7HGt.js +0 -2
- package/dashboard/dist/assets/McpRunsPage-Dzgq7HGt.js.map +0 -1
- package/dashboard/dist/assets/Modal-yyhUeKoA.js +0 -2
- package/dashboard/dist/assets/OperatorDashboard-Ceh7OQtZ.js +0 -2
- package/dashboard/dist/assets/PageHeader-CZ9a8cpr.js +0 -2
- package/dashboard/dist/assets/PageHeader-CZ9a8cpr.js.map +0 -1
- package/dashboard/dist/assets/PageHeaderWithStats-BJuNs5NM.js +0 -2
- package/dashboard/dist/assets/PageHeaderWithStats-BJuNs5NM.js.map +0 -1
- package/dashboard/dist/assets/PriorityBadge-BrPikMFy.js +0 -2
- package/dashboard/dist/assets/ProcessDetailPage-2miaYd8G.js +0 -2
- package/dashboard/dist/assets/ProcessesListPage-DqpRDqjk.js +0 -2
- package/dashboard/dist/assets/ProcessesListPage-DqpRDqjk.js.map +0 -1
- package/dashboard/dist/assets/RolePill-DxbJMfJu.js +0 -2
- package/dashboard/dist/assets/RolesPage-CYHRo21-.js +0 -2
- package/dashboard/dist/assets/RolesPage-CYHRo21-.js.map +0 -1
- package/dashboard/dist/assets/RowActions-DurFwIwe.js +0 -2
- package/dashboard/dist/assets/RunAsSelector-CNKraP6u.js +0 -2
- package/dashboard/dist/assets/StatCard-CKplpK3w.js +0 -2
- package/dashboard/dist/assets/StatusBadge-Dm0V1dNN.js +0 -2
- package/dashboard/dist/assets/StatusBadge-Dm0V1dNN.js.map +0 -1
- package/dashboard/dist/assets/StepIndicator-Dicx0WTZ.js +0 -2
- package/dashboard/dist/assets/StickyPagination-B2jYvU3-.js +0 -2
- package/dashboard/dist/assets/SwimlaneTimeline-ClwumkT1.js +0 -2
- package/dashboard/dist/assets/SwimlaneTimeline-ClwumkT1.js.map +0 -1
- package/dashboard/dist/assets/TagInput-CypDZ6Kl.js +0 -2
- package/dashboard/dist/assets/TaskDetailPage-DooDNJGT.js +0 -2
- package/dashboard/dist/assets/TaskDetailPage-DooDNJGT.js.map +0 -1
- package/dashboard/dist/assets/TaskQueuePill-C1hZ-j31.js +0 -2
- package/dashboard/dist/assets/TaskQueuePill-C1hZ-j31.js.map +0 -1
- package/dashboard/dist/assets/TasksListPage-D7CdkAeg.js +0 -2
- package/dashboard/dist/assets/TimeAgo-B5LXB2aj.js +0 -2
- package/dashboard/dist/assets/TimestampCell-Crb9b0Gw.js +0 -2
- package/dashboard/dist/assets/UserName-OPg-nkRa.js +0 -2
- package/dashboard/dist/assets/WorkflowExecutionPage-CcLVrs9b.js +0 -2
- package/dashboard/dist/assets/WorkflowPill-CCV4MMj7.js +0 -2
- package/dashboard/dist/assets/WorkflowsDashboard-DB1SncBi.js +0 -2
- package/dashboard/dist/assets/WorkflowsDashboard-DB1SncBi.js.map +0 -1
- package/dashboard/dist/assets/WorkflowsOverview-DvShiYJV.js +0 -2
- package/dashboard/dist/assets/YamlWorkflowsPage-DCBoMeGI.js +0 -2
- package/dashboard/dist/assets/YamlWorkflowsPage-DCBoMeGI.js.map +0 -1
- package/dashboard/dist/assets/escalation-A0CsbvNV.js +0 -2
- package/dashboard/dist/assets/escalation-columns-BpBJN6k4.js +0 -2
- package/dashboard/dist/assets/helpers-CmznCuAx.js +0 -2
- package/dashboard/dist/assets/index-BIeYV5QK.js +0 -2
- package/dashboard/dist/assets/index-BIeYV5QK.js.map +0 -1
- package/dashboard/dist/assets/index-BYwD3kHN.js +0 -5
- package/dashboard/dist/assets/index-C5TUqJu0.css +0 -1
- package/dashboard/dist/assets/index-C8-UaN4N.js +0 -2
- package/dashboard/dist/assets/index-C8-UaN4N.js.map +0 -1
- package/dashboard/dist/assets/index-CAj5LT9H.js +0 -15
- package/dashboard/dist/assets/index-CAj5LT9H.js.map +0 -1
- package/dashboard/dist/assets/index-CjxHCVxl.js +0 -2
- package/dashboard/dist/assets/index-CjxHCVxl.js.map +0 -1
- package/dashboard/dist/assets/index-Cr0Rqsj7.js +0 -2
- package/dashboard/dist/assets/index-DZHNte4o.js +0 -2
- package/dashboard/dist/assets/index-DZHNte4o.js.map +0 -1
- package/dashboard/dist/assets/index-VnYkWW8r.js +0 -2
- package/dashboard/dist/assets/index-XGOmZ117.js +0 -2
- package/dashboard/dist/assets/index-ZjOUzWhc.js +0 -2
- package/dashboard/dist/assets/index-ZjOUzWhc.js.map +0 -1
- package/dashboard/dist/assets/index-puKKZ5l8.js +0 -281
- package/dashboard/dist/assets/index-puKKZ5l8.js.map +0 -1
- package/dashboard/dist/assets/index-t5frSddy.js +0 -6
- package/dashboard/dist/assets/index-t5frSddy.js.map +0 -1
- package/dashboard/dist/assets/mcp-DrWymhSu.js +0 -2
- package/dashboard/dist/assets/namespaces-Cm6AY5sh.js +0 -2
- package/dashboard/dist/assets/settings-DTQNp6tH.js +0 -2
- package/dashboard/dist/assets/vendor-icons-CWl44VA6.js.map +0 -1
- package/dashboard/dist/assets/vendor-query-DLp59M9_.js +0 -35
- package/dashboard/dist/assets/vendor-query-DLp59M9_.js.map +0 -1
- package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js +0 -26
- package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js.map +0 -1
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProcessesListPage-DqpRDqjk.js","assets/tasks-CS1rgG1s.js","assets/vendor-query-DLp59M9_.js","assets/workflows-2QAXh3UD.js","assets/useEventHooks-BjXX8x3a.js","assets/useFilterParams-CGRYFw_A.js","assets/vendor-react-Co3Y8ikm.js","assets/DataTable-DXSUbA26.js","assets/EmptyState-Dep92Wkg.js","assets/TimestampCell-Crb9b0Gw.js","assets/StickyPagination-B2jYvU3-.js","assets/FilterBar-DbVbCzH2.js","assets/PageHeader-CZ9a8cpr.js","assets/ListToolbar-0XNuXj0M.js","assets/vendor-icons-CWl44VA6.js","assets/WorkflowPill-CCV4MMj7.js","assets/ProcessDetailPage-2miaYd8G.js","assets/settings-DTQNp6tH.js","assets/PageHeaderWithStats-BJuNs5NM.js","assets/StatusBadge-Dm0V1dNN.js","assets/RolePill-DxbJMfJu.js","assets/UserName-OPg-nkRa.js","assets/users-DYsdQ7Md.js","assets/McpOverview-CeYnCzBN.js","assets/mcp-DrWymhSu.js","assets/mcp-runs-DUfz4mLd.js","assets/yaml-workflows-sx8-UEE3.js","assets/namespaces-Cm6AY5sh.js","assets/StatCard-CKplpK3w.js","assets/McpRunsPage-Dzgq7HGt.js","assets/ElapsedCell-CQGqkXP_.js","assets/RowActions-DurFwIwe.js","assets/McpRunDetailPage-CZtodW_Z.js","assets/CopyableId-DXkaAOYk.js","assets/CollapsibleSection-CgYgQiOc.js","assets/EventTable-BMJAPkMi.js","assets/SwimlaneTimeline-ClwumkT1.js","assets/McpQueryPage-CfUcdzaj.js","assets/mcp-query-BhUxVEMS.js","assets/McpQueryDetailPage-t3qW3QNa.js","assets/useYamlActivityEvents-BeR-nVWQ.js","assets/TagInput-CypDZ6Kl.js","assets/RunAsSelector-CNKraP6u.js","assets/BotPicker-DWhn0tr1.js","assets/bots-Dqos20NE.js","assets/TimeAgo-B5LXB2aj.js","assets/EscalationsOverview-DVEFVjs7.js","assets/AvailableEscalationsPage-6vexlrk3.js","assets/roles-2v1Kc7BJ.js","assets/constants-BHkpVaqx.js","assets/CustomDurationPicker-D2G1ldiF.js","assets/Modal-yyhUeKoA.js","assets/escalation-columns-BpBJN6k4.js","assets/PriorityBadge-BrPikMFy.js","assets/escalation-A0CsbvNV.js","assets/OperatorDashboard-Ceh7OQtZ.js","assets/index-BYwD3kHN.js","assets/WorkflowsOverview-DvShiYJV.js","assets/index-t5frSddy.js","assets/helpers-CmznCuAx.js","assets/WorkflowsDashboard-DB1SncBi.js","assets/YamlWorkflowsPage-DCBoMeGI.js","assets/useExpandedRows-Cg9iq6Vy.js","assets/TasksListPage-D7CdkAeg.js","assets/TaskDetailPage-DooDNJGT.js","assets/WorkflowExecutionPage-CcLVrs9b.js","assets/AdminDashboard-NLryl1_B.js","assets/index-C8-UaN4N.js","assets/TaskQueuePill-C1hZ-j31.js","assets/index-CAj5LT9H.js","assets/ConfirmDeleteModal-DCKAPXD3.js","assets/StepIndicator-Dicx0WTZ.js","assets/index-CjxHCVxl.js","assets/index-VnYkWW8r.js","assets/index-DZHNte4o.js","assets/RolesPage-CYHRo21-.js","assets/index-XGOmZ117.js","assets/index-Cr0Rqsj7.js","assets/CredentialsPage-B361BOfU.js","assets/index-BIeYV5QK.js","assets/index-ZjOUzWhc.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var jC=Object.defineProperty;var MC=(i,s,a)=>s in i?jC(i,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[s]=a;var S=(i,s,a)=>MC(i,typeof s!="symbol"?s+"":s,a);import{r as Jw,a as B,g as kC,u as rr,b as Vs,c as Sa,Q as VC,d as UC}from"./vendor-query-DLp59M9_.js";import{r as zC,L as cl,u as Zi,N as sh,a as Qw,b as ei,O as Xd,c as Xw,d as BC,R as qC}from"./vendor-react-Co3Y8ikm.js";import{R as LC,C as HC,I as PC,B as Zw,U as $C,a as IC,T as FC,W as YC,A as GC,S as JC,P as QC,L as Kw,b as XC,c as ZC,d as Y0,F as KC,e as WC,M as Ww,f as eE,g as eT,h as tT,E as nT,i as sT,j as aT,k as zS,X as G0,G as rT,l as iT,m as oT,n as lT,o as cT}from"./vendor-icons-CWl44VA6.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 uT(){if(BS)return qd;BS=1;/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-dev-runtime.development.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/return(function(){function i(G){if(G==null)return null;if(typeof G=="function")return G.$$typeof===le?null:G.displayName||G.name||null;if(typeof G=="string")return G;switch(G){case X:return"Fragment";case te:return"Profiler";case ee:return"StrictMode";case ne:return"Suspense";case oe:return"SuspenseList";case H:return"Activity"}if(typeof G=="object")switch(typeof G.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),G.$$typeof){case F:return"Portal";case De:return G.displayName||"Context";case we:return(G._context.displayName||"Context")+".Consumer";case U:var Ne=G.render;return G=G.displayName,G||(G=Ne.displayName||Ne.name||"",G=G!==""?"ForwardRef("+G+")":"ForwardRef"),G;case W:return Ne=G.displayName||null,Ne!==null?Ne:i(G.type)||"Memo";case Q:Ne=G._payload,G=G._init;try{return i(G(Ne))}catch{}}return null}function s(G){return""+G}function a(G){try{s(G);var Ne=!1}catch{Ne=!0}if(Ne){Ne=console;var Xe=Ne.error,Le=typeof Symbol=="function"&&Symbol.toStringTag&&G[Symbol.toStringTag]||G.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(G)}}function o(G){if(G===X)return"<>";if(typeof G=="object"&&G!==null&&G.$$typeof===Q)return"<...>";try{var Ne=i(G);return Ne?"<"+Ne+">":"<...>"}catch{return"<...>"}}function u(){var G=ie.A;return G===null?null:G.getOwner()}function d(){return Error("react-stack-top-frame")}function p(G){if(ve.call(G,"key")){var Ne=Object.getOwnPropertyDescriptor(G,"key").get;if(Ne&&Ne.isReactWarning)return!1}return G.key!==void 0}function m(G,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(G,"key",{get:Xe,configurable:!0})}function g(){var G=i(this.type);return pe[G]||(pe[G]=!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.")),G=this.props.ref,G!==void 0?G:null}function v(G,Ne,Xe,Le,Yt,wa){var We=Xe.ref;return G={$$typeof:z,type:G,key:Ne,props:Xe,_owner:Le},(We!==void 0?We:null)!==null?Object.defineProperty(G,"ref",{enumerable:!1,get:g}):Object.defineProperty(G,"ref",{enumerable:!1,value:null}),G._store={},Object.defineProperty(G._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(G,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(G,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Yt}),Object.defineProperty(G,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:wa}),Object.freeze&&(Object.freeze(G.props),Object.freeze(G)),G}function _(G,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(G);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
|
-
let props = %s;
|
|
12
|
-
<%s {...props} />
|
|
13
|
-
React keys must be passed directly to JSX without using spread:
|
|
14
|
-
let props = %s;
|
|
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 G=="function"?G.displayName||G.name||"Unknown":G),v(G,We,Xe,u(),Yt,wa)}function w(G){D(G)?G._store&&(G._store.validated=1):typeof G=="object"&&G!==null&&G.$$typeof===Q&&(G._payload.status==="fulfilled"?D(G._payload.value)&&G._payload.value._store&&(G._payload.value._store.validated=1):G._store&&(G._store.validated=1))}function D(G){return typeof G=="object"&&G!==null&&G.$$typeof===z}var q=Jw(),z=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),X=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=q.__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};q={react_stack_bottom_frame:function(G){return G()}};var ae,pe={},xe=q.react_stack_bottom_frame.bind(q,d)(),je=nt(o(d)),Te={};qd.Fragment=X,qd.jsxDEV=function(G,Ne,Xe,Le){var Yt=1e4>ie.recentlyCreatedOwnerStacks++;return _(G,Ne,Xe,Le,Yt?Error("react-stack-top-frame"):xe,Yt?nt(o(G)):je)}})(),qd}var qS;function fT(){return qS||(qS=1,n0.exports=uT()),n0.exports}var b=fT(),s0={exports:{}},nu={},a0={exports:{}},r0={},LS;function dT(){return LS||(LS=1,(function(i){/**
|
|
16
|
-
* @license React
|
|
17
|
-
* scheduler.development.js
|
|
18
|
-
*
|
|
19
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
20
|
-
*
|
|
21
|
-
* This source code is licensed under the MIT license found in the
|
|
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),X=o(q);X!==null&&!(X.expirationTime>ae&&g());){var je=X.callback;if(typeof je=="function"){X.callback=null,ee=X.priorityLevel;var Te=je(X.expirationTime<=ae);if(ae=i.unstable_now(),typeof Te=="function"){X.callback=Te,p(ae),pe=!0;break t}X===o(q)&&u(q),p(ae)}else u(q);X=o(q)}if(X!==null)pe=!0;else{var G=o(z);G!==null&&v(m,G.startTime-ae),pe=!1}}break e}finally{X=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,G=Te>>>1;je<G;){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(z);pe!==null;){if(pe.callback===null)u(z);else if(pe.startTime<=ae)u(z),pe.sortIndex=pe.expirationTime,a(q,pe);else break;pe=o(z)}}function m(ae){if(De=!1,p(ae),!we)if(o(q)!==null)we=!0,Q||(Q=!0,ve());else{var pe=o(z);pe!==null&&v(m,pe.startTime-ae)}}function g(){return U?!0:!(i.unstable_now()-ie<le)}function v(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 q=[],z=[],F=1,X=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:F++,callback:pe,priorityLevel:ae,startTime:xe,expirationTime:Te,sortIndex:-1},xe>je?(ae.sortIndex=xe,a(z,ae),o(q)===null&&ae===o(z)&&(De?(oe(H),H=-1):De=!0,v(m,xe-je))):(ae.sortIndex=Te,a(q,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 hT(){return HS||(HS=1,a0.exports=dT()),a0.exports}var PS;function mT(){if(PS)return nu;PS=1;/**
|
|
24
|
-
* @license React
|
|
25
|
-
* react-dom-client.development.js
|
|
26
|
-
*
|
|
27
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the MIT license found in the
|
|
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=Gt(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=Gt(e)?e.slice():Pe({},e);return r+1===t.length?(c[n[r]]=c[l],Gt(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=Gt(e)?e.slice():Pe({},e);return n+1===t.length?(Gt(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 v(){}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 v_(e,t,n,r)}function q(e,t){e.context===Rr&&(Np(e.current,2,t,e,null,null),go())}function z(e,t){if(is!==null){var n=t.staleFamilies;t=t.updatedFamilies,Zl(),$y(e.current,t,n),go()}}function F(e){is=e}function X(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===HA?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 oc: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(_r,t,e),ve(lc,e,e),ve(Er,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(Er,e),ve(Er,n,e)}function ae(e){ie(Er,e),ie(lc,e),ie(_r,e)}function pe(){return Qe(Er.current)}function xe(e){e.memoizedState!==null&&ve(Vf,e,e);var t=Qe(Er.current),n=e.type,r=N1(t.context,n);n=my(t.ancestorInfo,n),r={context:r,ancestorInfo:n},t!==r&&(ve(lc,e,e),ve(Er,r,e))}function je(e){lc.current===e&&(ie(Er,e),ie(lc,e)),Vf.current===e&&(ie(Vf,e),Wc._currentValue=Ji)}function Te(){}function G(){if(cc===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})}cc++}function Ne(){if(cc--,cc===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>cc&&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
|
-
`)&&(e=e.slice(29)),t=e.indexOf(`
|
|
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(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
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
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=Y.H,Y.H=null,G();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 x=h.split(`
|
|
37
|
-
`),k=y.split(`
|
|
38
|
-
`);for(f=c=0;c<x.length&&!x[c].includes("DetermineComponentFrameRoot");)c++;for(;f<k.length&&!k[f].includes("DetermineComponentFrameRoot");)f++;if(c===x.length||f===k.length)for(c=x.length-1,f=k.length-1;1<=c&&0<=f&&x[c]!==k[f];)f--;for(;1<=c&&0<=f;c--,f--)if(x[c]!==k[f]){if(c!==1||f!==1)do if(c--,f--,0>f||x[c]!==k[f]){var V=`
|
|
39
|
-
`+x[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,Y.H=r,Ne(),Error.prepareStackTrace=n}return x=(x=e?e.displayName||e.name:"")?Le(x):"",typeof e=="function"&&zp.set(e,x),x}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,x=c.debugLocation;if(x!=null){var k=Xe(x),V=k.lastIndexOf(`
|
|
40
|
-
`),O=V===-1?k:k.slice(V+1);if(O.indexOf(h)!==-1){var P=`
|
|
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
|
-
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=Xe(r);l!==""&&(t+=`
|
|
44
|
-
`+l)}}else if(e.debugStack!=null){var c=e.debugStack;(e=e.owner)&&c&&(t+=`
|
|
45
|
-
`+Xe(c))}else break;var f=t}catch(h){f=`
|
|
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 ir(e),!1}catch{return!0}}function ir(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)),ir(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)),ir(e)}function Nl(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)),ir(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"&&QA(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-(XA(e)/ZA|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 Sl(){var e=Bf;return Bf<<=1,(Bf&62914560)===0&&(Bf=4194304),e}function wl(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,x=e.hiddenUpdates;for(n=f&~n;0<n;){var k=31-yn(n),V=1<<k;h[k]=0,y[k]=-1;var O=x[k];if(O!==null)for(x[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 El(e,t){var n=t&-t;return n=(n&42)!==0?1:_l(n),(n&(e.suspendedLanes|t))!==0?0:n}function _l(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 or(e){delete e[ln],delete e[gn],delete e[Pp],delete e[KA],delete e[WA]}function Bs(e){var t=e[ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Dr]||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[Dr]){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[uc]=!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){eD[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 lr(e){return Es.call(lx,e)?!0:Es.call(ox,e)?!1:tD.test(e)?lx[e]=!0:(ox[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function cr(e,t,n){if(lr(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(lr(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 Nl(e),e;default:return""}}function ur(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Al(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){Nl(f),n=""+f,c.call(this,f)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(f){Nl(f),n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ro(e){if(!e._valueTracker){var t=ur(e)?"checked":"value";e._valueTracker=Al(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=ur(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(nD,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 Dl(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
|
-
|
|
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 Cl(e,t){for(e=0;e<px.length;e++){var n=px[e];if(t[n]!=null){var r=Gt(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(Gt(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 Z(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
|
-
`;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)+`
|
|
51
|
-
`+Z(n)+$(t,r)+`
|
|
52
|
-
`}return M(n)+$(e,r)+`
|
|
53
|
-
`}function ye(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(t,n){return n})}function Be(e,t){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>t?5>t?'"..."':e.slice(0,t-4)+'..."':e;case"object":if(e===null)return"null";if(Gt(e))return"[...]";if(e.$$typeof===oa)return(t=W(e.type))?"<"+t+">":"<...>";var n=ye(e);if(n==="Object"){n="",t-=2;for(var r in e)if(e.hasOwnProperty(r)){var l=JSON.stringify(r);if(l!=='"'+r+'"'&&(r=l),t-=r.length-2,l=Be(e[r],15>t?t:15),t-=l.length,0>t){n+=n===""?"...":", ...";break}n+=(n===""?"":",")+r+":"+l}return"{"+n+"}"}return n;case"function":return(t=e.displayName||e.name)?"function "+t:"function";default:return String(e)}}function it(e,t){return typeof e!="string"||yx.test(e)?"{"+Be(e,t-2)+"}":e.length>t-2?5>t?'"..."':'"'+e.slice(0,t-5)+'..."':'"'+e+'"'}function pn(e,t,n){var r=120-n.length-e.length,l=[],c;for(c in t)if(t.hasOwnProperty(c)&&c!=="children"){var f=it(t[c],120-n.length-c.length-1);r-=c.length+f.length+2,l.push(c+"="+f)}return l.length===0?n+"<"+e+`>
|
|
54
|
-
`:0<r?n+"<"+e+" "+l.join(" ")+`>
|
|
55
|
-
`:n+"<"+e+`
|
|
56
|
-
`+n+" "+l.join(`
|
|
57
|
-
`+n+" ")+`
|
|
58
|
-
`+n+`>
|
|
59
|
-
`}function fr(e,t,n){var r="",l=Pe({},t),c;for(c in e)if(e.hasOwnProperty(c)){delete l[c];var f=120-2*n-c.length-2,h=Be(e[c],f);t.hasOwnProperty(c)?(f=Be(t[c],f),r+=L(n)+c+": "+h+`
|
|
60
|
-
`,r+=Z(n)+c+": "+f+`
|
|
61
|
-
`):r+=L(n)+c+": "+h+`
|
|
62
|
-
`}for(var y in l)l.hasOwnProperty(y)&&(e=Be(l[y],120-2*n-y.length-2),r+=Z(n)+y+": "+e+`
|
|
63
|
-
`);return r}function KE(e,t,n,r){var l="",c=new Map;for(x in n)n.hasOwnProperty(x)&&c.set(x.toLowerCase(),x);if(c.size===1&&c.has("children"))l+=pn(e,t,M(r));else{for(var f in t)if(t.hasOwnProperty(f)&&f!=="children"){var h=120-2*(r+1)-f.length-1,y=c.get(f.toLowerCase());if(y!==void 0){c.delete(f.toLowerCase());var x=t[f];y=n[y];var k=it(x,h);h=it(y,h),typeof x=="object"&&x!==null&&typeof y=="object"&&y!==null&&ye(x)==="Object"&&ye(y)==="Object"&&(2<Object.keys(x).length||2<Object.keys(y).length||-1<k.indexOf("...")||-1<h.indexOf("..."))?l+=M(r+1)+f+`={{
|
|
64
|
-
`+fr(x,y,r+2)+M(r+1)+`}}
|
|
65
|
-
`:(l+=L(r+1)+f+"="+k+`
|
|
66
|
-
`,l+=Z(r+1)+f+"="+h+`
|
|
67
|
-
`)}else l+=M(r+1)+f+"="+it(t[f],h)+`
|
|
68
|
-
`}c.forEach(function(V){if(V!=="children"){var O=120-2*(r+1)-V.length-1;l+=Z(r+1)+V+"="+it(n[V],O)+`
|
|
69
|
-
`}}),l=l===""?M(r)+"<"+e+`>
|
|
70
|
-
`:M(r)+"<"+e+`
|
|
71
|
-
`+l+M(r)+`>
|
|
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 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
|
-
`,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(x in l)if(l.hasOwnProperty(x)&&x!=="children"){var y=it(l[x],15);if(f-=x.length+y.length+2,0>f){h+=" ...";break}h+=" "+x+"="+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=KE(c,l,e.serverProps,t),t++);var x="";for(l=e.fiber.child,c=0;l&&c<e.children.length;)f=e.children[c],f.fiber===l?(x+=Ah(f,t),c++):x+=dy(l,t),l=l.sibling;for(l&&0<e.children.length&&(x+=M(t)+`...
|
|
77
|
-
`),l=e.serverTail,e.serverProps===null&&t--,e=0;e<l.length;e++)c=l[e],x=typeof c=="string"?x+(Z(t)+$(c,120-2*t)+`
|
|
78
|
-
`):x+pn(c.type,c.props,Z(t));return n+r+x}function Dh(e){try{return`
|
|
79
|
-
|
|
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),aD.indexOf(t)!==-1&&(n.pTagInButtonScope=null),sD.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 rD.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 WE(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:WE(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
|
-
This will cause a hydration error.%s`,f,r,n,c)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
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
|
-
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
|
-
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 Tl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}function e_(e){return e.replace(lD,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,e_(t.replace(oD,"ms-")))):iD.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 x in r)if(l=r[x],(c=h[x])&&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)x=t[O],t.hasOwnProperty(O)&&n[O]!==x&&yy(e,O,x)}else for(r in t)t.hasOwnProperty(r)&&yy(e,r,t[r])}function Ol(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 cD.get(e)||e}function t_(e,t){if(Es.call(Oo,t)&&Oo[t])return!0;if(fD.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(uD.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 n_(e,t){var n=[],r;for(r in t)t_(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 s_(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 dD.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),vn[t]=!0;if(hD.test(t)||mD.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 a_(e,t,n){var r=[],l;for(l in t)s_(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 Rl(e){return pD.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 jl(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 Cr?Cr.value:Cr.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 r_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=CD[e])?!!t[e]:!1}function Oh(){return r_}function Ey(e,t){switch(e){case"keyup":return LD.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 i_(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 o_(e,t){if(Mo)return e==="compositionend"||!Kp&&Ey(e,t)?(e=Sy(),$f=Jp=Cr=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"?!!PD[e.type]:t==="textarea"}function l_(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 c_(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(){bc&&(bc.detachEvent("onpropertychange",Oy),yc=bc=null)}function Oy(e){if(e.propertyName==="value"&&Ru(yc)){var t=[];Dy(t,yc,e,Th(e)),Ny(c_,t)}}function u_(e,t,n){e==="focusin"?(Ty(),bc=t,yc=n,bc.attachEvent("onpropertychange",Oy)):e==="focusout"&&Ty()}function f_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ru(yc)}function d_(e,t){if(e==="click")return Ru(t)}function h_(e,t){if(e==="input"||e==="change")return Ru(t)}function m_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function Ml(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}),gc&&Ml(gc,r)||(gc=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 p_(e){for(var t=Yf,n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"&&r!==null)if(Gt(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 x in t)x==="children"?t.children!=null&&(!Gt(t.children)||0<t.children.length)&&(e=!0):Es.call(t,x)&&x[0]!=="_"&&Fs(x,t[x],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(x=p_(t),x===rb||x===Yf){t=JSON.stringify(t);break}else if(x===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"&&(x=Object.getPrototypeOf(t))&&typeof x.constructor=="function"&&(c=x.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===QD?"…":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([Gf+" ".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([Gf+l,"…"],[Jf+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([Gf+l,f],[Jf+l,f]),l=!1;continue}}else{var y=Object.prototype.toString.call(f),x=Object.prototype.toString.call(h);if(y===x&&(x==="[object Object]"||x==="[object Array]")){y=[Yx+" ".repeat(r)+c,x==="[object Array]"?"Array":""],n.push(y),x=n.length,Uy(f,h,n,r+1)?x===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),x=Function.prototype.toString.call(h),y===x)){f=h.name===""?"() => {}":h.name+"() {}",n.push([Yx+" ".repeat(r)+c,f+" Referentially unequal function closure. Consider memoization."]);continue}}Fs(c,f,n,r,Gf),Fs(c,h,n,r,Jf)}l=!1}}else n.push([Jf+" ".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&&(Or.start=t,Or.end=n,qa.color="warning",qa.tooltipText=r,qa.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,r,Or)):performance.measure(r,Or))}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 x=e.memoizedProps;h=e._debugTask,x!==null&&f!==null&&f.memoizedProps!==x?(y=[XD],x=Uy(f.memoizedProps,x,y,0),1<y.length&&(x&&!Tr&&(f.lanes&l)===0&&100<e.actualDuration?(Tr=!0,y[0]=ZD,qa.color="warning",qa.tooltipText=Gx):(qa.color=r,qa.tooltipText=c),qa.properties=y,Or.start=t,Or.end=n,h!=null?h.run(performance.measure.bind(performance,""+c,Or)):performance.measure(""+c,Or))):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 Gs(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 b_(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 y_(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 g_(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&vc||(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>hC)throw Pi=Yc=0,Gc=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>mC&&(Pi=0,Gc=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:oc,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===oc||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 x=!1;if(r=!1,y!==null&&(y=is(y),y!==void 0&&(n.has(y)?r=!0:t.has(y)&&(h===1?r=!0:x=!0))),zo!==null&&(zo.has(e)||l!==null&&zo.has(l))&&(r=!0),r&&(e._debugNeedsRemount=!0),(r||x)&&(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 v_(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,Jx||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=CA(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 oc: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":Gt(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
|
-
|
|
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){dr(),Bo[qo++]=xc,Bo[qo++]=Qf,Qf=e,xc=t}function Yy(e,t,n){dr(),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){dr(),e.return!==null&&(Ra(e,1),Yy(e,1,0))}function $h(e){for(;e===Qf;)Qf=Bo[--qo],Bo[qo]=null,xc=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 Gy(){return dr(),Di!==null?{id:Ha,overflow:Pa}:null}function Jy(e,t){dr(),os[ls++]=Ha,os[ls++]=Pa,os[ls++]=Di,Ha=t.id,Pa=t.overflow,Di=e}function dr(){$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 hr(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,n="",r=Fn;throw r!==null&&(Fn=null,n=Dh(r)),kl(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
|
-
|
|
89
|
-
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
90
|
-
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
91
|
-
- Date formatting in a user's locale which doesn't match the server.
|
|
92
|
-
- External changing data without sending a snapshot of it along with the HTML.
|
|
93
|
-
- Invalid HTML tag nesting.
|
|
94
|
-
|
|
95
|
-
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
96
|
-
|
|
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":Dl(t,r);break;case"select":Hs("select",r),Ie("invalid",t),Cl(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||hr(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)}hr(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,wr(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=jr;return e!==null&&(En===null?En=e:En.push.apply(En,e),jr=null),e}function kl(e){jr===null?jr=[e]:jr.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
|
-
|
|
99
|
-
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
100
|
-
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
101
|
-
- Date formatting in a user's locale which doesn't match the server.
|
|
102
|
-
- External changing data without sending a snapshot of it along with the HTML.
|
|
103
|
-
- Invalid HTML tag nesting.
|
|
104
|
-
|
|
105
|
-
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
106
|
-
|
|
107
|
-
%s%s`,"https://react.dev/link/hydration-mismatch",t)})}}function qu(){Lo=Xf=null,Ho=!1}function mr(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 Gh(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(Wc):e=[Wc])}l=l.return}e!==null&&Gh(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 xt(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 Jh(){return{controller:new eC,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 Vl(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&&tC(nC,function(){e.controller.abort()})}function Js(e,t,n){(e&127)!==0?0>pa&&(pa=qt(),Sc=Zf(t),db=t,n!=null&&(hb=H(n)),(Ze&(Qt|Jn))!==tn&&(Dt=!0,kr=Nc),e=nc(),t=tc(),e!==Po||t!==wc?Po=-1.1:t!==null&&(kr=Nc),Oi=e,wc=t):(e&4194048)!==0&&0>us&&(us=qt(),Ec=Zf(t),Zx=t,n!=null&&(Kx=H(n)),0>Ya)&&(e=nc(),t=tc(),(e!==Ur||t!==Ri)&&(Ur=-1.1),Vr=e,Ri=t)}function x_(e){if(0>pa){pa=qt(),Sc=e._debugTask!=null?e._debugTask:null,(Ze&(Qt|Jn))!==tn&&(kr=Nc);var t=nc(),n=tc();t!==Po||n!==wc?Po=-1.1:n!==null&&(kr=Nc),Oi=t,wc=n}0>us&&(us=qt(),Ec=e._debugTask!=null?e._debugTask:null,0>Ya)&&(e=nc(),t=tc(),(e!==Ur||t!==Ri)&&(Ur=-1.1),Vr=e,Ri=t)}function Ma(){var e=Ci;return Ci=0,e}function Pu(e){var t=Ci;return Ci=e,t}function Ul(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=Nt;return Nt=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){Nt===null&&(Nt=[]),Nt.push(e),Ia===null&&(Ia=[]),Ia.push(e)}function ea(){Nn=qt(),0>_e&&(_e=Nn)}function zl(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function N_(e,t){if(Ac===null){var n=Ac=[];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),Ac!==null)){$o!==null&&($o.status="fulfilled");var e=Ac;Ac=null,ji=0,$o=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function S_(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){Y.actQueue!==null&&(Y.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,Mc=!0,Io}}function pr(e){try{return oC(e)}catch(t){throw t!==null&&typeof t=="object"&&typeof t.then=="function"?(Vi=t,Mc=!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,Mc=!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=kc;return kc+=1,Fo===null&&(Fo=sg()),rg(Fo,e,t)}function Bl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function lg(e,t){throw t.$$typeof===qA?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
108
|
-
- Multiple copies of the "react" package is used.
|
|
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 Gu(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
|
-
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 Ju(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
|
-
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=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,J){return R===null||R.tag!==6?(R=Lh(j,T.mode,J),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,J){var fe=j.type;return fe===_o?(R=k(T,R,j.props.children,J,j.key),Fu(j,R,T),R):R!==null&&(R.elementType===fe||Hy(R,j)||typeof fe=="object"&&fe!==null&&fe.$$typeof===$n&&pr(fe)===R.type)?(R=l(R,j.props),Bl(R,j),R.return=T,R._debugOwner=j._owner,R._debugInfo=Ue,R):(R=zu(j,T.mode,J),Bl(R,j),R.return=T,R._debugInfo=Ue,R)}function x(T,R,j,J){return R===null||R.tag!==4||R.stateNode.containerInfo!==j.containerInfo||R.stateNode.implementation!==j.implementation?(R=Hh(j,T.mode,J),R.return=T,R._debugInfo=Ue,R):(R=l(R,j.children||[]),R.return=T,R._debugInfo=Ue,R)}function k(T,R,j,J,fe){return R===null||R.tag!==7?(R=mi(j,T.mode,J,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),Bl(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 J=an(R._debugInfo);return R=pr(R),T=V(T,R,j),Ue=J,T}if(Gt(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 J=an(R._debugInfo),T=V(T,Yu(R),j),Ue=J,T;if(R.$$typeof===la)return V(T,Hu(T,R),j);Gu(T,R)}return typeof R=="function"&&Ju(T,R),typeof R=="symbol"&&Qu(T,R),null}function O(T,R,j,J){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,J);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case oa:return j.key===fe?(fe=an(j._debugInfo),T=y(T,R,j,J),Ue=fe,T):null;case Eo:return j.key===fe?x(T,R,j,J):null;case $n:return fe=an(j._debugInfo),j=pr(j),T=O(T,R,j,J),Ue=fe,T}if(Gt(j)||oe(j))return fe!==null?null:(fe=an(j._debugInfo),T=k(T,R,j,J,null),Ue=fe,T);if(typeof j.then=="function")return fe=an(j._debugInfo),T=O(T,R,Yu(j),J),Ue=fe,T;if(j.$$typeof===la)return O(T,R,Hu(T,j),J);Gu(T,j)}return typeof j=="function"&&Ju(T,j),typeof j=="symbol"&&Qu(T,j),null}function P(T,R,j,J,fe){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return T=T.get(j)||null,h(R,T,""+J,fe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case oa:return j=T.get(J.key===null?j:J.key)||null,T=an(J._debugInfo),R=y(R,j,J,fe),Ue=T,R;case Eo:return T=T.get(J.key===null?j:J.key)||null,x(R,T,J,fe);case $n:var Re=an(J._debugInfo);return J=pr(J),R=P(T,R,j,J,fe),Ue=Re,R}if(Gt(J)||oe(J))return j=T.get(j)||null,T=an(J._debugInfo),R=k(R,j,J,fe,null),Ue=T,R;if(typeof J.then=="function")return Re=an(J._debugInfo),R=P(T,R,j,Yu(J),fe),Ue=Re,R;if(J.$$typeof===la)return P(T,R,j,Hu(R,J),fe);Gu(R,J)}return typeof J=="function"&&Ju(R,J),typeof J=="symbol"&&Qu(R,J),null}function ce(T,R,j,J){if(typeof j!="object"||j===null)return J;switch(j.$$typeof){case oa:case Eo:_(T,R,j);var fe=j.key;if(typeof fe!="string")break;if(J===null){J=new Set,J.add(fe);break}if(!J.has(fe)){J.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=pr(j),ce(T,R,j,J)}return J}function me(T,R,j,J){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],J);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],J),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],J),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,J){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,J);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,J),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,J),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(RC){return t(T,RC)}),$e&&Ra(T,Se),fe}function Ye(T,R,j,J){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),J=l(R,j.props.children),J.return=T,J._debugOwner=j._owner,J._debugInfo=Ue,Fu(j,J,T),T=J;break e}}else if(R.elementType===Re||Hy(R,j)||typeof Re=="object"&&Re!==null&&Re.$$typeof===$n&&pr(Re)===R.type){n(T,R.sibling),J=l(R,j.props),Bl(J,j),J.return=T,J._debugOwner=j._owner,J._debugInfo=Ue,T=J;break e}n(T,R);break}else t(T,R);R=R.sibling}j.type===_o?(J=mi(j.props.children,T.mode,J,j.key),J.return=T,J._debugOwner=T,J._debugTask=T._debugTask,J._debugInfo=Ue,Fu(j,J,T),T=J):(J=zu(j,T.mode,J),Bl(J,j),J.return=T,J._debugInfo=Ue,T=J)}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),J=l(R,fe.children||[]),J.return=T,T=J;break e}else{n(T,R);break}else t(T,R);R=R.sibling}J=Hh(fe,T.mode,J),J.return=T,T=J}return f(T);case $n:return fe=an(j._debugInfo),j=pr(j),T=Ye(T,R,j,J),Ue=fe,T}if(Gt(j))return fe=an(j._debugInfo),T=me(T,R,j,J),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,J),Ue=fe,T}if(typeof j.then=="function")return fe=an(j._debugInfo),T=Ye(T,R,Yu(j),J),Ue=fe,T;if(j.$$typeof===la)return Ye(T,R,Hu(T,j),J);Gu(T,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(fe=""+j,R!==null&&R.tag===6?(n(T,R.sibling),J=l(R,fe),J.return=T,T=J):(n(T,R),J=Lh(fe,T.mode,J),J.return=T,J._debugOwner=T,J._debugTask=T._debugTask,J._debugInfo=Ue,T=J),f(T)):(typeof j=="function"&&Ju(T,j),typeof j=="symbol"&&Qu(T,j),n(T,R))}return function(T,R,j,J){var fe=Ue;Ue=null;try{kc=0;var Re=Ye(T,R,j,J);return Fo=null,Re}catch(gt){if(gt===Io||gt===rd)throw gt;var Ee=D(29,gt,null,T.mode);Ee.lanes=J,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=Gt(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 br(e){return{lane:e,tag:NN,payload:null,callback:null,next:null}}function yr(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
|
-
|
|
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 ql(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 Ll(){if(Sb){var e=$o;if(e!==null)throw e}}function Hl(e,t,n,r){Sb=!1;var l=e.updateQueue;zr=!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,x=y.next;y.next=null,f===null?c=x:f.next=x,f=y;var k=e.alternate;k!==null&&(k=k.updateQueue,h=k.lastBaseUpdate,h!==f&&(h===null?k.firstBaseUpdate=x:h.next=x,k.lastBaseUpdate=y))}if(c!==null){var V=l.baseState;f=0,k=x=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:zr=!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?(x=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=x,l.lastBaseUpdate=k,c===null&&(l.shared.lanes=0),Lr|=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 w_(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 gr(e){var t=e.alternate;ve(Mt,Mt.current&Go,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)):vr(e)}function vr(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
|
-
`,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
|
-
|
|
119
|
-
Previous render Next render
|
|
120
|
-
------------------------------------------------------
|
|
121
|
-
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
122
|
-
`,t,n)}}}function uo(e){e==null||Gt(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",I,typeof e)}function Ku(){var e=H(Oe);DN.has(e)||(DN.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function Tt(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
123
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
124
|
-
2. You might be breaking the Rules of Hooks
|
|
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 am(e,t){if(zc)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
|
-
|
|
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 rm(e,t,n,r,l,c){Ga=c,Oe=t,hs=e!==null?e._debugHookTypes:null,Qa=-1,zc=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,Y.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?Ja!==null&&(t.dependencies={lanes:0,firstContext:null,_debugThenableState:Ja}):t.dependencies._debugThenableState=Ja,Y.H=Bc;var n=ft!==null&&ft.next!==null;if(Ga=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,Uc=0,Ja=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)),Mc?(Mc=!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&&(Ja=null),Uc=0,Qo=!1,l>=cC)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(l+=1,zc=!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=bb(t,n,r)}while(Qo);return c}function E_(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?Pl(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}Ga=0,hs=Lt=ft=Oe=null,Qa=-1,I=null,Qo=!1,Uc=ud=0,Ja=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 Pl(e){var t=Uc;return Uc+=1,Ja===null&&(Ja=sg()),e=rg(Ja,e,t),t=Oe,(Lt===null?t.memoizedState:Lt.next)===null&&(t=t.alternate,Y.H=t!==null&&t.memoizedState!==null?_b:Eb),e}function xr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Pl(e);if(e.$$typeof===la)return xt(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||zc)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=LA;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=T_.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,x=t,k=!1;do{var V=x.lane&-536870913;if(V!==x.lane?(ze&V)===V:(Ga&V)===V){var O=x.revertLane;if(O===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null}),V===ji&&(k=!0);else if((Ga&O)===O){x=x.next,O===ji&&(k=!0);continue}else V={lane:0,revertLane:x.revertLane,gesture:null,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},y===null?(h=y=V,f=c):y=y.next=V,Oe.lanes|=O,Lr|=O;V=x.action,zi&&n(c,V),c=x.hasEagerState?x.eagerState:n(c,V)}else O={lane:V,revertLane:x.revertLane,gesture:x.gesture,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},y===null?(h=y=O,f=c):y=y.next=O,Oe.lanes|=V,Lr|=V;x=x.next}while(x!==null&&x!==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 $l(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();Jo||c===n()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Jo=!0)}else{if(c=t(),Jo||(n=t(),xn(c,n)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Jo=!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(),!Jo){var f=t();xn(n,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Jo=!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||(Ga&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)&&(Js(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,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(x){bm(e,t,x)}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(x){bm(e,t,x)}}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 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===Jb||c===mS?l:null}if(l){yt=Pn(l.nextSibling),r=l.data===Jb;break e}}hr(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=__.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=Pl(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},A_.bind(null,l,n),null)),[r,c,e]}function A_(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 D_(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 D_({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,Gn,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,Gn,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,Gn,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||(Ga&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Uv(),Oe.lanes|=e,Lr|=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):(Ga&42)===0||(Ga&1073741824)!==0&&(ze&261930)===0?(Ht=!0,e.memoizedState=n):(e=Uv(),Oe.lanes|=e,Lr|=e,t)}function cf(){Y.asyncTransitions--}function Ug(e,t,n,r,l){var c=rt.p;rt.p=c!==0&&c<da?c:da;var f=Y.T,h={};h._updatedFibers=new Set,Y.T=h,Tm(e,!1,t,n);try{var y=l(),x=Y.S;if(x!==null&&x(h,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){Y.asyncTransitions++,y.then(cf,cf);var k=S_(y,r);Il(e,t,k,Hn(e))}else Il(e,t,r,Hn(e))}catch(V){Il(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),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 _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;x_(e),Ug(e,l,t,Ji,n===null?v:function(){return Bg(e),n(r)})}function zg(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ji,baseState:Ji,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:Ji},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),Il(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:Pl(e),t]}function Lg(){var e=$l(Ss)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Pl(e),t]}function Ni(){return xt(Wc)}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=lC++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t}function Cm(){return bn().memoizedState=C_.bind(null,Oe)}function C_(e,t){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=Hn(n),l=br(r),c=yr(n,l,r);c!==null&&(Js(r,"refresh()",e),At(c,n,r),ql(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 T_(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&&(Js(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),Il(e,t,n,r)&&Js(r,"setState()",e)}function Il(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=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(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: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&&(Js(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?!Ml(n,r)||!Ml(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
|
-
|
|
131
|
-
%s
|
|
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 Gg(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
|
-
|
|
135
|
-
%s
|
|
136
|
-
|
|
137
|
-
%s
|
|
138
|
-
`,e,t,n].slice(0),typeof e[0]=="string"?e.splice(0,1,SS+" "+e[0],wS,Vd+r+Vd,ES):e.splice(0,0,SS,wS,Vd+r+Vd,ES),e.unshift(console),r=TC.apply(console.error,e),r()}else console.error(`%o
|
|
139
|
-
|
|
140
|
-
%s
|
|
141
|
-
|
|
142
|
-
%s
|
|
143
|
-
`,e,t,n)}function Jg(e){sb(e)}function ff(e,t){try{Xo=t.source?H(t.source):null,Db=null;var n=t.value;if(Y.actQueue!==null)Y.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=br(n),n.tag=xb,n.payload={element:null},n.callback=function(){be(t.source,ff,e,t)},n}function Mm(e){return e=br(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"&&(Pr===null?Pr=new Set([this]):Pr.add(this)),aC(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 O_(e,t,n,r,l){if(n.flags|=32768,fa&&Kl(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&&kl(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&&kl(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!==Br&&(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(Ic===null?Ic=[c]:Ic.push(c),wt!==Br&&(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"&&(Pr===null||!Pr.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:Ml,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(Ml(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:vc,_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),vr(t),t.memoizedState=null):(e!==null&&Iu(t,null),tm(t),vr(t));return rn(e,t,l,n),t.child}function Fl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:vc,_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
|
-
- <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 R_(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,Fl(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:Gy(),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),hr(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=El(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,jr=null,ma=!1,Fn=null,cs=!1,e!==null&&Jy(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,zc=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=Rr,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=xt(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 x=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
|
-
|
|
147
|
-
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
148
|
-
|
|
149
|
-
The above lifecycles should be removed. Learn more about this warning here:
|
|
150
|
-
https://react.dev/link/unsafe-component-lifecycles`,c,x,f!==null?`
|
|
151
|
-
`+f:"",h!==null?`
|
|
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"||Gt(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?xt(f):Rr,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)),Hl(t,r,c,l),Ll(),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=Rr,typeof y=="object"&&y!==null&&(f=xt(y)),x=n.getDerivedStateFromProps,y=typeof x=="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),zr=!1;var O=t.memoizedState;c.state=O,Hl(t,r,c,l),Ll(),V=t.memoizedState,k||O!==V||zr?(typeof x=="function"&&(Rm(t,n,x,r),V=t.memoizedState),(h=zr||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,x=t.pendingProps,O=c.context,V=n.contextType,h=Rr,typeof V=="object"&&V!==null&&(h=xt(V)),k=n.getDerivedStateFromProps,(V=typeof k=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(f!==x||O!==h)&&Fg(t,c,r,h),zr=!1,O=t.memoizedState,c.state=O,Hl(t,r,c,l),Ll();var P=t.memoizedState;f!==x||O!==P||zr||e!==null&&e.dependencies!==null&&Lu(e.dependencies)?(typeof k=="function"&&(Rm(t,n,k,r),P=t.memoizedState),(y=zr||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&Vc)!==0),r&&(c=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if($e){if(c?gr(t):vr(t),(e=yt)?(n=A1(e,cs),n=n!==null&&n.data!==Ii?n:null,n!==null&&(r={dehydrated:n,treeContext:Gy(),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),hr(t);return yp(n)?t.lanes=32:t.lanes=536870912,null}var h=l.children;if(l=l.fallback,c){vr(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,Fl(null,l)}return gr(t),qm(t,h)}var x=e.memoizedState;if(x!==null){var k=x.dehydrated;if(k!==null){if(f)t.flags&256?(gr(t),t.flags&=-257,t=Lm(e,t,n)):t.memoizedState!==null?(vr(t),t.child=e.child,t.flags|=128,t=null):(vr(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=Fl(null,l));else if(gr(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),kl(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=El(r,n),l!==0&&l!==x.retryLane))throw x.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=x.treeContext,yt=Pn(k.nextSibling),cn=t,$e=!0,jr=null,ma=!1,Fn=null,cs=!1,e!==null&&Jy(t,e),t=qm(t,l.children),t.flags|=4096);return t}}return c?(vr(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,Fl(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,Fl(e.child,l)):(x!==null&&(n&62914560)===n&&(n&e.lanes)!==0&&vf(t),gr(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&Vc)!==0)?(h=h&Go|Vc,t.flags|=128):h&=Go,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(Gt(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(),x=0;!y.done;y=h.next()){if(!dg(y.value,x))break e;x++}}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?(dr(),f=xc):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,Lr|=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 j_(e,t,n){switch(t.tag){case 3:nt(t,t.stateNode.containerInfo),mr(t,Bt,e.memoizedState.cache),bi();break;case 27:case 5:xe(t);break;case 4:nt(t,t.stateNode.containerInfo);break;case 10:mr(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?(gr(t),t.flags|=128,null):(n&t.child.childLanes)!==0?rv(e,t,n):(gr(t),e=ka(e,t,n),e!==null?e.sibling:null);gr(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:mr(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,j_(e,t,n);Ht=(e.flags&131072)!==0}else Ht=!1,(r=$e)&&(dr(),r=(t.flags&1048576)!==0),r&&(r=t.index,dr(),Yy(t,xc,r));switch(t.lanes=0,t.tag){case 16:e:if(r=t.pendingProps,e=pr(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===oc){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),Hl(t,r,null,n);var f=t.memoizedState;if(r=f.cache,mr(t,Bt,r),r!==c.cache&&Gh(t,[Bt],n,!0),Ll(),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),kl(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,jr=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(_r.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(_r.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,wr(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=xA(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),hr(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,E_,null,null,n),Wc._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=NA(e,t.pendingProps,cs),r!==null?(t.stateNode=r,cn=t,yt=null,r=!0):r=!1,r=!r),r&&(n&&Bu(t,e),hr(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?")),mr(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=xt(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 R_(e,t,n);case 22:return Wg(e,t,n,t.pendingProps);case 24:return yi(t),r=xt(Bt),e===null?(l=Zh(),l===null&&(l=dt,c=Jh(),l.pooledCache=c,gi(c),c!==null&&(l.pooledCacheLanes|=n),l=c),t.memoizedState={parent:r,cache:l},Wh(t),mr(t,Bt,l)):((e.lanes&n)!==0&&(em(e,t),Hl(t,null,null,n),Ll()),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),mr(t,Bt,r)):(r=c.cache,mr(t,Bt,r),r!==l.cache&&Gh(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&WD)!==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)!==Gi)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?Sl():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 M_(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(_r.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(_r.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(_r.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||hr(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&&zl(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)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&Go|Vc,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&Go|Vc:n&Go,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 k_(e,t){switch($h(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ve)!==Ce&&zl(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&&zl(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&&zl(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&&zl(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(),Gl(t,e),Ws()):Gl(t,e)}function Fm(e,t,n){ta(e)?(ea(),po(n,e,t),Ws()):po(n,e,t)}function Gl(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,rC,n),(e&Sn)!==ld&&(nl=!1),r!==void 0&&typeof r!="function")){var c=void 0;c=(n.tag&Gn)!==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
|
-
|
|
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
|
-
|
|
158
|
-
`+c+`(() => {
|
|
159
|
-
async function fetchData() {
|
|
160
|
-
// You can await here
|
|
161
|
-
const response = await MyAPI.getData(someId);
|
|
162
|
-
// ...
|
|
163
|
-
}
|
|
164
|
-
fetchData();
|
|
165
|
-
}, [someId]); // Or [] if effect doesn't need props or state
|
|
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){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,iC,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(),Gl(t,e),Ws()):Gl(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 V_(e,t,n){return e.getSnapshotBeforeUpdate(t,n)}function U_(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,V_,t,l,r);n=GN,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 z_(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,z_,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 B_(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,lA,r,t,n,e)}catch(l){at(e,e.return,l)}}function Gm(e,t,n){try{be(e,uA,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&&wr(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&&wr(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&&wr(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&&wr(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 q_(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),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,AA,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 L_(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,x=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&&++x===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&&U_(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,Gn|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,cA,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+=Ul(h);try{be(n,mv,n,t,Mr,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=Q_.bind(null,n),SA(e,h))));break;case 22:if(h=n.memoizedState!==null||Xa,!h){t=t!==null&&t.memoizedState!==null||Pt,y=Xa;var x=Pt;Xa=h,(Pt=t)&&!x?(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=x}break;case 30:break;default:sa(e,n)}(n.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&((Dt||.05<St)&&Gs(n,_e,Ae,St,Nt),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),Nt=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&&or(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(x){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",x))}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;wr(n.type)&&($t=n.stateNode,Mn=!1),Ua(e,t,n),be(n,sc,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,hA,$t,n.stateNode)}catch(x){at(n,t,x)}else try{be(n,dA,$t,n.stateNode)}catch(x){at(n,t,x)}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,Gn),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)&&Gs(n,_e,Ae,St,Nt),qn(r),Xs(l),Nt=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,EA,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,_A,e)}catch(n){at(t,t.return,n)}}function H_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new JN),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new JN),t;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function yf(e,t){var n=H_(e);t.forEach(function(r){if(!n.has(r)){if(n.add(r),fa)if(Ko!==null&&Wo!==null)Kl(Wo,Ko);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var l=X_.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(wr(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),Gl(Sn|ds,e),Fm(e,e.return,Gn|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 x=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":x=y.getElementsByTagName("title")[0],(!x||x[uc]||x[ln]||x.namespaceURI===To||x.hasAttribute("itemprop"))&&(x=y.createElement(h),y.head.insertBefore(x,y.querySelector("head > title"))),on(x,h,f),x[ln]=e,jt(x),h=x;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(x=k[V],x.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&x.getAttribute("rel")===(f.rel==null?null:f.rel)&&x.getAttribute("title")===(f.title==null?null:f.title)&&x.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){k.splice(V,1);break t}}x=y.createElement(h),on(x,h,f),y.head.appendChild(x);break;case"meta":if(k=V1("meta","content",y).get(h+(f.content||""))){for(V=0;V<k.length;V++)if(x=k[V],st(f.content,"content"),x.getAttribute("content")===(f.content==null?null:""+f.content)&&x.getAttribute("name")===(f.name==null?null:f.name)&&x.getAttribute("property")===(f.property==null?null:f.property)&&x.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&x.getAttribute("charset")===(f.charSet==null?null:f.charSet)){k.splice(V,1);break t}}x=y.createElement(h),on(x,h,f),y.head.appendChild(x);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+h+'". This is a bug in React.')}x[ln]=e,jt(x),h=x}e.stateNode=h}else U1(y,e.type,e.stateNode);else e.stateNode=k1(y,h,e.memoizedProps);else x!==h?(x===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):x.count--,h===null?U1(y,e.type,e.stateNode):k1(y,h,e.memoizedProps)):h===null&&e.stateNode!==null&&Gm(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&&Gm(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,Gm(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,fA,y,f,h)}catch(me){at(e,e.return,me)}}break;case 3:if(y=Ma(),Md=null,x=Cs,Cs=_f(t.containerInfo),Rn(t,e),Cs=x,jn(e),h&4&&f!==null&&f.memoizedState.isDehydrated)try{be(e,wA,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+=Ul(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&~vc:t._visibility|vc,!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{x=O.stateNode,y?be(O,pA,x):be(O,gA,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,bA,k):be(O,vA,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,mA,V):be(O,yA,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)&&Gs(e,_e,Ae,St,Nt),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),Nt=l,Dt=c}function jn(e){var t=e.flags;if(t&2){try{be(e,q_,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,Gn),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,sc,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)&&Gs(e,_e,Ae,St,Nt),qn(t),Xs(n),Nt=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,Gn);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,w_,t,e)}catch(x){at(n,n.return,x)}}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+=Ul(y);try{be(n,mv,n,t,Mr,r.effectDuration)}catch(x){at(n,n.return,x)}}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)&&Gs(n,_e,Ae,St,Nt),qn(l),Xs(c),Nt=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&&Vl(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&&Vl(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(),x=Tr,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,Jt,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,Jt,n)),ws(e,t,n,r,l);break;case 3:var V=Ma(),O=Jt;Jt=t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)===0,ws(e,t,n,r,l),Jt=O,k&2048&&(n=null,t.alternate!==null&&(n=t.alternate.memoizedState.cache),r=t.memoizedState.cache,r!==n&&(gi(r),n!=null&&Vl(n))),e.passiveEffectDuration+=Pu(V);break;case 12:if(k&2048){k=Ma(),ws(e,t,n,r,l),e=t.stateNode,e.passiveEffectDuration+=Ul(k);try{be(t,B_,t,t.alternate,Mr,e.passiveEffectDuration)}catch(P){at(t,t.return,P)}}else ws(e,t,n,r,l);break;case 31:k=Jt,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?(Jt=!1,V=V.hydrationErrors,V!==null&&Mh(t,t.actualStartTime,l,V)):Jt=!0):Jt=!1,ws(e,t,n,r,l),Jt=k;break;case 13:k=Jt,V=t.alternate!==null?t.alternate.memoizedState:null,O=t.memoizedState,V===null||V.dehydrated===null||O!==null&&O.dehydrated!==null?Jt=!1:(O=t.deletions,O!==null&&0<O.length&&O[0].tag===18?(Jt=!1,V=V.hydrationErrors,V!==null&&Mh(t,t.actualStartTime,l,V)):Jt=!0),ws(e,t,n,r,l),Jt=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):Ql(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||Jt||(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=!Jt&&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)&&Gs(t,_e,Ae,St,Nt),e&&.05<Ae-_e&&Ys(t,_e,Ae,"Mount"))),qn(c),Xs(f),Nt=h,Dt=y,Tr=x}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(),x=Ks(),k=Tr;l&&(t.mode&Ve)!==Ce&&0<t.actualStartTime&&(t.flags&1)!==0&&Mu(t,t.actualStartTime,c,Jt,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):Ql(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)&&Gs(t,_e,Ae,St,Nt),qn(f),Xs(h),Nt=y,Dt=x,Tr=k}function Ql(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,x=t!==null?t.actualStartTime:l,k=Tr;(c.mode&Ve)!==Ce&&0<c.actualStartTime&&(c.flags&1)!==0&&Mu(c,c.actualStartTime,x,Jt,h);var V=c.flags;switch(c.tag){case 22:Ql(f,c,h,y,x),V&2048&&Xm(c.alternate,c);break;case 24:Ql(f,c,h,y,x),V&2048&&Zm(c.alternate,c);break;default:Ql(f,c,h,y,x)}Tr=k,c=t}}function yo(e,t,n){if(e.subtreeFlags&qc)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&qc&&e.memoizedState!==null&&TA(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=qc,qc=16777216,yo(e,t,n),qc=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 Xl(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:Xl(e),e.flags&2048&&Ym(e,e.return,wn|ds);break;case 3:var c=Ma();Xl(e),e.stateNode.passiveEffectDuration+=Pu(c);break;case 12:c=Ma(),Xl(e),e.stateNode.passiveEffectDuration+=Ul(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")):Xl(e);break;default:Xl(e)}(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Gs(e,_e,Ae,St,Nt),qn(t),Xs(n),Dt=l,Nt=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)&&Gs(e,_e,Ae,St,Nt),qn(t),Xs(n),Dt=l,Nt=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:Vl(r.memoizedState.cache)}if((r.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Gs(r,_e,Ae,St,Nt),qn(c),Xs(f),Dt=y,Nt=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 P_(){fC.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((Ze&Qt)!==tn&&ze!==0)return ze&-ze;var t=Y.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),Nr(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),K_(t),e===dt&&((Ze&Qt)===tn&&(Hr|=n),wt===Br&&Nr(e,ze,Vn,!1)),ra(e)}function zv(e,t,n){if((Ze&(Qt|Jn))!==tn)throw Error("Should not already be working.");if(ze!==0&&qe!==null){var r=qe,l=Kt();switch(tN){case Pc:case qi:var c=_c;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=_c,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-_c,3>r||console.timeStamp("Blocked",_c,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))?I_(e,t):Wm(e,t,!0);var f=n;do{if(c===Za){el&&!n&&Nr(e,t,0,!1),t=lt,_c=qt(),tN=t;break}else{if(r=Kt(),l=e.current.alternate,f&&!$_(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=Ic;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,Hr|=c,c=Br;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===Hc){Ns(t),kh(Wt,r,t,Ot),Ei(t,r),vo(e,0),Nr(e,t,0,!0);break}e:{switch(n=e,c){case Za:case Hc:throw Error("Root did not complete. This is a bug in React.");case Br: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),Nr(n,t,Vn,!qr);break e;case Bi:En=null;break;case hd:case QN:break;default:throw Error("Unknown root exit status.")}if(Y.actQueue!==null)ep(n,l,t,En,Fc,yd,Vn,Hr,Hi,c,null,null,Wt,r);else{if((t&62914560)===t&&(f=gd+KN-Kt(),10<f)){if(Nr(n,t,Vn,!qr),Aa(n,0,!0)!==0)break e;Ts=t,n.timeoutHandle=yS(Bv.bind(null,n,l,En,Fc,yd,t,Vn,Hr,Hi,qr,c,"Throttled",Wt,r),f);break e}Bv(n,l,En,Fc,yd,t,Vn,Hr,Hi,qr,c,null,Wt,r)}}}break}while(!0);ra(e)}function Bv(e,t,n,r,l,c,f,h,y,x,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=OA(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)),Nr(e,c,f,!x);return}ep(e,t,c,n,r,l,f,h,y,k,me,V,O,P)}function $_(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 Nr(e,t,n,r){t&=~kb,t&=~Hr,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|Jn))===tn?(Wl(0),!1):!0}function Km(){if(qe!==null){if(lt===kn)var e=qe.return;else e=qe,qu(),cm(e),Fo=null,kc=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===Br)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=Sc,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=wc,x=0<Po,k=kr===Nc,V=kr===Kf;if(l=Wt,r=Sc,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=x?"secondary-light":"warning";r?r.run(console.timeStamp.bind(console,x?"Consecutive":"Event: "+y,h,n,Je,Fe,O)):console.timeStamp(x?"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,kr=0,hb=db=null,Wf=-1.1,Po=Oi,Oi=-1.1,Ti=qt()}if((t&4194048)!==0&&(Ot=Ec,l=0<=Ya&&Ya<Fa?Fa:Ya,n=0<=us&&us<Fa?Fa:us,r=0<=Vr&&Vr<Fa?Fa:Vr,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<Ur,x=mb===Kf,c=Wt,r=Ec,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=x?"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,Ur=Vr,Vr=-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,EC(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,qr=!1,el=fn(e,t),Mb=!1,wt=Za,Hi=Vn=kb=Hr=Lr=0,En=Ic=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&&(Y.recentlyCreatedOwnerStacks=0,Ix=e),As.discardPendingWarnings(),n}function qv(e,t){Oe=null,Y.H=Bc,Y.getCurrentStack=null,ca=!1,In=null,t===Io||t===rd?(t=ig(),lt=Pc):t===gb?(t=ig(),lt=XN):lt=t===Cb?jb:t!==null&&typeof t=="object"&&typeof t.then=="function"?$c:pd,Qn=t;var n=qe;n===null?(wt=Hc,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=Y.H;return Y.H=Bc,e===null?Bc:e}function Pv(){var e=Y.A;return Y.A=uC,e}function vf(e){Ot===null&&(Ot=e._debugTask==null?null:e._debugTask)}function xf(){wt=Br,qr||(ze&4194048)!==ze&&Yn.current!==null||(el=!0),(Lr&134217727)===0&&(Hr&134217727)===0||dt===null||Nr(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&&(Kl(e,ze),f.clear()),ci(e,t)}Fc=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 Pc:case qi:case Li:case $c:Yn.current===null&&(t=!0);var x=lt;if(lt=kn,Qn=null,xo(e,h,y,x),n&&el){f=Za;break e}break;default:x=lt,lt=kn,Qn=null,xo(e,h,y,x)}}$v(),f=wt;break}catch(k){qv(e,k)}while(!0);return t&&e.shellSuspendCounter++,qu(),Ze=r,Y.H=l,Y.A=c,qe===null&&(dt=null,ze=0,ku()),f}function $v(){for(;qe!==null;)Iv(qe)}function I_(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&&(Kl(e,ze),c.clear()),ci(e,t)}Fc=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 Pc: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 x=h.return;x!==null?(qe=x,Nf(x)):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 $c:lt=kn,Qn=null,xo(e,t,c,$c);break;case jb:Km(),wt=md;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}Y.actQueue!==null?$v():F_();break}catch(k){qv(e,k)}while(!0);return qu(),Y.H=r,Y.A=l,Ze=n,qe!==null?Za:(dt=null,ze=0,ku(),wt)}function F_(){for(;qe!==null&&!IA();)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,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&&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,kc=0;var l=t.return;try{if(O_(e,l,t,n,ze)){wt=Hc,ff(e,zn(n,e.current)),qe=null;return}}catch(c){if(l!==null)throw qe=l,c;wt=Hc,ff(e,zn(n,e.current)),qe=null;return}t.flags&32768?($e||r===pd?e=!0:el||(ze&536870912)!==0?e=!1:(qr=e=!0,(r===qi||r===Li||r===Pc||r===$c)&&(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,qr);return}var n=t.alternate;if(e=t.return,Qh(t),n=be(t,M_,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=k_(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,x,k,V,O,P){e.cancelPendingCommit=null;do Zl();while(It!==$r);if(As.flushLegacyContextWarning(),As.flushPendingUnsafeLifecycleWarnings(),(Ze&(Qt|Jn))!==tn)throw Error("Should not already be working.");if(Ns(n),x===Bi?kh(O,P,n,Ot):r!==null?y_(O,P,n,r,t!==null&&t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)!==0,Ot):b_(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,Ir=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,Z_(Ao,function(){return Zc=window.event,Os===xd&&(Os=Ub),Zv(),null})):(e.callbackNode=null,e.callbackPriority=0),Ia=null,Mr=qt(),V!==null&&g_(P,Mr,V,Ot),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=Y.T,Y.T=null,l=rt.p,rt.p=ss,f=Ze,Ze|=Jn;try{L_(e,t,n)}finally{Ze=f,rt.p=l,Y.T=r}}It=tS,Gv(),Jv(),Qv()}}function Gv(){if(It===tS){It=$r;var e=Ir,t=tl,n=Ts,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=Y.T,Y.T=null;var l=rt.p;rt.p=ss;var c=Ze;Ze|=Jn;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 x=y.start,k=y.end;if(k===void 0&&(k=x),"selectionStart"in h)h.selectionStart=x,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,Y.T=r}}e.current=t,It=nS}}function Jv(){if(It===nS){It=$r;var e=oS;if(e!==null){Mr=qt();var t=$a,n=Mr;!bt||n<=t||console.timeStamp(e,t,n,Je,Fe,"secondary-light")}e=Ir,t=tl,n=Ts;var r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=Y.T,Y.T=null;var l=rt.p;rt.p=ss;var c=Ze;Ze|=Jn;try{Ko=n,Wo=e,$u(),vv(e,t.alternate,t),Wo=Ko=null}finally{Ze=c,rt.p=l,Y.T=r}}e=Bb,t=iS,$a=qt(),e=t===null?e:Mr,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=$r,FA(),e=Ir;var r=tl;t=Ts,n=rS;var l=r.actualDuration!==0||(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0;l?It=Nd:(It=$r,tl=Ir=null,Xv(e,e.pendingLanes),Pi=0,Gc=null);var c=e.pendingLanes;if(c===0&&(Pr=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(),P_(),n!==null){f=Y.T,h=rt.p,rt.p=ss,Y.T=null;try{var y=e.onRecoverableError;for(r=0;r<n.length;r++){var x=n[r],k=G_(x.stack);be(x.source,y,x.value,k)}}finally{Y.T=f,rt.p=h}}(Ts&3)!==0&&Zl(),ra(e),c=e.pendingLanes,(t&261930)!==0&&(c&42)!==0?(sd=!0,e===Lb?Yc++:(Yc=0,Lb=e)):Yc=0,l||Ei(t,$a),Wl(0)}}function G_(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,Vl(t)))}function Zl(){return Gv(),Jv(),Qv(),Zv()}function Zv(){if(It!==Nd)return!1;var e=Ir,t=zb;zb=0;var n=no(Ts),r=Ba>n?Ba:n;n=Y.T;var l=rt.p;try{rt.p=r,Y.T=null;var c=qb;qb=null,r=Ir;var f=Ts;if(It=$r,tl=Ir=null,Ts=0,(Ze&(Qt|Jn))!==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,sC);else{var y=$a,x=h,k=Os===Ub;!bt||x<=y||(Ot?Ot.run(console.timeStamp.bind(console,k?"Waiting for Paint":"Waiting",y,x,Je,Fe,"secondary-light")):console.timeStamp(k?"Waiting for Paint":"Waiting",y,x,Je,Fe,"secondary-light"))}y=Ze,Ze|=Jn;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),Wl(0,!1),Sd?r===Gc?Pi++:(Pi=0,Gc=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,Y.T=n,Xv(e,t)}}function Kv(e,t,n){t=zn(n,t),eg(t),t=jm(e.stateNode,t,2),e=yr(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"&&(Pr===null||!Pr.has(r))){e=zn(n,e),eg(e),n=Mm(2),r=yr(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
|
-
|
|
169
|
-
Error message:
|
|
170
|
-
|
|
171
|
-
%s`,n)}}function tp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new dC;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&&Kl(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(),Sc=Zf("Promise Resolved"),kr=Kf):(n&4194048)!==0&&0>us&&(Fa=us=qt(),Ec=Zf("Promise Resolved"),mb=Kf),Vv()&&Y.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
172
|
-
|
|
173
|
-
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
174
|
-
|
|
175
|
-
act(() => {
|
|
176
|
-
/* finish loading suspended data */
|
|
177
|
-
});
|
|
178
|
-
/* assert on the output */
|
|
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===Br||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=Sl()),e=dn(e,t),e!==null&&(li(e,t),ra(e))}function Q_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wv(e,n)}function X_(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 Kl(e,t){fa&&e.memoizedUpdaters.forEach(function(n){zs(e,n,t)})}function Z_(e,t){var n=Y.actQueue;return n!==null?(n.push(t),pC):Bp(e,t)}function K_(e){Vv()&&Y.actQueue===null&&be(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
181
|
-
|
|
182
|
-
When testing, code that causes React state updates should be wrapped into act(...):
|
|
183
|
-
|
|
184
|
-
act(() => {
|
|
185
|
-
/* fire events that update state */
|
|
186
|
-
});
|
|
187
|
-
/* assert on the output */
|
|
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?$b||($b=!0,i1()):Pb||(Pb=!0,i1())}function Wl(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 W_(){Zc=window.event,sp()}function sp(){_d=$b=Pb=!1;var e=0;Fr!==0&&iA()&&(e=Fr);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!==$r&&It!==Nd||Wl(e),Fr!==0&&(Fr=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||Y.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),Y.actQueue!==null?(Y.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,Zc=window.event,It!==$r&&It!==Nd)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Os===xd&&(Os=Ub),Zl()&&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(Zl())return null;nd=sd,sd=!1,zv(e,t,!0)}function ap(e){e!==Fb&&e!==null&&$A(e)}function i1(){Y.actQueue!==null&&Y.actQueue.push(function(){return sp(),null}),_C(function(){(Ze&(Qt|Jn))!==tn?Bp(qp,W_):sp()})}function rp(){if(Fr===0){var e=ji;e===0&&(e=Uf,Uf<<=1,(Uf&261888)===0&&(Uf=256)),Fr=e}return Fr}function o1(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(st(e,"action"),Rl(""+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 eA(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(Fr!==0){var y=f?l1(l,f):new FormData(l),x={pending:!0,data:y,method:l.method,action:c};Object.freeze(x),_m(n,x,null,y)}}else typeof c=="function"&&(h.preventDefault(),y=f?l1(l,f):new FormData(l),x={pending:!0,data:y,method:l.method,action:c},Object.freeze(x),_m(n,x,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,x=h.currentTarget;if(h=h.listener,y!==l&&c.isPropagationStopped())break e;y!==null?be(y,Sf,c,h,x):Sf(c,h,x),l=y}else for(f=0;f<r.length;f++){if(h=r[f],y=h.instance,x=h.currentTarget,h=h.listener,y!==l&&c.isPropagationStopped())break e;y!==null?be(y,Sf,c,h,x):Sf(c,h,x),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=kA;break;case da:l=VA;break;default:l=wp}n=l.bind(null,t,n,e),l=void 0,!Gp||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 x=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=OD;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=gD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=MD;break;case qx:case Lx:case Hx:P=ND;break;case Px:P=VD;break;case"scroll":case"scrollend":P=bD;break;case"wheel":P=zD;break;case"copy":case"cut":case"paste":P=wD;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=qD}var me=(t&4)!==0,mt=!me&&(e==="scroll"||e==="scrollend"),Ye=me?O!==null?O+"Capture":null:O;me=[];for(var T=x,R;T!==null;){var j=T;if(R=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||R===null||Ye===null||(j=jl(T,Ye),j!=null&&me.push(ec(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!==fc&&(ce=n.relatedTarget||n.fromElement)&&(Bs(ce)||ce[Dr]))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=x,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=x),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)===x&&(me=new me(Ye,T+"enter",ce,n,k),me.target=R,me.relatedTarget=mt,j=me),mt=j,P&&ce)t:{for(me=tA,Ye=P,T=ce,R=0,j=Ye;j;j=me(j))R++;j=0;for(var J=T;J;J=me(J))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=x?Da(x):window,P=O.nodeName&&O.nodeName.toLowerCase(),P==="select"||P==="input"&&O.type==="file")var fe=Cy;else if(Ay(O))if(zx)fe=h_;else{fe=f_;var Re=u_}else P=O.nodeName,!P||P.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?x&&Ol(x.elementType)&&(fe=Cy):fe=d_;if(fe&&(fe=fe(e,x))){Dy(V,fe,n,k);break e}Re&&Re(e,O,x),e==="focusout"&&x&&O.type==="number"&&x.memoizedProps.value!=null&&ui(O,"number",O.value)}switch(Re=x?Da(x):window,e){case"focusin":(Ay(Re)||Re.contentEditable==="true")&&(ko=Re,Wp=x,gc=null);break;case"focusout":gc=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($D)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()):(Cr=k,Jp="value"in Cr?Cr.value:Cr.textContent,Mo=!0)),Re=wf(x,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=HD?i_(e,n):o_(e,n))&&(Se=wf(x,"onBeforeInput"),0<Se.length&&(Re=new _D("onBeforeInput","beforeinput",null,n,k),V.push({event:Re,listeners:Se}),Re.data=Ee)),eA(V,e,x,n,k)}c1(V,t)})}function ec(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=jl(e,n),l!=null&&r.unshift(ec(e,l,c)),l=jl(e,t),l!=null&&r.push(ec(e,l,c))),e.tag===3)return r;e=e.return}return[]}function tA(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,x=h.stateNode;if(h=h.tag,y!==null&&y===r)break;h!==5&&h!==26&&h!==27||x===null||(y=x,l?(x=jl(n,c),x!=null&&f.unshift(ec(n,x,y))):l||(x=jl(n,c),x!=null&&f.push(ec(n,x,y)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}function cp(e,t){n_(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};Ol(e)||typeof t.is=="string"||a_(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=Sr(n),Sr(t)!==n&&(r[e]=t))}function nA(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 Sr(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)),ir(e)),(typeof e=="string"?e:""+e).replace(bC,`
|
|
190
|
-
`).replace(yC,"")}function h1(e,t){return t=Sr(t),Sr(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===""||Tl(e,r)):(typeof r=="number"||typeof r=="bigint")&&(Cu(""+r,t,!1),t!=="body"&&Tl(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=Rl(""+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=Rl(""+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=Rl(""+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,Gb,"xml:base",r);break;case"xmlLang":Cn(e,Gb,"xml:lang",r);break;case"xmlSpace":Cn(e,Gb,"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"?Tl(e,r):(typeof r=="number"||typeof r=="bigint")&&Tl(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,x=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":x=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,x,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)}Cl(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":Dl(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(x in n)if(n.hasOwnProperty(x)&&(r=n[x],r!=null))switch(x){case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ut(e,t,x,r,n,null)}return;default:if(Ol(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 sA(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,x=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":x=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,x,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(x in r)if(O=r[x],P=n[x],r.hasOwnProperty(x)&&O!==P&&(O!=null||P!=null))switch(x){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,x,O,r,P)}return;default:if(Ol(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=Sr(r),Sr(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=Rl(""+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(Ol(t)){for(var y in n)if(n.hasOwnProperty(y)){var x=n[y];if(x!=null){if(_i.hasOwnProperty(y))typeof x!="function"&&ia(y,x);else if(n.suppressHydrationWarning!==!0)switch(y){case"children":typeof x!="string"&&typeof x!="number"||Zt("children",e.textContent,x,l);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":f=e.innerHTML,x=x?x.__html:void 0,x!=null&&(x=d1(e,x),Zt(y,f,x,l));continue;case"style":c.delete(y),p1(e,x,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=cr(e,"class",x),Zt("className",f,x,l);continue;default:r.context===Ka&&t!=="svg"&&t!=="math"?c.delete(y.toLowerCase()):c.delete(y),f=cr(e,y,x),Zt(y,f,x,l)}}}}else for(x in n)if(n.hasOwnProperty(x)&&(y=n[x],y!=null)){if(_i.hasOwnProperty(x))typeof y!="function"&&ia(x,y);else if(n.suppressHydrationWarning!==!0)switch(x){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[x]={__html:f}));continue;case"className":ns(e,x,"class",y,c,l);continue;case"tabIndex":ns(e,x,"tabindex",y,c,l);continue;case"style":c.delete(x),p1(e,y,l);continue;case"multiple":c.delete(x),Zt(x,e.multiple,y,l);continue;case"muted":c.delete(x),Zt(x,e.muted,y,l);continue;case"autoFocus":c.delete("autofocus"),Zt(x,e.autofocus,y,l);continue;case"data":if(t!=="object"){c.delete(x),f=e.getAttribute("data"),Zt(x,f,y,l);continue}case"src":case"href":if(!(y!==""||t==="a"&&x==="href"||t==="object"&&x==="data")){console.error(x==="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.',x,x);continue}hp(e,x,x,y,c,l);continue;case"action":case"formAction":if(f=e.getAttribute(x),typeof y=="function"){c.delete(x.toLowerCase()),x==="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===gC){c.delete(x.toLowerCase()),Zt(x,"function",y,l);continue}hp(e,x,x.toLowerCase(),y,c,l);continue;case"xlinkHref":hp(e,x,"xlink:href",y,c,l);continue;case"contentEditable":dp(e,x,"contenteditable",y,c,l);continue;case"spellCheck":dp(e,x,"spellcheck",y,c,l);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":dp(e,x,x,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,x,x.toLowerCase(),y,c,l);continue;case"capture":case"download":e:{h=e;var k=f=x,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=x,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,x,"rowspan",y,c,l);continue;case"start":y1(e,x,x,y,c,l);continue;case"xHeight":ns(e,x,"x-height",y,c,l);continue;case"xlinkActuate":ns(e,x,"xlink:actuate",y,c,l);continue;case"xlinkArcrole":ns(e,x,"xlink:arcrole",y,c,l);continue;case"xlinkRole":ns(e,x,"xlink:role",y,c,l);continue;case"xlinkShow":ns(e,x,"xlink:show",y,c,l);continue;case"xlinkTitle":ns(e,x,"xlink:title",y,c,l);continue;case"xlinkType":ns(e,x,"xlink:type",y,c,l);continue;case"xmlBase":ns(e,x,"xml:base",y,c,l);continue;case"xmlLang":ns(e,x,"xml:lang",y,c,l);continue;case"xmlSpace":ns(e,x,"xml:space",y,c,l);continue;case"inert":y!==""||Od[x]||(Od[x]=!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.",x)),b1(e,x,x,y,c,l);continue;default:if(!(2<x.length)||x[0]!=="o"&&x[0]!=="O"||x[1]!=="n"&&x[1]!=="N"){h=vy(x),f=!1,r.context===Ka&&t!=="svg"&&t!=="math"?c.delete(h.toLowerCase()):(k=x.toLowerCase(),k=Pf.hasOwnProperty(k)&&Pf[k]||null,k!==null&&k!==x&&(f=!0,c.delete(k)),c.delete(h));e:if(k=e,V=h,h=y,lr(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(x,h,y,l)}}}return 0<c.size&&n.suppressHydrationWarning!==!0&&nA(e,c,l),Object.keys(l).length===0?null:l}function aA(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 rA(){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],x=y.startTime;if(x>h)break;var k=y.transferSize,V=y.initiatorType;k&&v1(V)&&(y=y.responseEnd,f+=k*(y<h?1:(h-x)/(y-x)))}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 iA(){var e=window.event;return e&&e.type==="popstate"?e===Zb?!1:(Zb=e,!0):(Zb=null,!1)}function tc(){var e=window.event;return e&&e!==Zc?e.type:null}function nc(){var e=window.event;return e&&e!==Zc?e.timeStamp:-1.1}function oA(e){setTimeout(function(){throw e})}function lA(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 cA(){}function uA(e,t,n,r){sA(e,t,n,r),e[gn]=r}function S1(e){Tl(e,"")}function fA(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 wr(e){return e==="head"}function dA(e,t){e.removeChild(t)}function hA(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===Xc||n===Rd){if(r===0){e.removeChild(l),wo(t);return}r--}else if(n===Qc||n===Yr||n===Fi||n===al||n===Ii)r++;else if(n===xC)sc(e.ownerDocument.documentElement);else if(n===SC){n=e.ownerDocument.head,sc(n);for(var c=n.firstChild;c;){var f=c.nextSibling,h=c.nodeName;c[uc]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=f}}else n===NC&&sc(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===Xc){if(e===0)break;e--}else n!==Qc&&n!==Yr&&n!==Fi&&n!==al||e++;n=r}while(n)}function mA(e){_1(e,!0)}function pA(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function bA(e){e.nodeValue=""}function yA(e){_1(e,!1)}function gA(e,t){t=t[wC],t=t!=null&&t.hasOwnProperty("display")?t.display:null,e.style.display=t==null||typeof t=="boolean"?"":(""+t).trim()}function vA(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),or(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function xA(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[uc])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 NA(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===Yr||e.data===Fi}function yp(e){return e.data===al||e.data===Yr&&e.ownerDocument.readyState!==pS}function SA(e,t){var n=e.ownerDocument;if(e.data===Fi)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===Qc||t===al||t===Yr||t===Fi||t===Ii||t===Jb||t===mS)break;if(t===Xc||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[vC]!==!0?(e.nodeValue===t?e=null:(t=Sr(t),e=Sr(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===Xc||n===Rd){if(t===0)return Pn(e.nextSibling);t--}else n!==Qc&&n!==al&&n!==Yr&&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===Qc||n===al||n===Yr||n===Fi||n===Ii){if(t===0)return e;t--}else n!==Xc&&n!==Rd||t++}e=e.previousSibling}return null}function wA(e){wo(e)}function EA(e){wo(e)}function _A(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 AA(e,t,n,r){if(!n[Dr]&&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 sc(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);or(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=_r.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:Gi,preload:null}},c.set(e,f),(c=l.querySelector(ac(e)))&&!c._p&&(f.instance=c,f.state.loading=Kc|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||DA(l,e,h,f.state)}if(t&&r===null)throw n=`
|
|
191
|
-
|
|
192
|
-
- `+Af(t)+`
|
|
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
|
-
|
|
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 ac(e){return'link[rel="stylesheet"]['+e+"]"}function M1(e){return Pe({},e,{"data-precedence":e.precedence,precedence:null})}function DA(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=Kc:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=Kc}),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 rc(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(ac(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(rc(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)===Gi&&(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[uc]||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 CA(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=aA(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)===Gi)}function TA(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&ms)===Gi){if(n.instance===null){var l=No(r.href),c=t.querySelector(ac(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)===Gi&&(e.count++,n=Cf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}function OA(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()}},AC+t);0<e.imgBytes&&Wb===0&&(Wb=125*rA()*CC);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:DC)+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(RA,e),kd=null,Cf.call(e))}function RA(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 jA(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=wl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wl(0),this.hiddenUpdates=wl(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,x,k,V){return e=new jA(e,t,n,f,y,x,k,V,h),t=KD,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},Wh(c),e}function q1(e){return e?(e=Rr,e):Rr}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
|
-
|
|
198
|
-
Check the render method of %s.`,H(In)||"Unknown")),r=br(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=yr(e,r,t),n!==null&&(Js(t,"root.render()",null),At(n,e,t),ql(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=_l(t);var n=dn(e,t);n!==null&&At(n,e,t),Sp(e,t)}}function MA(){return In}function kA(e,t,n,r){var l=Y.T;Y.T=null;var c=rt.p;try{rt.p=ss,wp(e,t,n,r)}finally{rt.p=c,Y.T=l}}function VA(e,t,n,r){var l=Y.T;Y.T=null;var c=rt.p;try{rt.p=da,wp(e,t,n,r)}finally{rt.p=c,Y.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(UA(l,e,t,n,r))r.stopPropagation();else if(I1(e,r),t&4&&-1<OC.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|Jn))===tn&&(vd=Kt()+WN,Wl(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(YA()){case qp:return ss;case Lp:return da;case Ao:case GA:return Ba;case Hp:return qf;default:return Ba}default:return Ba}}function I1(e,t){switch(e){case"focusin":case"focusout":Gr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":Qr=null;break;case"pointerover":case"pointerout":eu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":tu.delete(t.pointerId)}}function ic(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 UA(e,t,n,r,l){switch(t){case"focusin":return Gr=ic(Gr,e,t,n,r,l),!0;case"dragenter":return Jr=ic(Jr,e,t,n,r,l),!0;case"mouseover":return Qr=ic(Qr,e,t,n,r,l),!0;case"pointerover":var c=l.pointerId;return eu.set(c,ic(eu.get(c)||null,e,t,n,r,l)),!0;case"gotpointercapture":return c=l.pointerId,tu.set(c,ic(tu.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;fc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),fc=l,n.target.dispatchEvent(r),fc===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."),fc=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 zA(){t0=!1,Gr!==null&&Of(Gr)&&(Gr=null),Jr!==null&&Of(Jr)&&(Jr=null),Qr!==null&&Of(Qr)&&(Qr=null),eu.forEach(Y1),tu.forEach(Y1)}function Rf(e,t){e.blockedOn===t&&(e.blockedOn=null,t0||(t0=!0,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,zA)))}function G1(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)}Gr!==null&&Rf(Gr,e),Jr!==null&&Rf(Jr,e),Qr!==null&&Rf(Qr,e),eu.forEach(t),tu.forEach(t);for(var n=0;n<Xr.length;n++){var r=Xr[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Xr.length&&(n=Xr[0],n.blockedOn===null);)F1(n),n.blockedOn===null&&Xr.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||G1(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),G1(n)}}}function J1(){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[Dr]&&(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=hT(),Dp=Jw(),BA=zC(),Pe=Object.assign,qA=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"),oc=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"),LA=Symbol.for("react.memo_cache_sentinel"),X1=Symbol.iterator,HA=Symbol.for("react.client.reference"),Gt=Array.isArray,Y=Dp.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rt=BA.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,PA=Object.freeze({pending:!1,data:null,method:null,action:null}),Mp=[],kp=[],za=-1,Er=le(null),lc=le(null),_r=le(null),Vf=le(null),cc=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,$A=zt.unstable_cancelCallback,IA=zt.unstable_shouldYield,FA=zt.unstable_requestPaint,Kt=zt.unstable_now,YA=zt.unstable_getCurrentPriorityLevel,qp=zt.unstable_ImmediatePriority,Lp=zt.unstable_UserBlockingPriority,Ao=zt.unstable_NormalPriority,GA=zt.unstable_LowPriority,Hp=zt.unstable_IdlePriority,JA=zt.log,QA=zt.unstable_setDisableYieldValue,Do=null,hn=null,ua=!1,fa=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",yn=Math.clz32?Math.clz32:oi,XA=Math.log,ZA=Math.LN2,Uf=256,zf=262144,Bf=4194304,ss=2,da=8,Ba=32,qf=268435456,Ar=Math.random().toString(36).slice(2),ln="__reactFiber$"+Ar,gn="__reactProps$"+Ar,Dr="__reactContainer$"+Ar,Pp="__reactEvents$"+Ar,KA="__reactListeners$"+Ar,WA="__reactHandles$"+Ar,rx="__reactResources$"+Ar,uc="__reactMarker$"+Ar,ix=new Set,_i={},$p={},eD={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},tD=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={},nD=/[\n"\\]/g,cx=!1,ux=!1,fx=!1,dx=!1,hx=!1,mx=!1,px=["value","defaultValue"],bx=!1,yx=/["'&<>\n\t]|^\s|\s$/,sD="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(" "),aD=gx.concat(["button"]),rD="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-/,iD=/^(?:webkit|moz|o)[A-Z]/,oD=/^-ms-/,lD=/-(.)/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",cD=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={},uD=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]*$"),fD=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./,dD=/^on[^A-Z]/,hD=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]*$"),mD=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]*$"),pD=/^[\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,fc=null,Ro=null,jo=null,Yp=!1,ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gp=!1;if(ha)try{var dc={};Object.defineProperty(dc,"passive",{get:function(){Gp=!0}}),window.addEventListener("test",dc,dc),window.removeEventListener("test",dc,dc)}catch{Gp=!1}var Cr=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),hc=Pe({},Ai,{view:0,detail:0}),bD=Tn(hc),Qp,Xp,mc,Ff=Pe({},hc,{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!==mc&&(mc&&e.type==="mousemove"?(Qp=e.screenX-mc.screenX,Xp=e.screenY-mc.screenY):Xp=Qp=0,mc=e),Qp)},movementY:function(e){return"movementY"in e?e.movementY:Xp}}),Tx=Tn(Ff),yD=Pe({},Ff,{dataTransfer:0}),gD=Tn(yD),vD=Pe({},hc,{relatedTarget:0}),Zp=Tn(vD),xD=Pe({},Ai,{animationName:0,elapsedTime:0,pseudoElement:0}),ND=Tn(xD),SD=Pe({},Ai,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wD=Tn(SD),ED=Pe({},Ai,{data:0}),Ox=Tn(ED),_D=Ox,AD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DD={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"},CD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},TD=Pe({},hc,{key:function(e){if(e.key){var t=AD[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"?DD[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}}),OD=Tn(TD),RD=Pe({},Ff,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rx=Tn(RD),jD=Pe({},hc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oh}),MD=Tn(jD),kD=Pe({},Ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),VD=Tn(kD),UD=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}),zD=Tn(UD),BD=Pe({},Ai,{newState:0,oldState:0}),qD=Tn(BD),LD=[9,13,27,32],jx=229,Kp=ha&&"CompositionEvent"in window,pc=null;ha&&"documentMode"in document&&(pc=document.documentMode);var HD=ha&&"TextEvent"in window&&!pc,Mx=ha&&(!Kp||pc&&8<pc&&11>=pc),kx=32,Vx=String.fromCharCode(kx),Ux=!1,Mo=!1,PD={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},bc=null,yc=null,zx=!1;ha&&(zx=l_("input")&&(!document.documentMode||9<document.documentMode));var xn=typeof Object.is=="function"?Object.is:m_,$D=ha&&"documentMode"in document&&11>=document.documentMode,ko=null,Wp=null,gc=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"),ID=di("transitionrun"),FD=di("transitionstart"),YD=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 GD=performance,Fx=function(){return GD.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)},QD="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,Gf="– ",Jf="+ ",Yx=" ",bt=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",as="Components ⚛",Fe="Scheduler ⚛",Je="Blocking",Tr=!1,qa={color:"primary",properties:null,tooltipText:"",track:as},Or={start:-0,end:-0,detail:{devtools:qa}},XD=["Changed Props",""],Gx="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",ZD=["Changed Props",Gx],vc=1,La=2,rs=[],Uo=0,ob=0,Rr={};Object.freeze(Rr);var is=null,zo=null,Ce=0,KD=1,Ve=2,mn=8,_s=16,WD=32,Jx=!1;try{var Qx=Object.preventExtensions({})}catch{Jx=!0}var lb=new WeakMap,Bo=[],qo=0,Qf=null,xc=0,os=[],ls=0,Di=null,Ha=1,Pa="",cn=null,yt=null,$e=!1,ma=!1,Fn=null,jr=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,eC=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()})}},tC=zt.unstable_scheduleCallback,nC=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},Nc=1,Kf=2,Wt=-0,Mr=-0,$a=-0,Ia=null,Nn=-1.1,Ci=-0,St=-0,_e=-1.1,Ae=-1.1,Nt=null,Dt=!1,Ti=-0,pa=-1.1,Sc=null,kr=0,db=null,hb=null,Oi=-1.1,wc=null,Po=-1.1,Wf=-1.1,Fa=-0,Ya=-1.1,us=-1.1,mb=0,Ec=null,Zx=null,Kx=null,Vr=-1.1,Ri=null,Ur=-1.1,ed=-1.1,Wx=-0,eN=-0,td=0,sC=null,tN=0,_c=-1.1,nd=!1,sd=!1,Ac=null,pb=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>Ya&&0>us){Ya=qt();var n=nc(),r=tc();(n!==Ur||r!==Ri)&&(Ur=-1.1),Vr=n,Ri=r}N_(e,t)}nN!==null&&nN(e,t)};var Mi=le(null),As={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},Dc=[],Cc=[],Tc=[],Oc=[],Rc=[],jc=[],ki=new Set;As.recordUnsafeLifecycleWarnings=function(e,t){ki.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&Dc.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillMount=="function"&&Cc.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Tc.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&Oc.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&Rc.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillUpdate=="function"&&jc.push(e))},As.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<Dc.length&&(Dc.forEach(function(h){e.add(H(h)||"Component"),ki.add(h.type)}),Dc=[]);var t=new Set;0<Cc.length&&(Cc.forEach(function(h){t.add(H(h)||"Component"),ki.add(h.type)}),Cc=[]);var n=new Set;0<Tc.length&&(Tc.forEach(function(h){n.add(H(h)||"Component"),ki.add(h.type)}),Tc=[]);var r=new Set;0<Oc.length&&(Oc.forEach(function(h){r.add(H(h)||"Component"),ki.add(h.type)}),Oc=[]);var l=new Set;0<Rc.length&&(Rc.forEach(function(h){l.add(H(h)||"Component"),ki.add(h.type)}),Rc=[]);var c=new Set;if(0<jc.length&&(jc.forEach(function(h){c.add(H(h)||"Component"),ki.add(h.type)}),jc=[]),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
|
-
|
|
200
|
-
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
201
|
-
|
|
202
|
-
Please update the following components: %s`,f)}0<r.size&&(f=w(r),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
203
|
-
|
|
204
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
205
|
-
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
206
|
-
|
|
207
|
-
Please update the following components: %s`,f)),0<c.size&&(f=w(c),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
208
|
-
|
|
209
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
210
|
-
|
|
211
|
-
Please update the following components: %s`,f)),0<e.size&&(f=w(e),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
212
|
-
|
|
213
|
-
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
214
|
-
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
215
|
-
|
|
216
|
-
Please update the following components: %s`,f)),0<n.size&&(f=w(n),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
217
|
-
|
|
218
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
219
|
-
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
220
|
-
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
221
|
-
|
|
222
|
-
Please update the following components: %s`,f)),0<l.size&&(f=w(l),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
223
|
-
|
|
224
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
225
|
-
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
226
|
-
|
|
227
|
-
Please update the following components: %s`,f))};var ad=new Map,sN=new Set;As.recordLegacyContextWarning=function(e,t){for(var n=null,r=e;r!==null;)r.mode&mn&&(n=r),r=r.return;n===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!sN.has(e.type)&&(r=ad.get(n),e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(r===void 0&&(r=[],ad.set(n,r)),r.push(e))},As.flushLegacyContextWarning=function(){ad.forEach(function(e){if(e.length!==0){var t=e[0],n=new Set;e.forEach(function(l){n.add(H(l)||"Component"),sN.add(l.type)});var r=w(n);be(t,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
|
|
228
|
-
|
|
229
|
-
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
230
|
-
|
|
231
|
-
Please update the following components: %s
|
|
232
|
-
|
|
233
|
-
Learn more about this warning here: https://react.dev/link/legacy-context`,r)})}})},As.discardPendingWarnings=function(){Dc=[],Cc=[],Tc=[],Oc=[],Rc=[],jc=[],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:""})}},aC=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}},rC=hN.react_stack_bottom_frame.bind(hN),mN={react_stack_bottom_frame:function(e,t,n){try{n()}catch(r){at(e,t,r)}}},iC=mN.react_stack_bottom_frame.bind(mN),pN={react_stack_bottom_frame:function(e){var t=e._init;return t(e._payload)}},oC=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,Mc=!1,Fo=null,kc=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
|
-
|
|
235
|
-
Check the render method of \``+l+"`."),c||r&&(c=`
|
|
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,xb=3,zr=!1,EN=!1,Nb=null,Sb=!1,Yo=le(null),od=le(0),Yn=le(null),fs=null,Go=1,Vc=2,Mt=le(0),ld=0,ds=1,Sn=2,Gn=4,wn=8,Jo,_N=new Set,AN=new Set,wb=new Set,DN=new Set,Ga=0,Oe=null,ft=null,Lt=null,cd=!1,Qo=!1,zi=!1,ud=0,Uc=0,Ja=null,lC=0,cC=25,I=null,hs=null,Qa=-1,zc=!1,Bc={readContext:xt,use:xr,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};Bc.useEffectEvent=Tt;var Eb=null,CN=null,_b=null,TN=null,ba=null,Ds=null,fd=null;Eb={readContext:function(e){return xt(e)},use:xr,useCallback:function(e,t){return I="useCallback",He(),uo(t),Nm(e,t)},useContext:function(e){return I="useContext",He(),xt(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=Y.H;Y.H=ba;try{return Sm(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",He();var r=Y.H;Y.H=ba;try{return um(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",He(),ym(e)},useState:function(e){I="useState",He();var t=Y.H;Y.H=ba;try{return mm(e)}finally{Y.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 xt(e)},use:xr,useCallback:function(e,t){return I="useCallback",re(),Nm(e,t)},useContext:function(e){return I="useContext",re(),xt(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=Y.H;Y.H=ba;try{return Sm(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",re();var r=Y.H;Y.H=ba;try{return um(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",re(),ym(e)},useState:function(e){I="useState",re();var t=Y.H;Y.H=ba;try{return mm(e)}finally{Y.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 xt(e)},use:xr,useCallback:function(e,t){return I="useCallback",re(),of(e,t)},useContext:function(e){return I="useContext",re(),xt(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,Gn,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 xt(e)},use:xr,useCallback:function(e,t){return I="useCallback",re(),of(e,t)},useContext:function(e){return I="useContext",re(),xt(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,Gn,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 $l(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 $l(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(),xt(e)},use:function(e){return m(),xr(e)},useCallback:function(e,t){return I="useCallback",m(),He(),Nm(e,t)},useContext:function(e){return I="useContext",m(),He(),xt(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=Y.H;Y.H=ba;try{return Sm(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",m(),He();var r=Y.H;Y.H=ba;try{return um(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",m(),He(),ym(e)},useState:function(e){I="useState",m(),He();var t=Y.H;Y.H=ba;try{return mm(e)}finally{Y.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(),xt(e)},use:function(e){return m(),xr(e)},useCallback:function(e,t){return I="useCallback",m(),re(),of(e,t)},useContext:function(e){return I="useContext",m(),re(),xt(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,Gn,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(),xt(e)},use:function(e){return m(),xr(e)},useCallback:function(e,t){return I="useCallback",m(),re(),of(e,t)},useContext:function(e){return I="useContext",m(),re(),xt(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,Gn,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 $l(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 $l(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 Ab={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Hn(e),l=br(r);l.payload=t,n!=null&&(Om(n),l.callback=n),t=yr(e,l,r),t!==null&&(Js(r,"this.setState()",e),At(t,e,r),ql(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Hn(e),l=br(r);l.tag=SN,l.payload=t,n!=null&&(Om(n),l.callback=n),t=yr(e,l,r),t!==null&&(Js(r,"this.replaceState()",e),At(t,e,r),ql(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Hn(e),r=br(n);r.tag=wN,t!=null&&(Om(t),r.callback=t),t=yr(e,r,n),t!==null&&(Js(n,"this.forceUpdate()",e),At(t,e,n),ql(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,GN=null;GN=new Set;var Xa=!1,Pt=!1,Ob=!1,JN=typeof WeakSet=="function"?WeakSet:Set,en=null,Ko=null,Wo=null,$t=null,Mn=!1,Cs=null,Jt=!1,qc=8192,uC={getCacheForType:function(e){var t=xt(Bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return xt(Bt).controller.signal},getOwner:function(){return In}};if(typeof Symbol=="function"&&Symbol.for){var Lc=Symbol.for;Lc("selector.component"),Lc("selector.has_pseudo_class"),Lc("selector.role"),Lc("selector.test_id"),Lc("selector.text")}var fC=[],dC=typeof WeakMap=="function"?WeakMap:Map,tn=0,Qt=2,Jn=4,Za=0,Hc=1,Bi=2,hd=3,Br=4,md=6,QN=5,Ze=tn,dt=null,qe=null,ze=0,kn=0,pd=1,qi=2,Pc=3,XN=4,Rb=5,$c=6,bd=7,jb=8,Li=9,lt=kn,Qn=null,qr=!1,el=!1,Mb=!1,ya=0,wt=Za,Lr=0,Hr=0,kb=0,Vn=0,Hi=0,Ic=null,En=null,yd=!1,gd=0,ZN=0,KN=300,vd=1/0,WN=500,Fc=null,Ot=null,Pr=null,xd=0,Vb=1,Ub=2,eS=3,$r=0,tS=1,nS=2,sS=3,aS=4,Nd=5,It=0,Ir=null,tl=null,Ts=0,zb=0,Bb=-0,qb=null,rS=null,iS=null,Os=xd,oS=null,hC=50,Yc=0,Lb=null,Hb=!1,Sd=!1,mC=50,Pi=0,Gc=null,nl=!1,wd=null,lS=!1,cS=new Set,pC={},Ed=null,sl=null,Pb=!1,$b=!1,_d=!1,Ib=!1,Fr=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(ID,"onTransitionRun"),xs(FD,"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={},bC=/\r\n?/g,yC=/\u0000|\uFFFD/g,$i="http://www.w3.org/1999/xlink",Gb="http://www.w3.org/XML/1998/namespace",gC="javascript:throw new Error('React form unexpectedly submitted.')",vC="suppressHydrationWarning",Ii="&",Rd="/&",Qc="$",Xc="/$",Yr="$?",Fi="$~",al="$!",xC="html",NC="body",SC="head",Jb="F!",mS="F",pS="loading",wC="style",Ka=0,rl=1,jd=2,Qb=null,Xb=null,bS={dialog:!0,webview:!0},Zb=null,Zc=void 0,yS=typeof setTimeout=="function"?setTimeout:void 0,EC=typeof clearTimeout=="function"?clearTimeout:void 0,Yi=-1,gS=typeof Promise=="function"?Promise:void 0,_C=typeof queueMicrotask=="function"?queueMicrotask:typeof gS<"u"?function(e){return gS.resolve(null).then(e).catch(oA)}:yS,Kb=null,Gi=0,Kc=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(ac(c))||t==="script"&&r.querySelector(rc(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(rc(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(rc(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:Gi,preload:null};if(f=r.querySelector(ac(c)))h.loading=Kc|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(x,k){y.onload=x,y.onerror=k}),y.addEventListener("load",function(){h.loading|=Kc}),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(rc(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,AC=6e4,DC=800,CC=500,Wb=0,e0=null,kd=null,Ji=PA,Wc={$$typeof:la,Provider:null,Consumer:null,_currentValue:Ji,_currentValue2:Ji,_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=" ",TC=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=Sl(),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,Gr=null,Jr=null,Qr=null,eu=new Map,tu=new Map,Xr=[],OC="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()."):X(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|Jn))!==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[Dr]=null}},jf.prototype.unstable_scheduleHydration=function(e){if(e){var t=so();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xr.length&&t!==0&&t<Xr[n].priority;n++);Xr.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
|
-
- react: `+(e+`
|
|
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"),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:Y,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=z,e.scheduleRoot=q,e.setRefreshHandler=F,e.getCurrentFiber=MA,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")}nu.createRoot=function(e,t){if(!X(e))throw Error("Target container is not a DOM element.");Q1(e);var n=!1,r="",l=Yg,c=Gg,f=Jg;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
|
-
|
|
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,J1),e[Dr]=t.current,op(e),new Ap(t)},nu.hydrateRoot=function(e,t,n){if(!X(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=Gg,h=Jg,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,J1),t.context=q1(null),n=t.current,r=Hn(n),r=_l(r),l=br(r),l.callback=null,yr(n,l,r),Js(r,"hydrateRoot()",null),n=r,t.current.lanes=n,li(t,n),ra(t),e[Dr]=t.current,op(e),new jf(t)},nu.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),nu}var $S;function pT(){return $S||($S=1,s0.exports=mT()),s0.exports}var bT=pT();const yT="modulepreload",gT=function(i){return"/"+i},IS={},tt=function(s,a,o){let u=Promise.resolve();if(a&&a.length>0){let p=function(v){return Promise.all(v.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(v=>{if(v=gT(v),v in IS)return;IS[v]=!0;const _=v.endsWith(".css"),w=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${w}`))return;const D=document.createElement("link");if(D.rel=_?"stylesheet":yT,_||(D.as="script"),D.crossOrigin="",D.href=v,g&&D.setAttribute("nonce",g),document.head.appendChild(D),_)return new Promise((q,z)=>{D.addEventListener("load",q),D.addEventListener("error",()=>z(new Error(`Unable to preload CSS for ${v}`)))})}))}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 tE(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 nE(i){const s=tE(i);return!s||typeof s.exp!="number"?null:s.exp}function J0(i,s=0){const a=nE(i);return a===null?!0:Date.now()/1e3>=a-s}const S0="/api";let Wr=null;function Ld(i){Wr=i}function Rj(){return Wr}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 Zr=null;async function vt(i,s={}){const a={"Content-Type":"application/json",...s.headers};if(Wr){if(J0(Wr)){Zr||(Zr=FS().finally(()=>{Zr=null}));const u=await Zr;if(u)Wr=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 ${Wr}`}let o=await fetch(`${S0}${i}`,{...s,headers:a});if(o.status===401&&Wr){Zr||(Zr=FS().finally(()=>{Zr=null}));const u=await Zr;if(u&&(Wr=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 sE=B.createContext(null),vT=300;function i0(i,s){if(J0(i))return null;const a=tE(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 xT({children:i}){const[s,a]=B.useState(()=>{const w=sessionStorage.getItem("lt_token");return w?J0(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=nE(w);if(!D)return;const q=(D-vT)*1e3-Date.now();q<=0||(o.current=setTimeout(async()=>{const z=sessionStorage.getItem("lt_credentials");if(z)try{const{username:F,password:X}=JSON.parse(z),ee=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:F,password:X})});if(!ee.ok)return;const te=await ee.json();te.token&&window.dispatchEvent(new CustomEvent("auth:refreshed",{detail:{token:te.token}}))}catch{}},q))},[]),d=B.useCallback((w,D,q)=>{const z={displayName:(q==null?void 0:q.displayName)??null,username:(q==null?void 0:q.username)??(D==null?void 0:D.username)??null},F=i0(w,z);F&&(Ld(w),sessionStorage.setItem("lt_token",w),sessionStorage.setItem("lt_user_info",JSON.stringify(z)),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=q=>{var X;const z=(X=q.detail)==null?void 0:X.token;if(!z)return;const F=i0(z);F&&(Ld(z),sessionStorage.setItem("lt_token",z),a(F),u(z))};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]),v=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(sE.Provider,{value:{user:s,isAuthenticated:!!s,isSuperAdmin:m,login:d,logout:p,hasRole:g,hasRoleType:v,userRoleNames:_},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useAuth.tsx",lineNumber:178,columnNumber:5},this)}function Ki(){const i=B.useContext(sE);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 NT(...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]:NT(...s)}function YS(i){return!i||i.length===0?"":Kn.decode(i)}const GS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",JS=36,ST=0xcfd41b9100000,QS=33,wT=333,XS=22;function ET(i){for(let s=0;s<i.length;s++)i[s]=Math.floor(Math.random()*255)}function _T(i){var s;(s=globalThis==null?void 0:globalThis.crypto)!=null&&s.getRandomValues?globalThis.crypto.getRandomValues(i):ET(i)}class AT{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()*ST),this.inc=Math.floor(Math.random()*(wT-QS)+QS)}setPre(){const s=new Uint8Array(12);_T(s);for(let a=0;a<12;a++){const o=s[a]%36;this.buf[a]=GS.charCodeAt(o)}}fillSeq(){let s=this.seq;for(let a=XS-1;a>=12;a--)this.buf[a]=GS.charCodeAt(s%JS),s=Math.floor(s/JS)}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 ri=new AT;var tr;(function(i){i.Disconnect="disconnect",i.Reconnect="reconnect",i.Update="update",i.LDM="ldm",i.Error="error"})(tr||(tr={}));var fl;(function(i){i.Reconnecting="reconnecting",i.PingTimer="pingTimer",i.StaleConnection="staleConnection",i.ClientInitiatedReconnect="client initiated reconnect"})(fl||(fl={}));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 DT(i){return typeof i.code=="string"}class aE{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 CT.getMessage(s)}getMessage(s){return this.messages.get(s)||s}}const CT=new aE;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=aE.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}.${ri.next()}`}const w0="127.0.0.1";var ti;(function(i){i.PING="PING",i.STATS="STATS",i.INFO="INFO"})(ti||(ti={}));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 bl(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 vl(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 rE(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 TT(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 TT(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 ni(i,s)}const o0="NATS/1.0";class ni{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 ni,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),v=p.slice(m+1).trim();a.append(g,v)}}}),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
|
-
${a}: ${o[u]}`;return`${s}\r
|
|
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=ni.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 ni;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 iE(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=ni.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 dl(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
|
-
`,"\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 lu(i,s=""){if(s==="")throw Error(`${i} name required`);const a=OT(s);if(a.length)throw new Error(`invalid ${i} name - ${i} name ${a}`)}function OT(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 RT(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 hl(i){if(i.data.length!==0)return null;const s=i.headers;return s?oE(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 jT(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 oE(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 yl;(function(i){i.Instant="instant",i.Original="original"})(yl||(yl={}));var ii;(function(i){i.None="none",i.S2="s2"})(ii||(ii={}));var oh;(function(i){i.CreateOrUpdate="",i.Update="update",i.Create="create"})(oh||(oh={}));function MT(i,s={}){return Object.assign({name:i,deliver_policy:Vt.All,ack_policy:nn.Explicit,ack_wait:Et(30*1e3),replay_policy:yl.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 ul;(function(i){i.Stream="Nats-Stream",i.Sequence="Nats-Sequence",i.TimeStamp="Nats-Time-Stamp",i.Subject="Nats-Subject"})(ul||(ul={}));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 kT{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=MT("",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 dl(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=yl.Instant,this}replayOriginal(){return this.config.replay_policy=yl.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 si(i){return new kT(i)}function ew(i){return typeof i.getOpts=="function"}class VT{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 ml{static encode(s){return ml.toB64URLEncoding(VT.encode(s))}static decode(s,a=!1){return ml.decode(ml.fromB64URLEncoding(s),a)}static toB64URLEncoding(s){return s.replace(/\+/g,"-").replace(/\//g,"_")}static fromB64URLEncoding(s){return s.replace(/_/g,"/").replace(/-/g,"+")}}class gl{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 UT(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 zT=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},su=zT.performance||{};su.now||su.mozNow||su.msNow||su.oNow||su.webkitNow;var tw={versions:{}},BT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qT(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=qT(UT({__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=BT: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],v=[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 q=function(U,ne){return function(oe){return new te(ne,!0).update(oe)[U]()}},z=function(U){var ne=q("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]=q(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)}},X=function(U,ne){return function(oe,W){return new we(oe,ne,!0).update(W)[U]()}},ee=function(U){var ne=X("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]=X(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]<<v[3&Q++];else for(Q=this.start;H<le&&Q<64;++H)(W=U.charCodeAt(H))<128?ie[Q>>>2]|=W<<v[3&Q++]:W<2048?(ie[Q>>>2]|=(192|W>>>6)<<v[3&Q++],ie[Q>>>2]|=(128|63&W)<<v[3&Q++]):W<55296||W>=57344?(ie[Q>>>2]|=(224|W>>>12)<<v[3&Q++],ie[Q>>>2]|=(128|W>>>6&63)<<v[3&Q++],ie[Q>>>2]|=(128|63&W)<<v[3&Q++]):(W=65536+((1023&W)<<10|1023&U.charCodeAt(++H)),ie[Q>>>2]|=(240|W>>>18)<<v[3&Q++],ie[Q>>>2]|=(128|W>>>12&63)<<v[3&Q++],ie[Q>>>2]|=(128|W>>>6&63)<<v[3&Q++],ie[Q>>>2]|=(128|63&W)<<v[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,G=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,G=(Q=Ne[0]-1413257819)-150054599|0,pe=Q+24177077|0):(H=704751109,G=(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,G=pe+(Q=G+(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=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7))+(G&xe^~G&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&G^~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&G)+_[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+G|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=z();De.sha256=De,De.sha224=z(!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 FT(i)}function LT(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 HT(i){return/^[A-Za-z0-9\-_]*(={0,2})?$/.test(i)||/^[A-Za-z0-9+/]*(={0,2})?$/.test(i)}function PT(i){return LT(i)?"hex":HT(i)?"b64":""}function $T(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 IT(i){i=i.replace(/-/g,"+"),i=i.replace(/_/g,"/");const s=atob(i);return Uint8Array.from(s,a=>a.charCodeAt(0))}function FT(i){switch(PT(i)){case"hex":return $T(i);case"b64":return IT(i)}return null}function YT(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 lE{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=ri.next(),o&&(this.ctx=new Error)}}class GT extends lE{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
|
-
|
|
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 cE extends lE{constructor(a,o,u={timeout:1e3},d=!0){super(a,o,d);S(this,"deferred");S(this,"timer");this.deferred=_t(),this.timer=bl(u.timeout,d)}resolver(a,o){this.timer&&this.timer.cancel(),a?(this.ctx&&(a.stack+=`
|
|
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 JT="$JS.API";function QT(i){return i=i||{},i.domain&&(i.apiPrefix=`$JS.${i.domain}.API`,delete i.domain),ph({apiPrefix:JT,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=QT(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 v=g;if((v.code==="503"||v.code===ue.Timeout)&&m+1<d)await vl(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=oE(o.error.code,o.error.description);if(u!==null)throw u.api_error=o.error,u}return a}}class cu{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 XT{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&&dl(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 q=D.message,z=q.indexOf("cannot contain");throw z!==-1?new Error(`consumer 'name' ${q.substring(z)}`):D}let v,_="";if(Array.isArray(a.filter_subjects)){const{min:D,ok:q}=d.features.get(et.JS_MULTIPLE_CONSUMER_FILTER);if(!q)throw new Error(`consumer 'filter_subjects' requires server ${D}`);m=!1}if(a.metadata){const{min:D,ok:q}=d.features.get(et.JS_STREAM_CONSUMER_METADATA);if(!q)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),v=D!==void 0?`${this.prefix}.CONSUMER.CREATE.${s}.${_}.${D}`:`${this.prefix}.CONSUMER.CREATE.${s}.${_}`}else v=a.durable_name?`${this.prefix}.CONSUMER.DURABLE.CREATE.${s}.${a.durable_name}`:`${this.prefix}.CONSUMER.CREATE.${s}`;return await this._request(v,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),dl(a),await this._request(`${this.prefix}.CONSUMER.INFO.${s}.${a}`)}async delete(s,a){return _n(s),dl(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 cu(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 ZT 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[q,z]=this.adapter(w,D);if(q){_(q,null);return}const{ingest:F}=this.ingestionFilterFn?this.ingestionFilterFn(z,this):{ingest:!0};F&&(!this.protocolFilterFn||this.protocolFilterFn(z))&&(_(q,z),this.dispatchedFn&&z&&this.dispatchedFn(z))}}const{max:p,queue:m,timeout:g}=u,v={queue:m,timeout:g,callback:d};p&&p>0&&(v.max=p),this.sub=a.subscribe(o,v),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 KT(i){Wn=i}function uE(){return Wn!==void 0&&Wn.defaultPort!==void 0?Wn.defaultPort:4222}function c0(){return Wn!==void 0&&Wn.urlParseFn?Wn.urlParseFn:void 0}function WT(){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=gl.fromAscii(Zd),e3=new Uint8Array(ch)[0],t3=new Uint8Array(ch)[1];function n3(i){for(let s=0;s<i.length;s++){const a=s+1;if(i.byteLength>a&&i[s]===e3&&i[a]===t3)return a+1}return 0}function s3(i){const s=n3(i);if(s>0){const o=new Uint8Array(i).slice(0,s);return Kn.decode(o)}return""}const a3=4,fE=48,r3=65,i3=97;function o3(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 l3(i)!==void 0}function l3(i){for(let s=0;s<i.length;s++)switch(i[s]){case".":return dE(i);case":":return c3(i)}}function dE(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}=u3(i);if(!d||o>255)return;i=i.substring(u),s[a]=o}return o3(s[0],s[1],s[2],s[3])}function c3(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}=f3(i);if(!p||u>65535)return;if(d<i.length&&i[d]==="."){if(a<0&&o!=12||o+4>16)return;const m=dE(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+=a3;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 u3(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)-fE),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 f3(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)-fE;else if(97<=i.charCodeAt(a)&&i.charCodeAt(a)<=102)s*=16,s+=i.charCodeAt(a)-i3+10;else if(65<=i.charCodeAt(a)&&i.charCodeAt(a)<=70)s*=16,s+=i.charCodeAt(a)-r3+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 d3(i){return i.indexOf("[")!==-1||i.indexOf("::")!==-1?!1:i.indexOf(".")!==-1||i.split(":").length<=2}function M0(i){return!d3(i)}function h3(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 m3(i){i=i.trim(),i.match(/^(.*:\/\/)(.*)/m)&&(i=i.replace(/^(.*:\/\/)(.*)/gm,"$2")),i=h3(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=m3(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&&rE(a),this.resolves=a,a}}class p3{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=rE(this.servers))),this.servers.length===0&&this.addServer(`${w0}:${uE()}`,!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 v=new hu(g,!0);p.set(g,v)});const m=[];return this.servers.forEach((g,v)=>{const _=g.listen;g.gossiped&&this.currentServer.listen!==_&&p.get(_)===void 0&&m.push(v),p.delete(_)}),m.reverse(),m.forEach(g=>{const v=this.servers.splice(g,1);u=u.concat(v[0].listen)}),p.forEach((g,v)=>{this.servers.push(g),o.push(v)}),{added:o,deleted:u}}}class b3{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=iE(a)),u.resolver(s,a))}}}close(){const s=ge.errorForCode(ue.Timeout);this.reqs.forEach(a=>{a.resolver(s,{})})}}class y3{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:fl.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 g3 extends Error{constructor(s){super(s),this.name="AssertionError"}}function v3(i,s="Assertion failed."){if(!i)throw new g3(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){v3(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 x3=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]-x3)}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]),v=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]),q=a([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function z(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 X(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,Z=0;for(L=0;L<M;L++)Z|=N[A+L]^E[C+L];return(1&Z-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),Z=new Uint32Array(16),se=new Uint32Array(16),$=new Uint32Array(4),K,ye,Be;for(K=0;K<4;K++)Z[5*K]=F(C,4*K),Z[1+K]=F(E,4*K),Z[6+K]=F(A,4*K),Z[11+K]=F(E,16+4*K);for(K=0;K<16;K++)se[K]=Z[K];for(K=0;K<20;K++){for(ye=0;ye<4;ye++){for(Be=0;Be<4;Be++)$[Be]=Z[(5*ye+4*Be)%16];for($[1]^=z($[0]+$[3]|0,7),$[2]^=z($[1]+$[0]|0,9),$[3]^=z($[2]+$[1]|0,13),$[0]^=z($[3]+$[2]|0,18),Be=0;Be<4;Be++)L[4*ye+(ye+Be)%4]=$[Be]}for(Be=0;Be<16;Be++)Z[Be]=L[Be]}if(M){for(K=0;K<16;K++)Z[K]=Z[K]+se[K]|0;for(K=0;K<4;K++)Z[5*K]=Z[5*K]-F(C,4*K)|0,Z[6+K]=Z[6+K]-F(A,4*K)|0;for(K=0;K<4;K++)ee(N,4*K,Z[5*K]),ee(N,16+4*K,Z[6+K])}else for(K=0;K<16;K++)ee(N,4*K,Z[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,Z){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,Z,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,Z,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,Z){var se=new Uint8Array(32);return W(se,L,Z,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 Z,se,$,K,ye=new Uint32Array(17),Be=new Uint32Array(17),it=new Uint32Array(17),pn=new Uint32Array(17),fr=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;$++)fr[$]=it[$];for(Qe(it,nt),Z=-(it[16]>>>7)|0,$=0;$<17;$++)it[$]^=Z&(fr[$]^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 Z=new Uint8Array(16);return ae(Z,0,E,C,M,L),De(N,A,Z,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,Z=new Uint8Array(32);if(E<32||(ie(Z,0,32,C,M),pe(A,16,A,32,E-32,Z)!==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 G(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(),Z=a();for(E=0;E<16;E++)Z[E]=A[E];for(G(Z),G(Z),G(Z),C=0;C<2;C++){for(L[0]=Z[0]-65517,E=1;E<15;E++)L[E]=Z[E]-65535-(L[E-1]>>16&1),L[E-1]&=65535;L[15]=Z[15]-32767-(L[14]>>16&1),M=L[15]>>16&1,L[14]&=65535,Ne(Z,L,1-M)}for(E=0;E<16;E++)N[2*E]=Z[E]&255,N[2*E+1]=Z[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];G(N),G(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,Z,se=a(),$=a(),K=a(),ye=a(),Be=a(),it=a();for(Z=0;Z<31;Z++)C[Z]=A[Z];for(C[31]=A[31]&127|64,C[0]&=248,wa(M,E),Z=0;Z<16;Z++)$[Z]=M[Z],ye[Z]=se[Z]=K[Z]=0;for(se[0]=ye[0]=1,Z=254;Z>=0;--Z)L=C[Z>>>3]>>>(Z&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(Z=0;Z<16;Z++)M[Z+16]=se[Z],M[Z+32]=K[Z],M[Z+48]=$[Z],M[Z+64]=ye[Z];var pn=M.subarray(32),fr=M.subarray(16);return be(pn,pn),Me(fr,fr,pn),Xe(N,fr),0}function _a(N,A){return Ea(N,A,d)}function ir(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,Nl=je;function wh(N,A,E,C,M,L){var Z=new Uint8Array(32);return st(Z,M,L),to(N,A,E,C,Z)}function pt(N,A,E,C,M,L){var Z=new Uint8Array(32);return st(Z,M,L),Nl(N,A,E,C,Z)}function oi(){var N=0,A=0,E=0,C=0,M=65535,L,Z,se;for(se=0;se<arguments.length;se++)L=arguments[se].lo,Z=arguments[se].hi,N+=L&M,A+=L>>>16,E+=Z&M,C+=Z>>>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 Sl(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 wl(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 El(N,A,E){var C=[],M=[],L=[],Z=[],se,$,K;for($=0;$<8;$++)C[$]=L[$]=X(N,8*$);for(var ye=0;E>=128;){for($=0;$<16;$++)Z[$]=X(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[$],Z[$%16]),M[7]=oi(se,wl(L[0]),Sl(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++)Z[K]=oi(Z[K],Z[(K+9)%16],_h(Z[(K+1)%16]),Eu(Z[(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 _l=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,Z=E;for(L=0;L<64;L++)C[L]=_l[L];for(El(C,A,E),E%=128,L=0;L<256;L++)M[L]=0;for(L=0;L<E;L++)M[L]=A[Z-E+L];for(M[E]=128,E=256-128*(E<112?1:0),M[E-9]=0,te(M,E-8,new s(Z/536870912|0,Z<<3)),El(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(),Z=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(Z,C,E),Rt(se,L,M),We($,L,M),We(K,C,E),Me(N[0],Z,se),Me(N[1],K,$),Me(N[2],$,se),Me(N[3],Z,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 or(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,or(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),Z=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(Z,N.subarray(32),E+32),qs(Z),or(ye,Z),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]=Z[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(),Z=a(),se=a(),$=a();return Te(N[2],m),wa(N[1],A),un(M,N[1]),Me(L,M,v),Rt(M,M,N[2]),We(L,N[2],L),un(Z,L),un(se,Z),Me($,se,Z),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],q),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),Z=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(Z,N,E),qs(Z),ao(se,$,Z),or($,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,lr=24,cr=32,vs=16,Ps=32,Cn=32,Xt=32,ur=32,Al=32,ro=lr,Au=cr,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:ir,crypto_hash:zs,crypto_sign:jt,crypto_sign_keypair:Bs,crypto_sign_open:Ls,crypto_secretbox_KEYBYTES:Hs,crypto_secretbox_NONCEBYTES:lr,crypto_secretbox_ZEROBYTES:cr,crypto_secretbox_BOXZEROBYTES:vs,crypto_scalarmult_BYTES:Ps,crypto_scalarmult_SCALARBYTES:Cn,crypto_box_PUBLICKEYBYTES:Xt,crypto_box_SECRETKEYBYTES:ur,crypto_box_BEFORENMBYTES:Al,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:v,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:or};function Dl(N,A){if(N.length!==Hs)throw new Error("bad key size");if(A.length!==lr)throw new Error("bad nonce size")}function Du(N,A){if(N.length!==Xt)throw new Error("bad public key size");if(A.length!==ur)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 Cl(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),Dl(E,A);for(var C=new Uint8Array(cr+N.length),M=new Uint8Array(C.length),L=0;L<N.length;L++)C[L+cr]=N[L];return xe(M,C,C.length,A,E),M.subarray(vs)},i.secretbox.open=function(N,A,E){Ut(N,A,E),Dl(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(cr)},i.secretbox.keyLength=Hs,i.secretbox.nonceLength=lr,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(Al);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(ur);return ir(N,A),{publicKey:N,secretKey:A}},i.box.keyPair.fromSecretKey=function(N){if(Ut(N),N.length!==ur)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=ur,i.box.sharedKeyLength=Al,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];Cl(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];Cl(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 N3(i){return s=>{let a={};return i.forEach(o=>{const u=o(s)||{};a=Object.assign(a,u)}),a}}function S3(){return()=>{}}function w3(i,s){return()=>{const a=typeof i=="function"?i():i,o=typeof s=="function"?s():s;return{user:a,pass:o}}}function E3(i){return()=>({auth_token:typeof i=="function"?i():i})}const hE=120*1e3,_3=2,mE=2*1e3;function A3(){return{maxPingOut:2,maxReconnectAttempts:10,noRandomize:!1,pedantic:!1,pingInterval:hE,reconnect:!0,reconnectJitter:100,reconnectJitterTLS:1e3,reconnectTimeWait:mE,tls:void 0,verbose:!1,waitOnFirstConnect:!1,ignoreAuthErrorAbort:!1}}function D3(i){const s=[];return typeof i.authenticator=="function"&&s.push(i.authenticator),Array.isArray(i.authenticator)&&s.push(...i.authenticator),i.token&&s.push(E3(i.token)),i.user&&s.push(w3(i.user,i.pass)),s.length===0?S3():N3(s)}function C3(i){const s=`${w0}:${uE()}`;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(A3(),i);if(a.authenticator=D3(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 T3(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 O3=1024*32,R3=/^INFO\s+([^\r\n]+)\r\n/i,j3=fu(`PONG\r
|
|
256
|
-
`),uw=fu(`PING\r
|
|
257
|
-
`);class M3{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 pE 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=bl(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:v}=u(g);v&&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 k3{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=O3,this.outMsgs=0,this.inMsgs=0,this.outBytes=0,this.inBytes=0,this.options=s,this.publisher=a,this.subscriptions=new k3,this.muxSubscriptions=new b3,this.outbound=new gl,this.pongs=[],this.whyClosed="",this.pendingLimit=s.pendingLimit||this.pendingLimit,this.features=new XT({major:0,minor:0,micro:0}),this.connectPromise=null;const o=typeof s.servers=="string"?[s.servers]:s.servers;this.servers=new p3(o,{randomize:!s.noRandomize}),this.closed=_t(),this.parser=new ow(this),this.heartbeats=new y3(this,this.options.pingInterval||hE,this.options.maxPingOut||_3)}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=WT(),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:fl.StaleConnection,data:""}),this.transport.disconnect()}reconnect(){return this.connected&&(this.dispatchStatus({type:fl.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=bl(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:fl.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():mE;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 vl(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(j3)}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 M3({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
|
-
`:g=`HPUB ${s} ${m} ${d}\r
|
|
259
|
-
`,this.sendCommand(g,p,u,ch)):(o.reply?g=`PUB ${s} ${o.reply} ${d}\r
|
|
260
|
-
`:g=`PUB ${s} ${d}\r
|
|
261
|
-
`,this.sendCommand(g,u,ch))}request(s){return this.initMux(),this.muxSubscriptions.add(s),s}subscribe(s){return this.subscriptions.add(s),this._subunsub(s),s}_sub(s){s.queue?this.sendCommand(`SUB ${s.subject} ${s.queue} ${s.sid}\r
|
|
262
|
-
`):this.sendCommand(`SUB ${s.subject} ${s.sid}\r
|
|
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
|
-
`):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 pE(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 V3="$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!==""&&z3("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;lu("endpoint",s);let{subject:u,handler:d,metadata:p,queue:m}=o;u=u||s,m=m||this.queue,U3("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 U3(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 z3(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"),lu("name",this.config.name),lu("queue",this.config.queue),Xi(this.config.version),this._id=ri.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??V3;return a===""&&o===""?`${d}.${s}`:(lu("control subject name",a),o!==""?(lu("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 B3(u,d,o),m.queue=o;const g=p?(v,_)=>{if(v){this.close(v);return}const w=Date.now();try{p(v,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(v=>{if(!this._stopped){const _=new Error(`required subscription ${s.subject} errored: ${v.message}`);_.stack=v.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(ti.PING,d),this.addInternalHandler(ti.STATS,a),this.addInternalHandler(ti.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 B3{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:v}=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:v}}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 q3{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(ti.PING,s,a)}stats(s="",a=""){return this.q(ti.STATS,s,a)}info(s="",a=""){return this.q(ti.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 v=d.decode(g.data);u.push(v)}catch(v){u.push(()=>{u.stop(v)})}u.push(()=>{u.stop()})})().catch(g=>{u.stop(g)}),u}}function bE(){return{key:{encode(i){return i},decode(i){return i}},value:{encode(i){return i},decode(i){return i}}}}function L3(){return{replicas:1,history:1,timeout:2e3,max_bytes:-1,maxValueSize:-1,codec:bE(),storage:C0.File}}const fh="KV-Operation",dw="$KV",H3=/^[-/=.\w]+$/,P3=/^[-/=.>*\w]+$/,$3=/^[-\w]+$/;function I3(i){if(i.startsWith(".")||i.endsWith(".")||!H3.test(i))throw new Error(`invalid key: ${i}`)}function F3(i){if(i.startsWith(".")||i.endsWith(".")||!P3.test(i))throw new Error(`invalid key: ${i}`)}function Y3(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(!$3.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",I3);S(this,"validateSearchKey",F3);S(this,"hasWildcards",Y3);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||bE(),p.direct=d.config.allow_direct??!1,p.initializePrefixes(d),p}async init(s={}){const a=Object.assign(L3(),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 q=Object.assign({},D),z=q.name.startsWith(Zn)?q.name.substring(Zn.length):q.name;return q.name.startsWith(Zn)||(q.name=`${Zn}${q.name}`),!D.external&&z!==this.bucket&&(q.subject_transforms=[{src:`$KV.${z}.>`,dest:`$KV.${this.bucket}.>`}]),q});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?ii.S2:ii.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:v}=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 ${v}`))}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 oO(this.bucket,this.prefixLen,s)}jmToEntry(s){const a=this.decodeKey(s.subject.substring(this.prefixLen));return new lO(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 v=g;return v.isJetStreamError()?(v.message=(p=v.api_error)==null?void 0:p.description,v.code=`${(m=v.api_error)==null?void 0:m.code}`,Promise.reject(v)):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 v=this.subjectForKey(g.key);return g.created.getTime()>=d?this.jsm.streams.purge(this.stream,{filter:v,keep:1}):this.jsm.streams.purge(this.stream,{filter:v,keep:0})}),m=await Promise.all(p);return m.unshift({success:!0,purged:0}),m.reduce((g,v)=>(g.purged+=v.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 v=this.encodeKey(g);return this.validateSearchKey(g),this.fullKeyName(v)}),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,v=si(m);v.bindStream(this.stream),v.orderedConsumer(),v.callback((w,D)=>{if(w){o.stop(w);return}if(D){const q=this.jmToEntry(D);o.push(q),o.received++,(d&&p>0&&o.received>=p||D.info.pending===0)&&(o.push(d),d=void 0)}});const _=await this.js.subscribe(g,v);if(d){const{info:{last:w}}=_,D=w.num_pending+w.delivered.consumer_seq;if(D===0||o.received>=D)try{d()}catch(q){o.stop(q)}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 v=this._buildCC(a,d,u),_=v.filter_subject,w=si(v);this.canSetWatcherName()&&w.consumerName(ri.next()),w.bindStream(this.stream),s.resumeFromRevision&&s.resumeFromRevision>0&&w.startSequence(s.resumeFromRevision),w.orderedConsumer(),w.callback((q,z)=>{if(q){o.stop(q);return}if(z){const F=this.jmToEntry(z);if(p&&F.operation==="DEL")return;o.push(F),o.received++,m&&(g>0&&o.received>=g||z.info.pending===0)&&(o.push(m),m=void 0)}});const D=await this.js.subscribe(_,w);if(m){const{info:{last:q}}=D,z=q.num_pending+q.delivered.consumer_seq;if(z===0||o.received>=z)try{m()}catch(F){o.stop(F)}finally{m=void 0}else g=z}return o._data=D,o.iterClosed.then(()=>{D.unsubscribe()}),D.closed.then(()=>{o.stop()}).catch(q=>{o.stop(q)}),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=si(o);d.bindStream(this.stream),d.orderedConsumer();const p=await this.js.subscribe(u,d);return(async()=>{var g;for await(const v of p){const _=(g=v.headers)==null?void 0:g.get(fh);if(_!=="DEL"&&_!=="PURGE"){const w=this.decodeKey(v.subject.substring(this.prefixLen));a.push(w)}v.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 yE(u,a)}}class yE{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!==ii.None:!1}}const W0="OBJ_",hw="SHA-256=";function G3(i){return Kd(i),`${W0}${i}`}function J3(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 J3(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!==ii.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 pl;(function(i){i.DebugEvent="debug",i.Discard="discard",i.Reset="reset",i.Next="next"})(pl||(pl={}));const mw=Uint8Array.of(43,65,67,75),Q3=Uint8Array.of(45,78,65,75),au=Uint8Array.of(43,87,80,73),X3=Uint8Array.of(43,78,88,84),Z3=Uint8Array.of(43,84,69,82,77),K3=Uint8Array.of(32);function vu(i,s=5e3){return new pO(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,v)=>{var w,D,q,z;if(g){this.stop(g);return}if((w=this.monitor)==null||w.work(),v.subject===this.inbox){if(A0(v))return;const F=(D=v.headers)==null?void 0:D.code,X=((z=(q=v.headers)==null?void 0:q.description)==null?void 0:z.toLowerCase())||"unknown",{msgsLeft:ee,bytesLeft:te}=this.parseDiscard(v.headers);if(ee>0||te>0)this.pending.msgs-=ee,this.pending.bytes-=te,this.pending.requests--,this.notify(pl.Discard,{msgsLeft:ee,bytesLeft:te});else if(F===400){this.stop(new ge(X,`${F}`));return}else if(F===409&&X==="consumer deleted"){if(this.notify(va.ConsumerDeleted,`${F} ${X}`),!this.refilling||this.abortOnMissingResource){const we=new ge(X,`${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(pl.DebugEvent,`${F} ${X}`)}else this._push(vu(v,this.consumer.api.timeout)),this.received++,this.pending.msgs&&this.pending.msgs--,this.pending.bytes&&(this.pending.bytes-=v.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 K0(u,g=>(this.notify(va.HeartbeatsMissed,g),this.resetPending().then(()=>{}).catch(()=>{}),!1),{maxOut:2})),(async()=>{var v;const g=this.consumer.api.nc.status();this.statusIterator=g;for await(const _ of g)switch(_.type){case tr.Disconnect:(v=this.monitor)==null||v.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=vl(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(pl.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 W3 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=bl(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=bl(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 eO{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=ri.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,v,_;ri.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"&&((v=this.iter)==null||v.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 vl(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,v;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((v=this.iter)==null?void 0:v.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 W3),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(pl.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 eO(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:v}=a.features.get(et.JS_STREAM_SOURCE_SUBJECT_TRANSFORM);if(!v)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 v=[d],_=a||{};let w=0;for(;p>g;){w++,_.offset=m*w;const q=await this._request(o,_);p=q.total,v.push(q);const z=Object.getOwnPropertyNames(q.state.subjects).length;if(g+=z,z<m)break}let D={};for(let q=0;q<v.length;q++)d=v[q],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 cu(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 gE(u)}find(s){return this.findStream(s)}listKvs(){const s=o=>{var g;const d=o.streams.filter(v=>v.config.name.startsWith(Zn));d.forEach(v=>{this._fixInfo(v)});let p="";return d.length&&(p=((g=this.nc.info)==null?void 0:g.cluster)??""),d.map(v=>new yE(v,p))},a=`${this.prefix}.STREAM.LIST`;return new cu(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 cu(a,s,this)}names(s=""){const a=s!=null&&s.length?{subject:s}:{},o=d=>d.streams,u=`${this.prefix}.STREAM.NAMES`;return new cu(u,o,this,a)}async get(s){const a=await this.info(s);return Promise.resolve(new gh(this,a))}}class tO 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}),v=hl(g);if(v)return Promise.reject(v);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,v)=>g==="up_to_time"&&v instanceof Date?v.toISOString():v),p=new sn,m=await this.nc.requestMany(u,d,{strategy:Ms.SentinelMsg});return(async()=>{var w,D,q;let g=!1,v=!1,_;for await(const z of m){if(!g){g=!0;const F=((w=z.headers)==null?void 0:w.code)||0;if(F!==0&&F<200||F>299){_=(D=z.headers)==null?void 0:D.description.toLowerCase();break}if(((q=z.headers)==null?void 0:q.get("Nats-Num-Pending"))===""){v=!0;break}}if(z.data.length===0)break;p.push(new z0(z))}p.push(()=>{if(v)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(ul.Subject)}get seq(){const s=this.header.last(ul.Sequence);return typeof s=="string"?parseInt(s):0}get time(){return new Date(Date.parse(this.timestamp))}get timestamp(){return this.header.last(ul.TimeStamp)}get stream(){return this.header.last(ul.Stream)}json(s){return ks(s).decode(this.data)}string(){return Kn.decode(this.data)}}S(z0,"jc");class nO 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 tO(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 gE{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=ni.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(gE,"jc");class sO{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=ni.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 aO(){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 v=((De=s.options)==null?void 0:De.max_chunk_size)||128*1024;v=v>g?g:v,s.options.max_chunk_size=v;const _=await this.info(s.name),{name:w,error:D}=this._checkNotEmpty(s.name);if(D)return Promise.reject(D);const q=ri.next(),z=this._chunkSubject(q),F=this._metaSubject(w),X=Object.assign({bucket:this.name,nuid:q,size:0,chunks:0},pw(s)),ee=_t(),te=[],we=new gl;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),X.chunks++,X.size+=ie.length,te.push(this.js.publish(z,ie,{timeout:d}))}await Promise.all(te),te.length=0,X.mtime=new Date().toISOString();const Q=ml.encode(ne.digest());X.digest=`${hw}${Q}`,X.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(X),{headers:H,timeout:d});if(X.revision=le.seq,_)try{await this.jsm.streams.purge(this.stream,{filter:`$O.${this.name}.C.${_.nuid}`})}catch{}ee.resolve(new h0(X));break}if(W)for(we.fill(W);we.size()>v;){X.chunks++,X.size+=v;const Q=we.drain(s.options.max_chunk_size);ne.update(Q),te.push(this.js.publish(z,Q,{timeout:d}))}}}catch(U){await this.jsm.streams.purge(this.stream,{filter:z}),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 gl,m=d.getReader();for(;;){const{done:g,value:v}=await m.read();if(g)return p.drain();v&&v.length&&p.fill(v)}}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=aO(),u.resolve(null),Promise.resolve(d);let p;const m=si();m.orderedConsumer();const g=aw.create(),v=`$O.${this.name}.C.${a.nuid}`,_=await this.js.subscribe(v,m);return(async()=>{for await(const w of _)w.data.length>0&&(g.update(w.data),p.enqueue(w.data)),w.info.pending===0&&(YT(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=si();p.orderedConsumer(),s.includeHistory?p.deliverLastPerSubject():(a=!0,p.deliverNew()),p.callback((g,v)=>{var _;if(g){o.stop(g);return}if(v!==null){const w=d.decode(v.data);w.deleted&&s.ignoreDeletes===!0||o.push(w),((_=v.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.${ml.encode(s)}`}_metaSubjectAll(){return`$O.${this.name}.M.>`}async init(s={}){try{this.stream=G3(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?ii.S2:ii.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 rO{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 sO(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 rO(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:v}=u;g=g||1,v=v||250;let _;for(let D=0;D<g;D++)try{_=await this.nc.request(a,o,m);break}catch(q){if(q.code==="503"&&D+1<g)await vl(v);else throw q}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),dl(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=hl(m);if(g)throw g;return vu(m,this.timeout)}fetch(a,o,u={}){_n(a),dl(o);let d=null;const p=(u.max_bytes??0)>0;let m=0;const g=p?u.max_bytes:0;let v=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 q=new sn,z=_.batch;let F=0;q.protocolFilterFn=(te,we=!1)=>A0(te.msg)?(v==null||v.work(),!1):!0,q.dispatchedFn=te=>{if(te){if(p&&(m+=te.data.length),F++,d&&te.info.pending===0)return;(q.getPending()===1&&te.info.pending===0||z===F||g>0&&m>=g)&&q.stop()}};const X=nr(this.nc.options.inboxPrefix),ee=this.nc.subscribe(X,{max:u.batch,callback:(te,we)=>{te===null&&(te=hl(we)),te!==null?(d&&(d.cancel(),d=null),DT(te)?q.stop(xE(te)===null?void 0:te):q.stop(te)):(v==null||v.work(),q.received++,q.push(vu(we,this.timeout)))}});return w&&(d=bl(w),d.catch(()=>{ee.isClosed()||(ee.drain().catch(()=>{}),d=null),v&&v.cancel()})),(async()=>{try{D&&(v=new K0(D,te=>(q.push(()=>{q.err=new ge(`${ys.IdleHeartbeatMissed}: ${te}`,ue.JetStreamIdleHeartBeat)}),!0)))}catch{}await ee.closed,d!==null&&(d.cancel(),d=null),v&&v.cancel(),q.stop()})().catch(),this.nc.publish(`${this.prefix}.CONSUMER.MSG.NEXT.${a}.${o}`,this.jc.encode(_),{reply:X}),q}async pullSubscribe(a,o=si()){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 cO(this,u.deliver,p);m.info=u;try{await this._maybeCreateConsumer(u)}catch(g){throw m.unsubscribe(),g}return m}async subscribe(a,o=si()){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 vE(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=si()){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=uO(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=hO),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:yl.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(hl(p.msg)||(g=d.monitor)==null||g.work(),A0(p.msg)){const v=a?d._checkHbOrderConsumer(p.msg):!0;return a||d.info.flow_control.heartbeat_count++,{ingest:v,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=C3(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 pE(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,v){g||v===null?p(g===null?void 0:g):d.push(v)}if(o.noMux){const g=u?new Error().stack:null;let v=typeof o.maxMessages=="number"&&o.maxMessages>0?o.maxMessages:-1;const _=this.subscribe(nr(this.options.inboxPrefix),{callback:(z,F)=>{var X,ee;if(((X=F==null?void 0:F.data)==null?void 0:X.length)===0&&((ee=F==null?void 0:F.headers)==null?void 0:ee.status)===ue.NoResponders&&(z=ge.errorForCode(ue.NoResponders)),z){g&&(z.stack+=`
|
|
266
|
-
|
|
267
|
-
${g}`),w(z);return}m(null,F),o.strategy===Ms.Count&&(v--,v===0&&w()),o.strategy===Ms.JitterTimer&&(q(),D=setTimeout(()=>{w()},300)),o.strategy===Ms.SentinelMsg&&F&&F.data.length===0&&w()}});_.requestSubject=s,_.closed.then(()=>{p()}).catch(z=>{d.stop(z)});const w=z=>{z&&d.push(()=>{throw z}),q(),_.drain().then(()=>{p()}).catch(F=>{p()})};d.iterClosed.then(()=>{q(),_==null||_.unsubscribe()}).catch(z=>{q(),_==null||_.unsubscribe()});try{this.publish(s,a,{reply:_.getSubject()})}catch(z){w(z)}let D=setTimeout(()=>{w()},o.maxWait);const q=()=>{D&&clearTimeout(D)}}else{const g=o;g.callback=m,d.iterClosed.then(()=>{v.cancel()}).catch(_=>{v.cancel(_)});const v=new GT(this.protocol.muxSubscriptions,s,g);this.protocol.request(v);try{this.publish(s,a,{reply:`${this.protocol.muxSubscriptions.baseInbox}${v.token}`,headers:o.headers})}catch(_){v.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:(v,_)=>{v?(m&&v.code!==ue.Timeout&&(v.stack+=`
|
|
268
|
-
|
|
269
|
-
${m.stack}`),g.unsubscribe(),p.reject(v)):(v=iE(_),v?(m&&(v.stack+=`
|
|
270
|
-
|
|
271
|
-
${m.stack}`),p.reject(v)):p.resolve(_))}});return g.requestSubject=s,this.protocol.publish(s,a,{reply:d,headers:o.headers}),p}else{const d=new cE(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 nO(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 iO(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 iO{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 q3(this.nc,s,a)}}class oO{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 lO{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 vE extends ZT{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=ri.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 v=g,_=this.sub.info;_.last=v,this.info.config=v.config,this.info.name=v.name}).catch(g=>{const v=new ge(`unable to recreate ordered consumer ${d.stream} at seq ${a}`,ue.RequestError,g);this.sub.callback(v,{})})}_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,q;const g=RT(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 z=((D=(w=this.info)==null?void 0:w.ordered_consumer_sequence)==null?void 0:D.stream_seq)||0;return this._resetOrderedConsumer(z+1),(q=this.monitor)==null||q.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 cO extends vE{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 v=this.js.nc.features.get(et.JS_PULL_MAX_BYTES);if(!v.ok)throw new Error(`max_bytes is only supported on servers ${v.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 v=this.info.api,_=`${v.prefix}.CONSUMER.MSG.NEXT.${a}.${d}`,w=this.sub.subject;v.nc.publish(_,v.jc.encode(p),{reply:w})}}}function uO(i,s){return i?dO(s):fO(s)}function fO(i){return(s,a)=>s?[s,null]:(s=hl(a),s?[s,null]:[null,vu(a,i)])}function dO(i){return(s,a)=>{if(s)return[s,null];const o=hl(a);return o!==null?[xE(o),null]:[null,vu(a,i)]}}function xE(i){if(i!==null)switch(i.code){case ue.JetStream404NoMessages:case ue.JetStream408RequestTimeout:return null;case ue.JetStream409:return jT(i)?i:null;default:return i}return null}function hO(i){i&&i.ack()}function mO(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 pO{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=mO(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]===au[0]&&s[1]===au[1]&&s[2]===au[2]&&s[3]===au[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 cE(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=Q3;s&&(a=E0().encode(`-NAK ${JSON.stringify({delay:Et(s)})}`)),this.doAck(a)}working(){this.doAck(au)}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=gl.concat(X3,K3,u),p=s?{reply:s}:void 0;this.msg.respond(d,p)}term(s=""){let a=Z3;(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 bO="1.30.3",yO="nats.ws";class gO{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=bO,this.lang=yO,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=gl.concat(...this.yields),m=s3(p);if(m!==""){const g=R3.exec(m);if(!g){a.debug&&console.error("!!!",Hd(p)),o.reject(new Error("unexpected response from server"));return}try{const v=JSON.parse(g[1]);T3(v,this.options),this.peeked=!0,this.connected=!0,this.signal.resolve(),o.resolve()}catch(v){o.reject(v);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 vl(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 vO(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,v=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}${v}`}function xO(i={}){return KT({defaultPort:443,urlParseFn:vO,factory:()=>new gO}),ny.connect(i)}const NO="ws://localhost:9222",SO="dev_api_secret",wO="lt.events";function NE(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 EO(){const{connected:i}=B.useContext(vh);return{connected:i}}function SE(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 _O=B.createContext({connected:!1,subscribe:()=>()=>{}}),AO=E0();function DO({children:i,url:s,token:a}){const o=B.useRef(null),u=B.useRef(null),[d,p]=B.useState(!1),m=B.useRef(null),g=B.useRef(new Map),v=B.useCallback((D,q)=>{const z=g.current;return z.has(D)||z.set(D,new Set),z.get(D).add(q),()=>{const F=z.get(D);F&&(F.delete(q),F.size===0&&z.delete(D))}},[]),_=B.useCallback((D,q)=>{for(const[z,F]of g.current)if(NE(D,z))for(const X of F)try{X(q)}catch{}},[]),w=B.useCallback(async()=>{try{if(o.current)return;const D=await xO({servers:s||NO,token:a||SO,reconnect:!0,maxReconnectAttempts:-1,reconnectTimeWait:2e3});o.current=D,p(!0);const q=D.subscribe("lt.>");u.current=q,(async()=>{for await(const z of q)try{const F=JSON.parse(AO.decode(z.data));_(z.subject,F)}catch{}})(),(async()=>{for await(const z of D.status())z.type==="disconnect"||z.type==="error"?p(!1):z.type==="reconnect"&&p(!0)})()}catch{p(!1),m.current=setTimeout(w,3e3)}},[_]);return B.useEffect(()=>(w(),()=>{m.current&&clearTimeout(m.current),u.current&&u.current.unsubscribe(),o.current&&(o.current.close().catch(()=>{}),o.current=null),p(!1)}),[w]),b.jsxDEV(_O.Provider,{value:{connected:d,subscribe:v},children:b.jsxDEV(vh.Provider,{value:{connected:d,subscribe:v},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useNats.tsx",lineNumber:200,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/hooks/useNats.tsx",lineNumber:199,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"},wE=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",EE=typeof ArrayBuffer=="function",_E=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,sy=({type:i,data:s},a,o)=>wE&&s instanceof Blob?a?o(s):bw(s,o):EE&&(s instanceof ArrayBuffer||_E(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 CO(i,s){if(wE&&i.data instanceof Blob)return i.data.arrayBuffer().then(yw).then(s);if(EE&&(i.data instanceof ArrayBuffer||_E(i.data)))return s(yw(i.data));sy(i,!1,a=>{m0||(m0=new TextEncoder),s(m0.encode(a))})}const gw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<gw.length;i++)uu[gw.charCodeAt(i)]=i;const TO=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 v=new ArrayBuffer(s),_=new Uint8Array(v);for(o=0;o<a;o+=4)d=uu[i.charCodeAt(o)],p=uu[i.charCodeAt(o+1)],m=uu[i.charCodeAt(o+2)],g=uu[i.charCodeAt(o+3)],_[u++]=d<<2|p>>4,_[u++]=(p&15)<<4|m>>2,_[u++]=(m&3)<<6|g&63;return v},OO=typeof ArrayBuffer=="function",ay=(i,s)=>{if(typeof i!="string")return{type:"message",data:AE(i,s)};const a=i.charAt(0);return a==="b"?{type:"message",data:RO(i.substring(1),s)}:Wd[a]?i.length>1?{type:Wd[a],data:i.substring(1)}:{type:Wd[a]}:B0},RO=(i,s)=>{if(OO){const a=TO(i);return AE(a,s)}else return{base64:!0,data:i}},AE=(i,s)=>{switch(s){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},DE="",jO=(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(DE))})})},MO=(i,s)=>{const a=i.split(DE),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 kO(){return new TransformStream({transform(i,s){CO(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 VO(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),v=new DataView(g.buffer,g.byteOffset,g.length),_=v.getUint32(0);if(_>Math.pow(2,21)-1){m.enqueue(B0);break}u=_*Math.pow(2,32)+v.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 CE=4;function Ft(i){if(i)return UO(i)}function UO(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")(),zO="arraybuffer";function TE(i,...s){return s.reduce((a,o)=>(i.hasOwnProperty(o)&&(a[o]=i[o]),a),{})}const BO=gs.setTimeout,qO=gs.clearTimeout;function Nh(i,s){s.useNativeTimers?(i.setTimeoutFn=BO.bind(gs),i.clearTimeoutFn=qO.bind(gs)):(i.setTimeoutFn=gs.setTimeout.bind(gs),i.clearTimeoutFn=gs.clearTimeout.bind(gs))}const LO=1.33;function HO(i){return typeof i=="string"?PO(i):Math.ceil((i.byteLength||i.size)*LO)}function PO(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 OE(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function $O(i){let s="";for(let a in i)i.hasOwnProperty(a)&&(s.length&&(s+="&"),s+=encodeURIComponent(a)+"="+encodeURIComponent(i[a]));return s}function IO(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 FO 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 FO(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=$O(s);return a.length?"?"+a:""}}class YO 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)};MO(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,jO(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]=OE()),!this.supportsBinary&&!a.sid&&(a.b64=1),this.createUri(s,a)}}let RE=!1;try{RE=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const GO=RE;function JO(){}class QO extends YO{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=TE(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=JO,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 XO=(function(){const i=jE({xdomain:!1});return i&&i.responseType!==null})();class ZO extends QO{constructor(s){super(s);const a=s&&s.forceBase64;this.supportsBinary=XO&&!a}request(s={}){return Object.assign(s,{xd:this.xd},this.opts),new xa(jE,this.uri(),s)}}function jE(i){const s=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!s||GO))return new XMLHttpRequest}catch{}if(!s)try{return new gs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ME=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class KO extends ry{get name(){return"websocket"}doOpen(){const s=this.uri(),a=this.opts.protocols,o=ME?{}:TE(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]=OE()),this.supportsBinary||(a.b64=1),this.createUri(s,a)}}const b0=gs.WebSocket||gs.MozWebSocket;class WO extends KO{createSocket(s,a,o){return ME?new b0(s,a,o):a?new b0(s,a):new b0(s)}doWrite(s,a){this.ws.send(a)}}class e5 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=VO(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=s.readable.pipeThrough(a).getReader(),u=kO();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 t5={websocket:WO,webtransport:e5,polling:ZO},n5=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s5=["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=n5.exec(i||""),d={},p=14;for(;p--;)d[s5[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=a5(d,d.path),d.queryKey=r5(d,d.query),d}function a5(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 r5(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 ai extends Ft{constructor(s,a){if(super(),this.binaryType=zO,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=IO(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=CE,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&&ai.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",ai.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+=HO(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(ai.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}}}ai.protocol=CE;class i5 extends ai{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;ai.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;ai.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 v(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",v)};a.once("open",u),a.once("error",p),a.once("close",m),this.once("close",g),this.once("upgrading",v),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 o5=class extends i5{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=>t5[u]).filter(u=>!!u)),super(s,o)}};function l5(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 c5=typeof ArrayBuffer=="function",u5=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,kE=Object.prototype.toString,f5=typeof Blob=="function"||typeof Blob<"u"&&kE.call(Blob)==="[object BlobConstructor]",d5=typeof File=="function"||typeof File<"u"&&kE.call(File)==="[object FileConstructor]";function iy(i){return c5&&(i instanceof ArrayBuffer||u5(i))||f5&&i instanceof Blob||d5&&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 h5(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 m5(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 Gd={exports:{}},y0,xw;function p5(){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]),q=(w[2]||"ms").toLowerCase();switch(q){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?v(_,w,o,"day"):w>=a?v(_,w,a,"hour"):w>=s?v(_,w,s,"minute"):w>=i?v(_,w,i,"second"):_+" ms"}function v(_,w,D,q){var z=w>=D*1.5;return Math.round(_/D)+" "+q+(z?"s":"")}return y0}var g0,Nw;function b5(){if(Nw)return g0;Nw=1;function i(s){o.debug=o,o.default=o,o.coerce=v,o.disable=m,o.enable=d,o.enabled=g,o.humanize=p5(),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 q=0;q<w.length;q++)D=(D<<5)-D+w.charCodeAt(q),D|=0;return o.colors[Math.abs(D)%o.colors.length]}o.selectColor=a;function o(w){let D,q=null,z,F;function X(...ee){if(!X.enabled)return;const te=X,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 X.namespace=w,X.useColors=o.useColors(),X.color=o.selectColor(w),X.extend=u,X.destroy=o.destroy,Object.defineProperty(X,"enabled",{enumerable:!0,configurable:!1,get:()=>q!==null?q:(z!==o.namespaces&&(z=o.namespaces,F=o.enabled(w)),F),set:ee=>{q=ee}}),typeof o.init=="function"&&o.init(X),X}function u(w,D){const q=o(this.namespace+(typeof D>"u"?":":D)+w);return q.log=this.log,q}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 q of D)q[0]==="-"?o.skips.push(q.slice(1)):o.names.push(q)}function p(w,D){let q=0,z=0,F=-1,X=0;for(;q<w.length;)if(z<D.length&&(D[z]===w[q]||D[z]==="*"))D[z]==="*"?(F=z,X=q,z++):(q++,z++);else if(F!==-1)z=F+1,X++,q=X;else return!1;for(;z<D.length&&D[z]==="*";)z++;return z===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 v(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 y5(){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 v=!1;return()=>{v||(v=!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 v;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&&(v=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(v[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function u(v){if(v[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+v[0]+(this.useColors?"%c ":" ")+"+"+i.exports.humanize(this.diff),!this.useColors)return;const _="color: "+this.color;v.splice(1,0,_,"color: inherit");let w=0,D=0;v[0].replace(/%[a-zA-Z%]/g,q=>{q!=="%%"&&(w++,q==="%c"&&(D=w))}),v.splice(D,0,_)}s.log=console.debug||console.log||(()=>{});function d(v){try{v?s.storage.setItem("debug",v):s.storage.removeItem("debug")}catch{}}function p(){let v;try{v=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch{}return!v&&typeof process<"u"&&"env"in process&&(v=a.DEBUG),v}function m(){try{return localStorage}catch{}}i.exports=b5()(s);const{formatters:g}=i.exports;g.j=function(v){try{return JSON.stringify(v)}catch(_){return"[UnexpectedJSONParseError]: "+_.message}}})(Gd,Gd.exports)),Gd.exports}var g5=y5();const v5=kC(g5),$0=v5("socket.io-parser"),x5=["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 N5{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=h5(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 S5(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(!w5(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"&&x5.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 S5{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=m5(this.reconPack,this.buffers);return this.finishedReconstruction(),a}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const w5=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 E5=Object.freeze(Object.defineProperty({__proto__:null,Decoder:oy,Encoder:N5,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function js(i,s,a){return i.on(s,a),function(){i.off(s,a)}}const _5=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class VE 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(_5.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 xl(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}xl.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};xl.prototype.reset=function(){this.attempts=0};xl.prototype.setMin=function(i){this.ms=i};xl.prototype.setMax=function(i){this.max=i};xl.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 xl({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||E5;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 o5(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 VE(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 ru={};function nh(i,s){typeof i=="object"&&(s=i,i=void 0),s=s||{};const a=l5(i,s.path||"/socket.io"),o=a.source,u=a.id,d=a.path,p=ru[u]&&d in ru[u].nsps,m=s.forceNew||s["force new connection"]||s.multiplex===!1||p;let g;return m?g=new I0(o,s):(ru[u]||(ru[u]=new I0(o,s)),g=ru[u]),a.query&&!s.query&&(s.query=a.queryKey),g.socket(a.path,s)}Object.assign(nh,{Manager:I0,Socket:VE,io:nh,connect:nh});const A5=B.createContext({connected:!1,subscribe:()=>()=>{}});function D5({children:i}){const s=B.useRef(null),[a,o]=B.useState(!1),u=B.useRef(new Map),d=B.useCallback((m,g)=>{const v=u.current;return v.has(m)||v.set(m,new Set),v.get(m).add(g),()=>{const _=v.get(m);_&&(_.delete(g),_.size===0&&v.delete(m))}},[]),p=B.useCallback((m,g)=>{for(const[v,_]of u.current)if(NE(m,v))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,v)=>{if(g.startsWith("lt."))try{const _=typeof v=="string"?JSON.parse(v):v;p(g,_)}catch{}}),()=>{m.removeAllListeners(),m.disconnect(),s.current=null,o(!1)}},[p]),b.jsxDEV(A5.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 C5({children:i}){const[s,a]=B.useState(null),[o,u]=B.useState({url:null,token:null});return B.useEffect(()=>{let d=!1;async function p(){var m;try{console.log("[lt-transport] detecting event transport...");const g=await fetch("/api/settings");if(!g.ok){console.warn("[lt-transport] settings fetch failed, falling back to socketio"),d||a("socketio");return}const v=await g.json(),_=(m=v==null?void 0:v.events)==null?void 0:m.transport;console.log("[lt-transport] server reports:",_),d||(_==="nats"&&u({url:v.events.natsWsUrl??null,token:v.events.natsToken??null}),a(_==="nats"?"nats":"socketio"))}catch(g){console.warn("[lt-transport] settings fetch error, falling back to socketio",g),d||a("socketio")}}return p(),()=>{d=!0}},[]),s==="nats"?b.jsxDEV(DO,{url:o.url,token:o.token,children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:60,columnNumber:12},this):s==="socketio"?b.jsxDEV(D5,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:64,columnNumber:12},this):b.jsxDEV(b.Fragment,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:68,columnNumber:10},this)}const UE=B.createContext(null),Ew="lt_sidebar_collapsed";function T5({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(UE.Provider,{value:{collapsed:s,toggle:o},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSidebar.tsx",lineNumber:40,columnNumber:5},this)}function zE(){const i=B.useContext(UE);if(!i)throw new Error("useSidebar must be used within SidebarProvider");return i}function Mj(i){const s=i?`?period=${i}`:"";return rr({queryKey:["escalationStats",i],queryFn:()=>vt(`/escalations/stats${s}`)})}function kj(){return rr({queryKey:["escalationTypes"],queryFn:()=>vt("/escalations/types")})}function O5(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),rr({queryKey:["escalations",i],queryFn:()=>vt(`/escalations?${s}`)})}function R5(i){const s=new URLSearchParams;return i.role&&s.set("role",i.role),i.type&&s.set("type",i.type),i.subtype&&s.set("subtype",i.subtype),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),rr({queryKey:["escalations","available",i],queryFn:()=>vt(`/escalations/available?${s}`)})}function Vj(i){return rr({queryKey:["escalations","by-workflow",i],queryFn:()=>vt(`/escalations/by-workflow/${i}`),enabled:!!i})}function Uj(i){return rr({queryKey:["escalations",i],queryFn:()=>vt(`/escalations/${i}`),enabled:!!i})}function zj(){const i=Vs();return Sa({mutationFn:({id:s,durationMinutes:a})=>vt(`/escalations/${s}/claim`,{method:"POST",body:JSON.stringify({durationMinutes:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function Bj(){const i=Vs();return Sa({mutationFn:s=>vt(`/escalations/${s}/release`,{method:"POST"}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function qj(){const i=Vs();return Sa({mutationFn:({id:s,resolverPayload:a})=>vt(`/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 Lj(){const i=Vs();return Sa({mutationFn:({id:s,targetRole:a})=>vt(`/escalations/${s}/escalate`,{method:"PATCH",body:JSON.stringify({targetRole:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function Hj(){const i=Vs();return Sa({mutationFn:({ids:s,priority:a})=>vt("/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 Pj(){const i=Vs();return Sa({mutationFn:({ids:s,durationMinutes:a})=>vt("/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 $j(){const i=Vs();return Sa({mutationFn:({ids:s,targetUserId:a,durationMinutes:o})=>vt("/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 Ij(){const i=Vs();return Sa({mutationFn:({ids:s,targetRole:a})=>vt("/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 Fj(){const i=Vs();return Sa({mutationFn:({ids:s,hint:a})=>vt("/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 j5(){const{user:i}=Ki(),s=i==null?void 0:i.userId,a=Vs(),o=B.useRef(null),u=B.useCallback(()=>{o.current||(o.current=setTimeout(()=>{o.current=null,a.invalidateQueries({queryKey:["escalations"]})},15e3))},[a]);SE(`${wO}.escalation.>`,u);const{data:d}=R5({limit:1}),{data:p}=O5({assigned_to:s,status:"pending",limit:200}),m=new Date,g=((p==null?void 0:p.escalations)??[]).filter(v=>v.assigned_until&&new Date(v.assigned_until)>m);return{available:(d==null?void 0:d.total)??0,mine:g.length}}function M5({className:i="",onClick:s}){const{connected:a}=EO();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(LC,{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 _w({count:i,active:s,color:a="bg-blue-500",textColor:o="text-blue-500"}){return b.jsxDEV(b.Fragment,{children:[b.jsxDEV("span",{className:`absolute -top-1 -right-1 w-2 h-2 rounded-full ${s?a:"bg-text-tertiary/40"}`},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:12,columnNumber:7},this),b.jsxDEV("span",{className:`absolute -top-2.5 -right-3 text-[8px] font-bold tabular-nums ${s?o:"text-text-tertiary"}`,children:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:13,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:11,columnNumber:5},this)}function k5({onToggleEventFeed:i,onToggleDocs:s}){const{user:a,logout:o}=Ki(),{available:u,mine:d}=j5(),[p,m]=B.useState(!1),g=B.useRef(null);return B.useEffect(()=>{if(!p)return;const v=_=>{g.current&&!g.current.contains(_.target)&&m(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[p]),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(cl,{to:"/","aria-label":"Home",children:b.jsxDEV(ly,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:42,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:41,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:40,columnNumber:7},this),b.jsxDEV("div",{className:"flex items-center gap-4",children:[b.jsxDEV(cl,{to:"/escalations/available",className:"relative text-text-tertiary hover:text-accent transition-colors","aria-label":"Available escalations",title:"Available escalations",children:[b.jsxDEV(HC,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:55,columnNumber:11},this),b.jsxDEV(_w,{count:u,active:u>0},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:56,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:49,columnNumber:9},this),b.jsxDEV(cl,{to:"/escalations/queue",className:"relative text-text-tertiary hover:text-accent transition-colors","aria-label":"My escalation queue",title:"My escalation queue",children:[b.jsxDEV(PC,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:64,columnNumber:11},this),b.jsxDEV(_w,{count:d,active:d>0,color:"bg-status-warning",textColor:"text-status-warning"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:65,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:58,columnNumber:9},this),b.jsxDEV("div",{className:"w-px h-5 bg-surface-border"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:69,columnNumber:9},this),b.jsxDEV(M5,{onClick:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:72,columnNumber:9},this),b.jsxDEV("button",{onClick:s,className:"text-text-tertiary hover:text-accent transition-colors","aria-label":"Documentation",title:"Documentation",children:b.jsxDEV(Zw,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:79,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:73,columnNumber:9},this),a&&b.jsxDEV("div",{className:"relative",ref:g,children:[b.jsxDEV("button",{onClick:()=>m(v=>!v),className:"btn-ghost text-xs flex items-center gap-1",children:[b.jsxDEV($C,{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:87,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:90,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:89,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:83,columnNumber:13},this),p&&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(cl,{to:"/credentials",onClick:()=>m(!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:95,columnNumber:17},this),b.jsxDEV("button",{onClick:()=>{m(!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:102,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:94,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:82,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:47,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:39,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 V5(){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 U5({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:V5(),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 z5(i){return i.kind==="group"}function B5({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}=zE();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-xs font-semibold uppercase tracking-wider text-accent/80",children:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:155,columnNumber:9},this),s.map(o=>z5(o)?b.jsxDEV(U5,{group:o,collapsed:a},o.label,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:161,columnNumber:11},this):b.jsxDEV(B5,{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 q5=[{to:"/admin/users",label:"Accounts",icon:IC},{to:"/admin/roles",label:"Roles & Permissions",icon:FC},{to:"/admin/maintenance",label:"DB Maintenance",icon:YC},{to:"/admin/controlplane",label:"Task Queues",icon:GC}];function L5(){return b.jsxDEV(Sh,{heading:"Admin",entries:q5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/AdminSidebar.tsx",lineNumber:17,columnNumber:10},this)}const H5=[{to:"/workflows/registry",label:"Workflow Registry",icon:JC},{to:"/workflows/start",label:"Invoke Workflow",icon:QC},{to:"/workflows/executions",label:"Durable Executions",icon:Kw}];function P5(){return b.jsxDEV(Sh,{heading:"Durable Workflows",entries:H5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EngineerSidebar.tsx",lineNumber:11,columnNumber:10},this)}const $5=[{to:"/mcp/queries",label:"MCP Tool Designer",icon:XC},{to:"/mcp/servers",label:"MCP Server Tools",icon:ZC},{to:"/mcp/workflows",label:"MCP Pipeline Tools",icon:Y0},{to:"/mcp/executions",label:"Pipeline Executions",icon:Kw}];function I5(){return b.jsxDEV(Sh,{heading:"MCP Workflows",entries:$5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/McpSidebar.tsx",lineNumber:12,columnNumber:10},this)}const F5=[{to:"/files",label:"Files",icon:KC},{to:"/knowledge",label:"Knowledge",icon:WC}];function Y5(){return b.jsxDEV(Sh,{heading:"Storage",entries:F5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/FilesSidebar.tsx",lineNumber:10,columnNumber:10},this)}function G5({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,Aw="cubic-bezier(0.4, 0, 0.2, 1)",Jd=40;function J5(i){if(!i)return"scale(0.92)";const s=window.innerWidth,a=window.innerHeight,o=s-Jd*2,u=a-Jd*2,d=i.width/o,p=i.height/u,m=i.left+i.width/2-(Jd+o/2),g=i.top+i.height/2-(Jd+u/2);return`translate(${m}px, ${g}px) scale(${d}, ${p})`}function BE({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,q;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=((q=a==null?void 0:a.current)==null?void 0:q.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=q=>{q.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 v=u==="entering"||u==="exiting",_=v?J5(p.current):"none",w=v?0:1;return Qw.createPortal(b.jsxDEV("div",{className:"fixed inset-0 z-50 overflow-auto p-10",style:{transformOrigin:"center center",transition:`transform ${v0}ms ${Aw}, opacity ${v0}ms ${Aw}`,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 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:"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 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:"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 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 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 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:"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 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:"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 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:"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 t4(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 n4(i){const s=[];let a=i.replace(/```(\w*)\n([\s\S]*?)```/g,(g,v,_)=>{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,v,_,w)=>t4(`${v}
|
|
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,v)=>`<h4 id="${Qd(v)}" class="text-xs font-semibold text-text-primary mt-4 mb-1">${v}</h4>`).replace(/^### (.+)$/gm,(g,v)=>`<h3 id="${Qd(v)}" class="text-sm font-semibold text-text-primary mt-5 mb-1.5">${v}</h3>`).replace(/^## (.+)$/gm,(g,v)=>`<h2 id="${Qd(v)}" class="text-base font-semibold text-text-primary mt-6 mb-2 pb-1 border-b border-surface-border">${v}</h2>`).replace(/^# (.+)$/gm,(g,v)=>`<h1 id="${Qd(v)}" class="text-lg font-bold text-text-primary mb-3">${v}</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 v=g.replace(/^> /gm,"").trim(),_=/⚠️|warning|caution/i.test(v),w=/note:|ℹ️|info/i.test(v);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">${v}</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,v)=>s[parseInt(v,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 v=g.trim();if(!v)return"";const _=[];let w=v,D;for(;(D=m.exec(w))!==null;){const q=D.index+D[0].length;_.push(w.slice(0,q)),w=w.slice(q).replace(/^<br\/>/,"").trim(),m.lastIndex=0}return w&&_.push(w),_.map(q=>{const z=q.trim();return z?/^\s*<(h[1-4]|pre|table|ul|ol|hr|div)/.test(z)?z:`<p class="${p}">${z}</p>`:""}).join("")}).join(""),a}const s4=/(\*\*|^#{1,4}\s|^- |^\d+\.\s|```|^\|.*\|$|\[.+\]\(.+\))/m;function a4(i){return s4.test(i)}function uy({content:i,className:s,onClick:a}){const o=B.useMemo(()=>n4(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 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/json-viewer-nodes.tsx",lineNumber:23,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/json-viewer-nodes.tsx",lineNumber:27,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/json-viewer-nodes.tsx",lineNumber:31,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/json-viewer-nodes.tsx",lineNumber:35,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/json-viewer-nodes.tsx",lineNumber:39,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/json-viewer-nodes.tsx",lineNumber:50,columnNumber:9},this),b.jsxDEV("div",{className:"pl-4 border-l border-surface-border ml-1",children:i.map((v,_)=>b.jsxDEV("div",{children:[b.jsxDEV(dh,{data:v,depth:s+1,generation:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:59,columnNumber:15},this),_<i.length-1&&b.jsxDEV("span",{className:"text-text-tertiary",children:","},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:60,columnNumber:39},this)]},_,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:58,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:56,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-tertiary",children:"]"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:64,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:49,columnNumber:7},this);if(typeof i=="object"){const v=Object.entries(i);return v.length===0?b.jsxDEV("span",{className:"text-text-tertiary",children:"{}"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:71,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/json-viewer-nodes.tsx",lineNumber:75,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/json-viewer-nodes.tsx",lineNumber:86,columnNumber:9},this),b.jsxDEV("div",{className:"pl-4 border-l border-surface-border ml-1",children:v.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/json-viewer-nodes.tsx",lineNumber:95,columnNumber:15},this),b.jsxDEV("span",{className:"text-text-tertiary",children:": "},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:96,columnNumber:15},this),b.jsxDEV(dh,{data:w,depth:s+1,generation:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:97,columnNumber:15},this),D<v.length-1&&b.jsxDEV("span",{className:"text-text-tertiary",children:","},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:98,columnNumber:42},this)]},_,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:94,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:92,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-tertiary",children:"}"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:102,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:85,columnNumber:7},this)}return b.jsxDEV("span",{children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:107,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/json-viewer-nodes.tsx",lineNumber:116,columnNumber:12},this);if(typeof i=="string")return i.length>40&&a4(i)?b.jsxDEV(uy,{content:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:121,columnNumber:14},this):b.jsxDEV("span",{className:"text-text-primary",children:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:123,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/json-viewer-nodes.tsx",lineNumber:127,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/json-viewer-nodes.tsx",lineNumber:131,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/json-viewer-nodes.tsx",lineNumber:136,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/json-viewer-nodes.tsx",lineNumber:138,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:137,columnNumber:13},this)]},o,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:135,columnNumber:11},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:133,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/json-viewer-nodes.tsx",lineNumber:148,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/json-viewer-nodes.tsx",lineNumber:155,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/json-viewer-nodes.tsx",lineNumber:160,columnNumber:19},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:159,columnNumber:17},this):b.jsxDEV(pu,{data:u,depth:s+1},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:163,columnNumber:17},this)]},o,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:154,columnNumber:13},this)})},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:150,columnNumber:7},this)}return b.jsxDEV("span",{children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:172,columnNumber:10},this)}function Dw({mode:i,setMode:s,isCollapsed:a,onToggleCollapse:o,onCopy:u,copied:d,onFullscreen:p,onClose:m,large:g}){const v=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(e4,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:35,columnNumber:26},this):b.jsxDEV(W5,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:35,columnNumber:60},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:34,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(Q5,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:39,columnNumber:28},this):b.jsxDEV(X5,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:39,columnNumber:60},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:38,columnNumber:7},this),b.jsxDEV("button",{onClick:u,className:_,title:"Copy to clipboard",children:d?b.jsxDEV(K5,{className:`${v} text-status-success`},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:42,columnNumber:19},this):b.jsxDEV(Z5,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:42,columnNumber:77},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:41,columnNumber:7},this),p&&b.jsxDEV("button",{onClick:p,className:_,title:"Fullscreen",children:b.jsxDEV(Ww,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:46,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:45,columnNumber:9},this),m&&b.jsxDEV("button",{onClick:m,className:_,title:"Close (Esc)",children:b.jsxDEV(eE,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:51,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:50,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:32,columnNumber:5},this)}function r4({data:i,label:s,variant:a,defaultCollapsed:o=!1,defaultMode:u}){const d=B.useRef(null),[p,m]=B.useState(u??"json"),[g,v]=B.useState(!1),[_,w]=B.useState(!1),[D,q]=B.useState(0),[z,F]=B.useState(1),X=D%2===0,ee=z%2===0,te=B.useCallback(()=>q(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),v(!0),setTimeout(()=>v(!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 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(G5,{children:s},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:123,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(Dw,{mode:p,setMode:m,isCollapsed:X,onToggleCollapse:te,onCopy:U,copied:g,onFullscreen:ne},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:126,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:125,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:134,columnNumber:30},this):b.jsxDEV(pu,{data:De},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:134,columnNumber:83},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:133,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:124,columnNumber:7},this),b.jsxDEV(BE,{open:_,onClose:()=>w(!1),sourceRef:d,children:[b.jsxDEV("div",{className:"sticky top-0 float-right z-10",children:b.jsxDEV(Dw,{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:140,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:139,columnNumber:9},this),b.jsxDEV("div",{className:"font-mono text-sm leading-relaxed",children:p==="json"?b.jsxDEV(dh,{data:De,generation:z},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:149,columnNumber:30},this):b.jsxDEV(pu,{data:De},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:149,columnNumber:85},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:148,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:138,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:122,columnNumber:5},this)}const i4=100,Cw=500;let o4=0;const qE={"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 Tw({event:i,forceExpanded:s=!1}){var D,q;const[a,o]=B.useState(s),u=qE[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]",v=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):"",(q=i.data)!=null&&q.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:`${v} 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(r4,{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 l4({open:i,onToggle:s}){const[a,o]=B.useState([]),[u,d]=B.useState(!1),p=B.useRef(null),m=B.useRef(new Map);return SE("lt.events.>",B.useCallback(g=>{const v=String(g.type||"unknown");if(v.startsWith("mesh."))return;const _=`${v}:${g.timestamp||""}:${g.escalationId||g.workflowId||g.taskId||""}`,w=Date.now(),D=m.current.get(_);if(!(D&&w-D<Cw)){if(m.current.set(_,w),m.current.size>200)for(const[q,z]of m.current)w-z>Cw*2&&m.current.delete(q);o(q=>[{id:++o4,type:v,timestamp:g.timestamp||new Date().toISOString(),data:g},...q].slice(0,i4))}},[])),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(eT,{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(tT,{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 ${qE[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(Ww,{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(nT,{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(Tw,{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(BE,{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(eE,{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(Tw,{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 c4(){return rr({queryKey:["docs"],queryFn:()=>vt("/docs"),staleTime:5*6e4})}function u4(i){return rr({queryKey:["docs",i],queryFn:()=>vt(`/docs/read?path=${encodeURIComponent(i)}`),enabled:!!i,staleTime:5*6e4})}function f4(){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 v=B.useCallback((z,F)=>{var ee;const X=p.current;if(X){const te=((ee=F==null?void 0:F.current)==null?void 0:ee.scrollTop)??0;s([...m.current,{...X,scrollTop:te}])}o([]),d({path:z,scrollTop:0})},[]),_=B.useCallback(z=>{var te;const F=m.current;if(F.length===0)return;const X=F[F.length-1],ee=p.current;if(ee){const we=((te=z==null?void 0:z.current)==null?void 0:te.scrollTop)??0;o([...g.current,{...ee,scrollTop:we}])}s(F.slice(0,-1)),d(X),requestAnimationFrame(()=>{z!=null&&z.current&&(z.current.scrollTop=X.scrollTop)})},[]),w=B.useCallback(z=>{var te;const F=g.current;if(F.length===0)return;const X=F[F.length-1],ee=p.current;if(ee){const we=((te=z==null?void 0:z.current)==null?void 0:te.scrollTop)??0;s([...m.current,{...ee,scrollTop:we}])}o(F.slice(0,-1)),d(X),requestAnimationFrame(()=>{z!=null&&z.current&&(z.current.scrollTop=X.scrollTop)})},[]),D=B.useCallback(z=>{var ee,te;const F=p.current;if(!F)return;const X=((ee=z==null?void 0:z.current)==null?void 0:ee.scrollTop)??0;s([...m.current,{...F,scrollTop:X}]),o([]),d({...F,scrollTop:((te=z==null?void 0:z.current)==null?void 0:te.scrollTop)??0})},[]),q=B.useCallback(()=>{s([]),o([]),d(null)},[]);return{current:u,backStack:i,forwardStack:a,navigate:v,goBack:_,goForward:w,pushScrollPosition:D,reset:q}}function d4(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 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({content:i,currentPath:s,onNavigate:a,onAnchorClick:o}){const u=d=>{var v;const p=d.target,m=p.closest("[data-anchor]");if(m){d.preventDefault(),o();const _=m.dataset.anchor,w=(v=m.closest(".docs-content"))==null?void 0:v.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}=d4(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/docs-drawer-tree.tsx",lineNumber:42,columnNumber:10},this)}function b4(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 y4({docs:i,selected:s,onSelect:a}){const{topLevel:o,dirs:u}=b4(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(sT,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:109,columnNumber:11},this),m.label]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:108,columnNumber:9},this),b.jsxDEV("div",{className:"pl-2 space-y-0.5",children:[[...m.subdirs.values()].map(v=>p(v)),m.children.map(v=>b.jsxDEV("button",{className:d(v.path),onClick:()=>a(v.path),children:v.title},v.path,!1,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:115,columnNumber:13},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:112,columnNumber:9},this)]},m.label,!0,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:107,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/docs-drawer-tree.tsx",lineNumber:127,columnNumber:9},this)),[...u.values()].map(m=>p(m))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:125,columnNumber:5},this)}function g4({open:i,onClose:s}){var oe,W,Q;const[a,o]=B.useState(!1),{data:u}=c4(),d=f4(),{data:p,isLoading:m}=u4(((oe=d.current)==null?void 0:oe.path)??null),g=B.useRef(null),[v,_]=B.useState(null);B.useEffect(()=>{v&&(p!=null&&p.content)&&g.current&&requestAnimationFrame(()=>{var le;const H=(le=g.current)==null?void 0:le.querySelector(`#${CSS.escape(v)}`);H==null||H.scrollIntoView({behavior:"smooth",block:"start"}),_(null)})},[v,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 q=B.useCallback((H,le)=>{le&&_(le),d.navigate(H,g)},[d]),z=B.useCallback(H=>{d.navigate(H,g)},[d]),F=B.useCallback(()=>{d.goBack(g)},[d]),X=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:113,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(aT,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:129,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:123,columnNumber:13},this),b.jsxDEV("button",{onClick:X,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:137,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:131,columnNumber:13},this),b.jsxDEV(Zw,{className:"w-4 h-4 text-accent ml-1",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:139,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:140,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:122,columnNumber:11},this),b.jsxDEV("button",{onClick:we,className:"p-1 text-text-tertiary hover:text-text-primary",children:b.jsxDEV(G0,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:143,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:142,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:121,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(y4,{docs:u.docs,selected:De,onSelect:z},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:152,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:154,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:150,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:167,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:168,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:169,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:166,columnNumber:15},this):p!=null&&p.content?b.jsxDEV(p4,{content:p.content,currentPath:De,onNavigate:q,onAnchorClick:ee},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:172,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:179,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:162,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:163,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:161,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:159,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:148,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:119,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:111,columnNumber:5},this)}function v4(i){if(i.includes("/escalations"))return["escalation","human-queue"]}const Ow=2e3;function x4(i){const a=i.filter(u=>!u.pending).slice(-8);return a.length===0?"":`[Prior conversation]
|
|
275
|
-
${a.map(u=>`${u.role==="user"?"User":"Assistant"}: ${u.content}`).join(`
|
|
276
|
-
`)}
|
|
277
|
-
[End prior conversation]
|
|
278
|
-
|
|
279
|
-
`}function N4(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.")}const LE=B.createContext(null);function S4({children:i}){const s=Zi(),[a,o]=B.useState(!1),[u,d]=B.useState([]),[p,m]=B.useState(null),[g,v]=B.useState({}),_=B.useRef(null),w={page:s.pathname.split("/").filter(Boolean).join("-")||"home",route:s.pathname,params:{},...g,suggestedTags:g.suggestedTags??v4(s.pathname)};B.useEffect(()=>()=>{_.current&&clearInterval(_.current)},[]);const D=B.useCallback(()=>o(ee=>!ee),[]),q=B.useCallback(ee=>{v(ee)},[]),z=B.useCallback(()=>{d([]),m(null)},[]),F=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>Ow&&(U.entities={...U.entities,yamlContent:U.entities.yamlContent.slice(0,Ow)+`
|
|
280
|
-
... (truncated)`});const oe=`${x4(u.concat(we))}${ee}`;try{const H=(await vt("/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 vt(`/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=N4(ve);let nt;try{nt=(await vt(`/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]),X=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 vt("/insight/mcp-query/describe",{method:"POST",body:JSON.stringify({prompt:De.content,summary:te.content})}),ne=await vt("/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 vt(`/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(LE.Provider,{value:{helpOpen:a,setHelpOpen:o,toggleHelp:D,messages:u,sendMessage:F,pageContext:w,setPageContext:q,activeWorkflowId:p,clearMessages:z,compileMessage:X},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useHelpAssistant.tsx",lineNumber:232,columnNumber:5},this)}function HE(){const i=B.useContext(LE);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function w4(){const{helpOpen:i,toggleHelp:s}=HE();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(G0,{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 PE=6048e5,E4=864e5,Rw=6e4,jw=525600,Mw=43200,kw=1440,Vw=Symbol.for("constructDateFrom");function ar(i,s){return typeof i=="function"?i(s):i&&typeof i=="object"&&Vw in i?i[Vw](s):i instanceof Date?new i.constructor(s):new Date(s)}function ts(i,s){return ar(s||i,i)}let _4={};function wu(){return _4}function xu(i,s){var m,g,v,_;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??((_=(v=a.locale)==null?void 0:v.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 $E(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 IE(i,...s){const a=ar.bind(null,i||s.find(o=>typeof o=="object"));return s.map(a)}function Uw(i,s){const a=ts(i,s==null?void 0:s.in);return a.setHours(0,0,0,0),a}function A4(i,s,a){const[o,u]=IE(a==null?void 0:a.in,i,s),d=Uw(o),p=Uw(u),m=+d-mh(d),g=+p-mh(p);return Math.round((m-g)/E4)}function D4(i,s){const a=$E(i,s),o=ar(i,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),hh(o)}function C4(i,s){const a=+ts(i)-+ts(s);return a<0?-1:a>0?1:a}function T4(i){return ar(i,Date.now())}function O4(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function R4(i){return!(!O4(i)&&typeof i!="number"||isNaN(+ts(i)))}function j4(i){return s=>{const o=(i?Math[i]:Math.trunc)(s);return o===0?0:o}}function M4(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 k4={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"}},V4=(i,s,a)=>{let o;const u=k4[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 U4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},z4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},B4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},q4={date:x0({formats:U4,defaultWidth:"full"}),time:x0({formats:z4,defaultWidth:"full"}),dateTime:x0({formats:B4,defaultWidth:"full"})},L4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},H4=(i,s,a,o)=>L4[i];function iu(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 P4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},$4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},I4={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"]},F4={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"]},Y4={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"}},G4={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"}},J4=(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"},Q4={ordinalNumber:J4,era:iu({values:P4,defaultWidth:"wide"}),quarter:iu({values:$4,defaultWidth:"wide",argumentCallback:i=>i-1}),month:iu({values:I4,defaultWidth:"wide"}),day:iu({values:F4,defaultWidth:"wide"}),dayPeriod:iu({values:Y4,defaultWidth:"wide",formattingValues:G4,defaultFormattingWidth:"wide"})};function ou(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)?Z4(m,w=>w.test(p)):X4(m,w=>w.test(p));let v;v=i.valueCallback?i.valueCallback(g):g,v=a.valueCallback?a.valueCallback(v):v;const _=s.slice(p.length);return{value:v,rest:_}}}function X4(i,s){for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&s(i[a]))return a}function Z4(i,s){for(let a=0;a<i.length;a++)if(s(i[a]))return a}function K4(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 W4=/^(\d+)(th|st|nd|rd)?/i,eR=/\d+/i,tR={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},nR={any:[/^b/i,/^(a|c)/i]},sR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},aR={any:[/1/i,/2/i,/3/i,/4/i]},rR={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},iR={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]},oR={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},lR={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]},cR={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},uR={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}},fR={ordinalNumber:K4({matchPattern:W4,parsePattern:eR,valueCallback:i=>parseInt(i,10)}),era:ou({matchPatterns:tR,defaultMatchWidth:"wide",parsePatterns:nR,defaultParseWidth:"any"}),quarter:ou({matchPatterns:sR,defaultMatchWidth:"wide",parsePatterns:aR,defaultParseWidth:"any",valueCallback:i=>i+1}),month:ou({matchPatterns:rR,defaultMatchWidth:"wide",parsePatterns:iR,defaultParseWidth:"any"}),day:ou({matchPatterns:oR,defaultMatchWidth:"wide",parsePatterns:lR,defaultParseWidth:"any"}),dayPeriod:ou({matchPatterns:cR,defaultMatchWidth:"any",parsePatterns:uR,defaultParseWidth:"any"})},FE={code:"en-US",formatDistance:V4,formatLong:q4,formatRelative:H4,localize:Q4,match:fR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dR(i,s){const a=ts(i,s==null?void 0:s.in);return A4(a,M4(a))+1}function hR(i,s){const a=ts(i,s==null?void 0:s.in),o=+hh(a)-+D4(a);return Math.round(o/PE)+1}function YE(i,s){var _,w,D,q;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??((q=(D=u.locale)==null?void 0:D.options)==null?void 0:q.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 v=xu(g,s);return+a>=+m?o+1:+a>=+v?o:o-1}function mR(i,s){var m,g,v,_;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??((_=(v=a.locale)==null?void 0:v.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 pR(i,s){const a=ts(i,s==null?void 0:s.in),o=+xu(a,s)-+mR(a,s);return Math.round(o/PE)+1}function ct(i,s){const a=i<0?"-":"",o=Math.abs(i).toString().padStart(s,"0");return a+o}const Kr={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"},zw={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 Kr.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=$E(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 Kr.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=pR(i,o);return s==="wo"?a.ordinalNumber(u,{unit:"week"}):ct(u,s.length)},I:function(i,s,a){const o=hR(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"}):Kr.d(i,s)},D:function(i,s,a){const o=dR(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 Kr.h(i,s)},H:function(i,s,a){return s==="Ho"?a.ordinalNumber(i.getHours(),{unit:"hour"}):Kr.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"}):Kr.m(i,s)},s:function(i,s,a){return s==="so"?a.ordinalNumber(i.getSeconds(),{unit:"second"}):Kr.s(i,s)},S:function(i,s){return Kr.S(i,s)},X:function(i,s,a){const o=i.getTimezoneOffset();if(o===0)return"Z";switch(s){case"X":return qw(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 qw(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"+Bw(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"+Bw(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 Bw(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 qw(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 Lw=(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"})}},GE=(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"})}},bR=(i,s)=>{const a=i.match(/(P+)(p+)?/)||[],o=a[1],u=a[2];if(!u)return Lw(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}}",Lw(o,s)).replace("{{time}}",GE(u,s))},yR={p:GE,P:bR},gR=/^D+$/,vR=/^Y+$/,xR=["D","DD","YY","YYYY"];function NR(i){return gR.test(i)}function SR(i){return vR.test(i)}function wR(i,s,a){const o=ER(i,s,a);if(console.warn(o),xR.includes(i))throw new RangeError(o)}function ER(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 _R=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,AR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,DR=/^'([^]*?)'?$/,CR=/''/g,TR=/[a-zA-Z]/;function JE(i,s,a){var _,w,D,q;const o=wu(),u=o.locale??FE,d=o.firstWeekContainsDate??((w=(_=o.locale)==null?void 0:_.options)==null?void 0:w.firstWeekContainsDate)??1,p=o.weekStartsOn??((q=(D=o.locale)==null?void 0:D.options)==null?void 0:q.weekStartsOn)??0,m=ts(i,a==null?void 0:a.in);if(!R4(m))throw new RangeError("Invalid time value");let g=s.match(AR).map(z=>{const F=z[0];if(F==="p"||F==="P"){const X=yR[F];return X(z,u.formatLong)}return z}).join("").match(_R).map(z=>{if(z==="''")return{isToken:!1,value:"'"};const F=z[0];if(F==="'")return{isToken:!1,value:OR(z)};if(zw[F])return{isToken:!0,value:z};if(F.match(TR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+F+"`");return{isToken:!1,value:z}});u.localize.preprocessor&&(g=u.localize.preprocessor(m,g));const v={firstWeekContainsDate:d,weekStartsOn:p,locale:u};return g.map(z=>{if(!z.isToken)return z.value;const F=z.value;(SR(F)||NR(F))&&wR(F,s,String(i));const X=zw[F[0]];return X(m,F,u.localize,v)}).join("")}function OR(i){const s=i.match(DR);return s?s[1].replace(CR,"'"):i}function RR(i,s,a){const o=wu(),u=(a==null?void 0:a.locale)??o.locale??FE,d=C4(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]=IE(a==null?void 0:a.in,...d>0?[s,i]:[i,s]),v=j4((a==null?void 0:a.roundingMethod)??"round"),_=g.getTime()-m.getTime(),w=_/Rw,D=mh(g)-mh(m),q=(_-D)/Rw,z=a==null?void 0:a.unit;let F;if(z?F=z:w<1?F="second":w<60?F="minute":w<kw?F="hour":q<Mw?F="day":q<jw?F="month":F="year",F==="second"){const X=v(_/1e3);return u.formatDistance("xSeconds",X,p)}else if(F==="minute"){const X=v(w);return u.formatDistance("xMinutes",X,p)}else if(F==="hour"){const X=v(w/60);return u.formatDistance("xHours",X,p)}else if(F==="day"){const X=v(q/kw);return u.formatDistance("xDays",X,p)}else if(F==="month"){const X=v(q/Mw);return X===12&&z!=="month"?u.formatDistance("xYears",1,p):u.formatDistance("xMonths",X,p)}else{const X=v(q/jw);return u.formatDistance("xYears",X,p)}}function jR(i,s){return RR(i,T4(i),s)}function MR(i){const s=new Date(i);return s.getTime()>Date.now()?"just now":jR(s,{addSuffix:!0})}function Yj(i){return i<=0?"Expired":fy(i)}function kR(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 Gj(i,s){const a=new Date(i).getTime(),o=s?new Date(s).getTime():Date.now();return fy(o-a)}function QE({options:i,children:s,className:a=""}){const[o,u]=B.useState(!1),[d,p]=B.useState(null),[m,g]=B.useState(null),v=B.useRef(null),_=B.useRef(void 0),w=B.useRef(void 0),D=220,q=B.useCallback(()=>{if(!v.current)return;const ee=v.current.getBoundingClientRect(),te=window.innerWidth-D-8,we=Math.max(8,Math.min(ee.left,te));g({top:ee.bottom+4,left:we})},[]),z=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),q(),u(!0)},[q]),X=B.useCallback(()=>{w.current=setTimeout(()=>u(!1),150)},[]);return B.useEffect(()=>()=>{clearTimeout(_.current),clearTimeout(w.current)},[]),b.jsxDEV("span",{ref:v,className:`inline-flex items-center cursor-default ${a}`,onMouseEnter:F,onMouseLeave:X,children:[s,o&&m&&Qw.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:X,children:i.map(ee=>b.jsxDEV("button",{onClick:te=>{te.stopPropagation(),z(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 VR(i,s){const a=new Date(i);switch(s){case"relative":return MR(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 UR(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 zR({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(()=>UR(i),[i]);return b.jsxDEV(QE,{options:u,children:b.jsxDEV("time",{dateTime:i,className:`text-xs text-text-tertiary ${a}`,children:VR(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 BR({ms:i,className:s=""}){const a=kR(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(QE,{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 qR=["sm","md","lg","full"],Hw={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"},Pw={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function LR({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/help-panel-messages.tsx",lineNumber:30,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:30,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/help-panel-messages.tsx",lineNumber:32,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:32,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/help-panel-messages.tsx",lineNumber:34,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:34,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/help-panel-messages.tsx",lineNumber:36,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:36,columnNumber:15},this)}}function HR({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/help-panel-messages.tsx",lineNumber:60,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/help-panel-messages.tsx",lineNumber:61,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/help-panel-messages.tsx",lineNumber:62,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/help-panel-messages.tsx",lineNumber:63,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/help-panel-messages.tsx",lineNumber:64,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:59,columnNumber:7},this),i.workflowId&&b.jsxDEV(cl,{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/help-panel-messages.tsx",lineNumber:71,columnNumber:11},this),"watch execution"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:67,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:58,columnNumber:5},this)}function PR({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(zR,{date:i.timestamp,format:"time",className:"!text-[9px] text-text-muted/50"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:85,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/help-panel-messages.tsx",lineNumber:88,columnNumber:11},this),b.jsxDEV(BR,{ms:i.durationMs,className:"!text-[9px] text-text-muted/50"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:89,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:87,columnNumber:9},this),i.workflowId&&b.jsxDEV(cl,{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/help-panel-messages.tsx",lineNumber:98,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:93,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/help-panel-messages.tsx",lineNumber:116,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:102,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:84,columnNumber:5},this)}function $R(){const{helpOpen:i,setHelpOpen:s,messages:a,sendMessage:o,pageContext:u,activeWorkflowId:d,clearMessages:p,compileMessage:m}=HE(),[g,v]=B.useState(""),[_,w]=B.useState("md"),[D,q]=B.useState(!0),z=B.useRef(null),F=B.useRef(null);if(B.useEffect(()=>{z.current&&(z.current.scrollTop=z.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 X=()=>{const U=g.trim();!U||d||(o(U),v(""),F.current&&(F.current.style.height="auto"))},ee=U=>{U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),X())},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?Hw.full:`right-6 ${Hw[_]}`} ${D?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:De,onMouseEnter:()=>q(!0),onMouseLeave:()=>q(!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:94,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:95,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:93,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:qR.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":Pw[U],title:Pw[U],children:b.jsxDEV(LR,{which:U},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:113,columnNumber:17},this)},U,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:100,columnNumber:15},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:98,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(iT,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:124,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:118,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(G0,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:133,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:127,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:97,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:90,columnNumber:7},this),b.jsxDEV("div",{ref:z,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:143,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(HR,{msg:U},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:160,columnNumber:17},this):U.role==="assistant"?b.jsxDEV(uy,{content:U.content},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:162,columnNumber:17},this):U.content},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:152,columnNumber:13},this),!U.pending&&b.jsxDEV("div",{className:"mt-0.5",children:b.jsxDEV(PR,{msg:U,compileMessage:m},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:169,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:168,columnNumber:15},this)]},U.id,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:148,columnNumber:11},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:139,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=>{v(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:180,columnNumber:9},this),b.jsxDEV("button",{onClick:X,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(oT,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:202,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:196,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:177,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:77,columnNumber:5},this)}function IR(){const{isSuperAdmin:i,hasRoleType:s,hasRole:a}=Ki(),{collapsed:o,toggle:u}=zE(),[d,p]=B.useState(!1),[m,g]=B.useState(()=>window.location.hash.startsWith("#docs")),v=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"))},[v.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(k5,{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(P5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:58,columnNumber:79},this),(i||s("admin")||a("engineer"))&&b.jsxDEV(I5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:59,columnNumber:79},this),(i||s("admin")||a("engineer"))&&b.jsxDEV(Y5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:60,columnNumber:79},this),(i||s("admin"))&&b.jsxDEV(L5,{},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(lT,{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(cT,{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(l4,{open:d,onToggle:()=>p(w=>!w)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:89,columnNumber:7},this),b.jsxDEV(g4,{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(w4,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:91,columnNumber:7},this),b.jsxDEV($R,{},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 FR(){const{isAuthenticated:i}=Ki(),s=Zi();return i?b.jsxDEV(T5,{children:b.jsxDEV(S4,{children:b.jsxDEV(IR,{},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(ei,{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 XE({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 YR(){return vt("/auth/oauth/providers")}async function GR(i,s){const a=s?`?label=${encodeURIComponent(s)}`:"";return vt(`/auth/oauth/connections/${i}${a}`,{method:"DELETE"})}function Jj(){return rr({queryKey:["oauth-connections"],queryFn:()=>vt("/auth/oauth/connections")})}function Qj(){const i=Vs();return Sa({mutationFn:({provider:s,label:a})=>GR(s,a),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function JR(){var ne;const{login:i,isAuthenticated:s}=Ki(),a=Xw(),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[v,_]=B.useState(""),[w,D]=B.useState(""),[q,z]=B.useState(p||""),[F,X]=B.useState(!1),[ee,te]=B.useState(!!d),[we,De]=B.useState([]);if(B.useEffect(()=>{d||YR().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(ei,{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(),z(""),!v.trim()||!w){z("Username and password are required");return}X(!0);try{const H=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:v.trim(),password:w})}),le=await H.json();if(!H.ok){z(le.error||"Login failed");return}te(!0),i(le.token,{username:v.trim(),password:w},{displayName:(W=le.user)==null?void 0:W.display_name,username:(Q=le.user)==null?void 0:Q.external_id})}catch{z("Unable to connect to server")}finally{X(!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:v,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),q&&b.jsxDEV("p",{className:"text-sm text-status-error",children:q},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(XE,{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 $w(){const{isAuthenticated:i}=Ki(),s=Xw(),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"),[v,_]=B.useState(""),[w,D]=B.useState(!1),q=d.trim().startsWith("sk-ant-oat"),z=d.trim().startsWith("sk-ant-api"),F=X=>{X.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(XE,{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:X=>p(X.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),q&&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),z&&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:X=>g(X.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),v&&b.jsxDEV("p",{className:"text-sm text-status-error",children:v},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(ei,{to:a,replace:!0},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:26,columnNumber:10},this)}const Iw=B.lazy(()=>tt(()=>import("./ProcessesListPage-DqpRDqjk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(i=>({default:i.ProcessesListPage}))),QR=B.lazy(()=>tt(()=>import("./ProcessDetailPage-2miaYd8G.js"),__vite__mapDeps([16,2,1,4,17,18,19,15,14,9,6,20,21,22])).then(i=>({default:i.ProcessDetailPage}))),XR=B.lazy(()=>tt(()=>import("./McpOverview-CeYnCzBN.js"),__vite__mapDeps([23,2,24,25,26,27,12,28,14,6])).then(i=>({default:i.McpOverview}))),ZR=B.lazy(()=>tt(()=>import("./McpRunsPage-Dzgq7HGt.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}))),KR=B.lazy(()=>tt(()=>import("./McpRunDetailPage-CZtodW_Z.js"),__vite__mapDeps([32,2,25,17,19,12,33,6,34,35,11,36,13,14])).then(i=>({default:i.McpRunDetailPage}))),WR=B.lazy(()=>tt(()=>import("./McpQueryPage-CfUcdzaj.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}))),ej=B.lazy(()=>tt(()=>import("./McpQueryDetailPage-t3qW3QNa.js"),__vite__mapDeps([39,12,19,2,38,40,14,6,26,4,41,34,25,3,1,42,43,44,33,45,36])).then(i=>({default:i.McpQueryDetailPage}))),tj=B.lazy(()=>tt(()=>import("./EscalationsOverview-DVEFVjs7.js"),__vite__mapDeps([46,2,4,12,28,6,14])).then(i=>({default:i.EscalationsOverview}))),nj=B.lazy(()=>tt(()=>import("./AvailableEscalationsPage-6vexlrk3.js"),__vite__mapDeps([47,2,4,48,5,6,7,8,10,12,49,50,17,51,22,52,11,53,20,14,15,9,54,31,13])).then(i=>({default:i.AvailableEscalationsPage}))),sj=B.lazy(()=>tt(()=>import("./OperatorDashboard-Ceh7OQtZ.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}))),aj=B.lazy(()=>tt(()=>import("./index-BYwD3kHN.js"),__vite__mapDeps([56,2,48,12,54,3,17,4,21,22,50,49,19,20,14,33,6,34])).then(i=>({default:i.EscalationDetailPage}))),rj=B.lazy(()=>tt(()=>import("./WorkflowsOverview-DvShiYJV.js"),__vite__mapDeps([57,2,3,4,12,28,6,14])).then(i=>({default:i.WorkflowsOverview}))),ij=B.lazy(()=>tt(()=>import("./index-t5frSddy.js"),__vite__mapDeps([58,2,3,12,14,43,44,6,7,8,59,45,19])).then(i=>({default:i.StartWorkflowPage}))),oj=B.lazy(()=>tt(()=>import("./index-t5frSddy.js"),__vite__mapDeps([58,2,3,12,14,43,44,6,7,8,59,45,19])).then(i=>({default:i.DurableInvokePage}))),lj=B.lazy(()=>tt(()=>import("./WorkflowsDashboard-DB1SncBi.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"})}))),cj=B.lazy(()=>tt(()=>import("./WorkflowsDashboard-DB1SncBi.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"})}))),uj=B.lazy(()=>tt(()=>import("./YamlWorkflowsPage-DCBoMeGI.js"),__vite__mapDeps([61,2,26,40,5,6,62,12,11,8,42,43,44,14,59,45,19])).then(i=>({default:i.YamlWorkflowsPage}))),fj=B.lazy(()=>tt(()=>import("./TasksListPage-D7CdkAeg.js"),__vite__mapDeps([63,1,2,3,5,6,7,8,19,53,45,10,11,12,15,14])).then(i=>({default:i.TasksListPage}))),dj=B.lazy(()=>tt(()=>import("./TaskDetailPage-DooDNJGT.js"),__vite__mapDeps([64,1,2,19,53,12,6,14])).then(i=>({default:i.TaskDetailPage}))),Fw=B.lazy(()=>tt(()=>import("./WorkflowExecutionPage-CcLVrs9b.js"),__vite__mapDeps([65,2,3,4,35,11,36,19,6,1,12,34,13,14])).then(i=>({default:i.WorkflowExecutionPage}))),hj=B.lazy(()=>tt(()=>import("./AdminDashboard-NLryl1_B.js"),__vite__mapDeps([66,1,2,4,24,18,6,14])).then(i=>({default:i.AdminDashboard}))),mj=B.lazy(()=>tt(()=>import("./index-C8-UaN4N.js"),__vite__mapDeps([67,2,3,7,8,11,31,5,6,12,68,14,15])).then(i=>({default:i.WorkersPage}))),pj=B.lazy(()=>tt(()=>import("./index-CAj5LT9H.js"),__vite__mapDeps([69,2,3,7,8,70,51,6,11,31,5,12,20,14,68,15,71,48,43,44])).then(i=>({default:i.WorkflowConfigsPage}))),Yw=B.lazy(()=>tt(()=>import("./index-CAj5LT9H.js"),__vite__mapDeps([69,2,3,7,8,70,51,6,11,31,5,12,20,14,68,15,71,48,43,44])).then(i=>({default:i.WorkflowConfigDetailPage}))),bj=B.lazy(()=>tt(()=>import("./index-CjxHCVxl.js"),__vite__mapDeps([72,2,24,8,70,51,6,12,11,10,5,62,42,43,44,14,31,19])).then(i=>({default:i.McpServersPage}))),Gw=B.lazy(()=>tt(()=>import("./index-VnYkWW8r.js"),__vite__mapDeps([73,2,24,71,12,41,14,6])).then(i=>({default:i.McpServerDetailPage}))),yj=B.lazy(()=>tt(()=>import("./index-DZHNte4o.js"),__vite__mapDeps([74,2,22,5,6,7,8,10,11,9,70,51,31,12,20,14,44,48,45])).then(i=>({default:i.UsersPage}))),gj=B.lazy(()=>tt(()=>import("./RolesPage-CYHRo21-.js"),__vite__mapDeps([75,2,48,7,8,70,51,6,12,20,14,31])).then(i=>({default:i.RolesPage}))),vj=B.lazy(()=>tt(()=>import("./index-XGOmZ117.js"),__vite__mapDeps([76,2,12,51,6,49,14])).then(i=>({default:i.MaintenancePage}))),xj=B.lazy(()=>tt(()=>import("./index-Cr0Rqsj7.js"),__vite__mapDeps([77,2,18,11,5,6,31,14,51,7,8,34,68])).then(i=>({default:i.ControlPlanePage}))),Nj=B.lazy(()=>tt(()=>import("./CredentialsPage-B361BOfU.js"),__vite__mapDeps([78,2,12,45,70,51,6,14])).then(i=>({default:i.CredentialsPage}))),Sj=B.lazy(()=>tt(()=>import("./index-BIeYV5QK.js"),__vite__mapDeps([79,2,12,11,13,14,8,45,6])).then(i=>({default:i.FilesPage}))),wj=B.lazy(()=>tt(()=>import("./index-ZjOUzWhc.js"),__vite__mapDeps([80,2,12,11,13,14,10,8,45,41,6])).then(i=>({default:i.KnowledgePage})));function Ej(){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:135,columnNumber:7},this),b.jsxDEV("div",{className:"h-40 bg-surface-sunken rounded"},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:136,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/App.tsx",lineNumber:134,columnNumber:5},this)}function Ge({children:i}){return b.jsxDEV(B.Suspense,{fallback:b.jsxDEV(Ej,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:143,columnNumber:25},this),children:b.jsxDEV("div",{className:"animate-page-enter",children:i},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:144,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:143,columnNumber:5},this)}const ZE=new VC({defaultOptions:{queries:{staleTime:1e4,retry:(i,s)=>s instanceof Error&&s.message==="Session expired"?!1:i<1}}});window.addEventListener("auth:unauthorized",()=>{ZE.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 _j=BC([{path:"/login",element:b.jsxDEV(JR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:180,columnNumber:30},void 0)},{path:"/connect/anthropic",element:b.jsxDEV($w,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:181,columnNumber:42},void 0)},{path:"/connect/:provider",element:b.jsxDEV($w,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:182,columnNumber:42},void 0)},{path:"/",element:b.jsxDEV(FR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:185,columnNumber:14},void 0),children:[{index:!0,element:b.jsxDEV(Ge,{children:b.jsxDEV(Iw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:188,columnNumber:37},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:188,columnNumber:31},void 0)},{path:"processes/all",element:b.jsxDEV(Ge,{children:b.jsxDEV(Iw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:191,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:191,columnNumber:41},void 0)},{path:"processes/detail/:originId",element:b.jsxDEV(Ge,{children:b.jsxDEV(QR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:192,columnNumber:60},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:192,columnNumber:54},void 0)},{path:"credentials",element:b.jsxDEV(Ge,{children:b.jsxDEV(Nj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:195,columnNumber:45},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:195,columnNumber:39},void 0)},{path:"connections",element:b.jsxDEV(ei,{to:"/credentials",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:196,columnNumber:39},void 0)},{path:"escalations",element:b.jsxDEV(Ge,{children:b.jsxDEV(tj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:199,columnNumber:45},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:199,columnNumber:39},void 0)},{path:"escalations/available",element:b.jsxDEV(Ge,{children:b.jsxDEV(nj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:200,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:200,columnNumber:49},void 0)},{path:"escalations/queue",element:b.jsxDEV(Ge,{children:b.jsxDEV(sj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:201,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:201,columnNumber:45},void 0)},{path:"escalations/detail/:id",element:b.jsxDEV(Ge,{children:b.jsxDEV(aj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:202,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:202,columnNumber:50},void 0)},{element:b.jsxDEV(N0,{roleTypes:["admin","superadmin"],roleNames:["engineer"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:206,columnNumber:18},void 0),children:[{path:"workflows",element:b.jsxDEV(Ge,{children:b.jsxDEV(rj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:208,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:208,columnNumber:41},void 0)},{path:"workflows/executions",element:b.jsxDEV(Ge,{children:b.jsxDEV(cj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:209,columnNumber:58},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:209,columnNumber:52},void 0)},{path:"workflows/durable/executions",element:b.jsxDEV(Ge,{children:b.jsxDEV(lj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:210,columnNumber:66},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:210,columnNumber:60},void 0)},{path:"workflows/durable/executions/:workflowId",element:b.jsxDEV(Ge,{children:b.jsxDEV(Fw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:211,columnNumber:78},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:211,columnNumber:72},void 0)},{path:"workflows/tasks",element:b.jsxDEV(Ge,{children:b.jsxDEV(fj,{},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/tasks/detail/:id",element:b.jsxDEV(Ge,{children:b.jsxDEV(dj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:213,columnNumber:64},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:213,columnNumber:58},void 0)},{path:"workflows/executions/:workflowId",element:b.jsxDEV(Ge,{children:b.jsxDEV(Fw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:214,columnNumber:70},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:214,columnNumber:64},void 0)},{path:"workflows/start",element:b.jsxDEV(Ge,{children:b.jsxDEV(ij,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:215,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:215,columnNumber:47},void 0)},{path:"workflows/durable/invoke",element:b.jsxDEV(Ge,{children:b.jsxDEV(oj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:216,columnNumber:62},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:216,columnNumber:56},void 0)},{path:"workflows/cron",element:b.jsxDEV(ei,{to:"/workflows/start?mode=schedule",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:217,columnNumber:46},void 0)},{path:"workflows/workers",element:b.jsxDEV(Ge,{children:b.jsxDEV(mj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:218,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:218,columnNumber:49},void 0)},{path:"workflows/registry",element:b.jsxDEV(Ge,{children:b.jsxDEV(pj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:219,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:219,columnNumber:50},void 0)},{path:"workflows/registry/new",element:b.jsxDEV(Ge,{children:b.jsxDEV(Yw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:220,columnNumber:60},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:220,columnNumber:54},void 0)},{path:"workflows/registry/:workflowType",element:b.jsxDEV(Ge,{children:b.jsxDEV(Yw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:221,columnNumber:70},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:221,columnNumber:64},void 0)}]},{element:b.jsxDEV(N0,{roleTypes:["admin","superadmin"],roleNames:["engineer"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:227,columnNumber:18},void 0),children:[{path:"mcp",element:b.jsxDEV(Ge,{children:b.jsxDEV(XR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:229,columnNumber:41},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:229,columnNumber:35},void 0)},{path:"mcp/queries",element:b.jsxDEV(Ge,{children:b.jsxDEV(WR,{},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/queries/:workflowId",element:b.jsxDEV(Ge,{children:b.jsxDEV(ej,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:231,columnNumber:61},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:231,columnNumber:55},void 0)},{path:"mcp/tools",element:b.jsxDEV(ei,{to:"/mcp/servers",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:232,columnNumber:41},void 0)},{path:"mcp/servers",element:b.jsxDEV(Ge,{children:b.jsxDEV(bj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:233,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:233,columnNumber:43},void 0)},{path:"mcp/servers/new",element:b.jsxDEV(Ge,{children:b.jsxDEV(Gw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:234,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:234,columnNumber:47},void 0)},{path:"mcp/servers/:serverId",element:b.jsxDEV(Ge,{children:b.jsxDEV(Gw,{},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:"mcp/workflows",element:b.jsxDEV(Ge,{children:b.jsxDEV(uj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:236,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:236,columnNumber:45},void 0)},{path:"mcp/executions",element:b.jsxDEV(Ge,{children:b.jsxDEV(ZR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:237,columnNumber:52},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:237,columnNumber:46},void 0)},{path:"mcp/executions/:jobId",element:b.jsxDEV(Ge,{children:b.jsxDEV(KR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:238,columnNumber:59},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:238,columnNumber:53},void 0)},{path:"files",element:b.jsxDEV(Ge,{children:b.jsxDEV(Sj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:241,columnNumber:43},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:241,columnNumber:37},void 0)},{path:"knowledge",element:b.jsxDEV(Ge,{children:b.jsxDEV(wj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:244,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:244,columnNumber:41},void 0)}]},{element:b.jsxDEV(N0,{roleTypes:["admin","superadmin"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:250,columnNumber:18},void 0),children:[{path:"admin",element:b.jsxDEV(Ge,{children:b.jsxDEV(hj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:252,columnNumber:43},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:252,columnNumber:37},void 0)},{path:"admin/users",element:b.jsxDEV(Ge,{children:b.jsxDEV(yj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:253,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:253,columnNumber:43},void 0)},{path:"admin/bots",element:b.jsxDEV(ei,{to:"/admin/users?tab=service-accounts",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:254,columnNumber:42},void 0)},{path:"admin/escalation-chains",element:b.jsxDEV(ei,{to:"/admin/roles",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:255,columnNumber:55},void 0)},{path:"admin/roles",element:b.jsxDEV(Ge,{children:b.jsxDEV(gj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:256,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:256,columnNumber:43},void 0)},{path:"admin/maintenance",element:b.jsxDEV(Ge,{children:b.jsxDEV(vj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:257,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:257,columnNumber:49},void 0)},{path:"admin/controlplane",element:b.jsxDEV(Ge,{children:b.jsxDEV(xj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:258,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:258,columnNumber:50},void 0)}]}]}]);function Aj(){return b.jsxDEV(UC,{client:ZE,children:b.jsxDEV(C5,{children:b.jsxDEV(xT,{children:b.jsxDEV(qC,{router:_j},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:270,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:269,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:268,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:267,columnNumber:5},this)}bT.createRoot(document.getElementById("root")).render(b.jsxDEV(B.StrictMode,{children:b.jsxDEV(Aj,{},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{Qj as A,Rj as B,cy as C,BR as D,BE as F,r4 as J,wO as N,XE as O,G5 as S,Gj as a,vt as b,zR as c,Vj as d,zj as e,kR as f,qj as g,Mj as h,Ki as i,b as j,Hj as k,Pj as l,$j as m,Ij as n,Fj as o,kj as p,O5 as q,Bj as r,Uj as s,Lj as t,SE as u,JE as v,QE as w,Yj as x,fy as y,Jj as z};
|
|
281
|
-
//# sourceMappingURL=index-puKKZ5l8.js.map
|