@nodefony/studio 10.0.0-beta.4 → 10.0.0-beta.6
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/dist/_virtual/{_@oxc-project_runtime@0.155.0 → _@oxc-project_runtime@0.157.0}/helpers/esm/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.155.0 → _@oxc-project_runtime@0.157.0}/helpers/esm/decorateParam.js +1 -1
- package/dist/frontend/assets/Accordion-ALba5ICd.js +1 -0
- package/dist/frontend/assets/ActionsLiveGraph-BByMDQ8p.js +1 -0
- package/dist/frontend/assets/AgentsPreview-qzmyxcol.js +12 -0
- package/dist/frontend/assets/ApiKeys-D2Di4HS3.js +2 -0
- package/dist/frontend/assets/ArchitectureLiveGraph-B6IuvK3P.js +1 -0
- package/dist/frontend/assets/Audit-B_Y8xC-6.js +1 -0
- package/dist/frontend/assets/BackplaneLiveGraph-BNBq8vxo.js +1 -0
- package/dist/frontend/assets/Breadcrumbs-CMlMMkgY.js +1 -0
- package/dist/frontend/assets/BrickStoreChip-CA_GfR1O.js +1 -0
- package/dist/frontend/assets/Chat-zFVRIlFd.js +1 -0
- package/dist/frontend/assets/Chip-LuHDMUZa.js +1 -0
- package/dist/frontend/assets/Cluster-CV4F6rSr.js +1 -0
- package/dist/frontend/assets/Collapse-BJqaENVr.js +1 -0
- package/dist/frontend/assets/ConfigPage-Cm7pRkQh.js +1 -0
- package/dist/frontend/assets/ConnectorCard-Cbg_g5Du.js +11 -0
- package/dist/frontend/assets/Create-B0PlzeBP.js +2 -0
- package/dist/frontend/assets/DashboardSupervision-DF7InKb9.js +1 -0
- package/dist/frontend/assets/Database-DBb4gwPi.js +1 -0
- package/dist/frontend/assets/{DbLogo-CPVaIo-1.js → DbLogo-7aV10wM_.js} +1 -1
- package/dist/frontend/assets/Documentation-CdwQjy33.js +1 -0
- package/dist/frontend/assets/FanOutLiveGraph-D5IOJSwh.js +1 -0
- package/dist/frontend/assets/Firewall-CtFZmQ_M.js +1 -0
- package/dist/frontend/assets/GatewayPreview-CsYp5iZJ.js +1 -0
- package/dist/frontend/assets/{IconAdjustmentsAlt-Dh7-w67A.js → IconAdjustmentsAlt-Caz_R5bs.js} +1 -1
- package/dist/frontend/assets/{IconAdjustmentsHorizontal-Bze9w1KM.js → IconAdjustmentsHorizontal-CM1uG9KB.js} +1 -1
- package/dist/frontend/assets/{IconAffiliate-CM-xujb3.js → IconAffiliate-CvqXvNrd.js} +1 -1
- package/dist/frontend/assets/IconApi-3qAL5Yjr.js +1 -0
- package/dist/frontend/assets/IconAppWindow-Bnx8TK6W.js +1 -0
- package/dist/frontend/assets/{IconApps-99oikTTs.js → IconApps-bjEy2ZUX.js} +1 -1
- package/dist/frontend/assets/{IconArchive-Be62Qpuc.js → IconArchive-CmF90Nz1.js} +1 -1
- package/dist/frontend/assets/{IconArrowDown-CVg6dTJG.js → IconArrowDown-DSfqVBEf.js} +1 -1
- package/dist/frontend/assets/{IconArrowLeft-BjXaYGFL.js → IconArrowLeft-BjCZ9CEd.js} +1 -1
- package/dist/frontend/assets/{IconArrowUp-BI5oNIYX.js → IconArrowUp-Bzx15XR8.js} +1 -1
- package/dist/frontend/assets/IconArrowsExchange-BKfT7cil.js +1 -0
- package/dist/frontend/assets/{IconArrowsSplit2-2czCcKl1.js → IconArrowsSplit2-BMuFjeYp.js} +1 -1
- package/dist/frontend/assets/IconBan-FT1sWj-T.js +1 -0
- package/dist/frontend/assets/{IconBook-3zpOeyw5.js → IconBook-DKUWpOeJ.js} +1 -1
- package/dist/frontend/assets/{IconBooks-BsR3SerW.js → IconBooks-DjcVIQ-S.js} +1 -1
- package/dist/frontend/assets/{IconBox-CyPTTK_h.js → IconBox-BAwdWaia.js} +1 -1
- package/dist/frontend/assets/{IconBrain-CtK-z0Qs.js → IconBrain-C6NOhqzz.js} +1 -1
- package/dist/frontend/assets/{IconCircleCheck-4L5q2AOa.js → IconCircleCheck-EFWqFKav.js} +1 -1
- package/dist/frontend/assets/{IconCircleDot-UeVVj0Hw.js → IconCircleDot-4fPWGW9L.js} +1 -1
- package/dist/frontend/assets/IconCircuitResistor-CB_bM60O.js +1 -0
- package/dist/frontend/assets/{IconCode-CZBF6Fre.js → IconCode-IC42sjug.js} +1 -1
- package/dist/frontend/assets/{IconDeviceDesktop-CmA2QS1y.js → IconDeviceDesktop-CRF_lI0H.js} +1 -1
- package/dist/frontend/assets/IconDevices-34oQmjaK.js +1 -0
- package/dist/frontend/assets/{IconDots-CGp_6hGw.js → IconDots-BOKu4rIh.js} +1 -1
- package/dist/frontend/assets/{IconDownload-BHadX_X7.js → IconDownload-B_lX7WPe.js} +1 -1
- package/dist/frontend/assets/{IconEye-DtO-67sS.js → IconEye-Cbm-k8Mf.js} +1 -1
- package/dist/frontend/assets/{IconFile-CawVe9xy.js → IconFile-DAR2pS88.js} +1 -1
- package/dist/frontend/assets/{IconFolder-DtN07M63.js → IconFolder-DZtY_4Ju.js} +1 -1
- package/dist/frontend/assets/{IconGitBranch-B0jrHkO3.js → IconGitBranch-Du3OR1Qu.js} +1 -1
- package/dist/frontend/assets/{IconHandStop-ysGACXTj.js → IconHandStop-D5IEBW_F.js} +1 -1
- package/dist/frontend/assets/{IconHeartRateMonitor-Bvl8jHTd.js → IconHeartRateMonitor-B0WTzq7p.js} +1 -1
- package/dist/frontend/assets/{IconHelpCircle-BCItd8VT.js → IconHelpCircle-DK4LQvc5.js} +1 -1
- package/dist/frontend/assets/{IconLayoutGrid-CfSdAIlD.js → IconLayoutGrid-Bjd-AbP0.js} +1 -1
- package/dist/frontend/assets/IconListSearch-oqmmW_-J.js +1 -0
- package/dist/frontend/assets/IconPackages-CYbFqLBF.js +1 -0
- package/dist/frontend/assets/{IconPencil-BpxtlIcN.js → IconPencil-CDLSZvLB.js} +1 -1
- package/dist/frontend/assets/{IconPlayerPause-CbRWQ0OJ.js → IconPlayerPause-D5zFqzRA.js} +1 -1
- package/dist/frontend/assets/IconPlayerPlay-BuQoHMlG.js +1 -0
- package/dist/frontend/assets/{IconPlayerStop-CJYvZ1j2.js → IconPlayerStop-Ceov1CKi.js} +1 -1
- package/dist/frontend/assets/IconPlus-wcOf2tpK.js +1 -0
- package/dist/frontend/assets/{IconPuzzle-D3bEL-Kr.js → IconPuzzle-vE8cqLR_.js} +1 -1
- package/dist/frontend/assets/{IconRecycle-BtnT8ZXv.js → IconRecycle-C_twI1ht.js} +1 -1
- package/dist/frontend/assets/{IconSend-zQNYJbkq.js → IconSend-D_wHD_TM.js} +1 -1
- package/dist/frontend/assets/{IconServer2-D61W-eXq.js → IconServer2-ZtG1_ODi.js} +1 -1
- package/dist/frontend/assets/{IconShieldOff-C2WA-gmj.js → IconShieldOff-D5UxWHhA.js} +1 -1
- package/dist/frontend/assets/{IconSitemap-BJzupAxl.js → IconSitemap-DDw0J5mh.js} +1 -1
- package/dist/frontend/assets/{IconStack2-B9YJBVEL.js → IconStack2-jDW18idi.js} +1 -1
- package/dist/frontend/assets/{IconTerminal2-ZtXcXVK9.js → IconTerminal2-BUd47F6P.js} +1 -1
- package/dist/frontend/assets/{IconTool-BhLKKx-z.js → IconTool-B58Tttir.js} +1 -1
- package/dist/frontend/assets/{IconUserOff-FIAY4a-C.js → IconUserOff-uhJAZPSA.js} +1 -1
- package/dist/frontend/assets/{IconWorld-DoL6V4LE.js → IconWorld-CLmDLaDL.js} +1 -1
- package/dist/frontend/assets/KnowledgePreview-Dj3-LzX5.js +1 -0
- package/dist/frontend/assets/List-CECkvlG7.js +1 -0
- package/dist/frontend/assets/LlmProvidersPreview-B3b8uMwc.js +1 -0
- package/dist/frontend/assets/LogVisuals-rhO3Rnnr.js +1 -0
- package/dist/frontend/assets/Logs-CRND6dqr.js +1 -0
- package/dist/frontend/assets/McpPreview-BREhLzsz.js +1 -0
- package/dist/frontend/assets/MemoryPreview-CauqEca-.js +1 -0
- package/dist/frontend/assets/Migrations-mRqTP2yg.js +3 -0
- package/dist/frontend/assets/ModuleDetail-BwY-ROFd.js +1 -0
- package/dist/frontend/assets/Modules-D2PUGpQ7.js +1 -0
- package/dist/frontend/assets/OrmConnector-BMEtXO3H.js +1 -0
- package/dist/frontend/assets/OrmEntity-DvHPhtGy.js +1 -0
- package/dist/frontend/assets/OrmOverview-DtAyGUiC.js +1 -0
- package/dist/frontend/assets/OrmWorker-CzRyK20W.js +1 -0
- package/dist/frontend/assets/Playground-BJFpJxXF.js +1 -0
- package/dist/frontend/assets/ProbesLiveGraph-c31FHQM2.js +1 -0
- package/dist/frontend/assets/Profile-IJIE8V07.js +2 -0
- package/dist/frontend/assets/ProfileFields-Cq9vA8Ue.js +1 -0
- package/dist/frontend/assets/Progress-x0M71dKl.js +1 -0
- package/dist/frontend/assets/ProtocoleLiveGraph-Bka1_XFf.js +1 -0
- package/dist/frontend/assets/RealtimeConsole-BpVJhbUh.js +1 -0
- package/dist/frontend/assets/RingProgress-ByEC92W0.js +1 -0
- package/dist/frontend/assets/Roadmap-3qxA5Dl5.js +1 -0
- package/dist/frontend/assets/RoleSwitch-B5hdXz8L.js +1 -0
- package/dist/frontend/assets/Roles-CV7vVmqC.js +1 -0
- package/dist/frontend/assets/RoutesView-B-5vtPFV.js +1 -0
- package/dist/frontend/assets/Runtime-sp3mqqpQ.js +1 -0
- package/dist/frontend/assets/Sessions-Dv5uIszb.js +1 -0
- package/dist/frontend/assets/Skeleton-Co-k5bg6.js +1 -0
- package/dist/frontend/assets/Slider-DLr1BvW7.js +1 -0
- package/dist/frontend/assets/StoresView-6i0oYI0t.js +1 -0
- package/dist/frontend/assets/System-8KWu2xGf.js +1 -0
- package/dist/frontend/assets/TagsInput-DrkhRdPp.js +1 -0
- package/dist/frontend/assets/Textarea-Bwjmjqa0.js +1 -0
- package/dist/frontend/assets/Timeline-G0bEoS2W.js +1 -0
- package/dist/frontend/assets/TraceView-BRlpmJY-.js +1 -0
- package/dist/frontend/assets/Twin-DcBpuqwJ.js +1 -0
- package/dist/frontend/assets/TwinMap-DXVz_AWv.js +19 -0
- package/dist/frontend/assets/UserProfile-r96NX7gV.js +1 -0
- package/dist/frontend/assets/Users-ihZaRoqZ.js +1 -0
- package/dist/frontend/assets/VectorStoresPreview-eAR2-Lt7.js +1 -0
- package/dist/frontend/assets/Webhooks-BccR4L9R.js +1 -0
- package/dist/frontend/assets/Workspace-Su3OYXke.js +1 -0
- package/dist/frontend/assets/abnfDiagram-S7VZAUFO-BthwvKmL.js +1 -0
- package/dist/frontend/assets/aiPreviewParts-BTj_x25N.js +1 -0
- package/dist/frontend/assets/{apiKeysModel-Pn7Cxpaa.js → apiKeysModel-BIHGwPUS.js} +1 -1
- package/dist/frontend/assets/{arc-Dkr_NqJg.js → arc-Y1ARJVZ4.js} +1 -1
- package/dist/frontend/assets/architecture-WOLXFQ4H-BQY4m_R3.js +1 -0
- package/dist/frontend/assets/architectureDiagram-YGSQEFNW-CtnMg3MY.js +36 -0
- package/dist/frontend/assets/auditFormat-iKBSSfyd.js +1 -0
- package/dist/frontend/assets/{auditModel-VtcG7xbJ.js → auditModel-BvCxSmod.js} +1 -1
- package/dist/frontend/assets/blockDiagram-APKKGZFW-CsYeBrai.js +140 -0
- package/dist/frontend/assets/bpmnIcons-APHXDYXF-C0jbCElo.js +1 -0
- package/dist/frontend/assets/{c4Diagram-XDPPPE54-B4jELhYh.js → c4Diagram-KJ2TOQU5-C8bCU1bx.js} +8 -8
- package/dist/frontend/assets/{chunk-7S6XSTFO-DClaWD3h.js → chunk-6MUBBAK2-DAO7STBG.js} +1 -1
- package/dist/frontend/assets/chunk-AXFCVDMN-CqUINOI2.js +62 -0
- package/dist/frontend/assets/{chunk-DSNLSHJZ-BHcejTug.js → chunk-BG4553SI-BNzrATwc.js} +33 -33
- package/dist/frontend/assets/chunk-DQASFODM-DKUUI-Ih.js +10 -0
- package/dist/frontend/assets/chunk-HFQBQIA3--X-aj9KB.js +1 -0
- package/dist/frontend/assets/chunk-KQLB2F66-CuRVkU-t.js +2 -0
- package/dist/frontend/assets/{chunk-4EMNKR2T-DkjFLyKa.js → chunk-KS47KZWR-C3-zYwni.js} +1 -1
- package/dist/frontend/assets/chunk-LEVMRMFU-BeKJOfig.js +1 -0
- package/dist/frontend/assets/chunk-M57EVK23-Bs-aWYqL.js +1 -0
- package/dist/frontend/assets/{chunk-NGNAAXSQ-Bw6tHVuc.js → chunk-NGNAAXSQ-DI_UYJZ4.js} +1 -1
- package/dist/frontend/assets/{chunk-2E7WHVMD-CnHjZi31.js → chunk-OY52VR5R-DN8ejlQ6.js} +4 -4
- package/dist/frontend/assets/chunk-QB3YPZ4I-D5PEJqKj.js +213 -0
- package/dist/frontend/assets/chunk-R3KSYZAL-DFQRbzGi.js +1 -0
- package/dist/frontend/assets/{chunk-AQDTSKZB-BCzT2csB.js → chunk-STOXU5M4-BmVWLvxQ.js} +7 -7
- package/dist/frontend/assets/chunk-TU62E6Q5-BqRb4Syq.js +1 -0
- package/dist/frontend/assets/{chunk-UHW7PFBP-C4qGS7N6.js → chunk-X4PVCEUW-DBYVvmEP.js} +1 -1
- package/dist/frontend/assets/chunk-XXDRQBXY-KOTosY-t.js +1 -0
- package/dist/frontend/assets/{classDiagram-v2-4MYWR3UA-BYwKN_JS.js → classDiagram-v2-L25IHNXF-B0Tfsy9e.js} +9 -9
- package/dist/frontend/assets/configEdit-Dvwklp12.js +1 -0
- package/dist/frontend/assets/cose-bilkent-JH36ORCC-DI2bTSr6.js +1 -0
- package/dist/frontend/assets/cynefin-EF2NZ3EQ-e826ZIRH.js +1 -0
- package/dist/frontend/assets/{cynefinDiagram-WF24UDRP-BlblpBJN.js → cynefinDiagram-L36ESFBY-Clsv_gOI.js} +1 -1
- package/dist/frontend/assets/cytoscape.esm-DaJm_o37.js +321 -0
- package/dist/frontend/assets/dagre-SPEB5RXH-cY9dwpOY.js +4 -0
- package/dist/frontend/assets/dayjs.min-C79hm5sx.js +1 -0
- package/dist/frontend/assets/{diagram-TYUNFSNR-CHlQchf6.js → diagram-3B7GL73J-ZnBnQ4MO.js} +33 -33
- package/dist/frontend/assets/{diagram-I5XIIV2D-CzqjaT_Z.js → diagram-DNEMPZML-e0DwZ8iA.js} +1 -1
- package/dist/frontend/assets/{diagram-RJA3I4VV-awutgug0.js → diagram-L3MUGCDN-BzmymsEn.js} +2 -2
- package/dist/frontend/assets/diagram-LA4NIPWU-DhzeBEnk.js +24 -0
- package/dist/frontend/assets/diagram-MHCOC4E2-DqdCYbDY.js +3 -0
- package/dist/frontend/assets/{diagram-ODIL2UCW-DYG1ZHG2.js → diagram-XPFHEONP-B08RMyca.js} +6 -6
- package/dist/frontend/assets/dist-CumnGVmJ.js +1 -0
- package/dist/frontend/assets/ebnfDiagram-UZSYDL2S-BDZ2e7-2.js +1 -0
- package/dist/frontend/assets/elk-XV6XMXQE-CW1yMFnw.js +27 -0
- package/dist/frontend/assets/erDiagram-EYBAPDEH-BqxJrPVs.js +99 -0
- package/dist/frontend/assets/eventFlow-B9uJqrQa.js +1 -0
- package/dist/frontend/assets/eventmodeling-K75KTNOO-CEasMmJe.js +1 -0
- package/dist/frontend/assets/flowDiagram-MALGAFMO-B3gkB--g.js +1 -0
- package/dist/frontend/assets/ganttDiagram-23REXITY-Bx0HX2-D.js +292 -0
- package/dist/frontend/assets/gitGraph-VSP46ZUC-CbeGPPjU.js +1 -0
- package/dist/frontend/assets/{gitGraphDiagram-PDYL7XHY-wE75QFTm.js → gitGraphDiagram-STJD7YCW-CQ6BpT59.js} +6 -6
- package/dist/frontend/assets/health-56mWKiAZ.js +1 -0
- package/dist/frontend/assets/hooks-DvZDRNGz.js +1 -0
- package/dist/frontend/assets/index-ByGs708T.js +28 -0
- package/dist/frontend/assets/{index-BrRxCdie.css → index-C4TOHTro.css} +1 -1
- package/dist/frontend/assets/info-OHQRW6UA-BxUXUAFn.js +1 -0
- package/dist/frontend/assets/infoDiagram-KBXO4MBG-gSPqmMVx.js +2 -0
- package/dist/frontend/assets/{ishikawaDiagram-HPEHV2GE-XUL4r_qi.js → ishikawaDiagram-M35NCXHK-CAtetruZ.js} +6 -6
- package/dist/frontend/assets/journeyDiagram-OPLOXDXO-BNyh1MG4.js +139 -0
- package/dist/frontend/assets/{kanban-definition-FNSA4HC5-B4MXIgE0.js → kanban-definition-BZKZHSQY-rZvRpURc.js} +31 -31
- package/dist/frontend/assets/{katex-B_JcIwqj.js → katex-MEuSR36T.js} +1 -1
- package/dist/frontend/assets/line-DT9k40dN.js +1 -0
- package/dist/frontend/assets/linear-BUYtyba4.js +1 -0
- package/dist/frontend/assets/logFormat-CcEvsf9s.js +1 -0
- package/dist/frontend/assets/mermaid-parser.core-CgGwEebV.js +7 -0
- package/dist/frontend/assets/mermaid.core-B6xpe3Jr.js +44 -0
- package/dist/frontend/assets/{mindmap-definition-6OY57UG3-DzXLun_0.js → mindmap-definition-I2QAS2VK-BJbK0rgk.js} +11 -11
- package/dist/frontend/assets/{ormConnectorInsights-CKmNqZef.js → ormConnectorInsights-Cb2YjiXI.js} +1 -1
- package/dist/frontend/assets/packet-JDAUHWVQ-B6zqkP5f.js +1 -0
- package/dist/frontend/assets/pegDiagram-FD4XPPHP-D1jS_bll.js +1 -0
- package/dist/frontend/assets/pie-XZMESJXO-Bvu_D5Uq.js +1 -0
- package/dist/frontend/assets/pieDiagram-J4AKIIQI-BqeADRiG.js +39 -0
- package/dist/frontend/assets/{preload-helper-BACSxGrM.js → preload-helper-Zb0SmQx3.js} +1 -1
- package/dist/frontend/assets/profileVisuals-Vkrgupl1.js +1 -0
- package/dist/frontend/assets/{quadrantDiagram-D57K4MC3-C1LjpFf-.js → quadrantDiagram-XTYBLID2-B5Td0X4i.js} +7 -7
- package/dist/frontend/assets/radar-ABXABTNO-B0U_pqol.js +1 -0
- package/dist/frontend/assets/railroad-I3PHUGI6-DitcXnXq.js +1 -0
- package/dist/frontend/assets/railroad-abnf-LNEFI6M7-BcDt2ZeV.js +1 -0
- package/dist/frontend/assets/railroad-ebnf-DWYD2UWJ-s_yk7_jm.js +1 -0
- package/dist/frontend/assets/railroad-peg-JR7BVNR7-CtT0gxKT.js +1 -0
- package/dist/frontend/assets/railroadDiagram-MRQ6NCDL-DxGiXmKa.js +1 -0
- package/dist/frontend/assets/realtimeHealth-ClmV7IKO.js +1 -0
- package/dist/frontend/assets/requirementDiagram-Y7LWUY3S-ipbahX4M.js +84 -0
- package/dist/frontend/assets/rolldown-runtime-COiEfhsA.js +1 -0
- package/dist/frontend/assets/{sankeyDiagram-SY24JHO5-e-LII4V6.js → sankeyDiagram-WGJFYUXA-uANor5GF.js} +7 -7
- package/dist/frontend/assets/sequenceDiagram-5NDRBG5M-DuithWYh.js +169 -0
- package/dist/frontend/assets/src-C_gRsKqw.js +1 -0
- package/dist/frontend/assets/src-CiSWvS1R.js +1 -0
- package/dist/frontend/assets/{stateDiagram-v2-A6IESKWZ-Cnz1jfoK.js → stateDiagram-v2-FJ4FJNEA-Bg90e_SA.js} +19 -19
- package/dist/frontend/assets/stores-BaEZ5-YP.js +1 -0
- package/dist/frontend/assets/swimlanes-UMQ2AFYF-DZeEcIW9.js +1 -0
- package/dist/frontend/assets/swimlanesDiagram-OMPLPG4O-40YMe2C5.js +8 -0
- package/dist/frontend/assets/timeline-definition-SEUHKTQE-Df_4IrHP.js +120 -0
- package/dist/frontend/assets/treeView-D4JQ5SDB-Bi7Lp2TZ.js +1 -0
- package/dist/frontend/assets/treemap-SAJKECNS-DFsoQutK.js +1 -0
- package/dist/frontend/assets/ui-BE5Z8gxu.js +323 -0
- package/dist/frontend/assets/useBlockSource-CteanNtO.js +1 -0
- package/dist/frontend/assets/useSocketLiveData-DCSQAUUz.js +1 -0
- package/dist/frontend/assets/{usecaseDiagram-WPOLBNNX-D1qB4ycj.js → usecaseDiagram-AFA6YXN4-BUyQPYP3.js} +59 -59
- package/dist/frontend/assets/{usersFormat-D6muig0U.js → usersFormat-DJmEzW8-.js} +1 -1
- package/dist/frontend/assets/{value-Ds4WqiGU.js → value-CHmTzbgv.js} +1 -1
- package/dist/frontend/assets/vennDiagram-NNMJR3RB-DWurGDbi.js +34 -0
- package/dist/frontend/assets/wardley-7MLQ67FV-C49ynNLo.js +1 -0
- package/dist/frontend/assets/wardleyDiagram-S7YFUSEH-IkA7ATkO.js +78 -0
- package/dist/frontend/assets/{xychartDiagram-4URNHDU4-DU68Uiwb.js → xychartDiagram-GGNKY7IX-nAWXrVur.js} +7 -7
- package/dist/frontend/index.html +19 -20
- package/dist/index.js +5 -2
- package/dist/nodefony/controller/StudioController.js +18 -10
- package/dist/nodefony/controller/StudioCreateController.js +3 -3
- package/dist/nodefony/controller/StudioRealtimeController.js +66 -29
- package/dist/nodefony/realtime/providers.js +18 -5
- package/dist/nodefony/realtime/supervisionHistory.js +196 -0
- package/dist/nodefony/src/actionParams.js +63 -0
- package/dist/nodefony/src/studioAdminApi.js +35 -0
- package/dist/types/frontend/src/realtime/studioContract.d.ts +117 -0
- package/dist/types/frontend/src/routes/create/createModel.d.ts +428 -0
- package/dist/types/frontend/src/utils/guards.d.ts +33 -0
- package/dist/types/nodefony/controller/StudioController.d.ts +0 -28
- package/dist/types/nodefony/controller/StudioCreateController.d.ts +1 -1
- package/dist/types/nodefony/controller/StudioRealtimeController.d.ts +44 -15
- package/dist/types/nodefony/realtime/providers.d.ts +16 -1
- package/dist/types/nodefony/realtime/supervisionHistory.d.ts +60 -0
- package/dist/types/nodefony/src/actionParams.d.ts +51 -0
- package/dist/types/nodefony/src/studioAdminApi.d.ts +17 -0
- package/package.json +28 -28
- package/dist/frontend/assets/Accordion-DPLwcjdo.js +0 -1
- package/dist/frontend/assets/ActionsLiveGraph-Bgmlddil.js +0 -1
- package/dist/frontend/assets/AgentsPreview-Cp3oKlQh.js +0 -12
- package/dist/frontend/assets/ApiKeys-Dlm_QgbE.js +0 -2
- package/dist/frontend/assets/ArchitectureLiveGraph-6B27wQFi.js +0 -1
- package/dist/frontend/assets/Audit-l60asEjU.js +0 -1
- package/dist/frontend/assets/BackplaneLiveGraph-DFbKM68H.js +0 -1
- package/dist/frontend/assets/Breadcrumbs-CInUn91P.js +0 -1
- package/dist/frontend/assets/BrickStoreChip-LPzFtCle.js +0 -1
- package/dist/frontend/assets/Chat-xbAsLtf7.js +0 -1
- package/dist/frontend/assets/Chip-63u3nm6a.js +0 -1
- package/dist/frontend/assets/Cluster-BnzcBsK2.js +0 -1
- package/dist/frontend/assets/Collapse-D-ll8NHt.js +0 -1
- package/dist/frontend/assets/ConfigPage-D5ppGWC2.js +0 -1
- package/dist/frontend/assets/ConnectorCard-nuZmjP-K.js +0 -11
- package/dist/frontend/assets/Create--I7q2Y8w.js +0 -2
- package/dist/frontend/assets/DashboardSupervision-D7iTvKNf.js +0 -1
- package/dist/frontend/assets/Database-7pHzPOh2.js +0 -1
- package/dist/frontend/assets/Documentation-tjr0i1rN.js +0 -1
- package/dist/frontend/assets/FanOutLiveGraph-CA025u8m.js +0 -1
- package/dist/frontend/assets/Firewall-C6l1OCox.js +0 -1
- package/dist/frontend/assets/IconAdjustments-e-MmJIEd.js +0 -1
- package/dist/frontend/assets/IconArrowsExchange-Dosh8wE8.js +0 -1
- package/dist/frontend/assets/IconBan-tceVLRjs.js +0 -1
- package/dist/frontend/assets/IconCircuitResistor-Dv8iGOzw.js +0 -1
- package/dist/frontend/assets/IconNetwork-BCMPgpvp.js +0 -1
- package/dist/frontend/assets/IconPackages-CBNINLGq.js +0 -1
- package/dist/frontend/assets/IconPlayerPlay-CeEI-a5d.js +0 -1
- package/dist/frontend/assets/IconPlus-B4Sx19oD.js +0 -1
- package/dist/frontend/assets/KnowledgePreview-COznqEer.js +0 -1
- package/dist/frontend/assets/List-Bj6cz52O.js +0 -1
- package/dist/frontend/assets/LlmProvidersPreview-UMxVNx56.js +0 -1
- package/dist/frontend/assets/LogVisuals-CXlOPxZ6.js +0 -1
- package/dist/frontend/assets/Logs-Df5U_3dr.js +0 -1
- package/dist/frontend/assets/McpPreview-CHu7On2q.js +0 -1
- package/dist/frontend/assets/MemoryPreview-BXeS4rSe.js +0 -1
- package/dist/frontend/assets/Migrations-CuHMt_YR.js +0 -3
- package/dist/frontend/assets/ModuleDetail-9YIWV_UR.js +0 -1
- package/dist/frontend/assets/Modules-ICjDZ1Yo.js +0 -1
- package/dist/frontend/assets/OrmConnector-CEarnKy7.js +0 -1
- package/dist/frontend/assets/OrmEntity-CnaPZLRa.js +0 -1
- package/dist/frontend/assets/OrmOverview-Chuz9Nje.js +0 -1
- package/dist/frontend/assets/OrmWorker-DHtNzOdb.js +0 -1
- package/dist/frontend/assets/Playground-CPNuVkEh.js +0 -1
- package/dist/frontend/assets/ProbesLiveGraph-36Y6b2-W.js +0 -1
- package/dist/frontend/assets/Profile-DbK_K53D.js +0 -2
- package/dist/frontend/assets/ProfileFields-CY-cyHpl.js +0 -1
- package/dist/frontend/assets/Progress-CPoEshia.js +0 -1
- package/dist/frontend/assets/ProtocoleLiveGraph-CzsBhPwX.js +0 -1
- package/dist/frontend/assets/RealtimeConsole-Cr9YdudM.js +0 -1
- package/dist/frontend/assets/RingProgress-CvPWmY4T.js +0 -1
- package/dist/frontend/assets/Roadmap-BiASdXjA.js +0 -1
- package/dist/frontend/assets/RoleSwitch-v6onvCmL.js +0 -1
- package/dist/frontend/assets/Roles-CUb-FE31.js +0 -1
- package/dist/frontend/assets/RoutesView-CGimbB-9.js +0 -1
- package/dist/frontend/assets/Runtime-CztgXN5v.js +0 -1
- package/dist/frontend/assets/Sessions-BW_6RCRC.js +0 -1
- package/dist/frontend/assets/Skeleton-BqubVkfg.js +0 -1
- package/dist/frontend/assets/Slider-BO4JNkw0.js +0 -1
- package/dist/frontend/assets/StoresView-CGJXEbaQ.js +0 -1
- package/dist/frontend/assets/System-0WArSNzm.js +0 -1
- package/dist/frontend/assets/TagsInput-B3frWkGT.js +0 -1
- package/dist/frontend/assets/Textarea-BWkcGO8Z.js +0 -1
- package/dist/frontend/assets/Timeline-BS9j6buj.js +0 -1
- package/dist/frontend/assets/TraceView-C3_Vw0sJ.js +0 -1
- package/dist/frontend/assets/Twin-Cjb5ugDT.js +0 -19
- package/dist/frontend/assets/UserProfile-Dc-MHueA.js +0 -1
- package/dist/frontend/assets/Users-BcoVqTuA.js +0 -1
- package/dist/frontend/assets/VectorStoresPreview-tksJNhKy.js +0 -1
- package/dist/frontend/assets/Webhooks-vDwD2cQK.js +0 -1
- package/dist/frontend/assets/Workspace-DO9hKEhR.js +0 -1
- package/dist/frontend/assets/abnfDiagram-WEYOIA3C-o6kZb03b.js +0 -1
- package/dist/frontend/assets/aiPreviewModel-gSgeWhaX.js +0 -2
- package/dist/frontend/assets/aiPreviewParts-B25TmKBV.js +0 -1
- package/dist/frontend/assets/architecture-WOLXFQ4H-D0WVDySu.js +0 -1
- package/dist/frontend/assets/architectureDiagram-ZHVYKT53-D9lWKg5J.js +0 -36
- package/dist/frontend/assets/auditFormat-D14fq0tI.js +0 -1
- package/dist/frontend/assets/blockDiagram-RJAE7QA3-WjPcOKRW.js +0 -140
- package/dist/frontend/assets/channel-bBINEAVx.js +0 -1
- package/dist/frontend/assets/chunk-55XCU76K-DX-SqoL7.js +0 -1
- package/dist/frontend/assets/chunk-HAGFOTED-BEnakj0Q.js +0 -62
- package/dist/frontend/assets/chunk-HNE4Q36P-u3A7JPIz.js +0 -1
- package/dist/frontend/assets/chunk-NQOKRVIF-C4CpPbjZ.js +0 -213
- package/dist/frontend/assets/chunk-VQ5W62QI-CD4iG1Ju.js +0 -1
- package/dist/frontend/assets/chunk-WQQL4CDK-BRd_O9U1.js +0 -10
- package/dist/frontend/assets/chunk-XXDRQBXY-r_aMXwAb.js +0 -1
- package/dist/frontend/assets/chunk-YZO67HFG-DYi_O4tF.js +0 -1
- package/dist/frontend/assets/chunk-ZAUX2LTX-F2xkI2IG.js +0 -1
- package/dist/frontend/assets/chunk-ZCHMQSOR-BLHSEC1D.js +0 -2
- package/dist/frontend/assets/configModel-mJGNa2Qn.js +0 -1
- package/dist/frontend/assets/cose-bilkent-JH36ORCC-p6hKc9FM.js +0 -1
- package/dist/frontend/assets/cynefin-EF2NZ3EQ-3fMGJqpS.js +0 -1
- package/dist/frontend/assets/cytoscape.esm-CCmQRb78.js +0 -321
- package/dist/frontend/assets/dagre-NK4GIZVX-CHbXyXoH.js +0 -4
- package/dist/frontend/assets/dayjs.min-BnY7wTsz.js +0 -1
- package/dist/frontend/assets/diagram-CBK3MWTC-COexS5yt.js +0 -24
- package/dist/frontend/assets/diagram-PFBEJUXE-DHiPTpVh.js +0 -3
- package/dist/frontend/assets/dist-CNARAVwn.js +0 -1
- package/dist/frontend/assets/ebnfDiagram-V4P3TTPT-DDRnrPjS.js +0 -1
- package/dist/frontend/assets/elk-QONTBCTQ-DjqguIGM.js +0 -27
- package/dist/frontend/assets/erDiagram-KYQIGQAA-0Rq0qAP2.js +0 -99
- package/dist/frontend/assets/eventFlow-By4EcYar.js +0 -1
- package/dist/frontend/assets/eventmodeling-K75KTNOO-Ci5ZysGc.js +0 -1
- package/dist/frontend/assets/flowDiagram-IUGLLWBU-Bd7ui4lC.js +0 -1
- package/dist/frontend/assets/ganttDiagram-R7GPNTJY-QmeRcBvv.js +0 -292
- package/dist/frontend/assets/gitGraph-VSP46ZUC-BNjGbs2Q.js +0 -1
- package/dist/frontend/assets/health-COCuwYbZ.js +0 -1
- package/dist/frontend/assets/hooks-DneHygq8.js +0 -1
- package/dist/frontend/assets/index-D7ndDYxA.js +0 -28
- package/dist/frontend/assets/info-OHQRW6UA-AwuZMzCF.js +0 -1
- package/dist/frontend/assets/infoDiagram-MVDRKAX5-C0bjwO5A.js +0 -2
- package/dist/frontend/assets/journeyDiagram-BOSHW7O7-DOB7DGOm.js +0 -139
- package/dist/frontend/assets/line-GyWcPEv4.js +0 -1
- package/dist/frontend/assets/linear-DuXPlWP5.js +0 -1
- package/dist/frontend/assets/mermaid-parser.core-DuBc40Fk.js +0 -7
- package/dist/frontend/assets/mermaid.core-lhcUO7it.js +0 -44
- package/dist/frontend/assets/mobx-BS2cOtno.js +0 -1
- package/dist/frontend/assets/packet-JDAUHWVQ-BO5uQF22.js +0 -1
- package/dist/frontend/assets/pegDiagram-ECIUJNBX-ZvDgYb9i.js +0 -1
- package/dist/frontend/assets/pie-XZMESJXO-BZrK7zKX.js +0 -1
- package/dist/frontend/assets/pieDiagram-GNMPY74T-CHFaZNK-.js +0 -39
- package/dist/frontend/assets/profileVisuals-B9NxSpR3.js +0 -1
- package/dist/frontend/assets/radar-ABXABTNO-DecCvP8c.js +0 -1
- package/dist/frontend/assets/railroad-I3PHUGI6-_iEZazdU.js +0 -1
- package/dist/frontend/assets/railroad-abnf-LNEFI6M7-CDs9xz8A.js +0 -1
- package/dist/frontend/assets/railroad-ebnf-DWYD2UWJ-OMA8rXBg.js +0 -1
- package/dist/frontend/assets/railroad-peg-JR7BVNR7-CahBRdoM.js +0 -1
- package/dist/frontend/assets/railroadDiagram-Y72NRBL7-Dffo1i5y.js +0 -1
- package/dist/frontend/assets/realtimeHealth-CEJDxl45.js +0 -1
- package/dist/frontend/assets/requirementDiagram-EQYSW5RA-C1QpRX4G.js +0 -84
- package/dist/frontend/assets/sequenceDiagram-BLEHNHQU-NnPkqGF3.js +0 -169
- package/dist/frontend/assets/src-3uYsZQ6M.js +0 -1
- package/dist/frontend/assets/src-99e5ryd8.js +0 -1
- package/dist/frontend/assets/stores-D6_Y8E6i.js +0 -1
- package/dist/frontend/assets/swimlanes-B3ENRKFQ-Bk54DtP4.js +0 -1
- package/dist/frontend/assets/swimlanesDiagram-AYQRV4AK-DVvOf_w1.js +0 -8
- package/dist/frontend/assets/timeline-definition-JXYKGLGB-sa8408Jf.js +0 -120
- package/dist/frontend/assets/treeView-D4JQ5SDB-DVhp_E4d.js +0 -1
- package/dist/frontend/assets/treemap-SAJKECNS-Bxhpvb2A.js +0 -1
- package/dist/frontend/assets/ui-CQg7PBQQ.js +0 -321
- package/dist/frontend/assets/useBlockSource-DhXmelWN.js +0 -1
- package/dist/frontend/assets/useSocketLiveData-DC2osqZB.js +0 -1
- package/dist/frontend/assets/vennDiagram-Q3Y3IDCW-0Yok6bqQ.js +0 -34
- package/dist/frontend/assets/wardley-7MLQ67FV-kuj23NGq.js +0 -1
- package/dist/frontend/assets/wardleyDiagram-IVAIDKWA-CdkJzHfw.js +0 -78
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ArchitectureLiveGraph-6B27wQFi.js","assets/src-3uYsZQ6M.js","assets/IconCircuitResistor-Dv8iGOzw.js","assets/IconDeviceDesktop-CmA2QS1y.js","assets/IconStack2-B9YJBVEL.js","assets/index-D7ndDYxA.js","assets/mobx-BS2cOtno.js","assets/Slider-BO4JNkw0.js","assets/Collapse-D-ll8NHt.js","assets/stores-D6_Y8E6i.js","assets/aiPreviewModel-gSgeWhaX.js","assets/hooks-DneHygq8.js","assets/IconAdjustmentsAlt-Dh7-w67A.js","assets/IconAffiliate-CM-xujb3.js","assets/IconNetwork-BCMPgpvp.js","assets/IconArchive-Be62Qpuc.js","assets/IconArrowsExchange-Dosh8wE8.js","assets/IconBooks-BsR3SerW.js","assets/IconBox-CyPTTK_h.js","assets/IconBrain-CtK-z0Qs.js","assets/preload-helper-BACSxGrM.js","assets/pageQuery-CeNWND3J.js","assets/index-BrRxCdie.css","assets/useSocketLiveData-DC2osqZB.js","assets/realtimeHealth-CEJDxl45.js","assets/ProtocoleLiveGraph-CzsBhPwX.js","assets/IconArrowDown-CVg6dTJG.js","assets/FanOutLiveGraph-CA025u8m.js","assets/IconArrowsSplit2-2czCcKl1.js","assets/ActionsLiveGraph-Bgmlddil.js","assets/IconPlayerPlay-CeEI-a5d.js","assets/BackplaneLiveGraph-DFbKM68H.js","assets/IconPuzzle-D3bEL-Kr.js","assets/IconServer2-D61W-eXq.js","assets/ProbesLiveGraph-36Y6b2-W.js","assets/mermaid.core-lhcUO7it.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-99e5ryd8.js","assets/dayjs.min-BnY7wTsz.js","assets/chunk-DSNLSHJZ-BHcejTug.js","assets/chunk-7S6XSTFO-DClaWD3h.js","assets/dist-CNARAVwn.js","assets/chunk-YZO67HFG-DYi_O4tF.js","assets/chunk-AQDTSKZB-BCzT2csB.js","assets/chunk-DUW6YSOI-Dgx8z5s3.js","assets/chunk-UHW7PFBP-C4qGS7N6.js","assets/chunk-HAGFOTED-BEnakj0Q.js","assets/chunk-J5ZVWO5B-oDCd-gWO.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-ZAUX2LTX-F2xkI2IG.js","assets/chunk-WQQL4CDK-BRd_O9U1.js","assets/line-GyWcPEv4.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js","assets/chunk-HNE4Q36P-u3A7JPIz.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{C as e,D as t,E as n,O as r,S as i,T as a,_ as o,b as s,i as c,k as l,n as u,r as d,t as f,v as p,w as m,x as h,y as g}from"./src-3uYsZQ6M.js";import{t as _}from"./preload-helper-BACSxGrM.js";import{t as v}from"./value-Ds4WqiGU.js";var y=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var L=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&&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)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function z(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(z.bind(null,e))}var B={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=B,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=z,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=R,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),b=n(((e,t)=>{t.exports=y()})),x=n((e=>{var t=b();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),S=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=x()})),C=l(b(),1);function w(e){return Object.keys(e)}function T(e){return e&&typeof e==`object`&&!Array.isArray(e)}function E(e,t){let n={...e},r=t;return T(e)&&T(t)&&Object.keys(t).forEach(t=>{T(r[t])&&t in e?n[t]=E(n[t],r[t]):n[t]=r[t]}),n}function D(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}var O=l(S(),1);function k(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function A(e){let t=k(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function j(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function M(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?j(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?j(n):n}}return r}return n}var N=M(`rem`,{shouldScale:!0}),P=M(`em`);function F(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function I(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}function L(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==C.Fragment}function R(e){let t=(0,C.createContext)(null);return[t,()=>{let n=(0,C.use)(t);if(n===null)throw Error(e);return n}]}function z(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function B(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function ee(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function te(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].disabled)return e}return e}function ne(e,t,n){return B(e,n)===B(t,n)}function V({parentSelector:e,siblingSelector:t,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:a=`rtl`,orientation:o}){return s=>{n?.(s);let c=Array.from(B(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>ne(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=te(l,c,r),d=ee(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[te(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[ee(c.length,c,!1)]?.focus()}}}var re={app:100,modal:200,popover:300,overlay:400,max:9999};function ie(e){return re[e]}var ae=()=>{};function oe(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||ae:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function H(e,t=`size`,n=!0){if(e!==void 0)return I(e)?n?N(e):e:`var(--${t}-${e})`}function se(e){return H(e,`mantine-spacing`)}function U(e){return e===void 0?`var(--mantine-radius-default)`:H(e,`mantine-radius`)}function ce(e){return H(e,`mantine-font-size`)}function W(e){return H(e,`mantine-line-height`,!1)}function le(e){if(e)return H(e,`mantine-shadow`,!1)}function ue(e,t){return n=>{e?.(n),t?.(n)}}function de(e,t){return e in t?A(t[e]):A(e)}function fe(e,t){let n=e.map(e=>({value:e,px:de(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function pe(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function me(e,t,n){return n?Array.from(B(n,t)?.querySelectorAll(e)||[]).findIndex(e=>e===n):null}function he(e,t,n){return t===void 0&&n===void 0?e:t!==void 0&&n===void 0?Math.max(e,t):Math.min(t===void 0&&n!==void 0?e:Math.max(e,t),n)}function ge(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function _e(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i<r;i+=1){let r=n[i];if(!(r in t)||e[r]!==t[r]&&!(Number.isNaN(e[r])&&Number.isNaN(t[r])))return!1}return!0}function ve(e){let t=(0,C.useRef)(e);return(0,C.useEffect)(()=>{t.current=e}),(0,C.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function ye(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=ve(e),s=(0,C.useRef)(0),c=(0,C.useRef)(0),l=(0,C.useRef)(null),u=(0,C.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(c.current=0,s.current!==0&&e._hasPendingCallback){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&u()},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,C.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}var be=[`mousedown`,`touchstart`];function xe(e,t,n,r=!0,i=!1){let a=(0,C.useRef)(null),o=t||be,s=(0,C.useEffectEvent)(t=>{let{target:r}=t??{};if(!document.body.contains(r)&&r?.tagName!==`HTML`)return;let i=t.composedPath();Array.isArray(n)?n.every(e=>!!e&&!i.includes(e))&&e(t):a.current&&!i.includes(a.current)&&e(t)}),c=o.join(`,`);return(0,C.useEffect)(()=>{if(!r)return;let e=c.split(`,`);return e.forEach(e=>document.addEventListener(e,s,i)),()=>{e.forEach(e=>document.removeEventListener(e,s,i))}},[c,r,i]),a}function Se(e={}){let t=e.timeout??2e3,[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),o=(0,C.useRef)(null);(0,C.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]);let s=e=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),t),a(e)};return{copy:e=>{`clipboard`in navigator?navigator.clipboard.writeText(e).then(()=>{r(null),s(!0)}).catch(e=>r(e)):r(Error(`useClipboard: navigator.clipboard is not supported`))},reset:()=>{a(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}function Ce(e,t){if(typeof t==`boolean`)return t;if(typeof window<`u`&&`matchMedia`in window)try{return window.matchMedia(e).matches}catch{return!1}return!1}function we(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,C.useState)(n?t:Ce(e));return(0,C.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}function Te(e,t){return we(`(prefers-color-scheme: dark)`,e===`dark`,t)?`dark`:`light`}function Ee(e,t,n={leading:!1}){let[r,i]=(0,C.useState)(e),a=(0,C.useRef)(!1),o=(0,C.useRef)(null),s=(0,C.useRef)(!1),c=(0,C.useRef)(e);c.current=e;let l=(0,C.useCallback)(()=>{window.clearTimeout(o.current),o.current=null},[]),u=(0,C.useCallback)(()=>{l(),s.current=!1},[]),d=(0,C.useCallback)(()=>{o.current&&(u(),s.current=!1,i(c.current))},[]);return(0,C.useEffect)(()=>{a.current&&(l(),!s.current&&n.leading?(s.current=!0,i(e),o.current=window.setTimeout(()=>{s.current=!1},t)):o.current=window.setTimeout(()=>{s.current=!1,i(e)},t))},[e,n.leading,t]),(0,C.useEffect)(()=>(a.current=!0,u),[]),[r,u,{cancel:u,flush:d}]}var De=typeof document<`u`?C.useLayoutEffect:C.useEffect;function Oe(e,t){return e.length!==t.length||t.some((t,n)=>!Object.is(t,e[n]))}function ke(e,t){let n=(0,C.useRef)(!1),r=(0,C.useRef)(null),i=(0,C.useRef)(void 0),a={};(0,C.useEffect)(()=>{let o=r.current===a,s=i.current;if(r.current=a,i.current=t,!n.current)n.current=!0;else if(!o&&!(t&&s&&!Oe(s,t)))return e()},t)}function Ae({opened:e,shouldReturnFocus:t=!0}){let n=(0,C.useRef)(null),r=()=>{n.current&&`focus`in n.current&&typeof n.current.focus==`function`&&n.current?.focus({preventScroll:!0})};return ke(()=>{let i=-1,a=e=>{e.key===`Tab`&&window.clearTimeout(i)};if(document.addEventListener(`keydown`,a),e)n.current=document.activeElement;else if(t){let e=document.activeElement;i=window.setTimeout(()=>{let t=document.activeElement;(t===null||t===document.body||t===e)&&r()},10)}return()=>{window.clearTimeout(i),document.removeEventListener(`keydown`,a)}},[e,t]),r}var je=/input|select|textarea|button|object|summary|iframe/,Me=`a, input, select, textarea, button, object, summary, iframe, audio[controls], video[controls], [contenteditable], [tabindex]`;function Ne(e){let t=e.getAttribute(`contenteditable`);return t!==null&&t!==`false`}function Pe(e){let t=e.nodeName.toLowerCase();return(t===`audio`||t===`video`)&&e.hasAttribute(`controls`)}function Fe(e){return e.style.display===`none`}function Ie(e){if(e.getAttribute(`aria-hidden`)||e.getAttribute(`hidden`)||e.getAttribute(`type`)===`hidden`)return!1;let t=e;for(;t&&t!==document.body&&t.nodeType!==11;){if(Fe(t))return!1;t=t.parentNode}return!0}function Le(e){let t=e.getAttribute(`tabindex`);return t===null&&(t=void 0),parseInt(t,10)}function Re(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(Le(e));return(je.test(t)&&!e.disabled||Ne(e)||Pe(e)||e instanceof HTMLAnchorElement&&e.href||n)&&Ie(e)}function ze(e){let t=Le(e);return(Number.isNaN(t)||t>=0)&&Re(e)}function Be(e){let t=Array.from(e.querySelectorAll(Me)).filter(ze),n=t.filter(e=>Le(e)>0).sort((e,t)=>Le(e)-Le(t)),r=t.filter(e=>!(Le(e)>0));return[...n,...r]}var Ve=[`date`,`time`,`datetime-local`,`month`,`week`],He=[`audio`,`video`,`iframe`,`object`,`embed`];function Ue(e){return!!e&&e.tagName===`INPUT`&&e.type===`radio`}function We(e,t){return e.name!==``&&e.name===t.name&&e.form===t.form}function Ge(e){let t=e.nodeName.toLowerCase();return t===`input`?Ve.includes(e.type):He.includes(t)}function Ke(e,t){let n=Be(e);return n.filter(e=>e===t||!Ue(e)?!0:Ue(t)&&We(e,t)?!1:e.checked?!0:!n.some(t=>Ue(t)&&t.checked&&We(t,e)))}function qe(e,t,n,r){let i=e.indexOf(t);if(i!==-1)return i+1;if(t===n)return 0;let a=r?Node.DOCUMENT_POSITION_PRECEDING:Node.DOCUMENT_POSITION_FOLLOWING,o=e.findIndex(e=>(t.compareDocumentPosition(e)&a)!==0);return o===-1?0:o}function Je(e,t,n){let r=Ke(e,t);n&&r.reverse();let i=qe(r,t,e,n);return[...r.slice(i),...r.slice(0,i)].filter(e=>e!==t)}function Ye(e,t){for(let n of e)if(n.focus(),t.activeElement===n)return}function Xe(e,t){let n=e.getRootNode(),r=n.activeElement;if(!r||r!==e&&!e.contains(r))return;let i=Je(e,r,t.shiftKey);Ge(r)?setTimeout(()=>{let t=n.activeElement;e.isConnected&&t!==r&&t!==i[0]&&Ye([...i,r],n)}):(t.preventDefault(),Ye(i,n))}var Ze=new Set;function Qe(e,t){let n=t.getRootNode().activeElement;if(!n)return!1;for(let r of Ze){let i=r.current;if(r!==e&&i&&i!==t&&t.contains(i)&&i.contains(n))return!0}return!1}function $e(e=!0){let t=(0,C.useRef)(null),n=e=>{let t=e.querySelector(`[data-autofocus]`);if(!t){let n=Array.from(e.querySelectorAll(Me));t=n.find(ze)||n.find(Re)||null,!t&&Re(e)&&(t=e)}t?t.focus({preventScroll:!0}):console.warn(`[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node`,e)},r=(0,C.useCallback)(r=>{e&&(r===null?t.current=null:t.current!==r&&(setTimeout(()=>{r.getRootNode()?n(r):console.warn(`[@mantine/hooks/use-focus-trap] Ref node is not part of the dom`,r)}),t.current=r))},[e]);return(0,C.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>{t.current&&n(t.current)});let r=e=>{e.key!==`Tab`||e.defaultPrevented||!t.current||Qe(t,t.current)||Xe(t.current,e)};return Ze.add(t),document.addEventListener(`keydown`,r),()=>{Ze.delete(t),document.removeEventListener(`keydown`,r)}},[e]),r}var et=e=>(e+1)%1e6;function tt(){let[,e]=(0,C.useReducer)(et,0);return e}function nt(e){let t=(0,C.useId)(),[n,r]=(0,C.useState)(`mantine-${t.replace(/:/g,``)}`),i=(0,C.useRef)(!1);return De(()=>{i.current||(i.current=!0,r(ge()))},[]),typeof e==`string`?e:n}function rt(e,t,n){let r=(0,C.useEffectEvent)(t);(0,C.useEffect)(()=>(window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)),[e])}function it(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function at(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=it(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():it(e,null)}),t.clear()}}}function ot(...e){return(0,C.useCallback)(at(...e),e)}function st({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,C.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function ct(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var lt=`dots`;function ut({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i,onChange:a,startValue:o=1}){let s=Math.max(Math.trunc(o),1),c=Math.max(Math.trunc(e),s),l=c-s+1,u=i??s,[d,f]=st({value:r,onChange:a,defaultValue:u,finalValue:u}),p=(0,C.useCallback)(e=>{f(e<s?s:e>c?c:e)},[s,c,f]),m=(0,C.useCallback)(()=>p(d+1),[d,p]),h=(0,C.useCallback)(()=>p(d-1),[d,p]),g=(0,C.useCallback)(()=>p(s),[p,s]),_=(0,C.useCallback)(()=>p(c),[c,p]);return{range:(0,C.useMemo)(()=>{if(t*2+3+n*2>=l)return ct(s,c);let e=Math.max(d-t,s+n-1),r=Math.min(d+t,c-n),i=e>s+n+1,a=r<c-(n+1);if(!i&&a){let e=t*2+n+2;return[...ct(s,s+e-1),lt,...ct(c-(n-1),c)]}if(i&&!a){let e=n+1+2*t;return[...ct(s,s+n-1),lt,...ct(c-e,c)]}return[...ct(s,s+n-1),lt,...ct(e,r),lt,...ct(c-n+1,c)]},[l,t,d,s,c,n]),active:d,setPage:p,next:m,previous:h,first:g,last:_}}function dt(e,t){return we(`(prefers-reduced-motion: reduce)`,e,t)}function ft(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!_e(e[n],t[n]))return!1;return!0}function pt(e){let t=(0,C.useRef)([]),n=(0,C.useRef)(0);return ft(t.current,e)||(t.current=e,n.current+=1),[n.current]}function mt(e,t){(0,C.useEffect)(e,pt(t))}function ht(e,t,n={autoInvoke:!1}){let r=(0,C.useRef)(null),i=ve(e),a=(0,C.useCallback)((...e)=>{r.current||=window.setTimeout(()=>{i(...e),r.current=null},t)},[t]),o=(0,C.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,C.useEffect)(()=>(n.autoInvoke&&a(),o),[o,a]),{start:a,clear:o}}function gt(e){let t=(0,C.useRef)(void 0);return(0,C.useEffect)(()=>{t.current=e},[e]),t.current}function _t(e,t,n){let r=(0,C.useRef)(null);(0,C.useEffect)(()=>{r.current&&=(r.current.disconnect(),null);let i=typeof n==`function`?n():n;return i&&(r.current=new MutationObserver(e),r.current.observe(i,t)),()=>{r.current&&=(r.current.disconnect(),null)}},[e,t,n])}function vt(){let[e,t]=(0,C.useState)(!1);return(0,C.useEffect)(()=>t(!0),[]),e}var yt=[`mouse`,`touch`],bt=10;function xt(e,t={}){let{threshold:n=400,events:r=yt,cancelOnMove:i=!1,onStart:a,onFinish:o,onCancel:s}=t,c=(0,C.useRef)(!1),l=(0,C.useRef)(!1),u=(0,C.useRef)(-1),d=(0,C.useRef)(null);(0,C.useEffect)(()=>()=>window.clearTimeout(u.current),[]);let f=r.join(`,`);return(0,C.useMemo)(()=>{if(typeof e!=`function`)return{};let t=i!==!1,f=i===!0?bt:i===!1?0:i,p=t=>{(wt(t)||Ct(t))&&(a&&a(t),d.current=St(t),l.current=!0,u.current=window.setTimeout(()=>{e(t),c.current=!0},n))},m=e=>{(wt(e)||Ct(e))&&(c.current?o&&o(e):l.current&&s&&s(e),c.current=!1,l.current=!1,d.current=null,u.current!==-1&&(window.clearTimeout(u.current),u.current=-1))},h=e=>{if(!t||!l.current||c.current)return;let n=St(e);if(!n||!d.current)return;let r=n.x-d.current.x,i=n.y-d.current.y;Math.sqrt(r*r+i*i)>f&&m(e)},g={};return r.includes(`mouse`)&&(g.onMouseDown=p,g.onMouseUp=m,g.onMouseLeave=m,t&&(g.onMouseMove=h)),r.includes(`touch`)&&(g.onTouchStart=p,g.onTouchEnd=m,g.onTouchCancel=m,t&&(g.onTouchMove=h)),g},[e,n,s,o,a,i,f])}function St(e){if(Ct(e)){let t=e.touches[0]??e.changedTouches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function Ct(e){return window.TouchEvent?e.nativeEvent instanceof TouchEvent:`touches`in e.nativeEvent}function wt(e){return e.nativeEvent instanceof MouseEvent}function Tt(){return`development`}function Et(e){return e?.props?.ref}function Dt(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`}function Ot(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=Ot(e,n.shadowRoot);if(t)return t}}return null}function kt(e,t=document){let n=[],r=t.querySelectorAll(e);n.push(...Array.from(r));let i=t.querySelectorAll(`*`);for(let t=0;t<i.length;t+=1){let r=i[t];if(r.shadowRoot){let t=kt(e,r.shadowRoot);n.push(...t)}}return n}function At(e){if(!e)return document;let t=e.getRootNode(),n=t.nodeType===Node.DOCUMENT_NODE,r=t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in t;return n||r?t:document}function jt(e){let t=C.Children.toArray(e);return t.length!==1||!L(t[0])?null:t[0]}function Mt(e){return e}function Nt(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Nt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Pt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Nt(e))&&(r&&(r+=` `),r+=t);return r}var Ft={};function It(e){let t={};return e.forEach(e=>{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=Pt(t[e],n):t[e]=n})}),t}function Lt({theme:e,classNames:t,props:n,stylesCtx:r}){return It((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||Ft))}function Rt({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function zt(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function Bt(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function Vt(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function Ht(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function Ut(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function Wt(e){return Bt(e)?Vt(e):e.startsWith(`rgb`)?Ht(e):e.startsWith(`hsl`)?Ut(e):{r:0,g:0,b:0,a:1}}function Gt(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function Kt(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function qt(e){if(e.startsWith(`oklch(`))return(Kt(e)||0)/100;let{r:t,g:n,b:r}=Wt(e),i=t/255,a=n/255,o=r/255,s=Gt(i),c=Gt(a),l=Gt(o);return .2126*s+.7152*c+.0722*l}function Jt(e,t=.179){return!e.startsWith(`var(`)&&qt(e)>t}function Yt({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Jt(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Jt(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Jt(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][zt(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:Jt(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Jt(e,t.luminanceThreshold),shade:a,variable:void 0}}function Xt(e,t){let n=Yt({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function Zt(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function Qt(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=Wt(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function $t(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=Xt(n.from,t),i=Xt(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function en(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=Wt(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var tn=en,nn=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=Yt({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&Zt(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${N(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${N(1)} solid transparent`}:{background:e,hover:Qt(e,.1),color:r,border:`${N(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${N(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:Qt(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${N(1)} solid transparent`}}return{background:en(e,.1),hover:en(e,.12),color:e,border:`${N(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${N(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:en(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${N(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:en(e,.05),color:e,border:`${N(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${N(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:en(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${N(1)} solid transparent`}}return{background:`transparent`,hover:en(e,.12),color:e,border:`${N(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${N(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${N(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${N(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:Qt(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${N(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Qt(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${N(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Qt(t.white,.01),color:e,border:`${N(1)} solid transparent`}:n===`gradient`?{background:$t(r,t),hover:$t(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${N(1)} solid var(--mantine-color-default-border)`}:{}};function rn({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&Yt({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function an(e,t,n){return rn({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function on(e,t){let n=e.colors[e.primaryColor];return Zt(n)?e.autoContrast?an(n,e,t):`var(--mantine-color-white)`:rn({color:n[zt(e,t)],theme:e,autoContrast:null})}function sn(e,t){return typeof e==`boolean`?e:t.autoContrast}var cn=(0,C.createContext)(null);function ln(){let e=(0,C.use)(cn);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function un(){return ln().cssVariablesResolver}function dn(){return ln().classNamesPrefix}function fn(){return ln().getStyleNonce}function pn(){return ln().withStaticClasses}function mn(){return ln().headless}function hn(){return ln().stylesTransform?.sx}function gn(){return ln().stylesTransform?.styles}function _n(){return ln().env||`default`}function vn(){return ln().deduplicateInlineStyles}function yn(e){let t=document.createElement(`style`);return t.setAttribute(`data-mantine-styles`,`inline`),t.innerHTML=`*, *::before, *::after {transition: none !important;}`,t.setAttribute(`data-mantine-disable-transition`,`true`),e&&t.setAttribute(`nonce`,e),document.head.appendChild(t),()=>document.querySelectorAll(`[data-mantine-disable-transition]`).forEach(e=>e.remove())}function bn({keepTransitions:e}={}){let t=(0,C.useRef)(ae),n=(0,C.useRef)(-1),r=(0,C.use)(cn),i=fn(),a=(0,C.useRef)(i?.());if(!r)throw Error(`[@mantine/core] MantineProvider was not found in tree`);let o=i=>{r.setColorScheme(i),t.current=e?()=>{}:yn(a.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},s=()=>{r.clearColorScheme(),t.current=e?()=>{}:yn(a.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},c=Te(`light`,{getInitialValueInEffect:!1}),l=r.colorScheme===`auto`?c:r.colorScheme,u=(0,C.useCallback)(()=>o(l===`light`?`dark`:`light`),[o,l]);return(0,C.useEffect)(()=>()=>{t.current?.(),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:o,clearColorScheme:s,toggleColorScheme:u}}var xn=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Sn=n(((e,t)=>{t.exports=xn()})),Cn={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},wn=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,Tn={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:Cn,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:nn,autoContrast:!1,luminanceThreshold:.3,fontFamily:wn,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:wn,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:N(34),lineHeight:`1.3`},h2:{fontSize:N(26),lineHeight:`1.35`},h3:{fontSize:N(22),lineHeight:`1.4`},h4:{fontSize:N(18),lineHeight:`1.45`},h5:{fontSize:N(16),lineHeight:`1.5`},h6:{fontSize:N(14),lineHeight:`1.5`}}},fontSizes:{xs:N(12),sm:N(14),md:N(16),lg:N(18),xl:N(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:N(2),sm:N(4),md:N(8),lg:N(16),xl:N(32)},spacing:{xs:N(10),sm:N(12),md:N(16),lg:N(20),xl:N(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${N(1)} ${N(3)} rgba(0, 0, 0, 0.05), 0 ${N(1)} ${N(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${N(1)} ${N(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${N(10)} ${N(15)} ${N(-5)}, rgba(0, 0, 0, 0.04) 0 ${N(7)} ${N(7)} ${N(-5)}`,md:`0 ${N(1)} ${N(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${N(20)} ${N(25)} ${N(-5)}, rgba(0, 0, 0, 0.04) 0 ${N(10)} ${N(10)} ${N(-5)}`,lg:`0 ${N(1)} ${N(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${N(28)} ${N(23)} ${N(-7)}, rgba(0, 0, 0, 0.04) 0 ${N(12)} ${N(12)} ${N(-7)}`,xl:`0 ${N(1)} ${N(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${N(36)} ${N(28)} ${N(-7)}, rgba(0, 0, 0, 0.04) 0 ${N(17)} ${N(17)} ${N(-7)}`},other:{},components:{}},En=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,Dn=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function On(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function kn(e){if(!(e.primaryColor in e.colors))throw Error(En);if(typeof e.primaryShade==`object`&&(!On(e.primaryShade.dark)||!On(e.primaryShade.light))||typeof e.primaryShade==`number`&&!On(e.primaryShade))throw Error(Dn)}function An(e,t){if(!t)return kn(e),e;let n=E(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),kn(n),n}var G=Sn(),jn=(0,C.createContext)(null),Mn=()=>(0,C.use)(jn)||Tn;function Nn(){let e=(0,C.use)(jn);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function Pn({theme:e,children:t,inherit:n=!0}){let r=Mn(),i=(0,C.useMemo)(()=>An(n?r:Tn,e),[e,r,n]);return(0,G.jsx)(jn,{value:i,children:t})}Pn.displayName=`@mantine/core/MantineThemeProvider`;function K(e,t,n){let r=Nn(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...F(n)}}function Fn({classNames:e,styles:t,props:n,stylesCtx:r}){let i=Nn();return{resolvedClassNames:e===void 0?void 0:Lt({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:t===void 0?void 0:Rt({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var In={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function Ln({theme:e,options:t,unstyled:n}){return Pt(t?.focusable&&!n&&(e.focusClassName||In[e.focusRing]),t?.active&&!n&&e.activeClassName)}function Rn(e,t,n=1){if(Object.is(e,t))return!0;if(n===0||typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(!Rn(e[r],t[r],n-1))return!1;return!0}let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let i of r)if(!Object.hasOwn(t,i)||!Rn(e[i],t[i],n-1))return!1;return!0}function zn({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return Lt({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function Bn({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return Lt({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function Vn({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function Hn({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function Un({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function Wn({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function Gn({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return Pt(Ln({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),Wn({options:t,classes:s,selector:r,unstyled:c||m}),a[r],Bn({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),zn({selector:r,stylesCtx:f,options:t,props:d,theme:e}),Vn({rootSelector:u,selector:r,className:l}),Hn({selector:r,classes:s,unstyled:c||m}),p&&!m&&Un({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function Kn({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...Kn({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function qn({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&Rt({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...Kn({style:n?.style,theme:e})}}function Jn(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...F(t[n])}}),e),{})}function Yn({props:e,stylesCtx:t,themeName:n,theme:r}){let i=gn()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function q({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f,stable:p}){let m=Nn(),h=dn(),g=pn(),_=mn(),v=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:y,getTransformedStyles:b}=Yn({props:n,stylesCtx:r,themeName:v,theme:m}),x=Lt({theme:m,classNames:c,props:n,stylesCtx:r}),S=v.map(e=>Lt({theme:m,classNames:m.components[e]?.classNames,props:n,stylesCtx:r})),C=y?{}:Rt({theme:m,styles:l,props:n,stylesCtx:r}),w={};if(!y)for(let e of v){let t=Rt({theme:m,styles:m.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))w[e]={...w[e],...t[e]}}let T=Jn([_?{}:d?.(m,n,r),...v.map(e=>m.components?.[e]?.vars?.(m,n,r)),u?.(m,n,r)]),E=Kn({style:a,theme:m});return Xn((e,a)=>({...f?.[e],className:Gn({theme:m,options:a,themeName:v,selector:e,classNamesPrefix:h,resolvedClassNames:x,resolvedThemeClassNames:S,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:g,headless:_,transformedStyles:b([a?.styles,l])}),style:qn({theme:m,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:y,resolvedStyles:C,resolvedThemeStyles:w,resolvedVars:T,resolvedRootStyle:E})}),!!p,[m,h,g,_,y?n:null,t,s,i,o,f,r,x,S,C,w,T,E])}function Xn(e,t,n){let r=(0,C.useRef)(null);return t?(r.current&&Rn(r.current.deps,n,3)||(r.current={deps:n,getStyles:e}),r.current.getStyles):e}function Zn(e){return w(e).reduce((t,n)=>e[n]===void 0?t:`${t}${D(n)}:${e[n]};`,``).trim()}function Qn({selector:e,styles:t,media:n,container:r}){let i=t?Zn(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${Zn(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${Zn(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function $n(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function er({deduplicate:e,...t}){let n=fn(),r=Qn(t);return e?(0,G.jsx)(`style`,{href:`mantine-${$n(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,G.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function tr(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function nr(e,t){return`__mdi__-${tr(`${e?Zn(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${Zn(e.styles)}`).join(`|`):``}`)}`}function rr(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:M,lh:N,fs:P,tt:I,td:L,w:R,miw:z,maw:B,h:ee,mih:te,mah:ne,bgsz:V,bgp:re,bgr:ie,bga:ae,pos:oe,top:H,left:se,bottom:U,right:ce,inset:W,display:le,flex:ue,hiddenFrom:de,visibleFrom:fe,lightHidden:pe,darkHidden:me,sx:he,...ge}=e;return{styleProps:F({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:M,lh:N,fs:P,tt:I,td:L,w:R,miw:z,maw:B,h:ee,mih:te,mah:ne,bgsz:V,bgp:re,bgr:ie,bga:ae,pos:oe,top:H,left:se,bottom:U,right:ce,inset:W,display:le,flex:ue,bdrs:w,hiddenFrom:de,visibleFrom:fe,lightHidden:pe,darkHidden:me,sx:he}),rest:ge}}var ir={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function ar(e,t){let n=Yt({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function or(e,t){let n=Yt({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:ar(e,t)}function sr(e,t){if(typeof e==`number`)return N(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${N(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${ar(i.join(` `),t)}`),a.trim()}return e}var cr={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function lr(e){return typeof e==`string`&&e in cr?cr[e]:e}var ur=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function dr(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&ur.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?N(e):e}function fr(e){return e}var pr=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function mr(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&pr.includes(e)?`var(--mantine-${e}-line-height)`:e}function hr(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?N(e):e}function gr(e){return typeof e==`number`?N(e):e}function _r(e,t){if(typeof e==`number`)return N(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return N(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var vr={color:ar,textColor:or,fontSize:dr,spacing:_r,radius:hr,identity:fr,size:gr,lineHeight:mr,fontFamily:lr,border:sr};function yr(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function br({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(yr(e))-Number(yr(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function xr(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function Sr(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Cr(e){return typeof e==`object`&&e?w(e).filter(e=>e!==`base`):[]}function wr(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Tr({styleProps:e,data:t,theme:n}){return br(w(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=Sr(e[i]);if(!xr(e[i]))return o.forEach(e=>{r.inlineStyles[e]=vr[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=Cr(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=vr[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:vr[a.type](wr(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Er(){return`__m__-${(0,C.useId)().replace(/[:«»]/g,``)}`}function Dr(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Dr(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Or(e){return e}var kr=Or;function Ar(e){return e}function J(e){let t=e;return t.extend=Ar,t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function jr(e){return J(e)}function Mr(e){let t=e;return t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Ar,t}function Nr(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function Pr(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[Nr(n)]=e[n]),t},{})}function Fr(e){return e?typeof e==`string`?{[Nr(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...Fr(t)}),{}):Pr(e):null}function Ir(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Ir(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Lr({theme:e,style:t,vars:n,styleProps:r}){let i=Ir(t,e),a=Ir(n,e);return{...i,...a,...r}}function Rr({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=Nn(),g=e||`div`,{styleProps:_,rest:v}=rr(m),y=hn()?.()?.(_.sx),b=Er(),x=Tr({styleProps:_,theme:h,data:ir}),S=vn(),C=S&&x.hasResponsiveStyles?nr(x.styles,x.media):b,w={ref:p,style:Lr({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:Pt(r,y,{[C]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":I(o)?void 0:o||void 0,size:f,...Fr(a),...v};return(0,G.jsxs)(G.Fragment,{children:[x.hasResponsiveStyles&&(0,G.jsx)(er,{selector:`.${C}`,styles:x.styles,media:x.media,deduplicate:S}),typeof d==`function`?d(w):(0,G.jsx)(g,{...w})]})}Rr.displayName=`@mantine/core/Box`;var Y=kr(Rr),zr=(0,C.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function Br(){return(0,C.use)(zr)}var[Vr,Hr]=R(`ScrollArea.Root component was not found in tree`);function Ur(e,t){let n=(0,C.useEffectEvent)(t);De(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function Wr(e){let{style:t,...n}=e,r=Hr(),[i,a]=(0,C.useState)(0),[o,s]=(0,C.useState)(0),c=!!(i&&o);return Ur(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),Ur(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,G.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function Gr(e){let t=Hr(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,G.jsx)(Wr,{...e}):null}var Kr={scrollHideDelay:1e3,type:`hover`};function qr(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=K(`ScrollAreaRoot`,Kr,e),[s,c]=(0,C.useState)(null),[l,u]=(0,C.useState)(null),[d,f]=(0,C.useState)(null),[p,m]=(0,C.useState)(null),[h,g]=(0,C.useState)(null),[_,v]=(0,C.useState)(0),[y,b]=(0,C.useState)(0),[x,S]=(0,C.useState)(!1),[w,T]=(0,C.useState)(!1),E=ot(a,c);return(0,G.jsx)(Vr,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,G.jsx)(Y,{...o,ref:E,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}qr.displayName=`@mantine/core/ScrollAreaRoot`;function Jr(e,t){let n=e/t;return Number.isNaN(n)?0:n}function Yr(e){let t=Jr(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Xr(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Zr(e,[t,n]){return Math.min(n,Math.max(t,e))}function Qr(e,t,n=`ltr`){let r=Yr(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Zr(e,n===`ltr`?[0,o]:[o*-1,0]);return Xr([0,o],[0,s])(c)}function $r(e,t,n,r=`ltr`){let i=Yr(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return Xr([c,l],d)(e)}function ei(e,t){return e>0&&e<t}function ti(e){return e?parseInt(e,10):0}function ni(e,t,{checkForDefaultPrevented:n=!0}={}){return r=>{e?.(r),n!==!1&&r.defaultPrevented||t?.(r)}}var[ri,ii]=R(`ScrollAreaScrollbar was not found in tree`);function ai(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=Hr(),[p,m]=(0,C.useState)(null),h=ot(u,m),g=(0,C.useRef)(null),_=(0,C.useRef)(``),v=t.content-t.viewport,y=(0,C.useEffectEvent)(e=>c(e,v)),b=ve(o),x=ye(l,10),S=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,C.useEffect)(()=>{if(!p)return;let e=e=>y(e);return p.addEventListener(`wheel`,e,{passive:!1}),()=>p.removeEventListener(`wheel`,e)},[p]),(0,C.useEffect)(b,[t,b]),Ur(p,x),Ur(f.content,x),(0,G.jsx)(ri,{value:{scrollbar:p,hasThumb:n,onThumbChange:ve(r),onThumbPointerUp:ve(i),onThumbPositionChange:b,onThumbPointerDown:ve(a)},children:(0,G.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:ni(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,S(e))}),onPointerMove:ni(e.onPointerMove,S),onPointerUp:ni(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var oi=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=Hr(),[s,c]=(0,C.useState)(),l=(0,C.useRef)(null),u=ot(i,l,o.onScrollbarXChange);return(0,C.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,G.jsx)(ai,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${Yr(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),ei(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ti(s.paddingLeft),paddingEnd:ti(s.paddingRight)}})}})};oi.displayName=`@mantine/core/ScrollAreaScrollbarX`;function si(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=Hr(),[s,c]=(0,C.useState)(),l=(0,C.useRef)(null),u=ot(i,l,o.onScrollbarYChange);return(0,C.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,G.jsx)(ai,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${Yr(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),ei(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ti(s.paddingTop),paddingEnd:ti(s.paddingBottom)}})}})}si.displayName=`@mantine/core/ScrollAreaScrollbarY`;function ci(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=Br(),i=Hr(),a=(0,C.useRef)(null),o=(0,C.useRef)(0),[s,c]=(0,C.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Jr(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>$r(e,o.current,s,t);return t===`horizontal`?(0,G.jsx)(oi,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=Qr(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,G.jsx)(si,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=Qr(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}ci.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function li(e){let t=Hr(),{forceMount:n,...r}=e,[i,a]=(0,C.useState)(!1),o=e.orientation===`horizontal`,s=ye(()=>{if(t.viewport){let e=t.viewport.offsetWidth<t.viewport.scrollWidth,n=t.viewport.offsetHeight<t.viewport.scrollHeight;a(o?e:n)}},10);return Ur(t.viewport,s),Ur(t.content,s),n||i?(0,G.jsx)(ci,{"data-state":i?`visible`:`hidden`,...r}):null}li.displayName=`@mantine/core/ScrollAreaScrollbarAuto`;function ui(e){let{forceMount:t,...n}=e,r=Hr(),[i,a]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,G.jsx)(li,{"data-state":i?`visible`:`hidden`,...n}):null}ui.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function di(e){let{forceMount:t,...n}=e,r=Hr(),i=e.orientation===`horizontal`,[a,o]=(0,C.useState)(`hidden`),s=ye(()=>o(`idle`),100);return(0,C.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,C.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,G.jsx)(ci,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:ni(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:ni(e.onPointerLeave,()=>o(`idle`))}):null}function fi(e){let{forceMount:t,...n}=e,r=Hr(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,C.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,G.jsx)(ui,{...n,forceMount:t}):r.type===`scroll`?(0,G.jsx)(di,{...n,forceMount:t}):r.type===`auto`?(0,G.jsx)(li,{...n,forceMount:t}):r.type===`always`?(0,G.jsx)(ci,{...n}):null}fi.displayName=`@mantine/core/ScrollAreaScrollbar`;function pi(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function mi(e){let{style:t,ref:n,...r}=e,i=Hr(),a=ii(),{onThumbPositionChange:o}=a,s=ot(n,a.onThumbChange),c=(0,C.useRef)(void 0),l=ye(()=>{c.current&&=(c.current(),void 0)},100);return(0,C.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=pi(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,G.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:ni(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:ni(e.onPointerUp,a.onThumbPointerUp)})}mi.displayName=`@mantine/core/ScrollAreaThumb`;function hi(e){let{forceMount:t,...n}=e,r=ii();return t||r.hasThumb?(0,G.jsx)(mi,{...n}):null}hi.displayName=`@mantine/core/ScrollAreaThumb`;function gi({children:e,style:t,ref:n,onWheel:r,...i}){let a=Hr(),o=ot(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,G.jsx)(Y,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,G.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}gi.displayName=`@mantine/core/ScrollAreaViewport`;var _i={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function vi(){return typeof window<`u`}function yi(e){return Si(e)?(e.nodeName||``).toLowerCase():`#document`}function bi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xi(e){return((Si(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Si(e){return vi()?e instanceof Node||e instanceof bi(e).Node:!1}function Ci(e){return vi()?e instanceof Element||e instanceof bi(e).Element:!1}function wi(e){return vi()?e instanceof HTMLElement||e instanceof bi(e).HTMLElement:!1}function Ti(e){return!vi()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof bi(e).ShadowRoot}function Ei(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Li(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Di(e){return/^(table|td|th)$/.test(yi(e))}function Oi(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ki=/transform|translate|scale|rotate|perspective|filter/,Ai=/paint|layout|strict|content/,ji=e=>!!e&&e!==`none`,Mi;function Ni(e){let t=Ci(e)?Li(e):e;return ji(t.transform)||ji(t.translate)||ji(t.scale)||ji(t.rotate)||ji(t.perspective)||!Fi()&&(ji(t.backdropFilter)||ji(t.filter))||ki.test(t.willChange||``)||Ai.test(t.contain||``)}function Pi(e){let t=zi(e);for(;wi(t)&&!Ii(t);){if(Ni(t))return t;if(Oi(t))return null;t=zi(t)}return null}function Fi(){return Mi??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Mi}function Ii(e){return/^(html|body|#document)$/.test(yi(e))}function Li(e){return bi(e).getComputedStyle(e)}function Ri(e){return Ci(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zi(e){if(yi(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ti(e)&&e.host||xi(e);return Ti(t)?t.host:t}function Bi(e){let t=zi(e);return Ii(t)?(e.ownerDocument||e).body:wi(t)&&Ei(t)?t:Bi(t)}function Vi(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Bi(e),i=r===e.ownerDocument?.body,a=bi(r);if(i){let e=Hi(a);return t.concat(a,a.visualViewport||[],Ei(r)?r:[],e&&n?Vi(e):[])}return t.concat(r,Vi(r,[],n))}function Hi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Ui=[`top`,`right`,`bottom`,`left`],Wi=Math.min,Gi=Math.max,Ki=Math.round,qi=Math.floor,Ji=e=>({x:e,y:e}),Yi={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Xi(e,t,n){return Gi(e,Wi(t,n))}function Zi(e,t){return typeof e==`function`?e(t):e}function Qi(e){return e.split(`-`)[0]}function $i(e){return e.split(`-`)[1]}function ea(e){return e===`x`?`y`:`x`}function ta(e){return e===`y`?`height`:`width`}function na(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ra(e){return ea(na(e))}function ia(e,t,n){n===void 0&&(n=!1);let r=$i(e),i=ra(e),a=ta(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=pa(o)),[o,pa(o)]}function aa(e){let t=pa(e);return[oa(e),t,oa(t)]}function oa(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var sa=[`left`,`right`],ca=[`right`,`left`],la=[`top`,`bottom`],ua=[`bottom`,`top`];function da(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ca:sa:t?sa:ca;case`left`:case`right`:return t?la:ua;default:return[]}}function fa(e,t,n,r){let i=$i(e),a=da(Qi(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(oa)))),a}function pa(e){let t=Qi(e);return Yi[t]+e.slice(t.length)}function ma(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function ha(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ma(e)}function ga(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function _a(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function va(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function ya(){return/apple/i.test(navigator.vendor)}function ba(){return _a().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function xa(){return va().includes(`jsdom/`)}var Sa=`data-floating-ui-focusable`,Ca=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function wa(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ta(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ti(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ea(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Da(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Oa(e){return e.matches(`html,body`)}function ka(e){return e?.ownerDocument||document}function Aa(e){return wi(e)&&e.matches(Ca)}function ja(e){if(!e||xa())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ma(e){return e?e.hasAttribute(Sa)?e:e.querySelector(`[`+Sa+`]`)||e:null}function Na(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Na(e,t.id,n)])}function Pa(e){return`nativeEvent`in e}function Fa(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var Ia=typeof document<`u`?C.useLayoutEffect:function(){},La={...C};function Ra(e){let t=C.useRef(e);return Ia(()=>{t.current=e}),t}var za=La.useInsertionEffect||(e=>e());function Ba(e){let t=C.useRef(()=>{});return za(()=>{t.current=e}),C.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Va(e,t,n){let{reference:r,floating:i}=e,a=na(t),o=ra(t),s=ta(o),c=Qi(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=$i(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Ha(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Zi(t,e),p=ha(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ga(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ga(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ua=50,Wa=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Ha},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Va(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ua&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Va(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ga=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Zi(e,t)||{};if(l==null)return{};let d=ha(u),f={x:n,y:r},p=ra(i),m=ta(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Wi(d[_],T),D=Wi(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Xi(E,k,O),j=!c.arrow&&$i(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Ka=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Zi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Qi(r),_=na(o),v=Qi(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[pa(o)]:aa(o)),x=p!==`none`;!d&&x&&b.push(...fa(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ia(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===na(t)||T.every(e=>na(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=na(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function qa(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ja(e){return Ui.some(t=>e[t]>=0)}var Ya=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Zi(e,t);switch(i){case`referenceHidden`:{let e=qa(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ja(e)}}}case`escaped`:{let e=qa(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ja(e)}}}default:return{}}}}};function Xa(e){let t=Wi(...e.map(e=>e.left)),n=Wi(...e.map(e=>e.top)),r=Gi(...e.map(e=>e.right)),i=Gi(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function Za(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>ga(Xa(e)))}var Qa=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=Zi(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=Za(u),f=ga(Xa(u)),p=ha(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(na(n)===`y`){let e=d[0],t=d[d.length-1],r=Qi(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return ga({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=Qi(n)===`left`,t=Gi(...d.map(e=>e.right)),r=Wi(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return ga({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},$a=new Set([`left`,`top`]);async function eo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Qi(n),s=$i(n),c=na(n)===`y`,l=$a.has(o)?-1:1,u=a&&c?-1:1,d=Zi(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var to=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await eo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},no=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Zi(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=na(i),p=ea(f),m=u[p],h=u[f],g=(e,t)=>Xi(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},ro=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Zi(e,t),u={x:n,y:r},d=na(i),f=ea(d),p=u[f],m=u[d],h=Zi(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=$a.has(Qi(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},io=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Zi(e,t),c=await i.detectOverflow(t,s),l=Qi(n),u=$i(n),d=na(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Wi(p-c[m],g),y=Wi(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Gi(c.left,c.right):S=p-2*Gi(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function ao(e){let t=Li(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=wi(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ki(n)!==a||Ki(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function oo(e){return Ci(e)?e:e.contextElement}function so(e){let t=oo(e);if(!wi(t))return Ji(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ao(t),o=(a?Ki(n.width):n.width)/r,s=(a?Ki(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var co=Ji(0);function lo(e){let t=bi(e);return!Fi()||!t.visualViewport?co:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uo(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===bi(e)}function fo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=oo(e),o=Ji(1);t&&(r?Ci(r)&&(o=so(r)):o=so(e));let s=uo(a,n,r)?lo(a):Ji(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=bi(a),t=Ci(r)?bi(r):r,n=e,i=Hi(n);for(;i&&t!==n;){let e=so(i),t=i.getBoundingClientRect(),r=Li(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=bi(i),i=Hi(n)}}return ga({width:u,height:d,x:c,y:l})}function po(e,t){let n=Ri(e).scrollLeft;return t?t.left+n:fo(xi(e)).left+n}function mo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-po(e,n),y:n.top+t.scrollTop}}function ho(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=xi(r),s=t?Oi(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ji(1),u=Ji(0),d=wi(r);if((d||!a)&&((yi(r)!==`body`||Ei(o))&&(c=Ri(r)),d)){let e=fo(r);l=so(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?mo(o,c):Ji(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function go(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function _o(e){let t=Ri(e),n=e.ownerDocument.body,r=Gi(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Gi(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+po(e),o=-t.scrollTop;return Li(n).direction===`rtl`&&(a+=Gi(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var vo=25;function yo(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=bi(e),a=xi(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Fi()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(po(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=vo&&(s-=o)}return{width:s,height:c,x:l,y:u}}function bo(e,t){let n=fo(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=so(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function xo(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=yo(e,n,t);else if(t===`document`)r=_o(xi(e));else if(Ci(t))r=bo(t,n);else{let n=lo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ga(r)}function So(e,t){let n=t.get(e);if(n)return n;let r=Vi(e,[],!1).filter(e=>Ci(e)&&yi(e)!==`body`),i=null,a=Li(e).position===`fixed`,o=a?zi(e):e;for(;Ci(o)&&!Ii(o);){let e=Li(o),t=Ni(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=zi(o)}return t.set(e,r),r}function Co(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Oi(t)?[]:So(t,this._c):[].concat(n),r],o=xo(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=xo(t,a[e],i);s=Gi(n.top,s),c=Wi(n.right,c),l=Wi(n.bottom,l),u=Gi(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function wo(e){let{width:t,height:n}=ao(e);return{width:t,height:n}}function To(e,t,n){let r=wi(t),i=xi(t),a=n===`fixed`,o=fo(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ji(0);if((r||!a)&&((yi(t)!==`body`||Ei(i))&&(s=Ri(t)),r)){let e=fo(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=po(i));let l=i&&!r&&!a?mo(i,s):Ji(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Eo(e){return Li(e).position===`static`}function Do(e,t){if(!wi(e)||Li(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return xi(e)===n&&(n=n.ownerDocument.body),n}function Oo(e,t){let n=bi(e);if(Oi(e))return n;if(!wi(e)){let t=zi(e);for(;t&&!Ii(t);){if(Ci(t)&&!Eo(t))return t;t=zi(t)}return n}let r=Do(e,t);for(;r&&Di(r)&&Eo(r);)r=Do(r,t);return r&&Ii(r)&&Eo(r)&&!Ni(r)?n:r||Pi(e)||n}var ko=async function(e){let t=this.getOffsetParent||Oo,n=this.getDimensions,r=await n(e.floating);return{reference:To(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ao(e){return Li(e).direction===`rtl`}var jo={convertOffsetParentRelativeRectToViewportRelativeRect:ho,getDocumentElement:xi,getClippingRect:Co,getOffsetParent:Oo,getElementRects:ko,getClientRects:go,getDimensions:wo,getScale:so,isElement:Ci,isRTL:Ao};function Mo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function No(e,t,n){let r=null,i,a=xi(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=qi(d),h=qi(a.clientWidth-(u+f)),g=qi(a.clientHeight-(d+p)),_=qi(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Gi(0,Wi(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Mo(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=bi(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Po(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=oo(e),u=i||a?[...l?Vi(l):[],...t?Vi(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?No(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?fo(e):null;c&&g();function g(){let t=fo(e);h&&!Mo(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Fo=to,Io=no,Lo=Ka,Ro=io,zo=Ya,Bo=Ga,Vo=Qa,Ho=ro,Uo=(e,t,n)=>{let r=new Map,i=n??{},a={...jo,...i.platform,_c:r};return Wa(e,t,{...i,platform:a})},Wo=typeof document<`u`?C.useLayoutEffect:function(){};function Go(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Go(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Go(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ko(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qo(e,t){let n=Ko(e);return Math.round(t*n)/n}function Jo(e){let t=C.useRef(e);return Wo(()=>{t.current=e}),t}function Yo(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);Go(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=Jo(c),k=Jo(i),A=Jo(l),j=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Uo(S.current,w.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Go(T.current,t)&&(T.current=t,O.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);Wo(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=C.useRef(!1);Wo(()=>(M.current=!0,()=>{M.current=!1}),[]),Wo(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,j);j()}},[b,x,j,D,E]);let N=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),P=C.useMemo(()=>({reference:b,floating:x}),[b,x]),F=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=qo(P.floating,u.x),r=qo(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ko(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var Xo=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Bo({element:r.current,padding:i}).fn(n):r?Bo({element:r,padding:i}).fn(n):{}}}},Zo=(e,t)=>{let n=Fo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qo=(e,t)=>{let n=Io(e);return{name:n.name,fn:n.fn,options:[e,t]}},$o=(e,t)=>({fn:Ho(e).fn,options:[e,t]}),es=(e,t)=>{let n=Lo(e);return{name:n.name,fn:n.fn,options:[e,t]}},ts=(e,t)=>{let n=Ro(e);return{name:n.name,fn:n.fn,options:[e,t]}},ns=(e,t)=>{let n=zo(e);return{name:n.name,fn:n.fn,options:[e,t]}},rs=(e,t)=>{let n=Vo(e);return{name:n.name,fn:n.fn,options:[e,t]}},is=(e,t)=>{let n=Xo(e);return{name:n.name,fn:n.fn,options:[e,t]}};function as(e){let t=C.useRef(void 0),n=C.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return C.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var os=`data-floating-ui-focusable`,ss=`active`,cs=`selected`,ls=`ArrowLeft`,us=`ArrowRight`,ds=`ArrowUp`,fs=`ArrowDown`,ps=[ls,us],ms=[ds,fs];[...ps,...ms];var hs={...C},gs=!1,_s=0,vs=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+_s++;function ys(){let[e,t]=C.useState(()=>gs?vs():void 0);return Ia(()=>{e??t(vs())},[]),C.useEffect(()=>{gs=!0},[]),e}var bs=hs.useId||ys;function xs(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var Ss=C.createContext(null),Cs=C.createContext(null),ws=()=>C.useContext(Ss)?.id||null,Ts=()=>C.useContext(Cs);function Es(e){return`data-floating-ui-`+e}function Ds(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var Os=Es(`safe-polygon`);function ks(e,t,n){if(n&&!Fa(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function As(e){return typeof e==`function`?e():e}function js(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Ts(),m=ws(),h=Ra(l),g=Ra(c),_=Ra(n),v=Ra(d),y=C.useRef(),b=C.useRef(-1),x=C.useRef(),S=C.useRef(-1),w=C.useRef(!0),T=C.useRef(!1),E=C.useRef(()=>{}),D=C.useRef(!1),O=Ba(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});C.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Ds(b),Ds(S),w.current=!0,D.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),C.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){O()&&r(!1,e,`hover`)}let t=ka(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,O]);let k=C.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=ks(g.current,`close`,y.current);i&&!x.current?(Ds(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Ds(b),r(!1,e,n))},[g,r]),A=Ba(()=>{E.current(),x.current=void 0}),j=Ba(()=>{if(T.current){let e=ka(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Os),T.current=!1}}),M=Ba(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);C.useEffect(()=>{if(!s)return;function e(e){if(Ds(b),w.current=!1,u&&!Fa(y.current)||As(v.current)>0&&!ks(g.current,`open`))return;let t=ks(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(M()){j();return}E.current();let t=ka(o.floating);if(Ds(S),D.current=!1,h.current&&i.current.floatingContext){n||Ds(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),E.current=()=>{t.removeEventListener(`mousemove`,r)}}else y.current===`touch`&&Ta(o.floating,e.relatedTarget)||k(e)}function a(e){M()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e)}})(e))}function c(){Ds(b)}function l(e){M()||k(e,!1)}if(Ci(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,k,A,j,r,n,_,p,g,h,i,M,v]),Ia(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&O()){T.current=!0;let e=o.floating;if(Ci(o.domReference)&&e){var t;let n=ka(o.floating).body;n.setAttribute(Os,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,O]),Ia(()=>{n||(y.current=void 0,D.current=!1,A(),j())},[n,A,j]),C.useEffect(()=>()=>{A(),Ds(b),Ds(S),j()},[s,o.domReference,A,j]);let N=C.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!w.current&&!_.current&&r(!0,t,`hover`)}u&&!Fa(y.current)||n||As(v.current)===0||D.current&&e.movementX**2+e.movementY**2<2||(Ds(S),y.current===`touch`?i():(D.current=!0,S.current=window.setTimeout(i,As(v.current))))}}},[u,r,n,_,v]);return C.useMemo(()=>s?{reference:N}:{},[s,N])}var Ms=()=>{},Ns=C.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Ms,setState:Ms,isInstantPhase:!1}),Ps=()=>C.useContext(Ns);function Fs(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=C.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=C.useRef(null),s=C.useCallback(e=>{a({currentId:e})},[]);return Ia(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,G.jsx)(Ns.Provider,{value:C.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function Is(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=Ps(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return Ia(()=>{o&&l&&(f({delay:{open:1,close:ks(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),Ia(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),Ia(()=>{o&&u!==Ms&&n&&u(s)},[o,n,u,s]),c}function Ls(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ti(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Rs(e){return`composedPath`in e?e.composedPath()[0]:e.target}var zs={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Bs={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Vs=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Hs(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Ts(),g=Ba(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=C.useRef(!1),{escapeKey:y,outsidePress:b}=Vs(p),{escapeKey:x,outsidePress:S}=Vs(m),w=C.useRef(!1),T=Ba(e=>{if(!n||!o||!s||e.key!==`Escape`||w.current)return;let t=a.current.floatingContext?.nodeId,i=h?Na(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}r(!1,Pa(e)?e.nativeEvent:e,`escape-key`)}),E=Ba(e=>{var t;let n=()=>{var t;T(e),(t=Ea(e))==null||t.removeEventListener(`keydown`,n)};(t=Ea(e))==null||t.addEventListener(`keydown`,n)}),D=Ba(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=Ea(e),s=`[`+Es(`inert`)+`]`,c=ka(i.floating).querySelectorAll(s),u=Ci(o)?o:null;for(;u&&!Ii(u);){let e=zi(u);if(Ii(e)||!Ci(e))break;u=e}if(c.length&&Ci(o)&&!Oa(o)&&!Ta(o,i.floating)&&Array.from(c).every(e=>!Ta(u,e)))return;if(wi(o)&&A){let t=Ii(o),n=Li(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&Na(h.nodesRef.current,d).some(t=>Da(e,t.context?.elements.floating));if(Da(e,i.floating)||Da(e,i.domReference)||f)return;let p=h?Na(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}r(!1,e,`outside-press`)}),O=Ba(e=>{var t;let n=()=>{var t;D(e),(t=Ea(e))==null||t.removeEventListener(l,n)};(t=Ea(e))==null||t.addEventListener(l,n)});C.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),w.current=!0}function u(){e=window.setTimeout(()=>{w.current=!1},Fi()?5:0)}let d=ka(i.floating);s&&(d.addEventListener(`keydown`,x?E:T,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?O:D,S);let p=[];return f&&(Ci(i.domReference)&&(p=Vi(i.domReference)),Ci(i.floating)&&(p=p.concat(Vi(i.floating))),!Ci(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(Vi(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?E:T,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?O:D,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,T,x,E,D,S,O]),C.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let k=C.useMemo(()=>({onKeyDown:T,...u&&{[zs[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[T,r,u,d]),A=C.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[Bs[l]]:()=>{a.current.insideReactTree=!0}}},[T,l,a]);return C.useMemo(()=>o?{reference:k,floating:A}:{},[o,k,A])}function Us(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=bs(),a=C.useRef({}),[o]=C.useState(()=>xs()),s=ws()!=null,[c,l]=C.useState(r.reference),u=Ba((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=C.useMemo(()=>({setPositionReference:l}),[]),f=C.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return C.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Ws(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=Us({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=C.useState(null),[l,u]=C.useState(null),d=o?.domReference||s,f=C.useRef(null),p=Ts();Ia(()=>{d&&(f.current=d)},[d]);let m=Yo({...n,elements:{...o,...l&&{reference:l}}}),h=C.useCallback(e=>{let t=Ci(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=C.useCallback(e=>{(Ci(e)||e===null)&&(f.current=e,c(e)),(Ci(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!Ci(e))&&m.refs.setReference(e)},[m.refs]),_=C.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=C.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=C.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return Ia(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),C.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function Gs(){return ba()&&ya()}function Ks(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=C.useRef(!1),u=C.useRef(-1),d=C.useRef(!0);C.useEffect(()=>{if(!s)return;let e=bi(o.domReference);function t(){!n&&wi(o.domReference)&&o.domReference===wa(ka(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),Gs()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),Gs()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),C.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),C.useEffect(()=>()=>{Ds(u)},[]);let f=C.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=Ea(e.nativeEvent);if(c&&Ci(t)){if(Gs()&&!e.relatedTarget){if(!d.current&&!Aa(t))return}else if(!ja(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=Ci(t)&&t.hasAttribute(Es(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=wa(o.domReference?o.domReference.ownerDocument:document);!t&&e===o.domReference||Ta(a.current.floatingContext?.refs.floating.current,e)||Ta(o.domReference,e)||i||r(!1,n,`focus`)})}}),[a,o.domReference,r,c]);return C.useMemo(()=>s?{reference:f}:{},[s,f])}function qs(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[ss]:t,[cs]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[os]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[ss,cs].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function Js(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=C.useCallback(t=>qs(t,e,`reference`),t),a=C.useCallback(t=>qs(t,e,`floating`),n),o=C.useCallback(t=>qs(t,e,`item`),r);return C.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Ys=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Xs(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=bs(),c=r.domReference?.id||s,l=C.useMemo(()=>Ma(r.floating)?.id||i,[r.floating,i]),u=Ys.get(o)??o,d=ws()!=null,f=C.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=C.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=C.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return C.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function Zs(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Zs(e,t.id,n)])}function Qs(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function $s(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ec(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){Ds(i),u()}if(Ds(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=Rs(e),v=e.type===`mouseleave`,y=Ls(c.floating,_),b=Ls(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=$s(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&Ci(e.relatedTarget)&&Ls(c.floating,e.relatedTarget)||f&&Zs(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]]}function P(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!Qs([m,h],N)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}Qs([m,h],P([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var tc={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},nc=Mt((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":N(t),"--scrollarea-over-scroll-behavior":i,"--scrollarea-offset-size":void 0}}}),rc=J(e=>{let t=K(`ScrollArea`,tc,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:w,attributes:T,...E}=t,[D,O]=(0,C.useState)(!1),[k,A]=(0,C.useState)(!1),[j,M]=(0,C.useState)(!1),N=(0,C.useRef)(!0),P=(0,C.useRef)(!1),F=(0,C.useRef)(!0),I=(0,C.useRef)(!1),L=q({name:`ScrollArea`,props:t,classes:_i,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T,vars:c,varsResolver:nc}),R=(0,C.useRef)(null),[z,B]=(0,C.useState)(null),ee=as([f,R,(0,C.useCallback)(e=>{B(t=>t===e?t:e)},[])]);return Ur(h===`present`?z:null,()=>{let e=R.current;e&&(A(e.scrollHeight>e.clientHeight),M(e.scrollWidth>e.clientWidth))}),De(()=>{S&&R.current&&R.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,G.jsxs)(qr,{getStyles:L,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...L(`root`),...E,children:[(0,G.jsx)(gi,{...d,...L(`viewport`,{style:d?.style}),ref:ee,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":w||void 0,"data-horizontal-hidden":h===`present`&&!j?`true`:void 0,"data-vertical-hidden":h===`present`&&!k?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!P.current&&_?.(),c&&!N.current&&v?.(),P.current=s,N.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!I.current&&b?.(),u&&!F.current&&y?.(),I.current=l,F.current=u},children:m}),(g===`xy`||g===`x`)&&(0,G.jsx)(fi,{...L(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":w||void 0,"data-hidden":l===`never`||h===`present`&&!j||void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:(0,G.jsx)(hi,{...L(`thumb`)})}),(g===`xy`||g===`y`)&&(0,G.jsx)(fi,{...L(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":w||void 0,"data-hidden":l===`never`||h===`present`&&!k||void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:(0,G.jsx)(hi,{...L(`thumb`)})}),(0,G.jsx)(Gr,{...L(`corner`),"data-vertical-scrollbar-position":w||void 0,"data-hovered":D||void 0,"data-hidden":l===`never`||void 0})]})});rc.displayName=`@mantine/core/ScrollArea`;var ic=J(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...w}=K(`ScrollAreaAutosize`,tc,e),T=(0,C.useRef)(null),[E,D]=(0,C.useState)(null),O=as([u,T,(0,C.useCallback)(e=>{D(t=>t===e?t:e)},[])]),k=(0,C.useRef)(!1),A=(0,C.useRef)(!1),j=(0,C.useEffectEvent)(()=>{let e=T.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==k.current&&(A.current?S(t):(A.current=!0,t&&S(!0)),k.current=t)});return Ur(S?E:null,j),(0,G.jsx)(Y,{...w,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,G.jsx)(Y,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,G.jsx)(rc,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:O,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});rc.classes=_i,rc.varsResolver=nc,ic.displayName=`@mantine/core/ScrollAreaAutosize`,ic.classes=_i,rc.Autosize=ic;var ac={root:`m_87cf2631`},oc={__staticSelector:`UnstyledButton`},sc=Mr(e=>{let t=K(`UnstyledButton`,oc,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t,d=q({name:i,props:t,classes:ac,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l});return(0,G.jsx)(Y,{...d(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});sc.classes=ac,sc.displayName=`@mantine/core/UnstyledButton`;var cc={root:`m_515a97f8`},lc=J(e=>{let t=K(`VisuallyHidden`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t,u=q({name:`VisuallyHidden`,classes:cc,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c});return(0,G.jsx)(Y,{component:`span`,...u(`root`),...l})});lc.classes=cc,lc.displayName=`@mantine/core/VisuallyHidden`;var uc={root:`m_1b7284a3`},dc=Mt((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:U(t),"--paper-shadow":le(n)}})),fc=Mr(e=>{let t=K(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=q({name:`Paper`,props:t,classes:uc,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:dc});return(0,G.jsx)(Y,{mod:[{withBorder:s},f],...h(`root`),variant:d,...m})});fc.classes=uc,fc.varsResolver=dc,fc.displayName=`@mantine/core/Paper`;function pc(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function mc(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var hc={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function gc({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function _c({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=gc({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[hc[c]]:r},d=-t/2;return c===`left`?{...u,...pc(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...pc(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...mc(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...mc(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function vc({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function yc({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=Br();return a?(0,G.jsx)(`div`,{role:`presentation`,...l,style:{...c,..._c({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}yc.displayName=`@mantine/core/FloatingArrow`;function bc(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function xc({open:e,close:t,openDelay:n,closeDelay:r}){let i=(0,C.useRef)(-1),a=(0,C.useRef)(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(a.current)};return(0,C.useEffect)(()=>o,[]),{openDropdown:()=>{o(),n===0||n===void 0?e():i.current=window.setTimeout(e,n)},closeDropdown:()=>{o(),r===0||r===void 0?t():a.current=window.setTimeout(t,r)}}}var Sc={root:`m_9814e45f`},Cc={zIndex:ie(`modal`)},wc=Mt((e,{gradient:t,color:n,backgroundOpacity:r,blur:i,radius:a,zIndex:o})=>({root:{"--overlay-bg":t||(n!==void 0||r!==void 0)&&en(n||`#000`,r??.6)||void 0,"--overlay-filter":i?`blur(${N(i)})`:void 0,"--overlay-radius":a===void 0?void 0:U(a),"--overlay-z-index":o?.toString()}})),Tc=Mr(e=>{let t=K(`Overlay`,Cc,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fixed:c,center:l,children:u,radius:d,zIndex:f,gradient:p,blur:m,color:h,backgroundOpacity:g,mod:_,attributes:v,...y}=t,b=q({name:`Overlay`,props:t,classes:Sc,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:wc});return(0,G.jsx)(Y,{...b(`root`),mod:[{center:l,fixed:c},_],...y,children:u})});Tc.classes=Sc,Tc.varsResolver=wc,Tc.displayName=`@mantine/core/Overlay`;function Ec(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}var Dc=null;function Oc({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||Ec(n):e;if(t){if(Dc){if(document.body.contains(Dc))return Dc;Dc=null}let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return Dc=e,e;let t=Ec(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),Dc=t,t}return Ec(n)}var kc={reuseTargetNode:!0},Ac=J(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=K(`Portal`,kc,e),[o,s]=(0,C.useState)(!1),c=(0,C.useRef)(null);return De(()=>(s(!0),c.current=Oc({target:n,reuseTargetNode:r,...a}),it(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,O.createPortal)((0,G.jsx)(G.Fragment,{children:t}),c.current)});Ac.displayName=`@mantine/core/Portal`;var jc=J(({withinPortal:e=!0,children:t,...n})=>_n()===`test`||!e?(0,G.jsx)(G.Fragment,{children:t}):(0,G.jsx)(Ac,{...n,children:t}));jc.displayName=`@mantine/core/OptionalPortal`;var Mc=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),Nc={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...Mc(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...Mc(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...Mc(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...Mc(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...Mc(`top`),common:{transformOrigin:`top right`}}},Pc={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function Fc({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in Nc?{transitionProperty:Nc[e].transitionProperty,...i,...Nc[e].common,...Nc[e][Pc[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[Pc[t]]}}function Ic({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=Nn(),d=dt(),f=u.respectReducedMotion?d:!1,[p,m]=(0,C.useState)(f?0:e),[h,g]=(0,C.useState)(r?`entered`:`exited`),_=(0,C.useRef)(-1),v=(0,C.useRef)(-1),y=(0,C.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current),y.current=-1}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;if(m(l),l===0)typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`);else{let e=requestAnimationFrame(()=>{O.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current===e&&(y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)}))});y.current=e}},S=e=>{b(),typeof(e?c:l)==`number`?v.current=window.setTimeout(()=>{x(e)},e?c:l):x(e)};return ke(()=>{S(r)},[r]),(0,C.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function Lc({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=_n(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=Ic({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,G.jsx)(G.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,G.jsx)(G.Fragment,{children:o({})}):o({display:`none`}):(0,G.jsx)(C.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,G.jsx)(G.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:Fc({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,G.jsx)(C.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,G.jsx)(G.Fragment,{children:o(Fc({transition:n,duration:h,state:g,timingFunction:_}))})}Lc.displayName=`@mantine/core/Transition`;var Rc={duration:100,transition:`fade`};function zc(e,t){return{...Rc,...t,...e}}var[Bc,Vc]=R(`Popover component was not found in the tree`);function Hc({childProps:e,disabled:t,opened:n,longPressDelay:r=500,setReference:i,open:a}){let o=(0,C.useRef)(!1),s=(0,C.useRef)(!1),c=(0,C.useRef)(null),l=(0,C.useRef)(t);l.current=t;let u=(e,t,n)=>{i({getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t,toJSON:()=>void 0}),contextElement:n}),a()},d=ue(e.onMouseDown,e=>{t||e.button===2&&e.stopPropagation()}),f=ue(e.onContextMenu,e=>{t||e.defaultPrevented||(e.preventDefault(),!s.current&&(u(e.clientX,e.clientY,e.currentTarget),o.current&&(s.current=!0)))}),p=xt(e=>{if(l.current||s.current)return;let t=e,n=t.touches[0]??t.changedTouches[0];n&&(u(n.clientX,n.clientY,c.current),s.current=!0)},{threshold:r,events:[`touch`],cancelOnMove:!0,onStart:e=>{o.current=!0,s.current=!1,c.current=e.currentTarget},onFinish:e=>{o.current=!1,s.current=!1,l.current||e.preventDefault()},onCancel:()=>{o.current=!1,s.current=!1}});return{onContextMenu:f,onMouseDown:d,onTouchStart:ue(e.onTouchStart,p.onTouchStart),onTouchEnd:ue(e.onTouchEnd,p.onTouchEnd),onTouchCancel:ue(e.onTouchCancel,p.onTouchCancel),onTouchMove:ue(e.onTouchMove,p.onTouchMove),style:t?e.style:{...e.style,WebkitTouchCallout:`none`,WebkitUserSelect:`none`,userSelect:`none`},"data-expanded":n?!0:void 0}}function Uc(e){let{children:t,disabled:n,longPressDelay:r}=K(`PopoverContextMenu`,null,e),i=jt(t);if(!i)throw Error(`Popover.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=Vc(),o=Hc({childProps:i.props,disabled:n||a.disabled,opened:a.opened,longPressDelay:r,setReference:a.reference,open:()=>{a.opened||a.onToggle()}});return(0,C.cloneElement)(i,o)}Uc.displayName=`@mantine/core/PopoverContextMenu`;function Wc({children:e,active:t=!0,refProp:n=`ref`,innerRef:r}){let i=ot($e(t),r),a=jt(e);return a?(0,C.cloneElement)(a,{[n]:i}):e}function Gc(e){return(0,G.jsx)(lc,{tabIndex:-1,"data-autofocus":!0,...e})}Wc.displayName=`@mantine/core/FocusTrap`,Gc.displayName=`@mantine/core/FocusTrapInitialFocus`,Wc.InitialFocus=Gc;var Kc={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`},qc=J(e=>{let t=K(`PopoverDropdown`,null,e),{className:n,style:r,vars:i,children:a,onKeyDownCapture:o,variant:s,classNames:c,styles:l,ref:u,...d}=t,f=Vc(),{dir:p}=Br(),m=f.arrowPosition===`merge`&&f.withArrow?vc({position:f.placement,dir:p}):void 0,h=Ae({opened:f.opened,shouldReturnFocus:f.returnFocus}),g=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:`dialog`,tabIndex:-1}:{},_=ot(u,f.floating);return f.disabled?null:(0,G.jsx)(jc,{...f.portalProps,withinPortal:f.withinPortal,children:(0,G.jsx)(Lc,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||`fade`,duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,keepMountedMode:f.keepMountedMode,exitDuration:typeof f.transitionProps?.exitDuration==`number`?f.transitionProps.exitDuration:f.transitionProps?.duration,children:e=>(0,G.jsx)(Wc,{active:f.trapFocus&&f.opened,innerRef:_,children:(0,G.jsxs)(Y,{...g,...d,variant:s,onKeyDownCapture:oe(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:h,onKeyDown:o}),"data-position":f.placement,"data-fixed":f.floatingStrategy===`fixed`||void 0,...f.getStyles(`dropdown`,{className:n,props:t,classNames:c,styles:l,style:[{...e,...m,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width===`target`?void 0:N(f.width),...f.referenceHidden?{display:`none`}:null},f.resolvedStyles?.dropdown,l?.dropdown,r]}),children:[a,(0,G.jsx)(yc,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles(`arrow`,{props:t,classNames:c,styles:l})})]})})})})});qc.classes=Kc,qc.displayName=`@mantine/core/PopoverDropdown`;var Jc={refProp:`ref`,popupType:`dialog`},Yc=J(e=>{let{children:t,refProp:n,popupType:r,ref:i,...a}=K(`PopoverTarget`,Jc,e),o=jt(t);if(!o)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let s=a,c=Vc(),l=ot(c.reference,Et(o),i),u=c.withRoles?{"aria-haspopup":r,"aria-expanded":c.opened,"aria-controls":c.opened?c.getDropdownId():void 0,id:c.getTargetId()}:{},d=o.props;return(0,C.cloneElement)(o,{...s,...u,...c.targetProps,className:Pt(c.targetProps.className,s.className,d.className),[n]:l,...c.controlled?null:{onClick:e=>{c.onToggle(),d.onClick?.(e)}}})});Yc.displayName=`@mantine/core/PopoverTarget`;function Xc(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Zc(e,t,n,r){let i=Xc(e.middlewares),a=[Zo(e.offset),ns()];if(i.flip&&!n){let e=typeof i.flip==`boolean`?{}:i.flip,t=r?{fallbackStrategy:`initialPlacement`,...e}:e;a.push(es(t))}if(i.shift){let t=typeof i.shift==`boolean`?{}:i.shift;a.push(Qo(n=>{let r=n.placement.startsWith(`top`)||n.placement.startsWith(`bottom`);return{limiter:$o(),padding:5,...e.width===`target`&&r?{mainAxis:!1}:null,...t}}))}return i.inline&&a.push(typeof i.inline==`boolean`?rs():rs(i.inline)),a.push(is({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width===`target`)&&a.push(ts({...typeof i.size==`boolean`?{}:i.size,apply({rects:n,availableWidth:r,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};i.size&&(typeof i.size==`object`&&i.size.apply?i.size.apply({rects:n,availableWidth:r,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${r}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),a}function Qc(e){let[t,n]=st({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=(0,C.useRef)(t),i=(0,C.useRef)(!1),[a,o]=(0,C.useState)(null),s=e.preventPositionChangeWhenVisible!==!1,c=(0,C.useRef)(t);t!==c.current&&(c.current=t,t&&a!==null&&o(null));let l=(0,C.useRef)(e.position);e.position!==l.current&&(l.current=e.position,i.current=!1,a!==null&&o(null));let u=(0,C.useCallback)(()=>o(null),[]),d=()=>{t&&!e.disabled&&n(!1)},f=()=>{e.disabled||n(!t)},p=Ws({open:t,strategy:e.strategy,placement:s?a??e.position:e.position,middleware:Zc(e,()=>p,s&&a!==null,s),whileElementsMounted:e.keepMounted?void 0:Po});(0,C.useEffect)(()=>{if(!e.keepMounted)return;let n=p.refs.reference.current,r=p.refs.floating.current;if(t&&n&&r)return Po(n,r,p.update)},[e.keepMounted,t,p.update,p.elements.reference,p.elements.floating]),De(()=>{if(!t){i.current=!1;return}if(!s||a!==null)return;let e=p.refs.floating.current;e&&e.offsetHeight!==0&&e.offsetWidth!==0&&(i.current?p.isPositioned&&o(p.placement):(i.current=!0,p.update()))},[s,t,p.isPositioned,p.placement,a,p.update]);let m=(0,C.useRef)(p.placement);return De(()=>{m.current!==p.placement&&(m.current=p.placement,e.onPositionChange?.(p.placement))},[p.placement]),ke(()=>{t!==r.current&&(t?e.onOpen?.():e.onClose?.()),r.current=t},[t,e.onClose,e.onOpen]),{floating:p,controlled:typeof e.opened==`boolean`,opened:t,onClose:d,onToggle:f,resetLockedPlacement:u}}var $c={position:`bottom`,offset:8,transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,preventPositionChangeWhenVisible:!0,clickOutsideEvents:[`mousedown`,`touchstart`],clickOutsideCapture:!1,zIndex:ie(`popover`),__staticSelector:`Popover`,width:`max-content`},el=Mt((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:U(t),"--popover-shadow":le(n)}}));function tl(e){let t=K(`Popover`,$c,e),{children:n,position:r,offset:i,onPositionChange:a,opened:o,transitionProps:s,onExitTransitionEnd:c,onEnterTransitionEnd:l,width:u,middlewares:d,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,unstyled:_,classNames:v,styles:y,closeOnClickOutside:b,withinPortal:x,portalProps:S,closeOnEscape:w,clickOutsideEvents:T,clickOutsideCapture:E,trapFocus:D,onClose:O,onDismiss:k,onOpen:A,onChange:j,zIndex:M,radius:N,shadow:P,id:F,defaultOpened:I,__staticSelector:L,withRoles:R,disabled:z,returnFocus:B,variant:ee,keepMounted:te,keepMountedMode:ne,vars:V,floatingStrategy:re,withOverlay:ie,overlayProps:ae,hideDetached:oe,attributes:H,preventPositionChangeWhenVisible:se,...U}=t,ce=q({name:L,props:t,classes:Kc,classNames:v,styles:y,unstyled:_,attributes:H,rootSelector:`dropdown`,vars:V,varsResolver:el}),{resolvedStyles:W}=Fn({classNames:v,styles:y,props:t}),le=(0,C.useRef)(null),[ue,de]=(0,C.useState)(null),[fe,pe]=(0,C.useState)(null),{dir:me}=Br(),he=_n(),ge=nt(F),_e=Qc({middlewares:d,width:u,position:bc(me,r),offset:typeof i==`number`?i+(f?p/2:0):i,arrowRef:le,arrowOffset:m,onPositionChange:a,opened:o,defaultOpened:I,onChange:j,onOpen:A,onClose:O,onDismiss:k,strategy:re,disabled:z,preventPositionChangeWhenVisible:se,keepMounted:te});xe(()=>{b&&(_e.onClose(),k?.())},T,[ue,fe],!0,E);let ve=(0,C.useCallback)(e=>{de(e),_e.floating.refs.setReference(e)},[_e.floating.refs.setReference]),ye=(0,C.useCallback)(e=>{pe(e),_e.floating.refs.setFloating(e)},[_e.floating.refs.setFloating]),be=(0,C.useCallback)(()=>{s?.onExited?.(),c?.(),_e.resetLockedPlacement()},[s?.onExited,c,_e.resetLockedPlacement]),Se=(0,C.useCallback)(()=>{s?.onEntered?.(),l?.()},[s?.onEntered,l]);return(0,G.jsxs)(Bc,{value:{returnFocus:B,disabled:z,controlled:_e.controlled,reference:ve,floating:ye,x:_e.floating.x,y:_e.floating.y,arrowX:_e.floating?.middlewareData?.arrow?.x,arrowY:_e.floating?.middlewareData?.arrow?.y,opened:_e.opened,arrowRef:le,transitionProps:{...s,onExited:be,onEntered:Se},width:u,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,placement:_e.floating.placement,trapFocus:D,withinPortal:x,portalProps:S,zIndex:M,radius:N,shadow:P,closeOnEscape:w,onDismiss:k,onClose:_e.onClose,onToggle:_e.onToggle,getTargetId:()=>ge,getDropdownId:()=>`${ge}-dropdown`,withRoles:R,targetProps:U,__staticSelector:L,classNames:v,styles:y,unstyled:_,variant:ee,keepMounted:te,keepMountedMode:ne,getStyles:ce,resolvedStyles:W,floatingStrategy:re,referenceHidden:oe&&he!==`test`?_e.floating.middlewareData.hide?.referenceHidden:!1},children:[n,ie&&(0,G.jsx)(Lc,{transition:`fade`,mounted:_e.opened,duration:s?.duration||250,exitDuration:s?.exitDuration||250,children:e=>(0,G.jsx)(jc,{withinPortal:x,children:(0,G.jsx)(Tc,{...ae,...ce(`overlay`,{className:ae?.className,style:[e,ae?.style]})})})})]})}tl.Target=Yc,tl.Dropdown=qc,tl.ContextMenu=Uc,tl.varsResolver=el,tl.displayName=`@mantine/core/Popover`,tl.extend=e=>e,tl.withProps=e=>{let t=t=>(0,G.jsx)(tl,{...e,...t});return t.extend=tl.extend,t.displayName=`WithProps(${tl.displayName})`,t};var nl={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},rl=({className:e,...t})=>(0,G.jsxs)(Y,{component:`span`,className:Pt(nl.barsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:nl.bar}),(0,G.jsx)(`span`,{className:nl.bar}),(0,G.jsx)(`span`,{className:nl.bar})]});rl.displayName=`@mantine/core/Bars`;var il=({className:e,...t})=>(0,G.jsxs)(Y,{component:`span`,className:Pt(nl.dotsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:nl.dot}),(0,G.jsx)(`span`,{className:nl.dot}),(0,G.jsx)(`span`,{className:nl.dot})]});il.displayName=`@mantine/core/Dots`;var al=({className:e,...t})=>(0,G.jsx)(Y,{component:`span`,className:Pt(nl.ovalLoader,e),...t});al.displayName=`@mantine/core/Oval`;var ol={bars:rl,oval:al,dots:il},sl={loaders:ol,type:`oval`},cl=Mt((e,{size:t,color:n})=>({root:{"--loader-size":H(t,`loader-size`),"--loader-color":n?Xt(n,e):void 0}})),ll=J(e=>{let t=K(`Loader`,sl,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=q({name:`Loader`,props:t,classes:nl,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:cl});return p?(0,G.jsx)(Y,{...g(`root`),...h,children:p}):(0,G.jsx)(Y,{...g(`root`),component:d[i],variant:f,size:n,...h})});ll.defaultLoaders=ol,ll.classes=nl,ll.varsResolver=cl,ll.displayName=`@mantine/core/Loader`;var ul={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},dl={orientation:`horizontal`},fl=Mt((e,{borderWidth:t})=>({group:{"--ai-border-width":N(t)}})),pl=J(e=>{let t=K(`ActionIconGroup`,dl,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t,m=q({name:`ActionIconGroup`,props:t,classes:ul,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:fl,rootSelector:`group`});return(0,G.jsx)(Y,{...m(`group`),variant:u,mod:[{orientation:s},d],role:`group`,...p})});pl.classes=ul,pl.varsResolver=fl,pl.displayName=`@mantine/core/ActionIconGroup`;var ml=Mt((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":H(o,`section-height`),"--section-padding-x":H(o,`section-padding-x`),"--section-fz":ce(o),"--section-radius":t===void 0?void 0:U(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),hl=J(e=>{let t=K(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t,m=q({name:`ActionIconGroupSection`,props:t,classes:ul,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:ml,rootSelector:`groupSection`});return(0,G.jsx)(Y,{...m(`groupSection`),variant:c,...p})});hl.classes=ul,hl.varsResolver=ml,hl.displayName=`@mantine/core/ActionIconGroupSection`;var gl=Mt((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":H(t,`ai-size`),"--ai-radius":n===void 0?void 0:U(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),_l=Mr(e=>{let t=K(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=q({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:ul,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:gl});return(0,G.jsxs)(sc,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,G.jsx)(Lc,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,G.jsx)(Y,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(ll,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,G.jsx)(Y,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});_l.classes=ul,_l.varsResolver=gl,_l.displayName=`@mantine/core/ActionIcon`,_l.Group=pl,_l.GroupSection=hl;function vl({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,G.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}vl.displayName=`@mantine/core/CloseIcon`;var yl={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},bl={variant:`subtle`},xl=Mt((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":H(t,`cb-size`),"--cb-radius":n===void 0?void 0:U(n),"--cb-icon-size":N(r)}})),Sl=Mr(e=>{let t=K(`CloseButton`,bl,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=q({name:_||`CloseButton`,props:t,className:o,style:c,classes:yl,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:xl});return(0,G.jsxs)(sc,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,G.jsx)(vl,{}),r]})});Sl.classes=yl,Sl.varsResolver=xl,Sl.displayName=`@mantine/core/CloseButton`;function Cl(e){return C.Children.toArray(e).filter(Boolean)}var wl={root:`m_4081bf90`},Tl={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},El=Mt((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":se(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),X=J(e=>{let t=K(`Group`,Tl,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=Cl(s),x=b.length,S=se(c??`md`),C=q({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:wl,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:El});return(0,G.jsx)(Y,{...C(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});X.classes=wl,X.varsResolver=El,X.displayName=`@mantine/core/Group`;var[Dl,Ol]=R(`ModalBase component was not found in tree`);function kl({opened:e,transitionDuration:t}){let[n,r]=(0,C.useState)(e),i=(0,C.useRef)(-1),a=dt()?0:t;return(0,C.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function Al({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:o,handledEscapeEvents:s}){let c=nt(e),[l,u]=(0,C.useState)(!1),[d,f]=(0,C.useState)(!1),p=kl({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return rt(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&!s?.has(e)&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&(s?.add(e),a())},{capture:!0}),Ae({opened:n,shouldReturnFocus:r&&o}),{_id:c,titleMounted:l,bodyMounted:d,shouldLockScroll:p,setTitleMounted:u,setBodyMounted:f}}var jl=function(){return jl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jl.apply(this,arguments)};function Ml(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Nl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Pl=`right-scroll-bar-position`,Fl=`width-before-scroll-bar`,Il=`with-scroll-bars-hidden`,Ll=`--removed-body-scroll-bar-size`;function Rl(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function zl(e,t){var n=(0,C.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Bl=typeof window<`u`?C.useLayoutEffect:C.useEffect,Vl=new WeakMap;function Hl(e,t){var n=zl(t||null,function(t){return e.forEach(function(e){return Rl(e,t)})});return Bl(function(){var t=Vl.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Rl(e,null)}),i.forEach(function(e){r.has(e)||Rl(e,a)})}Vl.set(n,e)},[e]),n}function Ul(e){return e}function Wl(e,t){t===void 0&&(t=Ul);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Gl(e){e===void 0&&(e={});var t=Wl(null);return t.options=jl({async:!0,ssr:!1},e),t}var Kl=function(e){var t=e.sideCar,n=Ml(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return C.createElement(r,jl({},n))};Kl.isSideCarExport=!0;function ql(e,t){return e.useMedium(t),Kl}var Jl=Gl(),Yl=function(){},Xl=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:Yl,onWheelCapture:Yl,onTouchMoveCapture:Yl}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Ml(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Hl([n,t]),w=jl(jl({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:Jl,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(s),jl(jl({},w),{ref:S})):C.createElement(v,jl({},w,{className:c,ref:S}),s))});Xl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Xl.classNames={fullWidth:Fl,zeroRight:Pl};var Zl=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Ql(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Zl();return t&&e.setAttribute(`nonce`,t),e}function $l(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eu(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var tu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ql())&&($l(t,n),eu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nu=function(){var e=tu();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ru=function(){var e=nu();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},iu={left:0,top:0,right:0,gap:0},au=function(e){return parseInt(e||``,10)||0},ou=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[au(n),au(r),au(i)]},su=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return iu;var t=ou(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},cu=ru(),lu=`data-scroll-locked`,uu=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
3
|
-
.${Il} {
|
|
4
|
-
overflow: hidden ${r};
|
|
5
|
-
padding-right: ${s}px ${r};
|
|
6
|
-
}
|
|
7
|
-
body[${lu}] {
|
|
8
|
-
overflow: hidden ${r};
|
|
9
|
-
overscroll-behavior: contain;
|
|
10
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
11
|
-
padding-left: ${i}px;
|
|
12
|
-
padding-top: ${a}px;
|
|
13
|
-
padding-right: ${o}px;
|
|
14
|
-
margin-left:0;
|
|
15
|
-
margin-top:0;
|
|
16
|
-
margin-right: ${s}px ${r};
|
|
17
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.${Pl} {
|
|
21
|
-
right: ${s}px ${r};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.${Fl} {
|
|
25
|
-
margin-right: ${s}px ${r};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.${Pl} .${Pl} {
|
|
29
|
-
right: 0 ${r};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.${Fl} .${Fl} {
|
|
33
|
-
margin-right: 0 ${r};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
body[${lu}] {
|
|
37
|
-
${Ll}: ${s}px;
|
|
38
|
-
}
|
|
39
|
-
`},du=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},fu=function(){C.useEffect(function(){return document.body.setAttribute(lu,(du()+1).toString()),function(){var e=du()-1;e<=0?document.body.removeAttribute(lu):document.body.setAttribute(lu,e.toString())}},[])},pu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;fu();var a=C.useMemo(function(){return su(i)},[i]);return C.createElement(cu,{styles:uu(a,!t,i,n?``:`!important`)})},mu=!1;if(typeof window<`u`)try{var hu=Object.defineProperty({},"passive",{get:function(){return mu=!0,!0}});window.addEventListener(`test`,hu,hu),window.removeEventListener(`test`,hu,hu)}catch{mu=!1}var gu=mu?{passive:!1}:!1,_u=function(e){return e.tagName===`TEXTAREA`},vu=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!_u(e)&&n[t]===`visible`)},yu=function(e){return vu(e,`overflowY`)},bu=function(e){return vu(e,`overflowX`)},xu=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),wu(e,r)){var i=Tu(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Su=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Cu=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},wu=function(e,t){return e===`v`?yu(t):bu(t)},Tu=function(e,t){return e===`v`?Su(t):Cu(t)},Eu=function(e,t){return e===`h`&&t===`rtl`?-1:1},Du=function(e,t,n,r,i){var a=Eu(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Tu(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&wu(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ou=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ku=function(e){return[e.deltaX,e.deltaY]},Au=function(e){return e&&`current`in e?e.current:e},ju=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Mu=function(e){return`
|
|
40
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
41
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
42
|
-
`},Nu=0,Pu=[];function Fu(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(Nu++)[0],a=C.useState(ru)[0],o=C.useRef(e);C.useEffect(function(){o.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Nl([e.lockRef.current],(e.shards||[]).map(Au),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ou(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=xu(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=xu(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Du(h,t,e,h===`h`?s:c,!0)},[]),c=C.useCallback(function(e){var n=e;if(Pu.length&&Pu[Pu.length-1]===a){var r=`deltaY`in n?ku(n):Ou(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ju(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(Au).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=C.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Iu(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=C.useCallback(function(e){n.current=Ou(e),r.current=void 0},[]),d=C.useCallback(function(t){l(t.type,ku(t),t.target,s(t,e.lockRef.current))},[]),f=C.useCallback(function(t){l(t.type,Ou(t),t.target,s(t,e.lockRef.current))},[]);C.useEffect(function(){return Pu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,gu),document.addEventListener(`touchmove`,c,gu),document.addEventListener(`touchstart`,u,gu),function(){Pu=Pu.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,gu),document.removeEventListener(`touchmove`,c,gu),document.removeEventListener(`touchstart`,u,gu)}},[]);var p=e.removeScrollBar,m=e.inert;return C.createElement(C.Fragment,null,m?C.createElement(a,{styles:Mu(i)}):null,p?C.createElement(pu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Iu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Lu=ql(Jl,Fu),Ru=C.forwardRef(function(e,t){return C.createElement(Xl,jl({},e,{ref:t,sideCar:Lu}))});Ru.classNames=Xl.classNames;function zu({keepMounted:e,keepMountedMode:t=`activity`,opened:n,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:o,onEnterTransitionEnd:s,trapFocus:c,closeOnEscape:l,returnFocus:u,closeOnClickOutside:d,withinPortal:f,portalProps:p,lockScroll:m,children:h,zIndex:g,shadow:_,padding:v,__vars:y,unstyled:b,removeScrollProps:x,__handledEscapeEvents:S,...C}){let{_id:w,titleMounted:T,bodyMounted:E,shouldLockScroll:D,setTitleMounted:O,setBodyMounted:k}=Al({id:i,transitionProps:a,opened:n,trapFocus:c,closeOnEscape:l,onClose:r,returnFocus:u,handledEscapeEvents:S}),{key:A,...j}=x||{};return(0,G.jsx)(jc,{...p,withinPortal:f,children:(0,G.jsx)(Dl,{value:{opened:n,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:o,onEnterTransitionEnd:s,transitionProps:{...a,keepMounted:e,keepMountedMode:t},getTitleId:()=>`${w}-title`,getBodyId:()=>`${w}-body`,titleMounted:T,bodyMounted:E,setTitleMounted:O,setBodyMounted:k,trapFocus:c,closeOnEscape:l,zIndex:g,unstyled:b},children:(0,G.jsx)(Ru,{enabled:D&&m,...j,children:(0,G.jsx)(Y,{...C,id:w,__vars:{...y,"--mb-z-index":(g||ie(`modal`)).toString(),"--mb-shadow":le(_),"--mb-padding":se(v)},children:h})},A)})})}zu.displayName=`@mantine/core/ModalBase`;function Bu(){let e=Ol();return(0,C.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Vu={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function Hu({className:e,...t}){let n=Bu(),r=Ol();return(0,G.jsx)(Y,{id:n,className:Pt({[Vu.body]:!r.unstyled},e),...t})}Hu.displayName=`@mantine/core/ModalBaseBody`;function Uu({className:e,onClick:t,...n}){let r=Ol();return(0,G.jsx)(Sl,{...n,onClick:e=>{r.onClose(),t?.(e)},className:Pt({[Vu.close]:!r.unstyled},e),unstyled:r.unstyled})}Uu.displayName=`@mantine/core/ModalBaseCloseButton`;function Wu({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...o}){let s=Ol();return(0,G.jsx)(Lc,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,G.jsx)(`div`,{...n,className:Pt({[Vu.inner]:!s.unstyled},n.className),children:(0,G.jsx)(Wc,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,G.jsx)(fc,{...o,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:Pt({[Vu.content]:!s.unstyled},t),unstyled:s.unstyled,children:o.children})})})})}Wu.displayName=`@mantine/core/ModalBaseContent`;function Gu({className:e,...t}){let n=Ol();return(0,G.jsx)(Y,{component:`header`,className:Pt({[Vu.header]:!n.unstyled},e),...t})}Gu.displayName=`@mantine/core/ModalBaseHeader`;var Ku={duration:200,timingFunction:`ease`,transition:`fade`};function qu(e){let t=Ol();return{...Ku,...t.transitionProps,...e}}function Ju({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=Ol(),o=qu(t);return(0,G.jsx)(Lc,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,G.jsx)(Tc,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}Ju.displayName=`@mantine/core/ModalBaseOverlay`;function Yu(){let e=Ol();return(0,C.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function Xu({className:e,...t}){let n=Yu(),r=Ol();return(0,G.jsx)(Y,{component:`h2`,className:Pt({[Vu.title]:!r.unstyled},e),id:n,...t})}Xu.displayName=`@mantine/core/ModalBaseTitle`;function Zu({children:e}){return(0,G.jsx)(G.Fragment,{children:e})}var Qu=(0,C.createContext)({size:`sm`}),$u=J(e=>{let t=K(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,C.use)(Qu),{resolvedClassNames:l,resolvedStyles:u}=Fn({classNames:a,styles:o,props:t});return(0,G.jsx)(Sl,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});$u.displayName=`@mantine/core/InputClearButton`;var ed={xs:7,sm:8,md:10,lg:12,xl:15};function td({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,G.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:ed[i]},children:[o,n||r]}):n===null?null:n||o||r}var nd=(0,C.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),rd={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,bottomSection:`m_93f4ed57`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,success:`m_9d9d40e0`,description:`m_fe47ce59`},id=Mt((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${ce(t)} - ${N(2)})`}})),ad=J(e=>{let t=K(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=K(`InputDescription`,null,t),f=(0,C.use)(nd),p=q({name:[`InputWrapper`,c],props:t,classes:rd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:id}),m=l&&f?.getStyles||p;return(0,G.jsx)(Y,{component:`p`,...m(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});ad.classes=rd,ad.varsResolver=id,ad.displayName=`@mantine/core/InputDescription`;var od=Mt((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${ce(t)} - ${N(2)})`}})),sd=J(e=>{let t=K(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=q({name:[`InputWrapper`,l],props:t,classes:rd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:od}),p=(0,C.use)(nd),m=u&&p?.getStyles||f;return(0,G.jsx)(Y,{component:`p`,...m(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});sd.classes=rd,sd.varsResolver=od,sd.displayName=`@mantine/core/InputError`;var cd={labelElement:`label`},ld=Mt((e,{size:t})=>({label:{"--input-label-size":ce(t),"--input-asterisk-color":void 0}})),ud=J(e=>{let t=K(`InputLabel`,cd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=q({name:[`InputWrapper`,p],props:t,classes:rd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:ld}),v=(0,C.use)(nd),y=v?.getStyles||_,b=g.component||c,x=typeof b!=`string`||b===`label`;return(0,G.jsxs)(Y,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:x?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,G.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});ud.classes=rd,ud.varsResolver=ld,ud.displayName=`@mantine/core/InputLabel`;var dd=J(e=>{let t=K(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t,p=q({name:[`InputPlaceholder`,c],props:t,classes:rd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`});return(0,G.jsx)(Y,{...p(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});dd.classes=rd,dd.displayName=`@mantine/core/InputPlaceholder`;var fd=Mt((e,{size:t})=>({success:{"--input-success-size":t===void 0?void 0:`calc(${ce(t)} - ${N(2)})`}})),pd=J(e=>{let t=K(`InputSuccess`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=q({name:[`InputWrapper`,l],props:t,classes:rd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`success`,vars:s,varsResolver:fd}),p=(0,C.use)(nd),m=u&&p?.getStyles||f;return(0,G.jsx)(Y,{component:`p`,...m(`success`,p?.getStyles?{className:r,style:i}:void 0),...d})});pd.classes=rd,pd.varsResolver=fd,pd.displayName=`@mantine/core/InputSuccess`;function md(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var hd={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},gd=Mt((e,{size:t})=>({label:{"--input-label-size":ce(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${ce(t)} - ${N(2)})`},success:{"--input-success-size":t===void 0?void 0:`calc(${ce(t)} - ${N(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${ce(t)} - ${N(2)})`}})),_d=J(e=>{let t=K(`InputWrapper`,hd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,success:h,description:g,labelProps:_,descriptionProps:v,errorProps:y,successProps:b,labelElement:x,children:S,withAsterisk:w,id:T,required:E,__stylesApiProps:D,mod:O,attributes:k,...A}=t,j=q({name:[`InputWrapper`,u],props:D||t,classes:rd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:s,varsResolver:gd}),M={size:c,variant:l,__staticSelector:u},N=nt(T),P=typeof w==`boolean`?w:E,F=y?.id||`${N}-error`,I=b?.id||`${N}-success`,L=v?.id||`${N}-description`,R=N,z=!!m&&typeof m!=`boolean`,B=!!h&&typeof h!=`boolean`&&!m,ee=!!g,te=z&&f.includes(`error`),ne=B&&f.includes(`error`),V=ee&&f.includes(`description`),re=`${te?F:``} ${ne?I:``} ${V?L:``}`,ie=re.trim().length>0?re.trim():void 0,ae=_?.id||`${N}-label`,oe=p&&(0,G.jsx)(ud,{labelElement:x,id:ae,htmlFor:R,required:P,...M,..._,children:p},`label`),H=ee&&(0,G.jsx)(ad,{...v,...M,size:v?.size||M.size,id:v?.id||L,children:g},`description`),se=(0,G.jsx)(C.Fragment,{children:d(S)},`input`),U=z&&(0,C.createElement)(sd,{...y,...M,size:y?.size||M.size,key:`error`,id:y?.id||F},m),ce=B&&(0,C.createElement)(pd,{...b,...M,size:b?.size||M.size,key:`success`,id:b?.id||I},h),W=f.map(e=>{switch(e){case`label`:return oe;case`input`:return se;case`description`:return H;case`error`:return U||ce;default:return null}});return(0,G.jsx)(nd,{value:{getStyles:j,describedBy:ie,inputId:R,labelId:oe&&f.includes(`label`)?ae:void 0,...md(f,{hasDescription:ee,hasError:z||B})},children:(0,G.jsx)(Y,{variant:l,size:c,mod:[{error:!!m,success:!!h&&!m},O],id:x===`label`?void 0:T,...j(`root`),...A,children:W})})});_d.classes=rd,_d.varsResolver=gd,_d.displayName=`@mantine/core/InputWrapper`;var vd={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,withSuccessStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},yd=Mt((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":H(t.size,`input-height`),"--input-fz":ce(t.size),"--input-radius":t.radius===void 0?void 0:U(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:N(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:N(t.rightSectionWidth),"--input-padding-y":t.multiline?H(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),bd=Mr(e=>{let t=K(`Input`,vd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,success:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:y,rightSectionWidth:b,rightSectionPointerEvents:x,leftSectionPointerEvents:S,variant:w,vars:T,pointer:E,multiline:D,radius:O,id:k,withAria:A,withErrorStyles:j,withSuccessStyles:M,mod:N,inputSize:P,attributes:F,__clearSection:I,__clearable:L,__clearSectionMode:R,__defaultRightSection:z,loading:B,loadingPosition:ee,__bottomSection:te,__bottomSectionProps:ne,rootRef:V,dir:re,...ie}=t,{styleProps:ae,rest:oe}=rr(ie),H=(0,C.use)(nd),se={offsetBottom:H?.offsetBottom,offsetTop:H?.offsetTop},U=q({name:[`Input`,c],props:l||t,classes:rd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:F,stylesCtx:se,rootSelector:`wrapper`,vars:T,varsResolver:yd}),ce=A?{required:s,disabled:m,"aria-invalid":f?!0:void 0,"aria-describedby":H?.describedBy,id:H?.inputId||k}:{},W=B?(0,G.jsx)(ll,{size:ee===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,le=B&&ee===`left`?W:h,ue=td({__clearable:L,__clearSection:I,rightSection:B&&ee===`right`?W:v,__defaultRightSection:z,size:u,__clearSectionMode:R});return(0,G.jsx)(Qu,{value:{size:u||`sm`},children:(0,G.jsxs)(Y,{ref:V,dir:re,...U(`wrapper`),...ae,...d,mod:[{error:!!f&&j,success:!!p&&!f&&M,pointer:E,disabled:m,multiline:D,withRightSection:!!ue,withLeftSection:!!le,withBottomSection:!!te},N],variant:w,size:u,children:[le&&(0,G.jsx)(`div`,{...g,"data-position":`left`,...U(`section`,{className:g?.className,style:g?.style}),children:le}),(0,G.jsx)(Y,{component:`input`,...oe,...ce,required:s,mod:{disabled:m,error:!!f&&j,success:!!p&&!f&&M},variant:w,__size:P,...U(`input`)}),te&&(0,G.jsx)(`div`,{...ne,...U(`bottomSection`,{className:ne?.className,style:ne?.style}),children:te}),ue&&(0,G.jsx)(`div`,{...y,"data-position":`right`,...U(`section`,{className:y?.className,style:y?.style}),children:ue})]})})});bd.classes=rd,bd.varsResolver=yd,bd.Wrapper=_d,bd.Label=ud,bd.Error=sd,bd.Success=pd,bd.Description=ad,bd.Placeholder=dd,bd.ClearButton=$u,bd.displayName=`@mantine/core/Input`;function xd(e,t,n){let r=K([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,success:s,required:c,classNames:l,styles:u,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,wrapperProps:y,id:b,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,vars:D,mod:O,attributes:k,...A}=r,{styleProps:j,rest:M}=rr(A),N={label:i,description:a,error:o,success:s,required:c,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,unstyled:f,styles:u,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,id:b,mod:O,attributes:k,...y};return{...M,classNames:l,styles:u,unstyled:f,wrapperProps:{...N,...j},inputProps:{required:c,classNames:l,styles:u,unstyled:f,size:x,__staticSelector:p,__stylesApiProps:m||r,error:o,success:s,variant:E,id:b,attributes:k}}}var Sd={__staticSelector:`InputBase`,withAria:!0,size:`sm`},Cd=Mr(e=>{let{inputProps:t,wrapperProps:n,...r}=xd(`InputBase`,Sd,e);return(0,G.jsx)(bd.Wrapper,{...n,children:(0,G.jsx)(bd,{...t,...r})})});Cd.classes={...bd.classes,...bd.Wrapper.classes},Cd.displayName=`@mantine/core/InputBase`;function wd(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function Td({target:e,parent:t,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:a}){let o=(0,C.useRef)(-1),s=(0,C.useRef)(e),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(typeof r==`boolean`&&r),f=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetWidth===0?1:i.width/t.offsetWidth,o=t.offsetHeight===0?1:i.height/t.offsetHeight,s=window.getComputedStyle(e),c=window.getComputedStyle(t),l=ti(s.borderTopWidth)+ti(c.borderTopWidth),u=ti(s.borderLeftWidth)+ti(c.borderLeftWidth),d={top:(r.top-i.top)/o-l,left:(r.left-i.left)/a-u,width:r.width/a,height:r.height/o};n.current.style.transform=`translateY(${d.top}px) translateX(${d.left}px)`,n.current.style.width=`${d.width}px`,n.current.style.height=`${d.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,C.useRef)(null),h=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,C.useEffect)(()=>{if(t){let e=e=>{wd(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,C.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),ht(()=>{Tt()!==`test`&&l(!0)},20,{autoInvoke:!0}),_t(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var Ed={root:`m_96b553a6`},Dd=Mt((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),Od=J(e=>{let t=K(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,target:c,parent:l,transitionDuration:u,mod:d,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m,attributes:h,ref:g,..._}=t,v=q({name:`FloatingIndicator`,classes:Ed,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Dd,stylesCtx:{shouldReduceMotion:dt()}}),y=(0,C.useRef)(null),{initialized:b,hidden:x}=Td({target:c,parent:l,ref:y,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m}),S=ot(g,y);return!c||!l?null:(0,G.jsx)(Y,{ref:S,mod:[{initialized:b,hidden:x},d],...v(`root`),..._})});Od.displayName=`@mantine/core/FloatingIndicator`,Od.classes=Ed,Od.varsResolver=Dd;function kd({style:e,size:t=16,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:N(t),height:N(t),display:`block`},...n,children:(0,G.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}kd.displayName=`@mantine/core/AccordionChevron`;var Ad={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},jd=Mt((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:U(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),Md=J(e=>{let t=K(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=q({name:`Alert`,classes:Ad,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:jd}),C=nt(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(Y,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(Sl,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});Md.classes=Ad,Md.varsResolver=jd,Md.displayName=`@mantine/core/Alert`;var Nd={root:`m_b6d8b162`};function Pd(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var Fd={inherit:!1},Id=Mt((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":ce(i),"--text-lh":W(i),"--text-gradient":t===`gradient`?$t(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),Z=Mr(e=>{let t=K(`Text`,Fd,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t,x=q({name:[`Text`,l],props:t,classes:Nd,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:Id});return(0,G.jsx)(Y,{...x(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{truncate:Pd(r),lineClamp:typeof n==`number`,inline:i,inherit:a},_],size:v,...b})});Z.classes=Nd,Z.varsResolver=Id,Z.displayName=`@mantine/core/Text`;var Ld={root:`m_849cf0da`},Rd={underline:`hover`},zd=Mr(e=>{let{underline:t,className:n,unstyled:r,mod:i,...a}=K(`Anchor`,Rd,e);return(0,G.jsx)(Z,{component:`a`,className:Pt({[Ld.root]:!r},n),...a,mod:[{underline:t},i],__staticSelector:`Anchor`,unstyled:r})});zd.classes=Ld,zd.displayName=`@mantine/core/Anchor`;function Bd(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>Bd(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function Vd(e){return e?e.map(e=>Bd(e)):[]}function Hd(e){return e.reduce((e,t)=>`group`in t?{...e,...Hd(t.items)}:(e[`${t.value}`]=t,e),{})}var Ud={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},Wd={error:null},Gd=Mt((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":H(t,`combobox-chevron-size`),"--combobox-chevron-color":n?Xt(n,e):void 0}})),Kd=J(e=>{let t=K(`ComboboxChevron`,Wd,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=q({name:`ComboboxChevron`,classes:Ud,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:Gd,attributes:u,rootSelector:`chevron`});return(0,G.jsx)(Y,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,G.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});Kd.classes=Ud,Kd.varsResolver=Gd,Kd.displayName=`@mantine/core/ComboboxChevron`;var[qd,Jd]=R(`Combobox component was not found in tree`);function Yd({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,G.jsx)(bd.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}Yd.displayName=`@mantine/core/ComboboxClearButton`;var Xd=J(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=K(`ComboboxDropdown`,null,e),s=Jd();return(0,G.jsx)(tl.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});Xd.classes=Ud,Xd.displayName=`@mantine/core/ComboboxDropdown`;var Zd={refProp:`ref`},Qd=J(e=>{let{children:t,refProp:n,ref:r}=K(`ComboboxDropdownTarget`,Zd,e);if(Jd(),!L(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,G.jsx)(tl.Target,{ref:r,refProp:n,children:t})});Qd.displayName=`@mantine/core/ComboboxDropdownTarget`;var $d=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxEmpty`,null,e),s=Jd();return(0,G.jsx)(Y,{...s.getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});$d.classes=Ud,$d.displayName=`@mantine/core/ComboboxEmpty`;function ef({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=Jd(),[c,l]=(0,C.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var tf={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},nf=J(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=K(`ComboboxEventsTarget`,tf,e),u=jt(t);if(!u)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=Jd(),f=ef({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s});return(0,C.cloneElement)(u,{...f,...l,[n]:ot(c,d.store.targetRef,Et(u))})});nf.displayName=`@mantine/core/ComboboxEventsTarget`;var rf=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxFooter`,null,e),s=Jd();return(0,G.jsx)(Y,{...s.getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});rf.classes=Ud,rf.displayName=`@mantine/core/ComboboxFooter`;var af=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=K(`ComboboxGroup`,null,e),u=Jd(),d=nt(c),f=s!=null&&s!==!1&&s!==``;return(0,G.jsxs)(Y,{role:`group`,"aria-labelledby":f?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[f&&(0,G.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});af.classes=Ud,af.displayName=`@mantine/core/ComboboxGroup`;var of=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxHeader`,null,e),s=Jd();return(0,G.jsx)(Y,{...s.getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});of.classes=Ud,of.displayName=`@mantine/core/ComboboxHeader`;function sf({value:e,valuesDivider:t=`,`,...n}){return(0,G.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}sf.displayName=`@mantine/core/ComboboxHiddenInput`;var cf=J(e=>{let t=K(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=Jd(),_=(0,C.useId)(),v=c||_;return(0,G.jsx)(Y,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),"aria-disabled":f||void 0,...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});cf.classes=Ud,cf.displayName=`@mantine/core/ComboboxOption`;var lf=J(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=K(`ComboboxOptions`,null,e),l=Jd(),u=nt(a);return(0,C.useEffect)(()=>{l.store.setListId(u)},[u]),(0,G.jsx)(Y,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});lf.classes=Ud,lf.displayName=`@mantine/core/ComboboxOptions`;var uf={withAriaAttributes:!0,withKeyboardNavigation:!0},df=J(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:u,...d}=K(`ComboboxSearch`,uf,e),f=Jd(),p=f.getStyles(`search`),m=ef({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,G.jsx)(bd,{ref:ot(u,f.store.searchRef),classNames:[{input:p.className},t],styles:[{input:p.style},n],size:l||f.size,...m,...d,__staticSelector:`Combobox`})});df.classes=Ud,df.displayName=`@mantine/core/ComboboxSearch`;var ff={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},pf=J(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=K(`ComboboxTarget`,ff,e),u=jt(t);if(!u)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=Jd(),f=ef({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),p=(0,C.cloneElement)(u,{...f,...l});return(0,G.jsx)(tl.Target,{refProp:n,ref:ot(c,d.store.targetRef),children:p})});pf.displayName=`@mantine/core/ComboboxTarget`;function mf(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function hf(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function gf(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function _f({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=st({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,C.useRef)(null),u=(0,C.useRef)(-1),d=(0,C.useRef)(null),f=(0,C.useRef)(null),p=(0,C.useRef)(-1),m=(0,C.useRef)(-1),h=(0,C.useRef)(-1),g=(0,C.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,C.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,C.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,C.useCallback)(()=>{let e=At(f.current);Ot(`#${l.current} [data-combobox-selected]`,e)?.removeAttribute(`data-combobox-selected`)},[]),b=(0,C.useCallback)(e=>{let t=At(f.current),n=Ot(`#${l.current}`,t),r=n?kt(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,C.useCallback)(()=>{let e=At(f.current),t=Ot(`#${l.current} [data-combobox-active]`,e);if(t){let n=kt(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,C.useCallback)(()=>{let e=At(f.current),t=kt(`#${l.current} [data-combobox-option]`,e);return b(hf(u.current,t,a))},[b,a]),w=(0,C.useCallback)(()=>{let e=At(f.current),t=kt(`#${l.current} [data-combobox-option]`,e);return b(mf(u.current,t,a))},[b,a]),T=(0,C.useCallback)(()=>{let e=At(f.current),t=kt(`#${l.current} [data-combobox-option]`,e);return b(gf(t))},[b]),E=(0,C.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=At(f.current),r=kt(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o})}else h.current=window.setTimeout(()=>{let n=At(f.current),r=kt(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),D=(0,C.useCallback)(()=>{u.current=-1,y()},[y]),O=(0,C.useCallback)(()=>{let e=At(f.current);(kt(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),k=(0,C.useCallback)(e=>{l.current=e},[]),A=(0,C.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),j=(0,C.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),M=(0,C.useCallback)(()=>u.current,[]);return(0,C.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:M,selectOption:b,selectFirstOption:T,selectActiveOption:x,selectNextOption:S,selectPreviousOption:w,resetSelectedOption:D,updateSelectedOptionIndex:E,listId:l.current,setListId:k,clickSelectedOption:O,searchRef:d,focusSearchInput:A,targetRef:f,focusTarget:j}}var vf={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},yf=Mt((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":ce(t),"--combobox-option-padding":H(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:N(n),"--combobox-option-fz":ce(t),"--combobox-option-padding":H(t,`combobox-option-padding`)}})),bf=e=>{let t=K(`Combobox`,vf,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,floatingHeight:g,middlewares:_,...v}=t,y=g===`viewport`?{..._,flip:!1,size:{...typeof _?.size==`object`?_.size:{},padding:typeof _?.size==`object`&&_.size.padding!==void 0?_.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=_?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:_,b=_f(),x=o||b,S=q({name:p||`Combobox`,classes:Ud,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:yf}),C=()=>{l?.(),x.closeDropdown()};return(0,G.jsx)(qd,{value:{getStyles:S,store:x,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m,floatingHeight:g},children:(0,G.jsx)(tl,{opened:x.dropdownOpened,...v,middlewares:y,onChange:e=>!e&&C(),withRoles:!1,unstyled:i,children:a})})};bf.extend=e=>e,bf.classes=Ud,bf.varsResolver=yf,bf.displayName=`@mantine/core/Combobox`,bf.Target=pf,bf.Dropdown=Xd,bf.Options=lf,bf.Option=cf,bf.Search=df,bf.Empty=$d,bf.Chevron=Kd,bf.Footer=rf,bf.Header=of,bf.EventsTarget=nf,bf.DropdownTarget=Qd,bf.Group=af,bf.ClearButton=Yd,bf.HiddenInput=sf;function xf({children:e,role:t}){let n=(0,C.use)(nd);return n?(0,G.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,G.jsx)(G.Fragment,{children:e})}var Sf=(0,C.createContext)(null),Cf={hiddenInputValuesSeparator:`,`},wf=jr((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=K(`CheckboxGroup`,Cf,e),[m,h]=st({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=typeof e==`string`?e:e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,G.jsx)(Sf,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,G.jsxs)(bd.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`CheckboxGroup`,children:[(0,G.jsx)(xf,{role:`group`,children:o}),(0,G.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));wf.classes=bd.Wrapper.classes,wf.displayName=`@mantine/core/CheckboxGroup`;var Tf={card:`m_26775b0a`},Ef=(0,C.createContext)(null),Df={withBorder:!0},Of=Mt((e,{radius:t})=>({card:{"--card-radius":U(t)}})),kf=J(e=>{let t=K(`CheckboxCard`,Df,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,checked:c,mod:l,withBorder:u,value:d,onClick:f,defaultChecked:p,onChange:m,indeterminate:h,attributes:g,..._}=t,v=q({name:`CheckboxCard`,classes:Tf,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s,varsResolver:Of,rootSelector:`card`}),y=(0,C.use)(Sf),[b,x]=st({value:typeof c==`boolean`?c:y?y.value.includes(d||``):void 0,defaultValue:p,finalValue:!1,onChange:m});return(0,G.jsx)(Ef,{value:{checked:b,indeterminate:h},children:(0,G.jsx)(sc,{mod:[{"with-border":u,checked:b,indeterminate:h},l],...v(`card`),..._,role:`checkbox`,"aria-checked":h?`mixed`:b,onClick:e=>{f?.(e),y?.onChange(d||``),x(!b)}})})});kf.displayName=`@mantine/core/CheckboxCard`,kf.classes=Tf,kf.varsResolver=Of;function Af({size:e,style:t,...n}){let r=e===void 0?t:{width:N(e),height:N(e),...t};return(0,G.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:r,"aria-hidden":!0,...n,children:(0,G.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function jf({indeterminate:e,...t}){return e?(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 32 6`,"aria-hidden":!0,...t,children:(0,G.jsx)(`rect`,{width:`32`,height:`6`,fill:`currentColor`,rx:`3`})}):(0,G.jsx)(Af,{...t})}var Mf={indicator:`m_5e5256ee`,icon:`m_1b1c543a`,"indicator--light":`m_193e54c8`,"indicator--outline":`m_76e20374`},Nf={icon:jf,variant:`filled`,radius:`sm`},Pf=Mt((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=Yt({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:Xt(n,e);return{indicator:{"--checkbox-size":H(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:U(t),"--checkbox-color":u,"--checkbox-bg":l?.background,"--checkbox-icon-color":i?Xt(i,e):l?l.color:sn(o,e)?rn({color:n,theme:e,autoContrast:o}):void 0}}}),Ff=J(e=>{let t=K(`CheckboxIndicator`,Nf,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,icon:c,indeterminate:l,radius:u,color:d,iconColor:f,autoContrast:p,checked:m,mod:h,variant:g,disabled:_,attributes:v,...y}=t,b=q({name:`CheckboxIndicator`,classes:Mf,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:Pf,rootSelector:`indicator`}),x=(0,C.use)(Ef),S=typeof l==`boolean`?l:x?.indeterminate,w=typeof m==`boolean`||typeof l==`boolean`?m||l:x?.checked||x?.indeterminate||!1;return(0,G.jsx)(Y,{...b(`indicator`,{variant:g}),variant:g,mod:[{checked:w,disabled:_},h],...y,children:(0,G.jsx)(c,{indeterminate:S,...b(`icon`)})})});Ff.displayName=`@mantine/core/CheckboxIndicator`,Ff.classes=Mf,Ff.varsResolver=Pf;var If={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},Lf=If;function Rf({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x}){let S=q({name:e,props:t,className:n,style:_,classes:If,classNames:r,styles:i,unstyled:a,attributes:b}),C=c?`${l}-description`:void 0,w=d&&typeof d!=`boolean`?`${l}-error`:void 0;return(0,G.jsx)(Y,{...S(`root`),__vars:{"--label-fz":ce(f),"--label-lh":H(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,G.jsxs)(Y,{component:m,htmlFor:m===`label`?l:void 0,...S(`body`),children:[o,(0,G.jsxs)(`div`,{...S(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,G.jsx)(Y,{component:h,htmlFor:h===`label`?l:void 0,...S(`label`),"data-disabled":u||void 0,children:s}),c&&(0,G.jsx)(bd.Description,{id:C,size:f,__inheritStyles:!1,...S(`description`),children:c}),d&&typeof d!=`boolean`&&(0,G.jsx)(bd.Error,{id:w,size:f,__inheritStyles:!1,...S(`error`),children:d})]})]})})}Rf.displayName=`@mantine/core/InlineInput`;var zf={root:`m_bf2d988c`,inner:`m_26062bec`,input:`m_26063560`,icon:`m_bf295423`,"input--light":`m_595ab216`,"input--outline":`m_215c4542`},Bf={labelPosition:`right`,icon:jf,withErrorStyles:!0,variant:`filled`,radius:`sm`},Vf=Mt((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=Yt({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:Xt(n,e);return{root:{"--checkbox-size":H(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:U(t),"--checkbox-color":u,"--checkbox-bg":l?.background,"--checkbox-icon-color":i?Xt(i,e):l?l.color:sn(o,e)?rn({color:n,theme:e,autoContrast:o}):void 0}}}),Hf=J(e=>{let t=K(`Checkbox`,Bf,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,id:u,size:d,radius:f,wrapperProps:p,checked:m,labelPosition:h,description:g,error:_,disabled:v,variant:y,indeterminate:b,icon:x,rootRef:S,iconColor:w,onChange:T,autoContrast:E,mod:D,attributes:O,readOnly:k,onClick:A,withErrorStyles:j,ref:M,...N}=t,P=(0,C.useRef)(null),F=(0,C.use)(Sf),I=d||F?.size,L=q({name:`Checkbox`,props:t,classes:zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:O,vars:s,varsResolver:Vf}),{styleProps:R,rest:z}=rr(N),B=nt(u),ee=[g?`${B}-description`:void 0,_&&typeof _!=`boolean`?`${B}-error`:void 0,z[`aria-describedby`]].filter(Boolean).join(` `)||void 0,te={checked:F?.value.includes(z.value)??m,onChange:e=>{k||(F?.onChange(e),T?.(e))}},ne=F?.isDisabled?.(z.value)??!1,V=v||ne;return(0,C.useEffect)(()=>{P.current&&(P.current.indeterminate=b||!1,b?P.current.setAttribute(`data-indeterminate`,`true`):P.current.removeAttribute(`data-indeterminate`))},[b]),(0,G.jsx)(Rf,{...L(`root`),__staticSelector:`Checkbox`,__stylesApiProps:t,id:B,size:I,labelPosition:h,label:l,description:g,error:_,disabled:V,classNames:n,styles:a,unstyled:o,"data-checked":te.checked||m||void 0,variant:y,ref:S,mod:D,attributes:O,inert:z.inert,...R,...p,children:(0,G.jsxs)(Y,{...L(`inner`),mod:{labelPosition:h},children:[(0,G.jsx)(Y,{component:`input`,id:B,ref:ot(P,M),mod:{error:!!_,"with-error-styles":j},...L(`input`,{focusable:!0,variant:y}),...z,...te,"aria-describedby":ee,disabled:V,inert:z.inert,type:`checkbox`,onClick:e=>{k&&te.checked===void 0&&e.preventDefault(),A?.(e)}}),(0,G.jsx)(x,{indeterminate:b,...L(`icon`)})]})})});Hf.classes={...zf,...Lf},Hf.varsResolver=Vf,Hf.displayName=`@mantine/core/Checkbox`,Hf.Group=wf,Hf.Indicator=Ff,Hf.Card=kf;function Uf(e){return`group`in e}function Wf({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;Uf(o)&&i.push({group:o.group,items:Wf({options:o.items,search:t,limit:n-i.length})}),Uf(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function Gf(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function Kf(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Uf(n))Kf(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function qf(e,t){return Array.isArray(e)?e.includes(t):e===t}function Jf({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Uf(e)){let s=qf(r,e.value),c=t&&(s?(0,G.jsx)(Af,{className:Ud.optionsDropdownCheckIcon}):n?(0,G.jsx)(`div`,{className:Ud.optionsDropdownCheckPlaceholder}):null),l=(0,G.jsxs)(G.Fragment,{children:[i===`left`&&c,(0,G.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,G.jsx)(bf.Option,{value:e.value,disabled:e.disabled,className:Pt({[Ud.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,G.jsx)(Jf,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,G.jsx)(bf.Group,{label:e.group,children:s})}function Yf({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=Jd();Kf(e);let x=typeof i==`string`?(r||Wf)({options:e,search:l?i:``,limit:a??1/0}):e,S=Gf(x),C=x.map((e,t)=>(0,G.jsx)(Jf,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},Uf(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,G.jsx)(bf.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,G.jsxs)(bf.Options,{labelledBy:g,"aria-label":y,children:[c?(0,G.jsx)(rc.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,G.jsx)(bf.Empty,{children:m})]})})}function Xf(e,t,n,r){if(t===n||r===`before`&&n===t+1||r===`after`&&n===t-1)return e;let i=e.slice(),[a]=i.splice(t,1),o=t<n?n-1:n;return r===`after`&&(o+=1),i.splice(o,0,a),i}var Zf=e=>{let t=e.lastElementChild;return t?t instanceof HTMLInputElement?t:t.querySelector(`input`):null},Qf=(e,t)=>{if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0};function $f({value:e,onChange:t,enabled:n}){let r=(0,C.useRef)({draggedIndex:null,currentDropTarget:null}),i=(0,C.useRef)(null),a=(0,C.useRef)(null),o=(0,C.useRef)(e);o.current=e,(0,C.useEffect)(()=>{let e=i.current;e&&(i.current=null,Qf(o.current,e.expectedValue)&&e.container?.querySelector(`[data-mantine-pill-index="${e.index}"]`)?.focus())});let s=(0,C.useCallback)(e=>{a.current=e},[]);return{getPillProps:e=>{if(n)return{draggable:!0,tabIndex:-1,"data-mantine-pill-index":e,"aria-keyshortcuts":`Alt+ArrowLeft Alt+ArrowRight`,onMouseDown:e=>{e.button===0&&e.stopPropagation()},onDragStart:t=>{t.stopPropagation(),t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`text/plain`,String(e)),r.current.draggedIndex=e;let n=t.currentTarget,i=n.getBoundingClientRect(),a=n.cloneNode(!0);a.removeAttribute(`data-dragging`),a.removeAttribute(`data-drag-over`),a.style.position=`fixed`,a.style.top=`-9999px`,a.style.left=`-9999px`,a.style.width=`${i.width}px`,a.style.height=`${i.height}px`,a.style.pointerEvents=`none`,document.body.appendChild(a),t.dataTransfer.setDragImage(a,t.clientX-i.left,t.clientY-i.top),setTimeout(()=>a.parentNode?.removeChild(a),0),requestAnimationFrame(()=>{n.setAttribute(`data-dragging`,`true`)})},onDragOver:t=>{let{draggedIndex:n}=r.current;if(n===null||n===e)return;let i=t.currentTarget,a=i.getBoundingClientRect(),o=t.clientX-a.left,s=(getComputedStyle(i).direction===`rtl`?o>a.width/2:o<a.width/2)?`before`:`after`;t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect=`move`;let c=r.current.currentDropTarget;c&&c!==i&&c.removeAttribute(`data-drag-over`),i.setAttribute(`data-drag-over`,s),r.current.currentDropTarget=i},onDragLeave:e=>{let t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||(t.removeAttribute(`data-drag-over`),r.current.currentDropTarget===t&&(r.current.currentDropTarget=null))},onDrop:n=>{n.preventDefault(),n.stopPropagation();let i=n.currentTarget,a=i.getAttribute(`data-drag-over`);i.removeAttribute(`data-drag-over`);let{draggedIndex:s}=r.current;if(s!==null&&a&&s!==e){let n=Xf(o.current,s,e,a);n!==o.current&&t(n)}r.current.draggedIndex=null,r.current.currentDropTarget=null},onDragEnd:e=>{e.currentTarget.removeAttribute(`data-dragging`);let t=r.current.currentDropTarget;t&&t.removeAttribute(`data-drag-over`),r.current.draggedIndex=null,r.current.currentDropTarget=null},onKeyDown:n=>{if(n.key!==`ArrowLeft`&&n.key!==`ArrowRight`)return;let r=n.currentTarget,a=getComputedStyle(r).direction===`rtl`?n.key===`ArrowLeft`:n.key===`ArrowRight`,s=a?e+1:e-1;if(n.altKey){if(s<0||s>=o.current.length)return;n.preventDefault(),n.stopPropagation();let c=a?`after`:`before`,l=Xf(o.current,e,s,c);if(l===o.current)return;i.current={container:r.parentElement,index:s,expectedValue:l},t(l);return}if(s<0)return;let c=r.parentElement;c&&(n.preventDefault(),n.stopPropagation(),s>=o.current.length?Zf(c)?.focus():c.querySelector(`[data-mantine-pill-index="${s}"]`)?.focus())}}},getListProps:()=>n?{ref:s}:{},handleInputKeyDown:e=>{if(!n||e.key!==`ArrowLeft`)return;let t=e.currentTarget;if(!(t.value.length===0||t.selectionStart===0&&t.selectionEnd===0))return;let r=a.current;if(!r)return;let i=r.querySelectorAll(`[data-mantine-pill-index]`);i.length!==0&&(e.preventDefault(),i[i.length-1].focus())}}}function ep({id:e,label:t,labelProps:n,inputWrapperOrder:r}){if(t&&(!r||r.includes(`label`)))return n?.id||`${e}-label`}var tp={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},np=Mt((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":H(a,`badge-height`),"--badge-padding-x":H(a,`badge-padding-x`),"--badge-fz":H(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:U(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?Xt(n,e):void 0}}}),rp=Mr(e=>{let t=K(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=q({name:`Badge`,props:t,classes:tp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:np});return(0,G.jsxs)(Y,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});rp.classes=tp,rp.varsResolver=np,rp.displayName=`@mantine/core/Badge`;var ip={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},ap={orientation:`horizontal`},op=Mt((e,{borderWidth:t})=>({group:{"--button-border-width":N(t)}})),sp=J(e=>{let t=K(`ButtonGroup`,ap,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=K(`ButtonGroup`,ap,e),p=q({name:`ButtonGroup`,props:t,classes:ip,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:op,rootSelector:`group`});return(0,G.jsx)(Y,{...p(`group`),mod:[{orientation:s},u],role:`group`,...f})});sp.classes=ip,sp.varsResolver=op,sp.displayName=`@mantine/core/ButtonGroup`;var cp=Mt((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":H(o,`section-height`),"--section-padding-x":H(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?ce(o.replace(`compact-`,``)):ce(o),"--section-radius":t===void 0?void 0:U(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),lp=J(e=>{let t=K(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t,p=q({name:`ButtonGroupSection`,props:t,classes:ip,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:cp,rootSelector:`groupSection`});return(0,G.jsx)(Y,{...p(`groupSection`),...f})});lp.classes=ip,lp.varsResolver=cp,lp.displayName=`@mantine/core/ButtonGroupSection`;var up={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${N(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},dp=Mt((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":H(a,`button-height`),"--button-padding-x":H(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?ce(a.replace(`compact-`,``)):ce(a),"--button-radius":t===void 0?void 0:U(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),fp=Mr(e=>{let t=K(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=q({name:`Button`,props:t,classes:ip,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:dp}),T=!!c,E=!!l;return(0,G.jsxs)(sc,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(Lc,{mounted:p,transition:up,duration:150,children:e=>(0,G.jsx)(Y,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(ll,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(Y,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(Y,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(Y,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});fp.classes=ip,fp.varsResolver=dp,fp.displayName=`@mantine/core/Button`,fp.Group=sp,fp.GroupSection=lp;var[pp,mp]=R(`Card component was not found in tree`),hp={root:`m_e615b15f`,section:`m_599a2148`},gp=Mr(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,withBorder:o,inheritPadding:s,mod:c,...l}=K(`CardSection`,null,e),u=mp();return(0,G.jsx)(Y,{mod:[{"with-border":o,"inherit-padding":s},c],...u.getStyles(`section`,{className:n,style:r,styles:i,classNames:t}),...l})});gp.classes=hp,gp.displayName=`@mantine/core/CardSection`;var _p=Mt((e,{padding:t})=>({root:{"--card-padding":se(t)}})),vp={orientation:`vertical`},yp=Mr(e=>{let t=K(`Card`,vp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,padding:l,attributes:u,orientation:d,...f}=t,p=q({name:`Card`,props:t,classes:hp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:_p}),m=C.Children.toArray(c),h=m.map((e,t)=>typeof e==`object`&&e&&`type`in e&&(e.type===gp||e.type?.displayName===`@mantine/core/CardSection`)?(0,C.cloneElement)(e,{"data-orientation":d,"data-first-section":t===0||void 0,"data-last-section":t===m.length-1||void 0}):e);return(0,G.jsx)(pp,{value:{getStyles:p},children:(0,G.jsx)(fc,{unstyled:o,"data-orientation":d,...p(`root`),...f,children:h})})});yp.classes=hp,yp.varsResolver=_p,yp.displayName=`@mantine/core/Card`,yp.Section=gp;function bp(e){let t=e.currentTarget;return At(t).activeElement!==t}var xp={root:`m_4451eb3a`},Sp=Mr(e=>{let t=K(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=q({name:`Center`,props:t,classes:xp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,G.jsx)(Y,{mod:[{inline:c},l],...f(`root`),...d})});Sp.classes=xp,Sp.displayName=`@mantine/core/Center`;var Cp={root:`m_b183c0a2`},wp=Mt((e,{color:t})=>({root:{"--code-bg":t?Xt(t,e):void 0}})),Tp=J(e=>{let t=K(`Code`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,block:l,mod:u,attributes:d,...f}=t,p=q({name:`Code`,props:t,classes:Cp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:wp});return(0,G.jsx)(Y,{component:l?`pre`:`code`,mod:[{block:l},u],...p(`root`),...f,dir:`ltr`})});Tp.classes=Cp,Tp.varsResolver=wp,Tp.displayName=`@mantine/core/Code`;var Ep={timeout:1e3};function Dp(e){let{children:t,timeout:n,value:r,...i}=K(`CopyButton`,Ep,e),a=Se({timeout:n});return(0,G.jsx)(G.Fragment,{children:t({copy:()=>a.copy(r),copied:a.copied,...i})})}Dp.displayName=`@mantine/core/CopyButton`;var Op={root:`m_3eebeb36`,label:`m_9e365f20`},kp={orientation:`horizontal`},Ap=Mt((e,{color:t,variant:n,size:r})=>({root:{"--divider-color":t?Xt(t,e):void 0,"--divider-border-style":n,"--divider-size":H(r,`divider-size`)}})),jp=J(e=>{let t=K(`Divider`,kp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,orientation:l,label:u,labelPosition:d,mod:f,attributes:p,...m}=t,h=q({name:`Divider`,classes:Op,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:Ap});return(0,G.jsx)(Y,{mod:[{orientation:l,withLabel:!!u},f],role:`separator`,"aria-orientation":l,...h(`root`),...m,children:u&&(0,G.jsx)(Y,{component:`span`,mod:{position:d},...h(`label`),children:u})})});jp.classes=Op,jp.varsResolver=Ap,jp.displayName=`@mantine/core/Divider`;var[Mp,Np]=R(`Grid component was not found in tree`),Pp=(e,t)=>{if(e===`content`)return`auto`;if(e===`auto`)return`0rem`;if(e)return e===t?`100%`:`calc(${100*e/t}% - ${(t-e)/t} * var(--grid-column-gap))`},Fp=(e,t,n)=>n||e===`auto`?`100%`:e===`content`?`unset`:Pp(e,t),Ip=(e,t)=>{if(e)return e===`auto`||t?`1`:`auto`},Lp=(e,t)=>{if(e===0)return`0`;if(e)return`calc(${100*e/t}% + ${e/t} * var(--grid-column-gap))`};function Rp({span:e,order:t,offset:n,align:r,selector:i}){let a=Nn(),o=Np(),s=o.breakpoints||a.breakpoints,c=pe(e),l=c===void 0?12:c,u=F({"--col-order":pe(t)?.toString(),"--col-flex-grow":Ip(l,o.grow),"--col-flex-basis":Pp(l,o.columns),"--col-width":l===`content`?`auto`:void 0,"--col-max-width":Fp(l,o.columns,o.grow),"--col-offset":Lp(pe(n),o.columns),"--col-align-self":pe(r)}),d=w(s).reduce((i,a)=>(i[a]||(i[a]={}),typeof t==`object`&&t[a]!==void 0&&(i[a][`--col-order`]=t[a]?.toString()),typeof e==`object`&&e[a]!==void 0&&(i[a][`--col-flex-grow`]=Ip(e[a],o.grow),i[a][`--col-flex-basis`]=Pp(e[a],o.columns),i[a][`--col-width`]=e[a]===`content`?`auto`:void 0,i[a][`--col-max-width`]=Fp(e[a],o.columns,o.grow)),typeof n==`object`&&n[a]!==void 0&&(i[a][`--col-offset`]=Lp(n[a],o.columns)),typeof r==`object`&&r[a]!==void 0&&(i[a][`--col-align-self`]=r[a]),i),{}),f=fe(w(d),s).filter(e=>w(d[e.value]).length>0).map(e=>({query:o.type===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:d[e.value]}));return(0,G.jsx)(er,{styles:u,media:o.type===`container`?void 0:f,container:o.type===`container`?f:void 0,selector:i})}var zp={container:`m_8478a6da`,root:`m_410352e9`,inner:`m_dee7bd2f`,col:`m_96bdd299`},Bp={span:12},Vp=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,span:o,order:s,offset:c,align:l,...u}=K(`GridCol`,Bp,e),d=Np(),f=Er();return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Rp,{selector:`.${f}`,span:o,order:s,offset:c,align:l}),(0,G.jsx)(Y,{...d.getStyles(`col`,{className:Pt(n,f),style:r,classNames:t,styles:i}),...u})]})});Vp.classes=zp,Vp.displayName=`@mantine/core/GridCol`;function Hp({gap:e,rowGap:t,columnGap:n,selector:r,breakpoints:i,type:a}){let o=Nn(),s=i||o.breakpoints,c=F({"--grid-gap":se(pe(e)),"--grid-row-gap":se(pe(t)),"--grid-column-gap":se(pe(n))}),l=w(s).reduce((r,i)=>(r[i]||(r[i]={}),typeof e==`object`&&e[i]!==void 0&&(r[i][`--grid-gap`]=se(e[i])),typeof t==`object`&&t[i]!==void 0&&(r[i][`--grid-row-gap`]=se(t[i])),typeof n==`object`&&n[i]!==void 0&&(r[i][`--grid-column-gap`]=se(n[i])),r),{}),u=fe(w(l),s).filter(e=>w(l[e.value]).length>0).map(e=>({query:a===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:l[e.value]}));return(0,G.jsx)(er,{styles:c,media:a===`container`?void 0:u,container:a===`container`?u:void 0,selector:r})}var Up={gap:`md`,columns:12},Wp=Mt((e,{justify:t,align:n,overflow:r})=>({root:{"--grid-justify":t,"--grid-align":n,"--grid-overflow":r}})),Gp=J(e=>{let t=K(`Grid`,Up,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,grow:c,gap:l,rowGap:u,columnGap:d,columns:f,align:p,justify:m,children:h,breakpoints:g,type:_,attributes:v,...y}=t,b=q({name:`Grid`,classes:zp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:Wp}),x=Er();return _===`container`&&g?(0,G.jsxs)(Mp,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,G.jsx)(Hp,{selector:`.${x}`,...t}),(0,G.jsx)(`div`,{...b(`container`),children:(0,G.jsx)(Y,{...b(`root`,{className:x}),...y,children:(0,G.jsx)(`div`,{...b(`inner`),children:h})})})]}):(0,G.jsxs)(Mp,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,G.jsx)(Hp,{selector:`.${x}`,...t}),(0,G.jsx)(Y,{...b(`root`,{className:x}),...y,children:(0,G.jsx)(`div`,{...b(`inner`),children:h})})]})});Gp.classes=zp,Gp.varsResolver=Wp,Gp.displayName=`@mantine/core/Grid`,Gp.Col=Vp;var[Kp,qp]=R(`HoverCard component was not found in the tree`);function Jp(e){let{children:t,onMouseEnter:n,onMouseLeave:r,ref:i,...a}=K(`HoverCardDropdown`,null,e),o=qp(),s=o.getFloatingProps(),c=ot(o.floating,i),l=o.withRoles&&o.role===`tooltip`?{role:`tooltip`,id:o.dropdownId}:void 0;return(0,G.jsx)(tl.Dropdown,{ref:c,...s,...l,onMouseEnter:ue(n,s.onMouseEnter),onMouseLeave:ue(r,s.onMouseLeave),...a,children:t})}Jp.displayName=`@mantine/core/HoverCardDropdown`;var Yp=(0,C.createContext)({withinGroup:!1}),Xp={openDelay:0,closeDelay:0};function Zp(e){let{openDelay:t,closeDelay:n,children:r}=K(`HoverCardGroup`,Xp,e);return(0,G.jsx)(Yp,{value:{withinGroup:!0},children:(0,G.jsx)(Fs,{delay:{open:t,close:n},children:r})})}Zp.displayName=`@mantine/core/HoverCardGroup`,Zp.extend=e=>e;var Qp={refProp:`ref`};function $p(e){let{children:t,refProp:n,eventPropsWrapperName:r,...i}=K(`HoverCardTarget`,Qp,e),a=jt(t);if(!a)throw Error(`HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let o=qp(),s=a.props,c=ot(Et(a),o.assignTarget,o.reference),l=o.getReferenceProps(r?s[r]:s),u=o.withRoles&&o.role===`tooltip`?{"aria-describedby":[s[`aria-describedby`],o.opened?o.dropdownId:null].filter(Boolean).join(` `)||void 0}:void 0,d={...r?{[r]:l}:l,...u,ref:c};return(0,G.jsx)(tl.Target,{refProp:n,...i,children:(0,C.cloneElement)(a,d)})}$p.displayName=`@mantine/core/HoverCardTarget`;function em(e){let[t,n]=(0,C.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,C.use)(Yp).withinGroup,a=nt(e.id),o=(0,C.useRef)(r);o.current=r;let s=(0,C.useRef)(-1),c=(0,C.useRef)(-1),l=(0,C.useRef)(null),u=(0,C.useCallback)(e=>{l.current=e},[]),d=(0,C.useCallback)(()=>{window.clearTimeout(s.current),window.clearTimeout(c.current)},[]),f=(0,C.useCallback)(t=>{o.current!==t&&(o.current=t,n(t),t?(g(a),e.onOpen?.()):e.onClose?.())},[a,e.onOpen,e.onClose]),{context:p,refs:m}=Ws({open:r,onOpenChange:(0,C.useCallback)((t,n,r)=>{let i=o.current;f(t),i&&!t&&(r===`escape-key`||r===`outside-press`)&&e.onDismiss?.()},[f,e.onDismiss])}),{delay:h,setCurrentId:g}=Is(p,{id:a}),{getReferenceProps:_,getFloatingProps:v}=Js([js(p,{enabled:e.events.hover,delay:i?h:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch,handleClose:e.interactive?ec():null}),Ks(p,{enabled:e.events.focus,visibleOnly:!0}),Hs(p,{escapeKey:e.closeOnEscape,outsidePress:e.closeOnClickOutside})]),y=(0,C.useCallback)(()=>{d(),e.openDelay?s.current=window.setTimeout(()=>f(!0),e.openDelay):f(!0)},[d,e.openDelay,f]),b=(0,C.useCallback)(()=>{d(),e.closeDelay?c.current=window.setTimeout(()=>f(!1),e.closeDelay):f(!1)},[d,e.closeDelay,f]),x=(0,C.useRef)(f);return x.current=f,(0,C.useEffect)(()=>()=>d(),[d]),(0,C.useEffect)(()=>{if(!r||i||typeof IntersectionObserver>`u`)return;let e=l.current;if(!e)return;let t=new IntersectionObserver(()=>{e.isConnected&&e.getClientRects().length!==0||(d(),x.current(!1))});return t.observe(e),()=>t.disconnect()},[r,i,d]),{opened:r,dropdownId:`${a}-dropdown`,reference:m.setReference,floating:m.setFloating,assignTarget:u,getReferenceProps:_,getFloatingProps:v,openDropdown:y,closeDropdown:b}}var tm={hover:!0,focus:!0,touch:!1},nm={openDelay:0,closeDelay:150,initiallyOpened:!1,interactive:!1,closeOnEscape:!0,closeOnClickOutside:!0,role:`dialog`};function rm(e){let{children:t,onOpen:n,onClose:r,openDelay:i,closeDelay:a,initiallyOpened:o,events:s,interactive:c,closeOnEscape:l,closeOnClickOutside:u,returnFocus:d,onDismiss:f,id:p,role:m,withRoles:h,...g}=K(`HoverCard`,nm,e),_={...tm,...s},v=h!==!1,y=em({openDelay:i,closeDelay:a,defaultOpened:o,onOpen:n,onClose:r,events:_,interactive:c,closeOnEscape:l,closeOnClickOutside:u,onDismiss:f,id:p});return(0,G.jsx)(Kp,{value:{openDropdown:y.openDropdown,closeDropdown:y.closeDropdown,assignTarget:y.assignTarget,getReferenceProps:y.getReferenceProps,getFloatingProps:y.getFloatingProps,reference:y.reference,floating:y.floating,opened:y.opened,dropdownId:y.dropdownId,role:m,withRoles:v},children:(0,G.jsx)(tl,{...g,id:p,closeOnEscape:l,closeOnClickOutside:u,returnFocus:!_.focus&&d,withRoles:m!==`tooltip`&&h,opened:y.opened,__staticSelector:`HoverCard`,children:t})})}rm.displayName=`@mantine/core/HoverCard`,rm.Target=$p,rm.Dropdown=Jp,rm.Group=Zp,rm.extend=e=>e;var im={root:`m_6e45937b`,loader:`m_e8eb006c`,overlay:`m_df587f17`},am={transitionProps:{transition:`fade`,duration:0},overlayProps:{backgroundOpacity:.75},zIndex:ie(`overlay`)},om=Mt((e,{zIndex:t})=>({root:{"--lo-z-index":t?.toString()}})),sm=J(e=>{let t=K(`LoadingOverlay`,am,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,transitionProps:c,loaderProps:l,overlayProps:u,visible:d,zIndex:f,attributes:p,onEnter:m,onEntered:h,onExit:g,onExited:_,...v}=t,y=Nn(),b=q({name:`LoadingOverlay`,classes:im,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:om}),x={...am.overlayProps,...u};return(0,G.jsx)(Lc,{transition:`fade`,...c,mounted:!!d,onEnter:m,onEntered:h,onExit:g,onExited:_,children:e=>(0,G.jsxs)(Y,{...b(`root`,{style:e}),...v,children:[(0,G.jsx)(ll,{unstyled:o,...l,...b(`loader`,{className:l?.className,style:l?.style})}),(0,G.jsx)(Tc,{...x,...b(`overlay`,{className:x?.className,style:x?.style}),darkHidden:!0,unstyled:o,color:u?.color||y.white}),(0,G.jsx)(Tc,{...x,...b(`overlay`,{className:x?.className,style:x?.style}),lightHidden:!0,unstyled:o,color:u?.color||y.colors.dark[5]})]})})});sm.classes=im,sm.varsResolver=om,sm.displayName=`@mantine/core/LoadingOverlay`;var[cm,lm]=R(`Menu component was not found in the tree`),um=(0,C.createContext)(null);function dm(e){let{value:t,defaultValue:n,onChange:r,children:i}=K(`MenuCheckboxGroup`,null,e),[a,o]=st({value:t,defaultValue:n,finalValue:[],onChange:r}),s=(0,C.useCallback)(e=>{o(a.includes(e)?a.filter(t=>t!==e):[...a,e])},[a,o]);return(0,G.jsx)(um,{value:{values:a,onChange:s},children:i})}dm.displayName=`@mantine/core/MenuCheckboxGroup`;var fm=(0,C.createContext)(null);function pm({role:e,checked:t,indicator:n,onSelect:r,color:i,closeMenuOnClick:a,rightSection:o,children:s,disabled:c,dataDisabled:l,className:u,style:d,styles:f,classNames:p,buttonRef:m,others:h}){let g=lm(),_=(0,C.use)(fm),v=Nn(),{dir:y}=Br(),b=(0,C.useRef)(null),x=ue(h.onClick,()=>{l||(r(),a&&g.closeDropdownImmediately())}),S=ue(h.onMouseMove,()=>{if(!g.hasSearch)return;let e=b.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==b.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),w=ue(h.onKeyDown,e=>{e.key===`ArrowLeft`&&_&&(_.close(),_.focusParentItem())}),T=i?v.variantColorResolver({color:i,theme:v,variant:`light`}):void 0,E=i?Yt({color:i,theme:v}):null,D=g.alignItemsLabels!==`none`||t;return(0,G.jsxs)(sc,{onMouseDown:e=>e.preventDefault(),...h,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,...g.getStyles(`item`,{className:u,style:d,styles:f,classNames:p}),ref:ot(b,m),role:e,"aria-checked":t,disabled:c,"data-menu-item":!0,"data-checked":t||void 0,"data-disabled":c||l||void 0,"data-mantine-stop-propagation":!0,onClick:x,onMouseMove:S,onKeyDown:V({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:g.loop,dir:y,orientation:`vertical`,onKeyDown:w}),__vars:{"--menu-item-color":E?.isThemeColor&&E?.shade===void 0?`var(--mantine-color-${E.color}-6)`:T?.color,"--menu-item-hover":T?.hover},children:[D&&(0,G.jsx)(`div`,{...g.getStyles(`itemIndicator`,{styles:f,classNames:p}),"data-checked":t||void 0,children:t?n:null}),s&&(0,G.jsx)(`div`,{...g.getStyles(`itemLabel`,{styles:f,classNames:p}),"data-menu-item-label":!0,children:s}),o&&(0,G.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:f,classNames:p}),"data-position":`right`,children:o})]})}var mm={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,search:`m_ef8769b6`,itemLabel:`m_5476e0d3`,itemIndicator:`m_8395186e`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},hm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,defaultChecked:m,onChange:h,checkIcon:g,ref:_,...v}=K(`MenuCheckboxItem`,null,e),y=lm(),b=(0,C.use)(um),x=b&&f!==void 0?b.values.includes(f):void 0,[S,w]=st({value:p??x,defaultValue:m,finalValue:!1,onChange:h}),T=g??y.checkIcon??(0,G.jsx)(Af,{size:10});return(0,G.jsx)(pm,{role:`menuitemcheckbox`,checked:S,indicator:T,onSelect:()=>{h?w(!S):b&&f!==void 0?b.onChange(f):w(!S)},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:_,others:v,children:l})});hm.classes=mm,hm.displayName=`@mantine/core/MenuCheckboxItem`;function gm(e){let{children:t,disabled:n,longPressDelay:r}=K(`MenuContextMenu`,null,e),i=jt(t);if(!i)throw Error(`Menu.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=lm(),o=Vc(),s=Hc({childProps:i.props,disabled:n||o.disabled,opened:a.opened,longPressDelay:r,setReference:o.reference,open:()=>a.openDropdown()});return(0,C.cloneElement)(i,s)}gm.displayName=`@mantine/core/MenuContextMenu`;var _m=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`MenuDivider`,null,e),s=lm();return(0,G.jsx)(Y,{...s.getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});_m.classes=mm,_m.displayName=`@mantine/core/MenuDivider`;var vm=500;function ym(e){return((e.querySelector(`[data-menu-item-label]`)??e).textContent??``).trim().toLowerCase()}function bm(e){return e.length>1&&e.split(``).every(t=>t===e[0])}function xm({enabled:e,opened:t,getDropdown:n}){let r=(0,C.useRef)({buffer:``,timeoutId:null});return(0,C.useEffect)(()=>{if(t&&e)return;let n=r.current;n.timeoutId!==null&&(window.clearTimeout(n.timeoutId),n.timeoutId=null),n.buffer=``},[t,e]),(0,C.useEffect)(()=>()=>{let{timeoutId:e}=r.current;e!==null&&window.clearTimeout(e)},[]),t=>{if(!e||t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||t.key===` `)return;let i=t.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.tagName===`SELECT`||i.isContentEditable))return;let a=n();if(!a)return;let o=Array.from(a.querySelectorAll(`[data-menu-item]:not([data-disabled])`)).filter(e=>e.closest(`[data-menu-dropdown]`)===a);if(o.length===0)return;let s=r.current;s.buffer=(s.buffer+t.key).toLowerCase(),s.timeoutId!==null&&window.clearTimeout(s.timeoutId),s.timeoutId=window.setTimeout(()=>{s.buffer=``,s.timeoutId=null},vm);let c=document.activeElement,l=c?o.indexOf(c):-1,u=null;if(s.buffer.length===1||bm(s.buffer)){let e=s.buffer[0],t=l+1;for(let n=0;n<o.length;n+=1){let r=(t+n)%o.length;if(ym(o[r]).startsWith(e)){u=o[r];break}}}else for(let e=0;e<o.length;e+=1)if(ym(o[e]).startsWith(s.buffer)){u=o[e];break}u&&(t.preventDefault(),u.focus())}}var Sm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onKeyDown:c,children:l,ref:u,...d}=K(`MenuDropdown`,null,e),f=(0,C.useRef)(null),p=lm(),m=xm({enabled:!p.hasSearch,opened:p.opened,getDropdown:()=>f.current}),h=ue(c,e=>{m(e),e.defaultPrevented||p.hasSearch||e.key!==`ArrowUp`&&e.key!==`ArrowDown`||(e.preventDefault(),f.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),g=ue(o,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.openDropdown()),_=ue(s,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.closeDropdown());return(0,G.jsxs)(tl.Dropdown,{...d,onMouseEnter:g,onMouseLeave:_,role:`menu`,"aria-orientation":`vertical`,ref:ot(u,f),...p.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:h,children:[p.withInitialFocusPlaceholder&&!p.hasSearch&&(0,G.jsx)(`div`,{role:`presentation`,tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),l]})});Sm.classes=mm,Sm.displayName=`@mantine/core/MenuDropdown`;var Cm=Mr(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,leftSection:c,rightSection:l,children:u,disabled:d,"data-disabled":f,ref:p,...m}=K(`MenuItem`,null,e),h=lm(),g=(0,C.use)(fm),_=Nn(),{dir:v}=Br(),y=(0,C.useRef)(null),b=m,x=ue(b.onClick,()=>{f||(typeof s==`boolean`?s&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),S=ue(b.onMouseMove,()=>{if(!h.hasSearch)return;let e=y.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==y.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),w=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,T=o?Yt({color:o,theme:_}):null,E=ue(b.onKeyDown,e=>{e.key===`ArrowLeft`&&g&&(g.close(),g.focusParentItem())});return(0,G.jsxs)(sc,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:ot(y,p),role:`menuitem`,disabled:d,"data-menu-item":!0,"data-disabled":d||f||void 0,"data-mantine-stop-propagation":!0,onClick:x,onMouseMove:S,onKeyDown:V({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:E}),__vars:{"--menu-item-color":T?.isThemeColor&&T?.shade===void 0?`var(--mantine-color-${T.color}-6)`:w?.color,"--menu-item-hover":w?.hover},children:[h.alignItemsLabels===`all`&&(0,G.jsx)(`div`,{...h.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),c&&(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:c}),u&&(0,G.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:u}),l&&(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:l})]})});Cm.classes=mm,Cm.displayName=`@mantine/core/MenuItem`;var wm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`MenuLabel`,null,e),s=lm();return(0,G.jsx)(Y,{...s.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});wm.classes=mm,wm.displayName=`@mantine/core/MenuLabel`;var Tm=(0,C.createContext)(null);function Em(e){let{value:t,defaultValue:n,onChange:r,children:i}=K(`MenuRadioGroup`,null,e),[a,o]=st({value:t,defaultValue:n,finalValue:null,onChange:r});return(0,G.jsx)(Tm,{value:{value:a,onChange:e=>o(e)},children:i})}Em.displayName=`@mantine/core/MenuRadioGroup`;function Dm({size:e,style:t,...n}){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:N(e),height:N(e),...t},"aria-hidden":!0,...n,children:(0,G.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var Om=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,onChange:m,checkIcon:h,ref:g,..._}=K(`MenuRadioItem`,null,e),v=lm(),y=(0,C.use)(Tm),b=p??(y?y.value===f:!1),x=h??v.checkIcon??(0,G.jsx)(Dm,{size:5});return(0,G.jsx)(pm,{role:`menuitemradio`,checked:b,indicator:x,onSelect:()=>{b||(m?m(f):y&&y.onChange(f))},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:g,others:_,children:l})});Om.classes=mm,Om.displayName=`@mantine/core/MenuRadioItem`;var km=`[data-menu-item]:not([data-disabled])`,Am=`[data-menu-active]`;function jm(e){return e?.closest(`[data-menu-dropdown]`)}function Mm(e){return e?Array.from(e.querySelectorAll(km)).filter(t=>t.closest(`[data-menu-dropdown]`)===e):[]}function Nm(e){e&&e.querySelectorAll(Am).forEach(t=>{t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}function Pm(e,t){Nm(t),e&&(e.setAttribute(`data-menu-active`,`true`),e.scrollIntoView({block:`nearest`}))}function Fm(e){return e.findIndex(e=>e.hasAttribute(`data-menu-active`))}var Im={clearSearchOnClose:!0},Lm=J(e=>{let{classNames:t,styles:n,onKeyDown:r,onChange:i,size:a,clearSearchOnClose:o,ref:s,...c}=K(`MenuSearch`,Im,e),l=lm(),u=(0,C.useRef)(null),d=ot(s,u),f=(0,C.useRef)(i);f.current=i,(0,C.useEffect)(()=>l.registerSearch(),[l.registerSearch]),(0,C.useEffect)(()=>{o?l.searchExitClearRef.current=()=>{f.current?.({currentTarget:{value:``}})}:l.searchExitClearRef.current=null},[o,l.searchExitClearRef]),(0,C.useEffect)(()=>{l.opened||Nm(jm(u.current))},[l.opened]);let p=ue(i,e=>{Nm(jm(e.currentTarget))}),m=ue(r,e=>{if(e.defaultPrevented)return;let t=jm(e.currentTarget),n=Mm(t);if(e.key===`ArrowDown`){if(e.preventDefault(),n.length===0)return;let r=Fm(n);Pm(n[r>=n.length-1?l.loop?0:r:r+1]??null,t)}else if(e.key===`ArrowUp`){if(e.preventDefault(),n.length===0)return;let r=Fm(n);Pm(n[r<=0?r===-1||l.loop?n.length-1:0:r-1]??null,t)}else if(e.key===`Home`)e.preventDefault(),n.length>0&&Pm(n[0],t);else if(e.key===`End`)e.preventDefault(),n.length>0&&Pm(n[n.length-1],t);else if(e.key===`Enter`){if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=n[Fm(n)];t&&(e.preventDefault(),t.hasAttribute(`data-sub-menu-item`)?(t.focus(),t.dispatchEvent(new KeyboardEvent(`keydown`,{key:`ArrowRight`,bubbles:!0}))):t.click())}}),h=l.getStyles(`search`);return(0,G.jsx)(bd,{"data-autofocus":!0,"data-mantine-stop-propagation":!0,type:`search`,size:a,...c,ref:d,classNames:[{input:h.className},t],styles:[{input:h.style},n],onKeyDown:m,onChange:p,__staticSelector:`Menu`})});Lm.classes=mm,Lm.displayName=`@mantine/core/MenuSearch`;var Rm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l,onKeyDown:u,children:d,ref:f,...p}=K(`MenuSubDropdown`,null,e),m=(0,C.useRef)(null),h=lm(),g=(0,C.use)(fm),_=xm({enabled:!h.hasSearch,opened:g?.opened??!1,getDropdown:()=>m.current}),v=ue(u,e=>{_(e),e.ctrlKey||e.metaKey||e.altKey||e.key.length!==1||e.key===` `||e.stopPropagation()}),y=g?.getFloatingProps({onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l});return(0,G.jsx)(tl.Dropdown,{...p,...y,role:`menu`,"aria-orientation":`vertical`,ref:ot(f,m,g?.setFloating),...h.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:v,children:d})});Rm.classes=mm,Rm.displayName=`@mantine/core/MenuSubDropdown`;var zm=Mr(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,leftSection:s,rightSection:c,children:l,disabled:u,"data-disabled":d,closeMenuOnClick:f,ref:p,...m}=K(`MenuSubItem`,null,e),h=lm(),g=(0,C.use)(fm),_=Nn(),{dir:v}=Br(),y=(0,C.useRef)(null),b=m,x=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,S=o?Yt({color:o,theme:_}):null,w=ue(b.onKeyDown,e=>{e.key===`ArrowRight`&&(g?.open(),g?.focusFirstItem()),e.key===`ArrowLeft`&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),T=ue(b.onClick,()=>{!d&&f&&h.closeDropdownImmediately()}),E=ue(b.onMouseMove,()=>{if(!h.hasSearch)return;let e=y.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==y.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),D=g?.getReferenceProps({onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,onPointerEnter:b.onPointerEnter,onPointerLeave:b.onPointerLeave});return(0,G.jsxs)(sc,{onMouseDown:e=>e.preventDefault(),...m,...D,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:ot(y,p,g?.setReference),role:`menuitem`,disabled:u,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onClick:T,onMouseMove:E,onKeyDown:V({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:w}),__vars:{"--menu-item-color":S?.isThemeColor&&S?.shade===void 0?`var(--mantine-color-${S.color}-6)`:x?.color,"--menu-item-hover":x?.hover},children:[h.alignItemsLabels===`all`&&(0,G.jsx)(`div`,{...h.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),s&&(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:s}),l&&(0,G.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:l}),(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:c||(0,G.jsx)(kd,{...h.getStyles(`chevron`),size:14})})]})});zm.classes=mm,zm.displayName=`@mantine/core/MenuSubItem`;function Bm({children:e,refProp:t}){if(!L(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return lm(),(0,G.jsx)(tl.Target,{refProp:t,popupType:`menu`,children:e})}Bm.displayName=`@mantine/core/MenuSubTarget`;var Vm={offset:0,position:`right-start`,safeAreaPolygon:!0,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Hm(e){let{children:t,closeDelay:n,openDelay:r,position:i,safeAreaPolygon:a,opened:o,onChange:s,...c}=K(`MenuSub`,Vm,e),l=nt(),[u,d]=st({value:o,finalValue:!1,onChange:s}),f=(0,C.use)(fm),p=lm(),{dir:m}=Br(),h=bc(m,i),g=f?.registerOpenSub??p.registerOpenSub,_=(0,C.useRef)(null),v=(0,C.useCallback)(e=>{let t=_.current;return t&&t!==e&&t(),_.current=e,()=>{_.current===e&&(_.current=null)}},[]),y=(0,C.useRef)(d);y.current=d;let b=(0,C.useCallback)(()=>y.current(!0),[]),x=(0,C.useCallback)(()=>y.current(!1),[]);(0,C.useEffect)(()=>{if(u)return g(x)},[u,g,x]);let{context:S,refs:w}=Ws({placement:h,open:u,onOpenChange:e=>{e?b():x()}}),{getReferenceProps:T,getFloatingProps:E}=Js([js(S,{handleClose:a?ec(typeof a==`object`?a:void 0):void 0,delay:{open:r,close:n}})]);return(0,G.jsx)(fm,{value:{opened:u,close:x,open:b,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-target`)?.focus()},16),parentContext:f,setReference:w.setReference,setFloating:w.setFloating,getReferenceProps:T,getFloatingProps:E,registerOpenSub:v},children:(0,G.jsx)(tl,{opened:u,onChange:e=>e?b():x(),withArrow:!1,id:l,position:i,...c,withinPortal:!1,children:t})})}Hm.extend=e=>e,Hm.displayName=`@mantine/core/MenuSub`,Hm.Target=Bm,Hm.Dropdown=Rm,Hm.Item=zm;var Um={refProp:`ref`};function Wm(e){let{children:t,refProp:n,...r}=K(`MenuTarget`,Um,e),i=jt(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=lm(),o=i.props,s=ue(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=ue(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=ue(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,G.jsx)(tl.Target,{refProp:n,popupType:`menu`,...r,children:(0,C.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Wm.displayName=`@mantine/core/MenuTarget`;var Gm={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1,alignItemsLabels:`with-indicators`},Km=J(e=>{let t=K(`Menu`,Gm,e),{children:n,onOpen:r,onClose:i,opened:a,defaultOpened:o,trapFocus:s,onChange:c,closeOnItemClick:l,loop:u,closeOnEscape:d,trigger:f,openDelay:p,closeDelay:m,classNames:h,styles:g,unstyled:_,variant:v,vars:y,menuItemTabIndex:b,keepMounted:x,withInitialFocusPlaceholder:S,attributes:w,onExitTransitionEnd:T,alignItemsLabels:E,checkIcon:D,...O}=t,k=q({name:`Menu`,classes:mm,props:t,classNames:h,styles:g,unstyled:_,attributes:w}),[A,j]=st({value:a,defaultValue:o,finalValue:!1,onChange:c}),[M,N]=(0,C.useState)(!1),P=()=>{j(!1),N(!1),A&&i?.()},F=()=>{j(!0),!A&&r?.()},I=()=>{A?P():F()},{openDropdown:L,closeDropdown:R}=xc({open:F,close:P,closeDelay:m,openDelay:p}),z=(0,C.useRef)(null),B=(0,C.useCallback)(e=>{let t=z.current;return t&&t!==e&&t(),z.current=e,()=>{z.current===e&&(z.current=null)}},[]),ee=(0,C.useRef)(0),[te,ne]=(0,C.useState)(!1),V=(0,C.useCallback)(()=>(ee.current+=1,ee.current===1&&ne(!0),()=>{--ee.current,ee.current===0&&ne(!1)}),[]),re=(0,C.useRef)(null),ie=()=>{re.current?.(),T?.()},ae=e=>me(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:oe,resolvedStyles:H}=Fn({classNames:h,styles:g,props:t});return(0,G.jsx)(cm,{value:{getStyles:k,opened:A,toggleDropdown:I,getItemIndex:ae,openedViaClick:M,setOpenedViaClick:N,closeOnItemClick:l,closeDropdown:f===`click`?P:R,openDropdown:f===`click`?F:L,closeDropdownImmediately:P,loop:u,trigger:f,unstyled:_,menuItemTabIndex:b,withInitialFocusPlaceholder:S,registerOpenSub:B,hasSearch:te,registerSearch:V,searchExitClearRef:re,alignItemsLabels:E,checkIcon:D},children:(0,G.jsx)(tl,{returnFocus:!0,...O,opened:A,onChange:I,defaultOpened:o,trapFocus:!x&&s,closeOnEscape:d,__staticSelector:`Menu`,classNames:oe,styles:H,unstyled:_,variant:v,keepMounted:x,onExitTransitionEnd:ie,children:n})})});Km.displayName=`@mantine/core/Menu`,Km.classes=mm,Km.Item=Cm,Km.Label=wm,Km.Dropdown=Sm,Km.Target=Wm,Km.Divider=_m,Km.Search=Lm,Km.Sub=Hm,Km.CheckboxItem=hm,Km.CheckboxGroup=dm,Km.RadioItem=Om,Km.RadioGroup=Em,Km.ContextMenu=gm;var[qm,Jm]=R(`Modal component was not found in tree`),Ym={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},Xm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalBody`,null,e),s=Jm();return(0,G.jsx)(Hu,{...s.getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Xm.classes=Ym,Xm.displayName=`@mantine/core/ModalBody`;var Zm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalCloseButton`,null,e),s=Jm();return(0,G.jsx)(Uu,{...s.getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});Zm.classes=Ym,Zm.displayName=`@mantine/core/ModalCloseButton`;var Qm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=K(`ModalContent`,null,e),l=Jm(),u=l.scrollAreaComponent||Zu;return(0,G.jsx)(Wu,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,G.jsx)(u,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${N(l.yOffset)} * 2))`},children:o})})});Qm.classes=Ym,Qm.displayName=`@mantine/core/ModalContent`;var $m=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalHeader`,null,e),s=Jm();return(0,G.jsx)(Gu,{...s.getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});$m.classes=Ym,$m.displayName=`@mantine/core/ModalHeader`;var eh=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalOverlay`,null,e),s=Jm();return(0,G.jsx)(Ju,{...s.getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});eh.classes=Ym,eh.displayName=`@mantine/core/ModalOverlay`;var th={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ie(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},nh=Mt((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:U(t),"--modal-size":H(n,`modal-size`),"--modal-y-offset":N(r),"--modal-x-offset":N(i)}})),rh=J(e=>{let t=K(`ModalRoot`,th,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:m,attributes:h,...g}=t,_=q({name:m,classes:Ym,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:nh});return(0,G.jsx)(qm,{value:{yOffset:c,scrollAreaComponent:l,getStyles:_,fullScreen:d},children:(0,G.jsx)(zu,{..._(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===rc.Autosize||void 0,unstyled:o,...g})})});rh.classes=Ym,rh.varsResolver=nh,rh.displayName=`@mantine/core/ModalRoot`;var ih=(0,C.createContext)(null);function ah({children:e}){let[t,n]=(0,C.useState)([]),[r,i]=(0,C.useState)(ie(`modal`)),[a]=(0,C.useState)(()=>new WeakSet);return(0,G.jsx)(ih,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r,handledEscapeEvents:a},children:e})}ah.displayName=`@mantine/core/ModalStack`;var oh=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalTitle`,null,e),s=Jm();return(0,G.jsx)(Xu,{...s.getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});oh.classes=Ym,oh.displayName=`@mantine/core/ModalTitle`;var sh={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ie(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},ch=J(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=K(`Modal`,sh,e),f=(0,C.use)(ih),p=!!t||i,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l),__handledEscapeEvents:f.handledEscapeEvents}:{},h=n===!1?!1:l&&f?f.currentId===l:c;return(0,C.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||ie(`modal`)):f.removeModal(l))},[c,l,u]),(0,G.jsxs)(rh,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[n&&(0,G.jsx)(eh,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,G.jsxs)(Qm,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,G.jsxs)($m,{children:[t&&(0,G.jsx)(oh,{children:t}),i&&(0,G.jsx)(Zm,{...a})]}),(0,G.jsx)(Xm,{children:o})]})]})});ch.classes=Ym,ch.displayName=`@mantine/core/Modal`,ch.Root=rh,ch.Overlay=eh,ch.Content=Qm,ch.Body=Xm,ch.Header=$m,ch.Title=oh,ch.CloseButton=Zm,ch.Stack=ah;var lh=(0,C.createContext)(null),uh={root:`m_7cda1cd6`,"root--default":`m_44da308b`,"root--contrast":`m_e3a01f8`,label:`m_1e0e6180`,remove:`m_ae386778`,group:`m_1dcfd90b`},dh=(0,C.createContext)(null),fh=Mt((e,{gap:t},{size:n})=>({group:{"--pg-gap":t===void 0?H(n,`pg-gap`):H(t)}})),ph=J(e=>{let t=K(`PillGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,disabled:l,attributes:u,...d}=t,f=(0,C.use)(lh)?.size||c||void 0,p=q({name:`PillGroup`,classes:uh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:fh,stylesCtx:{size:f},rootSelector:`group`});return(0,G.jsx)(dh,{value:{size:f,disabled:l},children:(0,G.jsx)(Y,{size:f,...p(`group`),...d})})});ph.classes=uh,ph.varsResolver=fh,ph.displayName=`@mantine/core/PillGroup`;var mh={variant:`default`},hh=Mt((e,{radius:t},{size:n})=>({root:{"--pill-fz":H(n,`pill-fz`),"--pill-height":H(n,`pill-height`),"--pill-radius":t===void 0?void 0:U(t)}})),gh=J(e=>{let t=K(`Pill`,mh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,variant:c,children:l,withRemoveButton:u,onRemove:d,removeButtonProps:f,radius:p,size:m,disabled:h,mod:g,attributes:_,...v}=t,y=(0,C.use)(dh),b=(0,C.use)(lh),x=m||y?.size||void 0,S=b?.variant===`filled`?`contrast`:c||`default`,w=q({name:`Pill`,classes:uh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:_,vars:s,varsResolver:hh,stylesCtx:{size:x}});return(0,G.jsxs)(Y,{component:`span`,variant:S,size:x,...w(`root`,{variant:S}),mod:[{"with-remove":u&&!h,disabled:h||y?.disabled},g],...v,children:[(0,G.jsx)(`span`,{...w(`label`),children:l}),u&&(0,G.jsx)(Sl,{variant:`transparent`,radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:o,...f,...w(`remove`,{className:f?.className,style:f?.style}),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),f?.onMouseDown?.(e)},onClick:e=>{e.stopPropagation(),d?.(),f?.onClick?.(e)}})]})});gh.classes=uh,gh.varsResolver=hh,gh.displayName=`@mantine/core/Pill`,gh.Group=ph;var _h={field:`m_45c4369d`},vh={type:`visible`},yh=J(e=>{let t=K(`PillsInputField`,vh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,type:c,disabled:l,id:u,pointer:d,mod:f,attributes:p,ref:m,...h}=t,g=(0,C.use)(lh),_=(0,C.use)(nd),v=q({name:`PillsInputField`,classes:_h,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,rootSelector:`field`}),y=l||g?.disabled;return(0,G.jsx)(Y,{component:`input`,ref:ot(m,g?.fieldRef),"data-type":c,disabled:y,mod:[{disabled:y,pointer:d},f],...v(`field`),...h,id:_?.inputId||u,"aria-invalid":g?.hasError,"aria-describedby":_?.describedBy,type:`text`,onMouseDown:e=>!d&&e.stopPropagation()})});yh.classes=_h,yh.displayName=`@mantine/core/PillsInputField`;var bh={size:`sm`},xh=J(e=>{let{children:t,onMouseDown:n,onClick:r,size:i,disabled:a,__staticSelector:o,error:s,variant:c,...l}=K([`Input`,`InputWrapper`,`PillsInput`],bh,e),u=(0,C.useRef)(null);return(0,G.jsx)(lh,{value:{fieldRef:u,size:i,disabled:a,hasError:!!s,variant:c},children:(0,G.jsx)(Cd,{size:i,error:s,variant:c,component:`div`,"data-no-overflow":!0,onMouseDown:e=>{e.preventDefault(),n?.(e),u.current?.focus()},onClick:e=>{e.preventDefault(),e.currentTarget.closest(`fieldset`)?.disabled||(u.current?.focus(),r?.(e))},...l,multiline:!0,disabled:a,__staticSelector:o||`PillsInput`,withAria:!1,children:t})})});xh.displayName=`@mantine/core/PillsInput`,xh.classes=Cd.classes,xh.Field=yh;function Sh(e,t){let n=t.trim().toLowerCase();if(n===``)return;let r=Object.values(e).filter(e=>!e.disabled&&e.label.trim().toLowerCase()===n);return r.length===1?r[0]:void 0}function Ch(e){return typeof e==`string`?e.trim().toLowerCase():e}function wh({data:e,value:t}){let n=t.map(Ch);return e.reduce((e,t)=>(Uf(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(Ch(e.value))===-1)}):n.indexOf(Ch(t.value))===-1&&e.push(t),e),[])}var Th={xs:41,sm:50,md:60,lg:72,xl:89},Eh={maxValues:1/0,withCheckIcon:!0,checkIconPosition:`left`,hiddenInputValuesDivider:`,`,clearSearchOnChange:!0,openOnFocus:!0,size:`sm`},Dh=jr(e=>{let t=K([`Input`,`InputWrapper`,`MultiSelect`],Eh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,value:l,defaultValue:u,onChange:d,onKeyDown:f,variant:p,data:m,dropdownOpened:h,defaultDropdownOpened:g,onDropdownOpen:_,onDropdownClose:v,selectFirstOptionOnChange:y,selectFirstOptionOnDropdownOpen:b,onOptionSubmit:x,comboboxProps:S,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,searchValue:k,defaultSearchValue:A,onSearchChange:j,readOnly:M,disabled:N,onFocus:P,onBlur:F,radius:I,rightSection:L,rightSectionWidth:R,rightSectionPointerEvents:z,rightSectionProps:B,leftSection:ee,leftSectionWidth:te,leftSectionPointerEvents:ne,leftSectionProps:V,inputContainer:re,inputWrapperOrder:ie,withAsterisk:ae,labelProps:oe,descriptionProps:H,errorProps:se,successProps:U,wrapperProps:ce,description:W,label:le,error:ue,success:de,maxValues:fe,searchable:pe,nothingFoundMessage:me,withCheckIcon:he,withAlignedLabels:ge,checkIconPosition:_e,hidePickedOptions:ve,withErrorStyles:ye,withSuccessStyles:be,name:xe,form:Se,id:Ce,clearable:we,clearSectionMode:Te,clearButtonProps:Ee,hiddenInputProps:De,placeholder:Oe,hiddenInputValuesDivider:ke,required:Ae,mod:je,renderOption:Me,renderPill:Ne,onRemove:Pe,onClear:Fe,onMaxValues:Ie,scrollAreaProps:Le,chevronColor:Re,attributes:ze,clearSearchOnChange:Be,openOnFocus:Ve,loading:He,loadingPosition:Ue,withPillsReorder:We,...Ge}=t,Ke=nt(Ce),qe=ep({id:Ke,label:le,labelProps:oe,inputWrapperOrder:ie}),Je=Vd(m),Ye=Hd(Je),Xe=(0,C.useRef)({}),Ze=_f({opened:h,defaultOpened:g,onDropdownOpen:()=>{_?.(),b&&Ze.selectFirstOption()},onDropdownClose:()=>{v?.(),Ze.resetSelectedOption()}}),{styleProps:Qe,rest:{type:$e,autoComplete:et,...tt}}=rr(Ge),[rt,it]=st({value:l,defaultValue:u,finalValue:[],onChange:d}),{getPillProps:at,getListProps:ot,handleInputKeyDown:ct}=$f({value:rt,onChange:it,enabled:We&&!N&&!M}),[lt,ut]=st({value:k,defaultValue:A,finalValue:``,onChange:j}),dt=e=>{ut(e),Ze.resetSelectedOption()},ft=q({name:`MultiSelect`,classes:{},props:t,classNames:n,styles:a,unstyled:o,attributes:ze}),{resolvedClassNames:pt,resolvedStyles:mt}=Fn({props:t,styles:a,classNames:n}),ht=e=>{f?.(e),!e.defaultPrevented&&(e.key===` `&&!pe&&(e.preventDefault(),Ze.toggleDropdown()),e.key===`Backspace`&<.length===0&&rt.length>0&&!M&&(Pe?.(rt[rt.length-1]),it(rt.slice(0,rt.length-1))),ct(e))},gt=rt.map((e,t)=>{let n=Ye[`${e}`]||Xe.current[`${e}`],r=at(t);return Ne?(0,G.jsx)(C.Fragment,{children:Ne({option:n,value:e,onRemove:()=>{it(rt.filter(t=>e!==t)),Pe?.(e)},disabled:N,reorderProps:r})},`${e}-${t}`):(0,G.jsx)(gh,{withRemoveButton:!M&&!Ye[`${e}`]?.disabled,onRemove:()=>{it(rt.filter(t=>e!==t)),Pe?.(e)},unstyled:o,disabled:N,...ft(`pill`),...r,children:n?.label||e},`${e}-${t}`)});(0,C.useEffect)(()=>{y&&Ze.selectFirstOption()},[y,lt]),(0,C.useEffect)(()=>{rt.forEach(e=>{`${e}`in Ye&&(Xe.current[`${e}`]=Ye[`${e}`])})},[Ye,rt]);let _t=(0,G.jsx)(bf.ClearButton,{...Ee,onClear:()=>{Fe?.(),it([]),dt(``)}}),vt=wh({data:Je,value:rt}),yt=we&&rt.length>0&&!N&&!M,bt=yt?{paddingInlineEnd:Th[c]??Th.sm}:void 0;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(bf,{store:Ze,classNames:pt,styles:mt,unstyled:o,size:c,readOnly:M,__staticSelector:`MultiSelect`,attributes:ze,floatingHeight:O,onOptionSubmit:e=>{x?.(e),Be&&dt(``),Ze.updateSelectedOptionIndex(`selected`),rt.includes(Ye[`${e}`].value)?(it(rt.filter(t=>t!==Ye[`${e}`].value)),Pe?.(Ye[`${e}`].value)):rt.length<fe?it([...rt,Ye[`${e}`].value]):Ie?.()},...S,children:[(0,G.jsx)(bf.DropdownTarget,{children:(0,G.jsx)(xh,{...Qe,__staticSelector:`MultiSelect`,classNames:pt,styles:mt,unstyled:o,size:c,className:r,style:i,variant:p,disabled:N,radius:I,__defaultRightSection:(0,G.jsx)(bf.Chevron,{size:c,error:ue,unstyled:o,color:Re}),__clearSection:_t,__clearable:yt,__clearSectionMode:Te,rightSection:L,rightSectionPointerEvents:z||`none`,rightSectionWidth:R,rightSectionProps:B,leftSection:ee,leftSectionWidth:te,leftSectionPointerEvents:ne,leftSectionProps:V,loading:He,loadingPosition:Ue,inputContainer:re,inputWrapperOrder:ie,withAsterisk:ae,labelProps:oe,descriptionProps:H,errorProps:se,successProps:U,wrapperProps:ce,description:W,label:le,error:ue,success:de,withErrorStyles:ye,withSuccessStyles:be,__stylesApiProps:{...t,rightSectionPointerEvents:z||`none`,multiline:!0},pointer:!pe,onClick:()=>pe?Ze.openDropdown():Ze.toggleDropdown(),"data-expanded":Ze.dropdownOpened||void 0,id:Ke,required:Ae,mod:je,attributes:ze,children:(0,G.jsxs)(gh.Group,{attributes:ze,disabled:N,unstyled:o,...ft(`pillsList`,{style:bt}),...ot(),children:[gt,(0,G.jsx)(bf.EventsTarget,{autoComplete:et,withExpandedAttribute:!0,children:(0,G.jsx)(xh.Field,{...tt,id:Ke,placeholder:Oe,type:!pe&&!Oe?`hidden`:`visible`,...ft(`inputField`),unstyled:o,onFocus:e=>{P?.(e),Ve&&pe&&Ze.openDropdown()},onBlur:e=>{F?.(e),Ze.closeDropdown(),dt(``)},onKeyDown:ht,value:lt,onChange:e=>{if(bp(e)){if(!M){let t=Sh(Ye,e.currentTarget.value);t&&!rt.includes(t.value)&&rt.length<fe&&it([...rt,t.value])}}else dt(e.currentTarget.value),pe&&Ze.openDropdown(),y&&Ze.selectFirstOption()},disabled:N,readOnly:M||!pe,pointer:!pe})})]})})}),(0,G.jsx)(Yf,{data:ve?vt:Je,hidden:M||N,filter:w,search:lt,limit:T,hiddenWhenEmpty:!me,withScrollArea:E,maxDropdownHeight:D,filterOptions:pe,value:rt,checkIconPosition:_e,withCheckIcon:he,withAlignedLabels:ge,nothingFoundMessage:me,unstyled:o,labelId:qe,"aria-label":qe?void 0:Ge[`aria-label`],renderOption:Me,scrollAreaProps:Le})]}),(0,G.jsx)(bf.HiddenInput,{name:xe,valuesDivider:ke,value:rt,form:Se,disabled:N,...De})]})});Dh.classes={...Cd.classes,...bf.classes},Dh.displayName=`@mantine/core/MultiSelect`;function Oh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var kh;(function(e){e.event=`event`,e.props=`prop`})(kh||={});function Ah(){}function jh(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})||(t=r,n=e.apply(void 0,r)),n}}function Mh(e){return!!(e||``).match(/\d/)}function Nh(e){return e==null}function Ph(e){return typeof e==`number`&&isNaN(e)}function Fh(e){return Nh(e)||Ph(e)||typeof e==`number`&&!isFinite(e)}function Ih(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function Lh(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Rh(e,t,n){var r=Lh(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function zh(e){var t=(0,C.useRef)(e);return t.current=e,(0,C.useRef)(function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}).current}function Bh(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function Vh(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function Hh(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function Uh(e,t){return Array(t+1).join(e)}function Wh(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+Uh(`0`,Math.abs(o))+i:o>=s?i+=Uh(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function Gh(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=Bh(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=Hh(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function Kh(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var qh=jh(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),Jh=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function Yh(e,t,n){return Math.min(Math.max(e,t),n)}function Xh(e){return Math.max(e.selectionStart,e.selectionEnd)}function Zh(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Qh(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function $h(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function eg(e,t,n,r,i,a,o){o===void 0&&(o=$h);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function tg(e,t,n,r){var i=e.length;if(t=Yh(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function ng(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(Mh(e[n])||Mh(e[n-1]));return t}function rg(e,t,n,r,i,a){a===void 0&&(a=Ah);var o=zh(function(e,t){var n,a;return Fh(e)?(a=``,n=``):typeof e==`number`||t?(a=typeof e==`number`?Wh(e):e,n=r(a)):(a=i(e,void 0),n=r(a)),{formattedValue:n,numAsString:a}}),s=(0,C.useState)(function(){return o(Nh(e)?t:e,n)}),c=s[0],l=s[1],u=zh(function(e,t){e.formattedValue!==c.formattedValue&&l({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}),d=e,f=n;Nh(e)&&(d=c.numAsString,f=!0);var p=o(d,f);return(0,C.useMemo)(function(){l(p)},[p.formattedValue]),(0,C.useEffect)(function(){if(!Nh(t)&&Nh(e)&&c.formattedValue!==``){var n=parseFloat(c.numAsString);u({formattedValue:c.formattedValue,value:c.numAsString,floatValue:isNaN(n)?void 0:n},{event:void 0,source:kh.props})}},[]),[c,u]}function ig(e){return e.replace(/[^0-9]/g,``)}function ag(e){return e}function og(e){var t=e.type;t===void 0&&(t=`text`);var n=e.displayType;n===void 0&&(n=`input`);var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=ag);var s=e.removeFormatting;s===void 0&&(s=ig);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=Ah);var p=e.onKeyDown;p===void 0&&(p=Ah);var m=e.onMouseUp;m===void 0&&(m=Ah);var h=e.onFocus;h===void 0&&(h=Ah);var g=e.onBlur;g===void 0&&(g=Ah);var _=e.value,v=e.getCaretBoundary;v===void 0&&(v=ng);var y=e.isValidInputCharacter;y===void 0&&(y=Mh);var b=e.isCharacterSame,x=Oh(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),S=rg(_,c,!!l,o,s,u),w=S[0],T=w.formattedValue,E=w.numAsString,D=S[1],O=(0,C.useRef)(),k=(0,C.useRef)({formattedValue:T,numAsString:E}),A=function(e,t){k.current={formattedValue:e.formattedValue,numAsString:e.value},D(e,t)},j=(0,C.useState)(!1),M=j[0],N=j[1],P=(0,C.useRef)(null),F=(0,C.useRef)({setCaretTimeout:null,focusTimeout:null});(0,C.useEffect)(function(){return N(!0),function(){clearTimeout(F.current.setCaretTimeout),clearTimeout(F.current.focusTimeout)}},[]);var I=o,L=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},R=function(e,t,n){(e.selectionStart!==0||e.selectionEnd!==e.value.length)&&(Kh(e,t),F.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&Kh(e,t)},0))},z=function(e,t,n){return tg(e,t,v(e),n)},B=function(e,t,n){var r=v(t),i=eg(t,T,e,n,r,y,b);return i=tg(t,i,r),i},ee=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=Xh(n);n.value=t,o=B(s,t,c),o!==void 0&&R(n,o,t)}t!==T&&A(L(t,a),{event:i,source:r})};(0,C.useEffect)(function(){var e=k.current,t=e.formattedValue,n=e.numAsString;(T!==t||E!==n)&&A(L(T,E),{event:void 0,source:kh.props})},[T,E]);var te=P.current?Xh(P.current):void 0;(typeof window<`u`?C.useLayoutEffect:C.useEffect)(function(){var e=P.current;if(T!==k.current.formattedValue&&e){var t=B(k.current.formattedValue,T,te);e.value=T,R(e,t,T)}},[T]);var ne=function(e,t,n){var r=t.target,i=O.current?Jh(O.current,r.selectionEnd):qh(T,e),a=Object.assign(Object.assign({},i),{lastValue:T}),o=s(e,a),c=I(o);if(o=s(c,void 0),d&&!d(L(c,o))){var l=t.target,u=B(e,T,Xh(l));return l.value=T,R(l,u,T),!1}return ee({formattedValue:c,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},V=function(e,t){t===void 0&&(t=0),O.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},re=function(e){var t=e.target.value;ne(t,e,kh.event)&&f(e),O.current=void 0},ie=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c)p(e),V(t,s);else{var l=o;c?(l=z(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!y(a[o])?l=z(a,o,`right`):n===`Backspace`&&!y(a[o])&&(l=z(a,o,`left`)),l!==o&&R(t,l,a),p(e),V(t,s)}},ae=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=z(r,e);i!==e&&R(t,i,r)}};n(),requestAnimationFrame(function(){n()}),m(e),V(t)},oe=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;P.current=t,F.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=z(a,r);o!==r&&(r!==0||i!==a.length)&&R(t,o,a),h(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},H=function(e){P.current=null,clearTimeout(F.current.focusTimeout),clearTimeout(F.current.setCaretTimeout),g(e)},se=M&&Zh()?`numeric`:void 0,U=Object.assign({inputMode:se},x,{type:t,value:T,onChange:re,onKeyDown:ie,onMouseUp:ae,onFocus:oe,onBlur:H});if(n===`text`)return i?C.createElement(C.Fragment,null,i(T,x)||null):C.createElement(`span`,Object.assign({},x,{ref:a}),T);if(r){var ce=r;return C.createElement(ce,Object.assign({},U,{ref:a}))}return C.createElement(`input`,Object.assign({},U,{ref:a}))}function sg(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=cg(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,f=Bh(e,o),p=f.beforeDecimal,m=f.afterDecimal,h=f.addNegation;return n!==void 0&&(m=Hh(m,n,!!r)),l&&(p=Rh(p,l,s)),i&&(p=i+p),a&&(m+=a),h&&(p=`-`+p),e=p+(d&&u||``)+m,e}function cg(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function lg(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function ug(e,t){return RegExp(`(^-)|[0-9]|`+Ih(e),t?`g`:void 0)}function dg(e,t,n){return e===``||!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function fg(e,t,n){var r;t===void 0&&(t=Qh(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var o=n.suffix;o===void 0&&(o=``);var s=n.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=cg(n),p=f.allowedDecimalSeparators,m=f.decimalSeparator,h=e[d]===m;if(Mh(e)&&(e===a||e===o)&&t.lastValue===``)return e;if(d-u===1&&p.indexOf(e[u])!==-1){var g=s===0?``:m;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var _=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):o.startsWith(`-`)&&e.length===o.length?r=!1:e[0]===`-`&&(r=!0);var s=+!!r;return i&&(s=2),s&&(e=e.substring(s),t-=s,n-=s),{value:e,start:t,end:n,hasNegation:r}},v=_(e,u,d),y=v.hasNegation;r=v,e=r.value,u=r.start,d=r.end;var b=_(t.lastValue,c.start,c.end),x=b.start,S=b.end,C=b.value,w=e.substring(u,d);e.length&&C.length&&(x>C.length-o.length||S<a.length)&&!(w&&o.startsWith(w))&&(e=C);var T=0;e.startsWith(a)?T+=a.length:u<a.length&&(T=u),e=e.substring(T),d-=T;var E=e.length,D=e.length-o.length;e.endsWith(o)?E=D:(d>D||d>e.length-o.length)&&(E=d),e=e.substring(0,E),e=lg(y?`-`+e:e,i),e=(e.match(ug(m,!0))||[]).join(``);var O=e.indexOf(m);e=e.replace(new RegExp(Ih(m),`g`),function(e,t){return t===O?`.`:``});var k=Bh(e,i),A=k.beforeDecimal,j=k.afterDecimal,M=k.addNegation;return l.end-l.start<c.end-c.start&&A===``&&h&&!parseFloat(j)&&(e=M?`-`:``),e}function pg(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,Math.min(n.length+ +!!a,e.length));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function mg(e){var t=cg(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
|
|
43
|
-
Decimal separator can't be same as thousand separator.
|
|
44
|
-
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
45
|
-
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|
|
46
|
-
`);return i.startsWith(`-`)&&a&&(console.error(`
|
|
47
|
-
Prefix can't start with '-' when allowNegative is true.
|
|
48
|
-
prefix: `+i+`
|
|
49
|
-
allowNegative: `+a+`
|
|
50
|
-
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function hg(e){e=mg(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=Ah);var a=e.onBlur;a===void 0&&(a=Ah);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=Oh(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=cg(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return sg(t,e)},y=function(t,n){return fg(t,n,e)},b=Nh(d)?u:d,x=f??dg(b,l,t);Nh(d)?Nh(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return Fh(e)?e:(typeof e==`number`&&(e=Wh(e)),x&&typeof s==`number`?Gh(e,s,!!c):e)},C=rg(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g||Mh(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=qh(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)<i&&p(r)>a?!1:i>=f.start&&i<f.end&&_&&_.includes(o)&&u===g?!0:o===u},onValueChange:D,format:v,removeFormatting:y,getCaretBoundary:function(t){return pg(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,u=t.selectionEnd,d=t.value;if(d===void 0&&(d=``),(r===`Backspace`||r===`Delete`)&&u<l.length&&d!==`-`)e.preventDefault();else if(a!==u)i(e);else{r===`Backspace`&&d[0]===`-`&&a===l.length+1&&n&&Kh(t,1),s&&c&&(r===`Backspace`&&d[a-1]===g?(Kh(t,a-1),e.preventDefault()):r===`Delete`&&d[a]===g&&e.preventDefault()),_?.includes(r)&&d[a]===g&&Kh(t,a+1);var f=o===!0?`,`:o;r===`Backspace`&&d[a-1]===f&&Kh(t,a-1),r===`Delete`&&d[a]===f&&Kh(t,a+1),i(e)}},onBlur:function(t){var n=T;n.match(/\d/g)||(n=``),r||(n=Vh(n)),c&&s&&(n=Gh(n,s,c)),n!==T&&D({formattedValue:sg(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:kh.event}),a(t)}})}function gg(e){var t=hg(e);return C.createElement(og,Object.assign({},t))}function _g(e,t){return/\d/.test(e)||e===t}function vg(e,t,n,r){let i=0;for(let n=0;n<t&&n<e.length;n+=1)_g(e[n],r)&&(i+=1);if(i===0)return Math.min(t,n.length);for(let e=0;e<n.length;e+=1)if(_g(n[e],r)&&(--i,i===0))return e+1;return n.length}function yg(e,t){let n=0;for(;t+n<e.length&&/\d/.test(e[t+n]);)n+=1;return n}function bg(e,{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r,thousandsGroupStyle:i}){let a=new Set([...r,t].filter(e=>e.length===1)),o=e.split(``),s=o.reduce((e,t,n)=>(a.has(t)&&e.push(n),e),[]);if(s.length===0)return e;let c=s[s.length-1],l=o[c],u=s.filter(e=>o[e]===l).length,d=i===`wan`?4:3,f=-1;return u===1&&(f=l===t?c:l===n&&yg(e,c+1)===d?-1:c),o.map((e,r)=>r===f?t:a.has(e)&&e!==n?``:e).join(``)}function xg({direction:e,style:t,...n}){return(0,G.jsx)(`svg`,{style:{width:`var(--ni-chevron-size)`,height:`var(--ni-chevron-size)`,transform:e===`up`?`rotate(180deg)`:void 0,...t},viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...n,children:(0,G.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var Sg={root:`m_e2f5cd4e`,controls:`m_95e17d22`,control:`m_80b4b171`},Cg=/^(0\.0*|-0(\.0*)?)$/,wg=/^-?0\d+(\.\d+)?\.?$/,Tg=/\.\d*0$/,Eg=/^-?\d+\.$/;function Dg(e){return typeof e==`string`&&e!==``&&!Number.isNaN(Number(e))}function Og(e){return typeof e==`bigint`}function kg(e){return typeof e==`number`?e<2**53-1:e===``||Dg(e)&&Number(e)<2**53-1}function Ag(e,t){return e===``||e===`-`||!t&&e.startsWith(`-`)?!1:/^-?\d+$/.test(e)}function jg(e,t){return typeof e==`bigint`||e===``||Ag(e,t)}function Mg(e){if(!/^-?\d+$/.test(e))return null;try{return BigInt(e)}catch{return null}}function Ng(e){if(typeof e==`bigint`)return e;if(typeof e==`number`&&Number.isFinite(e)&&Number.isInteger(e))return BigInt(e)}function Pg(e,t,n){return t!==void 0&&e<t?t:n!==void 0&&e>n?n:e}function Fg(e){return e.toString().replace(`.`,``).length}function Ig(e,t){return(typeof e==`number`?e<2**53-1:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&Fg(t)<14&&t!==``}function Lg(e,t,n){return e===void 0||(t===void 0||e>=t)&&(n===void 0||e<=n)}var Rg={size:`sm`,step:1,clampBehavior:`blur`,allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[`.`,`,`]},zg=Mt((e,{size:t})=>({controls:{"--ni-chevron-size":H(t,`ni-chevron-size`)}}));function Bg(e,t){return t?`${e}.`:e}function Vg(e,t){let n=Eg.test(e),r=t.trim?e.replace(/^0+(?=\d)/,``):e,i=parseFloat(r);if(Number.isNaN(i))return r;if(!t.clamp)return t.trim?Bg(i,n):e;let a=i>2**53-1&&t.max!==void 0?t.max:he(i,t.min,t.max);return!t.trim&&a===i?e:Bg(a,n)}function Hg(e,t){if(e===``||e===`-`)return e;let n=Mg(e);return n===null?e:t.clampBehavior===`blur`?Pg(n,t.min,t.max):n}var Ug=jr(e=>{let t=K([`Input`,`InputWrapper`,`NumberInput`],Rg,e),{className:n,classNames:r,styles:i,unstyled:a,vars:o,onChange:s,onValueChange:c,value:l,defaultValue:u,max:d,min:f,step:p,hideControls:m,rightSection:h,isAllowed:g,clampBehavior:_,onBlur:v,allowDecimal:y,decimalScale:b,onKeyDown:x,onKeyDownCapture:S,handlersRef:w,startValue:T,disabled:E,rightSectionPointerEvents:D,allowNegative:O,readOnly:k,size:A,rightSectionWidth:j,stepHoldInterval:M,stepHoldDelay:N,allowLeadingZeros:P,withKeyboardEvents:F,trimLeadingZeroesOnBlur:I,allowedDecimalSeparators:L,selectAllOnFocus:R,onMinReached:z,onMaxReached:B,onFocus:ee,attributes:te,ref:ne,...V}=t,re=O??!0,ie=P??!0,oe=q({name:`NumberInput`,classes:Sg,props:t,classNames:r,styles:i,unstyled:a,attributes:te,vars:o,varsResolver:zg}),{resolvedClassNames:H,resolvedStyles:se}=Fn({classNames:r,styles:i,props:t}),U=(0,C.useRef)(Og(l)||Og(u)?`bigint`:`number`);Og(l)?U.current=`bigint`:typeof l==`number`&&(U.current=`number`);let ce=U.current===`bigint`,[W,le]=st({value:l,defaultValue:u,finalValue:``,onChange:s}),ue=N!==void 0&&M!==void 0,de=(0,C.useRef)(null),fe=(0,C.useRef)(null),pe=(0,C.useRef)(0),me=typeof f==`number`?f:void 0,ge=typeof d==`number`?d:void 0,_e=typeof p==`number`?p:Rg.step,ve=typeof T==`number`?T:Rg.startValue,ye=Ng(f),be=Ng(d),xe=Ng(p)??BigInt(1),Se=Ng(T)??BigInt(0),Ce=e=>!Ag(e,re)||ie&&wg.test(e)?e:Mg(e)??e,we=e=>{let t=Number(e);return Number.isSafeInteger(t)?t:void 0},Te=(e,t)=>{t.source===`event`&&le(ce?Ce(e.value):Ig(e.floatValue,e.value)&&!Cg.test(e.value)&&!(ie&&wg.test(e.value))&&!Tg.test(e.value)&&!Eg.test(e.value)?e.floatValue:e.value),c?.(e,t)},Ee=e=>{let t=String(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},De=e=>{de.current&&e!==void 0&&de.current.setSelectionRange(e,e)},Oe=(0,C.useRef)(ae);Oe.current=()=>{if(ce){if(!jg(W,re))return;let e,t=W;if(typeof t==`bigint`){let n=t+xe;be!==void 0&&n>be&&B?.(),e=be!==void 0&&n>be?be:n}else if(typeof t==`string`&&t!==``){let n=Mg(t);if(n===null)return;let r=n+xe;be!==void 0&&r>be&&B?.(),e=be!==void 0&&r>be?be:r}else e=Pg(Se,ye,be);let n=e.toString();le(e),c?.({floatValue:we(e),formattedValue:n,value:n},{source:`increment`}),setTimeout(()=>De(de.current?.value.length),0);return}if(!kg(W))return;let e,t=Ee(W),n=Ee(_e),r=Math.max(t,n),i=10**r;if(!Dg(W)&&(typeof W!=`number`||Number.isNaN(W)))e=he(ve,me,ge);else if(ge!==void 0){let t=(Math.round(Number(W)*i)+Math.round(_e*i))/i;t>ge&&B?.(),e=t<=ge?t:ge}else e=(Math.round(Number(W)*i)+Math.round(_e*i))/i;let a=e.toFixed(r);le(parseFloat(a)),c?.({floatValue:parseFloat(a),formattedValue:a,value:a},{source:`increment`}),setTimeout(()=>De(de.current?.value.length),0)};let ke=(0,C.useRef)(ae);ke.current=()=>{if(ce){if(!jg(W,re))return;let e,t=ye===void 0?re?void 0:BigInt(0):ye,n=W;if(typeof n==`bigint`){let r=n-xe;t!==void 0&&r<t&&z?.(),e=t!==void 0&&r<t?t:r}else if(typeof n==`string`&&n!==``){let r=Mg(n);if(r===null)return;let i=r-xe;t!==void 0&&i<t&&z?.(),e=t!==void 0&&i<t?t:i}else e=Pg(Se,t,be);let r=e.toString();le(e),c?.({floatValue:we(e),formattedValue:r,value:r},{source:`decrement`}),setTimeout(()=>De(de.current?.value.length),0);return}if(!kg(W))return;let e,t=me===void 0?re?-(2**53-1):0:me,n=Ee(W),r=Ee(_e),i=Math.max(n,r),a=10**i;if(!Dg(W)&&typeof W!=`number`||Number.isNaN(W))e=he(ve,t,ge);else{let n=(Math.round(Number(W)*a)-Math.round(_e*a))/a;t!==void 0&&n<t&&z?.(),e=t!==void 0&&n<t?t:n}let o=e.toFixed(i);le(parseFloat(o)),c?.({floatValue:parseFloat(o),formattedValue:o,value:o},{source:`decrement`}),setTimeout(()=>De(de.current?.value.length),0)};let Ae=e=>{let t=e.clipboardData.getData(`text`),n=V.decimalSeparator||`.`,r=bg(t,{decimalSeparator:n,thousandSeparator:V.thousandSeparator===!0?`,`:V.thousandSeparator===!1?void 0:V.thousandSeparator,allowedDecimalSeparators:L||[`.`,`,`],thousandsGroupStyle:V.thousandsGroupStyle});if(r!==t){e.preventDefault();let t=de.current;if(t){let e=t.selectionStart??0,i=t.selectionEnd??0,a=t.value,o=a.substring(0,e)+r+a.substring(i);(Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(t,o),t.dispatchEvent(new Event(`change`,{bubbles:!0}));let s=e+r.length;setTimeout(()=>De(vg(o,s,t.value,n)),0)}}V.onPaste?.(e)},je=e=>{x?.(e),!k&&F&&(e.key===`ArrowUp`&&(e.preventDefault(),Oe.current?.()),e.key===`ArrowDown`&&(e.preventDefault(),ke.current?.()))},Me=e=>{if(S?.(e),e.key===`Backspace`){let t=de.current;t&&t.selectionStart===0&&t.selectionStart===t.selectionEnd&&(e.preventDefault(),window.setTimeout(()=>De(0),0))}},Ne=e=>{R&&window.setTimeout(()=>de.current?.select(),0),ee?.(e)},Pe=e=>{let t=W;ce?(_===`blur`&&typeof t==`bigint`&&(t=Pg(t,ye,be)),I&&typeof t==`string`&&(t=Hg(t,{min:ye,max:be,clampBehavior:_}))):typeof t==`number`?_===`blur`&&(t=he(t,me,ge)):typeof t==`string`&&(t=Vg(t,{min:me,max:ge,trim:!!I&&Ee(t)<15,clamp:_===`blur`})),W!==t&&le(t),v?.(e)};it(w,{increment:Oe.current,decrement:ke.current});let Fe=e=>{e?Oe.current?.():ke.current?.(),pe.current+=1},Ie=e=>{if(Fe(e),ue){let t=typeof M==`number`?M:M(pe.current);fe.current=window.setTimeout(()=>Ie(e),t)}},Le=(e,t)=>{e.preventDefault(),de.current?.focus(),Fe(t),ue&&(fe.current=window.setTimeout(()=>Ie(t),N))},Re=()=>{fe.current&&window.clearTimeout(fe.current),fe.current=null,pe.current=0},ze=(0,G.jsxs)(`div`,{...oe(`controls`),children:[(0,G.jsx)(sc,{...oe(`control`),tabIndex:-1,"aria-hidden":!0,disabled:E||typeof W==`number`&&ge!==void 0&&W>=ge||typeof W==`bigint`&&be!==void 0&&W>=be,mod:{direction:`up`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Le(e,!0)},onPointerUp:Re,onPointerLeave:Re,children:(0,G.jsx)(xg,{direction:`up`})}),(0,G.jsx)(sc,{...oe(`control`),tabIndex:-1,"aria-hidden":!0,disabled:E||typeof W==`number`&&me!==void 0&&W<=me||typeof W==`bigint`&&ye!==void 0&&W<=ye,mod:{direction:`down`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Le(e,!1)},onPointerUp:Re,onPointerLeave:Re,children:(0,G.jsx)(xg,{direction:`down`})})]});return(0,G.jsx)(Cd,{component:gg,allowNegative:O,className:Pt(Sg.root,n),size:A,...V,inputMode:ce?`numeric`:`decimal`,readOnly:k,disabled:E,value:typeof W==`bigint`?W.toString():W,getInputRef:ot(ne,de),onValueChange:Te,rightSection:m||k||!(ce?jg(W,re):kg(W))?h:h||ze,classNames:H,styles:se,unstyled:a,__staticSelector:`NumberInput`,decimalScale:ce?0:y?b:0,onPaste:Ae,onFocus:Ne,onKeyDown:je,onKeyDownCapture:Me,rightSectionPointerEvents:D??(E?`none`:void 0),rightSectionWidth:j??`var(--ni-right-section-width-${A||`sm`})`,allowLeadingZeros:P,allowedDecimalSeparators:L,onBlur:Pe,attributes:te,isAllowed:e=>{if(g&&!g(e))return!1;if(_!==`strict`)return!0;if(!ce)return Lg(e.floatValue,me,ge);if(e.value===``||e.value===`-`)return!0;let t=Mg(e.value);return t===null||(ye===void 0||t>=ye)&&(be===void 0||t<=be)}})});Ug.classes={...Cd.classes,...Sg},Ug.varsResolver=zg,Ug.displayName=`@mantine/core/NumberInput`;var[Wg,Gg]=R(`Pagination.Root component was not found in tree`),Kg={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`,items:`m_105fdbed`,label:`m_10817321`},qg={withPadding:!0},Jg=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,active:o,disabled:s,withPadding:c,mod:l,...u}=K(`PaginationControl`,qg,e),d=Gg(),f=s||d.disabled;return(0,G.jsx)(sc,{disabled:f,mod:[{active:o,disabled:f,"with-padding":c},l],...d.getStyles(`control`,{className:n,style:r,classNames:t,styles:i,active:!f}),...u})});Jg.classes=Kg,Jg.displayName=`@mantine/core/PaginationControl`;function Yg({style:e,children:t,path:n,...r}){return(0,G.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,G.jsx)(`path`,{d:n,fill:`currentColor`})})}var Xg=e=>(0,G.jsx)(Yg,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),Zg=e=>(0,G.jsx)(Yg,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),Qg=e=>(0,G.jsx)(Yg,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),$g=e=>(0,G.jsx)(Yg,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),e_={icon:e=>(0,G.jsx)(Yg,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},t_=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,...s}=K(`PaginationDots`,e_,e),c=Gg();return(0,G.jsx)(Y,{...c.getStyles(`dots`,{className:n,style:r,styles:i,classNames:t}),...s,children:(0,G.jsx)(o,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});t_.classes=Kg,t_.displayName=`@mantine/core/PaginationDots`;function n_({icon:e,name:t,action:n,type:r}){let i={icon:e},a=e=>{let{icon:a,...o}=K(t,i,e),s=Gg(),c=r===`next`?s.active===s.total:s.active===1;return(0,G.jsx)(Jg,{disabled:s.disabled||c,onClick:s[n],withPadding:!1,...o,children:(0,G.jsx)(a,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})};return a.displayName=`@mantine/core/${t}`,kr(a)}var r_=n_({icon:Xg,name:`PaginationNext`,action:`onNext`,type:`next`}),i_=n_({icon:Zg,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),a_=n_({icon:Qg,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),o_=n_({icon:$g,name:`PaginationLast`,action:`onLast`,type:`next`});function s_({dotsIcon:e}){let t=Gg(),n=t.range.map((n,r)=>n===`dots`?(0,G.jsx)(t_,{icon:e},r):(0,G.jsx)(Jg,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r));return(0,G.jsx)(G.Fragment,{children:n})}s_.displayName=`@mantine/core/PaginationItems`;var c_={formatLabel:({page:e,totalPages:t})=>`Page ${e} of ${t}`},l_=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,formatLabel:o,...s}=K(`PaginationLabel`,c_,e),c=Gg();return(0,G.jsx)(Y,{...c.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...s,children:o({page:c.active,totalPages:c.total})})});l_.classes=Kg,l_.displayName=`@mantine/core/PaginationLabel`;var u_={siblings:1,boundaries:1},d_=Mt((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:U(n),"--pagination-control-size":H(t,`pagination-control-size`),"--pagination-control-fz":ce(t),"--pagination-active-bg":r?Xt(r,e):void 0,"--pagination-active-color":sn(i,e)?rn({color:r,theme:e,autoContrast:i}):void 0}})),f_=J(e=>{let t=K(`PaginationRoot`,u_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,total:c,value:l,defaultValue:u,onChange:d,disabled:f,siblings:p,boundaries:m,color:h,radius:g,onNextPage:_,onPreviousPage:v,onFirstPage:y,onLastPage:b,getItemProps:x,autoContrast:S,startValue:C,layout:w,mod:T,attributes:E,...D}=t,O=q({name:`Pagination`,classes:Kg,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:d_}),{range:k,setPage:A,next:j,previous:M,active:N,first:P,last:F}=ut({page:l,initialPage:u,onChange:d,total:c,siblings:p,boundaries:m,startValue:C});return(0,G.jsx)(Wg,{value:{total:c,range:k,active:N,disabled:f,layout:w,getItemProps:x,onChange:A,onNext:ue(_,j),onPrevious:ue(v,M),onFirst:ue(y,P),onLast:ue(b,F),getStyles:O},children:(0,G.jsx)(Y,{...O(`root`),mod:[{layout:w},T],...D})})});f_.classes=Kg,f_.varsResolver=d_,f_.displayName=`@mantine/core/PaginationRoot`;var p_={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8};function m_({children:e}){let t=Gg();return(0,G.jsx)(Y,{...t.getStyles(`items`),children:e})}var h_=J(e=>{let{withEdges:t,withControls:n,getControlProps:r,nextIcon:i,previousIcon:a,lastIcon:o,firstIcon:s,dotsIcon:c,total:l,gap:u,hideWithOnePage:d,withPages:f,layout:p,formatLabel:m,...h}=K(`Pagination`,p_,e);if(l<=0||d&&l===1)return null;let g=f?p===`responsive`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(m_,{children:(0,G.jsx)(s_,{dotsIcon:c})}),(0,G.jsx)(l_,{formatLabel:m})]}):(0,G.jsx)(s_,{dotsIcon:c}):null;return(0,G.jsx)(f_,{total:l,layout:p,...h,children:(0,G.jsxs)(X,{gap:u,children:[t&&(0,G.jsx)(a_,{icon:s,...r?.(`first`)}),n&&(0,G.jsx)(i_,{icon:a,...r?.(`previous`)}),g,n&&(0,G.jsx)(r_,{icon:i,...r?.(`next`)}),t&&(0,G.jsx)(o_,{icon:o,...r?.(`last`)})]})})});h_.classes=Kg,h_.displayName=`@mantine/core/Pagination`,h_.Root=f_,h_.Control=Jg,h_.Dots=t_,h_.First=a_,h_.Last=o_,h_.Next=r_,h_.Previous=i_,h_.Items=s_,h_.Label=l_;function g_({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,C.useState)(n),a=(0,C.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=Ws({placement:t,middleware:[Qo({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,C.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,C.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=Vi(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var __={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},v_={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:ie(`popover`)},y_=Mt((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:U(t),"--tooltip-bg":n?Xt(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),b_=J(e=>{let t=K(`TooltipFloating`,v_,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:w,...T}=t,E=Nn(),D=q({name:`TooltipFloating`,props:t,classes:__,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:y_}),{handleMouseMove:O,x:k,y:A,opened:j,boundaryRef:M,floating:N,setOpened:P}=g_({offset:p,position:m,defaultOpened:v}),F=jt(n);if(!F)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let I=ot(M,Et(F),w),L=F.props,R=e=>{L.onMouseEnter?.(e),O(e),P(!0)},z=e=>{L.onMouseLeave?.(e),P(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(jc,{...x,withinPortal:i,children:(0,G.jsx)(Y,{...T,...D(`tooltip`,{style:{...Dr(a,E),zIndex:g,display:!_&&j?`block`:`none`,top:Number.isFinite(A)?Math.round(A):``,left:Number.isFinite(k)?Math.round(k):``}}),variant:y,ref:N,mod:{multiline:h},children:f})}),(0,C.cloneElement)(F,{...L,[r]:I,onMouseEnter:R,onMouseLeave:z})]})});b_.classes=__,b_.varsResolver=y_,b_.displayName=`@mantine/core/TooltipFloating`;var x_=(0,C.createContext)({withinGroup:!1}),S_={openDelay:0,closeDelay:0};function C_(e){let{openDelay:t,closeDelay:n,children:r}=K(`TooltipGroup`,S_,e);return(0,G.jsx)(x_,{value:{withinGroup:!0},children:(0,G.jsx)(Fs,{delay:{open:t,close:n},children:r})})}C_.displayName=`@mantine/core/TooltipGroup`,C_.extend=e=>e;function w_(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function T_(e){let t=w_(e.middlewares),n=[Zo(e.offset),ns()];return t.shift&&n.push(Qo(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?es():es(t.flip)),n.push(is({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?rs():rs(t.inline)):e.inline&&n.push(rs()),n}function E_(e){let[t,n]=(0,C.useState)(e.defaultOpened),r=typeof e.opened==`boolean`,i=!e.disabled&&(r?e.opened:t);(0,C.useEffect)(()=>{e.disabled&&n(!1)},[e.disabled]);let a=(0,C.use)(x_).withinGroup,o=nt(),s=_n(),c=(0,C.useCallback)(e=>{n(e),e&&y(o)},[o]),{x:l,y:u,context:d,refs:f,placement:p,middlewareData:{arrow:{x:m,y:h}={},hide:g}}=Ws({strategy:e.strategy,placement:e.position,open:i,onOpenChange:c,middleware:T_(e),whileElementsMounted:Po}),{delay:_,currentId:v,setCurrentId:y}=Is(d,{id:o}),{getReferenceProps:b,getFloatingProps:x}=Js([js(d,{enabled:!e.disabled&&e.events?.hover,delay:a?_:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?ec():null}),Ks(d,{enabled:!e.disabled&&e.events?.focus,visibleOnly:!0}),Xs(d,{role:`tooltip`}),Hs(d,{enabled:e.opened===void 0})]),S=(0,C.useRef)(p);De(()=>{S.current!==p&&(S.current=p,e.onPositionChange?.(p))},[p]);let w=i&&v&&v!==o;return{x:l,y:u,arrowX:m,arrowY:h,reference:f.setReference,floating:f.setFloating,getFloatingProps:x,getReferenceProps:b,isGroupPhase:w,opened:i,placement:p,referenceHidden:e.hideDetached&&s!==`test`?g?.referenceHidden:!1}}var D_={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:ie(`popover`),middlewares:{flip:!0,shift:!0,inline:!1},hideDetached:!0},O_=Mt((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:U(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),k_=J(e=>{let t=K(`Tooltip`,D_,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,offset:T,transitionProps:E,multiline:D,events:O,interactive:k,zIndex:A,disabled:j,onClick:M,onMouseEnter:N,onMouseLeave:P,inline:F,variant:I,keepMounted:L,vars:R,portalProps:z,mod:B,floatingStrategy:ee,middlewares:te,autoContrast:ne,attributes:V,target:re,hideDetached:ie,ref:ae,...oe}=t,{dir:H}=Br(),se=(0,C.useRef)(null),U=E_({position:bc(H,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,disabled:j,events:O,interactive:k,arrowRef:se,arrowOffset:x,offset:typeof T==`number`?T+(y?b/2:0):T,inline:F,strategy:ee,middlewares:te,hideDetached:ie});(0,C.useEffect)(()=>{let e=re instanceof HTMLElement?re:typeof re==`string`?document.querySelector(re):re?.current||null;e&&U.reference(e)},[re,U]);let ce=q({name:`Tooltip`,props:t,classes:__,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:V,rootSelector:`tooltip`,vars:R,varsResolver:O_}),W=jt(n);if(!re&&!W)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let le=ce(`tooltip`),ue=k&&!j&&!!U.opened,de=w===`merge`&&y?vc({position:U.placement,dir:H}):void 0;if(re){let e=zc(E,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(jc,{...z,withinPortal:d,children:(0,G.jsx)(Lc,{...e,keepMounted:L,mounted:!j&&!!U.opened,duration:U.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(Y,{...oe,"data-fixed":ee===`fixed`||void 0,variant:I,mod:[{multiline:D,interactive:ue},B],...le,...U.getFloatingProps({ref:U.floating,className:le.className,style:{...le.style,...e,...de,zIndex:A,top:U.y??0,left:U.x??0,...U.referenceHidden?{display:`none`}:null}}),children:[a,(0,G.jsx)(yc,{ref:se,arrowX:U.arrowX,arrowY:U.arrowY,visible:y,position:U.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,...ce(`arrow`)})]})})})})}let fe=W.props,pe=ot(U.reference,Et(W),ae),me=zc(E,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(jc,{...z,withinPortal:d,children:(0,G.jsx)(Lc,{...me,keepMounted:L,mounted:!j&&!!U.opened,duration:U.isGroupPhase?10:me.duration,children:e=>(0,G.jsxs)(Y,{...oe,"data-fixed":ee===`fixed`||void 0,variant:I,mod:[{multiline:D,interactive:ue},B],...U.getFloatingProps({ref:U.floating,className:ce(`tooltip`).className,style:{...ce(`tooltip`).style,...e,...de,zIndex:A,top:U.y??0,left:U.x??0,...U.referenceHidden?{display:`none`}:null}}),children:[a,(0,G.jsx)(yc,{ref:se,arrowX:U.arrowX,arrowY:U.arrowY,visible:y,position:U.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,...ce(`arrow`)})]})})}),(0,C.cloneElement)(W,U.getReferenceProps({onClick:M,onMouseEnter:N,onMouseLeave:P,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...fe,className:Pt(v,fe.className),[i]:pe}))]})});k_.classes=__,k_.varsResolver=O_,k_.displayName=`@mantine/core/Tooltip`,k_.Floating=b_,k_.Group=C_;var A_={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},j_={withItemsBorders:!0},M_=Mt((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:U(t),"--sc-color":n?Xt(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":H(i,`sc-padding`),"--sc-font-size":ce(i)}})),N_=jr(e=>{let t=K(`SegmentedControl`,j_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,value:l,defaultValue:u,onChange:d,size:f,name:p,disabled:m,readOnly:h,fullWidth:g,orientation:_,radius:v,color:y,transitionDuration:b,transitionTimingFunction:x,variant:S,autoContrast:w,withItemsBorders:T,mod:E,attributes:D,ref:O,...k}=t,A=q({name:`SegmentedControl`,props:t,classes:A_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:M_}),j=Nn(),M=c.map(e=>Dt(e)?{label:`${e}`,value:e}:e),N=vt(),[P,F]=(0,C.useState)(0),[I,L]=(0,C.useState)(null),[R,z]=(0,C.useState)({}),B=(e,t)=>{e!==null&&R[t]!==e&&(R[t]=e,z({...R}))},[ee,te]=st({value:l,defaultValue:u,finalValue:Array.isArray(c)?M.find(e=>!e.disabled)?.value??c[0]?.value??null:null,onChange:d}),ne=nt(p),V=M.map(e=>`${e.value}`),re=M.map(e=>(0,C.createElement)(Y,{...A(`control`),mod:{active:ee===e.value,orientation:_},key:`${e.value}`},(0,C.createElement)(`input`,{...A(`input`),disabled:m||e.disabled,type:`radio`,name:ne,value:`${e.value}`,id:`${ne}-${e.value}`,checked:ee===e.value,onChange:()=>!h&&te(e.value),"data-focus-ring":j.focusRing,key:`${e.value}-input`}),(0,C.createElement)(Y,{component:`label`,...A(`label`),mod:{active:ee===e.value&&!(m||e.disabled),disabled:m||e.disabled,"read-only":h},htmlFor:`${ne}-${e.value}`,ref:t=>B(t,`${e.value}`),__vars:{"--sc-label-color":y===void 0?void 0:rn({color:y,theme:j,autoContrast:w})},key:`${e.value}-label`},(0,G.jsx)(`span`,{...A(`innerLabel`),children:e.label})))),ie=ot(O,L);return mt(()=>{F(e=>e+1)},[c.length]),mt(()=>{z(e=>{let t={};return V.forEach(n=>{n in e&&(t[n]=e[n])}),Object.keys(t).length===Object.keys(e).length?e:t})},[V]),c.length===0?null:(0,G.jsxs)(Y,{...A(`root`),variant:S,size:f,ref:ie,mod:[{"full-width":g,orientation:_,initialized:N,"with-items-borders":T},E],...k,role:`radiogroup`,"data-disabled":m,children:[ee!==void 0&&(0,G.jsx)(Od,{target:R[`${ee}`],parent:I,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...A(`indicator`)},P),re]})});N_.classes=A_,N_.varsResolver=M_,N_.displayName=`@mantine/core/SegmentedControl`;var P_={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},F_=jr(e=>{let t=K([`Input`,`InputWrapper`,`Select`],P_,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,size:k,searchable:A,rightSection:j,checkIconPosition:M,withCheckIcon:N,withAlignedLabels:P,nothingFoundMessage:F,name:I,form:L,searchValue:R,defaultSearchValue:z,onSearchChange:B,allowDeselect:ee,error:te,rightSectionPointerEvents:ne,id:V,clearable:re,clearSectionMode:ie,clearButtonProps:ae,hiddenInputProps:oe,renderOption:H,onClear:se,autoComplete:U,scrollAreaProps:ce,__defaultRightSection:W,__clearSection:le,__clearable:ue,chevronColor:de,autoSelectOnBlur:fe,openOnFocus:pe,attributes:me,...he}=t,ge=(0,C.useMemo)(()=>Vd(m),[m]),_e=(0,C.useRef)({}),ve=(0,C.useMemo)(()=>Hd(ge),[ge]),ye=nt(V),be=ep({id:ye,label:he.label,labelProps:he.labelProps,inputWrapperOrder:he.inputWrapperOrder}),[xe,Se,Ce]=st({value:h,defaultValue:g,finalValue:null,onChange:p}),we=xe==null?void 0:`${xe}`in ve?ve[`${xe}`]:_e.current[`${xe}`],Te=gt(we),[Ee,De,Oe]=st({value:R,defaultValue:z,finalValue:we?we.label:``,onChange:B}),ke=_f({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v?ke.selectFirstOption():ke.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(ke.resetSelectedOption,0)}}),Ae=e=>{De(e),ke.resetSelectedOption()},{resolvedClassNames:je,resolvedStyles:Me}=Fn({props:t,styles:r,classNames:n});(0,C.useEffect)(()=>{_&&ke.selectFirstOption()},[_,Ee]),(0,C.useEffect)(()=>{h===null&&Ae(``),h!=null&&we&&(Te?.value!==we.value||Te?.label!==we.label)&&Ae(we.label)},[h,we]),(0,C.useEffect)(()=>{!Ce&&!Oe&&Ae(xe==null?``:`${xe}`in ve?ve[`${xe}`]?.label:_e.current[`${xe}`]?.label||``)},[ve,xe]),(0,C.useEffect)(()=>{xe&&`${xe}`in ve&&(_e.current[`${xe}`]=ve[`${xe}`])},[ve,xe]);let Ne=(0,G.jsx)(bf.ClearButton,{...ae,onClear:()=>{Se(null,null),Ae(``),se?.()}}),Pe=re&&xe!=null&&!S&&!x;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(bf,{store:ke,__staticSelector:`Select`,classNames:je,styles:Me,unstyled:i,readOnly:x,size:k,attributes:me,floatingHeight:O,keepMounted:fe,onOptionSubmit:e=>{y?.(e);let t=ee&&`${ve[e].value}`==`${xe}`?null:ve[e],n=t?t.value:null;n!==xe&&Se(n,t),!Ce&&Ae(n==null?``:t?.label||``),ke.closeDropdown()},...b,children:[(0,G.jsx)(bf.Target,{targetType:A?`input`:`button`,autoComplete:U,withExpandedAttribute:!0,children:(0,G.jsx)(Cd,{id:ye,__defaultRightSection:(0,G.jsx)(bf.Chevron,{size:k,error:te,unstyled:i,color:de}),__clearSection:Ne,__clearable:Pe,__clearSectionMode:ie,rightSection:j,rightSectionPointerEvents:ne||`none`,...he,size:k,__staticSelector:`Select`,disabled:S,readOnly:x||!A,value:Ee,onChange:e=>{if(bp(e)){if(!x){let t=Sh(ve,e.currentTarget.value);t&&`${t.value}`!=`${xe}`&&(Se(t.value,t),!Ce&&Ae(t.label))}}else Ae(e.currentTarget.value),ke.openDropdown(),_&&ke.selectFirstOption()},onFocus:e=>{pe&&A&&ke.openDropdown(),u?.(e)},onBlur:e=>{fe&&ke.clickSelectedOption(),ke.closeDropdown();let t=xe!=null&&(`${xe}`in ve?ve[`${xe}`]:_e.current[`${xe}`]);Ae(t&&t.label||``),d?.(e)},onClick:e=>{A?ke.openDropdown():ke.toggleDropdown(),f?.(e)},classNames:je,styles:Me,unstyled:i,pointer:!A,error:te,attributes:me})}),(0,G.jsx)(Yf,{data:ge,hidden:x||S,filter:w,search:Ee,limit:T,hiddenWhenEmpty:!F,withScrollArea:E,maxDropdownHeight:D,filterOptions:!!A&&we?.label!==Ee,value:xe,checkIconPosition:M,withCheckIcon:N,withAlignedLabels:P,nothingFoundMessage:F,unstyled:i,labelId:be,"aria-label":be?void 0:he[`aria-label`],renderOption:H,scrollAreaProps:ce})]}),(0,G.jsx)(bf.HiddenInput,{value:xe,name:I,form:L,disabled:S,...oe})]})});F_.classes={...Cd.classes,...bf.classes},F_.displayName=`@mantine/core/Select`;var I_={root:`m_6d731127`},L_={gap:`md`,align:`stretch`,justify:`flex-start`},R_=Mt((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":se(t),"--stack-align":n,"--stack-justify":r}})),z_=J(e=>{let t=K(`Stack`,L_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t,m=q({name:`Stack`,props:t,classes:I_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:R_});return(0,G.jsx)(Y,{...m(`root`),variant:d,...p})});z_.classes=I_,z_.varsResolver=R_,z_.displayName=`@mantine/core/Stack`;var B_=(0,C.createContext)(null),V_={hiddenInputValuesSeparator:`,`},H_=jr((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=K(`SwitchGroup`,V_,e),[m,h]=st({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,G.jsx)(B_,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,G.jsxs)(bd.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`SwitchGroup`,children:[(0,G.jsx)(xf,{role:`group`,children:o}),(0,G.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));H_.classes=bd.Wrapper.classes,H_.displayName=`@mantine/core/SwitchGroup`;var U_={root:`m_5f93f3bb`,input:`m_926b4011`,track:`m_9307d992`,thumb:`m_93039a1d`,trackLabel:`m_8277e082`},W_={labelPosition:`right`,withThumbIndicator:!0},G_=Mt((e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:U(t),"--switch-height":H(r,`switch-height`),"--switch-width":H(r,`switch-width`),"--switch-thumb-size":H(r,`switch-thumb-size`),"--switch-label-font-size":H(r,`switch-label-font-size`),"--switch-track-label-padding":H(r,`switch-track-label-padding`),"--switch-color":n?Xt(n,e):void 0}})),K_=J(e=>{let t=K(`Switch`,W_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,offLabel:u,onLabel:d,id:f,size:p,radius:m,wrapperProps:h,thumbIcon:g,checked:_,defaultChecked:v,onChange:y,labelPosition:b,description:x,error:S,disabled:w,variant:T,rootRef:E,mod:D,withThumbIndicator:O,attributes:k,...A}=t,j=(0,C.use)(B_),M=p||j?.size,N=q({name:`Switch`,props:t,classes:U_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:s,varsResolver:G_}),{styleProps:P,rest:F}=rr(A),I=nt(f),L=[x?`${I}-description`:void 0,S&&typeof S!=`boolean`?`${I}-error`:void 0,F[`aria-describedby`]].filter(Boolean).join(` `)||void 0,R={checked:j?.value.includes(F.value)??_,onChange:e=>{j?.onChange(e),y?.(e)}},z=w||j?.isDisabled?.(F.value),[B,ee]=st({value:R.checked??_,defaultValue:v,finalValue:!1});return(0,G.jsxs)(Rf,{...N(`root`),__staticSelector:`Switch`,__stylesApiProps:t,id:I,size:M,labelPosition:b,label:l,description:x,error:S,disabled:z,bodyElement:`label`,labelElement:`span`,classNames:n,styles:a,unstyled:o,"data-checked":R.checked,variant:T,ref:E,mod:D,attributes:k,inert:F.inert,...P,...h,children:[(0,G.jsx)(`input`,{...F,...R,disabled:z,checked:B,"data-checked":R.checked,onChange:e=>{F.readOnly||(R.onChange?.(e),ee(e.currentTarget.checked))},id:I,type:`checkbox`,role:`switch`,inert:F.inert,"aria-describedby":L,...N(`input`)}),(0,G.jsxs)(Y,{"aria-hidden":`true`,component:`span`,mod:{error:S,"label-position":b,"without-labels":!d&&!u},...N(`track`),children:[(0,G.jsx)(Y,{component:`span`,mod:{"reduce-motion":!0,"with-thumb-indicator":O&&!g},...N(`thumb`),children:g}),(0,G.jsx)(`span`,{...N(`trackLabel`),children:B?d:u})]})]})});K_.classes={...U_,...Lf},K_.varsResolver=G_,K_.displayName=`@mantine/core/Switch`,K_.Group=H_;var[q_,J_]=R(`Table component was not found in the tree`),Y_={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function X_(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function Z_(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=J(r=>{let i=K(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=J_();return(0,G.jsx)(Y,{component:e,...X_(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=Y_,r}var Q_=Z_(`th`,{columnBorder:!0}),$_=Z_(`td`,{columnBorder:!0}),ev=Z_(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),tv=Z_(`thead`,{stickyHeader:!0}),nv=Z_(`tbody`),rv=Z_(`tfoot`),iv=Z_(`caption`,{captionSide:!0}),av={type:`scrollarea`},ov=Mt((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":N(t),"--table-max-height":N(n),"--table-overflow":r===`native`?`auto`:void 0}})),sv=J(e=>{let t=K(`TableScrollContainer`,av,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=q({name:`TableScrollContainer`,classes:Y_,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:ov,rootSelector:`scrollContainer`});return(0,G.jsx)(Y,{component:d===`scrollarea`?rc:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,G.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});sv.classes=Y_,sv.varsResolver=ov,sv.displayName=`@mantine/core/TableScrollContainer`;function cv({data:e}){return(0,G.jsxs)(G.Fragment,{children:[e.caption&&(0,G.jsx)(iv,{children:e.caption}),e.head&&(0,G.jsx)(tv,{children:(0,G.jsx)(ev,{children:e.head.map((e,t)=>(0,G.jsx)(Q_,{children:e},t))})}),e.body&&(0,G.jsx)(nv,{children:e.body.map((e,t)=>(0,G.jsx)(ev,{children:e.map((e,t)=>(0,G.jsx)($_,{children:e},t))},t))}),e.foot&&(0,G.jsx)(rv,{children:(0,G.jsx)(ev,{children:e.foot.map((e,t)=>(0,G.jsx)(Q_,{children:e},t))})})]})}cv.displayName=`@mantine/core/TableDataRenderer`;var lv={withRowBorders:!0,verticalSpacing:7},uv=Mt((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":se(r),"--table-vertical-spacing":se(i),"--table-border-color":a?Xt(a,e):void 0,"--table-striped-color":c&&o?Xt(o,e):void 0,"--table-highlight-on-hover-color":l&&s?Xt(s,e):void 0,"--table-sticky-header-offset":d?N(u):void 0}})),dv=J(e=>{let t=K(`Table`,lv,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:w,mod:T,tabularNums:E,attributes:D,...O}=t,k=q({name:`Table`,props:t,className:r,style:i,classes:Y_,classNames:n,styles:a,unstyled:o,attributes:D,rootSelector:`table`,vars:s,varsResolver:uv,stable:!0}),A=p===!0?`odd`:p||void 0,j=u||`bottom`,M=(0,C.useMemo)(()=>({getStyles:k,stickyHeader:S,striped:A,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:j}),[k,S,A,m,h,g,j]);return(0,G.jsx)(q_,{value:M,children:(0,G.jsx)(Y,{component:`table`,mod:[{withTableBorder:_,tabularNums:E},T],...k(`table`),...O,children:x||!!b&&(0,G.jsx)(cv,{data:b})})})});dv.classes=Y_,dv.varsResolver=uv,dv.displayName=`@mantine/core/Table`,dv.Td=$_,dv.Th=Q_,dv.Tr=ev,dv.Thead=tv,dv.Tbody=nv,dv.Tfoot=rv,dv.Caption=iv,dv.ScrollContainer=sv,dv.DataRenderer=cv;var[fv,pv]=R(`Tabs component was not found in the tree`),mv={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},hv=J(e=>{let t=K(`TabsList`,null,e),{children:n,className:r,grow:i,justify:a,classNames:o,styles:s,style:c,mod:l,...u}=t,d=pv();return(0,G.jsx)(Y,{...d.getStyles(`list`,{className:r,style:c,classNames:o,styles:s,props:t,variant:d.variant}),role:`tablist`,variant:d.variant,mod:[{grow:i,orientation:d.orientation,placement:d.orientation===`vertical`&&d.placement,inverted:d.inverted},l],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...u,children:n})});hv.classes=mv,hv.displayName=`@mantine/core/TabsList`;var gv=J(e=>{let t=K(`TabsPanel`,null,e),{children:n,className:r,value:i,classNames:a,styles:o,style:s,mod:c,keepMounted:l,...u}=t,d=_n(),f=pv();(0,C.useEffect)(()=>(f.setMountedPanel(i,!0),()=>{f.setMountedPanel(i,!1)}),[i]);let p=f.value===i,m=f.keepMounted||l,h=f.keepMountedMode!==`display-none`,g=m&&h&&d!==`test`?(0,G.jsx)(C.Activity,{mode:p?`visible`:`hidden`,children:n}):m||p?n:null;return(0,G.jsx)(Y,{...f.getStyles(`panel`,{className:r,classNames:a,styles:o,style:[s,p?void 0:{display:`none`}],props:t}),mod:[{orientation:f.orientation},c],role:`tabpanel`,id:f.getPanelId(i),"aria-labelledby":f.getTabId(i),...u,children:g})});gv.classes=mv,gv.displayName=`@mantine/core/TabsPanel`;var _v=J(e=>{let t=K(`TabsTab`,null,e),{className:n,children:r,rightSection:i,leftSection:a,value:o,onClick:s,onKeyDown:c,disabled:l,color:u,style:d,classNames:f,styles:p,vars:m,mod:h,tabIndex:g,..._}=t,v=Nn(),{dir:y}=Br(),b=pv(),x=o===b.value,S=e=>{b.onChange(b.allowTabDeactivation&&o===b.value?null:o),s?.(e)},C={classNames:f,styles:p,props:t};return(0,G.jsxs)(sc,{...b.getStyles(`tab`,{className:n,style:d,variant:b.variant,...C}),disabled:l,unstyled:b.unstyled,variant:b.variant,mod:[{active:x,disabled:l,orientation:b.orientation,inverted:b.inverted,placement:b.orientation===`vertical`&&b.placement},h],role:`tab`,id:b.getTabId(o),"aria-selected":x,tabIndex:g===void 0?x||b.value===null?0:-1:g,"aria-controls":b.mountedPanels.current.has(o)?b.getPanelId(o):void 0,onClick:S,__vars:{"--tabs-color":u?Xt(u,v):void 0},onKeyDown:V({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:b.activateTabWithKeyboard,loop:b.loop,orientation:b.orientation||`horizontal`,dir:y,onKeyDown:c}),..._,children:[a&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`left`,children:a}),r&&(0,G.jsx)(`span`,{...b.getStyles(`tabLabel`,C),children:r}),i&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`right`,children:i})]})});_v.classes=mv,_v.displayName=`@mantine/core/TabsTab`;var vv=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,yv={keepMounted:!0,keepMountedMode:`activity`,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},bv=Mt((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":U(t),"--tabs-color":Xt(n,e),"--tabs-text-color":sn(r,e)?rn({color:n,theme:e,autoContrast:r}):void 0}})),xv=J(e=>{let t=K(`Tabs`,yv,e),{defaultValue:n,value:r,onChange:i,orientation:a,children:o,loop:s,id:c,activateTabWithKeyboard:l,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,placement:h,keepMounted:g,keepMountedMode:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:w,autoContrast:T,mod:E,attributes:D,...O}=t,k=nt(c),A=(0,C.useRef)(new Set),j=tt(),M=(0,C.useCallback)((e,t)=>{let n=A.current;t&&!n.has(e)?(n.add(e),j()):!t&&n.has(e)&&(n.delete(e),j())},[]),[N,P]=st({value:r,defaultValue:n,finalValue:null,onChange:i}),F=q({name:`Tabs`,props:t,classes:mv,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:D,vars:w,varsResolver:bv});return(0,G.jsx)(fv,{value:{placement:h,value:N,orientation:a,id:k,loop:s,activateTabWithKeyboard:l,getTabId:z(`${k}-tab`,vv),getPanelId:z(`${k}-panel`,vv),onChange:P,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,keepMounted:g,keepMountedMode:_,unstyled:b,getStyles:F,mountedPanels:A,setMountedPanel:M},children:(0,G.jsx)(Y,{id:k,variant:d,mod:[{orientation:a,inverted:a===`horizontal`&&m,placement:a===`vertical`&&h},E],...F(`root`),...O,children:o})})});xv.classes=mv,xv.varsResolver=bv,xv.displayName=`@mantine/core/Tabs`,xv.Tab=_v,xv.Panel=gv,xv.List=hv;var Sv=J(e=>{let t=K([`Input`,`InputWrapper`,`TextInput`],null,e);return(0,G.jsx)(Cd,{component:`input`,...t,__staticSelector:`TextInput`})});Sv.classes=Cd.classes,Sv.displayName=`@mantine/core/TextInput`;var Cv={root:`m_7341320d`},wv=Mt((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":H(t,`ti-size`),"--ti-radius":n===void 0?void 0:U(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),Tv=J(e=>{let t=K(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t,d=q({name:`ThemeIcon`,classes:Cv,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:wv});return(0,G.jsx)(Y,{...d(`root`),...u})});Tv.classes=Cv,Tv.varsResolver=wv,Tv.displayName=`@mantine/core/ThemeIcon`;var Ev=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],Dv=[`xs`,`sm`,`md`,`lg`,`xl`];function Ov(e,t){let n=t===void 0?`h${e}`:t;return Ev.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:Dv.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:N(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var kv={root:`m_8a5d1357`},Av={order:1},jv=Mt((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=Ov(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),Mv=J(e=>{let t=K(`Title`,Av,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=q({name:`Title`,props:t,classes:kv,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:jv});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(Y,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,lineClamp:typeof d==`number`},p],size:l,...h}):null});Mv.classes=kv,Mv.varsResolver=jv,Mv.displayName=`@mantine/core/Title`;var Nv={root:`m_d08caa0`},Pv=J(e=>{let t=K(`Typography`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,attributes:s,...c}=t,l=q({name:`Typography`,classes:Nv,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:s});return(0,G.jsx)(Y,{...l(`root`),...c})});Pv.classes=Nv,Pv.displayName=`@mantine/core/Typography`;function Fv(e,t,n){return t==null||t===n?e:`${e}:${t}`}var Iv=4194304,Lv=class extends RangeError{constructor(e){super(`Événement SSE au-delà de ${e} caractères`),this.name=`SseLimitError`}},Rv=/^[0-9]+$/,zv=class{#e;#t=/\r\n|\r|\n/g;#n=``;#r=!1;#i=!0;#a=``;#o=!1;#s=``;#c=``;#l=``;#u;constructor(e,t=``,n=Iv){this.#e=e,this.#u=n,this.#c=t,this.#l=t}get lastEventId(){return this.#l}push(e){let t=e;this.#r&&t.length>0&&(this.#r=!1,t.charCodeAt(0)===10&&(t=t.slice(1))),this.#i&&t.length>0&&(this.#i=!1,t.charCodeAt(0)===65279&&(t=t.slice(1)));let n=0;this.#t.lastIndex=0;for(let e=this.#t.exec(t);e!==null;e=this.#t.exec(t)){let r=n===0&&this.#n.length>0?this.#n+t.slice(0,e.index):t.slice(n,e.index);n===0&&(this.#n=``),n=e.index+e[0].length,e[0]===`\r`&&n===t.length&&(this.#r=!0),this.#d(r)}if(n<t.length&&(this.#n=n===0?this.#n+t:t.slice(n),this.#n.length>this.#u))throw new Lv(this.#u)}end(){this.#n=``,this.#r=!1,this.#a=``,this.#o=!1,this.#s=``,this.#c=this.#l}#d(e){if(e.length===0){this.#p();return}if(e.charCodeAt(0)===58)return;let t=e.indexOf(`:`);if(t===-1){this.#f(e,``);return}let n=e.slice(t+1);n.charCodeAt(0)===32&&(n=n.slice(1)),this.#f(e.slice(0,t),n)}#f(e,t){switch(e){case`event`:this.#s=t;break;case`data`:if(this.#a=this.#o?`${this.#a}\n${t}`:t,this.#o=!0,this.#a.length>this.#u)throw new Lv(this.#u);break;case`id`:t.includes(`\0`)||(this.#c=t);break;case`retry`:Rv.test(t)&&this.#e.onRetry?.(Number.parseInt(t,10))}}#p(){if(this.#l=this.#c,!this.#o){this.#s=``;return}let e={type:this.#s===``?`message`:this.#s,data:this.#a,lastEventId:this.#l};this.#a=``,this.#o=!1,this.#s=``,this.#e.onEvent(e)}},Bv=`text/event-stream`,Vv=3e3,Hv=250,Uv=2147483647,Wv=1e4;function Gv(e){return Math.min(Math.max(e,Hv),Uv)}function Kv(e){return Math.min(Math.round(e+e/2*Math.random()),Uv)}function qv(e){let t=``;for(let n of new TextEncoder().encode(e))t+=String.fromCharCode(n);return t}Object.freeze({readyState:class e extends EventTarget{static CONNECTING=0;static OPEN=1;static CLOSED=2;CONNECTING=0;OPEN=1;CLOSED=2;url;withCredentials;onopen=null;onmessage=null;onerror=null;#e=e.CONNECTING;#t;#n;#r=null;#i=null;#a=null;#o;constructor(e,t={}){super();let n=globalThis.location?.href,r=new URL(e,n);if(r.protocol!==`http:`&&r.protocol!==`https:`)throw TypeError(`NodefonySse : schéma non pris en charge (${r.protocol})`);if(/[\r\n\0]/.test(t.lastEventId??``))throw TypeError(`NodefonySse : lastEventId ne peut contenir ni CR, ni LF, ni NUL`);this.url=r.href,this.withCredentials=t.withCredentials===!0,this.#t=Gv(t.retry??Vv),this.#n=t.lastEventId??``,this.#o=t,this.#s()}get readyState(){return this.#e}get lastEventId(){return this.#n}close(){this.#e=e.CLOSED,this.#i!==null&&(clearTimeout(this.#i),this.#i=null),this.#u();let t=this.#r;this.#r=null,t?.abort()}#s(){this.#i=null;let e=new AbortController;this.#r=e;let t={Accept:Bv,"Cache-Control":`no-cache`,...this.#o.headers};this.#n!==``&&(t[`Last-Event-ID`]=qv(this.#n));let n={method:this.#o.method??`GET`,headers:t,cache:`no-store`,credentials:this.withCredentials?`include`:`same-origin`,signal:e.signal};this.#o.body!==void 0&&(n.body=this.#o.body);let r=this.#o.connectTimeout??Wv;r>0&&(this.#a=setTimeout(()=>{this.#a=null,e.abort()},Math.min(r,Uv))),(this.#o.fetch??fetch)(this.url,n).then(t=>this.#c(t,e),()=>this.#l(e)).catch(()=>this.#l(e))}async#c(t,n){if(n!==this.#r)return;this.#u();let r=(t.headers.get(`Content-Type`)??``).split(`;`)[0]?.trim().toLowerCase();if(t.status!==200||r!==Bv){await t.body?.cancel().catch(()=>void 0),this.#d();return}let i=t.body;if(i===null){this.#l(n);return}this.#e=e.OPEN,this.#f(new Event(`open`),this.onopen);let a=new zv({onEvent:e=>{if(n!==this.#r)return;this.#n=e.lastEventId;let r=new MessageEvent(e.type,{data:e.data,lastEventId:e.lastEventId,origin:new URL(t.url||this.url).origin});this.#f(r,e.type===`message`?this.onmessage:null)},onRetry:e=>{this.#t=Gv(e)}},this.#n,this.#o.maxEventSize),o=i.getReader(),s=new TextDecoder;try{for(;;){let{done:e,value:t}=await o.read();if(e)break;if(n!==this.#r)return;a.push(s.decode(t,{stream:!0}))}}catch(e){if(e instanceof Lv){o.cancel().catch(()=>void 0),n.abort(),this.#d();return}}a.end(),this.#n=a.lastEventId,this.#l(n)}#l(t){t===this.#r&&(this.#u(),this.#e!==e.CLOSED&&(this.#e=e.CONNECTING,this.#f(new Event(`error`),this.onerror),this.#e===e.CONNECTING&&(this.#i=setTimeout(()=>this.#s(),Kv(this.#t)))))}#u(){this.#a!==null&&(clearTimeout(this.#a),this.#a=null)}#d(){this.#u(),this.#e=e.CLOSED,this.#r=null,this.#f(new Event(`error`),this.onerror)}#f(e,t){if(this.dispatchEvent(e),t!==null)try{t.call(this,e)}catch(e){queueMicrotask(()=>{throw e})}}}.CLOSED,lastEvent:null,error:!1});var Jv=Object.prototype,Yv=Function.prototype,Xv=e=>Jv.toString.call(e),Zv=e=>Yv.toString.call(e),Qv=Zv(Object),$v=Object.getPrototypeOf,ey=e=>{if(typeof e!=`object`||!e||Xv(e)!==`[object Object]`)return!1;let t=$v(e);if(!t||t===Jv)return!0;let n=Object.hasOwn(t,`constructor`)&&t.constructor;return typeof n==`function`&&Zv(n)===Qv};function ty(e){return{url:e.url,state:e.state,channels:e.subscribedChannels,frames:e.framesReceived,unsent:e.framesUnsent,lastFrame:{method:e.lastFrameMethod,at:e.lastFrameAt},reconnectAttempts:e.reconnectAttempts,nextRetryAt:e.nextRetryAt,identity:e.identity,serverChannels:e.serverChannels,serverMethods:e.serverMethods}}var ny={connected:`connecté`,connecting:`connexion…`,reconnecting:`reconnexion automatique…`,disconnected:`coupé`,error:`erreur`};function ry(e){let t=e.identity,n=(e,t)=>e===null?`— (avant l'accueil)`:e.join(`, `)||t;return[{label:`adresse`,value:e.url??`—`,hint:`Le point d'entrée WebSocket, résolu contre la page : une seule socket par adresse, partagée par tous les composants.`},{label:`état`,value:ny[e.state],hint:`Coupée, la socket se reconnecte seule et rejoue ses abonnements : la page n'a rien à écrire pour ça.`},{label:`identité`,value:t?.authenticated?t.userIdentifier||`authentifié`:t===null?`— (avant l'accueil)`:`anonyme`,hint:`Résolue par le SERVEUR à l'accueil (realtime:welcome), d'après la session ou le jeton — le navigateur ne la décide jamais.`},{label:`canaux tenus`,value:e.channels.join(`, `)||`aucun`,hint:`Abonnements comptés par référence : dix composants sur le même canal, un seul abonnement réseau.`},{label:`canaux offerts`,value:n(e.serverChannels,`aucun`),hint:`Ce que le serveur annonce à l'accueil — ce qu'on PEUT écouter, filtré par les droits de cette identité.`},{label:`actions`,value:n(e.serverMethods,`aucune`),hint:`Les actions de contrôleur joignables par la socket (api.request) — une route ne l'est que si elle le déclare.`},{label:`trames reçues`,value:String(e.frames),hint:`Comptées par le client lui-même : lire ce tableau ne coûte aucune trame.`},{label:`dernière trame`,value:e.lastFrame.at===null?`—`:`${e.lastFrame.method??`?`} à ${new Date(e.lastFrame.at).toLocaleTimeString()}`,hint:`Une socket qui se tait n'est pas morte : le serveur ne parle que s'il a quelque chose à dire.`}]}var iy={syslog:`nodefony:syslog`,audit:`nodefony:audit`,dashboard:`nodefony:dashboard`,supervision:`nodefony:supervision`,debugbar:`nodefony:debugbar`,socket:`nodefony:socket`,ormHealth:`nodefony:orm:health`,ormFlow:`nodefony:orm:flow`,ormRich:`nodefony:orm:rich`,scaffoldJob:`nodefony:scaffold:job`},ay={syslogUplink:`nodefony:syslog:uplink`},oy={ping:`nodefony:kernel:ping`,gc:`nodefony:kernel:gc`,scaffoldPreview:`nodefony:scaffold:preview`,scaffoldRun:`nodefony:scaffold:run`,scaffoldCancel:`nodefony:scaffold:cancel`},sy={hmr:`nodefony:hmr`,debugbarSelect:`nodefony:debugbar:select`};function cy(e){e?.unref?.()}var ly={PARSE_ERROR:-32700,INVALID_REQUEST:-32600,METHOD_NOT_FOUND:-32601,INVALID_PARAMS:-32602,INTERNAL_ERROR:-32603},uy={DEFAULT:-32e3,MIN:-32099,MAX:-32e3};function dy(e){return typeof e==`string`||typeof e==`number`}function fy(e){if(typeof e!=`object`||!e)return!1;let t=e;return Number.isInteger(t.code)&&typeof t.message==`string`}function py(e){if(typeof e!=`object`||!e)return`invalid`;let t=e;if(t.jsonrpc!==`2.0`)return`invalid`;let n=t.id,r=t.method;if(r!==void 0)return typeof r==`string`?n===void 0?`notification`:dy(n)?`request`:`invalid`:`invalid`;if(!dy(n))return`invalid`;let i=`result`in t,a=t.error;return a===void 0?i?`response`:`invalid`:i?`invalid`:fy(a)?`response`:`invalid`}function my(e,t,n){return{jsonrpc:`2.0`,id:e,method:t,params:n}}function hy(e,t){return{jsonrpc:`2.0`,method:e,params:t}}function gy(e,t){return{jsonrpc:`2.0`,id:e,result:t===void 0?null:t}}function _y(e,t,n,r){return{jsonrpc:`2.0`,id:e,error:r===void 0?{code:t,message:n}:{code:t,message:n,data:r}}}var vy=4005;function yy(e){let t=e.reason===`unknown`?`Canal « ${e.channel} » inconnu du serveur : personne ne le produit (nom exact ? module chargé ?)`:e.reason===`limit`?`Canal « ${e.channel} » non ouvert : trop d'abonnements sur cette connexion`:`Accès au canal « ${e.channel} » refusé`;return{level:e.reason===`unknown`?`warning`:`error`,title:`Temps réel`,message:t,source:`realtime`,ts:Date.now()}}function by(e,t){if(e===1e3||e===1001)return null;let n=`warning`,r;switch(e){case 1002:n=`error`,r=`Erreur de protocole temps réel`;break;case 1003:n=`error`,r=`Données temps réel non supportées`;break;case 1006:r=`Connexion temps réel perdue`;break;case 1007:n=`error`,r=`Trame temps réel invalide`;break;case 1008:n=`error`,r=`Accès temps réel refusé`;break;case 1009:r=`Message temps réel trop volumineux`;break;case 1010:n=`error`,r=`Extension temps réel requise manquante`;break;case 1011:n=`error`,r=`Erreur serveur temps réel`;break;case 4001:n=`error`,r=`Session temps réel refusée ou révoquée`;break;case 4003:n=`error`,r=`Origine refusée par le serveur temps réel`;break;case 4004:n=`error`,r=`Ressource temps réel introuvable`;break;case vy:n=`info`,r=`Droits mis à jour — reconnexion temps réel`;break;case void 0:default:r=typeof e==`number`?`Connexion temps réel fermée (code ${e})`:`Connexion temps réel fermée`}let i=t?.trim();return{level:n,title:`Temps réel`,message:i?`${r} : ${i}`:r,source:`realtime`,code:e,ts:Date.now()}}var xy=new Set([1e3,1002,1003,1007,1008,1010,4001,4003,4004]);function Sy(e){return e===void 0||!xy.has(e)}function Cy(e){return e<400||e>=500?!1:e!==426&&e!==408&&e!==429}function wy(e){let t;switch(e){case 401:t=`Accès temps réel refusé : connexion requise`;break;case 403:t=`Accès temps réel refusé`;break;case 404:t=`Ressource temps réel introuvable`;break;default:t=`Connexion temps réel refusée (HTTP ${e})`}return{level:`error`,title:`Temps réel`,message:t,source:`realtime`,code:e,ts:Date.now()}}function Ty(e){return{level:`warning`,title:`Temps réel`,message:e===`binary`?`Trame binaire reçue et écartée : le protocole temps réel est du JSON-RPC texte. Pour lire un flux binaire, s'y abonner avec onBinary()`:`Trame texte illisible reçue et écartée : ce n'est pas du JSON (pair défaillant ?)`,source:`realtime`,code:ly.PARSE_ERROR,ts:Date.now()}}var Ey=-32001,Dy=class extends Error{name=`RpcError`;data;constructor(e,t=uy.DEFAULT,n){super(e),this.code=t,n!==void 0&&(this.data=n)}},Oy=class{result;meta;constructor(e,t){this.result=e,this.meta=t}},ky=class e{opts;nextId=1;pending=null;actions=null;constructor(e){this.opts=e}register(e,t){(this.actions??=new Map).set(e,t)}unregister(e){this.actions?.delete(e)}get methods(){return this.actions?[...this.actions.keys()]:[]}request(e,t,n=3e4){return this.startCall(e,t,n)}requestAs(e,t,n=3e4){return this.startCall(e,t,n)}requestTraced(e,t,n=3e4){return this.startCall(e,t,n,!0)}static buildNotification(e,t){return hy(e,t)}notify(t,n){return this.opts.send(e.buildNotification(t,n))!==!1}receive(e){let t=py(e);if(t===`invalid`)return this.settleUnreadableResponse(e),this.opts.onFrameAudit?.(`invalid`,e,this),`invalid`;if(t===`response`)return this.handleResponse(e),`response`;let n=e,r=t===`request`;return this.opts.beforeDispatch&&!this.opts.beforeDispatch(e,this)?(this.opts.onFrameAudit?.(`denied`,e,this),r?(this.opts.send(_y(n.id,Ey,`unauthorized`)),`request`):`notification`):r?(this.handleRequest(n.id,n.method,n.params,e),`request`):(this.opts.onNotification?.(n.method,n.params),`notification`)}dispose(e=`peer disposed`){if(this.pending){for(let t of this.pending.values())t.timer&&clearTimeout(t.timer),t.reject(Error(e));this.pending.clear()}}startCall(e,t,n,r){let i=this.nextId++,a=this.pending??=new Map;return new Promise((o,s)=>{let c=setTimeout(()=>{a.delete(i),s(Error(`RPC timeout: ${e}`))},n);a.set(i,{resolve:e=>{clearTimeout(c),o(e)},reject:e=>{clearTimeout(c),s(e)},timer:c,withMeta:r}),this.opts.send(my(i,e,t))===!1&&(clearTimeout(c),a.delete(i),s(Error(`RPC non émis (transport indisponible) : ${e}`)))})}handleRequest(e,t,n,r){let i=this.actions?.get(t);i?Promise.resolve().then(()=>i(n)).then(t=>{if(t instanceof Oy){let n=gy(e,t.result);n.meta=t.meta,this.opts.send(n)}else this.opts.send(gy(e,t))},n=>{n instanceof Dy?this.opts.send(_y(e,n.code,n.message,n.data)):(this.opts.onError?.(`rpc ${t}`,n),this.opts.onFrameAudit?.(`internal_error`,r,this),this.opts.send(_y(e,ly.INTERNAL_ERROR,`internal error`)))}):(this.opts.onFrameAudit?.(`method_not_found`,r,this),this.opts.send(_y(e,ly.METHOD_NOT_FOUND,`method not found: ${t}`)))}handleResponse(e){if(typeof e.id!=`number`||!this.pending)return;let t=this.pending.get(e.id);t&&(this.pending.delete(e.id),e.error?t.reject(new Dy(e.error.message,e.error.code,e.error.data)):t.resolve(t.withMeta?{result:e.result,meta:e.meta}:e.result))}settleUnreadableResponse(e){if(!this.pending||typeof e!=`object`||!e)return;let t=e;if(t.jsonrpc!==`2.0`||t.method!==void 0||typeof t.id!=`number`)return;let n=this.pending.get(t.id);n&&(this.pending.delete(t.id),n.reject(fy(t.error)?new Dy(t.error.message,t.error.code,t.error.data):new Dy(`réponse JSON-RPC invalide`,ly.INTERNAL_ERROR)))}},Ay={state:`__state__`,identity:`__identity__`,stats:`__stats__`,notice:`__notice__`,denied:`__denied__`,subscribed:`__subscribed__`,reconnect:`__reconnect__`},jy={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},My=class{url;ws=null;_onOpen=null;_onMessage=null;_onClose=null;_onError=null;constructor(e){this.url=e}connect(){let e=new WebSocket(this.url);e.binaryType=`arraybuffer`,this.ws=e,e.addEventListener(`open`,()=>this._onOpen?.()),e.addEventListener(`message`,e=>{let t=e.data;this._onMessage?.(typeof t==`string`?t:new Uint8Array(t))}),e.addEventListener(`close`,e=>{this.ws=null,this._onClose?.(e.code,e.reason)}),e.addEventListener(`error`,()=>this._onError?.(Error(`websocket error`)))}send(e){this.ws?.readyState===jy.OPEN&&this.ws.send(e)}close(e,t){this.ws?.close(e,t)}get readyState(){return this.ws?.readyState??jy.CLOSED}onOpen(e){this._onOpen=e}onMessage(e){this._onMessage=e}onClose(e){this._onClose=e}onError(e){this._onError=e}},Ny=null;function Py(){return typeof globalThis.document==`object`}function Fy(){return globalThis.__nfAnnounced__===!0}var Iy=null;function Ly(){return globalThis.__nfDetailed__===!0}function Ry(e){e&&(Iy=e)}function zy(){return By()||Iy!==null&&Iy!==`production`}function By(){return!1}function Vy(){let e=globalThis;return e.__nfRealtime__?[...e.__nfRealtime__.values()]:[]}function Hy(){zy()&&(globalThis.nodefony={get kernel(){return Ny??void 0},get socket(){return Vy()[0]},sockets:()=>Vy().map(e=>({url:e.url??`(adresse non résolue)`,state:e.state})),identity:()=>Ny?Ny.identity:Vy()[0]?.identity??null})}function Uy(){let e=globalThis;delete e.nodefony,delete e.__nfAnnounced__,delete globalThis.__nfDetailed__,Iy=null}function Wy(e){if(Fy())return;let t=globalThis.console;t?.log&&(globalThis.__nfAnnounced__=!0,t.log(`%c◆ nodefony%c${e}%c`,`background:#0b1120;color:#5eead4;font-weight:700;padding:2px 6px;border-radius:3px 0 0 3px`,`background:#1e293b;color:#e2e8f0;padding:2px 6px;border-radius:0 3px 3px 0`,``))}function Gy(e,t,n){return n===!1||!Py()?()=>void 0:(Ny=e,Wy(t),Hy(),()=>{Ny===e&&(Ny=null,Vy().length===0?Uy():Hy())})}function Ky(e){return e===!1||!Py()?()=>void 0:(Wy(`client`),Hy(),()=>{!Ny&&Vy().length===0&&Uy()})}function qy(e,t,n){if(!Py()||Ly()||!zy())return!1;let r=globalThis.console;if(!r?.log||!r.groupCollapsed||!r.groupEnd)return!1;globalThis.__nfDetailed__=!0,r.groupCollapsed(`%c${n}`,`color:#94a3b8`);try{if(r.table)r.table(e);else for(let[t,n]of Object.entries(e))r.log(t,n.valeur);r.log(`%cconsole :%c nodefony.socket · nodefony.sockets() · nodefony.identity()`+(Ny?` · nodefony.kernel`:``),`color:#94a3b8`,`color:#5eead4;font-family:monospace`),r.log(`%ccorrélation :%c chaque journal porte un requestId — la même valeur côté serveur relie clic, route, base et réponse`,`color:#94a3b8`,`color:#e2e8f0`),r.log(`%cobjet :%c`,`color:#94a3b8`,``,t)}finally{r.groupEnd()}return!0}function Jy(){return Ny!==null}var Yy=`nodefony:kernel`;function Xy(e){if(!Py()||!zy())return()=>void 0;let t=globalThis;return(t.__nfKernels__??=[]).push(e),Zy(),()=>{let n=t.__nfKernels__,r=n?n.indexOf(e):-1;n&&r>=0&&n.splice(r,1),Zy()}}function Zy(){typeof Event==`function`&&globalThis.dispatchEvent?.(new Event(Yy))}function Qy(e,t){let n=[],r=e;for(;r<t;)n.push(r),r*=2;return n.push(t),n}var $y=class{ladder;slowest;starvationFactor;healthyFactor;recoveryWindow;idx=0;healthy=0;lastFrameTs=null;constructor(e){let t=e.maxMs??6e4,n=e.ladder&&e.ladder.length>0?[...e.ladder].sort((e,t)=>e-t):Qy(e.intervalMs,Math.max(e.intervalMs,t));this.ladder=n,this.slowest=n[n.length-1]??t,this.starvationFactor=e.starvationFactor??1.8,this.healthyFactor=e.healthyFactor??1.25,this.recoveryWindow=e.recoveryWindow??4}current(){return this.ladder[this.idx]??this.slowest}decrease(){return this.idx>=this.ladder.length-1?!1:(this.idx+=1,!0)}increase(){return this.idx<=0?!1:(--this.idx,!0)}resetSample(){this.lastFrameTs=null,this.healthy=0}noteFrame(e){let t=this.lastFrameTs;if(this.lastFrameTs=e,t===null)return null;let n=e-t,r=this.current();return n>this.starvationFactor*r?this.decrease()?(this.resetSample(),{intervalMs:this.current(),reason:`decrease`}):(this.healthy=0,null):n<=this.healthyFactor*r?(this.healthy+=1,this.healthy>=this.recoveryWindow&&this.increase()?(this.resetSample(),{intervalMs:this.current(),reason:`increase`}):null):(this.healthy=0,null)}checkStarvation(e){return this.lastFrameTs===null?null:e-this.lastFrameTs>this.starvationFactor*this.current()&&this.decrease()?(this.resetSample(),{intervalMs:this.current(),reason:`decrease`}):null}},eb={set:(e,t)=>setInterval(e,t),clear:e=>clearInterval(e)},tb=()=>typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now();function nb(e,t,n,r){if(r.enabled===!1){let i=Fv(t,r.intervalMs,r.defaultMs);e.subscribe(i);let a=e.on(i,n);r.onRate?.(r.intervalMs,`init`);let o=!1;return{get intervalMs(){return r.intervalMs},get channel(){return i},dispose(){o||(o=!0,a(),e.unsubscribe(i))}}}let i=r.clock??tb,a=r.scheduler??eb,o=new $y(r),s=o.current(),c=Fv(t,s,r.defaultMs),l=null,u,d=!1,f=(...e)=>{let t=o.noteFrame(i());n(...e),t&&m(t)},p=()=>{u!==void 0&&a.clear(u),u=a.set(()=>{let e=o.checkStarvation(i());e&&m(e)},s)};function m(n){if(d)return;let i=Fv(t,n.intervalMs,r.defaultMs);if(s=n.intervalMs,i!==c){let t=c,n=l;e.subscribe(i),l=e.on(i,f),n?.(),e.unsubscribe(t),c=i}p(),r.onRate?.(s,n.reason)}return e.subscribe(c),l=e.on(c,f),p(),r.onRate?.(s,`init`),{get intervalMs(){return s},get channel(){return c},dispose(){d||(d=!0,u!==void 0&&a.clear(u),l?.(),e.unsubscribe(c))}}}var rb=300,ib=2097152,ab=65536,ob=100,sb=2**31-1,cb=5e3,lb=1e4,ub=5e3;function db(e,t,n){let r=Number.isFinite(t)&&t>0?t:0,i=Math.min(Math.max(Number.isNaN(n)?0:n,ob),sb),a=Math.min(r*2**Math.min(e-1,31),i),o=a/2+a/2*Math.random();return Math.max(ob,Math.round(o))}function fb(e,t){let n;try{n=new URL(e,t)}catch{throw Error(`[nodefony] adresse du serveur temps réel illisible : ${JSON.stringify(e)}`)}if(n.protocol===`http:`?n.protocol=`ws:`:n.protocol===`https:`&&(n.protocol=`wss:`),n.protocol!==`ws:`&&n.protocol!==`wss:`)throw Error(`[nodefony] schéma refusé pour le temps réel : ${n.protocol} (ws:, wss:, http: ou https: attendus)`);if(n.username||n.password)throw Error("[nodefony] identifiants refusés dans l'adresse temps réel : passer le jeton par l'option `token`");return n}function pb(e){let t=new URL(e);return t.protocol=t.protocol===`wss:`?`https:`:`http:`,t.searchParams.delete(`token`),t.toString()}async function mb(e,t){if(typeof fetch!=`function`)return null;let n=new AbortController,r=setTimeout(()=>n.abort(),ub);try{return(await fetch(e,{method:`GET`,credentials:`include`,cache:`no-store`,redirect:`manual`,signal:n.signal,...t?{headers:{authorization:`Bearer ${t}`}}:{}})).status}catch{return null}finally{clearTimeout(r)}}function hb(e,t){let n={truncated:`${t} caractères — charge non journalisée`};if(typeof e!=`object`||!e)return n;if(`method`in e&&typeof e.method==`string`&&(n.method=e.method),`id`in e&&(typeof e.id==`number`||typeof e.id==`string`)&&(n.id=e.id),`params`in e){let t=e.params;n.params=typeof t==`object`&&t&&`channel`in t&&typeof t.channel==`string`?{channel:t.channel}:`[tronqué]`}return`result`in e&&(n.result=`[tronqué]`),`error`in e&&(n.error=`[tronqué]`),n}var gb=/(token|password|secret|api[_-]?key|apikey|authorization|bearer)/i;function _b(e,t=0){return t>4||typeof e!=`object`||!e?e:Array.isArray(e)?e.map(e=>_b(e,t+1)):Object.fromEntries(Object.entries(e).map(([e,n])=>[e,gb.test(e)?`[redacted]`:_b(n,t+1)]))}function vb(e){return typeof xb(e,`channel`)==`string`}var yb=e=>`[nodefony] abonnement à « ${e} » rendu (unsubscribe) avant son acquittement`,bb=e=>`[nodefony] abonnement à « ${e} » refusé par le serveur`;function xb(e,t){return typeof e==`object`&&e?Object.getOwnPropertyDescriptor(e,t)?.value:void 0}function Sb(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):null}function Cb(e){let t=xb(e,`type`),n=xb(e,`authenticated`),r=xb(e,`userIdentifier`),i=xb(e,`roles`),a=xb(e,`scopes`);if(typeof t!=`string`||typeof n!=`boolean`||typeof r!=`string`||!Array.isArray(i)||!Array.isArray(a))return null;let o=Sb(i),s=Sb(a);return o?.length!==i.length||s?.length!==a.length?null:{type:t,authenticated:n,userIdentifier:r,roles:o,scopes:s}}var wb=class e{opts;transport=null;transportFactory;_state=`disconnected`;peer=new ky({send:e=>this.send(e),onNotification:(e,t)=>this.dispatchNotification(e,t)});handlers=new Map;_subscriptions=new Map;_welcomed=!1;_subscriptionAcks=!1;_acked=null;_ackWaiters=null;reconnectAttempt=0;_nextRetryAt=null;reconnectTimer=null;heartbeatTimer=null;connectTimer=null;intentionalClose=!1;_stats=new Map;_framesReceived=0;_framesUnsent=0;_binaryFramesDiscarded=0;_malformedFramesDiscarded=0;_binaryHandlers=null;_unsentNotified=!0;_lastFrameAt=null;_lastFrameMethod=null;statsTimer=null;_prevSampled=new Map;_rawFrames=null;_rawFramesChars=0;_identity=null;_serverChannels=null;_serverMethods=null;constructor(e={},t){this.opts=e,this.transportFactory=t??(e=>new My(e)),this.startStatsSampler(),Ky(this.opts.banner)}static shared(t={}){let n=e.resolveUrl(t.url),r=globalThis,i=r.__nfRealtime__??=new Map,a=i.get(n);return a||(a=new e({...t,url:n}),i.set(n,a)),a}static missingUrl(){return Error(`[nodefony] adresse du serveur temps réel manquante.
|
|
51
|
-
Donne-la explicitement : NodefonySocket.shared({ url: "/api/live/realtime" })
|
|
52
|
-
ou, en React : <NodefonyProvider url="/api/live/realtime">
|
|
53
|
-
Il n'y a pas de valeur par défaut : la route dépend de ton application (une application générée monte /api/live/realtime, la console d'administration /nodefony/studio/api/realtime).`)}static resolveUrl(t){if(!t)throw e.missingUrl();return typeof window>`u`?t:fb(t,window.location.href).toString()}get state(){return this._state}get reconnectAttempts(){return this.reconnectAttempt}get nextRetryAt(){return this._nextRetryAt}retryNow(){this._state!==`connected`&&this._state!==`connecting`&&(this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null),this._nextRetryAt=null,this.intentionalClose=!1,this.openSocket().catch(()=>{}))}async connect(e){if(!(this._state===`connected`||this._state===`connecting`&&this.transport!==null))return this.intentionalClose=!1,this.opts.url=e??this.requireUrl(),this.openSocket()}requireUrl(){if(!this.opts.url)throw e.missingUrl();return this.opts.url}disconnect(){this.intentionalClose=!0,this.clearTimers(),this.transport?.close(1e3,`client disconnect`),this.peer.dispose(`client disconnect`),this._welcomed=!1,this._subscriptionAcks=!1,this._acked=null;let e=this._ackWaiters;if(e!==null){this._ackWaiters=null;let t=Error(`[nodefony] connexion temps réel fermée par disconnect()`);for(let n of e.values())for(let e of n)e.reject(t)}this._identity=null,this._serverChannels=null,this._serverMethods=null,this.fireLocal(Ay.identity,null),this.setState(`disconnected`)}on(e,t){let n=this.handlers.get(e);return n||(n=new Set,this.handlers.set(e,n)),n.add(t),()=>this.off(e,t)}off(e,t){this.handlers.get(e)?.delete(t)}onNotice(e){return this.on(Ay.notice,e)}onDenied(e){return this.on(Ay.denied,e)}onSubscribed(e){let t=t=>{vb(t)&&e(t)},n=this.handlers.get(Ay.subscribed);return n||(n=new Set,this.handlers.set(Ay.subscribed,n)),n.add(t),()=>{this.handlers.get(Ay.subscribed)?.delete(t)}}whenSubscribed(e){return this._subscriptions.has(e)?this.isSubscriptionActive(e)?Promise.resolve():new Promise((t,n)=>{let r=this._ackWaiters??=new Map,i=r.get(e);i||(i=[],r.set(e,i)),i.push({resolve:t,reject:n})}):Promise.reject(Error(`[nodefony] whenSubscribed("${e}") : aucun subscribe() en cours sur ce canal`))}isSubscriptionActive(e){return this._welcomed?!this._subscriptionAcks||this._acked?.has(e)===!0:!1}resolveAckWaiters(e){let t=this.takeAckWaiters(e);if(t)for(let e of t)e.resolve()}takeAckWaiters(e){let t=this._ackWaiters,n=t?.get(e);if(t&&n)return t.delete(e),t.size===0&&(this._ackWaiters=null),n}rejectAckWaiters(e,t,n){let r=this.takeAckWaiters(e);if(!r)return;let i=n===void 0?Error(t(e)):Error(t(e),{cause:n});for(let e of r)e.reject(i)}emit(e,t){this._emitRaw(e,t)||this.noticeUnsent()}_emitRaw(e,t){return this.peer.notify(e,t)}publish(e,t){this.emit(e,t)}subscribe(e){let t=e,n=(this._subscriptions.get(t)??0)+1;this._subscriptions.set(t,n),n===1&&this._welcomed&&this._emitRaw(`subscribe`,{channel:t})}unsubscribe(e){let t=e,n=this._subscriptions.get(t);n&&(n<=1?(this._subscriptions.delete(t),this._acked?.delete(t),this.rejectAckWaiters(t,yb),this._welcomed&&this._emitRaw(`unsubscribe`,{channel:t})):this._subscriptions.set(t,n-1))}get subscribedChannels(){return Array.from(this._subscriptions.keys())}get url(){return this.opts.url??null}get identity(){return this._identity}get serverChannels(){return this._serverChannels}get serverMethods(){return this._serverMethods}onIdentity(e){return this.on(Ay.identity,e)}onState(e){return this.on(Ay.state,e)}onStats(e){return this.on(Ay.stats,e)}onBinary(e){return(this._binaryHandlers??=new Set).add(e),()=>{this._binaryHandlers?.delete(e),this._binaryHandlers?.size===0&&(this._binaryHandlers=null)}}sendBinary(e){return this.transport?.readyState===jy.OPEN?(this.transport.send(e),!0):(this._framesUnsent++,!1)}onReconnect(e){return this.on(Ay.reconnect,e)}channel(e){let t=this,n=new Set;return{name:e,on(r){let i=t.on(e,r);return n.add(i),()=>{i(),n.delete(i)}},send(n){t.publish(e,n)},open(){t.subscribe(e)},close(){for(let e of n)e();n.clear(),t.unsubscribe(e)}}}adaptiveChannel(e,t,n){return nb(this,e,t,n)}async request(e,t,n=3e4){return e.charCodeAt(0)===47&&(typeof t==`number`&&(n=t),t={path:e},e=`api.request`),this.peer.request(e,t,n)}async mutate(e,t){return this.peer.request(`api.request`,{path:e,method:t.method,body:t.body,idempotencyKey:t.idempotencyKey},t.timeoutMs??3e4)}async call(e,t){let{result:n,meta:r}=await this.peer.requestTraced(`api.request`,{path:e,method:t?.method??`GET`,body:t?.body,idempotencyKey:t?.idempotencyKey},t?.timeoutMs??3e4);return{result:n,requestId:typeof r?.requestId==`string`?r.requestId:null}}async ping(e=5e3){let t=()=>typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),n=t();return{...await this.request(oy.ping,void 0,e),rtt:Math.round(t()-n)}}notify(e,t){this.peer.notify(e,t)}register(e,t){this.peer.register(e,t)}unregister(e){this.peer.unregister(e)}get methods(){return this.peer.methods}receive(e,t=0){this.recordFrame(`in`,e,t);let n=this.peer.receive(e);return n===`invalid`&&this.handleServerError(e),n}dispose(e){this.peer.dispose(e)}get framesReceived(){return this._framesReceived}get framesUnsent(){return this._framesUnsent}get binaryFramesDiscarded(){return this._binaryFramesDiscarded}get malformedFramesDiscarded(){return this._malformedFramesDiscarded}get lastFrameAt(){return this._lastFrameAt}get lastFrameMethod(){return this._lastFrameMethod}getStats(){return Array.from(this._stats.values())}getChannelStats(e){return this._stats.get(e)}trackFrame(e){let t=Date.now();this._framesReceived++,this._lastFrameAt=t,this._lastFrameMethod=e;let n=this._stats.get(e);n||(n={method:e,msgCount:0,lastMessage:null,rate:0,series:[]},this._stats.set(e,n)),n.msgCount++,n.lastMessage=t}replaySubscriptions(){this._welcomed=!0;for(let e of this._subscriptions.keys())this._emitRaw(`subscribe`,{channel:e});let e=this._ackWaiters;if(!this._subscriptionAcks&&e!==null){this._ackWaiters=null;for(let t of e.values())for(let e of t)e.resolve()}}ingestSubscribed(e){let t=xb(e,`channel`);if(typeof t==`string`&&this._subscriptions.has(t)&&((this._acked??=new Set).add(t),this._ackWaiters!==null&&this.resolveAckWaiters(t),this.handlers.get(Ay.subscribed)?.size)){let e={channel:t};this.fireLocal(Ay.subscribed,e)}}ingestWelcome(e){if(this._subscriptionAcks=xb(e,`subscriptionAcks`)===!0,typeof e!=`object`||!e)return;this._identity=Cb(xb(e,`identity`)),this._serverChannels=Sb(xb(e,`channels`)),this._serverMethods=Sb(xb(e,`methods`));let t=xb(e,`env`);Ry(typeof t==`string`?t:void 0),this.opts.banner!==!1&&!Jy()&&this.detailsSocket(),this.fireLocal(Ay.identity,this._identity)}detailsSocket(){let e={};for(let t of ry(ty(this)))e[t.label]={valeur:t.value};qy(e,this,`socket nodefony — détail et raccourcis`)}ingestDenied(e){let t=xb(e,`channel`),n=typeof t==`string`?t:``,r=xb(e,`reason`),i=r===`unknown`||r===`limit`?r:`forbidden`,a=xb(e,`detail`),o=typeof a==`string`?a:void 0,s={channel:n,reason:i,...o===void 0?{}:{detail:o}};this.fireNotice(yy(s)),this.fireLocal(Ay.denied,s),this.rejectAckWaiters(n,bb,s)}dispatchNotification(e,t){e===`realtime:welcome`?(this.ingestWelcome(t),this.replaySubscriptions()):e===`realtime:subscribed`?this.ingestSubscribed(t):e===`realtime:denied`&&this.ingestDenied(t),this.trackFrame(e),this.handlers.get(e)?.forEach(e=>{try{e(t)}catch{}}),this.handlers.get(`*`)?.forEach(n=>{try{n(e,t)}catch{}})}handleServerError(e){if(typeof e!=`object`||!e||!(`error`in e)||`id`in e&&dy(e.id))return;let t=e.error;if(typeof t!=`object`||!t)return;let n=`message`in t&&typeof t.message==`string`?t.message:``;this.fireNotice({level:`error`,title:`Temps réel`,message:n||`Erreur serveur temps réel`,source:`server`,code:`code`in t&&typeof t.code==`number`?t.code:void 0,ts:Date.now()})}startStatsSampler(){this.statsTimer||(this.statsTimer=setInterval(()=>{for(let e of this._stats.values()){let t=this._prevSampled.get(e.method)??e.msgCount;e.rate=Math.max(0,e.msgCount-t),this._prevSampled.set(e.method,e.msgCount),e.series=[...e.series,e.rate].slice(-32)}this.fireLocal(Ay.stats)},1e3),cy(this.statsTimer))}fireNotice(e){this.fireLocal(Ay.notice,e)}fireLocal(e,...t){this.handlers.get(e)?.forEach(e=>{try{e(...t)}catch{}})}openSocket(){return new Promise((e,t)=>{if(this._welcomed=!1,this._acked=null,this.setState(this.reconnectAttempt>0?`reconnecting`:`connecting`),this.intentionalClose){t(Error(`[nodefony] connexion temps réel annulée par disconnect()`));return}let n,r=null;try{let e=fb(this.requireUrl(),typeof window<`u`?window.location.href:`http://localhost`);r=e,this.opts.token&&e.searchParams.set(`token`,this.opts.token),n=this.transportFactory(e.toString()),this.transport=n}catch(e){this.setState(`error`),t(e instanceof Error?e:Error(String(e),{cause:e}));return}let i=0;n.onOpen(()=>{this.connectTimer&&clearTimeout(this.connectTimer),this.connectTimer=null,i=Date.now();let t=this.reconnectAttempt>0;this._nextRetryAt=null,this.setState(`connected`),this.intentionalClose||(this.startHeartbeat(),t&&this.fireNotice({level:`success`,title:`Temps réel`,message:`Connexion temps réel rétablie`,source:`realtime`,ts:Date.now()})),e()}),n.onMessage(e=>this.handleMessage(e)),n.onError(()=>{}),n.onClose((e,n)=>{this.clearTimers(),this.transport=null,i===0&&t(Error(`[nodefony] connexion temps réel fermée avant ouverture (code ${e})`)),this.intentionalClose?this.setState(`disconnected`):(i!==0&&Date.now()-i>=cb&&(this.reconnectAttempt=0),i===0&&this.opts.probe!==!1&&(e===1006||e===1005)?this.probeThenSettle(r,e,n):this.settleClose(e,n))});let a=this.opts.connectTimeout??lb;a>0&&(this.connectTimer=setTimeout(()=>{this.connectTimer=null,n.close(1e3,`connect timeout`)},Math.min(a,sb))),n.connect()})}disconnectRequested(){return this.intentionalClose}settleClose(e,t){let n=by(e,t);if(n&&this.fireNotice(n),this.disconnectRequested())return;let r=Sy(e);r&&this.opts.autoReconnect!==!1?this.scheduleReconnect():this.setState(r?`disconnected`:`error`)}async probeThenSettle(e,t,n){let r=this.opts.probe||mb,i;try{i=await r(pb(e),this.opts.token??null)}catch{i=null}if(!(this.disconnectRequested()||this.transport!==null)){if(i!==null&&Cy(i)){if(this.fireNotice(wy(i)),this.disconnectRequested())return;this.setState(`error`)}else this.settleClose(t,n)}}scheduleReconnect(){this.reconnectAttempt++;let e=db(this.reconnectAttempt,this.opts.reconnectDelay??1e3,this.opts.reconnectDelayMax??3e4);this._nextRetryAt=Date.now()+e,this.reconnectTimer=setTimeout(()=>{this.openSocket().catch(()=>{})},e),this.setState(`reconnecting`),!this.intentionalClose&&this.fireLocal(Ay.reconnect,{attempt:this.reconnectAttempt,delay:e,nextRetryAt:this._nextRetryAt})}startHeartbeat(){let e=this.opts.heartbeatInterval??3e4;this.heartbeatTimer=setInterval(()=>{this.transport?.readyState===jy.OPEN&&this._emitRaw(`ping`,{ts:Date.now()})},e)}clearTimers(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.connectTimer&&clearTimeout(this.connectTimer),this.reconnectTimer=null,this.heartbeatTimer=null,this.connectTimer=null}get frameLog(){return(this._rawFrames??[]).map(t=>e.buildFrame(t.dir,t.msg,t.ts))}clearFrameLog(){this._rawFrames&&(this._rawFrames.length=0),this._rawFramesChars=0}recordFrame(t,n,r){let i=Date.now(),a=r>ab,o=a?hb(n,r):n,s=a?0:r,c=this._rawFrames??=[];for(c.push({ts:i,dir:t,msg:o,size:s}),this._rawFramesChars+=s;c.length>rb||this._rawFramesChars>ib;){let e=c.shift();if(!e)break;this._rawFramesChars-=e.size}let l=this.handlers.get(`__frame__`);l&&l.size>0&&this.fireLocal(`__frame__`,e.buildFrame(t,o,i))}static buildFrame(e,t,n){let r=xb(t,`method`),i=xb(t,`id`),a=`?`,o;if(typeof r==`string`){a=r;let e=xb(xb(t,`params`),`channel`);typeof e==`string`&&(o=e)}else xb(t,`error`)===void 0?xb(t,`result`)!==void 0&&(a=`response`):a=`error`;return{ts:n,dir:e,kind:a,id:typeof i==`number`?i:void 0,channel:o,payload:_b(t)}}send(e){if(this.transport?.readyState!==jy.OPEN)return this._framesUnsent++,!1;let t=JSON.stringify(e);return this.transport.send(t),this.recordFrame(`out`,e,t.length),!0}noticeUnsent(){this._unsentNotified||(this._unsentNotified=!0,this.fireNotice({level:`warning`,title:`Temps réel`,message:`Connexion interrompue — les messages émis pendant la coupure sont perdus`,source:`realtime`,ts:Date.now()}))}handleMessage(e){if(typeof e!=`string`){if(this._binaryHandlers!==null){for(let t of this._binaryHandlers)try{t(e)}catch{}return}++this._binaryFramesDiscarded===1&&this.fireNotice(Ty(`binary`));return}let t;try{t=JSON.parse(e)}catch{++this._malformedFramesDiscarded===1&&this.fireNotice(Ty(`malformed`));return}this.receive(t,e.length)}setState(e){this._state!==e&&(e===`connected`&&(this._unsentNotified=!1),this._state=e,this.fireLocal(Ay.state,e))}};function Tb(e){let t=e.kernel?.get(`realtime`)??e.client;if(!t&&e.kernel&&!e.url)throw Error("connectShared : le noyau fourni n'a composé aucune socket temps réel (realtime: false) — lui en composer une, ou donner `client` ou `url`.");let n=t??wb.shared({url:e.url}),r=!t;return{socket:n,owned:r,start(){r&&n.connect().catch(()=>{})}}}function Eb(e,t){return t(e.state),e.onState(t)}function Db(e,t,n){let r=e.channel(t);return r.on(e=>n(e)),r.open(),()=>r.close()}function Ob(e,t,n=!0){return`${e}|${t}|${+!!n}`}var kb=`/nodefony/security/api/auth`,Ab=`/nodefony/security/api/webauthn`,jb=`/nodefony/security/api/oauth2`,Mb=`${kb}/login`,Nb=`${kb}/login/totp`,Pb=`${kb}/logout`,Fb=`${kb}/me`,Ib=`${Ab}/login/options`,Lb=`${Ab}/login/verify`,Rb=`${Ab}/status`,zb=`${jb}/providers`;function Bb(e,t,n){let r=`${jb}/${encodeURIComponent(e)}/authorize`,i=[];return t&&i.push(`from=${encodeURIComponent(t)}`),n&&i.push(`back=${encodeURIComponent(n)}`),i.length===0?r:`${r}?${i.join(`&`)}`}var Vb=`access_denied`,Hb=`totp`;Object.freeze({frontispiece:{layout:`split`,backdrop:!1},ledger:{layout:`bare`,backdrop:!1},horizon:{layout:`card`,backdrop:!1},console:{layout:`card`,backdrop:!1},blueprint:{layout:`card`,backdrop:!0},dots:{layout:`card`,backdrop:!0},minimal:{layout:`bare`,backdrop:!1},enterprise:{layout:`card`,backdrop:!0},"photo-card":{layout:`card`,backdrop:!0}});var Ub=new Set([Hb]),Wb=30,Gb=class extends Error{};function Kb(e){return typeof e==`object`&&e&&`result`in e?e.result:e}function qb(e,t){if(typeof e==`object`&&e)return Reflect.get(e,t)}function Jb(e){let t=typeof e==`string`?Number(e):e;return typeof t==`number`&&Number.isFinite(t)&&t>0?Math.ceil(t):null}function Yb(e){let t=qb(e.body,`error`);return e.retryAfterS??Jb(qb(e.body,`retryAfter`))??Jb(qb(t,`retryAfter`))}function Xb(e){let t=qb(e,`error`);if(typeof t==`string`)return t;let n=qb(t,`message`);if(typeof n==`string`)return n;let r=qb(e,`message`);return typeof r==`string`?r:``}function Zb(e){let t=qb(e,`id`);return(typeof t==`string`||typeof t==`number`)&&typeof qb(e,`identifier`)==`string`&&Array.isArray(qb(e,`roles`))}function Qb(e){let t=qb(e,`user`);return Zb(t)?t:null}function $b(e){let t=qb(e,`providers`);return Array.isArray(t)?t.flatMap(e=>{let t=qb(e,`name`);if(typeof t!=`string`||t===``)return[];let n=qb(e,`label`);return[{name:t,label:typeof n==`string`?n:t}]}):[]}function ex(){let e=globalThis,t=e.PublicKeyCredential?.parseRequestOptionsFromJSON,n=e.navigator?.credentials,r=n?.get;return typeof t!=`function`||typeof r!=`function`?null:{async sign(i){let a=t.call(e.PublicKeyCredential,i),o=await r.call(n,{publicKey:a}),s=qb(o,`toJSON`);if(typeof s!=`function`)throw TypeError(`assertion WebAuthn non sérialisable`);return s.call(o)}}}function tx(e){let t=qb(e,`name`);return t===`NotAllowedError`||t===`AbortError`}function nx(){let e=globalThis.location;return e===void 0?void 0:`${e.pathname}${e.search}`}var rx=class{#e;#t;#n;#r;#i;#a;#o;#s=null;#c=null;constructor(e={}){this.#e=e.baseUrl??``,this.#t=e.fetch??((e,t)=>globalThis.fetch(e,t)),this.#n=e.now??Date.now,this.#r=e.navigate??(e=>{globalThis.location.assign(e)}),this.#i=e.passkey===void 0?ex():e.passkey,this.#a=e.defaultRetryAfterS??Wb;let t=(e.identifier??``).trim();this.#o={step:t===``?`identifier`:`password`,identifier:t,pending:!1,user:null,mfaMethods:[],error:null,providers:null,passkeyAvailable:this.#i!==null}}getState=()=>this.#o;subscribe=e=>((this.#s??=[]).push(e),()=>{if(this.#s===null)return;let t=this.#s.indexOf(e);t!==-1&&this.#s.splice(t,1),this.#s.length===0&&(this.#s=null)});submitIdentifier(e){let t=e.trim();t!==``&&this.#l({step:`password`,identifier:t,error:null})}submitPassword(e){let t=this.#o.identifier;return t===``?Promise.resolve(this.#o):this.#h(async()=>{let n=await this.#u(`POST`,Mb,{username:t,password:e});if(n.status===202&&qb(n.body,`mfaRequired`)===!0){let e=qb(n.body,`methods`),t=Array.isArray(e)?e.filter(e=>Ub.has(e)):[];return t.length===0?this.#l({pending:!1,error:{kind:`server`,message:``,status:n.status,retryAt:null}}):this.#l({step:`mfa`,pending:!1,mfaMethods:t})}return this.#d(n)})}login(e,t){return this.submitIdentifier(e),this.submitPassword(t)}submitMfaCode(e){return this.#o.step===`mfa`?this.#h(async()=>this.#d(await this.#u(`POST`,Nb,{code:e.replace(/\s+/gu,``)}))):Promise.resolve(this.#o)}loginWithPasskey(){let e=this.#i;return e===null?Promise.resolve(this.#l({error:{kind:`unsupported`,message:``,status:null,retryAt:null}})):this.#h(async()=>{let t=await this.#u(`POST`,Ib,{});if(t.status!==200)return this.#p(t);let n=await e.sign(t.body);return this.#d(await this.#u(`POST`,Lb,{response:n}))})}loadProviders(){return this.#c??=this.#u(`GET`,zb).then(e=>{if(e.status!==200)return this.#c=null,[];let t=$b(e.body);return this.#l({providers:t}),t},()=>(this.#c=null,[]))}startProvider(e,t,n){this.#r(`${this.#e}${Bb(e,t,n??nx())}`)}async me(){try{let e=await this.#u(`GET`,Fb),t=e.status===200?Qb(e.body):null;return t!==null&&this.#f(t),t}catch{return null}}async logout(){let e=null;try{let t=qb((await this.#u(`POST`,Pb)).body,`logoutUrl`);e=typeof t==`string`&&t!==``?t:null}catch{e=null}finally{this.#l({step:`identifier`,pending:!1,user:null,mfaMethods:[],error:null})}return e}back(){this.#o.pending||this.#l({step:`identifier`,mfaMethods:[],error:null})}#l(e){this.#o={...this.#o,...e};let t=this.#s;if(t!==null)for(let e of t.slice())e(this.#o);return this.#o}async#u(e,t,n){let r;try{r=await this.#t(`${this.#e}${t}`,{method:e,credentials:`same-origin`,headers:n===void 0?{accept:`application/json`}:{accept:`application/json`,"content-type":`application/json`},...n===void 0?{}:{body:JSON.stringify(n)}})}catch(e){throw new Gb(e instanceof Error?e.message:String(e))}let i;try{i=Kb(await r.json())}catch{i=null}return{status:r.status,body:i,retryAfterS:Jb(r.headers.get(`retry-after`))}}#d(e){let t=e.status===200?Qb(e.body):null;return t===null?this.#p(e):this.#f(t)}#f(e){return this.#l({step:`authenticated`,identifier:e.identifier,pending:!1,user:e,mfaMethods:[],error:null})}#p(e,t){if(e===null)return this.#l({pending:!1,error:tx(t)?{kind:`cancelled`,message:``,status:null,retryAt:null}:{kind:t instanceof Gb?`network`:`server`,message:t instanceof Error?t.message:``,status:null,retryAt:null}});if(e.status===429){let t=Yb(e)??this.#a;return this.#l({pending:!1,error:{kind:`throttled`,message:Xb(e.body),status:429,retryAt:this.#n()+t*1e3}})}return this.#l({pending:!1,error:{kind:e.status===401||e.status===403?`credentials`:`server`,message:Xb(e.body),status:e.status,retryAt:null}})}#m(){let e=this.#o.error?.retryAt??null;return e!==null&&this.#n()<e}async#h(e){if(this.#o.pending||this.#m())return this.#o;this.#l({pending:!0,error:null});try{return await e()}catch(e){return this.#p(null,e)}}};function ix(e){let t=e?.constructor?.name;return typeof t==`string`?t:void 0}var ax=0;function ox(){let e=function(){};return e.prototype=Object.create(null),e}var sx=class e{protoService;services;#e=null;scopes=null;constructor(t,n){this.protoService=n??ox(),t&&t instanceof e?(this.services=Object.create(t.protoService.prototype),this.setServices(t.services??{})):this.services=Object.create(this.protoService.prototype)}get id(){return this.#e??=(++ax).toString(36),this.#e}get closed(){return this.services===null}setServices(e){for(let t in e)this.set(t,e[t])}log(e,t,n,r){let i=this.get(`syslog`);if(!i)console.warn(`[Container] no syslog registered —`,e);else return n||=`SERVICES CONTAINER`,i.log(e,t,n,r)}set(e,t){if(this.services&&e)this.protoService.prototype[e]=t,this.services[e]=t;else throw Error(`Container bad argument name`)}get(e){let t=this.services?.[e];return t===void 0?null:t}remove(e){return this.services?e in this.services&&(delete this.services[e],e in this.protoService.prototype&&delete this.protoService.prototype[e],!0):!1}has(e){return this.services!=null&&e in this.services}keys(){return Object.keys(this.services??{})}entries(){return Object.entries(this.services??{})}addScope(e){this.scopes??=new Map;let t=this.scopes.get(e);return t||(t=new Set,this.scopes.set(e,t)),t}enterScope(e){let t=this.scopes?.get(e);if(!t)throw Error(`Scope "${e}" not declared. Call addScope("${e}") first.`);let n=new cx(e,this,this.protoService);return t.add(n),n}leaveScope(e){this.scopes?.get(e.name)?.delete(e)&&e.clean()}scopeCount(e){return this.scopes?.get(e)?.size??0}removeScope(e){let t=this.scopes?.get(e);if(t){for(let e of t)this.leaveScope(e);this.scopes?.delete(e)}}removeAllScopes(){if(this.scopes){for(let e of this.scopes.keys())this.removeScope(e);this.scopes=null}}clean(){this.removeAllScopes(),this.services=null}reset(){this.clean(),this.protoService=ox(),this.services=Object.create(this.protoService.prototype)}},cx=class e extends sx{name;owned=null;constructor(t,n,r){super(void 0,r),this.name=t,n instanceof e&&n.services!==null&&(this.services=Object.create(n.services))}reset(){throw Error(`reset() is not allowed on scope "${this.name}": leave it with leaveScope() and enter a new one`)}set(e,t){if(this.services&&e)this.services[e]=t;else throw Error(`Container bad argument name`)}remove(e){return this.services&&Object.prototype.hasOwnProperty.call(this.services,e)?(delete this.services[e],!0):!1}hasOwn(e){return this.services!==null&&Object.prototype.hasOwnProperty.call(this.services,e)}own(e){if(this.services===null)throw Error(`own() sur le scope « ${this.name} », déjà fermé : l'objet ne serait jamais nettoyé.`);this.owned===null?this.owned=[e]:this.owned.push(e)}clean(){let t=this.owned;if(t!==null){this.owned=null;for(let n=t.length-1;n>=0;n--){let r=t[n];try{let t=r.clean?.();if(t!=null&&typeof t.then==`function`){let n=this.get(`syslog`);Promise.resolve(t).catch(t=>{let i=e.cleanFailure(this.name,r,t);n?n.log(i,`ERROR`,`SERVICES CONTAINER`):console.warn(`[Container] ${i}`)})}}catch(t){this.log(e.cleanFailure(this.name,r,t),`ERROR`)}}}return super.clean()}static cleanFailure(e,t,n){return`clean() de « ${typeof t.name==`string`?t.name:ix(t)} », rattaché au scope « ${e} », a levé : `+(n instanceof Error?n.message:String(n))}};function lx(){let e=globalThis.crypto;if(typeof e.randomUUID==`function`)return e.randomUUID();let t=e.getRandomValues(new Uint8Array(16));t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;let n=``;for(let e of t)n+=e.toString(16).padStart(2,`0`);return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}var ux=function(e){return e[e.EMERGENCY=0]=`EMERGENCY`,e[e.ALERT=1]=`ALERT`,e[e.CRITIC=2]=`CRITIC`,e[e.ERROR=3]=`ERROR`,e[e.WARNING=4]=`WARNING`,e[e.NOTICE=5]=`NOTICE`,e[e.INFO=6]=`INFO`,e[e.DEBUG=7]=`DEBUG`,e}(ux||{}),dx=[0,1,2,3,4,5,6,7],fx=[`EMERGENCY`,`ALERT`,`CRITIC`,`ERROR`,`WARNING`,`NOTICE`,`INFO`,`DEBUG`],px=`browser`,mx=function(e=`INFO`){let t=typeof e==`number`?dx[e]:ux[e];if(typeof t==`number`)return t;throw Error(`Not a valid nodefony syslog severity: ${e}`)},hx=Object.entries(ux).reduce((e,[t,n])=>(e[t]=n,e),{}),gx=new Map(Object.entries(ux).filter(([,e])=>typeof e==`number`).map(([e,t])=>[t,e])),_x=globalThis.Buffer,vx=globalThis.process?.pid??0,yx=e=>{if(e===null)return null;let t=typeof e;return t===`object`?Array.isArray(e)?`array`:e instanceof Date?`date`:e instanceof RegExp?`RegExp`:e instanceof Error?`Error`:_x?.isBuffer(e)?`buffer`:`object`:t},bx=0,xx=new Set([`payload`,`uid`,`severity`,`timeStamp`,`severityName`,`typePayload`,`moduleName`,`msgid`,`msg`,`status`,`pid`,`requestId`]),Sx=class e{payload;uid;severity;timeStamp;severityName;typePayload;moduleName;msgid;msg;status;pid;requestId;static requestIdProvider=null;constructor(t,n,r=`nodefony`,i=``,a=``,o){this.timeStamp=o===void 0?Date.now():typeof o==`number`?o:o instanceof Date?o.getTime():new Date(o).getTime(),this.uid=++bx,this.severity=mx(n);let s=gx.get(this.severity);if(s===void 0)throw Error(`Invalid severity value: ${this.severity}`);this.severityName=s,this.typePayload=yx(t),this.payload=t,this.moduleName=r,this.msgid=i,this.msg=a,this.status=`NOTDEFINED`,this.pid=vx,this.requestId=e.requestIdProvider===null?void 0:e.requestIdProvider()}static sysLogSeverity(){return hx}static severityToString(e){let t=typeof e==`string`?parseInt(e,10):e;return isNaN(t)?typeof ux[e]==`number`?e:void 0:ux[t]}getDate(){return new Date(this.timeStamp).toTimeString()}toString(){return`TimeStamp:${this.getDate()} Log:${String(this.payload)} ModuleName:${this.moduleName} SeverityName:${this.severityName} MessageID:${this.msgid} UID:${this.uid} Message:${this.msg}`}parseJson(e){let t=JSON.parse(e);if(!ey(t))return null;for(let[e,n]of Object.entries(t))xx.has(e)&&Reflect.set(this,e,n);return t}},Cx=Array.isArray,wx=e=>Cx(e);function Tx(){let e=[];return wx(e)?e:{}}function Ex(e,t,n){for(let r of Object.keys(n)){let i=n[r];if(r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&t!==i){if(e&&typeof i==`object`&&i){let e=wx(i);if(e||ey(i)){let n=t[r],a;a=e?wx(n)?n:Tx():ey(n)?n:{},Ex(!0,a,i),t[r]=a;continue}}i!==void 0&&(t[r]=i)}}}var Dx=(...e)=>{let t=e[0]||{},n=1,r=!1,{length:i}=e;typeof t==`boolean`&&(r=t,t=e[n]||{},n++),typeof t!=`object`&&typeof t!=`function`&&(t={}),n===i&&(t={},n--);let a=t;for(;n<i;n++){let t=e[n];t!=null&&Ex(r,a,t)}return a};globalThis.Buffer;var Ox=`(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)`;RegExp(`^127\\.${Ox}\\.${Ox}\\.${Ox}$`);var kx=class{_listeners=new Map;_maxListeners=10;on(e,t){let n=this._listeners.get(e)??[];return n.push(t),this._listeners.set(e,n),this}addListener(e,t){return this.on(e,t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}off(e,t){let n=this._listeners.get(e);if(!n)return this;let r=n.indexOf(t);return r!==-1&&n.splice(r,1),n.length===0&&this._listeners.delete(e),this}removeListener(e,t){return this.off(e,t)}removeAllListeners(e){return e===void 0?this._listeners.clear():this._listeners.delete(e),this}emit(e,...t){let n=this._listeners.get(e);if(!n||n.length===0)return!1;for(let e of n.slice())try{e(...t)}catch(e){console.error(`[EventEmitter] listener threw:`,e)}return!0}listenerCount(e){return this._listeners.get(e)?.length??0}listeners(e){return(this._listeners.get(e)??[]).slice()}eventNames(){return Array.from(this._listeners.keys())}setMaxListeners(e){return this._maxListeners=e,this}getMaxListeners(){return this._maxListeners}rawListeners(e){return(this._listeners.get(e)??[]).slice()}prependListener(e,t){let n=this._listeners.get(e)??[];return n.unshift(t),this._listeners.set(e,n),this}prependOnceListener(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return this.prependListener(e,n)}},Ax=/^on(.*)$/;function jx(e){return e!=null&&typeof e.then==`function`}var Mx=class extends kx{constructor(e,t,n){super(),n?.nbListeners!==void 0&&this.setMaxListeners(n.nbListeners),e&&this.settingsToListen(e,t)}settingsToListen(e,t){for(let n of Object.keys(e)){let r=Ax.exec(n);r&&(t?this.listen(t,r[0],e[n]):this.on(r[0],e[n]))}}listen(e,t,n){return typeof n==`function`&&this.addListener(t,n.bind(e)),(...e)=>this.emit(t,...e)}fire(e,...t){return super.emit(e,...t)}async emitAsync(e,...t){if(this.listenerCount(e)===0)return!1;let n=this.rawListeners(e),r=[];for(let e of n){let n=Reflect.apply(e,this,t);r.push(jx(n)?await n:n)}return r}async fireAsync(e,...t){return this.emitAsync(e,...t)}async emitAsyncGuarded(e,t={},...n){let r=[],i=[];if(this.listenerCount(e)===0)return{results:r,errors:i,stopped:!1};let a=this.rawListeners(e),o=t.timeoutMs??0,s=typeof o==`function`,c=t.warnMs??0,l=c>0;for(let e=0;e<a.length;e+=1){let u=a[e],d=s?o(u,e):o,f=l?Date.now():0,p=!1;try{let i=Promise.resolve(Reflect.apply(u,this,n)),a;if(d>0){i.catch(()=>{});let e;try{a=await Promise.race([i,new Promise((t,n)=>{e=setTimeout(()=>{p=!0,n(Error(`listener timeout après ${d}ms`))},d),cy(e)})])}finally{e&&clearTimeout(e)}}else a=await i;if(r.push(a),l&&t.onListenerSlow){let n=Date.now()-f;n>=c&&t.onListenerSlow({index:e,listener:u,timedOut:!1,durationMs:n})}}catch(n){let a=l?Date.now()-f:0,o=p?Error(`listener timeout après ${d}ms`):n;if(i.push({index:e,error:o,timedOut:p}),t.onListenerError?.(o,{index:e,listener:u,timedOut:p,durationMs:a})===!0)return{results:r,errors:i,stopped:!0}}}return{results:r,errors:i,stopped:!1}}},Nx=(e,t)=>{try{return JSON.stringify(e,null,2)}catch{return String(e)}},Px=(e,t,n)=>String(t),Fx=1e4;function Ix(e){return typeof e==`number`&&Number.isInteger(e)&&e>0&&e<=Fx}function Lx(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.channel===`nf-dev`&&t.type===`resize`&&Ix(t.columns)&&Ix(t.rows)}var Rx=`NF_DEV_TERMINAL`,zx=Symbol.for(`nodefony.terminalGate`);function Bx(){let e=globalThis;return e[zx]??={verdict:void 0,resizeListeners:null},e[zx]}function Vx(){return globalThis.process}function Hx(e){if(e.length>1024)return null;let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t)return null;let n=t;return!Ix(n.columns)||!Ix(n.rows)?null:{input:!1,columns:n.columns,rows:n.rows}}function Ux(){let e=Bx();if(e.verdict!==void 0)return e.verdict;let t=Vx(),n=t?.env[Rx];if(e.verdict=null,n===void 0||t===void 0)return null;Reflect.deleteProperty(t.env,Rx);let r=Hx(n);if(r===null)return null;let i={columns:r.columns,rows:r.rows};return e.verdict=i,Wx(t,e),i}function Wx(e,t){typeof e.send==`function`&&(e.on(`message`,e=>{let n=t.verdict;if(!Lx(e)||!n||(n.columns=e.columns,n.rows=e.rows,t.resizeListeners===null))return;let r={columns:n.columns,rows:n.rows};for(let e of t.resizeListeners)e(r)}),e.channel?.unref())}function Gx(e,t){return e!==void 0&&(t===e.stdout||t===e.stderr)}function Kx(e){if(e===void 0)return!1;let t=Vx();if(Ux()!==null){if(Gx(t,e))return!0;if(e===t?.stdin)return!1}return e.isTTY??!1}var qx=new Set(`reset.bold.dim.italic.underline.inverse.strikethrough.black.red.green.yellow.blue.magenta.cyan.white.gray.blackBright.redBright.greenBright.yellowBright.blueBright.magentaBright.cyanBright.whiteBright.bgBlack.bgRed.bgGreen.bgYellow.bgBlue.bgMagenta.bgCyan.bgWhite.bgGray`.split(`.`)),Jx=`\x1B[0m`;function Yx(e){return new Proxy(t=>{let n=String(t);if(e.length===0)return n;try{return Px(e,n,{validateStream:!1})}catch{return n}},{get(t,n,r){return n===`reset`?Jx:typeof n==`string`&&qx.has(n)?Yx([...e,n]):Reflect.get(t,n,r)}})}var Xx=Yx([]),Zx=[`cyan`,`magenta`,`red`,`green`,`yellow`,`blue`,`blackBright`,`yellowBold`,`redBold`,`cyanBold`,`blueBrightBold`,`cyanBgBlue`,`cyanBgBlack`],Qx=e=>e,$x={cyan:Xx.cyan,magenta:Xx.magenta,red:Xx.red,green:Xx.green,yellow:Xx.yellow,blue:Xx.blue,blackBright:Xx.blackBright,yellowBold:Xx.yellow.bold,redBold:Xx.red.bold,cyanBold:Xx.cyan.bold,blueBrightBold:Xx.blueBright.bold,cyanBgBlue:Xx.cyan.bgBlue,cyanBgBlack:Xx.cyan.bgBlack},eS={...$x},tS=!1;function nS(e){tS=e;for(let t of Zx)eS[t]=e?$x[t]:Qx}function rS(){return tS}function iS(e){let t={};return typeof t.NO_COLOR==`string`&&t.NO_COLOR!==``?!1:typeof t.FORCE_COLOR==`string`&&t.FORCE_COLOR!==``&&t.FORCE_COLOR!==`0`||e}var aS=globalThis.process;nS(iS(!aS?.env?.NF_NO_TTY&&Kx(aS?.stdout)));var oS=class{#e;#t=0;#n=0;capacity;constructor(e){this.capacity=e,this.#e=Array(e)}push(e){this.#n===this.capacity?(this.#e[this.#t]=e,this.#t=(this.#t+1)%this.capacity):(this.#e[(this.#t+this.#n)%this.capacity]=e,this.#n++)}shift(){if(this.#n===0)return;let e=this.#e[this.#t];return this.#e[this.#t]=void 0,this.#t=(this.#t+1)%this.capacity,this.#n--,e}at(e){let t=e<0?this.#n+e:e;if(!(!Number.isInteger(t)||t<0||t>=this.#n))return this.#e[(this.#t+t)%this.capacity]}get length(){return this.#n}last(){return this.at(-1)}clear(){this.#e.fill(void 0),this.#t=0,this.#n=0}toArray(){let e=Array(this.#n);for(let t=0;t<this.#n;t++)e[t]=this.#e[(this.#t+t)%this.capacity];return e}},sS=e=>eS.yellowBold(e),cS=e=>eS.redBold(e),lS=e=>eS.cyanBold(e),uS=e=>eS.blueBrightBold(e),dS=e=>eS.green(e),fS=globalThis.process,pS=e=>e.replace(/\x1b\[[0-9;]*m/g,``),mS=`auto`,hS=null,gS=null,_S=0,vS=!1,yS=65536,bS=globalThis.setImmediate,xS=()=>(hS===null&&(hS=bS?mS===`on`||mS!==`off`&&!Kx(fS?.stdout):!1),hS),SS={name:`stdout`,writeOut(e){fS?.stdout?fS.stdout.write(e):console.log(pS(e).replace(/\n$/,``))},writeErr(e){fS?.stderr?fS.stderr.write(e):console.error(pS(e).replace(/\n$/,``))},flushSync(){},close(){}},CS={name:`null`,writeOut(){},writeErr(){},flushSync(){},close(){}},wS=SS,TS=!1,ES=e=>{TS||wS.writeOut(e)},DS=e=>{TS||wS.writeErr(e)},OS=()=>{vS=!1,gS&&gS.length>0&&(ES(gS.join(``)),gS.length=0,_S=0)},kS=e=>{OS(),mS=e===!0?`on`:e===!1?`off`:`auto`,hS=null},AS=e=>{OS(),wS!==e&&wS!==SS&&wS!==CS&&wS.close(),wS=e??SS},jS=e=>{xS()?(gS??=[],gS.push(e),_S+=e.length,_S>=yS?OS():!vS&&bS&&(vS=!0,bS(OS))):ES(e)},MS=e=>{gS&&gS.length>0&&OS(),DS(e)};if(fS?.on){let e=()=>{OS(),wS.flushSync()};fS.on(`exit`,e),fS.on(`beforeExit`,e)}var NS=function(e){if(typeof e==`boolean`)return e;if(typeof e==`string`){if([`false`,`undefined`,`null`].includes(e))return!1;if(e===`true`||e===`*`)return!0;let t=e.split(/,| /);return t[0]===`*`||t}return Array.isArray(e)?e[0]===`*`||e:!1},PS=function(e,t=!1){t=NS(t);let n;return n=e===`development`?{severity:{operator:`<=`,data:t===!1?6:7}}:{severity:{operator:`<=`,data:t?7:6}},typeof t==`object`&&(n.msgid={operator:`==`,data:t}),n},FS={moduleName:`SYSLOG`,msgid:``,maxStack:100,rateLimit:!1,burstLimit:3,defaultSeverity:`DEBUG`,checkConditions:`&&`,async:!1},IS=Sx.sysLogSeverity(),LS={"<":(e,t)=>e<t,">":(e,t)=>e>t,"<=":(e,t)=>e<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,RegExp:(e,t)=>t.test(e)},RS={severity:(e,t)=>{let n=t.data;for(let r in n){let i=n[r];if(i!==void 0&&t.operator&&LS[t.operator](e.severity,i))return!0}return!1},msgid:(e,t)=>{if(t.data instanceof RegExp)return t.data.test(e.msgid);for(let n in t.data)if(t.operator&&LS[t.operator](e.msgid,n))return!0;return!1},date:(e,t)=>t.operator?LS[t.operator](e.timeStamp,t.data):!1},zS={"&&":(e,t)=>{let n=!1;for(let r in e){let i=RS[r];if(n=i?i(t,e[r]):!1,!n)break}return n},"||":(e,t)=>{let n=!1;for(let r in e){let i=RS[r];if(n=i?i(t,e[r]):!1,n)break}return n}},BS=e=>{let t;switch(typeof e){case`object`:if(Array.isArray(e))t=e;else throw Error(`checkFormatSeverity bad format type: object`);break;case`string`:t=e.split(/,| /);break;case`number`:t=[e];break;default:throw Error(`checkFormatSeverity bad format type : ${typeof e}`)}return t},VS=function(e){if(e instanceof Date)return e.getTime();if(typeof e==`string`)return new Date(e).getTime();throw Error(`checkFormatDate bad format : ${String(e)}`)},HS=function(e){if(typeof e==`string`)return e.split(/,| /);if(typeof e==`number`)return[e];if(e instanceof RegExp||Array.isArray(e))return e;throw Error(`checkFormatMsgId bad format ${typeof e} : ${String(e)}`)},US=function(e,t){let n=()=>!1;e.checkConditions&&e.checkConditions in zS?(n=zS[e.checkConditions],delete e.checkConditions):this.settings.checkConditions&&(n=zS[this.settings.checkConditions]);let r=WS(e);if(typeof t==`function`)return e=>{n(r,e)&&t(e)};if(Array.isArray(t)){let e=[];for(let i of t)n(r,i)&&e.push(i);return e}throw Error(`Bad wrapper`)},WS=function(e){if(typeof e!=`object`)return!1;for(let t in e){if(!(t in RS))return!1;let n=e[t];if(n.operator&&!(n.operator in LS))throw Error(`Contitions bad operator : ${n.operator}`);if(n.data)switch(t){case`severity`:{n.operator||=`==`;let e=BS(n.data),t={};n.data=t;for(let n of e){let e=Sx.severityToString(n);if(e)t[e]=IS[e];else return!1}break}case`msgid`:{n.operator||=`==`;let e=HS(n.data);if(Array.isArray(e)){let t={};n.data=t;for(let n=0;n<e.length;n++)t[String(e[n])]=`||`}else n.data=e;break}case`date`:{let e=VS(n.data);if(e)n.data=e;else return!1;break}default:return!1}else return!1}return e},GS=function(e,t,n,r,i){return new Sx(e,t??this.settings.defaultSeverity,n,r,i)},KS=(e,t)=>e===void 0||typeof e===t;function qS(e){if(!ey(e))return!1;let{severity:t,moduleName:n,msgid:r,msg:i,timeStamp:a}=e;return(KS(t,`number`)||typeof t==`string`)&&KS(n,`string`)&&KS(r,`string`)&&KS(i,`string`)&&(KS(a,`number`)||typeof a==`string`)}var JS=class e extends Mx{settings;_ring;burstPrinted;missed;invalid;valid;errorTotal;criticTotal;start;_async=!1;_transports=[];_disabledTransports=null;_ringEnabled=!0;_streamEnabled=!0;_severityThreshold=null;_gatedPdu=null;gated=0;_debugOverrides=null;_debugOverrideTimers=null;_debugOverrideExpiry=null;constructor(t){super(t),this.settings=Dx({},FS,t??{}),this._ring=new oS(this.settings.maxStack??100),this.burstPrinted=0,this.missed=0,this.invalid=0,this.valid=0,this.errorTotal=0,this.criticTotal=0,this.start=0,this._async=this.settings.async||!1,this.settings.overrideConsole&&e.overrideConsole(this)}get ringStack(){return this._ring.toArray()}get bufferCapacity(){return this._ring.capacity}get ringEnabled(){return this._ringEnabled}setRingEnabled(e){return this._ringEnabled!==e&&(this._ringEnabled=e,e||this._ring.clear(),!0)}get streamEnabled(){return this._streamEnabled}setStreamEnabled(e){return this._streamEnabled!==e&&(this._streamEnabled=e,!0)}setMaxStack(e){if(!Number.isFinite(e)||e<=0||e===this.settings.maxStack)return;let t=this._ring.toArray().slice(-e);this.settings.maxStack=e,this._ring=new oS(e);for(let e of t)this._ring.push(e)}static formatDebug(e){return NS(e)}init(t,n,r){this.removeAllListeners(`onLog`),this.listenWithConditions(r??PS(t,n),t=>e.normalizeLog(t))}static toSeverityNumber(e){if(typeof e==`number`)return e;let t=IS[e];return typeof t==`number`?t:-1}static severityFromInput(e){if(typeof e==`number`)return Number.isInteger(e)&&e>=0&&e<=7?e:null;if(typeof e==`string`){if(/^\d+$/.test(e)){let t=Number(e);return t>=0&&t<=7?t:null}let t=IS[e];return typeof t==`number`?t:null}return null}static parseDebugSpec(t){let n={global:!1,overrides:[]};if(typeof t!=`string`)return n;for(let r of t.split(/[,\s]+/)){if(!r)continue;if(r===`*`){n.global=!0;continue}let t=r.indexOf(`:`);if(t===-1){n.overrides.push({module:r,level:7});continue}let i=r.slice(0,t);if(!i)continue;let a=e.severityFromInput(r.slice(t+1))??7;n.overrides.push({module:i,level:a})}return n}setSeverityThreshold(t){this._severityThreshold=t===null?null:e.toSeverityNumber(t)}severityEnabled(t,n){if(this._severityThreshold===null)return!0;let r=this._severityThreshold;return n!==void 0&&this._debugOverrides!==null&&(r=this.overrideThreshold(n)??r),e.toSeverityNumber(t)<=r}overrideThreshold(e){let t=this._debugOverrides;if(t!==null)return t.get(e)??t.get(`*`)}setDebugOverride(t,n,r){if(this._debugOverrides??=new Map,this._debugOverrides.set(t,e.toSeverityNumber(n)),this.clearOverrideTimer(t),r!==void 0&&r>0){this._debugOverrideTimers??=new Map;let e=setTimeout(()=>{this.clearDebugOverride(t)},r);e.unref(),this._debugOverrideTimers.set(t,e),this._debugOverrideExpiry??=new Map,this._debugOverrideExpiry.set(t,Date.now()+r)}else this._debugOverrideExpiry!==null&&(this._debugOverrideExpiry.delete(t),this._debugOverrideExpiry.size===0&&(this._debugOverrideExpiry=null))}clearDebugOverride(e){if(this.clearOverrideTimer(e),this._debugOverrideExpiry!==null&&(this._debugOverrideExpiry.delete(e),this._debugOverrideExpiry.size===0&&(this._debugOverrideExpiry=null)),this._debugOverrides===null)return!1;let t=this._debugOverrides.delete(e);return this._debugOverrides.size===0&&(this._debugOverrides=null),t}clearAllDebugOverrides(){if(this._debugOverrideTimers!==null){for(let e of this._debugOverrideTimers.values())clearTimeout(e);this._debugOverrideTimers=null}this._debugOverrides=null,this._debugOverrideExpiry=null}getDebugOverrides(){if(this._debugOverrides===null)return{};let e={};for(let[t,n]of this._debugOverrides)e[t]=n;return e}getDebugOverrideExpiry(){if(this._debugOverrideExpiry===null)return{};let e={};for(let[t,n]of this._debugOverrideExpiry)e[t]=n;return e}clearOverrideTimer(e){if(this._debugOverrideTimers===null)return;let t=this._debugOverrideTimers.get(e);t!==void 0&&(clearTimeout(t),this._debugOverrideTimers.delete(e),this._debugOverrideTimers.size===0&&(this._debugOverrideTimers=null))}get async(){return this._async}set async(e){this._async=e}clean(){return this.reset()}reset(){return this._ring.clear(),this.removeAllListeners(),this.clearAllDebugOverrides(),this}clearLogStack(){this._ring.clear()}pushStack(e){this._ringEnabled&&this._ring.push(e),this.valid++;let t=e.severity;return t>=0&&t<=3&&(this.errorTotal++,t<=2&&this.criticTotal++),this._ring.length}log(t,n,r,i){if(this._severityThreshold!==null){let i=t instanceof Sx?t.severity:e.toSeverityNumber(n??this.settings.defaultSeverity??`DEBUG`),a=this._severityThreshold;if(this._debugOverrides!==null){let e=t instanceof Sx?t.msgid:r||this.settings.msgid,n=this.overrideThreshold(e);n!==void 0&&(a=n)}if(i>a)return this.gated++,this._gatedPdu===null&&(this._gatedPdu=GS.call(this,`GATED`,`DEBUG`,this.settings.moduleName,r||this.settings.msgid),this._gatedPdu.status=`DROPPED`),this._gatedPdu}let a;if(this.settings.rateLimit!==!1){let e=this.settings.rateLimit,o=Date.now();if(this.start=this.start||o,o>this.start+e&&(this.burstPrinted=0,this.missed=0,this.start=0),this.settings.burstLimit&&this.settings.burstLimit>this.burstPrinted){try{a=t instanceof Sx?t:GS.call(this,t,n,this.settings.moduleName,r||this.settings.msgid,i)}catch(e){return console.error(e),this.invalid++,a??=GS.call(this,e,`ERROR`),a.status=`INVALID`,a}return this.pushStack(a),a.status=`ACCEPTED`,this.listenerCount(`onLog`)>0&&this.fire(`onLog`,a),this._transports.length>0&&this._fireTransports(a),this.burstPrinted++,a}return this.missed++,a??=GS.call(this,`DROPPED`,`WARNING`),a.status=`DROPPED`,a}try{a=t instanceof Sx?t:GS.call(this,t,n,this.settings.moduleName,r||this.settings.msgid,i)}catch(e){return console.error(e),this.invalid++,a??=GS.call(this,e,`ERROR`),a.status=`INVALID`,a}return this.pushStack(a),a.status=`ACCEPTED`,this.listenerCount(`onLog`)>0&&this.fire(`onLog`,a),this._transports.length>0&&this._fireTransports(a),a}getLogStack(e,t,n){if(arguments.length===0)return this._ring.last();let r;return r=n?this.getLogs(n):this.ringStack,t?e===t?r[r.length-e-1]:r.slice(e,t):r.slice(e)}getLogs(e,t=null){return e?US.call(this,e,t??this.ringStack):this.ringStack}logToJson(e,t=null){let n=e?this.getLogs(e,t):this.ringStack;return JSON.stringify(n)}loadStack(e,t=!1,n=null){if(!e)throw Error(`syslog loadStack : not stack in arguments `);if(typeof e==`string`){let r=JSON.parse(e);if(!Array.isArray(r))throw Error(`syslog loadStack : la pile JSON n'est pas un tableau`);return this.loadStack(r.filter(qS),t,n)}if(Array.isArray(e)||typeof e==`object`){for(let r of e){let e=new Sx(r.payload,r.severity,r.moduleName||this.settings.moduleName,r.msgid,r.msg,r.timeStamp);this.pushStack(e),t&&(n&&n.call(this,e,r),this.fire(`onLog`,e))}return e}throw Error(`syslog loadStack : bad stack in arguments type`)}filter(e,t){if(!e)throw Error(`filter conditions not found `);e=Dx(!0,{},e);let n=US.call(this,e,t);super.on(`onLog`,n)}listenWithConditions(e,t){return this.filter(e,t)}error(e){return this.log(e,`ERROR`)}warn(e){return this.log(e,`WARNING`)}info(e){return this.log(e,`INFO`)}debug(e){return this.log(e,`DEBUG`)}trace(e,...t){return this.log(e,`NOTICE`,...t)}print(...e){let t=e.length===1?e[0]:e;return this.log(t,this.settings.defaultSeverity)}logMultiple(e,...t){let n=t.length===1?t[0]:t;return this.log(n,e)}addTransport(e){let t=this._transports.findIndex(t=>t.name===e.name),n=t===-1?void 0:this._transports[t];return n===void 0?this._transports.push(e):n!==e&&(this._closeTransport(n),this._transports[t]=e),this}removeTransport(e){let t=this._transports.indexOf(e);return t!==-1&&(this._transports.splice(t,1),this._closeTransport(e)),this}_closeTransport(e){e.close?.().catch(t=>this.fire(`onTransportCloseError`,t,e))}get transportCount(){return this._transports.length}listTransports(){let e=this._transports.map(e=>({name:e.name,enabled:!0}));if(this._disabledTransports)for(let t of this._disabledTransports.keys())e.push({name:t,enabled:!1});return e}setTransportEnabled(e,t){if(t){let t=this._disabledTransports,n=t?.get(e);return!t||!n?!1:(t.delete(e),t.size===0&&(this._disabledTransports=null),this.addTransport(n),!0)}let n=this._transports.findIndex(t=>t.name===e);if(n===-1)return!1;let[r]=this._transports.splice(n,1);return(this._disabledTransports??=new Map).set(e,r),!0}_fireTransports(e){for(let t of this._transports)t.send(e).catch(t=>this.fire(`onTransportError`,t,e))}static _nativeConsole={log:console.log.bind(console),info:console.info.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console),trace:console.trace.bind(console),table:console.table.bind(console),dir:console.dir.bind(console)};static _savedConsole=null;static SEVERITY_WIDTH=7;static MSGID_WIDTH=18;static wrapper(t){if(!t)throw Error(`Syslog pdu not defined`);let n=new Date(t.timeStamp),r=`${String(n.getHours()).padStart(2,`0`)}:${String(n.getMinutes()).padStart(2,`0`)}:${String(n.getSeconds()).padStart(2,`0`)}.${String(n.getMilliseconds()).padStart(3,`0`)}`,i=t.severityName.padEnd(e.SEVERITY_WIDTH),a=dS(t.msgid.padEnd(e.MSGID_WIDTH));switch(t.severity){case 0:case 1:case 2:case 3:return{logger:e._nativeConsole.error,text:`${r} ${cS(i)} ${a} : `};case 4:return{logger:e._nativeConsole.warn,text:`${r} ${sS(i)} ${a} : `};case 5:return{logger:e._nativeConsole.log,text:`${r} ${cS(i)} ${a} : `};case 6:return{logger:e._nativeConsole.info,text:`${r} ${uS(i)} ${a} : `};case 7:return{logger:e._nativeConsole.debug,text:`${r} ${lS(i)} ${a} : `};default:return{logger:e._nativeConsole.log,text:`${r} ${lS(i)} ${a} : `}}}static normalizeLog(t,n=``){if(t.payload===``||t.payload===void 0)return e._nativeConsole.warn(`${t.severityName} ${t.msgid} : logger message empty !!!!`),e._nativeConsole.trace(t),t;let r=t.payload,i=e.wrapper(t),a=n?`${n} `:``;return i.logger(`${a}${i.text}`,r),t}static rawLog(t,n=``){if(t.payload===``||t.payload===void 0)return t;let r=t.severity<=3?MS:jS,{text:i}=e.wrapper(t),a=typeof t.payload==`string`||typeof t.payload==`number`?String(t.payload):Nx(t.payload,{depth:3,colors:rS(),breakLength:1/0});return r(`${n?`${n} `:``}${i}${a}\n`),t}static setOutputBuffering(e){kS(e)}static flushOutput(){OS()}static setLogSink(e){AS(e)}static get logSinkName(){return wS.name}static get sinkEnabled(){return!TS}static setSinkEnabled(e){let t=!e;return TS!==t&&(TS=t,!0)}static overrideConsole(t){if(e._savedConsole!==null){t.log(`Syslog.overrideConsole: already active`,`WARNING`);return}e._savedConsole={log:console.log.bind(console),info:console.info.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console),trace:console.trace.bind(console),table:console.table.bind(console),dir:console.dir.bind(console)};let n=console;n.log=(...e)=>t.print(...e),n.info=(...e)=>t.logMultiple(`INFO`,...e),n.warn=(...e)=>t.logMultiple(`WARNING`,...e),n.error=(...e)=>t.logMultiple(`ERROR`,...e),n.debug=(...e)=>t.logMultiple(`DEBUG`,...e),n.table=e=>t.logMultiple(`INFO`,e),n.dir=e=>t.logMultiple(`DEBUG`,e)}static restoreConsole(){e._savedConsole!==null&&(Object.assign(console,e._savedConsole),e._savedConsole=null)}},YS=Symbol.for(`nodefony.packageInstances`);function XS(){return globalThis[YS]??[]}function ZS(){return XS().length>1}var QS={events:{nbListeners:20}},$S=typeof process<`u`&&{}.NF_PERF_PROBE===`1`;function eC(e){let t=globalThis.__nfPerfProbe;t&&t.t0!==0n&&(t[e]+=Number(process.hrtime.bigint()-t.t0))}function tC(e){for(let t in e)if(Object.hasOwn(e,t)&&t.startsWith(`on`))return!0;return!1}var nC={moduleName:`SERVICE `,defaultSeverity:`INFO`};function rC(e){let t=ix(e);return t&&t!==`Object`?`une instance de ${t}`:`un ${typeof e} littéral`}var iC=class e{name;options;container;kernel;syslog;#e;#t=null;#n=!1;#r=!1;#i=0;get notificationsCenter(){return this.#e===void 0&&this.#r?this.#a():this.#e}get nc(){if(this.#e===void 0){if(this.#r)return this.#a();throw Error(`${this.name}: notificationsCenter not initialized`)}return this.#e}#a(){this.#r=!1;let e=new Mx(this.options,this,this.options);return this.#i&&e.setMaxListeners(this.#i),this.#e=e,e}#o(){return this.#e===void 0&&this.#r}constructor(e,t,n,r){if($S&&eC(`svcStartNs`),this.name=e,t instanceof sx)this.container=t;else{if(t!=null)throw Error(ZS()?`${e} : le container reçu n'est pas un Container de CE paquet \`nodefony\` — deux copies du paquet tournent dans ce process. \`npm ls nodefony\` les liste ; l'avertissement de boot nomme leurs chemins. Un service ne peut pas être construit à cette frontière.`:`${e} : le container reçu n'est pas un \`Container\` (reçu : ${rC(t)}). Une seule copie du paquet \`nodefony\` tourne dans ce process — ce n'est donc pas une dualité de paquet, mais un objet qui n'en est pas un. Passer le container du module (\`module.container\`), ou \`new Container()\`.`);this.container=new sx}let i;if(r===void 0)r={},i=QS.events,this.options={};else{let{events:e,...t}=r;i=e??QS.events,this.options=t}if($S&&eC(`svcOptsNs`),this.kernel=this.container.get(`kernel`),this.syslog=this.container.get(`syslog`),$S&&eC(`svcLookupsNs`),!this.syslog){let e={...nC,moduleName:this.name,...this.options.syslog};this.syslog=new JS(e),this.container.set(`syslog`,this.syslog)}if(n instanceof Mx){this.#n=!0,this.#e=n,this.attachConfiguredListeners(r);let e=this.#e.getMaxListeners(),t=i?.nbListeners??0;t>e&&this.#e.setMaxListeners(t)}else if(n!==!1){this.#i=i?.nbListeners??0;let e=!(this.container instanceof cx)&&(!this.kernel||this.kernel.container!==this.container);e||tC(this.options)?(this.#a(),e&&this.container.set(`notificationsCenter`,this.#e)):this.#r=!0}$S&&eC(`svcEventNs`)}attachConfiguredListeners(e){for(let t of Object.keys(e)){if(!/^on(.+)$/.test(t))continue;let n=e[t];typeof n==`function`&&this.on(t,n.bind(this))}}initSyslog(e=`production`,t=!1,n){return this.syslog?this.syslog.init(e,t,n):null}getName(){return this.name}clean(e=!1){if(this.#e&&this.#n&&this.#t)for(let[e,t]of this.#t)for(let n of t)this.#e.removeListener(e,n);this.#t=null,this.#n=!1,this.syslog&&e&&this.syslog.reset(),this.syslog=null,this.#e=void 0,this.#r=!1,this.container=null,this.kernel=null}log(e,t,n,r){try{return n||=this.name,this.syslog?this.syslog.log(e,t,n,r):new Sx(e,t,this.name,n,r)}catch(i){return console.log(t,n,r,` : `,e),console.warn(i),new Sx(i,`ERROR`,this.name,n,r)}}logger(e,...t){console.debug(JS.wrapper(this.log(e,`DEBUG`)).text,e,...t)}trace(e,...t){console.trace(JS.wrapper(this.log(e,`DEBUG`)).text,e,...t)}trackListener(e,t){this.#t??=new Map;let n=this.#t.get(e)??[];n.push(t),this.#t.set(e,n)}untrackListener(e,t){let n=this.#t;if(!n)return;let r=n.get(e);if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1),r.length===0&&n.delete(e)}eventNames(){return this.#o()?[]:this.nc.eventNames()}fire(e,...t){return e!==`error`&&this.#o()?!1:this.nc.emit(e,...t)}fireAsync(e,...t){return this.#o()?Promise.resolve(!1):this.nc.emitAsync(e,...t)}emit(e,...t){return e!==`error`&&this.#o()?!1:this.nc.emit(e,...t)}emitAsync(e,...t){return this.#o()?Promise.resolve(!1):this.nc.emitAsync(e,...t)}emitAsyncGuarded(e,t,...n){return this.nc.emitAsyncGuarded(e,t,...n)}addListener(e,t){return this.nc.addListener(e,t),this.trackListener(e,t),this}listen(e,t){return this.nc.listen(this,e,t)}on(e,t){return this.nc.on(e,t),this.trackListener(e,t),this}once(e,t){return this.nc.once(e,t),this.trackListener(e,t),this}off(e,t){return this.nc.off(e,t),this.untrackListener(e,t),this}settingsToListen(e,t){this.nc.settingsToListen(e,t)}setMaxListeners(e){return this.nc.setMaxListeners(e),this}removeListener(e,t){return this.nc.removeListener(e,t),this.untrackListener(e,t),this}removeAllListeners(e){return e===void 0?(this.#t=null,this.nc.removeAllListeners()):(this.#t?.delete(e),this.nc.removeAllListeners(e)),this}prependOnceListener(e,t){return this.nc.prependOnceListener(e,t),this.trackListener(e,t),this}prependListener(e,t){return this.nc.prependListener(e,t),this.trackListener(e,t),this}getMaxListeners(){return this.nc.getMaxListeners()}listenerCount(e,t){return this.#o()?0:this.nc.listenerCount(e,t)}listeners(e){return this.nc.listeners(e)}rawListeners(e){return this.nc.rawListeners(e)}get(e){return this.container?.get(e)??null}set(e,t){if(!this.container)throw Error(`${this.name}: container not initialized`);this.container.set(e,t)}remove(t){if(this.container){let n=this.get(t);if(n)return n instanceof e&&n.clean(),this.container.remove(t)}return!1}has(e){return this.container?.has(e)??!1}},aC=class{syslog;#e;#t;#n=`created`;#r=null;#i=null;#a=null;#o={created:Date.now()};#s=()=>void 0;#c=null;#l=null;constructor(e={}){this.#t=e,this.#e=new iC(e.name??`CLIENT KERNEL`),this.syslog=this.#e.syslog,this.#l=Gy(this,this.name,this.#t.banner),this.#p();let t=this.#t;this.#s=Xy({kernel:this,name:this.name,createdAt:this.#o.created??Date.now(),timeline:()=>({...this.#o}),options:{connectOnBoot:String(t.connectOnBoot??!0),browserEvents:String(t.browserEvents??`auto`),banner:String(t.banner??`auto`),realtime:t.realtime===!1||t.realtime===void 0?`aucun`:t.realtime instanceof wb?`socket fournie`:`composée par le noyau`},rows:()=>this.#f()})}get(e){if(this.#a)return this.#a[e]}set(e,t){(this.#a??=Object.create(null))[e]=t}has(e){return this.#a?.[e]!==void 0}get state(){return this.#n}boot(){return this.#n===`terminated`||this.#n===`ready`?Promise.resolve():(this.#i||=this.#u(),this.#i)}async#u(){this.#n=`booting`,this.#o.booting=Date.now(),this.#e.fire(`onBoot`,this),this.#m();let e=this.#t.connectOnBoot===!1?void 0:this.get(`realtime`);if(e)try{await e.connect()}catch(e){this.syslog.log(e instanceof Error?e.message:String(e),`WARNING`)}this.#n===`booting`&&(this.#n=`ready`,this.#o.ready=Date.now(),this.#d(),this.#e.fire(`onReady`,this))}#d(){if(this.#t.banner===!1||this.#t.banner!==!0&&!zy())return;let e={};for(let[t,n]of this.#f())e[t]={valeur:n};qy(e,this,`noyau client — détail et raccourcis`)}#f(){let e=this.get(`realtime`),t=[[`état`,this.state],[`identité`,this.identity?this.identity.key:`anonyme`],[`temps réel`,e?e.url??`socket fournie`:`aucun`],[`socket`,e?e.state:`—`]];for(let e of this.#a?Object.keys(this.#a):[])t.push([`service · ${e}`,`composé`]);return t}#p(){if(this.has(`realtime`))return;let e=this.#t.realtime;e&&this.set(`realtime`,e instanceof wb?e:wb.shared(e))}async terminate(){if(this.#n===`terminated`)return;this.#n=`terminated`,this.#o.terminated=Date.now(),this.#e.fire(`onTerminate`,this);let e=this.get(`realtime`);e&&e.disconnect(),this.#h(),this.#l?.(),this.#l=null,this.#s(),this.#s=()=>void 0,this.#i=null,this.#a=null,this.#e.clean()}get name(){return this.#e.name}get identity(){return this.#r}setIdentity(e){let t=this.#r,n=t?t.key:null,r=e?e.key:null;if(this.#r=e,n===r)return;let i=this.get(`realtime`);i&&(n!==null&&i.disconnect(),r!==null&&i.connect().catch(()=>{})),this.#e.fire(`onIdentityChange`,e,t)}on(e,t){return this.#n===`terminated`||this.#e.on(e,t),this}off(e,t){return this.#n===`terminated`||this.#e.removeListener(e,t),this}#m(){if(this.#t.browserEvents===!1)return;let e=globalThis.document,t=globalThis.window;if(!e||!t)return;let n=(e,t,n)=>{e.addEventListener(t,n),(this.#c??=[]).push(()=>e.removeEventListener(t,n))};n(e,`visibilitychange`,()=>this.#e.fire(`onVisibility`,e.visibilityState!==`hidden`)),n(t,`online`,()=>this.#e.fire(`onOnline`,!0)),n(t,`offline`,()=>this.#e.fire(`onOnline`,!1)),n(t,`pagehide`,()=>void this.terminate())}#h(){if(this.#c){for(let e of this.#c)e();this.#c=null}}get browserListenerCount(){return this.#c?this.#c.length:0}},oC=null,sC=null,cC=!1;function lC(){return oC??=lx(),oC}function uC(){}function dC(){return cC?()=>{}:(cC=!0,sC=Sx.requestIdProvider,Sx.requestIdProvider=uC,()=>{cC&&(cC=!1,Sx.requestIdProvider=sC,sC=null)})}function fC(e,t){return e.length<=t?e:`${e.slice(0,t)}… [+${e.length-t}]`}function pC(e,t){if(e==null)return e;if(e instanceof Error)return{name:e.name,message:fC(e.message,t),stack:e.stack?fC(e.stack,t):void 0};let n=typeof e;if(n===`string`)return fC(e,t);if(n===`number`||n===`boolean`)return e;if(typeof e==`function`||typeof e==`symbol`||typeof e==`bigint`)return fC(e.toString(),t);try{let n=JSON.stringify(e);return JSON.parse(fC(n??`null`,t))}catch{return fC(String(e),t)}}function mC(e){let{syslog:t,publisher:n,maxSeverity:r=4,batchMs:i=2e3,maxBatch:a=50,maxQueue:o=200,maxStringLength:s=4096,channel:c=ay.syslogUplink}=e,l=null,u=0,d=null,f=!1,p=()=>{if(d!==null&&(clearTimeout(d),d=null),l===null||l.length===0)return;let e={pageId:lC(),entries:l};u>0&&(e.dropped=u),l=null,u=0;try{n.publish(c,e)}catch{}},m=e=>{if(f||e.severity>r||e.msgid===`CLIENT_UPLINK`)return;l??=[],l.length>=o&&(l.shift(),u+=1);let t={severity:e.severity,severityName:e.severityName,moduleName:e.moduleName,msgid:e.msgid,msg:fC(e.msg,s),timeStamp:e.timeStamp,payload:pC(e.payload,s)};e.requestId!==void 0&&(t.requestId=e.requestId),l.push(t),l.length>=a?p():d??=setTimeout(p,i)};return t.on(`onLog`,m),()=>{f||(f=!0,t.removeListener(`onLog`,m),p())}}var hC={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},gC=(e,t,n,r)=>{let i=(0,C.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,C.createElement)(`svg`,{ref:u,...hC[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].filter(Boolean).join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,C.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,C.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},_C=gC(`outline`,`alert-circle`,`AlertCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 8v4`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),vC=gC(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),yC=gC(`outline`,`arrow-right`,`ArrowRight`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M13 18l6 -6`,key:`svg-1`}],[`path`,{d:`M13 6l6 6`,key:`svg-2`}]]),bC=gC(`outline`,`arrows-maximize`,`ArrowsMaximize`,[[`path`,{d:`M16 4l4 0l0 4`,key:`svg-0`}],[`path`,{d:`M14 10l6 -6`,key:`svg-1`}],[`path`,{d:`M8 20l-4 0l0 -4`,key:`svg-2`}],[`path`,{d:`M4 20l6 -6`,key:`svg-3`}],[`path`,{d:`M16 20l4 0l0 -4`,key:`svg-4`}],[`path`,{d:`M14 14l6 6`,key:`svg-5`}],[`path`,{d:`M8 4l-4 0l0 4`,key:`svg-6`}],[`path`,{d:`M4 4l6 6`,key:`svg-7`}]]),xC=gC(`outline`,`bolt`,`Bolt`,[[`path`,{d:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`,key:`svg-0`}]]),SC=gC(`outline`,`book-2`,`Book2`,[[`path`,{d:`M19 4v16h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12`,key:`svg-0`}],[`path`,{d:`M19 16h-12a2 2 0 0 0 -2 2`,key:`svg-1`}],[`path`,{d:`M9 8h6`,key:`svg-2`}]]),CC=gC(`outline`,`brand-github`,`BrandGithub`,[[`path`,{d:`M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5`,key:`svg-0`}]]),wC=gC(`outline`,`bulb`,`Bulb`,[[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-15.4 -6.4l.7 .7m12.1 -.7l-.7 .7`,key:`svg-0`}],[`path`,{d:`M9 16a5 5 0 1 1 6 0a3.5 3.5 0 0 0 -1 3a2 2 0 0 1 -4 0a3.5 3.5 0 0 0 -1 -3`,key:`svg-1`}],[`path`,{d:`M9.7 17l4.6 0`,key:`svg-2`}]]),TC=gC(`outline`,`chart-line`,`ChartLine`,[[`path`,{d:`M4 19l16 0`,key:`svg-0`}],[`path`,{d:`M4 15l4 -6l4 2l4 -5l4 4`,key:`svg-1`}]]),EC=gC(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),DC=gC(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),OC=gC(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),kC=gC(`outline`,`chevron-up`,`ChevronUp`,[[`path`,{d:`M6 15l6 -6l6 6`,key:`svg-0`}]]),AC=gC(`outline`,`chevrons-down`,`ChevronsDown`,[[`path`,{d:`M7 7l5 5l5 -5`,key:`svg-0`}],[`path`,{d:`M7 13l5 5l5 -5`,key:`svg-1`}]]),jC=gC(`outline`,`chevrons-up`,`ChevronsUp`,[[`path`,{d:`M7 11l5 -5l5 5`,key:`svg-0`}],[`path`,{d:`M7 17l5 -5l5 5`,key:`svg-1`}]]),MC=gC(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),NC=gC(`outline`,`columns-3`,`Columns3`,[[`path`,{d:`M3 4a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-16`,key:`svg-0`}],[`path`,{d:`M9 3v18`,key:`svg-1`}],[`path`,{d:`M15 3v18`,key:`svg-2`}]]),PC=gC(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),FC=gC(`outline`,`device-floppy`,`DeviceFloppy`,[[`path`,{d:`M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2`,key:`svg-0`}],[`path`,{d:`M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M14 4l0 4l-6 0l0 -4`,key:`svg-2`}]]),IC=gC(`outline`,`exclamation-mark`,`ExclamationMark`,[[`path`,{d:`M12 19v.01`,key:`svg-0`}],[`path`,{d:`M12 15v-10`,key:`svg-1`}]]),LC=gC(`outline`,`external-link`,`ExternalLink`,[[`path`,{d:`M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 13l9 -9`,key:`svg-1`}],[`path`,{d:`M15 4h5v5`,key:`svg-2`}]]),RC=gC(`outline`,`eye-off`,`EyeOff`,[[`path`,{d:`M10.585 10.587a2 2 0 0 0 2.829 2.828`,key:`svg-0`}],[`path`,{d:`M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87`,key:`svg-1`}],[`path`,{d:`M3 3l18 18`,key:`svg-2`}]]),zC=gC(`outline`,`filter-off`,`FilterOff`,[[`path`,{d:`M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`,key:`svg-0`}],[`path`,{d:`M3 3l18 18`,key:`svg-1`}]]),BC=gC(`outline`,`filter`,`Filter`,[[`path`,{d:`M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`,key:`svg-0`}]]),VC=gC(`outline`,`inbox`,`Inbox`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 13h3l3 3h4l3 -3h3`,key:`svg-1`}]]),HC=gC(`outline`,`info-circle`,`InfoCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 9h.01`,key:`svg-1`}],[`path`,{d:`M11 12h1v4h1`,key:`svg-2`}]]),UC=gC(`outline`,`layout-sidebar-right-collapse`,`LayoutSidebarRightCollapse`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M15 4v16`,key:`svg-1`}],[`path`,{d:`M9 10l2 2l-2 2`,key:`svg-2`}]]),WC=gC(`outline`,`layout-sidebar-right-expand`,`LayoutSidebarRightExpand`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M15 4v16`,key:`svg-1`}],[`path`,{d:`M10 10l-2 2l2 2`,key:`svg-2`}]]),GC=gC(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),KC=gC(`outline`,`lock`,`Lock`,[[`path`,{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 11v-4a4 4 0 1 1 8 0v4`,key:`svg-2`}]]),qC=gC(`outline`,`maximize`,`Maximize`,[[`path`,{d:`M4 8v-2a2 2 0 0 1 2 -2h2`,key:`svg-0`}],[`path`,{d:`M4 16v2a2 2 0 0 0 2 2h2`,key:`svg-1`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v2`,key:`svg-2`}],[`path`,{d:`M16 20h2a2 2 0 0 0 2 -2v-2`,key:`svg-3`}]]),JC=gC(`outline`,`refresh`,`Refresh`,[[`path`,{d:`M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4`,key:`svg-0`}],[`path`,{d:`M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4`,key:`svg-1`}]]),YC=gC(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),XC=gC(`outline`,`selector`,`Selector`,[[`path`,{d:`M8 9l4 -4l4 4`,key:`svg-0`}],[`path`,{d:`M16 15l-4 4l-4 -4`,key:`svg-1`}]]),ZC=gC(`outline`,`settings`,`Settings`,[[`path`,{d:`M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065`,key:`svg-0`}],[`path`,{d:`M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`,key:`svg-1`}]]),QC=gC(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),$C=gC(`outline`,`wand`,`Wand`,[[`path`,{d:`M6 21l15 -15l-3 -3l-15 15l3 3`,key:`svg-0`}],[`path`,{d:`M15 6l3 3`,key:`svg-1`}],[`path`,{d:`M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-2`}],[`path`,{d:`M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-3`}]]);function ew(e,t){return ey(e)?Object.fromEntries(Object.entries(e).filter(e=>t(e[1]))):{}}function tw(e,t){return Array.isArray(e)?e.filter(t):[]}function nw(e){return t=>typeof t==`string`&&e.some(e=>e===t)}var rw=e=>typeof e==`string`,iw=e=>typeof e==`boolean`,aw=e=>typeof e==`number`&&Number.isFinite(e);function ow(e){if(typeof window>`u`)return null;try{return e===`local`?window.localStorage:window.sessionStorage}catch{return null}}function sw(e,t){let n=ow(e);if(n)try{let e=n.getItem(t);return e===null?void 0:JSON.parse(e)}catch{return}}function cw({title:e,subtitle:t,icon:n,actions:r,sticky:i}){let a=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(!i||!a.current)return;let e=document.documentElement,t=a.current,n=()=>{e.style.setProperty(`--nf-pageheader-height`,`${t.offsetHeight}px`)};n();let r=new ResizeObserver(n);return r.observe(t),()=>{r.disconnect(),e.style.setProperty(`--nf-pageheader-height`,`0px`)}},[i]),(0,G.jsxs)(X,{ref:a,justify:`space-between`,align:`flex-end`,wrap:`nowrap`,style:i?{position:`sticky`,top:0,zIndex:2,background:`var(--mantine-color-body)`,marginInline:`calc(var(--mantine-spacing-md) * -1)`,paddingInline:`var(--mantine-spacing-md)`,paddingBlock:`var(--mantine-spacing-sm)`,borderBottom:`1px solid var(--mantine-color-default-border)`}:void 0,children:[(0,G.jsxs)(z_,{gap:4,children:[(0,G.jsxs)(X,{gap:`xs`,wrap:`nowrap`,children:[n,(0,G.jsx)(Mv,{order:1,size:`h2`,children:e})]}),t&&(0,G.jsx)(Z,{c:`dimmed`,size:`sm`,component:`div`,children:t})]}),r&&(0,G.jsx)(X,{gap:`xs`,wrap:`nowrap`,children:r})]})}function lw({title:e,subtitle:t,icon:n,actions:r,gap:i=`md`,children:a}){return(0,G.jsxs)(z_,{gap:i,children:[(0,G.jsx)(cw,{title:e,subtitle:t,icon:n,actions:r,sticky:!0}),a]})}function uw({children:e,...t}){return(0,G.jsx)(xv.List,{...t,style:[{position:`sticky`,top:`var(--nf-pageheader-height, 76px)`,zIndex:1,background:`var(--mantine-color-body)`},t.style],children:e})}function dw({loading:e,error:t,empty:n,onRetry:r,emptyMessage:i,minHeight:a=200,children:o}){return t?(0,G.jsx)(Md,{color:`red`,variant:`light`,icon:(0,G.jsx)(vC,{size:16}),title:`Erreur de chargement`,children:(0,G.jsxs)(z_,{gap:`sm`,align:`flex-start`,children:[(0,G.jsx)(Z,{size:`sm`,children:t}),r&&(0,G.jsx)(fp,{size:`xs`,variant:`light`,leftSection:(0,G.jsx)(JC,{size:14}),onClick:r,children:`Réessayer`})]})}):e?(0,G.jsx)(Sp,{mih:a,"aria-busy":`true`,"aria-live":`polite`,children:(0,G.jsx)(ll,{})}):n?(0,G.jsx)(Sp,{mih:a,children:(0,G.jsxs)(z_,{gap:4,align:`center`,c:`dimmed`,children:[(0,G.jsx)(VC,{size:28,stroke:1.4}),(0,G.jsx)(Z,{size:`sm`,children:i??`Aucune donnée.`})]})}):(0,G.jsx)(G.Fragment,{children:o})}var fw={doc:{trigger:HC,header:SC,accent:`brand`,badge:`doc`},graph:{trigger:TC,header:TC,accent:`blue`,badge:`graphe`},link:{trigger:LC,header:LC,accent:`grape`,badge:`lien`},tip:{trigger:wC,header:wC,accent:`teal`,badge:`astuce`},warning:{trigger:vC,header:vC,accent:`yellow`,badge:`attention`}},pw=[],mw=[];function hw({kind:e=`doc`,title:t,version:n,summary:r,sections:i=pw,links:a=mw,width:o=360,children:s,block:c=!1}){let l=fw[e],u=l.trigger,d=l.header;return(0,G.jsxs)(rm,{width:o,shadow:`md`,radius:`md`,withArrow:!0,openDelay:100,closeDelay:120,position:`top`,withinPortal:!0,children:[(0,G.jsx)(rm.Target,{children:s?(0,G.jsx)(sc,{"aria-label":`${l.badge} : ${t}`,style:{display:c?`block`:`inline-flex`,width:c?`100%`:void 0,lineHeight:c?void 0:0,cursor:`help`,textAlign:c?`inherit`:void 0},children:s}):(0,G.jsx)(_l,{variant:`subtle`,color:e===`doc`?`gray`:l.accent,size:`sm`,radius:`xl`,w:24,h:24,"aria-label":`${l.badge} : ${t}`,children:(0,G.jsx)(u,{size:15,stroke:1.6})})}),(0,G.jsxs)(rm.Dropdown,{p:0,children:[(0,G.jsx)(Y,{p:`xs`,style:{borderBottom:`1px solid var(--mantine-color-default-border)`,background:`var(--mantine-color-default-hover)`,borderTopLeftRadius:`var(--mantine-radius-md)`,borderTopRightRadius:`var(--mantine-radius-md)`},children:(0,G.jsxs)(X,{gap:8,wrap:`nowrap`,justify:`space-between`,children:[(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,style:{minWidth:0},children:[(0,G.jsx)(Tv,{variant:`light`,color:l.accent,size:`sm`,radius:`sm`,children:(0,G.jsx)(d,{size:14})}),(0,G.jsx)(Z,{fw:700,size:`sm`,truncate:!0,children:t})]}),(0,G.jsxs)(rp,{size:`xs`,variant:`light`,color:l.accent,tt:`none`,children:[l.badge,n?` ${n}`:``]})]})}),(0,G.jsxs)(z_,{gap:`sm`,p:`sm`,children:[r?(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:r}):null,i.map((e,t)=>(0,G.jsxs)(Y,{children:[(0,G.jsx)(Z,{size:`xs`,fw:700,tt:`uppercase`,c:l.accent,style:{letterSpacing:.4},mb:2,children:e.label}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:e.body})]},`${e.label}-${t}`)),a.length>0?(0,G.jsx)(z_,{gap:4,children:a.map(e=>(0,G.jsx)(zd,{href:e.href,target:`_blank`,rel:`noreferrer noopener`,size:`xs`,children:(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,component:`span`,children:[(0,G.jsx)(LC,{size:12}),e.label]})},e.href))}):null]})]})]})}var gw=e=>(0,G.jsx)(hw,{kind:`doc`,...e}),_w=e=>(0,G.jsx)(hw,{kind:`graph`,...e}),vw=e=>(0,G.jsx)(hw,{kind:`tip`,...e}),yw=e=>(0,G.jsx)(hw,{kind:`warning`,...e}),bw={base:12,sm:6,lg:3};function xw({text:e}){return(0,G.jsx)(k_,{label:e,multiline:!0,w:280,withArrow:!0,position:`top`,events:{hover:!0,focus:!0,touch:!0},children:(0,G.jsx)(_l,{variant:`subtle`,color:`gray`,size:`sm`,w:24,h:24,style:{cursor:`help`},"aria-label":e,children:(0,G.jsx)(HC,{size:15})})})}function Sw({label:e,icon:t,hint:n,info:r,span:i=bw,onClick:a,active:o=!1,actionLabel:s,children:c}){let l=a!==void 0;return(0,G.jsx)(Gp.Col,{span:i,children:(0,G.jsx)(yp,{withBorder:!0,radius:`md`,p:`lg`,h:`100%`,role:l?`button`:void 0,"aria-pressed":l?o:void 0,"aria-label":l?s:void 0,title:l?s:void 0,tabIndex:l?0:void 0,onClick:a,onKeyDown:l?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a())}:void 0,style:l?{cursor:`pointer`,borderColor:o?`var(--mantine-color-brand-5)`:void 0,backgroundColor:o?`var(--mantine-color-brand-light)`:void 0}:void 0,children:(0,G.jsxs)(X,{justify:`space-between`,wrap:`nowrap`,children:[(0,G.jsxs)(z_,{gap:2,children:[(0,G.jsxs)(X,{gap:4,children:[(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:600,children:e}),(0,G.jsx)(`span`,{onClick:l?e=>e.stopPropagation():void 0,onKeyDown:l?e=>e.stopPropagation():void 0,children:r??(n?(0,G.jsx)(gw,{title:e,summary:n}):null)})]}),c]}),t]})})})}function Cw({k:e,v:t,mono:n}){return(0,G.jsxs)(X,{justify:`space-between`,wrap:`nowrap`,gap:`md`,children:[(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:e}),(0,G.jsx)(Z,{size:`sm`,fw:600,ff:n?`monospace`:void 0,ta:`right`,children:t})]})}function ww({children:e,gap:t=6}){return(0,G.jsx)(z_,{gap:t,children:e})}function Tw(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ew=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ow={};function kw(e,t){return((t||Ow).jsx?Dw:Ew).test(e)}var Aw=/[ \t\n\f\r]/g;function jw(e){return typeof e==`object`?e.type===`text`&&Mw(e.value):Mw(e)}function Mw(e){return e.replace(Aw,``)===``}var Nw=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Nw.prototype.normal={},Nw.prototype.property={},Nw.prototype.space=void 0;function Pw(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Nw(n,r,t)}function Fw(e){return e.toLowerCase()}var Iw=class{constructor(e,t){this.attribute=t,this.property=e}};Iw.prototype.attribute=``,Iw.prototype.booleanish=!1,Iw.prototype.boolean=!1,Iw.prototype.commaOrSpaceSeparated=!1,Iw.prototype.commaSeparated=!1,Iw.prototype.defined=!1,Iw.prototype.mustUseProperty=!1,Iw.prototype.number=!1,Iw.prototype.overloadedBoolean=!1,Iw.prototype.property=``,Iw.prototype.spaceSeparated=!1,Iw.prototype.space=void 0;var Lw=t({boolean:()=>zw,booleanish:()=>Bw,commaOrSpaceSeparated:()=>Ww,commaSeparated:()=>Uw,number:()=>Q,overloadedBoolean:()=>Vw,spaceSeparated:()=>Hw}),Rw=0,zw=Gw(),Bw=Gw(),Vw=Gw(),Q=Gw(),Hw=Gw(),Uw=Gw(),Ww=Gw();function Gw(){return 2**++Rw}var Kw=Object.keys(Lw),qw=class extends Iw{constructor(e,t,n,r){let i=-1;if(super(e,t),Jw(this,`space`,r),typeof n==`number`)for(;++i<Kw.length;){let e=Kw[i];Jw(this,Kw[i],(n&Lw[e])===Lw[e])}}};qw.prototype.defined=!0;function Jw(e,t,n){n&&(e[t]=n)}function Yw(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new qw(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Fw(r)]=r,n[Fw(a.attribute)]=r}return new Nw(t,n,e.space)}var Xw=Yw({properties:{ariaActiveDescendant:null,ariaAtomic:Bw,ariaAutoComplete:null,ariaBusy:Bw,ariaChecked:Bw,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:Hw,ariaCurrent:null,ariaDescribedBy:Hw,ariaDetails:null,ariaDisabled:Bw,ariaDropEffect:Hw,ariaErrorMessage:null,ariaExpanded:Bw,ariaFlowTo:Hw,ariaGrabbed:Bw,ariaHasPopup:null,ariaHidden:Bw,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Hw,ariaLevel:Q,ariaLive:null,ariaModal:Bw,ariaMultiLine:Bw,ariaMultiSelectable:Bw,ariaOrientation:null,ariaOwns:Hw,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Bw,ariaReadOnly:Bw,ariaRelevant:null,ariaRequired:Bw,ariaRoleDescription:Hw,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Bw,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Zw(e,t){return t in e?e[t]:t}function Qw(e,t){return Zw(e,t.toLowerCase())}var $w=Yw({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Uw,acceptCharset:Hw,accessKey:Hw,action:null,allow:null,allowFullScreen:zw,allowPaymentRequest:zw,allowUserMedia:zw,alpha:zw,alt:null,as:null,async:zw,autoCapitalize:null,autoComplete:Hw,autoFocus:zw,autoPlay:zw,blocking:Hw,capture:null,charSet:null,checked:zw,cite:null,className:Hw,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:Bw,controls:zw,controlsList:Hw,coords:Q|Uw,crossOrigin:null,data:null,dateTime:null,decoding:null,default:zw,defer:zw,dir:null,dirName:null,disabled:zw,download:Vw,draggable:Bw,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:zw,formTarget:null,headers:Hw,height:Q,hidden:Vw,high:Q,href:null,hrefLang:null,htmlFor:Hw,httpEquiv:Hw,id:null,imageSizes:null,imageSrcSet:null,inert:zw,inputMode:null,integrity:null,is:null,isMap:zw,itemId:null,itemProp:Hw,itemRef:Hw,itemScope:zw,itemType:Hw,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:zw,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:zw,muted:zw,name:null,nonce:null,noModule:zw,noValidate:zw,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:zw,optimum:Q,pattern:null,ping:Hw,placeholder:null,playsInline:zw,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:zw,referrerPolicy:null,rel:Hw,required:zw,reversed:zw,rows:Q,rowSpan:Q,sandbox:Hw,scope:null,scoped:zw,seamless:zw,selected:zw,shadowRootClonable:zw,shadowRootCustomElementRegistry:zw,shadowRootDelegatesFocus:zw,shadowRootMode:null,shadowRootSerializable:zw,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Bw,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:zw,useMap:null,value:Bw,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Hw,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:zw,declare:zw,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:zw,noHref:zw,noShade:zw,noWrap:zw,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Bw,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:zw,disablePictureInPicture:zw,disableRemotePlayback:zw,exportParts:Uw,part:Hw,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:Qw}),eT=Yw({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Ww,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:Hw,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:zw,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Uw,g2:Uw,glyphName:Uw,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Ww,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Hw,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ww,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ww,rev:Ww,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ww,requiredFeatures:Ww,requiredFonts:Ww,requiredFormats:Ww,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Ww,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ww,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ww,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Zw}),tT=Yw({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),nT=Yw({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Qw}),rT=Yw({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),iT={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},aT=/[A-Z]/g,oT=/-[a-z]/g,sT=/^data[-\w.:]+$/i;function cT(e,t){let n=Fw(t),r=t,i=Iw;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&sT.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(oT,uT);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!oT.test(e)){let n=e.replace(aT,lT);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=qw}return new i(r,t)}function lT(e){return`-`+e.toLowerCase()}function uT(e){return e.charAt(1).toUpperCase()}var dT=Pw([Xw,$w,tT,nT,rT],`html`),fT=Pw([Xw,eT,tT,nT,rT],`svg`);function pT(e){return e.join(` `).trim()}var mT=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
54
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),hT=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(mT());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),gT=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),_T=n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(hT()),i=gT();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),vT=bT(`end`),yT=bT(`start`);function bT(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function xT(e){let t=yT(e),n=vT(e);if(t&&n)return{start:t,end:n}}function ST(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?wT(e.position):`start`in e||`end`in e?wT(e):`line`in e||`column`in e?CT(e):``}function CT(e){return TT(e&&e.line)+`:`+TT(e&&e.column)}function wT(e){return CT(e&&e.start)+`-`+CT(e&&e.end)}function TT(e){return e&&typeof e==`number`?e:1}var ET=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=ST(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ET.prototype.file=``,ET.prototype.name=``,ET.prototype.reason=``,ET.prototype.message=``,ET.prototype.stack=``,ET.prototype.column=void 0,ET.prototype.line=void 0,ET.prototype.ancestors=void 0,ET.prototype.cause=void 0,ET.prototype.fatal=void 0,ET.prototype.place=void 0,ET.prototype.ruleId=void 0,ET.prototype.source=void 0;var DT=l(_T(),1),OT={}.hasOwnProperty,kT=new Map,AT=/[A-Z]/g,jT=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),MT=new Set([`td`,`th`]),NT=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function PT(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=GT(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=WT(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?fT:dT,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=FT(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function FT(e,t,n){if(t.type===`element`)return IT(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return LT(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return zT(e,t,n);if(t.type===`mdxjsEsm`)return RT(e,t);if(t.type===`root`)return BT(e,t,n);if(t.type===`text`)return VT(e,t)}function IT(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=fT,e.schema=i),e.ancestors.push(t);let a=ZT(e,t.tagName,!1),o=KT(e,t),s=JT(e,t);return jT.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!jw(e)})),HT(e,o,a,t),UT(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function LT(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}QT(e,t.position)}function RT(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);QT(e,t.position)}function zT(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=fT,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:ZT(e,t.name,!0),o=qT(e,t),s=JT(e,t);return HT(e,o,a,t),UT(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function BT(e,t,n){let r={};return UT(r,JT(e,t)),e.create(t,e.Fragment,r,n)}function VT(e,t){return t.value}function HT(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function UT(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function WT(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function GT(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=yT(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function KT(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&OT.call(t.properties,i)){let a=YT(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&MT.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function qT(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else QT(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else QT(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function JT(e,t){let n=[],r=-1,i=e.passKeys?new Map:kT;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=FT(e,a,o);s!==void 0&&n.push(s)}return n}function YT(e,t,n){let r=cT(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Tw(n):pT(n)),r.property===`style`){let t=typeof n==`object`?n:XT(e,String(n));return e.stylePropertyNameCase===`css`&&(t=$T(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?iT[r.property]||r.property:r.attribute,n]}}function XT(e,t){try{return(0,DT.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new ET("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=NT+`#cannot-parse-style-attribute`,r}}function ZT(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=kw(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=kw(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return OT.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);QT(e)}function QT(e,t){let n=new ET("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=NT+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function $T(e){let t={},n;for(n in e)OT.call(e,n)&&(t[eE(n)]=e[n]);return t}function eE(e){let t=e.replace(AT,tE);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function tE(e){return`-`+e.toLowerCase()}var nE={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},rE={};function iE(e,t){let n=t||rE;return aE(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function aE(e,t,n){if(sE(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return oE(e.children,t,n)}return Array.isArray(e)?oE(e,t,n):``}function oE(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=aE(e[i],t,n);return r.join(``)}function sE(e){return!!(e&&typeof e==`object`)}var cE=document.createElement(`i`);function lE(e){let t=`&`+e+`;`;cE.innerHTML=t;let n=cE.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function uE(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function dE(e,t){return e.length>0?(uE(e,e.length,0,t),e):t}var fE={}.hasOwnProperty;function pE(e){let t={},n=-1;for(;++n<e.length;)mE(t,e[n]);return t}function mE(e,t){let n;for(n in t){let r=(fE.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){fE.call(r,a)||(r[a]=[]);let e=i[a];hE(r[a],Array.isArray(e)?e:e?[e]:[])}}}function hE(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);uE(e,0,0,r)}function gE(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function _E(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var vE=AE(/[A-Za-z]/),yE=AE(/[\dA-Za-z]/),bE=AE(/[#-'*+\--9=?A-Z^-~]/);function xE(e){return e!==null&&(e<32||e===127)}var SE=AE(/\d/),CE=AE(/[\dA-Fa-f]/),wE=AE(/[!-/:-@[-`{-~]/);function TE(e){return e!==null&&e<-2}function EE(e){return e!==null&&(e<0||e===32)}function DE(e){return e===-2||e===-1||e===32}var OE=AE(/\p{P}|\p{S}/u),kE=AE(/\s/);function AE(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function jE(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&yE(e.charCodeAt(n+1))&&yE(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function ME(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return DE(r)?(e.enter(n),s(r)):t(r)}function s(r){return DE(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var NE={tokenize:PE};function PE(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ME(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return TE(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var FE={tokenize:LE},IE={tokenize:RE};function LE(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return uE(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(IE,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(IE,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return TE(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;uE(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function RE(e,t,n){return ME(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function zE(e){if(e===null||EE(e)||kE(e))return 1;if(OE(e))return 2}function BE(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var VE={name:`attention`,resolveAll:HE,tokenize:UE};function HE(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};WE(d,-c),WE(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=dE(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=dE(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=dE(l,BE(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=dE(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=dE(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,uE(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function UE(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=zE(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=zE(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function WE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var GE={name:`autolink`,tokenize:KE};function KE(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return vE(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||yE(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||yE(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||xE(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):bE(t)?(e.consume(t),l):n(t)}function u(e){return yE(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||yE(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var qE={partial:!0,tokenize:JE};function JE(e,t,n){return r;function r(t){return DE(t)?ME(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||TE(e)?t(e):n(e)}}var YE={continuation:{tokenize:ZE},exit:QE,name:`blockQuote`,tokenize:XE};function XE(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return DE(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ZE(e,t,n){let r=this;return i;function i(t){return DE(t)?ME(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(YE,t,n)(r)}}function QE(e){e.exit(`blockQuote`)}var $E={name:`characterEscape`,tokenize:eD};function eD(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return wE(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var tD={name:`characterReference`,tokenize:nD};function nD(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=yE,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=CE,u):(e.enter(`characterReferenceValue`),a=7,o=SE,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===yE&&!lE(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var rD={partial:!0,tokenize:oD},iD={concrete:!0,name:`codeFenced`,tokenize:aD};function aD(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),DE(t)?ME(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||TE(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(rD,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||TE(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):DE(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),ME(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||TE(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||TE(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&DE(t)?ME(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||TE(t)?e.check(rD,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||TE(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),DE(t)?ME(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),DE(t)?ME(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||TE(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function oD(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var sD={name:`codeIndented`,tokenize:lD},cD={partial:!0,tokenize:uD};function lD(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),ME(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):TE(t)?e.attempt(cD,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||TE(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function uD(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):TE(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):ME(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):TE(e)?i(e):n(e)}}var dD={name:`codeText`,previous:pD,resolve:fD,tokenize:mD};function fD(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function pD(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function mD(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):TE(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||TE(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var hD=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&gD(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),gD(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),gD(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);gD(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);gD(this.left,t.reverse())}}}};function gD(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function _D(e){let t={},n=-1,r,i,a,o,s,c,l,u=new hD(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,vD(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return uE(e,0,1/0,u.slice(0)),!l}function vD(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var yD={resolve:xD,tokenize:SD},bD={partial:!0,tokenize:CD};function xD(e){return _D(e),e}function SD(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):TE(t)?e.check(bD,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function CD(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ME(e,a,`linePrefix`)}function a(i){if(i===null||TE(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function wD(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||xE(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||TE(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||EE(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||xE(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function TD(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):TE(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||TE(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!DE(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function ED(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):TE(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ME(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||TE(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function DD(e,t){let n;return r;function r(i){return TE(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):DE(i)?ME(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var OD={name:`definition`,tokenize:AD},kD={partial:!0,tokenize:jD};function AD(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return TD.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=_E(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return EE(t)?DD(e,l)(t):l(t)}function l(t){return wD(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(kD,d,d)(t)}function d(t){return DE(t)?ME(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||TE(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function jD(e,t,n){return r;function r(t){return EE(t)?DD(e,i)(t):n(t)}function i(t){return ED(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return DE(t)?ME(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||TE(e)?t(e):n(e)}}var MD={name:`hardBreakEscape`,tokenize:ND};function ND(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return TE(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var PD={name:`headingAtx`,resolve:FD,tokenize:ID};function FD(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},uE(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function ID(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||EE(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||TE(n)?(e.exit(`atxHeading`),t(n)):DE(n)?ME(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||EE(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var LD=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),RD=[`pre`,`script`,`style`,`textarea`],zD={concrete:!0,name:`htmlFlow`,resolveTo:HD,tokenize:UD},BD={partial:!0,tokenize:GD},VD={partial:!0,tokenize:WD};function HD(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function UD(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):vE(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):vE(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return vE(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||EE(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&RD.includes(l)?(i=1,r.interrupt?t(s):O(s)):LD.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||yE(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return DE(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||vE(t)?(e.consume(t),b):DE(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||yE(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):DE(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):DE(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||TE(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||EE(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||DE(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||TE(t)?O(t):DE(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):TE(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(BD,R,k)(t)):t===null||TE(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(VD,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||TE(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return RD.includes(n)?(e.consume(t),L):O(t)}return vE(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||TE(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function WD(e,t,n){let r=this;return i;function i(t){return TE(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function GD(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(qE,t,n)}}var KD={name:`htmlText`,tokenize:qD};function qD(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):vE(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):vE(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):TE(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):TE(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):TE(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):TE(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return vE(t)?(e.consume(t),S):n(t)}function S(t){return t===45||yE(t)?(e.consume(t),S):C(t)}function C(t){return TE(t)?(o=C,N(t)):DE(t)?(e.consume(t),C):M(t)}function w(t){return t===45||yE(t)?(e.consume(t),w):t===47||t===62||EE(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||vE(t)?(e.consume(t),E):TE(t)?(o=T,N(t)):DE(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||yE(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):TE(t)?(o=D,N(t)):DE(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):TE(t)?(o=O,N(t)):DE(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):TE(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||EE(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||EE(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return DE(t)?ME(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var JD={name:`labelEnd`,resolveAll:QD,resolveTo:$D,tokenize:eO},YD={tokenize:tO},XD={tokenize:nO},ZD={tokenize:rO};function QD(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&uE(e,0,e.length,n),e}function $D(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=dE(s,e.slice(a+1,a+r+3)),s=dE(s,[[`enter`,u,t]]),s=dE(s,BE(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=dE(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=dE(s,e.slice(o+1)),s=dE(s,[[`exit`,c,t]]),uE(e,a,e.length,s),e}function eO(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(_E(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(YD,u,o?u:d)(t):t===91?e.attempt(XD,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(ZD,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function tO(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return EE(t)?DD(e,a)(t):a(t)}function a(t){return t===41?u(t):wD(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return EE(t)?DD(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?ED(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return EE(t)?DD(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function nO(e,t,n){let r=this;return i;function i(t){return TD.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(_E(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function rO(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var iO={name:`labelStartImage`,resolveAll:JD.resolveAll,tokenize:aO};function aO(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var oO={name:`labelStartLink`,resolveAll:JD.resolveAll,tokenize:sO};function sO(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var cO={name:`lineEnding`,tokenize:lO};function lO(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ME(e,t,`linePrefix`)}}var uO={name:`thematicBreak`,tokenize:dO};function dO(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||TE(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),DE(t)?ME(e,s,`whitespace`)(t):s(t))}}var fO={continuation:{tokenize:gO},exit:vO,name:`list`,tokenize:hO},pO={partial:!0,tokenize:yO},mO={partial:!0,tokenize:_O};function hO(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:SE(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(uO,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return SE(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(qE,r.interrupt?n:u,e.attempt(pO,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return DE(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function gO(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(qE,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ME(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!DE(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(mO,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,ME(e,e.attempt(fO,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function _O(e,t,n){let r=this;return ME(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function vO(e){e.exit(this.containerState.type)}function yO(e,t,n){let r=this;return ME(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!DE(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var bO={name:`setextUnderline`,resolveTo:xO,tokenize:SO};function xO(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function SO(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),DE(t)?ME(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||TE(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var CO={tokenize:wO};function wO(e){let t=this,n=e.attempt(qE,r,e.attempt(this.parser.constructs.flowInitial,i,ME(e,e.attempt(this.parser.constructs.flow,i,e.attempt(yD,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var TO={resolveAll:kO()},EO=OO(`string`),DO=OO(`text`);function OO(e){return{resolveAll:kO(e===`text`?AO:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function kO(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function AO(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var jO=t({attentionMarkers:()=>zO,contentInitial:()=>NO,disable:()=>BO,document:()=>MO,flow:()=>FO,flowInitial:()=>PO,insideSpan:()=>RO,string:()=>IO,text:()=>LO}),MO={42:fO,43:fO,45:fO,48:fO,49:fO,50:fO,51:fO,52:fO,53:fO,54:fO,55:fO,56:fO,57:fO,62:YE},NO={91:OD},PO={[-2]:sD,[-1]:sD,32:sD},FO={35:PD,42:uO,45:[bO,uO],60:zD,61:bO,95:uO,96:iD,126:iD},IO={38:tD,92:$E},LO={[-5]:cO,[-4]:cO,[-3]:cO,33:iO,38:tD,42:VE,60:[GE,KD],91:oO,92:[MD,$E],93:JD,95:VE,96:dD},RO={null:[VE,TO]},zO={null:[42,95]},BO={null:[]};function VO(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=dE(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=BE(a,l.events,l),l.events):[]}function f(e,t){return UO(p(e),t)}function p(e){return HO(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){TE(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&uE(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function HO(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function UO(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
55
|
-
`;break;case-3:o=`\r
|
|
56
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function WO(e){let t={constructs:pE([jO,...(e||{}).extensions||[]]),content:n(NE),defined:[],document:n(FE),flow:n(CO),lazy:{},string:n(EO),text:n(DO)};return t;function n(e){return n;function n(n){return VO(t,e,n)}}}function GO(e){for(;!_D(e););return e}var KO=/[\0\t\n\r]/g;function qO(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(KO.lastIndex=u,c=KO.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var JO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function YO(e){return e.replace(JO,XO)}function XO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return gE(n.slice(t?2:1),t?16:10)}return lE(n)||e}var ZO={}.hasOwnProperty;function QO(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),$O(n)(GO(WO(n).document().write(qO()(e,t,!0))))}function $O(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ue),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(U),blockQuote:a(ie),characterEscape:T,characterReference:T,codeFenced:a(ae),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ae,o),codeText:a(oe,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(H),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(se),hardBreakEscape:a(ce),hardBreakTrailing:a(ce),htmlFlow:a(W,o),htmlFlowData:T,htmlText:a(W,o),htmlTextData:T,image:a(le),label:o,link:a(ue),listItem:a(fe),listItemValue:f,listOrdered:a(de,d),listUnordered:a(de),paragraph:a(pe),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(U),strong:a(me),thematicBreak:a(ge)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:re,autolinkProtocol:V,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:te,characterReference:ne,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:B,resourceDestinationString:I,resourceTitleString:L,resource:R,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};tk(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];ZO.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||rk).call(a,void 0,e[0])}for(r.position={start:ek(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ek(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ek(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||rk).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+ST({start:e.start,end:e.end})+`): it’s not open`);n.position.end=ek(e.end)}function u(){return iE(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_E(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=he(),n.position={start:ek(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ek(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=ek(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=YO(t),n.identifier=_E(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function R(){this.data.inReference=void 0}function z(){this.data.referenceType=`collapsed`}function B(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_E(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ee(e){this.data.characterReferenceType=e.type}function te(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=gE(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=lE(t);let i=this.stack[this.stack.length-1];i.value+=r}function ne(e){let t=this.stack.pop();t.position.end=ek(e.end)}function V(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function re(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ie(){return{type:`blockquote`,children:[]}}function ae(){return{type:`code`,lang:null,meta:null,value:``}}function oe(){return{type:`inlineCode`,value:``}}function H(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function se(){return{type:`emphasis`,children:[]}}function U(){return{type:`heading`,depth:0,children:[]}}function ce(){return{type:`break`}}function W(){return{type:`html`,value:``}}function le(){return{type:`image`,title:null,url:``,alt:null}}function ue(){return{type:`link`,title:null,url:``,children:[]}}function de(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function fe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function pe(){return{type:`paragraph`,children:[]}}function me(){return{type:`strong`,children:[]}}function he(){return{type:`text`,value:``}}function ge(){return{type:`thematicBreak`}}}function ek(e){return{line:e.line,column:e.column,offset:e.offset}}function tk(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?tk(e,r):nk(e,r)}}function nk(e,t){let n;for(n in t)if(ZO.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function rk(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ST({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ST({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ST({start:t.start,end:t.end})+`) is still open`)}function ik(e){let t=this;t.parser=n;function n(n){return QO(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function ak(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ok(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
57
|
-
`}]}function sk(e,t){let n=t.value?t.value+`
|
|
58
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function ck(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lk(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uk(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=jE(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function dk(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fk(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function pk(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function mk(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return pk(e,t);let i={src:jE(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function hk(e,t){let n={src:jE(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function gk(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function _k(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return pk(e,t);let i={href:jE(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function vk(e,t){let n={href:jE(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function yk(e,t,n){let r=e.all(t),i=n?bk(n):xk(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
59
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
60
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function bk(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=xk(n[r])}return t}function xk(e){return e.spread??e.children.length>1}function Sk(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Ck(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wk(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Tk(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ek(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=yT(t.children[1]),o=vT(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Dk(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Ok(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var kk=9,Ak=32;function jk(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Mk(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Mk(t.slice(i),i>0,!1)),a.join(``)}function Mk(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===kk||t===Ak;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===kk||t===Ak;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Nk(e,t){let n={type:`text`,value:jk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Pk(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Fk={blockquote:ak,break:ok,code:sk,delete:ck,emphasis:lk,footnoteReference:uk,heading:dk,html:fk,imageReference:mk,image:hk,inlineCode:gk,linkReference:_k,link:vk,listItem:yk,list:Sk,paragraph:Ck,root:wk,strong:Tk,table:Ek,tableCell:Ok,tableRow:Dk,text:Nk,thematicBreak:Pk,toml:Ik,yaml:Ik,definition:Ik,footnoteDefinition:Ik};function Ik(){}var Lk=typeof self==`object`?self:globalThis,Rk=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Lk[e](t)},zk=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Lk[e]==`function`?Rk(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(Rk(a,o),i)};return r},Bk=e=>zk(new Map,e)(0),Vk=``,{toString:Hk}={},{keys:Uk}=Object,Wk=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Hk.call(e).slice(8,-1);switch(n){case`Array`:return[1,Vk];case`Object`:return[2,Vk];case`Date`:return[3,Vk];case`RegExp`:return[4,Vk];case`Map`:return[5,Vk];case`Set`:return[6,Vk];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Gk=([e,t])=>e===0&&(t===`function`||t===`symbol`),Kk=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Wk(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Uk(r))(e||!Gk(Wk(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?Vk:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Gk(Wk(n))||Gk(Wk(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Gk(Wk(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},qk=(e,{json:t,lossy:n}={})=>{let r=[];return Kk(!(t||n),!!t,new Map,r)(e),r},Jk=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Bk(qk(e,t)):structuredClone(e):(e,t)=>Bk(qk(e,t));function Yk(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Xk(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Zk(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Yk,r=e.options.footnoteBackLabel||Xk,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=jE(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Jk(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
61
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
62
|
-
`}]}}var Qk=(function(e){if(e==null)return rA;if(typeof e==`function`)return nA(e);if(typeof e==`object`)return Array.isArray(e)?$k(e):eA(e);if(typeof e==`string`)return tA(e);throw Error(`Expected function, string, or object as test`)});function $k(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Qk(e[n]);return nA(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function eA(e){let t=e;return nA(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function tA(e){return nA(t);function t(t){return t&&t.type===e}}function nA(e){return t;function t(t,n,r){return!!(iA(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function rA(){return!0}function iA(e){return typeof e==`object`&&!!e&&`type`in e}function aA(e){return e}var oA=[];function sA(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Qk(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+aA(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=oA,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=cA(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function cA(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?oA:[e]}function lA(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),sA(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var uA={}.hasOwnProperty,dA={};function fA(e,t){let n=t||dA,r=new Map,i=new Map,a={all:s,applyData:mA,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Fk,...n.handlers},one:o,options:n,patch:pA,wrap:gA};return lA(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(uA.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Jk(n);return r.children=a.all(e),r}return Jk(e)}return(a.options.unknownHandler||hA)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=_A(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=_A(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function pA(e,t){e.position&&(t.position=xT(e))}function mA(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Jk(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function hA(e,t){let n=t.data||{},r=`value`in t&&!(uA.call(n,`hProperties`)||uA.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gA(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
63
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
64
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
65
|
-
`}),n}function _A(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function vA(e,t){let n=fA(e,t),r=n.one(e,void 0),i=Zk(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
66
|
-
`},i)),a}function yA(e,t){return e&&`run`in e?async function(n,r){let i=vA(n,{file:r,...t});await e.run(i,r)}:function(n,r){return vA(n,{file:r,...e||t})}}function bA(e){if(e)throw e}var xA=l(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function SA(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function CA(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?wA(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function wA(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var TA={basename:EA,dirname:DA,extname:OA,join:kA,sep:`/`};function EA(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);MA(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function DA(e){if(MA(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function OA(e){MA(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function kA(...e){let t=-1,n;for(;++t<e.length;)MA(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:AA(n)}function AA(e){MA(e);let t=e.codePointAt(0)===47,n=jA(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function jA(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function MA(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var NA={cwd:PA};function PA(){return`/`}function FA(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function IA(e){if(typeof e==`string`)e=new URL(e);else if(!FA(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return LA(e)}function LA(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var RA=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],zA=class{constructor(e){let t;t=e?FA(e)?{path:e}:typeof e==`string`||UA(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:NA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<RA.length;){let e=RA[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)RA.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?TA.basename(this.path):void 0}set basename(e){VA(e,`basename`),BA(e,`basename`),this.path=TA.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?TA.dirname(this.path):void 0}set dirname(e){HA(this.basename,`dirname`),this.path=TA.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?TA.extname(this.path):void 0}set extname(e){if(BA(e,`extname`),HA(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=TA.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){FA(e)&&(e=IA(e)),VA(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?TA.basename(this.path,this.extname):void 0}set stem(e){VA(e,`stem`),BA(e,`stem`),this.path=TA.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new ET(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function BA(e,t){if(e&&e.includes(TA.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+TA.sep+"`")}function VA(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function HA(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function UA(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var WA=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),GA={}.hasOwnProperty,KA=new class e extends WA{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=CA()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,xA.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(YA(`data`,this.frozen),this.namespace[e]=t,this):GA.call(this.namespace,e)&&this.namespace[e]||void 0:e?(YA(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=QA(e),n=this.parser||this.Parser;return qA(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),qA(`process`,this.parser||this.Parser),JA(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=QA(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);ej(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),qA(`processSync`,this.parser||this.Parser),JA(`processSync`,this.compiler||this.Compiler),this.process(e,r),ZA(`processSync`,`process`,t),n;function r(e,r){t=!0,bA(e),n=r}}run(e,t,n){XA(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=QA(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),ZA(`runSync`,`run`,n),r;function i(e,t){bA(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=QA(t),r=this.compiler||this.Compiler;return JA(`stringify`,r),XA(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(YA(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,xA.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];SA(o)&&SA(r)&&(r=(0,xA.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function qA(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function JA(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function YA(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function XA(e){if(!SA(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function ZA(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function QA(e){return $A(e)?e:new zA(e)}function $A(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function ej(e){return typeof e==`string`||tj(e)}function tj(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var nj=[],rj={allowDangerousHtml:!0},ij=/^(https?|ircs?|mailto|xmpp)$/i,aj=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function oj(e){let t=sj(e),n=cj(e);return lj(t.runSync(t.parse(n),n),e)}function sj(e){let t=e.rehypePlugins||nj,n=e.remarkPlugins||nj,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rj}:rj;return KA().use(ik).use(n).use(yA,r).use(t)}function cj(e){let t=e.children||``,n=new zA;return typeof t==`string`?n.value=t:``+t,n}function lj(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||uj;for(let e of aj)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return lA(e,l),PT(e,{Fragment:G.Fragment,components:i,ignoreInvalidStyle:!0,jsx:G.jsx,jsxs:G.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in nE)if(Object.hasOwn(nE,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=nE[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function uj(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ij.test(e.slice(0,t))?e:``}function dj(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function fj(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function pj(e,t,n){let r=Qk((n||{}).ignore||[]),i=mj(t),a=-1;for(;++a<i.length;)sA(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function mj(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([hj(e[0]),gj(e[1])])}return t}function hj(e){return typeof e==`string`?new RegExp(fj(e),`g`):e}function gj(e){return typeof e==`function`?e:function(){return e}}var _j=`phrasing`,vj=[`autolink`,`link`,`image`,`label`];function yj(){return{transforms:[Dj],enter:{literalAutolink:xj,literalAutolinkEmail:Sj,literalAutolinkHttp:Sj,literalAutolinkWww:Sj},exit:{literalAutolink:Ej,literalAutolinkEmail:Tj,literalAutolinkHttp:Cj,literalAutolinkWww:wj}}}function bj(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:_j,notInConstruct:vj},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:_j,notInConstruct:vj},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:_j,notInConstruct:vj}]}}function xj(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Sj(e){this.config.enter.autolinkProtocol.call(this,e)}function Cj(e){this.config.exit.autolinkProtocol.call(this,e)}function wj(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Tj(e){this.config.exit.autolinkEmail.call(this,e)}function Ej(e){this.exit(e)}function Dj(e){pj(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Oj],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,kj]],{ignore:[`link`,`linkReference`]})}function Oj(e,t,n,r,i){let a=``;if(!Mj(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Aj(n)))return!1;let o=jj(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function kj(e,t,n,r){return!Mj(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Aj(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function jj(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=dj(e,`(`),a=dj(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Mj(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||kE(n)||OE(n))&&(!t||n!==47)}Hj.peek=Vj;function Nj(){this.buffer()}function Pj(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Fj(){this.buffer()}function Ij(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Lj(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_E(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Rj(e){this.exit(e)}function zj(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_E(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Bj(e){this.exit(e)}function Vj(){return`[`}function Hj(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Uj(){return{enter:{gfmFootnoteCallString:Nj,gfmFootnoteCall:Pj,gfmFootnoteDefinitionLabelString:Fj,gfmFootnoteDefinition:Ij},exit:{gfmFootnoteCallString:Lj,gfmFootnoteCall:Rj,gfmFootnoteDefinitionLabelString:zj,gfmFootnoteDefinition:Bj}}}function Wj(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Hj},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
67
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Kj:Gj))),s(),o}}function Gj(e,t,n){return t===0?e:Kj(e,t,n)}function Kj(e,t,n){return(n?``:` `)+e}var qj=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Qj.peek=$j;function Jj(){return{canContainEols:[`delete`],enter:{strikethrough:Xj},exit:{strikethrough:Zj}}}function Yj(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:qj}],handlers:{delete:Qj}}}function Xj(e){this.enter({type:`delete`,children:[]},e)}function Zj(e){this.exit(e)}function Qj(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function $j(){return`~`}function eM(e){return e.length}function tM(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||eM,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=nM(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=rM(r[d]);else{let e=rM(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
68
|
-
`)}function nM(e){return e==null?``:String(e)}function rM(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function iM(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),aM);return i(),o}function aM(e,t,n){return`>`+(n?``:` `)+e}function oM(e,t){return sM(e,t.inConstruct,!0)&&!sM(e,t.notInConstruct,!1)}function sM(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function cM(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
69
|
-
`&&oM(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
70
|
-
`}function lM(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function uM(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function dM(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function fM(e,t,n,r){let i=dM(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(uM(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,pM);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(lM(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
71
|
-
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
72
|
-
`),a&&(u+=s.move(a+`
|
|
73
|
-
`)),u+=s.move(c),l(),u}function pM(e,t,n){return(n?``:` `)+e}function mM(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function hM(e,t,n,r){let i=mM(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
74
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function gM(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function _M(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function vM(e,t,n){let r=zE(e),i=zE(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}yM.peek=bM;function yM(e,t,n,r){let i=gM(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=vM(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=_M(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=vM(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+_M(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function bM(e,t,n){return n.options.emphasis||`*`}function xM(e,t){let n=!1;return lA(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&iE(e)&&(t.options.setext||n))}function SM(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(xM(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
75
|
-
`,after:`
|
|
76
|
-
`});return r(),t(),o+`
|
|
77
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
78
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
79
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=_M(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}CM.peek=wM;function CM(e){return e.value||``}function wM(){return`<`}TM.peek=EM;function TM(e,t,n,r){let i=mM(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function EM(){return`!`}DM.peek=OM;function DM(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function OM(){return`!`}kM.peek=AM;function kM(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function AM(){return"`"}function jM(e,t){let n=iE(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][a-z+.-]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}MM.peek=NM;function MM(e,t,n,r){let i=mM(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(jM(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function NM(e,t,n){return jM(e,n)?`<`:`[`}PM.peek=FM;function PM(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function FM(){return`[`}function IM(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function LM(e){let t=IM(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function RM(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function zM(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function BM(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?RM(n):IM(n),s=e.ordered?o===`.`?`)`:`.`:LM(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),zM(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function VM(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function HM(e,t,n,r){let i=VM(n),a=n.bulletCurrent||IM(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function UM(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var WM=Qk([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function GM(e,t,n,r){return(e.children.some(function(e){return WM(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function KM(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qM.peek=JM;function qM(e,t,n,r){let i=KM(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=vM(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=_M(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=vM(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+_M(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function JM(e,t,n){return n.options.strong||`*`}function YM(e,t,n,r){return n.safe(e.value,r)}function XM(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ZM(e,t,n){let r=(zM(n)+(n.options.ruleSpaces?` `:``)).repeat(XM(n));return n.options.ruleSpaces?r.slice(0,-1):r}var QM={blockquote:iM,break:cM,code:fM,definition:hM,emphasis:yM,hardBreak:cM,heading:SM,html:CM,image:TM,imageReference:DM,inlineCode:kM,link:MM,linkReference:PM,list:BM,listItem:HM,paragraph:UM,root:GM,strong:qM,text:YM,thematicBreak:ZM};function $M(){return{enter:{table:eN,tableData:iN,tableHeader:iN,tableRow:nN},exit:{codeText:aN,table:tN,tableData:rN,tableHeader:rN,tableRow:rN}}}function eN(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function tN(e){this.exit(e),this.data.inTable=void 0}function nN(e){this.enter({type:`tableRow`,children:[]},e)}function rN(e){this.exit(e)}function iN(e){this.enter({type:`tableCell`,children:[]},e)}function aN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oN));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oN(e,t){return t===`|`?t:e}function sN(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
80
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
81
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return tM(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=QM.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function cN(){return{exit:{taskListCheckValueChecked:uN,taskListCheckValueUnchecked:uN,paragraph:dN}}}function lN(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:fN}}}function uN(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function dN(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function fN(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=QM.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function pN(){return[yj(),Uj(),Jj(),$M(),cN()]}function mN(e){return{extensions:[bj(),Wj(e),Yj(),sN(e),lN()]}}var hN={tokenize:kN,partial:!0},gN={tokenize:AN,partial:!0},_N={tokenize:jN,partial:!0},vN={tokenize:MN,partial:!0},yN={tokenize:NN,partial:!0},bN={name:`wwwAutolink`,tokenize:DN,previous:PN},xN={name:`protocolAutolink`,tokenize:ON,previous:FN},SN={name:`emailAutolink`,tokenize:EN,previous:IN},CN={};function wN(){return{text:CN}}for(var TN=48;TN<123;)CN[TN]=SN,TN++,TN===58?TN=65:TN===91&&(TN=97);CN[43]=SN,CN[45]=SN,CN[46]=SN,CN[95]=SN,CN[72]=[SN,xN],CN[104]=[SN,xN],CN[87]=[SN,bN],CN[119]=[SN,bN];function EN(e,t,n){let r=this,i,a;return o;function o(t){return!LN(t)||!IN.call(r,r.previous)||RN(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return LN(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(yN,u,l)(t):t===45||t===95||yE(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&vE(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function DN(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!PN.call(r,r.previous)||RN(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(hN,e.attempt(gN,e.attempt(_N,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function ON(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&FN.call(r,r.previous)&&!RN(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(vE(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||xE(t)||EE(t)||kE(t)||OE(t)?n(t):e.attempt(gN,e.attempt(_N,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function kN(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function AN(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(vN,c,s)(t):t===null||EE(t)||kE(t)||t!==45&&OE(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function jN(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(vN,t,a)(o):o===null||EE(o)||kE(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function MN(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||EE(o)||kE(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||EE(e)||kE(e)?t(e):r(e)}function a(e){return vE(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):vE(t)?(e.consume(t),o):n(t)}}function NN(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return yE(e)?n(e):t(e)}}function PN(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||EE(e)}function FN(e){return!vE(e)}function IN(e){return!(e===47||LN(e))}function LN(e){return e===43||e===45||e===46||e===95||yE(e)}function RN(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var zN={tokenize:qN,partial:!0};function BN(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:WN,continuation:{tokenize:GN},exit:KN}},text:{91:{name:`gfmFootnoteCall`,tokenize:UN},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:VN,resolveTo:HN}}}}function VN(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=_E(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function HN(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function UN(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||EE(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(_E(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return EE(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function WN(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||EE(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=_E(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return EE(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),ME(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function GN(e,t,n){return e.check(qE,t,e.attempt(zN,t,n))}function KN(e){e.exit(`gfmFootnoteDefinition`)}function qN(e,t,n){let r=this;return ME(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function JN(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&uE(o,o.length,0,BE(s,e.slice(r+1,n),t)),uE(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),uE(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=zE(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=zE(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var YN=class{constructor(){this.map=[]}add(e,t,n){XN(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function XN(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function ZN(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function QN(){return{flow:{null:{name:`table`,tokenize:$N,resolveAll:eP}}}}function $N(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):TE(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):DE(t)?ME(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||EE(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,DE(t)?ME(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return DE(t)?ME(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||TE(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return DE(t)?ME(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||TE(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||TE(n)?(e.exit(`tableRow`),t(n)):DE(n)?ME(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||EE(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function eP(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new YN;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(nP(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=tP(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=tP(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=tP(f,t,o,i,n,d)):(o[0]=o[1],d=tP(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&nP(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=ZN(t.events,n))}return e}function tP(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},rP(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=rP(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=rP(t.events,n[2]),a=rP(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},rP(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function nP(e,t,n,r,i){let a=[],o=rP(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function rP(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var iP={name:`tasklistCheck`,tokenize:oP};function aP(){return{text:{91:iP}}}function oP(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return EE(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return TE(r)?t(r):DE(r)?e.check({tokenize:sP},t,n)(r):n(r)}}function sP(e,t,n){return ME(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function cP(e){return pE([wN(),BN(),JN(e),QN(),aP()])}var lP={};function uP(e){let t=this,n=e||lP,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(cP(n)),a.push(pN()),o.push(mN(n))}function dP(e){return e.toLowerCase().replace(/[︀-️]/g,``).replace(/[^\p{L}\p{N}\p{M}\s-]/gu,``).replace(/\s/g,`-`)}function fP(e,t=2,n=3){if(!e)return[];let r=[],i=!1;for(let a of e.split(`
|
|
82
|
-
`)){if(/^\s*(```|~~~)/.test(a)){i=!i;continue}if(i)continue;let e=/^(#{1,6})\s+(.+?)\s*#*\s*$/.exec(a);if(!e)continue;let[,o=``,s=``]=e,c=o.length;if(c<t||c>n)continue;let l=s.replace(/[*_`]/g,``).trim();l&&r.push({level:c,text:l,id:dP(l)})}return r}function pP({markdown:e,scrollRootRef:t,minLevel:n=2,maxLevel:r=3,maxHeight:i,actions:a}){let o=(0,C.useMemo)(()=>fP(e,n,r),[e,n,r]),[s,c]=(0,C.useState)(``),[l,u]=(0,C.useState)(null),d=(0,C.useRef)(n),f=(0,C.useMemo)(()=>{let e=s.trim().toLowerCase();return e?o.filter(t=>t.text.toLowerCase().includes(e)):o},[o,s]);if((0,C.useEffect)(()=>{if(!o.length)return;let e=o.map(e=>document.getElementById(e.id)).filter(e=>e!==null);if(!e.length)return;let n=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top).at(0);t&&u(t.target.id)},{root:t?.current??null,rootMargin:`0px 0px -70% 0px`,threshold:0});return e.forEach(e=>n.observe(e)),()=>n.disconnect()},[o,t]),!o.length)return null;let p=e=>{let t=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;document.getElementById(e)?.scrollIntoView({behavior:t?`auto`:`smooth`,block:`start`}),u(e)},m=(0,G.jsxs)(Y,{style:{flexShrink:0},children:[(0,G.jsxs)(X,{gap:6,mb:6,px:`xs`,justify:`space-between`,wrap:`nowrap`,children:[(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,children:[(0,G.jsx)(GC,{size:14}),(0,G.jsx)(Z,{size:`xs`,fw:700,tt:`uppercase`,c:`dimmed`,children:`Sur cette page`})]}),a]}),o.length>8&&(0,G.jsx)(Sv,{size:`xs`,mb:6,placeholder:`Filtrer le sommaire…`,value:s,onChange:e=>c(e.currentTarget.value),leftSection:(0,G.jsx)(YC,{size:13}),"aria-label":`Filtrer le sommaire`})]}),h=(0,G.jsxs)(z_,{gap:1,children:[f.map(e=>{let t=e.id===l;return(0,G.jsx)(sc,{onClick:()=>p(e.id),style:{paddingLeft:N((e.level-d.current)*12+10),paddingTop:N(3),paddingBottom:N(3),minHeight:N(24),display:`flex`,alignItems:`center`,borderLeft:`2px solid ${t?`var(--mantine-primary-color-filled)`:`transparent`}`},children:(0,G.jsx)(Z,{size:`xs`,lineClamp:2,c:t?void 0:`dimmed`,fw:t?600:400,children:e.text})},e.id)}),!f.length&&(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,px:`xs`,py:4,children:`Aucun titre ne correspond.`})]});return i?(0,G.jsxs)(Y,{style:{display:`flex`,flexDirection:`column`,maxHeight:i,minHeight:0},children:[m,(0,G.jsx)(rc,{type:`hover`,style:{flex:1,minHeight:0},children:h})]}):(0,G.jsxs)(Y,{children:[m,h]})}var mP=`var(--app-shell-header-height, 56px)`,hP=`var(--nodefony-debugbar-height, 0px)`,gP=`var(--mantine-spacing-md, 16px)`,_P=`var(--nf-pageheader-height, 76px)`,vP=`48px`,yP=`60px`,bP=_P,xP=`calc(${_P} + ${gP})`,SP=`calc(100dvh - ${mP} - ${_P} - ${hP} - ${gP} * 3)`,CP=`calc(${_P} + ${gP} * 2)`,wP=SP,TP=`calc(100dvh - ${mP} - ${_P} - ${vP} - ${hP} - ${gP} * 2)`,EP=`calc(100dvh - ${mP} - ${_P} - ${vP} - ${hP} - ${gP} * 4)`,DP=`calc(100dvh - ${yP} - ${hP})`,OP=`calc(100dvh - ${yP} - ${hP} - ${gP} * 2)`;function kP({LiveGraph:e,height:t=560,title:n=`Schéma live`,hint:r}){let[i,a]=(0,C.useState)(!1);return(0,G.jsxs)(fc,{withBorder:!0,radius:`md`,p:`md`,mt:`xl`,children:[(0,G.jsxs)(X,{justify:`space-between`,mb:`sm`,wrap:`wrap`,children:[(0,G.jsxs)(Y,{style:{maxWidth:560},children:[(0,G.jsx)(Z,{fw:700,size:`md`,children:n}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,mt:2,children:r??(0,G.jsxs)(G.Fragment,{children:[`Le graphe respire via le canal `,(0,G.jsx)(Tp,{children:`nodefony:socket`}),` `,`quand le temps réel est activé. `,(0,G.jsx)(`b`,{children:`OFF`}),` = 0 ticker côté serveur (composant statique). `,(0,G.jsx)(`b`,{children:`ON`}),` = abonnement ref-compté.`]})})]}),(0,G.jsx)(K_,{checked:i,onChange:e=>a(e.currentTarget.checked),label:`Temps réel`,"aria-label":`Activer le temps réel sur le graphe`})]}),(0,G.jsx)(e,{live:i,height:t})]})}var AP=`nodefony:studio:stale-chunk-reload`,jP=1e4;function MP(){try{let e=Number(sessionStorage.getItem(AP)??0);if(Date.now()-e<jP)return!1;sessionStorage.setItem(AP,String(Date.now()))}catch{return!1}return window.location.reload(),!0}var NP=e=>(0,C.lazy)(()=>e().catch(e=>{if(MP())return new Promise(()=>{});throw e})),PP=[{name:`architecture`,label:`Architecture`,component:NP(()=>_(()=>import(`./ArchitectureLiveGraph-6B27wQFi.js`).then(e=>({default:e.ArchitectureLiveGraph})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])))},{name:`protocole`,label:`Protocole`,component:NP(()=>_(()=>import(`./ProtocoleLiveGraph-CzsBhPwX.js`).then(e=>({default:e.ProtocoleLiveGraph})),__vite__mapDeps([25,1,26,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])))},{name:`fan-out`,label:`Fan-out`,component:NP(()=>_(()=>import(`./FanOutLiveGraph-CA025u8m.js`).then(e=>({default:e.FanOutLiveGraph})),__vite__mapDeps([27,1,28,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])))},{name:`actions`,label:`Actions`,component:NP(()=>_(()=>import(`./ActionsLiveGraph-Bgmlddil.js`).then(e=>({default:e.ActionsLiveGraph})),__vite__mapDeps([29,1,3,30,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])))},{name:`backplane`,label:`Backplane`,component:NP(()=>_(()=>import(`./BackplaneLiveGraph-DFbKM68H.js`).then(e=>({default:e.BackplaneLiveGraph})),__vite__mapDeps([31,1,2,32,33,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])))},{name:`sondes`,label:`Sondes`,component:NP(()=>_(()=>import(`./ProbesLiveGraph-36Y6b2-W.js`).then(e=>({default:e.ProbesLiveGraph})),__vite__mapDeps([34,1,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])))}],FP=PP.map(e=>e.name);function IP(e){return PP.find(t=>t.name===e)?.component}function LP(e){if(e==null)return`null`;if(Array.isArray(e))return`array`;let t=typeof e;return t===`string`?`string`:t===`number`||t===`bigint`?`number`:t===`boolean`?`boolean`:`object`}function RP(e){return Array.isArray(e)?e.length>0:e&&typeof e==`object`?Object.keys(e).length>0:!1}var zP={string:`light-dark(var(--mantine-color-teal-8), var(--mantine-color-teal-3))`,number:`light-dark(var(--mantine-color-blue-8), var(--mantine-color-blue-4))`,boolean:`light-dark(var(--mantine-color-grape-8), var(--mantine-color-grape-3))`,null:`var(--mantine-color-dimmed)`,object:`var(--mantine-color-dimmed)`,array:`var(--mantine-color-dimmed)`};function BP(e){let t=LP(e);return t===`null`?e===void 0?`undefined`:`null`:t===`string`?JSON.stringify(e):String(e)}function VP(e){if(e==null)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);if(typeof e==`symbol`)return e.toString();if(Array.isArray(e))return e.map(e=>VP(e)).join(`,`);if(e instanceof Date)return e.toString();try{return JSON.stringify(e)??``}catch{return Object.prototype.toString.call(e)}}function HP(e){if(Array.isArray(e))return`${e.length} élément${e.length>1?`s`:``}`;let t=e&&typeof e==`object`?Object.keys(e).length:0;return`${t} clé${t>1?`s`:``}`}function UP(e,t=80){let n=LP(e);if(n!==`object`&&n!==`array`)return WP(BP(e),t);let r;try{r=JSON.stringify(e)}catch{r=String(e)}return WP(r??String(e),t)}function WP(e,t){return e.length<=t?e:`${e.slice(0,t-1)}…`}function GP(e,t=2){try{return JSON.stringify(e,null,t)}catch{return String(e)}}function KP(e){let t=e.trim();if(!t||!t.startsWith(`{`)&&!t.startsWith(`[`))return{ok:!1,value:e};try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1,value:e}}}function qP(e){return e==null||typeof e==`boolean`?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(qP).join(``):(0,C.isValidElement)(e)?qP(e.props.children):``}var JP={scrollMarginTop:CP};function YP(){if(typeof document>`u`||document.getElementById(`nf-doc-styles`))return;let e=document.createElement(`style`);e.id=`nf-doc-styles`,e.textContent=`
|
|
83
|
-
/* Un schéma se lit D'ABORD EN ENTIER. Mermaid pose \`max-width\` EN LIGNE sur
|
|
84
|
-
son SVG et le comprime à la largeur de la colonne : un \`flowchart\` s'étire
|
|
85
|
-
alors en hauteur (mesuré 351 × 1549 px), et il faut défiler pour en voir des
|
|
86
|
-
bouts — sans jamais avoir la vue d'ensemble. On le met à l'ÉCHELLE : il tient
|
|
87
|
-
dans la largeur ET la hauteur offertes, ratio préservé. Le zoom se fait en
|
|
88
|
-
ouvrant le schéma, pas en le parcourant au doigt. */
|
|
89
|
-
.nf-mermaid > svg {
|
|
90
|
-
max-width: 100% !important;
|
|
91
|
-
/* dvh et non vh : sur mobile, la barre d'adresse escamotable fausse vh,
|
|
92
|
-
et le schéma déborde de l'écran au premier défilement. */
|
|
93
|
-
max-height: 60dvh;
|
|
94
|
-
width: auto;
|
|
95
|
-
height: auto;
|
|
96
|
-
}
|
|
97
|
-
/* Ouvert : le schéma prend TOUTE la place offerte, sans jamais la dépasser.
|
|
98
|
-
Le rendre à sa taille réelle le laissait déborder — « trop gros », et on
|
|
99
|
-
revenait à devoir le parcourir au lieu de le voir. L'échelle reste donc
|
|
100
|
-
relative à la FENÊTRE, ici comme dans le corps de la page ; seul le
|
|
101
|
-
plafond change, parce que la place disponible change. */
|
|
102
|
-
.nf-mermaid-zoom > svg {
|
|
103
|
-
max-width: 100% !important;
|
|
104
|
-
max-height: calc(100dvh - 9rem);
|
|
105
|
-
}
|
|
106
|
-
.nf-heading { position: relative; }
|
|
107
|
-
.nf-heading-anchor {
|
|
108
|
-
opacity: 0;
|
|
109
|
-
transition: opacity 0.15s ease;
|
|
110
|
-
margin-left: 0.4em;
|
|
111
|
-
color: var(--mantine-color-dimmed);
|
|
112
|
-
text-decoration: none;
|
|
113
|
-
font-weight: normal;
|
|
114
|
-
cursor: pointer;
|
|
115
|
-
user-select: none;
|
|
116
|
-
}
|
|
117
|
-
.nf-heading:hover .nf-heading-anchor,
|
|
118
|
-
.nf-heading:focus-within .nf-heading-anchor { opacity: 0.7; }
|
|
119
|
-
.nf-heading-anchor:hover,
|
|
120
|
-
.nf-heading-anchor:focus { opacity: 1 !important; color: var(--mantine-primary-color-filled); outline: none; }
|
|
121
|
-
@media (prefers-reduced-motion: reduce) { .nf-heading-anchor { transition: none; } }
|
|
122
|
-
|
|
123
|
-
/* Catalogue de briques : l'en-tête de card (nom en pastille + libellé). */
|
|
124
|
-
.nf-brick-h {
|
|
125
|
-
display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
|
|
126
|
-
border-left: 3px solid var(--mantine-primary-color-filled);
|
|
127
|
-
background: var(--mantine-color-default-hover);
|
|
128
|
-
border-radius: 8px; padding: 10px 14px;
|
|
129
|
-
}
|
|
130
|
-
.nf-brick-name {
|
|
131
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
132
|
-
font-size: 0.82em; font-weight: 700;
|
|
133
|
-
color: var(--mantine-primary-color-filled);
|
|
134
|
-
background: var(--mantine-color-default);
|
|
135
|
-
padding: 2px 10px; border-radius: 20px; white-space: nowrap;
|
|
136
|
-
}
|
|
137
|
-
.nf-brick-name a { color: inherit; text-decoration: none; }
|
|
138
|
-
.nf-brick-title { font-size: 0.92em; }
|
|
139
|
-
.nf-brick-h:hover { border-left-color: var(--mantine-primary-color-filled); }
|
|
140
|
-
|
|
141
|
-
/* Grille de cards d'un catalogue (bloc de fence nodefony-cards).
|
|
142
|
-
Parti pris : card d'INFORMATION sobre — pastille d'icône, titre net,
|
|
143
|
-
description atténuée, méta discrète, chevron d'affordance. Aucune ombre
|
|
144
|
-
portée ni dégradé : la hiérarchie vient de la typo et de l'espacement. */
|
|
145
|
-
/* ── Grille de cards ──────────────────────────────────────────────────
|
|
146
|
-
Respiration d'abord : une card de catalogue se BALAIE, elle ne se lit
|
|
147
|
-
pas en continu. Colonnes plus larges et gouttière franche pour que
|
|
148
|
-
chaque card se détache comme un objet, au lieu de former un bloc. */
|
|
149
|
-
.nf-cards {
|
|
150
|
-
display: grid; gap: 14px; margin: 1.5em 0;
|
|
151
|
-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
152
|
-
align-items: stretch;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* 🔴 ZÉRO SOULIGNEMENT, à aucun état. Une card est une SURFACE cliquable,
|
|
156
|
-
pas un lien dans une phrase : souligner son contenu au survol barbouille
|
|
157
|
-
le titre, la description ET la méta d'un trait. Le wrapper Typography de
|
|
158
|
-
Mantine style les ancres au survol, il faut donc désamorcer explicitement
|
|
159
|
-
— sur la card ET sur toute sa descendance, à tous les états. */
|
|
160
|
-
.nf-card,
|
|
161
|
-
.nf-card *,
|
|
162
|
-
.nf-card:hover,
|
|
163
|
-
.nf-card:hover *,
|
|
164
|
-
.nf-card:focus,
|
|
165
|
-
.nf-card:focus-visible,
|
|
166
|
-
.nf-card:active,
|
|
167
|
-
.nf-card:active * {
|
|
168
|
-
text-decoration: none;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.nf-card {
|
|
172
|
-
display: flex; align-items: flex-start; gap: 13px;
|
|
173
|
-
padding: 16px 18px; color: inherit;
|
|
174
|
-
background: var(--mantine-color-body);
|
|
175
|
-
border-color: var(--mantine-color-default-border);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/* Un seul signal de survol qui PORTE — l'élévation. La bordure d'accent et
|
|
179
|
-
la teinte du titre l'accompagnent discrètement ; trois signaux d'égale
|
|
180
|
-
force se diluaient et rendaient le survol illisible. */
|
|
181
|
-
.nf-card-link {
|
|
182
|
-
cursor: pointer;
|
|
183
|
-
transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
|
|
184
|
-
will-change: transform;
|
|
185
|
-
}
|
|
186
|
-
.nf-card-link:hover {
|
|
187
|
-
transform: translateY(-2px);
|
|
188
|
-
box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .28);
|
|
189
|
-
border-color: color-mix(in srgb, var(--mantine-primary-color-filled) 55%, var(--mantine-color-default-border));
|
|
190
|
-
}
|
|
191
|
-
.nf-card-link:active { transform: translateY(0); box-shadow: none; }
|
|
192
|
-
.nf-card-link:hover .nf-card-title { color: var(--mantine-primary-color-filled); }
|
|
193
|
-
.nf-card-link:hover .nf-card-go { opacity: .9; transform: translateX(3px); }
|
|
194
|
-
.nf-card-link:hover .nf-card-icon {
|
|
195
|
-
background: color-mix(in srgb, var(--mantine-primary-color-filled) 22%, transparent);
|
|
196
|
-
}
|
|
197
|
-
.nf-card-link:focus-visible {
|
|
198
|
-
outline: 2px solid var(--mantine-primary-color-filled);
|
|
199
|
-
outline-offset: 3px;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/* Pastille d'icône : repère stable à gauche, taille fixe → les colonnes de
|
|
203
|
-
texte s'alignent d'une card à l'autre même quand les titres diffèrent. */
|
|
204
|
-
.nf-card-icon {
|
|
205
|
-
flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
|
|
206
|
-
display: inline-flex; align-items: center; justify-content: center;
|
|
207
|
-
font-size: 18px; line-height: 1;
|
|
208
|
-
background: color-mix(in srgb, var(--mantine-primary-color-filled) 13%, transparent);
|
|
209
|
-
transition: background-color .16s ease;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.nf-card-body { display: flex; flex-direction: column; min-width: 0; gap: 4px; flex: 1 1 auto; }
|
|
213
|
-
.nf-card-title {
|
|
214
|
-
font-weight: 650; font-size: 15px; line-height: 1.25;
|
|
215
|
-
letter-spacing: -0.01em;
|
|
216
|
-
transition: color .16s ease;
|
|
217
|
-
}
|
|
218
|
-
/* La description porte le vrai contenu : elle doit rester CONFORTABLE.
|
|
219
|
-
Contraste relevé d'un cran par rapport au gris atténué — une description
|
|
220
|
-
qu'on doit deviner ne sert à rien. */
|
|
221
|
-
.nf-card-desc {
|
|
222
|
-
font-size: 13.2px; line-height: 1.5;
|
|
223
|
-
color: var(--mantine-color-text);
|
|
224
|
-
opacity: .78;
|
|
225
|
-
}
|
|
226
|
-
.nf-card-meta {
|
|
227
|
-
font-size: 11.5px; line-height: 1.3; color: var(--mantine-color-dimmed);
|
|
228
|
-
margin-top: 3px; font-variant-numeric: tabular-nums;
|
|
229
|
-
}
|
|
230
|
-
.nf-card-go {
|
|
231
|
-
flex: 0 0 auto; align-self: center; opacity: .3; font-size: 16px;
|
|
232
|
-
color: var(--mantine-primary-color-filled);
|
|
233
|
-
transition: opacity .16s ease, transform .16s ease;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/* Card mise en avant : pleine largeur, liseré d'accent — un point d'entrée
|
|
237
|
-
unique se distingue du catalogue sans crier. */
|
|
238
|
-
.nf-card-featured {
|
|
239
|
-
grid-column: 1 / -1;
|
|
240
|
-
border-left: 3px solid var(--mantine-primary-color-filled);
|
|
241
|
-
background: color-mix(in srgb, var(--mantine-primary-color-filled) 6%, var(--mantine-color-body));
|
|
242
|
-
}
|
|
243
|
-
.nf-card-featured .nf-card-title { font-size: 16px; }
|
|
244
|
-
.nf-card-featured .nf-card-icon { width: 40px; height: 40px; font-size: 20px; }
|
|
245
|
-
|
|
246
|
-
/* Ombre plus dense en thème sombre : sur fond foncé, une ombre légère ne se
|
|
247
|
-
voit pas — l'élévation serait perdue exactement là où elle porte seule. */
|
|
248
|
-
@media (prefers-color-scheme: dark) {
|
|
249
|
-
.nf-card-link:hover { box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .6); }
|
|
250
|
-
}
|
|
251
|
-
[data-mantine-color-scheme="dark"] .nf-card-link:hover {
|
|
252
|
-
box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .6);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
@media (prefers-reduced-motion: reduce) {
|
|
256
|
-
.nf-card-link, .nf-card-go, .nf-card-title, .nf-card-icon { transition: none; }
|
|
257
|
-
.nf-card-link:hover { transform: none; }
|
|
258
|
-
.nf-card-link:hover .nf-card-go { transform: none; }
|
|
259
|
-
}
|
|
260
|
-
`,document.head.appendChild(e)}var XP={note:{title:`Note`,color:`blue`,icon:(0,G.jsx)(HC,{size:18})},tip:{title:`Astuce`,color:`teal`,icon:(0,G.jsx)(wC,{size:18})},important:{title:`Important`,color:`violet`,icon:(0,G.jsx)(_C,{size:18})},warning:{title:`Avertissement`,color:`yellow`,icon:(0,G.jsx)(vC,{size:18})},caution:{title:`Attention`,color:`red`,icon:(0,G.jsx)(IC,{size:18})}},ZP=/^\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*\n?/i;function QP(e){let t=null,n=e=>{if(t)return e;if(typeof e==`string`){let n=ZP.exec(e)?.[1];return n?(t=n.toLowerCase(),e.replace(ZP,``)||null):e}if(Array.isArray(e))return e.map(n).filter(e=>e!==null&&e!==``);if((0,C.isValidElement)(e)){let r=e.props.children,i=n(r);return t?(0,C.cloneElement)(e,{},i):e}return e},r=n(e),i=t;if(!i)return null;let a=XP[i];return a?{meta:a,rest:r}:null}function $P({code:e}){let{colorScheme:t}=bn(),n=(0,C.useRef)(null),r=(0,C.useId)().replace(/[^a-zA-Z0-9]/g,``),[i,a]=(0,C.useState)(null),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(``);return(0,C.useEffect)(()=>{let i=!1,o=()=>i;return(async()=>{try{let i=(await _(async()=>{let{default:e}=await import(`./mermaid.core-lhcUO7it.js`);return{default:e}},__vite__mapDeps([35,1,20,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54]))).default;i.initialize({startOnLoad:!1,theme:t===`light`?`default`:`dark`,securityLevel:`strict`,fontFamily:`inherit`});let{svg:s}=await i.render(`mermaid-${r}-${Date.now()}`,e);!o()&&n.current&&(n.current.innerHTML=s,l(s),a(null))}catch(e){o()||a(e instanceof Error?e.message:String(e))}})(),()=>{i=!0}},[e,t,r]),i?(0,G.jsxs)(Md,{color:`orange`,icon:(0,G.jsx)(vC,{size:16}),my:`md`,children:[(0,G.jsx)(Y,{component:`pre`,style:{margin:0,fontSize:N(12),whiteSpace:`pre-wrap`,overflowX:`auto`},children:e}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,mt:`xs`,children:i})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Y,{ref:n,className:`nf-mermaid`,my:`md`,onClick:()=>s(!0),title:`Agrandir le schéma`,style:{textAlign:`center`,cursor:`zoom-in`}}),(0,G.jsx)(ch,{opened:o,onClose:()=>s(!1),fullScreen:!0,radius:0,title:`Schéma`,styles:{body:{height:DP,overflow:`auto`}},children:(0,G.jsx)(Y,{className:`nf-mermaid nf-mermaid-zoom`,style:{textAlign:`center`},dangerouslySetInnerHTML:{__html:c}})})]})}function eF({language:e,code:t}){let[n,r]=(0,C.useState)(!1),i=(0,C.useCallback)(()=>{let e=typeof navigator>`u`?void 0:navigator.clipboard;e&&e.writeText(t).then(()=>{r(!0),setTimeout(()=>r(!1),1200)}).catch(()=>{})},[t]);return(0,G.jsxs)(fc,{withBorder:!0,radius:`md`,my:`md`,style:{overflow:`hidden`},children:[(0,G.jsxs)(X,{justify:`space-between`,px:`sm`,py:4,wrap:`nowrap`,style:{background:`var(--mantine-color-default-hover)`,borderBottom:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,ff:`monospace`,tt:`lowercase`,style:{userSelect:`none`},children:e||`text`}),(0,G.jsx)(k_,{label:n?`Copié`:`Copier`,withinPortal:!0,children:(0,G.jsx)(_l,{size:`sm`,variant:`subtle`,color:`gray`,onClick:i,"aria-label":n?`Code copié`:`Copier le bloc de code`,children:n?(0,G.jsx)(EC,{size:14}):(0,G.jsx)(PC,{size:14})})})]}),(0,G.jsx)(Y,{component:`pre`,style:{margin:0,padding:N(12),overflowX:`auto`,fontSize:N(13),lineHeight:1.6},children:(0,G.jsx)(`code`,{children:t})})]})}var tF={scrollMarginTop:CP,marginTop:`1.4em`,marginBottom:`0.4em`};function nF({json:e}){let t=null,n=null;try{let n=JSON.parse(e);if(typeof n!=`object`||!n||Array.isArray(n))throw Error(`un objet est attendu`);let r=n.graph;if(typeof r!=`string`||r.length===0)throw Error("champ `graph` manquant");t=n}catch(e){n=e instanceof Error?e.message:String(e)}let r=t?IP(t.graph):void 0;return!t||!r?(0,G.jsxs)(Md,{color:`orange`,title:`Graphe live non rendu`,mt:`md`,children:[(0,G.jsx)(Z,{size:`sm`,mb:`xs`,children:n??`Graphe « ${t?.graph??`?`} » inconnu. Disponibles : ${FP.join(`, `)}.`}),(0,G.jsx)(`pre`,{style:{margin:0,overflowX:`auto`,fontSize:`0.8em`},children:e})]}):(0,G.jsx)(C.Suspense,{fallback:(0,G.jsx)(fc,{withBorder:!0,radius:`md`,p:`md`,mt:`xl`,children:(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:`Chargement du schéma…`})}),children:(0,G.jsx)(kP,{LiveGraph:r,height:t.height,title:t.title,hint:t.hint})})}function rF({json:e,onNavigate:t}){let n=[],r=null;try{let t=JSON.parse(e);if(!Array.isArray(t))throw Error(`un tableau est attendu`);n=t.filter(e=>typeof e==`object`&&!!e&&typeof e.title==`string`)}catch(e){r=e instanceof Error?e.message:String(e)}if(r||!n.length)return(0,G.jsx)(Md,{color:`yellow`,variant:`light`,title:`Bloc de cards illisible`,children:(0,G.jsx)(Z,{size:`sm`,children:r??`aucune card valide dans ce bloc`})});let i=e=>n=>{if(!e||!t)return;let r=e.match(/^\.?\/?([A-Za-z0-9._~-]+)\.md(?:#.*)?$/)?.[1];r&&t(r)&&n.preventDefault()};return(0,G.jsx)(Y,{className:`nf-cards`,children:n.map(e=>(0,G.jsxs)(fc,{component:e.href?`a`:`div`,href:e.href,onClick:i(e.href),withBorder:!0,radius:`md`,className:[`nf-card`,e.href?`nf-card-link`:``,e.featured?`nf-card-featured`:``].filter(Boolean).join(` `),children:[e.icon?(0,G.jsx)(`span`,{className:`nf-card-icon`,"aria-hidden":`true`,children:e.icon}):null,(0,G.jsxs)(`span`,{className:`nf-card-body`,children:[(0,G.jsx)(`span`,{className:`nf-card-title`,children:e.title}),e.desc?(0,G.jsx)(`span`,{className:`nf-card-desc`,children:e.desc}):null,e.meta?(0,G.jsx)(`span`,{className:`nf-card-meta`,children:e.meta}):null]}),e.href?(0,G.jsx)(`span`,{className:`nf-card-go`,"aria-hidden":`true`,children:`→`}):null]},e.title))})}function iF(e){if(!(0,C.isValidElement)(e))return null;let t=e;if(t.type===`code`)return t;if(t.type===`a`||typeof t.type==`function`||typeof t.type==`object`){let e=C.Children.toArray(t.props.children??[]);if(e.length===1&&(0,C.isValidElement)(e[0])&&e[0].type===`code`)return t}return null}function aF(e){let t=C.Children.toArray(e);if(t.length<2)return null;let n=iF(t[0]);if(!n)return null;let r=t.slice(1).map(e=>typeof e==`string`?e:qP(e)).join(``).trim(),i=r.replace(/^[—–-]\s*/,``).trim();return!i||i===r?null:{name:n,title:i}}function oF({level:e,children:t}){(0,C.useEffect)(()=>YP(),[]);let n=dP(qP(t)),r=qP(t),i=(0,C.useCallback)(e=>{if(e.preventDefault(),typeof window>`u`)return;let t=`${window.location.origin}${window.location.pathname}#${n}`,r=navigator.clipboard;r&&r.writeText(t).catch(()=>{});let i=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;document.getElementById(n)?.scrollIntoView({behavior:i?`auto`:`smooth`,block:`start`})},[n]),a=(0,G.jsx)(`a`,{href:`#${n}`,className:`nf-heading-anchor`,onClick:i,"aria-label":`Lien vers la section : ${r}`,children:`#`});if(e===2)return(0,G.jsxs)(`h2`,{id:n,className:`nf-heading`,style:JP,children:[t,a]});if(e===3){let e=aF(t);return e?(0,G.jsxs)(`h3`,{id:n,className:`nf-heading nf-brick-h`,style:tF,children:[(0,G.jsx)(`span`,{className:`nf-brick-name`,children:e.name}),(0,G.jsx)(`span`,{className:`nf-brick-title`,children:e.title}),a]}):(0,G.jsxs)(`h3`,{id:n,className:`nf-heading`,style:JP,children:[t,a]})}return(0,G.jsxs)(`h4`,{id:n,className:`nf-heading`,style:JP,children:[t,a]})}var sF=[uP];function cF(e){return{h2:({children:e})=>(0,G.jsx)(oF,{level:2,children:e}),h3:({children:e})=>(0,G.jsx)(oF,{level:3,children:e}),h4:({children:e})=>(0,G.jsx)(oF,{level:4,children:e}),blockquote:({children:e})=>{let t=QP(e);return t?(0,G.jsx)(Md,{color:t.meta.color,icon:t.meta.icon,title:t.meta.title,variant:`light`,my:`md`,children:t.rest}):(0,G.jsx)(`blockquote`,{children:e})},pre:({children:t})=>{let n=Array.isArray(t)?t[0]:t;if(n!=null&&(0,C.isValidElement)(n)){let t=n.props,r=t.className??``,i=VP(t.children).replace(/\n$/,``);if(/\blanguage-mermaid\b/.test(r))return(0,G.jsx)($P,{code:i});if(/\blanguage-nodefony-cards\b/.test(r))return(0,G.jsx)(rF,{json:i,onNavigate:e});if(/\blanguage-nodefony-livegraph\b/.test(r))return(0,G.jsx)(nF,{json:i});if(/\blanguage-/.test(r)){let e=r.match(/language-([a-z0-9]+)/i)?.[1]??``;return(0,G.jsx)(eF,{language:e,code:i})}}return(0,G.jsx)(`pre`,{children:t})},code({className:e,children:t}){return(0,G.jsx)(`code`,{className:e,children:t})},a({href:t,children:n}){let r=t??``,i=/^https?:\/\//i.test(r),a=r.match(/^\.?\/?([A-Za-z0-9._~-]+)\.md(#.*)?$/)?.[1];return a&&e?(0,G.jsx)(zd,{onClick:t=>{e(a)&&t.preventDefault()},style:{cursor:`pointer`},children:n}):(0,G.jsx)(zd,{href:r,target:i?`_blank`:void 0,rel:i?`noreferrer noopener`:void 0,children:n})}}}function lF({markdown:e,onInternalLink:t,maxWidth:n=860}){let r=(0,C.useMemo)(()=>cF(t),[t]);return(0,G.jsx)(Pv,{children:(0,G.jsx)(Y,{style:{maxWidth:N(n),fontSize:N(15),lineHeight:1.75},children:(0,G.jsx)(oj,{remarkPlugins:sF,components:r,children:e})})})}var uF=264,dF=240;function fF(){if(typeof document>`u`||document.getElementById(`nf-doclayout-styles`))return;let e=document.createElement(`style`);e.id=`nf-doclayout-styles`,e.textContent=`
|
|
261
|
-
.nf-doc-region{display:flex;gap:var(--mantine-spacing-xl,32px);align-items:stretch}
|
|
262
|
-
.nf-doc-region.is-page{align-items:flex-start}
|
|
263
|
-
.nf-doc-nav{flex:0 0 ${uF}px;width:${uF}px}
|
|
264
|
-
.nf-doc-toc{flex:0 0 ${dF}px;width:${dF}px}
|
|
265
|
-
.nf-doc-main{flex:1 1 0;min-width:0}
|
|
266
|
-
.nf-doc-region.is-container>.nf-doc-region-col{height:var(--nf-doc-h)}
|
|
267
|
-
@media (max-width:991px){
|
|
268
|
-
.nf-doc-region{flex-direction:column}
|
|
269
|
-
.nf-doc-nav,.nf-doc-toc{flex-basis:auto;width:100%}
|
|
270
|
-
.nf-doc-toc{display:none}
|
|
271
|
-
.nf-doc-region.is-container>.nf-doc-region-col{height:auto}
|
|
272
|
-
}`,document.head.appendChild(e)}function pF({navTitle:e,navActions:t,navSearch:n,nav:r,title:i,children:a,tocMarkdown:o,mode:s=`page`,height:c=`70vh`,enableFullscreen:l=!0}){let[u,d]=(0,C.useState)(!1),[f,p]=(0,C.useState)(!0),m=(0,C.useRef)(null),h=!!o&&fP(o).length>0;fF();let g=(s,c,u)=>{let g=h&&(u?!0:f),_=s===`page`?SP:c,v=(0,G.jsxs)(fc,{withBorder:!0,radius:`md`,p:`sm`,className:`nf-doc-nav nf-doc-region-col`,style:s===`page`?{position:`sticky`,top:xP,height:SP,display:`flex`,flexDirection:`column`,overflow:`hidden`}:{display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,G.jsxs)(Y,{style:{flexShrink:0},children:[(0,G.jsxs)(X,{justify:`space-between`,mb:6,px:`xs`,wrap:`nowrap`,children:[(0,G.jsx)(Z,{size:`xs`,fw:700,c:`dimmed`,tt:`uppercase`,children:e}),t]}),n]}),(0,G.jsx)(rc,{type:`hover`,style:{flex:1,minHeight:0},children:r})]}),y=(0,G.jsxs)(X,{gap:`xs`,mb:`md`,wrap:`nowrap`,style:{flexShrink:0,...s===`page`?{position:`sticky`,top:bP,background:`var(--mantine-color-body)`,zIndex:1,paddingTop:`var(--mantine-spacing-xs, 8px)`,paddingBottom:`var(--mantine-spacing-xs, 8px)`}:{}},children:[(0,G.jsx)(Y,{style:{flex:1,minWidth:0},children:i}),h&&!g&&!u&&(0,G.jsx)(k_,{label:`Afficher le sommaire`,position:`left`,children:(0,G.jsx)(_l,{variant:`subtle`,color:`gray`,size:`sm`,onClick:()=>p(!0),"aria-label":`Afficher le sommaire`,children:(0,G.jsx)(WC,{size:16})})}),l&&!u&&(0,G.jsx)(k_,{label:`Plein écran`,position:`left`,children:(0,G.jsx)(_l,{variant:`subtle`,color:`gray`,size:`sm`,onClick:()=>d(!0),"aria-label":`Plein écran`,children:(0,G.jsx)(qC,{size:16})})})]});return(0,G.jsxs)(Y,{className:`nf-doc-region ${s===`page`?`is-page`:`is-container`}`,style:{"--nf-doc-h":c},children:[v,s===`page`?(0,G.jsxs)(Y,{className:`nf-doc-main nf-doc-region-col`,children:[y,a]}):(0,G.jsxs)(fc,{withBorder:u,radius:u?`md`:0,p:u?`sm`:0,bg:u?void 0:`transparent`,className:`nf-doc-main nf-doc-region-col`,style:{display:`flex`,flexDirection:`column`},children:[y,(0,G.jsx)(rc,{type:`auto`,offsetScrollbars:!0,viewportRef:m,style:{flex:1,minHeight:0},children:a})]}),g&&o&&(0,G.jsx)(Y,{className:`nf-doc-toc`,style:s===`page`?{position:`sticky`,top:`calc(var(--nf-pageheader-height, 76px) + var(--mantine-spacing-md, 16px))`,alignSelf:`flex-start`,height:`calc(100dvh - var(--app-shell-header-height, 56px) - var(--nf-pageheader-height, 76px) - var(--nodefony-debugbar-height, 0px) - var(--mantine-spacing-md, 16px) * 3)`,display:`flex`,flexDirection:`column`}:void 0,children:(0,G.jsx)(fc,{withBorder:!0,radius:`md`,p:`sm`,style:{flex:1,minHeight:0,display:`flex`,flexDirection:`column`},children:(0,G.jsx)(pP,{markdown:o,scrollRootRef:s===`container`?m:void 0,maxHeight:_,actions:u?void 0:(0,G.jsx)(k_,{label:`Masquer le sommaire`,children:(0,G.jsx)(_l,{variant:`subtle`,color:`gray`,size:`xs`,onClick:()=>p(!1),"aria-label":`Masquer le sommaire`,children:(0,G.jsx)(UC,{size:14})})})})})})]})};return(0,G.jsxs)(G.Fragment,{children:[g(s,c,!1),(0,G.jsx)(ch,{opened:u,onClose:()=>d(!1),fullScreen:!0,radius:0,title:e,styles:{body:{height:DP,paddingTop:N(12)}},children:g(`container`,OP,!0)})]})}var mF={stable:`teal`,draft:`yellow`,temporary:`orange`,experimental:`violet`,deprecated:`red`};function hF(e){if(!e)return null;let t=typeof e==`string`?new Date(e):e;return Number.isNaN(t.getTime())?null:t.toLocaleDateString(`fr-FR`,{year:`numeric`,month:`long`,day:`numeric`})}function gF({breadcrumbs:e,title:t,version:n,status:r,wip:i,updated:a,sourceUrl:o,actions:s}){let c=hF(a),l=r?mF[r.toLowerCase()]??`gray`:`gray`;return(0,G.jsxs)(z_,{gap:4,children:[e&&e.length>0&&(0,G.jsx)(X,{gap:4,wrap:`nowrap`,children:e.map((e,t)=>(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,children:[t>0&&(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,"aria-hidden":!0,children:`›`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:700,style:{letterSpacing:`0.04em`},children:e})]},`${t}-${e}`))}),(0,G.jsxs)(X,{justify:`space-between`,wrap:`nowrap`,align:`flex-start`,children:[(0,G.jsxs)(X,{gap:`xs`,wrap:`nowrap`,style:{flex:1,minWidth:0},align:`center`,children:[(0,G.jsx)(Mv,{order:2,lineClamp:2,style:{minWidth:0},children:t}),i&&(0,G.jsx)(rp,{color:`gray`,variant:`light`,children:`à venir`}),r&&(0,G.jsx)(rp,{color:l,variant:`light`,children:r}),n&&(0,G.jsx)(rp,{variant:`default`,style:{fontVariantNumeric:`tabular-nums`},children:n})]}),s]}),(c||o)&&(0,G.jsxs)(X,{gap:`md`,wrap:`wrap`,children:[c&&(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,children:[(0,G.jsx)(MC,{size:13,color:`var(--mantine-color-dimmed)`,"aria-hidden":!0}),(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`Mis à jour le `,c]})]}),o&&(0,G.jsxs)(zd,{href:o,target:`_blank`,rel:`noreferrer noopener`,size:`xs`,c:`dimmed`,style:{display:`inline-flex`,alignItems:`center`,gap:N(4),minHeight:N(24),paddingBlock:N(3)},children:[(0,G.jsx)(CC,{size:13,"aria-hidden":!0}),`Modifier sur GitHub`]})]})]})}function _F(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=_F(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var vF=e=>()=>e;function yF(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}yF.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function bF(e){return!e.ctrlKey&&!e.button}function xF(){return this.parentNode}function SF(e,t){return t??{x:e.x,y:e.y}}function CF(){return navigator.maxTouchPoints||`ontouchstart`in this}function wF(){var t=bF,n=xF,r=SF,c=CF,l={},u=a(`start`,`drag`,`end`),d=0,f,_,v,y,b=0;function x(e){e.on(`mousedown.drag`,S).filter(c).on(`touchstart.drag`,T).on(`touchmove.drag`,E,s).on(`touchend.drag touchcancel.drag`,D).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function S(e,r){if(!y&&t.call(this,e,r)){var a=O(this,n.call(this,e,r),e,r,`mouse`);a&&(m(e.view).on(`mousemove.drag`,C,h).on(`mouseup.drag`,w,h),o(e.view),i(e),v=!1,f=e.clientX,_=e.clientY,a(`start`,e))}}function C(e){if(g(e),!v){var t=e.clientX-f,n=e.clientY-_;v=t*t+n*n>b}l.mouse(`drag`,e)}function w(e){m(e.view).on(`mousemove.drag mouseup.drag`,null),p(e.view,v),g(e),l.mouse(`end`,e)}function T(e,r){if(t.call(this,e,r))for(var a=e.changedTouches,o=n.call(this,e,r),s=a.length,c=0,l;c<s;++c)(l=O(this,o,e,r,a[c].identifier,a[c]))&&(i(e),l(`start`,e,a[c]))}function E(e){for(var t=e.changedTouches,n=t.length,r=0,i;r<n;++r)(i=l[t[r].identifier])&&(g(e),i(`drag`,e,t[r]))}function D(e){var t=e.changedTouches,n=t.length,r,a;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),r=0;r<n;++r)(a=l[t[r].identifier])&&(i(e),a(`end`,e,t[r]))}function O(t,n,i,a,o,s){var c=u.copy(),f=e(s||i,n),p,m,h;if((h=r.call(t,new yF(`beforestart`,{sourceEvent:i,target:x,identifier:o,active:d,x:f[0],y:f[1],dx:0,dy:0,dispatch:c}),a))!=null)return p=h.x-f[0]||0,m=h.y-f[1]||0,function r(i,s,u){var g=f,_;switch(i){case`start`:l[o]=r,_=d++;break;case`end`:delete l[o],--d;case`drag`:f=e(u||s,n),_=d}c.call(i,t,new yF(i,{sourceEvent:s,subject:h,target:x,identifier:o,active:_,x:f[0]+p,y:f[1]+m,dx:f[0]-g[0],dy:f[1]-g[1],dispatch:c}),a)}}return x.filter=function(e){return arguments.length?(t=typeof e==`function`?e:vF(!!e),x):t},x.container=function(e){return arguments.length?(n=typeof e==`function`?e:vF(e),x):n},x.subject=function(e){return arguments.length?(r=typeof e==`function`?e:vF(e),x):r},x.touchable=function(e){return arguments.length?(c=typeof e==`function`?e:vF(!!e),x):c},x.on=function(){var e=u.on.apply(u,arguments);return e===u?x:e},x.clickDistance=function(e){return arguments.length?(b=(e=+e)*e,x):Math.sqrt(b)},x}var TF={error001:(e=`react`)=>`Seems like you have not used ${e===`svelte`?`SvelteFlowProvider`:`ReactFlowProvider`} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>`It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.`,error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>`The parent container needs a width and a height to render the graph.`,error005:()=>`Only child nodes can use a parent extent.`,error006:()=>`Can't create edge. An edge needs a source and a target.`,error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e===`source`?n:r}", edge id: ${t}.`,error010:()=>`Handle: No node id found. Make sure to only use a Handle inside a custom Node.`,error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e=`react`)=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>`useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.`,error015:()=>`It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.`,error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},EF=[[-1/0,-1/0],[1/0,1/0]],DF=[`Enter`,` `,`Escape`],OF={"node.a11yDescription.default":`Press enter or space to select a node. Press delete to remove it and escape to cancel.`,"node.a11yDescription.keyboardDisabled":`Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.`,"node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":`Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.`,"controls.ariaLabel":`Control Panel`,"controls.zoomIn.ariaLabel":`Zoom In`,"controls.zoomOut.ariaLabel":`Zoom Out`,"controls.fitView.ariaLabel":`Fit View`,"controls.interactive.ariaLabel":`Toggle Interactivity`,"minimap.ariaLabel":`Mini Map`,"handle.ariaLabel":`Handle`},kF;(function(e){e.Strict=`strict`,e.Loose=`loose`})(kF||={});var AF;(function(e){e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`})(AF||={});var jF;(function(e){e.Partial=`partial`,e.Full=`full`})(jF||={});var MF={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},NF;(function(e){e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`})(NF||={});var PF;(function(e){e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`})(PF||={});var $;(function(e){e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`})($||={});var FF={[$.Left]:$.Right,[$.Right]:$.Left,[$.Top]:$.Bottom,[$.Bottom]:$.Top},IF=e=>!!e&&typeof e==`object`&&`id`in e&&`source`in e&&`target`in e,LF=e=>!!e&&typeof e==`object`&&`id`in e&&`position`in e&&!(`source`in e)&&!(`target`in e),RF=e=>!!e&&typeof e==`object`&&`id`in e&&`internals`in e&&!(`source`in e)&&!(`target`in e),zF=(e,t=[0,0])=>{let{width:n,height:r}=yI(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},BF=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1,r=e.reduce((e,r)=>{let i=typeof r==`string`,a=!t.nodeLookup&&!i?r:void 0;return t.nodeLookup&&(a=i?t.nodeLookup.get(r):RF(r)?r:t.nodeLookup.get(r.id)),a?(n=!0,$F(e,rI(a,t.nodeOrigin))):e},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?tI(r):{x:0,y:0,width:0,height:0}},VF=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(t.filter===void 0||t.filter(e))&&(n=$F(n,rI(e)),r=!0)}),r?tI(n):{x:0,y:0,width:0,height:0}},HF=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s=(t.x-n)/i,c=(t.y-r)/i,l=t.width/i,u=t.height/i,d=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??0,f=e.height??t.height??t.initialHeight??0,{x:p,y:m}=t.internals.positionAbsolute,h=aI(s,c,l,u,p,m,i,f),g=i*f,_=a&&h>0;(!t.internals.handleBounds||_||h>=g||t.dragging)&&d.push(t)}return d},UF=(e,t)=>{let n=new Set;return e.forEach(e=>{n.add(e.id)}),t.filter(e=>n.has(e.source)||n.has(e.target))};function WF(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{let i;if(t?.includeHiddenNodes){let{width:t,height:n}=yI(e);i=t>0&&n>0}else i=!!(e.measured.width&&e.measured.height&&!e.hidden);i&&(!r||r.has(e.id))&&n.set(e.id,e)}),n}async function GF({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return!0;let s=gI(VF(WF(e,o)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(s,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),!0}function KF({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},u=o.origin??r,d=o.extent||i;if(o.extent===`parent`&&!o.expandParent){if(!s)a?.(`005`,TF.error005());else{let{width:e,height:t}=yI(s);e&&t&&(d=[[c,l],[c+e,l+t]])}}else s&&vI(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+l],[o.extent[1][0]+c,o.extent[1][1]+l]]);let f=vI(d)?YF(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.(`015`,TF.error015()),{position:{x:f.x-c+(o.measured.width??0)*u[0],y:f.y-l+(o.measured.height??0)*u[1]},positionAbsolute:f}}async function qF({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a=new Set(e.map(e=>e.id)),o=[];for(let e of n){if(e.deletable===!1)continue;let t=a.has(e.id),n=!t&&e.parentId&&o.find(t=>t.id===e.parentId);(t||n)&&o.push(e)}let s=new Set(t.map(e=>e.id)),c=r.filter(e=>e.deletable!==!1),l=UF(o,c);for(let e of c)s.has(e.id)&&!l.find(t=>t.id===e.id)&&l.push(e);if(!i)return{edges:l,nodes:o};let u=await i({nodes:o,edges:l});return typeof u==`boolean`?u?{edges:l,nodes:o}:{edges:[],nodes:[]}:u}var JF=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),YF=(e={x:0,y:0},t,n)=>({x:JF(e.x,t[0][0],t[1][0]-(n?.width??0)),y:JF(e.y,t[0][1],t[1][1]-(n?.height??0))});function XF(e,t,n){let{width:r,height:i}=yI(n),{x:a,y:o}=n.internals.positionAbsolute;return YF(e,[[a,o],[a+r,o+i]],t)}var ZF=(e,t,n)=>e<t?JF(Math.abs(e-t),1,t)/t:e>n?-JF(Math.abs(e-n),1,t)/t:0,QF=(e,t,n=15,r=40)=>[ZF(e.x,r,t.width-r)*n,ZF(e.y,r,t.height-r)*n],$F=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),eI=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),tI=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),nI=(e,t=[0,0])=>{let{x:n,y:r}=RF(e)?e.internals.positionAbsolute:zF(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},rI=(e,t=[0,0])=>{let{x:n,y:r}=RF(e)?e.internals.positionAbsolute:zF(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},iI=(e,t)=>tI($F(eI(e),eI(t))),aI=(e,t,n,r,i,a,o,s)=>{let c=Math.max(0,Math.min(e+n,i+o)-Math.max(e,i)),l=Math.max(0,Math.min(t+r,a+s)-Math.max(t,a));return Math.ceil(c*l)},oI=(e,t)=>aI(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),sI=e=>cI(e.width)&&cI(e.height)&&cI(e.x)&&cI(e.y),cI=e=>!isNaN(e)&&isFinite(e),lI=(e,t)=>(e,t)=>{},uI=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),dI=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?uI(s,o):s},fI=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function pI(e,t){if(typeof e==`number`)return Math.floor((t-t/(1+e))*.5);if(typeof e==`string`&&e.endsWith(`px`)){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e==`string`&&e.endsWith(`%`)){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function mI(e,t,n){if(typeof e==`string`||typeof e==`number`){let r=pI(e,n),i=pI(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e==`object`){let r=pI(e.top??e.y??0,n),i=pI(e.bottom??e.y??0,n),a=pI(e.left??e.x??0,t),o=pI(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function hI(e,t,n,r,i,a){let{x:o,y:s}=fI(e,[t,n,r]),{x:c,y:l}=fI({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,d=a-l;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}var gI=(e,t,n,r,i,a)=>{let o=mI(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=JF(Math.min(s,c),r,i),u=e.x+e.width/2,d=e.y+e.height/2,f=t/2-u*l,p=n/2-d*l,m=hI(e,f,p,l,t,n),h={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:f-h.left+h.right,y:p-h.top+h.bottom,zoom:l}},_I=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0;function vI(e){return e!=null&&e!==`parent`}function yI(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function bI(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function xI(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function SI(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function CI(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function wI(e){return{...OF,...e||{}}}function TI(e){return e===null?null:e?`valid`:`invalid`}function EI(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=MI(e),s=dI({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:l}=n?uI(s,t):s;return{xSnapped:c,ySnapped:l,...s}}var DI=e=>({width:e.offsetWidth,height:e.offsetHeight}),OI=e=>e?.getRootNode?.()||window?.document,kI=[`INPUT`,`SELECT`,`TEXTAREA`];function AI(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1?kI.includes(t.nodeName)||t.hasAttribute(`contenteditable`)||!!t.closest(`.nokey`):!1}var jI=e=>`clientX`in e,MI=(e,t)=>{let n=jI(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},NI=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...DI(t)}})};function PI({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125;return[c,l,Math.abs(c-e),Math.abs(l-t)]}function FI(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function II({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case $.Left:return[t-FI(t-r,a),n];case $.Right:return[t+FI(r-t,a),n];case $.Top:return[t,n-FI(n-i,a)];case $.Bottom:return[t,n+FI(i-n,a)]}}function LI({sourceX:e,sourceY:t,sourcePosition:n=$.Bottom,targetX:r,targetY:i,targetPosition:a=$.Top,curvature:o=.25}){let[s,c]=II({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=II({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=PI({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,p,m]}function RI({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2;return[a,r<t?r+o:r-o,i,o]}function zI({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a=`basic`}){return a===`manual`?r:(i&&n?r+1e3:r)+Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0)}function BI({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=$F(rI(e),rI(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),oI({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},tI(a))>0}var VI=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||``}-${n}${r||``}`,HI=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),UI=(e,t,n={})=>{if(!e.source||!e.target)return n.onError?.(`006`,TF.error006()),t;let r=n.getEdgeId||VI,i;return i=IF(e)?{...e}:{...e,id:r(e)},HI(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function WI({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=RI({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var GI={[$.Left]:{x:-1,y:0},[$.Right]:{x:1,y:0},[$.Top]:{x:0,y:-1},[$.Bottom]:{x:0,y:1}},KI=({source:e,sourcePosition:t=$.Bottom,target:n})=>t===$.Left||t===$.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},qI=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2);function JI({source:e,sourcePosition:t=$.Bottom,target:n,targetPosition:r=$.Top,center:i,offset:a,stepPosition:o}){let s=GI[t],c=GI[r],l={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+c.x*a,y:n.y+c.y*a},d=KI({source:l,sourcePosition:t,target:u}),f=d.x===0?`y`:`x`,p=d[f],m=[],h,g,_={x:0,y:0},v={x:0,y:0},[,,y,b]=RI({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*c[f]===-1){f===`x`?(h=i.x??l.x+(u.x-l.x)*o,g=i.y??(l.y+u.y)/2):(h=i.x??(l.x+u.x)/2,g=i.y??l.y+(u.y-l.y)*o);let e=[{x:h,y:l.y},{x:h,y:u.y}],t=[{x:l.x,y:g},{x:u.x,y:g}];m=s[f]===p?f===`x`?e:t:f===`x`?t:e}else{let i=[{x:l.x,y:u.y}],o=[{x:u.x,y:l.y}];if(m=f===`x`?s.x===p?o:i:s.y===p?i:o,t===r){let t=Math.abs(e[f]-n[f]);if(t<=a){let r=Math.min(a-1,a-t);s[f]===p?_[f]=(l[f]>e[f]?-1:1)*r:v[f]=(u[f]>n[f]?-1:1)*r}}if(t!==r){let e=f===`x`?`y`:`x`,t=s[f]===c[e],n=l[e]>u[e],r=l[e]<u[e];(s[f]===1&&(!t&&n||t&&r)||s[f]!==1&&(!t&&r||t&&n))&&(m=f===`x`?i:o)}let d={x:l.x+_.x,y:l.y+_.y},y={x:u.x+v.x,y:u.y+v.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(y.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(y.y-m[0].y))?(h=(d.x+y.x)/2,g=m[0].y):(h=m[0].x,g=(d.y+y.y)/2)}let x={x:l.x+_.x,y:l.y+_.y},S={x:u.x+v.x,y:u.y+v.y};return[[e,...x.x!==m[0].x||x.y!==m[0].y?[x]:[],...m,...S.x!==m[m.length-1].x||S.y!==m[m.length-1].y?[S]:[],n],h,g,y,b]}function YI(e,t,n,r){let i=Math.min(qI(e,t)/2,qI(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1;return`L ${a},${o+i*(e.y<n.y?-1:1)}Q ${a},${o} ${a+i*s},${o}`}function XI({sourceX:e,sourceY:t,sourcePosition:n=$.Bottom,targetX:r,targetY:i,targetPosition:a=$.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){let[d,f,p,m,h]=JI({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:u}),g=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)g+=YI(d[e-1],d[e],d[e+1],o);return g+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[g,f,p,m,h]}function ZI(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function QI(e){let{sourceNode:t,targetNode:n}=e;if(!ZI(t)||!ZI(n))return null;let r=t.internals.handleBounds||$I(t.handles),i=n.internals.handleBounds||$I(n.handles),a=tL(r?.source??[],e.sourceHandle),o=tL(e.connectionMode===kF.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.(`008`,TF.error008(a?`target`:`source`,{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||$.Bottom,c=o?.position||$.Top,l=eL(t,a,s),u=eL(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function $I(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type===`source`?t.push(r):r.type===`target`&&n.push(r);return{source:t,target:n}}function eL(e,t,n=$.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??yI(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case $.Top:return{x:i+o/2,y:a};case $.Right:return{x:i+o,y:a+s/2};case $.Bottom:return{x:i+o/2,y:a+s};case $.Left:return{x:i,y:a+s/2}}}function tL(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function nL(e,t){return e?typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`:``}function rL(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&typeof r==`object`){let i=nL(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}var iL=1e3,aL=10,oL={nodeOrigin:[0,0],nodeExtent:EF,elevateNodesOnSelect:!0,zIndexMode:`basic`,defaults:{}},sL={...oL,checkEquality:!0};function cL(e,t){let n={...e};for(let e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function lL(e,t,n){let r=cL(oL,n);for(let n of e.values())if(n.parentId)mL(n,e,t,r);else{let e=YF(zF(n,r.nodeOrigin),vI(n.extent)?n.extent:r.nodeExtent,yI(n));n.internals.positionAbsolute=e}}function uL(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};t.type===`source`?n.push(i):t.type===`target`&&r.push(i)}return{source:n,target:r}}function dL(e){return e===`manual`}function fL(e,t,n,r={}){let i=cL(sL,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!dL(i.zIndexMode)?iL:0,c=e.length>0,l=!1;t.clear(),n.clear();for(let u of e){let e=o.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let n=YF(zF(u,i.nodeOrigin),vI(u.extent)?u.extent:i.nodeExtent,yI(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:uL(u,e),z:hL(u,s,i.zIndexMode),userNode:u}},t.set(u.id,e)}e.measured!==void 0&&e.measured.width!==void 0&&e.measured.height!==void 0||e.hidden||(c=!1),u.parentId&&mL(e,t,n,r,a),l||=u.selected??!1}return{nodesInitialized:c,hasSelectedNodes:l}}function pL(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function mL(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=cL(oL,r),l=e.parentId,u=t.get(l);if(!u){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}pL(e,n),i&&!u.parentId&&u.internals.rootParentIndex===void 0&&c===`auto`&&(u.internals.rootParentIndex=++i.i,u.internals.z=u.internals.z+i.i*aL),i&&u.internals.rootParentIndex!==void 0&&(i.i=u.internals.rootParentIndex);let{x:d,y:f,z:p}=gL(e,u,o,s,a&&!dL(c)?iL:0,c),{positionAbsolute:m}=e.internals,h=d!==m.x||f!==m.y;(h||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:d,y:f}:m,z:p}})}function hL(e,t,n){let r=cI(e.zIndex)?e.zIndex:0;return dL(n)?r:r+(e.selected?t:0)}function gL(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,c=yI(e),l=zF(e,n),u=vI(e.extent)?YF(l,e.extent,c):l,d=YF({x:o+u.x,y:s+u.y},r,c);e.extent===`parent`&&(d=XF(d,c,t));let f=hL(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function _L(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=iI(a.get(n.parentId)?.expandedRect??nI(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,c=yI(a),l=a.origin??r,u=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,f=Math.max(c.width,Math.round(t.width)),p=Math.max(c.height,Math.round(t.height)),m=(f-c.width)*l[0],h=(p-c.height)*l[1];(u>0||d>0||m||h)&&(i.push({id:o,type:`position`,position:{x:a.position.x-u+m,y:a.position.y-d+h}}),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:`position`,position:{x:t.position.x+u,y:t.position.y+d}})})),(c.width<t.width||c.height<t.height||u||d)&&i.push({id:o,type:`dimensions`,setAttributes:!0,dimensions:{width:f+(u?l[0]*u-m:0),height:p+(d?l[1]*d-h:0)}})}),i}function vL(e,t,n,r,i,a,o){let s=r?.querySelector(`.xyflow__viewport`),c=!1;if(!s)return{changes:[],updatedInternals:c};let l=[],u=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(let r of e.values()){let e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),c=!0;continue}let s=DI(r.nodeElement),u=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(u||!e.internals.handleBounds||r.force)){let p=r.nodeElement.getBoundingClientRect(),m=vI(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;if(e.parentId&&e.extent===`parent`){let n=t.get(e.parentId);n&&(h=XF(h,s,n))}else m&&(h=YF(h,m,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:NI(`source`,r.nodeElement,p,d,e.id),target:NI(`target`,r.nodeElement,p,d,e.id)}}};t.set(e.id,g),e.parentId&&mL(g,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,u&&(l.push({id:e.id,type:`dimensions`,dimensions:s}),e.expandParent&&e.parentId&&f.push({id:e.id,parentId:e.parentId,rect:nI(g,i)}))}}if(f.length>0){let e=_L(f,t,n,i);l.push(...e)}return{changes:l,updatedInternals:c}}async function yL({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return!1;let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r);return!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2])}function bL(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function xL(e,t,n){e.clear(),t.clear();for(let r of n){let{source:n,target:i,sourceHandle:a=null,targetHandle:o=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:a,targetHandle:o},c=`${n}-${a}--${i}-${o}`;bL(`source`,s,`${i}-${o}--${n}-${a}`,e,n,a),bL(`target`,s,c,e,i,o),t.set(r.id,r)}}function SL(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:SL(n,t):!1}function CL(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function wL(e,t,n,r){let i=new Map;for(let[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!SL(o,e))&&(o.draggable||t&&o.draggable===void 0)){let t=e.get(a);t&&i.set(a,{id:a,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return i}function TL({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function EL({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=uI(a,t);return{x:o.x-a.x,y:o.y-a.y}}function DL({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,l={x:0,y:0},u=null,d=!1,f=null,p=!1,h=!1,g=null;function _({noDragClassName:_,handleSelector:v,domNode:y,isSelectable:b,nodeId:x,nodeClickDistance:S=0}){f=m(y);function C({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:c,snapToGrid:l,nodeOrigin:u,onNodeDrag:d,onSelectionDrag:f,onError:p,updateNodePositions:m}=t();a={x:e,y:n};let _=!1,v=s.size>1,y=v&&o?eI(VF(s)):null,b=v&&l?EL({dragItems:s,snapGrid:c,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};l&&(a=b?{x:Math.round(a.x+b.x),y:Math.round(a.y+b.y)}:uI(a,c));let s=null;if(v&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0],i=e.y-y.y+o[0][1],a=e.y+r.measured.height-y.y2+o[1][1];s=[[t,i],[n,a]]}let{position:d,positionAbsolute:f}=KF({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:u,onError:p});_=_||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=f}if(h||=_,_&&(m(s,!0),g&&(r||d||!x&&f))){let[e,t]=TL({nodeId:x,dragItems:s,nodeLookup:i});r?.(g,s,e,t),d?.(g,e,t),x||f?.(g,t)}}async function w(){if(!u)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){c=!1,cancelAnimationFrame(o);return}let[s,d]=QF(l,u,r);(s!==0||d!==0)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-d/e[2],await n({x:s,y:d})&&C(a)),o=requestAnimationFrame(w)}function T(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:c,transform:l,snapGrid:f,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:_}=t();d=!0,m&&b||o||!x||i.get(x)?.selected||_(),b&&m&&x&&e?.(x);let v=EI(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:p,containerBounds:u});if(a=v,s=wL(i,c,v,x),s.size>0&&(n||h||!x&&g)){let[e,t]=TL({nodeId:x,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),x||g?.(r.sourceEvent,t)}}let E=wF().clickDistance(S).on(`start`,e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();u=n?.getBoundingClientRect()||null,p=!1,h=!1,g=e.sourceEvent,r===0&&T(e),a=EI(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:u}),l=MI(e.sourceEvent,u)}).on(`drag`,e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:f,nodeLookup:m}=t(),h=EI(e.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:u});if(g=e.sourceEvent,(e.sourceEvent.type===`touchmove`&&e.sourceEvent.touches.length>1||x&&!m.has(x))&&(p=!0),!p){if(!c&&n&&d&&(c=!0,w()),!d){let t=MI(e.sourceEvent,u),n=t.x-l.x,r=t.y-l.y;Math.sqrt(n*n+r*r)>f&&T(e)}(a.x!==h.xSnapped||a.y!==h.ySnapped)&&s&&d&&(l=MI(e.sourceEvent,u),C(h))}}).on(`end`,e=>{if(!d||p)p&&s.size>0&&t().updateNodePositions(s,!1);else if(c=!1,d=!1,cancelAnimationFrame(o),s.size>0){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(h&&=(r(s,!1),!1),i||a||!x&&o){let[t,r]=TL({nodeId:x,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),x||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!_||!CL(t,`.${_}`,y))&&(!v||CL(t,v,y))});f.call(E)}function v(){f?.on(`.drag`,null)}return{update:_,destroy:v}}function OL(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())oI(i,nI(e))>0&&r.push(e);return r}var kL=250;function AL(e,t,n,r){let i=[],a=1/0,o=OL(e,n,t+kL);for(let n of o){let o=[...n.internals.handleBounds?.source??[],...n.internals.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=eL(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function jL(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===`strict`?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...eL(o,c,c.position,!0)}:c}function ML(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function NL(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var PL=()=>!0;function FL(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:_=PL,onReconnectEnd:v,updateConnection:y,getTransform:b,getFromHandle:x,autoPanSpeed:S,dragThreshold:C=1,handleDomNode:w}){let T=OI(e.target),E=0,D,{x:O,y:k}=MI(e),A=ML(a,w),j=s?.getBoundingClientRect(),M=!1;if(!j||!A)return;let N=jL(i,A,r,c,t);if(!N)return;let P=MI(e,j),F=!1,I=null,L=!1,R=null;function z(){if(!u||!j)return;let[e,t]=QF(P,j,S);f({x:e,y:t}),E=requestAnimationFrame(z)}let B={...N,nodeId:i,type:A,position:N.position},ee=c.get(i),te={inProgress:!0,isValid:null,from:eL(ee,B,$.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:ee,to:P,toHandle:null,toPosition:FF[B.position],toNode:null,pointer:P};function ne(){M=!0,y(te),m?.(e,{nodeId:i,handleId:r,handleType:A})}C===0&&ne();function V(e){if(!M){let{x:t,y:n}=MI(e),r=t-O,i=n-k;if(!(r*r+i*i>C*C))return;ne()}if(!x()||!B){re(e);return}let a=b();P=MI(e,j),D=AL(dI(P,a,!1,[1,1]),n,c,B),F||=(z(),!0);let s=IL(e,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?`target`:`source`,isValidConnection:_,doc:T,lib:l,flowId:d,nodeLookup:c});R=s.handleDomNode,I=s.connection,L=NL(!!D,s.isValid);let u=c.get(i),f=u?eL(u,B,$.Left,!0):te.from,p={...te,from:f,isValid:L,to:s.toHandle&&L?fI({x:s.toHandle.x,y:s.toHandle.y},a):P,toHandle:s.toHandle,toPosition:L&&s.toHandle?s.toHandle.position:FF[B.position],toNode:s.toHandle?c.get(s.toHandle.nodeId):null,pointer:P};y(p),te=p}function re(e){if(!(`touches`in e&&e.touches.length>0)){if(M){(D||R)&&I&&L&&h?.(I);let{inProgress:t,...n}=te,r={...n,toPosition:te.toHandle?te.toPosition:null};g?.(e,r),a&&v?.(e,r)}p(),cancelAnimationFrame(E),F=!1,L=!1,I=null,R=null,T.removeEventListener(`mousemove`,V),T.removeEventListener(`mouseup`,re),T.removeEventListener(`touchmove`,V),T.removeEventListener(`touchend`,re)}}T.addEventListener(`mousemove`,V),T.addEventListener(`mouseup`,re),T.addEventListener(`touchmove`,V),T.addEventListener(`touchend`,re)}function IL(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=PL,nodeLookup:u}){let d=a===`target`,f=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=MI(e),h=o.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,_={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){let e=ML(void 0,g),t=g.getAttribute(`data-nodeid`),a=g.getAttribute(`data-handleid`),o=g.classList.contains(`connectable`),s=g.classList.contains(`connectableend`);if(!t||!e)return _;let c={source:d?t:r,sourceHandle:d?a:i,target:d?r:t,targetHandle:d?i:a};_.connection=c,_.isValid=o&&s&&(n===kF.Strict?d&&e===`source`||!d&&e===`target`:t!==r||a!==i)&&l(c),_.toHandle=jL(t,e,a,u,n,!0)}return _}var LL={onPointerDown:FL,isValid:IL};function RL({domNode:t,panZoom:n,getTransform:r,getViewScale:i}){let a=m(t);function o({translateExtent:e,width:t,height:o,zoomStep:s=1,pannable:c=!0,zoomable:l=!0,inversePan:u=!1}){let d=e=>{if(e.sourceEvent.type!==`wheel`||!n)return;let t=r(),i=e.sourceEvent.ctrlKey&&_I()?10:1,a=-e.sourceEvent.deltaY*(e.sourceEvent.deltaMode===1?.05:e.sourceEvent.deltaMode?1:.002)*s,o=t[2]*2**(a*i);n.scaleTo(o)},p=[0,0],m=f().on(`start`,e=>{(e.sourceEvent.type===`mousedown`||e.sourceEvent.type===`touchstart`)&&(p=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on(`zoom`,c?a=>{let s=r();if(a.sourceEvent.type!==`mousemove`&&a.sourceEvent.type!==`touchmove`||!n)return;let c=[a.sourceEvent.clientX??a.sourceEvent.touches[0].clientX,a.sourceEvent.clientY??a.sourceEvent.touches[0].clientY],l=[c[0]-p[0],c[1]-p[1]];p=c;let d=i()*Math.max(s[2],Math.log(s[2]))*(u?-1:1),f={x:s[0]-l[0]*d,y:s[1]-l[1]*d},m=[[0,0],[t,o]];n.setViewportConstrained({x:f.x,y:f.y,zoom:s[2]},m,e)}:null).on(`zoom.wheel`,l?d:null);a.call(m,{})}function s(){a.on(`zoom`,null)}return{update:o,destroy:s,pointer:e}}var zL=e=>({x:e.x,y:e.y,zoom:e.k}),BL=({x:e,y:t,zoom:n})=>u.translate(e,t).scale(n),VL=(e,t)=>e.target.closest(`.${t}`),HL=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),UL=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,WL=(e,t=0,n=UL,r=()=>{})=>{let i=typeof t==`number`&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on(`end`,r):e},GL=e=>{let t=e.ctrlKey&&_I()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function KL({zoomPanValues:t,noWheelClassName:n,d3Selection:r,d3Zoom:i,panOnScrollMode:a,panOnScrollSpeed:o,zoomOnPinch:s,onPanZoomStart:c,onPanZoom:l,onPanZoomEnd:u}){return d=>{if(VL(d,n))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();let f=r.property(`__zoom`).k||1;if(d.ctrlKey&&s){let t=e(d),n=f*2**GL(d);i.scaleTo(r,n,t,d);return}let p=d.deltaMode===1?20:1,m=a===AF.Vertical?0:d.deltaX*p,h=a===AF.Horizontal?0:d.deltaY*p;!_I()&&d.shiftKey&&a!==AF.Vertical&&(m=d.deltaY*p,h=0),i.translateBy(r,-(m/f)*o,-(h/f)*o,{internal:!0});let g=zL(r.property(`__zoom`));clearTimeout(t.panScrollTimeout),t.isPanScrolling?l?.(d,g):(t.isPanScrolling=!0,c?.(d,g)),t.panScrollTimeout=setTimeout(()=>{u?.(d,g),t.isPanScrolling=!1},150)}}function qL({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a=r.type===`wheel`,o=!t&&a&&!r.ctrlKey,s=VL(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function JL({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=zL(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type===`mousedown`&&t(!0),n&&n?.(r.sourceEvent,i)}}function YL({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&HL(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,zL(a.transform))}}function XL({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&HL(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=zL(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},n?150:0)}}}function ZL({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:i,panOnScroll:a,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:c,noPanClassName:l,lib:u,connectionInProgress:d}){return f=>{let p=t||n,m=r&&f.ctrlKey,h=f.type===`wheel`;if(f.button===1&&f.type===`mousedown`&&(VL(f,`${u}-flow__node`)||VL(f,`${u}-flow__edge`)||VL(f,`${u}-flow__selection`)||VL(f,`${u}-flow__nodesselection`)))return!0;if(!i&&!p&&!a&&!o&&!r||s||d&&!h||VL(f,c)&&h||VL(f,l)&&(!h||a&&h&&!t)||!r&&f.ctrlKey&&h)return!1;if(!r&&f.type===`touchstart`&&f.touches?.length>1)return f.preventDefault(),!1;if(!p&&!a&&!m&&h||!i&&(f.type===`mousedown`||f.type===`touchstart`)||Array.isArray(i)&&!i.includes(f.button)&&f.type===`mousedown`)return!1;let g=Array.isArray(i)&&i.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||h||e)&&g}}function QL({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:l}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=e.getBoundingClientRect(),h=[[0,0],[p.width,p.height]];(typeof ResizeObserver<`u`?new ResizeObserver(e=>{let t=e[0];t&&(h=[[0,0],[t.contentRect.width,t.contentRect.height]])}):null)?.observe(e);let g=f().extent(()=>h).scaleExtent([t,n]).translateExtent(r),_=m(e).call(g);w({x:i.x,y:i.y,zoom:JF(i.zoom,t,n)},[[0,0],[p.width,p.height]],r);let y=_.on(`wheel.zoom`),b=_.on(`dblclick.zoom`);g.wheelDelta(GL);async function x(e,t){return _?new Promise(n=>{g?.interpolate(t?.interpolate===`linear`?v:c).transform(WL(_,t?.duration,t?.ease,()=>n(!0)),e)}):!1}function S({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:c,panOnScrollMode:d,panOnScrollSpeed:f,preventScrolling:p,zoomOnPinch:m,zoomOnScroll:h,zoomOnDoubleClick:v,panActivationKeyPressed:x=!1,zoomActivationKeyPressed:S,lib:w,onTransformChange:T,connectionInProgress:E,paneClickDistance:D,selectionOnDrag:O}){r&&!u.isZoomingOrPanning&&C();let k=i&&!S&&!r;g.clickDistance(O?1/0:!cI(D)||D<0?0:D);let A=k?KL({zoomPanValues:u,noWheelClassName:e,d3Selection:_,d3Zoom:g,panOnScrollMode:d,panOnScrollSpeed:f,zoomOnPinch:m,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):qL({noWheelClassName:e,preventScrolling:p,d3ZoomHandler:y});_.on(`wheel.zoom`,A,{passive:!1});let j=JL({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:o});g.on(`start`,j);let M=YL({zoomPanValues:u,panOnDrag:c,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:T});g.on(`zoom`,M);let N=XL({zoomPanValues:u,panOnDrag:c,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:l});g.on(`end`,N);let P=ZL({panActivationKeyPressed:x,zoomActivationKeyPressed:S,panOnDrag:c,zoomOnScroll:h,panOnScroll:i,zoomOnDoubleClick:v,zoomOnPinch:m,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:w,connectionInProgress:E});g.filter(P),v?_.on(`dblclick.zoom`,b):_.on(`dblclick.zoom`,null)}function C(){g.on(`zoom`,null)}async function w(e,t,n){let r=BL(e),i=g?.constrain()(r,t,n);return i&&await x(i),i}async function T(e,t){let n=BL(e);return await x(n,t),n}function E(e){if(_){let t=BL(e),n=_.property(`__zoom`);(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&g?.transform(_,t,null,{sync:!0})}}function D(){let e=_?d(_.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}}async function O(e,t){return _?new Promise(n=>{g?.interpolate(t?.interpolate===`linear`?v:c).scaleTo(WL(_,t?.duration,t?.ease,()=>n(!0)),e)}):!1}async function k(e,t){return _?new Promise(n=>{g?.interpolate(t?.interpolate===`linear`?v:c).scaleBy(WL(_,t?.duration,t?.ease,()=>n(!0)),e)}):!1}function A(e){g?.scaleExtent(e)}function j(e){g?.translateExtent(e)}function M(e){let t=!cI(e)||e<0?0:e;g?.clickDistance(t)}return{update:S,destroy:C,setViewport:T,setViewportConstrained:w,getViewport:D,scaleTo:O,scaleBy:k,setScaleExtent:A,setTranslateExtent:j,syncViewport:E,setClickDistance:M}}var $L;(function(e){e.Line=`line`,e.Handle=`handle`})($L||={});function eR({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){let o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]*=-1),s&&a&&(c[1]*=-1),c}function tR(e){return{isHorizontal:e.includes(`right`)||e.includes(`left`),isVertical:e.includes(`bottom`)||e.includes(`top`),affectsX:e.includes(`left`),affectsY:e.includes(`top`)}}function nR(e,t){return Math.max(0,t-e)}function rR(e,t){return Math.max(0,e-t)}function iR(e,t,n){return Math.max(0,t-e,e-n)}function aR(e,t){return e?!t:t}function oR(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:l}=t,{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:_,maxHeight:v}=r,{x:y,y:b,width:x,height:S,aspectRatio:C}=e,w=Math.floor(u?p-e.pointerX:0),T=Math.floor(d?m-e.pointerY:0),E=x+(c?-w:w),D=S+(l?-T:T),O=-a[0]*x,k=-a[1]*S,A=iR(E,h,g),j=iR(D,_,v);if(o){let e=0,t=0;c&&w<0?e=nR(y+w+O,o[0][0]):!c&&w>0&&(e=rR(y+E+O,o[1][0])),l&&T<0?t=nR(b+T+k,o[0][1]):!l&&T>0&&(t=rR(b+D+k,o[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(s){let e=0,t=0;c&&w>0?e=rR(y+w,s[0][0]):!c&&w<0&&(e=nR(y+E,s[1][0])),l&&T>0?t=rR(b+T,s[0][1]):!l&&T<0&&(t=nR(b+D,s[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(i){if(u){let e=iR(E/C,_,v)*C;if(A=Math.max(A,e),o){let e=0;e=!c&&!l||c&&!l&&f?rR(b+k+E/C,o[1][1])*C:nR(b+k+(c?w:-w)/C,o[0][1])*C,A=Math.max(A,e)}if(s){let e=0;e=!c&&!l||c&&!l&&f?nR(b+E/C,s[1][1])*C:rR(b+(c?w:-w)/C,s[0][1])*C,A=Math.max(A,e)}}if(d){let e=iR(D*C,h,g)/C;if(j=Math.max(j,e),o){let e=0;e=!c&&!l||l&&!c&&f?rR(y+D*C+O,o[1][0])/C:nR(y+(l?T:-T)*C+O,o[0][0])/C,j=Math.max(j,e)}if(s){let e=0;e=!c&&!l||l&&!c&&f?nR(y+D*C,s[1][0])/C:rR(y+(l?T:-T)*C,s[0][0])/C,j=Math.max(j,e)}}}T+=T<0?j:-j,w+=w<0?A:-A,i&&(f?E>D*C?T=(aR(c,l)?-w:w)/C:w=(aR(c,l)?-T:T)*C:u?(T=w/C,l=c):(w=T*C,c=l));let M=c?y+w:y,N=l?b+T:b;return{width:x+(c?-w:w),height:S+(l?-T:T),x:a[0]*w*(c?-1:1)+M,y:a[1]*T*(l?-1:1)+N}}var sR={width:0,height:0,x:0,y:0},cR={...sR,pointerX:0,pointerY:0,aspectRatio:1};function lR(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,s=n[0]*a,c=n[1]*o;return[[r-s,i-c],[r+a-s,i+o-c]]}function uR({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=m(e),o={controlDirection:tR(`bottom-right`),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:e,boundaries:s,keepAspectRatio:c,resizeDirection:l,onResizeStart:u,onResize:d,onResizeEnd:f,shouldResize:p}){let m={...sR},h={...cR};o={boundaries:s,resizeDirection:l,keepAspectRatio:c,controlDirection:tR(e)};let g,_=null,v=[],y,b,x,S=wF().on(`start`,e=>{let{nodeLookup:r,transform:i,snapGrid:a,snapToGrid:o,nodeOrigin:s,paneDomNode:c}=n();if(g=r.get(t),!g)return;_=c?.getBoundingClientRect()??null;let{xSnapped:l,ySnapped:d}=EI(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:o,containerBounds:_});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},h={...m,pointerX:l,pointerY:d,aspectRatio:m.width/m.height},y=void 0,b=vI(g.extent)?g.extent:void 0,g.parentId&&(g.extent===`parent`||g.expandParent)&&(y=r.get(g.parentId)),y&&g.extent===`parent`&&(b=[[0,0],[y.measured.width,y.measured.height]]),v=[],x=void 0;for(let[e,n]of r)if(n.parentId===t&&(v.push({id:e,position:{...n.position},extent:n.extent}),n.extent===`parent`||n.expandParent)){let e=lR(n,g,n.origin??s);x=x?[[Math.min(e[0][0],x[0][0]),Math.min(e[0][1],x[0][1])],[Math.max(e[1][0],x[1][0]),Math.max(e[1][1],x[1][1])]]:e}u?.(e,{...m})}).on(`drag`,e=>{let{transform:t,snapGrid:i,snapToGrid:a,nodeOrigin:s}=n(),c=EI(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:_}),l=[];if(!g)return;let{x:u,y:f,width:S,height:C}=m,w={},T=g.origin??s,{width:E,height:D,x:O,y:k}=oR(h,o.controlDirection,c,o.boundaries,o.keepAspectRatio,T,b,x),A=E!==S,j=D!==C,M=O!==u&&A,N=k!==f&&j;if(!M&&!N&&!A&&!j)return;let P={prevValues:{...m},startX:h.x,startY:h.y,childNodes:v.map(e=>({...e,position:{...e.position}}))};if((M||N||T[0]===1||T[1]===1)&&(w.x=M?O:m.x,w.y=N?k:m.y,m.x=w.x,m.y=w.y,v.length>0)){let e=O-u,t=k-f;for(let n of v)n.position={x:n.position.x-e+T[0]*(E-S),y:n.position.y-t+T[1]*(D-C)},l.push(n)}if((A||j)&&(w.width=A&&(!o.resizeDirection||o.resizeDirection===`horizontal`)?E:m.width,w.height=j&&(!o.resizeDirection||o.resizeDirection===`vertical`)?D:m.height,m.width=w.width,m.height=w.height),y&&g.expandParent){let e=T[0]*(w.width??0);w.x&&w.x<e&&(m.x=e,h.x-=w.x-e);let t=T[1]*(w.height??0);w.y&&w.y<t&&(m.y=t,h.y-=w.y-t)}let F=eR({width:m.width,prevWidth:S,height:m.height,prevHeight:C,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),I={...m,direction:F};p?.(e,I)===!1?(m=P.prevValues,h.x=P.startX,h.y=P.startY,v.forEach((e,t)=>{e.position=P.childNodes[t].position})):(d?.(e,I),r(w,l))}).on(`end`,e=>{f?.(e,{...m}),i?.({...m})});a.call(S)}function c(){a.on(`.drag`,null)}return{update:s,destroy:c}}var dR=n((e=>{var t=b();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),fR=n(((e,t)=>{t.exports=dR()})),pR=n((e=>{var t=b(),n=fR();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),mR=l(n(((e,t)=>{t.exports=pR()}))(),1),hR=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},gR=e=>e?hR(e):hR,{useDebugValue:_R}=C.default,{useSyncExternalStoreWithSelector:vR}=mR.default,yR=e=>e;function bR(e,t=yR,n){let r=vR(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return _R(r),r}var xR=(e,t)=>{let n=gR(e),r=(e,r=t)=>bR(n,e,r);return Object.assign(r,n),r},SR=(e,t)=>e?xR(e,t):xR;function CR(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var wR=(0,C.createContext)(null),TR=wR.Provider,ER=TF.error001(`react`);function DR(e,t){let n=(0,C.useContext)(wR);if(n===null)throw Error(ER);return bR(n,e,t)}function OR(){let e=(0,C.useContext)(wR);if(e===null)throw Error(ER);return(0,C.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var kR={display:`none`},AR={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},jR=`react-flow__node-desc`,MR=`react-flow__edge-desc`,NR=`react-flow__aria-live`,PR=e=>e.ariaLiveMessage,FR=e=>e.ariaLabelConfig;function IR({rfId:e}){let t=DR(PR);return(0,G.jsx)(`div`,{id:`${NR}-${e}`,"aria-live":`assertive`,"aria-atomic":`true`,style:AR,children:t})}function LR({rfId:e,disableKeyboardA11y:t}){let n=DR(FR);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{id:`${jR}-${e}`,style:kR,children:t?n[`node.a11yDescription.default`]:n[`node.a11yDescription.keyboardDisabled`]}),(0,G.jsx)(`div`,{id:`${MR}-${e}`,style:kR,children:n[`edge.a11yDescription.default`]}),!t&&(0,G.jsx)(IR,{rfId:e})]})}var RR=(0,C.forwardRef)(({position:e=`top-left`,children:t,className:n,style:r,...i},a)=>{let o=`${e}`.split(`-`);return(0,G.jsx)(`div`,{className:_F([`react-flow__panel`,n,...o]),style:r,ref:a,...i,children:t})});RR.displayName=`Panel`;var zR=`https://reactflow.dev?utm_source=attribution`;function BR({proOptions:e,position:t=`bottom-right`}){return(0,C.useEffect)(()=>{},[]),e?.hideAttribution?null:(0,G.jsx)(RR,{position:t,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${zR}`,children:(0,G.jsx)(`a`,{href:zR,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`,children:`React Flow`})})}var VR=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},HR=e=>e.id;function UR(e,t){return CR(e.selectedNodes.map(HR),t.selectedNodes.map(HR))&&CR(e.selectedEdges.map(HR),t.selectedEdges.map(HR))}function WR({onSelectionChange:e}){let t=OR(),{selectedNodes:n,selectedEdges:r}=DR(VR,UR);return(0,C.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}var GR=e=>!!e.onSelectionChangeHandlers;function KR({onSelectionChange:e}){let t=DR(GR);return e||t?(0,G.jsx)(WR,{onSelectionChange:e}):null}var qR=[0,0],JR={x:0,y:0,zoom:1},YR=[...`nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode`.split(`.`),`rfId`],XR=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),ZR={translateExtent:EF,nodeOrigin:qR,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:`nopan`,rfId:`1`};function QR(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:s,setDefaultNodesAndEdges:c}=DR(XR,CR),l=OR();(0,C.useEffect)(()=>(c(e.defaultNodes,e.defaultEdges),()=>{u.current=ZR,s()}),[]);let u=(0,C.useRef)(ZR);return(0,C.useEffect)(()=>{for(let s of YR){let c=e[s];c!==u.current[s]&&e[s]!==void 0&&(s===`nodes`?t(c):s===`edges`?n(c):s===`minZoom`?r(c):s===`maxZoom`?i(c):s===`translateExtent`?a(c):s===`nodeExtent`?o(c):s===`ariaLabelConfig`?l.setState({ariaLabelConfig:wI(c)}):s===`fitView`?l.setState({fitViewQueued:c}):s===`fitViewOptions`?l.setState({fitViewOptions:c}):l.setState({[s]:c}))}u.current=e},YR.map(t=>e[t])),null}function $R(){return typeof window>`u`||!window.matchMedia?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function ez(e){let[t,n]=(0,C.useState)(e===`system`?null:e);return(0,C.useEffect)(()=>{if(e!==`system`){n(e);return}let t=$R(),r=()=>n(t?.matches?`dark`:`light`);return r(),t?.addEventListener(`change`,r),()=>{t?.removeEventListener(`change`,r)}},[e]),t===null?$R()?.matches?`dark`:`light`:t}var tz=typeof document<`u`?document:null;function nz(e=null,t={target:tz,actInsideInputWithModifier:!0}){let[n,r]=(0,C.useState)(!1),i=(0,C.useRef)(!1),a=(0,C.useRef)(new Set([])),[o,s]=(0,C.useMemo)(()=>{if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.replace(/\+/g,`
|
|
273
|
-
`).replace(`
|
|
274
|
-
|
|
275
|
-
`,`
|
|
276
|
-
+`).split(`
|
|
277
|
-
`));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,C.useEffect)(()=>{let n=t?.target??tz,c=t?.actInsideInputWithModifier??!0;if(e!==null){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!c)&&AI(e))return!1;let n=iz(e.code,s);if(a.current.add(e[n]),rz(o,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName===`BUTTON`||n?.nodeName===`A`;t.preventDefault!==!1&&(i.current||!a)&&e.preventDefault(),r(!0)}},l=e=>{let t=iz(e.code,s);rz(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),e.key===`Meta`&&a.current.clear(),i.current=!1},u=()=>{a.current.clear(),r(!1)};return n?.addEventListener(`keydown`,e),n?.addEventListener(`keyup`,l),window.addEventListener(`blur`,u),window.addEventListener(`contextmenu`,u),()=>{n?.removeEventListener(`keydown`,e),n?.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,u),window.removeEventListener(`contextmenu`,u)}}},[e,r]),n}function rz(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function iz(e,t){return t.includes(e)?`code`:`key`}var az=()=>{let e=OR();return(0,C.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),!0):!1},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=gI(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:c}=o.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},u=n.snapGrid??i;return dI(l,r,n.snapToGrid??a,u)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=fI(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function oz(e,t){let n=[],r=new Map,i=[];for(let t of e)if(t.type===`add`){i.push(t);continue}else if(t.type===`remove`||t.type===`replace`)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if(t[0].type===`remove`)continue;if(t[0].type===`replace`){n.push({...t[0].item});continue}let i={...e};for(let e of t)sz(e,i);n.push(i)}return i.length&&i.forEach(e=>{e.index===void 0?n.push({...e.item}):n.splice(e.index,0,{...e.item})}),n}function sz(e,t){switch(e.type){case`select`:t.selected=e.selected;break;case`position`:e.position!==void 0&&(t.position=e.position),e.dragging!==void 0&&(t.dragging=e.dragging);break;case`dimensions`:e.dimensions!==void 0&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes===`width`)&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes===`height`)&&(t.height=e.dimensions.height))),typeof e.resizing==`boolean`&&(t.resizing=e.resizing)}}function cz(e,t){return oz(e,t)}function lz(e,t){return oz(e,t)}function uz(e,t){return{id:e,type:`select`,selected:t}}function dz(e,t=new Set,n=!1){let r=[];for(let[i,a]of e){let e=t.has(i);(a.selected!==void 0||e)&&a.selected!==e&&(n&&(a.selected=e),r.push(uz(a.id,e)))}return r}function fz({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:`replace`}),a===void 0&&n.push({item:i,type:`add`,index:r})}for(let[e]of t)r.get(e)===void 0&&n.push({id:e,type:`remove`});return n}function pz(e){return{id:e.id,type:`remove`}}var mz=lI(`React Flow`,`https://reactflow.dev/`);function hz(e,t,n={}){return UI(e,t,{...n,onError:n.onError??mz})}var gz=e=>LF(e),_z=e=>IF(e);function vz(e){return(0,C.forwardRef)(e)}var yz=typeof window<`u`?C.useLayoutEffect:C.useEffect;function bz(e){let[t,n]=(0,C.useState)(BigInt(0)),[r]=(0,C.useState)(()=>xz(()=>n(e=>e+BigInt(1))));return yz(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}function xz(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var Sz=(0,C.createContext)(null);function Cz({children:e}){let t=OR(),n=bz((0,C.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:c}=t.getState(),l=n;for(let t of e)l=typeof t==`function`?t(l):t;let u=fz({items:l,lookup:o});for(let e of c.values())u=e(u);i&&r(l),u.length>0?a?.(u):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=bz((0,C.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s=typeof t==`function`?t(s):t;i?r(s):a&&a(fz({items:s,lookup:o}))},[])),i=(0,C.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,G.jsx)(Sz.Provider,{value:i,children:e})}function wz(){let e=(0,C.useContext)(Sz);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var Tz=e=>!!e.panZoom;function Ez(){let e=az(),t=OR(),n=wz(),r=DR(Tz),i=(0,C.useMemo)(()=>{let e=e=>t.getState().nodeLookup.get(e),r=e=>{n.nodeQueue.push(e)},i=e=>{n.edgeQueue.push(e)},a=e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState(),i=gz(e)?e:n.get(e.id),a=i.parentId?xI(i.position,i.measured,i.parentId,n,r):i.position;return nI({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height})},o=(e,t,n={replace:!1})=>{r(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&gz(e)?e:{...r,...e}}return r}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&_z(e)?e:{...r,...e}}return r}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:r,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:n=[],transform:r}=t.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:c,onDelete:l,onBeforeDelete:u}=t.getState(),{nodes:d,edges:f}=await qF({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:i,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){let e=f.map(pz);o?.(f),c(e)}if(m){let e=d.map(pz);a?.(d),s(e)}return(m||p)&&l?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{let i=sI(e),o=i?e:a(e),s=r!==void 0;return o?(r||t.getState().nodes).filter(r=>{let a=t.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let c=nI(s?r:a),l=oI(c,o);return n&&l>0||l>=c.width*c.height||l>=o.width*o.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=sI(e)?e:a(e);if(!r)return!1;let i=oI(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState();return BF(e,{nodeLookup:n,nodeOrigin:r})},getHandleConnections:({type:e,id:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}-${e}${n?`-${n}`:``}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}${e?n?`-${e}-${n}`:`-${e}`:``}`)?.values()??[]),fitView:async e=>{let r=t.getState().fitViewResolver??CI();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,C.useMemo)(()=>({...i,...e,viewportInitialized:r}),[r])}var Dz=e=>e.selected,Oz=typeof window<`u`?window:void 0;function kz({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=OR(),{deleteElements:r}=Ez(),i=nz(e,{actInsideInputWithModifier:!1}),a=nz(t,{target:Oz});(0,C.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(Dz),edges:e.filter(Dz)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,C.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function Az(e){let t=OR();(0,C.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let n=DI(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,TF.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener(`resize`,n);let t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener(`resize`,n),t&&e.current&&t.unobserve(e.current)}}},[])}var jz={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},Mz=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Nz({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panActivationKeyPressed:i,panOnScrollSpeed:a=.5,panOnScrollMode:o=AF.Free,zoomOnDoubleClick:s=!0,panOnDrag:c=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:h,noWheelClassName:g,noPanClassName:_,onViewportChange:v,isControlledViewport:y,paneClickDistance:b,selectionOnDrag:x}){let S=OR(),w=(0,C.useRef)(null),{userSelectionActive:T,lib:E,connectionInProgress:D}=DR(Mz,CR),O=nz(p),k=(0,C.useRef)();Az(w);let A=(0,C.useCallback)(e=>{v?.({x:e[0],y:e[1],zoom:e[2]}),y||S.setState({transform:e})},[v,y]);return(0,C.useEffect)(()=>{if(w.current){k.current=QL({domNode:w.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:l,onDraggingChange:e=>S.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=S.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=S.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=S.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=k.current.getViewport();return S.setState({panZoom:k.current,transform:[e,t,n],domNode:w.current.closest(`.react-flow`)}),()=>{k.current?.destroy()}}},[]),(0,C.useEffect)(()=>{k.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panActivationKeyPressed:i,panOnScrollSpeed:a,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:c,zoomActivationKeyPressed:O,preventScrolling:m,noPanClassName:_,userSelectionActive:T,noWheelClassName:g,lib:E,onTransformChange:A,connectionInProgress:D,selectionOnDrag:x,paneClickDistance:b})},[e,t,n,r,i,a,o,s,c,O,m,_,T,g,E,A,D,x,b]),(0,G.jsx)(`div`,{className:`react-flow__renderer`,ref:w,style:jz,children:h})}var Pz=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Fz(){let{userSelectionActive:e,userSelectionRect:t}=DR(Pz,CR);return e&&t?(0,G.jsx)(`div`,{className:`react-flow__selection react-flow__container`,style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Iz=(e,t)=>n=>{n.target===t.current&&e?.(n)},Lz=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Rz({isSelecting:e,selectionKeyPressed:t,selectionMode:n=jF.Full,panOnDrag:r,autoPanOnSelection:i,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:s,onSelectionEnd:c,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){let g=(0,C.useRef)(0),_=OR(),{userSelectionActive:v,elementsSelectable:y,dragging:b,panBy:x,autoPanSpeed:S}=DR(Lz,CR),w=y&&(e||v),T=(0,C.useRef)(null),E=(0,C.useRef)(),D=(0,C.useRef)(new Set),O=(0,C.useRef)(new Set),k=(0,C.useRef)(!1),A=(0,C.useRef)(!1),j=(0,C.useRef)({x:0,y:0}),M=(0,C.useRef)(!1),N=e=>{A.current||k.current||_.getState().connection.inProgress?(A.current=!1,k.current=!1):(l?.(e),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1}))},P=e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():u?.(e)},F=d?e=>d(e):void 0,I=e=>{A.current&&=(e.stopPropagation(),!1)},L=n=>{if(n.pointerType===`touch`&&r!==!1&&!t)return;let{domNode:i,transform:a}=_.getState();if(E.current=i?.getBoundingClientRect(),!E.current)return;let s=n.target===T.current;if(!s&&n.target.closest(`.nokey`)||!e||!(o&&s||t)||n.button!==0||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),A.current=!1;let{x:c,y:l}=MI(n.nativeEvent,E.current),u=dI({x:c,y:l},a);_.setState({userSelectionRect:{width:0,height:0,startX:u.x,startY:u.y,x:c,y:l}}),s||(n.stopPropagation(),n.preventDefault())};function R(e,t){let{userSelectionRect:r}=_.getState();if(!r)return;let{transform:i,nodeLookup:a,edgeLookup:o,connectionLookup:s,triggerNodeChanges:c,triggerEdgeChanges:l,defaultEdgeOptions:u}=_.getState(),d={x:r.startX,y:r.startY},{x:f,y:p}=fI(d,i),m={startX:d.x,startY:d.y,x:e<f?e:f,y:t<p?t:p,width:Math.abs(e-f),height:Math.abs(t-p)},h=D.current,g=O.current;D.current=new Set(HF(a,m,i,n===jF.Partial,!0).map(e=>e.id)),O.current=new Set;let v=u?.selectable??!0;for(let e of D.current){let t=s.get(e);if(t)for(let{edgeId:e}of t.values()){let t=o.get(e);t&&(t.selectable??v)&&O.current.add(e)}}SI(h,D.current)||c(dz(a,D.current,!0)),SI(g,O.current)||l(dz(o,O.current)),_.setState({userSelectionRect:m,userSelectionActive:!0,nodesSelectionActive:!1})}function z(){if(!i||!E.current)return;let[e,t]=QF(j.current,E.current,S);x({x:e,y:t}).then(e=>{if(!A.current||!e){g.current=requestAnimationFrame(z);return}let{x:t,y:n}=j.current;R(t,n),g.current=requestAnimationFrame(z)})}let B=()=>{cancelAnimationFrame(g.current),g.current=0,M.current=!1};(0,C.useEffect)(()=>()=>B(),[]);let ee=e=>{let{userSelectionRect:n,transform:r,resetSelectedElements:i}=_.getState();if(!E.current||!n)return;let{x:o,y:c}=MI(e.nativeEvent,E.current);j.current={x:o,y:c};let l=fI({x:n.startX,y:n.startY},r);if(!A.current){let n=t?0:a;if(Math.hypot(o-l.x,c-l.y)<=n)return;i(),s?.(e)}A.current=!0,M.current||=(z(),!0),R(o,c)},te=e=>{w?e.button===0&&(e.target?.releasePointerCapture?.(e.pointerId),!v&&e.target===T.current&&_.getState().userSelectionRect&&N?.(e),_.setState({userSelectionActive:!1,userSelectionRect:null}),A.current&&(c?.(e),_.setState({nodesSelectionActive:D.current.size>0})),B()):e.target===T.current&&_.getState().connection.inProgress&&(k.current=!0)},ne=e=>{e.target?.releasePointerCapture?.(e.pointerId),B()},V=r===!0||Array.isArray(r)&&r.includes(0);return(0,G.jsxs)(`div`,{className:_F([`react-flow__pane`,{draggable:V,dragging:b,selection:e}]),onClick:w?void 0:Iz(N,T),onContextMenu:Iz(P,T),onWheel:Iz(F,T),onPointerEnter:w?void 0:f,onPointerMove:w?ee:p,onPointerUp:te,onPointerCancel:w?ne:void 0,onPointerDownCapture:w?L:void 0,onClickCapture:w?I:void 0,onPointerLeave:m,ref:T,style:jz,children:[h,(0,G.jsx)(Fz,{})]})}function zz({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);l?(t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])):c?.(`012`,TF.error012(e))}function Bz({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=OR(),[c,l]=(0,C.useState)(!1),u=(0,C.useRef)();return(0,C.useEffect)(()=>{if(!t)return u.current=DL({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{zz({id:t,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}}),()=>{u.current?.destroy(),u.current=void 0}},[t,s,e]),(0,C.useEffect)(()=>{!t&&e.current&&u.current&&u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o})},[n,r,t,a,e,i,o]),c}var Vz=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function Hz(){let e=OR();return(0,C.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:c,nodeOrigin:l}=e.getState(),u=new Map,d=Vz(a),f=r?i[0]:5,p=r?i[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of c){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=uI(t,i));let{position:a,positionAbsolute:s}=KF({nodeId:e.id,nextPosition:t,nodeLookup:c,nodeExtent:n,nodeOrigin:l,onError:o});e.position=a,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[])}var Uz=(0,C.createContext)(null),Wz=Uz.Provider;Uz.Consumer;var Gz=()=>(0,C.useContext)(Uz),Kz=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),qz=(0,C.createContext)(null);function Jz({children:e}){let t=DR(Kz,CR);return(0,G.jsx)(qz.Provider,{value:t,children:e})}function Yz(){let e=(0,C.useContext)(qz);if(!e)throw Error(`useHandleConfig must be used within a HandleConfigProvider`);return e}var Xz={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},Zz=(e,t,n)=>r=>{let{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o;if(!s&&!i)return Xz;let u=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===kF.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function Qz({type:e=`source`,position:t=$.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:l,onMouseDown:u,onTouchStart:d,...f},p){let m=o||null,h=e===`target`,g=OR(),_=Gz(),{connectOnClick:v,noPanClassName:y,rfId:b}=Yz(),{connectingFrom:x,connectingTo:S,clickConnecting:C,isPossibleEndHandle:w,connectionInProcess:T,clickConnectionInProcess:E,valid:D}=DR(Zz(_,m,e),CR);_||g.getState().onError?.(`010`,TF.error010());let O=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t,onError:n}=g.getState();t(hz(i,e,{onError:n}))}n?.(i),s?.(i)},k=e=>{if(!_)return;let t=jI(e.nativeEvent);if(i&&(t&&e.button===0||!t)){let t=g.getState();LL.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:h,handleId:m,nodeId:_,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>g.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:O,isValidConnection:n||((...e)=>g.getState().isValidConnection?.(...e)??!0),getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?u?.(e):d?.(e)};return(0,G.jsx)(`div`,{"data-handleid":m,"data-nodeid":_,"data-handlepos":t,"data-id":`${b}-${_}-${m}-${e}`,className:_F([`react-flow__handle`,`react-flow__handle-${t}`,`nodrag`,y,l,{source:!h,target:h,connectable:r,connectablestart:i,connectableend:a,clickconnecting:C,connectingfrom:x,connectingto:S,valid:D,connectionindicator:r&&(!T||w)&&(T||E?a:i)}]),onMouseDown:k,onTouchStart:k,onClick:v?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:c,lib:l,rfId:u,nodeLookup:d,connection:f}=g.getState();if(!_||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:_,handleId:m,handleType:e}),g.setState({connectionClickStartHandle:{nodeId:_,type:e,id:m}});return}let p=OI(t.target),h=n||c,{connection:v,isValid:y}=LL.isValid(t.nativeEvent,{handle:{nodeId:_,id:m,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:h,flowId:u,doc:p,lib:l,nodeLookup:d});y&&v&&O(v);let b=structuredClone(f);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),g.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:c})}var $z=(0,C.memo)(vz(Qz));function eB({data:e,isConnectable:t,sourcePosition:n=$.Bottom}){return(0,G.jsxs)(G.Fragment,{children:[e?.label,(0,G.jsx)($z,{type:`source`,position:n,isConnectable:t})]})}function tB({data:e,isConnectable:t,targetPosition:n=$.Top,sourcePosition:r=$.Bottom}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)($z,{type:`target`,position:n,isConnectable:t}),e?.label,(0,G.jsx)($z,{type:`source`,position:r,isConnectable:t})]})}function nB(){return null}function rB({data:e,isConnectable:t,targetPosition:n=$.Top}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)($z,{type:`target`,position:n,isConnectable:t}),e?.label]})}var iB={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},aB={input:eB,default:tB,output:rB,group:nB};function oB(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var sB=e=>{let{width:t,height:n,x:r,y:i}=VF(e.nodeLookup,{filter:e=>!!e.selected});return{width:cI(t)?t:null,height:cI(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function cB({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=OR(),{width:i,height:a,transformString:o,userSelectionActive:s}=DR(sB,CR),c=Hz(),l=(0,C.useRef)(null);(0,C.useEffect)(()=>{n||l.current?.focus({preventScroll:!0})},[n]);let u=!s&&i!==null&&a!==null;if(Bz({nodeRef:l,disabled:!u}),!u)return null;let d=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,G.jsx)(`div`,{className:_F([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:o},children:(0,G.jsx)(`div`,{ref:l,className:`react-flow__nodesselection-rect`,onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(iB,e.key)&&(e.preventDefault(),c({direction:iB[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}var lB=typeof window<`u`?window:void 0,uB=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function dB({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:b,panOnScrollSpeed:x,panOnScrollMode:S,zoomOnDoubleClick:C,panOnDrag:w,autoPanOnSelection:T,defaultViewport:E,translateExtent:D,minZoom:O,maxZoom:k,preventScrolling:A,onSelectionContextMenu:j,noWheelClassName:M,noPanClassName:N,disableKeyboardA11y:P,onViewportChange:F,isControlledViewport:I}){let{nodesSelectionActive:L,userSelectionActive:R}=DR(uB,CR),z=nz(l,{target:lB}),B=nz(h,{target:lB}),ee=B||w,te=B||b,ne=u&&ee!==!0,V=z||R||ne;return kz({deleteKeyCode:c,multiSelectionKeyCode:m}),(0,G.jsx)(Nz,{onPaneContextMenu:a,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:te,panActivationKeyPressed:B,panOnScrollSpeed:x,panOnScrollMode:S,zoomOnDoubleClick:C,panOnDrag:!z&&ee,defaultViewport:E,translateExtent:D,minZoom:O,maxZoom:k,zoomActivationKeyCode:g,preventScrolling:A,noWheelClassName:M,noPanClassName:N,onViewportChange:F,isControlledViewport:I,paneClickDistance:s,selectionOnDrag:ne,children:(0,G.jsxs)(Rz,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:ee,autoPanOnSelection:T,isSelecting:!!V,selectionMode:d,selectionKeyPressed:z,paneClickDistance:s,selectionOnDrag:ne,children:[e,L&&(0,G.jsx)(cB,{onSelectionContextMenu:j,noPanClassName:N,disableKeyboardA11y:P})]})})}dB.displayName=`FlowRenderer`;var fB=(0,C.memo)(dB),pB=e=>t=>e?HF(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys());function mB(e){return DR((0,C.useCallback)(pB(e),[e]),CR)}var hB=e=>e.updateNodeInternals;function gB(){let e=DR(hB),[t]=(0,C.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute(`data-id`);n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,C.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function _B({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=OR(),a=(0,C.useRef)(null),o=(0,C.useRef)(null),s=(0,C.useRef)(e.sourcePosition),c=(0,C.useRef)(e.targetPosition),l=(0,C.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,C.useEffect)(()=>{!a.current||e.hidden||u&&o.current===a.current||(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[u,e.hidden]),(0,C.useEffect)(()=>()=>{o.current&&=(r?.unobserve(o.current),null)},[]),(0,C.useEffect)(()=>{if(a.current){let n=l.current!==t,r=s.current!==e.sourcePosition,o=c.current!==e.targetPosition;(n||r||o)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function vB({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:m,rfId:h,nodeTypes:g,nodeClickDistance:_,onError:v}){let{node:y,internals:b,isParent:x}=DR(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},CR),S=y.type||`default`,C=g?.[S]||aB[S];C===void 0&&(v?.(`003`,TF.error003(S)),S=`default`,C=g?.default||aB.default);let w=!!(y.draggable||s&&y.draggable===void 0),T=!!(y.selectable||c&&y.selectable===void 0),E=!!(y.connectable||l&&y.connectable===void 0),D=!!(y.focusable||u&&y.focusable===void 0),O=OR(),k=bI(y),A=_B({node:y,nodeType:S,hasDimensions:k,resizeObserver:d}),j=Bz({nodeRef:A,disabled:y.hidden||!w,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:T,nodeClickDistance:_}),M=Hz();if(y.hidden)return null;let N=yI(y),P=oB(y),F=T||w||t||n||r||i,I=n?e=>n(e,{...b.userNode}):void 0,L=r?e=>r(e,{...b.userNode}):void 0,R=i?e=>i(e,{...b.userNode}):void 0,z=a?e=>a(e,{...b.userNode}):void 0,B=o?e=>o(e,{...b.userNode}):void 0,ee=n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=O.getState();T&&(!r||!w||i>0)&&zz({id:e,store:O,nodeRef:A}),t&&t(n,{...b.userNode})},te=t=>{if(!(AI(t.nativeEvent)||m)){if(DF.includes(t.key)&&T){let n=t.key===`Escape`;zz({id:e,store:O,unselect:n,nodeRef:A})}else if(w&&y.selected&&Object.prototype.hasOwnProperty.call(iB,t.key)){t.preventDefault();let{ariaLabelConfig:e}=O.getState();O.setState({ariaLiveMessage:e[`node.a11yDescription.ariaLiveMessage`]({direction:t.key.replace(`Arrow`,``).toLowerCase(),x:~~b.positionAbsolute.x,y:~~b.positionAbsolute.y})}),M({direction:iB[t.key],factor:t.shiftKey?4:1})}}},ne=()=>{if(m||!A.current?.matches(`:focus-visible`))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=O.getState();i&&(HF(new Map([[e,y]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(y.position.x+N.width/2,y.position.y+N.height/2,{zoom:t[2]}))};return(0,G.jsx)(`div`,{className:_F([`react-flow__node`,`react-flow__node-${S}`,{[p]:w},y.className,{selected:y.selected,selectable:T,parent:x,draggable:w,dragging:j}]),ref:A,style:{zIndex:b.z,transform:`translate(${b.positionAbsolute.x}px,${b.positionAbsolute.y}px)`,pointerEvents:F?`all`:`none`,visibility:k?`visible`:`hidden`,...y.style,...P},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:L,onMouseLeave:R,onContextMenu:z,onClick:ee,onDoubleClick:B,onKeyDown:D?te:void 0,tabIndex:D?0:void 0,onFocus:D?ne:void 0,role:y.ariaRole??(D?`group`:void 0),"aria-roledescription":`node`,"aria-describedby":m?void 0:`${jR}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:(0,G.jsx)(Wz,{value:e,children:(0,G.jsx)(C,{id:e,data:y.data,type:S,positionAbsoluteX:b.positionAbsolute.x,positionAbsoluteY:b.positionAbsolute.y,selected:y.selected??!1,selectable:T,draggable:w,deletable:y.deletable??!0,isConnectable:E,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:j,dragHandle:y.dragHandle,zIndex:b.z,parentId:y.parentId,...N})})})}var yB=(0,C.memo)(vB),bB=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function xB(e){let{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:i}=DR(bB,CR),a=mB(e.onlyRenderVisibleElements),o=gB();return(0,G.jsx)(`div`,{className:`react-flow__nodes`,style:jz,children:a.map(a=>(0,G.jsx)(yB,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}xB.displayName=`NodeRenderer`;var SB=(0,C.memo)(xB);function CB(e){return DR((0,C.useCallback)(t=>{if(!e)return t.edges.map(e=>e.id);let n=[];if(t.width&&t.height)for(let e of t.edges){let r=t.nodeLookup.get(e.source),i=t.nodeLookup.get(e.target);r&&i&&BI({sourceNode:r,targetNode:i,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),CR)}var wB=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,G.jsx)(`polyline`,{className:`arrow`,style:n,strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`})},TB=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,G.jsx)(`polyline`,{className:`arrowclosed`,style:n,strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`})},EB={[PF.Arrow]:wB,[PF.ArrowClosed]:TB};function DB(e){let t=OR();return(0,C.useMemo)(()=>Object.prototype.hasOwnProperty.call(EB,e)?EB[e]:(t.getState().onError?.(`009`,TF.error009(e)),null),[e])}var OB=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a=`strokeWidth`,strokeWidth:o,orient:s=`auto-start-reverse`})=>{let c=DB(t);return c?(0,G.jsx)(`marker`,{className:`react-flow__arrowhead`,id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:`-10 -10 20 20`,markerUnits:a,orient:s,refX:`0`,refY:`0`,children:(0,G.jsx)(c,{color:n,strokeWidth:o})}):null},kB=({defaultColor:e,rfId:t})=>{let n=DR(e=>e.edges),r=DR(e=>e.defaultEdgeOptions),i=(0,C.useMemo)(()=>rL(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,G.jsx)(`svg`,{className:`react-flow__marker`,"aria-hidden":`true`,children:(0,G.jsx)(`defs`,{children:i.map(e=>(0,G.jsx)(OB,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};kB.displayName=`MarkerDefinitions`;var AB=(0,C.memo)(kB);function jB({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...u}){let[d,f]=(0,C.useState)({x:1,y:0,width:0,height:0}),p=_F([`react-flow__edge-textwrapper`,l]),m=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(m.current){let e=m.current.getBBox();f({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,G.jsxs)(`g`,{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?`visible`:`hidden`,...u,children:[i&&(0,G.jsx)(`rect`,{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:`react-flow__edge-textbg`,style:a,rx:s,ry:s}),(0,G.jsx)(`text`,{className:`react-flow__edge-text`,y:d.height/2,dy:`0.3em`,ref:m,style:r,children:n}),c]}):null}jB.displayName=`EdgeText`;var MB=(0,C.memo)(jB);function NB({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...u}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`path`,{...u,d:e,fill:`none`,className:_F([`react-flow__edge-path`,u.className])}),l?(0,G.jsx)(`path`,{d:e,fill:`none`,strokeOpacity:0,strokeWidth:l,className:`react-flow__edge-interaction`}):null,r&&cI(t)&&cI(n)?(0,G.jsx)(MB,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function PB({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===$.Left||e===$.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function FB({sourceX:e,sourceY:t,sourcePosition:n=$.Bottom,targetX:r,targetY:i,targetPosition:a=$.Top}){let[o,s]=PB({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=PB({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=PI({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}function IB(e){return(0,C.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})=>{let[v,y,b]=FB({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),x=e.isInternal?void 0:t;return(0,G.jsx)(NB,{id:x,path:v,labelX:y,labelY:b,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})})}var LB=IB({isInternal:!1}),RB=IB({isInternal:!0});LB.displayName=`SimpleBezierEdge`,RB.displayName=`SimpleBezierEdgeInternal`;function zB(e){return(0,C.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:p=$.Bottom,targetPosition:m=$.Top,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,x]=XI({sourceX:n,sourceY:r,sourcePosition:p,targetX:i,targetY:a,targetPosition:m,borderRadius:_?.borderRadius,offset:_?.offset,stepPosition:_?.stepPosition}),S=e.isInternal?void 0:t;return(0,G.jsx)(NB,{id:S,path:y,labelX:b,labelY:x,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:v})})}var BB=zB({isInternal:!1}),VB=zB({isInternal:!0});BB.displayName=`SmoothStepEdge`,VB.displayName=`SmoothStepEdgeInternal`;function HB(e){return(0,C.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,G.jsx)(BB,{...n,id:r,pathOptions:(0,C.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var UB=HB({isInternal:!1}),WB=HB({isInternal:!0});UB.displayName=`StepEdge`,WB.displayName=`StepEdgeInternal`;function GB(e){return(0,C.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{let[g,_,v]=WI({sourceX:n,sourceY:r,targetX:i,targetY:a}),y=e.isInternal?void 0:t;return(0,G.jsx)(NB,{id:y,path:g,labelX:_,labelY:v,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})})}var KB=GB({isInternal:!1}),qB=GB({isInternal:!0});KB.displayName=`StraightEdge`,qB.displayName=`StraightEdgeInternal`;function JB(e){return(0,C.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=$.Bottom,targetPosition:s=$.Top,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,x]=LI({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:_?.curvature}),S=e.isInternal?void 0:t;return(0,G.jsx)(NB,{id:S,path:y,labelX:b,labelY:x,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:v})})}var YB=JB({isInternal:!1}),XB=JB({isInternal:!0});YB.displayName=`BezierEdge`,XB.displayName=`BezierEdgeInternal`;var ZB={default:XB,straight:qB,step:WB,smoothstep:VB,simplebezier:RB},QB={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},$B=(e,t,n)=>n===$.Left?e-t:n===$.Right?e+t:e,eV=(e,t,n)=>n===$.Top?e-t:n===$.Bottom?e+t:e,tV=`react-flow__edgeupdater`;function nV({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,G.jsx)(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:_F([tV,`${tV}-${s}`]),cx:$B(t,r,e),cy:eV(n,r,e),r,stroke:`transparent`,fill:`transparent`})}function rV({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){let m=OR(),h=(e,t)=>{if(e.button!==0)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:c,cancelConnection:p,nodeLookup:h,rfId:g,panBy:_,updateConnection:v}=m.getState(),y=t.type===`target`;LL.onPointerDown(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:p,panBy:_,isValidConnection:(...e)=>m.getState().isValidConnection?.(...e)??!0,onConnect:e=>l?.(n,e),onConnectStart:(r,i)=>{f(!0),u?.(e,n,t.type),c?.(r,i)},onConnectEnd:(...e)=>m.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{f(!1),d?.(e,n,t.type,r)},updateConnection:v,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:`target`}),_=e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:`source`}),v=()=>p(!0),y=()=>p(!1);return(0,G.jsxs)(G.Fragment,{children:[(e===!0||e===`source`)&&(0,G.jsx)(nV,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:`source`}),(e===!0||e===`target`)&&(0,G.jsx)(nV,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:_,onMouseEnter:v,onMouseOut:y,type:`target`})]})}function iV({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:m,edgeTypes:h,noPanClassName:g,onError:_,disableKeyboardA11y:v}){let y=DR(t=>t.edgeLookup.get(e)),b=DR(e=>e.defaultEdgeOptions);y=b?{...b,...y}:y;let x=y.type||`default`,S=h?.[x]||ZB[x];S===void 0&&(_?.(`011`,TF.error011(x)),x=`default`,S=h?.default||ZB.default);let w=!!(y.focusable||t&&y.focusable===void 0),T=d!==void 0&&(y.reconnectable||n&&y.reconnectable===void 0),E=!!(y.selectable||r&&y.selectable===void 0),D=(0,C.useRef)(null),[O,k]=(0,C.useState)(!1),[A,j]=(0,C.useState)(!1),M=OR(),{zIndex:N=y.zIndex,sourceX:P,sourceY:F,targetX:I,targetY:L,sourcePosition:R,targetPosition:z}=DR((0,C.useCallback)(t=>{let n=t.nodeLookup.get(y.source),r=t.nodeLookup.get(y.target);if(!n||!r)return QB;let i=QI({id:e,sourceNode:n,targetNode:r,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:t.connectionMode,onError:_}),a=zI({selected:y.selected,zIndex:y.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode});return{...i||QB,zIndex:a}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex,_]),CR),B=(0,C.useMemo)(()=>y.markerStart?`url('#${nL(y.markerStart,m)}')`:void 0,[y.markerStart,m]),ee=(0,C.useMemo)(()=>y.markerEnd?`url('#${nL(y.markerEnd,m)}')`:void 0,[y.markerEnd,m]);if(y.hidden||P===null||F===null||I===null||L===null)return null;let te=t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=M.getState();E&&(M.setState({nodesSelectionActive:!1}),y.selected&&a?(r({nodes:[],edges:[y]}),D.current?.blur()):n([e])),i&&i(t,y)},ne=a?e=>{a(e,{...y})}:void 0,V=o?e=>{o(e,{...y})}:void 0,re=s?e=>{s(e,{...y})}:void 0,ie=c?e=>{c(e,{...y})}:void 0,ae=l?e=>{l(e,{...y})}:void 0;return(0,G.jsx)(`svg`,{style:{zIndex:N},children:(0,G.jsxs)(`g`,{className:_F([`react-flow__edge`,`react-flow__edge-${x}`,y.className,g,{selected:y.selected,animated:y.animated,inactive:!E&&!i,updating:O,selectable:E}]),onClick:te,onDoubleClick:ne,onContextMenu:V,onMouseEnter:re,onMouseMove:ie,onMouseLeave:ae,onKeyDown:w?t=>{if(!v&&DF.includes(t.key)&&E){let{unselectNodesAndEdges:n,addSelectedEdges:r}=M.getState();t.key===`Escape`?(D.current?.blur(),n({edges:[y]})):r([e])}}:void 0,tabIndex:w?0:void 0,role:y.ariaRole??(w?`group`:`img`),"aria-roledescription":`edge`,"data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":w?`${MR}-${m}`:void 0,ref:D,...y.domAttributes,children:[!A&&(0,G.jsx)(S,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:E,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:P,sourceY:F,targetX:I,targetY:L,sourcePosition:R,targetPosition:z,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:B,markerEnd:ee,pathOptions:`pathOptions`in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),T&&(0,G.jsx)(rV,{edge:y,isReconnectable:T,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:P,sourceY:F,targetX:I,targetY:L,sourcePosition:R,targetPosition:z,setUpdateHover:k,setReconnecting:j})]})})}var aV=(0,C.memo)(iV),oV=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function sV({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:h}){let{edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,onError:y}=DR(oV,CR),b=CB(t);return(0,G.jsxs)(`div`,{className:`react-flow__edges`,children:[(0,G.jsx)(AB,{defaultColor:e,rfId:n}),b.map(e=>(0,G.jsx)(aV,{id:e,edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:h},e))]})}sV.displayName=`EdgeRenderer`;var cV=(0,C.memo)(sV),lV=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function uV({children:e}){let t=OR(),n=(0,C.useRef)(null),[r]=(0,C.useState)(()=>t.getState().transform);return yz(()=>{let e=null,r=()=>{let r=t.getState().transform;e&&r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]||(e=r,n.current&&(n.current.style.transform=lV(r)))};return r(),t.subscribe(r)},[t]),(0,G.jsx)(`div`,{ref:n,className:`react-flow__viewport xyflow__viewport react-flow__container`,style:{transform:lV(r)},children:e})}function dV(e){let t=Ez(),n=(0,C.useRef)(!1);(0,C.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var fV=e=>e.panZoom?.syncViewport;function pV(e){let t=DR(fV),n=OR();return(0,C.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function mV(e){return e.connection.inProgress?{...e.connection,to:dI(e.connection.to,e.transform)}:{...e.connection}}function hV(e){return e?t=>e(mV(t)):mV}function gV(e){return DR(hV(e),CR)}var _V=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function vV({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=DR(_V,CR);return a&&i&&c?(0,G.jsx)(`svg`,{style:e,width:a,height:o,className:`react-flow__connectionline react-flow__container`,children:(0,G.jsx)(`g`,{className:_F([`react-flow__connection`,TI(s)]),children:(0,G.jsx)(yV,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}var yV=({style:e,type:t=NF.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:c,to:l,toNode:u,toHandle:d,toPosition:f,pointer:p}=gV();if(!i)return;if(n)return(0,G.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:f,connectionStatus:TI(r),toNode:u,toHandle:d,pointer:p});let m=``,h={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:f};switch(t){case NF.Bezier:[m]=LI(h);break;case NF.SimpleBezier:[m]=FB(h);break;case NF.Step:[m]=XI({...h,borderRadius:0});break;case NF.SmoothStep:[m]=XI(h);break;default:[m]=WI(h)}return(0,G.jsx)(`path`,{d:m,fill:`none`,className:`react-flow__connection-path`,style:e})};yV.displayName=`ConnectionLine`;var bV={};function xV(e=bV){(0,C.useRef)(e),OR(),(0,C.useEffect)(()=>{},[e])}function SV(){OR(),(0,C.useRef)(!1),(0,C.useEffect)(()=>{},[])}function CV({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:_,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,multiSelectionKeyCode:x,panActivationKeyCode:S,zoomActivationKeyCode:C,deleteKeyCode:w,onlyRenderVisibleElements:T,elementsSelectable:E,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,preventScrolling:j,defaultMarkerColor:M,zoomOnScroll:N,zoomOnPinch:P,panOnScroll:F,panOnScrollSpeed:I,panOnScrollMode:L,zoomOnDoubleClick:R,panOnDrag:z,autoPanOnSelection:B,onPaneClick:ee,onPaneMouseEnter:te,onPaneMouseMove:ne,onPaneMouseLeave:V,onPaneScroll:re,onPaneContextMenu:ie,paneClickDistance:ae,nodeClickDistance:oe,onEdgeContextMenu:H,onEdgeMouseEnter:se,onEdgeMouseMove:U,onEdgeMouseLeave:ce,reconnectRadius:W,onReconnect:le,onReconnectStart:ue,onReconnectEnd:de,noDragClassName:fe,noWheelClassName:pe,noPanClassName:me,disableKeyboardA11y:he,nodeExtent:ge,rfId:_e,viewport:ve,onViewportChange:ye,nodesDraggable:be}){return xV(e),xV(t),SV(),dV(n),pV(ve),(0,G.jsx)(fB,{onPaneClick:ee,onPaneMouseEnter:te,onPaneMouseMove:ne,onPaneMouseLeave:V,onPaneContextMenu:ie,onPaneScroll:re,paneClickDistance:ae,deleteKeyCode:w,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:x,panActivationKeyCode:S,zoomActivationKeyCode:C,elementsSelectable:E,zoomOnScroll:N,zoomOnPinch:P,zoomOnDoubleClick:R,panOnScroll:F,panOnScrollSpeed:I,panOnScrollMode:L,panOnDrag:z,autoPanOnSelection:B,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,onSelectionContextMenu:d,preventScrolling:j,noDragClassName:fe,noWheelClassName:pe,noPanClassName:me,disableKeyboardA11y:he,onViewportChange:ye,isControlledViewport:!!ve,children:(0,G.jsxs)(uV,{children:[(0,G.jsx)(cV,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:le,onReconnectStart:ue,onReconnectEnd:de,onlyRenderVisibleElements:T,onEdgeContextMenu:H,onEdgeMouseEnter:se,onEdgeMouseMove:U,onEdgeMouseLeave:ce,reconnectRadius:W,defaultMarkerColor:M,noPanClassName:me,disableKeyboardA11y:he,rfId:_e}),(0,G.jsx)(vV,{style:h,type:m,component:g,containerStyle:_}),(0,G.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),(0,G.jsx)(SB,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,nodeClickDistance:oe,onlyRenderVisibleElements:T,noPanClassName:me,noDragClassName:fe,disableKeyboardA11y:he,nodeExtent:ge,rfId:_e,nodesDraggable:be}),(0,G.jsx)(`div`,{className:`react-flow__viewport-portal`})]})})}CV.displayName=`GraphView`;var wV=(0,C.memo)(CV),TV=lI(`React Flow`,`https://reactflow.dev/`),EV=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f=`basic`}={})=>{let p=new Map,m=new Map,h=new Map,g=new Map,_=r??t??[],v=n??e??[],y=u??[0,0],b=d??EF;xL(h,g,_);let{nodesInitialized:x}=fL(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=gI(VF(p,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),i,a,c,l,s?.padding??.1);S=[e,t,n]}return{rfId:`1`,width:i??0,height:a??0,transform:S,nodes:v,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:_,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:EF,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:kF.Strict,domNode:null,paneDragging:!1,noPanClassName:`nopan`,nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...MF},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:TV,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:`react`,debug:!1,ariaLabelConfig:OF,zIndexMode:f,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},DV=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>SR((p,m)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=m();t&&(await GF({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...EV({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,fitViewQueued:o,zIndexMode:s,nodesSelectionActive:c}=m(),{nodesInitialized:l,hasSelectedNodes:u}=fL(e,t,n,{nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,checkEquality:!0,zIndexMode:s}),d=c&&u;o&&l?(h(),p({nodes:e,nodesInitialized:l,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:d})):p({nodes:e,nodesInitialized:l,nodesSelectionActive:d})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();xL(t,n,e),p({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=m();t(e),p({hasDefaultNodes:!0})}if(t){let{setEdges:e}=m();e(t),p({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:c,zIndexMode:l}=m(),{changes:u,updatedInternals:d}=vL(e,n,r,i,a,o,l);d&&(lL(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:l}),c?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),u?.length>0&&(s&&console.log(`React Flow: trigger node changes`,u),t?.(u)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:c}=m();for(let[a,c]of e){let e=i.get(a),l=!!(e?.expandParent&&e?.parentId&&c?.position),u={id:a,type:`position`,position:l?{x:Math.max(0,c.position.x),y:Math.max(0,c.position.y)}:c.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=eL(e,o.fromHandle,$.Left,!0);s({...o,from:t})}l&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...c.internals.positionAbsolute,width:c.measured.width??0,height:c.measured.height??0}}),r.push(u)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=m(),a=_L(n,i,e,t);r.push(...a)}for(let e of c.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=m();e?.length&&(i&&n(cz(e,r)),a&&console.log(`React Flow: trigger node changes`,e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=m();e?.length&&(i&&n(lz(e,r)),a&&console.log(`React Flow: trigger edge changes`,e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();t?i(e.map(e=>uz(e,!0))):(i(dz(r,new Set([...e]),!0)),a(dz(n)))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();t?a(e.map(e=>uz(e,!0))):(a(dz(n,new Set([...e]))),i(dz(r,new Set,!0)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=m(),s=e||r,c=t||n,l=[];for(let e of s){if(!e.selected)continue;let t=i.get(e.id);t&&(t.selected=!1),l.push(uz(e.id,!1))}let u=[];for(let e of c)e.selected&&u.push(uz(e.id,!1));a(l),o(u)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),p({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),p({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),p({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=m();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,uz(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,uz(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=m();(e[0][0]!==o[0][0]||e[0][1]!==o[0][1]||e[1][0]!==o[1][0]||e[1][1]!==o[1][1])&&(fL(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),p({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=m();return yL({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=m();if(!o)return!1;let s=n?.zoom===void 0?a:n.zoom;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0},cancelConnection:()=>{p({connection:{...MF}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...EV()})}},Object.is);function OV({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:p}){let[m]=(0,C.useState)(()=>DV({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:l,minZoom:o,maxZoom:s,fitViewOptions:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return(0,G.jsx)(TR,{value:m,children:(0,G.jsx)(Cz,{children:(0,G.jsx)(Jz,{children:p})})})}function kV({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return(0,C.useContext)(wR)?(0,G.jsx)(G.Fragment,{children:e}):(0,G.jsx)(OV,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}var AV={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function jV({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:b,onNodeContextMenu:x,onNodeDoubleClick:S,onNodeDragStart:w,onNodeDrag:T,onNodeDragStop:E,onNodesDelete:D,onEdgesDelete:O,onDelete:k,onSelectionChange:A,onSelectionDragStart:j,onSelectionDrag:M,onSelectionDragStop:N,onSelectionContextMenu:P,onSelectionStart:F,onSelectionEnd:I,onBeforeDelete:L,connectionMode:R,connectionLineType:z=NF.Bezier,connectionLineStyle:B,connectionLineComponent:ee,connectionLineContainerStyle:te,deleteKeyCode:ne=`Backspace`,selectionKeyCode:V=`Shift`,selectionOnDrag:re=!1,selectionMode:ie=jF.Full,panActivationKeyCode:ae=`Space`,multiSelectionKeyCode:oe=_I()?`Meta`:`Control`,zoomActivationKeyCode:H=_I()?`Meta`:`Control`,snapToGrid:se,snapGrid:U,onlyRenderVisibleElements:ce=!1,selectNodesOnDrag:W,nodesDraggable:le,autoPanOnNodeFocus:ue,nodesConnectable:de,nodesFocusable:fe,nodeOrigin:pe=qR,edgesFocusable:me,edgesReconnectable:he,elementsSelectable:ge=!0,defaultViewport:_e=JR,minZoom:ve=.5,maxZoom:ye=2,translateExtent:be=EF,preventScrolling:xe=!0,nodeExtent:Se,defaultMarkerColor:Ce=`#b1b1b7`,zoomOnScroll:we=!0,zoomOnPinch:Te=!0,panOnScroll:Ee=!1,panOnScrollSpeed:De=.5,panOnScrollMode:Oe=AF.Free,zoomOnDoubleClick:ke=!0,panOnDrag:Ae=!0,onPaneClick:je,onPaneMouseEnter:Me,onPaneMouseMove:Ne,onPaneMouseLeave:Pe,onPaneScroll:Fe,onPaneContextMenu:Ie,paneClickDistance:Le=1,nodeClickDistance:Re=0,children:ze,onReconnect:Be,onReconnectStart:Ve,onReconnectEnd:He,onEdgeContextMenu:Ue,onEdgeDoubleClick:We,onEdgeMouseEnter:Ge,onEdgeMouseMove:Ke,onEdgeMouseLeave:qe,reconnectRadius:Je=10,onNodesChange:Ye,onEdgesChange:Xe,noDragClassName:Ze=`nodrag`,noWheelClassName:Qe=`nowheel`,noPanClassName:$e=`nopan`,fitView:et,fitViewOptions:tt,connectOnClick:nt,attributionPosition:rt,proOptions:it,defaultEdgeOptions:at,elevateNodesOnSelect:ot=!0,elevateEdgesOnSelect:st=!1,disableKeyboardA11y:ct=!1,autoPanOnConnect:lt,autoPanOnNodeDrag:ut,autoPanOnSelection:dt=!0,autoPanSpeed:ft,connectionRadius:pt,isValidConnection:mt,onError:ht,style:gt,id:_t,nodeDragThreshold:vt,connectionDragThreshold:yt,viewport:bt,onViewportChange:xt,width:St,height:Ct,colorMode:wt=`light`,debug:Tt,onScroll:Et,ariaLabelConfig:Dt,zIndexMode:Ot=`basic`,...kt},At){let jt=_t||`1`,Mt=ez(wt),Nt=(0,C.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),Et?.(e)},[Et]);return(0,G.jsx)(`div`,{"data-testid":`rf__wrapper`,...kt,onScroll:Nt,style:{...gt,...AV},ref:At,className:_F([`react-flow`,i,Mt]),id:_t,role:`application`,children:(0,G.jsxs)(kV,{nodes:e,edges:t,width:St,height:Ct,fitView:et,fitViewOptions:tt,minZoom:ve,maxZoom:ye,nodeOrigin:pe,nodeExtent:Se,zIndexMode:Ot,children:[(0,G.jsx)(QR,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,nodesDraggable:le,autoPanOnNodeFocus:ue,nodesConnectable:de,nodesFocusable:fe,edgesFocusable:me,edgesReconnectable:he,elementsSelectable:ge,elevateNodesOnSelect:ot,elevateEdgesOnSelect:st,minZoom:ve,maxZoom:ye,nodeExtent:Se,onNodesChange:Ye,onEdgesChange:Xe,snapToGrid:se,snapGrid:U,connectionMode:R,translateExtent:be,connectOnClick:nt,defaultEdgeOptions:at,fitView:et,fitViewOptions:tt,onNodesDelete:D,onEdgesDelete:O,onDelete:k,onNodeDragStart:w,onNodeDrag:T,onNodeDragStop:E,onSelectionDrag:M,onSelectionDragStart:j,onSelectionDragStop:N,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:$e,nodeOrigin:pe,rfId:jt,autoPanOnConnect:lt,autoPanOnNodeDrag:ut,autoPanSpeed:ft,onError:ht,connectionRadius:pt,isValidConnection:mt,selectNodesOnDrag:W,nodeDragThreshold:vt,connectionDragThreshold:yt,onBeforeDelete:L,debug:Tt,ariaLabelConfig:Dt,zIndexMode:Ot}),(0,G.jsx)(wV,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:b,onNodeContextMenu:x,onNodeDoubleClick:S,nodeTypes:a,edgeTypes:o,connectionLineType:z,connectionLineStyle:B,connectionLineComponent:ee,connectionLineContainerStyle:te,selectionKeyCode:V,selectionOnDrag:re,selectionMode:ie,deleteKeyCode:ne,multiSelectionKeyCode:oe,panActivationKeyCode:ae,zoomActivationKeyCode:H,onlyRenderVisibleElements:ce,defaultViewport:_e,translateExtent:be,minZoom:ve,maxZoom:ye,preventScrolling:xe,zoomOnScroll:we,zoomOnPinch:Te,zoomOnDoubleClick:ke,panOnScroll:Ee,panOnScrollSpeed:De,panOnScrollMode:Oe,panOnDrag:Ae,autoPanOnSelection:dt,onPaneClick:je,onPaneMouseEnter:Me,onPaneMouseMove:Ne,onPaneMouseLeave:Pe,onPaneScroll:Fe,onPaneContextMenu:Ie,paneClickDistance:Le,nodeClickDistance:Re,onSelectionContextMenu:P,onSelectionStart:F,onSelectionEnd:I,onReconnect:Be,onReconnectStart:Ve,onReconnectEnd:He,onEdgeContextMenu:Ue,onEdgeDoubleClick:We,onEdgeMouseEnter:Ge,onEdgeMouseMove:Ke,onEdgeMouseLeave:qe,reconnectRadius:Je,defaultMarkerColor:Ce,noDragClassName:Ze,noWheelClassName:Qe,noPanClassName:$e,rfId:jt,disableKeyboardA11y:ct,nodeExtent:Se,viewport:bt,onViewportChange:xt,nodesDraggable:le}),(0,G.jsx)(KR,{onSelectionChange:A}),ze,(0,G.jsx)(BR,{proOptions:it,position:rt}),(0,G.jsx)(LR,{rfId:jt,disableKeyboardA11y:ct})]})})}var MV=vz(jV);function NV(e){let[t,n]=(0,C.useState)(e);return[t,n,(0,C.useCallback)(e=>n(t=>cz(e,t)),[])]}function PV(e){let[t,n]=(0,C.useState)(e);return[t,n,(0,C.useCallback)(e=>n(t=>lz(e,t)),[])]}TF.error014();function FV({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,G.jsx)(`path`,{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:_F([`react-flow__background-pattern`,n,r])})}function IV({radius:e,className:t}){return(0,G.jsx)(`circle`,{cx:e,cy:e,r:e,className:_F([`react-flow__background-pattern`,`dots`,t])})}var LV;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(LV||={});var RV={[LV.Dots]:1,[LV.Lines]:1,[LV.Cross]:6},zV=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function BV({id:e,variant:t=LV.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:c,className:l,patternClassName:u}){let d=(0,C.useRef)(null),{transform:f,patternId:p}=DR(zV,CR),m=r||RV[t],h=t===LV.Dots,g=t===LV.Cross,_=Array.isArray(n)?n:[n,n],v=[_[0]*f[2]||1,_[1]*f[2]||1],y=m*f[2],b=Array.isArray(a)?a:[a,a],x=g?[y,y]:v,S=[b[0]*f[2]+x[0]/2,b[1]*f[2]+x[1]/2],w=`${p}${e||``}`;return(0,G.jsxs)(`svg`,{className:_F([`react-flow__background`,l]),style:{...c,...jz,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":`rf__background`,children:[(0,G.jsx)(`pattern`,{id:w,x:f[0]%v[0],y:f[1]%v[1],width:v[0],height:v[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${S[0]},-${S[1]})`,children:h?(0,G.jsx)(IV,{radius:y/2,className:u}):(0,G.jsx)(FV,{dimensions:x,lineWidth:i,variant:t,className:u})}),(0,G.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${w})`})]})}BV.displayName=`Background`;var VV=(0,C.memo)(BV);function HV(){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,G.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})})}function UV(){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,G.jsx)(`path`,{d:`M0 0h32v4.2H0z`})})}function WV(){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,G.jsx)(`path`,{d:`M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z`})})}function GV(){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,G.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z`})})}function KV(){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,G.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z`})})}function qV({children:e,className:t,...n}){return(0,G.jsx)(`button`,{type:`button`,className:_F([`react-flow__controls-button`,t]),...n,children:e})}var JV=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function YV({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:l,children:u,position:d=`bottom-left`,orientation:f=`vertical`,"aria-label":p}){let m=OR(),{isInteractive:h,minZoomReached:g,maxZoomReached:_,ariaLabelConfig:v}=DR(JV,CR),{zoomIn:y,zoomOut:b,fitView:x}=Ez();return(0,G.jsxs)(RR,{className:_F([`react-flow__controls`,f===`horizontal`?`horizontal`:`vertical`,l]),position:d,style:e,"data-testid":`rf__controls`,"aria-label":p??v[`controls.ariaLabel`],children:[t&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(qV,{onClick:()=>{y(),a?.()},className:`react-flow__controls-zoomin`,title:v[`controls.zoomIn.ariaLabel`],"aria-label":v[`controls.zoomIn.ariaLabel`],disabled:_,children:(0,G.jsx)(HV,{})}),(0,G.jsx)(qV,{onClick:()=>{b(),o?.()},className:`react-flow__controls-zoomout`,title:v[`controls.zoomOut.ariaLabel`],"aria-label":v[`controls.zoomOut.ariaLabel`],disabled:g,children:(0,G.jsx)(UV,{})})]}),n&&(0,G.jsx)(qV,{className:`react-flow__controls-fitview`,onClick:()=>{x(i),s?.()},title:v[`controls.fitView.ariaLabel`],"aria-label":v[`controls.fitView.ariaLabel`],children:(0,G.jsx)(WV,{})}),r&&(0,G.jsx)(qV,{className:`react-flow__controls-interactive`,onClick:()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)},title:v[`controls.interactive.ariaLabel`],"aria-label":v[`controls.interactive.ariaLabel`],children:h?(0,G.jsx)(KV,{}):(0,G.jsx)(GV,{})}),u]})}YV.displayName=`Controls`;var XV=(0,C.memo)(YV);function ZV({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:l,borderRadius:u,shapeRendering:d,selected:f,onClick:p}){let{background:m,backgroundColor:h}=a||{},g=o||m||h;return(0,G.jsx)(`rect`,{className:_F([`react-flow__minimap-node`,{selected:f},l]),x:t,y:n,rx:u,ry:u,width:r,height:i,style:{fill:g,stroke:s,strokeWidth:c},shapeRendering:d,onClick:p?t=>p(t,e):void 0})}var QV=(0,C.memo)(ZV),$V=e=>e.nodes.map(e=>e.id),eH=e=>e instanceof Function?e:()=>e;function tH({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=QV,onClick:o}){let s=DR($V,CR),c=eH(t),l=eH(e),u=eH(n),d=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return(0,G.jsx)(G.Fragment,{children:s.map(e=>(0,G.jsx)(rH,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},e))})}function nH({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:c}){let{node:l,x:u,y:d,width:f,height:p}=DR(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=yI(r);return{node:r,x:i,y:a,width:o,height:s}},CR);return!l||l.hidden||!bI(l)?null:(0,G.jsx)(s,{x:u,y:d,width:f,height:p,style:l.style,selected:!!l.selected,className:r(l),color:t(l),borderRadius:i,strokeColor:n(l),strokeWidth:a,shapeRendering:o,onClick:c,id:l.id})}var rH=(0,C.memo)(nH),iH=(0,C.memo)(tH),aH=200,oH=150,sH=e=>!e.hidden,cH=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]},n=!1;for(let t of e.nodeLookup.values())if(!t.hidden){n=!0;break}return{viewBB:t,boundingRect:n?iI(VF(e.nodeLookup,{filter:sH}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},lH=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,uH=(e,t)=>lH(e.viewBB,t.viewBB)&&lH(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,dH=`react-flow__minimap-desc`;function fH({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i=``,nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:u,maskStrokeWidth:d,position:f=`bottom-right`,onClick:p,onNodeClick:m,pannable:h=!1,zoomable:g=!1,ariaLabel:_,inversePan:v,zoomStep:y=1,offsetScale:b=5}){let x=OR(),S=(0,C.useRef)(null),{boundingRect:w,panZoom:T,viewBB:E,rfId:D,translateExtent:O,flowWidth:k,flowHeight:A,ariaLabelConfig:j}=DR(cH,uH),M=e?.width??aH,N=e?.height??oH,P=w.width/M,F=w.height/N,I=Math.max(P,F),L=I*M,R=I*N,z=b*I,B=w.x-(L-w.width)/2-z,ee=w.y-(R-w.height)/2-z,te=L+z*2,ne=R+z*2,V=`${dH}-${D}`,re=(0,C.useRef)(0),ie=(0,C.useRef)();re.current=I,(0,C.useEffect)(()=>{let e=x.getState().panZoom;if(S.current&&e)return ie.current=RL({domNode:S.current,panZoom:e,getTransform:()=>x.getState().transform,getViewScale:()=>re.current}),()=>{ie.current?.destroy()}},[T]),(0,C.useEffect)(()=>{ie.current?.update({translateExtent:O,width:k,height:A,inversePan:v,pannable:h,zoomStep:y,zoomable:g})},[h,g,v,y,O,k,A]);let ae=p?e=>{let[t,n]=ie.current?.pointer(e)||[0,0];p(e,{x:t,y:n})}:void 0,oe=(0,C.useCallback)((e,t)=>{let n=x.getState().nodeLookup.get(t).internals.userNode;m?.(e,n)},[m]),H=m?oe:void 0,se=_??j[`minimap.ariaLabel`];return(0,G.jsx)(RR,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof c==`string`?c:void 0,"--xy-minimap-mask-background-color-props":typeof l==`string`?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof u==`string`?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof d==`number`?d*I:void 0,"--xy-minimap-node-background-color-props":typeof r==`string`?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n==`string`?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o==`number`?o:void 0},className:_F([`react-flow__minimap`,t]),"data-testid":`rf__minimap`,children:(0,G.jsxs)(`svg`,{width:M,height:N,viewBox:`${B} ${ee} ${te} ${ne}`,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":V,ref:S,onClick:ae,children:[se&&(0,G.jsx)(`title`,{id:V,children:se}),(0,G.jsx)(iH,{onClick:H,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,G.jsx)(`path`,{className:`react-flow__minimap-mask`,d:`M${B-z},${ee-z}h${te+z*2}v${ne+z*2}h${-te-z*2}z
|
|
278
|
-
M${E.x},${E.y}h${E.width}v${E.height}h${-E.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}fH.displayName=`MiniMap`;var pH=(0,C.memo)(fH),mH=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,hH={[$L.Line]:`right`,[$L.Handle]:`bottom-right`};function gH({nodeId:e,position:t,variant:n=$L.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:_}){let v=Gz(),y=typeof e==`string`?e:v,b=OR(),x=(0,C.useRef)(null),S=n===$L.Handle,w=DR((0,C.useCallback)(mH(S&&p),[S,p]),CR),T=(0,C.useRef)(null),E=t??hH[n];(0,C.useEffect)(()=>{if(x.current&&y)return T.current||=uR({domNode:x.current,nodeId:y,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=b.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=b.getState(),o=[],s={x:e.x,y:e.y},c=r.get(y);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=_L([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...xI({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:y,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:y,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:y,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};b.getState().triggerNodeChanges([n])}}),T.current.update({controlPosition:E,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:_,shouldResize:m}),()=>{T.current?.destroy()}},[E,s,c,l,u,d,h,g,_,m]);let D=E.split(`-`);return(0,G.jsx)(`div`,{className:_F([`react-flow__resize-control`,`nodrag`,...D,n,r]),ref:x,style:{...i,scale:w,...o&&{[S?`backgroundColor`:`borderColor`]:o}},children:a})}(0,C.memo)(gH);var _H=n(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),vH=n(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),yH=n(((e,t)=>{var n=vH();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),bH=n(((e,t)=>{var n=yH(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),xH=n(((e,t)=>{var n=yH();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),SH=n(((e,t)=>{var n=yH();function r(e){return n(this.__data__,e)>-1}t.exports=r})),CH=n(((e,t)=>{var n=yH();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),wH=n(((e,t)=>{var n=_H(),r=bH(),i=xH(),a=SH(),o=CH();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),TH=n(((e,t)=>{var n=wH();function r(){this.__data__=new n,this.size=0}t.exports=r})),EH=n(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),DH=n(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),OH=n(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),kH=n(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),AH=n(((e,t)=>{var n=kH(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),jH=n(((e,t)=>{t.exports=AH().Symbol})),MH=n(((e,t)=>{var n=jH(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),NH=n(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),PH=n(((e,t)=>{var n=jH(),r=MH(),i=NH(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),FH=n(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),IH=n(((e,t)=>{var n=PH(),r=FH(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),LH=n(((e,t)=>{t.exports=AH()[`__core-js_shared__`]})),RH=n(((e,t)=>{var n=LH(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),zH=n(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),BH=n(((e,t)=>{var n=IH(),r=RH(),i=FH(),a=zH(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),VH=n(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),HH=n(((e,t)=>{var n=BH(),r=VH();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),UH=n(((e,t)=>{t.exports=HH()(AH(),`Map`)})),WH=n(((e,t)=>{t.exports=HH()(Object,`create`)})),GH=n(((e,t)=>{var n=WH();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),KH=n(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),qH=n(((e,t)=>{var n=WH(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),JH=n(((e,t)=>{var n=WH(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),YH=n(((e,t)=>{var n=WH(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),XH=n(((e,t)=>{var n=GH(),r=KH(),i=qH(),a=JH(),o=YH();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),ZH=n(((e,t)=>{var n=XH(),r=wH(),i=UH();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),QH=n(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),$H=n(((e,t)=>{var n=QH();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),eU=n(((e,t)=>{var n=$H();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),tU=n(((e,t)=>{var n=$H();function r(e){return n(this,e).get(e)}t.exports=r})),nU=n(((e,t)=>{var n=$H();function r(e){return n(this,e).has(e)}t.exports=r})),rU=n(((e,t)=>{var n=$H();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),iU=n(((e,t)=>{var n=ZH(),r=eU(),i=tU(),a=nU(),o=rU();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),aU=n(((e,t)=>{var n=wH(),r=UH(),i=iU(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),oU=n(((e,t)=>{var n=wH(),r=TH(),i=EH(),a=DH(),o=OH(),s=aU();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),sU=n(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=n})),cU=n(((e,t)=>{var n=HH();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),lU=n(((e,t)=>{var n=cU();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),uU=n(((e,t)=>{var n=lU(),r=vH(),i=Object.prototype.hasOwnProperty;function a(e,t,a){var o=e[t];(!(i.call(e,t)&&r(o,a))||a===void 0&&!(t in e))&&n(e,t,a)}t.exports=a})),dU=n(((e,t)=>{var n=uU(),r=lU();function i(e,t,i,a){var o=!i;i||={};for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(i[l],e[l],l,i,e):void 0;u===void 0&&(u=e[l]),o?r(i,l,u):n(i,l,u)}return i}t.exports=i})),fU=n(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),pU=n(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),mU=n(((e,t)=>{var n=PH(),r=pU(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),hU=n(((e,t)=>{var n=mU(),r=pU(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),gU=n(((e,t)=>{t.exports=Array.isArray})),_U=n(((e,t)=>{function n(){return!1}t.exports=n})),vU=n(((e,t)=>{var n=AH(),r=_U(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),yU=n(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),bU=n(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),xU=n(((e,t)=>{var n=PH(),r=bU(),i=pU(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),SU=n(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),CU=n(((e,t)=>{var n=kH(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),wU=n(((e,t)=>{var n=xU(),r=SU(),i=CU(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),TU=n(((e,t)=>{var n=fU(),r=hU(),i=gU(),a=vU(),o=yU(),s=wU(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),EU=n(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),DU=n(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),OU=n(((e,t)=>{t.exports=DU()(Object.keys,Object)})),kU=n(((e,t)=>{var n=EU(),r=OU(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),AU=n(((e,t)=>{var n=IH(),r=bU();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),jU=n(((e,t)=>{var n=TU(),r=kU(),i=AU();function a(e){return i(e)?n(e):r(e)}t.exports=a})),MU=n(((e,t)=>{var n=dU(),r=jU();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),NU=n(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),PU=n(((e,t)=>{var n=FH(),r=EU(),i=NU(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)(s!=`constructor`||!t&&a.call(e,s))&&o.push(s);return o}t.exports=o})),FU=n(((e,t)=>{var n=TU(),r=PU(),i=AU();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),IU=n(((e,t)=>{var n=dU(),r=FU();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),LU=n(((e,t)=>{var n=AH(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function s(e,t){if(t)return e.slice();var n=e.length,r=o?o(n):new e.constructor(n);return e.copy(r),r}t.exports=s})),RU=n(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),zU=n(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),BU=n(((e,t)=>{function n(){return[]}t.exports=n})),VU=n(((e,t)=>{var n=zU(),r=BU(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),HU=n(((e,t)=>{var n=dU(),r=VU();function i(e,t){return n(e,r(e),t)}t.exports=i})),UU=n(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),WU=n(((e,t)=>{t.exports=DU()(Object.getPrototypeOf,Object)})),GU=n(((e,t)=>{var n=UU(),r=WU(),i=VU(),a=BU();t.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=r(e);return t}:a})),KU=n(((e,t)=>{var n=dU(),r=GU();function i(e,t){return n(e,r(e),t)}t.exports=i})),qU=n(((e,t)=>{var n=UU(),r=gU();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),JU=n(((e,t)=>{var n=qU(),r=VU(),i=jU();function a(e){return n(e,i,r)}t.exports=a})),YU=n(((e,t)=>{var n=qU(),r=GU(),i=FU();function a(e){return n(e,i,r)}t.exports=a})),XU=n(((e,t)=>{t.exports=HH()(AH(),`DataView`)})),ZU=n(((e,t)=>{t.exports=HH()(AH(),`Promise`)})),QU=n(((e,t)=>{t.exports=HH()(AH(),`Set`)})),$U=n(((e,t)=>{t.exports=HH()(AH(),`WeakMap`)})),eW=n(((e,t)=>{var n=XU(),r=UH(),i=ZU(),a=QU(),o=$U(),s=PH(),c=zH(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),tW=n(((e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]==`string`&&n.call(e,`index`)&&(r.index=e.index,r.input=e.input),r}t.exports=r})),nW=n(((e,t)=>{t.exports=AH().Uint8Array})),rW=n(((e,t)=>{var n=nW();function r(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}t.exports=r})),iW=n(((e,t)=>{var n=rW();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}t.exports=r})),aW=n(((e,t)=>{var n=/\w*$/;function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=r})),oW=n(((e,t)=>{var n=jH(),r=n?n.prototype:void 0,i=r?r.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a})),sW=n(((e,t)=>{var n=rW();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}t.exports=r})),cW=n(((e,t)=>{var n=rW(),r=iW(),i=aW(),a=oW(),o=sW(),s=`[object Boolean]`,c=`[object Date]`,l=`[object Map]`,u=`[object Number]`,d=`[object RegExp]`,f=`[object Set]`,p=`[object String]`,m=`[object Symbol]`,h=`[object ArrayBuffer]`,g=`[object DataView]`,_=`[object Float32Array]`,v=`[object Float64Array]`,y=`[object Int8Array]`,b=`[object Int16Array]`,x=`[object Int32Array]`,S=`[object Uint8Array]`,C=`[object Uint8ClampedArray]`,w=`[object Uint16Array]`,T=`[object Uint32Array]`;function E(e,t,E){var D=e.constructor;switch(t){case h:return n(e);case s:case c:return new D(+e);case g:return r(e,E);case _:case v:case y:case b:case x:case S:case C:case w:case T:return o(e,E);case l:return new D;case u:case p:return new D(e);case d:return i(e);case f:return new D;case m:return a(e)}}t.exports=E})),lW=n(((e,t)=>{var n=FH(),r=Object.create;t.exports=function(){function e(){}return function(t){if(!n(t))return{};if(r)return r(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}()})),uW=n(((e,t)=>{var n=lW(),r=WU(),i=EU();function a(e){return typeof e.constructor==`function`&&!i(e)?n(r(e)):{}}t.exports=a})),dW=n(((e,t)=>{var n=eW(),r=pU(),i=`[object Map]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),fW=n(((e,t)=>{var n=dW(),r=SU(),i=CU(),a=i&&i.isMap;t.exports=a?r(a):n})),pW=n(((e,t)=>{var n=eW(),r=pU(),i=`[object Set]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),mW=n(((e,t)=>{var n=pW(),r=SU(),i=CU(),a=i&&i.isSet;t.exports=a?r(a):n})),hW=n(((e,t)=>{var n=oU(),r=sU(),i=uU(),a=MU(),o=IU(),s=LU(),c=RU(),l=HU(),u=KU(),d=JU(),f=YU(),p=eW(),m=tW(),h=cW(),g=uW(),_=gU(),v=vU(),y=fW(),b=FH(),x=mW(),S=jU(),C=FU(),w=1,T=2,E=4,D=`[object Arguments]`,O=`[object Array]`,k=`[object Boolean]`,A=`[object Date]`,j=`[object Error]`,M=`[object Function]`,N=`[object GeneratorFunction]`,P=`[object Map]`,F=`[object Number]`,I=`[object Object]`,L=`[object RegExp]`,R=`[object Set]`,z=`[object String]`,B=`[object Symbol]`,ee=`[object WeakMap]`,te=`[object ArrayBuffer]`,ne=`[object DataView]`,V=`[object Float32Array]`,re=`[object Float64Array]`,ie=`[object Int8Array]`,ae=`[object Int16Array]`,oe=`[object Int32Array]`,H=`[object Uint8Array]`,se=`[object Uint8ClampedArray]`,U=`[object Uint16Array]`,ce=`[object Uint32Array]`,W={};W[D]=W[O]=W[te]=W[ne]=W[k]=W[A]=W[V]=W[re]=W[ie]=W[ae]=W[oe]=W[P]=W[F]=W[I]=W[L]=W[R]=W[z]=W[B]=W[H]=W[se]=W[U]=W[ce]=!0,W[j]=W[M]=W[ee]=!1;function le(e,t,O,k,A,j){var P,F=t&w,L=t&T,R=t&E;if(O&&(P=A?O(e,k,A,j):O(e)),P!==void 0)return P;if(!b(e))return e;var z=_(e);if(z){if(P=m(e),!F)return c(e,P)}else{var B=p(e),ee=B==M||B==N;if(v(e))return s(e,F);if(B==I||B==D||ee&&!A){if(P=L||ee?{}:g(e),!F)return L?u(e,o(P,e)):l(e,a(P,e))}else{if(!W[B])return A?e:{};P=h(e,B,F)}}j||=new n;var te=j.get(e);if(te)return te;j.set(e,P),x(e)?e.forEach(function(n){P.add(le(n,t,O,n,e,j))}):y(e)&&e.forEach(function(n,r){P.set(r,le(n,t,O,r,e,j))});var ne=z?void 0:(R?L?f:d:L?C:S)(e);return r(ne||e,function(n,r){ne&&(r=n,n=e[r]),i(P,r,le(n,t,O,r,e,j))}),P}t.exports=le})),gW=n(((e,t)=>{var n=hW(),r=4;function i(e){return n(e,r)}t.exports=i})),_W=n(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),vW=n(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),yW=n(((e,t)=>{t.exports=vW()()})),bW=n(((e,t)=>{var n=yW(),r=jU();function i(e,t){return e&&n(e,t,r)}t.exports=i})),xW=n(((e,t)=>{var n=AU();function r(e,t){return function(r,i){if(r==null)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}t.exports=r})),SW=n(((e,t)=>{var n=bW();t.exports=xW()(n)})),CW=n(((e,t)=>{function n(e){return e}t.exports=n})),wW=n(((e,t)=>{var n=CW();function r(e){return typeof e==`function`?e:n}t.exports=r})),TW=n(((e,t)=>{var n=sU(),r=SW(),i=wW(),a=gU();function o(e,t){return(a(e)?n:r)(e,i(t))}t.exports=o})),EW=n(((e,t)=>{t.exports=TW()})),DW=n(((e,t)=>{var n=SW();function r(e,t){var r=[];return n(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}t.exports=r})),OW=n(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),kW=n(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),AW=n(((e,t)=>{var n=iU(),r=OW(),i=kW();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),jW=n(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),MW=n(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),NW=n(((e,t)=>{var n=AW(),r=jW(),i=MW(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),PW=n(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),FW=n(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),IW=n(((e,t)=>{var n=jH(),r=nW(),i=vH(),a=NW(),o=PW(),s=FW(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),LW=n(((e,t)=>{var n=JU(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),RW=n(((e,t)=>{var n=oU(),r=NW(),i=IW(),a=LW(),o=eW(),s=gU(),c=vU(),l=wU(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),zW=n(((e,t)=>{var n=RW(),r=pU();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),BW=n(((e,t)=>{var n=oU(),r=zW(),i=1,a=2;function o(e,t,o,s){var c=o.length,l=c,u=!s;if(e==null)return!l;for(e=Object(e);c--;){var d=o[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++c<l;){d=o[c];var f=d[0],p=e[f],m=d[1];if(u&&d[2]){if(p===void 0&&!(f in e))return!1}else{var h=new n;if(s)var g=s(p,m,f,e,t,h);if(!(g===void 0?r(m,p,i|a,s,h):g))return!1}}return!0}t.exports=o})),VW=n(((e,t)=>{var n=FH();function r(e){return e===e&&!n(e)}t.exports=r})),HW=n(((e,t)=>{var n=VW(),r=jU();function i(e){for(var t=r(e),i=t.length;i--;){var a=t[i],o=e[a];t[i]=[a,o,n(o)]}return t}t.exports=i})),UW=n(((e,t)=>{function n(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}t.exports=n})),WW=n(((e,t)=>{var n=BW(),r=HW(),i=UW();function a(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}t.exports=a})),GW=n(((e,t)=>{var n=PH(),r=pU(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),KW=n(((e,t)=>{var n=gU(),r=GW(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),qW=n(((e,t)=>{var n=iU(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),JW=n(((e,t)=>{var n=qW(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),YW=n(((e,t)=>{var n=JW(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),XW=n(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),ZW=n(((e,t)=>{var n=jH(),r=XW(),i=gU(),a=GW(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),QW=n(((e,t)=>{var n=ZW();function r(e){return e==null?``:n(e)}t.exports=r})),$W=n(((e,t)=>{var n=gU(),r=KW(),i=YW(),a=QW();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),eG=n(((e,t)=>{var n=GW(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),tG=n(((e,t)=>{var n=$W(),r=eG();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),nG=n(((e,t)=>{var n=tG();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),rG=n(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),iG=n(((e,t)=>{var n=$W(),r=hU(),i=gU(),a=yU(),o=bU(),s=eG();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),aG=n(((e,t)=>{var n=rG(),r=iG();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),oG=n(((e,t)=>{var n=zW(),r=nG(),i=aG(),a=KW(),o=VW(),s=UW(),c=eG(),l=1,u=2;function d(e,t){return a(e)&&o(t)?s(c(e),t):function(a){var o=r(a,e);return o===void 0&&o===t?i(a,e):n(t,o,l|u)}}t.exports=d})),sG=n(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),cG=n(((e,t)=>{var n=tG();function r(e){return function(t){return n(t,e)}}t.exports=r})),lG=n(((e,t)=>{var n=sG(),r=cG(),i=KW(),a=eG();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),uG=n(((e,t)=>{var n=WW(),r=oG(),i=CW(),a=gU(),o=lG();function s(e){return typeof e==`function`?e:e==null?i:typeof e==`object`?a(e)?r(e[0],e[1]):n(e):o(e)}t.exports=s})),dG=n(((e,t)=>{var n=zU(),r=DW(),i=uG(),a=gU();function o(e,t){return(a(e)?n:r)(e,i(t,3))}t.exports=o})),fG=n(((e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e,t){return e!=null&&n.call(e,t)}t.exports=r})),pG=n(((e,t)=>{var n=fG(),r=iG();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),mG=n(((e,t)=>{var n=kU(),r=eW(),i=hU(),a=gU(),o=AU(),s=vU(),c=EU(),l=wU(),u=`[object Map]`,d=`[object Set]`,f=Object.prototype.hasOwnProperty;function p(e){if(e==null)return!0;if(o(e)&&(a(e)||typeof e==`string`||typeof e.splice==`function`||s(e)||l(e)||i(e)))return!e.length;var t=r(e);if(t==u||t==d)return!e.size;if(c(e))return!n(e).length;for(var p in e)if(f.call(e,p))return!1;return!0}t.exports=p})),hG=n(((e,t)=>{function n(e){return e===void 0}t.exports=n})),gG=n(((e,t)=>{var n=SW(),r=AU();function i(e,t){var i=-1,a=r(e)?Array(e.length):[];return n(e,function(e,n,r){a[++i]=t(e,n,r)}),a}t.exports=i})),_G=n(((e,t)=>{var n=XW(),r=uG(),i=gG(),a=gU();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),vG=n(((e,t)=>{function n(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}t.exports=n})),yG=n(((e,t)=>{function n(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}t.exports=n})),bG=n(((e,t)=>{var n=vG(),r=SW(),i=uG(),a=yG(),o=gU();function s(e,t,s){var c=o(e)?n:a,l=arguments.length<3;return c(e,i(t,4),s,l,r)}t.exports=s})),xG=n(((e,t)=>{var n=PH(),r=gU(),i=pU(),a=`[object String]`;function o(e){return typeof e==`string`||!r(e)&&i(e)&&n(e)==a}t.exports=o})),SG=n(((e,t)=>{t.exports=sG()(`length`)})),CG=n(((e,t)=>{var n=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function r(e){return n.test(e)}t.exports=r})),wG=n(((e,t)=>{var n=`\\ud800-\\udfff`,r=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,i=`\\ufe0e\\ufe0f`,a=`[`+n+`]`,o=`[`+r+`]`,s=`\\ud83c[\\udffb-\\udfff]`,c=`(?:`+o+`|`+s+`)`,l=`[^`+n+`]`,u=`(?:\\ud83c[\\udde6-\\uddff]){2}`,d=`[\\ud800-\\udbff][\\udc00-\\udfff]`,f=`\\u200d`,p=c+`?`,m=`[`+i+`]?`,h=`(?:`+f+`(?:`+[l,u,d].join(`|`)+`)`+m+p+`)*`,g=m+p+h,_=`(?:`+[l+o+`?`,o,u,d,a].join(`|`)+`)`,v=RegExp(s+`(?=`+s+`)|`+_+g,`g`);function y(e){for(var t=v.lastIndex=0;v.test(e);)++t;return t}t.exports=y})),TG=n(((e,t)=>{var n=SG(),r=CG(),i=wG();function a(e){return r(e)?i(e):n(e)}t.exports=a})),EG=n(((e,t)=>{var n=kU(),r=eW(),i=AU(),a=xG(),o=TG(),s=`[object Map]`,c=`[object Set]`;function l(e){if(e==null)return 0;if(i(e))return a(e)?o(e):e.length;var t=r(e);return t==s||t==c?e.size:n(e).length}t.exports=l})),DG=n(((e,t)=>{var n=sU(),r=lW(),i=bW(),a=uG(),o=WU(),s=gU(),c=vU(),l=IH(),u=FH(),d=wU();function f(e,t,f){var p=s(e),m=p||c(e)||d(e);if(t=a(t,4),f==null){var h=e&&e.constructor;f=m?p?new h:[]:u(e)&&l(h)?r(o(e)):{}}return(m?n:i)(e,function(e,n,r){return t(f,e,n,r)}),f}t.exports=f})),OG=n(((e,t)=>{var n=jH(),r=hU(),i=gU(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),kG=n(((e,t)=>{var n=UU(),r=OG();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),AG=n(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),jG=n(((e,t)=>{var n=AG(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),MG=n(((e,t)=>{var n=_W(),r=cU(),i=CW();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),NG=n(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),PG=n(((e,t)=>{var n=MG();t.exports=NG()(n)})),FG=n(((e,t)=>{var n=CW(),r=jG(),i=PG();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),IG=n(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),LG=n(((e,t)=>{function n(e){return e!==e}t.exports=n})),RG=n(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),zG=n(((e,t)=>{var n=IG(),r=LG(),i=RG();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),BG=n(((e,t)=>{var n=zG();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),VG=n(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),HG=n(((e,t)=>{function n(){}t.exports=n})),UG=n(((e,t)=>{var n=QU(),r=HG(),i=FW();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),WG=n(((e,t)=>{var n=AW(),r=BG(),i=VG(),a=MW(),o=UG(),s=FW(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u<f;){var _=e[u],v=t?t(_):_;if(_=l||_!==0?_:0,p&&v===v){for(var y=h.length;y--;)if(h[y]===v)continue outer;t&&h.push(v),m.push(_)}else d(h,v,l)||(h!==m&&h.push(v),m.push(_))}return m}t.exports=l})),GG=n(((e,t)=>{var n=AU(),r=pU();function i(e){return r(e)&&n(e)}t.exports=i})),KG=n(((e,t)=>{var n=kG(),r=FG(),i=WG(),a=GG();t.exports=r(function(e){return i(n(e,1,a,!0))})})),qG=n(((e,t)=>{var n=XW();function r(e,t){return n(t,function(t){return e[t]})}t.exports=r})),JG=n(((e,t)=>{var n=qG(),r=jU();function i(e){return e==null?[]:n(e,r(e))}t.exports=i})),YG=n(((e,t)=>{var n;if(typeof r==`function`)try{n={clone:gW(),constant:_W(),each:EW(),filter:dG(),has:pG(),isArray:gU(),isEmpty:mG(),isFunction:IH(),isUndefined:hG(),keys:jU(),map:_G(),reduce:bG(),size:EG(),transform:DG(),union:KG(),values:JG()}}catch{}n||=window._,t.exports=n})),XG=n(((e,t)=>{var n=YG();t.exports=o;var r=`\0`,i=`\0`,a=``;function o(e){this._isDirected=!n.has(e,`directed`)||e.directed,this._isMultigraph=n.has(e,`multigraph`)?e.multigraph:!1,this._isCompound=n.has(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=n.constant(void 0),this._defaultEdgeLabelFn=n.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(e){return this._label=e,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(e){return n.isFunction(e)||(e=n.constant(e)),this._defaultNodeLabelFn=e,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return n.keys(this._nodes)},o.prototype.sources=function(){var e=this;return n.filter(this.nodes(),function(t){return n.isEmpty(e._in[t])})},o.prototype.sinks=function(){var e=this;return n.filter(this.nodes(),function(t){return n.isEmpty(e._out[t])})},o.prototype.setNodes=function(e,t){var r=arguments,i=this;return n.each(e,function(e){r.length>1?i.setNode(e,t):i.setNode(e)}),this},o.prototype.setNode=function(e,t){return n.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},o.prototype.node=function(e){return this._nodes[e]},o.prototype.hasNode=function(e){return n.has(this._nodes,e)},o.prototype.removeNode=function(e){var t=this;if(n.has(this._nodes,e)){var r=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],n.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),n.each(n.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],n.each(n.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},o.prototype.setParent=function(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(n.isUndefined(t))t=i;else{t+=``;for(var r=t;!n.isUndefined(r);r=this.parent(r))if(r===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},o.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},o.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},o.prototype.children=function(e){if(n.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return n.keys(t)}else if(e===i)return this.nodes();else if(this.hasNode(e))return[]},o.prototype.predecessors=function(e){var t=this._preds[e];if(t)return n.keys(t)},o.prototype.successors=function(e){var t=this._sucs[e];if(t)return n.keys(t)},o.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return n.union(t,this.successors(e))},o.prototype.isLeaf=function(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0},o.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;n.each(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),n.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var i={};function a(e){var n=r.parent(e);return n===void 0||t.hasNode(n)?(i[e]=n,n):n in i?i[n]:a(n)}return this._isCompound&&n.each(t.nodes(),function(e){t.setParent(e,a(e))}),t},o.prototype.setDefaultEdgeLabel=function(e){return n.isFunction(e)||(e=n.constant(e)),this._defaultEdgeLabelFn=e,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return n.values(this._edgeObjs)},o.prototype.setPath=function(e,t){var r=this,i=arguments;return n.reduce(e,function(e,n){return i.length>1?r.setEdge(e,n,t):r.setEdge(e,n),n}),this},o.prototype.setEdge=function(){var e,t,r,i,a=!1,o=arguments[0];typeof o==`object`&&o&&`v`in o?(e=o.v,t=o.w,r=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,t=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=``+e,t=``+t,n.isUndefined(r)||(r=``+r);var c=l(this._isDirected,e,t,r);if(n.has(this._edgeLabels,c))return a&&(this._edgeLabels[c]=i),this;if(!n.isUndefined(r)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[c]=a?i:this._defaultEdgeLabelFn(e,t,r);var d=u(this._isDirected,e,t,r);return e=d.v,t=d.w,Object.freeze(d),this._edgeObjs[c]=d,s(this._preds[t],e),s(this._sucs[e],t),this._in[t][c]=d,this._out[e][c]=d,this._edgeCount++,this},o.prototype.edge=function(e,t,n){var r=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(e,t,r){var i=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,e,t,r);return n.has(this._edgeLabels,i)},o.prototype.removeEdge=function(e,t,n){var r=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},o.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var i=n.values(r);return t?n.filter(i,function(e){return e.v===t}):i}},o.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var i=n.values(r);return t?n.filter(i,function(e){return e.w===t}):i}},o.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))};function s(e,t){e[t]?e[t]++:e[t]=1}function c(e,t){--e[t]||delete e[t]}function l(e,t,i,o){var s=``+t,c=``+i;if(!e&&s>c){var l=s;s=c,c=l}return s+a+c+a+(n.isUndefined(o)?r:o)}function u(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function d(e,t){return l(e,t.v,t.w,t.name)}})),ZG=n(((e,t)=>{t.exports=`2.1.8`})),QG=n(((e,t)=>{t.exports={Graph:XG(),version:ZG()}})),$G=n(((e,t)=>{var n=YG(),r=XG();t.exports={write:i,read:s};function i(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:a(e),edges:o(e)};return n.isUndefined(e.graph())||(t.value=n.clone(e.graph())),t}function a(e){return n.map(e.nodes(),function(t){var r=e.node(t),i=e.parent(t),a={v:t};return n.isUndefined(r)||(a.value=r),n.isUndefined(i)||(a.parent=i),a})}function o(e){return n.map(e.edges(),function(t){var r=e.edge(t),i={v:t.v,w:t.w};return n.isUndefined(t.name)||(i.name=t.name),n.isUndefined(r)||(i.value=r),i})}function s(e){var t=new r(e.options).setGraph(e.value);return n.each(e.nodes,function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),n.each(e.edges,function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}})),eK=n(((e,t)=>{var n=YG();t.exports=r;function r(e){var t={},r=[],i;function a(r){n.has(t,r)||(t[r]=!0,i.push(r),n.each(e.successors(r),a),n.each(e.predecessors(r),a))}return n.each(e.nodes(),function(e){i=[],a(e),i.length&&r.push(i)}),r}})),tK=n(((e,t)=>{var n=YG();t.exports=r;function r(){this._arr=[],this._keyIndices={}}r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(e){return e.key})},r.prototype.has=function(e){return n.has(this._keyIndices,e)},r.prototype.priority=function(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority},r.prototype.min=function(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key},r.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!n.has(r,e)){var i=this._arr,a=i.length;return r[e]=a,i.push({key:e,priority:t}),this._decrease(a),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},r.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw Error(`New priority is greater than current priority. Key: `+e+` Old: `+this._arr[n].priority+` New: `+t);this._arr[n].priority=t,this._decrease(n)},r.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))},r.prototype._decrease=function(e){for(var t=this._arr,n=t[e].priority,r;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r},r.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}})),nK=n(((e,t)=>{var n=YG(),r=tK();t.exports=a;var i=n.constant(1);function a(e,t,n,r){return o(e,String(t),n||i,r||function(t){return e.outEdges(t)})}function o(e,t,n,i){var a={},o=new r,s,c,l=function(e){var t=e.v===s?e.w:e.v,r=a[t],i=n(e),l=c.distance+i;if(i<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+i);l<r.distance&&(r.distance=l,r.predecessor=s,o.decrease(t,l))};for(e.nodes().forEach(function(e){var n=e===t?0:1/0;a[e]={distance:n},o.add(e,n)});o.size()>0&&(s=o.removeMin(),c=a[s],c.distance!==1/0);)i(s).forEach(l);return a}})),rK=n(((e,t)=>{var n=nK(),r=YG();t.exports=i;function i(e,t,i){return r.transform(e.nodes(),function(r,a){r[a]=n(e,a,t,i)},{})}})),iK=n(((e,t)=>{var n=YG();t.exports=r;function r(e){var t=0,r=[],i={},a=[];function o(s){var c=i[s]={onStack:!0,lowlink:t,index:t++};if(r.push(s),e.successors(s).forEach(function(e){n.has(i,e)?i[e].onStack&&(c.lowlink=Math.min(c.lowlink,i[e].index)):(o(e),c.lowlink=Math.min(c.lowlink,i[e].lowlink))}),c.lowlink===c.index){var l=[],u;do u=r.pop(),i[u].onStack=!1,l.push(u);while(s!==u);a.push(l)}}return e.nodes().forEach(function(e){n.has(i,e)||o(e)}),a}})),aK=n(((e,t)=>{var n=YG(),r=iK();t.exports=i;function i(e){return n.filter(r(e),function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}})),oK=n(((e,t)=>{var n=YG();t.exports=i;var r=n.constant(1);function i(e,t,n){return a(e,t||r,n||function(t){return e.outEdges(t)})}function a(e,t,n){var r={},i=e.nodes();return i.forEach(function(e){r[e]={},r[e][e]={distance:0},i.forEach(function(t){e!==t&&(r[e][t]={distance:1/0})}),n(e).forEach(function(n){var i=n.v===e?n.w:n.v,a=t(n);r[e][i]={distance:a,predecessor:e}})}),i.forEach(function(e){var t=r[e];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[e],i=t[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),r}})),sK=n(((e,t)=>{var n=YG();t.exports=r,r.CycleException=i;function r(e){var t={},r={},a=[];function o(s){if(n.has(r,s))throw new i;n.has(t,s)||(r[s]=!0,t[s]=!0,n.each(e.predecessors(s),o),delete r[s],a.push(s))}if(n.each(e.sinks(),o),n.size(t)!==e.nodeCount())throw new i;return a}function i(){}i.prototype=Error()})),cK=n(((e,t)=>{var n=sK();t.exports=r;function r(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}})),lK=n(((e,t)=>{var n=YG();t.exports=r;function r(e,t,r){n.isArray(t)||(t=[t]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],s={};return n.each(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);i(e,t,r===`post`,s,a,o)}),o}function i(e,t,r,a,o,s){n.has(a,t)||(a[t]=!0,r||s.push(t),n.each(o(t),function(t){i(e,t,r,a,o,s)}),r&&s.push(t))}})),uK=n(((e,t)=>{var n=lK();t.exports=r;function r(e,t){return n(e,t,`post`)}})),dK=n(((e,t)=>{var n=lK();t.exports=r;function r(e,t){return n(e,t,`pre`)}})),fK=n(((e,t)=>{var n=YG(),r=XG(),i=tK();t.exports=a;function a(e,t){var a=new r,o={},s=new i,c;function l(e){var n=e.v===c?e.w:e.v,r=s.priority(n);if(r!==void 0){var i=t(e);i<r&&(o[n]=c,s.decrease(n,i))}}if(e.nodeCount()===0)return a;n.each(e.nodes(),function(e){s.add(e,1/0),a.setNode(e)}),s.decrease(e.nodes()[0],0);for(var u=!1;s.size()>0;){if(c=s.removeMin(),n.has(o,c))a.setEdge(c,o[c]);else if(u)throw Error(`Input graph is not connected: `+e);else u=!0;e.nodeEdges(c).forEach(l)}return a}})),pK=n(((e,t)=>{t.exports={components:eK(),dijkstra:nK(),dijkstraAll:rK(),findCycles:aK(),floydWarshall:oK(),isAcyclic:cK(),postorder:uK(),preorder:dK(),prim:fK(),tarjan:iK(),topsort:sK()}})),mK=n(((e,t)=>{var n=QG();t.exports={Graph:n.Graph,json:$G(),alg:pK(),version:n.version}})),hK=n(((e,t)=>{var n;if(typeof r==`function`)try{n=mK()}catch{}n||=window.graphlib,t.exports=n})),gK=n(((e,t)=>{var n=hW(),r=1,i=4;function a(e){return n(e,r|i)}t.exports=a})),_K=n(((e,t)=>{var n=vH(),r=AU(),i=yU(),a=FH();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),vK=n(((e,t)=>{var n=FG(),r=vH(),i=_K(),a=FU(),o=Object.prototype,s=o.hasOwnProperty;t.exports=n(function(e,t){e=Object(e);var n=-1,c=t.length,l=c>2?t[2]:void 0;for(l&&i(t[0],t[1],l)&&(c=1);++n<c;)for(var u=t[n],d=a(u),f=-1,p=d.length;++f<p;){var m=d[f],h=e[m];(h===void 0||r(h,o[m])&&!s.call(e,m))&&(e[m]=u[m])}return e})})),yK=n(((e,t)=>{var n=uG(),r=AU(),i=jU();function a(e){return function(t,a,o){var s=Object(t);if(!r(t)){var c=n(a,3);t=i(t),a=function(e){return c(s[e],e,s)}}var l=e(t,a,o);return l>-1?s[c?t[l]:l]:void 0}}t.exports=a})),bK=n(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),xK=n(((e,t)=>{var n=bK(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),SK=n(((e,t)=>{var n=xK(),r=FH(),i=GW(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),CK=n(((e,t)=>{var n=SK(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),wK=n(((e,t)=>{var n=CK();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),TK=n(((e,t)=>{var n=IG(),r=uG(),i=wK(),a=Math.max;function o(e,t,o){var s=e==null?0:e.length;if(!s)return-1;var c=o==null?0:i(o);return c<0&&(c=a(s+c,0)),n(e,r(t,3),c)}t.exports=o})),EK=n(((e,t)=>{t.exports=yK()(TK())})),DK=n(((e,t)=>{var n=kG();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),OK=n(((e,t)=>{var n=yW(),r=wW(),i=FU();function a(e,t){return e==null?e:n(e,r(t),i)}t.exports=a})),kK=n(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n})),AK=n(((e,t)=>{var n=lU(),r=bW(),i=uG();function a(e,t){var a={};return t=i(t,3),r(e,function(e,r,i){n(a,r,t(e,r,i))}),a}t.exports=a})),jK=n(((e,t)=>{var n=GW();function r(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===void 0?s===s&&!n(s):r(s,c)))var c=s,l=o}return l}t.exports=r})),MK=n(((e,t)=>{function n(e,t){return e>t}t.exports=n})),NK=n(((e,t)=>{var n=jK(),r=MK(),i=CW();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),PK=n(((e,t)=>{var n=lU(),r=vH();function i(e,t,i){(i!==void 0&&!r(e[t],i)||i===void 0&&!(t in e))&&n(e,t,i)}t.exports=i})),FK=n(((e,t)=>{var n=PH(),r=WU(),i=pU(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),IK=n(((e,t)=>{function n(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}t.exports=n})),LK=n(((e,t)=>{var n=dU(),r=FU();function i(e){return n(e,r(e))}t.exports=i})),RK=n(((e,t)=>{var n=PK(),r=LU(),i=sW(),a=RU(),o=uW(),s=hU(),c=gU(),l=GG(),u=vU(),d=IH(),f=FH(),p=FK(),m=wU(),h=IK(),g=LK();function _(e,t,_,v,y,b,x){var S=h(e,_),C=h(t,_),w=x.get(C);if(w)n(e,_,w);else{var T=b?b(S,C,_+``,e,t,x):void 0,E=T===void 0;if(E){var D=c(C),O=!D&&u(C),k=!D&&!O&&m(C);T=C,D||O||k?c(S)?T=S:l(S)?T=a(S):O?(E=!1,T=r(C,!0)):k?(E=!1,T=i(C,!0)):T=[]:p(C)||s(C)?(T=S,s(S)?T=g(S):(!f(S)||d(S))&&(T=o(C))):E=!1}E&&(x.set(C,T),y(T,C,v,b,x),x.delete(C)),n(e,_,T)}}t.exports=_})),zK=n(((e,t)=>{var n=oU(),r=PK(),i=yW(),a=RK(),o=FH(),s=FU(),c=IK();function l(e,t,u,d,f){e!==t&&i(t,function(i,s){if(f||=new n,o(i))a(e,t,s,u,l,d,f);else{var p=d?d(c(e,s),i,s+``,e,t,f):void 0;p===void 0&&(p=i),r(e,s,p)}},s)}t.exports=l})),BK=n(((e,t)=>{var n=FG(),r=_K();function i(e){return n(function(t,n){var i=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=e.length>3&&typeof o==`function`?(a--,o):void 0,s&&r(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++i<a;){var c=n[i];c&&e(t,c,i,o)}return t})}t.exports=i})),VK=n(((e,t)=>{var n=zK();t.exports=BK()(function(e,t,r){n(e,t,r)})})),HK=n(((e,t)=>{function n(e,t){return e<t}t.exports=n})),UK=n(((e,t)=>{var n=jK(),r=HK(),i=CW();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),WK=n(((e,t)=>{var n=jK(),r=uG(),i=HK();function a(e,t){return e&&e.length?n(e,r(t,2),i):void 0}t.exports=a})),GK=n(((e,t)=>{var n=AH();t.exports=function(){return n.Date.now()}})),KK=n(((e,t)=>{var n=uU(),r=$W(),i=yU(),a=FH(),o=eG();function s(e,t,s,c){if(!a(e))return e;t=r(t,e);for(var l=-1,u=t.length,d=u-1,f=e;f!=null&&++l<u;){var p=o(t[l]),m=s;if(p===`__proto__`||p===`constructor`||p===`prototype`)return e;if(l!=d){var h=f[p];m=c?c(h,p,f):void 0,m===void 0&&(m=a(h)?h:i(t[l+1])?[]:{})}n(f,p,m),f=f[p]}return e}t.exports=s})),qK=n(((e,t)=>{var n=tG(),r=KK(),i=$W();function a(e,t,a){for(var o=-1,s=t.length,c={};++o<s;){var l=t[o],u=n(e,l);a(u,l)&&r(c,i(l,e),u)}return c}t.exports=a})),JK=n(((e,t)=>{var n=qK(),r=aG();function i(e,t){return n(e,t,function(t,n){return r(e,n)})}t.exports=i})),YK=n(((e,t)=>{var n=DK(),r=jG(),i=PG();function a(e){return i(r(e,void 0,n),e+``)}t.exports=a})),XK=n(((e,t)=>{var n=JK();t.exports=YK()(function(e,t){return e==null?{}:n(e,t)})})),ZK=n(((e,t)=>{var n=Math.ceil,r=Math.max;function i(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=e,e+=i;return c}t.exports=i})),QK=n(((e,t)=>{var n=ZK(),r=_K(),i=CK();function a(e){return function(t,a,o){return o&&typeof o!=`number`&&r(t,a,o)&&(a=o=void 0),t=i(t),a===void 0?(a=t,t=0):a=i(a),o=o===void 0?t<a?1:-1:i(o),n(t,a,o,e)}}t.exports=a})),$K=n(((e,t)=>{t.exports=QK()()})),eq=n(((e,t)=>{function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n})),tq=n(((e,t)=>{var n=GW();function r(e,t){if(e!==t){var r=e!==void 0,i=e===null,a=e===e,o=n(e),s=t!==void 0,c=t===null,l=t===t,u=n(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}t.exports=r})),nq=n(((e,t)=>{var n=tq();function r(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*(r[i]==`desc`?-1:1)}return e.index-t.index}t.exports=r})),rq=n(((e,t)=>{var n=XW(),r=tG(),i=uG(),a=gG(),o=eq(),s=SU(),c=nq(),l=CW(),u=gU();function d(e,t,d){t=t.length?n(t,function(e){return u(e)?function(t){return r(t,e.length===1?e[0]:e)}:e}):[l];var f=-1;return t=n(t,s(i)),o(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,d)})}t.exports=d})),iq=n(((e,t)=>{var n=kG(),r=rq(),i=FG(),a=_K();t.exports=i(function(e,t){if(e==null)return[];var i=t.length;return i>1&&a(e,t[0],t[1])?t=[]:i>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])})})),aq=n(((e,t)=>{var n=QW(),r=0;function i(e){var t=++r;return n(e)+t}t.exports=i})),oq=n(((e,t)=>{function n(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}t.exports=n})),sq=n(((e,t)=>{var n=uU(),r=oq();function i(e,t){return r(e||[],t||[],n)}t.exports=i})),cq=n(((e,t)=>{var n;if(typeof r==`function`)try{n={cloneDeep:gK(),constant:_W(),defaults:vK(),each:EW(),filter:dG(),find:EK(),flatten:DK(),forEach:TW(),forIn:OK(),has:pG(),isUndefined:hG(),last:kK(),map:_G(),mapValues:AK(),max:NK(),merge:VK(),min:UK(),minBy:WK(),now:GK(),pick:XK(),range:$K(),reduce:bG(),sortBy:iq(),uniqueId:aq(),values:JG(),zipObject:sq()}}catch{}n||=window._,t.exports=n})),lq=n(((e,t)=>{t.exports=n;function n(){var e={};e._next=e._prev=e,this._sentinel=e}n.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return r(t),t},n.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},n.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return`[`+e.join(`, `)+`]`};function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if(e!==`_next`&&e!==`_prev`)return t}})),uq=n(((e,t)=>{var n=cq(),r=hK().Graph,i=lq();t.exports=o;var a=n.constant(1);function o(e,t){if(e.nodeCount()<=1)return[];var r=l(e,t||a),i=s(r.graph,r.buckets,r.zeroIdx);return n.flatten(n.map(i,function(t){return e.outEdges(t.v,t.w)}),!0)}function s(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)c(e,t,n,o);for(;o=i.dequeue();)c(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(c(e,t,n,o,!0));break}}}return r}function c(e,t,r,i,a){var o=a?[]:void 0;return n.forEach(e.inEdges(i.v),function(n){var i=e.edge(n),s=e.node(n.v);a&&o.push({v:n.v,w:n.w}),s.out-=i,u(t,r,s)}),n.forEach(e.outEdges(i.v),function(n){var i=e.edge(n),a=n.w,o=e.node(a);o.in-=i,u(t,r,o)}),e.removeNode(i.v),o}function l(e,t){var a=new r,o=0,s=0;n.forEach(e.nodes(),function(e){a.setNode(e,{v:e,in:0,out:0})}),n.forEach(e.edges(),function(e){var n=a.edge(e.v,e.w)||0,r=t(e),i=n+r;a.setEdge(e.v,e.w,i),s=Math.max(s,a.node(e.v).out+=r),o=Math.max(o,a.node(e.w).in+=r)});var c=n.range(s+o+3).map(function(){return new i}),l=o+1;return n.forEach(a.nodes(),function(e){u(c,l,a.node(e))}),{graph:a,buckets:c,zeroIdx:l}}function u(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}})),dq=n(((e,t)=>{var n=cq(),r=uq();t.exports={run:i,undo:o};function i(e){var t=e.graph().acyclicer===`greedy`?r(e,i(e)):a(e);n.forEach(t,function(t){var r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,n.uniqueId(`rev`))});function i(e){return function(t){return e.edge(t).weight}}}function a(e){var t=[],r={},i={};function a(o){n.has(i,o)||(i[o]=!0,r[o]=!0,n.forEach(e.outEdges(o),function(e){n.has(r,e.w)?t.push(e):a(e.w)}),delete r[o])}return n.forEach(e.nodes(),a),t}function o(e){n.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}})),fq=n(((e,t)=>{var n=cq(),r=hK().Graph;t.exports={addDummyNode:i,simplify:a,asNonCompoundGraph:o,successorWeights:s,predecessorWeights:c,intersectRect:l,buildLayerMatrix:u,normalizeRanks:d,removeEmptyRanks:f,addBorderNode:p,maxRank:m,partition:h,time:g,notime:_};function i(e,t,r,i){var a;do a=n.uniqueId(i);while(e.hasNode(a));return r.dummy=t,e.setNode(a,r),a}function a(e){var t=new r().setGraph(e.graph());return n.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),n.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function o(e){var t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return n.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),n.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function s(e){var t=n.map(e.nodes(),function(t){var r={};return n.forEach(e.outEdges(t),function(t){r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return n.zipObject(e.nodes(),t)}function c(e){var t=n.map(e.nodes(),function(t){var r={};return n.forEach(e.inEdges(t),function(t){r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return n.zipObject(e.nodes(),t)}function l(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function u(e){var t=n.map(n.range(m(e)+1),function(){return[]});return n.forEach(e.nodes(),function(r){var i=e.node(r),a=i.rank;n.isUndefined(a)||(t[a][i.order]=r)}),t}function d(e){var t=n.min(n.map(e.nodes(),function(t){return e.node(t).rank}));n.forEach(e.nodes(),function(r){var i=e.node(r);n.has(i,`rank`)&&(i.rank-=t)})}function f(e){var t=n.min(n.map(e.nodes(),function(t){return e.node(t).rank})),r=[];n.forEach(e.nodes(),function(n){var i=e.node(n).rank-t;r[i]||(r[i]=[]),r[i].push(n)});var i=0,a=e.graph().nodeRankFactor;n.forEach(r,function(t,r){n.isUndefined(t)&&r%a!==0?--i:i&&n.forEach(t,function(t){e.node(t).rank+=i})})}function p(e,t,n,r){var a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=r),i(e,`border`,a,t)}function m(e){return n.max(n.map(e.nodes(),function(t){var r=e.node(t).rank;if(!n.isUndefined(r))return r}))}function h(e,t){var r={lhs:[],rhs:[]};return n.forEach(e,function(e){t(e)?r.lhs.push(e):r.rhs.push(e)}),r}function g(e,t){var r=n.now();try{return t()}finally{console.log(e+` time: `+(n.now()-r)+`ms`)}}function _(e,t){return t()}})),pq=n(((e,t)=>{var n=cq(),r=fq();t.exports={run:i,undo:o};function i(e){e.graph().dummyChains=[],n.forEach(e.edges(),function(t){a(e,t)})}function a(e,t){var n=t.v,i=e.node(n).rank,a=t.w,o=e.node(a).rank,s=t.name,c=e.edge(t),l=c.labelRank;if(o!==i+1){e.removeEdge(t);var u,d,f=0;for(++i;i<o;++f,++i)c.points=[],d={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},u=r.addDummyNode(e,`edge`,d,`_d`),i===l&&(d.width=c.width,d.height=c.height,d.dummy=`edge-label`,d.labelpos=c.labelpos),e.setEdge(n,u,{weight:c.weight},s),f===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,a,{weight:c.weight},s)}}function o(e){n.forEach(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}})),mq=n(((e,t)=>{var n=cq();t.exports={longestPath:r,slack:i};function r(e){var t={};function r(i){var a=e.node(i);if(n.has(t,i))return a.rank;t[i]=!0;var o=n.min(n.map(e.outEdges(i),function(t){return r(t.w)-e.edge(t).minlen}));return(o===1/0||o==null)&&(o=0),a.rank=o}n.forEach(e.sources(),r)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}})),hq=n(((e,t)=>{var n=cq(),r=hK().Graph,i=mq().slack;t.exports=a;function a(e){var t=new r({directed:!1}),n=e.nodes()[0],a=e.nodeCount();t.setNode(n,{});for(var l,u;o(t,e)<a;)l=s(t,e),u=t.hasNode(l.v)?i(e,l):-i(e,l),c(t,e,u);return t}function o(e,t){function r(a){n.forEach(t.nodeEdges(a),function(n){var o=n.v,s=a===o?n.w:o;!e.hasNode(s)&&!i(t,n)&&(e.setNode(s,{}),e.setEdge(a,s,{}),r(s))})}return n.forEach(e.nodes(),r),e.nodeCount()}function s(e,t){return n.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)})}function c(e,t,r){n.forEach(e.nodes(),function(e){t.node(e).rank+=r})}})),gq=n(((e,t)=>{var n=cq(),r=hq(),i=mq().slack,a=mq().longestPath,o=hK().alg.preorder,s=hK().alg.postorder,c=fq().simplify;t.exports=l,l.initLowLimValues=p,l.initCutValues=u,l.calcCutValue=f,l.leaveEdge=h,l.enterEdge=g,l.exchangeEdges=_;function l(e){e=c(e),a(e);var t=r(e);p(t),u(t,e);for(var n,i;n=h(t);)i=g(t,e,n),_(t,e,n,i)}function u(e,t){var r=s(e,e.nodes());r=r.slice(0,r.length-1),n.forEach(r,function(n){d(e,t,n)})}function d(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=f(e,t,n)}function f(e,t,r){var i=e.node(r).parent,a=!0,o=t.edge(r,i),s=0;return o||=(a=!1,t.edge(i,r)),s=o.weight,n.forEach(t.nodeEdges(r),function(n){var o=n.v===r,c=o?n.w:n.v;if(c!==i){var l=o===a,u=t.edge(n).weight;if(s+=l?u:-u,y(e,r,c)){var d=e.edge(r,c).cutvalue;s+=l?-d:d}}}),s}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),m(e,{},1,t)}function m(e,t,r,i,a){var o=r,s=e.node(i);return t[i]=!0,n.forEach(e.neighbors(i),function(a){n.has(t,a)||(r=m(e,t,r,a,i))}),s.low=o,s.lim=r++,a?s.parent=a:delete s.parent,r}function h(e){return n.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function g(e,t,r){var a=r.v,o=r.w;t.hasEdge(a,o)||(a=r.w,o=r.v);var s=e.node(a),c=e.node(o),l=s,u=!1;s.lim>c.lim&&(l=c,u=!0);var d=n.filter(t.edges(),function(t){return u===b(e,e.node(t.v),l)&&u!==b(e,e.node(t.w),l)});return n.minBy(d,function(e){return i(t,e)})}function _(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),p(e),u(e,t),v(e,t)}function v(e,t){var r=o(e,n.find(e.nodes(),function(e){return!t.node(e).parent}));r=r.slice(1),n.forEach(r,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function y(e,t,n){return e.hasEdge(t,n)}function b(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}})),_q=n(((e,t)=>{var n=mq().longestPath,r=hq(),i=gq();t.exports=a;function a(e){switch(e.graph().ranker){case`network-simplex`:c(e);break;case`tight-tree`:s(e);break;case`longest-path`:o(e);break;default:c(e)}}var o=n;function s(e){n(e),r(e)}function c(e){i(e)}})),vq=n(((e,t)=>{var n=cq();t.exports=r;function r(e){var t=a(e);n.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),a=r.edgeObj,o=i(e,t,a.v,a.w),s=o.path,c=o.lca,l=0,u=s[l],d=!0;n!==a.w;){if(r=e.node(n),d){for(;(u=s[l])!==c&&e.node(u).maxRank<r.rank;)l++;u===c&&(d=!1)}if(!d){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=r.rank;)l++;u=s[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function i(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function a(e){var t={},r=0;function i(a){var o=r;n.forEach(e.children(a),i),t[a]={low:o,lim:r++}}return n.forEach(e.children(),i),t}})),yq=n(((e,t)=>{var n=cq(),r=fq();t.exports={run:i,cleanup:c};function i(e){var t=r.addDummyNode(e,`root`,{},`_root`),i=o(e),c=n.max(n.values(i))-1,l=2*c+1;e.graph().nestingRoot=t,n.forEach(e.edges(),function(t){e.edge(t).minlen*=l});var u=s(e)+1;n.forEach(e.children(),function(n){a(e,t,l,u,c,i,n)}),e.graph().nodeRankFactor=l}function a(e,t,i,o,s,c,l){var u=e.children(l);if(!u.length)l!==t&&e.setEdge(t,l,{weight:0,minlen:i});else{var d=r.addBorderNode(e,`_bt`),f=r.addBorderNode(e,`_bb`),p=e.node(l);e.setParent(d,l),p.borderTop=d,e.setParent(f,l),p.borderBottom=f,n.forEach(u,function(n){a(e,t,i,o,s,c,n);var r=e.node(n),u=r.borderTop?r.borderTop:n,p=r.borderBottom?r.borderBottom:n,m=r.borderTop?o:2*o,h=u===p?s-c[l]+1:1;e.setEdge(d,u,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,f,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(l)||e.setEdge(t,d,{weight:0,minlen:s+c[l]})}}function o(e){var t={};function r(i,a){var o=e.children(i);o&&o.length&&n.forEach(o,function(e){r(e,a+1)}),t[i]=a}return n.forEach(e.children(),function(e){r(e,1)}),t}function s(e){return n.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function c(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,n.forEach(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}})),bq=n(((e,t)=>{var n=cq(),r=fq();t.exports=i;function i(e){function t(r){var i=e.children(r),o=e.node(r);if(i.length&&n.forEach(i,t),n.has(o,`minRank`)){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(e,`borderLeft`,`_bl`,r,o,s),a(e,`borderRight`,`_br`,r,o,s)}}n.forEach(e.children(),t)}function a(e,t,n,i,a,o){var s={width:0,height:0,rank:o,borderType:t},c=a[t][o-1],l=r.addDummyNode(e,`border`,s,n);a[t][o]=l,e.setParent(l,i),c&&e.setEdge(c,l,{weight:1})}})),xq=n(((e,t)=>{var n=cq();t.exports={adjust:r,undo:i};function r(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&a(e)}function i(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&s(e),(t===`lr`||t===`rl`)&&(l(e),a(e))}function a(e){n.forEach(e.nodes(),function(t){o(e.node(t))}),n.forEach(e.edges(),function(t){o(e.edge(t))})}function o(e){var t=e.width;e.width=e.height,e.height=t}function s(e){n.forEach(e.nodes(),function(t){c(e.node(t))}),n.forEach(e.edges(),function(t){var r=e.edge(t);n.forEach(r.points,c),n.has(r,`y`)&&c(r)})}function c(e){e.y=-e.y}function l(e){n.forEach(e.nodes(),function(t){u(e.node(t))}),n.forEach(e.edges(),function(t){var r=e.edge(t);n.forEach(r.points,u),n.has(r,`x`)&&u(r)})}function u(e){var t=e.x;e.x=e.y,e.y=t}})),Sq=n(((e,t)=>{var n=cq();t.exports=r;function r(e){var t={},r=n.filter(e.nodes(),function(t){return!e.children(t).length}),i=n.max(n.map(r,function(t){return e.node(t).rank})),a=n.map(n.range(i+1),function(){return[]});function o(r){n.has(t,r)||(t[r]=!0,a[e.node(r).rank].push(r),n.forEach(e.successors(r),o))}var s=n.sortBy(r,function(t){return e.node(t).rank});return n.forEach(s,o),a}})),Cq=n(((e,t)=>{var n=cq();t.exports=r;function r(e,t){for(var n=0,r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,r){for(var i=n.zipObject(r,n.map(r,function(e,t){return t})),a=n.flatten(n.map(t,function(t){return n.sortBy(n.map(e.outEdges(t),function(t){return{pos:i[t.w],weight:e.edge(t).weight}}),`pos`)}),!0),o=1;o<r.length;)o<<=1;var s=2*o-1;--o;var c=n.map(Array(s),function(){return 0}),l=0;return n.forEach(a.forEach(function(e){var t=e.pos+o;c[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n})),l}})),wq=n(((e,t)=>{var n=cq();t.exports=r;function r(e,t){return n.map(t,function(t){var r=e.inEdges(t);if(r.length){var i=n.reduce(r,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}})}})),Tq=n(((e,t)=>{var n=cq();t.exports=r;function r(e,t){var r={};return n.forEach(e,function(e,t){var i=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};n.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),n.forEach(t.edges(),function(e){var t=r[e.v],i=r[e.w];!n.isUndefined(t)&&!n.isUndefined(i)&&(i.indegree++,t.out.push(r[e.w]))}),i(n.filter(r,function(e){return!e.indegree}))}function i(e){var t=[];function r(e){return function(t){t.merged||(n.isUndefined(t.barycenter)||n.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&a(e,t)}}function i(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),n.forEach(o.in.reverse(),r(o)),n.forEach(o.out,i(o))}return n.map(n.filter(t,function(e){return!e.merged}),function(e){return n.pick(e,[`vs`,`i`,`barycenter`,`weight`])})}function a(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}})),Eq=n(((e,t)=>{var n=cq(),r=fq();t.exports=i;function i(e,t){var i=r.partition(e,function(e){return n.has(e,`barycenter`)}),s=i.lhs,c=n.sortBy(i.rhs,function(e){return-e.i}),l=[],u=0,d=0,f=0;s.sort(o(!!t)),f=a(l,c,f),n.forEach(s,function(e){f+=e.vs.length,l.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,f=a(l,c,f)});var p={vs:n.flatten(l,!0)};return d&&(p.barycenter=u/d,p.weight=d),p}function a(e,t,r){for(var i;t.length&&(i=n.last(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function o(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}})),Dq=n(((e,t)=>{var n=cq(),r=wq(),i=Tq(),a=Eq();t.exports=o;function o(e,t,l,u){var d=e.children(t),f=e.node(t),p=f?f.borderLeft:void 0,m=f?f.borderRight:void 0,h={};p&&(d=n.filter(d,function(e){return e!==p&&e!==m}));var g=r(e,d);n.forEach(g,function(t){if(e.children(t.v).length){var r=o(e,t.v,l,u);h[t.v]=r,n.has(r,`barycenter`)&&c(t,r)}});var _=i(g,l);s(_,h);var v=a(_,u);if(p&&(v.vs=n.flatten([p,v.vs,m],!0),e.predecessors(p).length)){var y=e.node(e.predecessors(p)[0]),b=e.node(e.predecessors(m)[0]);n.has(v,`barycenter`)||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+y.order+b.order)/(v.weight+2),v.weight+=2}return v}function s(e,t){n.forEach(e,function(e){e.vs=n.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}function c(e,t){n.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}})),Oq=n(((e,t)=>{var n=cq(),r=hK().Graph;t.exports=i;function i(e,t,i){var o=a(e),s=new r({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(t){return e.node(t)});return n.forEach(e.nodes(),function(r){var a=e.node(r),c=e.parent(r);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(r),s.setParent(r,c||o),n.forEach(e[i](r),function(t){var i=t.v===r?t.w:t.v,a=s.edge(i,r),o=n.isUndefined(a)?0:a.weight;s.setEdge(i,r,{weight:e.edge(t).weight+o})}),n.has(a,`minRank`)&&s.setNode(r,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),s}function a(e){for(var t;e.hasNode(t=n.uniqueId(`_root`)););return t}})),kq=n(((e,t)=>{var n=cq();t.exports=r;function r(e,t,r){var i={},a;n.forEach(r,function(n){for(var r=e.parent(n),o,s;r;){if(o=e.parent(r),o?(s=i[o],i[o]=r):(s=a,a=r),s&&s!==r){t.setEdge(s,r);return}r=o}})}})),Aq=n(((e,t)=>{var n=cq(),r=Sq(),i=Cq(),a=Dq(),o=Oq(),s=kq(),c=hK().Graph,l=fq();t.exports=u;function u(e){var t=l.maxRank(e),a=d(e,n.range(1,t+1),`inEdges`),o=d(e,n.range(t-1,-1,-1),`outEdges`),s=r(e);p(e,s);for(var c=1/0,u,m=0,h=0;h<4;++m,++h){f(m%2?a:o,m%4>=2),s=l.buildLayerMatrix(e);var g=i(e,s);g<c&&(h=0,u=n.cloneDeep(s),c=g)}p(e,u)}function d(e,t,r){return n.map(t,function(t){return o(e,t,r)})}function f(e,t){var r=new c;n.forEach(e,function(e){var i=e.graph().root,o=a(e,i,r,t);n.forEach(o.vs,function(t,n){e.node(t).order=n}),s(e,r,o.vs)})}function p(e,t){n.forEach(t,function(t){n.forEach(t,function(t,n){e.node(t).order=n})})}})),jq=n(((e,t)=>{var n=cq(),r=hK().Graph,i=fq();t.exports={positionX:g,findType1Conflicts:a,findType2Conflicts:o,addConflict:c,hasConflict:l,verticalAlignment:u,horizontalCompaction:d,alignCoordinates:m,findSmallestWidthAlignment:p,balance:h};function a(e,t){var r={};function i(t,i){var a=0,o=0,l=t.length,u=n.last(i);return n.forEach(i,function(t,d){var f=s(e,t),p=f?e.node(f).order:l;(f||t===u)&&(n.forEach(i.slice(o,d+1),function(t){n.forEach(e.predecessors(t),function(n){var i=e.node(n),o=i.order;(o<a||p<o)&&!(i.dummy&&e.node(t).dummy)&&c(r,n,t)})}),o=d+1,a=p)}),i}return n.reduce(t,i),r}function o(e,t){var r={};function i(t,i,a,o,s){var l;n.forEach(n.range(i,a),function(i){l=t[i],e.node(l).dummy&&n.forEach(e.predecessors(l),function(t){var n=e.node(t);n.dummy&&(n.order<o||n.order>s)&&c(r,t,l)})})}function a(t,r){var a=-1,o,s=0;return n.forEach(r,function(n,c){if(e.node(n).dummy===`border`){var l=e.predecessors(n);l.length&&(o=e.node(l[0]).order,i(r,s,c,a,o),s=c,a=o)}i(r,s,r.length,o,t.length)}),r}return n.reduce(t,a),r}function s(e,t){if(e.node(t).dummy)return n.find(e.predecessors(t),function(t){return e.node(t).dummy})}function c(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function l(e,t,r){if(t>r){var i=t;t=r,r=i}return n.has(e[t],r)}function u(e,t,r,i){var a={},o={},s={};return n.forEach(t,function(e){n.forEach(e,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),n.forEach(t,function(e){var t=-1;n.forEach(e,function(e){var c=i(e);if(c.length){c=n.sortBy(c,function(e){return s[e]});for(var u=(c.length-1)/2,d=Math.floor(u),f=Math.ceil(u);d<=f;++d){var p=c[d];o[e]===e&&t<s[p]&&!l(r,e,p)&&(o[p]=e,o[e]=a[e]=a[p],t=s[p])}}})}),{root:a,align:o}}function d(e,t,r,i,a){var o={},s=f(e,t,r,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}function d(t){var n=s.outEdges(t).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=e.node(t);n!==1/0&&r.borderType!==c&&(o[t]=Math.max(o[t],n))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),n.forEach(i,function(e){o[e]=o[r[e]]}),o}function f(e,t,i,a){var o=new r,s=e.graph(),c=_(s.nodesep,s.edgesep,a);return n.forEach(t,function(t){var r;n.forEach(t,function(t){var n=i[t];if(o.setNode(n),r){var a=i[r],s=o.edge(a,n);o.setEdge(a,n,Math.max(c(e,t,r),s||0))}r=t})}),o}function p(e,t){return n.minBy(n.values(t),function(t){var r=-1/0,i=1/0;return n.forIn(t,function(t,n){var a=v(e,n)/2;r=Math.max(t+a,r),i=Math.min(t-a,i)}),r-i})}function m(e,t){var r=n.values(t),i=n.min(r),a=n.max(r);n.forEach([`u`,`d`],function(r){n.forEach([`l`,`r`],function(o){var s=r+o,c=e[s],l;if(c!==t){var u=n.values(c);l=o===`l`?i-n.min(u):a-n.max(u),l&&(e[s]=n.mapValues(c,function(e){return e+l}))}})})}function h(e,t){return n.mapValues(e.ul,function(r,i){if(t)return e[t.toLowerCase()][i];var a=n.sortBy(n.map(e,i));return(a[1]+a[2])/2})}function g(e){var t=i.buildLayerMatrix(e),r=n.merge(a(e,t),o(e,t)),s={},c;return n.forEach([`u`,`d`],function(i){c=i===`u`?t:n.values(t).reverse(),n.forEach([`l`,`r`],function(t){t===`r`&&(c=n.map(c,function(e){return n.values(e).reverse()}));var a=(i===`u`?e.predecessors:e.successors).bind(e),o=u(e,c,r,a),l=d(e,c,o.root,o.align,t===`r`);t===`r`&&(l=n.mapValues(l,function(e){return-e})),s[i+t]=l})}),m(s,p(e,s)),h(s,e.graph().align)}function _(e,t,r){return function(i,a,o){var s=i.node(a),c=i.node(o),l=0,u;if(l+=s.width/2,n.has(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:u=-s.width/2;break;case`r`:u=s.width/2}if(u&&(l+=r?u:-u),u=0,l+=(s.dummy?t:e)/2,l+=(c.dummy?t:e)/2,l+=c.width/2,n.has(c,`labelpos`))switch(c.labelpos.toLowerCase()){case`l`:u=c.width/2;break;case`r`:u=-c.width/2}return u&&(l+=r?u:-u),u=0,l}}function v(e,t){return e.node(t).width}})),Mq=n(((e,t)=>{var n=cq(),r=fq(),i=jq().positionX;t.exports=a;function a(e){e=r.asNonCompoundGraph(e),o(e),n.forEach(i(e),function(t,n){e.node(n).x=t})}function o(e){var t=r.buildLayerMatrix(e),i=e.graph().ranksep,a=0;n.forEach(t,function(t){var r=n.max(n.map(t,function(t){return e.node(t).height}));n.forEach(t,function(t){e.node(t).y=a+r/2}),a+=r+i})}})),Nq=n(((e,t)=>{var n=cq(),r=dq(),i=pq(),a=_q(),o=fq().normalizeRanks,s=vq(),c=fq().removeEmptyRanks,l=yq(),u=bq(),d=xq(),f=Aq(),p=Mq(),m=fq(),h=hK().Graph;t.exports=g;function g(e,t){var n=t&&t.debugTiming?m.time:m.notime;n(`layout`,function(){var t=n(` buildLayoutGraph`,function(){return D(e)});n(` runLayout`,function(){_(t,n)}),n(` updateInputGraph`,function(){v(e,t)})})}function _(e,t){t(` makeSpaceForEdgeLabels`,function(){O(e)}),t(` removeSelfEdges`,function(){L(e)}),t(` acyclic`,function(){r.run(e)}),t(` nestingGraph.run`,function(){l.run(e)}),t(` rank`,function(){a(m.asNonCompoundGraph(e))}),t(` injectEdgeLabelProxies`,function(){k(e)}),t(` removeEmptyRanks`,function(){c(e)}),t(` nestingGraph.cleanup`,function(){l.cleanup(e)}),t(` normalizeRanks`,function(){o(e)}),t(` assignRankMinMax`,function(){A(e)}),t(` removeEdgeLabelProxies`,function(){j(e)}),t(` normalize.run`,function(){i.run(e)}),t(` parentDummyChains`,function(){s(e)}),t(` addBorderSegments`,function(){u(e)}),t(` order`,function(){f(e)}),t(` insertSelfEdges`,function(){R(e)}),t(` adjustCoordinateSystem`,function(){d.adjust(e)}),t(` position`,function(){p(e)}),t(` positionSelfEdges`,function(){z(e)}),t(` removeBorderNodes`,function(){I(e)}),t(` normalize.undo`,function(){i.undo(e)}),t(` fixupEdgeLabelCoords`,function(){P(e)}),t(` undoCoordinateSystem`,function(){d.undo(e)}),t(` translateGraph`,function(){M(e)}),t(` assignNodeIntersects`,function(){N(e)}),t(` reversePoints`,function(){F(e)}),t(` acyclic.undo`,function(){r.undo(e)})}function v(e,t){n.forEach(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),n.forEach(e.edges(),function(r){var i=e.edge(r),a=t.edge(r);i.points=a.points,n.has(a,`x`)&&(i.x=a.x,i.y=a.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var y=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],b={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},x=[`acyclicer`,`ranker`,`rankdir`,`align`],S=[`width`,`height`],C={width:0,height:0},w=[`minlen`,`weight`,`width`,`height`,`labeloffset`],T={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},E=[`labelpos`];function D(e){var t=new h({multigraph:!0,compound:!0}),r=ee(e.graph());return t.setGraph(n.merge({},b,B(r,y),n.pick(r,x))),n.forEach(e.nodes(),function(r){var i=ee(e.node(r));t.setNode(r,n.defaults(B(i,S),C)),t.setParent(r,e.parent(r))}),n.forEach(e.edges(),function(r){var i=ee(e.edge(r));t.setEdge(r,n.merge({},T,B(i,w),n.pick(i,E)))}),t}function O(e){var t=e.graph();t.ranksep/=2,n.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function k(e){n.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};m.addDummyNode(e,`edge-proxy`,i,`_ep`)}})}function A(e){var t=0;n.forEach(e.nodes(),function(r){var i=e.node(r);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=n.max(t,i.maxRank))}),e.graph().maxRank=t}function j(e){n.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function M(e){var t=1/0,r=0,i=1/0,a=0,o=e.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var n=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,n-s/2),r=Math.max(r,n+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}n.forEach(e.nodes(),function(t){l(e.node(t))}),n.forEach(e.edges(),function(t){var r=e.edge(t);n.has(r,`x`)&&l(r)}),t-=s,i-=c,n.forEach(e.nodes(),function(n){var r=e.node(n);r.x-=t,r.y-=i}),n.forEach(e.edges(),function(r){var a=e.edge(r);n.forEach(a.points,function(e){e.x-=t,e.y-=i}),n.has(a,`x`)&&(a.x-=t),n.has(a,`y`)&&(a.y-=i)}),o.width=r-t+s,o.height=a-i+c}function N(e){n.forEach(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(m.intersectRect(r,a)),n.points.push(m.intersectRect(i,o))})}function P(e){n.forEach(e.edges(),function(t){var r=e.edge(t);if(n.has(r,`x`))switch((r.labelpos===`l`||r.labelpos===`r`)&&(r.width-=r.labeloffset),r.labelpos){case`l`:r.x-=r.width/2+r.labeloffset;break;case`r`:r.x+=r.width/2+r.labeloffset}})}function F(e){n.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function I(e){n.forEach(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),i=e.node(r.borderTop),a=e.node(r.borderBottom),o=e.node(n.last(r.borderLeft)),s=e.node(n.last(r.borderRight));r.width=Math.abs(s.x-o.x),r.height=Math.abs(a.y-i.y),r.x=o.x+r.width/2,r.y=i.y+r.height/2}}),n.forEach(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function L(e){n.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function R(e){var t=m.buildLayerMatrix(e);n.forEach(t,function(t){var r=0;n.forEach(t,function(t,i){var a=e.node(t);a.order=i+r,n.forEach(a.selfEdges,function(t){m.addDummyNode(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:a.rank,order:i+ ++r,e:t.e,label:t.label},`_se`)}),delete a.selfEdges})})}function z(e){n.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function B(e,t){return n.mapValues(n.pick(e,t),Number)}function ee(e){var t={};return n.forEach(e,function(e,n){t[n.toLowerCase()]=e}),t}})),Pq=n(((e,t)=>{var n=cq(),r=fq(),i=hK().Graph;t.exports={debugOrdering:a};function a(e){var t=r.buildLayerMatrix(e),a=new i({compound:!0,multigraph:!0}).setGraph({});return n.forEach(e.nodes(),function(t){a.setNode(t,{label:t}),a.setParent(t,`layer`+e.node(t).rank)}),n.forEach(e.edges(),function(e){a.setEdge(e.v,e.w,{},e.name)}),n.forEach(t,function(e,t){var r=`layer`+t;a.setNode(r,{rank:`same`}),n.reduce(e,function(e,t){return a.setEdge(e,t,{style:`invis`}),t})}),a}})),Fq=n(((e,t)=>{t.exports=`0.8.5`})),Iq=n(((e,t)=>{t.exports={graphlib:hK(),layout:Nq(),debug:Pq(),util:{time:fq().time,notime:fq().notime},version:Fq()}})),Lq=l(Iq(),1),Rq=(e,t)=>`var(--mantine-color-${e}-${t})`;function zq(){if(typeof document>`u`||document.getElementById(`nf-flowgraph-live-styles`))return;let e=document.createElement(`style`);e.id=`nf-flowgraph-live-styles`,e.textContent=`
|
|
279
|
-
.nf-fg-dot {
|
|
280
|
-
width: 9px; height: 9px; border-radius: 50%;
|
|
281
|
-
display: inline-block;
|
|
282
|
-
transition: opacity 0.25s ease, background-color 0.25s ease;
|
|
283
|
-
flex-shrink: 0;
|
|
284
|
-
}
|
|
285
|
-
.nf-fg-dot.is-ok { background: var(--mantine-color-teal-5); opacity: 1; }
|
|
286
|
-
.nf-fg-dot.is-warn { background: var(--mantine-color-yellow-5); opacity: 0.95; }
|
|
287
|
-
.nf-fg-dot.is-down { background: var(--mantine-color-red-5); opacity: 0.95; }
|
|
288
|
-
.nf-fg-dot.is-idle { background: var(--mantine-color-gray-5); opacity: 0.45; }
|
|
289
|
-
.nf-fg-dot.is-pulse { animation: nf-fg-pulse 2.4s ease-in-out infinite; }
|
|
290
|
-
@keyframes nf-fg-pulse {
|
|
291
|
-
0%, 100% { opacity: 1; }
|
|
292
|
-
50% { opacity: 0.4; }
|
|
293
|
-
}
|
|
294
|
-
@media (prefers-reduced-motion: reduce) {
|
|
295
|
-
.nf-fg-dot { transition: none; }
|
|
296
|
-
.nf-fg-dot.is-pulse { animation: none; opacity: 1; }
|
|
297
|
-
}
|
|
298
|
-
`,document.head.appendChild(e)}function Bq({data:e}){let t=e.dir===`LR`,n={opacity:0,width:1,height:1,border:`none`},r=e.live,i=!!r?.metrics&&r.metrics.length>0;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)($z,{type:`target`,position:t?$.Left:$.Top,style:n}),(0,G.jsxs)(fc,{radius:`md`,p:`sm`,withBorder:!0,style:{width:232,borderColor:Rq(e.color,5),borderWidth:e.emphasis?2:1,background:`color-mix(in srgb, ${Rq(e.color,6)} 10%, var(--mantine-color-body))`,boxShadow:e.emphasis?`0 0 0 3px color-mix(in srgb, ${Rq(e.color,6)} 22%, transparent)`:void 0,cursor:e.clickable?`pointer`:void 0,contain:`layout paint`},children:[(0,G.jsxs)(X,{gap:`xs`,wrap:`nowrap`,align:`flex-start`,children:[(0,G.jsx)(Tv,{variant:`light`,color:e.color,size:36,radius:`md`,style:{flexShrink:0},children:e.icon}),(0,G.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,justify:`space-between`,children:[(0,G.jsx)(Z,{fw:700,size:`sm`,lh:1.2,lineClamp:1,style:{minWidth:0},children:e.label}),r&&(0,G.jsx)(`span`,{className:`nf-fg-dot is-${r.status??`idle`}${r.pulse?` is-pulse`:``}`,"aria-label":`État : ${r.status??`idle`}`})]}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,lh:1.25,mt:3,lineClamp:2,children:e.sub})]})]}),i&&(0,G.jsx)(Y,{mt:8,pt:6,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:(r.metrics??[]).map(e=>(0,G.jsxs)(X,{justify:`space-between`,gap:4,wrap:`nowrap`,children:[(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,lineClamp:1,children:e.label}),(0,G.jsx)(Z,{size:`xs`,fw:600,style:{fontVariantNumeric:`tabular-nums`},children:e.value})]},e.label))})]}),(0,G.jsx)($z,{type:`source`,position:t?$.Right:$.Bottom,style:n})]})}var Vq={layer:Bq};function Hq(e,t,n,r,i){return(0,C.useMemo)(()=>{let a=!!r&&e.some(e=>(r[e.id]?.metrics?.length??0)>0),o=a?132:86,s=new Lq.default.graphlib.Graph;return s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:n,nodesep:42,ranksep:a?96:72,marginx:16,marginy:16}),e.forEach(e=>s.setNode(e.id,{width:232,height:o})),t.forEach(e=>s.setEdge(e.source,e.target)),Lq.default.layout(s),{nodes:e.map(e=>{let t=s.node(e.id);return{id:e.id,type:`layer`,position:{x:t.x-116,y:t.y-o/2},data:{...e.data,dir:n,live:r?.[e.id],clickable:i||e.data.clickable},draggable:!0}}),edges:t.map((e,t)=>({id:`e${t}-${e.source}-${e.target}`,source:e.source,target:e.target,label:e.label,type:`smoothstep`,animated:e.animated??!e.dashed,style:{stroke:Rq(e.color??`gray`,5),strokeWidth:2,strokeDasharray:e.dashed?`5 5`:void 0},labelStyle:{fontSize:11,fontWeight:600},labelBgPadding:[6,3],labelBgBorderRadius:6,markerEnd:{type:PF.ArrowClosed,color:Rq(e.color??`gray`,5)}}))}},[e,t,n,r,i])}function Uq({nodes:e,edges:t,dir:n=`TB`,height:r=440,ariaLabel:i,liveNodeData:a,onNodeClick:o}){(0,C.useEffect)(()=>zq(),[]);let s=typeof document<`u`&&document.documentElement.getAttribute(`data-mantine-color-scheme`)===`light`?`light`:`dark`,c=Hq(e,t,n,a,!!o),[l,u]=(0,C.useState)(!1),d=e=>(0,G.jsx)(Y,{role:`img`,"aria-label":i,style:{height:e,border:`1px solid var(--mantine-color-default-border)`,borderRadius:N(10),overflow:`hidden`,contain:`content`},children:(0,G.jsxs)(MV,{nodes:c.nodes,edges:c.edges,nodeTypes:Vq,colorMode:s,fitView:!0,fitViewOptions:{padding:.18},proOptions:{hideAttribution:!0},nodesConnectable:!1,elementsSelectable:!1,onNodeClick:o?(e,t)=>o(t.id):void 0,zoomOnScroll:!1,panOnScroll:!0,children:[(0,G.jsx)(VV,{variant:LV.Dots,gap:18,size:1}),(0,G.jsx)(XV,{showInteractive:!1}),(0,G.jsx)(pH,{pannable:!0,zoomable:!0,nodeStrokeWidth:3})]})});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(Y,{pos:`relative`,children:[(0,G.jsx)(k_,{label:`Plein écran`,children:(0,G.jsx)(Y,{component:`button`,onClick:()=>u(!0),"aria-label":`Agrandir le schéma`,style:{position:`absolute`,top:8,right:8,zIndex:5,cursor:`pointer`,border:`1px solid var(--mantine-color-default-border)`,background:`var(--mantine-color-body)`,borderRadius:N(8),padding:N(6),lineHeight:0},children:(0,G.jsx)(qC,{size:16})})}),d(r)]}),(0,G.jsx)(ch,{opened:l,onClose:()=>u(!1),fullScreen:!0,radius:0,title:i,children:d(OP)})]})}var Wq=100,Gq=14,Kq={display:`flex`,flexWrap:`wrap`,alignItems:`baseline`,gap:4,lineHeight:1.55},qq={color:`light-dark(var(--mantine-color-gray-9), var(--mantine-color-gray-2))`,fontWeight:600},Jq={color:`var(--mantine-color-dimmed)`},Yq={color:`var(--mantine-color-dimmed)`,fontStyle:`italic`,whiteSpace:`pre`},Xq={fontFamily:`ui-monospace, SFMono-Regular, Menlo, monospace`,fontSize:`var(--mantine-font-size-xs)`,fontVariantNumeric:`tabular-nums`};function Zq({open:e}){return(0,G.jsx)(OC,{size:13,style:{flexShrink:0,transition:`transform 120ms ease`,transform:e?`rotate(90deg)`:`none`,color:`var(--mantine-color-dimmed)`}})}function Qq({name:e,value:t,depth:n,defaultExpandedDepth:r,isLast:i,signal:a}){let o=LP(t),s=RP(t),[c,l]=(0,C.useState)(n<r),[u,d]=(0,C.useState)(!1);(0,C.useEffect)(()=>{a&&l(a.open)},[a]);let f=e===void 0?null:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{style:qq,children:e}),(0,G.jsx)(`span`,{style:Jq,children:`:`})]}),p=i?null:(0,G.jsx)(`span`,{style:Jq,children:`,`});if(!s){let e=o===`object`?`{}`:o===`array`?`[]`:BP(t);return(0,G.jsxs)(`div`,{style:{...Kq,paddingLeft:n*Gq},children:[f,(0,G.jsx)(`span`,{style:{color:zP[o],fontStyle:o===`null`?`italic`:void 0,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:e}),p]})}let m=Array.isArray(t),h=m?t.map((e,t)=>[String(t),e]):Object.entries(t),g=m?`[`:`{`,_=m?`]`:`}`,v=u?h:h.slice(0,Wq),y=h.length-v.length;return(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{style:{...Kq,paddingLeft:n*Gq,cursor:`pointer`},onClick:()=>l(e=>!e),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l(e=>!e))},role:`button`,tabIndex:0,"aria-expanded":c,"aria-label":`${e??g} — ${c?`replier`:`déplier`}`,children:[(0,G.jsx)(Zq,{open:c}),f,(0,G.jsx)(`span`,{style:Jq,children:g}),c?null:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`span`,{style:Yq,children:[` `,UP(t,56),` `]}),(0,G.jsx)(`span`,{style:Jq,children:_}),p]}),(0,G.jsx)(rp,{size:`xs`,variant:`light`,color:`gray`,style:{flexShrink:0},children:HP(t)})]}),c?(0,G.jsxs)(G.Fragment,{children:[v.map(([e,t],i)=>(0,G.jsx)(Qq,{name:e,value:t,depth:n+1,defaultExpandedDepth:r,isLast:i===v.length-1&&y===0,signal:a},e)),y>0?(0,G.jsx)(Y,{style:{paddingLeft:(n+1)*Gq},onClick:()=>d(!0),children:(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,style:{cursor:`pointer`,textDecoration:`underline dotted`},children:[`+`,y,` de plus…`]})}):null,(0,G.jsxs)(`div`,{style:{...Kq,paddingLeft:n*Gq},children:[(0,G.jsx)(`span`,{style:Jq,children:_}),p]})]}):null]})}function $q(e){let[t,n]=(0,C.useState)(!1);return{copied:t,copy:()=>{navigator.clipboard?.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),1200)})}}}function eJ({value:e,maxHeight:t=420,defaultExpandedDepth:n=1,toolbar:r=!0}){let[i,a]=(0,C.useState)(`tree`),[o,s]=(0,C.useState)(null),c=(0,C.useMemo)(()=>GP(e),[e]),{copied:l,copy:u}=$q(c);return(0,G.jsxs)(Y,{children:[r?(0,G.jsxs)(X,{justify:`space-between`,gap:`xs`,mb:6,wrap:`nowrap`,children:[(0,G.jsx)(N_,{size:`xs`,value:i,onChange:e=>a(e),data:[{label:`Arbre`,value:`tree`},{label:`Brut`,value:`raw`}]}),(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,children:[i===`tree`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(k_,{label:`Tout déplier`,children:(0,G.jsx)(_l,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Tout déplier`,onClick:()=>s({v:Date.now(),open:!0}),children:(0,G.jsx)(AC,{size:15})})}),(0,G.jsx)(k_,{label:`Tout replier`,children:(0,G.jsx)(_l,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Tout replier`,onClick:()=>s({v:Date.now(),open:!1}),children:(0,G.jsx)(jC,{size:15})})})]}):null,(0,G.jsx)(k_,{label:l?`Copié`:`Copier le JSON`,children:(0,G.jsx)(_l,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Copier le JSON`,onClick:u,children:l?(0,G.jsx)(EC,{size:15}):(0,G.jsx)(PC,{size:15})})})]})]}):null,i===`tree`?(0,G.jsx)(Y,{style:{...Xq,maxHeight:t,overflow:`auto`},children:(0,G.jsx)(Qq,{value:e,depth:0,defaultExpandedDepth:n,isLast:!0,signal:o})}):(0,G.jsx)(Tp,{block:!0,style:{maxHeight:t,overflow:`auto`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:c})]})}function tJ({value:e,maxHeight:t=420}){return(0,G.jsx)(eJ,{value:e,maxHeight:t})}function nJ({value:e,title:t,maxHeight:n=260,defaultExpandedDepth:r=1,toolbar:i=!0,width:a}){let o=LP(e);return(0,G.jsxs)(fc,{withBorder:!0,radius:`md`,p:`xs`,style:a?{width:a}:void 0,children:[(0,G.jsxs)(X,{justify:`space-between`,gap:`xs`,wrap:`nowrap`,mb:6,children:[(0,G.jsx)(Z,{size:`xs`,fw:700,truncate:!0,children:t??`JSON`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,style:{flexShrink:0},children:o===`object`||o===`array`?HP(e):o})]}),(0,G.jsx)(Y,{children:(0,G.jsx)(eJ,{value:e,maxHeight:n,defaultExpandedDepth:r,toolbar:i})})]})}function rJ({value:e,label:t,previewLength:n=48,title:r,width:i=380,maxHeight:a=320}){return(0,G.jsxs)(rm,{width:i,shadow:`md`,radius:`md`,withArrow:!0,openDelay:120,closeDelay:120,position:`top`,withinPortal:!0,children:[(0,G.jsx)(rm.Target,{children:(0,G.jsx)(Tp,{tabIndex:0,style:{cursor:`pointer`,whiteSpace:`nowrap`},"aria-label":`Aperçu JSON — survoler pour le détail`,children:t??UP(e,n)})}),(0,G.jsx)(rm.Dropdown,{p:`xs`,children:(0,G.jsx)(nJ,{value:e,title:r,width:i-24,maxHeight:a,toolbar:!0})})]})}function iJ(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function aJ(e){return e==null?(0,G.jsx)(Z,{span:!0,c:`dimmed`,children:`—`}):typeof e==`boolean`?(0,G.jsx)(rp,{size:`xs`,variant:`light`,color:e?`teal`:`gray`,children:e?`activé`:`désactivé`}):typeof e==`number`?(0,G.jsx)(Tp,{children:String(e)}):typeof e==`string`?e===``?(0,G.jsx)(Z,{span:!0,c:`dimmed`,children:`(vide)`}):(0,G.jsx)(Z,{span:!0,size:`sm`,style:{wordBreak:`break-word`},children:e}):(0,G.jsx)(Tp,{children:VP(e)})}function oJ({value:e,level:t=0}){return!iJ(e)||Object.keys(e).length===0?(0,G.jsx)(Z,{c:`dimmed`,size:`sm`,children:`Configuration vide.`}):(0,G.jsx)(z_,{gap:2,style:{paddingLeft:t?12:0,borderLeft:t?`1px solid var(--mantine-color-default-border)`:void 0},children:Object.entries(e).map(([e,n])=>{if(iJ(n))return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Z,{size:`sm`,fw:600,mt:6,children:e}),(0,G.jsx)(oJ,{value:n,level:t+1})]},e);if(Array.isArray(n)){let t=n.every(e=>!iJ(e)&&!Array.isArray(e));return(0,G.jsxs)(X,{justify:`space-between`,wrap:`nowrap`,gap:`xl`,align:`flex-start`,style:{padding:`2px 0`},children:[(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,style:{flexShrink:0},children:e}),(0,G.jsx)(`div`,{style:{textAlign:`right`,minWidth:0},children:n.length===0?(0,G.jsx)(Z,{span:!0,c:`dimmed`,children:`(aucun)`}):t?(0,G.jsx)(Z,{span:!0,size:`sm`,style:{wordBreak:`break-word`},children:n.map(String).join(`, `)}):(0,G.jsxs)(rp,{size:`xs`,variant:`light`,color:`gray`,children:[n.length,` élément(s)`]})})]},e)}return(0,G.jsxs)(X,{justify:`space-between`,wrap:`nowrap`,gap:`xl`,style:{padding:`2px 0`},children:[(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:e}),(0,G.jsx)(`div`,{style:{textAlign:`right`},children:aJ(n)})]},e)})})}var sJ=!1;function cJ(){if(sJ||typeof document>`u`)return;sJ=!0;let e=document.createElement(`style`);e.setAttribute(`data-nf-live`,``),e.textContent=`
|
|
299
|
-
@keyframes nf-live-breathe{0%,100%{opacity:.5}50%{opacity:1}}
|
|
300
|
-
.nf-live-dot{width:8px;height:8px;border-radius:50%;background:var(--mantine-color-teal-6);animation:nf-live-breathe 2.4s ease-in-out infinite;flex:0 0 auto}
|
|
301
|
-
.nf-live-card{box-shadow:inset 0 0 0 1px rgba(18,184,134,.22)}
|
|
302
|
-
@keyframes nf-flash{0%{background:rgba(18,184,134,.28)}100%{background:transparent}}
|
|
303
|
-
.nf-flash{animation:nf-flash .9s ease-out;border-radius:4px}
|
|
304
|
-
@media (prefers-reduced-motion: reduce){
|
|
305
|
-
.nf-live-dot{animation:none;opacity:.85}
|
|
306
|
-
.nf-flash{animation:none;background:transparent}
|
|
307
|
-
}
|
|
308
|
-
`,document.head.appendChild(e)}function lJ({value:e,children:t}){return(0,G.jsx)(`span`,{className:`nf-flash`,children:t},String(e))}function uJ({icon:e,label:t,hint:n,hintVersion:r,info:i,value:a,accent:o=`brand`,footer:s,onClick:c,active:l,pulse:u,span:d=bw}){let f=(0,G.jsx)(Z,{size:`xs`,fw:600,tt:`uppercase`,style:{letterSpacing:.3},truncate:!0,children:t}),p=i??(n?(0,G.jsx)(gw,{title:t,version:r,summary:n}):null);return(0,G.jsx)(Gp.Col,{span:d,children:(0,G.jsxs)(yp,{withBorder:!0,radius:`md`,p:`md`,h:`100%`,className:u?`nf-live-card`:void 0,style:{position:`relative`,cursor:c?`pointer`:void 0,borderColor:l?`var(--mantine-color-${o}-filled)`:void 0,transition:`border-color 120ms ease`,contain:`content`},children:[(0,G.jsxs)(X,{justify:`space-between`,wrap:`nowrap`,mb:8,align:`flex-start`,children:[(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,c:`dimmed`,style:{minWidth:0},children:[c?(0,G.jsxs)(sc,{onClick:c,"aria-pressed":l,style:{minWidth:0,color:`inherit`},children:[(0,G.jsx)(`span`,{"aria-hidden":!0,style:{position:`absolute`,inset:0,borderRadius:`inherit`}}),f]}):f,p?(0,G.jsx)(`span`,{style:{position:`relative`,zIndex:1,lineHeight:0},children:p}):null]}),(0,G.jsx)(Tv,{variant:`light`,color:o,size:34,radius:`md`,children:e})]}),(0,G.jsx)(Z,{component:`div`,fw:700,style:{fontSize:30,lineHeight:1.05,fontVariantNumeric:`tabular-nums`},children:a}),s?(0,G.jsx)(`div`,{style:{marginTop:10},children:s}):null]})})}var dJ={neutral:`gray`,active:`brand`,ok:`teal`,warn:`yellow`,danger:`red`};function fJ({label:e,icon:t,value:n,tone:r=`neutral`,info:i}){return(0,G.jsxs)(X,{gap:`xs`,wrap:`nowrap`,style:{minWidth:0},children:[t&&(0,G.jsx)(Tv,{variant:`light`,color:dJ[r],size:`lg`,radius:`md`,children:t}),(0,G.jsxs)(z_,{gap:0,style:{minWidth:0},children:[(0,G.jsx)(Z,{fz:10,fw:700,tt:`uppercase`,c:`dimmed`,style:{letterSpacing:.4,lineHeight:1.2},children:e}),(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,style:{minWidth:0},children:[(0,G.jsx)(Y,{style:{fontVariantNumeric:`tabular-nums`,fontWeight:600,lineHeight:1.2,minWidth:0},children:n}),i]})]})]})}function pJ({segments:e,trailing:t,sticky:n=!0,ariaLabel:r=`Barre d'état`}){return(0,G.jsx)(Y,{role:`region`,"aria-label":r,style:{contain:`content`,...n?{position:`sticky`,top:bP,zIndex:1,background:`var(--mantine-color-body)`,marginInline:`calc(var(--mantine-spacing-md) * -1)`,paddingInline:`var(--mantine-spacing-md)`,paddingBlock:`var(--mantine-spacing-xs)`,borderBottom:`1px solid var(--mantine-color-default-border)`}:{}},children:(0,G.jsxs)(X,{justify:`space-between`,wrap:`wrap`,gap:`md`,children:[(0,G.jsx)(X,{gap:`md`,wrap:`wrap`,style:{minWidth:0},children:e.map((e,t)=>(0,G.jsxs)(X,{gap:`md`,wrap:`nowrap`,children:[t>0&&(0,G.jsx)(jp,{orientation:`vertical`,style:{alignSelf:`stretch`}}),(0,G.jsx)(fJ,{...e})]},e.id))}),t&&(0,G.jsx)(X,{gap:`sm`,wrap:`nowrap`,children:t})]})})}function mJ({title:e,subtitle:t,icon:n,actions:r,statusBar:i,tabs:a,value:o,onChange:s,keepMounted:c=!1}){return(0,G.jsxs)(z_,{gap:`md`,children:[(0,G.jsx)(cw,{icon:n,title:e,subtitle:t,actions:r,sticky:!0}),i,(0,G.jsxs)(xv,{value:o,onChange:e=>e&&s(e),keepMounted:c,children:[(0,G.jsx)(xv.List,{children:a.map(e=>{let t=(0,G.jsx)(xv.Tab,{value:e.value,leftSection:e.icon,rightSection:e.badge,disabled:e.disabled,children:e.label},e.value);return e.disabled&&e.disabledReason?(0,G.jsx)(k_,{label:e.disabledReason,withArrow:!0,position:`bottom`,events:{hover:!0,focus:!0,touch:!0},children:(0,G.jsx)(`span`,{children:t})},e.value):t})}),a.map(e=>(0,G.jsx)(xv.Panel,{value:e.value,pt:`md`,children:e.panel},e.value))]})]})}var hJ={default:{label:`défaut`,color:`gray`,help:`Valeur par défaut du schéma (aucune surcharge).`},module:{label:`module`,color:`blue`,help:`Surchargée dans la config du module.`},app:{label:`app`,color:`grape`,help:`Surchargée dans la config de l'application (config.ts).`},env:{label:`env`,color:`teal`,help:`Surchargée par une variable d'environnement (priorité max).`},runtime:{label:`runtime`,color:`cyan`,help:`Valeur posée à l'exécution : éditée à chaud en développement (éphémère, perdue au redémarrage) ou dérivée du runtime.`}},gJ={zod:{label:`validé Zod`,color:`teal`,help:`Config validée par un schéma Zod au démarrage : types, valeurs et contraintes garantis. Un boot avec une config invalide échoue tôt (fail-fast).`},partial:{label:`schéma partiel`,color:`yellow`,help:`Une partie de la config est validée par Zod ; le reste est en migration.`},none:{label:`non migré (Zod)`,color:`gray`,help:`Module pas encore migré vers la validation Zod (dette config).`}};function _J({source:e}){let t=hJ[e];return(0,G.jsx)(gw,{title:`Provenance de la valeur`,summary:t.help,width:260,children:(0,G.jsx)(rp,{size:`xs`,variant:`light`,color:t.color,tt:`none`,style:{cursor:`help`},children:t.label})})}function vJ({f:e}){return(0,G.jsxs)(X,{gap:4,wrap:`wrap`,children:[e.reserved?(0,G.jsx)(yw,{title:`Réservé`,summary:`Réservé à une feature future — pas lu en runtime aujourd'hui.`,width:240,children:(0,G.jsx)(rp,{size:`sm`,variant:`light`,color:`gray`,leftSection:(0,G.jsx)(KC,{size:11}),tt:`none`,style:{cursor:`help`},children:`réservé`})}):e.mutability===`live`?(0,G.jsx)(vw,{title:`Modifiable à chaud`,summary:`Relu à chaque requête — modifiable en développement sans redémarrage. Figé en production.`,width:260,children:(0,G.jsx)(rp,{size:`sm`,variant:`light`,color:`teal`,leftSection:(0,G.jsx)(xC,{size:11}),tt:`none`,style:{cursor:`help`},children:`à chaud (dev)`})}):e.mutability===`readonly`?(0,G.jsx)(gw,{title:`Lecture seule`,summary:`Réglage non modifiable au runtime.`,width:220,children:(0,G.jsx)(rp,{size:`sm`,variant:`light`,color:`gray`,leftSection:(0,G.jsx)(KC,{size:11}),tt:`none`,style:{cursor:`help`},children:`lecture seule`})}):(0,G.jsx)(gw,{title:`Au redémarrage`,summary:`Pris en compte au démarrage (12-factor) — éditer la config / l'env puis redémarrer le serveur.`,width:260,children:(0,G.jsx)(rp,{size:`sm`,variant:`light`,color:`gray`,leftSection:(0,G.jsx)(KC,{size:11}),tt:`none`,style:{cursor:`help`},children:`au redémarrage`})}),e.kernelDerived&&(0,G.jsx)(gw,{title:`Auto (kernel)`,summary:`Valeur par défaut calculée à partir du kernel (tmpDir, domain…) → affichée « auto » ; la valeur effective est la valeur résolue au boot.`,width:260,children:(0,G.jsx)(rp,{size:`sm`,variant:`light`,color:`cyan`,leftSection:(0,G.jsx)($C,{size:11}),tt:`none`,style:{cursor:`help`},children:`auto (kernel)`})}),e.secret&&(0,G.jsx)(yw,{title:`Secret`,summary:`Donnée sensible : masquée dans Studio, rédigée dans les logs.`,width:240,children:(0,G.jsx)(rp,{size:`sm`,variant:`light`,color:`orange`,leftSection:(0,G.jsx)(RC,{size:11}),tt:`none`,style:{cursor:`help`},children:`secret`})})]})}function yJ(){return(0,G.jsx)(gw,{title:`Cascade de surcharge`,summary:`La valeur effective d'un réglage est calculée en empilant les sources : chaque niveau peut surcharger le précédent. La DERNIÈRE source définie gagne.`,sections:[{label:`Ordre de priorité`,body:(0,G.jsx)(X,{gap:6,wrap:`wrap`,children:[`default`,`module`,`app`,`env`].map((e,t)=>(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,children:[t>0&&(0,G.jsx)(yC,{size:12,style:{opacity:.5}}),(0,G.jsx)(_J,{source:e})]},e))})},{label:`12-factor`,body:`La variable d'environnement a le dernier mot : déployer sans toucher au code. La colonne « Provenance » dit d'où vient la valeur gagnante.`}]})}function bJ(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase()}function xJ(e){let t=[e.key];return typeof e.type==`string`&&t.push(e.type),typeof e.description==`string`&&t.push(e.description),typeof e.constraint==`string`&&t.push(e.constraint),t.join(` `)}function SJ({recipe:e}){return(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,children:[(0,G.jsx)(Tp,{style:{fontSize:11},children:e}),(0,G.jsx)(Dp,{value:e,timeout:1500,children:({copied:t,copy:n})=>(0,G.jsx)(k_,{label:t?`Copié`:`Copier`,withArrow:!0,children:(0,G.jsx)(_l,{size:`sm`,variant:`subtle`,color:t?`teal`:`gray`,"aria-label":`Copier ${e}`,onClick:n,children:t?(0,G.jsx)(EC,{size:14}):(0,G.jsx)(PC,{size:14})})})})]})}function CJ(e,t){return t&&!!e.editControl&&e.mutability===`live`&&!e.secret&&!e.reserved}function wJ({onClick:e,pending:t,dirty:n}){return(0,G.jsx)(k_,{label:`Appliquer (Entrée)`,withArrow:!0,children:(0,G.jsx)(_l,{size:`sm`,variant:`light`,color:`brand`,disabled:!n||t,loading:t,onClick:e,"aria-label":`Appliquer la valeur`,children:(0,G.jsx)(FC,{size:14})})})}function TJ({field:e,onEdit:t}){let n=e.editControl,[r,i]=(0,C.useState)(e.editValue),[a,o]=(0,C.useState)(VP(e.editValue)),[s,c]=(0,C.useState)(!1),[l,u]=(0,C.useState)(null),[d,f]=(0,C.useState)(!1),p=async n=>{if(s)return;c(!0),u(null),f(!1);let a;try{a=await t(e,n)}catch(e){a={ok:!1,error:e instanceof Error?e.message:String(e)}}c(!1),a.ok?(i(n),o(VP(n)),f(!0)):(u(a.error??`refusé`),o(VP(r)))},m=()=>{d&&f(!1),l&&u(null)},h=()=>{if(a===``){n.kind===`number`&&n.nullable&&p(null);return}let e=Number(a);Number.isNaN(e)?u(`nombre invalide`):r!==e&&p(e)},g=()=>{let e=n.kind===`text`&&n.nullable&&a.trim()===``?null:a;(r??null)!==(e??null)&&p(e)},_;if(n.kind===`switch`)_=(0,G.jsx)(K_,{size:`sm`,checked:r===!0,disabled:s,onChange:e=>void p(e.currentTarget.checked),"aria-label":`Modifier ${e.key}`});else if(n.kind===`select`){let t=`∅ (null)`,i=n.nullable?[...n.options,t]:n.options;_=(0,G.jsx)(F_,{size:`xs`,w:170,data:i,value:r==null?n.nullable?t:null:VP(r),disabled:s,allowDeselect:!1,comboboxProps:{withinPortal:!0},onChange:e=>{e!=null&&p(e===t?null:e)},"aria-label":`Modifier ${e.key}`})}else _=n.kind===`number`?(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,children:[(0,G.jsx)(Ug,{size:`xs`,w:120,value:a===``?``:Number(a),min:n.min,max:n.max,allowDecimal:!n.integer,disabled:s,onChange:e=>{m(),o(e===``?``:String(e))},onKeyDown:e=>{e.key===`Enter`&&h()},"aria-label":`Modifier ${e.key}`}),(0,G.jsx)(wJ,{onClick:h,pending:s,dirty:VP(r)!==a})]}):(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,children:[(0,G.jsx)(Sv,{size:`xs`,w:170,value:a,placeholder:n.nullable?`(vide = null)`:void 0,disabled:s,onChange:e=>{m(),o(e.currentTarget.value)},onKeyDown:e=>{e.key===`Enter`&&g()},"aria-label":`Modifier ${e.key}`}),(0,G.jsx)(wJ,{onClick:g,pending:s,dirty:VP(r)!==a})]});return(0,G.jsxs)(z_,{gap:2,children:[(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,children:[_,d&&(0,G.jsx)(EC,{size:15,color:`var(--mantine-color-teal-6)`,"aria-label":`Enregistré`})]}),l&&(0,G.jsx)(Z,{size:`xs`,c:`red`,children:l})]})}function EJ({module:e,schema:t=`none`,sections:n,notice:r,editable:i=!1,onEdit:a}){let o=gJ[t],[s,c]=(0,C.useState)(``),l=n.reduce((e,t)=>e+t.fields.length,0),u=(0,C.useMemo)(()=>{let e=bJ(s.trim()).split(/\s+/).filter(Boolean);return e.length?n.map(t=>({...t,fields:t.fields.filter(n=>{let r=bJ(`${xJ(n)} ${t.title}`);return e.every(e=>r.includes(e))})})).filter(e=>e.fields.length>0):n},[n,s]),d=u.reduce((e,t)=>e+t.fields.length,0),f=n.some(e=>e.fields.some(e=>e.effective!==void 0)),p=n.some(e=>e.fields.some(e=>e.source!==void 0)),m=n.some(e=>e.fields.some(e=>e.recipe!==void 0));return(0,G.jsxs)(z_,{gap:`lg`,children:[(0,G.jsxs)(X,{gap:`sm`,wrap:`wrap`,children:[(0,G.jsx)(Tv,{variant:`light`,color:`brand`,size:`lg`,radius:`md`,children:(0,G.jsx)(ZC,{size:20})}),(0,G.jsxs)(`div`,{style:{minWidth:0},children:[(0,G.jsx)(Z,{fz:10,fw:700,tt:`uppercase`,c:`dimmed`,style:{letterSpacing:.4},children:`Configuration`}),(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,children:[(0,G.jsx)(Mv,{order:4,children:e}),(0,G.jsx)(gw,{title:`Statut du schéma`,summary:o.help,width:300,children:(0,G.jsx)(rp,{variant:`light`,color:o.color,tt:`none`,style:{cursor:`help`},children:o.label})}),(0,G.jsx)(gw,{title:`Validation de la configuration (Zod)`,summary:`Nodefony valide la configuration au démarrage avec Zod : un réglage invalide fait échouer le boot tôt, plutôt qu'un bug obscur en cours d'exécution.`,sections:[{label:`Source de vérité`,body:`Le schéma documente les clés, leurs types, leurs valeurs possibles et leurs défauts. C'est « ce qui est configurable ».`},{label:`Migration progressive`,body:`Tous les modules ne sont pas encore migrés ; un badge signale l'état (validé Zod / partiel / non migré).`}]}),p&&(0,G.jsx)(yJ,{})]})]})]}),r,(0,G.jsxs)(X,{justify:`space-between`,align:`center`,gap:`sm`,wrap:`wrap`,children:[(0,G.jsx)(Sv,{value:s,onChange:e=>c(e.currentTarget.value),placeholder:`Rechercher un réglage…`,"aria-label":`Rechercher un réglage de configuration`,leftSection:(0,G.jsx)(YC,{size:15}),size:`sm`,w:320}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,style:{fontVariantNumeric:`tabular-nums`},children:s.trim()?`${d} / ${l} réglages`:`${l} réglages`})]}),u.length===0&&(0,G.jsxs)(Z,{c:`dimmed`,size:`sm`,children:[`Aucun réglage ne correspond à «\xA0`,s.trim(),`\xA0».`]}),u.map(e=>(0,G.jsxs)(z_,{gap:`xs`,children:[(0,G.jsx)(Mv,{order:5,children:e.title}),e.description&&(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:e.description}),(0,G.jsx)(yp,{withBorder:!0,radius:`md`,p:0,children:(0,G.jsxs)(dv,{striped:!0,withRowBorders:!1,verticalSpacing:`sm`,horizontalSpacing:`md`,children:[(0,G.jsx)(dv.Thead,{children:(0,G.jsxs)(dv.Tr,{children:[(0,G.jsx)(dv.Th,{style:{width:280},children:`Réglage`}),f&&(0,G.jsx)(dv.Th,{style:{width:190},children:`Valeur effective`}),(0,G.jsx)(dv.Th,{style:{width:150},children:`Défaut`}),(0,G.jsx)(dv.Th,{style:{width:200},children:`Type & valeurs`}),(0,G.jsx)(dv.Th,{style:{width:180},children:`État`}),m&&(0,G.jsx)(dv.Th,{style:{width:230},children:(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,children:[`Recette`,(0,G.jsx)(gw,{title:`Recette d'override (12-factor)`,summary:`La variable d'environnement qui surcharge ce réglage SANS toucher au code (NF__<MODULE>__<CHEMIN>). À copier dans .env (poste) ou dans l'orchestrateur, qui l'emporte.`,width:280})]})})]})}),(0,G.jsx)(dv.Tbody,{children:e.fields.map(e=>(0,G.jsxs)(dv.Tr,{children:[(0,G.jsx)(dv.Td,{children:(0,G.jsxs)(z_,{gap:2,children:[(0,G.jsxs)(X,{gap:4,wrap:`wrap`,children:[(0,G.jsx)(Tp,{style:{fontSize:12},children:e.key}),e.env&&(0,G.jsx)(gw,{title:`Variable d'environnement`,summary:`Surcharge 12-factor : définir cette variable d'environnement surcharge le réglage au déploiement (priorité max dans la cascade).`,width:260,children:(0,G.jsx)(Tp,{style:{fontSize:10,cursor:`help`},children:e.env})})]}),e.description&&(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:e.description})]})}),f&&(0,G.jsx)(dv.Td,{children:(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,children:[(0,G.jsx)(Y,{style:{minWidth:0},children:CJ(e,i)&&a?(0,G.jsx)(TJ,{field:e,onEdit:a}):e.effective??(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`—`})}),e.source&&(0,G.jsx)(_J,{source:e.source})]})}),(0,G.jsx)(dv.Td,{children:e.defaultValue??(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`—`})}),(0,G.jsx)(dv.Td,{children:(0,G.jsxs)(z_,{gap:2,children:[e.type&&(0,G.jsx)(rp,{size:`xs`,variant:`default`,tt:`none`,children:e.type}),e.constraint&&(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:e.constraint})]})}),(0,G.jsx)(dv.Td,{children:(0,G.jsx)(vJ,{f:e})}),m&&(0,G.jsx)(dv.Td,{children:e.recipe?(0,G.jsx)(SJ,{recipe:e.recipe}):(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`—`})})]},e.key))})]})})]},e.title))]})}var DJ={zod:{label:`validé Zod`,color:`teal`},partial:{label:`schéma partiel`,color:`yellow`},none:{label:`non migré (Zod)`,color:`gray`}};function OJ(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase()}function kJ(e){let t=[e.key];return typeof e.type==`string`&&t.push(e.type),typeof e.description==`string`&&t.push(e.description),typeof e.constraint==`string`&&t.push(e.constraint),t.join(` `)}function AJ({value:e,label:t}){return(0,G.jsxs)(z_,{gap:0,children:[(0,G.jsx)(Z,{fw:700,fz:26,lh:1,style:{fontVariantNumeric:`tabular-nums`},children:e}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:t})]})}function jJ({field:e}){return(0,G.jsxs)(X,{justify:`space-between`,wrap:`nowrap`,gap:`md`,align:`flex-start`,children:[(0,G.jsx)(Tp,{fz:11,title:e.key,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,minWidth:0,flex:`1 1 auto`},children:e.key}),(0,G.jsx)(Y,{style:{flex:`0 0 auto`,maxWidth:`55%`,textAlign:`right`},children:e.effective??(0,G.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,children:`—`})})]})}function MJ({schema:e=`none`,sections:t,onOpen:n,height:r=`100%`}){let[i,a]=(0,C.useState)(``),o=(0,C.useMemo)(()=>t.flatMap(e=>e.fields),[t]),s=o.length,c=o.filter(e=>e.reserved).length,l=o.filter(e=>e.mutability===`live`&&!e.reserved).length,u=o.filter(e=>e.kernelDerived).length,d=o.filter(e=>e.secret).length,f=s-l-c,p=DJ[e],m=(0,C.useMemo)(()=>o.filter(e=>e.source===`app`||e.source===`env`),[o]),h=(0,C.useMemo)(()=>{let e=OJ(i.trim()).split(/\s+/).filter(Boolean);return e.length?o.filter(t=>{let n=OJ(kJ(t));return e.every(e=>n.includes(e))}):m},[o,m,i]);return(0,G.jsxs)(yp,{withBorder:!0,radius:`md`,p:`lg`,h:r,style:{contain:`content`,display:`flex`,flexDirection:`column`},children:[(0,G.jsxs)(X,{justify:`space-between`,mb:`sm`,wrap:`nowrap`,children:[(0,G.jsxs)(X,{gap:8,wrap:`nowrap`,style:{minWidth:0},children:[(0,G.jsx)(Tv,{variant:`light`,color:`brand`,size:`md`,radius:`md`,children:(0,G.jsx)(ZC,{size:16})}),(0,G.jsx)(Z,{fw:600,children:`Configuration`}),(0,G.jsx)(rp,{variant:`light`,color:p.color,tt:`none`,children:p.label}),(0,G.jsx)(gw,{title:`Synthèse de la configuration`,summary:`Aperçu de ce qui est configurable sur ce module : combien de réglages, lesquels changent sans redémarrer, et la valeur effective de chacun (recherche + détail au survol).`,sections:[{label:`À chaud vs au redémarrage`,body:`« À chaud » = relu à chaque requête (modifiable en dev sans reboot). Le reste est figé au démarrage (12-factor).`},{label:`Valeurs complexes`,body:`Une valeur tableau / objet s'affiche en aperçu compact ; survole-la pour la carte JSON complète.`}]})]}),n&&(0,G.jsx)(fp,{variant:`light`,size:`xs`,onClick:n,children:`Tout voir`})]}),(0,G.jsxs)(X,{gap:`xl`,mb:`sm`,children:[(0,G.jsx)(AJ,{value:s,label:`réglages`}),(0,G.jsx)(AJ,{value:t.length,label:`sections`})]}),(0,G.jsxs)(X,{gap:6,wrap:`wrap`,mb:`sm`,children:[(0,G.jsxs)(rp,{variant:`light`,color:`teal`,leftSection:(0,G.jsx)(xC,{size:11}),tt:`none`,children:[l,` à chaud`]}),(0,G.jsxs)(rp,{variant:`light`,color:`gray`,leftSection:(0,G.jsx)(KC,{size:11}),tt:`none`,children:[f,` au redémarrage`]}),c>0&&(0,G.jsxs)(rp,{variant:`light`,color:`gray`,leftSection:(0,G.jsx)(KC,{size:11}),tt:`none`,children:[c,` réservé`,c>1?`s`:``]}),u>0&&(0,G.jsxs)(rp,{variant:`light`,color:`cyan`,leftSection:(0,G.jsx)($C,{size:11}),tt:`none`,children:[u,` auto (kernel)`]}),d>0&&(0,G.jsxs)(rp,{variant:`light`,color:`orange`,leftSection:(0,G.jsx)(RC,{size:11}),tt:`none`,children:[d,` secret`,d>1?`s`:``]})]}),(0,G.jsx)(Sv,{value:i,onChange:e=>a(e.currentTarget.value),placeholder:`Rechercher un réglage…`,"aria-label":`Rechercher un réglage de configuration`,leftSection:(0,G.jsx)(YC,{size:15}),size:`xs`,mb:`xs`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,mb:6,children:i?`${h.length} résultat${h.length>1?`s`:``} sur ${s}`:m.length?`${m.length} surcharge${m.length>1?`s`:``} — réglages ≠ défaut`:`Tout par défaut · ${s} réglage${s>1?`s`:``}`}),(0,G.jsx)(rc,{style:{flex:1},mih:60,mah:260,type:`auto`,offsetScrollbars:!0,children:h.length===0?(0,G.jsx)(Z,{c:`dimmed`,size:`xs`,py:`sm`,children:i?`Aucun réglage ne correspond.`:`Aucune surcharge : ce module tourne sur ses défauts. Cherche un réglage ci-dessus pour explorer, ou « Tout voir ».`}):(0,G.jsx)(z_,{gap:6,pr:`xs`,children:h.map(e=>(0,G.jsx)(jJ,{field:e},e.key))})})]})}var NJ=e=>String(Math.round(e));function PJ({series:e,height:t=190,max:n,threshold:r,format:i=NJ}){let[a,o]=(0,C.useState)(null),s=Math.max(0,...e.map(e=>e.data.length));if(s<2)return null;let c=n??Math.max(1,...e.flatMap(e=>e.data))*1.15,l=e=>e/(s-1)*588+6,u=e=>194-Math.min(e,c)/c*188,d=e=>{let t=e.currentTarget.getBoundingClientRect(),n=Math.min(1,Math.max(0,(e.clientX-t.left)/t.width));o({idx:Math.round(n*(s-1)),xPx:n*t.width,w:t.width})},f=a?a.xPx>a.w*.6?a.xPx-140:a.xPx+12:0,p=e.map(e=>`${e.label} ${i(e.data[e.data.length-1]??0)}`).join(`, `);return(0,G.jsxs)(`div`,{style:{position:`relative`},onMouseMove:d,onMouseLeave:()=>o(null),role:`img`,"aria-label":`Graphe temps réel — ${p}`,children:[(0,G.jsxs)(`svg`,{width:`100%`,height:t,viewBox:`0 0 600 200`,preserveAspectRatio:`none`,style:{display:`block`,overflow:`visible`},children:[r!=null&&(0,G.jsx)(`rect`,{x:6,y:u(c),width:588,height:Math.max(0,u(r)-u(c)),fill:`var(--mantine-color-red-6)`,opacity:.07}),(0,G.jsx)(`line`,{x1:6,y1:u(0),x2:594,y2:u(0),stroke:`var(--mantine-color-default-border)`,strokeWidth:1,vectorEffect:`non-scaling-stroke`,opacity:.6}),e.map(e=>{let t=e.data.map((e,t)=>`${l(t).toFixed(1)},${u(e).toFixed(1)}`).join(` `),n=`6,194 ${t} 594,194`,r=e.data[e.data.length-1];return(0,G.jsxs)(`g`,{children:[(0,G.jsx)(`polygon`,{points:n,fill:e.color,opacity:.1}),(0,G.jsx)(`polyline`,{points:t,fill:`none`,stroke:e.color,strokeWidth:2,strokeLinejoin:`round`,vectorEffect:`non-scaling-stroke`}),r!==void 0&&(0,G.jsx)(`circle`,{cx:l(s-1),cy:u(r),r:3,fill:e.color,vectorEffect:`non-scaling-stroke`})]},e.label)}),a&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`line`,{x1:l(a.idx),y1:6,x2:l(a.idx),y2:194,stroke:`var(--mantine-color-dimmed)`,strokeWidth:1,strokeDasharray:`4 4`,vectorEffect:`non-scaling-stroke`,opacity:.6}),e.map(e=>(0,G.jsx)(`circle`,{cx:l(a.idx),cy:u(e.data[a.idx]??0),r:3.5,fill:e.color,stroke:`var(--mantine-color-body)`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`},e.label))]})]}),(0,G.jsx)(Z,{c:`dimmed`,style:{position:`absolute`,top:0,left:2,fontSize:10},children:i(c)}),(0,G.jsx)(Z,{c:`dimmed`,style:{position:`absolute`,bottom:0,left:2,fontSize:10},children:`0`}),a&&(0,G.jsx)(fc,{shadow:`sm`,p:6,withBorder:!0,style:{position:`absolute`,top:4,left:f,pointerEvents:`none`,zIndex:5},children:(0,G.jsx)(z_,{gap:2,children:e.map(e=>(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,children:[(0,G.jsx)(`span`,{style:{width:8,height:8,background:e.color,borderRadius:2}}),(0,G.jsxs)(Z,{size:`xs`,children:[e.label,` : `,(0,G.jsx)(`b`,{children:i(e.data[a.idx]??0)})]})]},e.label))})})]})}function FJ({title:e,caption:t,badge:n,icon:r,fullscreen:i=!1,children:a}){let[o,s]=(0,C.useState)(!1),c=e=>typeof a==`function`?a({fullscreen:e}):a;return(0,G.jsxs)(yp,{withBorder:!0,radius:`md`,p:`lg`,children:[(0,G.jsxs)(X,{justify:`space-between`,mb:2,wrap:`nowrap`,children:[(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,style:{minWidth:0},children:[r,(0,G.jsx)(Mv,{order:2,size:`h4`,children:e})]}),(0,G.jsxs)(X,{gap:`xs`,wrap:`nowrap`,children:[n,i&&(0,G.jsx)(k_,{label:`Plein écran`,withArrow:!0,children:(0,G.jsx)(_l,{variant:`subtle`,color:`gray`,"aria-label":`Afficher « ${e} » en plein écran`,onClick:()=>s(!0),children:(0,G.jsx)(bC,{size:16})})})]})]}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,mb:`sm`,children:t}),c(!1),i&&(0,G.jsx)(ch,{opened:o,onClose:()=>s(!1),fullScreen:!0,radius:0,title:e,transitionProps:{transition:`fade`,duration:150},children:(0,G.jsxs)(z_,{gap:`sm`,children:[n&&(0,G.jsx)(X,{gap:`xs`,children:n}),(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:t}),c(!0)]})})]})}function IJ({color:e,label:t,size:n=`xs`}){let r=n!==`xs`;return(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,children:[(0,G.jsx)(`span`,{style:{width:r?18:12,height:r?4:3,background:e,borderRadius:2}}),(0,G.jsx)(Z,{size:n,c:`dimmed`,children:t})]})}function LJ(e){return RJ(e)||typeof e==`function`||zJ(e)}function RJ(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function zJ(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}function BJ(e,t){return e==null?null:LJ(e)?C.createElement(e,t):e}function VJ(e){if(`cell`in e&&e.cell){let t=e.cell,n=t.column.columnDef,r=t,i=n;return r.getIsAggregated?.()?BJ(i.aggregatedCell??n.cell,t.getContext()):r.getIsPlaceholder?.()?null:BJ(n.cell,t.getContext())}return`header`in e&&e.header?BJ(e.header.column.columnDef.header,e.header.getContext()):`footer`in e&&e.footer?BJ(e.footer.column.columnDef.footer,e.footer.getContext()):null}function HJ({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function UJ(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var WJ=[],GJ=0,{link:KJ,unlink:qJ,propagate:JJ,checkDirty:YJ,shallowPropagate:XJ}=HJ({update(e){return e._update()},notify(e){WJ[QJ++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,nY(e))}}),ZJ=0,QJ=0,$J,eY=0;function tY(e){try{++eY,e()}finally{--eY||rY()}}function nY(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=qJ(n,e)}function rY(){if(!(eY>0)){for(;ZJ<QJ;){let e=WJ[ZJ];WJ[ZJ++]=void 0,e.notify()}ZJ=0,QJ=0}}function iY(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return $J!==void 0&&KJ(i,$J,GJ),i._snapshot},subscribe(e){let t=UJ(e),n={current:!1},r=aY(()=>{i.get(),n.current?($J=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=$J,o=t?.compare??Object.is;if(n)$J=i,++GJ,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{$J=a,n&&(i.flags&=-5),nY(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&YJ(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&XJ(e)}}else e&32&&(i.flags=e&-33);return $J!==void 0&&KJ(i,$J,GJ),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(JJ(e),XJ(e),rY())}},i}function aY(e){let t=()=>{let t=$J;$J=n,++GJ,n.depsTail=void 0,n.flags=6;try{return e()}finally{$J=t,n.flags&=-5,nY(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&YJ(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,nY(this)}};return t(),n}function oY(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=sY(e);if(n.length!==sY(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function sY(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function cY(e,t){return e===t}function lY(e,t=e=>e,n){let r=n?.compare??cY,i=(0,C.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,C.useCallback)(()=>e.get(),[e]);return(0,mR.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function uY(e){let t=lY(e.source,e.selector,{compare:oY});return typeof e.children==`function`?e.children(t):e.children}function dY(e){let t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),`set`in e&&(t.setState=e.set.bind(e)),t}function fY(e){let{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw Error(`Feature not supported in current reactivity implementation`)},unmount:()=>{throw Error(`Feature not supported in current reactivity implementation`)},schedule:e.schedule??(e=>queueMicrotask(e)),batch:n,untrack:e=>e(),createReadonlyAtom:(e,n)=>{let i=n?.compare??Object.is,a=!1,o,s=()=>{let t=e();return a&&i(o,t)||(o=t,a=!0),o},c=t(()=>(r.get(),s()),{compare:i});return{get:s,subscribe:c.subscribe.bind(c)}},createWritableAtom:(e,n)=>t(e,{compare:n?.compare}),commit:()=>{r.set(e=>e+1)}}}function pY(e,t=Object.is){let n=!1,r;return{get:e.get,markCommitted:e=>{r=e,n=!0},subscribe:i=>e.subscribe(e=>{n&&t(r,e)||i(e)})}}function mY(){return fY({createAtom:iY,batch:tY})}function hY(e,t){return typeof e==`function`?e(t):e}function gY(e){if(Array.isArray(e))return e.map(gY);if(e&&typeof e==`object`){let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;let n=t===null?vY():{},r=Object.keys(e);for(let t=0;t<r.length;t++){let i=r[t];Object.defineProperty(n,i,{configurable:!0,enumerable:!0,value:gY(e[i]),writable:!0})}return n}return e}function _Y(e,t){let n=Object.keys(t),r=e;for(let e=0;e<n.length;e++){let i=n[e];!i.startsWith(`_memo_`)&&i!==`_cellsCache`&&(r[i]=t[i])}return e}function vY(){return Object.create(null)}function yY(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function bY(e,t){return n=>{(t.options.atoms?.[e]??t.baseAtoms[e]).set(e=>hY(n,e))}}function xY(e){if(typeof e!=`object`||!e)return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function SY(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var CY=3;function wY(e,t){return TY(e,t,CY)}function TY(e,t,n){if(Object.is(e,t))return!0;if(n<=0||!xY(e)||!xY(t)||(Array.isArray(e)||Array.isArray(t))&&(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length))return!1;let r=SY(e),i=SY(t);if(r.length!==i.length)return!1;let a=e,o=t;for(let e=0;e<r.length;e++){let i=r[e];if(!Object.prototype.propertyIsEnumerable.call(t,i)||!TY(a[i],o[i],n-1))return!1}return!0}function EY(e,t,n,r=wY){let i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,a=e.options[i];a&&a(e=>{let t=hY(n,e);return r(e,t)?e:t})}function DY(e){return e instanceof Function}function OY(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);i.length&&r(i)})};return r(e),n}var kY=({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:a})=>{let o=[],s;return c=>{i?.();let l=t?.(c),u=!l||l.length!==o?.length;if(!u&&l){for(let e=0;e<l.length;e++)if(l[e]!==o[e]){u=!0;break}}return n?.(u),u&&(o=l,a?.(),s=e(...l??[]),r?.(s)),s}};function AY(e){let t=!1;return()=>{t?e():t=!0}}function jY({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...a}){let o={onAfterUpdate:r?()=>{let{schedule:e,untrack:t}=i._reactivity;e(()=>t(()=>r()))}:void 0};return kY({...a,...o})}function MY(e,t=`_`){let[n,r]=e.replace(t,` `).split(` `);return{fnKey:r,fnName:`${n}.${r}`,parentName:n}}function NY(e,t,n){for(let[r,{fn:i,memoDeps:a}]of Object.entries(n)){let{fnKey:n,fnName:o}=MY(r);t[n]=a?jY({memoDeps:a,fn:i,fnName:o,table:t,feature:e}):i}}function PY(e,t,n,r){for(let[i,{fn:a,memoDeps:o}]of Object.entries(r)){let{fnKey:r,fnName:s}=MY(i);if(o){let i=`_memo_${r}`;t[r]=function(...t){if(!this[i]){let t=this;this[i]=jY({memoDeps:e=>o(t,e),fn:(...e)=>a(t,...e),fnName:s,objectId:t.id,table:n,feature:e})}return this[i](...t)}}else t[r]=function(...e){return a(this,...e)}}}function FY(e,t,n,...r){return e[t]?.(...r)??n(e,...r)}function IY(e){return e.row.getValue(e.column.id)}function LY(e){return e.getValue()??e.table.options.renderFallbackValue}function RY(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}var zY={assignCellPrototype:(e,t)=>{PY(`coreCellsFeature`,e,t,{cell_getValue:{fn:e=>IY(e)},cell_renderValue:{fn:e=>LY(e)},cell_getContext:{fn:e=>RY(e),memoDeps:e=>[e]}})}};function BY(e){if(!e._columnPrototype){e._columnPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignColumnPrototype?.(e._columnPrototype,e)}return e._columnPrototype}function VY(e,t,n,r){let i={...e.getDefaultColumnDef(),...t},a=i.accessorKey,o=a===void 0?void 0:String(a),s=i.id??o?.replaceAll(`.`,`_`)??(typeof i.header==`string`?i.header:void 0),c;if(i.accessorFn)c=i.accessorFn;else if(a!==void 0){if(typeof a==`string`&&a.includes(`.`)){let e=a.split(`.`);c=t=>{let n=t;for(let t=0;t<e.length;t++){let r=e[t];n=n?.[r]}return n}}else c=e=>e[i.accessorKey]}if(!s)throw Error();let l=BY(e),u=Object.create(l);u.accessorFn=c,u.columnDef=i,u.columns=[],u.depth=n,u.id=`${String(s)}`,u.parent=r;let d=e._columnInstanceInitFns;for(let e=0;e<d.length;e++)d[e](u);return u}function HY(e){return e.getIsVisible?.()??!0}function UY(e){return e.getVisibleLeafColumns?.()??e.getAllLeafColumns()}function WY(e,t){let n=e,r=t;return n.getOrderColumnsFn?.()(r)??n._orderGroupedColumns?.(r)??t}function GY(e,t,n,r){return e._orderByColumnPinning?.(t,n,r)??t}function KY(e,t){return e.getPinnedVisibleLeafColumns?.(t)??(t&&t!==`center`?[]:UY(e))}function qY(e){return e.getGlobalFilterFn?.()}function JY(e){return e.getCanGlobalFilter?.()??!1}function YY(e,t){return e._expandRows?.(t)??t}function XY(e){e.autoResetExpanded?.()}function ZY(e){e.autoResetPageIndex?.()}function QY(e){e.autoResetSorting?.()}function $Y(e){e.autoResetCellSelection?.()}function eX(e){return[e,...e.columns.flatMap(e=>e.getFlatColumns())]}function tX(e){if(e.columns.length){let t=e.columns.flatMap(e=>e.getLeafColumns());return WY(e.table,t)}return[e]}function nX(e){return{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>e.renderValue()?.toString?.()??null,...Object.values(e._features).reduce((e,t)=>Object.assign(e,t.getDefaultColumnDef?.()),{}),...e.options.defaultColumn}}function rX(e,t,n,r=0){let i=Array(t.length);for(let a=0;a<t.length;a++){if(!(a in t))continue;let o=t[a],s=VY(e,o,r,n),c=o;s.columns=c.columns?rX(e,c.columns,s,r+1):[],i[a]=s}return i}function iX(e){return rX(e,e.options.columns)}function aX(e){return e.getAllColumns().flatMap(e=>e.getFlatColumns())}function oX(e){let t=vY(),n=e.getAllFlatColumns();for(let e=0;e<n.length;e++){let r=n[e];t[r.id]=r}return t}function sX(e){return WY(e,e.getAllColumns().flatMap(e=>e.getLeafColumns()))}function cX(e){let t=vY(),n=e.getAllLeafColumns();for(let e=0;e<n.length;e++){let r=n[e];t[r.id]=r}return t}function lX(e,t){return e.getAllFlatColumnsById()[t]}var uX={assignColumnPrototype:(e,t)=>{PY(`coreColumnsFeature`,e,t,{column_getFlatColumns:{fn:e=>eX(e),memoDeps:e=>[e.table.options.columns]},column_getLeafColumns:{fn:e=>tX(e),memoDeps:e=>[e.table.atoms.columnOrder?.get(),e.table.atoms.grouping?.get(),e.table.options.columns,e.table.options.groupedColumnMode]}})},constructTableAPIs:e=>{NY(`coreColumnsFeature`,e,{table_getDefaultColumnDef:{fn:()=>nX(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>iX(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>aX(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>oX(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>sX(e),memoDeps:()=>[e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getAllLeafColumnsById:{fn:()=>cX(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>lX(e,t)}})}};function dX(e){if(!e._headerPrototype){e._headerPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignHeaderPrototype?.(e._headerPrototype,e)}return e._headerPrototype}function fX(e,t,n){let r=dX(e),i=Object.create(r);i.colSpan=0,i.column=t,i.depth=n.depth,i.headerGroup=null,i.id=n.id??t.id,i.index=n.index,i.isPlaceholder=!!n.isPlaceholder,i.placeholderId=n.placeholderId,i.rowSpan=0,i.subHeaders=[];let a=e._headerInstanceInitFns;for(let e=0;e<a.length;e++)a[e](i);return i}function pX(e,t=1){let n=t;for(let r=0;r<e.length;r++){let i=e[r];HY(i)&&i.columns.length&&(n=Math.max(n,pX(i.columns,t+1)))}return n}function mX(e,t){return e?`${e}_${t}`:String(t)}function hX(e,t,n,r){let i=e??``;return t&&(i=i?`${i}_${t}`:String(t)),n&&(i=i?`${i}_${n}`:n),r&&(i=i?`${i}_${r}`:r),i}function gX(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].column===t&&n++;return n}function _X(e,t,n,r,i,a){let o={depth:t,id:mX(r,t),headers:[]},s=[];for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i],c=s[s.length-1],l=a.column.depth===o.depth,u,d=!1;if(l&&a.column.parent?u=a.column.parent:(u=a.column,d=!0),c&&c.column===u)c.subHeaders.push(a);else{let e=fX(n,u,{id:hX(r,t,u.id,a.id),isPlaceholder:d,placeholderId:d?String(gX(s,u)):void 0,depth:t,index:s.length});e.subHeaders.push(a),s.push(e)}o.headers.push(a),a.headerGroup=o}for(let e=0;e<a.length;e++)a[e](o);i.push(o),t>0&&_X(s,t-1,n,r,i,a)}function vX(e){for(let t=0;t<e.length;t++){let n=e[t];if(!HY(n.column))continue;let r=0;if(n.subHeaders.length){vX(n.subHeaders);for(let e=0;e<n.subHeaders.length;e++){let t=n.subHeaders[e];HY(t.column)&&(r+=t.colSpan)}}else r=1;if(n.colSpan=r,n.isPlaceholder&&n.subHeaders.length===1&&n.subHeaders[0].column===n.column){let e=1,t=n.subHeaders[0];for(;t;)t.rowSpan=0,e++,t=t.subHeaders.length===1&&t.subHeaders[0].column===n.column?t.subHeaders[0]:void 0;n.rowSpan=e}else n.rowSpan=1}}function yX(e,t,n,r){let i=pX(e),a=[],o=n._headerGroupInstanceInitFns,s=Array(t.length);for(let e=0;e<t.length;e++)e in t&&(s[e]=fX(n,t[e],{depth:i,index:e}));return _X(s,i-1,n,r,a,o),a.reverse(),vX(a[0]?.headers??[]),a}function bX(e,t){for(let n=0;n<e.subHeaders.length;n++)bX(e.subHeaders[n],t);t.push(e)}function xX(e){let t=[];return bX(e,t),t}function SX(e){return{column:e.column,header:e,table:e.column.table}}function CX(e){return yX(e.getAllColumns(),GY(e,UY(e),e=>e.id),e)}function wX(e){return[...e.getHeaderGroups()].reverse()}function TX(e){let t=e.getHeaderGroups(),n=[];for(let e=0;e<t.length;e++){let r=t[e].headers;for(let e=0;e<r.length;e++)n.push(r[e])}return n}function EX(e){let t=e.getHeaderGroups()[0]?.headers??[],n=[];for(let e=0;e<t.length;e++){let r=t[e].getLeafHeaders();for(let e=0;e<r.length;e++)n.push(r[e])}return n}var DX={assignHeaderPrototype:(e,t)=>{PY(`coreHeadersFeature`,e,t,{header_getLeafHeaders:{fn:e=>xX(e),memoDeps:e=>[e.column.table.options.columns]},header_getContext:{fn:e=>SX(e),memoDeps:e=>[e.column.table.options.columns]}})},constructTableAPIs:e=>{NY(`coreHeadersFeature`,e,{table_getHeaderGroups:{fn:()=>CX(e),memoDeps:()=>[e.options.columns,e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.options.groupedColumnMode]},table_getFooterGroups:{fn:()=>wX(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>TX(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>EX(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function OX(e){if(!e._rowPrototype){e._rowPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignRowPrototype?.(e._rowPrototype,e)}return e._rowPrototype}var kX=(e,t,n,r,i,a,o)=>{let s=OX(e),c=Object.create(s);c._displayIndexCache=-1,c._uniqueValuesCache=vY(),c._valuesCache=vY(),c.depth=i,c.id=t,c.index=r,c.original=n,c.parentId=o,c.subRows=a??[];let l=e._rowInstanceInitFns;for(let e=0;e<l.length;e++)l[e](c);return c};function AX(){return e=>jY({feature:`coreRowModelsFeature`,table:e,fnName:`table.getCoreRowModel`,memoDeps:()=>[e.options.data],fn:()=>MX(e,e.options.data),onAfterUpdate:AY(()=>{XY(e),ZY(e),QY(e),$Y(e)})})}function jX(e,t,n,r=0,i){let a=[];for(let o=0;o<n.length;o++){let s=n[o],c=kX(e,e.getRowId(s,o,i),s,o,r,void 0,i?.id);t.flatRows.push(c),t.rowsById[c.id]=c,a.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(s,o),c.originalSubRows?.length&&(c.subRows=jX(e,t,c.originalSubRows,r+1,c)))}return a}function MX(e,t){let n={rows:[],flatRows:[],rowsById:vY()};return n.rows=jX(e,n,t),n}function NX(e){return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=e.options.features.coreRowModel?.(e)??AX()(e)),e._rowModels.coreRowModel()}function PX(e){return e.getCoreRowModel()}function FX(e){return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=e.options.features.filteredRowModel?.(e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function IX(e){return e.getFilteredRowModel()}function LX(e){return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=e.options.features.groupedRowModel?.(e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function RX(e){return e.getGroupedRowModel()}function zX(e){return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=e.options.features.sortedRowModel?.(e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function BX(e){return e.getSortedRowModel()}function VX(e){return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=e.options.features.expandedRowModel?.(e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function HX(e){return e.getExpandedRowModel()}function UX(e){return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=e.options.features.paginatedRowModel?.(e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function WX(e){return e.getPaginatedRowModel()}var GX={constructTableAPIs:e=>{NY(`coreRowModelsFeature`,e,{table_getCoreRowModel:{fn:()=>NX(e)},table_getPreFilteredRowModel:{fn:()=>PX(e)},table_getFilteredRowModel:{fn:()=>FX(e)},table_getPreGroupedRowModel:{fn:()=>IX(e)},table_getGroupedRowModel:{fn:()=>LX(e)},table_getPreSortedRowModel:{fn:()=>RX(e)},table_getSortedRowModel:{fn:()=>zX(e)},table_getPreExpandedRowModel:{fn:()=>BX(e)},table_getExpandedRowModel:{fn:()=>VX(e)},table_getPrePaginatedRowModel:{fn:()=>HX(e)},table_getPaginatedRowModel:{fn:()=>UX(e)},table_getRowModel:{fn:()=>WX(e)}})}};function KX(e){if(!e._cellPrototype){e._cellPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignCellPrototype?.(e._cellPrototype,e)}return e._cellPrototype}function qX(e,t,n){let r=KX(n),i=Object.create(r);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;let a=n._cellInstanceInitFns;for(let e=0;e<a.length;e++)a[e](i);return i}function JX(e){let t=e.table.getRowsInDisplayOrder(),n=e._displayIndexCache;return t[n]===e?n:-1}function YX(e){let t=e.getPrePaginatedRowModel(),n=e.options.paginateExpandedRows===!1?YY(e,t).rows:t.rows;for(let e=0;e<n.length;e++)n[e]._displayIndexCache=e;return n}function XX(e,t){if(yY(e._valuesCache,t))return e._valuesCache[t];let n=e.table.getColumn(t);if(n?.accessorFn)return e._valuesCache[t]=n.accessorFn(e.original,e.index),e._valuesCache[t]}function ZX(e,t){if(yY(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];let n=e.table.getColumn(t);if(n?.accessorFn)return n.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=n.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function QX(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function $X(e){return OY(e.subRows,e=>e.subRows)}function eZ(e){let t=e.getCoreRowModel().flatRows,n=0;for(let e=0;e<t.length;e++)n=Math.max(n,t[e].depth);return n}function tZ(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function nZ(e){let t=[],n=e;for(;;){let e=n.getParentRow();if(!e)break;t.push(e),n=e}return t.reverse()}function rZ(e){let t=e.table.getAllLeafColumns(),n=e._cellsCache;n||=e._cellsCache=new WeakMap;let r=Array(t.length);for(let i=0;i<t.length;i++){let a=t[i],o=n.get(a);o||(o=qX(a,e,e.table),n.set(a,o)),r[i]=o}return r}function iZ(e){let t=vY(),n=e.getAllCells();for(let e=0;e<n.length;e++){let r=n[e];t[r.column.id]=r}return t}function aZ(e,t,n,r){return t.options.getRowId?.(e,n,r)??(r?`${r.id}.${n}`:String(n))}function oZ(e,t,n){let r=(n?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!r&&(r=e.getCoreRowModel().rowsById[t],!r))throw Error();return r}var sZ={assignRowPrototype:(e,t)=>{PY(`coreRowsFeature`,e,t,{row_getDisplayIndex:{fn:e=>JX(e)},row_getAllCellsByColumnId:{fn:e=>iZ(e),memoDeps:e=>[e.getAllCells()]},row_getAllCells:{fn:e=>rZ(e),memoDeps:e=>[e.table.getAllLeafColumns()]},row_getLeafRows:{fn:e=>$X(e),memoDeps:e=>[e.subRows]},row_getParentRow:{fn:e=>tZ(e)},row_getParentRows:{fn:e=>nZ(e)},row_getUniqueValues:{fn:(e,t)=>ZX(e,t)},row_getValue:{fn:(e,t)=>XX(e,t)},row_renderValue:{fn:(e,t)=>QX(e,t)}})},constructTableAPIs:e=>{NY(`coreRowsFeature`,e,{table_getRowsInDisplayOrder:{fn:()=>YX(e),memoDeps:()=>[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?e.atoms.expanded?.get():void 0]},table_getRowId:{fn:(t,n,r)=>aZ(t,e,n,r)},table_getRow:{fn:(t,n)=>oZ(e,t,n)},table_getMaxSubRowDepth:{fn:()=>eZ(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function cZ(e,t,n=(e,t)=>e===t){let r=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(r)for(let t in r){let i=e.baseAtoms[t];if(!i)continue;let a=r[t],o=a===void 0?e.initialState[t]:a;n(e._reactivity.untrack(()=>i.get()),o)||i.set(()=>o)}})}function lZ(e,t,n=(e,t)=>e===t){e._reactivity.batch(()=>{cZ(e,t,n),e._reactivity.commit?.()})}function uZ(e){let t=gY(e.initialState);e._reactivity.batch(()=>{let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r];e.baseAtoms[i].set(t[i])}});let n=Object.values(e._features);for(let t=0;t<n.length;t++)n[t].resetTableInstanceData?.(e)}function dZ(e,t){let{features:n,atoms:r,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:n,atoms:r,initialState:i};let a=e.options.mergeOptions(e.options,t),o={...Object.getOwnPropertyDescriptors(a)};return Object.defineProperties(Object.create(Object.getPrototypeOf(a)),{...o,features:{value:n,enumerable:!0,configurable:!0,writable:!0},atoms:{value:r,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function fZ(e,t,n){let r=dZ(e,hY(t,e.options));e.optionsStore?e.optionsStore.set(()=>r):e.options=r,n?.syncExternalState!==!1&&lZ(e,r.state??null)}var pZ={coreCellsFeature:zY,coreColumnsFeature:uX,coreHeadersFeature:DX,coreRowModelsFeature:GX,coreRowsFeature:sZ,coreTablesFeature:{constructTableAPIs:e=>{NY(`coreTablesFeature`,e,{table_reset:{fn:()=>uZ(e)},table_setOptions:{fn:t=>fZ(e,t)}})}}};function mZ(e){return e}function hZ(e,t={}){return Object.values(e).forEach(e=>{t=e.getInitialState?.(t)??t}),gY(t)}function gZ(e){let t=e.features.coreReactivityFeature,{aggregationFns:n,columnMeta:r,coreRowModel:i,expandedRowModel:a,facetedMinMaxValues:o,facetedRowModel:s,facetedUniqueValues:c,filterFns:l,filterMeta:u,filteredRowModel:d,groupedRowModel:f,paginatedRowModel:p,sortFns:m,sortedRowModel:h,tableMeta:g,..._}=e.features,v={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...pZ,..._},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:n,filterFns:l,sortFns:m},_rowModels:{},atoms:{},baseAtoms:{}},y=Object.values(v._features),b={...y.reduce((e,t)=>Object.assign(e,t.getDefaultTableOptions?.(v)),{}),...e};if(t.wrapExternalAtoms&&b.atoms)for(let[e,n]of Object.entries(b.atoms)){let r=n,i=t.createWritableAtom(r.get(),{debugName:`externalAtom/${e}`});b.atoms[e]=i;let a=!1,o=r.subscribe(e=>{a||i.set(e)}),s=i.subscribe(e=>{a=!0,r.set(e),a=!1});t.addSubscription(o),t.addSubscription(s)}t.createOptionsStore?(v.optionsStore=t.createWritableAtom(b,{debugName:`table/optionsStore`}),Object.defineProperty(v,"options",{configurable:!0,enumerable:!0,get(){return v.optionsStore.get()},set(e){v.optionsStore.set(()=>e)}})):v.options=b,v.initialState=hZ(v._features,v.options.initialState);let x=Object.keys(v.initialState);for(let e=0;e<x.length;e++){let n=x[e];v.baseAtoms[n]=t.createWritableAtom(v.initialState[n],{debugName:`table/baseAtoms/${n}`}),v.atoms[n]=t.createReadonlyAtom(()=>{let e=v.options,t=e.atoms?.[n],r=t?t.get():v.baseAtoms[n].get();if(t)return r;let i=e.state;if(i&&yY(i,n)){let e=i[n];return e===void 0?v.initialState[n]:e}return r},{debugName:`table/atoms/${n}`})}cZ(v),v.store=dY(t.createReadonlyAtom(()=>{let e={};for(let t=0;t<x.length;t++){let n=x[t];e[n]=v.atoms[n].get()}return e},{compare:oY,debugName:`table/store`}));for(let e=0;e<y.length;e++){let t=y[e];t.initTableInstanceData?.(v),t.initCellInstanceData&&v._cellInstanceInitFns.push(t.initCellInstanceData.bind(t)),t.initColumnInstanceData&&v._columnInstanceInitFns.push(t.initColumnInstanceData.bind(t)),t.initHeaderGroupInstanceData&&v._headerGroupInstanceInitFns.push(t.initHeaderGroupInstanceData.bind(t)),t.initHeaderInstanceData&&v._headerInstanceInitFns.push(t.initHeaderInstanceData.bind(t)),t.initRowInstanceData&&v._rowInstanceInitFns.push(t.initRowInstanceData.bind(t)),t.constructTableAPIs?.(v)}return v}function _Z(e,t){let n=t._rowModels.facetedMinMaxValues??=vY(),r=n[e.id];return r||=n[e.id]=t.options.features.facetedMinMaxValues?.(t,e.id)??(()=>void 0),r()}function vZ(e,t){let n=e?.id??``,r=t._rowModels.facetedRowModels??=vY(),i=r[n];return i||=r[n]=t.options.features.facetedRowModel?.(t,n)??(()=>t.getPreFilteredRowModel()),i()}function yZ(e,t){let n=t._rowModels.facetedUniqueValues??=vY(),r=n[e.id];return r||=n[e.id]=t.options.features.facetedUniqueValues?.(t,e.id)??bZ(),r()}function bZ(){let e=new Map;return()=>e}function xZ(e){e._rowModels.globalFacetedMinMaxValues||(e._rowModels.globalFacetedMinMaxValues=e.options.features.facetedMinMaxValues?.(e,`__global__`)??(()=>void 0));let t=e._rowModels.globalFacetedMinMaxValues;return t()}function SZ(e){e._rowModels.globalFacetedRowModel||(e._rowModels.globalFacetedRowModel=e.options.features.facetedRowModel?.(e,`__global__`)??(()=>e.getPreFilteredRowModel()));let t=e._rowModels.globalFacetedRowModel;return t()}function CZ(e){e._rowModels.globalFacetedUniqueValues||(e._rowModels.globalFacetedUniqueValues=e.options.features.facetedUniqueValues?.(e,`__global__`)??bZ());let t=e._rowModels.globalFacetedUniqueValues;return t()}var wZ={assignColumnPrototype:(e,t)=>{PY(`columnFacetingFeature`,e,t,{column_getFacetedRowModel:{fn:e=>vZ(e,e.table)},column_getFacetedMinMaxValues:{fn:e=>_Z(e,e.table)},column_getFacetedUniqueValues:{fn:e=>yZ(e,e.table)}})},constructTableAPIs:e=>{NY(`columnFacetingFeature`,e,{table_getGlobalFacetedRowModel:{fn:()=>SZ(e)},table_getGlobalFacetedMinMaxValues:{fn:()=>xZ(e)},table_getGlobalFacetedUniqueValues:{fn:()=>CZ(e)}})}};function TZ(){return[]}function EZ(e){let t=e.table._rowModelFns.filterFns,n=e.table.getCoreRowModel().flatRows,r;for(let t=0;t<n.length;t++){let i=n[t].getValue(e.id);if(i!=null){r=i;break}}let i;return i=typeof r==`string`?`includesString`:typeof r==`number`?`inNumberRange`:typeof r==`boolean`?`equals`:Array.isArray(r)?`arrIncludes`:Object.prototype.toString.call(r)===`[object Date]`?`inDateRange`:typeof r==`object`&&r?`equals`:`weakEquals`,t?.[i]}function DZ(e){let t=null,n=e.table._rowModelFns.filterFns;return t=DY(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn===`auto`?EZ(e):n?.[e.columnDef.filterFn],t??void 0}function OZ(e){return(e.columnDef.enableColumnFilter??!0)&&(e.table.options.enableColumnFilters??!0)&&(e.table.options.enableFilters??!0)&&!!e.accessorFn}function kZ(e){return jZ(e)>-1}function AZ(e){return e.table.atoms.columnFilters?.get()?.find(t=>t.id===e.id)?.value}function jZ(e){return e.table.atoms.columnFilters?.get()?.findIndex(t=>t.id===e.id)??-1}function MZ(e,t){NZ(e.table,n=>{let r=DZ(e),i=n.find(t=>t.id===e.id),a=hY(t,i?i.value:void 0);if(FZ(r,a,e))return n.filter(t=>t.id!==e.id);let o={id:e.id,value:a};return i?n.map(t=>t.id===e.id?o:t):n.length?[...n,o]:[o]})}function NZ(e,t){let n=e.getAllLeafColumnsById();EY(e,`columnFilters`,e=>hY(t,e).filter(e=>{let t=n[e.id];return!(t&&FZ(DZ(t),e.value,t))}))}function PZ(e,t){NZ(e,t?[]:gY(e.initialState.columnFilters??[]))}function FZ(e,t,n){return t===void 0?!0:e?.autoRemove?!!e.autoRemove(t,n):typeof t==`string`&&!t}var IZ={getInitialState:e=>({columnFilters:TZ(),...e}),getDefaultColumnDef:()=>({filterFn:`auto`}),getDefaultTableOptions:e=>({onColumnFiltersChange:bY(`columnFilters`,e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),assignColumnPrototype:(e,t)=>{PY(`columnFilteringFeature`,e,t,{column_getAutoFilterFn:{fn:e=>EZ(e)},column_getFilterFn:{fn:e=>DZ(e)},column_getCanFilter:{fn:e=>OZ(e)},column_getIsFiltered:{fn:e=>kZ(e)},column_getFilterValue:{fn:e=>AZ(e)},column_getFilterIndex:{fn:e=>jZ(e)},column_setFilterValue:{fn:(e,t)=>MZ(e,t)}})},initRowInstanceData:e=>{e.columnFilters=vY(),e.columnFiltersMeta=vY()},constructTableAPIs:e=>{NY(`columnFilteringFeature`,e,{table_setColumnFilters:{fn:t=>NZ(e,t)},table_resetColumnFilters:{fn:t=>PZ(e,t)}})}};function LZ(){return vY()}function RZ(){return{size:150,minSize:20,maxSize:2**53-1}}function zZ(e){let t=RZ(),n=e.table.atoms.columnSizing?.get(),r=n&&yY(n,e.id)?n[e.id]:void 0;return Math.min(Math.max(e.columnDef.minSize??t.minSize,r??e.columnDef.size??t.size),e.columnDef.maxSize??t.maxSize)}function BZ(e){let t=vY(),n=vY(),r=Array(e.length),i=0;for(let n=0;n<e.length;n++){let a=e[n],o=FY(a,`getSize`,zZ);r[n]=o,t[a.id]=i,i+=o}let a=0;for(let t=e.length-1;t>=0;t--)n[e[t].id]=a,a+=r[t];return{starts:t,afters:n}}function VZ(e){return{all:BZ(KY(e)),center:BZ(KY(e,`center`)),start:BZ(KY(e,`start`)),end:BZ(KY(e,`end`))}}function HZ(e){return e===`start`?`start`:e===`end`?`end`:e===`center`?`center`:`all`}function UZ(e,t){return FY(e.table,`getColumnOffsets`,VZ)[HZ(t)].starts[e.id]??0}function WZ(e,t){return FY(e.table,`getColumnOffsets`,VZ)[HZ(t)].afters[e.id]??0}function GZ(e){YZ(e.table,t=>{let n=vY(),r=Object.keys(t);for(let i=0;i<r.length;i++){let a=r[i];a!==e.id&&(n[a]=t[a])}return n})}function KZ(e){if(!e.subHeaders.length)return zZ(e.column);let t=0;for(let n=0;n<e.subHeaders.length;n++)t+=KZ(e.subHeaders[n]);return t}function qZ(e){return KZ(e)}function JZ(e){if(e.index>0){let t=e.headerGroup?.headers[e.index-1];if(t)return FY(t,`getStart`,JZ)+FY(t,`getSize`,qZ)}return 0}function YZ(e,t){e.options.onColumnSizingChange?.(t)}function XZ(e,t){YZ(e,t?vY():Object.assign(vY(),gY(e.initialState.columnSizing??{})))}function ZZ(e){let t=0;for(let n=0;n<e.length;n++)t+=FY(e[n],`getSize`,zZ);return t}function QZ(e){return e.getHeaderGroups()[0]?.headers.reduce((e,t)=>e+qZ(t),0)??0}function $Z(e){return ZZ(KY(e,`start`))}function eQ(e){return ZZ(KY(e,`center`))}function tQ(e){return ZZ(KY(e,`end`))}function nQ(){return{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}}function rQ(e){return(e.columnDef.enableResizing??!0)&&(e.table.options.enableColumnResizing??!0)}function iQ(e){return e.table.atoms.columnResizing?.get()?.isResizingColumn===e.id}function aQ(e,t){let n=e.table.getColumn(e.column.id),r=rQ(n);return i=>{if(!r||uQ(i)&&i.touches.length>1)return;let a=qZ(e),o=e.getLeafHeaders().map(e=>[e.column.id,zZ(e.column)]),s=uQ(i)?Math.round(i.touches[0].clientX):i.clientX,c=vY(),l=(e,t)=>{if(typeof t!=`number`)return;let r=n.table,i=r.options.columnResizeMode===`onChange`||e===`end`;r._reactivity.batch(()=>{oQ(r,e=>{let n=r.options.columnResizeDirection===`rtl`?-1:1,a=(t-(e.startOffset??0))*n,o=e.startSize??0,s=Math.max(o>0?a/o:0,-.999999);if(i){let t=e.columnSizingStart;for(let e=0;e<t.length;e++){let n=t[e],r=n[1];c[n[0]]=Math.round(Math.max(r>0?r+r*s:a/t.length,0)*100)/100}}return{...e,deltaOffset:a,deltaPercentage:s}}),i&&YZ(r,e=>Object.assign(vY(),e,c))})},u=null,d=!1,f,p=()=>{d?(d=!1,l(`move`,f),u=requestAnimationFrame(p)):u=null},m=e=>{f=e,typeof requestAnimationFrame==`function`?u===null?(l(`move`,e),u=requestAnimationFrame(p)):d=!0:l(`move`,e)},h=e=>{u!==null&&(cancelAnimationFrame(u),u=null,d=!1),n.table._reactivity.batch(()=>{l(`end`,e??f),oQ(n.table,e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))})},g=t||(typeof document<`u`?document:null),_={moveHandler:e=>m(e.clientX),upHandler:e=>{g?.removeEventListener(`mousemove`,_.moveHandler),g?.removeEventListener(`mouseup`,_.upHandler),h(e.clientX)}},v={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),m(e.touches[0].clientX),!1),upHandler:e=>{y(),e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(e.touches[0]?.clientX)},cancelHandler:()=>{y(),h()}},y=()=>{g?.removeEventListener(`touchmove`,v.moveHandler),g?.removeEventListener(`touchend`,v.upHandler),g?.removeEventListener(`touchcancel`,v.cancelHandler)},b=lQ()?{passive:!1}:!1;uQ(i)?(g?.addEventListener(`touchmove`,v.moveHandler,b),g?.addEventListener(`touchend`,v.upHandler,b),g?.addEventListener(`touchcancel`,v.cancelHandler,b)):(g?.addEventListener(`mousemove`,_.moveHandler,b),g?.addEventListener(`mouseup`,_.upHandler,b)),oQ(n.table,e=>({...e,startOffset:s,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:o,isResizingColumn:n.id}))}}function oQ(e,t){e.options.onColumnResizingChange?.(t)}function sQ(e,t){oQ(e,t?nQ():gY(e.initialState.columnResizing??nQ()))}var cQ=null;function lQ(){if(typeof cQ==`boolean`)return cQ;let e=!1;try{let t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener(`test`,n,t),window.removeEventListener(`test`,n)}catch{e=!1}return cQ=e,cQ}function uQ(e){return e.type===`touchstart`}var dQ={getInitialState:e=>({columnResizing:nQ(),...e}),getDefaultTableOptions:e=>({columnResizeMode:`onEnd`,columnResizeDirection:`ltr`,onColumnResizingChange:bY(`columnResizing`,e)}),assignColumnPrototype:(e,t)=>{PY(`columnResizingFeature`,e,t,{column_getCanResize:{fn:e=>rQ(e)},column_getIsResizing:{fn:e=>iQ(e)}})},assignHeaderPrototype:(e,t)=>{PY(`columnResizingFeature`,e,t,{header_getResizeHandler:{fn:(e,t)=>aQ(e,t)}})},constructTableAPIs:e=>{NY(`columnResizingFeature`,e,{table_setColumnResizing:{fn:t=>oQ(e,t)},table_resetHeaderSizeInfo:{fn:t=>sQ(e,t)}})}},fQ={getInitialState:e=>({columnSizing:LZ(),...e}),getDefaultColumnDef:()=>RZ(),getDefaultTableOptions:e=>({onColumnSizingChange:bY(`columnSizing`,e)}),assignColumnPrototype:(e,t)=>{PY(`columnSizingFeature`,e,t,{column_getSize:{fn:e=>zZ(e),memoDeps:e=>[t.options.columns,t.atoms.columnSizing?.get()?.[e.id]]},column_getStart:{fn:(e,t)=>UZ(e,t)},column_getAfter:{fn:(e,t)=>WZ(e,t)},column_resetSize:{fn:e=>GZ(e)}})},assignHeaderPrototype:(e,t)=>{PY(`columnSizingFeature`,e,t,{header_getSize:{fn:e=>qZ(e),memoDeps:e=>[t.options.columns,e.column.columns.length>0?t.atoms.columnSizing?.get():t.atoms.columnSizing?.get()?.[e.column.id]]},header_getStart:{fn:e=>JZ(e),memoDeps:()=>[t.options.columns,t.atoms.columnSizing?.get(),t.atoms.columnOrder?.get(),t.atoms.columnPinning?.get(),t.atoms.columnVisibility?.get(),t.atoms.grouping?.get(),t.options.groupedColumnMode]}})},constructTableAPIs:e=>{NY(`columnSizingFeature`,e,{table_getColumnOffsets:{fn:()=>VZ(e),memoDeps:()=>[e.options.columns,e.atoms.columnSizing?.get(),e.atoms.columnOrder?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.atoms.grouping?.get(),e.options.groupedColumnMode]},table_setColumnSizing:{fn:t=>YZ(e,t)},table_resetColumnSizing:{fn:t=>XZ(e,t)},table_getTotalSize:{fn:()=>QZ(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getStartTotalSize:{fn:()=>$Z(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getCenterTotalSize:{fn:()=>eQ(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getEndTotalSize:{fn:()=>tQ(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]}})}};function pQ(){return vY()}function mQ(e,t){gQ(e)&&SQ(e.table,n=>{let r=Object.assign(vY(),n),i=t??!FY(e,`getIsVisible`,hQ),a=e.getLeafColumns();for(let e=0;e<a.length;e++){let t=a[e];gQ(t)&&(r[t.id]=i)}return r})}function hQ(e){let t=e.table.atoms.columnVisibility?.get();if(!t)return!0;let n=e.columns;return n.length?n.some(e=>FY(e,`getIsVisible`,hQ)):(yY(t,e.id)?t[e.id]:void 0)??!0}function gQ(e){return(e.columnDef.enableHiding??!0)&&(e.table.options.enableHiding??!0)}function _Q(e){return t=>{mQ(e,t.target.checked)}}function vQ(e){let t=e.getAllCells(),n=[];for(let e=0;e<t.length;e++){let r=t[e];FY(r.column,`getIsVisible`,hQ)&&n.push(r)}return GY(e.table,n,e=>e.column.id,()=>FY(e,`getVisibleCellsByColumnId`,yQ))}function yQ(e){let t=vY(),n=e.getAllCells();for(let e=0;e<n.length;e++){let r=n[e];FY(r.column,`getIsVisible`,hQ)&&(t[r.column.id]=r)}return t}function bQ(e){return e.getAllFlatColumns().filter(e=>FY(e,`getIsVisible`,hQ))}function xQ(e){return e.getAllLeafColumns().filter(e=>FY(e,`getIsVisible`,hQ))}function SQ(e,t){EY(e,`columnVisibility`,t)}function CQ(e,t){SQ(e,t?vY():Object.assign(vY(),gY(e.initialState.columnVisibility??{})))}function wQ(e,t){t??=!TQ(e);let n=vY(),r=e.getAllLeafColumns();for(let e=0;e<r.length;e++){let i=r[e];n[i.id]=t||!gQ(i)}SQ(e,n)}function TQ(e){return!e.getAllLeafColumns().some(e=>!FY(e,`getIsVisible`,hQ))}function EQ(e){return e.getAllLeafColumns().some(e=>FY(e,`getIsVisible`,hQ))}function DQ(e){return t=>{wQ(e,t.target.checked)}}var OQ={getInitialState:e=>({columnVisibility:pQ(),...e}),getDefaultTableOptions:e=>({onColumnVisibilityChange:bY(`columnVisibility`,e)}),assignColumnPrototype:(e,t)=>{PY(`columnVisibilityFeature`,e,t,{column_getIsVisible:{fn:e=>hQ(e),memoDeps:e=>[t.options.columns,t.atoms.columnVisibility?.get(),e.columns]},column_getCanHide:{fn:e=>gQ(e)},column_getToggleVisibilityHandler:{fn:e=>_Q(e)},column_toggleVisibility:{fn:(e,t)=>mQ(e,t)}})},assignRowPrototype:(e,t)=>{PY(`columnVisibilityFeature`,e,t,{row_getVisibleCells:{fn:e=>vQ(e),memoDeps:e=>[e.getAllCells(),t.atoms.columnPinning?.get(),t.atoms.columnVisibility?.get()]},row_getVisibleCellsByColumnId:{fn:e=>yQ(e),memoDeps:e=>[e.getAllCells(),t.atoms.columnVisibility?.get()]}})},constructTableAPIs:e=>{NY(`columnVisibilityFeature`,e,{table_getVisibleFlatColumns:{fn:()=>bQ(e),memoDeps:()=>[e.atoms.columnVisibility?.get(),e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getVisibleLeafColumns:{fn:()=>xQ(e),memoDeps:()=>[e.atoms.columnVisibility?.get(),e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_setColumnVisibility:{fn:t=>SQ(e,t)},table_resetColumnVisibility:{fn:t=>CQ(e,t)},table_toggleAllColumnsVisible:{fn:t=>wQ(e,t)},table_getIsAllColumnsVisible:{fn:()=>TQ(e)},table_getIsSomeColumnsVisible:{fn:()=>EQ(e)},table_getToggleAllColumnsVisibilityHandler:{fn:()=>DQ(e)}})}};function kQ(e){let t=Object.assign((e,n,r,i)=>{let a=e.getValue(n),o=t.resolveDataValue?t.resolveDataValue(a):a;return t.filter(o,r,e,n,i)},e);return t}var AQ=kQ({filter:(e,t)=>!!e?.includes(t),autoRemove:e=>jQ(e),resolveFilterValue:e=>String(e).toLowerCase(),resolveDataValue:e=>e==null?void 0:String(e).toLowerCase()});function jQ(e){return e==null||e===``}function MQ(e){return(e.columnDef.enableGlobalFilter??!0)&&(e.table.options.enableGlobalFilter??!0)&&(e.table.options.enableFilters??!0)&&(e.table.options.getColumnCanGlobalFilter?.(e)??!0)&&!!e.accessorFn}function NQ(){return AQ}function PQ(e){let{globalFilterFn:t}=e.options,n=e._rowModelFns.filterFns;return DY(t)?t:t===`auto`?NQ():n?.[t]}function FQ(e,t){e.options.onGlobalFilterChange?.(t)}function IQ(e,t){FQ(e,t?void 0:gY(e.initialState.globalFilter))}var LQ={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultTableOptions:e=>({onGlobalFilterChange:bY(`globalFilter`,e),globalFilterFn:`auto`,getColumnCanGlobalFilter:t=>{if(`enableGlobalFilter`in t.columnDef&&t.columnDef.enableGlobalFilter===!0)return!0;let n=e.getCoreRowModel().flatRows.find(e=>e.getAllCellsByColumnId()[t.id]?.getValue()!=null)?.getAllCellsByColumnId()[t.id]?.getValue();return typeof n==`string`||typeof n==`number`}}),assignColumnPrototype:(e,t)=>{PY(`globalFilteringFeature`,e,t,{column_getCanGlobalFilter:{fn:e=>MQ(e)}})},constructTableAPIs:e=>{NY(`globalFilteringFeature`,e,{table_getGlobalAutoFilterFn:{fn:()=>NQ()},table_getGlobalFilterFn:{fn:()=>PQ(e)},table_setGlobalFilter:{fn:t=>FQ(e,t)},table_resetGlobalFilter:{fn:t=>IQ(e,t)}})}},RQ=0,zQ=10;function BQ(){return{pageIndex:RQ,pageSize:zQ}}function VQ(e){if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if((e.atoms.pagination?.get()?.pageIndex??RQ)===RQ)return;GQ(e,!0)}}function HQ(e,t){EY(e,`pagination`,t)}function UQ(e,t){HQ(e,t?BQ():gY(e.initialState.pagination??BQ()))}function WQ(e,t){HQ(e,n=>{let r=hY(t,n.pageIndex),i=e.options.pageCount===void 0||e.options.pageCount===-1?2**53-1:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})}function GQ(e,t){WQ(e,t?RQ:e.initialState.pagination?.pageIndex??RQ)}function KQ(e,t){qQ(e,t?zQ:e.initialState.pagination?.pageSize??zQ)}function qQ(e,t){HQ(e,e=>{let n=Math.max(1,hY(t,e.pageSize)),r=e.pageSize===1/0?0:e.pageSize*e.pageIndex,i=n===1/0?0:Math.floor(r/n);return{...e,pageIndex:i,pageSize:n}})}function JQ(e){let t=n$(e),n=[];return t&&t>0&&(n=[...Array(t)].fill(null).map((e,t)=>t)),n}function YQ(e){return(e.atoms.pagination?.get()?.pageIndex??0)>0}function XQ(e){let t=e.atoms.pagination?.get()?.pageIndex??RQ,n=n$(e);return n===-1||n!==0&&t<n-1}function ZQ(e){let t=e.atoms.pagination?.get()?.pageIndex??RQ,n=n$(e);return Number.isFinite(n)&&n>0&&t<n-1}function QQ(e){return WQ(e,e=>e-1)}function $Q(e){return WQ(e,e=>e+1)}function e$(e){return WQ(e,0)}function t$(e){let t=n$(e);if(!(!Number.isFinite(t)||t<=0))return WQ(e,t-1)}function n$(e){let t=e.options.pageCount;if(t!=null)return t;let n=r$(e),r=e.atoms.pagination?.get()?.pageSize??zQ;return r===1/0&&Number.isFinite(n)&&n>0?1:Math.ceil(n/r)}function r$(e){return e.options.rowCount??e.getPrePaginatedRowModel().rows.length}var i$={getInitialState:e=>({...e,pagination:{...BQ(),...e.pagination}}),getDefaultTableOptions:e=>({onPaginationChange:bY(`pagination`,e)}),constructTableAPIs:e=>{NY(`rowPaginationFeature`,e,{table_autoResetPageIndex:{fn:()=>VQ(e)},table_setPagination:{fn:t=>HQ(e,t)},table_resetPagination:{fn:t=>UQ(e,t)},table_setPageIndex:{fn:t=>WQ(e,t)},table_resetPageIndex:{fn:t=>GQ(e,t)},table_setPageSize:{fn:t=>qQ(e,t)},table_getPageCount:{fn:()=>n$(e)},table_resetPageSize:{fn:t=>KQ(e,t)},table_getPageOptions:{fn:()=>JQ(e)},table_getCanPreviousPage:{fn:()=>YQ(e)},table_getCanNextPage:{fn:()=>XQ(e)},table_getCanLastPage:{fn:()=>ZQ(e)},table_previousPage:{fn:()=>QQ(e)},table_nextPage:{fn:()=>$Q(e)},table_firstPage:{fn:()=>e$(e)},table_lastPage:{fn:()=>t$(e)},table_getRowCount:{fn:()=>r$(e)}})}};function a$(){return vY()}function o$(e,t){e.options.onRowSelectionChange?.(t)}function s$(e,t){e._lastSelectedRowId=null,o$(e,t?vY():Object.assign(vY(),gY(e.initialState.rowSelection??{})))}function c$(e,t,n){e._lastSelectedRowId=null,o$(e,r=>{if(t=t===void 0?!FY(e,`getIsAllRowsSelected`,h$):t,n?.deselectAll&&!t)return vY();let i=Object.assign(vY(),r),a=e.getPreGroupedRowModel().flatRows;if(t){let e=new Map;a.forEach(t=>{j$(t,e)&&(i[t.id]=!0)})}else a.forEach(e=>{T$(e)&&delete i[e.id]});return i})}function l$(e,t,n){e._lastSelectedRowId=null,o$(e,r=>{let i=t===void 0?!FY(e,`getIsAllPageRowsSelected`,g$):t;if(n?.deselectAll&&!i)return vY();let a=Object.assign(vY(),r);return e.getRowModel().rows.forEach(t=>{A$(a,t.id,i,!0,e,!0)}),a})}function u$(e){return e.getCoreRowModel()}function d$(e){let t=e.getCoreRowModel();return FY(e,`getIsSomeRowsSelected`,_$)?P$(t,e):{rows:[],flatRows:[],rowsById:vY()}}function f$(e){let t=e.getFilteredRowModel();return FY(e,`getIsSomeRowsSelected`,_$)?P$(t,e):{rows:[],flatRows:[],rowsById:vY()}}function p$(e){let t=e.getSortedRowModel();return FY(e,`getIsSomeRowsSelected`,_$)?P$(t,e):{rows:[],flatRows:[],rowsById:vY()}}function m$(e){return Object.keys(e.atoms.rowSelection?.get()??{})}function h$(e){let t=e.getFilteredRowModel().flatRows,n=e.atoms.rowSelection?.get()??{},r=!!(t.length&&Object.keys(n).length);if(r){let e=new Map;t.some(t=>!F$(t,n)&&j$(t,e))&&(r=!1)}return r}function g$(e){let t=e.getPaginatedRowModel().flatRows,n=e.atoms.rowSelection?.get()??{},r=new Map,i=!1;for(let e=0;e<t.length;e++){let a=t[e];if(F$(a,n))!i&&j$(a,r)&&(i=!0);else if(j$(a,r))return!1}return i}function _$(e){return FY(e,`getSelectedRowIds`,m$).length>0}function v$(e){return e.getPaginatedRowModel().flatRows.filter(e=>T$(e)).some(e=>S$(e)||FY(e,`getIsSomeSelected`,C$))}function y$(e){return t=>{c$(e,t.target.checked)}}function b$(e){return t=>{l$(e,t.target.checked)}}function x$(e,t,n){let r=S$(e);o$(e.table,i=>{t=t===void 0?!r:t;let a=Object.assign(vY(),i);return A$(a,e.id,t,(n?.selectChildren??!0)&&D$(e),e.table),!t&&n?.deselectParents&&M$(a,e),a})}function S$(e){return F$(e,e.table.atoms.rowSelection?.get()??{})}function C$(e){return I$(e)===`some`}function w$(e){return I$(e)===`all`}function T$(e){let t=e.table.options;return typeof t.enableRowSelection==`function`?t.enableRowSelection(e):t.enableRowSelection??!0}function E$(e){let t=e.table.options;return typeof t.enableSubRowSelection==`function`?t.enableSubRowSelection(e):t.enableSubRowSelection??!0}function D$(e){let t=e.table.options;return typeof t.enableMultiRowSelection==`function`?t.enableMultiRowSelection(e):t.enableMultiRowSelection??!0}function O$(e,t){let n=T$(e);return r=>{if(!n)return;let i=r,a=e.table,o=i.target.checked,s=a._lastSelectedRowId;a.options.enableRowRangeSelection!==!1&&s!==null&&D$(e)&&(a.options.isRowRangeSelectionEvent?.(r)??!1)&&k$(e,s,o,t)||x$(e,o,t),a._lastSelectedRowId=e.id}}function k$(e,t,n,r){let i=r?.selectChildren??!0,a=e.table,o=a.getRowsInDisplayOrder(),s=a.getPrePaginatedRowModel().rowsById[t]??a.getCoreRowModel().rowsById[t];if(!s)return!1;let c=s.getDisplayIndex(),l=e.getDisplayIndex(),u=o[c],d=o[l];if(c<0||l<0||c>=o.length||l>=o.length||u?.id!==s.id||d?.id!==e.id||!D$(s)||!D$(e))return!1;let f=Math.min(c,l),p=Math.max(c,l);return o$(a,e=>{let t=Object.assign(vY(),e);for(let e=f;e<=p;e++){let s=o[e];T$(s)&&D$(s)&&(A$(t,s.id,n,i,a),!n&&r?.deselectParents&&M$(t,s))}return t}),!0}function A$(e,t,n,r,i,a){let o=i.getRow(t,!0);n?(D$(o)||Object.keys(e).forEach(t=>delete e[t]),T$(o)&&(e[t]=!0)):(!a||T$(o))&&delete e[t],r&&o.subRows.length&&E$(o)&&o.subRows.forEach(t=>A$(e,t.id,n,r,i,a))}function j$(e,t){if(!T$(e))return!1;let n=e.table;if(n.options.enableSubRowSelection===!0)return!0;let r=e.parentId;if(r===void 0)return!0;let i=t.get(r);if(i!==void 0)return i;let a=n.getCoreRowModel().rowsById,o=[],s=!0,c=r;for(;c!==void 0;){let e=t.get(c);if(e!==void 0){s=e;break}o.push(c);let r=a[c]??n.getRow(c,!0);if(!E$(r)){s=!1;break}c=r.parentId}return o.forEach(e=>t.set(e,s)),s}function M$(e,t){let n=t.table.getCoreRowModel().rowsById,r=t.parentId;for(;r!==void 0;)delete e[r],r=(n[r]??t.table.getRow(r,!0)).parentId}function N$(e,t,n,r){let i=[];for(let a=0;a<e.length;a++){let o=e[a],s=F$(o,t);if(s&&(n.push(o),r[o.id]=o),o.subRows.length){let e=N$(o.subRows,t,n,r);if(s){let t=Object.create(Object.getPrototypeOf(o));_Y(t,o),t.subRows=e,i.push(t)}}else s&&i.push(o)}return i}function P$(e,t){let n=[],r=vY(),i=t.atoms.rowSelection?.get()??{};return{rows:N$(e.rows,i,n,r),flatRows:n,rowsById:r}}function F$(e,t){return!!(yY(t,e.id)&&t[e.id])}function I$(e){if(!e.subRows.length)return!1;let t=e.table.atoms.rowSelection?.get()??{},n=!1,r=!0,i=!1;for(let a=0;a<e.subRows.length;a++){let o=e.subRows[a];if(n&&!r)break;if(T$(o)&&(i=!0,F$(o,t)?n=!0:r=!1),o.subRows.length){let e=I$(o);e===`all`?(n=!0,i=!0):e===`some`?(n=!0,r=!1,i=!0):r=!1}}return i?r?`all`:n?`some`:!1:!1}var L$={initTableInstanceData:e=>{e._lastSelectedRowId=null},resetTableInstanceData:e=>{e._lastSelectedRowId=null},getInitialState:e=>({rowSelection:a$(),...e}),getDefaultTableOptions:e=>({onRowSelectionChange:bY(`rowSelection`,e),enableRowSelection:!0,enableMultiRowSelection:!0,enableRowRangeSelection:!0,enableSubRowSelection:!0,isRowRangeSelectionEvent:e=>{let t=e;return!!(t.shiftKey||t.nativeEvent?.shiftKey)}}),assignRowPrototype:(e,t)=>{PY(`rowSelectionFeature`,e,t,{row_toggleSelected:{fn:(e,t,n)=>x$(e,t,n)},row_getIsSelected:{fn:e=>S$(e)},row_getIsSomeSelected:{fn:e=>C$(e),memoDeps:e=>[e.subRows,e.table.atoms.rowSelection?.get(),e.table.options.enableRowSelection]},row_getIsAllSubRowsSelected:{fn:e=>w$(e),memoDeps:e=>[e.subRows,e.table.atoms.rowSelection?.get(),e.table.options.enableRowSelection]},row_getCanSelect:{fn:e=>T$(e)},row_getCanSelectSubRows:{fn:e=>E$(e)},row_getCanMultiSelect:{fn:e=>D$(e)},row_getToggleSelectedHandler:{fn:(e,t)=>O$(e,t)}})},constructTableAPIs:e=>{NY(`rowSelectionFeature`,e,{table_setRowSelection:{fn:t=>o$(e,t)},table_resetRowSelection:{fn:t=>s$(e,t)},table_toggleAllRowsSelected:{fn:(t,n)=>c$(e,t,n)},table_toggleAllPageRowsSelected:{fn:(t,n)=>l$(e,t,n)},table_getPreSelectedRowModel:{fn:()=>u$(e)},table_getSelectedRowModel:{fn:()=>d$(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getCoreRowModel()]},table_getFilteredSelectedRowModel:{fn:()=>f$(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getFilteredRowModel()]},table_getGroupedSelectedRowModel:{fn:()=>p$(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getSortedRowModel()]},table_getSelectedRowIds:{fn:()=>m$(e),memoDeps:()=>[e.atoms.rowSelection?.get()]},table_getIsAllRowsSelected:{fn:()=>h$(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getFilteredRowModel(),e.options.enableRowSelection,e.options.enableSubRowSelection]},table_getIsAllPageRowsSelected:{fn:()=>g$(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getPaginatedRowModel(),e.options.enableRowSelection,e.options.enableSubRowSelection]},table_getIsSomeRowsSelected:{fn:()=>_$(e),memoDeps:()=>[e.atoms.rowSelection?.get()]},table_getIsSomePageRowsSelected:{fn:()=>v$(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getPaginatedRowModel(),e.options.enableRowSelection]},table_getToggleAllRowsSelectedHandler:{fn:()=>y$(e)},table_getToggleAllPageRowsSelectedHandler:{fn:()=>b$(e)}})}},R$=/([0-9]+)/gm;function z$(e){let t=Object.assign((e,n,r)=>{let i=e.getValue(r),a=n.getValue(r),o=t.resolveDataValue;return o&&(i=o(i),a=o(a)),t.sort(i,a,e,n,r)},e);return t}var B$=z$({resolveDataValue:e=>K$(e).toLowerCase(),sort:(e,t)=>q$(e,t)}),V$=z$({resolveDataValue:e=>K$(e).toLowerCase(),sort:(e,t)=>W$(e,t)}),H$=z$({resolveDataValue:e=>G$(e),sort:(e,t)=>e>t?1:e<t?-1:0}),U$=z$({sort:(e,t)=>W$(e,t)});function W$(e,t){return e===t?0:e>t?1:-1}function G$(e){return e instanceof Date?e.getTime():e}function K$(e){return typeof e==`number`?isNaN(e)||e===1/0||e===-1/0?``:String(e):typeof e==`string`?e:``}function q$(e,t){let n=0,r=0,i=e.length,a=t.length;for(;n<i&&r<a;){let i=J$(e.charCodeAt(n)),a=J$(t.charCodeAt(r)),o=Y$(e,n,i),s=Y$(t,r,a);if(!i&&!a){let i=X$(e,n,o,t,r,s);if(i)return i;n=o,r=s;continue}if(i!==a)return i?1:-1;let c=Z$(e,n,o,t,r,s);if(c)return c;n=o,r=s}return $$(e,n)-$$(t,r)}function J$(e){return e>=48&&e<=57}function Y$(e,t,n){let r=t+1;for(;r<e.length&&J$(e.charCodeAt(r))===n;)r++;return r}function X$(e,t,n,r,i,a){let o=n-t,s=a-i,c=o<s?o:s;for(let n=0;n<c;n++){let a=e.charCodeAt(t+n),o=r.charCodeAt(i+n);if(a>o)return 1;if(o>a)return-1}return o>s?1:s>o?-1:0}function Z$(e,t,n,r,i,a){let o=t;for(;o<n&&e.charCodeAt(o)===48;)o++;let s=i;for(;s<a&&r.charCodeAt(s)===48;)s++;let c=n-o,l=a-s;if(c===0&&l===0)return 0;if(c<=15&&l<=15){let t=Q$(e,o,n),i=Q$(r,s,a);return t>i?1:i>t?-1:0}let u=parseInt(e.slice(t,n),10),d=parseInt(r.slice(i,a),10);return u>d?1:d>u?-1:0}function Q$(e,t,n){let r=0;for(let i=t;i<n;i++)r=r*10+e.charCodeAt(i)-48;return r}function $$(e,t){let n=0,r=t;for(;r<e.length;)n++,r=Y$(e,r,J$(e.charCodeAt(r)));return n}function e1(){return[]}function t1(e,t){EY(e,`sorting`,t)}function n1(e,t){t1(e,t?[]:gY(e.initialState.sorting??[]))}function r1(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&n1(e)}function i1(e){let t=e.table._rowModelFns.sortFns,n=e.table.getFilteredRowModel().flatRows.slice(0,10),r,i=!1;for(let t=0;t<n.length;t++){let a=n[t].getValue(e.id);if(Object.prototype.toString.call(a)===`[object Date]`){r=`datetime`;break}if(typeof a==`string`&&(i=!0,a.split(R$).length>1)){r=`alphanumeric`;break}}if(!r&&i&&(r=`text`),r){let e=t?.[r];if(e||r===`alphanumeric`&&(e=t?.text),e)return e}return U$}function a1(e){let t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let n=0;n<t.length;n++){let r=t[n].getValue(e.id);if(r!=null)return typeof r==`string`?`asc`:`desc`}return`desc`}function o1(e){let t=e.table._rowModelFns.sortFns;return DY(e.columnDef.sortFn)?e.columnDef.sortFn:e.columnDef.sortFn===`auto`?i1(e):t?.[e.columnDef.sortFn]??U$}function s1(e,t,n){let r=l1(e,n&&d1(e)),i=t!==void 0;t1(e.table,a=>{let o=a.findIndex(t=>t.id===e.id),s=o===-1?void 0:a[o],c=[],l,u=i?t:r===`desc`,d=!!(a.length&&d1(e)&&n);return l=d?s?`toggle`:`add`:s?`toggle`:`replace`,l===`toggle`&&(i||r||(l=`remove`)),l===`add`?(c=[...a,{id:e.id,desc:u}],c.splice(0,c.length-(e.table.options.maxMultiSortColCount??2**53-1))):c=l===`toggle`?d?a.map(t=>t.id===e.id?{...t,desc:u}:t):[{id:e.id,desc:u}]:l===`remove`?d?a.filter(t=>t.id!==e.id):[]:[{id:e.id,desc:u}],c})}function c1(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??a1(e)===`desc`?`desc`:`asc`}function l1(e,t){let n=c1(e),r=f1(e);return r?r!==n&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:r===`desc`?`asc`:`desc`:n}function u1(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function d1(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function f1(e){let t=e.table.atoms.sorting?.get()?.find(t=>t.id===e.id);return t?t.desc?`desc`:`asc`:!1}function p1(e){return e.table.atoms.sorting?.get()?.findIndex(t=>t.id===e.id)??-1}function m1(e){t1(e.table,t=>t.length?t.filter(t=>t.id!==e.id):[])}function h1(e){let t=u1(e);return n=>{t&&s1(e,void 0,d1(e)?e.table.options.isMultiSortEvent?.(n):!1)}}var g1={getInitialState(e){return{sorting:e1(),...e}},getDefaultColumnDef(){return{sortFn:`auto`,sortUndefined:1}},getDefaultTableOptions(e){return{autoResetSorting:!1,onSortingChange:bY(`sorting`,e),isMultiSortEvent:e=>e.shiftKey}},assignColumnPrototype(e,t){PY(`rowSortingFeature`,e,t,{column_getAutoSortFn:{fn:e=>i1(e)},column_getAutoSortDir:{fn:e=>a1(e)},column_getSortFn:{fn:e=>o1(e)},column_toggleSorting:{fn:(e,t,n)=>s1(e,t,n)},column_getFirstSortDir:{fn:e=>c1(e)},column_getNextSortingOrder:{fn:(e,t)=>l1(e,t)},column_getCanSort:{fn:e=>u1(e)},column_getCanMultiSort:{fn:e=>d1(e)},column_getIsSorted:{fn:e=>f1(e)},column_getSortIndex:{fn:e=>p1(e)},column_clearSorting:{fn:e=>m1(e)},column_getToggleSortingHandler:{fn:e=>h1(e)}})},constructTableAPIs(e){NY(`rowSortingFeature`,e,{table_autoResetSorting:{fn:()=>r1(e)},table_setSorting:{fn:t=>t1(e,t)},table_resetSorting:{fn:t=>n1(e,t)}})}};function _1(e,t,n){return n.options.filterFromLeafRows?v1(e,t,n):y1(e,t,n)}function v1(e,t,n){let r=[],i=vY(),a=n.options.maxLeafRowFilterDepth??100,o=(e,r=0)=>{let i=[];for(let s of e){let e=kX(n,s.id,s.original,s.index,s.depth,void 0,s.parentId);e.columnFilters=s.columnFilters,e.columnFiltersMeta=s.columnFiltersMeta,s.subRows.length&&r<a?(e.subRows=o(s.subRows,r+1),(e.subRows.length||t(e))&&i.push(e)):t(e)&&(e.subRows=s.subRows,i.push(e))}return i},s=o(e);return b1(s,r,i),{rows:s,flatRows:r,rowsById:i}}function y1(e,t,n){let r=[],i=vY(),a=n.options.maxLeafRowFilterDepth??100,o=(e,s=0)=>{let c=[];for(let l of e)if(t(l)){if(l.subRows.length&&s<a){let e=kX(n,l.id,l.original,l.index,l.depth,void 0,l.parentId),t=l;e.columnFilters=t.columnFilters,e.columnFiltersMeta=t.columnFiltersMeta,c.push(e),r.push(e),i[e.id]=e,e.subRows=o(l.subRows,s+1)}else c.push(l),r.push(l),i[l.id]=l,l.subRows.length&&s>=a&&b1(l.subRows,r,i)}return c};return{rows:o(e),flatRows:r,rowsById:i}}function b1(e,t,n){for(let r of e)t.push(r),n[r.id]=r,r.subRows.length&&b1(r.subRows,t,n)}function x1(){return(e,t)=>{let n=e;return jY({feature:`columnFacetingFeature`,table:n,fnName:`createFacetedRowModel`,memoDeps:()=>[n.getPreFilteredRowModel(),n.atoms.columnFilters?.get(),n.atoms.globalFilter?.get(),n.getFilteredRowModel()],fn:(e,r,i)=>S1(n,t,e,r,i)})}}function S1(e,t,n,r,i){let a=i!=null&&i!==``;if(!n.rows.length||!r?.length&&!a)return n;let o=[];if(r)for(let e=0;e<r.length;e++){let n=r[e].id;n!==t&&o.push(n)}return a&&t!==`__global__`&&o.push(`__global__`),o.length?_1(n.rows,e=>{for(let t=0;t<o.length;t++)if(e.columnFilters?.[o[t]]===!1)return!1;return!0},e):n}function C1(){return(e,t)=>{let n=e;return jY({feature:`columnFacetingFeature`,table:n,fnName:`table.getFacetedUniqueValues`,memoDeps:()=>{if(t===`__global__`)return[FY(n,`getGlobalFacetedRowModel`,SZ).flatRows];let e=n.getColumn(t);return e?[FY(e,`getFacetedRowModel`,vZ,n).flatRows]:[n.getPreFilteredRowModel().flatRows]},fn:e=>w1(n,t,e)})}}function w1(e,t,n){let r=t===`__global__`?e.getAllLeafColumns().filter(e=>JY(e)).map(e=>e.id):[t],i=new Map;for(let e=0;e<n.length;e++)for(let t=0;t<r.length;t++){let a=n[e].getUniqueValues(r[t]);if(a)for(let e=0;e<a.length;e++){let t=a[e],n=i.get(t);i.set(t,n===void 0?1:n+1)}}return i}function T1(){return e=>{let t=e;return jY({feature:`columnFilteringFeature`,table:t,fnName:`table.getFilteredRowModel`,memoDeps:()=>[t.getPreFilteredRowModel(),t.atoms.columnFilters?.get(),t.atoms.globalFilter?.get()],fn:()=>E1(t),onAfterUpdate:AY(()=>ZY(t))})}}function E1(e){let t=e.getPreFilteredRowModel(),n=e.atoms.columnFilters?.get(),r=e.atoms.globalFilter?.get(),i=r!=null&&r!==``;if(!t.rows.length||!n?.length&&!i){let e=t.flatRows;for(let t=0;t<e.length;t++){let n=e[t];n.columnFilters=vY(),n.columnFiltersMeta=vY()}return t}let a=[],o=[];n?.forEach(t=>{let n=lX(e,t.id);if(!n)return;let r=DZ(n);r&&a.push({id:t.id,filterFn:r,resolvedValue:r.resolveFilterValue?.(t.value)??t.value})});let s=n?.map(e=>e.id)??[];if(i){let t=qY(e),n=t?e.getAllLeafColumns().filter(JY):[];t&&n.length&&(s.push(`__global__`),n.forEach(e=>{o.push({id:e.id,filterFn:t,resolvedValue:t.resolveFilterValue?.(r)??r})}))}let c=t.flatRows;for(let e=0;e<c.length;e++){let t=c[e];if(t.columnFilters=vY(),t.columnFiltersMeta=vY(),a.length)for(let e=0;e<a.length;e++){let n=a[e],r=n.id;t.columnFilters[r]=n.filterFn(t,r,n.resolvedValue,e=>{t.columnFiltersMeta||=vY(),t.columnFiltersMeta[r]=e})}if(o.length){for(let e=0;e<o.length;e++){let n=o[e],r=n.id;if(n.filterFn(t,r,n.resolvedValue,e=>{t.columnFiltersMeta||=vY(),t.columnFiltersMeta[r]=e})){t.columnFilters.__global__=!0;break}}t.columnFilters.__global__!==!0&&(t.columnFilters.__global__=!1)}}return _1(t.rows,e=>{for(let t=0;t<s.length;t++)if(e.columnFilters[s[t]]===!1)return!1;return!0},e)}function D1(){return e=>{let t=e;return jY({feature:`rowPaginationFeature`,table:t,fnName:`table.getPaginatedRowModel`,memoDeps:()=>[t.getPrePaginatedRowModel(),t.atoms.pagination?.get(),t.options.paginateExpandedRows?void 0:t.atoms.expanded?.get()],fn:()=>O1(t)})}}function O1(e){let t=e.getPrePaginatedRowModel(),n=e.atoms.pagination?.get();if(!t.rows.length)return t;let{pageSize:r,pageIndex:i}=n??BQ(),{rows:a,flatRows:o,rowsById:s}=t,c=a;if(r!==1/0||i!==0){let e=r*i,t=e+r;c=a.slice(e,t)}let l;l=e.options.paginateExpandedRows?{rows:c,flatRows:o,rowsById:s}:YY(e,{rows:c,flatRows:o,rowsById:s}),l.flatRows=[];let u=new Set,d=e=>{u.has(e.id)||(u.add(e.id),l.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d))};return l.rows.forEach(d),l}function k1(){return e=>{let t=e;return jY({feature:`rowSortingFeature`,table:t,fnName:`table.getSortedRowModel`,memoDeps:()=>[t.atoms.sorting?.get(),t.getPreSortedRowModel()],fn:()=>A1(t),onAfterUpdate:AY(()=>ZY(t))})}}function A1(e){let t=e.getPreSortedRowModel(),n=e.atoms.sorting?.get();if(!t.rows.length||!n?.length)return t;let r=[],i=n.filter(t=>{let n=e.getColumn(t.id);return n?u1(n):!1});if(!i.length)return t;let a=[];for(let t=0;t<i.length;t++){let n=i[t],r=e.getColumn(n.id);r&&a.push({id:n.id,desc:n.desc,sortUndefined:r.columnDef.sortUndefined,invertSorting:r.columnDef.invertSorting,sortFn:o1(r)})}let o=(e,t)=>{for(let n=0;n<a.length;n++){let r=a[n],i=r.sortUndefined,o=r.desc,s=0;if(i){let n=e.getValue(r.id),a=t.getValue(r.id),o=n===void 0,c=a===void 0;if(o&&c)continue;if(o||c){if(i===`first`)return o?-1:1;if(i===`last`)return o?1:-1;s=o?i:-i}}if(s===0&&(s=r.sortFn(e,t,r.id)),s!==0)return o&&(s*=-1),r.invertSorting&&(s*=-1),s}return e.index-t.index},s=e=>{let t=e.slice();t.sort(o);let n=!1;for(let i=0;i<t.length;i++){let a=t[i];a!==e[i]&&(n=!0);let o=r.length;if(r.push(a),a.subRows.length){let e=s(a.subRows);if(e.changed){let s=Object.create(Object.getPrototypeOf(a));_Y(s,a),s.subRows=e.rows,t[i]=s,r[o]=s,n=!0}}}return{rows:t,changed:n}};return{rows:s(t.rows).rows,flatRows:r,rowsById:t.rowsById}}var j1=typeof window>`u`?C.useEffect:C.useLayoutEffect;function M1(e,t){let[{table:n,rootSource:r}]=(0,C.useState)(()=>{let t=gZ({...e,features:{coreReactivityFeature:mY(),...e.features}});return t.Subscribe=(e=>uY({...e,source:e.source??t.store})),t.FlexRender=VJ,{table:t,rootSource:pY(t.store,oY)}}),i=n;fZ(i,t=>({...t,...e}),{syncExternalState:!1});let a=i.options.state,o=r.get(),s=lY(r,t,{compare:oY});return j1(()=>{r.markCommitted(o),lZ(i,a??null,oY)}),(0,C.useMemo)(()=>({...n,options:e,state:s}),[n,e,s])}var N1=e=>ey(e)&&typeof e.id==`string`&&typeof e.desc==`boolean`,P1=e=>ey(e)&&typeof e.id==`string`&&`value`in e,F1=e=>Number.isInteger(e)&&typeof e==`number`&&e>=0,I1=e=>Number.isInteger(e)&&typeof e==`number`&&e>0;function L1(e){if(!ey(e))return null;let t={};return Array.isArray(e.sorting)&&(t.sorting=tw(e.sorting,N1)),Array.isArray(e.columnFilters)&&(t.columnFilters=tw(e.columnFilters,P1)),rw(e.globalFilter)&&(t.globalFilter=e.globalFilter),ey(e.columnVisibility)&&(t.columnVisibility=ew(e.columnVisibility,iw)),ey(e.columnSizing)&&(t.columnSizing=ew(e.columnSizing,aw)),F1(e.pageIndex)&&(t.pageIndex=e.pageIndex),I1(e.pageSize)&&(t.pageSize=e.pageSize),t}var R1={first:`Première page`,previous:`Page précédente`,next:`Page suivante`,last:`Dernière page`},z1=`nf.datagrid:`,B1=e=>z1+e.key;function V1(e){return e?L1(sw(e.storage??`session`,B1(e))):null}var H1=mZ({columnFilteringFeature:IZ,globalFilteringFeature:LQ,rowSortingFeature:g1,rowPaginationFeature:i$,columnVisibilityFeature:OQ,columnSizingFeature:fQ,columnResizingFeature:dQ,rowSelectionFeature:L$,columnFacetingFeature:wZ,filteredRowModel:T1(),sortedRowModel:k1(),paginatedRowModel:D1(),facetedRowModel:x1(),facetedUniqueValues:C1(),sortFns:{alphanumeric:B$,text:V$,datetime:H$,basic:U$},filterFns:{includesString:AQ}}),U1=[{value:`contains`,label:`contient`},{value:`equals`,label:`égal à`},{value:`startsWith`,label:`commence par`},{value:`endsWith`,label:`finit par`},{value:`isEmpty`,label:`est vide`},{value:`notEmpty`,label:`non vide`}],W1=[{value:`=`,label:`=`},{value:`!=`,label:`≠`},{value:`>`,label:`>`},{value:`>=`,label:`≥`},{value:`<`,label:`<`},{value:`<=`,label:`≤`}],G1=[{value:`equals`,label:`est`}],K1=[{value:`in`,label:`est l'un de`}],q1=new Set([`isEmpty`,`notEmpty`]);function J1(e){return e===`number`?W1:e===`select`?G1:e===`multiselect`?K1:U1}var Y1=e=>e.split(`,`).map(e=>e.trim()).filter(e=>e!==``),X1=new Set([`=`,`!=`,`>`,`>=`,`<`,`<=`]);function Z1(e,t){let n=VP(e),r=t.value;if(!q1.has(t.op)&&r===``||X1.has(t.op)&&Number.isNaN(Number(r)))return!0;switch(t.op){case`contains`:return n.toLowerCase().includes(r.toLowerCase());case`equals`:return n===r;case`in`:{let e=Y1(r);return e.length===0||Y1(n).some(t=>e.includes(t))}case`startsWith`:return n.toLowerCase().startsWith(r.toLowerCase());case`endsWith`:return n.toLowerCase().endsWith(r.toLowerCase());case`isEmpty`:return n===``;case`notEmpty`:return n!==``;case`=`:return Number(e)===Number(r);case`!=`:return Number(e)!==Number(r);case`>`:return Number(e)>Number(r);case`>=`:return Number(e)>=Number(r);case`<`:return Number(e)<Number(r);case`<=`:return Number(e)<=Number(r);default:return!0}}var Q1=(e,t,n)=>{let r=n;return!r||Z1(e.getValue(t),r)},$1=!1;function e0(){if($1||typeof document>`u`)return;$1=!0;let e=document.createElement(`style`);e.setAttribute(`data-nf-datagrid-resizer`,``),e.textContent=`
|
|
309
|
-
.nf-dg-resizer{position:absolute;top:0;right:0;height:100%;width:11px;
|
|
310
|
-
display:flex;align-items:center;justify-content:flex-end;
|
|
311
|
-
cursor:col-resize;user-select:none;touch-action:none;z-index:2;
|
|
312
|
-
background:transparent;}
|
|
313
|
-
.nf-dg-resizer::before{content:"";width:2px;height:55%;border-radius:2px;
|
|
314
|
-
background:var(--mantine-color-default-border);opacity:.35;
|
|
315
|
-
transition:opacity 120ms ease,height 120ms ease,background-color 120ms ease;}
|
|
316
|
-
.nf-dg-resizer:hover::before{opacity:1;height:70%;}
|
|
317
|
-
.nf-dg-resizer:focus-visible{outline:2px solid var(--mantine-primary-color-filled);outline-offset:-2px;}
|
|
318
|
-
.nf-dg-resizer:focus-visible::before{opacity:1;height:100%;background:var(--mantine-primary-color-filled);}
|
|
319
|
-
.nf-dg-resizer[data-resizing="true"]::before{opacity:1;height:100%;
|
|
320
|
-
background:var(--mantine-primary-color-filled);}
|
|
321
|
-
`,document.head.appendChild(e)}function t0({column:e,isServer:t}){let n=e.columnDef.meta,r=n?.filterType??`text`,i=J1(r),a=e.getFilterValue(),o=a?.op??i[0].value,s=a?.value??``,c=q1.has(o),l=String(e.columnDef.header??e.id);if(r===`multiselect`){let r=t?n?.filterOptions??[]:[...new Set([...e.getFacetedUniqueValues().keys()].flatMap(e=>Y1(String(e))))].sort();return(0,G.jsx)(Dh,{size:`xs`,placeholder:`filtrer`,data:r,value:Y1(s),clearable:!0,searchable:!0,hidePickedOptions:!0,comboboxProps:{withinPortal:!0},onChange:t=>e.setFilterValue(t.length?{op:`in`,value:t.join(`,`)}:void 0),"aria-label":`filtrer ${l}`})}if(r===`select`){let r=t?n?.filterOptions??[]:[...e.getFacetedUniqueValues().keys()].map(e=>String(e)).filter(e=>e.length>0).sort();return(0,G.jsx)(F_,{size:`xs`,placeholder:`filtrer`,data:r,value:s||null,clearable:!0,searchable:!0,comboboxProps:{withinPortal:!0},onChange:t=>e.setFilterValue(t?{op:`equals`,value:t}:void 0),"aria-label":`filtrer ${l}`})}return(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,children:[(0,G.jsx)(F_,{size:`xs`,w:r===`number`?64:96,data:i,value:o,comboboxProps:{withinPortal:!0},"aria-label":`opérateur ${l}`,onChange:t=>{if(!t)return;let n=t;q1.has(n)?e.setFilterValue({op:n,value:``}):e.setFilterValue(s===``?void 0:{op:n,value:s})}}),!c&&(0,G.jsx)(Sv,{size:`xs`,type:r===`number`?`number`:`text`,placeholder:`valeur`,value:s,"aria-label":`valeur ${l}`,onChange:t=>{let n=t.currentTarget.value;e.setFilterValue(n===``?void 0:{op:o,value:n})}})]})}function n0(e){let{columns:t,getRowId:n,onRowClick:r,dimRow:i,pageSizeOptions:a=[10,25,50,100],emptyMessage:o=`Aucune donnée.`,height:s=`auto`,initialSort:c}=e,l=e.mode===`server`,u=c?[{id:c.key,desc:c.dir===`desc`}]:[],[d]=(0,C.useState)(()=>V1(e.persist)),[f,p]=(0,C.useState)(()=>d?.sorting??u),[m,h]=(0,C.useState)(()=>d?.columnFilters??[]),[g,_]=(0,C.useState)(()=>d?.globalFilter??``),[v,y]=(0,C.useState)(()=>({pageIndex:d?.pageIndex??0,pageSize:d?.pageSize??e.pageSize??25})),[b,x]=(0,C.useState)(()=>d?.columnVisibility??{}),[S,w]=(0,C.useState)(()=>d?.columnSizing??{}),[T,E]=(0,C.useState)(()=>(d?.columnFilters?.length??0)>0),[D,O]=(0,C.useState)({}),k=()=>O({});(0,C.useEffect)(e0,[]);let A=e.searchable??!0,j=l?e.loader:null,[M,N]=(0,C.useState)([]),[P,F]=(0,C.useState)(0),[I,L]=(0,C.useState)(!1),[R,z]=(0,C.useState)(!1),[B,ee]=(0,C.useState)(null);(0,C.useEffect)(()=>{if(!j)return;let e=!1;z(!0);let t=f[0]?{key:f[0].id,dir:f[0].desc?`desc`:`asc`}:null,n=m.map(e=>{let t=e.value;return{key:e.id,op:t.op,value:t.value}});return j({page:v.pageIndex+1,pageSize:v.pageSize,sort:t,search:A?g:``,columnFilters:n}).then(t=>{e||(N(t.rows),F(t.total),L(t.totalIsLowerBound===!0),ee(null))}).catch(t=>{e||ee(t instanceof Error?t.message:`chargement échoué`)}).finally(()=>{e||z(!1)}),()=>{e=!0}},[j,A,f,m,g,v.pageIndex,v.pageSize]),(0,C.useEffect)(()=>{if(!e.persist)return;let t=ow(e.persist.storage??`session`);if(!t)return;let n={sorting:f,columnFilters:m,globalFilter:g,columnVisibility:b,columnSizing:S,pageIndex:v.pageIndex,pageSize:v.pageSize};try{t.setItem(B1(e.persist),JSON.stringify(n))}catch{}},[e.persist,f,m,g,b,S,v]),(0,C.useEffect)(()=>{y(e=>e.pageIndex===0?e:{...e,pageIndex:0})},[f,m,g]);let{onSearchChange:te}=e;(0,C.useEffect)(()=>{te?.(A?g:``)},[te,A,g]);let ne=(0,C.useRef)(!0);(0,C.useEffect)(()=>{ne.current?ne.current=!1:(y(e=>e.pageIndex===0?e:{...e,pageIndex:0}),N([]),F(0))},[e.resetPageSignal]);let V=M1({features:H1,data:l?M:e.data,columns:(0,C.useMemo)(()=>t.map(e=>({id:e.key,accessorFn:t=>e.value?e.value(t):``,header:e.header,enableSorting:e.sortable??!1,enableColumnFilter:e.filterable??!1,...e.size!==void 0&&{size:e.size},filterFn:Q1,cell:t=>e.render?e.render(t.row.original):VP(t.getValue()),meta:{align:e.align,filterType:e.filterType,filterOptions:e.filterOptions,hint:e.hint}})),[t]),state:{sorting:f,columnFilters:m,globalFilter:g,pagination:v,columnVisibility:b,columnSizing:S,rowSelection:D},onSortingChange:p,onColumnFiltersChange:h,onGlobalFilterChange:_,onPaginationChange:y,onColumnVisibilityChange:x,onColumnSizingChange:w,onRowSelectionChange:O,enableRowSelection:e.selectable??!1,enableColumnResizing:!0,columnResizeMode:`onChange`,getRowId:e=>n(e),globalFilterFn:`includesString`,manualPagination:l,manualSorting:l,manualFiltering:l,...l&&{rowCount:P}}),re=l?R:e.loading??!1,ie=l?B:e.error??null,ae=V.getRowModel().rows,oe=l?P:V.getFilteredRowModel().rows.length,H=l?Math.max(1,Math.ceil(P/v.pageSize)):Math.max(1,V.getPageCount()),se=oe===0?0:v.pageIndex*v.pageSize+1,U=Math.min((v.pageIndex+1)*v.pageSize,oe),ce=t.some(e=>e.filterable),W=m.length,le=g.trim().length>0||W>0,ue=[];g.trim().length>0&&ue.push(`recherche « ${g.trim()} »`);for(let e of m){let n=t.find(t=>t.key===e.id),r=e.value,i=J1(n?.filterType).find(e=>e.value===r?.op)?.label??r?.op??``,a=r?.value??``;ue.push(`${n?.header??e.id} ${i}${a?` « ${a} »`:``}`.trim())}let de=()=>{_(``),h([]),y(e=>({...e,pageIndex:0}))},fe=()=>{e.persist&&ow(e.persist.storage??`session`)?.removeItem(B1(e.persist)),p(u),h([]),_(``),x({}),w({}),y({pageIndex:0,pageSize:e.pageSize??25}),E(!1)},pe=e.selectable??!1,me=pe?V.getSelectedRowModel().rows.map(e=>e.original):[],he=pe&&!!e.renderBulkActions&&me.length>0,ge=e=>e===!1?(0,G.jsx)(XC,{size:13,style:{opacity:.4}}):e===`asc`?(0,G.jsx)(kC,{size:13}):(0,G.jsx)(DC,{size:13});return(0,G.jsxs)(z_,{gap:`xs`,style:{height:s===`auto`?void 0:s,display:`flex`,flexDirection:`column`},children:[(0,G.jsxs)(X,{gap:`xs`,wrap:`nowrap`,children:[A&&(0,G.jsx)(Sv,{size:`xs`,leftSection:(0,G.jsx)(YC,{size:14}),placeholder:e.searchPlaceholder??`Rechercher…`,value:g,onChange:e=>_(e.currentTarget.value),style:{flex:1,minWidth:200},"aria-label":`recherche dans le tableau`}),!A&&(0,G.jsx)(`div`,{style:{flex:1}}),ce&&(0,G.jsxs)(fp,{size:`xs`,variant:T?`light`:`subtle`,color:W>0?`brand`:`gray`,leftSection:(0,G.jsx)(BC,{size:14}),onClick:()=>E(e=>!e),"aria-expanded":T,children:[`Filtres`,W>0?` (${W})`:``]}),le&&(0,G.jsxs)(fp,{size:`xs`,variant:`light`,color:`red`,leftSection:(0,G.jsx)(zC,{size:14}),onClick:de,"aria-label":`effacer recherche et filtres`,children:[`Effacer`,W>0?` (${W})`:``]}),(0,G.jsxs)(Km,{shadow:`md`,position:`bottom-end`,withinPortal:!0,closeOnItemClick:!1,children:[(0,G.jsx)(Km.Target,{children:(0,G.jsx)(fp,{size:`xs`,variant:`subtle`,color:`gray`,leftSection:(0,G.jsx)(NC,{size:14}),children:`Colonnes`})}),(0,G.jsxs)(Km.Dropdown,{children:[(0,G.jsx)(Km.Label,{children:`Afficher les colonnes`}),(0,G.jsx)(z_,{gap:6,px:`sm`,py:4,children:V.getAllLeafColumns().map(e=>(0,G.jsx)(Hf,{size:`xs`,checked:e.getIsVisible(),onChange:()=>e.toggleVisibility(),label:String(e.columnDef.header??e.id)},e.id))}),e.persist&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Km.Divider,{}),(0,G.jsx)(Km.Item,{color:`red`,leftSection:(0,G.jsx)(QC,{size:14}),onClick:fe,children:`Effacer la sauvegarde`})]})]})]})]}),he&&(0,G.jsx)(fc,{withBorder:!0,p:`xs`,role:`region`,"aria-label":`Actions groupées`,children:(0,G.jsxs)(X,{justify:`space-between`,wrap:`nowrap`,gap:`xs`,children:[(0,G.jsxs)(X,{gap:`sm`,wrap:`nowrap`,children:[(0,G.jsxs)(Z,{size:`sm`,fw:600,children:[me.length,` sélectionné`,me.length>1?`s`:``]}),(0,G.jsx)(fp,{size:`xs`,variant:`subtle`,color:`gray`,onClick:k,children:`Tout désélectionner`})]}),(0,G.jsx)(X,{gap:`xs`,wrap:`nowrap`,children:e.renderBulkActions?.(me,k)})]})}),(0,G.jsxs)(`div`,{style:{position:`relative`,flex:s===`auto`?`0 0 auto`:1,minHeight:0,display:`flex`},children:[(0,G.jsx)(sm,{visible:re,zIndex:3,overlayProps:{backgroundOpacity:.35},loaderProps:{children:(0,G.jsxs)(z_,{align:`center`,gap:6,children:[(0,G.jsx)(ll,{size:`sm`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:e.loadingMessage??`Chargement…`})]})}}),(0,G.jsx)(rc,{style:{flex:1,minHeight:0,width:`100%`},type:s===`auto`?`never`:`auto`,offsetScrollbars:`y`,children:(0,G.jsx)(dw,{loading:!1,error:ie,children:(0,G.jsxs)(dv,{stickyHeader:s!==`auto`,striped:!0,highlightOnHover:!0,style:{tableLayout:`fixed`,width:V.getCenterTotalSize(),minWidth:`100%`},children:[(0,G.jsxs)(dv.Thead,{children:[V.getHeaderGroups().map(e=>(0,G.jsxs)(dv.Tr,{children:[pe&&(0,G.jsx)(dv.Th,{style:{width:36,textAlign:`center`},onClick:e=>e.stopPropagation(),children:(0,G.jsx)(Hf,{size:`xs`,"aria-label":`Tout sélectionner`,checked:V.getIsAllPageRowsSelected(),indeterminate:V.getIsSomePageRowsSelected()&&!V.getIsAllPageRowsSelected(),onChange:V.getToggleAllPageRowsSelectedHandler()})}),e.headers.map(e=>{let t=e.column.columnDef.meta?.align??`left`,n=e.column.columnDef.meta?.hint;return(0,G.jsxs)(dv.Th,{style:{textAlign:t,width:e.getSize(),position:`relative`},children:[(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,justify:t===`right`?`flex-end`:`flex-start`,children:[e.column.getCanSort()?(0,G.jsxs)(sc,{onClick:e.column.getToggleSortingHandler(),"aria-label":`trier par ${String(e.column.columnDef.header)}`,style:{display:`inline-flex`,alignItems:`center`,gap:4},children:[(0,G.jsx)(Z,{size:`sm`,fw:600,children:BJ(e.column.columnDef.header,e.getContext())}),ge(e.column.getIsSorted())]}):(0,G.jsx)(Z,{size:`sm`,fw:600,children:BJ(e.column.columnDef.header,e.getContext())}),n?(0,G.jsx)(xw,{text:n}):null]}),e.column.getCanResize()&&(0,G.jsx)(`div`,{className:`nf-dg-resizer`,"data-resizing":e.column.getIsResizing()?`true`:void 0,onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),onClick:e=>e.stopPropagation(),onDoubleClick:()=>e.column.resetSize(),tabIndex:0,onKeyDown:t=>{if(t.key===`Home`){t.preventDefault(),e.column.resetSize();return}let n=t.key===`ArrowRight`?1:t.key===`ArrowLeft`?-1:0;if(n===0)return;t.preventDefault();let r=e.column.id,i=e.column.columnDef.minSize??20,a=Math.max(i,e.getSize()+n*(t.shiftKey?50:10));w(e=>({...e,[r]:a}))},role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":e.getSize(),"aria-valuemin":e.column.columnDef.minSize??20,"aria-label":`redimensionner ${String(e.column.columnDef.header)}`,title:`Glisser pour redimensionner · double-clic pour réinitialiser · au clavier : flèches`})]},e.id)})]},e.id)),T&&(0,G.jsxs)(dv.Tr,{children:[pe&&(0,G.jsx)(dv.Th,{style:{width:36}}),V.getHeaderGroups()[0]?.headers.map(e=>(0,G.jsx)(dv.Th,{style:{paddingTop:4,paddingBottom:8,width:e.getSize()},children:e.column.getCanFilter()?(0,G.jsx)(t0,{column:e.column,isServer:l}):null},`f-${e.id}`))]})]}),(0,G.jsxs)(dv.Tbody,{children:[ae.length===0&&!re&&(0,G.jsx)(dv.Tr,{children:(0,G.jsx)(dv.Td,{colSpan:V.getVisibleLeafColumns().length+ +!!pe,style:{textAlign:`center`,padding:24},children:le?(0,G.jsxs)(z_,{gap:8,align:`center`,children:[(0,G.jsx)(Z,{size:`sm`,children:`Aucun résultat pour les critères actifs.`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:ue.join(` · `)}),(0,G.jsx)(fp,{size:`xs`,variant:`light`,leftSection:(0,G.jsx)(zC,{size:14}),onClick:de,children:`Effacer les critères`})]}):(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:o})})}),ae.map(e=>(0,G.jsxs)(dv.Tr,{onClick:r?()=>r(e.original):void 0,onKeyDown:r?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),r(e.original))}:void 0,tabIndex:r?0:void 0,style:{...r?{cursor:`pointer`}:null,...i?.(e.original)?{opacity:.5}:null},children:[pe&&(0,G.jsx)(dv.Td,{style:{width:36,textAlign:`center`},onClick:e=>e.stopPropagation(),children:(0,G.jsx)(Hf,{size:`xs`,"aria-label":`Sélectionner la ligne`,checked:e.getIsSelected(),onChange:e.getToggleSelectedHandler()})}),e.getVisibleCells().map(e=>(0,G.jsx)(dv.Td,{style:{textAlign:e.column.columnDef.meta?.align??`left`,width:e.column.getSize(),overflow:`hidden`,textOverflow:`ellipsis`},children:BJ(e.column.columnDef.cell,e.getContext())},e.id))]},e.id))]})]})})})]}),(0,G.jsxs)(X,{justify:`space-between`,wrap:`nowrap`,gap:`xs`,style:s===`auto`?{position:`sticky`,bottom:`calc(-1 * var(--mantine-spacing-md))`,zIndex:1,background:`var(--mantine-color-body)`,borderTop:`1px solid var(--mantine-color-default-border)`,paddingBlock:`var(--mantine-spacing-xs)`}:void 0,children:[(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[se,`–`,U,` sur `,l&&I?`au moins `:``,oe]}),(0,G.jsxs)(X,{gap:`xs`,wrap:`nowrap`,children:[(0,G.jsx)(F_,{data:a.map(e=>String(e)),value:String(v.pageSize),onChange:e=>e&&V.setPageSize(Number(e)),size:`xs`,w:92,"aria-label":`lignes par page`,comboboxProps:{withinPortal:!0}}),(0,G.jsx)(h_,{total:H,value:v.pageIndex+1,onChange:e=>V.setPageIndex(e-1),size:`sm`,withEdges:!0,getControlProps:e=>({"aria-label":R1[e],...e===`last`&&l&&I?{disabled:!0,title:`Fin inconnue : ce stockage ne compte pas la liste`}:{}})})]})]})]})}var r0=``;function i0({spec:e,value:t,onChange:n,labels:r,omit:i,debounceMs:a=400}){let o=e?Object.entries(e).filter(([e])=>!i?.includes(e)):[];if(o.length===0)return null;let s=(e,r)=>{let i={...t};r===``?delete i[e]:i[e]=r,n(i)},c=Object.keys(t).length;return(0,G.jsxs)(X,{gap:`lg`,align:`flex-end`,wrap:`wrap`,children:[o.map(([e,n])=>(0,G.jsx)(a0,{name:e,nature:n,value:t[e]??``,onChange:t=>s(e,t),label:r?.[e],debounceMs:a},e)),c>0&&(0,G.jsxs)(fp,{variant:`subtle`,size:`xs`,color:`gray`,leftSection:(0,G.jsx)(zC,{size:14}),onClick:()=>n({}),children:[`Effacer `,c,` filtre`,c>1?`s`:``]})]})}function a0({name:e,nature:t,value:n,onChange:r,label:i,debounceMs:a}){let o=i?.label??e,s=(0,G.jsxs)(X,{gap:4,align:`center`,wrap:`nowrap`,children:[(0,G.jsx)(Z,{size:`xs`,fw:600,c:`dimmed`,children:o}),i?.hint&&(0,G.jsx)(xw,{text:i.hint})]});return Array.isArray(t)?(0,G.jsxs)(z_,{gap:4,children:[s,(0,G.jsx)(F_,{size:`xs`,w:170,clearable:!0,placeholder:`Tous`,"aria-label":o,data:t.map(e=>({value:e,label:i?.values?.[e]??e})),value:n===``?null:n,onChange:e=>r(e??``)})]}):t===`boolean`?(0,G.jsxs)(z_,{gap:4,children:[s,(0,G.jsx)(N_,{size:`xs`,"aria-label":o,value:n===``?r0:n,onChange:e=>r(e===r0?``:e),data:[{value:r0,label:`Tous`},{value:`true`,label:i?.values?.true??`Oui`},{value:`false`,label:i?.values?.false??`Non`}]})]}):t===`string`||t===`int`?(0,G.jsxs)(z_,{gap:4,children:[s,(0,G.jsx)(o0,{numeric:t===`int`,value:n,onChange:r,placeholder:i?.placeholder??`Valeur exacte`,ariaLabel:o,delay:a})]}):null}function o0({numeric:e,value:t,onChange:n,placeholder:r,ariaLabel:i,delay:a}){let[o,s]=(0,C.useState)(t),[c]=Ee(o,a);(0,C.useEffect)(()=>s(t),[t]);let l=(0,C.useEffectEvent)(e=>{e!==t&&n(e)});return(0,C.useEffect)(()=>{l(c)},[c]),e?(0,G.jsx)(Ug,{size:`xs`,w:140,"aria-label":i,placeholder:r,value:o===``?``:Number(o),onChange:e=>s(e===``?``:String(e))}):(0,G.jsx)(Sv,{size:`xs`,w:180,"aria-label":i,placeholder:r,value:o,onChange:e=>s(e.currentTarget.value)})}export{sw as $,X as $n,rt as $r,sy as $t,lF as A,Uf as An,ln as Ar,SC as At,ww as B,kd as Bn,Qt as Br,JS as Bt,MV as C,A as Ci,bp as Cn,K as Cr,AC as Ct,$ as D,b as Di,ep as Dn,Sn as Dr,TC as Dt,PF as E,S as Ei,rp as En,Tn as Er,EC as Et,PP as F,Hd as Fn,sn as Fr,_C as Ft,_w as G,Xu as Gn,Pt as Gr,Rb as Gt,xw as H,bd as Hn,Xt as Hr,fx as Ht,NP as I,Vd as In,rn as Ir,gC as It,dw as J,Wu as Jn,dt as Jr,Db as Jt,vw as K,Ju as Kn,Mt as Kr,Ob as Kt,wP as L,zd as Ln,on as Lr,mC as Lt,WP as M,Af as Mn,vn as Mr,bC as Mt,KP as N,bf as Nn,_n as Nr,yC as Nt,gF as O,$f as On,bn as Or,wC as Ot,VP as P,_f as Pn,fn as Pr,vC as Pt,ow as Q,Ru as Qn,ot as Qr,iy as Qt,TP as R,Z as Rn,an as Rr,dC as Rt,pH as S,N as Si,Sp as Sn,Fn as Sr,jC as St,NV as T,w as Ti,fp as Tn,Nn as Tr,DC as Tt,Sw as U,nd as Un,qt as Ur,rx as Ut,Cw as V,Cd as Vn,Zt as Vr,px as Vt,gw as W,Zu as Wn,zt as Wr,Vb as Wt,uw as X,Hu as Xn,it as Xr,ly as Xt,lw as Y,Uu as Yn,st as Yr,Eb as Yt,cw as Z,zu as Zn,at as Zr,my as Zt,Uq as _,z as _i,rm as _n,Tr as _r,RC as _t,PJ as a,ge as ai,xv as an,jc as ar,ew as at,XV as b,F as bi,Dp as bn,er as br,PC as bt,mJ as c,fe as ci,z_ as cn,sc as cr,ZC as ct,lJ as d,W as di,k_ as dn,Y as dr,qC as dt,nt as ei,oy as en,Sl as er,tw as et,cJ as f,U as fi,Dh as fn,Mr as fr,KC as ft,eJ as g,V as gi,Km as gn,Er as gr,zC as gt,tJ as h,ie as hi,ch as hn,Dr as hr,BC as ht,IJ as i,Te as ii,Sv as in,Lc as ir,rw as it,UP as j,Hf as jn,un as jr,xC as jt,pF as k,Yf as kn,cn as kr,CC as kt,pJ as l,de as li,F_ as ln,rc as lr,YC as lt,rJ as m,se as mi,gh as mn,jr as mr,HC as mt,n0 as n,ke as ni,Mv as nn,ll as nr,aw as nt,MJ as o,he as oi,dv as on,fc as or,$C as ot,oJ as p,H as pi,xh as pn,J as pr,GC as pt,yw as q,Gu as qn,Tt as qr,Tb as qt,FJ as r,De as ri,Tv as rn,tl as rr,nw as rt,EJ as s,pe as si,K_ as sn,lc as sr,QC as st,i0 as t,tt as ti,ey as tn,_l as tr,iw as tt,uJ as u,ce as ui,N_ as un,Br as ur,JC as ut,Iq as v,R as vi,Gp as vn,rr as vr,LC as vt,PV as w,E as wi,yp as wn,Pn as wr,OC as wt,$z as x,P as xi,Tp as xn,q as xr,MC as xt,VV as y,L as yi,jp as yn,nr as yr,FC as yt,EP as z,Md as zn,tn as zr,aC as zt};
|