@hotmeshio/long-tail 0.3.0 → 0.3.2
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/topics.d.ts +22 -0
- package/build/api/topics.js +104 -0
- package/build/index.d.ts +3 -1
- package/build/index.js +7 -2
- package/build/lib/db/schemas/001_schema.sql +3 -3
- package/build/lib/db/schemas/006_agent_sub_unique.sql +1 -0
- package/build/lib/db/schemas/007_topic_catalog.sql +27 -0
- package/build/routes/index.js +2 -0
- package/build/routes/topics.d.ts +2 -0
- package/build/routes/topics.js +90 -0
- package/build/services/topics/index.d.ts +77 -0
- package/build/services/topics/index.js +116 -0
- package/build/services/topics/sql.d.ts +10 -0
- package/build/services/topics/sql.js +80 -0
- package/build/services/topics/system-topics.d.ts +11 -0
- package/build/services/topics/system-topics.js +270 -0
- package/build/start/workers.js +5 -0
- package/build/system/mcp-servers/events.js +73 -1
- package/build/system/seed/tool-manifests-events.d.ts +75 -0
- package/build/system/seed/tool-manifests-events.js +27 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/index.d.ts +2 -2
- package/build/types/startup.d.ts +27 -0
- package/dashboard/dist/assets/AdminDashboard-CbeSejVX.js +2 -0
- package/dashboard/dist/assets/{AdminDashboard-Bb6zouF5.js.map → AdminDashboard-CbeSejVX.js.map} +1 -1
- package/dashboard/dist/assets/AgentConfigPage-CFJNOrlg.js +13 -0
- package/dashboard/dist/assets/AgentConfigPage-CFJNOrlg.js.map +1 -0
- package/dashboard/dist/assets/AgentDetailPage-Dbx2t-Uk.js +4 -0
- package/dashboard/dist/assets/{AgentDetailPage-WwA573u9.js.map → AgentDetailPage-Dbx2t-Uk.js.map} +1 -1
- package/dashboard/dist/assets/AgentsPage-Bz61Nl-x.js +2 -0
- package/dashboard/dist/assets/{AgentsPage-BZkZ_hXN.js.map → AgentsPage-Bz61Nl-x.js.map} +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-DdrzePy4.js +2 -0
- package/dashboard/dist/assets/{AvailableEscalationsPage-C-Df3ZsZ.js.map → AvailableEscalationsPage-DdrzePy4.js.map} +1 -1
- package/dashboard/dist/assets/BotPicker-kKBifD1w.js +2 -0
- package/dashboard/dist/assets/{BotPicker-CwfVVWxh.js.map → BotPicker-kKBifD1w.js.map} +1 -1
- package/dashboard/dist/assets/CapabilitiesPage-Ch5qY0I7.js +2 -0
- package/dashboard/dist/assets/{CapabilitiesPage-DJEQ_5dV.js.map → CapabilitiesPage-Ch5qY0I7.js.map} +1 -1
- package/dashboard/dist/assets/CollapsibleSection-kYTBL7dT.js +2 -0
- package/dashboard/dist/assets/{CollapsibleSection-DaFQGU6S.js.map → CollapsibleSection-kYTBL7dT.js.map} +1 -1
- package/dashboard/dist/assets/ConfirmDeleteModal-CcaAapMl.js +2 -0
- package/dashboard/dist/assets/{ConfirmDeleteModal-dOxidrSR.js.map → ConfirmDeleteModal-CcaAapMl.js.map} +1 -1
- package/dashboard/dist/assets/CopyableId-B4CL12pv.js +2 -0
- package/dashboard/dist/assets/{CopyableId-DmLF-RqZ.js.map → CopyableId-B4CL12pv.js.map} +1 -1
- package/dashboard/dist/assets/CredentialsPage-D1VAlwid.js +2 -0
- package/dashboard/dist/assets/{CredentialsPage-D-tkqdhu.js.map → CredentialsPage-D1VAlwid.js.map} +1 -1
- package/dashboard/dist/assets/CronLabel-DRmO5rH0.js +2 -0
- package/dashboard/dist/assets/{CronLabel-C6iCjsXd.js.map → CronLabel-DRmO5rH0.js.map} +1 -1
- package/dashboard/dist/assets/CustomDurationPicker-C06QDDir.js +2 -0
- package/dashboard/dist/assets/{CustomDurationPicker--wCtBkmT.js.map → CustomDurationPicker-C06QDDir.js.map} +1 -1
- package/dashboard/dist/assets/DataTable-J5R6mepB.js +2 -0
- package/dashboard/dist/assets/{DataTable-D9yuBv0w.js.map → DataTable-J5R6mepB.js.map} +1 -1
- package/dashboard/dist/assets/DropZone-DwNj3GiG.js +2 -0
- package/dashboard/dist/assets/{DropZone-2mGyDo1P.js.map → DropZone-DwNj3GiG.js.map} +1 -1
- package/dashboard/dist/assets/ElapsedCell-ChyMzl9n.js +2 -0
- package/dashboard/dist/assets/{ElapsedCell-DKoH0bqR.js.map → ElapsedCell-ChyMzl9n.js.map} +1 -1
- package/dashboard/dist/assets/EmptyState-BXGvOADa.js +2 -0
- package/dashboard/dist/assets/{EmptyState-BcsfPq9T.js.map → EmptyState-BXGvOADa.js.map} +1 -1
- package/dashboard/dist/assets/EscalationsOverview-DM6zmE4g.js +2 -0
- package/dashboard/dist/assets/{EscalationsOverview-C6A4Q9Ne.js.map → EscalationsOverview-DM6zmE4g.js.map} +1 -1
- package/dashboard/dist/assets/EventTable-CvJ98E8s.js +2 -0
- package/dashboard/dist/assets/{EventTable-DWxH0vMp.js.map → EventTable-CvJ98E8s.js.map} +1 -1
- package/dashboard/dist/assets/EventTopicPill-CB_rIGlL.js +2 -0
- package/dashboard/dist/assets/{EventTopicPill-BUxxvpNg.js.map → EventTopicPill-CB_rIGlL.js.map} +1 -1
- package/dashboard/dist/assets/FilterBar-Bdssa-Xn.js +2 -0
- package/dashboard/dist/assets/{FilterBar-Ck4K4rzu.js.map → FilterBar-Bdssa-Xn.js.map} +1 -1
- package/dashboard/dist/assets/HomePage-BuZkdXZt.js +2 -0
- package/dashboard/dist/assets/{HomePage-Tlu1j8fK.js.map → HomePage-BuZkdXZt.js.map} +1 -1
- package/dashboard/dist/assets/ListToolbar-jy8NL6ll.js +2 -0
- package/dashboard/dist/assets/{ListToolbar-DuON-br0.js.map → ListToolbar-jy8NL6ll.js.map} +1 -1
- package/dashboard/dist/assets/McpOverview-xkaKuHbX.js +2 -0
- package/dashboard/dist/assets/{McpOverview-byott48x.js.map → McpOverview-xkaKuHbX.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryDetailPage-D5ICn6cR.js +5 -0
- package/dashboard/dist/assets/{McpQueryDetailPage-ieZPpcPn.js.map → McpQueryDetailPage-D5ICn6cR.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryPage-C46fzfm5.js +2 -0
- package/dashboard/dist/assets/{McpQueryPage-BOO0ACYO.js.map → McpQueryPage-C46fzfm5.js.map} +1 -1
- package/dashboard/dist/assets/McpRunDetailPage-Znsl4Yc-.js +2 -0
- package/dashboard/dist/assets/{McpRunDetailPage-Di8s7-u9.js.map → McpRunDetailPage-Znsl4Yc-.js.map} +1 -1
- package/dashboard/dist/assets/McpRunsPage-DT-armx5.js +2 -0
- package/dashboard/dist/assets/{McpRunsPage-DdUVqUFi.js.map → McpRunsPage-DT-armx5.js.map} +1 -1
- package/dashboard/dist/assets/Modal-C6k6_5KB.js +2 -0
- package/dashboard/dist/assets/{Modal-DEODGeqx.js.map → Modal-C6k6_5KB.js.map} +1 -1
- package/dashboard/dist/assets/OperatorDashboard-e5N3_dVl.js +2 -0
- package/dashboard/dist/assets/{OperatorDashboard-oGmDbNYv.js.map → OperatorDashboard-e5N3_dVl.js.map} +1 -1
- package/dashboard/dist/assets/PageHeader-COcgWWf-.js +2 -0
- package/dashboard/dist/assets/{PageHeader-DLjHNYHX.js.map → PageHeader-COcgWWf-.js.map} +1 -1
- package/dashboard/dist/assets/PageHeaderWithStats-C0PCY3aJ.js +2 -0
- package/dashboard/dist/assets/{PageHeaderWithStats-Oljg3n4j.js.map → PageHeaderWithStats-C0PCY3aJ.js.map} +1 -1
- package/dashboard/dist/assets/PriorityBadge-BQCsYMpM.js +2 -0
- package/dashboard/dist/assets/{PriorityBadge-DfQY9St9.js.map → PriorityBadge-BQCsYMpM.js.map} +1 -1
- package/dashboard/dist/assets/ProcessDetailPage-C03LOgI0.js +2 -0
- package/dashboard/dist/assets/{ProcessDetailPage-Da-miMYZ.js.map → ProcessDetailPage-C03LOgI0.js.map} +1 -1
- package/dashboard/dist/assets/ProcessesListPage-iyPsmlhm.js +2 -0
- package/dashboard/dist/assets/{ProcessesListPage-CW-2yFw_.js.map → ProcessesListPage-iyPsmlhm.js.map} +1 -1
- package/dashboard/dist/assets/RolePill-CHwys1f9.js +2 -0
- package/dashboard/dist/assets/{RolePill-Bp10-WfX.js.map → RolePill-CHwys1f9.js.map} +1 -1
- package/dashboard/dist/assets/RolesPage-Bmc3XaUk.js +2 -0
- package/dashboard/dist/assets/{RolesPage-Bg_hEu9H.js.map → RolesPage-Bmc3XaUk.js.map} +1 -1
- package/dashboard/dist/assets/RowActions-Bs4PF-Gd.js +2 -0
- package/dashboard/dist/assets/{RowActions-Dg-Fsm5O.js.map → RowActions-Bs4PF-Gd.js.map} +1 -1
- package/dashboard/dist/assets/RunAsSelector-DXzAr2WW.js +2 -0
- package/dashboard/dist/assets/{RunAsSelector-hYP59xHH.js.map → RunAsSelector-DXzAr2WW.js.map} +1 -1
- package/dashboard/dist/assets/ServerName-BIdLC1Ay.js +2 -0
- package/dashboard/dist/assets/{ServerName-C9lUCFYb.js.map → ServerName-BIdLC1Ay.js.map} +1 -1
- package/dashboard/dist/assets/StatCard-OKzRSSx4.js +2 -0
- package/dashboard/dist/assets/{StatCard-DlgF0CJC.js.map → StatCard-OKzRSSx4.js.map} +1 -1
- package/dashboard/dist/assets/StatusBadge-CQlF46RR.js +2 -0
- package/dashboard/dist/assets/{StatusBadge-XQlNFwmH.js.map → StatusBadge-CQlF46RR.js.map} +1 -1
- package/dashboard/dist/assets/StepIndicator-CP7eycjI.js +2 -0
- package/dashboard/dist/assets/{StepIndicator-CuUIGxKk.js.map → StepIndicator-CP7eycjI.js.map} +1 -1
- package/dashboard/dist/assets/StickyPagination-CGk8VAKt.js +2 -0
- package/dashboard/dist/assets/{StickyPagination-F9FZsRy9.js.map → StickyPagination-CGk8VAKt.js.map} +1 -1
- package/dashboard/dist/assets/SwimlaneTimeline-MEUPc3yJ.js +2 -0
- package/dashboard/dist/assets/{SwimlaneTimeline-2JHwAM2f.js.map → SwimlaneTimeline-MEUPc3yJ.js.map} +1 -1
- package/dashboard/dist/assets/TagInput-BGxXKiWD.js +2 -0
- package/dashboard/dist/assets/{TagInput-Dkljw_WI.js.map → TagInput-BGxXKiWD.js.map} +1 -1
- package/dashboard/dist/assets/TaskDetailPage-pN5BXzYA.js +2 -0
- package/dashboard/dist/assets/TaskDetailPage-pN5BXzYA.js.map +1 -0
- package/dashboard/dist/assets/TaskQueuePill-bw8ieKsf.js +2 -0
- package/dashboard/dist/assets/{TaskQueuePill-DPwm25Cc.js.map → TaskQueuePill-bw8ieKsf.js.map} +1 -1
- package/dashboard/dist/assets/TasksListPage-D1INzcrA.js +2 -0
- package/dashboard/dist/assets/{TasksListPage-kCH4r-70.js.map → TasksListPage-D1INzcrA.js.map} +1 -1
- package/dashboard/dist/assets/TimeAgo-CywLVIBA.js +2 -0
- package/dashboard/dist/assets/{TimeAgo-RPbch7Te.js.map → TimeAgo-CywLVIBA.js.map} +1 -1
- package/dashboard/dist/assets/TimestampCell-B4Pc6f3A.js +2 -0
- package/dashboard/dist/assets/{TimestampCell-Dgpl-lKv.js.map → TimestampCell-B4Pc6f3A.js.map} +1 -1
- package/dashboard/dist/assets/ToolPill-DdLN3JOT.js +2 -0
- package/dashboard/dist/assets/{ToolPill-D_DIWFJ5.js.map → ToolPill-DdLN3JOT.js.map} +1 -1
- package/dashboard/dist/assets/ToolTestPanel-DusbUka5.js +2 -0
- package/dashboard/dist/assets/{ToolTestPanel-D1TWdZQi.js.map → ToolTestPanel-DusbUka5.js.map} +1 -1
- package/dashboard/dist/assets/TopicDetailPage-DadwM52Y.js +9 -0
- package/dashboard/dist/assets/TopicDetailPage-DadwM52Y.js.map +1 -0
- package/dashboard/dist/assets/TopicsPage-DbtrnQON.js +2 -0
- package/dashboard/dist/assets/TopicsPage-DbtrnQON.js.map +1 -0
- package/dashboard/dist/assets/UserName-CLbusknU.js +2 -0
- package/dashboard/dist/assets/{UserName-BXZGXJsU.js.map → UserName-CLbusknU.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowExecutionPage-C61R-3Gg.js +2 -0
- package/dashboard/dist/assets/{WorkflowExecutionPage-DWlNYb2M.js.map → WorkflowExecutionPage-C61R-3Gg.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowPill-7vt2F6wR.js +2 -0
- package/dashboard/dist/assets/{WorkflowPill-BbgVTGgI.js.map → WorkflowPill-7vt2F6wR.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowsDashboard-BWiUNvyl.js +2 -0
- package/dashboard/dist/assets/{WorkflowsDashboard-Dgq8RcD6.js.map → WorkflowsDashboard-BWiUNvyl.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowsOverview-DA2ZOs7D.js +2 -0
- package/dashboard/dist/assets/{WorkflowsOverview-DnInrUPO.js.map → WorkflowsOverview-DA2ZOs7D.js.map} +1 -1
- package/dashboard/dist/assets/YamlWorkflowsPage-CLebf2eL.js +2 -0
- package/dashboard/dist/assets/{YamlWorkflowsPage-z1Z9J-mc.js.map → YamlWorkflowsPage-CLebf2eL.js.map} +1 -1
- package/dashboard/dist/assets/{agents-C9RLPt1z.js → agents-Dga6NU7U.js} +2 -2
- package/dashboard/dist/assets/{agents-C9RLPt1z.js.map → agents-Dga6NU7U.js.map} +1 -1
- package/dashboard/dist/assets/{bots-zyUDnQhH.js → bots-CtU4i4OQ.js} +2 -2
- package/dashboard/dist/assets/{bots-zyUDnQhH.js.map → bots-CtU4i4OQ.js.map} +1 -1
- package/dashboard/dist/assets/{controlplane-v-5KV6pl.js → controlplane-BVoALhbL.js} +2 -2
- package/dashboard/dist/assets/{controlplane-v-5KV6pl.js.map → controlplane-BVoALhbL.js.map} +1 -1
- package/dashboard/dist/assets/escalation-_N5GfuIi.js +2 -0
- package/dashboard/dist/assets/{escalation-BseAikei.js.map → escalation-_N5GfuIi.js.map} +1 -1
- package/dashboard/dist/assets/escalation-columns-CoTmTpHp.js +2 -0
- package/dashboard/dist/assets/{escalation-columns-Cs2CkkEs.js.map → escalation-columns-CoTmTpHp.js.map} +1 -1
- package/dashboard/dist/assets/helpers-Dz2U3Ctb.js +2 -0
- package/dashboard/dist/assets/{helpers-DVICI_VA.js.map → helpers-Dz2U3Ctb.js.map} +1 -1
- package/dashboard/dist/assets/index-6Kd78p_v.js +2 -0
- package/dashboard/dist/assets/{index-BzBZo8Sn.js.map → index-6Kd78p_v.js.map} +1 -1
- package/dashboard/dist/assets/index-B9ealjkt.js +6 -0
- package/dashboard/dist/assets/{index-CPpNn3z2.js.map → index-B9ealjkt.js.map} +1 -1
- package/dashboard/dist/assets/index-BIUHY2Jz.css +1 -0
- package/dashboard/dist/assets/index-BWHDW_CF.js +2 -0
- package/dashboard/dist/assets/{index-XCEX7Zof.js.map → index-BWHDW_CF.js.map} +1 -1
- package/dashboard/dist/assets/index-BYwPVJv0.js +15 -0
- package/dashboard/dist/assets/{index-M17tP_HX.js.map → index-BYwPVJv0.js.map} +1 -1
- package/dashboard/dist/assets/index-CCOSf1PY.js +281 -0
- package/dashboard/dist/assets/index-CCOSf1PY.js.map +1 -0
- package/dashboard/dist/assets/index-CS61sh5q.js +2 -0
- package/dashboard/dist/assets/{index-BP76o_S8.js.map → index-CS61sh5q.js.map} +1 -1
- package/dashboard/dist/assets/index-CtbG3UN-.js +5 -0
- package/dashboard/dist/assets/{index-DVFm5329.js.map → index-CtbG3UN-.js.map} +1 -1
- package/dashboard/dist/assets/index-DWUunWxh.js +2 -0
- package/dashboard/dist/assets/{index-DyqdoZPY.js.map → index-DWUunWxh.js.map} +1 -1
- package/dashboard/dist/assets/index-D_H_Prht.js +2 -0
- package/dashboard/dist/assets/{index-C0TSBQw8.js.map → index-D_H_Prht.js.map} +1 -1
- package/dashboard/dist/assets/index-Dpjguclc.js +2 -0
- package/dashboard/dist/assets/{index-DDFK1A8T.js.map → index-Dpjguclc.js.map} +1 -1
- package/dashboard/dist/assets/index-QicYdUsl.js +2 -0
- package/dashboard/dist/assets/{index-tK8lfgAj.js.map → index-QicYdUsl.js.map} +1 -1
- package/dashboard/dist/assets/index-dM-OgCY3.js +2 -0
- package/dashboard/dist/assets/{index-D2tDlpuv.js.map → index-dM-OgCY3.js.map} +1 -1
- package/dashboard/dist/assets/{knowledge-BhK8xuod.js → knowledge-DJlebU82.js} +2 -2
- package/dashboard/dist/assets/{knowledge-BhK8xuod.js.map → knowledge-DJlebU82.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-CWFliwjc.js → mcp-CsLJ5SRm.js} +2 -2
- package/dashboard/dist/assets/{mcp-CWFliwjc.js.map → mcp-CsLJ5SRm.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-Dm7_m5Fi.js → mcp-query-WNK1ItRV.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-Dm7_m5Fi.js.map → mcp-query-WNK1ItRV.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-runs-aBDudwEi.js → mcp-runs-DtTTsuPH.js} +2 -2
- package/dashboard/dist/assets/{mcp-runs-aBDudwEi.js.map → mcp-runs-DtTTsuPH.js.map} +1 -1
- package/dashboard/dist/assets/namespaces-iRejH3_A.js +2 -0
- package/dashboard/dist/assets/{namespaces-C45c4uoO.js.map → namespaces-iRejH3_A.js.map} +1 -1
- package/dashboard/dist/assets/{roles-BMAzzeHR.js → roles-3Jm5KtKc.js} +2 -2
- package/dashboard/dist/assets/{roles-BMAzzeHR.js.map → roles-3Jm5KtKc.js.map} +1 -1
- package/dashboard/dist/assets/settings-DmN2I-c6.js +2 -0
- package/dashboard/dist/assets/{settings-D0v7RI3o.js.map → settings-DmN2I-c6.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-DwEUQ6my.js → tasks-Cc-QoITQ.js} +2 -2
- package/dashboard/dist/assets/{tasks-DwEUQ6my.js.map → tasks-Cc-QoITQ.js.map} +1 -1
- package/dashboard/dist/assets/topics-p8anbgi0.js +2 -0
- package/dashboard/dist/assets/topics-p8anbgi0.js.map +1 -0
- package/dashboard/dist/assets/{useEventHooks-BccPxFR6.js → useEventHooks-VaJ52jMm.js} +2 -2
- package/dashboard/dist/assets/{useEventHooks-BccPxFR6.js.map → useEventHooks-VaJ52jMm.js.map} +1 -1
- package/dashboard/dist/assets/{useExpandedRows-CkcEntB-.js → useExpandedRows-Cg9iq6Vy.js} +2 -2
- package/dashboard/dist/assets/{useExpandedRows-CkcEntB-.js.map → useExpandedRows-Cg9iq6Vy.js.map} +1 -1
- package/dashboard/dist/assets/{useFilterParams-DZCAaBC7.js → useFilterParams-CGRYFw_A.js} +2 -2
- package/dashboard/dist/assets/{useFilterParams-DZCAaBC7.js.map → useFilterParams-CGRYFw_A.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-BBioXSKA.js → useYamlActivityEvents-BU4Uhksl.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-BBioXSKA.js.map → useYamlActivityEvents-BU4Uhksl.js.map} +1 -1
- package/dashboard/dist/assets/{users-CCHT00of.js → users-oXOlnold.js} +2 -2
- package/dashboard/dist/assets/{users-CCHT00of.js.map → users-oXOlnold.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-E6836lXZ.js → vendor-icons-CBOM6Es0.js} +100 -95
- package/dashboard/dist/assets/vendor-icons-CBOM6Es0.js.map +1 -0
- package/dashboard/dist/assets/vendor-query-DLp59M9_.js +35 -0
- package/dashboard/dist/assets/vendor-query-DLp59M9_.js.map +1 -0
- package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js +26 -0
- package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js.map +1 -0
- package/dashboard/dist/assets/{workflows-DNZf6Pmq.js → workflows-Yq7cK-vR.js} +2 -2
- package/dashboard/dist/assets/{workflows-DNZf6Pmq.js.map → workflows-Yq7cK-vR.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-BKZdGciI.js → yaml-workflows-Ch53yD43.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-BKZdGciI.js.map → yaml-workflows-Ch53yD43.js.map} +1 -1
- package/dashboard/dist/index.html +5 -5
- package/docs/agents.md +6 -0
- package/docs/api/http/topics.md +164 -0
- package/docs/api/sdk/topics.md +204 -0
- package/docs/dashboard.md +22 -0
- package/docs/events.md +7 -0
- package/docs/sdk.md +15 -0
- package/docs/topics.md +154 -0
- package/package.json +2 -2
- package/dashboard/dist/assets/AdminDashboard-Bb6zouF5.js +0 -2
- package/dashboard/dist/assets/AgentConfigPage-DqHEK73E.js +0 -13
- package/dashboard/dist/assets/AgentConfigPage-DqHEK73E.js.map +0 -1
- package/dashboard/dist/assets/AgentDetailPage-WwA573u9.js +0 -4
- package/dashboard/dist/assets/AgentsPage-BZkZ_hXN.js +0 -2
- package/dashboard/dist/assets/AvailableEscalationsPage-C-Df3ZsZ.js +0 -2
- package/dashboard/dist/assets/BotPicker-CwfVVWxh.js +0 -2
- package/dashboard/dist/assets/CapabilitiesPage-DJEQ_5dV.js +0 -2
- package/dashboard/dist/assets/CollapsibleSection-DaFQGU6S.js +0 -2
- package/dashboard/dist/assets/ConfirmDeleteModal-dOxidrSR.js +0 -2
- package/dashboard/dist/assets/CopyableId-DmLF-RqZ.js +0 -2
- package/dashboard/dist/assets/CredentialsPage-D-tkqdhu.js +0 -2
- package/dashboard/dist/assets/CronLabel-C6iCjsXd.js +0 -2
- package/dashboard/dist/assets/CustomDurationPicker--wCtBkmT.js +0 -2
- package/dashboard/dist/assets/DataTable-D9yuBv0w.js +0 -2
- package/dashboard/dist/assets/DropZone-2mGyDo1P.js +0 -2
- package/dashboard/dist/assets/ElapsedCell-DKoH0bqR.js +0 -2
- package/dashboard/dist/assets/EmptyState-BcsfPq9T.js +0 -2
- package/dashboard/dist/assets/EscalationsOverview-C6A4Q9Ne.js +0 -2
- package/dashboard/dist/assets/EventTable-DWxH0vMp.js +0 -2
- package/dashboard/dist/assets/EventTopicPill-BUxxvpNg.js +0 -2
- package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js +0 -2
- package/dashboard/dist/assets/HomePage-Tlu1j8fK.js +0 -2
- package/dashboard/dist/assets/ListToolbar-DuON-br0.js +0 -2
- package/dashboard/dist/assets/McpOverview-byott48x.js +0 -2
- package/dashboard/dist/assets/McpQueryDetailPage-ieZPpcPn.js +0 -5
- package/dashboard/dist/assets/McpQueryPage-BOO0ACYO.js +0 -2
- package/dashboard/dist/assets/McpRunDetailPage-Di8s7-u9.js +0 -2
- package/dashboard/dist/assets/McpRunsPage-DdUVqUFi.js +0 -2
- package/dashboard/dist/assets/Modal-DEODGeqx.js +0 -2
- package/dashboard/dist/assets/OperatorDashboard-oGmDbNYv.js +0 -2
- package/dashboard/dist/assets/PageHeader-DLjHNYHX.js +0 -2
- package/dashboard/dist/assets/PageHeaderWithStats-Oljg3n4j.js +0 -2
- package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js +0 -2
- package/dashboard/dist/assets/ProcessDetailPage-Da-miMYZ.js +0 -2
- package/dashboard/dist/assets/ProcessesListPage-CW-2yFw_.js +0 -2
- package/dashboard/dist/assets/RolePill-Bp10-WfX.js +0 -2
- package/dashboard/dist/assets/RolesPage-Bg_hEu9H.js +0 -2
- package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js +0 -2
- package/dashboard/dist/assets/RunAsSelector-hYP59xHH.js +0 -2
- package/dashboard/dist/assets/ServerName-C9lUCFYb.js +0 -2
- package/dashboard/dist/assets/StatCard-DlgF0CJC.js +0 -2
- package/dashboard/dist/assets/StatusBadge-XQlNFwmH.js +0 -2
- package/dashboard/dist/assets/StepIndicator-CuUIGxKk.js +0 -2
- package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js +0 -2
- package/dashboard/dist/assets/SwimlaneTimeline-2JHwAM2f.js +0 -2
- package/dashboard/dist/assets/TagInput-Dkljw_WI.js +0 -2
- package/dashboard/dist/assets/TaskDetailPage--9FEVeTB.js +0 -2
- package/dashboard/dist/assets/TaskDetailPage--9FEVeTB.js.map +0 -1
- package/dashboard/dist/assets/TaskQueuePill-DPwm25Cc.js +0 -2
- package/dashboard/dist/assets/TasksListPage-kCH4r-70.js +0 -2
- package/dashboard/dist/assets/TimeAgo-RPbch7Te.js +0 -2
- package/dashboard/dist/assets/TimestampCell-Dgpl-lKv.js +0 -2
- package/dashboard/dist/assets/ToolPill-D_DIWFJ5.js +0 -2
- package/dashboard/dist/assets/ToolTestPanel-D1TWdZQi.js +0 -2
- package/dashboard/dist/assets/UserName-BXZGXJsU.js +0 -2
- package/dashboard/dist/assets/WorkflowExecutionPage-DWlNYb2M.js +0 -2
- package/dashboard/dist/assets/WorkflowPill-BbgVTGgI.js +0 -2
- package/dashboard/dist/assets/WorkflowsDashboard-Dgq8RcD6.js +0 -2
- package/dashboard/dist/assets/WorkflowsOverview-DnInrUPO.js +0 -2
- package/dashboard/dist/assets/YamlWorkflowsPage-z1Z9J-mc.js +0 -2
- package/dashboard/dist/assets/escalation-BseAikei.js +0 -2
- package/dashboard/dist/assets/escalation-columns-Cs2CkkEs.js +0 -2
- package/dashboard/dist/assets/helpers-DVICI_VA.js +0 -2
- package/dashboard/dist/assets/index-BMIU7Im5.js +0 -63
- package/dashboard/dist/assets/index-BMIU7Im5.js.map +0 -1
- package/dashboard/dist/assets/index-BP76o_S8.js +0 -2
- package/dashboard/dist/assets/index-BciXgS35.css +0 -1
- package/dashboard/dist/assets/index-BzBZo8Sn.js +0 -2
- package/dashboard/dist/assets/index-C0TSBQw8.js +0 -2
- package/dashboard/dist/assets/index-CPpNn3z2.js +0 -6
- package/dashboard/dist/assets/index-D2tDlpuv.js +0 -2
- package/dashboard/dist/assets/index-DDFK1A8T.js +0 -2
- package/dashboard/dist/assets/index-DVFm5329.js +0 -5
- package/dashboard/dist/assets/index-DyqdoZPY.js +0 -2
- package/dashboard/dist/assets/index-M17tP_HX.js +0 -15
- package/dashboard/dist/assets/index-XCEX7Zof.js +0 -2
- package/dashboard/dist/assets/index-tK8lfgAj.js +0 -2
- package/dashboard/dist/assets/namespaces-C45c4uoO.js +0 -2
- package/dashboard/dist/assets/settings-D0v7RI3o.js +0 -2
- package/dashboard/dist/assets/vendor-icons-E6836lXZ.js.map +0 -1
- package/dashboard/dist/assets/vendor-query-B2UbickB.js +0 -18
- package/dashboard/dist/assets/vendor-query-B2UbickB.js.map +0 -1
- package/dashboard/dist/assets/vendor-react-CX88sFS5.js +0 -22
- package/dashboard/dist/assets/vendor-react-CX88sFS5.js.map +0 -1
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProcessesListPage-iyPsmlhm.js","assets/tasks-Cc-QoITQ.js","assets/vendor-query-DLp59M9_.js","assets/workflows-Yq7cK-vR.js","assets/useEventHooks-VaJ52jMm.js","assets/useFilterParams-CGRYFw_A.js","assets/vendor-react-Co3Y8ikm.js","assets/DataTable-J5R6mepB.js","assets/EmptyState-BXGvOADa.js","assets/TimestampCell-B4Pc6f3A.js","assets/StickyPagination-CGk8VAKt.js","assets/FilterBar-Bdssa-Xn.js","assets/PageHeader-COcgWWf-.js","assets/vendor-icons-CBOM6Es0.js","assets/ListToolbar-jy8NL6ll.js","assets/WorkflowPill-7vt2F6wR.js","assets/ProcessDetailPage-C03LOgI0.js","assets/settings-DmN2I-c6.js","assets/PageHeaderWithStats-C0PCY3aJ.js","assets/StatusBadge-CQlF46RR.js","assets/RolePill-CHwys1f9.js","assets/UserName-CLbusknU.js","assets/users-oXOlnold.js","assets/McpOverview-xkaKuHbX.js","assets/mcp-CsLJ5SRm.js","assets/mcp-runs-DtTTsuPH.js","assets/yaml-workflows-Ch53yD43.js","assets/namespaces-iRejH3_A.js","assets/StatCard-OKzRSSx4.js","assets/McpRunsPage-DT-armx5.js","assets/ElapsedCell-ChyMzl9n.js","assets/RowActions-Bs4PF-Gd.js","assets/McpRunDetailPage-Znsl4Yc-.js","assets/CopyableId-B4CL12pv.js","assets/CollapsibleSection-kYTBL7dT.js","assets/EventTable-CvJ98E8s.js","assets/SwimlaneTimeline-MEUPc3yJ.js","assets/McpQueryPage-C46fzfm5.js","assets/mcp-query-WNK1ItRV.js","assets/McpQueryDetailPage-D5ICn6cR.js","assets/useYamlActivityEvents-BU4Uhksl.js","assets/TagInput-BGxXKiWD.js","assets/ToolPill-DdLN3JOT.js","assets/RunAsSelector-DXzAr2WW.js","assets/BotPicker-kKBifD1w.js","assets/bots-CtU4i4OQ.js","assets/TimeAgo-CywLVIBA.js","assets/EscalationsOverview-DM6zmE4g.js","assets/AvailableEscalationsPage-DdrzePy4.js","assets/roles-3Jm5KtKc.js","assets/constants-BHkpVaqx.js","assets/CustomDurationPicker-C06QDDir.js","assets/Modal-C6k6_5KB.js","assets/escalation-columns-CoTmTpHp.js","assets/PriorityBadge-BQCsYMpM.js","assets/escalation-_N5GfuIi.js","assets/OperatorDashboard-e5N3_dVl.js","assets/index-CtbG3UN-.js","assets/WorkflowsOverview-DA2ZOs7D.js","assets/index-B9ealjkt.js","assets/helpers-Dz2U3Ctb.js","assets/WorkflowsDashboard-BWiUNvyl.js","assets/YamlWorkflowsPage-CLebf2eL.js","assets/useExpandedRows-Cg9iq6Vy.js","assets/ServerName-BIdLC1Ay.js","assets/TasksListPage-D1INzcrA.js","assets/TaskDetailPage-pN5BXzYA.js","assets/WorkflowExecutionPage-C61R-3Gg.js","assets/AdminDashboard-CbeSejVX.js","assets/index-CS61sh5q.js","assets/TaskQueuePill-bw8ieKsf.js","assets/index-BYwPVJv0.js","assets/ConfirmDeleteModal-CcaAapMl.js","assets/StepIndicator-CP7eycjI.js","assets/index-QicYdUsl.js","assets/ToolTestPanel-DusbUka5.js","assets/index-D_H_Prht.js","assets/index-dM-OgCY3.js","assets/RolesPage-Bmc3XaUk.js","assets/index-DWUunWxh.js","assets/index-BWHDW_CF.js","assets/controlplane-BVoALhbL.js","assets/CredentialsPage-D1VAlwid.js","assets/index-Dpjguclc.js","assets/DropZone-DwNj3GiG.js","assets/index-6Kd78p_v.js","assets/knowledge-DJlebU82.js","assets/HomePage-BuZkdXZt.js","assets/EventTopicPill-CB_rIGlL.js","assets/AgentsPage-Bz61Nl-x.js","assets/agents-Dga6NU7U.js","assets/AgentDetailPage-Dbx2t-Uk.js","assets/CronLabel-DRmO5rH0.js","assets/AgentConfigPage-CFJNOrlg.js","assets/topics-p8anbgi0.js","assets/CapabilitiesPage-Ch5qY0I7.js","assets/TopicsPage-DbtrnQON.js","assets/TopicDetailPage-DadwM52Y.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var VT=Object.defineProperty;var UT=(i,s,a)=>s in i?VT(i,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[s]=a;var w=(i,s,a)=>UT(i,typeof s!="symbol"?s+"":s,a);import{r as QS,a as U,g as zT,u as rr,b as Vs,c as wa,Q as BT,d as qT}from"./vendor-query-DLp59M9_.js";import{r as LT,L as cl,u as Zi,N as sh,a as XS,b as ei,O as Xd,c as ZS,d as HT,R as PT}from"./vendor-react-Co3Y8ikm.js";import{C as $T,I as IT,R as KS,B as WS,U as FT,A as eE,Z as YT,a as GT,S as zw,P as JT,L as Bw,W as QT,b as XT,c as ah,F as ZT,d as KT,e as WT,T as eC,f as tC,M as tE,g as nE,h as nC,i as sC,E as aC,j as rC,k as iC,l as qw,X as G0,G as oC,m as lC,n as cC,o as uC,p as fC}from"./vendor-icons-CBOM6Es0.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 s0={exports:{}},qd={},Lw;function dC(){if(Lw)return qd;Lw=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 Se:return(G._context.displayName||"Context")+".Consumer";case q: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 Ze=Ne.error,He=typeof Symbol=="function"&&Symbol.toStringTag&&G[Symbol.toStringTag]||G.constructor.name||"Object";return Ze.call(Ne,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",He),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 Ze(){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))}Ze.isReactWarning=!0,Object.defineProperty(G,"key",{get:Ze,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,Ze,He,Yt,Sa){var et=Ze.ref;return G={$$typeof:z,type:G,key:Ne,props:Ze,_owner:He},(et!==void 0?et: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:Sa}),Object.freeze&&(Object.freeze(G.props),Object.freeze(G)),G}function _(G,Ne,Ze,He,Yt,Sa){var et=Ne.children;if(et!==void 0)if(He)if(Xe(et)){for(He=0;He<et.length;He++)S(et[He]);Object.freeze&&Object.freeze(et)}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 S(et);if(ve.call(Ne,"key")){et=i(G);var Rt=Object.keys(Ne).filter(function(un){return un!=="key"});He=0<Rt.length?"{key: someKey, "+Rt.join(": ..., ")+": ...}":"{key: someKey}",Ce[et+He]||(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} />`,He,et,Rt,et),Ce[et+He]=!0)}if(et=null,Ze!==void 0&&(a(Ze),et=""+Ze),p(Ne)&&(a(Ne.key),et=""+Ne.key),"key"in Ne){Ze={};for(var Me in Ne)Me!=="key"&&(Ze[Me]=Ne[Me])}else Ze=Ne;return et&&m(Ze,typeof G=="function"?G.displayName||G.name||"Unknown":G),v(G,et,Ze,u(),Yt,Sa)}function S(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 B=QS(),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"),Se=Symbol.for("react.consumer"),De=Symbol.for("react.context"),q=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=B.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve=Object.prototype.hasOwnProperty,Xe=Array.isArray,nt=console.createTask?console.createTask:function(){return null};B={react_stack_bottom_frame:function(G){return G()}};var ae,pe={},xe=B.react_stack_bottom_frame.bind(B,d)(),je=nt(o(d)),Ce={};qd.Fragment=X,qd.jsxDEV=function(G,Ne,Ze,He){var Yt=1e4>ie.recentlyCreatedOwnerStacks++;return _(G,Ne,Ze,He,Yt?Error("react-stack-top-frame"):xe,Yt?nt(o(G)):je)}})(),qd}var Hw;function hC(){return Hw||(Hw=1,s0.exports=dC()),s0.exports}var b=hC(),a0={exports:{}},nu={},r0={exports:{}},i0={},Pw;function mC(){return Pw||(Pw=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(q=!1,Q){var ae=i.unstable_now();ie=ae;var pe=!0;try{e:{Se=!1,De&&(De=!1,oe(H),H=-1),te=!0;var xe=ee;try{t:{for(p(ae),X=o(B);X!==null&&!(X.expirationTime>ae&&g());){var je=X.callback;if(typeof je=="function"){X.callback=null,ee=X.priorityLevel;var Ce=je(X.expirationTime<=ae);if(ae=i.unstable_now(),typeof Ce=="function"){X.callback=Ce,p(ae),pe=!0;break t}X===o(B)&&u(B),p(ae)}else u(B);X=o(B)}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,Ce=ae[je];if(0<d(Ce,pe))ae[je]=pe,ae[xe]=Ce,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,Ce=ae.length,G=Ce>>>1;je<G;){var Ne=2*(je+1)-1,Ze=ae[Ne],He=Ne+1,Yt=ae[He];if(0>d(Ze,xe))He<Ce&&0>d(Yt,Ze)?(ae[je]=Yt,ae[He]=xe,je=He):(ae[je]=Ze,ae[Ne]=xe,je=Ne);else if(He<Ce&&0>d(Yt,xe))ae[je]=Yt,ae[He]=xe,je=He;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(B,pe);else break;pe=o(z)}}function m(ae){if(De=!1,p(ae),!Se)if(o(B)!==null)Se=!0,Q||(Q=!0,ve());else{var pe=o(z);pe!==null&&v(m,pe.startTime-ae)}}function g(){return q?!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 S=Date,D=S.now();i.unstable_now=function(){return S.now()-D}}var B=[],z=[],F=1,X=null,ee=3,te=!1,Se=!1,De=!1,q=!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 Xe=new MessageChannel,nt=Xe.port2;Xe.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(){q=!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 Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=xe+Ce,ae={id:F++,callback:pe,priorityLevel:ae,startTime:xe,expirationTime:Ce,sortIndex:-1},xe>je?(ae.sortIndex=xe,a(z,ae),o(B)===null&&ae===o(z)&&(De?(oe(H),H=-1):De=!0,v(m,xe-je))):(ae.sortIndex=Ce,a(B,ae),Se||te||(Se=!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())})()})(i0)),i0}var $w;function pC(){return $w||($w=1,r0.exports=mC()),r0.exports}var Iw;function bC(){if(Iw)return nu;Iw=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():$e({},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():$e({},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():$e({},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 S(e){var t=[];return e.forEach(function(n){t.push(n)}),t.sort().join(", ")}function D(e,t,n,r){return new w_(e,t,n,r)}function B(e,t){e.context===Rr&&(wp(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 Se(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 q(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===IA?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 Rp:return"Suspense";case jp:return"SuspenseList";case Mp: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 Op: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!==Vp[za]&&console.error("Unexpected Fiber popped."),e.current=kp[za],kp[za]=null,Vp[za]=null,za--)}function ve(e,t,n){za++,kp[za]=e.current,Vp[za]=n,e.current=t}function Xe(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 Xe(Er.current)}function xe(e){e.memoizedState!==null&&ve(Vf,e,e);var t=Xe(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 Ce(){}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:Ce,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:$e({},e,{value:Z1}),info:$e({},e,{value:K1}),warn:$e({},e,{value:W1}),error:$e({},e,{value:ex}),group:$e({},e,{value:tx}),groupCollapsed:$e({},e,{value:nx}),groupEnd:$e({},e,{value:sx})})}0>cc&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Ze(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 He(e){if(Up===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Up=t&&t[1]||"",ax=-1<n.stack.indexOf(`
|
|
35
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
36
|
+
`+Up+e+ax}function Yt(e,t){if(!e||zp)return"";var n=Bp.get(e);if(n!==void 0)return n;zp=!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"&&Bp.set(e,V),V}while(1<=c&&0<=f);break}}}finally{zp=!1,Y.H=r,Ne(),Error.prepareStackTrace=n}return x=(x=e?e.displayName||e.name:"")?He(x):"",typeof e=="function"&&Bp.set(e,x),x}function Sa(e,t){switch(e.tag){case 26:case 27:case 5:return He(e.type);case 16:return He("Lazy");case 13:return e.child!==t&&t!==null?He("Suspense Fallback"):He("Suspense");case 19:return He("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 He("Activity");default:return""}}function et(e){try{var t="",n=null;do{t+=Sa(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=Ze(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=He(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:"")?He(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+=He(e.type);break;case 13:t+=He("Suspense");break;case 19:t+=He("SuspenseList");break;case 31:t+=He("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=Ze(r);l!==""&&(t+=`
|
|
44
|
+
`+l)}}else if(e.debugStack!=null){var c=e.debugStack;(e=e.owner)&&c&&(t+=`
|
|
45
|
+
`+Ze(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 Eh(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 ZA=="function"&&KA(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-(WA(e)/eD|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 _h(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 wl(){var e=Bf;return Bf<<=1,(Bf&62914560)===0&&(Bf=4194304),e}function Sl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function li(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ah(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[$p],delete e[tD],delete e[nD]}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=C1(e);e!==null;){if(n=e[ln])return n;e=C1(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 Ta(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(Ip[n]=e,e==="onDoubleClick"&&(Ip.ondblclick=e),e=0;e<t.length;e++)ix.add(t[e])}function Hs(e,t){sD[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:aD.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 Tn(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 Tt(e){return e.replace(rD,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?Tp.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 Tl(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 T(e,t){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-t?T(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 qe(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=qe(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)?"{"+qe(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=$e({},t),c;for(c in e)if(e.hasOwnProperty(c)){delete l[c];var f=120-2*n-c.length-2,h=qe(e[c],f);t.hasOwnProperty(c)?(f=qe(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=qe(l[y],120-2*n-y.length-2),r+=Z(n)+y+": "+e+`
|
|
63
|
+
`);return r}function t_(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 Dh(e,t){var n=T(e,t);if(n!==e&&(e.children.length!==1||e.children[0]!==n))return M(t)+`...
|
|
74
|
+
`+Dh(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=t_(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+=Dh(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 Th(e){try{return`
|
|
79
|
+
|
|
80
|
+
`+Dh(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?Th(l).replaceAll(/^[+-]/gm,">"):""}function my(e,t){var n=$e({},e||vx),r={tag:t};return gx.indexOf(t)!==-1&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),oD.indexOf(t)!==-1&&(n.pTagInButtonScope=null),iD.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 lD.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 n_(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:n_(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 Tu(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 Cl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}function s_(e){return e.replace(fD,function(t,n){return n.toUpperCase()})}function yy(e,t,n){var r=t.indexOf("--")===0;r||(-1<t.indexOf("-")?To.hasOwnProperty(t)&&To[t]||(To[t]=!0,console.error("Unsupported style property %s. Did you mean %s?",t,s_(t.replace(uD,"ms-")))):cD.test(t)?To.hasOwnProperty(t)&&To[t]||(To[t]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",t,t.charAt(0).toUpperCase()+t.slice(1))):!wx.test(n)||Yp.hasOwnProperty(n)&&Yp[n]||(Yp[n]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,t,n.replace(wx,""))),typeof n=="number"&&(isNaN(n)?Sx||(Sx=!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=Fp[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=Fp[h]||[h],c=0;c<l.length;c++)r[l[c]]=h;h={};for(var y in t)for(l=Fp[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 dD.get(e)||e}function a_(e,t){if(Es.call(Oo,t)&&Oo[t])return!0;if(mD.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(hD.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 r_(e,t){var n=[],r;for(r in t)a_(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 i_(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(Tx.test(t))return console.error("Unknown event handler property `%s`. It will be ignored.",t),vn[t]=!0}else if(Tx.test(t))return pD.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),vn[t]=!0;if(bD.test(t)||yD.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 o_(e,t,n){var r=[],l;for(l in t)i_(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 gD.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ca(){}function Oh(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="'+Tt(""+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(Gp)return e(t,n);Gp=!0;try{var r=e(t);return r}finally{if(Gp=!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 wy(){if($f)return $f;var e,t=Qp,n=t.length,r,l="value"in Tr?Tr.value:Tr.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 Cu(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 Sy(){return!1}function Cn(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:Sy,this.isPropagationStopped=Sy,this}return $e(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 l_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=RD[e])?!!t[e]:!1}function Rh(){return l_}function Ey(e,t){switch(e){case"keyup":return $D.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 c_(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 u_(e,t){if(Mo)return e==="compositionend"||!Wp&&Ey(e,t)?(e=wy(),$f=Qp=Tr=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"?!!FD[e.type]:t==="textarea"}function f_(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=Sf(t,"onChange"),0<t.length&&(n=new If("onChange","change",null,n,r),e.push({event:n,listeners:t}))}function d_(e){c1(e,0)}function Ru(e){var t=Da(e);if(Au(t))return e}function Ty(e,t){if(e==="change")return t}function Cy(){bc&&(bc.detachEvent("onpropertychange",Oy),yc=bc=null)}function Oy(e){if(e.propertyName==="value"&&Ru(yc)){var t=[];Dy(t,yc,e,Oh(e)),Ny(d_,t)}}function h_(e,t,n){e==="focusin"?(Cy(),bc=t,yc=n,bc.attachEvent("onpropertychange",Oy)):e==="focusout"&&Cy()}function m_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ru(yc)}function p_(e,t){if(e==="click")return Ru(t)}function b_(e,t){if(e==="input"||e==="change")return Ru(t)}function y_(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 jh(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;tb||ko==null||ko!==io(r)||(r=ko,"selectionStart"in r&&jh(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=Sf(eb,"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(nb[e])return nb[e];if(!Vo[e])return e;var t=Vo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Bx)return nb[e]=t[n];return e}function xs(e,t){$x.set(e,t),Ta(t,[e])}function g_(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!==ob)return rb;t=ob}else return rb;else{if(typeof r=="function"||typeof r=="string"&&50<r.length||t!==Yf&&t!==ib)return rb;t=ib}}return t}function Mh(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=g_(t),x===ib||x===Yf){t=JSON.stringify(t);break}else if(x===ob){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&&Mh(t,n,r+1,l);return}case"function":t=t.name===""?"() => {}":t.name+"() {}";break;case"string":t=t===KD?"…":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){Qe=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=[WD],x=Uy(f.memoizedProps,x,y,0),1<y.length&&(x&&!Cr&&(f.lanes&l)===0&&100<e.actualDuration?(Cr=!0,y[0]=eT,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 kh(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&&Mh(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&&Mh(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 v_(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,Qe,Ge,l)):console.timeStamp(n,e,t,Qe,Ge,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,Qe,Ge,n)):console.timeStamp("Prewarm",e,t,Qe,Ge,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,Qe,Ge,n)):console.timeStamp("Suspended",e,t,Qe,Ge,n))}function x_(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:Qe,trackGroup:Ge,tooltipText:l?"Hydration Failed":"Recovered after Error",properties:n}}},c?c.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function Vh(e,t,n,r){!bt||t<=e||(r?r.run(console.timeStamp.bind(console,"Errored",e,t,Qe,Ge,"error")):console.timeStamp("Errored",e,t,Qe,Ge,"error"))}function N_(e,t,n,r){!bt||t<=e||(r?r.run(console.timeStamp.bind(console,n,e,t,Qe,Ge,"secondary-light")):console.timeStamp(n,e,t,Qe,Ge,"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:Qe,trackGroup:Ge,tooltipText:r?"Remaining Effects Errored":"Commit Errored",properties:c}}},l?l.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function Uh(e,t,n){!bt||t<=e||console.timeStamp("Animating",e,t,Qe,Ge,"secondary-dark")}function ku(){for(var e=Uo,t=lb=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,lb|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function zh(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>bT)throw Pi=Yc=0,Gc=Hb=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>yT&&(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 Bh(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 w_(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 qh(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=Bh(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 Lh(e,t,n,r,l,c){var f=0,h=e;if(typeof e=="function")qh(e)&&(f=1),h=hi(h);else if(typeof e=="string")f=pe(),f=RA(e,n,f)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Mp:return t=D(31,n,t,l),t.elementType=Mp,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|Ue),t.elementType=Cp,t.lanes=c,t.stateNode={effectDuration:0,passiveEffectDuration:0},t;case Rp:return t=D(13,n,t,l),t.elementType=Rp,t.lanes=c,t;case jp:return t=D(19,n,t,l),t.elementType=jp,t.lanes=c,t;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case la:f=10;break e;case Op:f=9;break e;case oc:f=11,h=Bh(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=Lh(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 Hh(e,t,n){return e=D(6,e,null,t),e.lanes=n,e}function Fy(e){var t=D(18,null,null,Te);return t.stateNode=e,t}function Ph(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=cb.get(e);return n!==void 0?n:(t={value:e,source:t,stack:et(t)},cb.set(e,t),t)}return{value:e,source:t,stack:et(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 $h(e){dr(),e.return!==null&&(Ra(e,1),Yy(e,1,0))}function Ih(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(){Fe||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(){Fe&&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=Th(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)),ub}function Xy(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ln]=e,t[gn]=r,up(n,r),n){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(n=0;n<Jc.length;n++)Ye(Jc[n],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Hs("input",r),Ye("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),Ye("invalid",t),Tl(t,r);break;case"textarea":Hs("textarea",r),Ye("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&&(Ye("beforetoggle",t),Ye("toggle",t)),r.onScroll!=null&&Ye("scroll",t),r.onScrollEnd!=null&&Ye("scrollend",t),r.onClick!=null&&(t.onclick=Ca),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(!Fe)return Zy(e),Fe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||pp(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"?vp(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=vp(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=vp(e)}else t===27?(t=yt,Sr(e.type)?(e=Wb,Wb=null,yt=e):yt=t):yt=cn?Pn(e.stateNode.nextSibling):null;return!0}function bi(){yt=cn=null,ma=Fe=!1}function Fh(){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 Yh(){var e=Fn;if(e!==null){Fn=null;for(var t=Th(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(fb,t._currentValue,e),t._currentValue=n,ve(db,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=fb.current;var n=db.current;ie(db,t),e._currentRenderer=n,ie(fb,t)}function Gh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}e!==n&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Jh(e,t,n,r){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var c=l.dependencies;if(c!==null){var f=l.child;c=c.firstContext;e:for(;c!==null;){var h=c;c=l;for(var y=0;y<t.length;y++)if(h.context===t[y]){c.lanes|=n,h=c.alternate,h!==null&&(h.lanes|=n),Gh(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),Gh(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&&Jh(t,e,n,r),t.flags|=262144}function Lu(e){for(e=e.firstContext;e!==null;){if(!xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function yi(e){Xf=e,Lo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function 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 Qh(){return{controller:new sT,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&&aT(rT,function(){e.controller.abort()})}function Js(e,t,n){(e&127)!==0?0>pa&&(pa=qt(),wc=Zf(t),hb=t,n!=null&&(mb=H(n)),(Ke&(Qt|Jn))!==tn&&(Dt=!0,kr=Nc),e=nc(),t=tc(),e!==Po||t!==Sc?Po=-1.1:t!==null&&(kr=Nc),Oi=e,Sc=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 S_(e){if(0>pa){pa=qt(),wc=e._debugTask!=null?e._debugTask:null,(Ke&(Qt|Jn))!==tn&&(kr=Nc);var t=nc(),n=tc();t!==Po||n!==Sc?Po=-1.1:n!==null&&(kr=Nc),Oi=t,Sc=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=Ti;return Ti=0,e}function Pu(e){var t=Ti;return Ti=e,t}function Ul(e){var t=Ti;return Ti+=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=wt;return wt=-0,e}function Xs(e){0<=e&&(wt=e)}function Zs(){var e=Nt;return Nt=null,e}function Ks(){var e=Dt;return Dt=!1,e}function Xh(e){Nn=qt(),0>e.actualStartTime&&(e.actualStartTime=Nn)}function Zh(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,Ti+=t,wt+=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 E_(e,t){if(Ac===null){var n=Ac=[];bb=0,ji=ip(),$o={status:"pending",value:void 0,then:function(r){n.push(r)}}}return bb++,t.then(tg,tg),t}function tg(){if(--bb===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 __(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 Kh(){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=Kh();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(Ca,Ca),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(Ca,Ca);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 uT(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=ze;return e!=null&&(ze=t===null?e:t.concat(e)),t}function Wh(){var e=ze;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=ze,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===PA?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=Wh();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=Wh();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=Wh();n!==null?n.run(ug.bind(null,e,t)):ug(e,t)}function fg(e){function t(C,R){if(e){var j=C.deletions;j===null?(C.deletions=[R],C.flags|=16):j.push(R)}}function n(C,R){if(!e)return null;for(;R!==null;)t(C,R),R=R.sibling;return null}function r(C){for(var R=new Map;C!==null;)C.key!==null?R.set(C.key,C):R.set(C.index,C),C=C.sibling;return R}function l(C,R){return C=Oa(C,R),C.index=0,C.sibling=null,C}function c(C,R,j){return C.index=j,e?(j=C.alternate,j!==null?(j=j.index,j<R?(C.flags|=67108866,R):j):(C.flags|=67108866,R)):(C.flags|=1048576,R)}function f(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function h(C,R,j,J){return R===null||R.tag!==6?(R=Hh(j,C.mode,J),R.return=C,R._debugOwner=C,R._debugTask=C._debugTask,R._debugInfo=ze,R):(R=l(R,j),R.return=C,R._debugInfo=ze,R)}function y(C,R,j,J){var fe=j.type;return fe===_o?(R=k(C,R,j.props.children,J,j.key),Fu(j,R,C),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=C,R._debugOwner=j._owner,R._debugInfo=ze,R):(R=zu(j,C.mode,J),Bl(R,j),R.return=C,R._debugInfo=ze,R)}function x(C,R,j,J){return R===null||R.tag!==4||R.stateNode.containerInfo!==j.containerInfo||R.stateNode.implementation!==j.implementation?(R=Ph(j,C.mode,J),R.return=C,R._debugInfo=ze,R):(R=l(R,j.children||[]),R.return=C,R._debugInfo=ze,R)}function k(C,R,j,J,fe){return R===null||R.tag!==7?(R=mi(j,C.mode,J,fe),R.return=C,R._debugOwner=C,R._debugTask=C._debugTask,R._debugInfo=ze,R):(R=l(R,j),R.return=C,R._debugInfo=ze,R)}function V(C,R,j){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=Hh(""+R,C.mode,j),R.return=C,R._debugOwner=C,R._debugTask=C._debugTask,R._debugInfo=ze,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case oa:return j=zu(R,C.mode,j),Bl(j,R),j.return=C,C=an(R._debugInfo),j._debugInfo=ze,ze=C,j;case Eo:return R=Ph(R,C.mode,j),R.return=C,R._debugInfo=ze,R;case $n:var J=an(R._debugInfo);return R=pr(R),C=V(C,R,j),ze=J,C}if(Gt(R)||oe(R))return j=mi(R,C.mode,j,null),j.return=C,j._debugOwner=C,j._debugTask=C._debugTask,C=an(R._debugInfo),j._debugInfo=ze,ze=C,j;if(typeof R.then=="function")return J=an(R._debugInfo),C=V(C,Yu(R),j),ze=J,C;if(R.$$typeof===la)return V(C,Hu(C,R),j);Gu(C,R)}return typeof R=="function"&&Ju(C,R),typeof R=="symbol"&&Qu(C,R),null}function O(C,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(C,R,""+j,J);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case oa:return j.key===fe?(fe=an(j._debugInfo),C=y(C,R,j,J),ze=fe,C):null;case Eo:return j.key===fe?x(C,R,j,J):null;case $n:return fe=an(j._debugInfo),j=pr(j),C=O(C,R,j,J),ze=fe,C}if(Gt(j)||oe(j))return fe!==null?null:(fe=an(j._debugInfo),C=k(C,R,j,J,null),ze=fe,C);if(typeof j.then=="function")return fe=an(j._debugInfo),C=O(C,R,Yu(j),J),ze=fe,C;if(j.$$typeof===la)return O(C,R,Hu(C,j),J);Gu(C,j)}return typeof j=="function"&&Ju(C,j),typeof j=="symbol"&&Qu(C,j),null}function P(C,R,j,J,fe){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return C=C.get(j)||null,h(R,C,""+J,fe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case oa:return j=C.get(J.key===null?j:J.key)||null,C=an(J._debugInfo),R=y(R,j,J,fe),ze=C,R;case Eo:return C=C.get(J.key===null?j:J.key)||null,x(R,C,J,fe);case $n:var Re=an(J._debugInfo);return J=pr(J),R=P(C,R,j,J,fe),ze=Re,R}if(Gt(J)||oe(J))return j=C.get(j)||null,C=an(J._debugInfo),R=k(R,j,J,fe,null),ze=C,R;if(typeof J.then=="function")return Re=an(J._debugInfo),R=P(C,R,j,Yu(J),fe),ze=Re,R;if(J.$$typeof===la)return P(C,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(C,R,j,J){if(typeof j!="object"||j===null)return J;switch(j.$$typeof){case oa:case Eo:_(C,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(C,R,j,J)}return J}function me(C,R,j,J){for(var fe=null,Re=null,Ee=null,we=R,Ve=R=0,gt=null;we!==null&&Ve<j.length;Ve++){we.index>Ve?(gt=we,we=null):gt=we.sibling;var kt=O(C,we,j[Ve],J);if(kt===null){we===null&&(we=gt);break}fe=ce(C,kt,j[Ve],fe),e&&we&&kt.alternate===null&&t(C,we),R=c(kt,R,Ve),Ee===null?Re=kt:Ee.sibling=kt,Ee=kt,we=gt}if(Ve===j.length)return n(C,we),Fe&&Ra(C,Ve),Re;if(we===null){for(;Ve<j.length;Ve++)we=V(C,j[Ve],J),we!==null&&(fe=ce(C,we,j[Ve],fe),R=c(we,R,Ve),Ee===null?Re=we:Ee.sibling=we,Ee=we);return Fe&&Ra(C,Ve),Re}for(we=r(we);Ve<j.length;Ve++)gt=P(we,C,Ve,j[Ve],J),gt!==null&&(fe=ce(C,gt,j[Ve],fe),e&>.alternate!==null&&we.delete(gt.key===null?Ve:gt.key),R=c(gt,R,Ve),Ee===null?Re=gt:Ee.sibling=gt,Ee=gt);return e&&we.forEach(function(er){return t(C,er)}),Fe&&Ra(C,Ve),Re}function mt(C,R,j,J){if(j==null)throw Error("An iterable object provided no iterator.");for(var fe=null,Re=null,Ee=R,we=R=0,Ve=null,gt=null,kt=j.next();Ee!==null&&!kt.done;we++,kt=j.next()){Ee.index>we?(Ve=Ee,Ee=null):Ve=Ee.sibling;var er=O(C,Ee,kt.value,J);if(er===null){Ee===null&&(Ee=Ve);break}gt=ce(C,er,kt.value,gt),e&&Ee&&er.alternate===null&&t(C,Ee),R=c(er,R,we),Re===null?fe=er:Re.sibling=er,Re=er,Ee=Ve}if(kt.done)return n(C,Ee),Fe&&Ra(C,we),fe;if(Ee===null){for(;!kt.done;we++,kt=j.next())Ee=V(C,kt.value,J),Ee!==null&&(gt=ce(C,Ee,kt.value,gt),R=c(Ee,R,we),Re===null?fe=Ee:Re.sibling=Ee,Re=Ee);return Fe&&Ra(C,we),fe}for(Ee=r(Ee);!kt.done;we++,kt=j.next())Ve=P(Ee,C,we,kt.value,J),Ve!==null&&(gt=ce(C,Ve,kt.value,gt),e&&Ve.alternate!==null&&Ee.delete(Ve.key===null?we:Ve.key),R=c(Ve,R,we),Re===null?fe=Ve:Re.sibling=Ve,Re=Ve);return e&&Ee.forEach(function(kT){return t(C,kT)}),Fe&&Ra(C,we),fe}function Je(C,R,j,J){if(typeof j=="object"&&j!==null&&j.type===_o&&j.key===null&&(Fu(j,null,C),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(C,R.sibling),J=l(R,j.props.children),J.return=C,J._debugOwner=j._owner,J._debugInfo=ze,Fu(j,J,C),C=J;break e}}else if(R.elementType===Re||Hy(R,j)||typeof Re=="object"&&Re!==null&&Re.$$typeof===$n&&pr(Re)===R.type){n(C,R.sibling),J=l(R,j.props),Bl(J,j),J.return=C,J._debugOwner=j._owner,J._debugInfo=ze,C=J;break e}n(C,R);break}else t(C,R);R=R.sibling}j.type===_o?(J=mi(j.props.children,C.mode,J,j.key),J.return=C,J._debugOwner=C,J._debugTask=C._debugTask,J._debugInfo=ze,Fu(j,J,C),C=J):(J=zu(j,C.mode,J),Bl(J,j),J.return=C,J._debugInfo=ze,C=J)}return C=f(C),ze=fe,C;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(C,R.sibling),J=l(R,fe.children||[]),J.return=C,C=J;break e}else{n(C,R);break}else t(C,R);R=R.sibling}J=Ph(fe,C.mode,J),J.return=C,C=J}return f(C);case $n:return fe=an(j._debugInfo),j=pr(j),C=Je(C,R,j,J),ze=fe,C}if(Gt(j))return fe=an(j._debugInfo),C=me(C,R,j,J),ze=fe,C;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?(C.tag!==0||Object.prototype.toString.call(C.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||xb||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),xb=!0),C=mt(C,R,Ee,J),ze=fe,C}if(typeof j.then=="function")return fe=an(j._debugInfo),C=Je(C,R,Yu(j),J),ze=fe,C;if(j.$$typeof===la)return Je(C,R,Hu(C,j),J);Gu(C,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(fe=""+j,R!==null&&R.tag===6?(n(C,R.sibling),J=l(R,fe),J.return=C,C=J):(n(C,R),J=Hh(fe,C.mode,J),J.return=C,J._debugOwner=C,J._debugTask=C._debugTask,J._debugInfo=ze,C=J),f(C)):(typeof j=="function"&&Ju(C,j),typeof j=="symbol"&&Qu(C,j),n(C,R))}return function(C,R,j,J){var fe=ze;ze=null;try{kc=0;var Re=Je(C,R,j,J);return Fo=null,Re}catch(gt){if(gt===Io||gt===rd)throw gt;var Ee=D(29,gt,null,C.mode);Ee.lanes=J,Ee.return=C;var we=Ee._debugInfo=ze;if(Ee._debugOwner=C._debugOwner,Ee._debugTask=C._debugTask,we!=null){for(var Ve=we.length-1;0<=Ve;Ve--)if(typeof we[Ve].stack=="string"){Ee._debugOwner=we[Ve],Ee._debugTask=we[Ve].debugTask;break}}return Ee}finally{ze=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 em(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tm(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,wb===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(Ke&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,wb=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?(Be&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 wN:if(ce=ce.payload,typeof ce=="function"){Ho=!0;var Je=ce.call(mt,V,me);if(O.mode&mn){pt(!0);try{ce.call(mt,V,me)}finally{pt(!1)}}Ho=!1,V=Je;break e}V=ce;break e;case Nb:O.flags=O.flags&-65537|128;case NN:if(Je=ce.payload,typeof Je=="function"){if(Ho=!0,ce=Je.call(mt,V,me),O.mode&mn){pt(!0);try{Je.call(mt,V,me)}finally{pt(!1)}}Ho=!1}else ce=Je;if(ce==null)break e;V=$e({},V,ce);break e;case SN: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}wb=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 A_(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 nm(e){ve(od,ya,e),ve(Yo,Yo.current,e)}function sm(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 am(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||yp(n)||gp(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 Pe(){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 Ct(){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 rm(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 im(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),Eb.has(c)||(Eb.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?Ab:hs!==null?TN:_b,zi=c=(t.mode&mn)!==Te;var f=yb(n,r,l);if(zi=!1,Qo&&(f=om(t,n,r,l)),c){pt(!0);try{f=om(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)||Eb.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 om(e,t,n,r){Oe=e;var l=0;do{if(Qo&&(Ja=null),Uc=0,Qo=!1,l>=dT)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=CN,c=yb(t,n,r)}while(Qo);return c}function D_(){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 lm(){var e=ud!==0;return ud=0,e}function cm(e,t,n){t.updateQueue=e.updateQueue,t.flags=(t.mode&_s)!==Te?t.flags&-402655237:t.flags&-2053,e.lanes&=~n}function um(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?Ab:_b),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]=$A;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 ws(e,t){return typeof t=="function"?t(e):t}function fm(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=j_.bind(null,Oe,e),[r.memoizedState,e]}function fo(e){var t=ot();return dm(t,ft,e)}function dm(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?(Be&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 hm(e,t,n){var r=Oe,l=bn();if(Fe){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.");(Be&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|Sn,{destroy:void 0},vg.bind(null,r,n,c,t),null),c}function ef(e,t,n){var r=Oe,l=ot(),c=Fe;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,Sn,h,[e]),l.getSnapshot!==t||f||Lt!==null&&Lt.memoizedState.tag&ds){if(r.flags|=2048,mo(ds|Sn,{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)&&wg(e)}function xg(e,t,n){return n(function(){Ng(t)&&(Js(2,"updateSyncExternalStore()",e),wg(e))})}function Ng(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xn(e,n)}catch{return!0}}function wg(e){var t=dn(e,2);t!==null&&At(t,e,2)}function mm(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:ws,lastRenderedState:e},t}function pm(e){e=mm(e);var t=e.queue,n=Hg.bind(null,Oe,t);return t.dispatch=n,[e.memoizedState,n]}function bm(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=Om.bind(null,Oe,!0,n),n.dispatch=t,[e,t]}function Sg(e,t){var n=ot();return Eg(n,ft,e,t)}function Eg(e,t,n,r){return e.baseState=n,dm(e,ft,typeof r=="function"?r:ws)}function _g(e,t){var n=ot();return ft!==null?Eg(n,ft,e,t):(n.baseState=e,[e,n.queue.dispatch])}function T_(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){ym(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){ym(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){Tg(e,t,r)},function(r){return ym(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.")):Tg(e,t,n)}function Tg(e,t,n){t.status="fulfilled",t.value=n,Cg(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 ym(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,Cg(t),t=t.next;while(t!==r)}e.action=null}function Cg(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(Fe){var n=dt.formState;if(n!==null){e:{var r=Oe;if(Fe){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===Qb||c===mw?l:null}if(l){yt=Pn(l.nextSibling),r=l.data===Qb;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=mm(!1),c=Om.bind(null,Oe,!1,r.queue),r=bn(),l={state:t,dispatch:null,action:e,pending:null},r.queue=l,n=T_.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=dm(e,t,Og)[0],e=fo(ws)[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|Sn,{destroy:void 0},C_.bind(null,l,n),null)),[r,c,e]}function C_(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 gm(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&&rm(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)!==Te?xi(276826112,Sn,e,t):xi(8390656,Sn,e,t)}function O_(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 vm(e){var t=bn(),n={impl:e};return t.memoizedState=n,function(){if((Ke&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 O_({ref:t,nextImpl:e}),function(){if((Ke&Qt)!==tn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return t.impl.apply(void 0,arguments)}}function xm(e,t){var n=4194308;return(Oe.mode&_s)!==Te&&(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 Nm(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)!==Te&&(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 wm(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&&rm(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&&rm(t,r[1]))return r[0];if(r=e(),zi){pt(!0);try{e()}finally{pt(!1)}}return n.memoizedState=[r,t],r}function Em(e,t){var n=bn();return _m(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?_m(n,e,t):Vg(n,ft.memoizedState,e,t)}function _m(e,t,n){return n===void 0||(Ga&1073741824)!==0&&(Be&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=_m(e,n,r),xn(e,t)||(Ht=!0),e):(Ga&42)===0||(Ga&1073741824)!==0&&(Be&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,Om(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=__(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 Am(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;S_(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:ws,lastRenderedState:Ji},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ws,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 Dm(){var e=mm(!1);return e=Ug.bind(null,Oe,e.queue,!0,!1),bn().memoizedState=e,[!1,e]}function qg(){var e=fo(ws)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Pl(e),t]}function Lg(){var e=$l(ws)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Pl(e),t]}function Ni(){return xt(Wc)}function Tm(){var e=bn(),t=dt.identifierPrefix;if(Fe){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=fT++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t}function Cm(){return bn().memoizedState=R_.bind(null,Oe)}function R_(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=Qh(),t!=null&&c!==null&&console.error("The seed argument is not enabled outside experimental channels."),l.payload={cache:e};return}n=n.return}}function j_(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=zh(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=zh(e,t,l,r),n!==null)return At(n,e,r),$g(n,t,r),!0}return!1}function Om(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:ip(),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=zh(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 Rm(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 jm(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:$e({},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)),Db.enqueueReplaceState(t,t.state,null))}function wi(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=$e({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function Yg(e){ab(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, "+((Tb||"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,ww+" "+e[0],Sw,Vd+r+Vd,Ew):e.splice(0,0,ww,Sw,Vd+r+Vd,Ew),e.unshift(console),r=jT.apply(console.error,e),r()}else console.error(`%o
|
|
139
|
+
|
|
140
|
+
%s
|
|
141
|
+
|
|
142
|
+
%s
|
|
143
|
+
`,e,t,n)}function Jg(e){ab(e)}function ff(e,t){try{Xo=t.source?H(t.source):null,Tb=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,Tb=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 Mm(e,t,n){return n=br(n),n.tag=Nb,n.payload={element:null},n.callback=function(){be(t.source,ff,e,t)},n}function km(e){return e=br(e),e.tag=Nb,e}function Vm(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)),oT(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 M_(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),Fe&&(ma=!0),n=Yn.current,n!==null){switch(n.tag){case 31:case 13:return fs===null?xf():n.alternate===null&&St===Za&&(St=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),np(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)),np(e,r,l)),!1}throw Error("Unexpected Suspense handler tag ("+n.tag+"). This is a bug in React.")}return np(e,r,l),xf(),!1}if(Fe)return ma=!0,t=Yn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,r!==ub&&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!==ub&&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=Mm(e.stateNode,r,l),Xu(e,l),St!==Br&&(St=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),St!==Br&&(St=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=Mm(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=km(l),Vm(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=im(e,t,n,f,c,l),h=lm(),e!==null&&!Ht?(cm(e,t,l),ka(e,t,l)):(Fe&&h&&$h(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"&&!qh(c)&&c.defaultProps===void 0&&n.compare===null?(n=hi(c),t.tag=15,t.type=n,zm(t,c),Kg(e,t,n,r,l)):(e=Lh(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!$m(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,$m(e,l))(e.flags&131072)!==0&&(Ht=!0);else return t.lanes=e.lanes,ka(e,t,l)}return Um(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):nm(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),nm(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=Kh();return c=c===null?null:{parent:Bt._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&Iu(t,null),nm(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 k_(e,t,n){var r=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Fe){if(r.mode==="hidden")return e=df(t,r),t.lanes=536870912,Fl(null,e);if(am(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(am(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,Fe=!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 Um(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&&(zm(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=im(e,t,n,r,void 0,l),r=lm(),e!==null&&!Ht?(cm(e,t,l),ka(e,t,l)):(Fe&&r&&$h(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=om(t,r,n,l),yg(e,t),r=lm(),e!==null&&!Ht?(cm(e,t,c),ka(e,t,c)):(Fe&&r&&$h(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=km(h),Vm(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===Op?" 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=Db,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={},em(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"&&(jm(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"),Db.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)!==Te&&(t.flags|=134217728),c=!0}else if(e===null){c=t.stateNode;var k=t.memoizedProps;h=wi(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"&&(jm(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)!==Te&&(t.flags|=134217728)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&_s)!==Te&&(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)!==Te&&(t.flags|=134217728),c=!1)}else{c=t.stateNode,tm(e,t),f=t.memoizedProps,y=wi(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"&&(jm(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 zm(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 Bm(e){return{baseLanes:e,cachePool:ng()}}function qm(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(Fe){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 gp(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=Bm(n),l.childLanes=qm(e,r,n),t.memoizedState=Ob,Fl(null,l)}return gr(t),Lm(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=Hm(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=Bm(n),l.childLanes=qm(e,r,n),t.memoizedState=Ob,t=Fl(null,l));else if(gr(t),Qy(),(n&536870912)!==0&&vf(t),gp(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"&&cb.set(h,l),kl(l),t=Hm(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;yp(k)||xf(),t=Hm(e,t,n)}else yp(k)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,yt=Pn(k.nextSibling),cn=t,Fe=!0,jr=null,ma=!1,Fn=null,cs=!1,e!==null&&Jy(t,e),t=Lm(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=Bm(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=qm(e,r,n),t.memoizedState=Ob,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 Lm(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 Hm(e,t,n){return Ui(t,e.child,null,n),e=Lm(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),Gh(e.return,t,n)}function Pm(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),Fe?(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),Pm(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}Pm(t,!0,n,null,c,f);break;case"together":Pm(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 $m(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Lu(e)))}function V_(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,am(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 Im(e,t,n){if(t._debugNeedsRemount&&e!==null){n=Lh(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(!$m(e,n)&&(t.flags&128)===0)return Ht=!1,V_(e,t,n);Ht=(e.flags&131072)!==0}else Ht=!1,(r=Fe)&&(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")qh(e)?(r=wi(e,r),t.tag=1,t.type=e=hi(e),t=sv(null,t,e,r,n)):(t.tag=0,zm(t,e),t.type=e=hi(e),t=Um(null,t,e,r,n));else{if(e!=null){if(l=e.$$typeof,l===oc){t.tag=11,t.type=e=Bh(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 Um(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,l=wi(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,tm(e,t),Hl(t,r,null,n);var f=t.memoizedState;if(r=f.cache,mr(t,Bt,r),r!==c.cache&&Jh(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,Fe=!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:Fe||(n=t.type,e=t.pendingProps,r=Xe(_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&&Fe&&(r=Xe(_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,Sr(t.type)?(Wb=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&&Fe&&(c=pe(),r=Ch(t.type,c.ancestorInfo),l=yt,(f=!l)||(f=SA(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,pp(l,c)?r=null:f!==null&&pp(l,f)&&(t.flags|=32),t.memoizedState!==null&&(l=im(e,t,D_,null,null,n),Wc._currentValue=l),hf(e,t),rn(e,t,r,n),t.child;case 6:return e===null&&Fe&&(n=t.pendingProps,e=pe(),r=e.ancestorInfo.current,n=r!=null?Tu(n,r.tag,e.ancestorInfo.implicitRootScope):!0,e=yt,(r=!e)||(r=EA(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=yb(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 k_(e,t,n);case 22:return Wg(e,t,n,t.pendingProps);case 24:return yi(t),r=xt(Bt),e===null?(l=Kh(),l===null&&(l=dt,c=Qh(),l.pooledCache=c,gi(c),c!==null&&(l.pooledCacheLanes|=n),l=c),t.memoizedState={parent:r,cache:l},em(t),mr(t,Bt,l)):((e.lanes&n)!==0&&(tm(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&&Jh(t,[Bt],n,!0))),rn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Va(e){e.flags|=4}function Fm(e,t,n,r,l){if((t=(e.mode&nT)!==Te)&&(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,vb}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,vb}function pf(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?wl():536870912,e.lanes|=t,Hi|=t)}function Yl(e,t){if(!Fe)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&Ue)!==Te){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&Ue)!==Te){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 U_(e,t,n){var r=t.pendingProps;switch(Ih(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)?(Yh(),Va(t)):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fh())),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),Fm(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),Fm(t,l,e,r,n)),null;case 27:if(je(t),n=Xe(_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=Xe(_r.current),Ch(l,f.ancestorInfo),f=f.context,c=Ef(c),f){case rl:c=c.createElementNS(Co,l);break;case jd:c=c.createElementNS(Hf,l);break;default:switch(l){case"svg":c=c.createElementNS(Co,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(bw,l)||(bw[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),Fm(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=Xe(_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=T1(e,n,r),l!==null&&(pi(t,0).serverProps=l));break;case 27:case 5:r=c.memoizedProps,l&&(l=T1(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&&Tu(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&Ue)!==Te&&n!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration))}else Yh(),bi(),(t.flags&128)===0&&(n=t.memoizedState=null),t.flags|=4,ht(t),(t.mode&Ue)!==Te&&n!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration));e=!1}else n=Fh(),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&Ue)!==Te&&l!==null&&(l=t.child,l!==null&&(t.treeBaseDuration-=l.treeBaseDuration))}else Yh(),bi(),(t.flags&128)===0&&(l=t.memoizedState=null),t.flags|=4,ht(t),(t.mode&Ue)!==Te&&l!==null&&(l=t.child,l!==null&&(t.treeBaseDuration-=l.treeBaseDuration));l=!1}else l=Fh(),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&Ue)!==Te&&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&Ue)!==Te&&n&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return ae(t),e===null&&lp(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(St!==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),Fe&&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&&!Fe)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),Fe&&Ra(t,r.treeForkCount),e):(ht(t),null);case 22:case 23:return Ln(t),sm(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 z_(e,t){switch(Ih(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ue)!==Te&&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&Ue)!==Te&&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&Ue)!==Te&&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),sm(t),e!==null&&ie(Mi,t),e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ue)!==Te&&zl(t),t):null;case 24:return ja(Bt,t),null;case 25:return null;default:return null}}function cv(e,t){switch(Ih(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),sm(t),e!==null&&ie(Mi,t);break;case 24:ja(Bt,t)}}function ta(e){return(e.mode&Ue)!==Te}function uv(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 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&wn)!==ld&&(nl=!0),r=be(t,lT,n),(e&wn)!==ld&&(nl=!1),r!==void 0&&typeof r!="function")){var c=void 0;c=(n.tag&Gn)!==0?"useLayoutEffect":(n.tag&wn)!==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&wn)!==ld&&(nl=!0),l=t,be(l,cT,l,n,h),(e&wn)!==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 Gm(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 B_(e,t,n){return e.getSnapshotBeforeUpdate(t,n)}function q_(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=wi(e.type,n),c=be(e,B_,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=wi(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 L_(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,L_,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 H_(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,fA,r,t,n,e)}catch(l){at(e,e.return,l)}}function Jm(e,t,n){try{be(e,hA,e.stateNode,e.type,n,t,e)}catch(r){at(e,e.return,r)}}function bv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sr(e.type)||e.tag===4}function Qm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(S1(n),(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t)):(S1(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=Ca));else if(r!==4&&(r===27&&Sr(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xm(e,t,n),e=e.sibling;e!==null;)Xm(e,t,n),e=e.sibling}function bf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Sr(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(bf(e,t,n),e=e.sibling;e!==null;)bf(e,t,n),e=e.sibling}function P_(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=Qm(e),bf(e,n,t);break;case 5:n=t.stateNode,t.flags&32&&(w1(n),t.flags&=-33),t=Qm(e),bf(e,t,n);break;case 3:case 4:t=t.stateNode.containerInfo,n=Qm(e),Xm(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,CA,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 $_(e,t){if(e=e.containerInfo,Xb=Ud,e=ky(e),jh(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(Zb={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&&q_(e,n);break;case 3:if((l&1024)!==0){if(e=e.stateNode.containerInfo,n=e.nodeType,n===9)bp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":bp(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,gb,n,e),Ws()):be(n,gb,n,e);else{var y=wi(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,dA,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&&wv(e,n);break;case 13:sa(e,n),h&4&&Sv(e,n),h&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(h=K_.bind(null,n),_A(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&Ue)!==Te&&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&Ue)!==Te&&0<=_e&&0<=Ae&&((Dt||.05<wt)&&Gs(n,_e,Ae,wt,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;Sr(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,bA,$t,n.stateNode)}catch(x){at(n,t,x)}else try{be(n,pA,$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),So(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(wn,n,t),Pt||Ym(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&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(n,_e,Ae,wt,Nt),qn(r),Xs(l),Nt=c,Dt=f}function wv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{be(t,DA,e)}catch(n){at(t,t.return,n)}}}function Sv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{be(t,TA,e)}catch(n){at(t,t.return,n)}}function I_(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=I_(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=W_.bind(null,e,r);r.then(l,l)}})}function Rn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=e,c=t,f=n[r],h=Bn(),y=c;e:for(;y!==null;){switch(y.tag){case 27:if(Sr(y.type)){$t=y.stateNode,Mn=!1;break e}break;case 5:$t=y.stateNode,Mn=!1;break e;case 3:case 4:$t=y.stateNode.containerInfo,Mn=!0;break e}y=y.return}if($t===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Nv(l,c,f),$t=null,Mn=!1,(f.mode&Ue)!==Te&&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(wn|ds,e,e.return),Gl(wn|ds,e),Ym(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=Ts,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===Co||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&&Jm(e,e.memoizedProps,f.memoizedProps)}break;case 27:Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),f!==null&&h&4&&Jm(e,e.memoizedProps,f.memoizedProps);break;case 5:if(Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),e.flags&32){y=e.stateNode;try{be(e,w1,y)}catch(me){at(e,e.return,me)}}h&4&&e.stateNode!=null&&(y=e.memoizedProps,Jm(e,y,f!==null?f.memoizedProps:y)),h&1024&&(Rb=!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,mA,y,f,h)}catch(me){at(e,e.return,me)}}break;case 3:if(y=Ma(),Md=null,x=Ts,Ts=_f(t.containerInfo),Rn(t,e),Ts=x,jn(e),h&4&&f!==null&&f.memoizedState.isDehydrated)try{be(e,AA,t.containerInfo)}catch(me){at(e,e.return,me)}Rb&&(Rb=!1,_v(e)),t.effectDuration+=Pu(y);break;case 4:h=Ts,Ts=_f(e.stateNode.containerInfo),Rn(t,e),jn(e),Ts=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&Ue)!==Te&&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||(Si(e),(e.mode&Ue)!==Te&&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,gA,x):be(O,NA,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,vA,k):be(O,wA,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,yA,V):be(O,xA,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&Ue)!==Te&&0<=_e&&0<=Ae&&((Dt||.05<wt)&&Gs(e,_e,Ae,wt,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,P_,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:Ym(e,e.return,Gn),Si(e);break;case 1:na(e,e.return);var c=e.stateNode;typeof c.componentWillUnmount=="function"&&hv(e,e.return,c),Si(e);break;case 27:be(e,sc,e.stateNode);case 26:case 5:na(e,e.return),Si(e);break;case 22:e.memoizedState===null&&Si(e);break;case 30:Si(e);break;default:Si(e)}(e.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(e,_e,Ae,wt,Nt),qn(t),Xs(n),Nt=r,Dt=l}function Si(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,gb,n,t),t=n.updateQueue,t!==null){e=n.stateNode;try{be(n,A_,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&&wv(e,n);break;case 13:aa(e,n,r),r&&y&4&&Sv(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&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(n,_e,Ae,wt,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 Zm(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 Km(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 Ss(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;Tv(e,t,n,r,c!==null?c.actualStartTime:l),t=c}}function Tv(e,t,n,r,l){var c=Bn(),f=Qs(),h=Zs(),y=Ks(),x=Cr,k=t.flags;switch(t.tag){case 0:case 11:case 15:(t.mode&Ue)!==Te&&0<t.actualStartTime&&(t.flags&1)!==0&&Mu(t,t.actualStartTime,l,Jt,n),Ss(e,t,n,r,l),k&2048&&fv(t,Sn|ds);break;case 1:(t.mode&Ue)!==Te&&0<t.actualStartTime&&((t.flags&128)!==0?kh(t,t.actualStartTime,l,[]):(t.flags&1)!==0&&Mu(t,t.actualStartTime,l,Jt,n)),Ss(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,Ss(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(),Ss(e,t,n,r,l),e=t.stateNode,e.passiveEffectDuration+=Ul(k);try{be(t,H_,t,t.alternate,Mr,e.passiveEffectDuration)}catch(P){at(t,t.return,P)}}else Ss(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&&kh(t,t.actualStartTime,l,V)):Jt=!0):Jt=!1,Ss(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&&kh(t,t.actualStartTime,l,V)):Jt=!0),Ss(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?Ss(e,t,n,r,l):Ql(e,t,n,r,l):O._visibility&La?Ss(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&Ue)===Te||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&&Zm(V,t);break;case 24:Ss(e,t,n,r,l),k&2048&&Km(t.alternate,t);break;default:Ss(e,t,n,r,l)}(t.mode&Ue)!==Te&&((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<wt)&&Gs(t,_e,Ae,wt,Nt),e&&.05<Ae-_e&&Ys(t,_e,Ae,"Mount"))),qn(c),Xs(f),Nt=h,Dt=y,Cr=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;Cv(e,t,n,r,l,f!==null?f.actualStartTime:c),t=f}}function Cv(e,t,n,r,l,c){var f=Bn(),h=Qs(),y=Zs(),x=Ks(),k=Cr;l&&(t.mode&Ue)!==Te&&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,Sn);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&&Zm(t.alternate,t);break;case 24:bo(e,t,n,r,l,c),l&&V&2048&&Km(t.alternate,t);break;default:bo(e,t,n,r,l,c)}(t.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(t,_e,Ae,wt,Nt),qn(f),Xs(h),Nt=y,Dt=x,Cr=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=Cr;(c.mode&Ue)!==Te&&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&&Zm(c.alternate,c);break;case 24:Ql(f,c,h,y,x),V&2048&&Km(c.alternate,c);break;default:Ql(f,c,h,y,x)}Cr=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&&jA(n,Ts,e.memoizedState,e.memoizedProps);break;case 5:yo(e,t,n);break;case 3:case 4:var r=Ts;Ts=_f(e.stateNode.containerInfo),yo(e,t,n),Ts=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&Ue)!==Te&&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&&Gm(e,e.return,Sn|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&Ue)!==Te&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(e,_e,Ae,"Disconnect")):Xl(e);break;default:Xl(e)}(e.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(e,_e,Ae,wt,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&Ue)!==Te&&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:Gm(e,e.return,Sn),gf(e);break;case 22:var c=e.stateNode;c._visibility&La&&(c._visibility&=~La,gf(e));break;default:gf(e)}(e.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(e,_e,Ae,wt,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:Gm(r,l,Sn);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&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(r,_e,Ae,wt,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 F_(){mT.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((Ke&Qt)!==tn&&Be!==0)return Be&-Be;var t=Y.T;return t!==null?(t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e),ip()):so()}function Uv(){if(Vn===0)if((Be&536870912)===0||Fe){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."),Pb&&(wd=!0),(e===dt&&(lt===qi||lt===Li)||e.cancelPendingCommit!==null)&&(vo(e,0),Nr(e,Be,Vn,!1)),li(e,n),(Ke&Qt)!==tn&&e===dt){if(ca)switch(t.tag){case 0:case 11:case 15:e=Le&&H(Le)||"Unknown",cw.has(e)||(cw.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:lw||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),lw=!0)}}else fa&&zs(e,t,n),tA(t),e===dt&&((Ke&Qt)===tn&&(Hr|=n),St===Br&&Nr(e,Be,Vn,!1)),ra(e)}function zv(e,t,n){if((Ke&(Qt|Jn))!==tn)throw Error("Should not already be working.");if(Be!==0&&Le!==null){var r=Le,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))?G_(e,t):ep(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&&!Y_(l)){Ns(t),l=Wt,c=r,!bt||c<=l||(Ot?Ot.run(console.timeStamp.bind(console,"Teared Render",l,c,Qe,Ge,"error")):console.timeStamp("Teared Render",l,c,Qe,Ge,"error")),Ei(t,r),c=ep(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),Vh(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=ep(r,h,!1),h!==Bi){if(kb&&!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),Vh(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)tp(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;Cs=t,n.timeoutHandle=yw(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:Ca},Ov(t,c,me),ce=(c&62914560)===c?gd-Kt():(c&4194048)===c?ZN-Kt():0,ce=MA(me,ce),ce!==null)){Cs=c,e.cancelPendingCommit=ce(tp.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}tp(e,t,c,n,r,l,f,h,y,k,me,V,O,P)}function Y_(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&=~Vb,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(Ke&(Qt|Jn))===tn?(Wl(0),!1):!0}function Wm(){if(Le!==null){if(lt===kn)var e=Le.return;else e=Le,qu(),um(e),Fo=null,kc=0,e=Le;for(;e!==null;)cv(e.alternate,e),e=e.return;Le=null}}function Ei(e,t){(e&127)!==0&&(Ci=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",Ge,"primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition",Ge,"primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense",Ge,"primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle",Ge,"primary-light"));var n=Wt;if(Wt=qt(),Be!==0&&0<n){if(Ns(Be),St===hd||St===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,Qe,Ge,c)):console.timeStamp(f,n,r,Qe,Ge,c)}}Ei(Be,Wt)}if(n=Ot,Ot=null,(t&127)!==0){Ot=wc,l=0<=pa&&pa<Ci?Ci:pa,r=0<=Oi&&Oi<Ci?Ci:Oi,c=0<=r?r:0<=l?l:Wt,0<=Wf?(Ns(2),By(Wf,c,t,n)):td&127,n=l;var h=r,y=Sc,x=0<Po,k=kr===Nc,V=kr===Kf;if(l=Wt,r=wc,c=hb,f=mb,bt){if(Qe="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,Qe,Ge,O)):console.timeStamp(x?"Consecutive":"Event: "+y,h,n,Qe,Ge,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:Qe,trackGroup:Ge,color:h}}},r?r.run(performance.measure.bind(performance,k,n)):performance.measure(k,n))}pa=-1.1,kr=0,mb=hb=null,Wf=-1.1,Po=Oi,Oi=-1.1,Ci=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=pb===Kf,c=Wt,r=Ec,f=Zx,k=Kx,bt&&(Qe="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,Qe,Ge,O)):console.timeStamp(y?"Consecutive":"Event: "+h,V,l,Qe,Ge,O)),n>l&&(r?r.run(console.timeStamp.bind(console,"Action",l,n,Qe,Ge,"primary-dark")):console.timeStamp("Action",l,n,Qe,Ge,"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:Qe,trackGroup:Ge,color:"primary-light"}}},r?r.run(performance.measure.bind(performance,l,n)):performance.measure(l,n))),us=Ya=-1.1,pb=0,ed=-1.1,Ur=Vr,Vr=-1.1,Fa=qt()),(t&62914560)!==0&&(td&62914560)!==0&&(Ns(4194304),Uh(Wx,Wt)),(t&2080374784)!==0&&(td&2080374784)!==0&&(Ns(268435456),Uh(eN,Wt)),n=e.timeoutHandle,n!==Yi&&(e.timeoutHandle=Yi,DT(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Cs=0,Wm(),dt=e,Le=n=Oa(e.current,null),Be=t,lt=kn,Qn=null,qr=!1,el=fn(e,t),kb=!1,St=Za,Hi=Vn=Vb=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===vb?(t=ig(),lt=XN):lt=t===Cb?Mb:t!==null&&typeof t=="object"&&typeof t.then=="function"?$c:pd,Qn=t;var n=Le;n===null?(St=Hc,ff(e,zn(t,e.current))):n.mode&Ue&&Zh(n)}function Lv(){var e=Yn.current;return e===null?!0:(Be&4194048)===Be?fs===null:(Be&62914560)===Be||(Be&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=hT,e}function vf(e){Ot===null&&(Ot=e._debugTask==null?null:e._debugTask)}function xf(){St=Br,qr||(Be&4194048)!==Be&&Yn.current!==null||(el=!0),(Lr&134217727)===0&&(Hr&134217727)===0||dt===null||Nr(dt,Be,Vn,!1)}function ep(e,t,n){var r=Ke;Ke|=Qt;var l=Hv(),c=Pv();if(dt!==e||Be!==t){if(fa){var f=e.memoizedUpdaters;0<f.size&&(Kl(e,Be),f.clear()),ci(e,t)}Fc=null,vo(e,t)}t=!1,f=St;e:do try{if(lt!==kn&&Le!==null){var h=Le,y=Qn;switch(lt){case Mb:Wm(),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=St;break}catch(k){qv(e,k)}while(!0);return t&&e.shellSuspendCounter++,qu(),Ke=r,Y.H=l,Y.A=c,Le===null&&(dt=null,Be=0,ku()),f}function $v(){for(;Le!==null;)Iv(Le)}function G_(e,t){var n=Ke;Ke|=Qt;var r=Hv(),l=Pv();if(dt!==e||Be!==t){if(fa){var c=e.memoizedUpdaters;0<c.size&&(Kl(e,Be),c.clear()),ci(e,t)}Fc=null,vd=Kt()+WN,vo(e,t)}else el=fn(e,t);e:do try{if(lt!==kn&&Le!==null)t:switch(t=Le,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=jb;break e;case bd:ag(c)?(lt=kn,Qn=null,Fv(t)):(lt=kn,Qn=null,xo(e,t,c,bd));break;case jb:var f=null;switch(Le.tag){case 26:f=Le.memoizedState;case 5:case 27:var h=Le;if(f?z1(f):h.stateNode.complete){lt=kn,Qn=null;var y=h.sibling;if(y!==null)Le=y;else{var x=h.return;x!==null?(Le=x,Nf(x)):Le=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,jb);break;case $c:lt=kn,Qn=null,xo(e,t,c,$c);break;case Mb:Wm(),St=md;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}Y.actQueue!==null?$v():J_();break}catch(k){qv(e,k)}while(!0);return qu(),Y.H=r,Y.A=l,Ke=n,Le!==null?Za:(dt=null,Be=0,ku(),St)}function J_(){for(;Le!==null&&!GA();)Iv(Le)}function Iv(e){var t=e.alternate;(e.mode&Ue)!==Te?(Xh(e),t=be(e,Im,t,e,ya),Zh(e)):t=be(e,Im,t,e,ya),e.memoizedProps=e.pendingProps,t===null?Nf(e):Le=t}function Fv(e){var t=be(e,Q_,e);e.memoizedProps=e.pendingProps,t===null?Nf(e):Le=t}function Q_(e){var t=e.alternate,n=(e.mode&Ue)!==Te;switch(n&&Xh(e),e.tag){case 15:case 0:t=nv(t,e,e.pendingProps,e.type,void 0,Be);break;case 11:t=nv(t,e,e.pendingProps,e.type.render,e.ref,Be);break;case 5:um(e);default:cv(t,e),e=Le=Iy(e,ya),t=Im(t,e,ya)}return n&&Zh(e),t}function xo(e,t,n,r){qu(),um(t),Fo=null,kc=0;var l=t.return;try{if(M_(e,l,t,n,Be)){St=Hc,ff(e,zn(n,e.current)),Le=null;return}}catch(c){if(l!==null)throw Le=l,c;St=Hc,ff(e,zn(n,e.current)),Le=null;return}t.flags&32768?(Fe||r===pd?e=!0:el||(Be&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,Xh(t),n=be(t,U_,n,t,ya),(t.mode&Ue)!==Te&&Wy(t),n!==null){Le=n;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);St===Za&&(St=QN)}function Yv(e,t){do{var n=z_(e.alternate,e);if(n!==null){n.flags&=32767,Le=n;return}if((e.mode&Ue)!==Te){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)){Le=e;return}Le=e=n}while(e!==null);St=md,Le=null}function tp(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(),(Ke&(Qt|Jn))!==tn)throw Error("Should not already be working.");if(Ns(n),x===Bi?Vh(O,P,n,Ot):r!==null?x_(O,P,n,r,t!==null&&t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)!==0,Ot):v_(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|=lb,Ah(e,n,c,f,h,y),e===dt&&(Le=dt=null,Be=0),tl=t,Ir=e,Cs=n,Bb=c,Lb=l,rw=r,qb=P,iw=V,Os=xd,ow=null,t.actualDuration!==0||(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,eA(Ao,function(){return Zc=window.event,Os===xd&&(Os=zb),Zv(),null})):(e.callbackNode=null,e.callbackPriority=0),Ia=null,Mr=qt(),V!==null&&N_(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=Ke,Ke|=Jn;try{$_(e,t,n)}finally{Ke=f,rt.p=l,Y.T=r}}It=tw,Gv(),Jv(),Qv()}}function Gv(){if(It===tw){It=$r;var e=Ir,t=tl,n=Cs,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=Ke;Ke|=Jn;try{Ko=n,Wo=e,$u(),Ev(t,e),Wo=Ko=null,n=Zb;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&&jh(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 Je=jy(h,me),C=jy(h,mt);if(Je&&C&&(P.rangeCount!==1||P.anchorNode!==Je.node||P.anchorOffset!==Je.offset||P.focusNode!==C.node||P.focusOffset!==C.offset)){var R=V.createRange();R.setStart(Je.node,Je.offset),P.removeAllRanges(),me>mt?(P.addRange(R),P.extend(C.node,C.offset)):(R.setEnd(C.node,C.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=!!Xb,Zb=Xb=null}finally{Ke=c,rt.p=l,Y.T=r}}e.current=t,It=nw}}function Jv(){if(It===nw){It=$r;var e=ow;if(e!==null){Mr=qt();var t=$a,n=Mr;!bt||n<=t||console.timeStamp(e,t,n,Qe,Ge,"secondary-light")}e=Ir,t=tl,n=Cs;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=Ke;Ke|=Jn;try{Ko=n,Wo=e,$u(),vv(e,t.alternate,t),Wo=Ko=null}finally{Ke=c,rt.p=l,Y.T=r}}e=qb,t=iw,$a=qt(),e=t===null?e:Mr,t=$a,n=Os===Ub,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,Qe,Ge,n?"error":"secondary-dark")):console.timeStamp(n?"Commit Interrupted View Transition":"Commit",e,t,Qe,Ge,n?"error":"secondary-dark")),It=sw}}function Qv(){if(It===aw||It===sw){if(It===aw){var e=$a;$a=qt();var t=$a,n=Os===Ub;!bt||t<=e||console.timeStamp(n?"Interrupted View Transition":"Starting Animation",e,t,Qe,Ge,n?" error":"secondary-light"),Os!==Ub&&(Os=ew)}It=$r,JA(),e=Ir;var r=tl;t=Cs,n=rw;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=Lp;break;case da:h=Hp;break;case Ba:h=Ao;break;case qf:h=Pp;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(),F_(),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=X_(x.stack);be(x.source,y,x.value,k)}}finally{Y.T=f,rt.p=h}}(Cs&3)!==0&&Zl(),ra(e),c=e.pendingLanes,(t&261930)!==0&&(c&42)!==0?(sd=!0,e===Hb?Yc++:(Yc=0,Hb=e)):Yc=0,l||Ei(t,$a),Wl(0)}}function X_(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=Bb;Bb=0;var n=no(Cs),r=Ba>n?Ba:n;n=Y.T;var l=rt.p;try{rt.p=r,Y.T=null;var c=Lb;Lb=null,r=Ir;var f=Cs;if(It=$r,tl=Ir=null,Cs=0,(Ke&(Qt|Jn))!==tn)throw Error("Cannot flush passive effects while already rendering.");Ns(f),Pb=!0,wd=!1;var h=0;if(Ia=null,h=Kt(),Os===ew)Uh($a,h,iT);else{var y=$a,x=h,k=Os===zb;!bt||x<=y||(Ot?Ot.run(console.timeStamp.bind(console,k?"Waiting for Paint":"Waiting",y,x,Qe,Ge,"secondary-light")):console.timeStamp(k?"Waiting for Paint":"Waiting",y,x,Qe,Ge,"secondary-light"))}y=Ke,Ke|=Jn;var V=r.current;$u(),jv(V);var O=r.current;V=qb,$u(),Tv(r,O,f,c,V),t1(r),Ke=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,Qe,Ge,"secondary-dark")):console.timeStamp("Remaining Effects",O,P,Qe,Ge,"secondary-dark")),Ei(f,P),Wl(0,!1),wd?r===Gc?Pi++:(Pi=0,Gc=r):Pi=0,wd=Pb=!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=Mm(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=km(2),r=yr(t,n,2),r!==null&&(Vm(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 np(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new pT;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)||(kb=!0,l.add(n),r=Z_.bind(null,e,t,n),fa&&Kl(e,n),t.then(r,r))}function Z_(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&&(Ci=pa=qt(),wc=Zf("Promise Resolved"),kr=Kf):(n&4194048)!==0&&0>us&&(Fa=us=qt(),Ec=Zf("Promise Resolved"),pb=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&&(Be&n)===n&&(St===Br||St===hd&&(Be&62914560)===Be&&Kt()-gd<KN?(Ke&Qt)===tn&&vo(e,0):Vb|=n,Hi===Be&&(Hi=0)),ra(e)}function Wv(e,t){t===0&&(t=wl()),e=dn(e,t),e!==null&&(li(e,t),ra(e))}function K_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wv(e,n)}function W_(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 sp(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):sp(r,l,c):l.memoizedState===null&&(c&&l.flags&8192?be(l,e1,r,l):l.subtreeFlags&67108864&&be(l,sp,r,l,c)),t=t.sibling}}function e1(e,t){pt(!0);try{Av(t),Mv(t),Dv(e,t.alternate,t,!1),Cv(e,t,0,null,!1,0)}finally{pt(!1)}}function t1(e){var t=!0;e.current.mode&(mn|_s)||(t=!1),sp(e,e.current,t)}function n1(e){if((Ke&Qt)===tn){var t=e.tag;if(t===3||t===1||t===0||t===11||t===14||t===15){if(t=H(e)||"ReactComponent",Sd!==null){if(Sd.has(t))return;Sd.add(t)}else Sd=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 eA(e,t){var n=Y.actQueue;return n!==null?(n.push(t),gT):qp(e,t)}function tA(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?Ib||(Ib=!0,i1()):$b||($b=!0,i1())}function Wl(e,t){if(!Fb&&_d){Fb=!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=Be,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);Fb=!1}}function nA(){Zc=window.event,ap()}function ap(){_d=Ib=$b=!1;var e=0;Fr!==0&&cA()&&(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]=_h(h,t)):y<=t&&(e.expiredLanes|=h),c&=~h}if(t=dt,n=Be,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&&rp(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!==Yb)rp(r);else return t;switch(no(n)){case ss:case da:n=Hp;break;case Ba:n=Ao;break;case qf:n=Pp;break;default:n=Ao}return r=a1.bind(null,e),Y.actQueue!==null?(Y.actQueue.push(r),n=Yb):n=qp(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&rp(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=zb),Zl()&&e.callbackNode!==n)return null;var r=Be;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 rp(e){e!==Yb&&e!==null&&YA(e)}function i1(){Y.actQueue!==null&&Y.actQueue.push(function(){return ap(),null}),TT(function(){(Ke&(Qt|Jn))!==tn?qp(Lp,nA):ap()})}function ip(){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 sA(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),Am(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),Am(n,x,c,y))},currentTarget:l}]})}}function wf(e,t,n){e.currentTarget=n;try{t(e)}catch(r){ab(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,wf,c,h,x):wf(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,wf,c,h,x):wf(c,h,x),l=y}}}}function Ye(e,t){Gb.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[$p];n===void 0&&(n=t[$p]=new Set);var r=e+"__bubble";n.has(r)||(u1(t,e,2,!1),n.add(r))}function op(e,t,n){Gb.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 lp(e){if(!e[Ad]){e[Ad]=!0,ix.forEach(function(n){n!=="selectionchange"&&(Gb.has(n)||op(n,!1,e),op(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ad]||(t[Ad]=!0,op("selectionchange",!1,t))}}function u1(e,t,n,r){switch($1(t)){case ss:var l=zA;break;case da:l=BA;break;default:l=Ep}n=l.bind(null,t,n,e),l=void 0,!Jp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function cp(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=Oh(n),V=[];e:{var O=$x.get(e);if(O!==void 0){var P=If,ce=e;switch(e){case"keypress":if(Cu(n)===0)break e;case"keydown":case"keyup":P=MD;break;case"focusin":ce="focus",P=Kp;break;case"focusout":ce="blur",P=Kp;break;case"beforeblur":case"afterblur":P=Kp;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=Cx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=ND;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=UD;break;case qx:case Lx:case Hx:P=ED;break;case Px:P=BD;break;case"scroll":case"scrollend":P=vD;break;case"wheel":P=LD;break;case"copy":case"cut":case"paste":P=AD;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=PD}var me=(t&4)!==0,mt=!me&&(e==="scroll"||e==="scrollend"),Je=me?O!==null?O+"Capture":null:O;me=[];for(var C=x,R;C!==null;){var j=C;if(R=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||R===null||Je===null||(j=jl(C,Je),j!=null&&me.push(ec(C,j,R))),mt)break;C=C.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=Cx,j="onMouseLeave",Je="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(me=Rx,j="onPointerLeave",Je="onPointerEnter",C="pointer"),mt=P==null?O:Da(P),R=ce==null?O:Da(ce),O=new me(j,C+"leave",P,n,k),O.target=mt,O.relatedTarget=R,j=null,Bs(k)===x&&(me=new me(Je,C+"enter",ce,n,k),me.target=R,me.relatedTarget=mt,j=me),mt=j,P&&ce)t:{for(me=aA,Je=P,C=ce,R=0,j=Je;j;j=me(j))R++;j=0;for(var J=C;J;J=me(J))j++;for(;0<R-j;)Je=me(Je),R--;for(;0<j-R;)C=me(C),j--;for(;R--;){if(Je===C||C!==null&&Je===C.alternate){me=Je;break t}Je=me(Je),C=me(C)}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=Ty;else if(Ay(O))if(zx)fe=b_;else{fe=m_;var Re=h_}else P=O.nodeName,!P||P.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?x&&Ol(x.elementType)&&(fe=Ty):fe=p_;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,eb=x,gc=null);break;case"focusout":gc=eb=ko=null;break;case"mousedown":tb=!0;break;case"contextmenu":case"mouseup":case"dragend":tb=!1,Vy(V,n,k);break;case"selectionchange":if(YD)break;case"keydown":case"keyup":Vy(V,n,k)}var Ee;if(Wp)e:{switch(e){case"compositionstart":var we="onCompositionStart";break e;case"compositionend":we="onCompositionEnd";break e;case"compositionupdate":we="onCompositionUpdate";break e}we=void 0}else Mo?Ey(e,n)&&(we="onCompositionEnd"):e==="keydown"&&n.keyCode===jx&&(we="onCompositionStart");we&&(Mx&&n.locale!=="ko"&&(Mo||we!=="onCompositionStart"?we==="onCompositionEnd"&&Mo&&(Ee=wy()):(Tr=k,Qp="value"in Tr?Tr.value:Tr.textContent,Mo=!0)),Re=Sf(x,we),0<Re.length&&(we=new Ox(we,e,null,n,k),V.push({event:we,listeners:Re}),Ee?we.data=Ee:(Ee=_y(n),Ee!==null&&(we.data=Ee)))),(Ee=ID?c_(e,n):u_(e,n))&&(we=Sf(x,"onBeforeInput"),0<we.length&&(Re=new TD("onBeforeInput","beforeinput",null,n,k),V.push({event:Re,listeners:we}),Re.data=Ee)),sA(V,e,x,n,k)}c1(V,t)})}function ec(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Sf(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 aA(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 up(e,t){r_(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:Ip};Ol(e)||typeof t.is=="string"||o_(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=wr(n),wr(t)!==n&&(r[e]=t))}function rA(e,t,n){t.forEach(function(r){n[m1(r)]=r==="style"?dp(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===Co?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=t,e.innerHTML}function wr(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(vT,`
|
|
190
|
+
`).replace(xT,"")}function h1(e,t){return t=wr(t),wr(e)===t}function ut(e,t,n,r,l,c){switch(n){case"children":typeof r=="string"?(Tu(r,t,!1),t==="body"||t==="textarea"&&r===""||Cl(e,r)):(typeof r=="number"||typeof r=="bigint")&&(Tu(""+r,t,!1),t!=="body"&&Cl(e,""+r));break;case"className":Ps(e,"class",r);break;case"tabIndex":Ps(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Ps(e,n,r);break;case"style":gy(e,r,c);break;case"data":if(t!=="object"){Ps(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){console.error(n==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',n,n),e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}st(r,n),r=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||Cd||(Cd=!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||Td||(Td=!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||dw||(dw=!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||Cd||(Cd=!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||Td||(Td=!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=Ca);break;case"onScroll":r!=null&&(typeof r!="function"&&ia(n,r),Ye("scroll",e));break;case"onScrollEnd":r!=null&&(typeof r!="function"&&ia(n,r),Ye("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":Ye("beforetoggle",e),Ye("toggle",e),vs(e,"popover",r);break;case"xlinkActuate":Tn(e,$i,"xlink:actuate",r);break;case"xlinkArcrole":Tn(e,$i,"xlink:arcrole",r);break;case"xlinkRole":Tn(e,$i,"xlink:role",r);break;case"xlinkShow":Tn(e,$i,"xlink:show",r);break;case"xlinkTitle":Tn(e,$i,"xlink:title",r);break;case"xlinkType":Tn(e,$i,"xlink:type",r);break;case"xmlBase":Tn(e,Jb,"xml:base",r);break;case"xmlLang":Tn(e,Jb,"xml:lang",r);break;case"xmlSpace":Tn(e,Jb,"xml:space",r);break;case"is":c!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),vs(e,"is",r);break;case"innerText":case"textContent":break;case"popoverTarget":hw||r==null||typeof r!="object"||(hw=!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 fp(e,t,n,r,l,c){switch(n){case"style":gy(e,r,c);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(n=r.__html,n!=null){if(l.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=n}}break;case"children":typeof r=="string"?Cl(e,r):(typeof r=="number"||typeof r=="bigint")&&Cl(e,""+r);break;case"onScroll":r!=null&&(typeof r!="function"&&ia(n,r),Ye("scroll",e));break;case"onScrollEnd":r!=null&&(typeof r!="function"&&ia(n,r),Ye("scrollend",e));break;case"onClick":r!=null&&(typeof r!="function"&&ia(n,r),e.onclick=Ca);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(up(t,n),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("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),Ye("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),Ye("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)}Tl(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),Ye("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":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(r=0;r<Jc.length;r++)Ye(Jc[r],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("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&&fp(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 iA(e,t,n,r){switch(up(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||fw||(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"),fw=!0),!t||r||uw||(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"),uw=!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)&&fp(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||fp(e,t,k,O,r,P);return}}for(var Je in n)O=n[Je],n.hasOwnProperty(Je)&&O!=null&&!r.hasOwnProperty(Je)&&ut(e,t,Je,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 dp(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=wr(r),wr(t)!==r&&(n.style=dp(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 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":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 mp(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}mp(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===NT){c.delete(x.toLowerCase()),Zt(x,"function",y,l);continue}mp(e,x,x.toLowerCase(),y,c,l);continue;case"xlinkHref":mp(e,x,"xlink:href",y,c,l);continue;case"contentEditable":hp(e,x,"contenteditable",y,c,l);continue;case"spellCheck":hp(e,x,"spellcheck",y,c,l);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":hp(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&&rA(e,c,l),Object.keys(l).length===0?null:l}function oA(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 lA(){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 Co: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 pp(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 cA(){var e=window.event;return e&&e.type==="popstate"?e===Kb?!1:(Kb=e,!0):(Kb=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 uA(e){setTimeout(function(){throw e})}function fA(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 dA(){}function hA(e,t,n,r){iA(e,t,n,r),e[gn]=r}function w1(e){Cl(e,"")}function mA(e,t,n){e.nodeValue=n}function S1(e){if(!e.__reactWarnedAboutChildrenConflict){var t=e[gn]||null;if(t!==null){var n=Un(e);n!==null&&(typeof t.children=="string"||typeof t.children=="number"?(e.__reactWarnedAboutChildrenConflict=!0,be(n,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):t.dangerouslySetInnerHTML!=null&&(e.__reactWarnedAboutChildrenConflict=!0,be(n,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function Sr(e){return e==="head"}function pA(e,t){e.removeChild(t)}function bA(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),So(t);return}r--}else if(n===Qc||n===Yr||n===Fi||n===al||n===Ii)r++;else if(n===ST)sc(e.ownerDocument.documentElement);else if(n===_T){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===ET&&sc(e.ownerDocument.body);n=l}while(n);So(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 yA(e){_1(e,!0)}function gA(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function vA(e){e.nodeValue=""}function xA(e){_1(e,!1)}function NA(e,t){t=t[AT],t=t!=null&&t.hasOwnProperty("display")?t.display:null,e.style.display=t==null||typeof t=="boolean"?"":(""+t).trim()}function wA(e,t){e.nodeValue=t}function bp(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":bp(n),or(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function SA(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 EA(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 yp(e){return e.data===Yr||e.data===Fi}function gp(e){return e.data===al||e.data===Yr&&e.ownerDocument.readyState!==pw}function _A(e,t){var n=e.ownerDocument;if(e.data===Fi)e._reactRetry=t;else if(e.data!==Yr||n.readyState!==pw)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===Qb||t===mw)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"?dp(e):c.value}return{type:t,props:n}}return e.nodeType===8?e.data===Ii?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function T1(e,t,n){return n===null||n[wT]!==!0?(e.nodeValue===t?e=null:(t=wr(t),e=wr(e.nodeValue)===t?null:e.nodeValue),e):null}function vp(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 C1(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 AA(e){So(e)}function DA(e){So(e)}function TA(e){So(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 CA(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=Tt(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Nw.has(l)||(Nw.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||OA(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=wo(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="'+Tt(e)+'"'}function ac(e){return'link[rel="stylesheet"]['+e+"]"}function M1(e){return $e({},e,{"data-precedence":e.precedence,precedence:null})}function OA(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|=vw}),on(t,"link",n),jt(t),e.head.appendChild(t))}function wo(e){return'[src="'+Tt(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~="'+Tt(n.href)+'"]');if(r)return t.instance=r,jt(r),r;var l=$e({},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))&&xp(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=wo(n.src),(l=e.querySelector(rc(c)))?(t.instance=l,jt(l),l):(r=n,(l=ps.get(c))&&(r=$e({},n),Np(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 xp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Np(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!==Co){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 RA(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=oA(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&xw)===Gi)}function jA(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=Tf.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))&&xp(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&xw)===Gi&&(e.count++,n=Tf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}function MA(e,t){return e.stylesheets&&e.count===0&&Cf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Cf(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},CT+t);0<e.imgBytes&&e0===0&&(e0=125*lA()*RT);var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cf(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>e0?50:OT)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(l)}}:null}function Tf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Cf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,kd=new Map,t.forEach(kA,e),kd=null,Tf.call(e))}function kA(e,t){if(!(t.state.loading&ms)){var n=kd.get(e);if(n)var r=n.get(t0);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(t0,r)}l=t.instance,f=l.getAttribute("data-precedence"),c=n.get(f)||r,c===r&&n.set(t0,l),n.set(f,l),this.count++,r=Tf.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 VA(e,t,n,r,l,c,f,h,y){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Yi,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Sl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sl(0),this.hiddenUpdates=Sl(null),this.identifierPrefix=r,this.onUncaughtError=l,this.onCaughtError=c,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],t=0;31>t;t++)e.push(new Set);this._debugRootType=n?"hydrateRoot()":"createRoot()"}function B1(e,t,n,r,l,c,f,h,y,x,k,V){return e=new VA(e,t,n,f,y,x,k,V,h),t=tT,c===!0&&(t|=mn|_s),t|=Ue,c=D(3,null,null,t),e.current=c,c.stateNode=e,t=Qh(),gi(t),e.pooledCache=t,gi(t),c.memoizedState={element:r,isDehydrated:n,cache:t},em(c),e}function q1(e){return e?(e=Rr,e):Rr}function wp(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&&!_w&&(_w=!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 UA(){return In}function zA(e,t,n,r){var l=Y.T;Y.T=null;var c=rt.p;try{rt.p=ss,Ep(e,t,n,r)}finally{rt.p=c,Y.T=l}}function BA(e,t,n,r){var l=Y.T;Y.T=null;var c=rt.p;try{rt.p=da,Ep(e,t,n,r)}finally{rt.p=c,Y.T=l}}function Ep(e,t,n,r){if(Ud){var l=_p(r);if(l===null)cp(e,t,r,zd,n),I1(e,r);else if(qA(l,e,t,n,r))r.stopPropagation();else if(I1(e,r),t&4&&-1<MT.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),(Ke&(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=_p(r),c===null&&cp(e,t,r,zd,n),c===l)break;l=c}l!==null&&r.stopPropagation()}else cp(e,t,r,null,n)}}function _p(e){return e=Oh(e),Ap(e)}function Ap(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=Se(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(QA()){case Lp:return ss;case Hp:return da;case Ao:case XA:return Ba;case Pp: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 qA(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=Se(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=_p(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 LA(){n0=!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,n0||(n0=!0,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,LA)))}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(Ap(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),Am(c,n,r,l))}}))}function So(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(Ap(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 Dp(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=pC(),Tp=QS(),HA=LT(),$e=Object.assign,PA=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"),Op=Symbol.for("react.consumer"),la=Symbol.for("react.context"),oc=Symbol.for("react.forward_ref"),Rp=Symbol.for("react.suspense"),jp=Symbol.for("react.suspense_list"),kf=Symbol.for("react.memo"),$n=Symbol.for("react.lazy"),Mp=Symbol.for("react.activity"),$A=Symbol.for("react.memo_cache_sentinel"),X1=Symbol.iterator,IA=Symbol.for("react.client.reference"),Gt=Array.isArray,Y=Tp.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rt=HA.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,FA=Object.freeze({pending:!1,data:null,method:null,action:null}),kp=[],Vp=[],za=-1,Er=le(null),lc=le(null),_r=le(null),Vf=le(null),cc=0,Z1,K1,W1,ex,tx,nx,sx;Ce.__reactDisabledLog=!0;var Up,ax,zp=!1,Bp=new(typeof WeakMap=="function"?WeakMap:Map),In=null,ca=!1,Es=Object.prototype.hasOwnProperty,qp=zt.unstable_scheduleCallback,YA=zt.unstable_cancelCallback,GA=zt.unstable_shouldYield,JA=zt.unstable_requestPaint,Kt=zt.unstable_now,QA=zt.unstable_getCurrentPriorityLevel,Lp=zt.unstable_ImmediatePriority,Hp=zt.unstable_UserBlockingPriority,Ao=zt.unstable_NormalPriority,XA=zt.unstable_LowPriority,Pp=zt.unstable_IdlePriority,ZA=zt.log,KA=zt.unstable_setDisableYieldValue,Do=null,hn=null,ua=!1,fa=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",yn=Math.clz32?Math.clz32:oi,WA=Math.log,eD=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,$p="__reactEvents$"+Ar,tD="__reactListeners$"+Ar,nD="__reactHandles$"+Ar,rx="__reactResources$"+Ar,uc="__reactMarker$"+Ar,ix=new Set,_i={},Ip={},sD={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},aD=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={},rD=/[\n"\\]/g,cx=!1,ux=!1,fx=!1,dx=!1,hx=!1,mx=!1,px=["value","defaultValue"],bx=!1,yx=/["'&<>\n\t]|^\s|\s$/,iD="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(" "),oD=gx.concat(["button"]),lD="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={},Fp={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-/,cD=/^(?:webkit|moz|o)[A-Z]/,uD=/^-ms-/,fD=/-(.)/g,wx=/;\s*$/,To={},Yp={},Sx=!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",Co="http://www.w3.org/2000/svg",dD=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={},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]*$"),Dx=!1,vn={},Tx=/^on./,pD=/^on[^A-Z]/,bD=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]*$"),yD=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]*$"),gD=/^[\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,Gp=!1,ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jp=!1;if(ha)try{var dc={};Object.defineProperty(dc,"passive",{get:function(){Jp=!0}}),window.addEventListener("test",dc,dc),window.removeEventListener("test",dc,dc)}catch{Jp=!1}var Tr=null,Qp=null,$f=null,Ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},If=Cn(Ai),hc=$e({},Ai,{view:0,detail:0}),vD=Cn(hc),Xp,Zp,mc,Ff=$e({},hc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rh,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"?(Xp=e.screenX-mc.screenX,Zp=e.screenY-mc.screenY):Zp=Xp=0,mc=e),Xp)},movementY:function(e){return"movementY"in e?e.movementY:Zp}}),Cx=Cn(Ff),xD=$e({},Ff,{dataTransfer:0}),ND=Cn(xD),wD=$e({},hc,{relatedTarget:0}),Kp=Cn(wD),SD=$e({},Ai,{animationName:0,elapsedTime:0,pseudoElement:0}),ED=Cn(SD),_D=$e({},Ai,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),AD=Cn(_D),DD=$e({},Ai,{data:0}),Ox=Cn(DD),TD=Ox,CD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},OD={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"},RD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},jD=$e({},hc,{key:function(e){if(e.key){var t=CD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?OD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rh,charCode:function(e){return e.type==="keypress"?Cu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),MD=Cn(jD),kD=$e({},Ff,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rx=Cn(kD),VD=$e({},hc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rh}),UD=Cn(VD),zD=$e({},Ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),BD=Cn(zD),qD=$e({},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}),LD=Cn(qD),HD=$e({},Ai,{newState:0,oldState:0}),PD=Cn(HD),$D=[9,13,27,32],jx=229,Wp=ha&&"CompositionEvent"in window,pc=null;ha&&"documentMode"in document&&(pc=document.documentMode);var ID=ha&&"TextEvent"in window&&!pc,Mx=ha&&(!Wp||pc&&8<pc&&11>=pc),kx=32,Vx=String.fromCharCode(kx),Ux=!1,Mo=!1,FD={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=f_("input")&&(!document.documentMode||9<document.documentMode));var xn=typeof Object.is=="function"?Object.is:y_,YD=ha&&"documentMode"in document&&11>=document.documentMode,ko=null,eb=null,gc=null,tb=!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")},nb={},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"),GD=di("transitionrun"),JD=di("transitionstart"),QD=di("transitioncancel"),Px=di("transitionend"),$x=new Map,sb="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(" ");sb.push("scrollEnd");var Ix=0;if(typeof performance=="object"&&typeof performance.now=="function")var XD=performance,Fx=function(){return XD.now()};else{var ZD=Date;Fx=function(){return ZD.now()}}var ab=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)},KD="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,rb=1,ib=2,ob=3,Gf="– ",Jf="+ ",Yx=" ",bt=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",as="Components ⚛",Ge="Scheduler ⚛",Qe="Blocking",Cr=!1,qa={color:"primary",properties:null,tooltipText:"",track:as},Or={start:-0,end:-0,detail:{devtools:qa}},WD=["Changed Props",""],Gx="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",eT=["Changed Props",Gx],vc=1,La=2,rs=[],Uo=0,lb=0,Rr={};Object.freeze(Rr);var is=null,zo=null,Te=0,tT=1,Ue=2,mn=8,_s=16,nT=32,Jx=!1;try{var Qx=Object.preventExtensions({})}catch{Jx=!0}var cb=new WeakMap,Bo=[],qo=0,Qf=null,xc=0,os=[],ls=0,Di=null,Ha=1,Pa="",cn=null,yt=null,Fe=!1,ma=!1,Fn=null,jr=null,cs=!1,ub=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."),fb=le(null),db=le(null),Xx={},Xf=null,Lo=null,Ho=!1,sT=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()})}},aT=zt.unstable_scheduleCallback,rT=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,Ti=-0,wt=-0,_e=-1.1,Ae=-1.1,Nt=null,Dt=!1,Ci=-0,pa=-1.1,wc=null,kr=0,hb=null,mb=null,Oi=-1.1,Sc=null,Po=-1.1,Wf=-1.1,Fa=-0,Ya=-1.1,us=-1.1,pb=0,Ec=null,Zx=null,Kx=null,Vr=-1.1,Ri=null,Ur=-1.1,ed=-1.1,Wx=-0,eN=-0,td=0,iT=null,tN=0,_c=-1.1,nd=!1,sd=!1,Ac=null,bb=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}E_(e,t)}nN!==null&&nN(e,t)};var Mi=le(null),As={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},Dc=[],Tc=[],Cc=[],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"&&Tc.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Cc.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<Tc.length&&(Tc.forEach(function(h){t.add(H(h)||"Component"),ki.add(h.type)}),Tc=[]);var n=new Set;0<Cc.length&&(Cc.forEach(function(h){n.add(H(h)||"Component"),ki.add(h.type)}),Cc=[]);var r=new Set;0<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=S(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=S(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=S(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=S(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=S(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=S(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=S(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=[],Tc=[],Cc=[],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}}},yb=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)}}},gb=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:""})}},oT=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}},lT=hN.react_stack_bottom_frame.bind(hN),mN={react_stack_bottom_frame:function(e,t,n){try{n()}catch(r){at(e,t,r)}}},cT=mN.react_stack_bottom_frame.bind(mN),pN={react_stack_bottom_frame:function(e){var t=e._init;return t(e._payload)}},uT=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`."),vb=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,ze=null,xb,bN=xb=!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,wN=1,SN=2,Nb=3,zr=!1,EN=!1,wb=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,wn=2,Gn=4,Sn=8,Jo,_N=new Set,AN=new Set,Eb=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,fT=0,dT=25,I=null,hs=null,Qa=-1,zc=!1,Bc={readContext:xt,use:xr,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct};Bc.useEffectEvent=Ct;var _b=null,TN=null,Ab=null,CN=null,ba=null,Ds=null,fd=null;_b={readContext:function(e){return xt(e)},use:xr,useCallback:function(e,t){return I="useCallback",Pe(),uo(t),wm(e,t)},useContext:function(e){return I="useContext",Pe(),xt(e)},useEffect:function(e,t){return I="useEffect",Pe(),uo(t),sf(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",Pe(),uo(n),Nm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",Pe(),uo(t),xi(4,wn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",Pe(),uo(t),xm(e,t)},useMemo:function(e,t){I="useMemo",Pe(),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",Pe();var r=Y.H;Y.H=ba;try{return fm(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",Pe(),gm(e)},useState:function(e){I="useState",Pe();var t=Y.H;Y.H=ba;try{return pm(e)}finally{Y.H=t}},useDebugValue:function(){I="useDebugValue",Pe()},useDeferredValue:function(e,t){return I="useDeferredValue",Pe(),Em(e,t)},useTransition:function(){return I="useTransition",Pe(),Dm()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",Pe(),hm(e,t,n)},useId:function(){return I="useId",Pe(),Tm()},useFormState:function(e,t){return I="useFormState",Pe(),Ku(),ho(e,t)},useActionState:function(e,t){return I="useActionState",Pe(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",Pe(),bm(e)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",Pe(),Cm()},useEffectEvent:function(e){return I="useEffectEvent",Pe(),vm(e)}},TN={readContext:function(e){return xt(e)},use:xr,useCallback:function(e,t){return I="useCallback",re(),wm(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(),Nm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",re(),xi(4,wn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",re(),xm(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 fm(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",re(),gm(e)},useState:function(e){I="useState",re();var t=Y.H;Y.H=ba;try{return pm(e)}finally{Y.H=t}},useDebugValue:function(){I="useDebugValue",re()},useDeferredValue:function(e,t){return I="useDeferredValue",re(),Em(e,t)},useTransition:function(){return I="useTransition",re(),Dm()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",re(),hm(e,t,n)},useId:function(){return I="useId",re(),Tm()},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(),bm(e)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),Cm()},useEffectEvent:function(e){return I="useEffectEvent",re(),vm(e)}},Ab={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,Sn,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,wn,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(ws)}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(),Sg(e,t)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",re(),af(e)}},CN={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,Sn,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,wn,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(ws)}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(),Pe(),wm(e,t)},useContext:function(e){return I="useContext",m(),Pe(),xt(e)},useEffect:function(e,t){return I="useEffect",m(),Pe(),sf(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",m(),Pe(),Nm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",m(),Pe(),xi(4,wn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",m(),Pe(),xm(e,t)},useMemo:function(e,t){I="useMemo",m(),Pe();var n=Y.H;Y.H=ba;try{return Sm(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",m(),Pe();var r=Y.H;Y.H=ba;try{return fm(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",m(),Pe(),gm(e)},useState:function(e){I="useState",m(),Pe();var t=Y.H;Y.H=ba;try{return pm(e)}finally{Y.H=t}},useDebugValue:function(){I="useDebugValue",m(),Pe()},useDeferredValue:function(e,t){return I="useDeferredValue",m(),Pe(),Em(e,t)},useTransition:function(){return I="useTransition",m(),Pe(),Dm()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",m(),Pe(),hm(e,t,n)},useId:function(){return I="useId",m(),Pe(),Tm()},useFormState:function(e,t){return I="useFormState",m(),Pe(),ho(e,t)},useActionState:function(e,t){return I="useActionState",m(),Pe(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",m(),Pe(),bm(e)},useMemoCache:function(e){return m(),vi(e)},useHostTransitionStatus:Ni,useCacheRefresh:function(){return I="useCacheRefresh",Pe(),Cm()},useEffectEvent:function(e){return I="useEffectEvent",m(),Pe(),vm(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,Sn,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,wn,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(ws)}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(),Sg(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,Sn,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,wn,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(ws)}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 Db={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Hn(e),l=br(r);l.payload=t,n!=null&&(Rm(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=wN,l.payload=t,n!=null&&(Rm(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=SN,t!=null&&(Rm(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,Tb=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={},Ob={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},YN=!1,GN=null;GN=new Set;var Xa=!1,Pt=!1,Rb=!1,JN=typeof WeakSet=="function"?WeakSet:Set,en=null,Ko=null,Wo=null,$t=null,Mn=!1,Ts=null,Jt=!1,qc=8192,hT={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 mT=[],pT=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,Ke=tn,dt=null,Le=null,Be=0,kn=0,pd=1,qi=2,Pc=3,XN=4,jb=5,$c=6,bd=7,Mb=8,Li=9,lt=kn,Qn=null,qr=!1,el=!1,kb=!1,ya=0,St=Za,Lr=0,Hr=0,Vb=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,Ub=1,zb=2,ew=3,$r=0,tw=1,nw=2,sw=3,aw=4,Nd=5,It=0,Ir=null,tl=null,Cs=0,Bb=0,qb=-0,Lb=null,rw=null,iw=null,Os=xd,ow=null,bT=50,Yc=0,Hb=null,Pb=!1,wd=!1,yT=50,Pi=0,Gc=null,nl=!1,Sd=null,lw=!1,cw=new Set,gT={},Ed=null,sl=null,$b=!1,Ib=!1,_d=!1,Fb=!1,Fr=0,Yb={};(function(){for(var e=0;e<sb.length;e++){var t=sb[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(GD,"onTransitionRun"),xs(JD,"onTransitionStart"),xs(QD,"onTransitionCancel"),xs(Px,"onTransitionEnd")})(),Ls("onMouseEnter",["mouseout","mouseover"]),Ls("onMouseLeave",["mouseout","mouseover"]),Ls("onPointerEnter",["pointerout","pointerover"]),Ls("onPointerLeave",["pointerout","pointerover"]),Ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ta("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ta("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(" "),Gb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jc)),Ad="_reactListening"+Math.random().toString(36).slice(2),uw=!1,fw=!1,Dd=!1,dw=!1,Td=!1,Cd=!1,hw=!1,Od={},vT=/\r\n?/g,xT=/\u0000|\uFFFD/g,$i="http://www.w3.org/1999/xlink",Jb="http://www.w3.org/XML/1998/namespace",NT="javascript:throw new Error('React form unexpectedly submitted.')",wT="suppressHydrationWarning",Ii="&",Rd="/&",Qc="$",Xc="/$",Yr="$?",Fi="$~",al="$!",ST="html",ET="body",_T="head",Qb="F!",mw="F",pw="loading",AT="style",Ka=0,rl=1,jd=2,Xb=null,Zb=null,bw={dialog:!0,webview:!0},Kb=null,Zc=void 0,yw=typeof setTimeout=="function"?setTimeout:void 0,DT=typeof clearTimeout=="function"?clearTimeout:void 0,Yi=-1,gw=typeof Promise=="function"?Promise:void 0,TT=typeof queueMicrotask=="function"?queueMicrotask:typeof gw<"u"?function(e){return gw.resolve(null).then(e).catch(uA)}:yw,Wb=null,Gi=0,Kc=1,vw=2,xw=3,ms=4,ps=new Map,Nw=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="'+Tt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Tt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Tt(n.imageSizes)+'"]')):l+='[href="'+Tt(e)+'"]';var c=l;switch(t){case"style":c=No(e);break;case"script":c=wo(e)}ps.has(c)||(e=$e({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="'+Tt(r)+'"][href="'+Tt(e)+'"]',c=l;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=wo(e)}if(!ps.has(c)&&(e=$e({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=wo(e),c=r.get(l);c||(c=n.querySelector(rc(l)),c||(e=$e({src:e,async:!0},t),(t=ps.get(l))&&Np(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=$e({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ps.get(c))&&xp(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|=vw}),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=wo(e),c=r.get(l);c||(c=n.querySelector(rc(l)),c||(e=$e({src:e,async:!0,type:"module"},t),(t=ps.get(l))&&Np(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,CT=6e4,OT=800,RT=500,e0=0,t0=null,kd=null,Ji=FA,Wc={$$typeof:la,Provider:null,Consumer:null,_currentValue:Ji,_currentValue2:Ji,_threadCount:0},ww="%c%s%c",Sw="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",Ew="",Vd=" ",jT=Function.prototype.bind,_w=!1,Aw=null,Dw=null,Tw=null,Cw=null,Ow=null,Rw=null,jw=null,Mw=null,kw=null,Vw=null;Aw=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=$e({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},Dw=function(e,t,n){t=i(e,t),t!==null&&(n=u(t.memoizedState,n,0),t.memoizedState=n,t.baseState=n,e.memoizedProps=$e({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},Tw=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=$e({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},Cw=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)},Ow=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)},Rw=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)},jw=function(e){var t=dn(e,2);t!==null&&At(t,e,2)},Mw=function(e){var t=wl(),n=dn(e,t);n!==null&&At(n,e,t)},kw=function(e){p=e},Vw=function(e){d=e};var Ud=!0,zd=null,n0=!1,Gr=null,Jr=null,Qr=null,eu=new Map,tu=new Map,Xr=[],MT="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=Dp.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);wp(r,l,n,t,null,null)},jf.prototype.unmount=Dp.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;(Ke&(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."),wp(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=Tp.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=q(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=Aw,e.overrideHookStateDeletePath=Dw,e.overrideHookStateRenamePath=Tw,e.overrideProps=Cw,e.overridePropsDeletePath=Ow,e.overridePropsRenamePath=Rw,e.scheduleUpdate=jw,e.scheduleRetry=Mw,e.setErrorHandler=kw,e.setSuspenseHandler=Vw,e.scheduleRefresh=z,e.scheduleRoot=B,e.setRefreshHandler=F,e.getCurrentFiber=UA,Eh(e)})()&&ha&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var Uw=window.location.protocol;/^(https?|file):$/.test(Uw)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(Uw==="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,lp(e),new Dp(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,lp(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 Fw;function yC(){return Fw||(Fw=1,a0.exports=bC()),a0.exports}var gC=yC();const vC="modulepreload",xC=function(i){return"/"+i},Yw={},Ie=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(S=>({status:"fulfilled",value:S}),S=>({status:"rejected",reason:S}))))};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=xC(v),v in Yw)return;Yw[v]=!0;const _=v.endsWith(".css"),S=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${S}`))return;const D=document.createElement("link");if(D.rel=_?"stylesheet":vC,_||(D.as="script"),D.crossOrigin="",D.href=v,g&&D.setAttribute("nonce",g),document.head.appendChild(D),_)return new Promise((B,z)=>{D.addEventListener("load",B),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 sE(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 aE(i){const s=sE(i);return!s||typeof s.exp!="number"?null:s.exp}function J0(i,s=0){const a=aE(i);return a===null?!0:Date.now()/1e3>=a-s}const S0="/api";let Wr=null;function Ld(i){Wr=i}function rE(){return Wr}async function Gw(){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=Gw().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=Gw().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 iE=U.createContext(null),NC=300;function o0(i,s){if(J0(i))return null;const a=sE(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 wC({children:i}){const[s,a]=U.useState(()=>{const S=sessionStorage.getItem("lt_token");return S?J0(S)?(sessionStorage.removeItem("lt_token"),null):(Ld(S),o0(S)):null}),o=U.useRef(void 0),u=U.useCallback(S=>{clearTimeout(o.current);const D=aE(S);if(!D)return;const B=(D-NC)*1e3-Date.now();B<=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{}},B))},[]),d=U.useCallback((S,D,B)=>{const z={displayName:(B==null?void 0:B.displayName)??null,username:(B==null?void 0:B.username)??(D==null?void 0:D.username)??null},F=o0(S,z);F&&(Ld(S),sessionStorage.setItem("lt_token",S),sessionStorage.setItem("lt_user_info",JSON.stringify(z)),D&&sessionStorage.setItem("lt_credentials",JSON.stringify(D)),a(F),u(S))},[u]),p=U.useCallback(()=>{clearTimeout(o.current),Ld(null),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info"),a(null)},[]);U.useEffect(()=>{const S=()=>p(),D=B=>{var X;const z=(X=B.detail)==null?void 0:X.token;if(!z)return;const F=o0(z);F&&(Ld(z),sessionStorage.setItem("lt_token",z),a(F),u(z))};return window.addEventListener("auth:unauthorized",S),window.addEventListener("auth:refreshed",D),()=>{window.removeEventListener("auth:unauthorized",S),window.removeEventListener("auth:refreshed",D)}},[p,u]),U.useEffect(()=>{const S=sessionStorage.getItem("lt_token");return S&&s&&u(S),()=>clearTimeout(o.current)},[]);const m=(s==null?void 0:s.roles.some(S=>S.type==="superadmin"))??!1,g=U.useCallback(S=>(s==null?void 0:s.roles.some(D=>D.role===S))??!1,[s]),v=U.useCallback(S=>(s==null?void 0:s.roles.some(D=>D.type===S))??!1,[s]),_=(s==null?void 0:s.roles.map(S=>S.role))??[];return b.jsxDEV(iE.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=U.useContext(iE);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 SC(...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]:SC(...s)}function Jw(i){return!i||i.length===0?"":Kn.decode(i)}const Qw="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",Xw=36,EC=0xcfd41b9100000,Zw=33,_C=333,Kw=22;function AC(i){for(let s=0;s<i.length;s++)i[s]=Math.floor(Math.random()*255)}function DC(i){var s;(s=globalThis==null?void 0:globalThis.crypto)!=null&&s.getRandomValues?globalThis.crypto.getRandomValues(i):AC(i)}class TC{constructor(){w(this,"buf");w(this,"seq");w(this,"inc");w(this,"inited");this.buf=new Uint8Array(Kw),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){this.seq=Math.floor(Math.random()*EC),this.inc=Math.floor(Math.random()*(_C-Zw)+Zw)}setPre(){const s=new Uint8Array(12);DC(s);for(let a=0;a<12;a++){const o=s[a]%36;this.buf[a]=Qw.charCodeAt(o)}}fillSeq(){let s=this.seq;for(let a=Kw-1;a>=12;a--)this.buf[a]=Qw.charCodeAt(s%Xw),s=Math.floor(s/Xw)}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 TC;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 CC(i){return typeof i.code=="string"}class oE{constructor(){w(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 OC.getMessage(s)}getMessage(s){return this.messages.get(s)||s}}const OC=new oE;class ge extends Error{constructor(a,o,u){super(a);w(this,"name");w(this,"message");w(this,"code");w(this,"permissionContext");w(this,"chainedError");w(this,"api_error");this.name="NatsError",this.message=a,this.code=o,this.chainedError=u}static errorForCode(a,o){const u=oE.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 rh="Nats-Service-Error",ih="Nats-Service-Error-Code";class oh extends Error{constructor(a,o){super(o);w(this,"code");this.code=a}static isServiceError(a){return oh.toServiceError(a)!==null}static toServiceError(a){var u,d;const o=((u=a==null?void 0:a.headers)==null?void 0:u.get(ih))||"";if(o!==""){const p=parseInt(o)||400,m=((d=a==null?void 0:a.headers)==null?void 0:d.get(rh))||"";return new oh(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 E0="127.0.0.1";var ti;(function(i){i.PING="PING",i.STATS="STATS",i.INFO="INFO"})(ti||(ti={}));function bh(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 lE(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 RC(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 RC(a>s?i[s]:i[a])}}}function Et(i){return i*1e6}function X0(i){return Math.floor(i/1e6)}function Ww(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 l0="NATS/1.0";class ni{constructor(s=0,a=""){w(this,"_code");w(this,"headers");w(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!==l0){let p=d.replace(l0,"").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=l0;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=Ww(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=Ww(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 _0(){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 cE(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){w(this,"_headers");w(this,"_msg");w(this,"_rdata");w(this,"_reply");w(this,"_subject");w(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}}w(Z0,"jc");function dl(i){return yh("durable",i)}function _n(i){return yh("stream",i)}function yh(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=jC(s);if(a.length)throw new Error(`invalid ${i} name - ${i} name ${a}`)}function jC(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 A0(i){if(i.data.length>0)return!1;const s=i.headers;return s?s.code>=100&&s.code<200:!1}function D0(i){var s;return A0(i)&&((s=i.headers)==null?void 0:s.description)==="Idle Heartbeat"}function MC(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?uE(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 kC(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 uE(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(){w(this,"inflight");w(this,"processed");w(this,"received");w(this,"noIterator");w(this,"iterClosed");w(this,"done");w(this,"signal");w(this,"yields");w(this,"filtered");w(this,"pendingFiltered");w(this,"ingestionFilterFn");w(this,"protocolFilterFn");w(this,"dispatchedFn");w(this,"ctx");w(this,"_data");w(this,"err");w(this,"time");w(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}){w(this,"interval");w(this,"maxOut");w(this,"cancelAfter");w(this,"timer");w(this,"autoCancelTimer");w(this,"last");w(this,"missed");w(this,"count");w(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 T0;(function(i){i.Limits="limits",i.Interest="interest",i.Workqueue="workqueue"})(T0||(T0={}));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 lh;(function(i){i.CreateOrUpdate="",i.Update="update",i.Create="create"})(lh||(lh={}));function VC(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 eS;(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"})(eS||(eS={}));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 tS;(function(i){i.Stream="Nats-Stream",i.Subject="Nats-Subject",i.Sequence="Nats-Sequence",i.LastSequence="Nats-Last-Sequence",i.Size="Nats-Msg-Size"})(tS||(tS={}));const Zn="KV_";class UC{constructor(s){w(this,"config");w(this,"ordered");w(this,"mack");w(this,"stream");w(this,"callbackFn");w(this,"max");w(this,"qname");w(this,"isBind");w(this,"filters");this.stream="",this.mack=!1,this.ordered=!1,this.config=VC("",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 UC(i)}function nS(i){return typeof i.getOpts=="function"}class zC{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(zC.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(){w(this,"buffers");w(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 BC(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 qC=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},su=qC.performance||{};su.now||su.mozNow||su.msNow||su.oNow||su.webkitNow;var sS={versions:{}},LC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function HC(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 c0,gh={exports:{}},aS={},rS=HC(BC({__proto__:null,default:aS},[aS]));c0=gh,(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&&sS.versions&&sS.versions.node;u?a=LC:o&&(a=self);var d=!a.JS_SHA256_NO_COMMON_JS&&c0.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],S=["hex","array","digest","arrayBuffer"],D=[];!a.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(q){return Object.prototype.toString.call(q)==="[object Array]"}),!p||!a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(q){return typeof q=="object"&&q.buffer&&q.buffer.constructor===ArrayBuffer});var B=function(q,ne){return function(oe){return new te(ne,!0).update(oe)[q]()}},z=function(q){var ne=B("hex",q);u&&(ne=F(ne,q)),ne.create=function(){return new te(q)},ne.update=function(Q){return ne.create().update(Q)};for(var oe=0;oe<S.length;++oe){var W=S[oe];ne[W]=B(W,q)}return ne},F=function(q,ne){var oe,W=rS,Q=rS.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"):q(le)}},X=function(q,ne){return function(oe,W){return new Se(oe,ne,!0).update(W)[q]()}},ee=function(q){var ne=X("hex",q);ne.create=function(Q){return new Se(Q,q)},ne.update=function(Q,H){return ne.create(Q).update(H)};for(var oe=0;oe<S.length;++oe){var W=S[oe];ne[W]=X(W,q)}return ne};function te(q,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],q?(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=q}function Se(q,ne,oe){var W,Q=typeof q;if(Q==="string"){var H,le=[],ie=q.length,ve=0;for(W=0;W<ie;++W)(H=q.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&q.charCodeAt(++W)),le[ve++]=240|H>>>18,le[ve++]=128|H>>>12&63,le[ve++]=128|H>>>6&63,le[ve++]=128|63&H);q=le}else{if(Q!=="object")throw new Error(i);if(q===null)throw new Error(i);if(p&&q.constructor===ArrayBuffer)q=new Uint8Array(q);else if(!(Array.isArray(q)||p&&ArrayBuffer.isView(q)))throw new Error(i)}q.length>64&&(q=new te(ne,!0).update(q).array());var Xe=[],nt=[];for(W=0;W<64;++W){var ae=q[W]||0;Xe[W]=92^ae,nt[W]=54^ae}te.call(this,ne,oe),this.update(nt),this.oKeyPad=Xe,this.inner=!0,this.sharedMemory=oe}te.prototype.update=function(q){if(!this.finalized){var ne,oe=typeof q;if(oe!=="string"){if(oe!=="object")throw new Error(i);if(q===null)throw new Error(i);if(p&&q.constructor===ArrayBuffer)q=new Uint8Array(q);else if(!(Array.isArray(q)||p&&ArrayBuffer.isView(q)))throw new Error(i);ne=!0}for(var W,Q,H=0,le=q.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]|=q[H]<<v[3&Q++];else for(Q=this.start;H<le&&Q<64;++H)(W=q.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&q.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 q=this.blocks,ne=this.lastByteIndex;q[16]=this.block,q[ne>>>2]|=g[3&ne],this.block=q[16],ne>=56&&(this.hashed||this.hash(),q[0]=this.block,q[16]=q[1]=q[2]=q[3]=q[4]=q[5]=q[6]=q[7]=q[8]=q[9]=q[10]=q[11]=q[12]=q[13]=q[14]=q[15]=0),q[14]=this.hBytes<<3|this.bytes>>>29,q[15]=this.bytes<<3,this.hash()}},te.prototype.hash=function(){var q,ne,oe,W,Q,H,le,ie,ve,Xe=this.h0,nt=this.h1,ae=this.h2,pe=this.h3,xe=this.h4,je=this.h5,Ce=this.h6,G=this.h7,Ne=this.blocks;for(q=16;q<64;++q)ne=((Q=Ne[q-15])>>>7|Q<<25)^(Q>>>18|Q<<14)^Q>>>3,oe=((Q=Ne[q-2])>>>17|Q<<15)^(Q>>>19|Q<<13)^Q>>>10,Ne[q]=Ne[q-16]+ne+Ne[q-7]+oe|0;for(ve=nt&ae,q=0;q<64;q+=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=(Xe>>>2|Xe<<30)^(Xe>>>13|Xe<<19)^(Xe>>>22|Xe<<10),W=(H=Xe&nt)^Xe&ae^ve,G=pe+(Q=G+(oe=(xe>>>6|xe<<26)^(xe>>>11|xe<<21)^(xe>>>25|xe<<7))+(xe&je^~xe&Ce)+_[q]+Ne[q])|0,pe=Q+(ne+W)|0),ne=(pe>>>2|pe<<30)^(pe>>>13|pe<<19)^(pe>>>22|pe<<10),W=(le=pe&Xe)^pe&nt^H,Ce=ae+(Q=Ce+(oe=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7))+(G&xe^~G&je)+_[q+1]+Ne[q+1])|0,ne=((ae=Q+(ne+W)|0)>>>2|ae<<30)^(ae>>>13|ae<<19)^(ae>>>22|ae<<10),W=(ie=ae&pe)^ae&Xe^le,je=nt+(Q=je+(oe=(Ce>>>6|Ce<<26)^(Ce>>>11|Ce<<21)^(Ce>>>25|Ce<<7))+(Ce&G^~Ce&xe)+_[q+2]+Ne[q+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=Xe+(Q=xe+(oe=(je>>>6|je<<26)^(je>>>11|je<<21)^(je>>>25|je<<7))+(je&Ce^~je&G)+_[q+3]+Ne[q+3])|0,Xe=Q+(ne+W)|0,this.chromeBugWorkAround=!0;this.h0=this.h0+Xe|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+Ce|0,this.h7=this.h7+G|0},te.prototype.hex=function(){this.finalize();var q=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[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[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 q=this.h0,ne=this.h1,oe=this.h2,W=this.h3,Q=this.h4,H=this.h5,le=this.h6,ie=this.h7,ve=[q>>>24&255,q>>>16&255,q>>>8&255,255&q,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 q=new ArrayBuffer(this.is224?28:32),ne=new DataView(q);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),q},Se.prototype=new te,Se.prototype.finalize=function(){if(te.prototype.finalize.call(this),this.inner){this.inner=!1;var q=this.array();te.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(q),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?c0.exports=De:(a.sha256=De.sha256,a.sha224=De.sha224)})();gh.exports;gh.exports.sha224;var iS=gh.exports.sha256;function O0(i){return GC(i)}function PC(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 $C(i){return/^[A-Za-z0-9\-_]*(={0,2})?$/.test(i)||/^[A-Za-z0-9+/]*(={0,2})?$/.test(i)}function IC(i){return PC(i)?"hex":$C(i)?"b64":""}function FC(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 YC(i){i=i.replace(/-/g,"+"),i=i.replace(/_/g,"/");const s=atob(i);return Uint8Array.from(s,a=>a.charCodeAt(0))}function GC(i){switch(IC(i)){case"hex":return FC(i);case"b64":return YC(i)}return null}function JC(i,s){const a=typeof i=="string"?O0(i):i,o=typeof s=="string"?O0(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 fE{constructor(s,a,o=!0){w(this,"token");w(this,"received");w(this,"ctx");w(this,"requestSubject");w(this,"mux");this.mux=s,this.requestSubject=a,this.received=0,this.token=ri.next(),o&&(this.ctx=new Error)}}class QC extends fE{constructor(a,o,u={maxWait:1e3}){super(a,o);w(this,"callback");w(this,"done");w(this,"timer");w(this,"max");w(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 dE extends fE{constructor(a,o,u={timeout:1e3},d=!0){super(a,o,d);w(this,"deferred");w(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 XC="$JS.API";function ZC(i){return i=i||{},i.domain&&(i.apiPrefix=`$JS.${i.domain}.API`,delete i.domain),bh({apiPrefix:XC,timeout:5e3},i)}class Nu{constructor(s,a){w(this,"nc");w(this,"opts");w(this,"prefix");w(this,"timeout");w(this,"jc");this.nc=s,this.opts=ZC(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=uE(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){w(this,"err");w(this,"offset");w(this,"pageInfo");w(this,"subject");w(this,"jsm");w(this,"filter");w(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 R0(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 tt;(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"})(tt||(tt={}));class KC{constructor(s){w(this,"server");w(this,"features");w(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(tt.JS_KV,"2.6.2"),this.set(tt.JS_OBJECTSTORE,"2.6.3"),this.set(tt.JS_PULL_MAX_BYTES,"2.8.3"),this.set(tt.JS_NEW_CONSUMER_CREATE_API,"2.9.0"),this.set(tt.JS_ALLOW_DIRECT,"2.9.0"),this.set(tt.JS_MULTIPLE_CONSUMER_FILTER,"2.10.0"),this.set(tt.JS_SIMPLIFICATION,"2.9.4"),this.set(tt.JS_STREAM_CONSUMER_METADATA,"2.10.0"),this.set(tt.JS_CONSUMER_FILTER_SUBJECTS,"2.10.0"),this.set(tt.JS_STREAM_FIRST_SEQ,"2.10.0"),this.set(tt.JS_STREAM_SUBJECT_TRANSFORM,"2.10.0"),this.set(tt.JS_STREAM_SOURCE_SUBJECT_TRANSFORM,"2.10.0"),this.set(tt.JS_STREAM_COMPRESSION,"2.10.0"),this.set(tt.JS_DEFAULT_CONSUMER_LIMITS,"2.10.0"),this.set(tt.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:R0(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)),R0(this.server,s)>=0}}class ch extends Nu{constructor(s,a){super(s,a)}async add(s,a,o=lh.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(tt.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{yh("name",g)}catch(D){const B=D.message,z=B.indexOf("cannot contain");throw z!==-1?new Error(`consumer 'name' ${B.substring(z)}`):D}let v,_="";if(Array.isArray(a.filter_subjects)){const{min:D,ok:B}=d.features.get(tt.JS_MULTIPLE_CONSUMER_FILTER);if(!B)throw new Error(`consumer 'filter_subjects' requires server ${D}`);m=!1}if(a.metadata){const{min:D,ok:B}=d.features.get(tt.JS_STREAM_CONSUMER_METADATA);if(!B)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),lh.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 WC extends sn{constructor(a,o,u){super();w(this,"sub");w(this,"adapter");w(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=(_,S)=>{this.callback(_,S)};if(u.callback){const _=u.callback;d=(S,D)=>{const[B,z]=this.adapter(S,D);if(B){_(B,null);return}const{ingest:F}=this.ingestionFilterFn?this.ingestionFilterFn(z,this):{ingest:!0};F&&(!this.protocolFilterFn||this.protocolFilterFn(z))&&(_(B,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 e3(i){Wn=i}function hE(){return Wn!==void 0&&Wn.defaultPort!==void 0?Wn.defaultPort:4222}function u0(){return Wn!==void 0&&Wn.urlParseFn?Wn.urlParseFn:void 0}function t3(){if(!Wn||typeof Wn.factory!="function")throw new Error("transport fn is not set");return Wn.factory()}function j0(){return Wn!==void 0&&Wn.dnsResolveFn?Wn.dnsResolveFn:void 0}const Zd=`\r
|
|
255
|
+
`,uh=gl.fromAscii(Zd),n3=new Uint8Array(uh)[0],s3=new Uint8Array(uh)[1];function a3(i){for(let s=0;s<i.length;s++){const a=s+1;if(i.byteLength>a&&i[s]===n3&&i[a]===s3)return a+1}return 0}function r3(i){const s=a3(i);if(s>0){const o=new Uint8Array(i).slice(0,s);return Kn.decode(o)}return""}const i3=4,mE=48,o3=65,l3=97;function c3(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 M0(i){return u3(i)!==void 0}function u3(i){for(let s=0;s<i.length;s++)switch(i[s]){case".":return pE(i);case":":return f3(i)}}function pE(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}=d3(i);if(!d||o>255)return;i=i.substring(u),s[a]=o}return c3(s[0],s[1],s[2],s[3])}function f3(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}=h3(i);if(!p||u>65535)return;if(d<i.length&&i[d]==="."){if(a<0&&o!=12||o+4>16)return;const m=pE(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+=i3;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 d3(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)-mE),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 h3(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)-mE;else if(97<=i.charCodeAt(a)&&i.charCodeAt(a)<=102)s*=16,s+=i.charCodeAt(a)-l3+10;else if(65<=i.charCodeAt(a)&&i.charCodeAt(a)<=70)s*=16,s+=i.charCodeAt(a)-o3+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 m3(i){return i.indexOf("[")!==-1||i.indexOf("::")!==-1?!1:i.indexOf(".")!==-1||i.split(":").length<=2}function k0(i){return!m3(i)}function p3(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 b3(i){i=i.trim(),i.match(/^(.*:\/\/)(.*)/m)&&(i=i.replace(/^(.*:\/\/)(.*)/gm,"$2")),i=p3(i),k0(i)&&i.indexOf("[")===-1&&(i=`[${i}]`);const s=k0(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){w(this,"src");w(this,"listen");w(this,"hostname");w(this,"port");w(this,"didConnect");w(this,"reconnects");w(this,"lastConnect");w(this,"gossiped");w(this,"tlsName");w(this,"resolves");this.src=s,this.tlsName="";const o=b3(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(M0(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}://${k0(u)?"["+u+"]":u}`);p.port=`${this.port}`;const m=new hu(p.host,!1);m.tlsName=this.hostname,a.push(m)}}return s.randomize&&lE(a),this.resolves=a,a}}class y3{constructor(s=[],a={}){w(this,"firstSelect");w(this,"servers");w(this,"currentServer");w(this,"tlsName");w(this,"randomize");this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=a.randomize||!1;const o=u0();s&&(s.forEach(u=>{u=o?o(u):u,this.servers.push(new hu(u))}),this.randomize&&(this.servers=lE(this.servers))),this.servers.length===0&&this.addServer(`${E0}:${hE()}`,!1),this.currentServer=this.servers[0]}clear(){this.servers.length=0}updateTLSName(){const s=this.getCurrentServer();M0(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=u0();s=o?o(s):s;const u=new hu(s,a);M0(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=u0(),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 g3{constructor(){w(this,"baseInbox");w(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=cE(a)),u.resolver(s,a))}}}close(){const s=ge.errorForCode(ue.Timeout);this.reqs.forEach(a=>{a.resolver(s,{})})}}class v3{constructor(s,a,o){w(this,"ph");w(this,"interval");w(this,"maxOut");w(this,"timer");w(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 x3 extends Error{constructor(s){super(s),this.name="AssertionError"}}function N3(i,s="Assertion failed."){if(!i)throw new x3(s)}const oS=32*1024,f0=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 d0{constructor(s){w(this,"_buf");w(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){N3(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>f0)throw new Error("The buffer cannot be grown beyond the maximum size.");{const d=new Uint8Array(Math.min(2*u+s,f0));Pd(this._buf.subarray(this._off),d),this._buf=d}}return this._off=0,this._reslice(Math.min(a+s,f0)),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(oS);for(;;){const u=this.capacity-this.length<oS,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 lS(){const i={};return i.sid=-1,i.hdr=-1,i.size=-1,i}const w3=48;class cS{constructor(s){w(this,"dispatcher");w(this,"state");w(this,"as");w(this,"drop");w(this,"hdr");w(this,"ma");w(this,"argBuf");w(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=lS();break;case he.H:case he.h:this.state=de.OP_H,this.hdr=0,this.ma=lS();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 d0(s.subarray(this.as,a-this.drop))),this.state===de.MSG_PAYLOAD&&!this.msgBuf&&(this.argBuf||this.cloneMsgArg(),this.msgBuf=new d0(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 d0(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]-w3)}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]),S=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]),B=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],T=N[A+4]<<24|N[A+5]<<16|N[A+6]<<8|N[A+7];return new s(E,T)}function ee(N,A,E){var T;for(T=0;T<4;T++)N[A+T]=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 Se(N,A,E,T,M){var L,Z=0;for(L=0;L<M;L++)Z|=N[A+L]^E[T+L];return(1&Z-1>>>8)-1}function De(N,A,E,T){return Se(N,A,E,T,16)}function q(N,A,E,T){return Se(N,A,E,T,32)}function ne(N,A,E,T,M){var L=new Uint32Array(16),Z=new Uint32Array(16),se=new Uint32Array(16),$=new Uint32Array(4),K,ye,qe;for(K=0;K<4;K++)Z[5*K]=F(T,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(qe=0;qe<4;qe++)$[qe]=Z[(5*ye+4*qe)%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),qe=0;qe<4;qe++)L[4*ye+(ye+qe)%4]=$[qe]}for(qe=0;qe<16;qe++)Z[qe]=L[qe]}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(T,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,T){return ne(N,A,E,T,!1),0}function W(N,A,E,T){return ne(N,A,E,T,!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,T,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[T+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&&(T+=64)}if(M>0)for(oe($,se,Z,Q),ye=0;ye<M;ye++)N[A+ye]=(E?E[T+ye]:0)^$[ye];return 0}function le(N,A,E,T,M){return H(N,A,null,0,E,T,M)}function ie(N,A,E,T,M){var L=new Uint8Array(32);return W(L,T,M,Q),le(N,A,E,T.subarray(16),L)}function ve(N,A,E,T,M,L,Z){var se=new Uint8Array(32);return W(se,L,Z,Q),H(N,A,E,T,M,L.subarray(16),se)}function Xe(N,A){var E,T=0;for(E=0;E<17;E++)T=T+(N[E]+A[E]|0)|0,N[E]=T&255,T>>>=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,T,M,L){var Z,se,$,K,ye=new Uint32Array(17),qe=new Uint32Array(17),it=new Uint32Array(17),pn=new Uint32Array(17),fr=new Uint32Array(17);for($=0;$<17;$++)qe[$]=it[$]=0;for($=0;$<16;$++)qe[$]=L[$];for(qe[3]&=15,qe[4]&=252,qe[7]&=15,qe[8]&=252,qe[11]&=15,qe[12]&=252,qe[15]&=15;M>0;){for($=0;$<17;$++)pn[$]=0;for($=0;$<16&&$<M;++$)pn[$]=E[T+$];for(pn[$]=1,T+=$,M-=$,Xe(it,pn),se=0;se<17;se++)for(ye[se]=0,$=0;$<17;$++)ye[se]=ye[se]+it[$]*($<=se?qe[se-$]:320*qe[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(Xe(it,nt),Z=-(it[16]>>>7)|0,$=0;$<17;$++)it[$]^=Z&(fr[$]^it[$]);for($=0;$<16;$++)pn[$]=L[$+16];for(pn[16]=0,Xe(it,pn),$=0;$<16;$++)N[A+$]=it[$];return 0}function pe(N,A,E,T,M,L){var Z=new Uint8Array(16);return ae(Z,0,E,T,M,L),De(N,A,Z,0)}function xe(N,A,E,T,M){var L;if(E<32)return-1;for(ve(N,0,A,0,E,T,M),ae(N,16,N,32,E-32,N),L=0;L<16;L++)N[L]=0;return 0}function je(N,A,E,T,M){var L,Z=new Uint8Array(32);if(E<32||(ie(Z,0,32,T,M),pe(A,16,A,32,E-32,Z)!==0))return-1;for(ve(N,0,A,0,E,T,M),L=0;L<32;L++)N[L]=0;return 0}function Ce(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 T,M=~(E-1),L=0;L<16;L++)T=M&(N[L]^A[L]),N[L]^=T,A[L]^=T}function Ze(N,A){var E,T,M,L=a(),Z=a();for(E=0;E<16;E++)Z[E]=A[E];for(G(Z),G(Z),G(Z),T=0;T<2;T++){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 He(N,A){var E=new Uint8Array(32),T=new Uint8Array(32);return Ze(E,N),Ze(T,A),q(E,0,T,0)}function Yt(N){var A=new Uint8Array(32);return Ze(A,N),A[0]&1}function Sa(N,A){var E;for(E=0;E<16;E++)N[E]=A[2*E]+(A[2*E+1]<<8);N[15]&=32767}function et(N,A,E){var T;for(T=0;T<16;T++)N[T]=A[T]+E[T]|0}function Rt(N,A,E){var T;for(T=0;T<16;T++)N[T]=A[T]-E[T]|0}function Me(N,A,E){var T,M,L=new Float64Array(31);for(T=0;T<31;T++)L[T]=0;for(T=0;T<16;T++)for(M=0;M<16;M++)L[T+M]+=A[T]*E[M];for(T=0;T<15;T++)L[T]+=38*L[T+16];for(T=0;T<16;T++)N[T]=L[T];G(N),G(N)}function un(N,A){Me(N,A,A)}function be(N,A){var E=a(),T;for(T=0;T<16;T++)E[T]=A[T];for(T=253;T>=0;T--)un(E,E),T!==2&&T!==4&&Me(E,E,A);for(T=0;T<16;T++)N[T]=E[T]}function eo(N,A){var E=a(),T;for(T=0;T<16;T++)E[T]=A[T];for(T=250;T>=0;T--)un(E,E),T!==1&&Me(E,E,A);for(T=0;T<16;T++)N[T]=E[T]}function Ea(N,A,E){var T=new Uint8Array(32),M=new Float64Array(80),L,Z,se=a(),$=a(),K=a(),ye=a(),qe=a(),it=a();for(Z=0;Z<31;Z++)T[Z]=A[Z];for(T[31]=A[31]&127|64,T[0]&=248,Sa(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=T[Z>>>3]>>>(Z&7)&1,Ne(se,$,L),Ne(K,ye,L),et(qe,se,K),Rt(se,se,K),et(K,$,ye),Rt($,$,ye),un(ye,qe),un(it,se),Me(se,K,se),Me(K,$,qe),et(qe,se,K),Rt(se,se,K),un($,se),Rt(K,ye,it),Me(se,K,g),et(se,se,ye),Me(K,K,se),Me(se,ye,it),Me(ye,$,M),un($,qe),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),Ze(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 T=new Uint8Array(32);return Ea(T,E,A),W(N,u,T,Q)}var to=xe,Nl=je;function Eh(N,A,E,T,M,L){var Z=new Uint8Array(32);return st(Z,M,L),to(N,A,E,T,Z)}function pt(N,A,E,T,M,L){var Z=new Uint8Array(32);return st(Z,M,L),Nl(N,A,E,T,Z)}function oi(){var N=0,A=0,E=0,T=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,T+=Z>>>16;return A+=N>>>16,E+=A>>>16,T+=E>>>16,new s(E&M|T<<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,T,M=32-A;return A<32?(E=N.hi>>>A|N.lo<<M,T=N.lo>>>A|N.hi<<M):A<64&&(E=N.lo>>>A|N.hi<<M,T=N.hi>>>A|N.lo<<M),new s(E,T)}function _h(N,A,E){var T=N.hi&A.hi^~N.hi&E.hi,M=N.lo&A.lo^~N.lo&E.lo;return new s(T,M)}function wl(N,A,E){var T=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(T,M)}function Sl(N){return Aa(fn(N,28),fn(N,34),fn(N,39))}function li(N){return Aa(fn(N,14),fn(N,18),fn(N,41))}function Ah(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 T=[],M=[],L=[],Z=[],se,$,K;for($=0;$<8;$++)T[$]=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]),_h(L[4],L[5],L[6]),_u[$],Z[$%16]),M[7]=oi(se,Sl(L[0]),wl(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],Ah(Z[(K+1)%16]),Eu(Z[(K+14)%16]))}for($=0;$<8;$++)L[$]=oi(L[$],T[$]),T[$]=L[$];ye+=128,E-=128}for($=0;$<8;$++)te(N,8*$,T[$]);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 T=new Uint8Array(64),M=new Uint8Array(256),L,Z=E;for(L=0;L<64;L++)T[L]=_l[L];for(El(T,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(T,M,E),L=0;L<64;L++)N[L]=T[L];return 0}function ci(N,A){var E=a(),T=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),et(T,N[0],N[1]),et(ye,A[0],A[1]),Me(T,T,ye),Me(M,N[3],A[3]),Me(M,M,_),Me(L,N[2],A[2]),et(L,L,L),Rt(Z,T,E),Rt(se,L,M),et($,L,M),et(K,T,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 T;for(T=0;T<4;T++)Ne(N[T],A[T],E)}function so(N,A){var E=a(),T=a(),M=a();be(M,A[2]),Me(E,A[0],M),Me(T,A[1],M),Ze(N,T),N[31]^=Yt(E)<<7}function ao(N,A,E){var T,M;for(Ce(N[0],p),Ce(N[1],m),Ce(N[2],m),Ce(N[3],p),M=255;M>=0;--M)T=E[M/8|0]>>(M&7)&1,no(N,A,T),ci(A,N),ci(N,N),no(N,A,T)}function or(N,A){var E=[a(),a(),a(),a()];Ce(E[0],S),Ce(E[1],D),Ce(E[2],m),Me(E[3],S,D),ao(N,E,A)}function Bs(N,A,E){var T=new Uint8Array(64),M=[a(),a(),a(),a()],L;for(E||o(A,32),zs(T,A,32),T[0]&=248,T[31]&=127,T[31]|=64,or(M,T),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,T,M,L;for(T=63;T>=32;--T){for(E=0,M=T-32,L=T-12;M<L;++M)A[M]+=E-16*A[T]*Un[M-(T-32)],E=Math.floor((A[M]+128)/256),A[M]-=E*256;A[M]+=E,A[T]=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(T=0;T<32;T++)A[T+1]+=A[T]>>8,N[T]=A[T]&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,T){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,T,32),M[0]&=248,M[31]&=127,M[31]|=64;var qe=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]=T[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),qe}function Ta(N,A){var E=a(),T=a(),M=a(),L=a(),Z=a(),se=a(),$=a();return Ce(N[2],m),Sa(N[1],A),un(M,N[1]),Me(L,M,v),Rt(M,M,N[2]),et(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(T,N[0]),Me(T,T,L),He(T,M)&&Me(N[0],N[0],B),un(T,N[0]),Me(T,T,L),He(T,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,T){var M,L=new Uint8Array(32),Z=new Uint8Array(64),se=[a(),a(),a(),a()],$=[a(),a(),a(),a()];if(E<64||Ta($,T))return-1;for(M=0;M<E;M++)N[M]=A[M];for(M=0;M<32;M++)N[M+32]=T[M];if(zs(Z,N,E),qs(Z),ao(se,$,Z),or($,A.subarray(32)),ci(se,$),so(L,se),E-=64,q(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,Tn=32,Xt=32,ur=32,Al=32,ro=lr,Au=cr,io=vs,Tt=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:q,crypto_secretbox:xe,crypto_secretbox_open:je,crypto_scalarmult:Ea,crypto_scalarmult_base:_a,crypto_box_beforenm:st,crypto_box_afternm:to,crypto_box:Eh,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:Tn,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:Tt,crypto_sign_PUBLICKEYBYTES:$s,crypto_sign_SECRETKEYBYTES:Is,crypto_sign_SEEDBYTES:oo,crypto_hash_BYTES:ui,gf:a,D:v,L:Un,pack25519:Ze,unpack25519:Sa,M:Me,A:et,S:un,Z:Rt,pow2523:eo,add:ci,set25519:Ce,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 Tl(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 T=new Uint8Array(cr+N.length),M=new Uint8Array(T.length),L=0;L<N.length;L++)T[L+cr]=N[L];return xe(M,T,T.length,A,E),M.subarray(vs)},i.secretbox.open=function(N,A,E){Ut(N,A,E),Dl(E,A);for(var T=new Uint8Array(vs+N.length),M=new Uint8Array(T.length),L=0;L<N.length;L++)T[L+vs]=N[L];return T.length<32||je(M,T,T.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!==Tn)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!==Tn)throw new Error("bad n size");var A=new Uint8Array(Ps);return _a(A,N),A},i.scalarMult.scalarLength=Tn,i.scalarMult.groupElementLength=Ps,i.box=function(N,A,E,T){var M=i.box.before(E,T);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,T){var M=i.box.before(E,T);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(Tt+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),T=Ls(E,N,N.length,A);if(T<0)return null;for(var M=new Uint8Array(T),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),T=new Uint8Array(Tt),M=0;M<T.length;M++)T[M]=E[M];return T},i.sign.detached.verify=function(N,A,E){if(Ut(N,A,E),A.length!==Tt)throw new Error("bad signature size");if(E.length!==$s)throw new Error("bad public key size");var T=new Uint8Array(Tt+N.length),M=new Uint8Array(Tt+N.length),L;for(L=0;L<Tt;L++)T[L]=A[L];for(L=0;L<N.length;L++)T[L+Tt]=N[L];return Ls(M,T,T.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),T=0;T<32;T++)E[T]=N[T];return Bs(A,E,!0),{publicKey:A,secretKey:E}},i.sign.publicKeyLength=$s,i.sign.secretKeyLength=Is,i.sign.seedLength=oo,i.sign.signatureLength=Tt,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:Se(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,T){var M,L=new Uint8Array(T);for(M=0;M<T;M+=A)N.getRandomValues(L.subarray(M,M+Math.min(T-M,A)));for(M=0;M<T;M++)E[M]=L[M];Tl(L)})}else typeof require<"u"&&(N=require("crypto"),N&&N.randomBytes&&i.setPRNG(function(E,T){var M,L=N.randomBytes(T);for(M=0;M<T;M++)E[M]=L[M];Tl(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 uS;(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"})(uS||(uS={}));var fS;(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"})(fS||(fS={}));function S3(i){return s=>{let a={};return i.forEach(o=>{const u=o(s)||{};a=Object.assign(a,u)}),a}}function E3(){return()=>{}}function _3(i,s){return()=>{const a=typeof i=="function"?i():i,o=typeof s=="function"?s():s;return{user:a,pass:o}}}function A3(i){return()=>({auth_token:typeof i=="function"?i():i})}const bE=120*1e3,D3=2,yE=2*1e3;function T3(){return{maxPingOut:2,maxReconnectAttempts:10,noRandomize:!1,pedantic:!1,pingInterval:bE,reconnect:!0,reconnectJitter:100,reconnectJitterTLS:1e3,reconnectTimeWait:yE,tls:void 0,verbose:!1,waitOnFirstConnect:!1,ignoreAuthErrorAbort:!1}}function C3(i){const s=[];return typeof i.authenticator=="function"&&s.push(i.authenticator),Array.isArray(i.authenticator)&&s.push(...i.authenticator),i.token&&s.push(A3(i.token)),i.user&&s.push(_3(i.user,i.pass)),s.length===0?E3():S3(s)}function O3(i){const s=`${E0}:${hE()}`;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=[`${E0}:${i.port}`]),i.servers&&i.servers.length===0&&(i.servers=[s]);const a=bh(T3(),i);if(a.authenticator=C3(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 j0()=="function"),a.resolve&&typeof j0()!="function")throw new ge("'resolve' is not supported on this client",ue.InvalidOption);return a}function R3(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 j3=1024*32,M3=/^INFO\s+([^\r\n]+)\r\n/i,k3=fu(`PONG\r
|
|
256
|
+
`),dS=fu(`PING\r
|
|
257
|
+
`);class V3{constructor(s,a,o){w(this,"echo");w(this,"no_responders");w(this,"protocol");w(this,"verbose");w(this,"pedantic");w(this,"jwt");w(this,"nkey");w(this,"sig");w(this,"user");w(this,"pass");w(this,"auth_token");w(this,"tls_required");w(this,"name");w(this,"lang");w(this,"version");w(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):{})||{};bh(this,u)}}class gE extends sn{constructor(a,o,u={}){var p;super();w(this,"sid");w(this,"queue");w(this,"draining");w(this,"max");w(this,"subject");w(this,"drained");w(this,"protocol");w(this,"timer");w(this,"info");w(this,"cleanupFn");w(this,"closed");w(this,"requestSubject");bh(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 U3{constructor(){w(this,"mux");w(this,"subs");w(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 fh{constructor(s,a){w(this,"connected");w(this,"connectedOnce");w(this,"infoReceived");w(this,"info");w(this,"muxSubscriptions");w(this,"options");w(this,"outbound");w(this,"pongs");w(this,"subscriptions");w(this,"transport");w(this,"noMorePublishing");w(this,"connectError");w(this,"publisher");w(this,"_closed");w(this,"closed");w(this,"listeners");w(this,"heartbeats");w(this,"parser");w(this,"outMsgs");w(this,"inMsgs");w(this,"outBytes");w(this,"inBytes");w(this,"pendingLimit");w(this,"lastError");w(this,"abortReconnect");w(this,"whyClosed");w(this,"servers");w(this,"server");w(this,"features");w(this,"connectPromise");this._closed=!1,this.connected=!1,this.connectedOnce=!1,this.infoReceived=!1,this.noMorePublishing=!1,this.abortReconnect=!1,this.listeners=[],this.pendingLimit=j3,this.outMsgs=0,this.inMsgs=0,this.outBytes=0,this.inBytes=0,this.options=s,this.publisher=a,this.subscriptions=new U3,this.muxSubscriptions=new g3,this.outbound=new gl,this.pongs=[],this.whyClosed="",this.pendingLimit=s.pendingLimit||this.pendingLimit,this.features=new KC({major:0,minor:0,micro:0}),this.connectPromise=null;const o=typeof s.servers=="string"?[s.servers]:s.servers;this.servers=new y3(o,{randomize:!s.noRandomize}),this.closed=_t(),this.parser=new cS(this),this.heartbeats=new v3(this,this.options.pingInterval||bE,this.options.maxPingOut||D3)}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 cS(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=t3(),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:j0(),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():yE;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 fh(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=Jw(s),o=fh.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(k3)}processPong(){const s=this.pongs.shift();s&&s.resolve()}processInfo(s){const a=JSON.parse(Jw(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 V3({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(dS)}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,uh)):(o.reply?g=`PUB ${s} ${o.reply} ${d}\r
|
|
260
|
+
`:g=`PUB ${s} ${d}\r
|
|
261
|
+
`,this.sendCommand(g,u,uh))}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(dS),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 gE(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 z3="$SRV";class hS{constructor(s){w(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(ih,`${s}`),(p=u.headers)==null||p.set(rh,a),this.msg.respond(o,u)}json(s){return this.msg.json(s)}string(){return this.msg.string()}}class yu{constructor(s,a="",o=""){w(this,"subject");w(this,"queue");w(this,"srv");a!==""&&q3("service group",a);let u="";if(s instanceof wu)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,B3("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 B3(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 q3(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 wu{constructor(s,a={name:"",version:""}){w(this,"nc");w(this,"_id");w(this,"config");w(this,"handlers");w(this,"internal");w(this,"_stopped");w(this,"_done");w(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??z3;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 oh){const o=s;a.set(rh,o.message),a.set(ih,`${o.code}`)}else a.set(rh,s.message),a.set(ih,"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 L3(u,d,o),m.queue=o;const g=p?(v,_)=>{if(v){this.close(v);return}const S=Date.now();try{p(v,new hS(_))}catch(D){m.stats.countError(D),_==null||_.respond(es,{headers:this.errorToHeader(D)})}finally{m.stats.countLatency(S)}}: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=wu.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 hS(d))},a.iterClosed.then(()=>{this.close().catch()}));const o=this.setupHandler(s,!1);return o.qi=a,this.handlers.push(o),a}}class L3{constructor(s,a,o=""){w(this,"name");w(this,"subject");w(this,"average_processing_time");w(this,"num_requests");w(this,"processing_time");w(this,"num_errors");w(this,"last_error");w(this,"data");w(this,"metadata");w(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 H3{constructor(s,a={strategy:Ms.JitterTimer,maxWait:2e3},o){w(this,"nc");w(this,"prefix");w(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=wu.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 vE(){return{key:{encode(i){return i},decode(i){return i}},value:{encode(i){return i},decode(i){return i}}}}function P3(){return{replicas:1,history:1,timeout:2e3,max_bytes:-1,maxValueSize:-1,codec:vE(),storage:C0.File}}const dh="KV-Operation",mS="$KV",$3=/^[-/=.\w]+$/,I3=/^[-/=.>*\w]+$/,F3=/^[-\w]+$/;function Y3(i){if(i.startsWith(".")||i.endsWith(".")||!$3.test(i))throw new Error(`invalid key: ${i}`)}function G3(i){if(i.startsWith(".")||i.endsWith(".")||!I3.test(i))throw new Error(`invalid key: ${i}`)}function J3(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(!F3.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){w(this,"js");w(this,"jsm");w(this,"stream");w(this,"bucket");w(this,"direct");w(this,"codec");w(this,"prefix");w(this,"editPrefix");w(this,"useJsPrefix");w(this,"_prefixLen");w(this,"validateKey",Y3);w(this,"validateSearchKey",G3);w(this,"hasWildcards",J3);Kd(s),this.js=a,this.jsm=o,this.bucket=s,this.prefix=mS,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||vE(),p.direct=d.config.allow_direct??!1,p.initializePrefixes(d),p}async init(s={}){const a=Object.assign(P3(),s);this.codec=a.codec;const o={};this.stream=o.name=s.streamName??this.bucketName(),o.retention=T0.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 S=Object.assign({},s.mirror);S.name.startsWith(Zn)||(S.name=`${Zn}${S.name}`),o.mirror=S,o.mirror_direct=!0}else if(s.sources){const S=s.sources.map(D=>{const B=Object.assign({},D),z=B.name.startsWith(Zn)?B.name.substring(Zn.length):B.name;return B.name.startsWith(Zn)||(B.name=`${Zn}${B.name}`),!D.external&&z!==this.bucket&&(B.subject_transforms=[{src:`$KV.${z}.>`,dest:`$KV.${this.bucket}.>`}]),B});o.sources=S,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?R0(p,Xi("2.7.2"))>=0:!1;o.discard=m?bu.New:bu.Old;const{ok:g,min:v}=d.features.get(tt.JS_ALLOW_DIRECT);if(!g&&s.allow_direct===!0){const S=p?`${p.major}.${p.minor}.${p.micro}`:"unknown";return Promise.reject(new Error(`allow_direct is not available on server version ${S} - 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(S){if(S.message==="stream not found")_=await this.jsm.streams.add(o);else throw S}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}`:`${mS}.${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 cO(this.bucket,this.prefixLen,s)}jmToEntry(s){const a=this.decodeKey(s.subject.substring(this.prefixLen));return new uO(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(dh,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((S,D)=>{if(S){o.stop(S);return}if(D){const B=this.jmToEntry(D);o.push(B),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:S}}=_,D=S.num_pending+S.delivered.consumer_seq;if(D===0||o.received>=D)try{d()}catch(B){o.stop(B)}finally{d=void 0}else p=D}return o._data=_,o.iterClosed.then(()=>{_.unsubscribe()}),_.closed.then(()=>{o.stop()}).catch(S=>{o.stop(S)}),o}canSetWatcherName(){const a=this.js.nc,{ok:o}=a.features.get(tt.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,S=si(v);this.canSetWatcherName()&&S.consumerName(ri.next()),S.bindStream(this.stream),s.resumeFromRevision&&s.resumeFromRevision>0&&S.startSequence(s.resumeFromRevision),S.orderedConsumer(),S.callback((B,z)=>{if(B){o.stop(B);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(_,S);if(m){const{info:{last:B}}=D,z=B.num_pending+B.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(B=>{o.stop(B)}),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(dh);if(_!=="DEL"&&_!=="PURGE"){const S=this.decodeKey(v.subject.substring(this.prefixLen));a.push(S)}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 xE(u,a)}}class xE{constructor(s,a=""){w(this,"si");w(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_",pS="SHA-256=";function Q3(i){return Kd(i),`${W0}${i}`}function X3(i){return i.startsWith(W0)?i.substring(4):i}class V0{constructor(s){w(this,"si");w(this,"backingStore");this.si=s,this.backingStore="JetStream"}get bucket(){return X3(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 bS=Uint8Array.of(43,65,67,75),Z3=Uint8Array.of(45,78,65,75),au=Uint8Array.of(43,87,80,73),K3=Uint8Array.of(43,78,88,84),W3=Uint8Array.of(43,84,69,82,77),eO=Uint8Array.of(32);function vu(i,s=5e3){return new yO(i,s)}class h0 extends sn{constructor(a,o,u=!1){super();w(this,"consumer");w(this,"opts");w(this,"sub");w(this,"monitor");w(this,"pending");w(this,"inbox");w(this,"refilling");w(this,"pong");w(this,"callback");w(this,"timeout");w(this,"cleanupHandler");w(this,"listeners");w(this,"statusIterator");w(this,"forOrderedConsumer");w(this,"resetHandler");w(this,"abortOnMissingResource");w(this,"bind");w(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 S,D,B,z;if(g){this.stop(g);return}if((S=this.monitor)==null||S.work(),v.subject===this.inbox){if(D0(v))return;const F=(D=v.headers)==null?void 0:D.code,X=((z=(B=v.headers)==null?void 0:B.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 Se=new ge(X,`${F}`);this.stop(Se);return}}else if(F===503){if(this.notify(va.NoResponders,`${F} No Responders`),!this.refilling||this.abortOnMissingResource){const Se=new ge("no responders",`${F}`);this.stop(Se);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(S=>{var D;S&&((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 tO extends sn{constructor(){super();w(this,"src");w(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 U0{constructor(s,a){w(this,"api");w(this,"_info");w(this,"stream");w(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 h0(this,s,!0))}fetch(s={max_messages:100,expires:3e4}){const a=new h0(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 h0(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 nO{constructor(s,a,o={}){w(this,"api");w(this,"consumerOpts");w(this,"consumer");w(this,"opts");w(this,"cursor");w(this,"stream");w(this,"namePrefix");w(this,"serial");w(this,"currentConsumer");w(this,"userCallback");w(this,"iter");w(this,"type");w(this,"startSeq");w(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"&&(yh("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 S=0;;S++)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,S),this.type===bs.Fetch||this.opts.abort_on_missing_resource===!0))return(_=this.iter)==null||_.stop(D),Promise.reject(D);if(a&&S>=this.maxInitialReset)throw D;await vl(u.backoff(S+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 tO),this.consumer=new U0(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 z0{constructor(s){w(this,"api");w(this,"notified");this.api=s,this.notified=!1}checkVersion(){const s=this.api.nc.features.get(tt.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 U0(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 U0(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 nO(this.api,s,a))).catch(d=>Promise.reject(d))}}class vh{constructor(s,a){w(this,"api");w(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 vh(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 z0(new ch(this.api.nc,this.api.opts)).getPullConsumerFor(s)}getConsumer(s){return new z0(new ch(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(tt.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(tt.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(tt.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(tt.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(tt.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(tt.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 S=0;for(;p>g;){S++,_.offset=m*S;const B=await this._request(o,_);p=B.total,v.push(B);const z=Object.getOwnPropertyNames(B.state.subjects).length;if(g+=z,z<m)break}let D={};for(let B=0;B<v.length;B++)d=v[B],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 NE(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 xE(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 V0(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 vh(this,a))}}class sO 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 B0(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 S,D,B;let g=!1,v=!1,_;for await(const z of m){if(!g){g=!0;const F=((S=z.headers)==null?void 0:S.code)||0;if(F!==0&&F<200||F>299){_=(D=z.headers)==null?void 0:D.description.toLowerCase();break}if(((B=z.headers)==null?void 0:B.get("Nats-Num-Pending"))===""){v=!0;break}}if(z.data.length===0)break;p.push(new B0(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 B0{constructor(s){w(this,"data");w(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)}}w(B0,"jc");class aO extends Nu{constructor(a,o){super(a,o);w(this,"streams");w(this,"consumers");w(this,"direct");this.streams=new ey(a,o),this.consumers=new ch(a,o),this.direct=new sO(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 NE{constructor(s){w(this,"_header");w(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)}}w(NE,"jc");class rO{constructor(s){w(this,"api");this.api=s}get(s){return this.api.info(s).then(a=>new vh(this.api,a))}}class m0{constructor(s){w(this,"info");w(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 yS(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 iO(){return new ReadableStream({pull(i){i.enqueue(new Uint8Array(0)),i.close()}})}class mu{constructor(s,a,o){w(this,"jsm");w(this,"js");w(this,"stream");w(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 m0(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 V0(s)))}async status(s){const a=await this._si(s);return a===null?Promise.reject(new Error("object store not found")):Promise.resolve(new V0(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:S,error:D}=this._checkNotEmpty(s.name);if(D)return Promise.reject(D);const B=ri.next(),z=this._chunkSubject(B),F=this._metaSubject(S),X=Object.assign({bucket:this.name,nuid:B,size:0,chunks:0},yS(s)),ee=_t(),te=[],Se=new gl;try{const q=a?a.getReader():null,ne=iS.create();for(;;){const{done:oe,value:W}=q?await q.read():{done:!0,value:void 0};if(oe){if(Se.size()>0){const ie=Se.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=`${pS}${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 m0(X));break}if(W)for(Se.fill(W);Se.size()>v;){X.chunks++,X.size+=v;const Q=Se.drain(s.options.max_chunk_size);ne.update(Q),te.push(this.js.publish(z,Q,{timeout:d}))}}}catch(q){await this.jsm.streams.purge(this.stream,{filter:z}),ee.reject(q)}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 S=a.options.link.name||"";if(S==="")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(S)}if(!a.digest.startsWith(pS))return Promise.reject(new Error(`unknown digest type: ${a.digest}`));const o=O0(a.digest.substring(8));if(o===null)return Promise.reject(new Error(`unable to parse digest: ${a.digest}`));const u=_t(),d={info:new m0(a),error:u};if(a.size===0)return d.data=iO(),u.resolve(null),Promise.resolve(d);let p;const m=si();m.orderedConsumer();const g=iS.create(),v=`$O.${this.name}.C.${a.nuid}`,_=await this.js.subscribe(v,m);return(async()=>{for await(const S of _)S.data.length>0&&(g.update(S.data),p.enqueue(S.data)),S.info.pending===0&&(JC(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(S=>{p.error(S),u.reject(S)}),d.data=new ReadableStream({start(S){p=S},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,yS(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 S=d.decode(v.data);S.deleted&&s.ignoreDeletes===!0||o.push(S),((_=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=Q3(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 oO{constructor(s){w(this,"js");this.js=s}kv(s,a={}){const o=this.js,{ok:u,min:d}=o.nc.features.get(tt.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(tt.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);w(this,"consumers");w(this,"streams");w(this,"consumerAPI");w(this,"streamAPI");this.consumerAPI=new ch(a,o),this.streamAPI=new ey(a,o),this.consumers=new z0(this.consumerAPI),this.streams=new rO(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 oO(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(B){if(B.code==="503"&&D+1<g)await vl(v);else throw B}const S=this.parseJsResponse(_);if(S.stream==="")throw ge.errorForCode(ue.JetStreamInvalidAck);return S.duplicate=S.duplicate?S.duplicate:!1,S}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(tt.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 S=u.expires||0;if(S&&(_.expires=Et(S)),S===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 B=new sn,z=_.batch;let F=0;B.protocolFilterFn=(te,Se=!1)=>D0(te.msg)?(v==null||v.work(),!1):!0,B.dispatchedFn=te=>{if(te){if(p&&(m+=te.data.length),F++,d&&te.info.pending===0)return;(B.getPending()===1&&te.info.pending===0||z===F||g>0&&m>=g)&&B.stop()}};const X=nr(this.nc.options.inboxPrefix),ee=this.nc.subscribe(X,{max:u.batch,callback:(te,Se)=>{te===null&&(te=hl(Se)),te!==null?(d&&(d.cancel(),d=null),CC(te)?B.stop(SE(te)===null?void 0:te):B.stop(te)):(v==null||v.work(),B.received++,B.push(vu(Se,this.timeout)))}});return S&&(d=bl(S),d.catch(()=>{ee.isClosed()||(ee.drain().catch(()=>{}),d=null),v&&v.cancel()})),(async()=>{try{D&&(v=new K0(D,te=>(B.push(()=>{B.err=new ge(`${ys.IdleHeartbeatMissed}: ${te}`,ue.JetStreamIdleHeartBeat)}),!0)))}catch{}await ee.closed,d!==null&&(d.cancel(),d=null),v&&v.cancel(),B.stop()})().catch(),this.nc.publish(`${this.prefix}.CONSUMER.MSG.NEXT.${a}.${o}`,this.jc.encode(_),{reply:X}),B}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 fO(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 wE(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=nS(o)?o.getOpts():o;if(u.isBind=nS(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=dO(a.callbackFn===void 0,this.timeout),o.ingestionFilterFn=ty.ingestionFn(a.ordered),o.protocolFilterFn=(u,d=!1)=>{const p=u;return A0(p.msg)?(d||p.msg.respond(),!1):!0},!a.mack&&a.config.ack_policy!==nn.None&&(o.dispatchedFn=pO),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(),D0(p.msg)){const v=a?d._checkHbOrderConsumer(p.msg):!0;return a||d.info.flow_control.heartbeat_count++,{ingest:v,protocol:!0}}else if(A0(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){w(this,"options");w(this,"protocol");w(this,"draining");w(this,"listeners");w(this,"_services");this.draining=!1,this.options=O3(s),this.listeners=[]}static connect(s={}){return new Promise((a,o)=>{const u=new ny(s);fh.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 gE(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}`),S(z);return}m(null,F),o.strategy===Ms.Count&&(v--,v===0&&S()),o.strategy===Ms.JitterTimer&&(B(),D=setTimeout(()=>{S()},300)),o.strategy===Ms.SentinelMsg&&F&&F.data.length===0&&S()}});_.requestSubject=s,_.closed.then(()=>{p()}).catch(z=>{d.stop(z)});const S=z=>{z&&d.push(()=>{throw z}),B(),_.drain().then(()=>{p()}).catch(F=>{p()})};d.iterClosed.then(()=>{B(),_==null||_.unsubscribe()}).catch(z=>{B(),_==null||_.unsubscribe()});try{this.publish(s,a,{reply:_.getSubject()})}catch(z){S(z)}let D=setTimeout(()=>{S()},o.maxWait);const B=()=>{D&&clearTimeout(D)}}else{const g=o;g.callback=m,d.iterClosed.then(()=>{v.cancel()}).catch(_=>{v.cancel(_)});const v=new QC(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=cE(_),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 dE(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 aO(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 lO(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 lO{constructor(s){w(this,"nc");this.nc=s}add(s){try{return new wu(this.nc,s).start()}catch(a){return Promise.reject(a)}}client(s,a){return new H3(this.nc,s,a)}}class cO{constructor(s,a,o){w(this,"bucket");w(this,"sm");w(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(dh)||"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 uO{constructor(s,a,o){w(this,"bucket");w(this,"key");w(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(dh))||"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 wE extends WC{constructor(a,o,u){super(a.nc,o,u);w(this,"js");w(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 _,S,D,B;const g=MC(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=(S=this.info)==null?void 0:S.ordered_consumer_sequence)==null?void 0:D.stream_seq)||0;return this._resetOrderedConsumer(z+1),(B=this.monitor)==null||B.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 fO extends wE{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(tt.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}`,S=this.sub.subject;v.nc.publish(_,v.jc.encode(p),{reply:S})}}}function dO(i,s){return i?mO(s):hO(s)}function hO(i){return(s,a)=>s?[s,null]:(s=hl(a),s?[s,null]:[null,vu(a,i)])}function mO(i){return(s,a)=>{if(s)return[s,null];const o=hl(a);return o!==null?[SE(o),null]:[null,vu(a,i)]}}function SE(i){if(i!==null)switch(i.code){case ue.JetStream404NoMessages:case ue.JetStream408RequestTimeout:return null;case ue.JetStream409:return kC(i)?i:null;default:return i}return null}function pO(i){i&&i.ack()}function bO(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 yO{constructor(s,a){w(this,"msg");w(this,"di");w(this,"didAck");w(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=bO(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 dE(d.muxSubscriptions,this.msg.reply,{timeout:s.timeout},p);d.request(m);try{d.publish(this.msg.reply,bS,{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(bS)}nak(s){let a=Z3;s&&(a=_0().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(K3,eO,u),p=s?{reply:s}:void 0;this.msg.respond(d,p)}term(s=""){let a=W3;(s==null?void 0:s.length)>0&&(a=_0().encode(`+TERM ${s}`)),this.doAck(a)}json(){return this.msg.json()}string(){return this.msg.string()}}const gO="1.30.3",vO="nats.ws";class xO{constructor(){w(this,"version");w(this,"lang");w(this,"closeError");w(this,"connected");w(this,"done");w(this,"socket");w(this,"options");w(this,"socketClosed");w(this,"encrypted");w(this,"peeked");w(this,"yields");w(this,"signal");w(this,"closedNotification");this.version=gO,this.lang=vO,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=r3(p);if(m!==""){const g=M3.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]);R3(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 NO(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 wO(i={}){return e3({defaultPort:443,urlParseFn:NO,factory:()=>new xO}),ny.connect(i)}const SO="ws://localhost:9222",EO="dev_api_secret",_O="lt.events";function EE(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 xh=U.createContext({connected:!1,subscribe:()=>()=>{}});function AO(){const{connected:i}=U.useContext(xh);return{connected:i}}function _E(i,s){const{subscribe:a}=U.useContext(xh),o=U.useRef(s);o.current=s,U.useEffect(()=>a(i,d=>o.current(d)),[a,i])}const DO=U.createContext({connected:!1,subscribe:()=>()=>{}}),TO=_0();function CO({children:i,url:s,token:a}){const o=U.useRef(null),u=U.useRef(null),[d,p]=U.useState(!1),m=U.useRef(null),g=U.useRef(new Map),v=U.useCallback((D,B)=>{const z=g.current;return z.has(D)||z.set(D,new Set),z.get(D).add(B),()=>{const F=z.get(D);F&&(F.delete(B),F.size===0&&z.delete(D))}},[]),_=U.useCallback((D,B)=>{for(const[z,F]of g.current)if(EE(D,z))for(const X of F)try{X(B)}catch{}},[]),S=U.useCallback(async()=>{try{if(o.current)return;const D=await wO({servers:s||SO,token:a||EO,reconnect:!0,maxReconnectAttempts:-1,reconnectTimeWait:2e3});o.current=D,p(!0);const B=D.subscribe("lt.>");u.current=B,(async()=>{for await(const z of B)try{const F=JSON.parse(TO.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(S,3e3)}},[_]);return U.useEffect(()=>(S(),()=>{m.current&&clearTimeout(m.current),u.current&&u.current.unsubscribe(),o.current&&(o.current.close().catch(()=>{}),o.current=null),p(!1)}),[S]),b.jsxDEV(DO.Provider,{value:{connected:d,subscribe:v},children:b.jsxDEV(xh.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 q0={type:"error",data:"parser error"},AE=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",DE=typeof ArrayBuffer=="function",TE=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,sy=({type:i,data:s},a,o)=>AE&&s instanceof Blob?a?o(s):gS(s,o):DE&&(s instanceof ArrayBuffer||TE(s))?a?o(s):gS(new Blob([s]),o):o(Na[i]+(s||"")),gS=(i,s)=>{const a=new FileReader;return a.onload=function(){const o=a.result.split(",")[1];s("b"+(o||""))},a.readAsDataURL(i)};function vS(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let p0;function OO(i,s){if(AE&&i.data instanceof Blob)return i.data.arrayBuffer().then(vS).then(s);if(DE&&(i.data instanceof ArrayBuffer||TE(i.data)))return s(vS(i.data));sy(i,!1,a=>{p0||(p0=new TextEncoder),s(p0.encode(a))})}const xS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<xS.length;i++)uu[xS.charCodeAt(i)]=i;const RO=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},jO=typeof ArrayBuffer=="function",ay=(i,s)=>{if(typeof i!="string")return{type:"message",data:CE(i,s)};const a=i.charAt(0);return a==="b"?{type:"message",data:MO(i.substring(1),s)}:Wd[a]?i.length>1?{type:Wd[a],data:i.substring(1)}:{type:Wd[a]}:q0},MO=(i,s)=>{if(jO){const a=RO(i);return CE(a,s)}else return{base64:!0,data:i}},CE=(i,s)=>{switch(s){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},OE="",kO=(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(OE))})})},VO=(i,s)=>{const a=i.split(OE),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 UO(){return new TransformStream({transform(i,s){OO(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 b0;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 zO(i,s){b0||(b0=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(q0);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:b0.decode(g),s)),o=0}if(u===0||u>i){m.enqueue(q0);break}}}})}const RE=4;function Ft(i){if(i)return BO(i)}function BO(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 Nh=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")(),qO="arraybuffer";function jE(i,...s){return s.reduce((a,o)=>(i.hasOwnProperty(o)&&(a[o]=i[o]),a),{})}const LO=gs.setTimeout,HO=gs.clearTimeout;function wh(i,s){s.useNativeTimers?(i.setTimeoutFn=LO.bind(gs),i.clearTimeoutFn=HO.bind(gs)):(i.setTimeoutFn=gs.setTimeout.bind(gs),i.clearTimeoutFn=gs.clearTimeout.bind(gs))}const PO=1.33;function $O(i){return typeof i=="string"?IO(i):Math.ceil((i.byteLength||i.size)*PO)}function IO(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 ME(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function FO(i){let s="";for(let a in i)i.hasOwnProperty(a)&&(s.length&&(s+="&"),s+=encodeURIComponent(a)+"="+encodeURIComponent(i[a]));return s}function YO(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 GO 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,wh(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 GO(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=FO(s);return a.length?"?"+a:""}}class JO 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)};VO(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,kO(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]=ME()),!this.supportsBinary&&!a.sid&&(a.b64=1),this.createUri(s,a)}}let kE=!1;try{kE=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const QO=kE;function XO(){}class ZO extends JO{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,wh(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=jE(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=XO,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",NS);else if(typeof addEventListener=="function"){const i="onpagehide"in gs?"pagehide":"unload";addEventListener(i,NS,!1)}}function NS(){for(let i in xa.requests)xa.requests.hasOwnProperty(i)&&xa.requests[i].abort()}const KO=(function(){const i=VE({xdomain:!1});return i&&i.responseType!==null})();class WO extends ZO{constructor(s){super(s);const a=s&&s.forceBase64;this.supportsBinary=KO&&!a}request(s={}){return Object.assign(s,{xd:this.xd},this.opts),new xa(VE,this.uri(),s)}}function VE(i){const s=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!s||QO))return new XMLHttpRequest}catch{}if(!s)try{return new gs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const UE=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class e5 extends ry{get name(){return"websocket"}doOpen(){const s=this.uri(),a=this.opts.protocols,o=UE?{}:jE(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&&Nh(()=>{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]=ME()),this.supportsBinary||(a.b64=1),this.createUri(s,a)}}const y0=gs.WebSocket||gs.MozWebSocket;class t5 extends e5{createSocket(s,a,o){return UE?new y0(s,a,o):a?new y0(s,a):new y0(s)}doWrite(s,a){this.ws.send(a)}}class n5 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=zO(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=s.readable.pipeThrough(a).getReader(),u=UO();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&&Nh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var s;(s=this._transport)===null||s===void 0||s.close()}}const s5={websocket:t5,webtransport:n5,polling:WO},a5=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r5=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function L0(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=a5.exec(i||""),d={},p=14;for(;p--;)d[r5[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=i5(d,d.path),d.queryKey=o5(d,d.query),d}function i5(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 o5(i,s){const a={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,u,d){u&&(a[u]=d)}),a}const H0=typeof addEventListener=="function"&&typeof removeEventListener=="function",eh=[];H0&&addEventListener("offline",()=>{eh.forEach(i=>i())},!1);class ai extends Ft{constructor(s,a){if(super(),this.binaryType=qO,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=L0(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=L0(a.host).host);wh(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=YO(this.opts.query)),H0&&(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=RE,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+=$O(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,Nh(()=>{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(),H0&&(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=RE;class l5 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",S=>{if(!o)if(S.type==="pong"&&S.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=S=>{const D=new Error("probe error: "+S);D.transport=a.name,d(),this.emitReserved("upgradeError",D)};function m(){p("transport closed")}function g(){p("socket closed")}function v(S){a&&S.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 c5=class extends l5{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=>s5[u]).filter(u=>!!u)),super(s,o)}};function u5(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=L0(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 f5=typeof ArrayBuffer=="function",d5=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,zE=Object.prototype.toString,h5=typeof Blob=="function"||typeof Blob<"u"&&zE.call(Blob)==="[object BlobConstructor]",m5=typeof File=="function"||typeof File<"u"&&zE.call(File)==="[object FileConstructor]";function iy(i){return f5&&(i instanceof ArrayBuffer||d5(i))||h5&&i instanceof Blob||m5&&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 p5(i){const s=[],a=i.data,o=i;return o.data=P0(a,s),o.attachments=s.length,{packet:o,buffers:s}}function P0(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]=P0(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]=P0(i[o],s));return a}return i}function b5(i,s){return i.data=$0(i.data,s),delete i.attachments,i}function $0(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]=$0(i[a],s);else if(typeof i=="object")for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&(i[a]=$0(i[a],s));return i}var Gd={exports:{}},g0,wS;function y5(){if(wS)return g0;wS=1;var i=1e3,s=i*60,a=s*60,o=a*24,u=o*7,d=o*365.25;g0=function(_,S){S=S||{};var D=typeof _;if(D==="string"&&_.length>0)return p(_);if(D==="number"&&isFinite(_))return S.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 S=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(_);if(S){var D=parseFloat(S[1]),B=(S[2]||"ms").toLowerCase();switch(B){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 S=Math.abs(_);return S>=o?Math.round(_/o)+"d":S>=a?Math.round(_/a)+"h":S>=s?Math.round(_/s)+"m":S>=i?Math.round(_/i)+"s":_+"ms"}function g(_){var S=Math.abs(_);return S>=o?v(_,S,o,"day"):S>=a?v(_,S,a,"hour"):S>=s?v(_,S,s,"minute"):S>=i?v(_,S,i,"second"):_+" ms"}function v(_,S,D,B){var z=S>=D*1.5;return Math.round(_/D)+" "+B+(z?"s":"")}return g0}var v0,SS;function g5(){if(SS)return v0;SS=1;function i(s){o.debug=o,o.default=o,o.coerce=v,o.disable=m,o.enable=d,o.enabled=g,o.humanize=y5(),o.destroy=_,Object.keys(s).forEach(S=>{o[S]=s[S]}),o.names=[],o.skips=[],o.formatters={};function a(S){let D=0;for(let B=0;B<S.length;B++)D=(D<<5)-D+S.charCodeAt(B),D|=0;return o.colors[Math.abs(D)%o.colors.length]}o.selectColor=a;function o(S){let D,B=null,z,F;function X(...ee){if(!X.enabled)return;const te=X,Se=Number(new Date),De=Se-(D||Se);te.diff=De,te.prev=D,te.curr=Se,D=Se,ee[0]=o.coerce(ee[0]),typeof ee[0]!="string"&&ee.unshift("%O");let q=0;ee[0]=ee[0].replace(/%([a-zA-Z%])/g,(oe,W)=>{if(oe==="%%")return"%";q++;const Q=o.formatters[W];if(typeof Q=="function"){const H=ee[q];oe=Q.call(te,H),ee.splice(q,1),q--}return oe}),o.formatArgs.call(te,ee),(te.log||o.log).apply(te,ee)}return X.namespace=S,X.useColors=o.useColors(),X.color=o.selectColor(S),X.extend=u,X.destroy=o.destroy,Object.defineProperty(X,"enabled",{enumerable:!0,configurable:!1,get:()=>B!==null?B:(z!==o.namespaces&&(z=o.namespaces,F=o.enabled(S)),F),set:ee=>{B=ee}}),typeof o.init=="function"&&o.init(X),X}function u(S,D){const B=o(this.namespace+(typeof D>"u"?":":D)+S);return B.log=this.log,B}function d(S){o.save(S),o.namespaces=S,o.names=[],o.skips=[];const D=(typeof S=="string"?S:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const B of D)B[0]==="-"?o.skips.push(B.slice(1)):o.names.push(B)}function p(S,D){let B=0,z=0,F=-1,X=0;for(;B<S.length;)if(z<D.length&&(D[z]===S[B]||D[z]==="*"))D[z]==="*"?(F=z,X=B,z++):(B++,z++);else if(F!==-1)z=F+1,X++,B=X;else return!1;for(;z<D.length&&D[z]==="*";)z++;return z===D.length}function m(){const S=[...o.names,...o.skips.map(D=>"-"+D)].join(",");return o.enable(""),S}function g(S){for(const D of o.skips)if(p(S,D))return!1;for(const D of o.names)if(p(S,D))return!0;return!1}function v(S){return S instanceof Error?S.stack||S.message:S}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 v0=i,v0}var ES;function v5(){return ES||(ES=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 S=0,D=0;v[0].replace(/%[a-zA-Z%]/g,B=>{B!=="%%"&&(S++,B==="%c"&&(D=S))}),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=g5()(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 x5=v5();const N5=zT(x5),I0=N5("socket.io-parser"),w5=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var We;(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"})(We||(We={}));class S5{constructor(s){this.replacer=s}encode(s){return I0("encoding packet %j",s),(s.type===We.EVENT||s.type===We.ACK)&&th(s)?this.encodeAsBinary({type:s.type===We.EVENT?We.BINARY_EVENT:We.BINARY_ACK,nsp:s.nsp,data:s.data,id:s.id}):[this.encodeAsString(s)]}encodeAsString(s){let a=""+s.type;return(s.type===We.BINARY_EVENT||s.type===We.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)),I0("encoded %j as %s",s,a),a}encodeAsBinary(s){const a=p5(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===We.BINARY_EVENT;o||a.type===We.BINARY_ACK?(a.type=o?We.EVENT:We.ACK,this.reconstructor=new E5(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(We[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===We.BINARY_EVENT||o.type===We.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(!_5(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 I0("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 We.CONNECT:return _S(a);case We.DISCONNECT:return a===void 0;case We.CONNECT_ERROR:return typeof a=="string"||_S(a);case We.EVENT:case We.BINARY_EVENT:return Array.isArray(a)&&(typeof a[0]=="number"||typeof a[0]=="string"&&w5.indexOf(a[0])===-1);case We.ACK:case We.BINARY_ACK:return Array.isArray(a)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class E5{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=b5(this.reconPack,this.buffers);return this.finishedReconstruction(),a}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const _5=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i};function _S(i){return Object.prototype.toString.call(i)==="[object Object]"}const A5=Object.freeze(Object.defineProperty({__proto__:null,Decoder:oy,Encoder:S5,get PacketType(){return We}},Symbol.toStringTag,{value:"Module"}));function js(i,s,a){return i.on(s,a),function(){i.off(s,a)}}const D5=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class BE 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(D5.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:We.EVENT,data:a};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof a[a.length-1]=="function"){const _=this.ids++,S=a.pop();this._registerAckCallback(_,S),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:We.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 We.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 We.EVENT:case We.BINARY_EVENT:this.onevent(s);break;case We.ACK:case We.BINARY_ACK:this.onack(s);break;case We.DISCONNECT:this.ondisconnect();break;case We.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:We.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:We.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 F0 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,wh(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||A5;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 c5(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){Nh(()=>{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 BE(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=u5(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 F0(o,s):(ru[u]||(ru[u]=new F0(o,s)),g=ru[u]),a.query&&!s.query&&(s.query=a.queryKey),g.socket(a.path,s)}Object.assign(nh,{Manager:F0,Socket:BE,io:nh,connect:nh});const T5=U.createContext({connected:!1,subscribe:()=>()=>{}});function C5({children:i}){const s=U.useRef(null),[a,o]=U.useState(!1),u=U.useRef(new Map),d=U.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=U.useCallback((m,g)=>{for(const[v,_]of u.current)if(EE(m,v))for(const S of _)try{S(g)}catch{}},[]);return U.useEffect(()=>{const m=rE(),g=nh({path:"/socket.io",transports:["polling","websocket"],upgrade:!0,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:2e3,...m?{auth:{token:m}}:{}});return s.current=g,console.log("[lt-socketio] connecting..."),g.on("connect",()=>{console.log("[lt-socketio] connected, id:",g.id),o(!0)}),g.on("disconnect",v=>{console.log("[lt-socketio] disconnected:",v),o(!1)}),g.on("connect_error",v=>{console.warn("[lt-socketio] connect error:",v.message),o(!1)}),g.onAny((v,_)=>{if(v.startsWith("lt."))try{const S=typeof _=="string"?JSON.parse(_):_;p(v,S)}catch{}}),()=>{g.removeAllListeners(),g.disconnect(),s.current=null,o(!1)}},[p]),b.jsxDEV(T5.Provider,{value:{connected:a,subscribe:d},children:b.jsxDEV(xh.Provider,{value:{connected:a,subscribe:d},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSocketIO.tsx",lineNumber:166,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSocketIO.tsx",lineNumber:165,columnNumber:5},this)}function O5({children:i}){const[s,a]=U.useState(null),[o,u]=U.useState({url:null,token:null});return U.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;if(console.log("[lt-transport] server reports:",_),!d){if(_==="nats"){let S=v.events.natsWsUrl??null,D=null;const B=rE();if(B)try{const z=await fetch("/api/nats-credentials",{headers:{Authorization:`Bearer ${B}`}});if(z.ok){const F=await z.json();S=F.natsWsUrl??S,D=F.natsToken??null}}catch{console.warn("[lt-transport] failed to fetch NATS credentials")}u({url:S,token:D})}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(CO,{url:o.url,token:o.token,children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:78,columnNumber:12},this):s==="socketio"?b.jsxDEV(C5,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:82,columnNumber:12},this):b.jsxDEV(b.Fragment,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:86,columnNumber:10},this)}const qE=U.createContext(null),AS="lt_sidebar_collapsed";function R5({children:i}){const[s,a]=U.useState(()=>{try{return localStorage.getItem(AS)==="true"}catch{return!1}}),o=U.useCallback(()=>{a(u=>{const d=!u;try{localStorage.setItem(AS,String(d))}catch{}return d})},[]);return b.jsxDEV(qE.Provider,{value:{collapsed:s,toggle:o},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSidebar.tsx",lineNumber:40,columnNumber:5},this)}function LE(){const i=U.useContext(qE);if(!i)throw new Error("useSidebar must be used within SidebarProvider");return i}function Lj(i){const s=i?`?period=${i}`:"";return rr({queryKey:["escalationStats",i],queryFn:()=>vt(`/escalations/stats${s}`)})}function Hj(){return rr({queryKey:["escalationTypes"],queryFn:()=>vt("/escalations/types")})}function j5(i){const{enabled:s=!0,...a}=i,o=new URLSearchParams;return a.status&&o.set("status",a.status),a.role&&o.set("role",a.role),a.type&&o.set("type",a.type),a.subtype&&o.set("subtype",a.subtype),a.assigned_to&&o.set("assigned_to",a.assigned_to),a.priority&&o.set("priority",String(a.priority)),a.limit&&o.set("limit",String(a.limit)),a.offset!==void 0&&o.set("offset",String(a.offset)),a.sort_by&&o.set("sort_by",a.sort_by),a.order&&o.set("order",a.order),rr({queryKey:["escalations",a],queryFn:()=>vt(`/escalations?${o}`),enabled:s})}function M5(i){const{enabled:s=!0,...a}=i,o=new URLSearchParams;return a.role&&o.set("role",a.role),a.type&&o.set("type",a.type),a.subtype&&o.set("subtype",a.subtype),a.priority&&o.set("priority",String(a.priority)),a.limit&&o.set("limit",String(a.limit)),a.offset!==void 0&&o.set("offset",String(a.offset)),a.sort_by&&o.set("sort_by",a.sort_by),a.order&&o.set("order",a.order),rr({queryKey:["escalations","available",a],queryFn:()=>vt(`/escalations/available?${o}`),enabled:s})}function Pj(i){return rr({queryKey:["escalations","by-workflow",i],queryFn:()=>vt(`/escalations/by-workflow/${i}`),enabled:!!i})}function $j(i){return rr({queryKey:["escalations",i],queryFn:()=>vt(`/escalations/${i}`),enabled:!!i})}function Ij(){const i=Vs();return wa({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 Fj(){const i=Vs();return wa({mutationFn:s=>vt(`/escalations/${s}/release`,{method:"POST"}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function Yj(){const i=Vs();return wa({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 Gj(){const i=Vs();return wa({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 Jj(){const i=Vs();return wa({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 Qj(){const i=Vs();return wa({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 Xj(){const i=Vs();return wa({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 Zj(){const i=Vs();return wa({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 Kj(){const i=Vs();return wa({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 k5(){const{user:i}=Ki(),s=i==null?void 0:i.userId,a=Vs(),o=U.useRef(null),u=U.useCallback(()=>{o.current||(o.current=setTimeout(()=>{o.current=null,a.invalidateQueries({queryKey:["escalations"]})},15e3))},[a]);_E(`${_O}.escalation.>`,u);const{data:d}=M5({limit:1}),{data:p}=j5({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 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 V5({onToggleEventFeed:i,onToggleDocs:s}){const{user:a,logout:o}=Ki(),{available:u,mine:d}=k5(),{connected:p}=AO(),[m,g]=U.useState(!1),v=U.useRef(null);return U.useEffect(()=>{if(!m)return;const _=S=>{v.current&&!v.current.contains(S.target)&&g(!1)};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[m]),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:31,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:30,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:29,columnNumber:7},this),b.jsxDEV("div",{className:"flex items-center gap-5",children:[b.jsxDEV(cl,{to:"/escalations/available",className:`flex items-center gap-1.5 text-[11px] transition-colors ${u>0?"text-blue-400 hover:text-blue-300":"text-text-quaternary hover:text-text-secondary"}`,title:"Available escalations",children:[b.jsxDEV($T,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:44,columnNumber:11},this),"all",u>0&&b.jsxDEV("span",{className:"tabular-nums font-medium",children:u},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:45,columnNumber:32},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:37,columnNumber:9},this),b.jsxDEV(cl,{to:"/escalations/queue",className:`flex items-center gap-1.5 text-[11px] transition-colors ${d>0?"text-status-warning hover:text-amber-300":"text-text-quaternary hover:text-text-secondary"}`,title:"My escalation queue",children:[b.jsxDEV(IT,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:56,columnNumber:11},this),"mine",d>0&&b.jsxDEV("span",{className:"tabular-nums font-medium",children:d},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:57,columnNumber:28},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:49,columnNumber:9},this),b.jsxDEV("div",{className:"w-px h-4 bg-surface-border"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:60,columnNumber:9},this),b.jsxDEV("button",{type:"button",onClick:i,className:`flex items-center gap-1.5 text-[11px] transition-colors ${p?"text-emerald-400 hover:text-emerald-300":"text-text-quaternary hover:text-text-secondary"}`,title:p?"Live events — click to toggle feed":"Events disconnected",children:[b.jsxDEV(KS,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:71,columnNumber:11},this),"events"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:63,columnNumber:9},this),b.jsxDEV("button",{onClick:s,className:"flex items-center gap-1.5 text-[11px] text-text-quaternary hover:text-text-secondary transition-colors",title:"Documentation",children:[b.jsxDEV(WS,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:81,columnNumber:11},this),"docs"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:76,columnNumber:9},this),b.jsxDEV("div",{className:"w-px h-4 bg-surface-border"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:85,columnNumber:9},this),a&&b.jsxDEV("div",{className:"relative",ref:v,children:[b.jsxDEV("button",{onClick:()=>g(_=>!_),className:"btn-ghost text-xs flex items-center gap-1",children:[b.jsxDEV(FT,{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:94,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:97,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:96,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:90,columnNumber:13},this),m&&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:()=>g(!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:102,columnNumber:17},this),b.jsxDEV("button",{onClick:()=>{g(!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:109,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:101,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:89,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:35,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:28,columnNumber:5},this)}function cy({open:i,children:s}){const[a,o]=U.useState(i);return U.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 Y0(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 U5(){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 z5({group:i,collapsed:s}){const{pathname:a}=Zi(),o=i.matchPaths.some(m=>a.startsWith(m)),[u,d]=U.useState(o),p=u||o;return s?b.jsxDEV(b.Fragment,{children:i.items.map(m=>b.jsxDEV(sh,{to:m.to,className:Y0(!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:U5(),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 B5(i){return i.kind==="group"}function q5({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=Y0(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:Y0(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}=LE();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 pt-5 pb-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=>B5(o)?b.jsxDEV(z5,{group:o,collapsed:a},o.label,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:161,columnNumber:11},this):b.jsxDEV(q5,{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 L5=[{to:"/",label:"Recent Activity",icon:eE,end:!0},{to:"/capabilities",label:"Capabilities",icon:YT},{to:"/agents",label:"Agents",icon:GT},{to:"/topics",label:"Topics",icon:KS}];function H5(){return b.jsxDEV(Sh,{heading:"Work",entries:L5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/WorkSidebar.tsx",lineNumber:12,columnNumber:10},this)}const P5=[{kind:"group",label:"Workflows",icon:zw,matchPaths:["/workflows"],items:[{to:"/workflows/registry",label:"Registry",icon:zw},{to:"/workflows/start",label:"Invoke",icon:JT},{to:"/workflows/executions",label:"Executions",icon:Bw}]},{kind:"group",label:"Pipelines",icon:ah,matchPaths:["/mcp"],items:[{to:"/mcp/queries",label:"Designer",icon:QT},{to:"/mcp/servers",label:"Servers & Tools",icon:XT},{to:"/mcp/workflows",label:"Pipeline Tools",icon:ah},{to:"/mcp/executions",label:"Executions",icon:Bw}]}];function $5(){return b.jsxDEV(Sh,{heading:"Build",entries:P5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/BuildSidebar.tsx",lineNumber:31,columnNumber:10},this)}const I5=[{to:"/files",label:"Files",icon:ZT},{to:"/knowledge",label:"Knowledge",icon:KT}];function F5(){return b.jsxDEV(Sh,{heading:"Storage",entries:I5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/StorageSidebar.tsx",lineNumber:10,columnNumber:10},this)}const Y5=[{to:"/admin/users",label:"Accounts",icon:WT},{to:"/admin/roles",label:"Roles & Permissions",icon:eC},{to:"/admin/maintenance",label:"DB Maintenance",icon:tC},{to:"/admin/controlplane",label:"Task Queues",icon:eE}];function G5(){return b.jsxDEV(Sh,{heading:"Admin",entries:Y5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/AdminSidebar.tsx",lineNumber:17,columnNumber:10},this)}function J5({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 x0=280,DS="cubic-bezier(0.4, 0, 0.2, 1)",Jd=40;function Q5(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 HE({open:i,onClose:s,sourceRef:a,children:o}){const[u,d]=U.useState(null),p=U.useRef(null),m=U.useRef(!1);U.useEffect(()=>{var D,B;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=((B=a==null?void 0:a.current)==null?void 0:B.getBoundingClientRect())??null,d("exiting")),m.current=i},[i,a,u]),U.useEffect(()=>{if(u!=="entering")return;const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>d("open"))});return()=>cancelAnimationFrame(D)},[u]),U.useEffect(()=>{if(u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[u]),U.useEffect(()=>{if(!u)return;const D=B=>{B.key==="Escape"&&s()};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[u,s]);const g=U.useCallback(D=>{D.propertyName==="transform"&&u==="exiting"&&d(null)},[u]);if(U.useEffect(()=>{if(u!=="exiting")return;const D=setTimeout(()=>d(null),x0+50);return()=>clearTimeout(D)},[u]),!u)return null;const v=u==="entering"||u==="exiting",_=v?Q5(p.current):"none",S=v?0:1;return XS.createPortal(b.jsxDEV("div",{className:"fixed inset-0 z-50 overflow-auto p-10",style:{transformOrigin:"center center",transition:`transform ${x0}ms ${DS}, opacity ${x0}ms ${DS}`,transform:_,opacity:S,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 X5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h8M4 18h12"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:4,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:3,columnNumber:5},this)}function Z5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7l-5 5 5 5M16 7l5 5-5 5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:12,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:11,columnNumber:5},this)}function K5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:20,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:19,columnNumber:5},this)}function W5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:28,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:27,columnNumber:5},this)}function e4({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9L3.5 3.5M9 15v4.5M9 15H4.5M9 15l-5.5 5.5M15 9h4.5M15 9V4.5M15 9l5.5-5.5M15 15h4.5M15 15v4.5m0-4.5l5.5 5.5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:36,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:35,columnNumber:5},this)}function t4({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5v-4m0 4h-4m4 0l-5-5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:44,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:43,columnNumber:5},this)}function n4(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 s4(i){const s=[];let a=i.replace(/```(\w*)\n([\s\S]*?)```/g,(g,v,_)=>{const S=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${S}\0`});const o=/^(\|.+\|)\n(\|[-| :]+\|)\n((?:\|.+\|\n?)+)/gm;a=a.replace(o,(g,v,_,S)=>n4(`${v}
|
|
273
|
+
${_}
|
|
274
|
+
${S.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),S=/note:|ℹ️|info/i.test(v);return`<div class="${_?"bg-status-warning/5":S?"bg-accent/5":"bg-surface-sunken/50"} ${_?"border-status-warning":S?"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 S=v,D;for(;(D=m.exec(S))!==null;){const B=D.index+D[0].length;_.push(S.slice(0,B)),S=S.slice(B).replace(/^<br\/>/,"").trim(),m.lastIndex=0}return S&&_.push(S),_.map(B=>{const z=B.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 a4=/(\*\*|^#{1,4}\s|^- |^\d+\.\s|```|^\|.*\|$|\[.+\]\(.+\))/m;function r4(i){return a4.test(i)}function uy({content:i,className:s,onClick:a}){const o=U.useMemo(()=>s4(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 hh({data:i,depth:s=0,generation:a}){const u=a!==void 0&&a>0&&a%2===1?!1:s>0,[d,p]=U.useState(u),[m,g]=U.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(hh,{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(([_,S],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(hh,{data:S,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&&r4(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 TS({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(t4,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:35,columnNumber:26},this):b.jsxDEV(e4,{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(X5,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:39,columnNumber:28},this):b.jsxDEV(Z5,{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(W5,{className:`${v} text-status-success`},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:42,columnNumber:19},this):b.jsxDEV(K5,{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(tE,{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(nE,{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 i4({data:i,label:s,variant:a,defaultCollapsed:o=!1,defaultMode:u}){const d=U.useRef(null),[p,m]=U.useState(u??"json"),[g,v]=U.useState(!1),[_,S]=U.useState(!1),[D,B]=U.useState(0),[z,F]=U.useState(1),X=D%2===0,ee=z%2===0,te=U.useCallback(()=>B(H=>H+1),[]),Se=U.useCallback(()=>F(H=>H+1),[]);let De=i;if(typeof i=="string")try{De=JSON.parse(i)}catch{}const q=async()=>{const H=typeof i=="string"?i:JSON.stringify(De,null,2);await navigator.clipboard.writeText(H),v(!0),setTimeout(()=>v(!1),2e3)},ne=U.useCallback(()=>{F(1),S(!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(J5,{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(TS,{mode:p,setMode:m,isCollapsed:X,onToggleCollapse:te,onCopy:q,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(hh,{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(HE,{open:_,onClose:()=>S(!1),sourceRef:d,children:[b.jsxDEV("div",{className:"sticky top-0 float-right z-10",children:b.jsxDEV(TS,{mode:p,setMode:m,isCollapsed:ee,onToggleCollapse:Se,onCopy:q,copied:g,onClose:()=>S(!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(hh,{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 o4=100,CS=500;let l4=0;const PE={"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","knowledge.stored":"text-violet-400","knowledge.deleted":"text-text-tertiary","agent.started":"text-accent","agent.completed":"text-status-success","agent.failed":"text-status-error","agent.status_changed":"text-blue-400",milestone:"text-violet-400"};function OS({event:i,forceExpanded:s=!1}){var D,B;const[a,o]=U.useState(s),u=PE[i.type]||"text-text-tertiary";U.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",S=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:64,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:67,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):"",(B=i.data)!=null&&B.escalationId?` esc:${String(i.data.escalationId).slice(0,12)}`:""]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:70,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:78,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:74,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:60,columnNumber:7},this),b.jsxDEV(cy,{open:a,children:b.jsxDEV("div",{className:S,children:b.jsxDEV(i4,{data:i.data},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:83,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:82,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:81,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:59,columnNumber:5},this)}function c4({open:i,onToggle:s}){const[a,o]=U.useState([]),[u,d]=U.useState(!1),p=U.useRef(null),m=U.useRef(new Map);return _E("lt.events.>",U.useCallback(g=>{const v=String(g.type||"unknown");if(v.startsWith("mesh."))return;const _=`${v}:${g.timestamp||""}:${g.escalationId||g.workflowId||g.taskId||""}`,S=Date.now(),D=m.current.get(_);if(!(D&&S-D<CS)){if(m.current.set(_,S),m.current.size>200)for(const[B,z]of m.current)S-z>CS*2&&m.current.delete(B);o(B=>[{id:++l4,type:v,timestamp:g.timestamp||new Date().toISOString(),data:g},...B].slice(0,o4))}},[])),U.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(nC,{className:"w-3 h-3 text-text-tertiary"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:139,columnNumber:17},this):b.jsxDEV(sC,{className:"w-3 h-3 text-text-tertiary"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:139,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:140,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:144,columnNumber:11},this),a.length>0&&!i&&b.jsxDEV("span",{className:`text-[9px] font-medium px-1 py-0.5 rounded ${PE[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:149,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(tE,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:160,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:155,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(aC,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:167,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:162,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:154,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:135,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:177,columnNumber:13},this):a.map(g=>b.jsxDEV(OS,{event:g},g.id,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:179,columnNumber:33},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:175,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:174,columnNumber:7},this),b.jsxDEV(HE,{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(nE,{className:"w-5 h-5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:191,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:186,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:185,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:195,columnNumber:11},this):a.map(g=>b.jsxDEV(OS,{event:g,forceExpanded:!0},g.id,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:197,columnNumber:31},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:184,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:133,columnNumber:5},this)}function u4(){return rr({queryKey:["docs"],queryFn:()=>vt("/docs"),staleTime:5*6e4})}function f4(i){return rr({queryKey:["docs",i],queryFn:()=>vt(`/docs/read?path=${encodeURIComponent(i)}`),enabled:!!i,staleTime:5*6e4})}function d4(){const[i,s]=U.useState([]),[a,o]=U.useState([]),[u,d]=U.useState(null),p=U.useRef(u),m=U.useRef(i),g=U.useRef(a);p.current=u,m.current=i,g.current=a;const v=U.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})},[]),_=U.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 Se=((te=z==null?void 0:z.current)==null?void 0:te.scrollTop)??0;o([...g.current,{...ee,scrollTop:Se}])}s(F.slice(0,-1)),d(X),requestAnimationFrame(()=>{z!=null&&z.current&&(z.current.scrollTop=X.scrollTop)})},[]),S=U.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 Se=((te=z==null?void 0:z.current)==null?void 0:te.scrollTop)??0;s([...m.current,{...ee,scrollTop:Se}])}o(F.slice(0,-1)),d(X),requestAnimationFrame(()=>{z!=null&&z.current&&(z.current.scrollTop=X.scrollTop)})},[]),D=U.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})},[]),B=U.useCallback(()=>{s([]),o([]),d(null)},[]);return{current:u,backStack:i,forwardStack:a,navigate:v,goBack:_,goForward:S,pushScrollPosition:D,reset:B}}function h4(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 m4(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 p4(i){return!i||i==="README.md"?"#docs":`#docs:${i}`}function b4({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,S=(v=m.closest(".docs-content"))==null?void 0:v.querySelector(`#${CSS.escape(_)}`);S==null||S.scrollIntoView({behavior:"smooth",block:"start"});return}const g=p.closest("[data-doc-link]");if(g){d.preventDefault();const{path:_,anchor:S}=h4(g.dataset.docLink,s);a(_,S);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 y4(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 g4({docs:i,selected:s,onSelect:a}){const{topLevel:o,dirs:u}=y4(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(rC,{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 v4({open:i,onClose:s}){var oe,W,Q;const[a,o]=U.useState(!1),{data:u}=u4(),d=d4(),{data:p,isLoading:m}=f4(((oe=d.current)==null?void 0:oe.path)??null),g=U.useRef(null),[v,_]=U.useState(null);U.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 S=U.useCallback(()=>{var ie;const H=m4(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=U.useRef(!0);U.useEffect(()=>{if(!i||!d.current)return;if(D.current){D.current=!1;return}const H=p4(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]),U.useEffect(()=>{if(!i)return;const H=()=>{window.location.hash.startsWith("#docs")&&S()};return window.addEventListener("hashchange",H),()=>window.removeEventListener("hashchange",H)},[i,S]);const B=U.useCallback((H,le)=>{le&&_(le),d.navigate(H,g)},[d]),z=U.useCallback(H=>{d.navigate(H,g)},[d]),F=U.useCallback(()=>{d.goBack(g)},[d]),X=U.useCallback(()=>{d.goForward(g)},[d]),ee=U.useCallback(()=>{d.pushScrollPosition(g)},[d]);if(U.useEffect(()=>{if(i){D.current=!0,S();const H=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(H)}},[i]),!(i||a))return null;const Se=()=>{o(!1),setTimeout(()=>{s(),d.reset()},200)},De=((Q=d.current)==null?void 0:Q.path)??null,q=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:Se},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:!q,className:`p-0.5 transition-colors ${q?"text-text-tertiary hover:text-text-primary":"text-surface-border cursor-default"}`,title:"Back",children:b.jsxDEV(iC,{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(qw,{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(WS,{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:Se,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(g4,{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(b4,{content:p.content,currentPath:De,onNavigate:B,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(qw,{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 x4(i){if(i.includes("/escalations"))return["escalation","human-queue"]}const RS=2e3;function N4(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 w4(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 $E=U.createContext(null);function S4({children:i}){const s=Zi(),[a,o]=U.useState(!1),[u,d]=U.useState([]),[p,m]=U.useState(null),[g,v]=U.useState({}),_=U.useRef(null),S={page:s.pathname.split("/").filter(Boolean).join("-")||"home",route:s.pathname,params:{},...g,suggestedTags:g.suggestedTags??x4(s.pathname)};U.useEffect(()=>()=>{_.current&&clearInterval(_.current)},[]);const D=U.useCallback(()=>o(ee=>!ee),[]),B=U.useCallback(ee=>{v(ee)},[]),z=U.useCallback(()=>{d([]),m(null)},[]),F=U.useCallback(async ee=>{var W;const te=new Date().toISOString(),Se={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,Se,De]);const q={...S};(W=q.entities)!=null&&W.yamlContent&&q.entities.yamlContent.length>RS&&(q.entities={...q.entities,yamlContent:q.entities.yamlContent.slice(0,RS)+`
|
|
280
|
+
... (truncated)`});const oe=`${N4(u.concat(Se))}${ee}`;try{const H=(await vt("/insight/mcp-query",{method:"POST",body:JSON.stringify({prompt:oe,tags:q.suggestedTags,context:q,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 Xe=w4(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:Xe,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,S]),X=U.useCallback(async ee=>{const te=u.find(q=>q.id===ee);if(!(te!=null&&te.workflowId)||te.compilationStatus==="compiling"||te.compilationStatus==="done")return;const Se=u.indexOf(te),De=u.slice(0,Se).reverse().find(q=>q.role==="user");if(De){d(q=>q.map(ne=>ne.id===ee?{...ne,compilationStatus:"compiling"}:ne));try{const q=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:q.tool_name,description:q.description,tags:q.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(q){const ne=q instanceof Error?q.message:"Compilation failed";d(oe=>oe.map(W=>W.id===ee?{...W,compilationStatus:"error",compilationError:ne}:W))}}},[u]);return b.jsxDEV($E.Provider,{value:{helpOpen:a,setHelpOpen:o,toggleHelp:D,messages:u,sendMessage:F,pageContext:S,setPageContext:B,activeWorkflowId:p,clearMessages:z,compileMessage:X},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useHelpAssistant.tsx",lineNumber:232,columnNumber:5},this)}function IE(){const i=U.useContext($E);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function E4(){const{helpOpen:i,toggleHelp:s}=IE();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 FE=6048e5,_4=864e5,jS=6e4,MS=525600,kS=43200,VS=1440,US=Symbol.for("constructDateFrom");function ar(i,s){return typeof i=="function"?i(s):i&&typeof i=="object"&&US in i?i[US](s):i instanceof Date?new i.constructor(s):new Date(s)}function ts(i,s){return ar(s||i,i)}let A4={};function Su(){return A4}function xu(i,s){var m,g,v,_;const a=Su(),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 mh(i,s){return xu(i,{...s,weekStartsOn:1})}function YE(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=mh(u),p=ar(a,0);p.setFullYear(o,0,4),p.setHours(0,0,0,0);const m=mh(p);return a.getTime()>=d.getTime()?o+1:a.getTime()>=m.getTime()?o:o-1}function ph(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 GE(i,...s){const a=ar.bind(null,i||s.find(o=>typeof o=="object"));return s.map(a)}function zS(i,s){const a=ts(i,s==null?void 0:s.in);return a.setHours(0,0,0,0),a}function D4(i,s,a){const[o,u]=GE(a==null?void 0:a.in,i,s),d=zS(o),p=zS(u),m=+d-ph(d),g=+p-ph(p);return Math.round((m-g)/_4)}function T4(i,s){const a=YE(i,s),o=ar(i,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),mh(o)}function C4(i,s){const a=+ts(i)-+ts(s);return a<0?-1:a>0?1:a}function O4(i){return ar(i,Date.now())}function R4(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function j4(i){return!(!R4(i)&&typeof i!="number"||isNaN(+ts(i)))}function M4(i){return s=>{const o=(i?Math[i]:Math.trunc)(s);return o===0?0:o}}function k4(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 V4={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"}},U4=(i,s,a)=>{let o;const u=V4[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 N0(i){return(s={})=>{const a=s.width?String(s.width):i.defaultWidth;return i.formats[a]||i.formats[i.defaultWidth]}}const z4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},B4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},q4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},L4={date:N0({formats:z4,defaultWidth:"full"}),time:N0({formats:B4,defaultWidth:"full"}),dateTime:N0({formats:q4,defaultWidth:"full"})},H4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},P4=(i,s,a,o)=>H4[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 $4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},I4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},F4={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"]},Y4={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"]},G4={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"}},J4={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"}},Q4=(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"},X4={ordinalNumber:Q4,era:iu({values:$4,defaultWidth:"wide"}),quarter:iu({values:I4,defaultWidth:"wide",argumentCallback:i=>i-1}),month:iu({values:F4,defaultWidth:"wide"}),day:iu({values:Y4,defaultWidth:"wide"}),dayPeriod:iu({values:G4,defaultWidth:"wide",formattingValues:J4,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)?K4(m,S=>S.test(p)):Z4(m,S=>S.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 Z4(i,s){for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&s(i[a]))return a}function K4(i,s){for(let a=0;a<i.length;a++)if(s(i[a]))return a}function W4(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 eR=/^(\d+)(th|st|nd|rd)?/i,tR=/\d+/i,nR={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},sR={any:[/^b/i,/^(a|c)/i]},aR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rR={any:[/1/i,/2/i,/3/i,/4/i]},iR={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},oR={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]},lR={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},cR={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]},uR={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},fR={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}},dR={ordinalNumber:W4({matchPattern:eR,parsePattern:tR,valueCallback:i=>parseInt(i,10)}),era:ou({matchPatterns:nR,defaultMatchWidth:"wide",parsePatterns:sR,defaultParseWidth:"any"}),quarter:ou({matchPatterns:aR,defaultMatchWidth:"wide",parsePatterns:rR,defaultParseWidth:"any",valueCallback:i=>i+1}),month:ou({matchPatterns:iR,defaultMatchWidth:"wide",parsePatterns:oR,defaultParseWidth:"any"}),day:ou({matchPatterns:lR,defaultMatchWidth:"wide",parsePatterns:cR,defaultParseWidth:"any"}),dayPeriod:ou({matchPatterns:uR,defaultMatchWidth:"any",parsePatterns:fR,defaultParseWidth:"any"})},JE={code:"en-US",formatDistance:U4,formatLong:L4,formatRelative:P4,localize:X4,match:dR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function hR(i,s){const a=ts(i,s==null?void 0:s.in);return D4(a,k4(a))+1}function mR(i,s){const a=ts(i,s==null?void 0:s.in),o=+mh(a)-+T4(a);return Math.round(o/FE)+1}function QE(i,s){var _,S,D,B;const a=ts(i,s==null?void 0:s.in),o=a.getFullYear(),u=Su(),d=(s==null?void 0:s.firstWeekContainsDate)??((S=(_=s==null?void 0:s.locale)==null?void 0:_.options)==null?void 0:S.firstWeekContainsDate)??u.firstWeekContainsDate??((B=(D=u.locale)==null?void 0:D.options)==null?void 0:B.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 pR(i,s){var m,g,v,_;const a=Su(),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=QE(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 bR(i,s){const a=ts(i,s==null?void 0:s.in),o=+xu(a,s)-+pR(a,s);return Math.round(o/FE)+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"},BS={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=QE(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=YE(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=bR(i,o);return s==="wo"?a.ordinalNumber(u,{unit:"week"}):ct(u,s.length)},I:function(i,s,a){const o=mR(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=hR(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 LS(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 LS(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"+qS(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"+qS(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 qS(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 LS(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 HS=(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"})}},XE=(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"})}},yR=(i,s)=>{const a=i.match(/(P+)(p+)?/)||[],o=a[1],u=a[2];if(!u)return HS(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}}",HS(o,s)).replace("{{time}}",XE(u,s))},gR={p:XE,P:yR},vR=/^D+$/,xR=/^Y+$/,NR=["D","DD","YY","YYYY"];function wR(i){return vR.test(i)}function SR(i){return xR.test(i)}function ER(i,s,a){const o=_R(i,s,a);if(console.warn(o),NR.includes(i))throw new RangeError(o)}function _R(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 AR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TR=/^'([^]*?)'?$/,CR=/''/g,OR=/[a-zA-Z]/;function ZE(i,s,a){var _,S,D,B;const o=Su(),u=o.locale??JE,d=o.firstWeekContainsDate??((S=(_=o.locale)==null?void 0:_.options)==null?void 0:S.firstWeekContainsDate)??1,p=o.weekStartsOn??((B=(D=o.locale)==null?void 0:D.options)==null?void 0:B.weekStartsOn)??0,m=ts(i,a==null?void 0:a.in);if(!j4(m))throw new RangeError("Invalid time value");let g=s.match(DR).map(z=>{const F=z[0];if(F==="p"||F==="P"){const X=gR[F];return X(z,u.formatLong)}return z}).join("").match(AR).map(z=>{if(z==="''")return{isToken:!1,value:"'"};const F=z[0];if(F==="'")return{isToken:!1,value:RR(z)};if(BS[F])return{isToken:!0,value:z};if(F.match(OR))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)||wR(F))&&ER(F,s,String(i));const X=BS[F[0]];return X(m,F,u.localize,v)}).join("")}function RR(i){const s=i.match(TR);return s?s[1].replace(CR,"'"):i}function jR(i,s,a){const o=Su(),u=(a==null?void 0:a.locale)??o.locale??JE,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]=GE(a==null?void 0:a.in,...d>0?[s,i]:[i,s]),v=M4((a==null?void 0:a.roundingMethod)??"round"),_=g.getTime()-m.getTime(),S=_/jS,D=ph(g)-ph(m),B=(_-D)/jS,z=a==null?void 0:a.unit;let F;if(z?F=z:S<1?F="second":S<60?F="minute":S<VS?F="hour":B<kS?F="day":B<MS?F="month":F="year",F==="second"){const X=v(_/1e3);return u.formatDistance("xSeconds",X,p)}else if(F==="minute"){const X=v(S);return u.formatDistance("xMinutes",X,p)}else if(F==="hour"){const X=v(S/60);return u.formatDistance("xHours",X,p)}else if(F==="day"){const X=v(B/VS);return u.formatDistance("xDays",X,p)}else if(F==="month"){const X=v(B/kS);return X===12&&z!=="month"?u.formatDistance("xYears",1,p):u.formatDistance("xMonths",X,p)}else{const X=v(B/MS);return u.formatDistance("xYears",X,p)}}function MR(i,s){return jR(i,O4(i),s)}function kR(i){const s=new Date(i);return s.getTime()>Date.now()?"just now":MR(s,{addSuffix:!0})}function Wj(i){return i<=0?"Expired":fy(i)}function VR(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 e6(i,s){const a=new Date(i).getTime(),o=s?new Date(s).getTime():Date.now();return fy(o-a)}function KE({options:i,children:s,className:a=""}){const[o,u]=U.useState(!1),[d,p]=U.useState(null),[m,g]=U.useState(null),v=U.useRef(null),_=U.useRef(void 0),S=U.useRef(void 0),D=220,B=U.useCallback(()=>{if(!v.current)return;const ee=v.current.getBoundingClientRect(),te=window.innerWidth-D-8,Se=Math.max(8,Math.min(ee.left,te));g({top:ee.bottom+4,left:Se})},[]),z=U.useCallback(async(ee,te)=>{try{await navigator.clipboard.writeText(ee),p(te),clearTimeout(_.current),_.current=setTimeout(()=>p(null),1200)}catch{}},[]),F=U.useCallback(()=>{clearTimeout(S.current),B(),u(!0)},[B]),X=U.useCallback(()=>{S.current=setTimeout(()=>u(!1),150)},[]);return U.useEffect(()=>()=>{clearTimeout(_.current),clearTimeout(S.current)},[]),b.jsxDEV("span",{ref:v,className:`inline-flex items-center cursor-default ${a}`,onMouseEnter:F,onMouseLeave:X,children:[s,o&&m&&XS.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 UR(i,s){const a=new Date(i);switch(s){case"relative":return kR(i);case"datetime":return ZE(a,"MMM d, yyyy h:mm a");case"time":return a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function zR(i){const s=new Date(i);return[{label:"ms",value:String(s.getTime())},{label:"utc",value:s.toISOString()},{label:"local",value:ZE(s,"MMM d, yyyy h:mm:ss a")}]}function BR({date:i,format:s="relative",className:a=""}){const[,o]=U.useState(0);U.useEffect(()=>{if(s!=="relative")return;const d=setInterval(()=>o(p=>p+1),3e4);return()=>clearInterval(d)},[s]);const u=U.useMemo(()=>zR(i),[i]);return b.jsxDEV(KE,{options:u,children:b.jsxDEV("time",{dateTime:i,className:`text-xs text-text-tertiary ${a}`,children:UR(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 qR({ms:i,className:s=""}){const a=VR(i),o=U.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(KE,{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 LR=["sm","md","lg","full"],PS={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"},$S={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function HR({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 PR({msg:i}){const[s,a]=U.useState(0);U.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(ah,{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 $R({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(BR,{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(qR,{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(ah,{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(oC,{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 IR(){const{helpOpen:i,setHelpOpen:s,messages:a,sendMessage:o,pageContext:u,activeWorkflowId:d,clearMessages:p,compileMessage:m}=IE(),[g,v]=U.useState(""),[_,S]=U.useState("md"),[D,B]=U.useState(!0),z=U.useRef(null),F=U.useRef(null);if(U.useEffect(()=>{z.current&&(z.current.scrollTop=z.current.scrollHeight)},[a]),U.useEffect(()=>{i&&F.current&&F.current.focus()},[i]),U.useEffect(()=>{if(!i)return;const q=ne=>{ne.key==="Escape"&&(_==="full"?S("lg"):_==="lg"?S("md"):_==="md"?S("sm"):s(!1))};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[i,_,s]),!i)return null;const X=()=>{const q=g.trim();!q||d||(o(q),v(""),F.current&&(F.current.style.height="auto"))},ee=q=>{q.key==="Enter"&&!q.shiftKey&&(q.preventDefault(),X())},te=_==="full",Se=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?PS.full:`right-6 ${PS[_]}`} ${D?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:De,onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!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:Se},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:LR.map(q=>b.jsxDEV("button",{onClick:()=>S(q),className:`p-1 rounded transition-colors ${q===_?"bg-accent/15 text-accent":"text-text-muted hover:text-text-secondary hover:bg-surface-hover"}`,role:"radio","aria-checked":q===_,"aria-label":$S[q],title:$S[q],children:b.jsxDEV(HR,{which:q},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:113,columnNumber:17},this)},q,!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(lC,{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(q=>b.jsxDEV("div",{className:`text-xs leading-relaxed ${q.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 ${q.role==="user"?"bg-accent/10 text-text-primary":"bg-surface-sunken text-text-secondary"}`,children:q.pending?b.jsxDEV(PR,{msg:q},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:160,columnNumber:17},this):q.role==="assistant"?b.jsxDEV(uy,{content:q.content},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:162,columnNumber:17},this):q.content},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:152,columnNumber:13},this),!q.pending&&b.jsxDEV("div",{className:"mt-0.5",children:b.jsxDEV($R,{msg:q,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)]},q.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:q=>{v(q.target.value);const ne=q.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(cC,{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 FR(){const{isSuperAdmin:i,hasRoleType:s,hasRole:a}=Ki(),{collapsed:o,toggle:u}=LE(),[d,p]=U.useState(!1),[m,g]=U.useState(()=>window.location.hash.startsWith("#docs")),v=Zi(),_=U.useRef(null);return U.useEffect(()=>{const S=_.current;S&&(S.classList.remove("animate-page-in"),S.offsetWidth,S.classList.add("animate-page-in"))},[v.pathname]),U.useEffect(()=>{const S=()=>{window.location.hash.startsWith("#docs")&&g(!0)};return window.addEventListener("hashchange",S),()=>window.removeEventListener("hashchange",S)},[]),b.jsxDEV("div",{className:"h-screen bg-surface flex flex-col",style:{"--feed-height":d?"224px":"32px"},children:[b.jsxDEV(V5,{onToggleEventFeed:()=>p(S=>!S),onToggleDocs:()=>g(S=>!S)},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:[b.jsxDEV(H5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:58,columnNumber:13},this),(i||s("admin")||a("engineer"))&&b.jsxDEV($5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:59,columnNumber:79},this),(i||s("admin")||a("engineer"))&&b.jsxDEV(F5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:60,columnNumber:79},this),(i||s("admin"))&&b.jsxDEV(G5,{},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(uC,{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(fC,{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(c4,{open:d,onToggle:()=>p(S=>!S)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:89,columnNumber:7},this),b.jsxDEV(v4,{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(E4,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:91,columnNumber:7},this),b.jsxDEV(IR,{},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 YR(){const{isAuthenticated:i}=Ki(),s=Zi();return i?b.jsxDEV(R5,{children:b.jsxDEV(S4,{children:b.jsxDEV(FR,{},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 WE({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 GR(){return vt("/auth/oauth/providers")}async function JR(i,s){const a=s?`?label=${encodeURIComponent(s)}`:"";return vt(`/auth/oauth/connections/${i}${a}`,{method:"DELETE"})}function t6(){return rr({queryKey:["oauth-connections"],queryFn:()=>vt("/auth/oauth/connections")})}function n6(){const i=Vs();return wa({mutationFn:({provider:s,label:a})=>JR(s,a),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function QR(){var ne;const{login:i,isAuthenticated:s}=Ki(),a=ZS(),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=U.useRef(!1);d&&!g.current&&(g.current=!0,i(d,void 0,{displayName:u.get("displayName"),username:u.get("username")}));const[v,_]=U.useState(""),[S,D]=U.useState(""),[B,z]=U.useState(p||""),[F,X]=U.useState(!1),[ee,te]=U.useState(!!d),[Se,De]=U.useState([]);if(U.useEffect(()=>{d||GR().then(De).catch(()=>{})},[]),U.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 q=async oe=>{var W,Q;if(oe.preventDefault(),z(""),!v.trim()||!S){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:S})}),le=await H.json();if(!H.ok){z(le.error||"Login failed");return}te(!0),i(le.token,{username:v.trim(),password:S},{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:q,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:S,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),B&&b.jsxDEV("p",{className:"text-sm text-status-error",children:B},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),Se.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:Se.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(WE,{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 IS(){const{isAuthenticated:i}=Ki(),s=ZS(),a=Zi(),o=new URLSearchParams(a.search),u=o.get("state")||"";U.useEffect(()=>{i||s(`/login?returnTo=${encodeURIComponent(a.pathname+a.search)}`)},[i]);const[d,p]=U.useState(""),[m,g]=U.useState(o.get("label")||"default"),[v,_]=U.useState(""),[S,D]=U.useState(!1),B=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(WE,{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),B&&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:S,children:S?"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 w0({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 XR=U.lazy(()=>Ie(()=>import("./ProcessesListPage-iyPsmlhm.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(i=>({default:i.ProcessesListPage}))),ZR=U.lazy(()=>Ie(()=>import("./ProcessDetailPage-C03LOgI0.js"),__vite__mapDeps([16,2,1,4,17,18,13,19,15,9,6,20,21,22])).then(i=>({default:i.ProcessDetailPage}))),KR=U.lazy(()=>Ie(()=>import("./McpOverview-xkaKuHbX.js"),__vite__mapDeps([23,2,24,25,26,27,12,13,28,6])).then(i=>({default:i.McpOverview}))),WR=U.lazy(()=>Ie(()=>import("./McpRunsPage-DT-armx5.js"),__vite__mapDeps([29,2,25,26,27,5,6,7,8,15,13,9,30,12,11,10,14,31])).then(i=>({default:i.McpRunsPage}))),ej=U.lazy(()=>Ie(()=>import("./McpRunDetailPage-Znsl4Yc-.js"),__vite__mapDeps([32,2,25,17,19,12,13,33,6,34,35,11,36,14])).then(i=>({default:i.McpRunDetailPage}))),tj=U.lazy(()=>Ie(()=>import("./McpQueryPage-C46fzfm5.js"),__vite__mapDeps([37,12,13,2,7,8,11,10,14,9,30,15,31,5,6,4,38])).then(i=>({default:i.McpQueryPage}))),nj=U.lazy(()=>Ie(()=>import("./McpQueryDetailPage-D5ICn6cR.js"),__vite__mapDeps([39,12,13,2,19,38,40,6,26,4,41,34,25,3,1,42,43,44,45,33,46,36])).then(i=>({default:i.McpQueryDetailPage}))),sj=U.lazy(()=>Ie(()=>import("./EscalationsOverview-DM6zmE4g.js"),__vite__mapDeps([47,2,4,12,13,28,6])).then(i=>({default:i.EscalationsOverview}))),aj=U.lazy(()=>Ie(()=>import("./AvailableEscalationsPage-DdrzePy4.js"),__vite__mapDeps([48,2,4,49,5,6,7,8,10,12,13,50,51,17,52,22,53,11,54,20,15,9,55,31,14])).then(i=>({default:i.AvailableEscalationsPage}))),rj=U.lazy(()=>Ie(()=>import("./OperatorDashboard-e5N3_dVl.js"),__vite__mapDeps([56,4,2,49,5,6,7,8,12,13,10,31,53,11,54,20,15,9,55,14])).then(i=>({default:i.OperatorDashboard}))),ij=U.lazy(()=>Ie(()=>import("./index-CtbG3UN-.js"),__vite__mapDeps([57,2,49,12,13,55,3,17,4,21,22,51,50,19,20,33,6,34])).then(i=>({default:i.EscalationDetailPage}))),oj=U.lazy(()=>Ie(()=>import("./WorkflowsOverview-DA2ZOs7D.js"),__vite__mapDeps([58,2,3,4,12,13,28,6])).then(i=>({default:i.WorkflowsOverview}))),lj=U.lazy(()=>Ie(()=>import("./index-B9ealjkt.js"),__vite__mapDeps([59,2,3,12,13,15,44,45,6,7,8,60,46,19])).then(i=>({default:i.StartWorkflowPage}))),cj=U.lazy(()=>Ie(()=>import("./index-B9ealjkt.js"),__vite__mapDeps([59,2,3,12,13,15,44,45,6,7,8,60,46,19])).then(i=>({default:i.DurableInvokePage}))),uj=U.lazy(()=>Ie(()=>import("./WorkflowsDashboard-BWiUNvyl.js"),__vite__mapDeps([61,2,9,30,3,4,5,6,7,8,15,13,12,11,10,14,31])).then(i=>({default:()=>i.WorkflowsDashboard({tier:"durable"})}))),fj=U.lazy(()=>Ie(()=>import("./WorkflowsDashboard-BWiUNvyl.js"),__vite__mapDeps([61,2,9,30,3,4,5,6,7,8,15,13,12,11,10,14,31])).then(i=>({default:()=>i.WorkflowsDashboard({tier:"all"})}))),dj=U.lazy(()=>Ie(()=>import("./YamlWorkflowsPage-CLebf2eL.js"),__vite__mapDeps([62,2,26,40,5,6,63,12,13,11,8,43,44,45,42,60,46,19,64])).then(i=>({default:i.YamlWorkflowsPage}))),hj=U.lazy(()=>Ie(()=>import("./TasksListPage-D1INzcrA.js"),__vite__mapDeps([65,1,2,3,5,6,7,8,19,54,46,10,11,12,13,15])).then(i=>({default:i.TasksListPage}))),mj=U.lazy(()=>Ie(()=>import("./TaskDetailPage-pN5BXzYA.js"),__vite__mapDeps([66,1,2,19,54,12,13,6])).then(i=>({default:i.TaskDetailPage}))),FS=U.lazy(()=>Ie(()=>import("./WorkflowExecutionPage-C61R-3Gg.js"),__vite__mapDeps([67,2,3,4,35,11,36,19,6,1,12,13,34,14])).then(i=>({default:i.WorkflowExecutionPage}))),pj=U.lazy(()=>Ie(()=>import("./AdminDashboard-CbeSejVX.js"),__vite__mapDeps([68,1,2,4,24,18,13,6])).then(i=>({default:i.AdminDashboard}))),bj=U.lazy(()=>Ie(()=>import("./index-CS61sh5q.js"),__vite__mapDeps([69,2,3,7,8,11,31,5,6,12,13,70,15])).then(i=>({default:i.WorkersPage}))),yj=U.lazy(()=>Ie(()=>import("./index-BYwPVJv0.js"),__vite__mapDeps([71,2,3,7,8,72,52,6,11,31,5,12,13,20,70,15,73,49,44,45])).then(i=>({default:i.WorkflowConfigsPage}))),YS=U.lazy(()=>Ie(()=>import("./index-BYwPVJv0.js"),__vite__mapDeps([71,2,3,7,8,72,52,6,11,31,5,12,13,20,70,15,73,49,44,45])).then(i=>({default:i.WorkflowConfigDetailPage}))),gj=U.lazy(()=>Ie(()=>import("./index-QicYdUsl.js"),__vite__mapDeps([74,2,24,8,72,52,6,12,13,11,10,5,63,75,43,44,45,42,64,31,19])).then(i=>({default:i.McpServersPage}))),GS=U.lazy(()=>Ie(()=>import("./index-D_H_Prht.js"),__vite__mapDeps([76,2,24,73,12,13,41,6])).then(i=>({default:i.McpServerDetailPage}))),vj=U.lazy(()=>Ie(()=>import("./index-dM-OgCY3.js"),__vite__mapDeps([77,2,22,5,6,7,8,10,11,9,72,52,31,12,13,20,45,49,46])).then(i=>({default:i.UsersPage}))),xj=U.lazy(()=>Ie(()=>import("./RolesPage-Bmc3XaUk.js"),__vite__mapDeps([78,2,49,7,8,72,52,6,12,13,20,31])).then(i=>({default:i.RolesPage}))),Nj=U.lazy(()=>Ie(()=>import("./index-DWUunWxh.js"),__vite__mapDeps([79,2,12,13,52,6,50])).then(i=>({default:i.MaintenancePage}))),wj=U.lazy(()=>Ie(()=>import("./index-BWHDW_CF.js"),__vite__mapDeps([80,2,18,13,11,5,6,81,31,52,7,8,34,70])).then(i=>({default:i.ControlPlanePage}))),Sj=U.lazy(()=>Ie(()=>import("./CredentialsPage-D1VAlwid.js"),__vite__mapDeps([82,2,12,13,46,72,52,6])).then(i=>({default:i.CredentialsPage}))),Ej=U.lazy(()=>Ie(()=>import("./index-Dpjguclc.js"),__vite__mapDeps([83,2,6,12,13,11,14,8,84,46])).then(i=>({default:i.FilesPage}))),_j=U.lazy(()=>Ie(()=>import("./index-6Kd78p_v.js"),__vite__mapDeps([85,2,12,13,11,14,10,8,84,46,86,41,6])).then(i=>({default:i.KnowledgePage}))),Aj=U.lazy(()=>Ie(()=>import("./HomePage-BuZkdXZt.js"),__vite__mapDeps([87,2,3,25,81,1,4,20,13,15,14,88,6])).then(i=>({default:i.HomePage}))),Dj=U.lazy(()=>Ie(()=>import("./AgentsPage-Bz61Nl-x.js"),__vite__mapDeps([89,90,2,4,5,6,7,8,10,11,12,13,14])).then(i=>({default:i.AgentsPage}))),Tj=U.lazy(()=>Ie(()=>import("./AgentDetailPage-Dbx2t-Uk.js"),__vite__mapDeps([91,2,90,92,13,4,88,15,6])).then(i=>({default:i.AgentDetailPage}))),JS=U.lazy(()=>Ie(()=>import("./AgentConfigPage-CFJNOrlg.js"),__vite__mapDeps([93,2,90,92,13,12,86,43,44,45,3,94,26,88,15,6])).then(i=>({default:i.AgentConfigPage}))),Cj=U.lazy(()=>Ie(()=>import("./CapabilitiesPage-Ch5qY0I7.js"),__vite__mapDeps([95,2,75,24,43,44,45,13,42,64,6,12])).then(i=>({default:i.CapabilitiesPage}))),Oj=U.lazy(()=>Ie(()=>import("./TopicsPage-DbtrnQON.js"),__vite__mapDeps([96,94,2,5,6,7,8,10,11,12,13,14])).then(i=>({default:i.TopicsPage}))),Rj=U.lazy(()=>Ie(()=>import("./TopicDetailPage-DadwM52Y.js"),__vite__mapDeps([97,2,94,14,13,6])).then(i=>({default:i.TopicDetailPage})));function jj(){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:164,columnNumber:7},this),b.jsxDEV("div",{className:"h-40 bg-surface-sunken rounded"},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:165,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/App.tsx",lineNumber:163,columnNumber:5},this)}function ke({children:i}){return b.jsxDEV(U.Suspense,{fallback:b.jsxDEV(jj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:172,columnNumber:25},this),children:b.jsxDEV("div",{className:"animate-page-enter",children:i},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:173,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:172,columnNumber:5},this)}const e_=new BT({defaultOptions:{queries:{staleTime:1e4,retry:(i,s)=>s instanceof Error&&s.message==="Session expired"?!1:i<1}}});window.addEventListener("auth:unauthorized",()=>{e_.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 Mj=HT([{path:"/login",element:b.jsxDEV(QR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:209,columnNumber:30},void 0)},{path:"/connect/anthropic",element:b.jsxDEV(IS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:210,columnNumber:42},void 0)},{path:"/connect/:provider",element:b.jsxDEV(IS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:211,columnNumber:42},void 0)},{path:"/",element:b.jsxDEV(YR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:214,columnNumber:14},void 0),children:[{index:!0,element:b.jsxDEV(ke,{children:b.jsxDEV(Aj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:217,columnNumber:37},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:217,columnNumber:31},void 0)},{path:"processes/all",element:b.jsxDEV(ke,{children:b.jsxDEV(XR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:220,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:220,columnNumber:41},void 0)},{path:"processes/detail/:originId",element:b.jsxDEV(ke,{children:b.jsxDEV(ZR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:221,columnNumber:60},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:221,columnNumber:54},void 0)},{path:"credentials",element:b.jsxDEV(ke,{children:b.jsxDEV(Sj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:224,columnNumber:45},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:224,columnNumber:39},void 0)},{path:"connections",element:b.jsxDEV(ei,{to:"/credentials",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:225,columnNumber:39},void 0)},{path:"escalations",element:b.jsxDEV(ke,{children:b.jsxDEV(sj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:228,columnNumber:45},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:228,columnNumber:39},void 0)},{path:"escalations/available",element:b.jsxDEV(ke,{children:b.jsxDEV(aj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:229,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:229,columnNumber:49},void 0)},{path:"escalations/queue",element:b.jsxDEV(ke,{children:b.jsxDEV(rj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:230,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:230,columnNumber:45},void 0)},{path:"escalations/detail/:id",element:b.jsxDEV(ke,{children:b.jsxDEV(ij,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:231,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:231,columnNumber:50},void 0)},{path:"capabilities",element:b.jsxDEV(ke,{children:b.jsxDEV(Cj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:234,columnNumber:46},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:234,columnNumber:40},void 0)},{path:"agents",element:b.jsxDEV(ke,{children:b.jsxDEV(Dj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:237,columnNumber:40},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:237,columnNumber:34},void 0)},{path:"agents/new",element:b.jsxDEV(ke,{children:b.jsxDEV(JS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:238,columnNumber:44},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:238,columnNumber:38},void 0)},{path:"agents/:id",element:b.jsxDEV(ke,{children:b.jsxDEV(Tj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:239,columnNumber:44},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:239,columnNumber:38},void 0)},{path:"agents/:id/edit",element:b.jsxDEV(ke,{children:b.jsxDEV(JS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:240,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:240,columnNumber:43},void 0)},{path:"topics",element:b.jsxDEV(ke,{children:b.jsxDEV(Oj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:243,columnNumber:40},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:243,columnNumber:34},void 0)},{path:"topics/:topic",element:b.jsxDEV(ke,{children:b.jsxDEV(Rj,{},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(w0,{roleTypes:["admin","superadmin"],roleNames:["engineer"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:248,columnNumber:18},void 0),children:[{path:"workflows",element:b.jsxDEV(ke,{children:b.jsxDEV(oj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:250,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:250,columnNumber:41},void 0)},{path:"workflows/executions",element:b.jsxDEV(ke,{children:b.jsxDEV(fj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:251,columnNumber:58},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:251,columnNumber:52},void 0)},{path:"workflows/durable/executions",element:b.jsxDEV(ke,{children:b.jsxDEV(uj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:252,columnNumber:66},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:252,columnNumber:60},void 0)},{path:"workflows/durable/executions/:workflowId",element:b.jsxDEV(ke,{children:b.jsxDEV(FS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:253,columnNumber:78},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:253,columnNumber:72},void 0)},{path:"workflows/tasks",element:b.jsxDEV(ke,{children:b.jsxDEV(hj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:254,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:254,columnNumber:47},void 0)},{path:"workflows/tasks/detail/:id",element:b.jsxDEV(ke,{children:b.jsxDEV(mj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:255,columnNumber:64},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:255,columnNumber:58},void 0)},{path:"workflows/executions/:workflowId",element:b.jsxDEV(ke,{children:b.jsxDEV(FS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:256,columnNumber:70},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:256,columnNumber:64},void 0)},{path:"workflows/start",element:b.jsxDEV(ke,{children:b.jsxDEV(lj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:257,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:257,columnNumber:47},void 0)},{path:"workflows/durable/invoke",element:b.jsxDEV(ke,{children:b.jsxDEV(cj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:258,columnNumber:62},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:258,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:259,columnNumber:46},void 0)},{path:"workflows/workers",element:b.jsxDEV(ke,{children:b.jsxDEV(bj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:260,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:260,columnNumber:49},void 0)},{path:"workflows/registry",element:b.jsxDEV(ke,{children:b.jsxDEV(yj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:261,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:261,columnNumber:50},void 0)},{path:"workflows/registry/new",element:b.jsxDEV(ke,{children:b.jsxDEV(YS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:262,columnNumber:60},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:262,columnNumber:54},void 0)},{path:"workflows/registry/:workflowType",element:b.jsxDEV(ke,{children:b.jsxDEV(YS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:263,columnNumber:70},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:263,columnNumber:64},void 0)}]},{element:b.jsxDEV(w0,{roleTypes:["admin","superadmin"],roleNames:["engineer"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:269,columnNumber:18},void 0),children:[{path:"mcp",element:b.jsxDEV(ke,{children:b.jsxDEV(KR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:271,columnNumber:41},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:271,columnNumber:35},void 0)},{path:"mcp/queries",element:b.jsxDEV(ke,{children:b.jsxDEV(tj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:272,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:272,columnNumber:43},void 0)},{path:"mcp/queries/:workflowId",element:b.jsxDEV(ke,{children:b.jsxDEV(nj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:273,columnNumber:61},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:273,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:274,columnNumber:41},void 0)},{path:"mcp/servers",element:b.jsxDEV(ke,{children:b.jsxDEV(gj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:275,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:275,columnNumber:43},void 0)},{path:"mcp/servers/new",element:b.jsxDEV(ke,{children:b.jsxDEV(GS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:276,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:276,columnNumber:47},void 0)},{path:"mcp/servers/:serverId",element:b.jsxDEV(ke,{children:b.jsxDEV(GS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:277,columnNumber:59},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:277,columnNumber:53},void 0)},{path:"mcp/workflows",element:b.jsxDEV(ke,{children:b.jsxDEV(dj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:278,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:278,columnNumber:45},void 0)},{path:"mcp/executions",element:b.jsxDEV(ke,{children:b.jsxDEV(WR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:279,columnNumber:52},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:279,columnNumber:46},void 0)},{path:"mcp/executions/:jobId",element:b.jsxDEV(ke,{children:b.jsxDEV(ej,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:280,columnNumber:59},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:280,columnNumber:53},void 0)},{path:"files",element:b.jsxDEV(ke,{children:b.jsxDEV(Ej,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:283,columnNumber:43},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:283,columnNumber:37},void 0)},{path:"knowledge",element:b.jsxDEV(ke,{children:b.jsxDEV(_j,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:286,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:286,columnNumber:41},void 0)}]},{element:b.jsxDEV(w0,{roleTypes:["admin","superadmin"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:292,columnNumber:18},void 0),children:[{path:"admin",element:b.jsxDEV(ke,{children:b.jsxDEV(pj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:294,columnNumber:43},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:294,columnNumber:37},void 0)},{path:"admin/users",element:b.jsxDEV(ke,{children:b.jsxDEV(vj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:295,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:295,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:296,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:297,columnNumber:55},void 0)},{path:"admin/roles",element:b.jsxDEV(ke,{children:b.jsxDEV(xj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:298,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:298,columnNumber:43},void 0)},{path:"admin/maintenance",element:b.jsxDEV(ke,{children:b.jsxDEV(Nj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:299,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:299,columnNumber:49},void 0)},{path:"admin/controlplane",element:b.jsxDEV(ke,{children:b.jsxDEV(wj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:300,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:300,columnNumber:50},void 0)}]}]}]);function kj(){return b.jsxDEV(qT,{client:e_,children:b.jsxDEV(wC,{children:b.jsxDEV(O5,{children:b.jsxDEV(PT,{router:Mj},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:312,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:311,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:310,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:309,columnNumber:5},this)}gC.createRoot(document.getElementById("root")).render(b.jsxDEV(U.StrictMode,{children:b.jsxDEV(kj,{},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{t6 as A,n6 as B,cy as C,qR as D,rE as E,HE as F,i4 as J,_O as N,WE as O,J5 as S,e6 as a,vt as b,BR as c,Pj as d,Ij as e,VR as f,Yj as g,Lj as h,Ki as i,b as j,Jj as k,Qj as l,Xj as m,Zj as n,Kj as o,Hj as p,M5 as q,j5 as r,Fj as s,$j as t,_E as u,Gj as v,ZE as w,KE as x,Wj as y,fy as z};
|
|
281
|
+
//# sourceMappingURL=index-CCOSf1PY.js.map
|