From cdf7a538c15d0a3f0deba90de37eddc4ad38da34 Mon Sep 17 00:00:00 2001 From: tsindt Date: Thu, 27 Aug 2026 15:31:50 +0200 Subject: [PATCH] Erweiterung der Produktpflege --- .../material-editor/dist/SimplyCPQ_Logo.svg | 45 + .../dist/assets/HomePage-BT3l1pQe.js | 172 ++ .../dist/assets/Layout-BA32MBe8.js | 1 + .../dist/assets/NotFoundPage-BSeqrAsK.js | 1 + .../dist/assets/SimplyCPQ_Logo-CyAEjPYv.svg | 45 + .../dist/assets/Toolbar-Ds5JbX8Q.js | 133 ++ .../dist/assets/index-CvD27sEa.js | 18 + .../dist/assets/index-pQr9blFx.css | 1 + ...er-cyrillic-ext-wght-normal-BOeWTOD4.woff2 | Bin 0 -> 25960 bytes .../inter-cyrillic-wght-normal-DqGufNeO.woff2 | Bin 0 -> 18748 bytes ...inter-greek-ext-wght-normal-DlzME5K_.woff2 | Bin 0 -> 11232 bytes .../inter-greek-wght-normal-CkhJZR-_.woff2 | Bin 0 -> 18996 bytes ...inter-latin-ext-wght-normal-DO1Apj_S.woff2 | Bin 0 -> 85068 bytes .../inter-latin-wght-normal-Dx4kXJAl.woff2 | Bin 0 -> 48256 bytes ...nter-vietnamese-wght-normal-CBcvBZtf.woff2 | Bin 0 -> 10252 bytes .../dist/assets/jsx-runtime-DIhQqKhG.js | 1 + .../client/material-editor/dist/favicon.svg | 45 + .../client/material-editor/dist/icons.svg | 24 + .../client/material-editor/dist/index.html | 15 + .../.tmp/tsconfig.app.tsbuildinfo | 1 + .../.tmp/tsconfig.node.tsbuildinfo | 1 + .../.vite/deps/@mui_icons-material_Add.js | 2 +- .../.vite/deps/@mui_icons-material_Check.js | 8 + .../deps/@mui_icons-material_Check.js.map | 1 + .../.vite/deps/@mui_icons-material_Delete.js | 2 +- .../deps/@mui_icons-material_Description.js | 8 + .../@mui_icons-material_Description.js.map | 1 + .../.vite/deps/@mui_icons-material_Folder.js | 8 + .../deps/@mui_icons-material_Folder.js.map | 1 + .../.vite/deps/@mui_icons-material_Search.js | 2 +- .../.vite/deps/@mui_lab_TabContext.js | 2 +- .../.vite/deps/@mui_lab_TabList.js | 6 +- .../.vite/deps/@mui_lab_TabPanel.js | 10 +- .../node_modules/.vite/deps/@mui_material.js | 798 ++------- .../.vite/deps/@mui_material.js.map | 2 +- .../.vite/deps/@mui_material_AppBar.js | 2 +- .../.vite/deps/@mui_material_Box.js | 2 +- .../.vite/deps/@mui_material_Button.js | 2 +- .../.vite/deps/@mui_material_Checkbox.js | 2 + .../.vite/deps/@mui_material_Chip.js | 2 + .../.vite/deps/@mui_material_Dialog.js | 2 +- .../.vite/deps/@mui_material_DialogActions.js | 2 +- .../.vite/deps/@mui_material_DialogContent.js | 2 +- .../.vite/deps/@mui_material_DialogTitle.js | 4 +- .../.vite/deps/@mui_material_FormControl.js | 3 + .../.vite/deps/@mui_material_IconButton.js | 2 +- .../deps/@mui_material_InputAdornment.js | 4 +- .../.vite/deps/@mui_material_InputLabel.js | 3 + .../.vite/deps/@mui_material_ListItemText.js | 2 + .../.vite/deps/@mui_material_MenuItem.js | 2 + .../.vite/deps/@mui_material_Paper.js | 2 + .../.vite/deps/@mui_material_Select.js | 3 + .../.vite/deps/@mui_material_Stack.js | 2 +- .../.vite/deps/@mui_material_Tab.js | 2 +- .../.vite/deps/@mui_material_Table.js | 2 + .../.vite/deps/@mui_material_TableBody.js | 2 + .../.vite/deps/@mui_material_TableCell.js | 2 + .../deps/@mui_material_TableContainer.js | 2 + .../.vite/deps/@mui_material_TableHead.js | 2 + .../.vite/deps/@mui_material_TableRow.js | 2 + .../.vite/deps/@mui_material_TextField.js | 2 +- .../.vite/deps/@mui_material_Tooltip.js | 2 +- .../.vite/deps/@mui_material_Typography.js | 2 +- .../.vite/deps/@mui_x-data-grid.js | 146 +- .../.vite/deps/@mui_x-data-grid.js.map | 2 +- .../deps/@mui_x-tree-view_RichTreeView.js | 1504 +---------------- .../deps/@mui_x-tree-view_RichTreeView.js.map | 2 +- .../.vite/deps/@mui_x-tree-view_TreeItem.js | 2 + .../node_modules/.vite/deps/Alert-CK5zXVBi.js | 379 +++++ .../.vite/deps/Alert-CK5zXVBi.js.map | 1 + .../node_modules/.vite/deps/Alert-CZ6-UJcL.js | 769 --------- .../.vite/deps/Alert-CZ6-UJcL.js.map | 1 - ...{AppBar-Bh40cLP3.js => AppBar-jnTHxJHg.js} | 14 +- ...Bh40cLP3.js.map => AppBar-jnTHxJHg.js.map} | 2 +- .../deps/{Box-B_dRI49O.js => Box-C4LEZQ4f.js} | 6 +- ...ox-B_dRI49O.js.map => Box-C4LEZQ4f.js.map} | 2 +- ...{Button-A8lGDA7s.js => Button-Digmcb9Y.js} | 18 +- ...A8lGDA7s.js.map => Button-Digmcb9Y.js.map} | 2 +- ...ase-Bsl8ZUTz.js => ButtonBase-C5OJwznt.js} | 16 +- ...ZUTz.js.map => ButtonBase-C5OJwznt.js.map} | 2 +- ...ckbox-ygBLxZxd.js => Checkbox-B8Jxz6oa.js} | 70 +- .../.vite/deps/Checkbox-B8Jxz6oa.js.map | 1 + .../.vite/deps/Checkbox-ygBLxZxd.js.map | 1 - .../node_modules/.vite/deps/Chip-gPTfo2jJ.js | 559 ++++++ .../.vite/deps/Chip-gPTfo2jJ.js.map | 1 + ...2SKes6.js => CircularProgress-CZv3_Pmq.js} | 14 +- ...s.map => CircularProgress-CZv3_Pmq.js.map} | 2 +- .../node_modules/.vite/deps/Close-B5eRwVOo.js | 7 + .../.vite/deps/Close-B5eRwVOo.js.map | 1 + .../.vite/deps/Collapse-l6eh-a65.js | 400 +++++ .../.vite/deps/Collapse-l6eh-a65.js.map | 1 + ..._j.js => DefaultPropsProvider-C26UnlMi.js} | 4 +- ...p => DefaultPropsProvider-C26UnlMi.js.map} | 2 +- ...{Dialog-C0FlcikN.js => Dialog-CmKf_mUC.js} | 20 +- ...C0FlcikN.js.map => Dialog-CmKf_mUC.js.map} | 2 +- ...-CUx3ntEf.js => DialogActions-BnJCnobA.js} | 8 +- ...f.js.map => DialogActions-BnJCnobA.js.map} | 2 +- ...-CLqjPIAp.js => DialogContent-CxE2I2pF.js} | 12 +- ...p.js.map => DialogContent-CxE2I2pF.js.map} | 2 +- ...le-ec9jPt95.js => DialogTitle-Bdeq_m4v.js} | 12 +- ...t95.js.map => DialogTitle-Bdeq_m4v.js.map} | 2 +- .../.vite/deps/EventManager-DC286UGQ.js.map | 1 - .../.vite/deps/EventManager-DwsMevd9.js | 150 ++ .../.vite/deps/EventManager-DwsMevd9.js.map | 1 + .../.vite/deps/FormControl-BBWMdsor.js | 317 ++++ .../.vite/deps/FormControl-BBWMdsor.js.map | 1 + .../{Grow-DmlBpZfC.js => Grow-koF1pM0a.js} | 10 +- ...w-DmlBpZfC.js.map => Grow-koF1pM0a.js.map} | 2 +- ...ton-DrMmxSzf.js => IconButton-D15NphpU.js} | 20 +- ...xSzf.js.map => IconButton-D15NphpU.js.map} | 2 +- ...69lRAvLa.js => InputAdornment-oDPNkEQ8.js} | 16 +- ....js.map => InputAdornment-oDPNkEQ8.js.map} | 2 +- .../.vite/deps/InputLabel-CMR3xNb9.js | 441 +++++ .../.vite/deps/InputLabel-CMR3xNb9.js.map | 1 + .../.vite/deps/ListContext-BlonKYw6.js | 9 + .../.vite/deps/ListContext-BlonKYw6.js.map | 1 + .../.vite/deps/ListItemText-DDPPBz7v.js | 201 +++ .../.vite/deps/ListItemText-DDPPBz7v.js.map | 1 + .../.vite/deps/MenuItem-CKw_jkNA.js | 306 ++++ .../.vite/deps/MenuItem-CKw_jkNA.js.map | 1 + .../.vite/deps/MenuListContext-DsdfkY0h.js | 41 + .../deps/MenuListContext-DsdfkY0h.js.map | 1 + .../{Modal-rlYNDt8_.js => Modal-DWsHkJKP.js} | 21 +- ...-rlYNDt8_.js.map => Modal-DWsHkJKP.js.map} | 2 +- .../{Paper-BN2CUK32.js => Paper-Dp73HJFm.js} | 12 +- ...-BN2CUK32.js.map => Paper-Dp73HJFm.js.map} | 2 +- ...xtField-wEDqqayk.js => Select-CDDaUIdG.js} | 1462 +--------------- .../.vite/deps/Select-CDDaUIdG.js.map | 1 + .../{Stack-DfNZ6tKE.js => Stack-BfolKqSt.js} | 12 +- ...-DfNZ6tKE.js.map => Stack-BfolKqSt.js.map} | 2 +- .../deps/{Tab-Bi21REoM.js => Tab-B6VtUp_e.js} | 25 +- .../.vite/deps/Tab-B6VtUp_e.js.map | 1 + .../.vite/deps/Tab-Bi21REoM.js.map | 1 - ...ext-CMSSKNSg.js => TabContext-D4t-wY-9.js} | 2 +- ...KNSg.js.map => TabContext-D4t-wY-9.js.map} | 2 +- .../node_modules/.vite/deps/Table-CfuqII2r.js | 135 ++ .../.vite/deps/Table-CfuqII2r.js.map | 1 + .../.vite/deps/TableBody-BFcGSiqz.js | 84 + .../.vite/deps/TableBody-BFcGSiqz.js.map | 1 + .../.vite/deps/TableCell-i2k-ycqG.js | 267 +++ .../.vite/deps/TableCell-i2k-ycqG.js.map | 1 + .../.vite/deps/TableContainer-Dy7QCpgP.js | 80 + .../.vite/deps/TableContainer-Dy7QCpgP.js.map | 1 + .../.vite/deps/TableContext-Dvh_YpxP.js | 9 + .../.vite/deps/TableContext-Dvh_YpxP.js.map | 1 + .../.vite/deps/TableHead-CXVJkJ1r.js | 84 + .../.vite/deps/TableHead-CXVJkJ1r.js.map | 1 + .../.vite/deps/TableRow-B3taH--s.js | 130 ++ .../.vite/deps/TableRow-B3taH--s.js.map | 1 + .../.vite/deps/Tablelvl2Context-Bc__fnb8.js | 9 + .../deps/Tablelvl2Context-Bc__fnb8.js.map | 1 + .../{Tabs-CL3Bsg3w.js => Tabs-DcooAgFR.js} | 31 +- ...s-CL3Bsg3w.js.map => Tabs-DcooAgFR.js.map} | 2 +- .../.vite/deps/TextField-B9yWAr45.js | 578 +++++++ .../.vite/deps/TextField-B9yWAr45.js.map | 1 + .../.vite/deps/TextField-wEDqqayk.js.map | 1 - ...n-wH2nia4o.js => ToggleButton-Bonr1B5S.js} | 1375 +-------------- .../.vite/deps/ToggleButton-Bonr1B5S.js.map | 1 + .../.vite/deps/ToggleButton-wH2nia4o.js.map | 1 - ...ooltip-AC4fJPMm.js => Tooltip-CkNB0kn8.js} | 27 +- ...C4fJPMm.js.map => Tooltip-CkNB0kn8.js.map} | 2 +- ...ion-CTO78YMk.js => Transition-ChzjZIqj.js} | 4 +- ...8YMk.js.map => Transition-ChzjZIqj.js.map} | 2 +- .../.vite/deps/TreeItem-BxWETNDk.js | 1478 ++++++++++++++++ .../.vite/deps/TreeItem-BxWETNDk.js.map | 1 + ...phy-BDkJLIDE.js => Typography-D0X9-lHE.js} | 12 +- ...LIDE.js.map => Typography-D0X9-lHE.js.map} | 2 +- .../node_modules/.vite/deps/_metadata.json | 474 ++++-- ...ize-DESO4t23.js => capitalize-CAiNKy2l.js} | 2 +- ...4t23.js.map => capitalize-CAiNKy2l.js.map} | 2 +- ...DS_z862G.js => chainPropTypes-XO9WdMvJ.js} | 6 +- ....js.map => chainPropTypes-XO9WdMvJ.js.map} | 2 +- ...-Cf0_3N9N.js => createSvgIcon-BpU1QI3F.js} | 12 +- ...N.js.map => createSvgIcon-BpU1QI3F.js.map} | 2 +- ...gy_C.js => dialogTitleClasses-BMWdNl2E.js} | 2 +- ...map => dialogTitleClasses-BMWdNl2E.js.map} | 2 +- ...bK-.js => elementAcceptingRef-77cdI4ys.js} | 7 +- ...ap => elementAcceptingRef-77cdI4ys.js.map} | 2 +- ...js => elementTypeAcceptingRef-Bh_-xFc3.js} | 2 +- ...> elementTypeAcceptingRef-Bh_-xFc3.js.map} | 2 +- ...-2wnaMjK_.js => getThemeProps-CQCiKSav.js} | 2 +- ..._.js.map => getThemeProps-CQCiKSav.js.map} | 2 +- ...ier-Db3dwgA7.js => identifier-Bqz1gV6c.js} | 2 +- ...wgA7.js.map => identifier-Bqz1gV6c.js.map} | 2 +- ...a.js => inputAdornmentClasses-ClNggkd0.js} | 2 +- ... => inputAdornmentClasses-ClNggkd0.js.map} | 2 +- .../.vite/deps/inputLabelClasses-SE8nfTj6.js | 22 + .../deps/inputLabelClasses-SE8nfTj6.js.map | 1 + ...heme-Ciuals54.js => memoTheme-C-VUQpgo.js} | 4 +- ...als54.js.map => memoTheme-C-VUQpgo.js.map} | 2 +- ...BYHIo2Vv.js => mergeSlotProps-D_Ldcnck.js} | 4 +- ....js.map => mergeSlotProps-D_Ldcnck.js.map} | 2 +- ...ct-Des-x0LJ.js => ownerWindow-kpiLX9WV.js} | 6 +- .../.vite/deps/ownerWindow-kpiLX9WV.js.map | 1 + ...{styled-D1aQQGyn.js => styled-DWwWVzfz.js} | 2 +- ...D1aQQGyn.js.map => styled-DWwWVzfz.js.map} | 2 +- ...{styled-ry4r-NKP.js => styled-Dq11esuZ.js} | 2 +- ...ry4r-NKP.js.map => styled-Dq11esuZ.js.map} | 2 +- .../.vite/deps/unsupportedProp-Djr2P2KR.js | 5 + .../deps/unsupportedProp-Djr2P2KR.js.map | 1 + .../deps/useEnhancedEffect-Des-x0LJ.js.map | 1 - .../.vite/deps/useEnhancedEffect-TVXdCr88.js | 5 + .../deps/useEnhancedEffect-TVXdCr88.js.map | 1 + ...Ref-BFAG-x_s.js => useForkRef-DuMrXAkd.js} | 72 +- .../.vite/deps/useForkRef-DuMrXAkd.js.map | 1 + .../.vite/deps/useForkRef-HczILPyd2.js | 53 + .../.vite/deps/useForkRef-HczILPyd2.js.map | 1 + .../.vite/deps/useLazyRef-BFAG-x_s.js.map | 1 - ...kRX59.js => useRovingTabIndex-CcaPcnaK.js} | 3 +- ....map => useRovingTabIndex-CcaPcnaK.js.map} | 2 +- ...seSlot-DwQopxnD.js => useSlot-Cg0qr-dR.js} | 34 +- .../.vite/deps/useSlot-Cg0qr-dR.js.map | 1 + .../.vite/deps/useSlot-DwQopxnD.js.map | 1 - ...s-Bcfvl0Sd.js => useSlotProps-BSg2NgFc.js} | 4 +- ...Sd.js.map => useSlotProps-BSg2NgFc.js.map} | 2 +- ...nager-DC286UGQ.js => useStore-b7LHpDhD.js} | 160 +- .../.vite/deps/useStore-b7LHpDhD.js.map | 1 + ...Theme-DkkwbUco.js => useTheme-c_7N7PR0.js} | 2 +- ...kwbUco.js.map => useTheme-c_7N7PR0.js.map} | 2 +- ...-Bj7e_GBH.js => useThemeProps-B4A_cZzq.js} | 6 +- ...H.js.map => useThemeProps-B4A_cZzq.js.map} | 2 +- ...-CBZxmtaL.js => useThemeProps-Dsh83Rjn.js} | 4 +- ...L.js.map => useThemeProps-Dsh83Rjn.js.map} | 2 +- ...out-Bjk18o42.js => useTimeout-B1CAuCte.js} | 10 +- ...8o42.js.map => useTimeout-B1CAuCte.js.map} | 2 +- .../node_modules/.vite/deps/utils-BHH6aY1A.js | 12 + .../.vite/deps/utils-BHH6aY1A.js.map | 1 + .../material-editor/src/api/value.api.ts | 16 + .../src/components/products/ProductDetail.tsx | 427 +++++ .../components/products/ProductGroupTree.tsx | 78 +- .../src/components/products/Products.tsx | 19 +- buildtime/database/init.sql | 2 +- buildtime/server/controller/bomController.go | 50 +- .../server/controller/valueController.go | 35 + .../server/repositories/bomRepository.go | 184 ++ .../server/repositories/productRepository.go | 12 +- .../server/repositories/valueRepository.go | 7 + buildtime/server/server/httpServer.go | 9 +- buildtime/server/services/bomService.go | 68 +- buildtime/server/services/valueService.go | 4 + 240 files changed, 8264 insertions(+), 6420 deletions(-) create mode 100644 buildtime/client/material-editor/dist/SimplyCPQ_Logo.svg create mode 100644 buildtime/client/material-editor/dist/assets/HomePage-BT3l1pQe.js create mode 100644 buildtime/client/material-editor/dist/assets/Layout-BA32MBe8.js create mode 100644 buildtime/client/material-editor/dist/assets/NotFoundPage-BSeqrAsK.js create mode 100644 buildtime/client/material-editor/dist/assets/SimplyCPQ_Logo-CyAEjPYv.svg create mode 100644 buildtime/client/material-editor/dist/assets/Toolbar-Ds5JbX8Q.js create mode 100644 buildtime/client/material-editor/dist/assets/index-CvD27sEa.js create mode 100644 buildtime/client/material-editor/dist/assets/index-pQr9blFx.css create mode 100644 buildtime/client/material-editor/dist/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 create mode 100644 buildtime/client/material-editor/dist/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 create mode 100644 buildtime/client/material-editor/dist/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 create mode 100644 buildtime/client/material-editor/dist/assets/inter-greek-wght-normal-CkhJZR-_.woff2 create mode 100644 buildtime/client/material-editor/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 create mode 100644 buildtime/client/material-editor/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 create mode 100644 buildtime/client/material-editor/dist/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 create mode 100644 buildtime/client/material-editor/dist/assets/jsx-runtime-DIhQqKhG.js create mode 100644 buildtime/client/material-editor/dist/favicon.svg create mode 100644 buildtime/client/material-editor/dist/icons.svg create mode 100644 buildtime/client/material-editor/dist/index.html create mode 100644 buildtime/client/material-editor/node_modules/.tmp/tsconfig.app.tsbuildinfo create mode 100644 buildtime/client/material-editor/node_modules/.tmp/tsconfig.node.tsbuildinfo create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Check.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Check.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Description.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Description.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Folder.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Folder.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Checkbox.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Chip.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_FormControl.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_InputLabel.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_ListItemText.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_MenuItem.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Paper.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Select.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Table.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_TableBody.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_TableCell.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_TableContainer.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_TableHead.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_TableRow.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/@mui_x-tree-view_TreeItem.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Alert-CK5zXVBi.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Alert-CK5zXVBi.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Alert-CZ6-UJcL.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Alert-CZ6-UJcL.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{AppBar-Bh40cLP3.js => AppBar-jnTHxJHg.js} (95%) rename buildtime/client/material-editor/node_modules/.vite/deps/{AppBar-Bh40cLP3.js.map => AppBar-jnTHxJHg.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Box-B_dRI49O.js => Box-C4LEZQ4f.js} (95%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Box-B_dRI49O.js.map => Box-C4LEZQ4f.js.map} (98%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Button-A8lGDA7s.js => Button-Digmcb9Y.js} (97%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Button-A8lGDA7s.js.map => Button-Digmcb9Y.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{ButtonBase-Bsl8ZUTz.js => ButtonBase-C5OJwznt.js} (98%) rename buildtime/client/material-editor/node_modules/.vite/deps/{ButtonBase-Bsl8ZUTz.js.map => ButtonBase-C5OJwznt.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Checkbox-ygBLxZxd.js => Checkbox-B8Jxz6oa.js} (94%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Checkbox-B8Jxz6oa.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Checkbox-ygBLxZxd.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Chip-gPTfo2jJ.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Chip-gPTfo2jJ.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{CircularProgress-Tc2SKes6.js => CircularProgress-CZv3_Pmq.js} (96%) rename buildtime/client/material-editor/node_modules/.vite/deps/{CircularProgress-Tc2SKes6.js.map => CircularProgress-CZv3_Pmq.js.map} (99%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Close-B5eRwVOo.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Close-B5eRwVOo.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Collapse-l6eh-a65.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Collapse-l6eh-a65.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{DefaultPropsProvider-C8vOQ3_j.js => DefaultPropsProvider-C26UnlMi.js} (97%) rename buildtime/client/material-editor/node_modules/.vite/deps/{DefaultPropsProvider-C8vOQ3_j.js.map => DefaultPropsProvider-C26UnlMi.js.map} (98%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Dialog-C0FlcikN.js => Dialog-CmKf_mUC.js} (96%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Dialog-C0FlcikN.js.map => Dialog-CmKf_mUC.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{DialogActions-CUx3ntEf.js => DialogActions-BnJCnobA.js} (93%) rename buildtime/client/material-editor/node_modules/.vite/deps/{DialogActions-CUx3ntEf.js.map => DialogActions-BnJCnobA.js.map} (98%) rename buildtime/client/material-editor/node_modules/.vite/deps/{DialogContent-CLqjPIAp.js => DialogContent-CxE2I2pF.js} (90%) rename buildtime/client/material-editor/node_modules/.vite/deps/{DialogContent-CLqjPIAp.js.map => DialogContent-CxE2I2pF.js.map} (98%) rename buildtime/client/material-editor/node_modules/.vite/deps/{DialogTitle-ec9jPt95.js => DialogTitle-Bdeq_m4v.js} (89%) rename buildtime/client/material-editor/node_modules/.vite/deps/{DialogTitle-ec9jPt95.js.map => DialogTitle-Bdeq_m4v.js.map} (98%) delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/EventManager-DC286UGQ.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/EventManager-DwsMevd9.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/EventManager-DwsMevd9.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/FormControl-BBWMdsor.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/FormControl-BBWMdsor.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{Grow-DmlBpZfC.js => Grow-koF1pM0a.js} (96%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Grow-DmlBpZfC.js.map => Grow-koF1pM0a.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{IconButton-DrMmxSzf.js => IconButton-D15NphpU.js} (94%) rename buildtime/client/material-editor/node_modules/.vite/deps/{IconButton-DrMmxSzf.js.map => IconButton-D15NphpU.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{InputAdornment-69lRAvLa.js => InputAdornment-oDPNkEQ8.js} (92%) rename buildtime/client/material-editor/node_modules/.vite/deps/{InputAdornment-69lRAvLa.js.map => InputAdornment-oDPNkEQ8.js.map} (99%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/InputLabel-CMR3xNb9.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/InputLabel-CMR3xNb9.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ListContext-BlonKYw6.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ListContext-BlonKYw6.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ListItemText-DDPPBz7v.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ListItemText-DDPPBz7v.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/MenuItem-CKw_jkNA.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/MenuItem-CKw_jkNA.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/MenuListContext-DsdfkY0h.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/MenuListContext-DsdfkY0h.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{Modal-rlYNDt8_.js => Modal-DWsHkJKP.js} (98%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Modal-rlYNDt8_.js.map => Modal-DWsHkJKP.js.map} (74%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Paper-BN2CUK32.js => Paper-Dp73HJFm.js} (96%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Paper-BN2CUK32.js.map => Paper-Dp73HJFm.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{TextField-wEDqqayk.js => Select-CDDaUIdG.js} (77%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Select-CDDaUIdG.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{Stack-DfNZ6tKE.js => Stack-BfolKqSt.js} (96%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Stack-DfNZ6tKE.js.map => Stack-BfolKqSt.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Tab-Bi21REoM.js => Tab-B6VtUp_e.js} (92%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Tab-B6VtUp_e.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Tab-Bi21REoM.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{TabContext-CMSSKNSg.js => TabContext-D4t-wY-9.js} (100%) rename buildtime/client/material-editor/node_modules/.vite/deps/{TabContext-CMSSKNSg.js.map => TabContext-D4t-wY-9.js.map} (98%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Table-CfuqII2r.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Table-CfuqII2r.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableBody-BFcGSiqz.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableBody-BFcGSiqz.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableCell-i2k-ycqG.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableCell-i2k-ycqG.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableContainer-Dy7QCpgP.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableContainer-Dy7QCpgP.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableContext-Dvh_YpxP.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableContext-Dvh_YpxP.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableHead-CXVJkJ1r.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableHead-CXVJkJ1r.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableRow-B3taH--s.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TableRow-B3taH--s.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Tablelvl2Context-Bc__fnb8.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Tablelvl2Context-Bc__fnb8.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{Tabs-CL3Bsg3w.js => Tabs-DcooAgFR.js} (97%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Tabs-CL3Bsg3w.js.map => Tabs-DcooAgFR.js.map} (71%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TextField-B9yWAr45.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TextField-B9yWAr45.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TextField-wEDqqayk.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{ToggleButton-wH2nia4o.js => ToggleButton-Bonr1B5S.js} (80%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ToggleButton-Bonr1B5S.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ToggleButton-wH2nia4o.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{Tooltip-AC4fJPMm.js => Tooltip-CkNB0kn8.js} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Tooltip-AC4fJPMm.js.map => Tooltip-CkNB0kn8.js.map} (71%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Transition-CTO78YMk.js => Transition-ChzjZIqj.js} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Transition-CTO78YMk.js.map => Transition-ChzjZIqj.js.map} (99%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TreeItem-BxWETNDk.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TreeItem-BxWETNDk.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{Typography-BDkJLIDE.js => Typography-D0X9-lHE.js} (95%) rename buildtime/client/material-editor/node_modules/.vite/deps/{Typography-BDkJLIDE.js.map => Typography-D0X9-lHE.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{capitalize-DESO4t23.js => capitalize-CAiNKy2l.js} (70%) rename buildtime/client/material-editor/node_modules/.vite/deps/{capitalize-DESO4t23.js.map => capitalize-CAiNKy2l.js.map} (73%) rename buildtime/client/material-editor/node_modules/.vite/deps/{chainPropTypes-DS_z862G.js => chainPropTypes-XO9WdMvJ.js} (81%) rename buildtime/client/material-editor/node_modules/.vite/deps/{chainPropTypes-DS_z862G.js.map => chainPropTypes-XO9WdMvJ.js.map} (94%) rename buildtime/client/material-editor/node_modules/.vite/deps/{createSvgIcon-Cf0_3N9N.js => createSvgIcon-BpU1QI3F.js} (96%) rename buildtime/client/material-editor/node_modules/.vite/deps/{createSvgIcon-Cf0_3N9N.js.map => createSvgIcon-BpU1QI3F.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{dialogTitleClasses-CMIZgy_C.js => dialogTitleClasses-BMWdNl2E.js} (91%) rename buildtime/client/material-editor/node_modules/.vite/deps/{dialogTitleClasses-CMIZgy_C.js.map => dialogTitleClasses-BMWdNl2E.js.map} (90%) rename buildtime/client/material-editor/node_modules/.vite/deps/{elementAcceptingRef-rYQ5gbK-.js => elementAcceptingRef-77cdI4ys.js} (96%) rename buildtime/client/material-editor/node_modules/.vite/deps/{elementAcceptingRef-rYQ5gbK-.js.map => elementAcceptingRef-77cdI4ys.js.map} (78%) rename buildtime/client/material-editor/node_modules/.vite/deps/{elementTypeAcceptingRef-soVrg9KC.js => elementTypeAcceptingRef-Bh_-xFc3.js} (96%) rename buildtime/client/material-editor/node_modules/.vite/deps/{elementTypeAcceptingRef-soVrg9KC.js.map => elementTypeAcceptingRef-Bh_-xFc3.js.map} (97%) rename buildtime/client/material-editor/node_modules/.vite/deps/{getThemeProps-2wnaMjK_.js => getThemeProps-CQCiKSav.js} (86%) rename buildtime/client/material-editor/node_modules/.vite/deps/{getThemeProps-2wnaMjK_.js.map => getThemeProps-CQCiKSav.js.map} (91%) rename buildtime/client/material-editor/node_modules/.vite/deps/{identifier-Db3dwgA7.js => identifier-Bqz1gV6c.js} (100%) rename buildtime/client/material-editor/node_modules/.vite/deps/{identifier-Db3dwgA7.js.map => identifier-Bqz1gV6c.js.map} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{inputAdornmentClasses-Bz0x_Nya.js => inputAdornmentClasses-ClNggkd0.js} (93%) rename buildtime/client/material-editor/node_modules/.vite/deps/{inputAdornmentClasses-Bz0x_Nya.js.map => inputAdornmentClasses-ClNggkd0.js.map} (92%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/inputLabelClasses-SE8nfTj6.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/inputLabelClasses-SE8nfTj6.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{memoTheme-Ciuals54.js => memoTheme-C-VUQpgo.js} (87%) rename buildtime/client/material-editor/node_modules/.vite/deps/{memoTheme-Ciuals54.js.map => memoTheme-C-VUQpgo.js.map} (95%) rename buildtime/client/material-editor/node_modules/.vite/deps/{mergeSlotProps-BYHIo2Vv.js => mergeSlotProps-D_Ldcnck.js} (95%) rename buildtime/client/material-editor/node_modules/.vite/deps/{mergeSlotProps-BYHIo2Vv.js.map => mergeSlotProps-D_Ldcnck.js.map} (98%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useEnhancedEffect-Des-x0LJ.js => ownerWindow-kpiLX9WV.js} (70%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ownerWindow-kpiLX9WV.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{styled-D1aQQGyn.js => styled-DWwWVzfz.js} (67%) rename buildtime/client/material-editor/node_modules/.vite/deps/{styled-D1aQQGyn.js.map => styled-DWwWVzfz.js.map} (76%) rename buildtime/client/material-editor/node_modules/.vite/deps/{styled-ry4r-NKP.js => styled-Dq11esuZ.js} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{styled-ry4r-NKP.js.map => styled-Dq11esuZ.js.map} (99%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/unsupportedProp-Djr2P2KR.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/unsupportedProp-Djr2P2KR.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useEnhancedEffect-Des-x0LJ.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useEnhancedEffect-TVXdCr88.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useEnhancedEffect-TVXdCr88.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{useLazyRef-BFAG-x_s.js => useForkRef-DuMrXAkd.js} (78%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useForkRef-DuMrXAkd.js.map create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useForkRef-HczILPyd2.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useForkRef-HczILPyd2.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useLazyRef-BFAG-x_s.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{useRovingTabIndex-DnGkRX59.js => useRovingTabIndex-CcaPcnaK.js} (99%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useRovingTabIndex-DnGkRX59.js.map => useRovingTabIndex-CcaPcnaK.js.map} (75%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useSlot-DwQopxnD.js => useSlot-Cg0qr-dR.js} (96%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useSlot-Cg0qr-dR.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useSlot-DwQopxnD.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{useSlotProps-Bcfvl0Sd.js => useSlotProps-BSg2NgFc.js} (86%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useSlotProps-Bcfvl0Sd.js.map => useSlotProps-BSg2NgFc.js.map} (96%) rename buildtime/client/material-editor/node_modules/.vite/deps/{EventManager-DC286UGQ.js => useStore-b7LHpDhD.js} (84%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useStore-b7LHpDhD.js.map rename buildtime/client/material-editor/node_modules/.vite/deps/{useTheme-DkkwbUco.js => useTheme-c_7N7PR0.js} (98%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useTheme-DkkwbUco.js.map => useTheme-c_7N7PR0.js.map} (94%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useThemeProps-Bj7e_GBH.js => useThemeProps-B4A_cZzq.js} (57%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useThemeProps-Bj7e_GBH.js.map => useThemeProps-B4A_cZzq.js.map} (89%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useThemeProps-CBZxmtaL.js => useThemeProps-Dsh83Rjn.js} (74%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useThemeProps-CBZxmtaL.js.map => useThemeProps-Dsh83Rjn.js.map} (91%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useTimeout-Bjk18o42.js => useTimeout-B1CAuCte.js} (91%) rename buildtime/client/material-editor/node_modules/.vite/deps/{useTimeout-Bjk18o42.js.map => useTimeout-B1CAuCte.js.map} (73%) create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/utils-BHH6aY1A.js create mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/utils-BHH6aY1A.js.map create mode 100644 buildtime/client/material-editor/src/components/products/ProductDetail.tsx create mode 100644 buildtime/server/repositories/bomRepository.go diff --git a/buildtime/client/material-editor/dist/SimplyCPQ_Logo.svg b/buildtime/client/material-editor/dist/SimplyCPQ_Logo.svg new file mode 100644 index 000000000..3088fe1da --- /dev/null +++ b/buildtime/client/material-editor/dist/SimplyCPQ_Logo.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/buildtime/client/material-editor/dist/assets/HomePage-BT3l1pQe.js b/buildtime/client/material-editor/dist/assets/HomePage-BT3l1pQe.js new file mode 100644 index 000000000..1a9db9e55 --- /dev/null +++ b/buildtime/client/material-editor/dist/assets/HomePage-BT3l1pQe.js @@ -0,0 +1,172 @@ +import{i as e,n as t,r as n,t as r}from"./jsx-runtime-DIhQqKhG.js";import{r as i}from"./index-CvD27sEa.js";import{$ as a,A as o,B as s,C as c,D as l,E as u,F as d,G as f,H as p,I as m,J as h,K as g,L as _,M as v,N as y,O as b,P as x,Q as S,R as C,S as w,T,U as E,V as D,W as O,X as k,Y as A,Z as j,_ as M,a as N,at as P,b as ee,c as F,ct as I,d as L,dt as R,et as z,f as te,ft as ne,g as re,h as B,ht as ie,i as ae,it as oe,j as se,k as ce,l as le,lt as ue,m as de,mt as fe,n as pe,nt as V,o as me,ot as he,p as ge,pt as H,q as _e,r as ve,rt as ye,s as be,st as xe,t as Se,tt as U,u as Ce,ut as we,v as Te,w as Ee,x as De,y as Oe,z as ke}from"./Toolbar-Ds5JbX8Q.js";var W=r();function Ae(e){return e==null||Object.keys(e).length===0}function je(e){let{styles:t,defaultTheme:n={}}=e;return(0,W.jsx)(we,{styles:typeof t==`function`?e=>t(Ae(e)?n:e):t})}function Me(e){let t=I(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Ne({styles:e,themeId:t,defaultTheme:n={}}){let r=oe(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Me(typeof e==`function`?e(i):e)):Me(a)),(0,W.jsx)(je,{styles:a})}var G=e(t(),1);function Pe(e={}){let{themeId:t,defaultTheme:n,defaultClassName:r=`MuiBox-root`,generateClassName:i}=e,a=ue(`div`,{shouldForwardProp:e=>e!==`theme`&&e!==`sx`&&e!==`as`})(P);return G.forwardRef(function(e,o){let s=oe(n),{className:c,component:l=`div`,...u}=e;return(0,W.jsx)(a,{as:l,ref:o,className:V(c,i?i(r):r),theme:t&&s[t]||s,...u})})}var Fe=G.createContext(),Ie=()=>G.useContext(Fe)??!1;function Le(e,t){return G.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}function Re(e){return U(`MuiAutocomplete`,e)}var ze=z(`MuiAutocomplete`,`root.expanded.fullWidth.focused.focusVisible.tag.tagSizeSmall.tagSizeMedium.hasPopupIcon.hasClearIcon.inputRoot.input.inputFocused.endAdornment.clearIndicator.popupIndicator.popupIndicatorOpen.popper.popperDisablePortal.paper.listbox.loading.noOptions.status.option.groupLabel.groupUl`.split(`.`));function Be(e){return U(`MuiCheckbox`,e)}var Ve=z(`MuiCheckbox`,[`root`,`checked`,`disabled`,`indeterminate`,`colorPrimary`,`colorSecondary`,`sizeSmall`,`sizeMedium`]);function He(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}function Ue(e){return e&&e.ownerDocument||document}function We(e){return Ue(e).defaultView||window}function Ge(e){return parseInt(e,10)||0}var Ke={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function qe(e){for(let t in e)return!1;return!0}function Je(e){return qe(e)||e.outerHeightStyle===0&&!e.overflowing}var Ye=G.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=G.useRef(o!=null),l=G.useRef(null),u=p(t,l),d=G.useRef(null),f=G.useRef(null),m=G.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=We(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===` +`&&(n.value+=` `);let o=a.boxSizing,s=Ge(a.paddingBottom)+Ge(a.paddingTop),c=Ge(a.borderBottomWidth)+Ge(a.borderTopWidth),u=n.scrollHeight;n.value=`x`;let d=n.scrollHeight,p=u;return i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+(o===`border-box`?s+c:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),g=D(()=>{let e=l.current,t=m();if(!e||!t||Je(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),_=G.useCallback(()=>{let e=l.current,t=m();if(!e||!t||Je(t))return;let n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?`hidden`:``},[m]),v=G.useRef(-1);return h(()=>{let e=He(_),t=l?.current;if(!t)return;let n=We(t);n.addEventListener(`resize`,e);let r;return typeof ResizeObserver<`u`&&(r=new ResizeObserver(()=>{g()&&(r.unobserve(t),cancelAnimationFrame(v.current),_(),v.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(v.current),n.removeEventListener(`resize`,e),r&&r.disconnect()}},[m,_,g]),h(()=>{_()}),(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(`textarea`,{value:o,onChange:e=>{c||_();let t=e.target,r=t.value.length,i=t.value.endsWith(` +`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,W.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...Ke.shadow,...a,paddingTop:0,paddingBottom:0}})]})}),Xe=G.createContext(void 0);function Ze(){return G.useContext(Xe)}function Qe({props:e,states:t}){let n=G.useContext(Xe),r={};return t.forEach(t=>{let i=e[t];r[t]=i===void 0&&n?n[t]:i}),[r,n]}function $e(e){return(0,W.jsx)(Ne,{...e,defaultTheme:s,themeId:fe})}function et(e){return function(t){return(0,W.jsx)($e,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}var tt=h,nt=Ue;function rt(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var it=rt;function at(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function ot(e,t=!1){return e&&(at(e.value)&&e.value!==``||t&&at(e.defaultValue)&&e.defaultValue!==``)}function st(e){return e.startAdornment}function ct(e){return U(`MuiInputBase`,e)}var lt=z(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputTypeSearch`]),ut,dt=`mui-auto-fill`,ft=`mui-auto-fill-cancel`,pt=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${y(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},mt=(e,t)=>{let{ownerState:n}=e;return[t.input,n.type===`search`&&t.inputTypeSearch]},ht=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e,h={root:[`root`,`color${y(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${y(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,d&&`readOnly`]};return g(h,ct,t)},gt=m(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:pt})(d(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${lt.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),_t=m(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:mt})(d(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},...ce(e,`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${lt.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${lt.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:ft,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:dt}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),vt=et({[`@keyframes ${dt}`]:{from:{animationName:dt}},[`@keyframes ${ft}`]:{from:{animationName:ft}}}),yt=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiInputBase`}),{"aria-describedby":r,"aria-label":i,autoComplete:a,autoFocus:o,className:s,color:c,defaultValue:l,disabled:u,disableInjectingGlobalStyles:d,endAdornment:f,error:p,fullWidth:m=!1,id:h,inputComponent:g=`input`,inputProps:_={},inputRef:y,margin:b,maxRows:S,minRows:C,multiline:w=!1,name:T,onBlur:D,onChange:O,onClick:k,onFocus:A,onKeyDown:j,onKeyUp:M,placeholder:N,readOnly:P,renderSuffix:ee,rows:F,size:I,slotProps:L={},slots:R={},startAdornment:z,type:te=`text`,value:ne,...re}=n,B=_.value==null?ne:_.value,{current:ae}=G.useRef(B!=null),oe=G.useRef(),se=G.useCallback(e=>{},[]),ce=v(oe,y,_.ref,se),[le,ue]=G.useState(!1),[de,fe]=Qe({props:n,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});de.focused=fe?fe.focused:le,G.useEffect(()=>{!fe&&u&&le&&(ue(!1),D&&D())},[fe,u,le,D]);let pe=fe&&fe.onFilled,me=fe&&fe.onEmpty,he=G.useCallback(e=>{ot(e)?pe&&pe():me&&me()},[pe,me]);tt(()=>{ae&&he({value:B})},[B,he,ae]),tt(()=>{if(!o)return;let e=oe.current;if(!e)return;let t=nt(e),n=it(t),r=n==null||n===t.body||n===t.documentElement;e===n?fe&&fe.onFocus?fe.onFocus():ue(!0):r&&e.focus()},[o]);let ge=e=>{A&&A(e),_.onFocus&&_.onFocus(e),fe&&fe.onFocus?fe.onFocus(e):ue(!0)},H=e=>{D&&D(e),_.onBlur&&_.onBlur(e),fe&&fe.onBlur?fe.onBlur(e):ue(!1)},_e=(e,...t)=>{if(!ae){let t=e.target||oe.current;if(t==null)throw Error(ie(1));he({value:t.value})}_.onChange&&_.onChange(e,...t),O&&O(e,...t)};G.useEffect(()=>{he(oe.current)},[]);let ve=e=>{oe.current&&e.currentTarget===e.target&&oe.current.focus(),k&&k(e)},ye=g,be=_;w&&ye===`input`&&(be=F?{type:void 0,minRows:F,maxRows:F,...be}:{type:void 0,maxRows:S,minRows:C,...be},ye=Ye);let xe=e=>{he(e.animationName===ft?oe.current:{value:`x`})};G.useEffect(()=>{fe&&fe.setAdornedStart(!!z)},[fe,z]);let Se={...n,color:de.color||`primary`,disabled:de.disabled,endAdornment:f,error:de.error,focused:de.focused,formControl:fe,fullWidth:m,hiddenLabel:de.hiddenLabel,multiline:w,size:de.size,startAdornment:z,type:te},U=ht(Se),Ce=R.root||gt,we=L.root||{},Te=R.input||_t;return be={...be,...L.input},(0,W.jsxs)(G.Fragment,{children:[!d&&typeof vt==`function`&&(ut||=(0,W.jsx)(vt,{})),(0,W.jsxs)(Ce,{...we,ref:t,onClick:ve,...re,...!E(Ce)&&{ownerState:{...Se,...we.ownerState}},className:V(U.root,we.className,s,P&&`MuiInputBase-readOnly`),children:[z,(0,W.jsx)(Xe.Provider,{value:null,children:(0,W.jsx)(Te,{"aria-invalid":de.error,"aria-describedby":r,"aria-label":i,autoComplete:a,autoFocus:o,defaultValue:l,disabled:de.disabled,id:h,onAnimationStart:xe,name:T,placeholder:N,readOnly:P,required:de.required,rows:F,value:B,onKeyDown:j,onKeyUp:M,type:te,...be,...!E(Te)&&{as:ye,ownerState:{...Se,...be.ownerState}},ref:ce,className:V(U.input,be.className,P&&`MuiInputBase-readOnly`),onBlur:H,onChange:_e,onFocus:ge})}),f,ee?ee({...de,startAdornment:z}):null]})]})});function bt(e){return U(`MuiFilledInput`,e)}var xt={...lt,...z(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])};function St(e){return U(`MuiFormControlLabel`,e)}var Ct=z(`MuiFormControlLabel`,[`root`,`labelPlacementStart`,`labelPlacementEnd`,`labelPlacementTop`,`labelPlacementBottom`,`disabled`,`label`,`error`,`required`,`asterisk`]);function wt(e){return U(`MuiFormHelperText`,e)}var Tt=z(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]);function Et(e){return U(`MuiFormLabel`,e)}var Dt=z(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]);function Ot(e){return U(`MuiInput`,e)}var kt={...lt,...z(`MuiInput`,[`root`,`underline`,`input`])};function At(e){return U(`MuiMenuItem`,e)}var jt=z(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);function Mt(e){return U(`MuiNativeSelect`,e)}var Nt=z(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function Pt(e){return U(`MuiOutlinedInput`,e)}var Ft={...lt,...z(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])};function It(e){return U(`MuiToggleButton`,e)}var Lt=z(`MuiToggleButton`,[`root`,`disabled`,`selected`,`standard`,`primary`,`secondary`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`fullWidth`]);function Rt(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||``}function zt(e){return parseFloat(e)}function Bt({props:e,name:t}){return A({props:e,name:t,defaultTheme:s,themeId:fe})}function Vt(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}var Ht=He,Ut=Le,Wt=We;function Gt(e,t){typeof e==`function`?e(t):e&&(e.current=t)}function Kt(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=G.useRef(t!==void 0),[o,s]=G.useState(n);return[a?t:o,G.useCallback(e=>{a||s(e)},[])]}var qt=Kt;function Jt(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{w(r,t[r])&&typeof e[r]==`function`&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if(typeof e==`function`||typeof t==`function`)return r=>{let i=typeof t==`function`?t(r):t,a=typeof e==`function`?e({...r,...i}):e,o=V(r?.className,i?.className,a?.className),s=n(a,i);return{...i,...a,...s,...!!o&&{className:o},...i?.style&&a?.style&&{style:{...i.style,...a.style}},...i?.sx&&a?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=t,i=n(e,r),a=V(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function Yt(e){let t=De(()=>Xt(e)).current;return t.next=e,h(t.effect),t}function Xt(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Zt=G.createContext(null);function Qt(e){if(e==null)return{appear:void 0,enter:void 0,exit:void 0};if(typeof e==`number`)return{appear:e,enter:e,exit:e};let t=e.enter,n=e.exit;return{appear:e.appear===void 0?t:e.appear,enter:t,exit:n}}function $t(e){if(e.autoTimeout!=null)return e.autoTimeout;let t=Qt(e.timeout);return e.currentStatus===`entering`?e.isAppearing?t.appear??t.enter??null:t.enter??null:t.exit??null}function en(e){let{in:t=!1,appear:n=!1,enter:r=!0,exit:i=!0,mountOnEnter:a=!1,unmountOnExit:o=!1,timeout:s,addEndListener:c,reduceMotion:l=!1,getAutoTimeout:u,nodeRef:d,onEnter:f,onEntering:p,onEntered:m,onExit:g,onExiting:_,onExited:v,children:y,...b}=e,x=G.useContext(Zt),S=x&&!x.isMounting?r:n,[C,w]=G.useState(()=>t?S?`exited`:`entered`:a||o?`unmounted`:`exited`),T=G.useRef(C);T.current=C,t&&C===`unmounted`&&(T.current=`exited`,w(`exited`));let E=G.useRef(t&&S),D=G.useRef(!1),O=G.useRef(null),k=G.useRef(C),A=G.useRef(!1),j=G.useRef(l),M=Yt({timeout:s,addEndListener:c,reduceMotion:l,getAutoTimeout:u,onEnter:f,onEntering:p,onEntered:m,onExit:g,onExiting:_,onExited:v,enter:r,exit:i,mountOnEnter:a,unmountOnExit:o,nodeRef:d,parentGroup:x}),N=G.useCallback(()=>{O.current!==null&&(O.current.cancel(),O.current=null)},[]),P=G.useCallback(e=>{let t=!0,n=()=>{t&&(t=!1,O.current=null,e())};return n.cancel=()=>{t=!1},O.current=n,n},[]),ee=G.useCallback((e,t)=>{let n,r=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},i=P(()=>{r(),T.current=e,w(e)}),a=i.cancel;i.cancel=()=>{r(),a()};let o=M.current.nodeRef.current,s=M.current.addEndListener,c=M.current.getAutoTimeout!==void 0,l=M.current.getAutoTimeout?.(),u=$t({currentStatus:t,isAppearing:A.current,timeout:M.current.timeout,autoTimeout:l}),d=j.current,f=u??(d&&c?0:null),p=e=>{n=setTimeout(i,e)};if(!o){p(0);return}if(s){f!=null&&p(d?0:f),s.length>=2?s(o,i):s(i);return}p(d?0:u??0)},[P,M]),F=G.useCallback(e=>{let t=M.current,n=t.parentGroup?t.parentGroup.isMounting:e;if(A.current=n,!e&&!t.enter){T.current=`entered`,w(`entered`);return}j.current=t.reduceMotion,t.onEnter?.(n),T.current=`entering`,w(`entering`)},[M]),I=G.useCallback(()=>{let e=M.current;if(!e.exit){T.current=`exited`,w(`exited`);return}j.current=e.reduceMotion,e.onExit?.(),T.current=`exiting`,w(`exiting`)},[M]),L=G.useCallback((e,t)=>{if(N(),t===`entering`){let t=M.current;if(t.mountOnEnter||t.unmountOnExit){let e=t.nodeRef.current;e&&se(e)}F(e)}else I()},[N,F,I,M]);return h(()=>(D.current=!0,E.current&&(E.current=!1,L(!0,`entering`)),()=>{D.current=!1,N()}),[N,L]),h(()=>{if(!D.current)return;let e=T.current;t?e!==`entering`&&e!==`entered`&&L(!1,`entering`):e===`entering`||e===`entered`?L(!1,`exiting`):e===`exited`&&o&&(T.current=`unmounted`,w(`unmounted`))},[t,C,o,L]),h(()=>{if(C===`unmounted`||k.current===`unmounted`){k.current=C;return}let e=k.current!==C;e&&(k.current=C);let t=M.current;C===`entering`?(e&&t.onEntering?.(A.current),O.current===null&&T.current===C&&ee(`entered`,`entering`)):C===`exiting`?(e&&t.onExiting?.(),O.current===null&&T.current===C&&ee(`exited`,`exiting`)):C===`entered`&&e?t.onEntered?.(A.current):C===`exited`&&e&&t.onExited?.()},[M,ee,C]),C===`unmounted`?null:(0,W.jsx)(Zt.Provider,{value:null,children:y(C,b)})}function tn(e){return U(`MuiCollapse`,e)}z(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var nn={},rn=e=>{let{orientation:t,classes:n}=e;return g({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},tn,n)},an=m(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(d(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),on=m(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),sn=m(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),cn=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:s=`0px`,component:c,disablePrefersReducedMotion:l=!1,easing:u,in:d,onEnter:p,onEntered:m,onEntering:h,onExit:g,onExited:_,onExiting:y,orientation:S=`vertical`,slots:C=nn,slotProps:w=nn,style:T,timeout:E=f.standard,TransitionComponent:D=en,...O}=n,k={...n,orientation:S,collapsedSize:s},A=rn(k),j=ke(),M=G.useRef(null),N=G.useRef(null),P=typeof s==`number`?`${s}px`:s,F=S===`horizontal`,I=F?`width`:`height`,L=ee(j.motion.reducedMotion,l),R=G.useRef(null),z=v(t,R),te=()=>M.current?M.current[F?`clientWidth`:`clientHeight`]:0,ne=o(R,(e,t)=>{M.current&&F&&(M.current.style.position=`absolute`),e.style[I]=P,p&&p(e,t)}),re=o(R,(e,t)=>{let n=te();M.current&&F&&(M.current.style.position=``);let{duration:r,easing:i}=b({style:T,timeout:E,easing:u},{mode:`enter`});if(E===`auto`&&!L.shouldReduceMotion){let e=j.transitions.getAutoHeightDuration(n);N.current=e}else N.current=null;let a=L.getTransitionTiming({duration:N.current??r,delay:void 0});e.style.transitionDuration=typeof a.duration==`string`?a.duration:`${a.duration}ms`,e.style[I]=`${n}px`,e.style.transitionTimingFunction=i,h&&h(e,t)}),ie=o(R,(e,t)=>{e.style[I]=`auto`,m&&m(e,t)}),ae=o(R,e=>{e.style[I]=`${te()}px`,g&&g(e)}),oe=o(R,_),se=o(R,e=>{let t=te(),{duration:n,easing:r}=b({style:T,timeout:E,easing:u},{mode:`exit`});if(E===`auto`&&!L.shouldReduceMotion){let e=j.transitions.getAutoHeightDuration(t);N.current=e}else N.current=null;let i=L.getTransitionTiming({duration:N.current??n,delay:void 0});e.style.transitionDuration=typeof i.duration==`string`?i.duration:`${i.duration}ms`,e.style[I]=P,e.style.transitionTimingFunction=r,y&&y(e)}),ce=r?e=>{r(R.current,e)}:void 0,le={slots:C,slotProps:w,component:c},[ue,de]=B(`root`,{ref:z,className:V(A.root,a),elementType:an,externalForwardedProps:le,ownerState:k,additionalProps:{style:{[F?`minWidth`:`minHeight`]:P,...T}}}),[fe,pe]=B(`wrapper`,{ref:M,className:A.wrapper,elementType:on,externalForwardedProps:le,ownerState:k}),[me,he]=B(`wrapperInner`,{className:A.wrapperInner,elementType:sn,externalForwardedProps:le,ownerState:k});return(0,W.jsx)(D,{in:d,onEnter:ne,onEntered:ie,onEntering:re,onExit:ae,onExited:oe,onExiting:se,addEndListener:ce,getAutoTimeout:E===`auto`?()=>N.current:void 0,reduceMotion:L.shouldReduceMotion,nodeRef:R,timeout:E===`auto`?null:E,...O,children:(e,{ownerState:t,...n})=>{let r={...k,state:e};return(0,W.jsx)(ue,{...de,className:V(de.className,{entered:A.entered,exited:!d&&P===`0px`&&A.hidden}[e]),ownerState:r,...n,children:(0,W.jsx)(fe,{...pe,ownerState:r,children:(0,W.jsx)(me,{...he,ownerState:r,children:i})})})}})});cn&&(cn.muiSupportAuto=!0);function ln(e){return U(`MuiAlert`,e)}var un=z(`MuiAlert`,[`root`,`action`,`icon`,`message`,`filled`,`colorSuccess`,`colorInfo`,`colorWarning`,`colorError`,`outlined`,`standard`]),dn=T((0,W.jsx)(`path`,{d:`M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z`}),`SuccessOutlined`),fn=T((0,W.jsx)(`path`,{d:`M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z`}),`ReportProblemOutlined`),pn=T((0,W.jsx)(`path`,{d:`M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`ErrorOutline`),mn=T((0,W.jsx)(`path`,{d:`M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z`}),`InfoOutlined`),hn=T((0,W.jsx)(`path`,{d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),gn=e=>{let{variant:t,color:n,severity:r,classes:i}=e,a={root:[`root`,`color${y(n||r)}`,`${t}`],icon:[`icon`],message:[`message`],action:[`action`]};return g(a,ln,i)},_n=m(de,{name:`MuiAlert`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant]]}})(d(({theme:e})=>{let t=e.palette.mode===`light`?e.darken:e.lighten,n=e.palette.mode===`light`?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:`transparent`,display:`flex`,padding:`6px 16px`,variants:[...Object.entries(e.palette).filter(F([`light`])).map(([r])=>({props:{colorSeverity:r,variant:`standard`},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${un.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(F([`light`])).map(([n])=>({props:{colorSeverity:n,variant:`outlined`},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${un.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(F([`dark`])).map(([t])=>({props:{colorSeverity:t,variant:`filled`},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:e.palette.mode===`dark`?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),vn=m(`div`,{name:`MuiAlert`,slot:`Icon`})({marginRight:12,padding:`7px 0`,display:`flex`,fontSize:22,opacity:.9}),yn=m(`div`,{name:`MuiAlert`,slot:`Message`})({padding:`8px 0`,minWidth:0,overflow:`auto`}),bn=m(`div`,{name:`MuiAlert`,slot:`Action`})({display:`flex`,alignItems:`flex-start`,padding:`4px 0 0 16px`,marginLeft:`auto`,marginRight:-8}),xn={success:(0,W.jsx)(dn,{fontSize:`inherit`}),warning:(0,W.jsx)(fn,{fontSize:`inherit`}),error:(0,W.jsx)(pn,{fontSize:`inherit`}),info:(0,W.jsx)(mn,{fontSize:`inherit`})},Sn=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiAlert`}),{action:r,children:i,className:a,closeText:o=`Close`,color:s,icon:c,iconMapping:l=xn,onClose:u,role:d=`alert`,severity:f=`success`,slotProps:p={},slots:m={},variant:h=`standard`,...g}=n,_={...n,color:s,severity:f,variant:h,colorSeverity:s||f},v=gn(_),y={slots:m,slotProps:p},[b,S]=B(`root`,{ref:t,shouldForwardComponentProp:!0,className:V(v.root,a),elementType:_n,externalForwardedProps:{...y,...g},ownerState:_,additionalProps:{role:d,elevation:0}}),[C,w]=B(`icon`,{className:v.icon,elementType:vn,externalForwardedProps:y,ownerState:_}),[T,E]=B(`message`,{className:v.message,elementType:yn,externalForwardedProps:y,ownerState:_}),[D,O]=B(`action`,{className:v.action,elementType:bn,externalForwardedProps:y,ownerState:_}),[k,A]=B(`closeButton`,{elementType:N,externalForwardedProps:y,ownerState:_}),[j,M]=B(`closeIcon`,{elementType:hn,externalForwardedProps:y,ownerState:_});return(0,W.jsxs)(b,{...S,children:[c===!1?null:(0,W.jsx)(C,{...w,children:c||l[f]||xn[f]}),(0,W.jsx)(T,{...E,children:i}),r==null?null:(0,W.jsx)(D,{...O,children:r}),r==null&&u?(0,W.jsx)(D,{...O,children:(0,W.jsx)(k,{size:`small`,"aria-label":o,title:o,color:`inherit`,onClick:u,...A,children:(0,W.jsx)(j,{fontSize:`small`,...M})})}):null]})});function Cn(){let[,e]=G.useState({});return G.useCallback(()=>{e({})},[])}function wn(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}function Tn(e){let t=G.useRef({});return G.useEffect(()=>{t.current=e}),t.current}function En({array1:e,array2:t,parser:n=e=>e}){return e&&t&&e.length===t.length&&e.every((e,r)=>n(e)===n(t[r]))}function Dn(e){return e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``)}function On(e={}){let{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i=`any`,stringify:a,trim:o=!1}=e;return(e,{inputValue:s,getOptionLabel:c})=>{let l=o?s.trim():s;n&&(l=l.toLowerCase()),t&&(l=Dn(l));let u=l?e.filter(e=>{let r=(a||c)(e);return n&&(r=r.toLowerCase()),t&&(r=Dn(r)),i===`start`?r.startsWith(l):r.includes(l)}):e;return typeof r==`number`?u.slice(0,r):u}}var kn=On(),An=5,jn=e=>e.current!==null&&wn(e.current.parentElement,document.activeElement),Mn=(e,t)=>e===t,Nn=[];function Pn(e,t,n,r){if(t||e==null||r)return``;let i=n(e);return typeof i==`string`?i:``}function Fn(e){let{unstable_isActiveElementInListbox:t=jn,unstable_classNamePrefix:n=`Mui`,autoComplete:r=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:c=!1,componentName:l=`useAutocomplete`,defaultValue:u=e.multiple?Nn:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:h=!1,filterOptions:g=kn,filterSelectedOptions:_=!1,freeSolo:v=!1,getOptionDisabled:y,getOptionKey:b,getOptionLabel:x=e=>e.label??e,groupBy:S,handleHomeEndKeys:C=!e.freeSolo,id:w,includeInputInList:T=!1,inputValue:E,isOptionEqualToValue:O=Mn,multiple:k=!1,onChange:A,onClose:j,onHighlightChange:M,onInputChange:N,onOpen:P,open:ee,openOnFocus:F=!1,options:I,readOnly:L=!1,renderValue:R,resetHighlightOnMouseLeave:z=!1,selectOnFocus:te=!e.freeSolo,value:ne}=e,re=_e(w),B=x;B=e=>{let t=x(e);return typeof t==`string`?t:String(t)};let ie=G.useRef(!1),ae=G.useRef(!0),oe=G.useRef(null),se=G.useRef(null),ce=G.useRef(!1),le=G.useRef(!1),[ue,de]=G.useState(null),[fe,pe]=G.useState(-1),V=i?0:-1,me=G.useRef(V),he=G.useRef(null),ge=G.useRef(!1),H=G.useRef(!1),ve=G.useRef(Pn(u??ne,k,B)).current,[ye,be]=Kt({controlled:ne,default:u,name:l}),[xe,Se]=Kt({controlled:E,default:ve,name:l,state:`inputValue`}),[U,Ce]=G.useState(!1),we=G.useCallback((e,t,n)=>{if(!(k?ye.lengthk?ye:ye==null?[]:[ye],[k,ye]),je=G.useMemo(()=>O!==Mn||Ae.length===0?null:new Set(Ae),[O,Ae]),Me=G.useCallback(e=>je?je.has(e):Ae.some(t=>t!=null&&O(e,t)),[O,Ae,je]),Ne=W?g(I.filter(e=>!(_&&Me(e))),{inputValue:ke&&De?``:xe,getOptionLabel:B}):[],Pe=Tn({filteredOptions:Ne,value:ye,inputValue:xe});G.useEffect(()=>{let e=ye!==Pe.value;U&&!e||v&&(!e||ye==null&&Pe.value===void 0)||we(null,ye,`reset`)},[ye,we,U,Pe.value,v]);let Fe=Te&&Ne.length>0&&!L,Ie=D(e=>{e===-1?oe.current.focus():ue.querySelector(`[data-item-index="${e}"]`).focus()});G.useEffect(()=>{k&&fe>ye.length-1&&(pe(-1),Ie(-1))},[ye,k,fe,Ie]);function Le(e,t){if(!se.current||e<0||e>=Ne.length)return-1;let n=e;for(;;){let r=se.current.querySelector(`[data-option-index="${n}"]`),i=m?!1:!r||r.disabled||r.getAttribute(`aria-disabled`)===`true`;if(r&&r.hasAttribute(`tabindex`)&&!i)return n;if(n=t===`next`?(n+1)%Ne.length:(n-1+Ne.length)%Ne.length,n===e)return-1}}let Re=D(({index:e,reason:t,preserveScroll:r=!1})=>{if(oe.current==null&&se.current==null||(e===-1?oe.current.removeAttribute(`aria-activedescendant`):oe.current.setAttribute(`aria-activedescendant`,`${re}-option-${e}`),!se.current))return;let i=se.current.querySelector(`[role="option"].${n}-focused`);i&&(i.classList.remove(`${n}-focused`),i.classList.remove(`${n}-focusVisible`));let a=se.current;if(se.current.getAttribute(`role`)!==`listbox`&&(a=se.current.parentElement.querySelector(`[role="listbox"]`)),!a)return;if(e===-1){r||(a.scrollTop=0);return}let o=se.current.querySelector(`[data-option-index="${e}"]`);if(o&&(o.classList.add(`${n}-focused`),t===`keyboard`&&o.classList.add(`${n}-focusVisible`),a.scrollHeight>a.clientHeight&&t!==`mouse`&&t!==`touch`)){let e=o,t=a.clientHeight+a.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?a.scrollTop=n-a.clientHeight:e.offsetTop-e.offsetHeight*(S?1.3:0){me.current=t,he.current=n??null,M&&[`mouse`,`keyboard`,`touch`].includes(n)&&M(e,t===-1?null:Ne[t],n),Re({index:t,reason:n,preserveScroll:r})}),Be=D(({index:e})=>{me.current=e,Re({index:e,reason:he.current})}),Ve=D(({event:e,diff:t,direction:n=`next`,reason:i,preserveScroll:a})=>{if(!W)return;i===`keyboard`&&(ge.current=!1,H.current=!1);let o=Le((()=>{let e=Ne.length-1;if(t===`reset`)return V;if(t===`start`)return 0;if(t===`end`)return e;let n=me.current+t;return n<0?n===-1&&T?-1:h&&me.current!==-1||Math.abs(t)>1?0:e:n>e?n===e+1&&T?-1:h||Math.abs(t)>1?e:0:n})(),n);if(ze({index:o,reason:i,event:e,preserveScroll:a}),r&&t!==`reset`){if(o===-1)oe.current.value=xe;else{let e=B(Ne[o]);oe.current.value=e,e.toLowerCase().indexOf(xe.toLowerCase())===0&&xe.length>0&&oe.current.setSelectionRange(xe.length,e.length)}}}),He=!En({array1:Pe.filteredOptions,array2:Ne,parser:B}),Ue=()=>{if(me.current!==-1&&!En({array1:Pe.filteredOptions,array2:Ne,parser:B})&&Pe.inputValue===xe&&(k?ye.length===Pe.value.length&&Pe.value.every((e,t)=>B(ye[t])===B(e)):((e,t)=>(e?B(e):``)===(t?B(t):``))(Pe.value,ye))){let e=Pe.filteredOptions[me.current];if(e)return Ne.findIndex(t=>B(t)===B(e))}return-1},We=G.useCallback(()=>{if(!W)return;let e=Ue();if(e!==-1){Be({index:e});return}let t=k?ye[0]:ye;if(Ne.length===0||t==null){let e=He&&Pe.inputValue===xe&&Pe.filteredOptions?.length>0&&Ne.length>Pe.filteredOptions.length&&Pe.filteredOptions.every((e,t)=>B(e)===B(Ne[t]));Ve({diff:`reset`,preserveScroll:e});return}if(se.current){if(t!=null){let e=Ne[me.current];if(k&&e&&ye.findIndex(t=>O(e,t))!==-1&&Pe.filteredOptions?.length>0){Be({index:me.current});return}let n=Ne.findIndex(e=>O(e,t));n===-1?Ve({diff:`reset`}):ze({index:n});return}if(me.current>=Ne.length-1){ze({index:Ne.length-1});return}ze({index:me.current})}},[Ne.length,!k&&ye,Ve,ze,Be,W,xe,k]),Ge=D(e=>{Gt(se,e),e&&We()});G.useEffect(()=>{(He||W&&!f)&&We()},[We,He,W,f]),G.useEffect(()=>{if(typeof window>`u`)return;let e=()=>{le.current=!0};return window.addEventListener(`blur`,e),()=>{window.removeEventListener(`blur`,e)}},[]);let Ke=e=>{Te||(Ee(!0),Oe(!0),H.current=!1,P&&P(e))},qe=(e,t)=>{Te&&(Ee(!1),ge.current=!1,he.current=null,j&&j(e,t))},Je=(e,t,n,r)=>{if(k){if(ye.length===t.length&&ye.every((e,n)=>e===t[n]))return}else if(ye===t)return;A&&A(e,t,n,r),be(t)},Ye=(e,t,n=`selectOption`,r=`options`)=>{let i=n,a=t;if(k){a=Array.isArray(ye)?ye.slice():[];let e=a.findIndex(e=>O(t,e));e===-1?a.push(t):r!==`freeSolo`&&(a.splice(e,1),i=`removeOption`)}we(e,a,i),Je(e,a,i,{option:t}),!f&&(!e||!e.ctrlKey&&!e.metaKey)&&qe(e,i),(o===!0||o===`touch`&&H.current||o===`mouse`&&!H.current)&&oe.current.blur()};function Xe(e,t){if(e===-1)return-1;let n=e;for(;;){if(t===`next`&&n===ye.length||t===`previous`&&n===-1)return-1;let e=ue.querySelector(`[data-item-index="${n}"]`);if(!e||!e.hasAttribute(`tabindex`)||e.disabled||e.getAttribute(`aria-disabled`)===`true`)n+=t===`next`?1:-1;else return n}}let Ze=(e,t)=>{if(!k)return;xe===``&&qe(e,`toggleInput`);let n=fe;fe===-1&&t===`previous`?(n=ye.length-1,v&&xe!==``&&(Se(``),N&&N(e,``,`reset`))):(n+=t===`next`?1:-1,n<0&&(n=0),n===ye.length&&(n=-1)),n=Xe(n,t),pe(n),Ie(n)},Qe=e=>{Se(``),N&&N(e,``,`clear`),Je(e,k?[]:null,`clear`)},$e=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(fe!==-1&&![`ArrowLeft`,`ArrowRight`].includes(t.key)&&(pe(-1),Ie(-1)),t.which!==229))switch(t.key){case`Home`:W&&C&&(t.preventDefault(),Ve({diff:`start`,direction:`next`,reason:`keyboard`,event:t}));break;case`End`:W&&C&&(t.preventDefault(),Ve({diff:`end`,direction:`previous`,reason:`keyboard`,event:t}));break;case`PageUp`:t.preventDefault(),Ve({diff:-5,direction:`previous`,reason:`keyboard`,event:t}),Ke(t);break;case`PageDown`:t.preventDefault(),Ve({diff:An,direction:`next`,reason:`keyboard`,event:t}),Ke(t);break;case`ArrowDown`:t.preventDefault(),Ve({diff:1,direction:`next`,reason:`keyboard`,event:t}),Ke(t);break;case`ArrowUp`:t.preventDefault(),Ve({diff:-1,direction:`previous`,reason:`keyboard`,event:t}),Ke(t);break;case`ArrowLeft`:{let e=oe.current;if(!(e&&e.selectionStart===0&&e.selectionEnd===0))return;!k&&R&&ye!=null?(v&&xe!==``&&(Se(``),N&&N(t,``,`reset`)),pe(0),Ie(0)):Ze(t,`previous`);break}case`ArrowRight`:!k&&R?(pe(-1),Ie(-1)):Ze(t,`next`);break;case`Enter`:{let e=W&&me.current!==-1&&he.current===null,n=v&&!De&&e,i=!v||De||!e,a=n&&!ge.current;if(me.current!==-1&&W&&i&&!ge.current){let e=Ne[me.current],n=y?y(e):!1;if(t.preventDefault(),n)return;Ye(t,e,`selectOption`),r&&oe.current.setSelectionRange(oe.current.value.length,oe.current.value.length)}else v&&xe!==``&&ke===!1?((k||a)&&t.preventDefault(),Ye(t,xe,`createOption`,`freeSolo`)):W&&ge.current&&(t.preventDefault(),qe(t,`escape`));break}case`Escape`:W?(t.preventDefault(),t.stopPropagation(),qe(t,`escape`)):c&&(xe!==``||k&&ye.length>0||R)&&(t.preventDefault(),t.stopPropagation(),Qe(t));break;case`Backspace`:if(ce.current){ce.current=!1;break}if(k&&!L&&xe===``&&ye.length>0){let e=fe===-1?ye.length-1:fe,n=ye.slice();n.splice(e,1),Je(t,n,`removeOption`,{option:ye[e]}),fe!==-1&&(ce.current=!0,setTimeout(()=>{ce.current&&=!1},0))}!k&&R&&!L&&xe===``&&Je(t,null,`removeOption`,{option:ye});break;case`Delete`:if(k&&!L&&xe===``&&ye.length>0&&fe!==-1){let e=fe,n=ye.slice();n.splice(e,1),Je(t,n,`removeOption`,{option:ye[e]})}!k&&R&&!L&&xe===``&&Je(t,null,`removeOption`,{option:ye})}},et=e=>{if(Ce(!0),fe!==-1&&(pe(-1),Ie(-1)),le.current){le.current=!1;return}F&&!ie.current&&Ke(e)},tt=e=>{if(t(se)){oe.current.focus();return}Ce(!1),ae.current=!0,ie.current=!1,a&&me.current!==-1&&W&&he.current!==`mouse`&&he.current!==`touch`?Ye(e,Ne[me.current],`blur`):a&&v&&xe!==``?Ye(e,xe,`blur`,`freeSolo`):s&&we(e,ye,`blur`),qe(e,`blur`)},nt=e=>{let t=e.target.value,n=xe!==t;n&&(Se(t),ge.current=!1,N&&N(e,t,`input`)),t===``?!d&&!k&&!R&&Je(e,null,`clear`):Ke(e),n&&Oe(!1)},rt=e=>{let t=Number(e.currentTarget.getAttribute(`data-option-index`));me.current===t?he.current=`mouse`:ze({event:e,index:t,reason:`mouse`}),H.current||(ge.current=!1)},it=e=>{!z||me.current===-1||he.current!==`mouse`||H.current||ze({event:e,index:-1,reason:`mouse`,preserveScroll:!0})},at=e=>{ge.current=!1,ze({event:e,index:Number(e.currentTarget.getAttribute(`data-option-index`)),reason:`touch`}),H.current=!0},ot=e=>{let t=Number(e.currentTarget.getAttribute(`data-option-index`));Ye(e,Ne[t],`selectOption`),H.current=!1},st=e=>t=>{let n=ye.slice();n.splice(e,1),Je(t,n,`removeOption`,{option:ye[e]})},ct=e=>{Je(e,null,`removeOption`,{option:ye})},lt=e=>{Te?qe(e,`toggleInput`):Ke(e)},ut=e=>{wn(e.currentTarget,e.target)&&(ue&&!wn(ue,e.target)||e.target.getAttribute(`id`)!==re&&e.preventDefault())},dt=e=>{wn(e.currentTarget,e.target)&&(ue&&!wn(ue,e.target)||(oe.current.focus(),te&&ae.current&&oe.current.selectionEnd-oe.current.selectionStart===0&&oe.current.select(),ae.current=!1))},ft=e=>{!p&&(xe===``||!Te)&&e.button===0&<(e)},pt=v&&xe.length>0;pt||=k?ye.length>0:ye!==null;let mt=Ne;return S&&(mt=Ne.reduce((e,t,n)=>{let r=S(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e},[])),p&&U&&tt(),{getRootProps:(e={})=>({...e,onKeyDown:$e(e),onMouseDown:ut,onClick:dt}),getInputLabelProps:()=>({id:`${re}-label`,htmlFor:re}),getInputProps:()=>({id:re,value:xe,onBlur:tt,onFocus:et,onChange:nt,onMouseDown:ft,"aria-activedescendant":W?``:null,"aria-autocomplete":r?`both`:`list`,"aria-controls":Fe?`${re}-listbox`:void 0,"aria-expanded":Fe,autoComplete:`off`,ref:oe,autoCapitalize:`none`,spellCheck:`false`,role:`combobox`,disabled:p}),getClearProps:()=>({tabIndex:-1,type:`button`,onClick:e=>{ie.current=!0,Qe(e)}}),getItemProps:({index:e=0}={})=>({...k&&{key:e},"data-item-index":e,tabIndex:-1,onFocus:()=>{fe!==e&&pe(e)},...!L&&{onDelete:k?st(e):ct}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:`button`,onClick:lt}),getListboxProps:(e={})=>({...e,role:`listbox`,id:`${re}-listbox`,"aria-labelledby":`${re}-label`,"aria-multiselectable":k||void 0,ref:Ge,onMouseDown:t=>{e.onMouseDown?.(t),!t.defaultMuiPrevented&&t.preventDefault()},onScroll:t=>{e.onScroll?.(t),!t.defaultMuiPrevented&&H.current&&(ge.current=!0)},onMouseLeave:t=>{e.onMouseLeave?.(t),!t.defaultMuiPrevented&&it(t)}}),getOptionProps:({index:e,option:t})=>{let n=Me(t),r=y?y(t):!1;return{key:b?.(t)??B(t),tabIndex:-1,role:`option`,id:`${re}-option-${e}`,onMouseMove:rt,onClick:ot,onTouchStart:at,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:re,inputValue:xe,value:ye,dirty:pt,expanded:W&&ue,popupOpen:W,focused:U||fe!==-1,anchorEl:ue,setAnchorEl:de,focusedItem:fe,groupedOptions:mt}}var In=`bottom`,Ln=`right`,Rn=`left`,zn=`auto`,Bn=[`top`,In,Ln,Rn],Vn=`start`,Hn=`clippingParents`,Un=`viewport`,Wn=`popper`,Gn=`reference`,Kn=Bn.reduce(function(e,t){return e.concat([t+`-`+Vn,t+`-end`])},[]),qn=[].concat(Bn,[zn]).reduce(function(e,t){return e.concat([t,t+`-`+Vn,t+`-end`])},[]),Jn=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function Yn(e){return e?(e.nodeName||``).toLowerCase():null}function Xn(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zn(e){return e instanceof Xn(e).Element||e instanceof Element}function Qn(e){return e instanceof Xn(e).HTMLElement||e instanceof HTMLElement}function $n(e){return typeof ShadowRoot>`u`?!1:e instanceof Xn(e).ShadowRoot||e instanceof ShadowRoot}function er(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!Qn(i)||!Yn(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function tr(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!Qn(r)||!Yn(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var nr={name:`applyStyles`,enabled:!0,phase:`write`,fn:er,effect:tr,requires:[`computeStyles`]};function rr(e){return e.split(`-`)[0]}var ir=Math.max,ar=Math.min,or=Math.round;function sr(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function cr(){return!/^((?!chrome|android).)*safari/i.test(sr())}function lr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Qn(e)&&(i=e.offsetWidth>0&&or(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&or(r.height)/e.offsetHeight||1);var o=(Zn(e)?Xn(e):window).visualViewport,s=!cr()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function ur(e){var t=lr(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function dr(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&$n(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fr(e){return Xn(e).getComputedStyle(e)}function pr(e){return[`table`,`td`,`th`].indexOf(Yn(e))>=0}function mr(e){return((Zn(e)?e.ownerDocument:e.document)||window.document).documentElement}function hr(e){return Yn(e)===`html`?e:e.assignedSlot||e.parentNode||($n(e)?e.host:null)||mr(e)}function gr(e){return!Qn(e)||fr(e).position===`fixed`?null:e.offsetParent}function _r(e){var t=/firefox/i.test(sr());if(/Trident/i.test(sr())&&Qn(e)&&fr(e).position===`fixed`)return null;var n=hr(e);for($n(n)&&(n=n.host);Qn(n)&&[`html`,`body`].indexOf(Yn(n))<0;){var r=fr(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function vr(e){for(var t=Xn(e),n=gr(e);n&&pr(n)&&fr(n).position===`static`;)n=gr(n);return n&&(Yn(n)===`html`||Yn(n)===`body`&&fr(n).position===`static`)?t:n||_r(e)||t}function yr(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function br(e,t,n){return ir(e,ar(t,n))}function xr(e,t,n){var r=br(e,t,n);return r>n?n:r}function Sr(){return{top:0,right:0,bottom:0,left:0}}function Cr(e){return Object.assign({},Sr(),e)}function wr(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Tr=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,Cr(typeof e==`number`?wr(e,Bn):e)};function Er(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=rr(n.placement),c=yr(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=Tr(i.padding,n),d=ur(a),f=c===`y`?`top`:Rn,p=c===`y`?In:Ln,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=vr(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=br(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function Dr(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||dr(t.elements.popper,r)&&(t.elements.arrow=r))}var Or={name:`arrow`,enabled:!0,phase:`main`,fn:Er,effect:Dr,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function kr(e){return e.split(`-`)[1]}var Ar={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function jr(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:or(n*i)/i||0,y:or(r*i)/i||0}}function Mr(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=Rn,b=`top`,x=window;if(l){var S=vr(n),C=`clientHeight`,w=`clientWidth`;if(S===Xn(n)&&(S=mr(n),fr(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=In;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=Ln;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&Ar),O=u===!0?jr({x:p,y:h},Xn(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function Nr(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:rr(t.placement),variation:kr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Mr(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Mr(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Pr={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:Nr,data:{}},Fr={passive:!0};function Ir(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=Xn(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,Fr)}),s&&c.addEventListener(`resize`,n.update,Fr),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,Fr)}),s&&c.removeEventListener(`resize`,n.update,Fr)}}var Lr={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:Ir,data:{}},Rr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function zr(e){return e.replace(/left|right|bottom|top/g,function(e){return Rr[e]})}var Br={start:`end`,end:`start`};function Vr(e){return e.replace(/start|end/g,function(e){return Br[e]})}function Hr(e){var t=Xn(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ur(e){return lr(mr(e)).left+Hr(e).scrollLeft}function Wr(e,t){var n=Xn(e),r=mr(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=cr();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+Ur(e),y:c}}function Gr(e){var t=mr(e),n=Hr(e),r=e.ownerDocument?.body,i=ir(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=ir(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+Ur(e),s=-n.scrollTop;return fr(r||t).direction===`rtl`&&(o+=ir(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function Kr(e){var t=fr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function qr(e){return[`html`,`body`,`#document`].indexOf(Yn(e))>=0?e.ownerDocument.body:Qn(e)&&Kr(e)?e:qr(hr(e))}function Jr(e,t){t===void 0&&(t=[]);var n=qr(e),r=n===e.ownerDocument?.body,i=Xn(n),a=r?[i].concat(i.visualViewport||[],Kr(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(Jr(hr(a)))}function Yr(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Xr(e,t){var n=lr(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Zr(e,t,n){return t===`viewport`?Yr(Wr(e,n)):Zn(t)?Xr(t,n):Yr(Gr(mr(e)))}function Qr(e){var t=Jr(hr(e)),n=[`absolute`,`fixed`].indexOf(fr(e).position)>=0&&Qn(e)?vr(e):e;return Zn(n)?t.filter(function(e){return Zn(e)&&dr(e,n)&&Yn(e)!==`body`}):[]}function $r(e,t,n,r){var i=t===`clippingParents`?Qr(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=Zr(e,n,r);return t.top=ir(i.top,t.top),t.right=ar(i.right,t.right),t.bottom=ar(i.bottom,t.bottom),t.left=ir(i.left,t.left),t},Zr(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ei(e){var t=e.reference,n=e.element,r=e.placement,i=r?rr(r):null,a=r?kr(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case In:c={x:o,y:t.y+t.height};break;case Ln:c={x:t.x+t.width,y:s};break;case Rn:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?yr(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case Vn:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2)}}return c}function ti(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?Hn:s,l=n.rootBoundary,u=l===void 0?Un:l,d=n.elementContext,f=d===void 0?Wn:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=Cr(typeof g==`number`?wr(g,Bn):g),v=f===`popper`?Gn:Wn,y=e.rects.popper,b=e.elements[m?v:f],x=$r(Zn(b)?b:b.contextElement||mr(e.elements.popper),c,u,o),S=lr(e.elements.reference),C=ei({reference:S,element:y,strategy:`absolute`,placement:i}),w=Yr(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function ni(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?qn:c,u=kr(r),d=u?s?Kn:Kn.filter(function(e){return kr(e)===u}):Bn,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=ti(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[rr(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function ri(e){if(rr(e)===`auto`)return[];var t=zr(e);return[Vr(e),t,Vr(t)]}function ii(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=rr(g)===g,v=c||(_||!m?[zr(g)]:ri(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(rr(n)===`auto`?ni(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T=0,A=k?`width`:`height`,j=ti(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?Ln:Rn:O?In:`top`;b[A]>x[A]&&(M=zr(M));var N=zr(M),P=[];if(a&&P.push(j[D]<=0),s&&P.push(j[M]<=0,j[N]<=0),P.every(function(e){return e})){w=E,C=!1;break}S.set(E,P)}if(C)for(var ee=m?3:1,F=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},I=ee;I>0&&F(I)!==`break`;I--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var ai={name:`flip`,enabled:!0,phase:`main`,fn:ii,requiresIfExists:[`offset`],data:{_skip:!1}};function oi(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function si(e){return[`top`,Ln,In,Rn].some(function(t){return e[t]>=0})}function ci(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=ti(t,{elementContext:`reference`}),s=ti(t,{altBoundary:!0}),c=oi(o,r),l=oi(s,i,a),u=si(c),d=si(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var li={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:ci};function ui(e,t,n){var r=rr(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function di(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=qn.reduce(function(e,n){return e[n]=ui(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var fi={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:di};function pi(e){var t=e.state,n=e.name;t.modifiersData[n]=ei({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var mi={name:`popperOffsets`,enabled:!0,phase:`read`,fn:pi,data:{}};function hi(e){return e===`x`?`y`:`x`}function gi(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=ti(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=rr(t.placement),v=kr(t.placement),y=!v,b=yr(_),x=hi(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:Rn,A=b===`y`?In:Ln,j=b===`y`?`height`:`width`,M=S[b],N=M+g[k],P=M-g[A],ee=p?-w[j]/2:0,F=v===`start`?C[j]:w[j],I=v===`start`?-w[j]:-C[j],L=t.elements.arrow,R=p&&L?ur(L):{width:0,height:0},z=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:Sr(),te=z[k],ne=z[A],re=br(0,C[j],R[j]),B=y?C[j]/2-ee-re-te-E.mainAxis:F-re-te-E.mainAxis,ie=y?-C[j]/2+ee+re+ne+E.mainAxis:I+re+ne+E.mainAxis,ae=t.elements.arrow&&vr(t.elements.arrow),oe=ae?b===`y`?ae.clientTop||0:ae.clientLeft||0:0,se=D?.[b]??0,ce=M+B-se-oe,le=M+ie-se,ue=br(p?ar(N,ce):N,M,p?ir(P,le):P);S[b]=ue,O[b]=ue-M}if(s){var de=b===`x`?`top`:Rn,fe=b===`x`?In:Ln,pe=S[x],V=x===`y`?`height`:`width`,me=pe+g[de],he=pe-g[fe],ge=[`top`,Rn].indexOf(_)!==-1,H=D?.[x]??0,_e=ge?me:pe-C[V]-w[V]-H+E.altAxis,ve=ge?pe+C[V]+w[V]-H-E.altAxis:he,ye=p&&ge?xr(_e,pe,ve):br(p?_e:me,pe,p?ve:he);S[x]=ye,O[x]=ye-pe}t.modifiersData[r]=O}}var _i={name:`preventOverflow`,enabled:!0,phase:`main`,fn:gi,requiresIfExists:[`offset`]};function vi(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yi(e){return e===Xn(e)||!Qn(e)?Hr(e):vi(e)}function bi(e){var t=e.getBoundingClientRect(),n=or(t.width)/e.offsetWidth||1,r=or(t.height)/e.offsetHeight||1;return n!==1||r!==1}function xi(e,t,n){n===void 0&&(n=!1);var r=Qn(t),i=Qn(t)&&bi(t),a=mr(t),o=lr(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Yn(t)!==`body`||Kr(a))&&(s=yi(t)),Qn(t)?(c=lr(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Ur(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function Si(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function Ci(e){var t=Si(e);return Jn.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function wi(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function Ti(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var Ei={placement:`bottom`,modifiers:[],strategy:`absolute`};function Di(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function Oi(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Ei:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},Ei,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:Zn(e)?Jr(e):e.contextElement?Jr(e.contextElement):[],popper:Jr(t)};var s=Ci(Ti([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(Di(t,n)){i.rects={reference:xi(t,vr(n),i.options.strategy===`fixed`),popper:ur(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r{i||o(Ni(r)||document.body)},[r,i]),h(()=>{if(a&&!i)return Gt(t,a),()=>{Gt(t,null)}},[t,a,i]),i){if(G.isValidElement(n)){let e={ref:s};return G.cloneElement(n,e)}return n}return a&&Mi.createPortal(n,a)});function Fi(e){return U(`MuiPopper`,e)}z(`MuiPopper`,[`root`]);function Ii(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function Li(e){return typeof e==`function`?e():e}function Ri(e){return e.nodeType!==void 0}var zi=e=>{let{classes:t}=e;return g({root:[`root`]},Fi,t)},Bi={},Vi=G.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:m,ownerState:g,..._}=e,v=G.useRef(null),y=p(v,t),b=G.useRef(null),x=p(b,u),S=G.useRef(x);h(()=>{S.current=x},[x]),G.useImperativeHandle(u,()=>b.current,[]);let C=Ii(c,i),[w,T]=G.useState(C),E=G.useMemo(()=>Li(n),[n]);G.useEffect(()=>{b.current&&b.current.forceUpdate()}),h(()=>{if(!E||!s)return;let e=e=>{T(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=ki(E,v.current,{placement:C,...l,modifiers:t});S.current(n);let r=v.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();S.current(null)}},[E,a,o,s,l,C]);let D={placement:w};m!==null&&(D.TransitionProps=m);let O=zi(e),k=f.root??`div`,A=Ai({elementType:k,externalSlotProps:d.root,externalForwardedProps:_,additionalProps:{role:`tooltip`,ref:y},ownerState:e,className:O.root});return(0,W.jsx)(k,{...A,children:typeof r==`function`?r(D):r})}),Hi=m(G.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=Bi,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=G.useState(!0),b=()=>{y(!1)},x=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let S;if(i)S=i;else if(n){let e=Li(n);S=e&&Ri(e)?Ue(e).body:Ue(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,w=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,W.jsx)(Pi,{disablePortal:o,container:S,children:(0,W.jsx)(Vi,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:C,...p},TransitionProps:w,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),Ui=G.forwardRef(function(e,t){let n=Ie(),{anchorEl:r,component:i,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,slots:m,slotProps:h,...g}=x({props:e,name:`MuiPopper`}),_={anchorEl:r,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,...g};return(0,W.jsx)(Hi,{as:i,direction:n?`rtl`:`ltr`,slots:m,slotProps:h,..._,ref:t})});function Wi(e){return U(`MuiListSubheader`,e)}z(`MuiListSubheader`,[`root`,`colorPrimary`,`colorInherit`,`gutters`,`inset`,`sticky`]);var Gi=e=>{let{classes:t,color:n,disableGutters:r,inset:i,disableSticky:a}=e,o={root:[`root`,n!=="default"&&`color${y(n)}`,!r&&`gutters`,i&&`inset`,!a&&`sticky`]};return g(o,Wi,t)},Ki=m(`li`,{name:`MuiListSubheader`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${y(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(d(({theme:e})=>({boxSizing:`border-box`,lineHeight:`48px`,listStyle:`none`,color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:`primary`},style:{color:(e.vars||e).palette.primary.main}},{props:{color:`inherit`},style:{color:`inherit`}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:`sticky`,top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),qi=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiListSubheader`}),{className:r,color:i=`default`,component:a=`li`,disableGutters:o=!1,disableSticky:s=!1,inset:c=!1,...l}=n,u={...n,color:i,component:a,disableGutters:o,disableSticky:s,inset:c},d=Gi(u);return(0,W.jsx)(Ki,{as:a,className:V(d.root,r),ref:t,ownerState:u,...l})}),Ji=T((0,W.jsx)(`path`,{d:`M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z`}),`Cancel`);function Yi(e){return U(`MuiChip`,e)}var Xi=z(`MuiChip`,[`root`,`sizeSmall`,`sizeMedium`,`colorDefault`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`disabled`,`clickable`,`deletable`,`outlined`,`filled`,`avatar`,`icon`,`label`,`deleteIcon`,`focusVisible`]),Zi=e=>{let{classes:t,disabled:n,size:r,color:i,onDelete:a,clickable:o,variant:s}=e,c={root:[`root`,s,n&&`disabled`,`size${y(r)}`,`color${y(i)}`,o&&`clickable`,a&&`deletable`],label:[`label`],avatar:[`avatar`],icon:[`icon`],deleteIcon:[`deleteIcon`]};return g(c,Yi,t)},Qi=m(`div`,{name:`MuiChip`,slot:`Root`,shouldForwardProp:e=>_(e)&&e!==`focusableWhenDisabled`&&e!==`skipFocusWhenDisabled`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{color:r,clickable:i,onDelete:a,size:o,variant:s}=n;return[{[`& .${Xi.avatar}`]:t.avatar},{[`& .${Xi.icon}`]:t.icon},{[`& .${Xi.deleteIcon}`]:t.deleteIcon},t.root,t[`size${y(o)}`],t[`color${y(r)}`],i&&t.clickable,a&&t.deletable,t[s]]}})(d(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:`100%`,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:`inline-flex`,alignItems:`center`,justifyContent:`center`,height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:`nowrap`,...ce(e,[`background-color`,`box-shadow`]),cursor:`unset`,outline:0,textDecoration:`none`,border:0,padding:0,verticalAlign:`middle`,boxSizing:`border-box`,[`&.${Xi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`& .${Xi.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Xi.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Xi.deleteIcon}`]:{WebkitTapHighlightColor:`transparent`,color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:`pointer`,margin:`0 5px 0 -6px`,"&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{color:`primary`},style:{[`& .${Xi.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:`secondary`},style:{[`& .${Xi.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:`small`},style:{height:24,[`& .${Xi.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Xi.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Xi.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(F([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${Xi.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${Xi.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&e.color!=="default",style:{[`& .${Xi.icon}`]:{color:`inherit`}}},{props:{onDelete:!0},style:{[`&.${Xi.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(F([`dark`])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${Xi.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:`none`,WebkitTapHighlightColor:`transparent`,cursor:`pointer`,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${Xi.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(F([`dark`])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${Xi.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:`outlined`},style:{backgroundColor:`transparent`,border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode===`light`?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Xi.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Xi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Xi.avatar}`]:{marginLeft:4},[`& .${Xi.icon}`]:{marginLeft:4},[`& .${Xi.deleteIcon}`]:{marginRight:5}}},{props:{size:`small`,variant:`outlined`},style:{[`& .${Xi.avatar}`]:{marginLeft:2},[`& .${Xi.icon}`]:{marginLeft:2},[`& .${Xi.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(F()).map(([t])=>({props:{variant:`outlined`,color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${Xi.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Xi.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Xi.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),$i=m(`span`,{name:`MuiChip`,slot:`Label`})({overflow:`hidden`,textOverflow:`ellipsis`,paddingLeft:12,paddingRight:12,whiteSpace:`nowrap`,variants:[{props:{variant:`outlined`},style:{paddingLeft:11,paddingRight:11}},{props:{size:`small`},style:{paddingLeft:8,paddingRight:8}},{props:{size:`small`,variant:`outlined`},style:{paddingLeft:7,paddingRight:7}}]});function ea(e){return e.key===`Backspace`||e.key===`Delete`}var ta=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiChip`}),{avatar:r,className:i,clickable:a,color:o=`default`,component:s,deleteIcon:c,disabled:l=!1,icon:u,label:d,onClick:f,onDelete:p,onKeyDown:m,onKeyUp:h,size:g=`medium`,variant:_=`filled`,tabIndex:y,skipFocusWhenDisabled:b=!1,slots:S={},slotProps:C={},...w}=n,{nativeButton:T,...E}=w,D=G.useRef(null),O=v(D,t),k=e=>{e.stopPropagation(),p(e)},A=e=>{e.currentTarget===e.target&&ea(e)&&e.preventDefault(),m&&m(e)},j=e=>{e.currentTarget===e.target&&p&&ea(e)&&p(e),h&&h(e)},M=a!==!1&&f?!0:a,N=M||p?le:s||`div`,P={...n,component:N,disabled:l,size:g,color:o,iconColor:G.isValidElement(u)&&u.props.color||o,onDelete:!!p,clickable:M,variant:_},ee=Zi(P),F=N===le?{component:s||`div`,internalNativeButton:!1,focusVisibleClassName:ee.focusVisible,...p&&{disableRipple:!0},...T!==void 0&&{nativeButton:T}}:{},I=null;p&&(I=c&&G.isValidElement(c)?G.cloneElement(c,{className:V(c.props.className,ee.deleteIcon),onClick:k}):(0,W.jsx)(Ji,{className:ee.deleteIcon,onClick:k}));let L=null;r&&G.isValidElement(r)&&(L=G.cloneElement(r,{className:V(ee.avatar,r.props.className)}));let R=null;u&&G.isValidElement(u)&&(R=G.cloneElement(u,{className:V(ee.icon,u.props.className)}));let z={slots:S,slotProps:C},[te,ne]=B(`root`,{elementType:Qi,externalForwardedProps:{...z,...E},ownerState:P,shouldForwardComponentProp:!0,ref:O,className:V(ee.root,i),additionalProps:{disabled:M&&l?!0:void 0,tabIndex:b&&l?-1:y,...F},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),A(t)},onKeyUp:t=>{e.onKeyUp?.(t),j(t)}})}),[re,ie]=B(`label`,{elementType:$i,externalForwardedProps:z,ownerState:P,className:ee.label});return(0,W.jsxs)(te,{as:N,...ne,children:[L||R,(0,W.jsx)(re,{...ie,children:d}),I]})}),na=T((0,W.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),ra,ia,aa=e=>{let{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:a,hasClearIcon:o,hasPopupIcon:s,inputFocused:c,popupOpen:l,size:u}=e,d={root:[`root`,r&&`expanded`,i&&`focused`,a&&`fullWidth`,o&&`hasClearIcon`,s&&`hasPopupIcon`],inputRoot:[`inputRoot`],input:[`input`,c&&`inputFocused`],tag:[`tag`,`tagSize${y(u)}`],endAdornment:[`endAdornment`],clearIndicator:[`clearIndicator`],popupIndicator:[`popupIndicator`,l&&`popupIndicatorOpen`],popper:[`popper`,n&&`popperDisablePortal`],paper:[`paper`],listbox:[`listbox`],loading:[`loading`],noOptions:[`noOptions`],status:[`status`],option:[`option`],groupLabel:[`groupLabel`],groupUl:[`groupUl`]};return g(d,Re,t)},oa=m(`div`,{name:`MuiAutocomplete`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:a,inputFocused:o,size:s}=n;return[{[`& .${ze.tag}`]:t.tag},{[`& .${ze.tag}`]:t[`tagSize${y(s)}`]},{[`& .${ze.inputRoot}`]:t.inputRoot},{[`& .${ze.input}`]:t.input},{[`& .${ze.input}`]:o&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${ze.focused} .${ze.clearIndicator}`]:{visibility:`visible`},"@media (pointer: fine)":{[`&:hover .${ze.clearIndicator}`]:{visibility:`visible`}},[`& .${ze.tag}`]:{margin:3,maxWidth:`calc(100% - 6px)`},[`& .${ze.inputRoot}`]:{[`.${ze.hasPopupIcon}&, .${ze.hasClearIcon}&`]:{paddingRight:30},[`.${ze.hasPopupIcon}.${ze.hasClearIcon}&`]:{paddingRight:56},[`& .${ze.input}`]:{width:0,minWidth:30}},[`& .${kt.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:`4px 4px 4px 0px`}},[`& .${kt.root}.${lt.sizeSmall}`]:{[`& .${kt.input}`]:{padding:`2px 4px 3px 0`}},[`& .${Ft.root}`]:{padding:9,[`.${ze.hasPopupIcon}&, .${ze.hasClearIcon}&`]:{paddingRight:39},[`.${ze.hasPopupIcon}.${ze.hasClearIcon}&`]:{paddingRight:65},[`& .${ze.input}`]:{padding:`7.5px 4px 7.5px 5px`},[`& .${ze.endAdornment}`]:{right:9}},[`& .${Ft.root}.${lt.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${ze.input}`]:{padding:`2.5px 4px 2.5px 8px`}},[`& .${xt.root}`]:{paddingTop:19,paddingLeft:8,[`.${ze.hasPopupIcon}&, .${ze.hasClearIcon}&`]:{paddingRight:39},[`.${ze.hasPopupIcon}.${ze.hasClearIcon}&`]:{paddingRight:65},[`& .${xt.input}`]:{padding:`7px 4px`},[`& .${ze.endAdornment}`]:{right:9}},[`& .${xt.root}.${lt.sizeSmall}`]:{paddingBottom:1,[`& .${xt.input}`]:{padding:`2.5px 4px`}},[`& .${lt.hiddenLabel}`]:{paddingTop:8},[`& .${xt.root}.${lt.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${ze.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${xt.root}.${lt.hiddenLabel}.${lt.sizeSmall}`]:{[`& .${ze.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${ze.input}`]:{flexGrow:1,textOverflow:`ellipsis`,opacity:0},variants:[{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{[`& .${ze.tag}`]:{margin:2,maxWidth:`calc(100% - 4px)`}}},{props:{inputFocused:!0},style:{[`& .${ze.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${ze.inputRoot}`]:{flexWrap:`wrap`}}}]}),sa=m(`div`,{name:`MuiAutocomplete`,slot:`EndAdornment`})({position:`absolute`,right:0,top:`50%`,transform:`translate(0, -50%)`}),ca=m(N,{name:`MuiAutocomplete`,slot:`ClearIndicator`})({marginRight:-2,padding:4,visibility:`hidden`}),la=m(N,{name:`MuiAutocomplete`,slot:`PopupIndicator`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:`rotate(180deg)`}}]}),ua=m(Ui,{name:`MuiAutocomplete`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${ze.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(d(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:`absolute`}}]}))),da=m(de,{name:`MuiAutocomplete`,slot:`Paper`})(d(({theme:e})=>({...e.typography.body1,overflow:`auto`}))),fa=m(`div`,{name:`MuiAutocomplete`,slot:`Loading`})(d(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),pa=m(`div`,{name:`MuiAutocomplete`,slot:`Status`})({}),ma=m(`div`,{name:`MuiAutocomplete`,slot:`NoOptions`})(d(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),ha=m(`ul`,{name:`MuiAutocomplete`,slot:`Listbox`})(d(({theme:e})=>({listStyle:`none`,margin:0,padding:`8px 0`,maxHeight:`40vh`,overflow:`auto`,isolation:`isolate`,position:`relative`,[`& .${ze.option}`]:{minHeight:48,display:`flex`,overflow:`hidden`,justifyContent:`flex-start`,alignItems:`center`,cursor:`pointer`,paddingTop:6,boxSizing:`border-box`,outline:`0`,WebkitTapHighlightColor:`transparent`,paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up(`sm`)]:{minHeight:`auto`},[`&.${ze.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`&.${ze.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${ze.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${ze.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),ga=m(qi,{name:`MuiAutocomplete`,slot:`GroupLabel`})(d(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),_a=m(`ul`,{name:`MuiAutocomplete`,slot:`GroupUl`})({padding:0,[`& .${ze.option}`]:{paddingLeft:24}}),va=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiAutocomplete`}),{autoComplete:r=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,className:s,clearIcon:c=ra||=(0,W.jsx)(hn,{fontSize:`small`}),clearOnBlur:l=!n.freeSolo,clearOnEscape:u=!1,clearText:d=`Clear`,closeText:f=`Close`,defaultValue:p=n.multiple?[]:null,disableClearable:m=!1,disableCloseOnSelect:g=!1,disabled:_=!1,disabledItemsFocusable:v=!1,disableListWrap:y=!1,disablePortal:b=!1,filterOptions:S,filterSelectedOptions:C=!1,forcePopupIcon:w=`auto`,freeSolo:T=!1,fullWidth:E=!1,getLimitTagsText:D=e=>`+${e}`,getOptionDisabled:O,getOptionKey:k,getOptionLabel:A,isOptionEqualToValue:j,groupBy:M,handleHomeEndKeys:N=!n.freeSolo,id:P,includeInputInList:ee=!1,inputValue:F,limitTags:I=-1,loading:L=!1,loadingText:R=`Loading…`,multiple:z=!1,noOptionsText:te=`No options`,onChange:ne,onClose:re,onHighlightChange:ie,onInputChange:ae,onOpen:oe,open:se,openOnFocus:ce=!1,openText:le=`Open`,options:ue,popupIcon:fe=ia||=(0,W.jsx)(na,{}),readOnly:pe=!1,renderGroup:V,renderInput:me,renderOption:he,renderValue:ge,resetHighlightOnMouseLeave:H=!1,selectOnFocus:_e=!n.freeSolo,size:ve=`medium`,slots:ye={},slotProps:be={},value:xe,...Se}=n,{getRootProps:U,getInputProps:Ce,getInputLabelProps:we,getPopupIndicatorProps:Te,getClearProps:Ee,getItemProps:De,getListboxProps:Oe,getOptionProps:ke,value:Ae,dirty:je,expanded:Me,id:Ne,popupOpen:Pe,focused:Fe,focusedItem:Ie,anchorEl:Le,setAnchorEl:Re,inputValue:ze,groupedOptions:Be}=Fn({...n,componentName:`Autocomplete`}),Ve=Cn();G.useEffect(()=>{if(!Pe||!Le||typeof ResizeObserver>`u`)return;let e=Le.clientWidth,t=new ResizeObserver(()=>{let t=Le.clientWidth;e!==t&&(e=t,Ve())});return t.observe(Le),()=>{t.disconnect()}},[Pe,Le,Ve]);let He=G.useRef([]),Ue=G.useRef(!1),We=Pe?Be:He.current;h(()=>{Pe&&!Ue.current&&(He.current=[]),Ue.current=Pe,Pe&&Be.length>0&&(He.current=Be)},[Pe,Be]);let Ge=!m&&!_&&je&&!pe,Ke=(!T||w===!0)&&w!==!1,{onMouseDown:qe}=Ce(),Je=A||(e=>e.label??e),Ye={...n,disablePortal:b,expanded:Me,focused:Fe,fullWidth:E,getOptionLabel:Je,hasClearIcon:Ge,hasPopupIcon:Ke,inputFocused:Ie===-1,popupOpen:Pe,size:ve},Xe=aa(Ye),Ze={slots:ye,slotProps:be},[Qe,$e]=B(`root`,{ref:t,className:[Xe.root,s],elementType:oa,externalForwardedProps:{...Ze,...Se},getSlotProps:U,ownerState:Ye}),[et,tt]=B(`listbox`,{elementType:ha,externalForwardedProps:Ze,ownerState:Ye,className:Xe.listbox,getSlotProps:Oe}),[nt,rt]=B(`paper`,{elementType:de,externalForwardedProps:Ze,ownerState:Ye,className:Xe.paper}),[it,at]=B(`status`,{elementType:pa,externalForwardedProps:Ze,ownerState:Ye,className:Xe.status,additionalProps:{role:`status`,"aria-live":`polite`,"aria-atomic":`true`}}),[ot,st]=B(`popper`,{elementType:Ui,externalForwardedProps:Ze,ownerState:Ye,className:Xe.popper,additionalProps:{disablePortal:b,style:{width:Le?Le.clientWidth:null,pointerEvents:Pe?void 0:`none`},role:`presentation`,anchorEl:Le,open:Pe}}),ct=We.length>0||L||!T||st.keepMounted===!0,[lt,ut]=B(`clearIndicator`,{elementType:ca,externalForwardedProps:Ze,ownerState:Ye,className:Xe.clearIndicator,shouldForwardComponentProp:!0,additionalProps:{...Ee(),"aria-label":d,title:d}}),[dt,ft]=B(`popupIndicator`,{elementType:la,externalForwardedProps:Ze,ownerState:Ye,className:Xe.popupIndicator,shouldForwardComponentProp:!0,additionalProps:{...Te(),disabled:_,"aria-label":Pe?f:le,title:Pe?f:le}}),pt,mt=e=>({className:Xe.tag,disabled:_,...De(e)});if(z?Ae.length>0&&(pt=ge?ge(Ae,mt,Ye):Ae.map((e,t)=>{let{key:n,...r}=mt({index:t});return(0,W.jsx)(ta,{label:Je(e),size:ve,...r,...Ze.slotProps.chip},n)})):ge&&Ae!=null&&(pt=ge(Ae,mt,Ye)),I>-1&&Array.isArray(pt)){let e=pt.length-I;!Fe&&e>0&&(pt=pt.splice(0,I),pt.push((0,W.jsx)(`span`,{className:Xe.tag,children:D(e)},pt.length)))}let ht=V||(e=>(0,W.jsxs)(`li`,{children:[(0,W.jsx)(ga,{className:Xe.groupLabel,ownerState:Ye,component:`div`,children:e.group}),(0,W.jsx)(_a,{className:Xe.groupUl,ownerState:Ye,children:e.children})]},e.key)),gt=he||((e,t)=>{let{key:n,...r}=e;return(0,W.jsx)(`li`,{...r,children:Je(t)},n)}),_t=(e,t)=>{let n=ke({option:e,index:t});return gt({...n,className:Xe.option},e,{selected:n[`aria-selected`],index:t,inputValue:ze},Ye)};return(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(Qe,{...$e,children:me({id:Ne,disabled:_,fullWidth:n.fullWidth??!0,size:ve===`small`?`small`:void 0,slotProps:{inputLabel:we(),input:{ref:Re,className:Xe.inputRoot,startAdornment:pt,onMouseDown:e=>{e.target===e.currentTarget&&qe(e)},...(Ge||Ke)&&{endAdornment:(0,W.jsxs)(sa,{className:Xe.endAdornment,ownerState:Ye,children:[Ge?(0,W.jsx)(lt,{...ut,children:c}):null,Ke?(0,W.jsx)(dt,{...ft,children:fe}):null]})}},htmlInput:{className:Xe.input,disabled:_,readOnly:pe,...Ce()}}})}),Le&&ct?(0,W.jsx)(ua,{as:ot,...st,children:(0,W.jsxs)(da,{as:nt,...rt,children:[(0,W.jsxs)(it,{...at,children:[L&&We.length===0?(0,W.jsx)(fa,{className:Xe.loading,ownerState:Ye,children:R}):null,We.length===0&&!T&&!L?(0,W.jsx)(ma,{className:Xe.noOptions,ownerState:Ye,onMouseDown:e=>{e.preventDefault()},children:te}):null]}),We.length>0?(0,W.jsx)(et,{...tt,children:We.map((e,t)=>M?ht({key:e.key,group:e.group,children:e.options.map((t,n)=>_t(t,e.index+n))}):_t(e,t))}):null]})}):null]})}),ya={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},ba={opacity:0,visibility:`hidden`},xa=G.forwardRef(function(e,t){let n=ke(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,disablePrefersReducedMotion:c=!1,easing:u,in:d,onEnter:f,onEntered:p,onEntering:m,onExit:h,onExited:g,onExiting:_,style:y,timeout:x=r,...S}=e,C=ee(n.motion.reducedMotion,c),w=G.useRef(null),T=v(w,ji(s),t),E=o(w,m),D=o(w,(e,t)=>{C.shouldReduceMotion||se(e);let r=b({style:y,timeout:x,easing:u},{mode:`enter`}),i=C.getTransitionTiming({duration:r.duration,delay:r.delay});e.style.transition=n.transitions.create(`opacity`,{duration:i.duration,easing:r.easing,delay:i.delay}),f&&f(e,t)}),O=o(w,p),k=o(w,_),A=o(w,e=>{let t=b({style:y,timeout:x,easing:u},{mode:`exit`}),r=C.getTransitionTiming({duration:t.duration,delay:t.delay});e.style.transition=n.transitions.create(`opacity`,{duration:r.duration,easing:t.easing,delay:r.delay}),h&&h(e)}),j=o(w,e=>{e.style.transition=``,g&&g(e)});return(0,W.jsx)(en,{appear:a,in:d,nodeRef:w,onEnter:D,onEntered:O,onEntering:E,onExit:A,onExited:j,onExiting:k,addEndListener:i?e=>{i(w.current,e)}:void 0,reduceMotion:C.shouldReduceMotion,timeout:x,...S,children:(e,{ownerState:t,...n})=>{let r=l(e,d,ya,ba,y,s.props.style);return G.cloneElement(s,{style:r,ref:T,...n})}})});function Sa(e){return U(`MuiBackdrop`,e)}z(`MuiBackdrop`,[`root`,`invisible`]);var Ca=e=>{let{classes:t,invisible:n}=e;return g({root:[`root`,n&&`invisible`]},Sa,t)},wa=m(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),Ta=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,slotProps:c={},slots:l={},transitionDuration:u,...d}=n,f={...n,component:a,invisible:o},p=Ca(f),m={component:a,slots:l,slotProps:c},[h,g]=B(`root`,{elementType:wa,externalForwardedProps:m,className:V(p.root,i),ownerState:f}),[_,v]=B(`transition`,{elementType:xa,externalForwardedProps:m,ownerState:f});return(0,W.jsx)(_,{in:s,timeout:u,...d,...v,children:(0,W.jsx)(h,{...g,ref:t,children:r})})});function Ea(e){let{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,a=Tn({badgeContent:t,max:r}),o=n;n===!1&&t===0&&!i&&(o=!0);let{badgeContent:s,max:c=r}=o?a:e,l=s&&Number(s)>c?`${c}+`:s;return{badgeContent:s,invisible:o,max:c,displayValue:l}}function Da(e){return U(`MuiBadge`,e)}var Oa=z(`MuiBadge`,[`root`,`badge`,`dot`,`standard`,`anchorOriginTopRight`,`anchorOriginBottomRight`,`anchorOriginTopLeft`,`anchorOriginBottomLeft`,`invisible`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`overlapRectangular`,`overlapCircular`,`anchorOriginTopLeftCircular`,`anchorOriginTopLeftRectangular`,`anchorOriginTopRightCircular`,`anchorOriginTopRightRectangular`,`anchorOriginBottomLeftCircular`,`anchorOriginBottomLeftRectangular`,`anchorOriginBottomRightCircular`,`anchorOriginBottomRightRectangular`]),ka=10,Aa=4,ja=e=>{let{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:a,classes:o={}}=e,s={root:[`root`],badge:[`badge`,a,r&&`invisible`,`anchorOrigin${y(n.vertical)}${y(n.horizontal)}`,`anchorOrigin${y(n.vertical)}${y(n.horizontal)}${y(i)}`,`overlap${y(i)}`,t!=="default"&&`color${y(t)}`]};return g(s,Da,o)},Ma=m(`span`,{name:`MuiBadge`,slot:`Root`})({position:`relative`,display:`inline-flex`,verticalAlign:`middle`,flexShrink:0}),Na=m(`span`,{name:`MuiBadge`,slot:`Badge`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${y(n.anchorOrigin.vertical)}${y(n.anchorOrigin.horizontal)}${y(n.overlap)}`],n.color!=="default"&&t[`color${y(n.color)}`],n.invisible&&t.invisible]}})(d(({theme:e})=>({display:`flex`,flexDirection:`row`,flexWrap:`wrap`,justifyContent:`center`,alignContent:`center`,alignItems:`center`,position:`absolute`,boxSizing:`border-box`,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:`0 6px`,height:20,borderRadius:ka,zIndex:1,"@media (forced-colors: active)":{border:`1px solid ButtonBorder`},...ce(e,`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(F([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:`dot`},style:{borderRadius:Aa,height:8,minWidth:8,padding:0}},{props:{invisible:!0},style:{...ce(e,`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}},{style:{inset:`var(--Badge-inset)`,transform:`scale(1) translate(var(--Badge-translate))`,transformOrigin:`var(--Badge-origin)`,[`&.${Oa.invisible}`]:{transform:`scale(0) translate(var(--Badge-translate))`}}}]})));function Pa(e){return{vertical:e?.vertical??`top`,horizontal:e?.horizontal??`right`}}var Fa=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiBadge`}),{anchorOrigin:r,className:i,classes:a,component:o,children:s,overlap:c=`rectangular`,color:l=`default`,invisible:u=!1,max:d=99,badgeContent:f,slots:p,slotProps:m,showZero:h=!1,variant:g=`standard`,..._}=n,{badgeContent:v,invisible:y,max:b,displayValue:S}=Ea({max:d,invisible:u,badgeContent:f,showZero:h}),C=Tn({anchorOrigin:Pa(r),color:l,overlap:c,variant:g,badgeContent:f}),w=y||v==null&&g!==`dot`,{color:T=l,overlap:E=c,anchorOrigin:D,variant:O=g}=w?C:n,k=Pa(D),A=O===`dot`?void 0:S,j={...n,badgeContent:v,invisible:w,max:b,displayValue:A,showZero:h,anchorOrigin:k,color:T,overlap:E,variant:O},M=ja(j),N={slots:p,slotProps:m},[P,ee]=B(`root`,{elementType:Ma,externalForwardedProps:{...N,..._},ownerState:j,className:V(M.root,i),ref:t,additionalProps:{as:o}}),{vertical:F,horizontal:I}=k,L=E===`circular`?`14%`:`0`,R=F===`top`?L:`auto`,z=F===`bottom`?L:`auto`,te=I===`right`?L:`auto`,ne=I===`left`?L:`auto`,[re,ie]=B(`badge`,{elementType:Na,externalForwardedProps:N,ownerState:j,className:M.badge,additionalProps:{"aria-hidden":!0,style:{"--Badge-translate":`${I===`right`?`50%`:`-50%`}, ${F===`top`?`-50%`:`50%`}`,"--Badge-inset":`${R} ${te} ${z} ${ne}`,"--Badge-origin":`${I===`right`?`100%`:`0%`} ${F===`top`?`0%`:`100%`}`}}});return(0,W.jsxs)(P,{...ee,children:[s,(0,W.jsx)(re,{...ie,children:A})]})}),Ia=z(`MuiBox`,[`root`]),La=O(),Ra=Pe({themeId:fe,defaultTheme:La,defaultClassName:Ia.root,generateClassName:ye.generate});function za(e){return U(`MuiButton`,e)}var Ba=z(`MuiButton`,`root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),Va=G.createContext({}),Ha=G.createContext(void 0),Ua=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l={root:[`root`,o&&`loading`,a,`size${y(i)}`,`color${y(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${y(s)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},u=g(l,za,c);return{...c,...u}},Wa=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Ga=m(le,{shouldForwardProp:e=>_(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${y(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(d(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,...ce(e,[`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${Ba.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Ba.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Ba.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${Ba.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${Ba.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${Ba.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{...ce(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${Ba.loading}`]:{color:`transparent`}}}]}})),Ka=m(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:`inherit`,alignItems:`center`,marginRight:8,marginLeft:-4,"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`},variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{...ce(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...Wa]})),qa=m(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{...ce(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Wa]})),Ja=m(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),Ya=m(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),Xa=G.forwardRef(function(e,t){let n=G.useContext(Va),r=G.useContext(Ha),i=j(n,e),a=x({props:i,name:`MuiButton`}),{children:o,color:s=`primary`,component:c=`button`,className:l,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:f=!1,endIcon:p,focusVisibleClassName:m,fullWidth:h=!1,id:g,loading:_=null,loadingIndicator:v,loadingPosition:y=`center`,size:b=`medium`,startIcon:S,type:C,variant:w=`text`,...T}=a,E=Ee(g),D=v??(0,W.jsx)(be,{"aria-labelledby":E,color:`inherit`,size:16}),O={...a,color:s,component:c,disabled:u,disableElevation:d,disableFocusRipple:f,fullWidth:h,loading:_,loadingIndicator:D,loadingPosition:y,size:b,type:C,variant:w},k=Ua(O),A=(S||_&&y===`start`)&&(0,W.jsx)(Ka,{className:k.startIcon,ownerState:O,children:S||(0,W.jsx)(Ya,{className:k.loadingIconPlaceholder,ownerState:O})}),M=(p||_&&y===`end`)&&(0,W.jsx)(qa,{className:k.endIcon,ownerState:O,children:p||(0,W.jsx)(Ya,{className:k.loadingIconPlaceholder,ownerState:O})}),N=r||``,P=typeof _==`boolean`?(0,W.jsx)(`span`,{className:k.loadingWrapper,style:{display:`contents`},children:_&&(0,W.jsx)(Ja,{className:k.loadingIndicator,ownerState:O,children:D})}):null,{root:ee,...F}=k;return(0,W.jsxs)(Ga,{ownerState:O,className:V(n.className,k.root,l,N),component:c,disabled:u||_,focusRipple:!f,focusVisibleClassName:V(k.focusVisible,m),ref:t,internalNativeButton:!0,type:C,id:_?E:g,...T,classes:F,children:[A,y!==`end`&&P,o,y===`end`&&P,M]})});function Za(e){return U(`PrivateSwitchBase`,e)}z(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var Qa=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e,a={root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${y(i)}`],input:[`input`]};return g(a,Za,t)},$a=m(le,{name:`MuiSwitchBase`})({padding:9,borderRadius:`50%`,variants:[{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e===`start`&&t.size!==`small`,style:{marginLeft:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e===`end`&&t.size!==`small`,style:{marginRight:-12}}]}),eo=m(`input`,{name:`MuiSwitchBase`,shouldForwardProp:_})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),to=G.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:i,defaultChecked:a,disabled:o,disableFocusRipple:s=!1,edge:c=!1,icon:l,id:u,name:d,onBlur:f,onChange:p,onFocus:m,readOnly:h,required:g=!1,tabIndex:_,type:v,value:y,slots:b={},slotProps:x={},...S}=e,{nativeButton:C,...w}=S,[T,E]=qt({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),D=Ze(),O=e=>{m&&m(e),D&&D.onFocus&&D.onFocus(e)},k=e=>{f&&f(e),D&&D.onBlur&&D.onBlur(e)},A=e=>{if(e.nativeEvent.defaultPrevented||h)return;let t=e.target.checked;E(t),p&&p(e,t)},j=o;D&&j===void 0&&(j=D.disabled);let M=v===`checkbox`||v===`radio`,N={...e,checked:T,disabled:j,disableFocusRipple:s,edge:c},P=Qa(N),ee={slots:b,slotProps:x},[F,I]=B(`root`,{ref:t,elementType:$a,className:P.root,shouldForwardComponentProp:!0,externalForwardedProps:{...ee,component:`span`,...w},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),O(t)},onBlur:t=>{e.onBlur?.(t),k(t)}}),ownerState:N,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[L,R]=B(`input`,{elementType:eo,className:P.input,externalForwardedProps:ee,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),A(t)}}),ownerState:N,additionalProps:{autoFocus:n,checked:r,defaultChecked:a,disabled:j,id:M?u:void 0,name:d,readOnly:h,required:g,tabIndex:_,type:v,...v===`checkbox`&&y===void 0?{}:{value:y}}});return(0,W.jsxs)(F,{...I,children:[(0,W.jsx)(L,{...R}),T?i:l]})}),no=T((0,W.jsx)(`path`,{d:`M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z`}),`CheckBoxOutlineBlank`),ro=T((0,W.jsx)(`path`,{d:`M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z`}),`CheckBox`),io=T((0,W.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z`}),`IndeterminateCheckBox`),ao=e=>{let{classes:t,indeterminate:n,color:r,size:i}=e,a={root:[`root`,n&&`indeterminate`,`color${y(r)}`,`size${y(i)}`]},o=g(a,Be,t);return{...t,...o}},oo=m(to,{shouldForwardProp:e=>_(e)||e===`classes`,name:`MuiCheckbox`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${y(n.size)}`],n.color!=="default"&&t[`color${y(n.color)}`]]}})(d(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:`default`,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t},style:{[`&.${Ve.checked}, &.${Ve.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Ve.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),so=(0,W.jsx)(ro,{}),co=(0,W.jsx)(no,{}),lo=(0,W.jsx)(io,{}),uo=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiCheckbox`}),{checkedIcon:r=so,color:i=`primary`,icon:a=co,indeterminate:o=!1,indeterminateIcon:s=lo,size:c=`medium`,disableRipple:l=!1,className:u,slots:d={},slotProps:f={},...p}=n,m=o?s:a,h=o?s:r,g={...n,disableRipple:l,color:i,indeterminate:o,size:c},_=ao(g),v=f.input,[y,b]=B(`root`,{ref:t,elementType:oo,className:V(_.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:d,slotProps:f,...p},ownerState:g,additionalProps:{type:`checkbox`,icon:G.cloneElement(m,{fontSize:m.props.fontSize??c}),checkedIcon:G.cloneElement(h,{fontSize:h.props.fontSize??c}),disableRipple:n.disableRipple,slots:d,slotProps:{input:Jt(typeof v==`function`?v(g):v,{"data-indeterminate":o,"aria-checked":o?`mixed`:void 0})}}});return(0,W.jsx)(y,{...b,classes:_})});function fo(e){return e.substring(2).toLowerCase()}function po(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);let u=p(ji(t),s),d=D(e=>{let t=l.current;l.current=!1;let r=Ue(s.current);if(!c.current||!s.current||`clientX`in e&&po(e,r))return;if(o.current){o.current=!1;return}let a;a=e.composedPath?e.composedPath().includes(s.current):!wn(r.documentElement,e.target)||wn(s.current,e.target),!a&&(n||!t)&&i(e)}),f=e=>n=>{l.current=!0;let r=t.props[e];r&&r(n)},m={ref:u};return a!==!1&&(m[a]=f(a)),G.useEffect(()=>{if(a!==!1){let e=fo(a),t=Ue(s.current),n=()=>{o.current=!0};return t.addEventListener(e,d),t.addEventListener(`touchmove`,n),()=>{t.removeEventListener(e,d),t.removeEventListener(`touchmove`,n)}}},[d,a]),r!==!1&&(m[r]=f(r)),G.useEffect(()=>{if(r!==!1){let e=fo(r),t=Ue(s.current);return t.addEventListener(e,d),()=>{t.removeEventListener(e,d)}}},[d,r]),G.cloneElement(t,m)}function ho(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function go(e){let t=Ue(e);return e===t.body||e===t.documentElement?We(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function _o(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function vo(e){return parseFloat(We(e).getComputedStyle(e).paddingRight)||0}function yo(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function bo(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!yo(e);t&&n&&_o(e,i)})}function xo(e,t){let n=[],r=e.container;if(!t.disableScrollLock){let e;if(r.parentNode instanceof DocumentFragment)e=Ue(r).body;else{let t=r.parentElement,n=We(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}if(go(e)){let t=ho(We(e));n.push({value:e.style.paddingRight,property:`padding-right`,el:e}),e.style.paddingRight=`${vo(e)+t}px`;let i=Ue(r).querySelectorAll(`.mui-fixed`);[].forEach.call(i,e=>{n.push({value:e.style.paddingRight,property:`padding-right`,el:e}),e.style.paddingRight=`${vo(e)+t}px`})}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function So(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var Co=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&_o(e.modalRef,!1);let r=So(t);bo(t,e.mount,e.modalRef,r,!0);let i=this.containers.findIndex(e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=this.containers.findIndex(t=>t.modals.includes(e)),r=this.containers[n];r.restore||=xo(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=this.containers.findIndex(t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&_o(e.modalRef,t),bo(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&_o(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},wo=wn,To=`data-mui-focusable`;function Eo(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${To}]`):null}var Do=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function Oo(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function ko(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function Ao(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||ko(e))}function jo(e){let t=[],n=[];return Array.from(e.querySelectorAll(Do)).forEach((e,r)=>{let i=Oo(e);i===-1||!Ao(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Mo(){return!0}function No(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=jo,isEnabled:o=Mo,open:s}=e,c=G.useRef(!1),l=G.useRef(null),u=G.useRef(null),d=G.useRef(null),f=G.useRef(null),m=G.useRef(!1),h=G.useRef(null),g=p(ji(t),h),_=G.useRef(null);G.useEffect(()=>{!s||!h.current||(m.current=!n)},[n,s]),G.useEffect(()=>{if(c.current=!1,!s||!h.current)return;let e=it(Ue(h.current)),t=Eo(h.current)??h.current;return wo(h.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),m.current&&t.focus()),()=>{!i&&d.current&&(c.current=!0,d.current.focus(),d.current=null)}},[s]),G.useEffect(()=>{if(!s||!h.current)return;let e=Ue(h.current),t=t=>{if(_.current=t,r||!o()||t.key!==`Tab`)return;let n=h.current,i=it(e);if(n===null)return;let s=Eo(n);if(i===n||i===s){let e=a(n);if(e.length===0)return;t.preventDefault(),t.shiftKey?e[e.length-1].focus():e[0].focus();return}if(wo(n,i)){let e=a(n),r=e.indexOf(i);if(r===-1||!e.some(e=>Oo(e)>0))return;t.preventDefault();let o=0;o=t.shiftKey?r<=0?e.length-1:r-1:r===e.length-1?0:r+1,e[o].focus()}},n=()=>{let t=h.current;if(t===null)return;let n=it(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(wo(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!m.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(h.current)),i.length>0){let e=!!(_.current?.shiftKey&&_.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=it(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let v=e=>{d.current===null&&(d.current=e.relatedTarget),m.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},y=e=>{d.current===null&&(d.current=e.relatedTarget),m.current=!0};return(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(`div`,{tabIndex:s?0:-1,onFocus:y,ref:l,"data-testid":`sentinelStart`}),G.cloneElement(t,{ref:g,onFocus:v}),(0,W.jsx)(`div`,{tabIndex:s?0:-1,onFocus:y,ref:u,"data-testid":`sentinelEnd`})]})}function Po(e){return typeof e==`function`?e():e}function Fo(e){return e?e.props.hasOwnProperty(`in`):!1}var Io=()=>{},Lo=new Co;function Ro(e){let{container:t,disableScrollLock:n=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:a,children:o,onClose:s,open:c,rootRef:l}=e,u=G.useRef({}),d=G.useRef(null),f=G.useRef(null),m=G.useRef(null),h=p(m,l),[g,_]=G.useState(!c),v=Fo(o),y=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(y=!1);let b=()=>Ue(d.current),x=()=>(u.current.modalRef=m.current,u.current.mount=d.current,u.current),S=()=>{Lo.mount(x(),{disableScrollLock:n}),m.current&&(m.current.scrollTop=0)},C=D(()=>{let e=Po(t)||b().body;Lo.add(x(),e),m.current&&S()}),w=()=>Lo.isTopModal(x()),T=D(e=>{d.current=e,e&&(f.current=e,c&&w()?S():m.current&&_o(m.current,y))}),E=G.useCallback(()=>{Lo.remove(x(),y)},[y]);G.useEffect(()=>()=>{E()},[E]),G.useEffect(()=>{c?C():(!v||!r)&&E()},[c,E,v,r,C]);let O=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!w())&&(t.stopPropagation(),s&&s(t,`escapeKeyDown`))},k=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&s&&s(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=M(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:O(r),ref:h}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:k(t),open:c}},getTransitionProps:()=>({onEnter:Vt(()=>{_(!1),i&&i()},o?.props.onEnter??Io),onExited:Vt(()=>{_(!0),a&&a(),r&&E()},o?.props.onExited??Io)}),rootRef:h,portalRef:T,portalContainer:!c&&v&&!g?f.current??t:t,isTopModal:w,exited:g,hasTransition:v}}function zo(e){return U(`MuiModal`,e)}z(`MuiModal`,[`root`,`hidden`,`backdrop`]);var Bo=e=>{let{open:t,exited:n,classes:r}=e;return g({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},zo,r)},Vo=m(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(d(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),Ho=m(Ta,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),Uo=G.forwardRef(function(e,t){let n=x({name:`MuiModal`,props:e}),{classes:r,className:i,closeAfterTransition:a=!1,children:o,container:s,component:c,disableAutoFocus:l=!1,disableEnforceFocus:u=!1,disablePortal:d=!1,disableRestoreFocus:f=!1,disableScrollLock:p=!1,hideBackdrop:m=!1,keepMounted:h=!1,onClose:g,onTransitionEnter:_,onTransitionExited:v,open:y,slotProps:b={},slots:S={},theme:C,...w}=n,T={...n,closeAfterTransition:a,disableAutoFocus:l,disableEnforceFocus:u,disablePortal:d,disableRestoreFocus:f,disableScrollLock:p,hideBackdrop:m,keepMounted:h},{getRootProps:E,getBackdropProps:D,getTransitionProps:O,portalRef:k,portalContainer:A,isTopModal:j,exited:M,hasTransition:N}=Ro({...T,rootRef:t}),P={...T,exited:M},ee=Bo(P),F={};if(o.props.tabIndex===void 0&&(F.tabIndex=`-1`),N){let{onEnter:e,onExited:t}=O();F.onEnter=e,F.onExited=t}let I={slots:S,slotProps:b},[L,R]=B(`root`,{ref:t,elementType:Vo,externalForwardedProps:{...I,...w,component:c},getSlotProps:E,ownerState:P,className:V(i,ee?.root,!P.open&&P.exited&&ee?.hidden)}),[z,te]=B(`backdrop`,{elementType:Ho,externalForwardedProps:I,shouldForwardComponentProp:!0,getSlotProps:e=>D({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:ee?.backdrop,ownerState:P});return!h&&!y&&(!N||M)?null:(0,W.jsx)(Pi,{ref:k,container:A,disablePortal:d,children:(0,W.jsxs)(L,{...R,children:[m?null:(0,W.jsx)(z,{...te}),(0,W.jsx)(No,{disableEnforceFocus:u,disableAutoFocus:l,disableRestoreFocus:f,isEnabled:j,open:y,children:G.cloneElement(o,F)})]})})});function Wo(e){return U(`MuiDialog`,e)}z(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]);var Go=G.createContext({}),Ko=m(Ta,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),qo=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e,o={root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${y(n)}`],paper:[`paper`,`paperWidth${y(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]};return g(o,Wo,t)},Jo=m(Uo,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),Yo=m(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${y(n.scroll)}`]]}})({height:`100%`,"@media print":{height:`auto`},outline:0,variants:[{props:{scroll:`paper`},style:{display:`flex`,justifyContent:`center`,alignItems:`center`}},{props:{scroll:`body`},style:{overflowY:`auto`,overflowX:`hidden`,textAlign:`center`,"&::after":{content:`""`,display:`inline-block`,verticalAlign:`middle`,height:`100%`,width:`0`}}}]}),Xo=m(de,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperWidth${y(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(d(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,outline:0,"@media print":{overflowY:`visible`,boxShadow:`none`},variants:[{props:{scroll:`paper`},style:{display:`flex`,flexDirection:`column`,maxHeight:`calc(100% - 64px)`}},{props:{scroll:`body`},style:{display:`inline-block`,verticalAlign:`middle`,textAlign:`initial`}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:`calc(100% - 64px)`}},{props:{maxWidth:`xs`},style:{maxWidth:e.breakpoints.unit===`px`?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`}},{props:{maxWidth:`xs`,scroll:`body`},style:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:`calc(100% - 64px)`}}},...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`}})),...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t,scroll:`body`},style:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:`calc(100% - 64px)`}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:`calc(100% - 64px)`}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:`100%`,maxWidth:`100%`,height:`100%`,maxHeight:`none`,borderRadius:0}},{props:({ownerState:e})=>e.fullScreen&&e.scroll===`body`,style:{margin:0,maxWidth:`100%`}}]}))),Zo=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiDialog`}),r=ke(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,children:c,className:l,fullScreen:u=!1,fullWidth:d=!1,maxWidth:f=`sm`,onClick:p,onClose:m,open:h,PaperComponent:g=de,role:_=`dialog`,scroll:v=`paper`,slots:y={},slotProps:b={},transitionDuration:S=i,...C}=n,w={...n,fullScreen:u,fullWidth:d,maxWidth:f,scroll:v},T=qo(w),E=G.useRef(),D=e=>{E.current=e.target===e.currentTarget},O=e=>{p&&p(e),E.current&&(E.current=null,m&&m(e,`backdropClick`))},k=_e(o),A=G.useMemo(()=>({titleId:k}),[k]),j={slots:y,slotProps:b},[M,N]=B(`root`,{elementType:Jo,shouldForwardComponentProp:!0,externalForwardedProps:j,ownerState:w,className:V(T.root,l),ref:t}),[P,ee]=B(`backdrop`,{elementType:Ko,shouldForwardComponentProp:!0,externalForwardedProps:j,ownerState:w,className:T.backdrop}),[F,I]=B(`paper`,{elementType:Xo,shouldForwardComponentProp:!0,externalForwardedProps:j,ownerState:w,className:T.paper,additionalProps:{elevation:24,role:_,"aria-describedby":a,"aria-labelledby":k,"aria-modal":s,tabIndex:-1,[To]:``}}),[L,R]=B(`container`,{elementType:Yo,externalForwardedProps:j,ownerState:w,className:T.container}),[z,te]=B(`transition`,{elementType:xa,externalForwardedProps:j,ownerState:w,additionalProps:{appear:!0,in:h,timeout:S,role:`presentation`}});return(0,W.jsx)(M,{closeAfterTransition:!0,slots:{backdrop:P},slotProps:{backdrop:{transitionDuration:S,...ee}},onClose:m,open:h,onClick:O,...N,...C,children:(0,W.jsx)(z,{...te,children:(0,W.jsx)(L,{onMouseDown:D,...R,children:(0,W.jsx)(F,{as:g,...I,children:(0,W.jsx)(Go.Provider,{value:A,children:c})})})})})});function Qo(e){return U(`MuiDialogActions`,e)}z(`MuiDialogActions`,[`root`,`spacing`]);var $o=e=>{let{classes:t,disableSpacing:n}=e;return g({root:[`root`,!n&&`spacing`]},Qo,t)},es=m(`div`,{name:`MuiDialogActions`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:`flex`,alignItems:`center`,padding:8,justifyContent:`flex-end`,flex:`0 0 auto`,variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),ts=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i},s=$o(o);return(0,W.jsx)(es,{className:V(s.root,r),ownerState:o,ref:t,...a})});function ns(e){return U(`MuiDialogContent`,e)}z(`MuiDialogContent`,[`root`,`dividers`]);function rs(e){return U(`MuiDialogTitle`,e)}var is=z(`MuiDialogTitle`,[`root`]),as=e=>{let{classes:t,dividers:n}=e;return g({root:[`root`,n&&`dividers`]},ns,t)},os=m(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(d(({theme:e})=>({flex:`1 1 auto`,WebkitOverflowScrolling:`touch`,overflowY:`auto`,padding:`20px 24px`,variants:[{props:({ownerState:e})=>e.dividers,style:{padding:`16px 24px`,borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${is.root} + &`]:{paddingTop:0}}}]}))),ss=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i},s=as(o);return(0,W.jsx)(os,{className:V(s.root,r),ownerState:o,ref:t,...a})}),cs=e=>{let{classes:t}=e;return g({root:[`root`]},rs,t)},ls=m(ve,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),us=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=cs(o),{titleId:c=i}=G.useContext(Go);return(0,W.jsx)(ls,{component:`h2`,className:V(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function ds(e){return U(`MuiDivider`,e)}var fs=z(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`vertical`,`withChildren`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),ps=e=>{let{absolute:t,children:n,classes:r,flexItem:i,orientation:a,textAlign:o,variant:s}=e;return g({root:[`root`,t&&`absolute`,s,a===`vertical`&&`vertical`,i&&`flexItem`,n&&`withChildren`,o===`right`&&a!==`vertical`&&`textAlignRight`,o===`left`&&a!==`vertical`&&`textAlignLeft`],wrapper:[`wrapper`,a===`vertical`&&`wrapperVertical`]},ds,r)},ms=m(`div`,{name:`MuiDivider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.orientation===`vertical`&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.textAlign===`right`&&n.orientation!==`vertical`&&t.textAlignRight,n.textAlign===`left`&&n.orientation!==`vertical`&&t.textAlignLeft]}})(d(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:`solid`,borderColor:(e.vars||e).palette.divider,borderBottomWidth:`thin`,variants:[{props:{absolute:!0},style:{position:`absolute`,bottom:0,left:0,width:`100%`}},{props:{variant:`inset`},style:{marginLeft:72}},{props:{variant:`middle`,orientation:`horizontal`},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:`middle`,orientation:`vertical`},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:`vertical`},style:{height:`100%`,borderBottomWidth:0,borderRightWidth:`thin`}},{props:{flexItem:!0},style:{alignSelf:`stretch`,height:`auto`}},{props:({ownerState:e})=>!!e.children,style:{display:`flex`,textAlign:`center`,border:0,borderTopStyle:`solid`,borderLeftStyle:`solid`,"&::before, &::after":{content:`""`,alignSelf:`center`}}},{props:({ownerState:e})=>e.children&&e.orientation!==`vertical`,style:{"&::before, &::after":{width:`100%`,borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:`inherit`}}},{props:({ownerState:e})=>e.orientation===`vertical`&&e.children,style:{flexDirection:`column`,"&::before, &::after":{height:`100%`,borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:`inherit`}}},{props:({ownerState:e})=>e.textAlign===`right`&&e.orientation!==`vertical`,style:{"&::before":{width:`90%`},"&::after":{width:`10%`}}},{props:({ownerState:e})=>e.textAlign===`left`&&e.orientation!==`vertical`,style:{"&::before":{width:`10%`},"&::after":{width:`90%`}}}]}))),hs=m(`span`,{name:`MuiDivider`,slot:`Wrapper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.wrapper,n.orientation===`vertical`&&t.wrapperVertical]}})(d(({theme:e})=>({display:`inline-block`,paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:`nowrap`,variants:[{props:{orientation:`vertical`},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),gs=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiDivider`}),{absolute:r=!1,children:i,className:a,orientation:o=`horizontal`,component:s=i||o===`vertical`?`div`:`hr`,flexItem:c=!1,role:l=s===`hr`?void 0:`separator`,textAlign:u=`center`,variant:d=`fullWidth`,...f}=n,p={...n,absolute:r,component:s,flexItem:c,orientation:o,role:l,textAlign:u,variant:d},m=ps(p);return(0,W.jsx)(ms,{as:s,className:V(m.root,a),role:l,ref:t,ownerState:p,"aria-orientation":l===`separator`&&(s!==`hr`||o===`vertical`)?o:void 0,...f,children:i?(0,W.jsx)(hs,{className:m.wrapper,ownerState:p,children:i}):null})});function _s(e){return U(`MuiSelect`,e)}var vs=z(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`nativeInput`,`error`]),ys=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c={root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${y(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},l=g(c,bt,t);return{...t,...l}},bs=m(gt,{shouldForwardProp:e=>_(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...pt(e,t),!n.disableUnderline&&t.underline]}})(d(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,...ce(e,`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${xt.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${xt.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...ce(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${xt.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${xt.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...ce(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${xt.disabled}, .${xt.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${xt.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(F()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{"--_trailingPad":`12px`,paddingRight:`var(--_trailingPad)`,[`&.${vs.root}`]:{"--_trailingPad":`0px`}}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),xs=m(_t,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:mt})(d(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`},borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`,...e.vars&&e.applyStyles(`dark`,{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`})},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Ss=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,fullWidth:i=!1,hiddenLabel:a,inputComponent:o=`input`,multiline:s=!1,notched:c,slotProps:l,slots:u={},type:d=`text`,...f}=n,p={...n,disableUnderline:r,fullWidth:i,inputComponent:o,multiline:s,type:d},m=ys(n),h={root:{ownerState:p},input:{ownerState:p}},g=l?xe(h,l):h,_=u.root??bs,v=u.input??xs;return(0,W.jsx)(yt,{slots:{root:_,input:v},slotProps:g,fullWidth:i,inputComponent:o,multiline:s,ref:t,type:d,...f,classes:m})});Ss.muiName=`Input`;function Cs(e){return U(`MuiFormControl`,e)}z(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var ws=e=>{let{classes:t,margin:n,fullWidth:r}=e,i={root:[`root`,n!==`none`&&`margin${y(n)}`,r&&`fullWidth`]};return g(i,Cs,t)},Ts=m(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${y(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),Es=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=ws(_),[y,b]=G.useState(()=>{let e=!1;return r&&G.Children.forEach(r,t=>{if(!Ut(t,[`Input`,`Select`]))return;let n=Ut(t,[`Select`])?t.props.input:t;n&&st(n.props)&&(e=!0)}),e}),[S,C]=G.useState(()=>{let e=!1;return r&&G.Children.forEach(r,t=>{Ut(t,[`Input`,`Select`])&&(ot(t.props,!0)||ot(t.props.inputProps,!0))&&(e=!0)}),e}),[w,T]=G.useState(!1);s&&w&&T(!1);let E=l!==void 0&&!s?l:w,D;G.useRef(!1);let O=G.useCallback(()=>{C(!0)},[]),k=G.useCallback(()=>{C(!1)},[]),A=G.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:S,focused:E,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{T(!1)},onFocus:()=>{T(!0)},onEmpty:k,onFilled:O,registerEffect:D,required:p,variant:h}),[y,a,s,c,S,E,u,d,D,k,O,p,m,h]);return(0,W.jsx)(Xe.Provider,{value:A,children:(0,W.jsx)(Ts,{as:o,ownerState:_,className:V(v.root,i),ref:t,...g,children:r})})}),Ds=e=>{let{classes:t,disabled:n,labelPlacement:r,error:i,required:a}=e,o={root:[`root`,n&&`disabled`,`labelPlacement${y(r)}`,i&&`error`,a&&`required`],label:[`label`,n&&`disabled`],asterisk:[`asterisk`,i&&`error`]};return g(o,St,t)},Os=m(`label`,{name:`MuiFormControlLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Ct.label}`]:t.label},t.root,t[`labelPlacement${y(n.labelPlacement)}`]]}})(d(({theme:e})=>({display:`inline-flex`,alignItems:`center`,cursor:`pointer`,verticalAlign:`middle`,WebkitTapHighlightColor:`transparent`,marginLeft:-11,marginRight:16,[`&.${Ct.disabled}`]:{cursor:`default`},[`& .${Ct.label}`]:{[`&.${Ct.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:`start`},style:{flexDirection:`row-reverse`,marginRight:-11}},{props:{labelPlacement:`top`},style:{flexDirection:`column-reverse`}},{props:{labelPlacement:`bottom`},style:{flexDirection:`column`}},{props:({labelPlacement:e})=>e===`start`||e===`top`||e===`bottom`,style:{marginLeft:16}}]}))),ks=m(`span`,{name:`MuiFormControlLabel`,slot:`Asterisk`})(d(({theme:e})=>({[`&.${Ct.error}`]:{color:(e.vars||e).palette.error.main}}))),As=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiFormControlLabel`}),{checked:r,className:i,control:a,disabled:o,disableTypography:s,inputRef:c,label:l,labelPlacement:u=`end`,name:d,onChange:f,required:p,slots:m={},slotProps:h={},value:g,..._}=n,[v,y]=Qe({props:n,states:[`error`]}),b=o??a.props.disabled??y?.disabled,S=p??a.props.required,C={disabled:b,required:S};[`checked`,`name`,`onChange`,`value`,`inputRef`].forEach(e=>{a.props[e]===void 0&&n[e]!==void 0&&(C[e]=n[e])});let w={...n,disabled:b,labelPlacement:u,required:S,error:v.error},T=Ds(w),[E,D]=B(`typography`,{elementType:ve,externalForwardedProps:{slots:m,slotProps:h},ownerState:w}),O=l;return O!=null&&O.type!==ve&&!s&&(O=(0,W.jsx)(E,{component:`span`,...D,className:V(T.label,D?.className),children:O})),(0,W.jsxs)(Os,{className:V(T.root,i),ownerState:w,ref:t,..._,children:[G.cloneElement(a,C),S?(0,W.jsxs)(`div`,{children:[O,(0,W.jsxs)(ks,{ownerState:w,"aria-hidden":!0,className:T.asterisk,children:[` `,`*`]})]}):O]})}),js,Ms=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e,l={root:[`root`,i&&`disabled`,a&&`error`,r&&`size${y(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]};return g(l,wt,t)},Ns=m(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${y(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(d(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Tt.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Tt.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:`small`},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),Ps=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiFormHelperText`}),{children:r,className:i,component:a=`p`,disabled:o,error:s,filled:c,focused:l,margin:u,required:d,variant:f,...p}=n,[m]=Qe({props:n,states:[`variant`,`size`,`disabled`,`error`,`filled`,`focused`,`required`]}),h={...n,component:a,contained:m.variant===`filled`||m.variant===`outlined`,variant:m.variant,size:m.size,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required};delete h.ownerState;let g=Ms(h);return(0,W.jsx)(Ns,{as:a,className:V(g.root,i),ref:t,...p,ownerState:h,children:r===` `?js||=(0,W.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):r})}),Fs=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e,c={root:[`root`,`color${y(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]};return g(c,Et,t)},Is=m(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(d(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t},style:{[`&.${Dt.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Dt.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Dt.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Ls=m(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(d(({theme:e})=>({[`&.${Dt.error}`]:{color:(e.vars||e).palette.error.main}}))),Rs=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,[p]=Qe({props:n,states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=Fs(m);return(0,W.jsxs)(Is,{as:o,ownerState:m,className:V(h.root,i),ref:t,...f,children:[r,p.required&&(0,W.jsxs)(Ls,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function zs(e){return`scale(${e}, ${e**2})`}var Bs={entering:{opacity:1,transform:zs(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:zs(.75)},exited:{opacity:0,transform:zs(.75)}},Vs={opacity:0,transform:zs(.75),visibility:`hidden`},Hs=G.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,disablePrefersReducedMotion:a=!1,easing:s,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,style:g,timeout:_=`auto`,...y}=e,x=G.useRef(null),S=ke(),C=ee(S.motion.reducedMotion,a),w=G.useRef(null),T=v(w,ji(i),t),E=o(w,f),D=o(w,(e,t)=>{C.shouldReduceMotion||se(e);let{duration:n,delay:r,easing:i}=b({style:g,timeout:_,easing:s},{mode:`enter`}),a;_===`auto`&&!C.shouldReduceMotion?(a=S.transitions.getAutoHeightDuration(e.clientHeight),x.current=a):(a=n,x.current=null);let o=C.getTransitionTiming({duration:a,delay:r});e.style.transition=[S.transitions.create(`opacity`,{duration:o.duration,delay:o.delay}),S.transitions.create(`transform`,{duration:typeof o.duration==`string`?o.duration:o.duration*.666,delay:o.delay,easing:i})].join(`,`),u&&u(e,t)}),O=o(w,d),k=o(w,h),A=o(w,e=>{let{duration:t,delay:n,easing:r}=b({style:g,timeout:_,easing:s},{mode:`exit`}),i;_===`auto`&&!C.shouldReduceMotion?(i=S.transitions.getAutoHeightDuration(e.clientHeight),x.current=i):(i=t,x.current=null);let a=C.getTransitionTiming({duration:i,delay:n});e.style.transition=[S.transitions.create(`opacity`,{duration:a.duration,delay:a.delay}),S.transitions.create(`transform`,{duration:typeof a.duration==`string`?a.duration:a.duration*.666,delay:a.delay||(typeof a.duration==`string`?a.duration:a.duration*.333),easing:r})].join(`,`),e.style.opacity=0,e.style.transform=zs(.75),p&&p(e)}),j=o(w,e=>{e.style.transition=``,m&&m(e)});return(0,W.jsx)(en,{appear:r,in:c,nodeRef:w,onEnter:D,onEntered:O,onEntering:E,onExit:A,onExited:j,onExiting:k,addEndListener:n?e=>{n(w.current,e)}:void 0,getAutoTimeout:_===`auto`?()=>x.current:void 0,reduceMotion:C.shouldReduceMotion,timeout:_===`auto`?null:_,...y,children:(e,{ownerState:t,...n})=>{let r=l(e,c,Bs,Vs,g,i.props.style);return G.cloneElement(i,{style:r,ref:T,...n})}})});Hs&&(Hs.muiSupportAuto=!0);function Us(e){return U(`MuiInputLabel`,e)}var Ws=z(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),Gs=e=>{let{classes:t,disableUnderline:n}=e,r=g({root:[`root`,!n&&`underline`],input:[`input`]},Ot,t);return{...t,...r}},Ks=m(gt,{shouldForwardProp:e=>_(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...pt(e,t),!n.disableUnderline&&t.underline]}})(d(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{[`label + &, .${Ws.root} + &`]:{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...ce(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${kt.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${kt.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...ce(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${kt.disabled}, .${kt.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${kt.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),qs=m(_t,{name:`MuiInput`,slot:`Input`,overridesResolver:mt})({}),Js=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiInput`}),{disableUnderline:r=!1,fullWidth:i=!1,inputComponent:a=`input`,multiline:o=!1,notched:s,slotProps:c,slots:l={},type:u=`text`,...d}=n,f=Gs(n),p={root:{ownerState:{disableUnderline:r}}},m=c?xe(c,p):p,h=l.root??Ks,g=l.input??qs;return(0,W.jsx)(yt,{slots:{root:h,input:g},slotProps:m,fullWidth:i,inputComponent:a,multiline:o,ref:t,type:u,...d,classes:f})});Js.muiName=`Input`;function Ys(e){return U(`MuiInputAdornment`,e)}var Xs=z(`MuiInputAdornment`,[`root`,`filled`,`standard`,`outlined`,`positionStart`,`positionEnd`,`disablePointerEvents`,`hiddenLabel`,`sizeSmall`]),Zs,Qs=(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${y(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},$s=e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e,s={root:[`root`,n&&`disablePointerEvents`,i&&`position${y(i)}`,o,r&&`hiddenLabel`,a&&`size${y(a)}`]};return g(s,Ys,t)},ec=m(`div`,{name:`MuiInputAdornment`,slot:`Root`,overridesResolver:Qs})(d(({theme:e})=>({display:`flex`,maxHeight:`2em`,alignItems:`center`,whiteSpace:`nowrap`,color:(e.vars||e).palette.action.active,variants:[{props:{variant:`filled`},style:{[`&.${Xs.positionStart}&:not(.${Xs.hiddenLabel})`]:{marginTop:16}}},{props:{position:`start`},style:{marginRight:8}},{props:{position:`end`},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:`none`}}]}))),tc=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiInputAdornment`}),{children:r,className:i,component:a=`div`,disablePointerEvents:o=!1,disableTypography:s=!1,position:c,variant:l,...u}=n,d=Ze()||{},f=l;l&&d.variant,d&&!f&&(f=d.variant);let p={...n,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:o,position:c,variant:f},m=$s(p);return(0,W.jsx)(Xe.Provider,{value:null,children:(0,W.jsx)(ec,{as:a,ownerState:p,className:V(m.root,i),ref:t,...u,children:typeof r==`string`&&!s?(0,W.jsx)(ve,{color:`textSecondary`,children:r}):(0,W.jsxs)(G.Fragment,{children:[c===`start`?Zs||=(0,W.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):null,r]})})})}),nc=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c={root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${y(r)}`,o],asterisk:[s&&`asterisk`]},l=g(c,Us,t);return{...t,...l}},rc=m(Rs,{shouldForwardProp:e=>_(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Dt.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(d(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{...ce(e,[`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),ic=G.forwardRef(function(e,t){let n=x({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,[l,u]=Qe({props:n,states:[`size`,`variant`,`required`,`focused`]}),d=a;d===void 0&&u&&(d=u.filled||u.focused||u.adornedStart);let f={...n,disableAnimation:r,formControl:u,shrink:d,size:l.size,variant:l.variant,required:l.required,focused:l.focused},p=nc(f);return(0,W.jsx)(rc,{"data-shrink":d,ref:t,className:V(p.root,s),...c,ownerState:f,classes:p})});function ac(e){return U(`MuiLinearProgress`,e)}z(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`bar`,`bar1`,`bar2`]);var oc=4,sc={},cc=ne` + 0% { + left: -35%; + right: 100%; + } + + 60% { + left: 100%; + right: -90%; + } + + 100% { + left: 100%; + right: -90%; + } +`,lc=typeof cc==`string`?null:R` + animation: ${cc} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; + `,uc=ne` + 0% { + left: -200%; + right: 100%; + } + + 60% { + left: 107%; + right: -8%; + } + + 100% { + left: 107%; + right: -8%; + } +`,dc=typeof uc==`string`?null:R` + animation: ${uc} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; + `,fc=ne` + 0% { + opacity: 1; + background-position: 0 -23px; + } + + 60% { + opacity: 0; + background-position: 0 -23px; + } + + 100% { + opacity: 1; + background-position: -200px -23px; + } +`,pc=typeof fc==`string`?null:R` + animation: ${fc} 3s infinite linear; + `,mc=e=>{let{classes:t,variant:n,color:r}=e,i={root:[`root`,`color${y(r)}`,n],dashed:[`dashed`],bar1:[`bar`,`bar1`],bar2:[`bar`,`bar2`,n===`buffer`&&`color${y(r)}`]};return g(i,ac,t)},hc=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode===`light`?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),gc=m(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${y(n.color)}`],t[n.variant]]}})(d(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t},style:{backgroundColor:hc(e,t)}})),{props:({ownerState:e})=>e.color===`inherit`&&e.variant!==`buffer`,style:{"&::before":{content:`""`,position:`absolute`,left:0,top:0,right:0,bottom:0,backgroundColor:`currentColor`,opacity:.3}}},{props:{variant:`buffer`},style:{backgroundColor:`transparent`}},{props:{variant:`query`},style:{transform:`rotate(180deg)`}}]}))),_c=m(`span`,{name:`MuiLinearProgress`,slot:`Dashed`})(d(({theme:e})=>({position:`absolute`,marginTop:0,height:`100%`,width:`100%`,backgroundSize:`10px 10px`,backgroundPosition:`0 -23px`,variants:[{props:{color:`inherit`},style:{opacity:.3,backgroundImage:`radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`}},...Object.entries(e.palette).filter(F()).map(([t])=>{let n=hc(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),pc||{animation:`${fc} 3s infinite linear`},d(({theme:e})=>u(e,{animation:`none`})||sc)),vc=m(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>[t.bar,t.bar1]})(d(({theme:e})=>{let t=u(e,{animation:`none`,left:`30%`,right:`auto`,width:`40%`});return{width:`100%`,position:`absolute`,left:0,bottom:0,top:0,...ce(e,`transform`,{duration:`0.2s`,easing:`linear`}),transformOrigin:`left`,variants:[{props:{color:`inherit`},style:{backgroundColor:`currentColor`}},...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{...ce(e,`transform`,{duration:`.${oc}s`,easing:`linear`})}},{props:{variant:`buffer`},style:{zIndex:1,...ce(e,`transform`,{duration:`.${oc}s`,easing:`linear`})}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:lc||{animation:`${cc} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:t}]:[]]}})),yc=m(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>[t.bar,t.bar2]})(d(({theme:e})=>{let t=u(e,{animation:`none`,display:`none`});return{width:`100%`,position:`absolute`,left:0,bottom:0,top:0,...ce(e,`transform`,{duration:`0.2s`,easing:`linear`}),transformOrigin:`left`,variants:[...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>e.variant!==`buffer`&&e.color!==`inherit`,style:{backgroundColor:`var(--LinearProgressBar2-barColor, currentColor)`}},{props:({ownerState:e})=>e.variant!==`buffer`&&e.color===`inherit`,style:{backgroundColor:`currentColor`}},{props:{color:`inherit`},style:{opacity:.3}},...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:hc(e,t),...ce(e,`transform`,{duration:`.${oc}s`,easing:`linear`})}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:dc||{animation:`${uc} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:t}]:[]]}})),bc=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiLinearProgress`}),{className:r,color:i=`primary`,max:a,min:o,value:s,valueBuffer:c,variant:l=`indeterminate`,...u}=n,d={...n,color:i,variant:l},f=o??0,p=a??100,m=mc(d),h=Ie(),g={},_={bar1:{},bar2:{}};if((l===`determinate`||l===`buffer`)&&s!==void 0){let e=p-f,t=(s-f)/e*100-100;h&&(t=-t),_.bar1.transform=e>0?`translateX(${t}%)`:`translateX(-100%)`,g[`aria-valuenow`]=s,g[`aria-valuemin`]=f,g[`aria-valuemax`]=p}if(l===`buffer`&&c!==void 0){let e=p-f,t=(c-f)/e*100-100;h&&(t=-t),_.bar2.transform=e>0?`translateX(${t}%)`:`translateX(-100%)`}return(0,W.jsxs)(gc,{className:V(m.root,r),ownerState:d,role:`progressbar`,...g,ref:t,...u,children:[l===`buffer`?(0,W.jsx)(_c,{className:m.dashed,ownerState:d}):null,(0,W.jsx)(vc,{className:m.bar1,ownerState:d,style:_.bar1}),l===`determinate`?null:(0,W.jsx)(yc,{className:m.bar2,ownerState:d,style:_.bar2})]})}),xc=G.createContext({});function Sc(e){return U(`MuiList`,e)}z(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var Cc=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return g({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},Sc,t)},wc=m(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0,isolation:`isolate`}}]}),Tc=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=G.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=Cc(d);return(0,W.jsx)(xc.Provider,{value:u,children:(0,W.jsxs)(wc,{as:a,className:V(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})});function Ec(e){return U(`MuiListItemIcon`,e)}var Dc=z(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),Oc=e=>{let{alignItems:t,classes:n}=e;return g({root:[`root`,t===`flex-start`&&`alignItemsFlexStart`]},Ec,n)},kc=m(`div`,{name:`MuiListItemIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.alignItems===`flex-start`&&t.alignItemsFlexStart]}})(d(({theme:e})=>({minWidth:e.spacing(4.5),color:(e.vars||e).palette.action.active,flexShrink:0,display:`inline-flex`,variants:[{props:{alignItems:`flex-start`},style:{marginTop:8}}]}))),Ac=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiListItemIcon`}),{className:r,...i}=n,a=G.useContext(xc),o={...n,alignItems:a.alignItems},s=Oc(o);return(0,W.jsx)(kc,{className:V(s.root,r),ownerState:o,ref:t,...i})});function jc(e){return U(`MuiListItemText`,e)}var Mc=z(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]),Nc=e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return g({root:[`root`,n&&`inset`,a&&`dense`,r&&i&&`multiline`],primary:[`primary`],secondary:[`secondary`]},jc,t)},Pc=m(`div`,{name:`MuiListItemText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Mc.primary}`]:t.primary},{[`& .${Mc.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:`1 1 auto`,minWidth:0,marginTop:4,marginBottom:4,[`.${ae.root}:where(& .${Mc.primary})`]:{display:`block`},[`.${ae.root}:where(& .${Mc.secondary})`]:{display:`block`},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Fc=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiListItemText`}),{children:r,className:i,disableTypography:a=!1,inset:o=!1,primary:s,secondary:c,slots:l={},slotProps:u={},...d}=n,{dense:f}=G.useContext(xc),p=s??r,m=c,h={...n,disableTypography:a,inset:o,primary:!!p,secondary:!!m,dense:f},g=Nc(h),_={slots:l,slotProps:u},[v,y]=B(`root`,{className:V(g.root,i),elementType:Pc,externalForwardedProps:{..._,...d},ownerState:h,ref:t}),[b,S]=B(`primary`,{className:g.primary,elementType:ve,externalForwardedProps:_,ownerState:h}),[C,w]=B(`secondary`,{className:g.secondary,elementType:ve,externalForwardedProps:_,ownerState:h});return p!=null&&p.type!==ve&&!a&&(p=(0,W.jsx)(b,{variant:f?`body2`:`body1`,component:S?.variant?void 0:`span`,...S,children:p})),m!=null&&m.type!==ve&&!a&&(m=(0,W.jsx)(C,{variant:`body2`,color:`textSecondary`,...w,children:m})),(0,W.jsxs)(v,{...y,children:[p,m]})}),Ic=G.createContext(void 0);function Lc(){let e=G.useContext(Ic);if(e===void 0)throw Error(`MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.`);return e}var Rc=Object.is;function zc(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(let r in e)if(n+=1,!Rc(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}var Bc=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`,`Home`,`End`];function Vc(e){let{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:i=!1,isItemFocusable:a=tl,wrap:o=!0}=e,[s,c]=G.useState(t),[l,u]=G.useState(t),d=s;t!==l&&(u(t),t!==void 0&&t!==s&&(d=t,c(t)));let f=G.useRef(null),p=G.useRef(new Map),[m,h]=G.useState(0),g=G.useMemo(()=>Qc(p.current),[m]),_=Uc(d,g,a,n),v=G.useRef(_);v.current=_;let y=G.useCallback(()=>{let e=Qc(p.current);return Yc(e,Uc(v.current,e,a,n))},[n,a]),b=G.useCallback(()=>p.current,[]),x=D(e=>{zc(p.current.get(e.id)??null,e)||(p.current.set(e.id,e),h(e=>e+1))}),S=D(e=>{p.current.delete(e)&&h(e=>e+1)}),C=D(e=>{c(e)}),w=G.useCallback(e=>v.current===e,[]),T=G.useCallback((e,t,n,r)=>{let i=qc($c(p.current),e,t,n,r??a);return i?(i.element?.focus(),c(i.id),i):null},[a]),E=G.useCallback((e,t,n)=>({onFocus:e=>{t?.(e);let n=$c(p.current),r=Zc(n,e.target);r!==-1&&c(n[r].id)},onKeyDown:e=>{if(n?.(e),e.defaultPrevented||e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||!Bc.includes(e.key))return;let t=r===`horizontal`?`ArrowLeft`:`ArrowUp`,a=r===`horizontal`?`ArrowRight`:`ArrowDown`;r===`horizontal`&&i&&(t=`ArrowRight`,a=`ArrowLeft`);let s=$c(p.current),c=rt(Ue(f.current)),l=c===f.current,u=Kc(s,c,v.current),d=`next`;switch(e.key){case t:d=`previous`,e.preventDefault(),l&&(u=s.length);break;case a:e.preventDefault(),l&&(u=-1);break;case`Home`:e.preventDefault(),u=-1;break;case`End`:e.preventDefault(),d=`previous`,u=s.length;break;default:return}T(u,d,o)},ref:il(e,e=>{f.current=e})}),[T,i,r,o]),O=G.useCallback(e=>{let t=$c(p.current),n=rt(Ue(f.current)),r=n===f.current?-1:Kc(t,n,v.current);return T(r,`next`,!0,e)?.id??null},[T]);return G.useMemo(()=>({activeItemId:_,focusNext:O,getActiveItem:y,getContainerProps:E,getItemMap:b,isItemActive:w,registerItem:x,setActiveItemId:C,unregisterItem:S}),[_,O,y,E,b,w,x,C,S])}function Hc(e){let{activeItemId:t,registerItem:n,unregisterItem:r}=Lc(),i=G.useRef(null),a=G.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),o=G.useRef(a);o.current=a;let s=G.useCallback(t=>{if(i.current=t,t==null){queueMicrotask(()=>{i.current??r(e.id)});return}n({...o.current,element:t})},[e.id,n,r]),c=p(e.ref,s);return h(()=>{i.current&&n({...a,element:i.current})},[a,n]),h(()=>{let t=e.id;return()=>{r(t)}},[e.id,r]),{ref:c,tabIndex:t===e.id?0:-1}}function Uc(e,t,n,r){return e==null?Gc(t,n,r):Wc(e,t,n)}function Wc(e,t,n){let r=Xc(t,e);return r===-1?Jc(t,n):n(t[r])?t[r].id:qc(t,r,`next`,!1,n)?.id??null}function Gc(e,t,n){let r=n?.(e);if(r!=null){let n=Yc(e,r);if(n&&t(n))return n.id}return Jc(e,t)}function Kc(e,t,n){if(t){let n=Zc(e,t);if(n!==-1)return n}return Xc(e,n)}function qc(e,t,n,r,i){let a=e.length-1;if(a===-1)return null;let o=!1,s=el(t,a,n,r),c=s;for(;s!==-1;){if(s===c){if(o)return null;o=!0}let t=e[s];if(!t||!i(t))s=el(s,a,n,r);else return t}return null}function Jc(e,t){return e.find(e=>t(e))?.id??null}function Yc(e,t){return t==null?null:e.find(e=>e.id===t)??null}function Xc(e,t){return t==null?-1:e.findIndex(e=>e.id===t)}function Zc(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function Qc(e){let t=Array.from(e.values());if(t.every(e=>e.element==null))return t;let n=t.filter(nl).sort((e,t)=>rl(e.element,t.element)),r=t.filter(e=>!nl(e));return[...n,...r]}function $c(e){return Qc(e).filter(nl)}function el(e,t,n,r=!0){return n===`next`?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function tl(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute(`disabled`)&&e.element.getAttribute(`aria-disabled`)!==`true`&&e.element.hasAttribute(`tabindex`):!1}function nl(e){return e.element!=null&&e.element.isConnected}function rl(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function il(...e){return t=>{e.forEach(e=>{Gt(e??null,t)})}}var al=ho;function ol(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}function sl(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function cl(e){return e==null||typeof e==`string`&&!e.trim()}function ll(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var ul=G.createContext(null);function dl(){return G.useContext(ul)}var fl=ul.Provider,pl=G.createContext(void 0);function ml(){let e=G.useContext(pl);if(e===void 0)throw Error(`MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.`);return e}function hl(e){let t=e?.element??e;if(!t)return``;if(e?.textValue!==void 0)return e.textValue;let n=t.innerText;return n===void 0&&(n=t.textContent),n??``}function gl(e,t){if(t===void 0)return!0;let n=hl(e);return n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function _l(e,t){return gl(e,t)?tl(e):!1}function vl(e,t){ol(e,t)}var yl=G.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:l=!1,onKeyDown:u,variant:d=`selectedMenu`,...f}=e,p=G.useRef(null),m=G.useRef(!1),[h,g]=G.useState(!1),_=dl(),y=G.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),b=Vc({activeItemId:void 0,getDefaultActiveItemId:G.useCallback(e=>d===`selectedMenu`?e.find(e=>e.selected&&tl(e))?.id??e.find(e=>tl(e))?.id??null:e.find(e=>tl(e))?.id??null,[d]),orientation:`vertical`,wrap:!l}),{activeItemId:x,focusNext:S,getActiveItem:C,getContainerProps:w,getItemMap:T}=b,E=c((e=!1)=>{if(!p.current||!e&&m.current)return null;if(i){let e=C();if(e?.element){let t=Array.from(T().values()).some(e=>e.selected),n=d===`menu`&&t&&!e.selected&&_==null;return g(n),vl(e.element,_),m.current=!0,e.element}return r?(g(!1),p.current.focus(),p.current):null}return r?(g(!1),p.current.focus(),m.current=!0,p.current):(g(!1),null)});tt(()=>{if(!r&&!i){m.current=!1,g(!1);return}E()},[x,i,r,E]),G.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!p.current.style.width;if(e.clientHeight{if(!p.current)return null;let e=it(nt(p.current));return e&&wo(p.current,e)?e:E(!0)}}),[E]);let D=w(void 0,f.onFocus),O=v(p,D.ref,t),k=G.useMemo(()=>({itemsFocusableWhenDisabled:s,suppressInitialFocusVisible:h,variant:d}),[s,h,d]),A=c(e=>{if(h&&g(!1),(e.ctrlKey||e.metaKey||e.altKey)&&u){u(e);return}if(D.onKeyDown(e),e.key.length===1){let t=y.current,n=e.key.toLowerCase(),r=performance.now();t.keys.length>0&&(r-t.lastTime>500?(t.keys=[],t.repeating=!0,t.previousKeyMatched=!0):t.repeating&&n!==t.keys[0]&&(t.repeating=!1)),t.lastTime=r,t.keys.push(n);let i=it(nt(p.current)),a=i&&!t.repeating&&gl(i,t);t.previousKeyMatched&&(a||S(e=>_l(e,t))!=null)?e.preventDefault():t.previousKeyMatched=!1}u&&u(e)});return(0,W.jsx)(Tc,{role:`menu`,ref:O,className:o,onKeyDown:A,tabIndex:-1,...f,onFocus:D.onFocus,children:(0,W.jsx)(pl.Provider,{value:k,children:(0,W.jsx)(Ic.Provider,{value:b,children:a})})})});function bl(e){return U(`MuiPopover`,e)}z(`MuiPopover`,[`root`,`paper`]);function xl(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function Sl(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function Cl(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function wl(e){return typeof e==`function`?e():e}var Tl=e=>{let{classes:t}=e;return g({root:[`root`],paper:[`paper`]},bl,t)},El=m(Uo,{name:`MuiPopover`,slot:`Root`})({}),Dl=m(de,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),Ol=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,disableAutoFocus:d=!1,elevation:f=8,marginThreshold:p=16,open:m,slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},transitionDuration:v=`auto`,disableScrollLock:y=!1,...b}=n,S=G.useRef(),C={...n,anchorOrigin:a,anchorReference:s,elevation:f,marginThreshold:p,transformOrigin:_,transitionDuration:v},w=Tl(C),T=G.useCallback(()=>{if(s===`anchorPosition`)return o;let e=wl(i),t=(e&&e.nodeType===1?e:nt(S.current).body).getBoundingClientRect();return{top:t.top+xl(t,a.vertical),left:t.left+Sl(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=G.useCallback(e=>({vertical:xl(e,_.vertical),horizontal:Sl(e,_.horizontal)}),[_.horizontal,_.vertical]),O=G.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if(s===`none`)return{top:null,left:null,transformOrigin:Cl(n)};let r=T(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Wt(wl(i)),d=u.innerHeight-p,f=u.innerWidth-p;if(p!=null&&ad){let e=c-d;a-=e,n.vertical+=e}if(p!=null&&of){let e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:Cl(n)}},[i,s,T,D,p]),[k,A]=G.useState(m),j=G.useCallback(()=>{let e=S.current;if(!e)return;let t=O(e);t.top!=null&&e.style.setProperty(`top`,t.top),t.left!=null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,A(!0)},[O]);G.useEffect(()=>(y&&window.addEventListener(`scroll`,j),()=>window.removeEventListener(`scroll`,j)),[i,y,j]);let M=()=>{j()},N=()=>{A(!1)};G.useEffect(()=>{m&&j()}),G.useImperativeHandle(r,()=>m?{updatePosition:()=>{j()}}:null,[m,j]),G.useEffect(()=>{if(!m)return;let e=Ht(()=>{j()}),t=Wt(wl(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,m,j]);let P=v,ee={slots:h,slotProps:g},[F,I]=B(`transition`,{elementType:Hs,externalForwardedProps:ee,ownerState:C,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),M()},onExited:t=>{e.onExited?.(t),N()}}),additionalProps:{appear:!0,in:m}});v===`auto`&&!F.muiSupportAuto&&(P=void 0);let L=u||(i?nt(wl(i)).body:void 0),[R,{slots:z,slotProps:te,...ne}]=B(`root`,{ref:t,elementType:El,externalForwardedProps:{...ee,...b},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:Jt(typeof g.backdrop==`function`?g.backdrop(C):g.backdrop,{invisible:!0})},container:L,open:m},ownerState:C,className:V(w.root,l)}),[re,ie]=B(`paper`,{ref:S,className:w.paper,elementType:Dl,externalForwardedProps:ee,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:k?void 0:{opacity:0}},ownerState:C});return(0,W.jsx)(R,{...ne,...!E(R)&&{slots:z,slotProps:te,disableAutoFocus:d,disableScrollLock:y},children:(0,W.jsx)(F,{...I,timeout:P,children:(0,W.jsx)(re,{...ie,children:c})})})});function kl(e){return U(`MuiMenu`,e)}z(`MuiMenu`,[`root`,`paper`,`list`]);var Al={vertical:`top`,horizontal:`right`},jl={vertical:`top`,horizontal:`left`},Ml=e=>{let{classes:t}=e;return g({root:[`root`],paper:[`paper`],list:[`list`]},kl,t)},Nl=m(Ol,{shouldForwardProp:e=>_(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),Pl=m(Dl,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),Fl=m(yl,{name:`MuiMenu`,slot:`List`})({outline:0}),Il=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,onClose:s,open:c,PopoverClasses:l,transitionDuration:u=`auto`,variant:d=`selectedMenu`,slots:f={},slotProps:p={},...m}=n,h=Ie(),g={...n,autoFocus:r,disableAutoFocusItem:o,transitionDuration:u,variant:d},_=Ml(g),v=r&&c,y=v&&!o,b=G.useRef(null),S=(e,t)=>{b.current&&(b.current.adjustStyleForScrollbar(e,{direction:h?`rtl`:`ltr`}),v&&b.current.focusInitialTarget?.())},C=e=>{e.key===`Tab`&&(e.preventDefault(),s&&s(e,`tabKeyDown`))},w={slots:f,slotProps:p},T=Ai({elementType:f.root,externalSlotProps:p.root,ownerState:g,className:[_.root,a]}),[E,D]=B(`paper`,{className:_.paper,elementType:Pl,externalForwardedProps:w,shouldForwardComponentProp:!0,ownerState:g}),[O,k]=B(`list`,{className:_.list,elementType:Fl,shouldForwardComponentProp:!0,externalForwardedProps:w,getSlotProps:e=>({...e,onKeyDown:t=>{C(t),e.onKeyDown?.(t)}}),ownerState:g}),A=typeof p.transition==`function`?p.transition(g):p.transition;return(0,W.jsx)(Nl,{disableAutoFocus:r,onClose:s,anchorOrigin:{vertical:`bottom`,horizontal:h?`right`:`left`},transformOrigin:h?Al:jl,slots:{root:f.root,paper:E,backdrop:f.backdrop,transition:f.transition},slotProps:{root:T,paper:D,backdrop:typeof p.backdrop==`function`?p.backdrop(g):p.backdrop,transition:{...A,onEntering:(...e)=>{S(...e),A?.onEntering?.(...e)}}},open:c,ref:t,transitionDuration:u,ownerState:g,...m,classes:l,children:(0,W.jsx)(O,{actions:b,autoFocus:v,autoFocusItem:y,variant:d,...k,children:i})})}),Ll=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Rl=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=g({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},At,o);return{...o,...s}},zl=m(le,{shouldForwardProp:e=>_(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:Ll})(d(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${jt.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${jt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${jt.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${jt.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${jt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${fs.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${fs.inset}`]:{marginLeft:52},[`& .${Mc.root}`]:{marginTop:0,marginBottom:0},[`& .${Mc.inset}`]:{paddingLeft:36},[`& .${Dc.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Dc.root} svg`]:{fontSize:`1.25rem`}}}]}))),Bl=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=l===`menuitemcheckbox`||l===`menuitemradio`?!!n.selected:void 0,m=dl(),h=G.useContext(xc),g=G.useMemo(()=>({dense:a||h.dense||!1,disableGutters:s}),[h.dense,a,s]),_=ml(),y=Ee(),b=_.suppressInitialFocusVisible,S=_.itemsFocusableWhenDisabled,C=G.useRef(null);tt(()=>{r&&C.current&&ol(C.current,m)},[r]);let w={...n,dense:g.dense,divider:o,disableGutters:s},T=Rl(n),{root:E,...D}=T,O=Hc({id:y,ref:t,disabled:n.disabled,focusableWhenDisabled:S,selected:n.selected}),k=v(C,O.ref),A;return u===void 0?_.variant===`selectedMenu`?A=O.tabIndex:(!n.disabled||S)&&(A=-1):A=u,(0,W.jsx)(xc.Provider,{value:g,children:(0,W.jsx)(zl,{ref:k,role:l,"aria-checked":p,tabIndex:A,component:i,internalNativeButton:!1,focusableWhenDisabled:S,suppressFocusVisible:b,focusVisibleClassName:V(T.focusVisible,c),className:V(T.root,d),...f,ownerState:w,classes:D})})}),Vl=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e,s={select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${y(n)}`,a&&`iconOpen`,r&&`disabled`]};return g(s,Mt,t)},Hl=m(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${Nt.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},[`& ~ .${Xs.root}`]:{position:`absolute`,top:`50%`,transform:`translateY(-50%)`,right:`calc(var(--_caret, 24px) + (var(--_endAdornment, 28px) - 1.5rem)/2)`},[`.${lt.root}:has(> &)`]:{"--_endAdornment":`0px`},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{[`.${lt.root}:has(> &)`]:{"--_caret":`24px`},[`.${lt.root}:has(> & ~ .${Xs.root})`]:{"--_endAdornment":`28px`},"&&&":{paddingRight:`calc(var(--_caret, 24px) + var(--_endAdornment, 0px))`,minWidth:16}}},{props:{variant:`filled`},style:{[`.${lt.root}:has(> &)`]:{"--_caret":`32px`},[`.${lt.root}:has(> & ~ .${Xs.root})`]:{"--_endAdornment":`28px`},"&&&":{paddingRight:`calc(var(--_caret, 32px) + var(--_endAdornment, 0px))`}}},{props:{variant:`outlined`},style:{[`.${lt.root}:has(> &)`]:{"--_caret":`32px`},[`.${lt.root}:has(> & ~ .${Xs.root})`]:{"--_endAdornment":`28px`},borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:`calc(var(--_caret, 32px) + var(--_endAdornment, 0px))`}}}]})),Ul=m(Hl,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:_,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Nt.multiple}`]:t.multiple}]}})({}),Wl=m(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${Nt.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),Gl=m(Wl,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${y(n.variant)}`],n.open&&t.iconOpen]}})({}),Kl=G.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=Vl(l);return(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(Ul,{ownerState:l,className:V(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,W.jsx)(Gl,{as:a,ownerState:l,className:u.icon})]})}),ql,Jl=m(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:_})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),Yl=m(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:_})(d(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,...ce(e,`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,...ce(e,`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,...ce(e,`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Xl(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,W.jsx)(Jl,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,W.jsx)(Yl,{ownerState:c,children:s?(0,W.jsx)(`span`,{children:i}):ql||=(0,W.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`})})})}var Zl=e=>{let{classes:t}=e,n=g({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},Pt,t);return{...t,...n}},Ql=m(gt,{shouldForwardProp:e=>_(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:pt})(d(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Ft.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ft.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Ft.focused} .${Ft.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t},style:{[`&.${Ft.focused} .${Ft.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Ft.error} .${Ft.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ft.disabled} .${Ft.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{"--_trailingPad":`14px`,paddingRight:`var(--_trailingPad)`,[`&.${vs.root}`]:{"--_trailingPad":`0px`}}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),$l=m(Xl,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(d(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),eu=m(_t,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:mt})(d(({theme:e})=>({padding:`16.5px 14px`,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`},borderRadius:`inherit`,...e.vars&&e.applyStyles(`dark`,{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`})},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),tu=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiOutlinedInput`}),{fullWidth:r=!1,inputComponent:i=`input`,label:a,multiline:o=!1,notched:s,slots:c={},slotProps:l={},type:u=`text`,...d}=n,f=Zl(n),[p,m]=Qe({props:n,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),h={...n,color:p.color||`primary`,disabled:p.disabled,error:p.error,focused:p.focused,formControl:m,fullWidth:r,hiddenLabel:p.hiddenLabel,multiline:o,size:p.size,type:u},g=c.root??Ql,_=c.input??eu,[v,y]=B(`notchedOutline`,{elementType:$l,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:h,externalForwardedProps:{slots:c,slotProps:l},additionalProps:{label:a!=null&&a!==``&&p.required?(0,W.jsxs)(G.Fragment,{children:[a,` `,`*`]}):a}});return(0,W.jsx)(yt,{slots:{root:g,input:_},slotProps:l,renderSuffix:e=>(0,W.jsx)(v,{...y,notched:s===void 0?!!(e.startAdornment||e.filled||e.focused):s}),fullWidth:r,inputComponent:i,multiline:o,ref:t,type:u,...d,classes:{...f,notchedOutline:null}})});tu.muiName=`Input`;var nu=T((0,W.jsx)(`path`,{d:`M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z`}),`FirstPage`),ru=T((0,W.jsx)(`path`,{d:`M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z`}),`LastPage`);function iu(e){return Object.prototype.hasOwnProperty.call(e.props,`value`)}function au(e){if(typeof e==`string`||typeof e==`number`)return String(e);let t=``;return G.Children.forEach(e,e=>{typeof e==`string`||typeof e==`number`?t+=String(e):G.isValidElement(e)&&(t+=au(e.props.children))}),t}function ou(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length;for(let n=0;ne.label[0]===t&&e.label[1]===t)}function cu(e,t){let n=[],r=-1;for(let i=0;i=n.left-uu&&e.clientX<=n.right+uu&&e.clientY>=n.top-uu&&e.clientY<=n.bottom+uu}var yu=m(Hl,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${vs.select}`]:t.select},{[`&.${vs.select}`]:t[n.variant]},{[`&.${vs.error}`]:t.error},{[`&.${vs.multiple}`]:t.multiple}]}})({[`&.${vs.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),bu=m(Wl,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.open&&t.iconOpen]}})({}),xu=m(`input`,{shouldForwardProp:e=>C(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),Su=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return g({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},_s,t)},Cu=G.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:l,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:h,labelId:g,MenuProps:_={},multiple:y,name:b,onBlur:x,onChange:S,onClose:C,onFocus:w,onKeyDown:T,onMouseDown:E,onOpen:D,open:O,readOnly:k,renderValue:A,required:j,SelectDisplayProps:M={},tabIndex:N,type:P,value:ee,variant:F=`standard`,...I}=e,[R,z]=qt({controlled:ee,default:u,name:`Select`}),[te,ne]=qt({controlled:O,default:l,name:`Select`}),re=G.useRef(null),B=G.useRef(null),ae=G.useRef(null),oe=G.useRef(!1),se=G.useRef(!1),ce=G.useRef(null),le=G.useRef(!1),ue=G.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),de=G.useRef({buffer:``,previousSearchIndex:null,matchedIndex:null}),fe=L(),pe=L(),me=L(),[he,ge]=G.useState(null),{current:H}=G.useRef(O!=null),[ve,ye]=G.useState(),[be,xe]=G.useState(null),Se=v(t,h),U=G.useCallback(e=>{B.current=e,e&&ge(e)},[]),Ce=he?.parentNode;G.useImperativeHandle(Se,()=>({focus:()=>{B.current.focus()},node:re.current,value:R}),[R]);let we=he!==null&&te,Te=G.useCallback(()=>{me.clear(),de.current.buffer=``,de.current.previousSearchIndex=null,de.current.matchedIndex=null},[me]);tt(()=>{oe.current=we,we&&Te()},[we,Te]);let Ee=G.useCallback(()=>{fe.clear(),pe.clear()},[fe,pe]),De=G.useCallback(()=>{Ee(),le.current=!1,ue.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},[Ee]),Oe=G.useCallback(()=>{ce.current&&=(ce.current(),null)},[]);G.useEffect(()=>{we||(De(),Oe())},[we,De,Oe]),G.useEffect(()=>()=>{De(),Oe(),Te()},[De,Oe,Te]),G.useEffect(()=>{if(!we||!Ce||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ye(Ce.clientWidth)});return e.observe(Ce),()=>{e.disconnect()}},[we,Ce,a]),G.useEffect(()=>{l&&te&&he&&!H&&(ye(a?null:Ce.clientWidth),B.current.focus())},[he,a]),G.useEffect(()=>{i&&B.current.focus()},[i]),G.useEffect(()=>{if(!g)return;let e=nt(B.current).getElementById(g);if(e){let t=()=>{getSelection().isCollapsed&&B.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[g]);let ke=c((e,t)=>{e||(De(),Oe()),e?(Te(),xe(sl(t)),D&&D(t)):(xe(null),C&&C(t)),H||(oe.current=e,ye(a?null:Ce.clientWidth),ne(e))}),Ae=()=>{De(),se.current?pe.start(fu,()=>{ue.current.allowUnselectedMouseUp=!0,fe.start(fu,()=>{ue.current.allowSelectedMouseUp=!0})}):fe.start(du,()=>{ue.current.allowSelectedMouseUp=!0,ue.current.allowUnselectedMouseUp=!0})},je=e=>{if(E?.(e),e.button!==0||(e.preventDefault(),!B.current))return;B.current.focus();let t=nt(e.currentTarget);Ae(),Oe();let n=e=>{ce.current=null,B.current&&(vu(e,B.current)||vu(e,ae.current)||!oe.current&&H||ke(!1,e))};t.addEventListener(`mouseup`,n,{capture:!0,once:!0}),ce.current=()=>{t.removeEventListener(`mouseup`,n,!0)},ke(!0,e)},Me=e=>{ke(!1,e)},Ne=G.Children.toArray(o),Pe=e=>{let t=Ne.find(t=>t.props.value===e.target.value);t!==void 0&&(z(t.props.value),S&&S(e,t))},Fe=(e,t,n)=>{if(z(n),S){let r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:b}}),S(i,t)}},Ie=e=>t=>{le.current=!1;let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(y){n=Array.isArray(R)?R.slice():[];let t=R.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),R!==n&&Fe(t,e,n),y||ke(!1,t)}},Le=(e,t)=>n=>{if(e.props.onMouseUp?.(n),le.current){le.current=!1;return}let r=!ue.current.allowSelectedMouseUp&&t,i=!ue.current.allowUnselectedMouseUp&&!t;r||i||n.currentTarget.click()},Re=e=>{let t=de.current,n=t.buffer!==``;if(we||y||d||e.defaultPrevented||e.nativeEvent?.isComposing||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey||e.key===mu&&!n)return!1;e.key===mu&&e.preventDefault();let r=t.buffer===``,{options:i,selectedIndex:a}=cu(Ne,R);if(i.length===0)return e.key!==mu&&Te(),!0;r&&(t.previousSearchIndex=a);let o=e.key.toLowerCase();t.buffer===o&&su(i,o)&&(t.buffer=``,t.previousSearchIndex=t.matchedIndex),t.buffer+=o,me.start(pu,Te);let s=ou(i,t.buffer,(t.previousSearchIndex??-1)+1);if(s!==-1){let n=i[s];return t.matchedIndex=s,ll(R,n.value)||Fe(e,n.child,n.value),!0}return e.key!==mu&&Te(),!0},ze=e=>{if(!k){let t=Re(e),n=e.key===mu||e.key===hu||e.key===gu||e.key===_u;!t&&n&&(e.preventDefault(),ke(!0,e)),T?.(e)}},Be=e=>{Te(),!we&&x&&(Object.defineProperty(e,"target",{writable:!0,value:{value:R,name:b}}),x(e))},Ve=e=>t=>{e?.props?.onKeyDown?.(t),t.key===mu&&t.target===t.currentTarget&&!t.defaultPrevented&&(t.preventDefault(),t.repeat||t.currentTarget.click())};delete I[`aria-invalid`];let He,Ue,We=[],Ge=!1,Ke=!1;(ot({value:R})||f)&&(A?He=A(R):Ge=!0);let qe=Ne.map(e=>{if(!G.isValidElement(e))return null;let t;if(y){if(!Array.isArray(R))throw Error(ie(2));t=R.some(t=>ll(t,e.props.value)),t&&Ge&&We.push(e.props.children)}else t=ll(R,e.props.value),t&&Ge&&(Ue=e.props.children);return t&&(Ke=!0),G.cloneElement(e,{"aria-selected":t?`true`:`false`,onMouseDown:t=>{le.current=!0,e.props.onMouseDown?.(t)},onPointerDown:t=>{le.current=!0,e.props.onPointerDown?.(t)},onClick:Ie(e),onMouseUp:Le(e,t),onKeyUp:t=>{t.key===mu&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},onKeyDown:Ve(e),role:`option`,selected:t,value:void 0,"data-value":e.props.value})});tt(()=>{se.current=Ke,!we&&!y&&!Ke&&Te()},[Ke,y,we,Te]),Ge&&(He=y?We.length===0?null:We.reduce((e,t,n)=>(e.push(t),n{let{classes:t}=e,n=g({root:[`root`]},_s,t);return{...t,...n}},Tu={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>_(e)&&e!==`variant`},Eu=m(Js,Tu)(``),Du=m(tu,Tu)(``),Ou=m(Ss,Tu)(``),ku=G.forwardRef(function(e,t){let n=x({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=na,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:y,onOpen:b,open:S,renderValue:C,SelectDisplayProps:w,variant:T=`outlined`,...E}=n,D=_?Kl:Cu,[O]=Qe({props:n,states:[`variant`,`error`]}),k=O.variant||T,A={...n,variant:k,classes:a},j=wu(A),{root:M,...N}=j,P=d||{standard:(0,W.jsx)(Eu,{ownerState:A}),outlined:(0,W.jsx)(Du,{label:p,ownerState:A}),filled:(0,W.jsx)(Ou,{ownerState:A})}[k],ee=v(t,ji(P));return(0,W.jsx)(G.Fragment,{children:G.cloneElement(P,{inputComponent:D,inputProps:{children:i,error:O.error,IconComponent:l,variant:k,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:y,onOpen:b,open:S,renderValue:C,SelectDisplayProps:{id:u,...w}},...f,classes:f?xe(N,f.classes):N,...d?d.props.inputProps:{}},...(g&&_||c)&&k===`outlined`?{notched:!0}:{},ref:ee,className:V(P.props.className,o,j.root),...!d&&{variant:k},...E})})});ku.muiName=`Select`;function Au(e){return U(`MuiSkeleton`,e)}z(`MuiSkeleton`,[`root`,`text`,`rectangular`,`rounded`,`circular`,`pulse`,`wave`,`withChildren`,`fitContent`,`heightAuto`]);var ju=e=>{let{classes:t,variant:n,animation:r,hasChildren:i,width:a,height:o}=e;return g({root:[`root`,n,r,i&&`withChildren`,i&&!a&&`fitContent`,i&&!o&&`heightAuto`]},Au,t)},Mu=ne` + 0% { + opacity: 1; + } + + 50% { + opacity: 0.4; + } + + 100% { + opacity: 1; + } +`,Nu=ne` + 0% { + transform: translateX(-100%); + } + + 50% { + /* +0.5s of delay between each loop */ + transform: translateX(100%); + } + + 100% { + transform: translateX(100%); + } +`,Pu=typeof Mu==`string`?null:R` + animation: ${Mu} 2s ease-in-out 0.5s infinite; + `,Fu=typeof Nu==`string`?null:R` + &::after { + animation: ${Nu} 2s linear 0.5s infinite; + } + `,Iu=m(`span`,{name:`MuiSkeleton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(d(({theme:e})=>{let t=Rt(e.shape.borderRadius)||`px`,n=zt(e.shape.borderRadius),r=u(e,{animation:`none`}),i=u(e,{"&::after":{animation:`none`,display:`none`}});return{display:`block`,backgroundColor:e.vars?e.vars.palette.Skeleton.bg:e.alpha(e.palette.text.primary,e.palette.mode===`light`?.11:.13),height:`1.2em`,variants:[{props:{variant:`text`},style:{marginTop:0,marginBottom:0,height:`auto`,transformOrigin:`0 55%`,transform:`scale(1, 0.60)`,borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:`"\\00a0"`}}},{props:{variant:`circular`},style:{borderRadius:`50%`}},{props:{variant:`rounded`},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:`hidden`}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:`fit-content`}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:`auto`}},{props:{animation:`pulse`},style:Pu||{animation:`${Mu} 2s ease-in-out 0.5s infinite`}},...r?[{props:{animation:`pulse`},style:r}]:[],{props:{animation:`wave`},style:{position:`relative`,overflow:`hidden`,WebkitMaskImage:`-webkit-radial-gradient(white, black)`,"&::after":{background:`linear-gradient( + 90deg, + transparent, + ${(e.vars||e).palette.action.hover}, + transparent + )`,content:`""`,position:`absolute`,transform:`translateX(-100%)`,bottom:0,left:0,right:0,top:0}}},{props:{animation:`wave`},style:Fu||{"&::after":{animation:`${Nu} 2s linear 0.5s infinite`}}},...i?[{props:{animation:`wave`},style:i}]:[]]}})),Lu=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiSkeleton`}),{animation:r=`pulse`,className:i,component:a=`span`,height:o,style:s,variant:c=`text`,width:l,...u}=n,d={...n,animation:r,component:a,variant:c,hasChildren:!!u.children},f=ju(d);return(0,W.jsx)(Iu,{as:a,ref:t,className:V(f.root,i),ownerState:d,...u,style:{width:l,height:o,...s}})});function Ru(e){return U(`MuiTooltip`,e)}var zu=z(`MuiTooltip`,[`popper`,`popperInteractive`,`popperArrow`,`popperClose`,`tooltip`,`tooltipArrow`,`touch`,`tooltipPlacementLeft`,`tooltipPlacementRight`,`tooltipPlacementTop`,`tooltipPlacementBottom`,`arrow`]);function Bu(e){return Math.round(e*1e5)/1e5}var Vu=e=>{let{classes:t,disableInteractive:n,arrow:r,touch:i,placement:a}=e,o={popper:[`popper`,!n&&`popperInteractive`,r&&`popperArrow`],tooltip:[`tooltip`,r&&`tooltipArrow`,i&&`touch`,`tooltipPlacement${y(a.split(`-`)[0])}`],arrow:[`arrow`]};return g(o,Ru,t)},Hu=m(Ui,{name:`MuiTooltip`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(d(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:`none`,variants:[{props:({ownerState:e,open:t})=>t&&!e.disableInteractive,style:{pointerEvents:`auto`}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${zu.arrow}`]:{top:0,marginTop:`-0.71em`,"&::before":{transformOrigin:`0 100%`}},[`&[data-popper-placement*="top"] .${zu.arrow}`]:{bottom:0,marginBottom:`-0.71em`,"&::before":{transformOrigin:`100% 0`}},[`&[data-popper-placement*="right"] .${zu.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineStart:0,marginInlineStart:`-0.71em`,"&::before":{transformOrigin:`100% 100%`}},[`&[data-popper-placement*="left"] .${zu.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineEnd:0,marginInlineEnd:`-0.71em`,"&::before":{transformOrigin:`0 0`}}}}]}))),Uu=m(`div`,{name:`MuiTooltip`,slot:`Tooltip`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${y(n.placement.split(`-`)[0])}`]]}})(d(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:`4px 8px`,fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:`break-word`,fontWeight:e.typography.fontWeightMedium,[`.${zu.popper}[data-popper-placement*="left"] &`]:{transformOrigin:`right center`,marginInlineEnd:`14px`},[`.${zu.popper}[data-popper-placement*="right"] &`]:{transformOrigin:`left center`,marginInlineStart:`14px`},[`.${zu.popper}[data-popper-placement*="top"] &`]:{transformOrigin:`center bottom`,marginBottom:`14px`},[`.${zu.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:`center top`,marginTop:`14px`},variants:[{props:({ownerState:e})=>e.arrow,style:{position:`relative`,marginBlock:0}},{props:({ownerState:e})=>e.touch,style:{padding:`8px 16px`,fontSize:e.typography.pxToRem(14),lineHeight:`${Bu(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>e.touch,style:{[`.${zu.popper}[data-popper-placement*="left"] &`]:{marginInlineEnd:`24px`},[`.${zu.popper}[data-popper-placement*="right"] &`]:{marginInlineStart:`24px`},[`.${zu.popper}[data-popper-placement*="top"] &`]:{marginBottom:`24px`},[`.${zu.popper}[data-popper-placement*="bottom"] &`]:{marginTop:`24px`}}}]}))),Wu=m(`span`,{name:`MuiTooltip`,slot:`Arrow`})(d(({theme:e})=>({overflow:`hidden`,position:`absolute`,width:`1em`,height:`0.71em`,boxSizing:`border-box`,color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:`""`,margin:`auto`,display:`block`,width:`100%`,height:`100%`,backgroundColor:`currentColor`,transform:`rotate(45deg)`}}))),Gu=!1,Ku=new Ce,qu={x:0,y:0};function Ju(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}var Yu=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTooltip`}),{arrow:r=!1,children:i,classes:a,describeChild:o=!1,disableFocusListener:s=!1,disableHoverListener:l=!1,disableInteractive:u=!1,disableTouchListener:d=!1,enterDelay:f=100,enterNextDelay:p=0,enterTouchDelay:m=700,followCursor:h=!1,id:g,leaveDelay:_=0,leaveTouchDelay:y=1500,onClose:b,onOpen:S,open:C,placement:w=`bottom`,slotProps:T={},slots:E={},title:D,...O}=n,k=G.isValidElement(i)?i:(0,W.jsx)(`span`,{children:i}),A=ke(),[j,M]=G.useState(),[N,P]=G.useState(null),ee=G.useRef(!1),F=u||h,I=L(),R=L(),z=L(),te=L(),[ne,re]=qt({controlled:C,default:!1,name:`Tooltip`,state:`open`}),ie=ne,ae=Ee(g),oe=G.useRef(),se=c(()=>{oe.current!==void 0&&(document.body.style.WebkitUserSelect=oe.current,oe.current=void 0),te.clear()});G.useEffect(()=>se,[se]);let ce=e=>{Ku.clear(),Gu=!0,re(!0),S&&!ie&&S(e)},le=c(e=>{Ku.start(800+_,()=>{Gu=!1}),re(!1),b&&ie&&b(e),I.start(A.transitions.duration.shortest,()=>{ee.current=!1})}),ue=e=>{j?.disabled||ee.current&&e.type!==`touchstart`||(j&&j.removeAttribute(`title`),R.clear(),z.clear(),f||Gu&&p?R.start(Gu?p:f,()=>{ce(e)}):ce(e))},de=e=>{R.clear(),z.start(_,()=>{le(e)})},[,fe]=G.useState(!1),pe=e=>{let t=e?.target??j;if(!t||t.disabled||!ge(t)){fe(!1);let n=e??new Event(`blur`);!e&&t&&(Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t})),de(n)}},me=e=>{if(j||M(e.currentTarget),ge(e.target)){let t=e=>{e.target.disabled&&pe(e),e.target.removeEventListener(`blur`,t)};e.target.addEventListener(`blur`,t),fe(!0),ue(e)}},he=e=>{ee.current=!0;let t=k.props;t.onTouchStart&&t.onTouchStart(e)},H=e=>{he(e),z.clear(),I.clear(),se(),oe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect=`none`,te.start(m,()=>{document.body.style.WebkitUserSelect=oe.current,ue(e)})},_e=e=>{k.props.onTouchEnd&&k.props.onTouchEnd(e),se(),z.start(y,()=>{le(e)})};G.useEffect(()=>{if(!ie)return;function e(e){e.key===`Escape`&&le(e)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[le,ie]);let ve=v(ji(k),M,t);!D&&D!==0&&(ie=!1);let ye=G.useRef(),be=e=>{let t=k.props;t.onMouseMove&&t.onMouseMove(e),qu={x:e.clientX,y:e.clientY},ye.current&&ye.current.update()},xe={},Se=typeof D==`string`;o?(xe.title=!ie&&Se&&!l?D:null,xe[`aria-describedby`]=ie?ae:null):(xe[`aria-label`]=Se?D:null,xe[`aria-labelledby`]=ie&&!Se?ae:null);let U={...xe,...O,...k.props,className:V(O.className,k.props.className),onTouchStart:he,ref:ve,...h?{onMouseMove:be}:{}},Ce={};d||(U.onTouchStart=H,U.onTouchEnd=_e),l||(U.onMouseOver=Ju(ue,U.onMouseOver),U.onMouseLeave=Ju(de,U.onMouseLeave),F||(Ce.onMouseOver=ue,Ce.onMouseLeave=de)),s||(U.onFocus=Ju(me,U.onFocus),U.onBlur=Ju(pe,U.onBlur),F||(Ce.onFocus=me,Ce.onBlur=pe));let we={...n,arrow:r,disableInteractive:F,placement:w,touch:ee.current},Te=typeof T.popper==`function`?T.popper(we):T.popper,De=G.useMemo(()=>{let e=[{name:`arrow`,enabled:!!N,options:{element:N,padding:4}}];return Te?.popperOptions?.modifiers&&(e=e.concat(Te.popperOptions.modifiers)),{...Te?.popperOptions,modifiers:e}},[N,Te?.popperOptions]),Oe=Vu(we),Ae={slots:E,slotProps:{arrow:T.arrow,popper:Te,tooltip:T.tooltip,transition:T.transition}},[je,Me]=B(`popper`,{elementType:Hu,externalForwardedProps:Ae,ownerState:we,className:Oe.popper}),[Ne,Pe]=B(`transition`,{elementType:Hs,externalForwardedProps:Ae,ownerState:we}),[Fe,Ie]=B(`tooltip`,{elementType:Uu,className:Oe.tooltip,externalForwardedProps:Ae,ownerState:we}),[Le,Re]=B(`arrow`,{elementType:Wu,className:Oe.arrow,externalForwardedProps:Ae,ownerState:we,ref:P});return(0,W.jsxs)(G.Fragment,{children:[G.cloneElement(k,U),(0,W.jsx)(je,{as:Ui,placement:w,anchorEl:h?{getBoundingClientRect:()=>({top:qu.y,left:qu.x,right:qu.x,bottom:qu.y,width:0,height:0})}:j,popperRef:ye,open:j?ie:!1,id:ae,transition:!0,...Ce,...Me,popperOptions:De,children:({TransitionProps:e})=>(0,W.jsx)(Ne,{timeout:A.transitions.duration.shorter,...e,...Pe,children:(0,W.jsxs)(Fe,{...Ie,children:[D,r?(0,W.jsx)(Le,{...Re}):null]})})})]})});function Xu(e){return U(`MuiSwitch`,e)}var Zu=z(`MuiSwitch`,[`root`,`edgeStart`,`edgeEnd`,`switchBase`,`colorPrimary`,`colorSecondary`,`sizeSmall`,`sizeMedium`,`checked`,`disabled`,`input`,`thumb`,`track`]),Qu=e=>{let{classes:t,edge:n,size:r,color:i,checked:a,disabled:o}=e,s={root:[`root`,n&&`edge${y(n)}`,`size${y(r)}`],switchBase:[`switchBase`,`color${y(i)}`,a&&`checked`,o&&`disabled`],thumb:[`thumb`],track:[`track`],input:[`input`]},c=g(s,Xu,t);return{...t,...c}},$u=m(`span`,{name:`MuiSwitch`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.edge&&t[`edge${y(n.edge)}`],t[`size${y(n.size)}`]]}})({display:`inline-flex`,width:58,height:38,overflow:`hidden`,padding:12,boxSizing:`border-box`,position:`relative`,flexShrink:0,zIndex:0,verticalAlign:`middle`,"@media print":{colorAdjust:`exact`},variants:[{props:{edge:`start`},style:{marginLeft:-8}},{props:{edge:`end`},style:{marginRight:-8}},{props:{size:`small`},style:{width:40,height:24,padding:7,[`& .${Zu.thumb}`]:{width:16,height:16},[`& .${Zu.switchBase}`]:{padding:4,[`&.${Zu.checked}`]:{transform:`translateX(16px)`}}}}]}),ed=m(to,{name:`MuiSwitch`,slot:`SwitchBase`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.switchBase,{[`& .${Zu.input}`]:t.input},n.color!=="default"&&t[`color${y(n.color)}`]]}})(d(({theme:e})=>({position:`absolute`,top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode===`light`?e.palette.common.white:e.palette.grey[300]}`,...ce(e,[`left`,`transform`],{duration:e.transitions.duration.shortest}),[`&.${Zu.checked}`]:{transform:`translateX(20px)`},[`&.${Zu.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode===`light`?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Zu.checked} + .${Zu.track}`]:{opacity:.5},[`&.${Zu.disabled} + .${Zu.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode===`light`?.12:.2}`},[`& .${Zu.input}`]:{left:`-100%`,width:`300%`}})),d(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},variants:[...Object.entries(e.palette).filter(F([`light`])).map(([t])=>({props:{color:t},style:{[`&.${Zu.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${Zu.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode===`light`?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${Zu.checked} + .${Zu.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),td=m(`span`,{name:`MuiSwitch`,slot:`Track`})(d(({theme:e})=>({height:`100%`,width:`100%`,borderRadius:7,zIndex:-1,...ce(e,[`opacity`,`background-color`],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{boxSizing:`border-box`,border:`1px solid ButtonBorder`},backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode===`light`?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode===`light`?.38:.3}`}))),nd=m(`span`,{name:`MuiSwitch`,slot:`Thumb`})(d(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:`currentColor`,boxSizing:`border-box`,border:`1px solid transparent`,width:20,height:20,borderRadius:`50%`}))),rd=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiSwitch`}),{className:r,color:i=`primary`,edge:a=!1,size:o=`medium`,sx:s,slots:c={},slotProps:l={},...u}=n,d={...n,color:i,edge:a,size:o},f=Qu(d),p=l.input,m={slots:c,slotProps:l},[h,g]=B(`root`,{className:V(f.root,r),elementType:$u,externalForwardedProps:m,ownerState:d,additionalProps:{sx:s}}),[_,v]=B(`thumb`,{className:f.thumb,elementType:nd,externalForwardedProps:m,ownerState:d}),y=(0,W.jsx)(_,{...v}),[b,S]=B(`track`,{className:f.track,elementType:td,externalForwardedProps:m,ownerState:d});return(0,W.jsxs)(h,{...g,children:[(0,W.jsx)(ed,{type:`checkbox`,icon:y,checkedIcon:y,ref:t,ownerState:d,...u,classes:{...f,root:f.switchBase},slots:{...c.switchBase&&{root:c.switchBase},...c.input&&{input:c.input}},slotProps:{...l.switchBase&&{root:typeof l.switchBase==`function`?l.switchBase(d):l.switchBase},input:Jt(typeof p==`function`?p(d):p,{role:`switch`})}}),(0,W.jsx)(b,{...S})]})});function id(e){return U(`MuiTab`,e)}var ad=z(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`icon`]),od=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e,l={root:[`root`,a&&o&&`labelIcon`,`textColor${y(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`icon`]};return g(l,id,t)},sd=m(le,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${y(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${ad.icon}`]:t.icon}]}})(d(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${ad.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${ad.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${ad.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${ad.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${ad.selected}`]:{opacity:1},[`&.${ad.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${ad.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${ad.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${ad.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${ad.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),cd=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b=Lc(),S=Hc({id:_,ref:t,disabled:i,selected:m}),C=b.getItemMap().size===0&&m?0:S.tabIndex,w={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},T=od(w),E=s&&u&&G.isValidElement(s)?G.cloneElement(s,{className:V(T.icon,s.props.className)}):s;return(0,W.jsxs)(sd,{internalNativeButton:!0,focusRipple:!a,className:V(T.root,r),ref:S.ref,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},tabIndex:C,ownerState:w,...y,children:[c===`top`||c===`start`?(0,W.jsxs)(G.Fragment,{children:[E,u]}):(0,W.jsxs)(G.Fragment,{children:[u,E]}),l]})}),ld=G.createContext();function ud(e){return U(`MuiTable`,e)}z(`MuiTable`,[`root`,`stickyHeader`]);var dd=e=>{let{classes:t,stickyHeader:n}=e;return g({root:[`root`,n&&`stickyHeader`]},ud,t)},fd=m(`table`,{name:`MuiTable`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(d(({theme:e})=>({display:`table`,width:`100%`,borderCollapse:`collapse`,borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:`left`,captionSide:`bottom`},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:`separate`}}]}))),pd=`table`,md=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTable`}),{className:r,component:i=pd,padding:a=`normal`,size:o=`medium`,stickyHeader:s=!1,...c}=n,l={...n,component:i,padding:a,size:o,stickyHeader:s},u=dd(l),d=G.useMemo(()=>({padding:a,size:o,stickyHeader:s}),[a,o,s]);return(0,W.jsx)(ld.Provider,{value:d,children:(0,W.jsx)(fd,{as:i,role:i===pd?null:`table`,ref:t,className:V(u.root,r),ownerState:l,...c})})}),hd=G.createContext();function gd(e){return U(`MuiTableBody`,e)}z(`MuiTableBody`,[`root`]);var _d=e=>{let{classes:t}=e;return g({root:[`root`]},gd,t)},vd=m(`tbody`,{name:`MuiTableBody`,slot:`Root`})({display:`table-row-group`}),yd={variant:`body`},bd=`tbody`,xd=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTableBody`}),{className:r,component:i=bd,...a}=n,o={...n,component:i},s=_d(o);return(0,W.jsx)(hd.Provider,{value:yd,children:(0,W.jsx)(vd,{className:V(s.root,r),as:i,ref:t,role:i===bd?null:`rowgroup`,ownerState:o,...a})})});function Sd(e){return U(`MuiTableCell`,e)}var Cd=z(`MuiTableCell`,[`root`,`head`,`body`,`footer`,`sizeSmall`,`sizeMedium`,`paddingCheckbox`,`paddingNone`,`alignLeft`,`alignCenter`,`alignRight`,`alignJustify`,`stickyHeader`]),wd=e=>{let{classes:t,variant:n,align:r,padding:i,size:a,stickyHeader:o}=e,s={root:[`root`,n,o&&`stickyHeader`,r!==`inherit`&&`align${y(r)}`,i!==`normal`&&`padding${y(i)}`,`size${y(a)}`]};return g(s,Sd,t)},Td=m(`td`,{name:`MuiTableCell`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${y(n.size)}`],n.padding!==`normal`&&t[`padding${y(n.padding)}`],n.align!==`inherit`&&t[`align${y(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(d(({theme:e})=>({...e.typography.body2,display:`table-cell`,verticalAlign:`inherit`,borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid + ${e.palette.mode===`light`?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}`,textAlign:`left`,padding:16,variants:[{props:{variant:`head`},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:`body`},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:`footer`},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:`small`},style:{padding:`6px 16px`,[`&.${Cd.paddingCheckbox}`]:{width:24,padding:`0 12px 0 16px`,"& > *":{padding:0}}}},{props:{padding:`checkbox`},style:{width:48,padding:`0 0 0 4px`}},{props:{padding:`none`},style:{padding:0}},{props:{align:`left`},style:{textAlign:`left`}},{props:{align:`center`},style:{textAlign:`center`}},{props:{align:`right`},style:{textAlign:`right`,flexDirection:`row-reverse`}},{props:{align:`justify`},style:{textAlign:`justify`}},{props:({ownerState:e})=>e.stickyHeader,style:{position:`sticky`,top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),Ed=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTableCell`}),{align:r=`inherit`,className:i,component:a,padding:o,scope:s,size:c,sortDirection:l,variant:u,...d}=n,f=G.useContext(ld),p=G.useContext(hd),m=p&&p.variant===`head`,h;h=a||(m?`th`:`td`);let g=s;h===`td`?g=void 0:!g&&m&&(g=`col`);let _=u||p&&p.variant,v={...n,align:r,component:h,padding:o||(f&&f.padding?f.padding:`normal`),size:c||(f&&f.size?f.size:`medium`),sortDirection:l,stickyHeader:_===`head`&&f&&f.stickyHeader,variant:_},y=wd(v),b=null;return l&&(b=l===`asc`?`ascending`:`descending`),(0,W.jsx)(Td,{as:h,ref:t,className:V(y.root,i),"aria-sort":b,scope:g,ownerState:v,...d})});function Dd(e){return U(`MuiTableContainer`,e)}z(`MuiTableContainer`,[`root`]);var Od=e=>{let{classes:t}=e;return g({root:[`root`]},Dd,t)},kd=m(`div`,{name:`MuiTableContainer`,slot:`Root`})({width:`100%`,overflowX:`auto`}),Ad=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTableContainer`}),{className:r,component:i=`div`,...a}=n,o={...n,component:i},s=Od(o);return(0,W.jsx)(kd,{ref:t,as:i,className:V(s.root,r),ownerState:o,...a})});function jd(e){return U(`MuiTableHead`,e)}z(`MuiTableHead`,[`root`]);var Md=e=>{let{classes:t}=e;return g({root:[`root`]},jd,t)},Nd=m(`thead`,{name:`MuiTableHead`,slot:`Root`})({display:`table-header-group`}),Pd={variant:`head`},Fd=`thead`,Id=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTableHead`}),{className:r,component:i=Fd,...a}=n,o={...n,component:i},s=Md(o);return(0,W.jsx)(hd.Provider,{value:Pd,children:(0,W.jsx)(Nd,{as:i,className:V(s.root,r),ref:t,role:i===Fd?null:`rowgroup`,ownerState:o,...a})})}),Ld=T((0,W.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),Rd=T((0,W.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function zd(e){return U(`MuiTablePaginationActions`,e)}z(`MuiTablePaginationActions`,[`root`]);var Bd=e=>{let{classes:t}=e;return g({root:[`root`]},zd,t)},Vd=m(`div`,{name:`MuiTablePaginationActions`,slot:`Root`})({}),Hd=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTablePaginationActions`}),{className:r,count:i,disabled:a=!1,getItemAriaLabel:o,onPageChange:s,page:c,rowsPerPage:l,showFirstButton:u,showLastButton:d,slots:f={},slotProps:p={},...m}=n,h=Ie(),g=Bd(n),_=e=>{s(e,0)},v=e=>{s(e,c-1)},y=e=>{s(e,c+1)},b=e=>{s(e,Math.max(0,Math.ceil(i/l)-1))},S=f.firstButton??N,C=f.lastButton??N,w=f.nextButton??N,T=f.previousButton??N,E=f.firstButtonIcon??nu,D=f.lastButtonIcon??ru,O=f.nextButtonIcon??Rd,k=f.previousButtonIcon??Ld,A=h?C:S,j=h?w:T,M=h?T:w,P=h?S:C,ee=h?p.lastButton:p.firstButton,F=h?p.nextButton:p.previousButton,I=h?p.previousButton:p.nextButton,L=h?p.firstButton:p.lastButton;return(0,W.jsxs)(Vd,{ref:t,className:V(g.root,r),...m,children:[u&&(0,W.jsx)(A,{onClick:_,disabled:a||c===0,"aria-label":o(`first`,c),title:o(`first`,c),...ee,children:h?(0,W.jsx)(D,{...p.lastButtonIcon}):(0,W.jsx)(E,{...p.firstButtonIcon})}),(0,W.jsx)(j,{onClick:v,disabled:a||c===0,color:`inherit`,"aria-label":o(`previous`,c),title:o(`previous`,c),...F,children:h?(0,W.jsx)(O,{...p.nextButtonIcon}):(0,W.jsx)(k,{...p.previousButtonIcon})}),(0,W.jsx)(M,{onClick:y,disabled:a||i!==-1&&c>=Math.ceil(i/l)-1,color:`inherit`,"aria-label":o(`next`,c),title:o(`next`,c),...I,children:h?(0,W.jsx)(k,{...p.previousButtonIcon}):(0,W.jsx)(O,{...p.nextButtonIcon})}),d&&(0,W.jsx)(P,{onClick:b,disabled:a||c>=Math.ceil(i/l)-1,"aria-label":o(`last`,c),title:o(`last`,c),...L,children:h?(0,W.jsx)(E,{...p.firstButtonIcon}):(0,W.jsx)(D,{...p.lastButtonIcon})})]})});function Ud(e){return U(`MuiTablePagination`,e)}var Wd=z(`MuiTablePagination`,[`root`,`toolbar`,`spacer`,`selectLabel`,`selectRoot`,`select`,`selectIcon`,`input`,`menuItem`,`displayedRows`,`actions`]),Gd=e=>{let t;if(typeof Intl<`u`&&Intl.NumberFormat)try{t=new Intl.NumberFormat(e)}catch{}return e=>Number.isFinite(e)&&t?t.format(e):String(e)},Kd,qd=Gd(`en-US`),Jd=m(Ed,{name:`MuiTablePagination`,slot:`Root`})(d(({theme:e})=>({overflow:`auto`,color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),Yd=m(Se,{name:`MuiTablePagination`,slot:`Toolbar`,overridesResolver:(e,t)=>({[`& .${Wd.actions}`]:t.actions,...t.toolbar})})(d(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up(`xs`)} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up(`sm`)]:{minHeight:52,paddingRight:2},[`& .${Wd.actions}`]:{flexShrink:0,marginLeft:20}}))),Xd=m(`div`,{name:`MuiTablePagination`,slot:`Spacer`})({flex:`1 1 100%`}),Zd=m(`p`,{name:`MuiTablePagination`,slot:`SelectLabel`})(d(({theme:e})=>({...e.typography.body2,flexShrink:0}))),Qd=m(ku,{name:`MuiTablePagination`,slot:`Select`,overridesResolver:(e,t)=>({[`& .${Wd.selectIcon}`]:t.selectIcon,[`& .${Wd.select}`]:t.select,...t.input,...t.selectRoot})})({color:`inherit`,fontSize:`inherit`,flexShrink:0,marginRight:32,marginLeft:8,[`& .${Wd.select}`]:{paddingLeft:8,paddingRight:24,textAlign:`right`,textAlignLast:`right`}}),$d=m(yt)(d(({theme:e})=>({[`& .${Wd.select}:focus`]:{backgroundColor:(e.vars||e).palette.action.focus}}))),ef=m(Bl,{name:`MuiTablePagination`,slot:`MenuItem`})({}),tf=m(`p`,{name:`MuiTablePagination`,slot:`DisplayedRows`})(d(({theme:e})=>({...e.typography.body2,flexShrink:0})));function nf({from:e,to:t,count:n}){return`${qd(e)}–${qd(t)} of ${n===-1?`more than ${qd(t)}`:qd(n)}`}function rf(e){return`Go to ${e} page`}var af=e=>{let{classes:t}=e;return g({root:[`root`],toolbar:[`toolbar`],spacer:[`spacer`],selectLabel:[`selectLabel`],select:[`select`],input:[`input`],selectIcon:[`selectIcon`],menuItem:[`menuItem`],displayedRows:[`displayedRows`],actions:[`actions`]},Ud,t)},of=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTablePagination`}),{ActionsComponent:r=Hd,colSpan:i,component:a=Ed,count:o,disabled:s=!1,getItemAriaLabel:c=rf,labelDisplayedRows:l=nf,labelRowsPerPage:u=`Rows per page:`,onPageChange:d,onRowsPerPageChange:f,page:p,rowsPerPage:m,rowsPerPageOptions:h=[10,25,50,100],showFirstButton:g=!1,showLastButton:_=!1,slotProps:v={},slots:y={},...b}=n,S=n,C=af(S),w=typeof v?.select==`function`?v.select(S):v?.select??{},T=w.native?`option`:ef,E;(a===Ed||a===`td`)&&(E=i||1e3);let D=Ee(w.id),O=Ee(w.labelId),k=()=>o===-1?(p+1)*m:m===-1?o:Math.min(o,(p+1)*m),A={slots:y,slotProps:v},[j,M]=B(`root`,{ref:t,className:C.root,elementType:Jd,externalForwardedProps:{...A,component:a,...b},ownerState:S,additionalProps:{colSpan:E}}),[N,P]=B(`toolbar`,{className:C.toolbar,elementType:Yd,externalForwardedProps:A,ownerState:S}),[ee,F]=B(`spacer`,{className:C.spacer,elementType:Xd,externalForwardedProps:A,ownerState:S}),[I,L]=B(`selectLabel`,{className:C.selectLabel,elementType:Zd,externalForwardedProps:A,ownerState:S,additionalProps:{id:O}}),[R,z]=B(`select`,{className:C.select,elementType:Qd,externalForwardedProps:A,ownerState:S}),[te,ne]=B(`menuItem`,{className:C.menuItem,elementType:T,externalForwardedProps:A,ownerState:S}),[re,ie]=B(`displayedRows`,{className:C.displayedRows,elementType:tf,externalForwardedProps:A,ownerState:S});return(0,W.jsx)(j,{...M,children:(0,W.jsxs)(N,{...P,children:[(0,W.jsx)(ee,{...F}),h.length>1&&(0,W.jsx)(I,{...L,children:u}),h.length>1&&(0,W.jsx)(R,{variant:`standard`,...!w.variant&&{input:Kd||=(0,W.jsx)($d,{})},value:m,onChange:f,id:D,labelId:O,...w,classes:{...w.classes,root:V(C.input,C.selectRoot,(w.classes||{}).root),select:V(C.select,(w.classes||{}).select),icon:V(C.selectIcon,(w.classes||{}).icon)},disabled:s,...z,children:h.map(e=>(0,G.createElement)(te,{...ne,key:e.label?e.label:e,value:e.value?e.value:e},e.label?e.label:e))}),(0,W.jsx)(re,{...ie,children:l({from:o===0?0:p*m+1,to:k(),count:o===-1?-1:o,page:p})}),(0,W.jsx)(r,{className:C.actions,count:o,onPageChange:d,page:p,rowsPerPage:m,showFirstButton:g,showLastButton:_,slotProps:v.actions,slots:y.actions,getItemAriaLabel:c,disabled:s})]})})});function sf(e){return U(`MuiTableRow`,e)}var cf=z(`MuiTableRow`,[`root`,`selected`,`hover`,`head`,`footer`]),lf=e=>{let{classes:t,selected:n,hover:r,head:i,footer:a}=e;return g({root:[`root`,n&&`selected`,r&&`hover`,i&&`head`,a&&`footer`]},sf,t)},uf=m(`tr`,{name:`MuiTableRow`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(d(({theme:e})=>({color:`inherit`,display:`table-row`,verticalAlign:`middle`,outline:0,[`&.${cf.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${cf.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)}}}))),df=`tr`,ff=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTableRow`}),{className:r,component:i=df,hover:a=!1,selected:o=!1,...s}=n,c=G.useContext(hd),l={...n,component:i,hover:a,selected:o,head:c&&c.variant===`head`,footer:c&&c.variant===`footer`},u=lf(l);return(0,W.jsx)(uf,{as:i,ref:t,className:V(u.root,r),role:i===df?null:`row`,ownerState:l,...s})});function pf(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function mf(e,t,n,r={},i=()=>{}){let{ease:a=pf,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);if(t[e]=a(u)*(n-c)+c,u>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var hf={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`,pointerEvents:`none`};function gf(e){let{onChange:t,...n}=e,r=G.useRef(),i=G.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return tt(()=>{let e=Ht(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=Wt(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),G.useEffect(()=>{a(),t(r.current)},[t]),(0,W.jsx)(`div`,{style:hf,...n,ref:i})}function _f(e){return U(`MuiTabScrollButton`,e)}var vf=z(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),yf=e=>{let{classes:t,orientation:n,disabled:r}=e;return g({root:[`root`,n,r&&`disabled`]},_f,t)},bf=m(le,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${vf.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),xf=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,{nativeButton:u,...d}=l,f=Ie(),p={isRtl:f,...n},m=yf(p),h=i.StartScrollButtonIcon??Ld,g=i.EndScrollButtonIcon??Rd,_=Ai({elementType:h,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p}),v=Ai({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p});return(0,W.jsx)(bf,{component:`div`,className:V(m.root,r),ref:t,role:null,ownerState:p,tabIndex:null,...d,style:{...d.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:o===`left`?(0,W.jsx)(h,{..._}):(0,W.jsx)(g,{...v})})});function Sf(e){return U(`MuiTabs`,e)}var Cf=z(`MuiTabs`,[`root`,`vertical`,`list`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),wf=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return g({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},Sf,c)},Tf=m(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Cf.scrollButtons}`]:t.scrollButtons},{[`& .${Cf.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(d(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Cf.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),Ef=m(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),Df=m(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),Of=m(`span`,{name:`MuiTabs`,slot:`Indicator`})(d(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,...ce(e),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),kf=m(gf)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),Af={},jf=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTabs`}),r=ke(),i=Ie(),a=ee(r.motion.reducedMotion,!1),{"aria-label":o,"aria-labelledby":s,action:l,centered:u=!1,children:d,className:f,component:p=`div`,allowScrollButtonsMobile:m=!1,indicatorColor:h=`primary`,onChange:g,orientation:_=`horizontal`,scrollButtons:y=`auto`,selectionFollowsFocus:b,slots:S={},slotProps:C={},textColor:w=`primary`,value:T,variant:E=`standard`,visibleScrollbar:D=!1,...O}=n,k=E===`scrollable`,A=_===`vertical`,j=A?`scrollTop`:`scrollLeft`,M=A?`top`:`left`,N=A?`bottom`:`right`,P=A?`clientHeight`:`clientWidth`,F=A?`height`:`width`,I={...n,component:p,allowScrollButtonsMobile:m,indicatorColor:h,orientation:_,vertical:A,scrollButtons:y,textColor:w,variant:E,visibleScrollbar:D,fixed:!k,hideScrollbar:k&&!D,scrollableX:k&&!A,scrollableY:k&&A,centered:u&&!k,scrollButtonsHideMobile:!m},L=wf(I),R=Ai({elementType:S.startScrollButtonIcon,externalSlotProps:C.startScrollButtonIcon,ownerState:I}),z=Ai({elementType:S.endScrollButtonIcon,externalSlotProps:C.endScrollButtonIcon,ownerState:I}),[te,ne]=G.useState(!1),[re,ie]=G.useState(Af),[ae,oe]=G.useState(!1),[se,ce]=G.useState(!1),[le,ue]=G.useState(!1),de=T===!1?null:T,[fe,pe]=G.useState(!1),[me,he]=G.useState({overflow:`hidden`,scrollbarWidth:0}),ge=new Map,H=G.useRef(null),_e=G.useRef(null),ve={slots:S,slotProps:C},ye=()=>{let e=H.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&T!==!1){let e=_e.current.children;if(e.length>0){let t=e[ge.get(T)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},be=c(()=>{let{tabsMeta:e,tabMeta:t}=ye(),n=0,r;A?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[F]:t?t[F]:0};if(typeof re[r]!=`number`||typeof re[F]!=`number`)ie(a);else{let e=Math.abs(re[r]-a[r]),t=Math.abs(re[F]-a[F]);(e>=1||t>=1)&&ie(a)}}),xe=(e,{animation:t=!0}={})=>{t&&!a.shouldReduceMotion?mf(j,H.current,e,{duration:r.transitions.duration.standard}):H.current[j]=e},Se=e=>{let t=H.current[j];t+=A?e:e*(i?-1:1),xe(t)},U=()=>{let e=H.current[P],t=0,n=Array.from(_e.current.children);for(let r=0;re){r===0&&(t=e);break}t+=i[P]}return t},Ce=()=>{Se(-1*U())},we=()=>{Se(U())},[Te,{onChange:Ee,...De}]=B(`scrollbar`,{className:V(L.scrollableX,L.hideScrollbar),elementType:kf,shouldForwardComponentProp:!0,externalForwardedProps:ve,ownerState:I}),Oe=G.useCallback(e=>{Ee?.(e),he({overflow:null,scrollbarWidth:e})},[Ee]),[Ae,je]=B(`scrollButtons`,{className:L.scrollButtons,elementType:xf,externalForwardedProps:ve,ownerState:I,additionalProps:{orientation:_,slots:{StartScrollButtonIcon:S.startScrollButtonIcon,EndScrollButtonIcon:S.endScrollButtonIcon},slotProps:{startScrollButtonIcon:R,endScrollButtonIcon:z}}}),Me=()=>{let e={};e.scrollbarSizeListener=k?(0,W.jsx)(Te,{...De,onChange:Oe}):null;let t=k&&(y===`auto`&&(ae||se)||y===!0);return e.scrollButtonStart=t?(0,W.jsx)(Ae,{direction:i?`right`:`left`,onClick:Ce,disabled:!ae,...je}):null,e.scrollButtonEnd=t?(0,W.jsx)(Ae,{direction:i?`left`:`right`,onClick:we,disabled:!se,...je}):null,e},Ne=c(e=>{let{tabsMeta:t,tabMeta:n}=ye();if(!(!n||!t)){if(n[M]t[N]){let r=t[j]+(n[N]-t[N]);xe(r,{animation:e})}}}),Pe=c(()=>{k&&y!==!1&&ue(!le)});G.useEffect(()=>{let e=Ht(()=>{H.current&&be()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),Pe()},r=Wt(H.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(_e.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(_e.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[be,Pe]),G.useEffect(()=>{let e=Array.from(_e.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&k&&y!==!1){let n=e[0],r=e[t-1],i={root:H.current,threshold:.99},a=new IntersectionObserver(e=>{oe(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{ce(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[k,y,le,d?.length]),G.useEffect(()=>{ne(!0)},[]),G.useEffect(()=>{be()}),G.useEffect(()=>{Ne(Af!==re)},[Ne,re]),G.useImperativeHandle(l,()=>({updateIndicator:be,updateScrollButtons:Pe}),[be,Pe]);let[Fe,Le]=B(`indicator`,{className:L.indicator,elementType:Of,externalForwardedProps:ve,ownerState:I,additionalProps:{style:re}}),Re=(0,W.jsx)(Fe,{...Le}),ze=Vc({activeItemId:fe?void 0:de,orientation:_,isRtl:i}),Be=ze.getContainerProps(),Ve=G.Children.toArray(d).filter(G.isValidElement).map((e,t)=>{let n=e.props.value===void 0?t:e.props.value;return ge.set(n,t),{child:e,index:t,childValue:n}}).map(({child:e,childValue:t})=>{let n=t===T;return G.cloneElement(e,{fullWidth:E===`fullWidth`,indicator:n&&!te&&Re,selected:n,selectionFollowsFocus:b,onChange:g,textColor:w,value:t})}),He=Me(),[Ue,We]=B(`root`,{ref:t,className:V(L.root,f),elementType:Tf,externalForwardedProps:{...ve,...O,component:p},ownerState:I}),[Ge,Ke]=B(`scroller`,{ref:H,className:L.scroller,elementType:Ef,externalForwardedProps:ve,ownerState:I,additionalProps:{style:{overflow:me.overflow,[A?`margin${i?`Left`:`Right`}`:`marginBottom`]:D?void 0:-me.scrollbarWidth}}}),qe=v(Be.ref,_e),Je=e=>{let t=_e.current;it(nt(t))?.getAttribute(`role`)===`tab`&&Be.onKeyDown(e)},[Ye,Xe]=B(`list`,{ref:qe,className:L.list,elementType:Df,externalForwardedProps:ve,ownerState:I,getSlotProps:e=>({...e,onBlur:t=>{wo(t.currentTarget,t.relatedTarget)||pe(!1),e.onBlur?.(t)},onKeyDown:t=>{Je(t),e.onKeyDown?.(t)},onFocus:t=>{pe(!0),Be.onFocus(t),e.onFocus?.(t)}})});return(0,W.jsxs)(Ue,{...We,children:[He.scrollButtonStart,He.scrollbarSizeListener,(0,W.jsxs)(Ge,{...Ke,children:[(0,W.jsx)(Ye,{"aria-label":o,"aria-labelledby":s,"aria-orientation":_===`vertical`?`vertical`:null,role:`tablist`,...Xe,children:(0,W.jsx)(Ic.Provider,{value:ze,children:Ve})}),te&&Re]}),He.scrollButtonEnd]})});function Mf(e){return U(`MuiTextField`,e)}z(`MuiTextField`,[`root`]);var Nf={standard:Js,filled:Ss,outlined:tu},Pf=e=>{let{classes:t}=e;return g({root:[`root`]},Mf,t)},Ff=m(Es,{name:`MuiTextField`,slot:`Root`})({}),If=G.forwardRef(function(e,t){let n=x({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,fullWidth:d=!1,helperText:f,id:p,inputRef:m,label:h,maxRows:g,minRows:_,multiline:v=!1,name:y,onBlur:b,onChange:S,onFocus:C,placeholder:w,required:T=!1,rows:E,select:D=!1,slots:O={},slotProps:k={},type:A,value:j,variant:M=`outlined`,...N}=n,P={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:d,multiline:v,required:T,select:D,variant:M},ee=Pf(P),F=_e(p),I=f&&F?`${F}-helper-text`:void 0,L=h&&F?`${F}-label`:void 0,R=Nf[M],z={slots:O,slotProps:k},[te,ne]=B(`select`,{elementType:ku,externalForwardedProps:z,ownerState:P}),re=D&&ne.native,ie={},ae=z.slotProps.inputLabel;M===`outlined`&&(ae&&ae.shrink!==void 0&&(ie.notched=ae.shrink),ie.label=h),D&&(re||(ie.id=void 0),ie[`aria-describedby`]=void 0);let[oe,se]=B(`root`,{elementType:Ff,shouldForwardComponentProp:!0,externalForwardedProps:{...z,...N},ownerState:P,className:V(ee.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:d,required:T,color:s,variant:M}}),[ce,le]=B(`input`,{elementType:R,externalForwardedProps:z,additionalProps:ie,ownerState:P}),[ue,de]=B(`inputLabel`,{elementType:ic,externalForwardedProps:z,ownerState:P}),[fe,pe]=B(`htmlInput`,{elementType:`input`,externalForwardedProps:z,ownerState:P}),[me,he]=B(`formHelperText`,{elementType:Ps,externalForwardedProps:z,ownerState:P}),ge=(0,W.jsx)(ce,{"aria-describedby":I,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:d,multiline:v,name:y,rows:E,maxRows:g,minRows:_,type:A,value:j,id:F,inputRef:m,onBlur:b,onChange:S,onFocus:C,placeholder:w,inputProps:pe,slots:{input:O.htmlInput?fe:void 0},...le});return(0,W.jsxs)(oe,{...se,children:[h!=null&&h!==``&&(0,W.jsx)(ue,{htmlFor:D&&!re?void 0:F,id:L,...D&&!re&&{component:`div`},...de,children:h}),D?(0,W.jsx)(te,{"aria-describedby":I,id:F,labelId:L,value:j,input:ge,...ne,children:a}):ge,f&&(0,W.jsx)(me,{id:I,...he,children:f})]})}),Lf=G.createContext({}),Rf=G.createContext(void 0);function zf(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}function Bf(e,t){let{children:n,disabled:r=!1,selected:i=!1,value:a}=e,o=Lc(),s=Hc({id:a,ref:t,disabled:r,selected:i}),c=o.getItemMap().size===0&&i?0:s.tabIndex;return G.cloneElement(G.Children.only(n),{...s,tabIndex:n.props.tabIndex??c})}var Vf=G.forwardRef(Bf),Hf=e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:a,color:o}=e,s={root:[`root`,r&&`selected`,i&&`disabled`,n&&`fullWidth`,`size${y(a)}`,o]};return g(s,It,t)},Uf=m(le,{name:`MuiToggleButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${y(n.size)}`]]}})(d(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${Lt.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:`none`,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},variants:[{props:{color:`standard`},style:{[`&.${Lt.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(F()).map(([t])=>({props:{color:t},style:{[`&.${Lt.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Wf=G.forwardRef(function(e,t){let{value:n,isRovingTabIndex:r,...i}=G.useContext(Lf),a=G.useContext(Rf),o=j({...i,selected:zf(e.value,n)},e),s=x({props:o,name:`MuiToggleButton`}),{children:c,className:l,color:u=`standard`,disabled:d=!1,disableFocusRipple:f=!1,fullWidth:p=!1,onChange:m,onClick:h,selected:g,size:_=`medium`,value:v,...y}=s,b={...s,color:u,disabled:d,disableFocusRipple:f,fullWidth:p,size:_},S=Hf(b),C=e=>{h&&(h(e,v),e.defaultPrevented)||m&&m(e,v)},w=a||``,T=(0,W.jsx)(Uf,{className:V(i.className,S.root,l,w),internalNativeButton:!0,disabled:d,focusRipple:!f,ref:r?void 0:t,onClick:C,onChange:m,value:v,ownerState:b,"aria-pressed":g,...y,children:c});return r?(0,W.jsx)(Vf,{disabled:d,selected:g,ref:t,value:v,children:T}):T}),Gf=G.createContext(null);function Kf(){let[e,t]=G.useState(null);return G.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function qf(e){let{children:t,value:n}=e,r=Kf(),i=G.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return(0,W.jsx)(Gf.Provider,{value:i,children:t})}function Jf(){return G.useContext(Gf)}function Yf(e,t){let{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function Xf(e,t){let{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}var Zf=G.forwardRef(function(e,t){let{children:n,...r}=e,i=Jf();if(i===null)throw TypeError(`No TabContext provided`);let a=G.Children.map(n,e=>G.isValidElement(e)?G.cloneElement(e,{"aria-controls":Yf(i,e.props.value),id:Xf(i,e.props.value)}):null);return(0,W.jsx)(jf,{...r,ref:t,value:i.value,children:a})});function Qf(e){return U(`MuiTabPanel`,e)}z(`MuiTabPanel`,[`root`,`hidden`]);var $f=e=>{let{classes:t,hidden:n}=e;return g({root:[`root`,n&&`hidden`]},Qf,t)},ep=m(`div`,{name:`MuiTabPanel`,slot:`Root`})(({theme:e})=>({padding:e.spacing(3)})),tp=G.forwardRef(function(e,t){let n=Bt({props:e,name:`MuiTabPanel`}),{children:r,className:i,value:a,keepMounted:o=!1,...s}=n,c={...n},l=$f(c),u=Jf();if(u===null)throw TypeError(`No TabContext provided`);let d=Yf(u,a),f=Xf(u,a);return(0,W.jsx)(ep,{"aria-labelledby":f,className:V(l.root,i),hidden:a!==u.value,id:d,ref:t,role:`tabpanel`,ownerState:c,...s,children:(o||a===u.value)&&r})}),np=T((0,W.jsx)(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z`}),`Add`),rp=T((0,W.jsx)(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z`}),`Delete`),ip=T((0,W.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14`}),`Search`),ap={};function op(e,t){let n=G.useRef(ap);return n.current===ap&&(n.current=e(t)),n}function sp(e,t,n,r){let i=op(cp).current;return lp(i,e,t,n,r)&&up(i,[e,t,n,r]),i.callback}function cp(){return{callback:null,cleanup:null,refs:[]}}function lp(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function up(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e{for(let e=0;en.searchParams.append(`args[]`,e)),`MUI X error #${e}; visit ${n} for the full message.`}var fp=Symbol(`NOT_FOUND`);function pp(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function mp(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var hp=e=>Array.isArray(e)?e:[e];function gp(e){let t=Array.isArray(e[0])?e[0]:e;return mp(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function _p(e,t){let n=[],{length:r}=e;for(let i=0;it(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return fp}function i(t,i){r(t)===fp&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}var bp=(e,t)=>e===t;function xp(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;let{length:r}=t;for(let i=0;ii(e.value,t));e&&(t=e.value,o!==0&&o--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}var Cp=class{constructor(e){this.value=e}deref(){return this.value}},wp=typeof WeakRef>`u`?Cp:WeakRef,Tp=0,Ep=1;function Dp(){return{s:Tp,v:void 0,o:null,p:null}}function Op(e){return e instanceof wp?e.deref():e}function kp(e,t={}){let n=Dp(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e{n=Dp(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Ap(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),pp(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=kp,argsMemoizeOptions:u=[]}={...n,...a},d=hp(c),f=hp(u),p=gp(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=_p(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var jp=Ap({memoize:Sp,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Mp=(e,t,n,r,i,a,o,s,...c)=>{if(c.length>0)throw Error(dp(179));let l;if(e&&t&&n&&r&&i&&a&&o&&s)l=(c,l,u,d)=>s(e(c,l,u,d),t(c,l,u,d),n(c,l,u,d),r(c,l,u,d),i(c,l,u,d),a(c,l,u,d),o(c,l,u,d),l,u,d);else if(e&&t&&n&&r&&i&&a&&o)l=(s,c,l,u)=>o(e(s,c,l,u),t(s,c,l,u),n(s,c,l,u),r(s,c,l,u),i(s,c,l,u),a(s,c,l,u),c,l,u);else if(e&&t&&n&&r&&i&&a)l=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)l=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)l=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)l=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)l=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)l=e;else throw Error(dp(180));return l},Np=(e=>(...t)=>{let n=new WeakMap,r=1,i=t[t.length-1],a=t.length-1||1,o=Math.max(i.length-a,0);if(o>3)throw Error(dp(181));return(a,s,c,l)=>{let u=a.__cacheKey__;u||(u={id:r},a.__cacheKey__=u,r+=1);let d=n.get(u);if(!d){let r=t.length===1?[e=>e,i]:t,a=t,s=[void 0,void 0,void 0];switch(o){case 0:break;case 1:a=[...r.slice(0,-1),()=>s[0],i];break;case 2:a=[...r.slice(0,-1),()=>s[0],()=>s[1],i];break;case 3:a=[...r.slice(0,-1),()=>s[0],()=>s[1],()=>s[2],i];break;default:throw Error(dp(182))}e&&(a=[...a,e]),d=jp(...a),d.selectorArgs=s,n.set(u,d)}switch(o){case 3:d.selectorArgs[2]=l;case 2:d.selectorArgs[1]=c;case 1:d.selectorArgs[0]=s}switch(o){case 0:return d(a);case 1:return d(a,s);case 2:return d(a,s,c);case 3:return d(a,s,c,l);default:throw Error(`unreachable`)}}})(),Pp=n((e=>{var n=t();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.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),Fp=n(((e,t)=>{t.exports=Pp()})),Ip=n((e=>{var n=t(),r=Fp();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=n.useRef,c=n.useEffect,l=n.useMemo,u=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Lp=n(((e,t)=>{t.exports=Ip()})),Rp=19,zp=Fp(),Bp=Lp(),Vp=Rp>=19?Up:Wp;function Hp(e,t,n,r,i){return Vp(e,t,n,r,i)}function Up(e,t,n,r,i){let a=G.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,zp.useSyncExternalStore)(e.subscribe,a,a)}function Wp(e,t,n,r,i){return(0,Bp.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Gp=()=>{};function Kp(e,t,n){let r=De(qp,{store:e,selector:t}).current;r.effect=n,te(r.onMount)}function qp(e){let{store:t,selector:n}=e,r=n(t.state),i={effect:Gp,dispose:null,subscribe:()=>{i.dispose??=t.subscribe(e=>{let t=n(e);if(!Object.is(r,t)){let e=r;r=t,i.effect(e,t)}})},onMount:()=>(i.subscribe(),()=>{i.dispose?.(),i.dispose=null})};return i.subscribe(),i}var Jp=class e{static create(t){return new e(t)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){this.state=e,this.updateTick+=1;let t=this.updateTick,n=this.listeners.values(),r;for(;r=n.next(),!r.done;){if(t!==this.updateTick)return;let n=r.value;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState(H({},this.state,e));return}}set(e,t){Object.is(this.state[e],t)||this.setState(H({},this.state,{[e]:t}))}use=(e,t,n,r)=>Hp(this,e,t,n,r)};function Yp(e){return U(`MuiRichTreeView`,e)}z(`MuiRichTreeView`,[`root`,`item`,`itemContent`,`itemGroupTransition`,`itemIconContainer`,`itemLabel`,`itemCheckbox`,`itemLabelInput`]);function Xp(e){return Bt}var Zp=Object.freeze([]),Qp=Object.freeze({}),$p=G.createContext(null),em=()=>{let e=G.useContext($p);if(e==null)throw Error(dp(190));return e},tm=G.createContext({classes:{},slots:{},slotProps:{}}),nm=()=>G.useContext(tm),rm=e=>{let{store:t,apiRef:n,rootRef:r}=e,i=op(()=>t.buildPublicAPI()).current;im(i,n);let a=G.useCallback(e=>{let n=null,r=null,i=[],a={};t.itemPluginManager.listPlugins().forEach(t=>{let o=t({props:e,rootRef:n,contentRef:r});o?.rootRef&&(n=o.rootRef),o?.contentRef&&(r=o.contentRef),o?.propsEnhancers&&(i.push(o.propsEnhancers),Object.keys(o.propsEnhancers).forEach(e=>{a[e]=!0}))});let o=e=>t=>{let n={};return i.forEach(r=>{let i=r[e];i!=null&&Object.assign(n,i(t))}),n},s=Object.fromEntries(Object.keys(a).map(e=>[e,o(e)]));return{contentRef:r,rootRef:n,propsEnhancers:s}},[t]),o=G.useCallback(({itemId:e,children:n,idAttribute:r})=>{let i=n,a=t.itemPluginManager.listWrappers();for(let n=a.length-1;n>=0;--n){let o=a[n];i=o({store:t,itemId:e,children:i,idAttribute:r})}return i},[t]);return G.useMemo(()=>({runItemPlugins:a,wrapItem:o,publicAPI:i,store:t,rootRef:r}),[a,o,i,t,r])};function im(e,t){t!=null&&t.current!==e&&(t.current=e)}function am(e){let{store:t,apiRef:n,rootRef:r,classes:i=Qp,slots:a=Qp,slotProps:o=Qp,children:s}=e,c=rm({store:t,apiRef:n,rootRef:r}),l=G.useMemo(()=>({classes:i,slots:{collapseIcon:a.collapseIcon,expandIcon:a.expandIcon,endIcon:a.endIcon},slotProps:{collapseIcon:o.collapseIcon,expandIcon:o.expandIcon,endIcon:o.endIcon}}),[i,a.collapseIcon,a.expandIcon,a.endIcon,o.collapseIcon,o.expandIcon,o.endIcon]);return(0,W.jsx)($p.Provider,{value:c,children:(0,W.jsx)(tm.Provider,{value:l,children:s})})}function K(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var om=Object.is;function sm(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(let r in e)if(n+=1,!om(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}var cm=e=>{let t={};return e.forEach((e,n)=>{t[e]=n}),t},lm=(e,t)=>{if(t==null)return!1;let n=e[t];if(!n)return!1;if(n.disabled)return!0;for(;n.parentId!=null;){if(n=e[n.parentId],!n)return!1;if(n.disabled)return!0}return!1};function um(e){let{storeParameters:t,items:n,parentId:r,depth:i,isItemExpandable:a,otherItemsMetaLookup:o}=e,s={},c={},l=[],u=[],d=e=>{let n=t.getItemId?t.getItemId(e):e.id;fm({id:n,parentId:r,item:e,itemMetaLookup:o,siblingsMetaLookup:s});let d=t.getItemLabel?t.getItemLabel(e):e.label;if(d==null)throw Error(dp(192,JSON.stringify(e)));let f=(t.getItemChildren?t.getItemChildren(e):e.children)||[];u.push({id:n,children:f}),c[n]=e,s[n]={id:n,label:d,parentId:r,idAttribute:void 0,expandable:a(e,f),disabled:t.isItemDisabled?t.isItemDisabled(e):!1,selectable:!t.isItemSelectionDisabled||!t.isItemSelectionDisabled(e),depth:i},l.push(n)};for(let e of n)d(e);return{metaLookup:s,modelLookup:c,orderedChildrenIds:l,childrenIndexes:cm(l),itemsChildren:u}}function dm(e){let{storeParameters:t,items:n,parentId:r,depth:i,isItemExpandable:a,existingItemMetaLookup:o}=e,s={},c={},l={},u={},d=H({},o),f=(e,n,r)=>{let i=um({storeParameters:t,items:e,parentId:n,depth:r,isItemExpandable:a,otherItemsMetaLookup:d});Object.assign(s,i.metaLookup),Object.assign(d,i.metaLookup),Object.assign(c,i.modelLookup),l[n??`__TREE_VIEW_ROOT_PARENT_ID__`]=i.orderedChildrenIds,u[n??`__TREE_VIEW_ROOT_PARENT_ID__`]=i.childrenIndexes;for(let e of i.itemsChildren)f(e.children,e.id,r+1)};return f(n,r,i),{itemMetaLookup:s,itemModelLookup:c,itemOrderedChildrenIdsLookup:l,itemChildrenIndexesLookup:u}}function fm({id:e,parentId:t,item:n,itemMetaLookup:r,siblingsMetaLookup:i}){if(e==null)throw Error(dp(193,JSON.stringify(n)));if(i[e]!=null||r[e]!=null&&r[e].parentId!==t)throw Error(dp(194,e))}var pm=[],q={domStructure:Mp(e=>e.domStructure),disabledItemFocusable:Mp(e=>e.disabledItemsFocusable),itemMetaLookup:Mp(e=>e.itemMetaLookup),itemOrderedChildrenIdsLookup:Mp(e=>e.itemOrderedChildrenIdsLookup),itemMeta:Mp((e,t)=>e.itemMetaLookup[t??`__TREE_VIEW_ROOT_PARENT_ID__`]??null),itemOrderedChildrenIds:Mp((e,t)=>e.itemOrderedChildrenIdsLookup[t??`__TREE_VIEW_ROOT_PARENT_ID__`]??pm),itemModel:Mp((e,t)=>e.itemModelLookup[t]),isItemDisabled:Mp((e,t)=>lm(e.itemMetaLookup,t)),itemIndex:Mp((e,t)=>{let n=e.itemMetaLookup[t];return n==null?-1:e.itemChildrenIndexesLookup[n.parentId??`__TREE_VIEW_ROOT_PARENT_ID__`][n.id]}),itemParentId:Mp((e,t)=>e.itemMetaLookup[t]?.parentId??null),itemDepth:Mp((e,t)=>e.itemMetaLookup[t]?.depth??0),canItemBeFocused:Mp((e,t)=>e.disabledItemsFocusable||e.itemModelLookup[t]!=null&&!lm(e.itemMetaLookup,t)),itemChildrenIndentation:Mp(e=>e.itemChildrenIndentation),itemHeight:Mp(e=>e.itemHeight)},mm=Mp(e=>e.providedTreeId??e.treeId),hm={treeId:mm,treeItemIdAttribute:Mp(mm,(e,t,n)=>n??`${e??``}-${t}`)},gm=class{constructor(e){this.store=e}static shouldRebuildItemsState=(e,t)=>[`items`,`isItemDisabled`,`isItemSelectionDisabled`,`getItemId`,`getItemLabel`,`getItemChildren`].some(n=>{let r=n;return e[r]!==t[r]});static buildItemsStateIfNeeded=e=>dm({storeParameters:e,items:e.items,parentId:null,depth:0,isItemExpandable:(e,t)=>!!t&&t.length>0});getItem=e=>q.itemModel(this.store.state,e);getItemTree=()=>{let e=t=>{let n=q.itemModel(this.store.state,t),r=H({},n),i=q.itemOrderedChildrenIds(this.store.state,t);return i.length>0?r.children=i.map(e):delete r.children,r};return q.itemOrderedChildrenIds(this.store.state,null).map(e)};getItemOrderedChildrenIds=e=>q.itemOrderedChildrenIds(this.store.state,e);getParentId=e=>q.itemMeta(this.store.state,e)?.parentId||null;setIsItemDisabled=({itemId:e,shouldBeDisabled:t})=>{if(!this.store.state.itemMetaLookup[e])return;let n=H({},this.store.state.itemMetaLookup);n[e]=H({},n[e],{disabled:t??!n[e].disabled}),this.store.set(`itemMetaLookup`,n)};addItems=({items:e,parentId:t=null,index:n})=>{if(e.length===0)return;if(t!=null&&q.itemMeta(this.store.state,t)==null)throw Error(dp(295,t));let r=t==null?-1:q.itemDepth(this.store.state,t),i=this.store.parameters.dataSource,{itemMetaLookup:a,itemModelLookup:o,itemOrderedChildrenIdsLookup:s,itemChildrenIndexesLookup:c}=dm({storeParameters:this.store.parameters,items:e,parentId:t,depth:r+1,isItemExpandable:(e,t)=>t!=null&&t.length>0||i!=null&&i.getChildrenCount(e)!==0,existingItemMetaLookup:this.store.state.itemMetaLookup});for(let e of Object.keys(a))if(this.store.state.itemMetaLookup[e]!=null)throw Error(dp(194,e));let l=t??`__TREE_VIEW_ROOT_PARENT_ID__`,u=q.itemOrderedChildrenIds(this.store.state,t),d=n??u.length;if(d<0||d>u.length)throw Error(dp(296,d,u.length));let f=s[l],p=[...u];p.splice(d,0,...f),s[l]=p,c[l]=cm(p);let m=H({},this.store.state.itemMetaLookup,a);t!=null&&!m[t].expandable&&(m[t]=H({},m[t],{expandable:!0})),this.store.update({itemMetaLookup:m,itemModelLookup:H({},this.store.state.itemModelLookup,o),itemOrderedChildrenIdsLookup:H({},this.store.state.itemOrderedChildrenIdsLookup,s),itemChildrenIndexesLookup:H({},this.store.state.itemChildrenIndexesLookup,c)}),this.store.selection.propagateSelectionToNewItems(t,f)};buildPublicAPI=()=>({getItem:this.getItem,getItemDOMElement:this.getItemDOMElement,getItemOrderedChildrenIds:this.getItemOrderedChildrenIds,getItemTree:this.getItemTree,getParentId:this.getParentId,setIsItemDisabled:this.setIsItemDisabled});getItemDOMElement=e=>{let t=q.itemMeta(this.store.state,e);if(t==null)return null;let n=hm.treeItemIdAttribute(this.store.state,e,t.idAttribute);return document.getElementById(n)};setItemChildren=({items:e,parentId:t,getChildrenCount:n})=>{let r=t??`__TREE_VIEW_ROOT_PARENT_ID__`,i=t==null?-1:q.itemDepth(this.store.state,t),{metaLookup:a,modelLookup:o,orderedChildrenIds:s,childrenIndexes:c}=um({storeParameters:this.store.parameters,items:e,parentId:t,depth:i+1,isItemExpandable:n?e=>n(e)!==0:()=>!1,otherItemsMetaLookup:q.itemMetaLookup(this.store.state)});this.store.update({itemModelLookup:H({},this.store.state.itemModelLookup,o),itemMetaLookup:H({},this.store.state.itemMetaLookup,a),itemOrderedChildrenIdsLookup:H({},this.store.state.itemOrderedChildrenIdsLookup,{[r]:s}),itemChildrenIndexesLookup:H({},this.store.state.itemChildrenIndexesLookup,{[r]:c})})};removeChildren=e=>{let t=this.store.state.itemMetaLookup,n=Object.keys(t).reduce((n,r)=>{let i=t[r];return i.parentId===e?n:H({},n,{[i.id]:i})},{}),r=H({},this.store.state.itemOrderedChildrenIdsLookup),i=H({},this.store.state.itemChildrenIndexesLookup),a=e??`__TREE_VIEW_ROOT_PARENT_ID__`;delete i[a],delete r[a],this.store.update({itemMetaLookup:n,itemOrderedChildrenIdsLookup:r,itemChildrenIndexesLookup:i})};handleItemClick=(e,t)=>{this.store.parameters.onItemClick?.(e,t)}},_m=Np(e=>e.expandedItems,e=>{let t=new Map;return e.forEach(e=>{t.set(e,!0)}),t}),vm={expandedItemsRaw:Mp(e=>e.expandedItems),expandedItemsMap:_m,flatList:Np(q.itemOrderedChildrenIdsLookup,_m,(e,t)=>{function n(r){if(!t.has(r))return[r];let i=[r],a=e[r]||[];for(let e of a)i.push(...n(e));return i}return(e.__TREE_VIEW_ROOT_PARENT_ID__??[]).flatMap(n)}),triggerSlot:Mp(e=>e.expansionTrigger),isItemExpanded:Mp(_m,(e,t)=>e.has(t)),isItemExpandable:Mp(q.itemMeta,(e,t)=>e?.expandable??!1)},ym=Np(e=>e.selectedItems,e=>Array.isArray(e)?e:e==null?[]:[e]),bm=Np(ym,e=>{let t=new Map;return e.forEach(e=>{t.set(e,!0)}),t}),xm=Mp((e,t)=>e.itemMetaLookup[t]?.selectable??!0),Sm=Mp(bm,(e,t)=>e.has(t)),Cm=Mp(q.isItemDisabled,xm,e=>!e.disableSelection,(e,t,n,r)=>n&&!e&&t),wm=Mp(e=>e.selectionPropagation),Tm=Mp((e,t)=>{if(Sm(e,t))return`selected`;if(q.itemOrderedChildrenIds(e,t).length===0)return`unselected`;let n=!1,r=!1,i=a=>{a!==t&&Cm(e,a)&&(Sm(e,a)?n=!0:r=!0),q.itemOrderedChildrenIds(e,a).forEach(i)};return i(t),wm(e).parents?n&&r?`indeterminate`:n&&!r?`selected`:`unselected`:n?`indeterminate`:`unselected`}),Em={selectedItemsRaw:Mp(e=>e.selectedItems),selectedItems:ym,selectedItemsMap:bm,enabled:Mp(e=>!e.disableSelection),isMultiSelectEnabled:Mp(e=>e.multiSelect),isCheckboxSelectionEnabled:Mp(e=>e.checkboxSelection),propagationRules:wm,isItemSelected:Sm,itemSelectionStatus:Tm,isItemIndeterminate:Mp(Tm,(e,t)=>e===`indeterminate`),isFeatureEnabledForItem:Mp(xm,e=>!e.disableSelection,(e,t,n)=>t&&e),canItemBeSelected:Cm,isItemSelectable:xm},Dm=Np(Em.selectedItems,vm.expandedItemsMap,q.itemMetaLookup,q.disabledItemFocusable,e=>q.itemOrderedChildrenIds(e,null),(e,t,n,r,i)=>e.find(e=>{if(!r&&lm(n,e))return!1;let i=n[e];return i&&(i.parentId==null||t.has(i.parentId))})??i.find(e=>r||!lm(n,e))??null),Om={defaultFocusableItemId:Dm,isItemTheDefaultFocusableItem:Mp(Dm,(e,t)=>e===t),focusedItemId:Mp(e=>e.focusedItemId),isItemFocused:Mp((e,t)=>e.focusedItemId===t)},km={isEmpty:Mp(e=>e.lazyLoadedItems==null||Object.keys(e.lazyLoadedItems.loading).length===0&&Object.keys(e.lazyLoadedItems.errors).length===0),isItemLoading:Mp((e,t)=>e.lazyLoadedItems?.loading[t??`__TREE_VIEW_ROOT_PARENT_ID__`]??!1),itemHasError:Mp((e,t)=>!!e.lazyLoadedItems?.errors[t??`__TREE_VIEW_ROOT_PARENT_ID__`]),itemError:Mp((e,t)=>e.lazyLoadedItems?.errors[t??`__TREE_VIEW_ROOT_PARENT_ID__`])},Am={isItemEditable:Mp(e=>e.isItemEditable,q.itemModel,(e,t,n)=>!t||e==null?!1:typeof e==`boolean`?e:e(t)),isItemBeingEdited:Mp((e,t)=>t!=null&&e.editedItemId===t),isAnyItemBeingEdited:Mp(e=>!!e.editedItemId)},jm=e=>Array.isArray(e)?e.length>0&&e.some(jm):!!e,Mm=({itemId:e,children:t})=>{let{store:n,publicAPI:r}=em(),i=Hp(n,vm.isItemExpandable,e),a=Hp(n,km.isItemLoading,e),o=Hp(n,km.itemHasError,e),s=jm(t)||i,c=Hp(n,vm.isItemExpanded,e),l=Hp(n,Om.isItemFocused,e),u=Hp(n,Em.isItemSelected,e),d=Hp(n,Em.isItemIndeterminate,e),f=Hp(n,q.isItemDisabled,e),p=Hp(n,Am.isItemBeingEdited,e),m={expandable:s,expanded:c,focused:l,selected:u,indeterminate:d,disabled:f,editing:p,editable:Hp(n,Am.isItemEditable,e),loading:a,error:o},h=t=>{if(m.disabled)return;m.focused||n.focus.focusItem(t,e);let r=Em.isMultiSelectEnabled(n.state)&&(t.shiftKey||t.ctrlKey||t.metaKey);m.expandable&&!(r&&vm.isItemExpanded(n.state,e))&&n.expansion.setItemExpansion({event:t,itemId:e})},g=t=>{Em.canItemBeSelected(n.state,e)&&(!m.focused&&!m.editing&&n.focus.focusItem(t,e),Em.isMultiSelectEnabled(n.state)&&(t.shiftKey||t.ctrlKey||t.metaKey)?t.shiftKey?n.selection.expandSelectionRange(t,e):n.selection.setItemSelection({event:t,itemId:e,keepExistingSelection:!0}):n.selection.setItemSelection({event:t,itemId:e,shouldBeSelected:!0}))},_=t=>{let r=t.nativeEvent.shiftKey,i=Em.isMultiSelectEnabled(n.state);i&&r?n.selection.expandSelectionRange(t,e):n.selection.setItemSelection({event:t,itemId:e,keepExistingSelection:i,shouldBeSelected:t.target.checked})},v=()=>{n.labelEditing&&(p?n.labelEditing.setEditedItem(null):n.labelEditing.setEditedItem(e))};return{interactions:{handleExpansion:h,handleSelection:g,handleCheckboxSelection:_,toggleItemEditing:v,handleSaveItemLabel:(t,r)=>{n.labelEditing&&Am.isItemBeingEdited(n.state,e)&&(n.labelEditing.updateItemLabel(e,r),v(),n.focus.focusItem(t,e))},handleCancelItemLabelEditing:t=>{n.labelEditing&&Am.isItemBeingEdited(n.state,e)&&(v(),n.focus.focusItem(t,e))}},status:m,publicAPI:r}},Nm=G.createContext(()=>-1),Pm=(e,t)=>{let n=t.length-1;for(;n>=0&&!q.canItemBeFocused(e,t[n]);)--n;if(n!==-1)return t[n]},Fm=(e,t)=>{let n=q.itemMeta(e,t);if(!n)return null;let r=q.itemOrderedChildrenIds(e,n.parentId),i=q.itemIndex(e,t);if(i===0)return n.parentId;let a=i-1;for(;!q.canItemBeFocused(e,r[a])&&a>=0;)--a;if(a===-1)return n.parentId==null?null:Fm(e,n.parentId);let o=r[a],s=Pm(e,q.itemOrderedChildrenIds(e,o));for(;vm.isItemExpanded(e,o)&&s!=null;)o=s,s=Pm(e,q.itemOrderedChildrenIds(e,o));return o},Im=(e,t)=>{if(vm.isItemExpanded(e,t)){let n=q.itemOrderedChildrenIds(e,t).find(t=>q.canItemBeFocused(e,t));if(n!=null)return n}let n=q.itemMeta(e,t);for(;n!=null;){let t=q.itemOrderedChildrenIds(e,n.parentId),r=q.itemIndex(e,n.id);if(r{let t=null;for(;t==null||vm.isItemExpanded(e,t);){let n=Pm(e,q.itemOrderedChildrenIds(e,t));if(n==null)return t;t=n}return t},Rm=e=>q.itemOrderedChildrenIds(e,null).find(t=>q.canItemBeFocused(e,t)),zm=(e,t,n)=>{if(t===n)return[t,n];let r=q.itemMeta(e,t),i=q.itemMeta(e,n);if(!r||!i)return[t,n];if(r.parentId===i.id||i.parentId===r.id)return i.parentId===r.id?[r.id,i.id]:[i.id,r.id];let a=[r.id],o=[i.id],s=r.parentId,c=i.parentId,l=o.indexOf(s)!==-1,u=a.indexOf(c)!==-1,d=!0,f=!0;for(;!u&&!l;)d&&(a.push(s),l=o.indexOf(s)!==-1,d=s!==null,!l&&d&&(s=q.itemParentId(e,s))),f&&!l&&(o.push(c),u=a.indexOf(c)!==-1,f=c!==null,!u&&f&&(c=q.itemParentId(e,c)));let p=l?s:c,m=q.itemOrderedChildrenIds(e,p),h=a[a.indexOf(p)-1],g=o[o.indexOf(p)-1];return m.indexOf(h){let r=t=>{if(vm.isItemExpandable(e,t)&&vm.isItemExpanded(e,t))return q.itemOrderedChildrenIds(e,t)[0];let n=q.itemMeta(e,t);for(;n!=null;){let t=q.itemOrderedChildrenIds(e,n.parentId),r=q.itemIndex(e,n.id);if(r{let t=Rm(e),n=[];for(;t!=null;)n.push(t),t=Im(e,t);return n},Hm=(e,t)=>t!==e.closest(`*[role="treeitem"]`),Um=class{constructor(e){this.store=e}setExpandedItems=(e,t)=>{this.store.parameters.expandedItems===void 0&&this.store.set(`expandedItems`,t),this.store.parameters.onExpandedItemsChange?.(e,t)};isItemExpanded=e=>vm.isItemExpanded(this.store.state,e);buildPublicAPI=()=>({isItemExpanded:this.isItemExpanded,setItemExpansion:this.setItemExpansion});setItemExpansion=({itemId:e,event:t=null,shouldBeExpanded:n})=>{let r=vm.isItemExpanded(this.store.state,e),i=n??!r;if(r===i)return;let a={isExpansionPrevented:!1,shouldBeExpanded:i,itemId:e};this.store.publishEvent(`beforeItemToggleExpansion`,a,t),!a.isExpansionPrevented&&this.applyItemExpansion({itemId:e,event:t,shouldBeExpanded:i})};applyItemExpansion=({itemId:e,event:t,shouldBeExpanded:n})=>{let r=vm.expandedItemsRaw(this.store.state),i;i=n?[e].concat(r):r.filter(t=>t!==e),this.store.parameters.onItemExpansionToggle?.(t,e,n),this.setExpandedItems(t,i)};expandAllSiblings=(e,t)=>{let n=q.itemMeta(this.store.state,t);if(n==null)return;let r=q.itemOrderedChildrenIds(this.store.state,n.parentId).filter(e=>vm.isItemExpandable(this.store.state,e)&&!vm.isItemExpanded(this.store.state,e)),i=vm.expandedItemsRaw(this.store.state).concat(r);r.length>0&&(this.store.parameters.onItemExpansionToggle&&r.forEach(t=>{this.store.parameters.onItemExpansionToggle(e,t,!0)}),this.setExpandedItems(e,i))};addExpandableItems=e=>{let t=H({},this.store.state.itemMetaLookup);for(let n of e)t[n]=H({},t[n],{expandable:!0});this.store.set(`itemMetaLookup`,t)}},Wm=class{constructor(e){this.store=e;let t=e.state;this.store.disposables.defer(this.store.subscribe(e=>{if(e.itemMetaLookup===t.itemMetaLookup){t=e;return}let n=Om.focusedItemId(e);if(n==null||q.itemMeta(e,n)){t=e;return}let r=t=>t==null||!q.itemMeta(e,t)?null:t,i=r(Im(t,n))??r(Fm(t,n))??Rm(e);i==null?this.setFocusedItemId(null):this.applyItemFocus(null,i),t=e}))}setFocusedItemId=e=>{Om.focusedItemId(this.store.state)!==e&&this.store.set(`focusedItemId`,e)};applyItemFocus=(e,t)=>{this.store.items.getItemDOMElement(t)?.focus(),this.setFocusedItemId(t),this.store.parameters.onItemFocus?.(e,t)};buildPublicAPI=()=>({focusItem:this.focusItem});focusItem=(e,t)=>{let n=q.itemMeta(this.store.state,t);n&&(n.parentId==null||vm.isItemExpanded(this.store.state,n.parentId))&&this.applyItemFocus(e,t)};removeFocusedItem=()=>{let e=Om.focusedItemId(this.store.state);if(e!=null){if(q.itemMeta(this.store.state,e)){let t=this.store.items.getItemDOMElement(e);t&&t.blur()}this.setFocusedItemId(null)}};handleRootFocus=e=>{if(e.defaultMuiPrevented)return;let t=Om.defaultFocusableItemId(this.store.state);e.target===e.currentTarget&&t!=null&&this.applyItemFocus(e,t)};handleRootBlur=e=>{e.defaultMuiPrevented||this.setFocusedItemId(null)}},Gm=({props:e})=>{let{itemId:t}=e,{store:n}=em(),r=Hp(n,Em.isCheckboxSelectionEnabled),i=Hp(n,Em.isFeatureEnabledForItem,t),a=Hp(n,Em.canItemBeSelected,t),o=Hp(n,q.isItemDisabled,t),s=Hp(n,Em.isItemSelectable,t),c=Hp(n,Em.itemSelectionStatus,t),l=o||!s;return{propsEnhancers:{root:()=>{let e;return e=l?void 0:c===`selected`?!0:c===`indeterminate`?`mixed`:!a&&void 0,{"aria-checked":e}},checkbox:({externalEventHandlers:e,interactions:o})=>({tabIndex:-1,onChange:r=>{e.onChange?.(r),!r.defaultMuiPrevented&&Em.canItemBeSelected(n.state,t)&&o.handleCheckboxSelection(r)},visible:r&&i,disabled:!a,checked:c===`selected`,indeterminate:c===`indeterminate`})}}},Km=class{lastSelectedItem=null;lastSelectedRange={};constructor(e){this.store=e,e.itemPluginManager.register(Gm,null)}setSelectedItems=(e,t,n)=>{let{selectionPropagation:r=Qp,selectedItems:i,onItemSelectionToggle:a,onSelectedItemsChange:o}=this.store.parameters,s=Em.selectedItemsRaw(this.store.state),c,l=Em.isMultiSelectEnabled(this.store.state);if(c=l&&(r.descendants||r.parents)?qm({store:this.store,selectionPropagation:r,newModel:t,oldModel:s,additionalItemsToPropagate:n}):t,i===void 0&&this.store.set(`selectedItems`,c),a){if(l){let t=Jm({newModel:c,oldModel:s});a&&(t.added.forEach(t=>{a(e,t,!0)}),t.removed.forEach(t=>{a(e,t,!1)}))}else c!==s&&(s!=null&&a(e,s,!1),c!=null&&a(e,c,!0))}o?.(e,c)};selectRange=(e,[t,n])=>{if(!Em.isMultiSelectEnabled(this.store.state))return;let r=Em.selectedItems(this.store.state).slice();Object.keys(this.lastSelectedRange).length>0&&(r=r.filter(e=>!this.lastSelectedRange[e]));let i=Ym(r),a=Bm(this.store.state,t,n).filter(e=>Em.isItemSelectable(this.store.state,e)),o=a.filter(e=>!i[e]);r=r.concat(o),this.setSelectedItems(e,r),this.lastSelectedRange=Ym(a)};getItemSelection=e=>Em.itemSelectionStatus(this.store.state,e);buildPublicAPI=()=>({getItemSelection:this.getItemSelection,setItemSelection:this.setItemSelection});propagateSelectionToNewItems=(e,t)=>{let{selectionPropagation:n=Qp}=this.store.parameters;if(e==null||t.length===0||!n.descendants||!Em.isMultiSelectEnabled(this.store.state)||!Em.isItemSelected(this.store.state,e))return;let r=Em.selectedItems(this.store.state).concat(t);this.setSelectedItems(null,r,t)};setItemSelection=({itemId:e,event:t=null,keepExistingSelection:n=!1,shouldBeSelected:r})=>{if(!Em.enabled(this.store.state))return;let i,a=Em.isMultiSelectEnabled(this.store.state);if(n&&a){let t=Em.selectedItems(this.store.state),n=Em.isItemSelected(this.store.state,e);i=n&&(r===!1||r==null)?t.filter(t=>t!==e):!n&&(r===!0||r==null)?[e].concat(t):t}else i=r===!1||r==null&&Em.isItemSelected(this.store.state,e)?a?[]:null:a?[e]:e;this.setSelectedItems(t,i,[e]),this.lastSelectedItem=e,this.lastSelectedRange={}};selectAllNavigableItems=e=>{if(!Em.isMultiSelectEnabled(this.store.state))return;let t=Vm(this.store.state);this.setSelectedItems(e,t),this.lastSelectedRange=Ym(t)};expandSelectionRange=(e,t)=>{if(this.lastSelectedItem!=null){let[n,r]=zm(this.store.state,t,this.lastSelectedItem);this.selectRange(e,[n,r])}};selectRangeFromStartToItem=(e,t)=>{this.selectRange(e,[Rm(this.store.state),t])};selectRangeFromItemToEnd=(e,t)=>{this.selectRange(e,[t,Lm(this.store.state)])};selectItemFromArrowNavigation=(e,t,n)=>{if(!Em.isMultiSelectEnabled(this.store.state))return;let r=Em.selectedItems(this.store.state).slice();Object.keys(this.lastSelectedRange).length===0?(Em.isItemSelected(this.store.state,n)||r.push(n),this.lastSelectedRange={[t]:!0,[n]:!0}):(this.lastSelectedRange[t]||(this.lastSelectedRange={}),this.lastSelectedRange[n]?(r=r.filter(e=>e!==t),delete this.lastSelectedRange[t]):(Em.isItemSelected(this.store.state,n)||r.push(n),this.lastSelectedRange[n]=!0)),this.setSelectedItems(e,r)}};function qm({store:e,selectionPropagation:t,newModel:n,oldModel:r,additionalItemsToPropagate:i}){if(!t.descendants&&!t.parents)return n;let a=!1,o=Ym(n),s=Jm({newModel:n,oldModel:r});return i?.forEach(e=>{o[e]?s.added.includes(e)||s.added.push(e):s.removed.includes(e)||s.removed.push(e)}),s.added.forEach(n=>{if(t.descendants){let t=r=>{r!==n&&Em.canItemBeSelected(e.state,r)&&(a=!0,o[r]=!0),q.itemOrderedChildrenIds(e.state,r).forEach(t)};t(n)}if(t.parents){let t=n=>Em.canItemBeSelected(e.state,n)?o[n]?q.itemOrderedChildrenIds(e.state,n).every(t):!1:q.itemOrderedChildrenIds(e.state,n).every(t),r=n=>{let i=q.itemParentId(e.state,n);i!=null&&q.itemOrderedChildrenIds(e.state,i).every(t)&&(Em.canItemBeSelected(e.state,i)&&(a=!0,o[i]=!0),r(i))};r(n)}}),s.removed.forEach(n=>{if(t.parents){let t=q.itemParentId(e.state,n);for(;t!=null;)o[t]&&(a=!0,delete o[t]),t=q.itemParentId(e.state,t)}if(t.descendants){let t=r=>{r!==n&&(a=!0,delete o[r]),q.itemOrderedChildrenIds(e.state,r).forEach(t)};t(n)}}),a?Object.keys(o):n}function Jm({oldModel:e,newModel:t}){let n=new Map;t.forEach(e=>{n.set(e,!0)});let r=new Map;return e.forEach(e=>{r.set(e,!0)}),{added:t.filter(e=>!r.has(e)),removed:e.filter(e=>!n.has(e))}}function Ym(e){let t={};return e.forEach(e=>{t[e]=!0}),t}var Xm=(e,t,n)=>typeof n==`function`?n(e,t):n,Zm=e=>{let{runItemPlugins:t,publicAPI:n,store:r}=em(),i=G.useContext(Nm),a=Hp(r,Xm,e.itemId,i),{id:o,itemId:s,label:c,children:l,rootRef:u}=e,{rootRef:d,contentRef:f,propsEnhancers:p}=t(e),{interactions:m,status:h}=Mm({itemId:s,children:l}),g=G.useRef(null),_=G.useRef(null),v=sp(u,d,g),y=sp(f,_),b=G.useRef(null),x=Hp(r,Em.isCheckboxSelectionEnabled),S=Hp(r,hm.treeItemIdAttribute,s,o),C=Hp(r,Om.isItemTheDefaultFocusableItem,s),w=Hp(r,q.itemHeight),T={rootRefObject:g,contentRefObject:_,interactions:m},E=e=>t=>{e.onFocus?.(t),!t.defaultMuiPrevented&&!h.focused&&q.canItemBeFocused(r.state,s)&&t.currentTarget===t.target&&r.focus.focusItem(t,s)},D=e=>t=>{if(e.onBlur?.(t),t.defaultMuiPrevented)return;let n=r.items.getItemDOMElement(s);h.editing||t.relatedTarget&&Hm(t.relatedTarget,n)&&(t.target&&t.target?.dataset?.element===`labelInput`&&Hm(t.target,n)||t.relatedTarget?.dataset?.element===`labelInput`)||r.focus.removeFocusedItem()},O=e=>t=>{e.onKeyDown?.(t),!(t.defaultMuiPrevented||t.target?.dataset?.element===`labelInput`)&&r.keyboardNavigation.handleItemKeyDown(t,s)},k=e=>t=>{e.onDoubleClick?.(t),!t.defaultMuiPrevented&&m.toggleItemEditing()},A=e=>t=>{e.onClick?.(t),r.items.handleItemClick(t,s),!(t.defaultMuiPrevented||b.current?.contains(t.target))&&(vm.triggerSlot(r.state)===`content`&&m.handleExpansion(t),x||m.handleSelection(t))},j=e=>t=>{e.onMouseDown?.(t),!t.defaultMuiPrevented&&(t.shiftKey||t.ctrlKey||t.metaKey||h.disabled)&&t.preventDefault()},N=e=>t=>{e.onClick?.(t),!t.defaultMuiPrevented&&vm.triggerSlot(r.state)===`iconContainer`&&m.handleExpansion(t)};return{getContextProviderProps:()=>({itemId:s,id:o}),getRootProps:(t={})=>{let n=H({},M(e),M(t)),r=H({},n,{ref:v,role:`treeitem`,tabIndex:C?0:-1,id:S,"aria-expanded":h.expandable?h.expanded:void 0,"aria-disabled":h.disabled||void 0},t,{style:H({},t.style??{},{"--TreeView-itemDepth":a},w==null?{}:{"--TreeView-itemHeight":`${w}px`}),onFocus:E(n),onBlur:D(n),onKeyDown:O(n)}),i=p.root?.(H({},T,{externalEventHandlers:n}))??{};return H({},r,i)},getContentProps:(e={})=>{let t=M(e),n=H({},t,e,{ref:y,onClick:A(t),onMouseDown:j(t)});[`expanded`,`selected`,`focused`,`disabled`,`editing`,`editable`].forEach(e=>{h[e]&&(n[`data-${e}`]=``)});let r=p.content?.(H({},T,{externalEventHandlers:t}))??{};return H({},n,r)},getGroupTransitionProps:(e={})=>{let t=M(e);return H({},t,{unmountOnExit:!0,component:`ul`,role:`group`,in:h.expanded,children:l},e)},getIconContainerProps:(e={})=>{let t=M(e);return H({},t,e,{onClick:N(t)})},getCheckboxProps:(e={})=>{let t=M(e),n=H({},t,{ref:b,"aria-hidden":!0},e),r=p.checkbox?.(H({},T,{externalEventHandlers:t}))??{};return H({},n,r)},getLabelProps:(e={})=>{let t=H({},M(e)),n=H({},t,{children:c},e,{onDoubleClick:k(t)}),r=p.label?.(H({},T,{externalEventHandlers:t}))??{};return H({},r,n)},getLabelInputProps:(e={})=>{let t=M(e),n=p.labelInput?.(H({},T,{externalEventHandlers:t}))??{};return H({},e,n)},getDragAndDropOverlayProps:(e={})=>{let t=M(e),n=p.dragAndDropOverlay?.(H({},T,{externalEventHandlers:t}))??{};return H({},e,n)},getErrorContainerProps:(e={})=>{let t=M(e);return H({},t,e)},getLoadingContainerProps:(e={})=>{let t=M(e);return H({size:`12px`,thickness:6},t,e)},rootRef:v,status:h,publicAPI:n}};function Qm(e){return U(`MuiTreeItem`,e)}z(`MuiTreeItem`,[`root`,`content`,`groupTransition`,`iconContainer`,`label`,`checkbox`,`labelInput`,`dragAndDropOverlay`,`errorIcon`,`loadingIcon`]);var $m=T((0,W.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`TreeViewExpandIcon`),eh=T((0,W.jsx)(`path`,{d:`M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z`}),`TreeViewCollapseIcon`),th=[`ownerState`];function nh(e,t,n){return e===void 0?t===void 0?n:t:e}function rh(e){let{slots:t,slotProps:n,status:r}=e,{slots:i,slotProps:a}=nm(),o={collapseIcon:nh(t?.collapseIcon,i.collapseIcon,eh),expandIcon:nh(t?.expandIcon,i.expandIcon,$m),endIcon:nh(t?.endIcon,i.endIcon),icon:t?.icon},s;s=o?.icon?`icon`:r.expandable?r.expanded?`collapseIcon`:`expandIcon`:`endIcon`;let c=o[s],l=K(Ai({elementType:c,externalSlotProps:e=>H({},Te(a[s],e),Te(n?.[s],e)),ownerState:{}}),th);return c?(0,W.jsx)(c,H({},l)):null}var ih=m(`div`,{name:`MuiTreeItemDragAndDropOverlay`,slot:`Root`,shouldForwardProp:e=>a(e)&&e!==`action`})(({theme:e})=>({position:`absolute`,left:0,display:`flex`,top:0,bottom:0,right:0,pointerEvents:`none`,variants:[{props:{action:`make-child`},style:{marginLeft:`calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))`,borderRadius:e.shape.borderRadius,backgroundColor:e.alpha((e.vars||e).palette.primary.dark,(e.vars||e).palette.action.focusOpacity)}},{props:{action:`reorder-above`},style:{marginLeft:`calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))`,borderTop:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:`reorder-below`},style:{marginLeft:`calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))`,borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:`move-to-parent`},style:{marginLeft:`calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))`,borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}}]}));function ah(e){return e.action==null?null:(0,W.jsx)(ih,H({},e))}function oh(e){let{children:t,itemId:n,id:r}=e,{wrapItem:i,store:a}=em(),o=Hp(a,hm.treeItemIdAttribute,n,r);return(0,W.jsx)(G.Fragment,{children:i({children:t,itemId:n,store:a,idAttribute:o})})}var sh=m(`input`,{name:`MuiTreeItem`,slot:`LabelInput`})(({theme:e})=>H({},e.typography.body1,{width:`100%`,backgroundColor:(e.vars||e).palette.background.paper,borderRadius:e.shape.borderRadius,border:`none`,padding:`0 2px`,boxSizing:`border-box`,"&:focus":{outline:`1px solid ${(e.vars||e).palette.primary.main}`}})),ch=[`visible`],lh=[`id`,`itemId`,`label`,`disabled`,`disableSelection`,`children`,`slots`,`slotProps`,`classes`],uh=Xp(`MuiTreeItem`),dh=m(`li`,{name:`MuiTreeItem`,slot:`Root`})({listStyle:`none`,margin:0,padding:0,outline:0}),fh=m(`div`,{name:`MuiTreeItem`,slot:`Content`,shouldForwardProp:e=>a(e)&&e!==`status`})(({theme:e})=>({padding:e.spacing(.5,1),paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`,borderRadius:e.shape.borderRadius,width:`100%`,height:`var(--TreeView-itemHeight, unset)`,boxSizing:`border-box`,position:`relative`,display:`flex`,alignItems:`center`,gap:e.spacing(1),cursor:`pointer`,WebkitTapHighlightColor:`transparent`,"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},"&[data-disabled]":{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:`transparent`,cursor:`auto`},"&[data-focused]":{backgroundColor:(e.vars||e).palette.action.focus},"&[data-selected]":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}}},"&[data-selected][data-focused]":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}})),ph=m(`div`,{name:`MuiTreeItem`,slot:`Label`,shouldForwardProp:e=>a(e)&&e!==`editable`})(({theme:e})=>H({width:`100%`,boxSizing:`border-box`,minWidth:0,position:`relative`,overflow:`hidden`},e.typography.body1,{variants:[{props:({editable:e})=>e,style:{paddingLeft:`2px`}}]})),mh=m(`div`,{name:`MuiTreeItem`,slot:`IconContainer`})({width:16,display:`flex`,flexShrink:0,justifyContent:`center`,position:`relative`,cursor:`inherit`,"& svg":{fontSize:18}}),hh=m(cn,{name:`MuiTreeItem`,slot:`GroupTransition`,overridesResolver:(e,t)=>t.groupTransition})({margin:0,padding:0}),gh=m(`div`,{name:`MuiTreeItem`,slot:`ErrorIcon`})({position:`absolute`,right:-3,width:7,height:7,borderRadius:`50%`,backgroundColor:`red`}),_h=m(be,{name:`MuiTreeItem`,slot:`LoadingIcon`})({color:`text.primary`}),vh=m(G.forwardRef((e,t)=>{let{visible:n}=e,r=K(e,ch);return n?(0,W.jsx)(uo,H({},r,{ref:t})):null}),{name:`MuiTreeItem`,slot:`Checkbox`})({padding:0}),yh=e=>{let{classes:t}=nm(),n=H({},e,{root:V(e?.root,t.root),content:V(e?.content,t.itemContent),iconContainer:V(e?.iconContainer,t.itemIconContainer),checkbox:V(e?.checkbox,t.itemCheckbox),label:V(e?.label,t.itemLabel),groupTransition:V(e?.groupTransition,t.itemGroupTransition),labelInput:V(e?.labelInput,t.itemLabelInput),dragAndDropOverlay:V(e?.dragAndDropOverlay,t.itemDragAndDropOverlay),errorIcon:V(e?.errorIcon,t.itemErrorIcon),loadingIcon:V(e?.loadingIcon,t.itemLoadingIcon)});return g({root:[`root`],content:[`content`],iconContainer:[`iconContainer`],checkbox:[`checkbox`],label:[`label`],groupTransition:[`groupTransition`],labelInput:[`labelInput`],dragAndDropOverlay:[`dragAndDropOverlay`],errorIcon:[`errorIcon`],loadingIcon:[`loadingIcon`]},Qm,n)},bh=G.forwardRef(function(e,t){let n=uh({props:e,name:`MuiTreeItem`}),{id:r,itemId:i,label:a,disabled:o,disableSelection:s,children:c,slots:l={},slotProps:u={},classes:d}=n,f=K(n,lh),{getContextProviderProps:p,getRootProps:m,getContentProps:h,getIconContainerProps:g,getCheckboxProps:_,getLabelProps:v,getGroupTransitionProps:y,getLabelInputProps:b,getDragAndDropOverlayProps:x,getErrorContainerProps:S,getLoadingContainerProps:C,status:w}=Zm({id:r,itemId:i,children:c,label:a,disabled:o,disableSelection:s}),T=yh(d),E=l.root??dh,D=Ai({elementType:E,getSlotProps:m,externalForwardedProps:f,externalSlotProps:u.root,additionalProps:{ref:t},ownerState:{},className:T.root}),O=l.content??fh,k=Ai({elementType:O,getSlotProps:h,externalSlotProps:u.content,ownerState:{},className:T.content}),A=l.iconContainer??mh,j=Ai({elementType:A,getSlotProps:g,externalSlotProps:u.iconContainer,ownerState:{},className:T.iconContainer}),M=l.label??ph,N=Ai({elementType:M,getSlotProps:v,externalSlotProps:u.label,ownerState:{},className:T.label}),P=l.checkbox??vh,ee=Ai({elementType:P,getSlotProps:_,externalSlotProps:u.checkbox,ownerState:{},className:T.checkbox}),F=l.groupTransition??void 0,I=Ai({elementType:F,getSlotProps:y,externalSlotProps:u.groupTransition,ownerState:{},className:T.groupTransition}),L=l.labelInput??sh,R=Ai({elementType:L,getSlotProps:b,externalSlotProps:u.labelInput,ownerState:{},className:T.labelInput}),z=l.dragAndDropOverlay??ah,te=Ai({elementType:z,getSlotProps:x,externalSlotProps:u.dragAndDropOverlay,ownerState:{},className:T.dragAndDropOverlay}),ne=l.errorIcon??gh,re=Ai({elementType:ne,getSlotProps:S,externalSlotProps:u.errorIcon,ownerState:{},className:T.errorIcon}),B=l.loadingIcon??_h,ie=Ai({elementType:B,getSlotProps:C,externalSlotProps:u.loadingIcon,ownerState:{},className:T.loadingIcon});return(0,W.jsx)(oh,H({},p(),{children:(0,W.jsxs)(E,H({},D,{children:[(0,W.jsxs)(O,H({},k,{children:[(0,W.jsxs)(A,H({},j,{children:[w.error&&(0,W.jsx)(ne,H({},re)),w.loading?(0,W.jsx)(B,H({},ie)):(0,W.jsx)(rh,{status:w,slots:l,slotProps:u})]})),(0,W.jsx)(P,H({},ee)),w.editing?(0,W.jsx)(L,H({},R)):(0,W.jsx)(M,H({},N)),(0,W.jsx)(z,H({},te))]})),c&&(0,W.jsx)(hh,H({as:F},I))]}))}))});function xh(e,t,n){let r=Hp(e,hm.treeId),i=Hp(e,q.itemChildrenIndentation),a=Hp(e,Em.isMultiSelectEnabled);return o=>H({ref:n,role:`tree`,id:r,"aria-multiselectable":a},t,o,{style:H({},t.style,{"--TreeView-itemChildrenIndentation":typeof i==`number`?`${i}px`:i}),onFocus:t=>{o.onFocus?.(t),e.focus.handleRootFocus(t)},onBlur:t=>{o.onBlur?.(t),e.focus.handleRootBlur(t)}})}var Sh=[`ownerState`],Ch=G.createContext(null),wh=()=>Zp,Th=e=>q.itemOrderedChildrenIds(e,null),Eh=G.memo(function({itemSlot:e,itemSlotProps:t,itemId:n,skipChildren:r}){let i=G.useContext(Ch),{store:a}=em(),o=Hp(a,q.itemMeta,n),s=Hp(a,r?wh:q.itemOrderedChildrenIds,n),c=e??bh,l=K(Ai({elementType:c,externalSlotProps:t,additionalProps:{label:o?.label,id:o?.idAttribute,itemId:n},ownerState:{itemId:n,label:o?.label}}),Sh);return(0,W.jsx)(c,H({},l,{children:i?s?.map(i):null}))},sm);function Dh(e){let{slots:t,slotProps:n,ownerState:r,forwardedProps:i,rootRef:a}=e,{store:o}=em(),{classes:s}=nm(),c=t?.item,l=n?.item,u=Hp(o,q.domStructure),d=Hp(o,u===`flat`?vm.flatList:Th),f=xh(o,i,a),p=t.root,m=Ai({elementType:p,externalSlotProps:n?.root,className:s.root,getSlotProps:f,ownerState:r}),h=u===`flat`,g=G.useCallback(e=>(0,W.jsx)(Eh,{itemSlot:c,itemSlotProps:l,itemId:e,skipChildren:h},e),[c,l,h]);return(0,W.jsx)(Ch.Provider,{value:g,children:(0,W.jsx)(p,H({},m,{children:d.map(g)}))})}var Oh=`apiRef.slots.slotProps.disabledItemsFocusable.items.isItemDisabled.isItemSelectionDisabled.getItemLabel.getItemChildren.getItemId.onItemClick.itemChildrenIndentation.id.expandedItems.defaultExpandedItems.onExpandedItemsChange.onItemExpansionToggle.expansionTrigger.disableSelection.selectedItems.defaultSelectedItems.multiSelect.checkboxSelection.selectionPropagation.onSelectedItemsChange.onItemSelectionToggle.onItemFocus.itemHeight.onItemLabelChange.isItemEditable.domStructure`.split(`.`);function kh(e){let{apiRef:t,slots:n,slotProps:r,disabledItemsFocusable:i,items:a,isItemDisabled:o,isItemSelectionDisabled:s,getItemLabel:c,getItemChildren:l,getItemId:u,onItemClick:d,itemChildrenIndentation:f,id:p,expandedItems:m,defaultExpandedItems:h,onExpandedItemsChange:g,onItemExpansionToggle:_,expansionTrigger:v,disableSelection:y,selectedItems:b,defaultSelectedItems:x,multiSelect:S,checkboxSelection:C,selectionPropagation:w,onSelectedItemsChange:T,onItemSelectionToggle:E,onItemFocus:D,itemHeight:O,onItemLabelChange:k,isItemEditable:A,domStructure:j}=e,M=K(e,Oh);return{apiRef:t,slots:n,slotProps:r,parameters:G.useMemo(()=>({disabledItemsFocusable:i,items:a,isItemDisabled:o,isItemSelectionDisabled:s,getItemLabel:c,getItemChildren:l,getItemId:u,onItemClick:d,itemChildrenIndentation:f,id:p,expandedItems:m,defaultExpandedItems:h,onExpandedItemsChange:g,onItemExpansionToggle:_,expansionTrigger:v,disableSelection:y,selectedItems:b,defaultSelectedItems:x,multiSelect:S,checkboxSelection:C,selectionPropagation:w,onSelectedItemsChange:T,onItemSelectionToggle:E,onItemFocus:D,itemHeight:O,onItemLabelChange:k,isItemEditable:A,domStructure:j}),[i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j]),forwardedProps:M}}var Ah=typeof document<`u`?G.useLayoutEffect:()=>{};function jh(e){G.useEffect(e,Zp)}var Mh={...G},Nh=typeof Symbol.dispose==`symbol`?Symbol.dispose:Symbol.for(`Symbol.dispose`),Ph=typeof SuppressedError==`function`?SuppressedError:void 0;function Fh(e,t){return Ph?new Ph(e,t):Object.assign(Error(`An error was suppressed during disposal.`),{name:`SuppressedError`,error:e,suppressed:t})}function Ih(e){if(e)throw ReferenceError(`MUI X: The disposable stack is disposed.`)}var Lh=class e{stack=[];isDisposed=!1;get disposed(){return this.isDisposed}use(e){if(Ih(this.isDisposed),e!=null){let t=e[Nh];if(typeof t!=`function`)throw TypeError(`MUI X: The value is not disposable.`);this.stack.push(()=>t.call(e))}return e}adopt(e,t){return Ih(this.isDisposed),this.stack.push(()=>t(e)),e}defer(e){Ih(this.isDisposed),this.stack.push(e)}move(){Ih(this.isDisposed);let t=new e;return t.stack=this.stack,this.stack=[],this.isDisposed=!0,t}dispose(){if(this.isDisposed)return;this.isDisposed=!0;let e=!1,t;for(let n=this.stack.length-1;n>=0;--n)try{this.stack[n]()}catch(n){t=e?Fh(n,t):n,e=!0}if(this.stack=[],e)throw t}[Nh](){this.dispose()}},Rh=globalThis.DisposableStack??Lh;globalThis.AsyncDisposableStack;var zh=Mh;zh.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE??zh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;var Bh=Symbol(`useDisposable.mount`),Vh=Symbol();function Hh(e){let t=G.useRef(Vh);if(t.current===Vh){let n=e(),r=()=>{n[Nh](),t.current=Vh};n[Bh]=()=>r,t.current=n}return jh(t.current[Bh]),t.current}var Uh=Hh;function Wh(e,t){let n=Ie(),r=Uh(()=>new e(H({},t,{isRtl:n})));return Ah(()=>r.updateStateFromParameters(H({},t,{isRtl:n})),[r,n,t]),jh(r.mountEffect),r}var Gh=class{maxListeners=20;warnOnce=!1;events={};on(e,t,n={}){let r=this.events[e];r||(r={highPriority:new Map,regular:new Map},this.events[e]=r),n.isFirst?r.highPriority.set(t,!0):r.regular.set(t,!0)}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){let n=this.events[e];if(!n)return;let r=Array.from(n.highPriority.keys()),i=Array.from(n.regular.keys());for(let e=r.length-1;e>=0;--e){let i=r[e];n.highPriority.has(i)&&i.apply(this,t)}for(let e=0;et||(e?`iconContainer`:`content`);function qh(e){return{disabledItemsFocusable:e.disabledItemsFocusable??!1,itemChildrenIndentation:e.itemChildrenIndentation??`12px`,providedTreeId:e.id,expansionTrigger:Kh({isItemEditable:e.isItemEditable,expansionTrigger:e.expansionTrigger}),disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,selectionPropagation:e.selectionPropagation??Qp,itemHeight:e.itemHeight??null}}function Jh(e,t,n){return e===void 0?t===void 0?n:t:e}function Yh(e){return H({treeId:void 0,focusedItemId:null},qh(e),gm.buildItemsStateIfNeeded(e),{expandedItems:Jh(e.expandedItems,e.defaultExpandedItems,[]),selectedItems:Jh(e.selectedItems,e.defaultSelectedItems,e.multiSelect?Zp:null)})}var Xh=0,Zh=()=>(Xh+=1,`mui-tree-view-${Xh}`),Qh=class{timeoutIds=new Map;intervalIds=new Map;startTimeout=(e,t,n)=>{this.clearTimeout(e);let r=setTimeout(()=>{this.timeoutIds.delete(e),n()},t);this.timeoutIds.set(e,r)};startInterval=(e,t,n)=>{this.clearInterval(e);let r=setInterval(n,t);this.intervalIds.set(e,r)};clearTimeout=e=>{let t=this.timeoutIds.get(e);t!=null&&(clearTimeout(t),this.timeoutIds.delete(e))};clearInterval=e=>{let t=this.intervalIds.get(e);t!=null&&(clearInterval(t),this.intervalIds.delete(e))};clearAll=()=>{this.timeoutIds.forEach(clearTimeout),this.timeoutIds.clear(),this.intervalIds.forEach(clearInterval),this.intervalIds.clear()}},$h=({props:e})=>{let{store:t}=em(),{label:n,itemId:r}=e,[i,a]=G.useState(n),o=Hp(t,Am.isItemEditable,r);return!Hp(t,Am.isItemBeingEdited,r)&&i!==n&&a(n),{propsEnhancers:{label:()=>({editable:o}),labelInput:({externalEventHandlers:e,interactions:t})=>o?{value:i??``,"data-element":`labelInput`,onChange:t=>{e.onChange?.(t),a(t.target.value)},onKeyDown:n=>{if(e.onKeyDown?.(n),n.defaultMuiPrevented)return;let r=n.target;n.key===`Enter`&&r.value?t.handleSaveItemLabel(n,r.value):n.key===`Escape`&&t.handleCancelItemLabelEditing(n)},onBlur:n=>{e.onBlur?.(n),!n.defaultMuiPrevented&&n.target.value&&t.handleSaveItemLabel(n,n.target.value)},autoFocus:!0,type:`text`}:{}}}},eg=class{constructor(e){this.store=e,e.itemPluginManager.register($h,null)}buildPublicAPI=()=>({setEditedItem:this.setEditedItem,updateItemLabel:this.updateItemLabel});setEditedItem=e=>{e!==null&&!Am.isItemEditable(this.store.state,e)||this.store.set(`editedItemId`,e)};updateItemLabel=(e,t)=>{if(!t)throw Error(dp(197,e));let n=this.store.state.itemMetaLookup[e];n.label!==t&&(this.store.set(`itemMetaLookup`,H({},this.store.state.itemMetaLookup,{[e]:H({},n,{label:t})})),this.store.parameters.onItemLabelChange&&this.store.parameters.onItemLabelChange(e,t))}},tg=500,ng=class{typeaheadQuery=``;constructor(e){this.store=e,this.labelMap=ig(q.itemMetaLookup(this.store.state)),this.store.registerStoreEffect(q.itemMetaLookup,(e,t)=>{this.store.shouldIgnoreItemsStateUpdate()||(this.labelMap=ig(t))})}canToggleItemSelection=e=>Em.canItemBeSelected(this.store.state,e);canToggleItemExpansion=e=>!q.isItemDisabled(this.store.state,e)&&vm.isItemExpandable(this.store.state,e);getFirstItemMatchingTypeaheadQuery=(e,t)=>{let n=e=>{let t=Im(this.store.state,e);return t===null?Rm(this.store.state):t},r=t=>{let r=null,i={},a=t.length>1?e:n(e);for(;r==null&&!i[a];)this.labelMap[a]?.startsWith(t)?r=a:(i[a]=!0,a=n(a));return r},i=t.toLowerCase(),a=`${this.typeaheadQuery}${i}`,o=r(a);if(o!=null)return this.typeaheadQuery=a,o;let s=r(i);return s==null?(this.typeaheadQuery=``,null):(this.typeaheadQuery=i,s)};updateLabelMap=e=>{this.labelMap=e(this.labelMap)};handleItemKeyDown=async(e,t)=>{if(e.defaultMuiPrevented||e.altKey||Hm(e.target,e.currentTarget))return;let n=e.ctrlKey||e.metaKey,r=e.key,i=Em.isMultiSelectEnabled(this.store.state);switch(!0){case r===` `&&this.canToggleItemSelection(t):e.preventDefault(),i&&e.shiftKey?this.store.selection.expandSelectionRange(e,t):this.store.selection.setItemSelection({event:e,itemId:t,keepExistingSelection:i,shouldBeSelected:void 0});break;case r===`Enter`:this.store.labelEditing?.setEditedItem&&Am.isItemEditable(this.store.state,t)&&!Am.isItemBeingEdited(this.store.state,t)?this.store.labelEditing.setEditedItem(t):this.canToggleItemExpansion(t)?(this.store.expansion.setItemExpansion({event:e,itemId:t}),e.preventDefault()):this.canToggleItemSelection(t)&&(i?(e.preventDefault(),this.store.selection.setItemSelection({event:e,itemId:t,keepExistingSelection:!0})):Em.isItemSelected(this.store.state,t)||(this.store.selection.setItemSelection({event:e,itemId:t}),e.preventDefault()));break;case r===`ArrowDown`:{let n=Im(this.store.state,t);n&&(e.preventDefault(),this.store.focus.focusItem(e,n),i&&e.shiftKey&&this.canToggleItemSelection(n)&&this.store.selection.selectItemFromArrowNavigation(e,t,n));break}case r===`ArrowUp`:{let n=Fm(this.store.state,t);n&&(e.preventDefault(),this.store.focus.focusItem(e,n),i&&e.shiftKey&&this.canToggleItemSelection(n)&&this.store.selection.selectItemFromArrowNavigation(e,t,n));break}case r===`ArrowRight`&&!this.store.parameters.isRtl||r===`ArrowLeft`&&this.store.parameters.isRtl:if(n)return;if(vm.isItemExpanded(this.store.state,t)){let n=Im(this.store.state,t);n&&(this.store.focus.focusItem(e,n),e.preventDefault())}else this.canToggleItemExpansion(t)&&(this.store.expansion.setItemExpansion({event:e,itemId:t}),e.preventDefault());break;case r===`ArrowLeft`&&!this.store.parameters.isRtl||r===`ArrowRight`&&this.store.parameters.isRtl:if(n)return;if(this.canToggleItemExpansion(t)&&vm.isItemExpanded(this.store.state,t))this.store.expansion.setItemExpansion({event:e,itemId:t}),e.preventDefault();else{let n=q.itemParentId(this.store.state,t);n&&(this.store.focus.focusItem(e,n),e.preventDefault())}break;case r===`Home`:this.canToggleItemSelection(t)&&i&&n&&e.shiftKey?this.store.selection.selectRangeFromStartToItem(e,t):this.store.focus.focusItem(e,Rm(this.store.state)),e.preventDefault();break;case r===`End`:this.canToggleItemSelection(t)&&i&&n&&e.shiftKey?this.store.selection.selectRangeFromItemToEnd(e,t):this.store.focus.focusItem(e,Lm(this.store.state)),e.preventDefault();break;case r===`*`:this.store.expansion.expandAllSiblings(e,t),e.preventDefault();break;case String.fromCharCode(e.keyCode)===`A`&&n&&i&&Em.enabled(this.store.state):this.store.selection.selectAllNavigableItems(e),e.preventDefault();break;case!n&&!e.shiftKey&&rg(r):{this.store.timeoutManager.clearTimeout(`typeahead`);let n=this.getFirstItemMatchingTypeaheadQuery(t,r);n==null?this.typeaheadQuery=``:(this.store.focus.focusItem(e,n),e.preventDefault()),this.store.timeoutManager.startTimeout(`typeahead`,tg,()=>{this.typeaheadQuery=``});break}}}};function rg(e){return!!e&&e.length===1&&!!e.match(/\S/)}function ig(e){let t={};return Object.values(e).forEach(e=>{t[e.id]=e.label.toLowerCase()}),t}var ag=class{itemPlugins=[];itemWrappers=[];register=(e,t)=>{this.itemPlugins.push(e),t&&this.itemWrappers.push(t)};listPlugins=()=>this.itemPlugins;listWrappers=()=>this.itemWrappers},og=class extends Jp{initialParameters=null;disposables=new Rh;eventManager=this.disposables.adopt(new Gh,e=>e.removeAllListeners());timeoutManager=this.disposables.adopt(new Qh,e=>e.clearAll());itemPluginManager=new ag;constructor(e,t,n){let r=Yh(e),i=n.getInitialState(r,e);super(i),this.parameters=e,this.instanceName=t,this.mapper=n,this.items=new gm(this),this.focus=new Wm(this),this.expansion=new Um(this),this.selection=new Km(this),this.keyboardNavigation=new ng(this)}buildPublicAPI(){return H({},this.items.buildPublicAPI(),this.focus.buildPublicAPI(),this.expansion.buildPublicAPI(),this.selection.buildPublicAPI())}updateStateFromParameters(e){let t=(t,n,r)=>{e[n]!==void 0&&(t[n]=e[n])},n=qh(e);t(n,`expandedItems`,`defaultExpandedItems`),t(n,`selectedItems`,`defaultSelectedItems`),(this.state.providedTreeId!==e.id||this.state.treeId===void 0)&&(n.treeId=Zh()),!this.mapper.shouldIgnoreItemsStateUpdate(e)&&gm.shouldRebuildItemsState(e,this.parameters)&&Object.assign(n,gm.buildItemsStateIfNeeded(e));let r=this.mapper.updateStateFromParameters(n,e,t);this.update(r),this.parameters=e}mountEffect=()=>{};[Nh](){if(!this.disposables.disposed)try{this.disposables.dispose()}catch{}}shouldIgnoreItemsStateUpdate=()=>this.mapper.shouldIgnoreItemsStateUpdate(this.parameters);registerStoreEffect=(e,t)=>{let n=e(this.state);this.disposables.defer(this.subscribe(r=>{let i=e(r);i!==n&&(t(n,i),n=i)}))};publishEvent=(e,t,n)=>{sg(n)&&n.isPropagationStopped()||this.eventManager.emit(e,t,n)};subscribeEvent=(e,t)=>{this.eventManager.on(e,t)}};function sg(e){return e?.isPropagationStopped!==void 0}var cg=e=>({isItemEditable:e.isItemEditable??!1}),lg={getInitialState:(e,t)=>H({},e,cg(t),{editedItemId:null,lazyLoadedItems:null,domStructure:t.domStructure??`nested`}),updateStateFromParameters:(e,t)=>H({},e,cg(t)),shouldIgnoreItemsStateUpdate:()=>!1},ug=class extends og{labelEditing=new eg(this);static rawMapper=lg;buildPublicAPI(){return H({},super.buildPublicAPI(),this.labelEditing.buildPublicAPI(),{addItems:this.items.addItems})}},dg=class extends ug{constructor(e){super(e,`RichTreeView`,lg)}},fg=Xp(`MuiRichTreeView`),pg=e=>{let{classes:t}=e;return G.useMemo(()=>g({root:[`root`],item:[`item`],itemContent:[`itemContent`],itemGroupTransition:[`itemGroupTransition`],itemIconContainer:[`itemIconContainer`],itemLabel:[`itemLabel`],itemLabelInput:[`itemLabelInput`],itemCheckbox:[`itemCheckbox`]},Yp,t),[t])},mg=m(`ul`,{name:`MuiRichTreeView`,slot:`Root`})({padding:0,margin:0,listStyle:`none`,outline:0,position:`relative`}),hg=G.forwardRef(function(e,t){let n=fg({props:e,name:`MuiRichTreeView`}),{slots:r,slotProps:i,apiRef:a,parameters:o,forwardedProps:s}=kh(n),c=Wh(dg,o),l=G.useRef(null),u=sp(t,l),d=Hp(c,km.isItemLoading,null),f=Hp(c,km.itemError,null),p=pg(n),m=G.useMemo(()=>H({root:mg},r),[r]);return d?(0,W.jsx)(ve,{children:`Loading…`}):f?(0,W.jsx)(Sn,{severity:`error`,children:f.message}):(0,W.jsx)(am,{store:c,classes:p,slots:m,slotProps:i,apiRef:a,rootRef:l,children:(0,W.jsx)(Nm.Provider,{value:q.itemDepth,children:(0,W.jsx)(Dh,{slots:m,slotProps:i,forwardedProps:s,ownerState:n,rootRef:u})})})}),gg=class extends Error{name=`KyError`;get isKyError(){return!0}},_g=class extends gg{name=`HTTPError`;response;request;options;data;constructor(e,t,n){let r=`${e.status||e.status===0?e.status:``} ${e.statusText??``}`.trim(),i=r?`status code ${r}`:`an unknown error`;super(`Request failed with ${i}: ${t.method} ${t.url}`),this.response=e,this.request=t,this.options=n}},vg=class extends gg{name=`NetworkError`;request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}},yg=class extends Error{name=`NonError`;value;constructor(e){let t=`Non-error value was thrown`;try{typeof e==`string`?t=e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`&&(t=e.message)}catch{}super(t),this.value=e}},bg=class extends gg{name=`ForceRetryError`;customDelay;code;customRequest;constructor(e){let t=e?.cause?e.cause instanceof Error?e.cause:new yg(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:`Forced retry`,t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},xg=class extends Error{name=`SchemaValidationError`;issues;constructor(e){super(`Response schema validation failed`),this.issues=e}},Sg=class extends gg{name=`TimeoutError`;request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}},Cg=(()=>{let e=!1,t=!1,n=typeof globalThis.ReadableStream==`function`,r=typeof globalThis.Request==`function`;if(n&&r)try{t=new globalThis.Request(`https://empty.invalid`,{body:new globalThis.ReadableStream,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`)}catch(e){if(e instanceof Error&&e.message===`unsupported BodyInit type`)return!1;throw e}return e&&!t})(),wg=typeof globalThis.AbortController==`function`,Tg=typeof globalThis.AbortSignal==`function`&&typeof globalThis.AbortSignal.any==`function`,Eg=typeof globalThis.ReadableStream==`function`,Dg=typeof globalThis.FormData==`function`,Og=[`get`,`post`,`put`,`patch`,`head`,`delete`],kg={json:`application/json`,text:`text/*`,formData:`multipart/form-data`,arrayBuffer:`*/*`,blob:`*/*`,bytes:`*/*`},Ag=2147483647,jg=Symbol(`stop`),Mg=class{options;constructor(e){this.options=e}},Ng=e=>new Mg(e),Pg={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Fg={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Ig=new TextEncoder,Lg=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[n,r]of e)t+=40,t+=Ig.encode(`Content-Disposition: form-data; name="${n}"`).byteLength,t+=typeof r==`string`?Ig.encode(r).byteLength:r.size;return t}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:typeof e==`string`?Ig.encode(e).byteLength:e instanceof URLSearchParams?Ig.encode(e.toString()).byteLength:0},Rg=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(e,a){if(a.enqueue(e),r){i+=r.byteLength;let e=t===0?0:i/t;e>=1&&(e=1-2**-52),n?.({percent:e,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=e},flush(){r&&(i+=r.byteLength,n?.({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},zg=(e,t)=>{if(!e.body)return e;let n={status:e.status,statusText:e.statusText,headers:e.headers};if(e.status===204)return new Response(null,n);let r=Math.max(0,Number(e.headers.get(`content-length`))||0);return new Response(Rg(e.body,r,t),n)},Bg=(e,t,n)=>{if(!e.body)return e;let r=Lg(n??e.body);return new Request(e,{duplex:`half`,body:Rg(e.body,r,t)})},Vg=e=>typeof e==`object`&&!!e,Hg=Symbol(`replaceOption`),Ug=e=>Vg(e)&&e[Hg]===!0?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},Wg=(...e)=>{for(let t of e)if((!Vg(t)||Array.isArray(t))&&t!==void 0)throw TypeError("The `options` argument must be an object");return e_({},...e)},Gg=(e={},t={})=>{let n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(let[e,t]of i.entries())r&&t===`undefined`||t===void 0?n.delete(e):n.set(e,t);return n},Kg=e=>{if(!Vg(e)||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},qg=e=>{if(e instanceof URLSearchParams){let t=new URLSearchParams(e),n=e[Qg];return n&&(t[Qg]=new Set(n)),t}return e instanceof globalThis.Headers?new globalThis.Headers(e):Array.isArray(e)?[...e]:Kg(e)?{...e}:e},Jg=e=>Object.fromEntries(Object.entries(e).filter(e=>e[1]!==void 0)),Yg=(e,t)=>Kg(e)&&Kg(t)?Jg({...e,...t}):Gg(e,t);function Xg(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:e_(e[n]??[],t[n]??[])}var Zg=(e={},t={})=>({init:Xg(e,t,`init`),beforeRequest:Xg(e,t,`beforeRequest`),beforeRetry:Xg(e,t,`beforeRetry`),beforeError:Xg(e,t,`beforeError`),afterResponse:Xg(e,t,`afterResponse`)}),Qg=Symbol(`deletedParameters`),$g=(e,t)=>{let n=new URLSearchParams,r=new Set;for(let i of[e,t])if(i!==void 0){if(i instanceof URLSearchParams){for(let[e,t]of i.entries())n.append(e,t),r.delete(e);let e=i[Qg];if(e)for(let t of e)n.delete(t),r.add(t)}else if(Array.isArray(i))for(let e of i){if(!Array.isArray(e)||e.length!==2)throw TypeError(`Array search parameters must be provided in [[key, value], ...] format`);n.append(String(e[0]),String(e[1])),r.delete(String(e[0]))}else if(Vg(i))for(let[e,t]of Object.entries(i))t===void 0?(n.delete(e),r.add(e)):(n.append(e,String(t)),r.delete(e));else{let e=new URLSearchParams(i);for(let[t,i]of e.entries())n.append(t,i),r.delete(t)}}return r.size>0&&(n[Qg]=r),n},e_=(...e)=>{let t={},n={},r={},i,a=[];for(let o of e)if(Array.isArray(o))Array.isArray(t)||(t=[]),t=[...t,...o];else if(Vg(o)){for(let[e,n]of Object.entries(o)){if(e===`signal`&&n instanceof globalThis.AbortSignal){a.push(n);continue}let r=Ug(n),{isReplace:o}=r;if(n=r.value,e===`context`){if(n!=null&&(!Vg(n)||Array.isArray(n)))throw TypeError("The `context` option must be an object");t={...t,context:n==null?{}:o?{...n}:{...t.context,...n}};continue}if(e===`searchParams`){i=n==null?void 0:o||i===void 0?n:$g(i,n);continue}Vg(n)&&!o&&e in t&&(n=e_(t[e],n)),t={...t,[e]:n}}if(Vg(o.hooks)){let{value:e,isReplace:n}=Ug(o.hooks);r=Zg(n?{}:r,e),t.hooks=r}if(Vg(o.headers)){let{value:e,isReplace:r}=Ug(o.headers);n=r?qg(e):Yg(n,e),t.headers=n}}return i!==void 0&&(t.searchParams=i),a.length>0&&(a.length===1?t.signal=a[0]:Tg?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},t_=e=>Og.includes(e)?e.toUpperCase():e,n_={limit:2,methods:[`get`,`put`,`head`,`delete`,`options`,`trace`],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},r_=(e={})=>{if(typeof e==`number`)return{...n_,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error(`retry.methods must be an array`);if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error(`retry.statusCodes must be an array`);let t=Object.fromEntries(Object.entries({...e,methods:e.methods?.map(e=>e.toLowerCase())}).filter(([,e])=>e!==void 0));return{...n_,...t}};async function i_(e,t,n,r){return new Promise((i,a)=>{let o=setTimeout(()=>{n&&n.abort(),a(new Sg(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function a_(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener(`abort`,i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}let a=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e)})}var o_=e=>{let t={};for(let n in e)Object.hasOwn(e,n)&&!(n in Fg)&&!(n in Pg)&&(t[n]=e[n]);return t},s_=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0||!!e[Qg]?.size:typeof e==`object`?Object.keys(e).length>0:typeof e==`string`?e.trim().length>0:!!e,c_=Object.prototype.toString,l_=e=>c_.call(e)===`[object Error]`,u_=new Set([`network error`,`NetworkError when attempting to fetch resource.`,`The Internet connection appears to be offline.`,`Network request failed`,`fetch failed`,`terminated`,` A network error occurred.`,`Network connection lost`]);function d_(e){if(!(e&&l_(e)&&e.name===`TypeError`&&typeof e.message==`string`))return!1;let{message:t,stack:n}=e;return t===`Load failed`?n===void 0||`__sentry_captured__`in e:t.startsWith(`error sending request for url`)||t===`Failed to fetch`||t.startsWith(`Failed to fetch (`)&&t.endsWith(`)`)?!0:u_.has(t)}var f_=(e,t)=>e instanceof t||e?.name===t.name;function p_(e){return f_(e,_g)}function m_(e){return f_(e,vg)}function h_(e){return f_(e,Sg)}var g_=10485760,__="The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl",v_=Symbol(`timedOutResponseData`),y_=e=>{let t=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(e),n=t?.[1]??t?.[2];if(n)try{return new TextDecoder(n)}catch{}return new TextDecoder},b_="The `schema` argument must follow the Standard Schema specification",x_=e=>typeof e==`object`?{...e,...e.methods&&{methods:[...e.methods]},...e.statusCodes&&{statusCodes:[...e.statusCodes]},...e.afterStatusCodes&&{afterStatusCodes:[...e.afterStatusCodes]}}:e,S_=Object.prototype.toString,C_=e=>e instanceof globalThis.Request||S_.call(e)===`[object Request]`,w_=e=>e instanceof globalThis.Response||S_.call(e)===`[object Response]`,T_=e=>Array.isArray(e)?e.map(e=>[...e]):qg(e);function E_(e){let t={...e,json:qg(e.json),context:qg(e.context),headers:qg(e.headers),searchParams:T_(e.searchParams)};return e.retry!==void 0&&(t.retry=x_(e.retry)),t}var D_=async(e,t)=>{if(typeof t!=`object`&&typeof t!=`function`||t===null)throw TypeError(b_);let n=t[`~standard`];if(typeof n!=`object`||!n||typeof n.validate!=`function`)throw TypeError(b_);let r=await n.validate(e);if(r.issues)throw new xg(r.issues);return r.value},O_=class e{static create(t,n){let r=n.hooks?.init??[],i=r.length>0?E_(n):n;for(let e of r)e(i);let a=new e(t,i),o=async()=>{if(typeof a.#i.timeout==`number`&&a.#i.timeout>2147483647)throw RangeError(`The \`timeout\` option cannot be greater than ${Ag}`);if(typeof a.#i.totalTimeout==`number`&&a.#i.totalTimeout>2147483647)throw RangeError(`The \`totalTimeout\` option cannot be greater than ${Ag}`);await Promise.resolve();let e=await a.#w(),t=e??await a.#E(async()=>a.#k()),n=e!==void 0||a.#O();for(;;){if(t===void 0)return t;if(w_(t))try{t=await a.#T(t)}catch(e){if(!(e instanceof bg))throw e;let r=await a.#D(e,async()=>a.#k());if(r===void 0)return r;t=r,n=a.#O();continue}let e=t;if(!e.ok&&e.type!==`opaque`&&(typeof a.#i.throwHttpErrors==`function`?a.#i.throwHttpErrors(e.status):a.#i.throwHttpErrors)){let r=new _g(e,a.#P(e),a.#M()),i=r;if(r.data=await a.#h(e),n)throw i;let o=await a.#D(r,async()=>a.#k());if(o===void 0)return o;t=o,n=a.#O();continue}break}if(!w_(t))return t;if(a.#m(t),a.#i.onDownloadProgress){if(typeof a.#i.onDownloadProgress!=`function`)throw TypeError("The `onDownloadProgress` option must be a function");if(!Eg)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let e=t.clone();return a.#x(t),zg(e,a.#i.onDownloadProgress)}return t},s=(async()=>{try{return await o()}catch(e){if(!(e instanceof Error)||a.#s.has(e))throw e;let t=e;for(let e of a.#i.hooks.beforeError){let n=await e({request:a.request,options:a.#M(),error:t,retryCount:a.#n});n instanceof Error&&(t=n)}throw t}finally{let e=a.#a;a.#b(e?.body??void 0),a.request!==e&&a.#b(a.request.body??void 0)}})();for(let[e,t]of Object.entries(kg))(e!==`bytes`||typeof globalThis.Response?.prototype?.bytes==`function`)&&(s[e]=async n=>{a.request.headers.set(`accept`,a.request.headers.get(`accept`)||t);let r=await s;if(e!==`json`)return r[e]();let o=await r.text();if(o===``)return n===void 0?JSON.parse(o):D_(void 0,n);let c=i.parseJson?await i.parseJson(o,{request:a.#P(r),response:r}):JSON.parse(o);return n===void 0?c:D_(c,n)});return s}static#e(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)):e}request;#t;#n=0;#r;#i;#a;#o;#s=new WeakSet;#c;#l;#u=!1;#d=new WeakMap;constructor(t,n={}){if(this.#r=t,Object.hasOwn(n,`prefixUrl`))throw Error(__);if(this.#i={...n,headers:Gg(this.#r.headers,n.headers),hooks:Zg({},n.hooks),method:t_(n.method??this.#r.method??`GET`),prefix:String(n.prefix||``),retry:r_(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,totalTimeout:n.totalTimeout??!1,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}},typeof this.#r!=`string`&&!(this.#r instanceof URL||this.#r instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(typeof this.#r==`string`){if(this.#i.prefix){let e=this.#i.prefix.replace(/\/+$/,``),t=this.#r.replace(/^\/+/,``);this.#r=`${e}/${t}`}if(this.#i.baseUrl){let e;try{e=new URL(this.#r)}catch{}e||(this.#r=new URL(this.#r,new Request(this.#i.baseUrl).url))}}wg&&Tg&&(this.#o=this.#i.signal??this.#r.signal,this.#t=new globalThis.AbortController,this.#i.signal=this.#S()),Cg&&(this.#i.duplex=`half`),this.#i.json!==void 0&&(this.#i.body=this.#i.stringifyJson?.(this.#i.json)??JSON.stringify(this.#i.json),this.#i.headers.set(`content-type`,this.#i.headers.get(`content-type`)??`application/json`));let r=n.headers&&new globalThis.Headers(n.headers).has(`content-type`);if(this.#r instanceof globalThis.Request&&(Dg&&this.#i.body instanceof globalThis.FormData||this.#i.body instanceof URLSearchParams)&&!r&&this.#i.headers.delete(`content-type`),this.request=new globalThis.Request(this.#r,this.#i),s_(this.#i.searchParams)){let t=new URL(this.request.url),n=this.#i.searchParams?.[Qg];if(n)for(let e of n)t.searchParams.delete(e);if(typeof this.#i.searchParams==`string`){let e=this.#i.searchParams.replace(/^\?/,``);e!==``&&(t.search=t.search?`${t.search}&${e}`:`?${e}`)}else{let n=new URLSearchParams(e.#e(this.#i.searchParams));for(let[e,r]of n.entries())t.searchParams.append(e,r)}if(this.#i.searchParams&&typeof this.#i.searchParams==`object`&&!Array.isArray(this.#i.searchParams)&&!(this.#i.searchParams instanceof URLSearchParams))for(let[e,n]of Object.entries(this.#i.searchParams))n===void 0&&t.searchParams.delete(e);this.request=new globalThis.Request(t,this.#i)}if(this.#i.onUploadProgress&&typeof this.#i.onUploadProgress!=`function`)throw TypeError("The `onUploadProgress` option must be a function");this.#l=typeof this.#i.totalTimeout==`number`?this.#j():void 0}#f(){let e=this.#i.retry.delay(this.#n+1),t=e;return this.#i.retry.jitter===!0?t=Math.random()*e:typeof this.#i.retry.jitter==`function`&&(t=this.#i.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e)),Math.min(this.#i.retry.backoffLimit,t)}async#p(e){if(this.#n>=this.#i.retry.limit)throw e;let t=e instanceof Error?e:new yg(e);if(t instanceof bg)return t.customDelay??this.#f();if(!this.#i.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(this.#i.retry.shouldRetry!==void 0){let n=await this.#i.retry.shouldRetry({error:t,retryCount:this.#n+1});if(n===!1)throw e;if(n===!0)return this.#f()}if(h_(e)){if(!this.#i.retry.retryOnTimeout)throw e;return this.#f()}if(p_(e)){if(!this.#i.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get(`Retry-After`)??e.response.headers.get(`RateLimit-Reset`)??e.response.headers.get(`X-RateLimit-Retry-After`)??e.response.headers.get(`X-RateLimit-Reset`)??e.response.headers.get(`X-Rate-Limit-Reset`);if(t&&this.#i.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t)*1e3;return Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse(`2024-01-01`)&&(e-=Date.now()),Number.isFinite(e)?(e=Math.max(0,e),Math.min(this.#i.retry.maxRetryAfter,e)):Math.min(this.#i.retry.maxRetryAfter,this.#f())}if(e.response.status===413)throw e;return this.#f()}if(!m_(e))throw e;return this.#f()}#m(e){let t=this.#P(e);return this.#i.parseJson&&(e.json=async()=>{let n=await e.text();return n===``?JSON.parse(n):this.#i.parseJson(n,{request:t,response:e})}),e}async#h(e){let t=await this.#v(e,this.#g());if(t===v_){this.#C();return}if(!t)return;if(!this.#_(e.headers.get(`content-type`)??``))return t;let n=await this.#y(t,e,this.#g(),this.#P(e));if(n===v_){this.#C();return}return n}#g(){let e=this.#i.timeout===!1?1e4:this.#i.timeout,t=this.#A();if(t===void 0)return e;if(t<=0)throw new Sg(this.request);return Math.min(e,t)}#_(e){let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(t)}async#v(e,t){let{body:n}=e;if(!n)try{return await e.text()}catch{return}let r;try{r=n.getReader()}catch{return}let i=y_(e.headers.get(`content-type`)??``),a=[],o=0,s=(async()=>{try{for(;;){let{done:e,value:t}=await r.read();if(e)break;if(o+=t.byteLength,o>g_){r.cancel().catch(()=>void 0);return}a.push(i.decode(t,{stream:!0}))}}catch{return}return a.push(i.decode()),a.join(``)})(),c=new Promise(e=>{let n=setTimeout(()=>{e(v_)},t);s.finally(()=>{clearTimeout(n)})}),l=await Promise.race([s,c]);return l===v_&&r.cancel().catch(()=>void 0),l}async#y(e,t,n,r){let i;try{return await Promise.race([Promise.resolve().then(()=>this.#i.parseJson?this.#i.parseJson(e,{request:r,response:t}):JSON.parse(e)),new Promise(e=>{i=setTimeout(()=>{e(v_)},n)})])}catch{return}finally{clearTimeout(i)}}#b(e){e&&e.cancel().catch(()=>void 0)}#x(e){this.#b(e.body??void 0)}#S(){return this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal}#C(){let e=this.#A();if(e!==void 0&&e<=0)throw new Sg(this.request)}async#w(){for(let e of this.#i.hooks.beforeRequest){let t=await e({request:this.request,options:this.#M(),retryCount:0});if(C_(t))this.#N(t);else if(w_(t))return t}}async#T(e){let t=this.#P(e);for(let n of this.#i.hooks.afterResponse){let r=this.#F(e.clone(),t);this.#m(r);let i;try{i=await n({request:this.request,options:this.#M(),response:r,retryCount:this.#n})}catch(t){throw r!==e&&this.#x(r),this.#x(e),t}if(i instanceof Mg)throw r!==e&&this.#x(r),this.#x(e),new bg(i.options);let a=w_(i)?this.#F(i,t):e;r!==e&&r!==a&&r.body!==a.body&&this.#x(r),e!==a&&e.body!==a.body&&this.#x(e),e=a}return e}async#E(e){try{return await e()}catch(t){return this.#D(t,e)}}async#D(e,t){this.#u=!1;let n=Math.min(await this.#p(e),Ag),r={signal:this.#o},i=this.#A();if(i!==void 0){if(i<=0)throw new Sg(this.request);if(n>=i)throw await a_(i,r),new Sg(this.request)}if(await a_(n,r),this.#C(),e instanceof bg&&e.customRequest){let t=new globalThis.Request(e.customRequest,this.#i.signal?{signal:this.#i.signal}:void 0);this.#N(t)}for(let t of this.#i.hooks.beforeRetry){let n;try{n=await t({request:this.request,options:this.#M(),error:e,retryCount:this.#n+1})}catch(t){throw t instanceof Error&&t!==e&&this.#s.add(t),t}if(C_(n)){this.#N(n);break}if(w_(n))return this.#u=!0,this.#n++,n;if(n===jg)return}return this.#C(),this.#n++,this.#E(t)}#O(){let e=this.#u;return this.#u=!1,e}async#k(){this.#t?.signal.aborted&&(this.#t=new globalThis.AbortController,this.#i.signal=this.#S(),this.request=new globalThis.Request(this.request,{signal:this.#i.signal}));let e=o_(this.#i),t=this.#i.retry.limit>0?this.request.clone():void 0,n=this.#I(this.request,this.#i.body??void 0);this.#a=n,t&&(this.request=t);try{let t=this.#A();if(t!==void 0&&t<=0)throw new Sg(this.request);let r=this.#i.timeout===!1?t:t===void 0?this.#i.timeout:Math.min(this.#i.timeout,t),i=r===void 0?await this.#i.fetch(n,e):await i_(n,e,this.#t,{timeout:r,fetch:this.#i.fetch});return this.#F(i,n)}catch(e){throw d_(e)?new vg(this.request,{cause:e}):e}}#A(){if(this.#l===void 0)return;let e=this.#j()-this.#l;return Math.max(0,this.#i.totalTimeout-e)}#j(){return globalThis.performance?.now()??Date.now()}#M(){if(!this.#c){let{hooks:e,json:t,parseJson:n,stringifyJson:r,searchParams:i,timeout:a,totalTimeout:o,throwHttpErrors:s,fetch:c,...l}=this.#i;this.#c=Object.freeze(l)}return this.#c}#N(e){this.#c=void 0,this.request=e}#P(e){return this.#d.get(e)??this.request}#F(e,t){return this.#d.set(e,t),e}#I(e,t){return!this.#i.onUploadProgress||!e.body||!Cg?e:Bg(e,this.#i.onUploadProgress,t??this.#i.body??void 0)}},k_=e=>{let t=(t,n)=>O_.create(t,Wg(e,n));for(let n of Og)t[n]=(t,r)=>O_.create(t,Wg(e,r,{method:n}));return t.create=e=>k_(Wg(e)),t.extend=t=>(typeof t==`function`&&(t=t(e??{})),k_(Wg(e,t))),t.stop=jg,t.retry=Ng,t},A_=k_(),j_=`http://localhost:8088`;async function M_(e){return(await A_.post(`${j_}/createPropertyTypeGroup`,{json:e}).json()).data}async function N_(e){return(await A_.delete(`${j_}/deletePropertyTypeGroup/${e}`).json()).data}async function P_(e){return(await A_.get(`${j_}/getPropertyTypeGroupsByParentId/${e}`).json()).data??[]}var F_=({open:e,title:t,onClose:n,onSubmit:r})=>{let[i,a]=(0,G.useState)(``),[o,s]=(0,G.useState)(``),[c,l]=(0,G.useState)(!1);return(0,G.useEffect)(()=>{e&&(a(``),s(``))},[e]),(0,W.jsxs)(Zo,{open:e,onClose:n,fullWidth:!0,maxWidth:`xs`,children:[(0,W.jsx)(us,{children:t}),(0,W.jsx)(ss,{children:(0,W.jsxs)(pe,{spacing:2,sx:{mt:1},children:[(0,W.jsx)(If,{label:`Label`,value:i,onChange:e=>a(e.target.value),autoFocus:!0,required:!0,fullWidth:!0}),(0,W.jsx)(If,{label:`Description`,value:o,onChange:e=>s(e.target.value),fullWidth:!0,multiline:!0,minRows:2})]})}),(0,W.jsxs)(ts,{children:[(0,W.jsx)(Xa,{onClick:n,disabled:c,children:`Cancel`}),(0,W.jsx)(Xa,{onClick:async()=>{if(i.trim()){l(!0);try{await r({label:i.trim(),description:o.trim()}),n()}finally{l(!1)}}},variant:`contained`,disabled:c||!i.trim(),children:`Add`})]})]})},I_=0;async function L_(e){let t=await P_(e)??[];return Promise.all(t.map(async e=>{let t=await L_(e.id);return{id:String(e.id),label:e.label,children:t.length>0?t:void 0}}))}function R_(e,t){let n=t.trim().toLowerCase();if(!n)return e;let r=e=>e.reduce((e,t)=>{let i=t.children?r(t.children):[],a=t.label.toLowerCase().includes(n);return(a||i.length>0)&&e.push({...t,children:a?t.children:i}),e},[]);return r(e)}function z_(e){return e.flatMap(e=>[e.id,...e.children?z_(e.children):[]])}function B_(e,t){for(let n of e){if(n.id===t)return n.label;let e=n.children?B_(n.children,t):null;if(e!=null)return e}return null}var V_=({selectedGroupId:e,onSelectedGroupChange:t})=>{let[n,r]=(0,G.useState)([]),[i,a]=(0,G.useState)(!1),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(``),[u,d]=(0,G.useState)([]),[f,p]=(0,G.useState)(!1),m=(0,G.useCallback)(async()=>{a(!0),s(null);try{r(await L_(I_))}catch{s(`Failed to load property type groups.`)}finally{a(!1)}},[]);(0,G.useEffect)(()=>{m()},[m]);let h=(0,G.useMemo)(()=>R_(n,c),[n,c]);return(0,G.useEffect)(()=>{c.trim()&&d(z_(h))},[c,h]),(0,W.jsxs)(pe,{sx:{width:320,minWidth:280,borderRight:`1px solid #e0e0e0`,p:1},spacing:1,children:[(0,W.jsx)(ve,{variant:`subtitle1`,children:`Property Type Groups`}),(0,W.jsxs)(pe,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,W.jsx)(If,{size:`small`,placeholder:`Search groups`,value:c,onChange:e=>l(e.target.value),fullWidth:!0,slotProps:{input:{startAdornment:(0,W.jsx)(tc,{position:`start`,children:(0,W.jsx)(ip,{fontSize:`small`})})}}}),(0,W.jsx)(Yu,{title:`Add group`,children:(0,W.jsx)(N,{size:`small`,onClick:()=>p(!0),children:(0,W.jsx)(np,{fontSize:`small`})})}),(0,W.jsx)(Yu,{title:`Remove selected group`,children:(0,W.jsx)(`span`,{children:(0,W.jsx)(N,{size:`small`,onClick:async()=>{e!=null&&window.confirm(`Remove selected property type group?`)&&(await N_(e),t(null,null),await m())},disabled:e==null,children:(0,W.jsx)(rp,{fontSize:`small`})})})})]}),o&&(0,W.jsx)(ve,{color:`error`,variant:`body2`,children:o}),(0,W.jsx)(Ra,{sx:{flexGrow:1,overflowY:`auto`,minHeight:300},children:(0,W.jsx)(hg,{items:h,selectedItems:e==null?null:String(e),onSelectedItemsChange:(e,r)=>{t(r?Number(r):null,r?B_(n,r):null)},expandedItems:u,onExpandedItemsChange:(e,t)=>d(t)})}),i&&(0,W.jsx)(ve,{variant:`body2`,children:`Loading...`}),(0,W.jsx)(F_,{open:f,title:`Add Property Type Group`,onClose:()=>p(!1),onSubmit:async({label:t,description:n})=>{await M_({id:0,label:t,description:n,parentGroupId:e??I_}),await m()}})]})},H_=e=>{if(Rp>=19){let t=t=>e(t,t.ref??null);return t.displayName=e.displayName??e.name,t}return G.forwardRef(e)},U_=T,W_=U_((0,W.jsx)(`path`,{d:`M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z`}),`ArrowUpward`),G_=U_((0,W.jsx)(`path`,{d:`M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z`}),`ArrowDownward`),K_=U_((0,W.jsx)(`path`,{d:`M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z`}),`KeyboardArrowRight`),q_=U_((0,W.jsx)(`path`,{d:`M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z`}),`ExpandMore`),J_=U_((0,W.jsx)(`path`,{d:`M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z`}),`FilterList`),Y_=U_((0,W.jsx)(`path`,{d:`M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z`}),`FilterAlt`),X_=U_((0,W.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z`}),`Search`);U_((0,W.jsx)(`path`,{d:`M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z`}),`Menu`),U_((0,W.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z`}),`CheckCircle`);var Z_=U_((0,W.jsx)(`path`,{d:`M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`}),`Undo`),Q_=U_((0,W.jsx)(`path`,{d:`M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z`}),`Redo`),$_=U_((0,W.jsx)(`path`,{d:`M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z`}),`ColumnIcon`),ev=U_((0,W.jsx)(`rect`,{width:`1`,height:`24`,x:`11.5`,rx:`0.5`}),`Separator`),tv=U_((0,W.jsx)(`path`,{d:`M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z`}),`ViewHeadline`),nv=U_((0,W.jsx)(`path`,{d:`M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z`}),`TableRows`),rv=U_((0,W.jsx)(`path`,{d:`M4 18h17v-6H4v6zM4 5v6h17V5H4z`}),`ViewStream`),iv=U_((0,W.jsx)(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z`}),`TripleDotsVertical`),av=U_((0,W.jsx)(`path`,{d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),ov=U_((0,W.jsx)(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`}),`Add`),sv=U_((0,W.jsx)(`path`,{d:`M19 13H5v-2h14v2z`}),`Remove`),cv=U_((0,W.jsx)(`path`,{d:`M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z`}),`Load`),lv=U_((0,W.jsx)(`path`,{d:`M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z`}),`Drag`),uv=U_((0,W.jsx)(`path`,{d:`M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),dv=U_((0,W.jsx)(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z`}),`MoreVert`),fv=U_((0,W.jsx)(`path`,{d:`M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z`}),`VisibilityOff`),pv=U_((0,W.jsx)(`g`,{children:(0,W.jsx)(`path`,{d:`M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z`})}),`ViewColumn`),mv=U_((0,W.jsx)(`path`,{d:`M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z`}),`Clear`);U_((0,W.jsx)(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z`}),`Delete`);var hv=U_((0,W.jsx)(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z`}),`Delete`),gv=U_((0,W.jsx)(`path`,{d:`M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z`}),`Download`),_v=U_((0,W.jsx)(`path`,{d:`M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z`}),`OpenInFull`),vv=U_((0,W.jsx)(`path`,{d:`M5 15h2V8.41L18.59 20 20 18.59 8.41 7H15V5H5z`}),`NorthWest`),yv=G.createContext(void 0),J=()=>{let e=G.useContext(yv);if(!e)throw Error(dp(70));return e},bv=[`sortingOrder`];function xv(e){let{sortingOrder:t}=e,n=K(e,bv),{slots:r}=J(),[i]=t,a=i===`asc`?r.columnSortedAscendingIcon:r.columnSortedDescendingIcon;return a?(0,W.jsx)(a,H({},n)):null}var Sv=G.createContext(void 0);function Cv(){let e=G.useContext(Sv);if(e===void 0)throw Error(dp(67));return e}var wv=new TextEncoder,Tv=2048,Ev=new ArrayBuffer(Tv),Dv=new Uint8Array(Ev),Ov=new Int32Array(Ev),kv=Av;function Av(e){let t=e.length*2;t>Tv&&(Tv=t+(4-t%4),Ev=new ArrayBuffer(Tv),Dv=new Uint8Array(Ev),Ov=new Int32Array(Ev));let n=wv.encodeInto(e,Dv).written|0,r=0,i=(0+n|0)+374761393|0;if(n<16)for(;(r+3|0)>>15,2246822519),i=Math.imul(i^i>>>13,3266489917),((i^i>>>16)>>>0).toString()}function jv(e,t){return e<>>32-t}var Mv={values:{xs:0,sm:600,md:900,lg:1200,xl:1536},up:e=>{let t=Mv.values;return`@media (min-width:${typeof t[e]==`number`?t[e]:e}px)`}},Nv={spacingUnit:`--DataGrid-t-spacing-unit`,colors:{border:{base:`--DataGrid-t-color-border-base`},foreground:{base:`--DataGrid-t-color-foreground-base`,muted:`--DataGrid-t-color-foreground-muted`,accent:`--DataGrid-t-color-foreground-accent`,disabled:`--DataGrid-t-color-foreground-disabled`,error:`--DataGrid-t-color-foreground-error`},background:{base:`--DataGrid-t-color-background-base`,overlay:`--DataGrid-t-color-background-overlay`,backdrop:`--DataGrid-t-color-background-backdrop`},interactive:{hover:`--DataGrid-t-color-interactive-hover`,hoverOpacity:`--DataGrid-t-color-interactive-hover-opacity`,focus:`--DataGrid-t-color-interactive-focus`,focusOpacity:`--DataGrid-t-color-interactive-focus-opacity`,disabled:`--DataGrid-t-color-interactive-disabled`,disabledOpacity:`--DataGrid-t-color-interactive-disabled-opacity`,selected:`--DataGrid-t-color-interactive-selected`,selectedOpacity:`--DataGrid-t-color-interactive-selected-opacity`}},header:{background:{base:`--DataGrid-t-header-background-base`}},cell:{background:{pinned:`--DataGrid-t-cell-background-pinned`}},radius:{base:`--DataGrid-t-radius-base`},typography:{font:{body:`--DataGrid-t-typography-font-body`,small:`--DataGrid-t-typography-font-small`,large:`--DataGrid-t-typography-font-large`},fontFamily:{base:`--DataGrid-t-typography-font-family-base`},fontWeight:{light:`--DataGrid-t-typography-font-weight-light`,regular:`--DataGrid-t-typography-font-weight-regular`,medium:`--DataGrid-t-typography-font-weight-medium`,bold:`--DataGrid-t-typography-font-weight-bold`}},transitions:{easing:{easeIn:`--DataGrid-t-transition-easing-ease-in`,easeOut:`--DataGrid-t-transition-easing-ease-out`,easeInOut:`--DataGrid-t-transition-easing-ease-in-out`},duration:{short:`--DataGrid-t-transition-duration-short`,base:`--DataGrid-t-transition-duration-base`,long:`--DataGrid-t-transition-duration-long`}},shadows:{base:`--DataGrid-t-shadow-base`,overlay:`--DataGrid-t-shadow-overlay`},zIndex:{panel:`--DataGrid-t-z-index-panel`,menu:`--DataGrid-t-z-index-menu`,modal:`--DataGrid-t-z-index-modal`}},Pv=Rv(Nv),Y=H({breakpoints:Mv,spacing:Fv,transition:Lv,keys:Nv},Pv);function Fv(e,t,n,r){return e===void 0?Iv(1):t===void 0?Iv(e):n===void 0?Iv(e)+` `+Iv(t):r===void 0?Iv(e)+` `+Iv(t)+` `+Iv(n):Iv(e)+` `+Iv(t)+` `+Iv(n)+` `+Iv(r)}function Iv(e){return e===0?`0`:`calc(var(--DataGrid-t-spacing-unit) * ${e})`}function Lv(e,t){let{duration:n=Y.transitions.duration.base,easing:r=Y.transitions.easing.easeInOut,delay:i=0}=t??{};return e.map(e=>`${e} ${n} ${r} ${i}ms`).join(`, `)}function Rv(e){if(typeof e==`string`)return`var(${e})`;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[n]=Rv(e[n]));return t}function zv(e){return U(`MuiDataGrid`,e)}var Bv={root:[`autoHeight`,`autosizing`,`root--densityStandard`,`root--densityComfortable`,`root--densityCompact`,`root--disableUserSelection`,`root--noToolbar`,`withVerticalBorder`],children:`actionsCell.booleanCell.cell.cell--editable.cell--editing.cell--flex.cell--pinnedLeft.cell--pinnedRight.cell--rangeBottom.cell--rangeLeft.cell--rangeRight.cell--rangeTop.cell--withFillHandle.cell--fillPreview.cell--fillPreviewTop.cell--fillPreviewBottom.cell--fillPreviewLeft.cell--fillPreviewRight.cell--selectionMode.cell--textCenter.cell--textLeft.cell--textRight.cell--withLeftBorder.cell--withRightBorder.cellCheckbox.cellEmpty.cellOffsetLeft.cellSkeleton.checkboxInput.columnHeader.columnHeader--alignCenter.columnHeader--alignLeft.columnHeader--alignRight.columnHeader--dragging.columnHeader--emptyGroup.columnHeader--filledGroup.columnHeader--filtered.columnHeader--last.columnHeader--moving.columnHeader--numeric.columnHeader--pinnedLeft.columnHeader--pinnedRight.columnHeader--siblingFocused.columnHeader--sortable.columnHeader--sorted.columnHeader--withLeftBorder.columnHeader--withRightBorder.columnHeaderCheckbox.columnHeaderDraggableContainer.columnHeaderTitleContainer.columnHeaderTitleContainerContent.columnSeparator.columnSeparator--resizable.columnSeparator--resizing.columnSeparator--sideLeft.columnSeparator--sideRight.container--bottom.container--top.detailPanelToggleCell.detailPanelToggleCell--expanded.editBooleanCell.filterIcon.filler--borderBottom.filler--pinnedLeft.filler--pinnedRight.groupingCriteriaCell.groupingCriteriaCellLoadingContainer.groupingCriteriaCellToggle.headerFilterRow.iconSeparator.menuIcon.menuIconButton.menuList.menuOpen.overlayWrapperInner.pinnedRows.pinnedRows--bottom.pinnedRows--top.row.row--borderBottom.row--detailPanelExpanded.row--dragging.row--dynamicHeight.row--editable.row--editing.row--firstVisible.row--lastVisible.rowReorderCell.rowReorderCell--draggable.rowReorderCellContainer.rowReorderCellPlaceholder.rowSkeleton.scrollbar.scrollbar--horizontal.scrollbar--vertical.scrollbarFiller.scrollbarFiller--pinnedRight.sortIcon.treeDataGroupingCell.treeDataGroupingCellLoadingContainer.treeDataGroupingCellToggle.withBorderColor.row--beingDragged`.split(`.`)},X=z(`MuiDataGrid`,[...Bv.root,...Bv.children,`aiAssistantPanel`,`aiAssistantPanelHeader`,`aiAssistantPanelTitleContainer`,`aiAssistantPanelTitle`,`aiAssistantPanelBody`,`aiAssistantPanelEmptyText`,`aiAssistantPanelFooter`,`aiAssistantPanelConversation`,`aiAssistantPanelConversationList`,`aiAssistantPanelConversationTitle`,`aiAssistantPanelSuggestions`,`aiAssistantPanelSuggestionsList`,`aiAssistantPanelSuggestionsItem`,`aiAssistantPanelSuggestionsLabel`,`aggregationColumnHeader`,`aggregationColumnHeader--alignLeft`,`aggregationColumnHeader--alignCenter`,`aggregationColumnHeader--alignRight`,`aggregationColumnHeaderLabel`,`aggregationRowOverlayWrapper`,`mainContent`,`withSidePanel`,`collapsible`,`collapsibleTrigger`,`collapsibleIcon`,`collapsiblePanel`,`columnHeader--filter`,`columnHeaderFilterInput`,`columnHeaderFilterOperatorLabel`,`columnHeaderTitle`,`columnHeaders`,`columnsManagement`,`columnsManagementRow`,`columnsManagementHeader`,`columnsManagementSearchInput`,`columnsManagementFooter`,`columnsManagementScrollArea`,`columnsManagementEmptyText`,`contentFiller`,`detailPanel`,`footerCell`,`panel`,`panelHeader`,`panelWrapper`,`panelContent`,`panelFooter`,`paper`,`editInputCell`,`longTextCell`,`longTextCellContent`,`longTextCellExpandButton`,`longTextCellCollapseButton`,`longTextCellPopup`,`longTextCellPopperContent`,`editLongTextCell`,`editLongTextCellValue`,`editLongTextCellPopup`,`editLongTextCellPopperContent`,`editLongTextCellTextarea`,`multiSelectCell`,`multiSelectCellChip`,`multiSelectCellChip--hidden`,`multiSelectCellOverflow`,`multiSelectCellPopup`,`multiSelectCellPopperContent`,`editMultiSelectCell`,`editMultiSelectCellChip`,`editMultiSelectCellChip--hidden`,`editMultiSelectCellOverflow`,`editMultiSelectCellPopup`,`editMultiSelectCellPopperContent`,`filler`,`filterForm`,`filterFormDeleteIcon`,`filterFormLogicOperatorInput`,`filterFormColumnInput`,`filterFormOperatorInput`,`filterFormValueInput`,`filler--horizontal`,`footerContainer`,`iconButtonContainer`,`main`,`main--hasPinnedRight`,`main--hiddenContent`,`menu`,`overlay`,`overlayWrapper`,`root`,`virtualizer--layoutControlled`,`rowCount`,`rowReorderIcon`,`scrollArea--left`,`scrollArea--right`,`scrollArea--up`,`scrollArea--down`,`scrollArea`,`scrollShadow`,`scrollShadow--vertical`,`scrollShadow--horizontal`,`selectedRowCount`,`sortButton`,`shadowScrollArea`,`sidebar`,`sidebarHeader`,`toolbarContainer`,`toolbar`,`toolbarLabel`,`toolbarDivider`,`toolbarFilterList`,`toolbarQuickFilter`,`toolbarQuickFilterTrigger`,`toolbarQuickFilterControl`,`virtualScroller`,`virtualScroller--hasScrollX`,`virtualScrollerContent`,`virtualScrollerContent--overflowed`,`virtualScrollerRenderZone`,`pivotPanelAvailableFields`,`pivotPanelField`,`pivotPanelField--sorted`,`pivotPanelFieldActionContainer`,`pivotPanelFieldCheckbox`,`pivotPanelFieldDragIcon`,`pivotPanelFieldList`,`pivotPanelFieldName`,`pivotPanelHeader`,`pivotPanelPlaceholder`,`pivotPanelScrollArea`,`pivotPanelSearchContainer`,`pivotPanelSection`,`pivotPanelSectionTitle`,`pivotPanelSections`,`pivotPanelSwitch`,`pivotPanelSwitchLabel`,`prompt`,`promptContent`,`promptText`,`promptFeedback`,`promptChangeList`,`promptChangesToggle`,`promptChangesToggleIcon`,`promptIcon`,`promptIconContainer`,`promptError`,`promptAction`,`resizablePanelHandle`,`resizablePanelHandle--horizontal`,`resizablePanelHandle--vertical`]),Vv=Object.is,Hv=sm,Uv=(e,t)=>e===t||e.length===t.length&&e.every((e,n)=>e===t[n]),Wv=(e,t)=>{let n=Object.is;return t instanceof Array?n=Uv:t instanceof Object&&(n=Hv),n(e,t)},Gv=()=>({state:null,equals:null,selector:null,args:void 0,storeState:null}),Kv=[];function Z(e,t,n=void 0,r=Vv){let i=De(Gv),a=i.current.selector!==null,[o,s]=G.useState(a?null:t(e,n));i.current.state=o,a||(i.current.storeState=e.current.store.state),i.current.equals=r,i.current.selector=t;let c=i.current.args;if(i.current.args=n,a&&!Wv(c,n)){let t=i.current.selector(e,i.current.args);i.current.equals(i.current.state,t)||(i.current.state=t,s(t)),i.current.storeState=e.current.store.state}let l=G.useCallback(()=>{let t=e.current.store.state;if(i.current.storeState!==t){let n=i.current.selector(e,i.current.args);i.current.storeState=t,i.current.equals(i.current.state,n)||(i.current.state=n,s(n))}},Kv);return h(()=>(l(),e.current.store.subscribe(l)),Kv),o}var qv=G.createContext(void 0);function Jv(){let e=G.useContext(qv);if(e===void 0)throw Error(dp(69));return e}var Yv=10,Xv=-5,Zv=1,Qv={width:3,rx:1.5,x:10.5},$v=`/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */`,ey=e=>e.current.state.dimensions.isReady?e.current.state.dimensions.hasScrollX&&(!e.current.state.dimensions.hasScrollY||e.current.state.dimensions.scrollbarSize===0):e.current.state.dimensions.scrollbarSize===0,ty=m(`div`,{name:`MuiDataGrid`,slot:`Root`,overridesResolver:(e,t)=>{let n=[t.root];return Bv.root.forEach(e=>{t[e]!==void 0&&n.push({[`&.${X[e]}`]:t[e]})}),Bv.children.forEach(e=>{t[e]!==void 0&&n.push({[`& .${X[e]}`]:t[e]})}),n}})(()=>{let e=Z(Jv(),ey),t=Y.colors.background.base,n=Y.header.background.base,r=Y.cell.background.pinned,i=ry(Y.colors.interactive.hover),a=Y.colors.interactive.hoverOpacity,o=Y.colors.interactive.selected,s=Y.colors.interactive.selectedOpacity,c=o,l=`calc(${s} + ${a})`,u={hover:Y.colors.interactive.hover,selected:o,selectedHover:o},d=oy(t,i,a,u.hover),f=oy(t,o,s,u.selected),p=oy(t,c,l,u.selectedHover),m=oy(r,i,a,u.hover),h=oy(r,o,s,u.selected),g=oy(r,c,l,u.selectedHover),_=e=>({[`& .${X[`cell--pinnedLeft`]}, & .${X[`cell--pinnedRight`]}`]:{backgroundColor:e,"&.Mui-selected":{backgroundColor:oy(e,f,s,u.selected),"&:hover":{backgroundColor:oy(e,p,l,u.selectedHover)}}}}),v=_(m),y=_(h),b=_(g),x={backgroundColor:f,"&:hover":{backgroundColor:p,"@media (hover: none)":{backgroundColor:f}}};return{"--unstable_DataGrid-radius":Y.radius.base,"--unstable_DataGrid-headWeight":Y.typography.fontWeight.medium,"--DataGrid-rowBorderColor":Y.colors.border.base,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":`0px`,"--DataGrid-hasScrollX":`0`,"--DataGrid-hasScrollY":`0`,"--DataGrid-scrollbarSize":`10px`,"--DataGrid-rowWidth":`0px`,"--DataGrid-columnsTotalWidth":`0px`,"--DataGrid-leftPinnedWidth":`0px`,"--DataGrid-rightPinnedWidth":`0px`,"--DataGrid-headerHeight":`0px`,"--DataGrid-headersTotalHeight":`0px`,"--DataGrid-topContainerHeight":`0px`,"--DataGrid-bottomContainerHeight":`0px`,"--DataGrid-horizontalFiller":`0px`,flex:1,boxSizing:`border-box`,position:`relative`,borderWidth:`1px`,borderStyle:`solid`,borderColor:Y.colors.border.base,borderRadius:`var(--unstable_DataGrid-radius)`,backgroundColor:Y.colors.background.base,color:Y.colors.foreground.base,font:Y.typography.font.body,outline:`none`,height:`100%`,display:`flex`,minWidth:0,minHeight:0,flexDirection:`column`,overflow:`hidden`,transform:`translate(0, 0)`,[`& .${X.virtualScroller}`]:{overflowAnchor:`none`},[`.${X.main}`]:R` + & > *:first-child ${$v} { + border-top-left-radius: var(--unstable_DataGrid-radius); + border-top-right-radius: var(--unstable_DataGrid-radius); + } + `,[`&.${X.autoHeight}`]:{height:`auto`},[`&.${X.autosizing}`]:{[`& .${X.columnHeaderTitleContainerContent} > *`]:{overflow:`visible !important`},"@media (hover: hover)":{[`& .${X.menuIcon}`]:{width:`0 !important`,visibility:`hidden !important`}},[`& .${X.cell}`]:{overflow:`visible !important`,whiteSpace:`nowrap`,minWidth:`max-content !important`,maxWidth:`max-content !important`},[`& .${X.groupingCriteriaCell}`]:{width:`unset`},[`& .${X.treeDataGroupingCell}`]:{width:`unset`},[`& .${X[`columnHeader--filter`]}`]:{flex:`none !important`,width:`unset !important`},[`& .${X.multiSelectCell}`]:{width:`max-content`,overflow:`visible`},[`& .${X[`multiSelectCellChip--hidden`]}`]:{display:`inline-flex`},[`& .${X.multiSelectCellOverflow}`]:{display:`none`}},[`&.${X.withSidePanel}`]:{flexDirection:`row`},[`& .${X.mainContent}`]:{display:`flex`,flexDirection:`column`,overflow:`hidden`,flex:1},[`& .${X.columnHeader}, & .${X.cell}`]:{WebkitTapHighlightColor:`transparent`,padding:`0 10px`,boxSizing:`border-box`},[`& .${X.columnHeader}:focus-within, & .${X.cell}:focus-within`]:{outline:`solid ${ny(Y.colors.interactive.focus,.5)} ${Zv}px`,outlineOffset:-1},[`& .${X.columnHeader}:focus, & .${X.cell}:focus`]:{outline:`solid ${Y.colors.interactive.focus} ${Zv}px`,outlineOffset:-1},[`& .${X.columnHeader}:focus, + & .${X[`columnHeader--withLeftBorder`]}, + & .${X[`columnHeader--withRightBorder`]}, + & .${X[`columnHeader--siblingFocused`]} + `]:{[`& .${X.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${X[`columnSeparator--resizable`]}`]:{opacity:1}},[`& .${X[`columnSeparator--resizable`]}:hover`]:{opacity:1}},[`&.${X[`root--noToolbar`]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:`calc(var(--unstable_DataGrid-radius) - 1px)`},[`&.${X[`root--noToolbar`]} [aria-rowindex="1"] .${X[`columnHeader--last`]}`]:{borderTopRightRadius:e?`calc(var(--unstable_DataGrid-radius) - 1px)`:void 0},[`& .${X.columnHeaderCheckbox}, & .${X.cellCheckbox}`]:{padding:0,justifyContent:`center`,alignItems:`center`},[`& .${X.columnHeader}`]:{position:`relative`,display:`flex`,alignItems:`center`,backgroundColor:n,flex:`0 0 auto`},[`& .${X.columnHeader} .${X.sortButton}`]:{backgroundColor:Y.header.background.base},[`& .${X[`columnHeader--filter`]}`]:{paddingTop:8,paddingBottom:8,paddingRight:5,minHeight:`min-content`,overflow:`hidden`},[`&.${X[`root--densityCompact`]} .${X[`columnHeader--filter`]}`]:{paddingTop:4,paddingBottom:4},[`& .${X[`virtualScroller--hasScrollX`]} .${X[`columnHeader--last`]}`]:{overflow:`hidden`},[`& .${X[`pivotPanelField--sorted`]} .${X.iconButtonContainer}, + & .${X[`columnHeader--sorted`]} .${X.iconButtonContainer}, + & .${X[`columnHeader--filtered`]} .${X.iconButtonContainer}`]:{visibility:`visible`,width:`auto`},[`& .${X.pivotPanelField}:not(.${X[`pivotPanelField--sorted`]}) .${X.sortButton}, + & .${X.columnHeader}:not(.${X[`columnHeader--sorted`]}) .${X.sortButton}`]:{opacity:0,transition:Y.transition([`opacity`],{duration:Y.transitions.duration.short})},[`& .${X.columnHeaderTitleContainer}`]:{display:`flex`,alignItems:`center`,gap:Y.spacing(.25),minWidth:0,flex:1,whiteSpace:`nowrap`,overflow:`hidden`},[`& .${X.columnHeaderTitleContainerContent}`]:{overflow:`hidden`,display:`flex`,alignItems:`center`},[`& .${X[`columnHeader--filledGroup`]} .${X.columnHeaderTitleContainer}`]:{borderBottomWidth:`1px`,borderBottomStyle:`solid`,boxSizing:`border-box`},[`& .${X.sortIcon}, & .${X.filterIcon}`]:{fontSize:`inherit`},[`& .${X[`columnHeader--sortable`]}`]:{cursor:`pointer`},[`& .${X[`columnHeader--alignCenter`]} .${X.columnHeaderTitleContainer}`]:{justifyContent:`center`},[`& .${X[`columnHeader--alignRight`]} .${X.columnHeaderDraggableContainer}, & .${X[`columnHeader--alignRight`]} .${X.columnHeaderTitleContainer}`]:{flexDirection:`row-reverse`},[`& .${X[`columnHeader--alignCenter`]} .${X.menuIcon}`]:{marginLeft:`auto`},[`& .${X[`columnHeader--alignRight`]} .${X.menuIcon}`]:{marginRight:`auto`,marginLeft:-5},[`& .${X[`columnHeader--moving`]}`]:{backgroundColor:d},[`& .${X[`columnHeader--pinnedLeft`]}, & .${X[`columnHeader--pinnedRight`]}`]:{position:`sticky`,zIndex:40,background:Y.header.background.base},[`& .${X.columnSeparator}`]:{position:`absolute`,overflow:`hidden`,zIndex:30,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,maxWidth:Yv,color:Y.colors.border.base},[`& .${X.columnHeaders}`]:{width:`var(--DataGrid-rowWidth)`,backgroundColor:n},"@media (hover: hover)":{[`& .${X.columnHeader}:hover`]:{[`& .${X.menuIcon}`]:{width:`auto`,visibility:`visible`},[`& .${X.iconButtonContainer}`]:{visibility:`visible`,width:`auto`}},[`& .${X.columnHeader}:not(.${X[`columnHeader--sorted`]}):hover .${X.sortButton}, + & .${X.pivotPanelField}:not(.${X[`pivotPanelField--sorted`]}):hover .${X.sortButton}, + & .${X.pivotPanelField}:not(.${X[`pivotPanelField--sorted`]}) .${X.sortButton}:focus-visible`]:{opacity:1},[`& .${X.columnHeader}:not(.${X[`columnHeader--sorted`]}):hover .${X.sortButton} > *, + & .${X.pivotPanelField}:not(.${X[`pivotPanelField--sorted`]}):hover .${X.sortButton} > *, + & .${X.pivotPanelField}:not(.${X[`pivotPanelField--sorted`]}) .${X.sortButton}:focus-visible > *`]:{opacity:.78},[`& .${X.pivotPanelFieldActionContainer} button:hover`]:{backgroundColor:Y.colors.background.base}},"@media (hover: none)":{[`& .${X.columnHeader} .${X.menuIcon}`]:{width:`auto`,visibility:`visible`},[`& .${X.columnHeader}:focus, + & .${X[`columnHeader--siblingFocused`]}`]:{[`.${X[`columnSeparator--resizable`]}`]:{color:Y.colors.foreground.accent}},[`& .${X.pivotPanelField}:not(.${X[`pivotPanelField--sorted`]}) .${X.sortButton}`]:{opacity:.78}},[`& .${X[`columnHeader--withLeftBorder`]} .${X[`columnSeparator--sideLeft`]}:not(.${X[`columnSeparator--resizable`]}), & .${X[`columnHeader--withRightBorder`]} .${X[`columnSeparator--sideRight`]}:not(.${X[`columnSeparator--resizable`]})`]:{display:`none`},[`& .${X[`columnSeparator--sideLeft`]}`]:{left:Xv},[`& .${X[`columnSeparator--sideRight`]}`]:{right:Xv},[`& .${X[`columnHeader--withRightBorder`]} .${X[`columnSeparator--sideLeft`]}`]:{left:-5.5},[`& .${X[`columnHeader--withRightBorder`]} .${X[`columnSeparator--sideRight`]}`]:{right:-5.5},[`& .${X[`columnSeparator--resizable`]}`]:{cursor:`col-resize`,touchAction:`none`,[`&.${X[`columnSeparator--resizing`]}`]:{color:Y.colors.foreground.accent},"@media (hover: none)":{[`& .${X.iconSeparator} rect`]:Qv},"@media (hover: hover)":{"&:hover":{color:Y.colors.foreground.accent,[`& .${X.iconSeparator} rect`]:Qv}},"& svg":{pointerEvents:`none`}},[`& .${X.iconSeparator}`]:{color:`inherit`,transition:Y.transition([`color`,`width`],{duration:Y.transitions.duration.short})},[`& .${X.menuIcon}`]:{width:0,visibility:`hidden`,fontSize:20,marginRight:-5,display:`flex`,alignItems:`center`},[`.${X.menuOpen}`]:{visibility:`visible`,width:`auto`},[`& .${X.headerFilterRow}`]:{[`& .${X.columnHeader}, & .${X.scrollbarFiller}`]:{boxSizing:`border-box`,borderBottom:`1px solid var(--DataGrid-rowBorderColor)`}},[`& .${X[`row--borderBottom`]} .${X.columnHeader}, + & .${X[`row--borderBottom`]} .${X.filler}, + & .${X[`row--borderBottom`]} .${X.scrollbarFiller}`]:{borderBottom:`1px solid var(--DataGrid-rowBorderColor)`},[`& .${X[`row--borderBottom`]} .${X.cell}`]:{borderBottom:`1px solid var(--rowBorderColor)`},[`.${X.row}`]:{display:`flex`,position:`relative`,width:`var(--DataGrid-rowWidth)`,breakInside:`avoid`,"--rowBorderColor":`var(--DataGrid-rowBorderColor)`,[`&.${X[`row--firstVisible`]}`]:{"--rowBorderColor":`transparent`},"&:hover":{backgroundColor:d,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${X.rowSkeleton}:hover`]:{backgroundColor:`transparent`},"&.Mui-selected":x},[`& .${X.cell}`]:{flex:`0 0 auto`,height:`var(--height)`,width:`var(--width)`,lineHeight:`calc(var(--height) - 1px)`,boxSizing:`border-box`,borderTop:`1px solid var(--rowBorderColor)`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,"&.Mui-selected":x},[`& .${X.cell}.Mui-selected`]:{"--range-top":`0 0 0 0 transparent`,"--range-bottom":`0 0 0 0 transparent`,"--range-left":`0 0 0 0 transparent`,"--range-right":`0 0 0 0 transparent`,boxShadow:`var(--range-top), var(--range-bottom), var(--range-left), var(--range-right)`},[`& .${X[`cell--rangeTop`]}`]:{"--range-top":`inset 0 2px 0 0 ${Y.colors.interactive.focus}`},[`& .${X[`cell--rangeBottom`]}`]:{"--range-bottom":`inset 0 -2px 0 0 ${Y.colors.interactive.focus}`},[`& .${X[`cell--rangeLeft`]}`]:{"--range-left":`inset 2px 0 0 0 ${Y.colors.interactive.focus}`},[`& .${X[`cell--rangeRight`]}`]:{"--range-right":`inset -2px 0 0 0 ${Y.colors.interactive.focus}`},[`& .${X[`virtualScrollerContent--overflowed`]} .${X[`row--lastVisible`]} .${X.cell}`]:{borderTopColor:`transparent`},[`& .${X.pinnedRows} .${X.row}, .${X.aggregationRowOverlayWrapper} .${X.row}`]:{backgroundColor:r,"&:hover":{backgroundColor:m}},[`& .${X[`pinnedRows--top`]} :first-of-type`]:{[`& .${X.cell}, .${X.scrollbarFiller}`]:{borderTop:`none`}},[`&.${X[`root--disableUserSelection`]}`]:{userSelect:`none`},[`& .${X[`row--dynamicHeight`]} > .${X.cell}`]:{whiteSpace:`initial`,lineHeight:`inherit`},[`& .${X[`row--dynamicHeight`]}`]:{[`& .${X.multiSelectCell}, .${X.editMultiSelectCell}`]:{flexWrap:`wrap`}},[`& .${X.cell}[aria-rowspan]:not([aria-rowspan="1"])`]:{[`& .${X.multiSelectCell}`]:{alignItems:`flex-start`,alignContent:`flex-start`,flexWrap:`wrap`,paddingTop:8},[`& .${X[`multiSelectCellChip--hidden`]}`]:{display:`inline-flex`},[`& .${X.multiSelectCellOverflow}`]:{display:`none`}},[`& .${X.cellEmpty}`]:{flex:1,padding:0,height:`unset`},[`& .${X.cell}.${X[`cell--selectionMode`]}`]:{cursor:`default`},[`& .${X.cell}.${X[`cell--editing`]}`]:{padding:1,display:`flex`,boxShadow:Y.shadows.base,backgroundColor:Y.colors.background.overlay,"&:focus-within":{outline:`${Zv}px solid ${Y.colors.interactive.focus}`,outlineOffset:-1}},[`& .${X[`cell--editing`]}`]:{"& .MuiInputBase-root":{height:`100%`}},[`& .${X[`row--editing`]}`]:{boxShadow:Y.shadows.base},[`& .${X[`row--editing`]} .${X.cell}`]:{boxShadow:`none`,backgroundColor:Y.colors.background.overlay},[`& .${X.editBooleanCell}`]:{display:`flex`,height:`100%`,width:`100%`,alignItems:`center`,justifyContent:`center`},[`& .${X.booleanCell}[data-value="true"]`]:{color:Y.colors.foreground.muted},[`& .${X.booleanCell}[data-value="false"]`]:{color:Y.colors.foreground.disabled},[`& .${X.actionsCell}`]:{display:`inline-flex`,alignItems:`center`,gridGap:Y.spacing(1)},[`& .${X.rowReorderCell}`]:{display:`inline-flex`,flex:1,alignItems:`center`,justifyContent:`center`,opacity:Y.colors.interactive.disabledOpacity},[`& .${X[`rowReorderCell--draggable`]}`]:{cursor:`grab`,opacity:1},[`& .${X.rowReorderCellContainer}`]:{padding:0,display:`flex`,alignItems:`stretch`},[`.${X.withBorderColor}`]:{borderColor:Y.colors.border.base},[`& .${X[`cell--withLeftBorder`]}, & .${X[`columnHeader--withLeftBorder`]}`]:{borderLeftColor:`var(--DataGrid-rowBorderColor)`,borderLeftWidth:`1px`,borderLeftStyle:`solid`},[`& .${X[`cell--withRightBorder`]}, & .${X[`columnHeader--withRightBorder`]}`]:{borderRightColor:`var(--DataGrid-rowBorderColor)`,borderRightWidth:`1px`,borderRightStyle:`solid`},[`& .${X[`cell--flex`]}`]:{display:`flex`,alignItems:`center`,lineHeight:`inherit`},[`& .${X[`cell--textLeft`]}`]:{textAlign:`left`,justifyContent:`flex-start`},[`& .${X[`cell--textRight`]}`]:{textAlign:`right`,justifyContent:`flex-end`},[`& .${X[`cell--textCenter`]}`]:{textAlign:`center`,justifyContent:`center`},[`& .${X[`cell--pinnedLeft`]}, & .${X[`cell--pinnedRight`]}`]:{position:`sticky`,zIndex:30,background:Y.cell.background.pinned,"&.Mui-selected":{backgroundColor:h}},[`& .${X.row}`]:{"&:hover":v,"&.Mui-selected":y,"&.Mui-selected:hover":b},[`& .${X.cellOffsetLeft}`]:{flex:`0 0 auto`,display:`inline-block`},[`& .${X.cellSkeleton}`]:{flex:`0 0 auto`,height:`100%`,display:`inline-flex`,alignItems:`center`},[`& .${X.columnHeaderDraggableContainer}`]:{display:`flex`,width:`100%`,height:`100%`},[`& .${X.rowReorderCellPlaceholder}`]:{display:`none`},[`& .${X[`columnHeader--dragging`]}`]:{background:Y.colors.background.overlay,padding:`0 12px`,borderRadius:`var(--unstable_DataGrid-radius)`,opacity:Y.colors.interactive.disabledOpacity},[`& .${X[`row--dragging`]}`]:{background:Y.colors.background.overlay,padding:`0 12px`,borderRadius:`var(--unstable_DataGrid-radius)`,border:`1px solid var(--DataGrid-rowBorderColor)`,color:Y.colors.foreground.base,transform:`translateZ(0)`,[`& .${X.rowReorderCellPlaceholder}`]:{padding:`0 6px`,display:`flex`}},[`& .${X.treeDataGroupingCell}`]:{display:`flex`,alignItems:`center`,width:`100%`},[`& .${X.treeDataGroupingCellToggle}`]:{flex:`0 0 28px`,alignSelf:`stretch`,marginRight:Y.spacing(2)},[`& .${X.treeDataGroupingCellLoadingContainer}, .${X.groupingCriteriaCellLoadingContainer}`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`},[`& .${X.groupingCriteriaCell}`]:{display:`flex`,alignItems:`center`,width:`100%`},[`& .${X.groupingCriteriaCellToggle}`]:{flex:`0 0 28px`,alignSelf:`stretch`,marginRight:Y.spacing(2)},[`& .${X.columnHeaders} .${X.scrollbarFiller}`]:{backgroundColor:n},[`.${X.scrollbarFiller}`]:{minWidth:`calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))`,alignSelf:`stretch`,backgroundColor:n,[`&.${X[`scrollbarFiller--pinnedRight`]}`]:{position:`sticky`,zIndex:40,right:0}},[`& .${X.filler}`]:{flex:`1 0 auto`},[`& .${X[`filler--borderBottom`]}`]:{borderBottom:`1px solid var(--DataGrid-rowBorderColor)`},[`& .${X[`filler--horizontal`]}`]:{width:`var(--DataGrid-horizontalFiller)`},[`& .${X.columnHeaders} .${X.filler}`]:{backgroundColor:n},[`& .${X[`main--hiddenContent`]}`]:{[`& .${X.virtualScrollerRenderZone}`]:{visibility:`hidden`},[`& .${X.pinnedRows}`]:{display:`none`}},[`& .${X[`cell--withFillHandle`]}`]:{position:`relative`,"&::after":{content:`""`,position:`absolute`,bottom:0,insetInlineEnd:0,width:7,height:7,backgroundColor:Y.colors.interactive.focus,cursor:`crosshair`,zIndex:50}},[`& .${X[`cell--fillPreview`]}`]:{backgroundColor:`color-mix(in srgb, ${Y.colors.interactive.focus} 8%, transparent)`},[`& .${X[`cell--fillPreviewTop`]}`]:{borderTop:`1px dashed ${Y.colors.interactive.focus}`},[`& .${X[`cell--fillPreviewBottom`]}`]:{borderBottom:`1px dashed ${Y.colors.interactive.focus}`},[`& .${X[`cell--fillPreviewLeft`]}`]:{borderLeft:`1px dashed ${Y.colors.interactive.focus}`},[`& .${X[`cell--fillPreviewRight`]}`]:{borderRight:`1px dashed ${Y.colors.interactive.focus}`},[`& .${X[`row--beingDragged`]}`]:{color:Y.colors.foreground.disabled,"&:hover":{backgroundColor:`transparent`}},[`& .${X[`virtualizer--layoutControlled`]} .${X[`columnHeader--pinnedLeft`]}, + & .${X[`virtualizer--layoutControlled`]} .${X[`columnHeader--pinnedRight`]}`]:{position:`absolute`,height:`var(--height)`},[`& .${X[`virtualizer--layoutControlled`]} .${X[`cell--pinnedLeft`]}, + & .${X[`virtualizer--layoutControlled`]} .${X[`cell--pinnedRight`]}`]:{position:`absolute`},[`& .${X[`virtualizer--layoutControlled`]} .${X.row}`]:{position:`static`},[`& .${X[`virtualizer--layoutControlled`]} .${X[`scrollbarFiller--pinnedRight`]}`]:{position:`absolute`,height:`var(--height)`},[`& .${X[`virtualizer--layoutControlled`]} .${X.virtualScrollerRenderZone}`]:{position:`static`,width:`fit-content`},[`& .${X[`virtualizer--layoutControlled`]} .${X[`container--top`]}`]:{width:`fit-content`},[`& .${X[`virtualizer--layoutControlled`]} .${X[`container--bottom`]}`]:{width:`fit-content`}}});function ny(e,t){return`rgba(from ${e} r g b / ${t})`}function ry(e){return ny(e,1)}var iy=typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`color`,`color-mix(in srgb, red 50%, blue 50%)`),ay=(e,t)=>iy?e:t;function oy(e,t,n,r){return ay(`color-mix(in srgb,${e}, ${t} calc(${n} * 100%))`,r)}function sy(){let e=ke();return G.useMemo(()=>({id:kv(my(e)),variables:cy(e)}),[e])}function cy(e){let t=uy(e),n=(e.vars||e).palette.DataGrid,r=(e.vars||e).palette.background.paper,i=n?.bg??(e.palette.mode===`dark`?ay(`color-mix(in srgb, ${r} 95%, #fff)`,r):r),a=n?.headerBg??i,o=n?.pinnedBg??i,s=e.alpha((e.vars||e).palette.background.default,(e.vars||e).palette.action.disabledOpacity),c=e.palette.mode===`dark`?ay(`color-mix(in srgb, ${r} 90%, #fff)`,r):r,l=(e.vars||e).palette.primary.main,u=ly(e),d=e.vars?.font?.body2??py(e.typography.body2),f=e.vars?.font?.caption??py(e.typography.caption),p=e.vars?.font?.body1??py(e.typography.body1),m=Y.keys;return{[m.spacingUnit]:e.vars?e.vars.spacing??e.spacing(1):e.spacing(1),[m.colors.border.base]:t,[m.colors.background.base]:i,[m.colors.background.overlay]:c,[m.colors.background.backdrop]:s,[m.colors.foreground.base]:(e.vars||e).palette.text.primary,[m.colors.foreground.muted]:(e.vars||e).palette.text.secondary,[m.colors.foreground.accent]:(e.vars||e).palette.primary.dark,[m.colors.foreground.disabled]:(e.vars||e).palette.text.disabled,[m.colors.foreground.error]:(e.vars||e).palette.error.dark,[m.colors.interactive.hover]:iy?(e.vars||e).palette.action.hover:(e.vars||e).palette.grey[e.palette.mode===`dark`?800:100],[m.colors.interactive.hoverOpacity]:(e.vars||e).palette.action.hoverOpacity,[m.colors.interactive.focus]:fy((e.vars||e).palette.primary.main),[m.colors.interactive.focusOpacity]:(e.vars||e).palette.action.focusOpacity,[m.colors.interactive.disabled]:fy((e.vars||e).palette.action.disabled),[m.colors.interactive.disabledOpacity]:(e.vars||e).palette.action.disabledOpacity,[m.colors.interactive.selected]:iy?l:(e.vars||e).palette.grey[e.palette.mode===`dark`?700:200],[m.colors.interactive.selectedOpacity]:(e.vars||e).palette.action.selectedOpacity,[m.header.background.base]:a,[m.cell.background.pinned]:o,[m.radius.base]:u,[m.typography.fontFamily.base]:e.typography.fontFamily,[m.typography.fontWeight.light]:e.typography.fontWeightLight,[m.typography.fontWeight.regular]:e.typography.fontWeightRegular,[m.typography.fontWeight.medium]:e.typography.fontWeightMedium,[m.typography.fontWeight.bold]:e.typography.fontWeightBold,[m.typography.font.body]:d,[m.typography.font.small]:f,[m.typography.font.large]:p,[m.transitions.easing.easeIn]:e.transitions.easing.easeIn,[m.transitions.easing.easeOut]:e.transitions.easing.easeOut,[m.transitions.easing.easeInOut]:e.transitions.easing.easeInOut,[m.transitions.duration.short]:`${e.transitions.duration.shorter}ms`,[m.transitions.duration.base]:`${e.transitions.duration.short}ms`,[m.transitions.duration.long]:`${e.transitions.duration.standard}ms`,[m.shadows.base]:(e.vars||e).shadows[2],[m.shadows.overlay]:(e.vars||e).shadows[8],[m.zIndex.panel]:(e.vars||e).zIndex.modal,[m.zIndex.menu]:(e.vars||e).zIndex.modal,[m.zIndex.modal]:(e.vars||e).zIndex.modal}}function ly(e){return e.vars?e.vars.shape.borderRadius:typeof e.shape.borderRadius==`number`?`${e.shape.borderRadius}px`:e.shape.borderRadius}function uy(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode===`light`?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}function dy(e,t){return`rgba(from ${e} r g b / ${t})`}function fy(e){return dy(e,1)}function py(e){if(!e)return;let t=typeof e.fontSize==`number`?`${e.fontSize}px`:e.fontSize;return`${e.fontWeight} ${t} / ${e.lineHeight} ${e.fontFamily}`}function my(e){let t=new WeakSet;return JSON.stringify(e,(e,n)=>{if(typeof window<`u`&&n===window||typeof document<`u`&&n===document)return n.toString();if(typeof n==`object`&&n){if(G.isValidElement(n)||t.has(n))return null;t.add(n)}return n})}var hy=[`id`,`label`,`labelId`,`material`,`disabled`,`multiple`,`slotProps`,`onChange`,`onKeyDown`,`onOpen`,`onClose`,`renderValue`,`size`,`style`,`fullWidth`],gy=[`onRowsPerPageChange`,`material`,`disabled`],_y=[`material`],vy=[`autoFocus`,`label`,`fullWidth`,`slotProps`,`className`,`material`,`inputRef`],yy=[`material`],by=[`material`],xy=[`material`],Sy=[`material`],Cy=[`material`],wy=[`material`],Ty=[`material`],Ey=[`material`],Dy=[`material`],Oy=[`material`,`label`,`className`],ky=[`material`],Ay=[`inert`,`iconStart`,`iconEnd`,`children`,`material`],jy=[`material`],My=[`slotProps`,`material`],Ny=[`id`,`multiple`,`freeSolo`,`options`,`getOptionLabel`,`isOptionEqualToValue`,`value`,`onChange`,`label`,`placeholder`,`slotProps`,`material`],Py=[`key`],Fy=[`slotProps`],Iy=[`slotProps`],Ly=[`slotProps`],Ry=[`slotProps`,`material`],zy=[`material`],By=[`open`,`children`,`className`,`clickAwayTouchEvent`,`clickAwayMouseEvent`,`flip`,`focusTrap`,`onExited`,`onClickAway`,`onDidShow`,`onDidHide`,`id`,`target`,`transition`,`placement`,`material`],Vy=[`native`],Hy=[`children`,`value`,`active`],Uy=[`items`,`value`,`material`],Wy=m(tc,{slot:`internal`})(({theme:e})=>({[`&.${Xs.positionEnd} .${me.sizeSmall}`]:{marginRight:e.spacing(-.75)}})),Gy=m(As,{slot:`internal`,shouldForwardProp:e=>e!==`fullWidth`})(({theme:e})=>({gap:e.spacing(.5),margin:0,overflow:`hidden`,[`& .${Ct.label}`]:{fontSize:e.typography.pxToRem(14),overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},variants:[{props:{fullWidth:!0},style:{width:`100%`}}]})),Ky=m(uo,{slot:`internal`,shouldForwardProp:e=>e!==`density`})(({theme:e})=>({variants:[{props:{density:`compact`},style:{padding:e.spacing(.5)}}]})),qy=m(Fc,{slot:`internal`})({[`& .${Mc.primary}`]:{overflowX:`clip`,textOverflow:`ellipsis`,maxWidth:`300px`}}),Jy=H_(function(e,t){let{id:n,label:r,labelId:i,material:a,disabled:o,multiple:s,slotProps:c,onChange:l,onKeyDown:u,onOpen:d,onClose:f,renderValue:p,size:m,style:h,fullWidth:g}=e,_=K(e,hy),v=ke().components?.MuiTextField?.defaultProps??{},y=m??v.size,b=v.variant??`outlined`,x={slotProps:{paper:{onKeyDown:u}}};return f&&(x.onClose=f),(0,W.jsxs)(Es,{size:y,fullWidth:g,style:h,disabled:o,ref:t,children:[(0,W.jsx)(ic,{id:i,htmlFor:n,shrink:!0,variant:b,children:r}),(0,W.jsx)(ku,H({id:n,labelId:i,label:r,displayEmpty:!0,multiple:s,onChange:l,renderValue:p,variant:b},_,{inputProps:c?.htmlInput,onOpen:d,MenuProps:x,size:y},a))]})}),Yy=m(of,{slot:`internal`})(({theme:e})=>({[`& .${Wd.selectLabel}`]:{display:`none`,[e.breakpoints.up(`sm`)]:{display:`block`}},[`& .${Wd.input}`]:{display:`none`,[e.breakpoints.up(`sm`)]:{display:`inline-flex`}}})),Xy=H_(function(e,t){let{onRowsPerPageChange:n,material:r,disabled:i}=e,a=K(e,gy),o=G.useMemo(()=>{if(i)return{slotProps:{actions:{previousButton:{disabled:!0},nextButton:{disabled:!0}}}}},[i]),s=Cv(),{estimatedRowCount:c}=J();return(0,W.jsx)(Yy,H({component:`div`,onRowsPerPageChange:D(e=>{n?.(Number(e.target.value))}),labelRowsPerPage:s.current.getLocaleText(`paginationRowsPerPage`),labelDisplayedRows:e=>s.current.getLocaleText(`paginationDisplayedRows`)(H({},e,{estimated:c})),getItemAriaLabel:s.current.getLocaleText(`paginationItemAriaLabel`)},o,a,r,{ref:t}))}),Zy=H_(function(e,t){let{material:n}=e,r=K(e,_y);return(0,W.jsx)(Fa,H({},r,n,{ref:t}))}),Qy=H_(function(e,t){let{autoFocus:n,label:r,fullWidth:i,slotProps:a,className:o,material:s,inputRef:c}=e,l=K(e,vy),u=G.useRef(null),d=p(u,t),f=G.useRef(null),m=p(c,a?.htmlInput?.ref,s?.slotProps?.input?.ref);G.useEffect(()=>{n?(u.current?.querySelector(`input`))?.focus({preventScroll:!0}):n===!1&&f.current&&f.current.stop({})},[n]);let h=G.useMemo(()=>H({},s?.slotProps,{input:H({},s?.slotProps?.input,a?.htmlInput,{ref:m})}),[s?.slotProps,a?.htmlInput,m]);return r?(0,W.jsx)(Gy,{className:o,control:(0,W.jsx)(Ky,H({},l,s,{slotProps:h,ref:d,touchRippleRef:f})),label:r,fullWidth:i}):(0,W.jsx)(Ky,H({},l,s,{className:V(o,s?.className),slotProps:h,ref:d,touchRippleRef:f}))}),$y=H_(function(e,t){let{material:n}=e,r=K(e,yy);return(0,W.jsx)(be,H({},r,n,{ref:t}))}),eb=H_(function(e,t){let{material:n}=e,r=K(e,by);return(0,W.jsx)(gs,H({},r,n,{ref:t}))}),tb=H_(function(e,t){let{material:n}=e,r=K(e,xy);return(0,W.jsx)(bc,H({},r,n,{ref:t}))}),nb=H_(function(e,t){let{material:n}=e,r=K(e,Sy);return(0,W.jsx)(Xa,H({},r,n,{ref:t}))}),rb=m(Wf,{slot:`internal`})(({theme:e})=>({gap:e.spacing(1),border:0})),ib=H_(function(e,t){let{material:n}=e,r=K(e,Cy);return(0,W.jsx)(rb,H({size:`small`,color:`primary`},r,n,{ref:t}))}),ab=H_(function(e,t){let{material:n}=e,r=K(e,wy);return(0,W.jsx)(ta,H({},r,n,{ref:t}))}),ob=H_(function(e,t){let{material:n}=e,r=K(e,Ty);return(0,W.jsx)(N,H({},r,n,{ref:t}))}),sb=H_(function(e,t){let{material:n}=e,r=K(e,Ey);return(0,W.jsx)(Yu,H({},r,n,{ref:t}))}),cb=H_(function(e,t){let{material:n}=e,r=K(e,Dy);return(0,W.jsx)(Lu,H({},r,n,{ref:t}))}),lb=H_(function(e,t){let{material:n,label:r,className:i}=e,a=K(e,Oy);return r?(0,W.jsx)(Gy,{className:i,control:(0,W.jsx)(rd,H({},a,n,{ref:t})),label:r}):(0,W.jsx)(rd,H({},a,n,{className:i,ref:t}))}),ub=H_(function(e,t){let{material:n}=e,r=K(e,ky);return(0,W.jsx)(yl,H({},r,n,{ref:t}))});function db(e){let{inert:t,iconStart:n,iconEnd:r,children:i,material:a}=e,o=K(e,Ay);return t&&(o.disableRipple=!0),G.createElement(Bl,H({},o,a),[n&&(0,W.jsx)(Ac,{children:n},`1`),(0,W.jsx)(qy,{children:i},`2`),r&&(0,W.jsx)(Ac,{children:r},`3`)])}function fb(e){let{material:t}=e,n=K(e,jy);return(0,W.jsx)(Uo,H({},n,t))}function pb(e){let{slotProps:t,material:n}=e,r=K(e,My),i=ke().components?.MuiTextField?.defaultProps??{},a=r.variant??i.variant??`outlined`,o=r.size??i.size;return(0,W.jsx)(If,H({variant:a,size:o},r,n,{slotProps:{htmlInput:t?.htmlInput,input:gb(t?.input),inputLabel:H({shrink:!0},t?.inputLabel)}}))}function mb(e){let t=J(),{id:n,multiple:r,freeSolo:i,options:a,getOptionLabel:o,isOptionEqualToValue:s,value:c,onChange:l,label:u,placeholder:d,slotProps:f,material:p}=e,m=K(e,Ny);return(0,W.jsx)(va,H({id:n,multiple:r,freeSolo:i,options:a,getOptionLabel:o,isOptionEqualToValue:s,value:c,onChange:l,renderValue:(e,t)=>e.map((e,n)=>{let r=t({index:n}),{key:i}=r,a=K(r,Py);return(0,W.jsx)(ta,H({variant:`outlined`,size:`small`,label:typeof e==`string`?e:o?.(e)},a,typeof f?.chip==`function`?f.chip(e,n):f?.chip),i)}),renderInput:e=>{let{slotProps:n}=e,r=K(e,Fy),i=f?.textField??{},{slotProps:a}=i,o=K(i,Iy),s=t.slotProps?.baseTextField??{},{slotProps:c}=s,l=K(s,Ly);return(0,W.jsx)(If,H({},r,{label:u,placeholder:d},o,l,{slotProps:{htmlInput:H({},n.htmlInput,a?.htmlInput,c?.htmlInput),input:H({},gb(n.input,!1),a?.input,c?.input),inputLabel:H({shrink:!0},n.inputLabel,a?.inputLabel,c?.inputLabel)}}))}},m,p))}function hb(e){return(0,W.jsx)(yt,H({},gb(e)))}function gb(e,t=!0){if(!e)return;let{slotProps:n,material:r}=e,i=K(e,Ry);t&&(i.startAdornment&&=(0,W.jsx)(Wy,{position:`start`,children:i.startAdornment}),i.endAdornment&&=(0,W.jsx)(Wy,{position:`end`,children:i.endAdornment}));for(let e in r)Object.hasOwn(r,e)&&(i[e]=r[e]);return n?.htmlInput&&(i.inputProps=i.inputProps?H({},i.inputProps,n?.htmlInput):n?.htmlInput),i}var _b=H_(function(e,t){let{material:n}=e,r=K(e,zy);return(0,W.jsx)(Ye,H({},r,n,{ref:t}))}),vb={"bottom-start":`top left`,"bottom-end":`top right`},yb=H_(function(e,t){let{open:n,children:r,className:i,flip:a,onExited:o,onDidShow:s,onDidHide:c,id:l,target:u,transition:d,placement:f,material:p}=e,m=K(e,By),h=G.useMemo(()=>{let e=[{name:`preventOverflow`,options:{padding:8}}];return a&&e.push({name:`flip`,enabled:!0}),(s||c)&&e.push({name:`isPlaced`,enabled:!0,phase:`main`,fn:()=>{s?.()},effect:()=>()=>{c?.()}}),e},[a,s,c]),g;if(!d)g=bb(e,r);else{let t=e=>t=>{e&&e(),o&&o(t)};g=n=>bb(e,(0,W.jsx)(Hs,H({},n.TransitionProps,{style:{transformOrigin:vb[n.placement]},onExited:t(n.TransitionProps?.onExited),children:(0,W.jsx)(de,{children:r})})))}return(0,W.jsx)(Ui,H({id:l,className:i,open:n,anchorEl:u,transition:d,placement:f,modifiers:h},m,p,{ref:t,children:g}))});function bb(e,t){return Sb(e,xb(e,t))}function xb(e,t){return e.onClickAway===void 0?t:(0,W.jsx)(mo,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:t})}function Sb(e,t){return e.focusTrap===void 0?t:(0,W.jsx)(No,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:(0,W.jsx)(`div`,{tabIndex:-1,children:t})})}function Cb(e){let{native:t}=e,n=K(e,Vy);return t?(0,W.jsx)(`option`,H({},n)):(0,W.jsx)(Bl,H({},n))}var wb=m(jf,{name:`MuiDataGrid`,slot:`Tabs`})(({theme:e})=>({borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),Tb=m(cd,{name:`MuiDataGrid`,slot:`Tab`})({flex:1,minWidth:`fit-content`}),Eb=m(`div`,{name:`MuiDataGrid`,slot:`TabPanel`})({flex:1,display:`flex`,flexDirection:`column`,overflow:`hidden`});function Db(e){let{children:t,active:n}=e,r=K(e,Hy);return(0,W.jsx)(Eb,H({role:`tabpanel`,style:{display:n?`flex`:`none`}},r,{children:t}))}function Ob(e){let{items:t,value:n,material:r}=e,i=K(e,Uy),a=_e(),o=`${a}-tab-${n}`,s=`${a}-tabpanel-${n}`;return(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(wb,H({},i,{value:n,variant:`scrollable`,scrollButtons:`auto`},r,{children:t.map(e=>(0,W.jsx)(Tb,{value:e.value,label:e.label,id:o,"aria-controls":s},e.value))})),t.map(e=>(0,W.jsx)(Db,{value:e.value,active:n===e.value,id:s,"aria-labelledby":o,children:e.children},e.value))]})}var kb=H({},{baseAutocomplete:mb,baseBadge:Zy,baseCheckbox:Qy,baseChip:ab,baseCircularProgress:$y,baseDivider:eb,baseInput:hb,baseTextarea:_b,baseLinearProgress:tb,baseMenuList:ub,baseMenuItem:db,baseModal:fb,baseTextField:pb,baseButton:nb,baseIconButton:ob,baseToggleButton:ib,baseTooltip:sb,baseTabs:Ob,basePagination:Xy,basePopper:yb,baseSelect:Jy,baseSelectOption:Cb,baseSkeleton:cb,baseSwitch:lb},{booleanCellTrueIcon:uv,booleanCellFalseIcon:av,columnMenuIcon:iv,openFilterButtonIcon:J_,filterPanelDeleteIcon:av,undoIcon:Z_,redoIcon:Q_,columnFilteredIcon:Y_,columnSelectorIcon:$_,columnUnsortedIcon:xv,columnSortedAscendingIcon:W_,columnSortedDescendingIcon:G_,columnResizeIcon:ev,densityCompactIcon:tv,densityStandardIcon:nv,densityComfortableIcon:rv,exportIcon:gv,moreActionsIcon:dv,treeDataCollapseIcon:q_,treeDataExpandIcon:K_,groupingCriteriaCollapseIcon:q_,groupingCriteriaExpandIcon:K_,detailPanelExpandIcon:ov,detailPanelCollapseIcon:sv,rowReorderIcon:lv,quickFilterIcon:X_,quickFilterClearIcon:mv,columnMenuHideIcon:fv,columnMenuSortAscendingIcon:W_,columnMenuSortDescendingIcon:G_,columnMenuUnsortIcon:null,columnMenuFilterIcon:Y_,columnMenuManageColumnsIcon:pv,columnMenuClearIcon:mv,loadIcon:cv,filterPanelAddIcon:ov,filterPanelRemoveAllIcon:hv,columnReorderIcon:lv,menuItemCheckIcon:uv,longTextCellExpandIcon:_v,longTextCellCollapseIcon:vv}),Ab=`@supports (-webkit-touch-callout: none)`,jb={EMPTY:{width:0,height:0},equals:(e,t)=>e.width===t.width&&e.height===t.height},Mb={EMPTY:{top:[],bottom:[]}},Nb={EMPTY:{left:[],right:[]}},Pb={EMPTY:{top:0,left:0},equals:(e,t)=>e.top===t.top&&e.left===t.left},Fb=function(e){return e[e.NONE=0]=`NONE`,e[e.UP=1]=`UP`,e[e.DOWN=2]=`DOWN`,e[e.LEFT=3]=`LEFT`,e[e.RIGHT=4]=`RIGHT`,e}({});(function(e){function t(e,t){return e===0&&t===0?Fb.NONE:Math.abs(t)>=Math.abs(e)?t>0?Fb.DOWN:Fb.UP:e>0?Fb.RIGHT:Fb.LEFT}e.forDelta=t})(Fb||={});var Ib={initialize:Lb,use:Rb,selectors:{}};function Lb(e){return{colspanMap:new Map}}function Rb(e,t,n){let r=t.colspan?.getColspan,i=()=>{e.state.colspanMap=new Map},a=(t,n)=>e.state.colspanMap.get(t)?.[n],o=D(r?(t,n,i,a)=>{for(let o=n;o1&&(o+=s.colSpan-1)}}:()=>{});return n.calculateColSpan=o,{resetColSpan:i,getCellColSpanInfo:a,calculateColSpan:o}}function zb(e,t,n,r,i,a,o){let s=a.length,c=a[t],l=o(n,c,t);if(!l||l===1)return Bb(e,n,t,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let u=c.computedWidth;for(let o=1;o=r&&c{n=void 0,e(...r)};function a(...e){r=e,n===void 0&&(n=setTimeout(i,t))}return a.clear=()=>{clearTimeout(n),n=void 0},a}function Hb(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){let n=e.length;if(n!==t.length)return!1;for(let r=0;re.rootSize,dimensions:e=>e.dimensions,rowHeight:e=>e.dimensions.rowHeight,columnsTotalWidth:e=>e.dimensions.columnsTotalWidth,contentHeight:e=>e.dimensions.contentSize.height,autoHeight:e=>e.dimensions.autoHeight,minimalContentHeight:e=>e.dimensions.minimalContentHeight,rowsMeta:e=>e.rowsMeta,rowPositions:e=>e.rowsMeta.positions,columnPositions:Np((e,t)=>{let n=[],r=0;for(let e=0;ee.dimensions.viewportInnerSize.width>0&&e.dimensions.columnsTotalWidth>e.dimensions.viewportInnerSize.width,needsVerticalScrollbar:e=>e.dimensions.viewportInnerSize.height>0&&e.dimensions.contentSize.height>e.dimensions.viewportInnerSize.height},qb={initialize:Jb,use:Yb,selectors:Kb};function Jb(e){let{rowCount:t,rows:n,getRowHeight:r,dimensions:i}=e,{columnsTotalWidth:a,rowHeight:o,autoHeight:s,minimalContentHeight:c,topPinnedHeight:l,bottomPinnedHeight:u}=i,d=[],f=0;if(r&&n.length>0)for(let e=0;e{if(n&&(r.current=!1),r.current)return;let p=a.refs.container.current,m=Kb.rootSize(e.state),h=Kb.rowsMeta(e.state),g=$b(a.refs.scrollbarVertical?.current??a.refs.scrollbarHorizontal?.current??p,t.dimensions.scrollbarSize),_=u+h.pinnedTopRowsTotalHeight,v=d+h.pinnedBottomRowsTotalHeight,y={width:s,height:Ub(h.currentPageTotalHeight,1)},b=e.state.dimensions,x,S,C=!1,w=!1;if(t.dimensions.autoHeight)w=!1,C=Math.round(s)>Math.round(m.width),x={width:m.width,height:_+v+y.height},S={width:Math.max(0,x.width-(w?g:0)),height:Math.max(0,x.height-(C?g:0))};else{x={width:m.width,height:m.height},S={width:Math.max(0,x.width),height:Math.max(0,x.height-_-v)};let e=y,t=S,n=e.width>t.width,r=e.height>t.height;(n||r)&&(w=r,C=e.width+(w?g:0)>t.width,C&&(w=e.height+g>t.height));{let e=i.current,t=h.currentPageTotalHeight!==e.heights.content||h.pinnedTopRowsTotalHeight!==e.heights.pinnedTop||h.pinnedBottomRowsTotalHeight!==e.heights.pinnedBottom;if(t&&(e.counter=0,e.heights={content:h.currentPageTotalHeight,pinnedTop:h.pinnedTopRowsTotalHeight,pinnedBottom:h.pinnedBottomRowsTotalHeight}),b.isReady&&w!==b.hasScrollY){let r=performance.now();r-e.lastFlipTimestamp>Wb&&(e.counter=0),e.lastFlipTimestamp=r,t||(e.counter+=1),e.counter>=2&&(w=!1,C=n)}}w&&(S.width-=g),C&&(S.height-=g)}t.disableHorizontalScroll&&(C=!1),t.disableVerticalScroll&&(w=!1);let T=Math.max(x.width,s+(w?g:0)),E={width:s,height:_+y.height+v},D={isReady:!0,root:m,viewportOuterSize:x,viewportInnerSize:S,contentSize:y,minimumSize:E,hasScrollX:C,hasScrollY:w,scrollbarSize:g,rowWidth:T,rowHeight:o,columnsTotalWidth:s,leftPinnedWidth:c,rightPinnedWidth:l,topContainerHeight:_,bottomContainerHeight:v,autoHeight:t.dimensions.autoHeight,minimalContentHeight:t.dimensions.minimalContentHeight};Hb(b,D)||(e.update({dimensions:D}),f?.(D.root))},[e,a.refs.container,a.refs.scrollbarHorizontal,a.refs.scrollbarVertical,t.dimensions.scrollbarSize,t.dimensions.autoHeight,t.dimensions.minimalContentHeight,t.disableHorizontalScroll,t.disableVerticalScroll,f,o,s,c,l,u,d]),{resizeThrottleMs:m}=t,g=D(p),_=G.useMemo(()=>m>0?Vb(g,m):void 0,[m,g]);return G.useEffect(()=>_?.clear,[_]),h(p,[p]),h(()=>{e.update({dimensions:H({},e.state.dimensions,{autoHeight:t.dimensions.autoHeight,minimalContentHeight:t.dimensions.minimalContentHeight})})},[e,t.dimensions.autoHeight,t.dimensions.minimalContentHeight]),{updateDimensions:p,debouncedUpdateDimensions:_,rowsMeta:Xb(e,t,p)}}function Xb(e,t,n){let r=e.state.rowHeights,{rows:i,getRowHeight:a,getRowSpacing:o,getEstimatedRowHeight:s}=t,c=G.useRef(-1),l=G.useRef(!1),u=G.useRef(!1),d=t.pinnedRows,f=Hp(e,Kb.rowHeight),p=D(t=>{let n=r.get(t);return n===void 0&&(n={content:e.state.dimensions.rowHeight,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},r.set(t,n)),n}),{applyRowHeight:m}=t,g=G.useCallback(t=>{let n=Kb.dimensions(e.state),r=n.rowHeight,i=p(t.id);if(!a)i.content=r,i.needsFirstMeasurement=!1;else{let e=a(t);e===`auto`?(i.needsFirstMeasurement&&(i.content=(s?s(t):r)??r),l.current=!0,i.autoHeight=!0):(i.content=e??n.rowHeight,i.needsFirstMeasurement=!1,i.autoHeight=!1)}if(o){let e=o(t);i.spacingTop=e.top??0,i.spacingBottom=e.bottom??0}else i.spacingTop=0,i.spacingBottom=0;return m?.(i,t),i},[e,a,p,s,f,o,m]),_=G.useCallback(()=>{l.current=!1;let t=d?.top.reduce((e,t)=>{let n=g(t);return e+n.content+n.spacingTop+n.spacingBottom+n.detail},0)??0,r=d?.bottom.reduce((e,t)=>{let n=g(t);return e+n.content+n.spacingTop+n.spacingBottom+n.detail},0)??0,a=[],o=i.reduce((e,t)=>{a.push(e);let n=g(t);return e+(n.content+n.spacingTop+n.spacingBottom+n.detail)},0);l.current||(c.current=1/0);let s=t!==e.state.rowsMeta.pinnedTopRowsTotalHeight||r!==e.state.rowsMeta.pinnedBottomRowsTotalHeight||o!==e.state.rowsMeta.currentPageTotalHeight,f={currentPageTotalHeight:o,positions:a,pinnedTopRowsTotalHeight:t,pinnedBottomRowsTotalHeight:r};e.set(`rowsMeta`,f),s&&n(),u.current=!0},[e,d,i,g,n]),v=D(_),y=t=>r.get(t)?.content??Kb.rowHeight(e.state),b=(e,t)=>{let n=p(e),r=n.content!==t;n.needsFirstMeasurement=!1,n.content=t,u.current&&=!r},x=e=>r.get(e)?.autoHeight??!1,S=()=>c.current,C=e=>{l.current&&e>c.current&&(c.current=e)},w=()=>{r.clear(),_()},T=De(()=>typeof ResizeObserver>`u`?void 0:new ResizeObserver(e=>{for(let n=0;n0?r.borderBoxSize[0].blockSize:r.contentRect.height,a=r.target.__mui_id;if(t.focusedVirtualCell?.()?.id===a&&i===0)return;b(a,i)}u.current||requestAnimationFrame(()=>{v()})})).current;return h(()=>{_()},[_]),{getRowHeight:y,setLastMeasuredRowIndex:C,storeRowHeightMeasurement:b,hydrateRowsMeta:_,observeRowHeight:(e,t)=>(e.__mui_id=t,T?.observe(e),()=>T?.unobserve(e)),rowHasAutoHeight:x,getRowHeightEntry:p,getLastMeasuredRowIndex:S,resetRowHeights:w}}function Zb(e,t,n){if(!e)return;let r=e.getBoundingClientRect(),i={width:Ub(r.width,1),height:Ub(r.height,1)};if((t.state.rootSize===jb.EMPTY||!jb.equals(i,t.state.rootSize))&&n(i),typeof ResizeObserver>`u`)return;let a=new ResizeObserver(([e])=>{if(!e)return;let r={width:Ub(e.contentRect.width,1),height:Ub(e.contentRect.height,1)};jb.equals(r,t.state.rootSize)||n(r)});return a.observe(e),()=>{a.disconnect()}}var Qb=new WeakMap;function $b(e,t){if(t!==void 0)return t;if(e===null)return 0;let n=e,r=Ue(e),i=r.defaultView,a=i?.devicePixelRatio??1,o=Qb.get(e);if(o!==void 0&&o.devicePixelRatio===a&&o.measuredDirectly)return o.size;let s=i?.getComputedStyle(n),c=s?.overflowY===`auto`||s?.overflowY===`scroll`,l=s?.overflowX===`auto`||s?.overflowX===`scroll`,u=c&&n.scrollHeight>n.clientHeight,d=l&&n.scrollWidth>n.clientWidth,f=ex(s?.borderLeftWidth)+ex(s?.borderRightWidth),p=ex(s?.borderTopWidth)+ex(s?.borderBottomWidth),m=Math.max(u?n.offsetWidth-n.clientWidth-f:0,d?n.offsetHeight-n.clientHeight-p:0);if(u||d){let t=Math.max(0,m);return Qb.set(e,{size:t,devicePixelRatio:a,measuredDirectly:!0}),t}if(o!==void 0&&o.devicePixelRatio===a)return o.size;let h=r.createElement(`div`);h.style.width=`99px`,h.style.height=`99px`,h.style.position=`absolute`,h.style.overflow=`scroll`,s?.scrollbarWidth&&(h.style.scrollbarWidth=s.scrollbarWidth),h.className=`scrollDiv`,e.appendChild(h);let g=h.offsetWidth-h.clientWidth;return e.removeChild(h),Qb.set(e,{size:g,devicePixelRatio:a,measuredDirectly:!1}),g}function ex(e){let t=Number.parseFloat(e??`0`);return Number.isNaN(t)?0:t}function tx(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:nx,platform:rx,maxTouchPoints:ix}=tx(),ax=nx.toLowerCase();rx.toLowerCase();var ox=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),sx=!ox&&ax.includes(`firefox`);!ox&&ax.includes(`chrom`);var cx=/jsdom|happydom/.test(ax),lx=()=>{},ux=(e,t)=>{let n=G.useRef(!1);h(()=>n.current||!e?lx:(n.current=!0,t()),[n.current||e])};function dx(e){let t=G.useRef(void 0);return D(n=>{if(!n){t.current?.();return}if(t.current=e(n),Rp>=19)return t.current})}var fx=(e,t,n)=>Math.max(t,Math.min(n,e)),px=50,mx={top:0,left:0},hx=Object.freeze(new Map),gx={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},_x=(()=>{let e=Mp(e=>e.virtualization.renderContext.firstRowIndex),t=Mp(e=>e.virtualization.scrollPosition),n=Mp(e=>e.virtualization.layoutMode);return{store:Mp(e=>e.virtualization),renderContext:Mp(e=>e.virtualization.renderContext),enabledForRows:Mp(e=>e.virtualization.enabledForRows),enabledForColumns:Mp(e=>e.virtualization.enabledForColumns),offsetTop:Mp(n,qb.selectors.dimensions,qb.selectors.rowPositions,e,(e,t,n,r)=>(e===`uncontrolled`?t.topContainerHeight:0)+(n[r]??0)),context:Mp(e=>e.virtualization.context),layoutMode:n,scrollPosition:t,pinnedLeftOffsetSelector:Mp(t,e=>e.current.left),pinnedRightOffsetSelector:Mp(t,qb.selectors.dimensions,qb.selectors.columnsTotalWidth,qb.selectors.needsVerticalScrollbar,(e,t,n,r)=>Math.max(n,t.viewportOuterSize.width)-t.viewportOuterSize.width-e.current.left+(r?t.scrollbarSize:0))}})(),vx={initialize:yx,use:bx,selectors:_x};function yx(e){let{enabled:t,enabledForRows:n,enabledForColumns:r}=e.initialState?.virtualization??{},i=t===!1&&n===!1&&r===!1?{firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.columns?.length??0}:gx;return{virtualization:H({enabled:!cx,enabledForRows:!cx,enabledForColumns:!cx,renderContext:i,props:e.layout.constructor.elements.reduce((e,t)=>(e[t],e),{}),context:{},scrollPosition:{current:Pb.EMPTY},layoutMode:e.virtualization.layoutMode??`uncontrolled`},e.initialState?.virtualization),getters:null}}function bx(e,t,n){let{layout:r,dimensions:{rowHeight:i,columnsTotalWidth:a=0},virtualization:{isRtl:o=!1,rowBufferPx:s=150,columnBufferPx:c=150},colspan:l,initialState:u,rows:d,range:f,columns:p,pinnedRows:m=Mb.EMPTY,pinnedColumns:g=Nb.EMPTY,onWheel:_,onTouchMove:v,onRenderContextChange:y,onScrollChange:b,scrollReset:x,renderRow:S,renderInfiniteLoadingTrigger:C}=t,w=m.bottom.length>0,[T,E]=G.useState(hx),O=G.useRef(!1),k=G.useRef(!1),A=Hp(e,_x.renderContext),j=Hp(e,_x.enabledForRows),M=Hp(e,_x.enabledForColumns),N=Hp(e,_x.layoutMode),P=Hp(e,qb.selectors.contentHeight),ee=G.useRef(u?.scroll??mx),F=G.useRef(!1),I=G.useRef(mx),R=G.useRef(gx),z=L(),te=G.useRef(void 0),ne=De(()=>Mx(o,s,c,i*15,300,N)).current,re=G.useCallback(t=>{Ox(t,e.state.virtualization.renderContext)||e.set(`virtualization`,H({},e.state.virtualization,{renderContext:t,scrollPosition:{current:H({},ee.current)}}));let n=qb.selectors.dimensions(e.state).isReady,r=t.firstRowIndex!==R.current.firstRowIndex||t.lastRowIndex!==R.current.lastRowIndex;n&&r&&(R.current=t,y?.(t)),I.current=ee.current},[e,y]),B=D(()=>{let a=r.refs.scroller.current;if(!a)return;let l=qb.selectors.dimensions(e.state),u=Math.ceil(l.contentSize.height-l.viewportInnerSize.height),d=Math.ceil(l.contentSize.width-l.viewportInnerSize.width),f={top:fx(a.scrollTop,0,u),left:o?fx(a.scrollLeft,-Math.abs(d),0):fx(a.scrollLeft,0,d)},p=f.left-ee.current.left,m=f.top-ee.current.top,h=p!==0||m!==0;ee.current=f;let g=h?Fb.forDelta(p,m):Fb.NONE,_=Math.abs(ee.current.top-I.current.top),v=Math.abs(ee.current.left-I.current.left),y=_>=i||v>=px,b=ne.direction!==g;if(!(y||b))return e.set(`virtualization`,H({},e.state.virtualization,{scrollPosition:{current:H({},ee.current)}})),A;if(b)switch(g){case Fb.NONE:case Fb.LEFT:case Fb.RIGHT:te.current=void 0;break;default:te.current=A}ne.direction=g,ne.buffer=jx(o,g,s,c,i*15,300,N);let x=Sx(xx(e,t,n,j,M,N),ee.current,ne);return Ox(x,A)?e.set(`virtualization`,H({},e.state.virtualization,{scrollPosition:{current:H({},ee.current)}})):(Mi.flushSync(()=>{re(x)}),N===`uncontrolled`&&z.start(1e3,B)),x}),ie=()=>{if(!qb.selectors.dimensions(e.state).isReady&&(j||M))return;let r=Sx(xx(e,t,n,j,M,N),ee.current,ne);te.current=void 0,re(r)},ae=D(ie);Kp(e,qb.selectors.dimensions,(e,t)=>{t.isReady&&ie()}),h(()=>{O.current&&=(ie(),!1)});let oe=()=>{O.current=!0},se=D(()=>{if(F.current){F.current=!1;return}let e=B();e&&b?.(ee.current,e)}),ce=(r={},i)=>{if(!r.rows&&!f)return[];let o=A;r.renderContext&&(o=r.renderContext,o.firstColumnIndex=A.firstColumnIndex,o.lastColumnIndex=A.lastColumnIndex);let s=!w&&r.position===void 0||w&&r.position===`bottom`,c=r.position!==void 0,u;switch(r.position){case`top`:u=0;break;case`bottom`:u=m.top.length+d.length;break;case void 0:default:u=m.top.length}let h=r.rows??d,_=o.firstRowIndex,v=Math.min(o.lastRowIndex,h.length),y=r.rows?Nx(0,r.rows.length):Nx(_,v),b=-1,x=t.focusedVirtualCell?.();!c&&x&&(x.rowIndex<_&&x.rowIndex>=0&&x.rowIndexv&&x.rowIndex{let{id:t,model:m}=h[e];if(i&&!i[t])return;let _=(f?.firstRowIndex||0)+u+e;if(l?.enabled){let e=g.left.length,r=p.length-g.right.length;n.calculateColSpan(t,e,r,p),g.left.length>0&&n.calculateColSpan(t,0,g.left.length,p),g.right.length>0&&n.calculateColSpan(t,p.length-g.right.length,p.length,p)}let v=n.rowsMeta.rowHasAutoHeight(t)?`auto`:n.rowsMeta.getRowHeight(t),y=!1;r.position===void 0&&(y=e===0);let w=!1,O=e===h.length-1;s&&(c?w=O:e===d.length-1&&(w=!0));let k=o;te.current&&e>=te.current.firstRowIndex&&e{k.current&&ae()},[M,j,ae]),h(()=>{r.refs.scroller.current&&(r.refs.scroller.current.scrollLeft=0)},[r.refs.scroller,x]),ux(A!==gx,()=>{if(b?.(ee.current,A),k.current=!0,u?.scroll&&r.refs.scroller.current){let e=r.refs.scroller.current,{top:t,left:n}=u.scroll,i={top:!(t>0),left:!(n>0)};!i.left&&a&&(e.scrollLeft=n,i.left=!0,F.current=!0),!i.top&&P&&(e.scrollTop=t,F.current=!0),(!i.top||!i.left)&&(le.current=(r,a)=>{!i.left&&r&&(e.scrollLeft=n,i.left=!0,F.current=!0),!i.top&&a&&(e.scrollTop=t,i.top=!0,F.current=!0),i.left&&i.top&&(le.current=null)})}}),Kp(e,qb.selectors.dimensions,ie),h(()=>{r.refs.scroller&&le.current?.(a,P)},[r.refs.scroller,a,P]);let ue=G.useRef(!0),de={containerRef:dx(t=>{r.refs.container.current=t;let i=Zb(t,e,t=>{(t.width!==0||t.height!==0||e.state.rootSize.height===0||e.state.rootSize.width===0)&&(e.state.rootSize=t,ue.current||!n.debouncedUpdateDimensions?(n.updateDimensions(ue.current),ue.current=!1):n.debouncedUpdateDimensions())});return()=>{i?.(),r.refs.container.current=null}}),scrollerRef:dx(e=>{r.refs.scroller.current=e;let t={passive:!0};return e.addEventListener(`scroll`,se,t),e.addEventListener(`wheel`,_,t),e.addEventListener(`touchmove`,v,t),()=>{e.removeEventListener(`scroll`,se,t),e.removeEventListener(`wheel`,_,t),e.removeEventListener(`touchmove`,v,t),r.refs.scroller.current=null}})},fe=r.use(e,t,n,de),pe=H({setPanels:E,getRows:ce,rows:t.rows},fe);return H({getters:pe,setPanels:E,forceUpdateRenderContext:ie,scheduleUpdateRenderContext:oe},Fx())}function xx(e,t,n,r,i,a){let o=qb.selectors.dimensions(e.state),s=t.rows,c=t.range,l=t.columns,u=n.getHiddenCellsOrigin(),d=t.rows.at(-1)?.id,f=l.at(-1);return{api:n,enabledForRows:r,enabledForColumns:i,autoHeight:o.autoHeight,rowBufferPx:t.virtualization.rowBufferPx,columnBufferPx:t.virtualization.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,rightPinnedWidth:o.rightPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:d===void 0?0:n.rowsMeta.getRowHeight(d),lastColumnWidth:f?.computedWidth??0,rowsMeta:qb.selectors.rowsMeta(e.state),columnPositions:qb.selectors.columnPositions(e.state,t.columns),rows:s,range:c,pinnedColumns:t.pinnedColumns,columns:l,hiddenCellsOriginMap:u,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight,layoutMode:a}}function Sx(e,t,n){let r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.columns.length},{top:i,left:a}=t,o=Math.abs(a)+e.leftPinnedWidth;if(e.enabledForRows){let t=Math.min(Cx(e,i,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1),n=e.hiddenCellsOriginMap[t];if(n){let e=Math.min(...Object.values(n));t=Math.min(t,e)}let a=e.autoHeight?t+e.rows.length:Cx(e,i+e.viewportInnerHeight);r.firstRowIndex=t,r.lastRowIndex=a}if(e.enabledForColumns){let t=0,i=e.columnPositions.length,a=!1,[s,c]=Dx({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let t=s;t=e.range.lastRowIndex);let a=fx(r-(e.range?.firstRowIndex||0),0,e.rowsMeta.positions.length);return i||e.rowsMeta.positions[a]>=t?Tx(t,e.rowsMeta.positions,n):Ex(t,e.rowsMeta.positions,a,n)}function wx(e,t,n){let[r,i]=Dx({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[a,o]=Dx({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns?.left.length??0,maxLastIndex:e.columns.length-(e.pinnedColumns?.right.length??0),bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth});return{firstRowIndex:r,lastRowIndex:i,firstColumnIndex:Px({api:e.api,firstColumnToRender:a,firstRowToRender:r,lastRowToRender:i,visibleRows:e.rows}),lastColumnIndex:o}}function Tx(e,t,n=void 0,r=0,i=t.length){if(t.length<=0)return-1;if(r>=i)return r;let a=r+Math.floor((i-r)/2),o=t[a],s;return s=n?.atStart?e-((a===t.length-1?n.lastPosition:t[a+1])-o)e+n)}function Px({api:e,firstColumnToRender:t,firstRowToRender:n,lastRowToRender:r,visibleRows:i}){let a=t,o=!1;for(;!o&&a>=0;){o=!0;for(let t=n;t{throw Error(dp(200))},calculateColSpan:()=>{throw Error(dp(200))},getHiddenCellsOrigin:()=>{throw Error(dp(201))}}}var Ix=class{static elements=[`scroller`,`container`];constructor(e){this.refs=e}refSetter(e){return t=>{this.refs[e].current!==t&&(this.refs[e].current=t)}}},Lx=class extends Ix{static elements=[`scroller`,`container`,`content`,`positioner`,`scrollbarVertical`,`scrollbarHorizontal`];use(e,t,n,r){let{scrollerRef:i,containerRef:a}=r,o=Rx(this.refs.scroller,this.refSetter(`scrollbarVertical`),`scrollTop`,n.updateDimensions),s=Rx(this.refs.scroller,this.refSetter(`scrollbarHorizontal`),`scrollLeft`,n.updateDimensions);e.state.virtualization.context={scrollerRef:i,containerRef:a,scrollbarVerticalRef:o,scrollbarHorizontalRef:s}}static selectors={containerProps:Np(vx.selectors.context,e=>({ref:e.containerRef})),scrollerProps:Np(vx.selectors.context,qb.selectors.autoHeight,qb.selectors.needsHorizontalScrollbar,(e,t,n)=>({ref:e.scrollerRef,style:{overflowX:n?void 0:`hidden`,overflowY:t?`hidden`:void 0},role:`presentation`,tabIndex:sx?-1:void 0})),scrollerContentProps:Np(vx.selectors.layoutMode,qb.selectors.dimensions,qb.selectors.needsVerticalScrollbar,qb.selectors.needsHorizontalScrollbar,(e,t,n,r)=>{let i;if(e===`controlled`){let{contentSize:e,scrollbarSize:a,topContainerHeight:o,bottomContainerHeight:s,minimalContentHeight:c,columnsTotalWidth:l,viewportOuterSize:u}=t,d=n?a:0,f=r?a:0,p=e.height===0?c:e.height,m=r?d+l:`auto`,h=zx(zx(zx(p,o),s),f);i={width:Bx(m,u.width-d),height:Bx(h,u.height-f),flex:`0 0 auto`}}return{style:i,role:`presentation`}}),viewportProps:Np(qb.selectors.dimensions,e=>({style:{width:e.viewportOuterSize.width,height:e.viewportOuterSize.height},role:`presentation`})),contentProps:Np(qb.selectors.contentHeight,qb.selectors.minimalContentHeight,qb.selectors.columnsTotalWidth,qb.selectors.needsHorizontalScrollbar,(e,t,n,r)=>({style:{width:r?n:`auto`,height:e===0?t:e,flex:`0 0 auto`},role:`presentation`})),positionerProps:Np(vx.selectors.layoutMode,vx.selectors.offsetTop,vx.selectors.scrollPosition,(e,t,n)=>({style:{transform:e===`uncontrolled`?`translate3d(0, ${t}px, 0)`:`translate3d(${-n.current.left}px, ${t-n.current.top}px, 0)`}})),containerVerticalProps:Np(vx.selectors.layoutMode,vx.selectors.scrollPosition,(e,t)=>e===`uncontrolled`?void 0:{style:{transform:`translate3d(${-t.current.left}px, 0, 0)`}}),scrollbarHorizontalProps:Np(vx.selectors.context,vx.selectors.scrollPosition,(e,t)=>({ref:e.scrollbarHorizontalRef,scrollPosition:t})),scrollbarVerticalProps:Np(vx.selectors.context,vx.selectors.scrollPosition,(e,t)=>({ref:e.scrollbarVerticalRef,scrollPosition:t})),scrollAreaProps:Np(vx.selectors.scrollPosition,e=>({scrollPosition:e}))}};(class extends Ix{static elements=[`scroller`,`container`,`content`,`positioner`];use(e,t,n,r){let{scrollerRef:i,containerRef:a}=r,o=p(i,a);e.state.virtualization.context={mergedRef:o}}static selectors={containerProps:Np(vx.selectors.context,qb.selectors.autoHeight,qb.selectors.needsHorizontalScrollbar,(e,t,n)=>({ref:e.mergedRef,style:{overflowX:n?void 0:`hidden`,overflowY:t?`hidden`:void 0,position:`relative`},role:`presentation`,tabIndex:sx?-1:void 0})),contentProps:Np(qb.selectors.contentHeight,e=>({style:{position:`absolute`,display:`inline-block`,width:`100%`,height:e,top:0,left:0,zIndex:-1},role:`presentation`})),positionerProps:Np(vx.selectors.offsetTop,e=>({style:{height:e}}))}});function Rx(e,t,n,r){let i=G.useRef(!1),a=G.useRef(0),o=D(t=>{let r=e.current;if(!r)return;let o=r[n];if(o!==a.current){if(a.current=o,i.current){i.current=!1;return}i.current=!0,t[n]=o}}),s=D(t=>{let r=e.current;if(r){if(i.current){i.current=!1;return}i.current=!0,r[n]=t[n]}});return dx(n=>{t(n),r();let i=e.current;if(!i)return()=>{t(null)};let a=()=>o(n),c=()=>s(n),l={passive:!0};return i.addEventListener(`scroll`,a,l),n.addEventListener(`scroll`,c,l),()=>{i.removeEventListener(`scroll`,a),n.removeEventListener(`scroll`,c),t(null)}})}function zx(e,t){return typeof e==`number`&&typeof t==`number`?e+t:`calc(${Vx(e)} + ${Vx(t)})`}function Bx(e,t){return typeof e==`number`&&typeof t==`number`?Math.max(e,t):`max(${Vx(e)}, ${Vx(t)})`}function Vx(e){return typeof e==`string`?e:e===void 0?`0`:`${e}px`}var Hx={initialize:Ux,use:Wx,selectors:{}};function Ux(e){return{}}function Wx(e,t,n){return{getViewportPageSize:()=>{let n=qb.selectors.dimensions(e.state);if(!n.isReady)return 0;if(t.getRowHeight){let n=vx.selectors.renderContext(e.state),r=n.lastRowIndex-n.firstRowIndex;return Math.min(r-1,t.rows.length)}let r=Math.floor(n.viewportInnerSize.height/n.rowHeight);return Math.min(r,t.rows.length)}}}var Gx={firstRowIndex:0,lastRowIndex:0},Kx={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},qx={state:e=>e.rowSpanning,hiddenCells:e=>e.rowSpanning.caches.hiddenCells,spannedCells:e=>e.rowSpanning.caches.spannedCells,hiddenCellsOriginMap:e=>e.rowSpanning.caches.hiddenCellOriginMap},Jx={initialize:Yx,use:Xx,selectors:qx};function Yx(e){return{rowSpanning:e.initialState?.rowSpanning??{caches:Kx,processedRange:Gx}}}function Xx(e,t,n){return{getHiddenCellsOrigin:()=>qx.hiddenCellsOriginMap(e.state)}}var Zx={resizeThrottleMs:100,columns:[{field:`DEFAULT_COLUMN`}],dimensions:{autoHeight:!1,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,topPinnedHeight:0,bottomPinnedHeight:0},virtualization:{isRtl:!1,rowBufferPx:150,columnBufferPx:150}},Qx=[qb,vx,Ib,Jx,Hx],$x=e=>{let t=eS(e,Zx),n=De(()=>new Jp(Qx.map(e=>e.initialize(t)).reduce((e,t)=>Object.assign(e,t),{}))).current,r={};for(let e of Qx)Object.assign(r,e.use(n,t,r));return{store:n,api:r}};function eS(e,t){let n=H({},e);for(let r in t)if(Object.hasOwn(t,r)){let i=t[r];n[r]=typeof i==`object`&&i&&!Array.isArray(i)?eS(e[r]??{},i):e[r]??i}return n}var Q=(...e)=>{let t=Mp(...e);return(e,n,r,i)=>t(rS(e),n,r,i)},tS=(...e)=>{let t=Np(...e);return(e,n,r,i)=>t(rS(e),n,r,i)},nS=e=>(t,n)=>e(rS(t),n);function rS(e){return`current`in e?e.current.state:e}var iS=nS(e=>e.dimensions),aS=Q(iS,e=>e.columnsTotalWidth),oS=Q(iS,e=>e.rowHeight);Q(iS,e=>e.contentSize.height);var sS=Q(iS,e=>e.hasScrollX),cS=Q(iS,e=>e.hasScrollY),lS=Q(iS,e=>e.columnsTotalWidthe.headerHeight),dS=Q(iS,e=>e.groupHeaderHeight);Q(iS,e=>e.headerFilterHeight);var fS=Q(iS,e=>e.hasScrollX?e.scrollbarSize:0),pS=Q(iS,e=>e.hasScrollY?e.scrollbarSize:0),mS=Q(iS,fS,(e,t)=>{let n=e.viewportOuterSize.height-e.minimumSize.height>0;return!(t===0&&!n)}),hS=nS(e=>e.rowsMeta),gS=nS(e=>e.rows),_S=Q(gS,e=>e.totalRowCount),vS=Q(gS,e=>e.loading),yS=Q(gS,e=>e.totalTopLevelRowCount),bS=Q(gS,e=>e.dataRowIdToModelLookup);Q(bS,(e,t)=>e[t]);var xS=Q(gS,e=>e.tree),SS=Q(xS,(e,t)=>e[t]),CS=Q(gS,e=>e.groupsToFetch),wS=Q(gS,e=>e.groupingName),TS=Q(gS,e=>e.treeDepths),ES=tS(gS,e=>{let t=Object.entries(e.treeDepths);return t.length===0?1:(t.filter(([,e])=>e>0).map(([e])=>Number(e)).sort((e,t)=>t-e)[0]??0)+1}),DS=Q(gS,e=>e.dataRowIds),OS=tS(DS,bS,(e,t)=>e.reduce((e,n)=>(t[n]&&e.push(t[n]),e),[])),kS=tS(Q(gS,e=>e?.additionalRowGroups),e=>{let t=e?.pinnedRows;return{bottom:t?.bottom?.map(e=>({id:e.id,model:e.model??{}}))??[],top:t?.top?.map(e=>({id:e.id,model:e.model??{}}))??[]}}),AS=Q(kS,e=>(e?.top?.length||0)+(e?.bottom?.length||0)),jS=`auto-generated-group-node-root`,MS=Symbol(`mui.id_autogenerated`),NS=()=>({type:`group`,id:jS,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:Object.create(null),childrenExpanded:!0,parent:null});function PS(e,t,n=`A row was provided without id in the rows prop:`){if(e==null)throw Error(dp(85,n,JSON.stringify(t)))}var FS=(e,t,n)=>{let r=t?t(e):e.id;return PS(r,e,n),r},IS=(e,t,n)=>{if(!t)return;if(!t.valueGetter)return e[t.field];let r=e[t.field];return t.valueGetter(r,e,t,n)},LS=({rows:e,getRowId:t,loading:n,rowCount:r})=>{let i={type:`full`,rows:[]},a={};for(let n=0;n{let n=e[jS];return Math.max(t,n.children.length+(n.footerId==null?0:1))},zS=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:i,previousGroupsToFetch:a})=>{let o=e.current.caches.rows,{tree:s,treeDepths:c,dataRowIds:l,groupingName:u,groupsToFetch:d=[]}=e.current.applyStrategyProcessor(`rowTreeCreation`,{previousTree:r,previousTreeDepths:i,updates:o.updates,dataRowIdToModelLookup:o.dataRowIdToModelLookup,previousGroupsToFetch:a}),f=e.current.unstable_applyPipeProcessors(`hydrateRows`,{tree:s,treeDepths:c,dataRowIds:l,dataRowIdToModelLookup:o.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:`partial`,actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},H({},f,{totalRowCount:Math.max(t,f.dataRowIds.length),totalTopLevelRowCount:RS({tree:f.tree,rowCountProp:t}),groupingName:u,loading:n,groupsToFetch:d})},BS=e=>MS in e,VS=e=>e.type===`skeletonRow`||e.type===`footer`||e.type===`group`&&e.isAutoGenerated||e.type===`pinnedRow`&&e.isAutoGenerated,HS=(e,t,n,r)=>{let i=e[t];if(i?.type!==`group`)return[];let a=[];for(let t=0;t{if(e.updates.type===`full`)throw Error(dp(86));let i=new Map;n.forEach(e=>{let n=FS(e,t,`A row was provided without id when calling updateRows():`);i.has(n)?i.set(n,H({},i.get(n),e)):i.set(n,e)});let a={type:`partial`,actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:H({},e.updates.idToActionLookup),groupKeys:r},o=H({},e.dataRowIdToModelLookup),s={insert:{},modify:{},remove:{}};i.forEach((e,t)=>{let n=a.idToActionLookup[t];if(e._action===`delete`){if(n===`remove`||!o[t])return;n!=null&&(s[n][t]=!0),a.actions.remove.push(t),delete o[t];return}let r=o[t];if(r){n===`remove`?(s.remove[t]=!0,a.actions.modify.push(t)):n??a.actions.modify.push(t);let i=Object.getPrototypeOf(e),c=i===Object.prototype||i===null?Object.getPrototypeOf(r):i,l=Object.create(c);Object.assign(l,r,e),o[t]=l;return}n===`remove`?(s.remove[t]=!0,a.actions.insert.push(t)):n??a.actions.insert.push(t),o[t]=e});let c=Object.keys(s);for(let e=0;e0&&(a.actions[t]=a.actions[t].filter(e=>!n[e]))}return{dataRowIdToModelLookup:o,updates:a,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},WS=`var(--DataGrid-overlayHeight, calc(var(--height) * 2))`;function GS(e,t,n){let r=[];return t.forEach(t=>{let i=FS(t,n,`A row was provided without id when calling updateRows():`);if(SS(e,i)?.type===`pinnedRow`){let n=e.current.caches.pinnedRows,r=n.idLookup[i];r&&(n.idLookup[i]=H({},r,t))}else r.push(t)}),r}var KS=(e,t,n)=>typeof e==`number`&&e>0?e:t,qS=["MUI X: The `rowHeight` prop should be a number greater than 0.",`The default value will be used instead.`].join(` +`);function JS(e){return G.memo(e,sm)}var YS=(e,t)=>{let n=typeof e==`string`?Number(e):e;if(!Number.isFinite(n))return String(e);if(typeof Intl<`u`&&Intl.NumberFormat)try{return new Intl.NumberFormat(t).format(n)}catch{return String(n)}return String(n)},XS=(e=>t=>YS(t,e))(`en-US`),ZS={noRowsLabel:`No rows`,noResultsOverlayLabel:`No results found.`,noColumnsOverlayLabel:`No columns`,noColumnsOverlayManageColumns:`Manage columns`,emptyPivotOverlayLabel:`Add fields to rows, columns, and values to create a pivot table`,toolbarDensity:`Density`,toolbarDensityLabel:`Density`,toolbarDensityCompact:`Compact`,toolbarDensityStandard:`Standard`,toolbarDensityComfortable:`Comfortable`,toolbarUndo:`Undo`,toolbarRedo:`Redo`,toolbarColumns:`Columns`,toolbarColumnsLabel:`Select columns`,toolbarFilters:`Filters`,toolbarFiltersLabel:`Show filters`,toolbarFiltersTooltipHide:`Hide filters`,toolbarFiltersTooltipShow:`Show filters`,toolbarFiltersTooltipActive:e=>e===1?`${e} active filter`:`${e} active filters`,toolbarQuickFilterPlaceholder:`Search…`,toolbarQuickFilterLabel:`Search`,toolbarQuickFilterDeleteIconLabel:`Clear`,toolbarExport:`Export`,toolbarExportLabel:`Export`,toolbarExportCSV:`Download as CSV`,toolbarExportPrint:`Print`,toolbarExportExcel:`Download as Excel`,toolbarPivot:`Pivot`,toolbarCharts:`Charts`,toolbarAssistant:`AI Assistant`,columnsManagementSearchTitle:`Search`,columnsManagementNoColumns:`No columns`,columnsManagementShowHideAllText:`Show/Hide All`,columnsManagementReset:`Reset`,columnsManagementDeleteIconLabel:`Clear`,filterPanelAddFilter:`Add filter`,filterPanelRemoveAll:`Remove all`,filterPanelDeleteIconLabel:`Delete`,filterPanelLogicOperator:`Logic operator`,filterPanelOperator:`Operator`,filterPanelOperatorAnd:`And`,filterPanelOperatorOr:`Or`,filterPanelColumn:`Column`,filterPanelInputLabel:`Value`,filterPanelInputPlaceholder:`Filter value`,filterOperatorContains:`contains`,filterOperatorDoesNotContain:`does not contain`,filterOperatorEquals:`equals`,filterOperatorDoesNotEqual:`does not equal`,filterOperatorStartsWith:`starts with`,filterOperatorEndsWith:`ends with`,filterOperatorIs:`is`,filterOperatorNot:`is not`,filterOperatorAfter:`is after`,filterOperatorOnOrAfter:`is on or after`,filterOperatorBefore:`is before`,filterOperatorOnOrBefore:`is on or before`,filterOperatorIsEmpty:`is empty`,filterOperatorIsNotEmpty:`is not empty`,filterOperatorIsAnyOf:`is any of`,"filterOperator=":`=`,"filterOperator!=":`!=`,"filterOperator>":`>`,"filterOperator>=":`>=`,"filterOperator<":`<`,"filterOperator<=":`<=`,headerFilterOperatorContains:`Contains`,headerFilterOperatorDoesNotContain:`Does not contain`,headerFilterOperatorEquals:`Equals`,headerFilterOperatorDoesNotEqual:`Does not equal`,headerFilterOperatorStartsWith:`Starts with`,headerFilterOperatorEndsWith:`Ends with`,headerFilterOperatorIs:`Is`,headerFilterOperatorNot:`Is not`,headerFilterOperatorAfter:`Is after`,headerFilterOperatorOnOrAfter:`Is on or after`,headerFilterOperatorBefore:`Is before`,headerFilterOperatorOnOrBefore:`Is on or before`,headerFilterOperatorIsEmpty:`Is empty`,headerFilterOperatorIsNotEmpty:`Is not empty`,headerFilterOperatorIsAnyOf:`Is any of`,"headerFilterOperator=":`Equals`,"headerFilterOperator!=":`Not equals`,"headerFilterOperator>":`Greater than`,"headerFilterOperator>=":`Greater than or equal to`,"headerFilterOperator<":`Less than`,"headerFilterOperator<=":`Less than or equal to`,headerFilterClear:`Clear filter`,filterValueAny:`any`,filterValueTrue:`true`,filterValueFalse:`false`,columnMenuLabel:`Menu`,columnMenuAriaLabel:e=>`${e} column menu`,columnMenuShowColumns:`Show columns`,columnMenuManageColumns:`Manage columns`,columnMenuFilter:`Filter`,columnMenuHideColumn:`Hide column`,columnMenuUnsort:`Unsort`,columnMenuSortAsc:`Sort by ASC`,columnMenuSortDesc:`Sort by DESC`,columnMenuManagePivot:`Manage pivot`,columnMenuManageCharts:`Manage charts`,columnHeaderFiltersTooltipActive:e=>e===1?`${e} active filter`:`${e} active filters`,columnHeaderFiltersLabel:`Show filters`,columnHeaderSortIconLabel:`Sort`,footerRowSelected:e=>e===1?`${e.toLocaleString()} row selected`:`${e.toLocaleString()} rows selected`,footerTotalRows:`Total Rows:`,footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:`Checkbox selection`,checkboxSelectionSelectAllRows:`Select all rows`,checkboxSelectionUnselectAllRows:`Unselect all rows`,checkboxSelectionSelectRow:`Select row`,checkboxSelectionUnselectRow:`Unselect row`,booleanCellTrueLabel:`yes`,booleanCellFalseLabel:`no`,longTextCellExpandLabel:`Expand`,longTextCellCollapseLabel:`Collapse`,actionsCellMore:`more`,pinToLeft:`Pin to left`,pinToRight:`Pin to right`,unpin:`Unpin`,treeDataGroupingHeaderName:`Group`,treeDataExpand:`see children`,treeDataCollapse:`hide children`,groupingColumnHeaderName:`Group`,groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:`Detail panel toggle`,expandDetailPanel:`Expand`,collapseDetailPanel:`Collapse`,paginationRowsPerPage:`Rows per page:`,paginationDisplayedRows:({from:e,to:t,count:n,estimated:r})=>{let i=n==null||n===-1;if(!r)return`${XS(e)}–${XS(t)} of ${i?`more than ${XS(t)}`:XS(n)}`;let a=r&&r>t?`around ${XS(r)}`:`more than ${XS(t)}`;return`${XS(e)}–${XS(t)} of ${i?a:XS(n)}`},paginationItemAriaLabel:e=>e===`first`?`Go to first page`:e===`last`?`Go to last page`:e===`next`?`Go to next page`:`Go to previous page`,rowReorderingHeaderName:`Row reordering`,aggregationMenuItemHeader:`Aggregation`,aggregationFunctionLabelNone:`none`,aggregationFunctionLabelSum:`sum`,aggregationFunctionLabelAvg:`avg`,aggregationFunctionLabelMin:`min`,aggregationFunctionLabelMax:`max`,aggregationFunctionLabelSize:`size`,pivotToggleLabel:`Pivot`,pivotRows:`Rows`,pivotColumns:`Columns`,pivotValues:`Values`,pivotCloseButton:`Close pivot settings`,pivotSearchButton:`Search fields`,pivotSearchControlPlaceholder:`Search fields`,pivotSearchControlLabel:`Search fields`,pivotSearchControlClear:`Clear search`,pivotNoFields:`No fields`,pivotMenuMoveUp:`Move up`,pivotMenuMoveDown:`Move down`,pivotMenuMoveToTop:`Move to top`,pivotMenuMoveToBottom:`Move to bottom`,pivotMenuRows:`Rows`,pivotMenuColumns:`Columns`,pivotMenuValues:`Values`,pivotMenuOptions:`Field options`,pivotMenuAddToRows:`Add to Rows`,pivotMenuAddToColumns:`Add to Columns`,pivotMenuAddToValues:`Add to Values`,pivotMenuRemove:`Remove`,pivotDragToRows:`Drag here to create rows`,pivotDragToColumns:`Drag here to create columns`,pivotDragToValues:`Drag here to create values`,pivotYearColumnHeaderName:`(Year)`,pivotQuarterColumnHeaderName:`(Quarter)`,chartsNoCharts:`There are no charts available`,chartsChartNotSelected:`Select a chart type to configure its options`,chartsTabChart:`Chart`,chartsTabFields:`Fields`,chartsTabCustomize:`Customize`,chartsCloseButton:`Close charts configuration`,chartsSyncButtonLabel:`Sync chart`,chartsSearchPlaceholder:`Search fields`,chartsSearchLabel:`Search fields`,chartsSearchClear:`Clear search`,chartsNoFields:`No fields`,chartsFieldBlocked:`This field cannot be added to any section`,chartsCategories:`Categories`,chartsSeries:`Series`,chartsMenuAddToDimensions:e=>`Add to ${e}`,chartsMenuAddToValues:e=>`Add to ${e}`,chartsMenuMoveUp:`Move up`,chartsMenuMoveDown:`Move down`,chartsMenuMoveToTop:`Move to top`,chartsMenuMoveToBottom:`Move to bottom`,chartsMenuOptions:`Field options`,chartsMenuRemove:`Remove`,chartsDragToDimensions:e=>`Drag here to use column as ${e}`,chartsDragToValues:e=>`Drag here to use column as ${e}`,aiAssistantPanelTitle:`AI Assistant`,aiAssistantPanelClose:`Close AI Assistant`,aiAssistantPanelNewConversation:`New conversation`,aiAssistantPanelConversationHistory:`Conversation history`,aiAssistantPanelEmptyConversation:`No prompt history`,aiAssistantSuggestions:`Suggestions`,promptFieldLabel:`Prompt`,promptFieldPlaceholder:`Type a prompt…`,promptFieldPlaceholderWithRecording:`Type or record a prompt…`,promptFieldPlaceholderListening:`Listening for prompt…`,promptFieldSpeechRecognitionNotSupported:`Speech recognition is not supported in this browser`,promptFieldSend:`Send`,promptFieldRecord:`Record`,promptFieldStopRecording:`Stop recording`,promptRerun:`Run again`,promptProcessing:`Processing…`,promptAppliedChanges:`Applied changes`,promptChangeGroupDescription:e=>`Group by ${e}`,promptChangeAggregationLabel:(e,t)=>`${e} (${t})`,promptChangeAggregationDescription:(e,t)=>`Aggregate ${e} (${t})`,promptChangeFilterLabel:(e,t,n)=>t===`is any of`?`${e} is any of: ${n}`:`${e} ${t} ${n}`,promptChangeFilterDescription:(e,t,n)=>t===`is any of`?`Filter where ${e} is any of: ${n}`:`Filter where ${e} ${t} ${n}`,promptChangeSortDescription:(e,t)=>`Sort by ${e} (${t})`,promptChangePivotEnableLabel:`Pivot`,promptChangePivotEnableDescription:`Enable pivot`,promptChangePivotColumnsLabel:e=>`Columns (${e})`,promptChangePivotColumnsDescription:(e,t)=>`${e}${t?` (${t})`:``}`,promptChangePivotRowsLabel:e=>`Rows (${e})`,promptChangePivotValuesLabel:e=>`Values (${e})`,promptChangePivotValuesDescription:(e,t)=>`${e} (${t})`,promptChangeChartsLabel:(e,t)=>`Dimensions (${e}), Values (${t})`},QS=function(e){return e.DataGrid=`DataGrid`,e.DataGridPro=`DataGridPro`,e.DataGridPremium=`DataGridPremium`,e}({}),$S=1e3,eC=class{timeouts=new Map;cleanupTimeout=$S;constructor(e=$S){this.cleanupTimeout=e}register(e,t,n){this.timeouts||=new Map;let r=setTimeout(()=>{typeof t==`function`&&t(),this.timeouts.delete(n.cleanupToken)},this.cleanupTimeout);this.timeouts.set(n.cleanupToken,r)}unregister(e){let t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}reset(){this.timeouts&&=(this.timeouts.forEach((e,t)=>{this.unregister({cleanupToken:t})}),void 0)}},tC=class{registry=new FinalizationRegistry(e=>{typeof e==`function`&&e()});register(e,t,n){this.registry.register(e,t,n)}unregister(e){this.registry.unregister(e)}reset(){}},nC=class e{static create(){return new e}},rC={current:sC()},iC=0;function $(e,t,n,r){let i=G.useState(nC.create)[0],a=G.useRef(null),o=G.useRef(null);o.current=n;let s=G.useRef(null);!a.current&&o.current?(a.current=e.current.subscribeEvent(t,(e,t,n)=>{t&&!t.defaultMuiPrevented&&o.current?.(e,t,n)},r),iC+=1,s.current={cleanupToken:iC},rC.current.register(i,()=>{a.current?.(),a.current=null,s.current=null},s.current)):!o.current&&a.current&&(a.current(),a.current=null,s.current&&=(rC.current.unregister(s.current),null)),G.useEffect(()=>(!a.current&&o.current&&(a.current=e.current.subscribeEvent(t,(e,t,n)=>{t&&!t.defaultMuiPrevented&&o.current?.(e,t,n)},r)),s.current&&rC.current&&(rC.current.unregister(s.current),s.current=null),()=>{a.current?.(),a.current=null}),[e,t,r])}var aC={isFirst:!0};function oC(e,t,n){$(e,t,n,aC)}function sC(){return typeof FinalizationRegistry<`u`?new tC:new eC}var cC={compact:.7,comfortable:1.3,standard:1},lC=nS(e=>e.density),uC=Q(lC,e=>cC[e]);function dC(e){throw Error(dp(57))}var fC=[`id`,`value`,`formattedValue`,`api`,`field`,`row`,`rowNode`,`colDef`,`cellMode`,`isEditable`,`tabIndex`,`hasFocus`,`isValidating`,`debounceMs`,`isProcessingProps`,`onValueChange`,`slotProps`],pC=e=>{let{classes:t}=e;return g({root:[`editInputCell`]},zv,t)},mC=m(dC,{name:`MuiDataGrid`,slot:`EditInputCell`})({font:Y.typography.font.body,padding:`1px 0`,"& input":{padding:`0 16px`,height:`100%`}}),hC=H_((e,t)=>{let n=J(),{id:r,value:i,field:a,colDef:o,hasFocus:s,debounceMs:c=200,isProcessingProps:l,onValueChange:u,slotProps:d}=e,f=K(e,fC),p=Cv(),m=G.useRef(null),[g,_]=G.useState(i),v=pC(n),y=G.useCallback(async e=>{let t=e.target.value,n=p.current.getColumn(a),i=t;n?.valueParser&&(i=n.valueParser(t,p.current.getRow(r),n,p)),_(i),p.current.setEditCellValue({id:r,field:a,value:i,debounceMs:c,unstable_skipValueParser:!0},e),u&&await u(e,t)},[p,c,a,r,u]),b=p.current.unstable_getEditCellMeta(r,a);return G.useEffect(()=>{b?.changeReason!==`debouncedSetEditCellValue`&&_(i)},[b,i]),h(()=>{s&&m.current.focus()},[s]),(0,W.jsx)(mC,H({as:n.slots.baseInput,inputRef:m,className:v.root,ownerState:n,fullWidth:!0,type:o.type===`number`?o.type:`text`,value:g??``,onChange:y,endAdornment:l?(0,W.jsx)(n.slots.loadIcon,{fontSize:`small`,color:`action`}):void 0},f,d?.root,{ref:t}))}),gC=e=>(0,W.jsx)(hC,H({},e)),_C=(e,t)=>t&&e.length>1?[e[0]]:e,vC=(e,t)=>n=>H({},n,{sorting:H({},n.sorting,{sortModel:_C(e,t)})}),yC=e=>e===`desc`,bC=(e,t)=>{let n=t.current.getColumn(e.field);if(!n||e.sort===null)return null;let r;return r=n.getSortComparator?n.getSortComparator(e.sort):yC(e.sort)?(...e)=>-1*n.sortComparator(...e):n.sortComparator,r?{getSortCellParams:e=>({id:e,field:n.field,rowNode:SS(t,e),value:t.current.getCellValue(e,n.field),api:t.current}),comparator:r}:null},xC=(e,t,n)=>e.reduce((e,r,i)=>{if(e!==0)return e;let a=t.params[i],o=n.params[i];return e=r.comparator(a.value,o.value,a,o),e},0),SC=(e,t)=>{let n=e.map(e=>bC(e,t)).filter(e=>!!e);return n.length===0?null:e=>e.map(e=>({node:e,params:n.map(t=>t.getSortCellParams(e.id))})).sort((e,t)=>xC(n,e,t)).map(e=>e.node.id)},CC=(e,t)=>{let n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},wC=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,TC=new Intl.Collator,EC=(e,t)=>{let n=wC(e,t);return n===null?typeof e==`string`?TC.compare(e.toString(),t.toString()):e-t:n},DC=(e,t)=>{let n=wC(e,t);return n===null?Number(e)-Number(t):n},OC=(e,t)=>{let n=wC(e,t);return n===null?e>t?1:e{let i=jC(e.target.value);g(i);let a=H({},t,{value:r===`number`&&!Number.isNaN(Number(i))?Number(i):i,fromInput:y});if(x===0){n(a);return}v(!0),m.start(x,()=>{n(a),v(!1)})},[m,x,t,r,y,n]);return G.useEffect(()=>{(t.fromInput!==y||t.value==null)&&g(jC(t.value))},[y,t]),(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(b.slots.baseTextField,H({id:y,label:i.current.getLocaleText(`filterPanelInputLabel`),placeholder:i.current.getLocaleText(`filterPanelInputPlaceholder`),value:h??``,onChange:S,type:r||`text`,disabled:s,slotProps:H({},p?.slotProps,{input:H({endAdornment:_&&x>0?(0,W.jsx)(b.slots.loadIcon,{fontSize:`small`,color:`action`}):null},p?.slotProps?.input),htmlInput:H({tabIndex:o},p?.slotProps?.htmlInput)}),inputRef:a},b.slotProps?.baseTextField,f,p)),d,u]})}function jC(e){if(e!=null&&e!==``)return String(e)}function MC(e){return typeof e==`number`&&!Number.isNaN(e)}function NC(e){return typeof e==`function`}function PC(e){return typeof e==`object`&&!!e}function FC(){try{let e=`__some_random_key_you_are_not_going_to_use__`;return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function IC(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)}var LC=(e,t,n)=>Math.max(t,Math.min(n,e));function RC(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function zC(e){let t=RC(e);return(e,n)=>e+(n-e)*t()}function BC(e){return typeof structuredClone==`function`?structuredClone(e):JSON.parse(JSON.stringify(e))}var VC=(e,t)=>(...n)=>{e&&t(...n)},HC=[`item`,`applyValue`,`type`,`apiRef`,`focusElementRef`,`slotProps`,`disableDebounce`];function UC(e){let{item:t,applyValue:n,type:r,apiRef:i,focusElementRef:a,slotProps:o}=e,s=K(e,HC),c=_e(),[l,u]=G.useState([]),[d,f]=G.useState(t.value||[]),p=J();G.useEffect(()=>{let e=t.value??[];f(e.map(String))},[t.value]);let m=G.useCallback((e,i)=>{f(i.map(String)),n(H({},t,{value:[...i.map(e=>r===`number`?Number(e):e)]}))},[n,t,r]),h=G.useCallback((e,t)=>{u(t===``?[]:[t])},[u]),g=p.slots.baseAutocomplete;return(0,W.jsx)(g,H({multiple:!0,freeSolo:!0,options:l,id:c,value:d,onChange:m,onInputChange:h,label:i.current.getLocaleText(`filterPanelInputLabel`),placeholder:i.current.getLocaleText(`filterPanelInputPlaceholder`),slotProps:{textField:{type:r||`text`,inputRef:a}}},s,o?.root))}var WC=function(e){return e.Cell=`cell`,e.Row=`row`,e}(WC||{}),GC=function(e){return e.Edit=`edit`,e.View=`view`,e}(GC||{}),KC=function(e){return e.Edit=`edit`,e.View=`view`,e}(KC||{}),qC=function(e){return e.And=`and`,e.Or=`or`,e}(qC||{}),JC=class{constructor(e){this.data=e.ids}has(e){return this.data.has(e)}select(e){this.data.add(e)}unselect(e){this.data.delete(e)}},YC=class{constructor(e){this.data=e.ids}has(e){return!this.data.has(e)}select(e){this.data.delete(e)}unselect(e){this.data.add(e)}},XC=e=>e.type===`include`?new JC(e):new YC(e),ZC=function(e){return e.enterKeyDown=`enterKeyDown`,e.cellDoubleClick=`cellDoubleClick`,e.printableKeyDown=`printableKeyDown`,e.deleteKeyDown=`deleteKeyDown`,e.pasteKeyDown=`pasteKeyDown`,e}(ZC||{}),QC=function(e){return e.cellFocusOut=`cellFocusOut`,e.escapeKeyDown=`escapeKeyDown`,e.enterKeyDown=`enterKeyDown`,e.tabKeyDown=`tabKeyDown`,e.shiftTabKeyDown=`shiftTabKeyDown`,e}(QC||{}),$C=function(e){return e.enterKeyDown=`enterKeyDown`,e.cellDoubleClick=`cellDoubleClick`,e.printableKeyDown=`printableKeyDown`,e.deleteKeyDown=`deleteKeyDown`,e}($C||{}),ew=function(e){return e.rowFocusOut=`rowFocusOut`,e.escapeKeyDown=`escapeKeyDown`,e.enterKeyDown=`enterKeyDown`,e.tabKeyDown=`tabKeyDown`,e.shiftTabKeyDown=`shiftTabKeyDown`,e}(ew||{});function tw(e){return e.field!==void 0}var nw={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},rw=()=>({items:[],logicOperator:qC.And,quickFilterValues:[],quickFilterLogicOperator:qC.And});function iw(e){return{current:e.current.getPublicApi()}}var aw=function(e){return e.LEFT=`left`,e.RIGHT=`right`,e}({}),ow={left:[],right:[]},sw=nS(e=>e.props.listView??!1),cw=nS(e=>e.listViewColumn),lw=nS(e=>e.columns),uw=Q(lw,e=>e.orderedFields),dw=Q(lw,e=>e.lookup),fw=tS(uw,dw,(e,t)=>e.map(e=>t[e])),pw=Q(lw,e=>e.columnVisibilityModel),mw=Q(lw,e=>e.initialColumnVisibilityModel),hw=tS(fw,pw,sw,cw,(e,t,n,r)=>n&&r?[r]:e.filter(e=>t[e.field]!==!1)),gw=tS(hw,e=>e.map(e=>e.field)),_w=nS(e=>e.pinnedColumns);tS(_w,uw,(e,t)=>yw(e,t));var vw=tS(lw,_w,gw,sw,(e,t,n,r)=>{if(r)return ow;let i=yw(t,n);return{left:i.left.map(t=>e.lookup[t]),right:i.right.map(t=>e.lookup[t])}});function yw(e,t){if(!Array.isArray(e.left)&&!Array.isArray(e.right)||e.left?.length===0&&e.right?.length===0)return ow;let n=(e,t)=>Array.isArray(e)?e.filter(e=>t.includes(e)):[],r=n(e.left,t),i=t.filter(e=>!r.includes(e));return{left:r,right:n(e.right,i)}}var bw=tS(hw,e=>{let t=[],n=0;for(let r=0;re.filter(e=>e.filterable)),Sw=tS(fw,e=>e.reduce((e,t)=>(t.filterable&&(e[t.field]=t),e),{})),Cw=tS(fw,e=>e.some(e=>e.colSpan!==void 0)),ww=(e,t)=>{let n=[...e.items],r=n.findIndex(e=>e.id===t.id);return r===-1?n.push(t):n[r]=t,H({},e,{items:n})},Tw=(e,t)=>{let n=[...e.items];return t.forEach(e=>{let t=n.findIndex(t=>t.id===e.id);t===-1?n.push(e):n[t]=e}),H({},e,{items:n})},Ew=(e,t)=>{let n=e.items.filter(e=>e.id!==t.id);return n.length===e.items.length?e:H({},e,{items:n})},Dw=(e,t)=>e.logicOperator===t?e:H({},e,{logicOperator:t}),Ow;function kw(){if(Ow!==void 0)return Ow;try{Ow=Function(`return true`)()}catch{Ow=!1}return Ow}var Aw=(e,t)=>{let n=H({},e);if(n.id??=Math.round(Math.random()*1e5),n.operator==null){let e=dw(t)[n.field];n.operator=e&&e.filterOperators[0].value}return n},jw=(e,t,n)=>{let r=e.items.length>1,i;i=r&&t?[e.items[0]]:e.items;let a=r&&i.some(e=>e.id==null);return i.some(e=>e.operator==null)||a?H({},e,{items:i.map(e=>Aw(e,n))}):e.items===i?e:H({},e,{items:i})},Mw=(e,t,n)=>r=>H({},r,{filterModel:jw(e,t,n)}),Nw=e=>typeof e==`string`?e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``):e,Pw=(e,t,n)=>{if(!e.field||!e.operator)return null;let r=n.current.getColumn(e.field);if(!r)return null;let i;if(r.valueParser){let t=r.valueParser;i=Array.isArray(e.value)?e.value?.map(e=>t(e,void 0,r,n)):t(e.value,void 0,r,n)}else i=e.value;let{ignoreDiacritics:a}=n.current.rootProps;a&&(i=Nw(i));let o=H({},e,{value:i}),s=r.filterOperators;if(!s?.length)throw Error(dp(81,r.field));let c=s.find(e=>e.value===o.operator);if(!c)throw Error(dp(82,o.operator,r.field));let l=iw(n),u=c.getApplyFilterFn(o,r);return typeof u==`function`?{item:o,fn:e=>{let n=t(e,r);return a&&(n=Nw(n)),u(n,e,r,l)}}:null},Fw=1,Iw=(e,t,n,r)=>{let{items:i}=e,a=i.map(e=>Pw(e,t,n)).filter(e=>!!e);if(a.length===0)return null;if(r||!kw())return(e,t)=>{let n={};for(let r=0;r`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`).join(` +`)} + +const result$$ = { +${a.map((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t} ? false : appliers[${t}].fn(row),`).join(` +`)} +}; + +return result$$;`.replaceAll(`$$`,String(Fw)));return Fw+=1,(e,t)=>o(a,e,t)},Lw=e=>e.quickFilterExcludeHiddenColumns??!0,Rw=(e,t,n)=>{let r=e.quickFilterValues?.filter(Boolean)??[];if(r.length===0)return null;let i=uw(n),a=pw(n),o;o=Lw(e)?i.filter(e=>a[e]!==!1):i;let s=[],{ignoreDiacritics:c}=n.current.rootProps,l=iw(n);return o.forEach(e=>{let t=n.current.getColumn(e),i=t?.getApplyQuickFilterFn;i&&s.push({column:t,appliers:r.map(e=>{let n=c?Nw(e):e;return{fn:i(n,t,l)}})})}),function(e,n){let i={};outer:for(let a=0;a{let i=Iw(e,t,n,r),a=Rw(e,t,n);return function(e,t,n){n.passingFilterItems=i?.(e,t)??null,n.passingQuickFilterValues=a?.(e,t)??null}},Bw=e=>e!=null,Vw=(e,t,n,r)=>(e.cleanedFilterItems||=r.filter(e=>Pw(e,t,n)!==null),e.cleanedFilterItems),Hw=(e,t,n,r,i,a)=>{let o=Vw(a,r,i,n.items),s=e.filter(Bw),c=t.filter(Bw);if(s.length>0){let e=e=>s.some(t=>t[e.id]);if((n.logicOperator??rw().logicOperator)===qC.And){if(!o.every(e))return!1}else if(!o.some(e))return!1}if(c.length>0&&n.quickFilterValues!=null){let e=e=>c.some(t=>t[e]);if((n.quickFilterLogicOperator??rw().quickFilterLogicOperator)===qC.And){if(!n.quickFilterValues.every(e))return!1}else if(!n.quickFilterValues.some(e))return!1}return!0},Uw=e=>{if(!e)return null;let t=new RegExp(IC(e),`i`);return(e,n,r,i)=>{let a=i.current.getRowFormattedValue(n,r);return i.current.ignoreDiacritics&&(a=Nw(a)),a!=null&&t.test(a.toString())}},Ww=(e,t)=>n=>{if(!n.value)return null;let r=e?n.value:n.value.trim(),i=new RegExp(IC(r),`i`);return e=>{if(e==null)return t;let n=i.test(String(e));return t?!n:n}},Gw=(e,t)=>n=>{if(!n.value)return null;let r=e?n.value:n.value.trim(),i=new Intl.Collator(void 0,{sensitivity:`base`,usage:`search`});return e=>{if(e==null)return t;let n=i.compare(r,e.toString())===0;return t?!n:n}},Kw=e=>()=>t=>{let n=t===``||t==null;return e?!n:n},qw={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,chartable:!0,editable:!1,sortComparator:EC,type:`string`,align:`left`,filterOperators:((e=!1)=>[{value:`contains`,getApplyFilterFn:Ww(e,!1),InputComponent:AC},{value:`doesNotContain`,getApplyFilterFn:Ww(e,!0),InputComponent:AC},{value:`equals`,getApplyFilterFn:Gw(e,!1),InputComponent:AC},{value:`doesNotEqual`,getApplyFilterFn:Gw(e,!0),InputComponent:AC},{value:`startsWith`,getApplyFilterFn:t=>{if(!t.value)return null;let n=e?t.value:t.value.trim(),r=RegExp(`^${IC(n)}.*$`,`i`);return e=>e!=null&&r.test(e.toString())},InputComponent:AC},{value:`endsWith`,getApplyFilterFn:t=>{if(!t.value)return null;let n=e?t.value:t.value.trim(),r=RegExp(`.*${IC(n)}$`,`i`);return e=>e!=null&&r.test(e.toString())},InputComponent:AC},{value:`isEmpty`,getApplyFilterFn:Kw(!1),requiresFilterValue:!1},{value:`isNotEmpty`,getApplyFilterFn:Kw(!0),requiresFilterValue:!1},{value:`isAnyOf`,getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;let n=e?t.value:t.value.map(e=>e.trim()),r=new Intl.Collator(void 0,{sensitivity:`base`,usage:`search`});return e=>e!=null&&n.some(t=>r.compare(t,e.toString()||``)===0)},InputComponent:UC}])(),renderEditCell:gC,getApplyQuickFilterFn:Uw};function Jw(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Yw=e=>e.indexOf(`Arrow`)===0||e.indexOf(`Page`)===0||e===` `||e===`Home`||e===`End`,Xw=e=>!!e.key,Zw=e=>e===`Tab`||e===`Escape`;function Qw(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)===`V`&&!e.shiftKey&&!e.altKey}function $w(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)===`C`&&!e.shiftKey&&!e.altKey}var eT=G.createContext(void 0),tT=()=>{let e=G.useContext(eT);if(e===void 0)throw Error(dp(68));return e},nT=`MuiDataGridVariables`,rT=G.createContext({className:`unset`,tag:(0,W.jsx)(`style`,{href:`/unset`})});function iT(){return G.useContext(rT).className}function aT(){return G.useContext(rT)}function oT(e){let t=tT(),n=J(),r=t.hooks.useCSSVariables(),i=G.useMemo(()=>{let e=`${nT}-${r.id}`,t=`.${e}{${sT(r.variables)}}`;return{className:e,tag:(0,W.jsx)(`style`,{href:`/${e}`,nonce:n.nonce,children:t})}},[n.nonce,r]);return(0,W.jsx)(rT.Provider,{value:i,children:e.children})}function sT(e){let t=``;for(let n in e)Object.hasOwn(e,n)&&e[n]!==void 0&&(t+=`${n}:${e[n]};`);return t}var cT=[`open`,`target`,`onClose`,`children`,`position`,`className`,`onExited`],lT=e=>{let{classes:t}=e;return g({root:[`menu`]},zv,t)},uT=m(dC,{name:`MuiDataGrid`,slot:`Menu`})({zIndex:Y.zIndex.menu,[`& .${X.menuList}`]:{outline:0}});function dT(e){let{open:t,target:n,onClose:r,children:i,position:a,className:o,onExited:s}=e,c=K(e,cT),l=Cv(),u=J(),d=lT(u),f=iT(),p=G.useRef(null);return h(()=>{t?p.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(p.current?.focus?.(),p.current=null)},[t]),G.useEffect(()=>{let e=t?`menuOpen`:`menuClose`;l.current.publishEvent(e,{target:n})},[l,t,n]),(0,W.jsx)(uT,H({as:u.slots.basePopper,className:V(d.root,o,f),ownerState:u,open:t,target:n,transition:!0,placement:a,onClickAway:e=>{e.target&&(n===e.target||n?.contains(e.target))||r(e)},onExited:s,clickAwayMouseEvent:`onMouseDown`,onKeyDown:e=>{Zw(e.key)&&r(e)}},c,u.slotProps?.basePopper,{children:i}))}var fT=[`label`,`icon`,`showInMenu`,`onClick`],pT=[`label`,`icon`,`showInMenu`,`onClick`,`closeMenuOnClick`,`closeMenu`],mT=H_((e,t)=>{let n=J();if(!e.showInMenu){let{label:r,icon:i,onClick:a}=e,o=K(e,fT);return(0,W.jsx)(n.slots.baseIconButton,H({size:`small`,role:`menuitem`,"aria-label":r},o,{onClick:e=>{a?.(e)}},n.slotProps?.baseIconButton,{ref:t,children:G.cloneElement(i,{fontSize:`inherit`})}))}let{label:r,icon:i,onClick:a,closeMenuOnClick:o=!0,closeMenu:s}=e,c=K(e,pT);return(0,W.jsx)(n.slots.baseMenuItem,H({ref:t},c,{onClick:e=>{a?.(e),o&&s?.()},iconStart:i,children:r}))}),hT=[`api`,`colDef`,`id`,`hasFocus`,`isEditable`,`field`,`value`,`formattedValue`,`row`,`rowNode`,`cellMode`,`tabIndex`,`position`,`onMenuOpen`,`onMenuClose`,`children`,`suppressChildrenValidation`],gT=e=>typeof e.getActions==`function`;function _T(e){let{id:t,hasFocus:n,tabIndex:r,position:i=`bottom-end`,onMenuOpen:a,onMenuClose:o,children:s,suppressChildrenValidation:c}=e,l=K(e,hT),[u,d]=G.useState(-1),[f,p]=G.useState(!1),m=Cv(),h=G.useRef(null),g=G.useRef(null),_=G.useRef(!1),v=G.useRef({}),y=Ie(),b=_e(),x=_e(),S=J(),C=m.current.getRowParams(t),w=[];G.Children.forEach(s,e=>{G.isValidElement(e)&&(e.type===G.Fragment?G.Children.forEach(e.props.children,e=>{G.isValidElement(e)&&w.push(e)}):(e.type===mT||c)&&w.push(e))});let T=w.filter(e=>!e.props.showInMenu),E=w.filter(e=>e.props.showInMenu),D=T.length+ +!!E.length;G.useLayoutEffect(()=>{n||Object.entries(v.current).forEach(([e,t])=>{t?.stop({},()=>{delete v.current[e]})})},[n]),G.useEffect(()=>{u<0||!h.current||u>=h.current.children.length||h.current.children[u].focus({preventScroll:!0})},[u]);let O=w.findIndex(e=>!e.props.disabled);G.useEffect(()=>{n&&u===-1&&d(O),n||(d(-1),_.current=!1)},[n,u,O]),G.useEffect(()=>{u>=D&&d(D-1)},[u,D]);let k=e=>{a&&!a(C,e)||(p(!0),d(D-1),_.current=!0)},A=e=>{o&&!o(C,e)||p(!1)},j=e=>{e.stopPropagation(),e.preventDefault(),f?A(e):k(e)},M=e=>t=>{v.current[e]=t},N=(e,t)=>n=>{d(e),_.current=!0,t&&t(n)},P=D>0?{role:`menu`,onKeyDown:e=>{if(D<=1)return;let t=(e,n)=>{if(e<0||e>w.length)return e;let r=(n===`left`?-1:1)*(y?-1:1);return w[e+r]?.props.disabled?t(e+r,n):e+r},n=u;e.key===`ArrowRight`?n=t(u,`right`):e.key===`ArrowLeft`&&(n=t(u,`left`)),!(n<0||n>=D)&&n!==u&&(e.preventDefault(),e.stopPropagation(),d(n))}}:void 0;return(0,W.jsxs)(`div`,H({ref:h,tabIndex:-1,className:X.actionsCell},P,l,{children:[T.map((e,t)=>G.cloneElement(e,{key:t,touchRippleRef:M(t),onClick:N(t,e.props.onClick),tabIndex:u===t?r:-1})),E.length>0&&x&&(0,W.jsx)(S.slots.baseIconButton,H({ref:g,id:x,"aria-label":m.current.getLocaleText(`actionsCellMore`),"aria-haspopup":`menu`,"aria-expanded":f,"aria-controls":f?b:void 0,role:`menuitem`,size:`small`,onClick:j,touchRippleRef:M(x),tabIndex:u===T.length?r:-1},S.slotProps?.baseIconButton,{children:(0,W.jsx)(S.slots.moreActionsIcon,{fontSize:`small`})})),E.length>0&&(0,W.jsx)(dT,{open:f,target:g.current,position:i,onClose:A,children:(0,W.jsx)(S.slots.baseMenuList,{id:b,className:X.menuList,"aria-labelledby":x,autoFocusItem:!0,children:E.map((e,t)=>G.cloneElement(e,{key:t,closeMenu:A}))})})]}))}function vT(e){let{colDef:t,id:n}=e,r=Cv();if(!gT(t))throw Error(dp(60));let i=t.getActions(r.current.getRowParams(n));return(0,W.jsx)(_T,H({suppressChildrenValidation:!0},e,{children:i}))}var yT=e=>(0,W.jsx)(vT,H({},e)),bT=`actions`,xT=H({},qw,{sortable:!1,filterable:!1,aggregable:!1,chartable:!1,width:100,display:`flex`,align:`center`,headerAlign:`center`,headerName:``,disableColumnMenu:!0,disableExport:!0,renderCell:yT,getApplyQuickFilterFn:()=>null}),ST=function(e){return e[e.NONE=0]=`NONE`,e[e.LEFT=1]=`LEFT`,e[e.RIGHT=2]=`RIGHT`,e[e.VIRTUAL=3]=`VIRTUAL`,e}({}),CT=[`formattedValue`,`colDef`,`cellMode`,`row`,`api`,`id`,`value`,`rowNode`,`field`,`hasFocus`,`tabIndex`,`isEditable`],wT=m(`div`,{name:`MuiDataGrid`,slot:`FooterCell`})({fontWeight:Y.typography.fontWeight.medium,color:Y.colors.foreground.accent}),TT=e=>{let{classes:t}=e;return g({root:[`footerCell`]},zv,t)};function ET(e){let{formattedValue:t}=e,n=K(e,CT),r={classes:J().classes},i=TT(r);return(0,W.jsx)(wT,H({ownerState:r,className:i.root},n,{children:t}))}var DT=G.memo(ET),OT=[`id`,`value`,`formattedValue`,`api`,`field`,`row`,`rowNode`,`colDef`,`cellMode`,`isEditable`,`hasFocus`,`tabIndex`,`hideDescendantCount`],kT=e=>{let{classes:t}=e;return g({root:[`booleanCell`]},zv,t)};function AT(e){let{value:t,rowNode:n}=e,r=K(e,OT),i=Cv(),a=J(),o=kT({classes:a.classes}),s=Z(i,ES)>0&&n.type===`group`&&a.treeData===!1,c=G.useMemo(()=>t?a.slots.booleanCellTrueIcon:a.slots.booleanCellFalseIcon,[a.slots.booleanCellFalseIcon,a.slots.booleanCellTrueIcon,t]);return s&&t===void 0?null:(0,W.jsx)(c,H({fontSize:`small`,className:o.root,titleAccess:i.current.getLocaleText(t?`booleanCellTrueLabel`:`booleanCellFalseLabel`),"data-value":!!t},r))}var jT=G.memo(AT),MT=e=>{if(e.field!==`__row_group_by_columns_group__`&&VS(e.rowNode)){let t=e.aggregation;return t?t.position===`footer`?(0,W.jsx)(DT,H({},e)):e.formattedValue:``}return(0,W.jsx)(jT,H({},e))},NT=[`id`,`value`,`formattedValue`,`api`,`field`,`row`,`rowNode`,`colDef`,`cellMode`,`isEditable`,`tabIndex`,`className`,`hasFocus`,`isValidating`,`isProcessingProps`,`error`,`onValueChange`],PT=e=>{let{classes:t}=e;return g({root:[`editBooleanCell`]},zv,t)};function FT(e){let{id:t,value:n,field:r,className:i,hasFocus:a,onValueChange:o}=e,s=K(e,NT),c=Cv(),l=G.useRef(null),u=_e(),[d,f]=G.useState(n),p=J(),m=PT({classes:p.classes}),g=G.useCallback(async e=>{let n=e.target.checked;o&&await o(e,n),f(n),await c.current.setEditCellValue({id:t,field:r,value:n},e)},[c,r,t,o]);return G.useEffect(()=>{f(n)},[n]),h(()=>{a&&l.current.focus()},[a]),(0,W.jsx)(`label`,H({htmlFor:u,className:V(m.root,i)},s,{children:(0,W.jsx)(p.slots.baseCheckbox,H({id:u,inputRef:l,checked:!!d,onChange:g,size:`small`},p.slotProps?.baseCheckbox))}))}var IT=e=>(0,W.jsx)(FT,H({},e)),LT=[`item`,`applyValue`,`apiRef`,`focusElementRef`,`isFilterActive`,`headerFilterMenu`,`clearButton`,`tabIndex`,`slotProps`,`disableDebounce`];function RT(e){let{item:t,applyValue:n,apiRef:r,focusElementRef:i,headerFilterMenu:a,clearButton:o,tabIndex:s,slotProps:c}=e,l=K(e,LT),[u,d]=G.useState(zT(t.value)),f=J(),p=_e(),m=_e(),h=f.slotProps?.baseSelect||{},g=h.native??!1,_=f.slotProps?.baseSelectOption||{},v=G.useCallback(e=>{let r=zT(e.target.value);d(r),n(H({},t,{value:r}))},[n,t]);G.useEffect(()=>{d(zT(t.value))},[t.value]);let y=c?.root.label??r.current.getLocaleText(`filterPanelInputLabel`),b=c?.root.slotProps;return(0,W.jsxs)(G.Fragment,{children:[(0,W.jsxs)(f.slots.baseSelect,H({fullWidth:!0,labelId:p,id:m,label:y,value:u===void 0?``:String(u),onChange:v,native:g,slotProps:{htmlInput:H({ref:i,tabIndex:s},b?.htmlInput)}},h,l,c?.root,{children:[(0,W.jsx)(f.slots.baseSelectOption,H({},_,{native:g,value:``,children:r.current.getLocaleText(`filterValueAny`)})),(0,W.jsx)(f.slots.baseSelectOption,H({},_,{native:g,value:`true`,children:r.current.getLocaleText(`filterValueTrue`)})),(0,W.jsx)(f.slots.baseSelectOption,H({},_,{native:g,value:`false`,children:r.current.getLocaleText(`filterValueFalse`)}))]})),a,o]})}function zT(e){if(String(e).toLowerCase()===`true`)return!0;if(String(e).toLowerCase()===`false`)return!1}var BT=()=>[{value:`is`,getApplyFilterFn:e=>{let t=zT(e.value);return t===void 0?null:e=>!!e===t},InputComponent:RT}],VT=(e,t,n,r)=>e?r.current.getLocaleText(`booleanCellTrueLabel`):r.current.getLocaleText(`booleanCellFalseLabel`),HT=e=>{switch(e.toLowerCase().trim()){case`true`:case`yes`:case`1`:return!0;case`false`:case`no`:case`0`:case`null`:case`undefined`:return!1;default:return}},UT=H({},qw,{type:`boolean`,display:`flex`,align:`center`,headerAlign:`center`,renderCell:MT,renderEditCell:IT,sortComparator:DC,valueFormatter:VT,filterOperators:BT(),getApplyQuickFilterFn:()=>null,chartable:!1,pastedValueParser:e=>HT(e)});function WT(e){for(let t in e)return!1;return!0}var GT=nS(e=>e.sorting),KT=Q(GT,e=>e.sortedRows),qT=tS(KT,bS,xS,(e,t,n)=>e.reduce((e,r)=>{let i=t[r];if(i)e.push({id:r,model:i});else{let t=n[r];t&&VS(t)&&e.push({id:r,model:{[MS]:r}})}return e},[])),JT=Q(GT,e=>e.sortModel),YT=tS(JT,e=>e.reduce((t,n,r)=>(t[n.field]={sortDirection:n.sort,sortIndex:e.length>1?r+1:void 0},t),{}));tS(KT,e=>e.reduce((e,t,n)=>(e[t]=n,e),Object.create(null)));var XT=nS(e=>e.filter),ZT=Q(XT,e=>e.filterModel),QT=Q(ZT,e=>e.quickFilterValues),$T=nS(e=>e.visibleRowsLookup),eE=Q(XT,e=>e.filteredRowsLookup);Q(XT,e=>e.filteredChildrenCountLookup),Q(XT,e=>e.filteredDescendantCountLookup);var tE=tS($T,qT,(e,t)=>WT(e)?t:t.filter(t=>e[t.id]!==!1)),nE=tS(tE,e=>e.map(e=>e.id)),rE=tS(eE,qT,(e,t)=>WT(e)?t:t.filter(t=>e[t.id]!==!1)),iE=tS(rE,e=>e.map(e=>e.id));tS(nE,xS,(e,t)=>{let n={},r=0;return e.reduce((e,i)=>{let a=t[i];return n[a.depth]||(n[a.depth]=0),a.depth>r&&(n[a.depth]=0),r=a.depth,n[a.depth]+=1,e[i]=n[a.depth],e},{})});var aE=Q(tS(rE,xS,ES,(e,t,n)=>n<2?[e]:e.reduce((e,n)=>{let r=t[n.id]?.depth;return r===void 0?e:(e[r]||(e[r]=[]),e[r].push(n),e)},[[]])),e=>e[0]??[]),oE=Q(tE,e=>e.length),sE=Q(aE,e=>e.length),cE=Q(rE,e=>e.length);Q(cE,sE,(e,t)=>e-t);var lE=tS(ZT,dw,(e,t)=>e.items?.filter(e=>{if(!e.field)return!1;let n=t[e.field];if(!n?.filterOperators||n?.filterOperators?.length===0)return!1;let r=n.filterOperators.find(t=>t.value===e.operator);if(!r)return!1;let i=Array.isArray(e.value)?e.value.length>0:e.value!=null&&e.value?.toString()!==``;return!r.InputComponent||i})),uE=tS(lE,e=>e.reduce((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e),{})),dE=tS(nE,e=>e.reduce((e,t,n)=>(e[t]=n,e),Object.create(null))),fE=nS(e=>e.rowSelection),pE=tS(fE,XC),mE=Q(fE,cE,(e,t)=>e.type===`include`?e.ids.size:t-e.ids.size),hE=tS(fE,bS,DS,(e,t,n)=>{let r=new Map;if(e.type===`include`)for(let n of e.ids)r.set(n,t[n]);else for(let i=0;iMS in t?t[MS]:e.props.getRowId?e.props.getRowId(t):t.id),_E=nS(e=>e.props.isRowSelectable);function vE(e,t){let n=xS(e),r=KT(e),i=eE(e),a=n[t];if(!a||a.type!==`group`)return[];let o=[],s=r.findIndex(e=>e===t)+1;for(let t=s;ta.depth;t+=1){let n=r[t];i[n]!==!1&&e.current.isRowSelectable(n)&&o.push(n)}return o}var yE=Q(fw,xS,eE,pE,bS,_E,(e,t,n,r,i,a,{groupId:o,autoSelectParents:s})=>{let c=t[o],l={id:o,row:i[o],columns:e},u=!0;if(typeof a==`function`&&i[o]&&(u=a(l)),!c||c.type!==`group`||r.has(o))return{isIndeterminate:!1,isChecked:r.has(o),isSelectable:u};let d=!1,f=!1,p=o=>{if(n[o]===!1||d&&f)return;let s=t[o];s?.type===`group`&&s.children.forEach(p);let c={id:o,row:i[o],columns:e};(!(typeof a==`function`&&i[o])||a(c))&&(r.has(o)?d=!0:f=!0)};return p(o),{isIndeterminate:d&&f,isChecked:s?d&&!f:!1,isSelectable:u}});function bE(e){return e.signature===QS.DataGrid?e.checkboxSelection&&e.disableMultipleRowSelection!==!0:!e.disableMultipleRowSelection}var xE=(e,t)=>{let n=[],r=t;for(;r!=null&&r!==jS;){let t=e[r];if(!t)return n;n.push(r),r=t.parent}return n},SE=(e,t,n)=>{let r=e[n];if(!r)return[];let i=r.parent;return i==null?[]:e[i].children.filter(e=>e!==n&&t[e]!==!1)},CE=(e,t,n,r,i,a,o=pE(e))=>{let s=eE(e),c=new Set([]);if(!(!r&&!i||s[n]===!1)&&(r&&t[n]?.type===`group`&&vE(e,n).forEach(e=>{a(e),c.add(e)}),i)){let r=n=>{let i=t[n];return i?i.type===`group`?o.has(n)||c.has(n)?!0:i.children.every(r):!e.current.isRowSelectable(n)||o.has(n)||c.has(n):!1},i=n=>{let o=SE(t,s,n),l=o.every(t=>!e.current.isRowSelectable(t)||r(t));if(o.length===0||l){let r=t[n]?.parent;r!=null&&r!==jS&&e.current.isRowSelectable(r)&&(a(r),c.add(r),i(r))}},l=t[n];if(!l||l.parent===jS)return;i(n)}},wE=(e,t,n,r,i,a)=>{let o=pE(e);!i&&!r||(i&&xE(t,n).forEach(e=>{o.has(e)&&a(e)}),r&&t[n]?.type===`group`&&vE(e,n).forEach(e=>{a(e)}))},TE=[`field`,`id`,`formattedValue`,`row`,`rowNode`,`colDef`,`isEditable`,`cellMode`,`hasFocus`,`tabIndex`,`api`],EE=e=>{let{classes:t}=e;return g({root:[`checkboxInput`]},zv,t)},DE=H_(function(e,t){let{field:n,id:r,rowNode:i,tabIndex:a}=e,o=K(e,TE),s=Cv(),c=J(),l=EE({classes:c.classes}),{isIndeterminate:u,isChecked:d,isSelectable:f}=Z(s,yE,{groupId:r,autoSelectParents:c.rowSelectionPropagation?.parents??!1},Hv),p=!f,m=e=>{if(p)return;let t={value:e.target.checked,id:r};s.current.publishEvent(`rowSelectionCheckboxChange`,t,e)};G.useLayoutEffect(()=>{if(a===0&&!p){let e=s.current.getCellElement(r,n);e&&(e.tabIndex=-1)}},[s,a,r,n,p]);let h=D(e=>{e.key===` `&&e.stopPropagation()}),g=D(e=>{if(p){e.preventDefault();return}}),_=D(()=>{});if(i.type===`footer`||i.type===`pinnedRow`)return null;let v=s.current.getLocaleText(d&&!u?`checkboxSelectionUnselectRow`:`checkboxSelectionSelectRow`);return(0,W.jsx)(c.slots.rowCheckbox,H({rowId:r,tabIndex:p?-1:a,checked:d&&!u,onChange:m,onClick:g,onMouseDown:_,className:V(l.root,p&&`Mui-disabled`),disabled:p,slotProps:{htmlInput:{"aria-disabled":p||void 0,"aria-label":v,name:`select_row`}},onKeyDown:h,indeterminate:u},c.slotProps?.rowCheckbox,o,{ref:t}))}),OE=nS(e=>e.focus),kE=Q(OE,e=>e.cell),AE=Q(OE,e=>e.columnHeader);Q(OE,e=>e.columnHeaderFilter);var jE=Q(OE,e=>e.columnGroupHeader),ME=nS(e=>e.tabIndex),NE=Q(ME,e=>e.cell),PE=Q(ME,e=>e.columnHeader);Q(ME,e=>e.columnHeaderFilter);var FE=Q(ME,e=>e.columnGroupHeader),IE=100,LE=e=>e?0:100,RE=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):e===-1||e==null?n+2:0,zE=e=>({page:0,pageSize:e?0:100}),BE=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),VE=(e,t)=>{if(t===QS.DataGrid&&e>IE)throw Error(dp(83))},HE=-1,UE=nS(e=>e.pagination),WE=Q(UE,e=>e.enabled&&e.paginationMode===`client`),GE=Q(UE,e=>e.paginationModel),KE=Q(UE,e=>e.rowCount),qE=Q(UE,e=>e.meta),JE=Q(GE,e=>e.page),YE=Q(GE,e=>e.pageSize),XE=Q(GE,KE,(e,t)=>RE(t,e.pageSize,e.page)),ZE=tS(WE,GE,xS,ES,tE,aE,(e,t,n,r,i,a)=>{if(!e||!i||i.length===0)return null;let o=a.length,s=Math.min(t.pageSize*t.page,o-1),c=t.pageSize===HE?o-1:Math.min(s+t.pageSize-1,o-1);if(s===-1||c===-1)return null;if(r<2)return{firstRowIndex:s,lastRowIndex:c};let l=a[s],u=c-s+1,d=i.findIndex(e=>e.id===l.id),f=d,p=0;for(;f0)&&(f+=1),e===0&&(p+=1))}return{firstRowIndex:d,lastRowIndex:f-1}}),QE=tS(tE,ZE,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),$E=tS(nE,ZE,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),eD=tS(WE,ZE,QE,tE,(e,t,n,r)=>e?{rows:n,range:t,rowIdToIndexMap:n.reduce((e,t,n)=>(e.set(t.id,n),e),new Map)}:{rows:r,range:r.length===0?null:{firstRowIndex:0,lastRowIndex:r.length-1},rowIdToIndexMap:r.reduce((e,t,n)=>(e.set(t.id,n),e),new Map)}),tD=[`field`,`colDef`],nD=e=>{let{classes:t}=e;return g({root:[`checkboxInput`]},zv,t)},rD=H_(function(e,t){let n=K(e,tD),[,r]=G.useState(!1),i=Cv(),a=J(),o=nD({classes:a.classes}),s=Z(i,PE),c=Z(i,fE),l=Z(i,nE),u=Z(i,$E),d=G.useMemo(()=>{let e=a.isRowSelectable;if(typeof e!=`function`||c.type===`exclude`)return c;let t={type:`include`,ids:new Set};for(let n of c.ids)a.keepNonExistentRowsSelected&&t.ids.add(n),i.current.getRow(n)&&e(i.current.getRowParams(n))&&t.ids.add(n);return t},[i,a.isRowSelectable,a.keepNonExistentRowsSelected,c]),f=G.useMemo(()=>{let e=!a.pagination||!a.checkboxSelectionVisibleOnly||a.paginationMode===`server`?l:u,t=new Set;for(let n=0;n{let e=XC(d),t=0;for(let n of f)e.has(n)&&(t+=1);return t},[d,f]),m=G.useMemo(()=>{if(p===0)return!1;let e=XC(d);for(let t of f)if(!e.has(t))return!0;return!1},[p,d,f]),g=p>0,_=e=>{let t={value:e.target.checked};i.current.publishEvent(`headerSelectionCheckboxChange`,t)},v=bE(a),y=s!==null&&s.field===e.field&&v?0:-1;h(()=>{let t=i.current.getColumnHeaderElement(e.field);y===0&&t&&v&&(t.tabIndex=-1)},[y,i,e.field,v]);let b=G.useCallback(e=>{e.key===` `&&i.current.publishEvent(`headerSelectionCheckboxChange`,{value:!g})},[i,g]),x=G.useCallback(()=>{r(e=>!e)},[]);G.useEffect(()=>i.current.subscribeEvent(`rowSelectionChange`,x),[i,x]);let S=i.current.getLocaleText(g&&!m?`checkboxSelectionUnselectAllRows`:`checkboxSelectionSelectAllRows`);return(0,W.jsx)(a.slots.baseCheckbox,H({indeterminate:m,checked:g&&!m,onChange:_,className:o.root,slotProps:{htmlInput:{"aria-label":S,name:`select_all_rows`}},tabIndex:y,onKeyDown:b,disabled:!v},a.slotProps?.baseCheckbox,n,{ref:t}))}),iD=`__check__`,aD=H({},UT,{type:`custom`,field:iD,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,chartable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:()=>null,display:`flex`,valueGetter:(e,t,n,r)=>{let i=gE(r,t);return r.current.isRowSelected(i)},rowSpanValueGetter:(e,t,n,r)=>gE(r,t),renderHeader:e=>(0,W.jsx)(rD,H({},e)),renderCell:e=>(0,W.jsx)(DE,H({},e))}),oD=[`item`,`applyValue`,`type`,`apiRef`,`focusElementRef`,`slotProps`,`isFilterActive`,`headerFilterMenu`,`clearButton`,`tabIndex`,`disabled`,`disableDebounce`];function sD(e,t){if(e==null)return``;let n=new Date(e);return Number.isNaN(n.getTime())?``:t===`date`?n.toISOString().substring(0,10):t===`datetime-local`?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function cD(e){let{item:t,applyValue:n,type:r,apiRef:i,focusElementRef:a,slotProps:o,headerFilterMenu:s,clearButton:c,tabIndex:l,disabled:u,disableDebounce:d=!1}=e,f=K(e,oD),p=o?.root.slotProps,m=L(),[h,g]=G.useState(()=>sD(t.value,r)),[_,v]=G.useState(!1),y=_e(),b=J(),x=d?0:b.filterDebounceMs,S=G.useCallback(e=>{m.clear();let r=e.target.value;g(r);let i=new Date(r),a=H({},t,{value:Number.isNaN(i.getTime())?void 0:i});if(x===0){n(a);return}v(!0),m.start(x,()=>{n(a),v(!1)})},[n,t,x,m]);return G.useEffect(()=>{let e=sD(t.value,r);g(e)},[t.value,r]),(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(b.slots.baseTextField,H({fullWidth:!0,id:y,label:i.current.getLocaleText(`filterPanelInputLabel`),placeholder:i.current.getLocaleText(`filterPanelInputPlaceholder`),value:h,onChange:S,type:r||`text`,disabled:u,inputRef:a,slotProps:H({},p,{input:H({endAdornment:_&&x>0?(0,W.jsx)(b.slots.loadIcon,{fontSize:`small`,color:`action`}):null},p?.input),htmlInput:H({max:r===`datetime-local`?`9999-12-31T23:59`:`9999-12-31`,tabIndex:l},p?.htmlInput)})},b.slotProps?.baseTextField,f,o?.root)),s,c]})}function lD(e,t,n,r){if(!e.value)return null;let i=new Date(e.value);n?i.setSeconds(0,0):(i.setMinutes(i.getMinutes()+i.getTimezoneOffset()),i.setHours(0,0,0,0));let a=i.getTime();return e=>{if(!e)return!1;if(r)return t(e.getTime(),a);let i=new Date(e);return n?i.setSeconds(0,0):i.setHours(0,0,0,0),t(i.getTime(),a)}}var uD=e=>[{value:`is`,getApplyFilterFn:t=>lD(t,(e,t)=>e===t,e),InputComponent:cD,InputComponentProps:{type:e?`datetime-local`:`date`}},{value:`not`,getApplyFilterFn:t=>lD(t,(e,t)=>e!==t,e),InputComponent:cD,InputComponentProps:{type:e?`datetime-local`:`date`}},{value:`after`,getApplyFilterFn:t=>lD(t,(e,t)=>e>t,e,e),InputComponent:cD,InputComponentProps:{type:e?`datetime-local`:`date`}},{value:`onOrAfter`,getApplyFilterFn:t=>lD(t,(e,t)=>e>=t,e,e),InputComponent:cD,InputComponentProps:{type:e?`datetime-local`:`date`}},{value:`before`,getApplyFilterFn:t=>lD(t,(e,t)=>elD(t,(e,t)=>e<=t,e,e),InputComponent:cD,InputComponentProps:{type:e?`datetime-local`:`date`}},{value:`isEmpty`,getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:`isNotEmpty`,getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1}],dD=[`id`,`value`,`formattedValue`,`api`,`field`,`row`,`rowNode`,`colDef`,`cellMode`,`isEditable`,`tabIndex`,`hasFocus`,`inputProps`,`isValidating`,`isProcessingProps`,`onValueChange`,`slotProps`],fD=m(dC,{slot:`internal`})({fontSize:`inherit`}),pD=e=>{let{classes:t}=e;return g({root:[`editInputCell`]},zv,t)};function mD(e){let{id:t,value:n,field:r,colDef:i,hasFocus:a,onValueChange:o,slotProps:s}=e,c=K(e,dD),l=i.type===`dateTime`,u=Cv(),d=G.useRef(null),f=G.useMemo(()=>{let e;e=n==null?null:n instanceof Date?n:new Date((n??``).toString());let t;return t=e==null||Number.isNaN(e.getTime())?``:new Date(e.getTime()-e.getTimezoneOffset()*60*1e3).toISOString().substr(0,l?16:10),{parsed:e,formatted:t}},[n,l]),[p,m]=G.useState(f),g=J(),_=pD({classes:g.classes}),v=G.useCallback(e=>{if(e===``)return null;let[t,n]=e.split(`T`),[r,i,a]=t.split(`-`),o=new Date;if(o.setFullYear(Number(r),Number(i)-1,Number(a)),o.setHours(0,0,0,0),n){let[e,t]=n.split(`:`);o.setHours(Number(e),Number(t),0,0)}return o},[]),y=G.useCallback(async e=>{let n=e.target.value,i=v(n);o&&await o(e,i),m({parsed:i,formatted:n}),u.current.setEditCellValue({id:t,field:r,value:i},e)},[u,r,t,o,v]);return G.useEffect(()=>{m(e=>f.parsed!==e.parsed&&f.parsed?.getTime()!==e.parsed?.getTime()?f:e)},[f]),h(()=>{a&&d.current.focus()},[a]),(0,W.jsx)(fD,H({as:g.slots.baseInput,inputRef:d,fullWidth:!0,className:_.root,type:l?`datetime-local`:`date`,value:p.formatted,onChange:y},c,s?.root,{slotProps:{htmlInput:H({max:l?`9999-12-31T23:59`:`9999-12-31`},s?.root?.slotProps?.htmlInput)}}))}var hD=e=>(0,W.jsx)(mD,H({},e));function gD({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw Error(dp(54,t,typeof e,n,r))}var _D=(e,t,n,r)=>{if(!e)return``;let i=gE(r,t);return BS(t)&&!(e instanceof Date)?e:(gD({value:e,columnType:`date`,rowId:i,field:n.field}),e.toLocaleDateString())},vD=(e,t,n,r)=>{if(!e)return``;let i=gE(r,t);return BS(t)&&!(e instanceof Date)?e:(gD({value:e,columnType:`dateTime`,rowId:i,field:n.field}),e.toLocaleString())},yD=H({},qw,{type:`date`,sortComparator:OC,valueFormatter:_D,filterOperators:uD(),renderEditCell:hD,pastedValueParser:e=>new Date(e)}),bD=H({},qw,{type:`dateTime`,sortComparator:OC,valueFormatter:vD,filterOperators:uD(!0),renderEditCell:hD,pastedValueParser:e=>new Date(e)}),xD=e=>e==null?null:Number(e),SD=H({},qw,{type:`number`,align:`right`,headerAlign:`right`,sortComparator:DC,valueParser:e=>e===``?null:Number(e),valueFormatter:e=>MC(e)?e.toLocaleString():e||``,filterOperators:[{value:`=`,getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>xD(t)===e.value,InputComponent:AC,InputComponentProps:{type:`number`}},{value:`!=`,getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>xD(t)!==e.value,InputComponent:AC,InputComponentProps:{type:`number`}},{value:`>`,getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t!=null&&xD(t)>e.value,InputComponent:AC,InputComponentProps:{type:`number`}},{value:`>=`,getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t!=null&&xD(t)>=e.value,InputComponent:AC,InputComponentProps:{type:`number`}},{value:`<`,getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t!=null&&xD(t)e.value==null||Number.isNaN(e.value)?null:t=>t!=null&&xD(t)<=e.value,InputComponent:AC,InputComponentProps:{type:`number`}},{value:`isEmpty`,getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:`isNotEmpty`,getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1},{value:`isAnyOf`,getApplyFilterFn:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:UC,InputComponentProps:{type:`number`}}],getApplyQuickFilterFn:e=>e==null||Number.isNaN(e)||e===``?null:t=>xD(t)===xD(e)});function CD(e){return e?.type===`singleSelect`}function wD(e,t){if(e)return typeof e.valueOptions==`function`?e.valueOptions(H({field:e.field},t)):e.valueOptions}function TD(e,t,n){if(t!==void 0)return n(t.find(t=>{let r=n(t);return String(r)===String(e)}))}var ED=[`id`,`value`,`formattedValue`,`api`,`field`,`row`,`rowNode`,`colDef`,`cellMode`,`isEditable`,`tabIndex`,`className`,`hasFocus`,`isValidating`,`isProcessingProps`,`error`,`onValueChange`,`initialOpen`,`slotProps`];function DD(e){return`key`in e&&!!e.key}function OD(e){let t=J(),{id:n,value:r,field:i,row:a,colDef:o,hasFocus:s,error:c,onValueChange:l,initialOpen:u=t.editMode===WC.Cell,slotProps:d}=e,f=K(e,ED),p=Cv(),m=G.useRef(null),g=G.useRef(null),[_,v]=G.useState(u),y=(t.slotProps?.baseSelect||{}).native??!1;if(h(()=>{s&&g.current?.focus()},[s]),!CD(o))return null;let b=wD(o,{id:n,row:a});if(!b)return null;let x=o.getOptionValue,S=o.getOptionLabel;return!b||!o?null:(0,W.jsx)(t.slots.baseSelect,H({ref:m,value:r,onChange:async e=>{if(!CD(o)||!b)return;v(!1);let t=e.target,r=TD(t.value,b,x);l&&await l(e,r),await p.current.setEditCellValue({id:n,field:i,value:r},e)},open:_,onOpen:e=>{DD(e)&&e.key===`Enter`||v(!0)},onClose:(e,r)=>{if(t.editMode===WC.Row){v(!1);return}if(r===`backdropClick`||e.key===`Escape`){let t=p.current.getCellParams(n,i);p.current.publishEvent(`cellEditStop`,H({},t,{reason:e.key===`Escape`?QC.escapeKeyDown:QC.cellFocusOut}))}},error:c,native:y,fullWidth:!0,slotProps:{htmlInput:{ref:g}}},f,d?.root,t.slotProps?.baseSelect,{children:b.map(e=>{let n=x(e);return(0,G.createElement)(t.slots.baseSelectOption,H({},t.slotProps?.baseSelectOption||{},{native:y,key:n,value:n}),S(e))})}))}var kD=e=>(0,W.jsx)(OD,H({},e)),AD=[`item`,`applyValue`,`type`,`apiRef`,`focusElementRef`,`tabIndex`,`isFilterActive`,`clearButton`,`headerFilterMenu`,`slotProps`,`disableDebounce`],jD=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:r,isSelectNative:i,baseSelectOptionProps:a})=>[``,...wD(e)||[]].map(e=>{let o=r(e),s=n(e);return s===``&&(s=` `),(0,G.createElement)(t,H({},a,{native:i,key:o,value:o}),s)});function MD(e){let{item:t,applyValue:n,type:r,apiRef:i,focusElementRef:a,tabIndex:o,clearButton:s,headerFilterMenu:c,slotProps:l}=e,u=K(e,AD),d=t.value??``,f=_e(),p=_e(),m=J(),h=m.slotProps?.baseSelect?.native??!1,g=i.current.getColumn(t.field),_=g.getOptionValue,v=g.getOptionLabel,y=G.useMemo(()=>wD(g),[g]),b=G.useCallback(e=>{let r=TD(e.target.value,y,_);n(H({},t,{value:r}))},[y,_,n,t]);if(!g||!CD(g))return null;let x=l?.root.label??i.current.getLocaleText(`filterPanelInputLabel`);return(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(m.slots.baseSelect,H({fullWidth:!0,id:f,label:x,labelId:p,value:d,onChange:b,slotProps:{htmlInput:H({tabIndex:o,ref:a,type:r||`text`,placeholder:l?.root.placeholder??i.current.getLocaleText(`filterPanelInputPlaceholder`)},l?.root.slotProps?.htmlInput)},native:h},m.slotProps?.baseSelect,u,l?.root,{children:jD({column:g,OptionComponent:m.slots.baseSelectOption,getOptionLabel:v,getOptionValue:_,isSelectNative:h,baseSelectOptionProps:m.slotProps?.baseSelectOption})})),c,s]})}var ND=[`item`,`applyValue`,`type`,`apiRef`,`focusElementRef`,`slotProps`,`disableDebounce`];function PD(e){let{item:t,applyValue:n,type:r,apiRef:i,focusElementRef:a,slotProps:o}=e,s=K(e,ND),c=_e(),l=J(),u=i.current.getColumn(t.field),d=u.getOptionValue,f=u.getOptionLabel,p=G.useCallback((e,t)=>d(e)===d(t),[d]),m=G.useMemo(()=>wD(u)||[],[u]),h=G.useMemo(()=>Array.isArray(t.value)?t.value.reduce((e,t)=>{let n=m.find(e=>d(e)===t);return n!=null&&e.push(n),e},[]):[],[d,t.value,m]),g=G.useCallback((e,r)=>{n(H({},t,{value:r.map(d)}))},[n,t,d]);if(!u||!CD(u))return null;let _=l.slots.baseAutocomplete;return(0,W.jsx)(_,H({multiple:!0,options:m,isOptionEqualToValue:p,id:c,value:h,onChange:g,getOptionLabel:f,label:i.current.getLocaleText(`filterPanelInputLabel`),placeholder:i.current.getLocaleText(`filterPanelInputPlaceholder`),slotProps:{textField:{type:r||`text`,inputRef:a}}},s,o?.root))}var FD=e=>e==null||!PC(e)?e:e.value,ID=()=>[{value:`is`,getApplyFilterFn:e=>e.value==null||e.value===``?null:t=>FD(t)===FD(e.value),InputComponent:MD},{value:`not`,getApplyFilterFn:e=>e.value==null||e.value===``?null:t=>FD(t)!==FD(e.value),InputComponent:MD},{value:`isAnyOf`,getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;let t=e.value.map(FD);return e=>t.includes(FD(e))},InputComponent:PD}],LD=e=>typeof e[0]==`object`,RD=H({},qw,{type:`singleSelect`,getOptionLabel:e=>PC(e)?e.label:String(e),getOptionValue:e=>PC(e)?e.value:e,valueFormatter(e,t,n,r){let i=gE(r,t);if(!CD(n))return``;let a=wD(n,{id:i,row:t});if(e==null)return``;if(!a)return e;if(!LD(a))return n.getOptionLabel(e);let o=a.find(t=>n.getOptionValue(t)===e);return o?n.getOptionLabel(o):``},renderEditCell:kD,filterOperators:ID(),pastedValueParser:(e,t,n)=>{let r=n,i=wD(r)||[],a=r.getOptionValue;if(i.find(t=>a(t)===e))return e}}),zD=e=>{let{classes:t}=e;return g({root:[`longTextCell`],content:[`longTextCellContent`],expandButton:[`longTextCellExpandButton`],collapseButton:[`longTextCellCollapseButton`],popup:[`longTextCellPopup`],popperContent:[`longTextCellPopperContent`]},zv,t)},BD=m(`div`,{name:`MuiDataGrid`,slot:`LongTextCell`})({display:`flex`,alignItems:`center`,width:`100%`,height:`100%`,position:`relative`}),VD=m(`div`,{name:`MuiDataGrid`,slot:`LongTextCellContent`})({overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,flex:1}),HD=m(`div`,{name:`MuiDataGrid`,slot:`LongTextCellPopperContent`})(({theme:e})=>H({},e.typography.body2,{letterSpacing:`normal`,paddingBlock:15.5,paddingInline:9,maxHeight:156,overflow:`auto`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,width:`var(--_width)`,border:`1px solid ${(e.vars||e).palette.divider}`,boxSizing:`border-box`})),UD=m(`button`,{name:`MuiDataGrid`,slot:`LongTextCellCornerButton`})(({theme:e})=>({lineHeight:0,position:`absolute`,bottom:1,right:0,border:`1px solid`,color:(e.vars||e).palette.text.secondary,borderColor:(e.vars||e).palette.divider,backgroundColor:(e.vars||e).palette.background.paper,borderRadius:0,fontSize:`0.875rem`,padding:2,"&:focus-visible":{outline:`none`},"&:hover":{backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary},[`&.${X.longTextCellExpandButton}`]:{right:-9,opacity:0,[`.${X.longTextCell}:hover &, .${X.longTextCell}.Mui-focused &`]:{opacity:1}},[`&.${X.longTextCellCollapseButton}`]:{bottom:2,right:2,border:`none`}})),WD=m(dC,{name:`MuiDataGrid`,slot:`LongTextCellPopper`})(({theme:e})=>({zIndex:Y.zIndex.menu,background:(e.vars||e).palette.background.paper,"&[data-popper-reference-hidden]":{visibility:`hidden`,pointerEvents:`none`}}));function GD(e){let{id:t,value:n=``,colDef:r,hasFocus:i,slotProps:a,renderContent:o}=e,s=`${t}-${r.field}-longtext-popup`,c=J(),l=Cv(),u=zD(c),d=Z(l,oS),[f,p]=G.useState(!1),m=G.useRef(null),h=G.useRef(null);return G.useEffect(()=>{i&&!f&&h.current&&h.current!==document.activeElement&&h.current.focus(),i||p(!1)},[i,f]),(0,W.jsxs)(BD,H({ref:m},a?.root,{className:V(u.root,a?.root?.className,i&&`Mui-focused`),children:[(0,W.jsx)(VD,H({},a?.content,{className:V(u.content,a?.content?.className),children:n})),(0,W.jsx)(UD,H({ref:h,type:`button`,"aria-label":`${n}, ${l.current.getLocaleText(`longTextCellExpandLabel`)}`,"aria-haspopup":`dialog`,"aria-controls":f?s:void 0,"aria-expanded":f,"aria-keyshortcuts":`Space`,tabIndex:0},a?.expandButton,{className:V(u.expandButton,a?.expandButton?.className),onClick:e=>{e.detail!==0&&(e.stopPropagation(),p(!0))},onKeyDown:e=>{e.key===` `&&!e.shiftKey&&(e.preventDefault(),e.stopPropagation(),p(e=>!e)),e.key===`Escape`&&f&&(e.stopPropagation(),p(!1))},children:(0,W.jsx)(c.slots.longTextCellExpandIcon,{fontSize:`inherit`})})),(0,W.jsx)(WD,H({id:s,role:`dialog`,"aria-label":r.headerName||r.field,as:c.slots.basePopper,ownerState:c,open:f,target:m.current,placement:`bottom-start`,onClickAway:()=>{p(!1)},clickAwayMouseEvent:`onMouseDown`,flip:!0,material:{container:m.current?.closest(`[role="row"]`),modifiers:[{name:`offset`,options:{offset:[-10,-d]}}]}},a?.popper,{className:V(u.popup,a?.popper?.className),children:(0,W.jsxs)(HD,H({tabIndex:-1,onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),p(!1),l.current.getCellElement(t,r.field)?.focus())}},a?.popperContent,{className:V(u.popperContent,a?.popperContent?.className),style:H({"--_width":`${r.computedWidth}px`},a?.popperContent?.style),children:[o?o(n):n,(0,W.jsx)(UD,H({type:`button`,"aria-label":l.current.getLocaleText(`longTextCellCollapseLabel`),"aria-keyshortcuts":`Escape`},a?.collapseButton,{className:V(u.collapseButton,a?.collapseButton?.className),onClick:e=>{e.stopPropagation(),p(!1),l.current.getCellElement(t,r.field)?.focus()},children:(0,W.jsx)(c.slots.longTextCellCollapseIcon,{fontSize:`inherit`})}))]}))}))]}))}var KD=e=>(0,W.jsx)(GD,H({},e)),qD=e=>{let{classes:t}=e;return g({root:[`editLongTextCell`],value:[`editLongTextCellValue`],popup:[`editLongTextCellPopup`],popperContent:[`editLongTextCellPopperContent`],textarea:[`editLongTextCellTextarea`]},zv,t)},JD=m(dC,{name:`MuiDataGrid`,slot:`EditLongTextCellTextarea`})(({theme:e})=>H({width:`100%`,padding:0},e.typography.body2,{letterSpacing:`normal`,outline:`none`,background:`transparent`,border:`none`,resize:`vertical`})),YD=m(`div`,{name:`MuiDataGrid`,slot:`EditLongTextCell`})({display:`flex`,alignItems:`center`,width:`100%`,height:`100%`,position:`relative`}),XD=m(`div`,{name:`MuiDataGrid`,slot:`EditLongTextCellValue`})({overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,width:`100%`,paddingInline:10}),ZD=m(dC,{name:`MuiDataGrid`,slot:`EditLongTextCellPopper`})(({theme:e})=>({zIndex:Y.zIndex.menu,background:(e.vars||e).palette.background.paper,"&[data-popper-reference-hidden]":{opacity:0}})),QD=m(`div`,{name:`MuiDataGrid`,slot:`EditLongTextCellPopperContent`})(({theme:e})=>H({},e.typography.body2,{letterSpacing:`normal`,paddingBlock:15.5,paddingInline:9,height:`max-content`,overflow:`auto`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,width:`var(--_width)`,border:`1px solid ${(e.vars||e).palette.divider}`,boxShadow:(e.vars||e).shadows[4],boxSizing:`border-box`}));function $D(e){let{id:t,value:n,field:r,colDef:i,hasFocus:a,cellMode:o,slotProps:s}=e,c=J(),l=Cv(),u=qD(c),d=Z(l,oS),[f,p]=G.useState(n),[m,h]=G.useState(null),g=l.current.unstable_getEditCellMeta(t,r),_=`${t}-${r}-longtext-edit-popup`,v=a&&!!m;return G.useEffect(()=>{g?.changeReason!==`debouncedSetEditCellValue`&&p(n)},[g,n]),(0,W.jsxs)(YD,H({tabIndex:o===`edit`&&c.editMode===`row`?0:void 0,ref:h,"aria-controls":v?_:void 0,"aria-expanded":v},s?.root,{className:V(u.root,s?.root?.className),children:[(0,W.jsx)(XD,H({},s?.value,{className:V(u.value,s?.value?.className),children:f})),(0,W.jsx)(ZD,H({as:c.slots.basePopper,ownerState:c,id:_,role:`dialog`,"aria-label":i.headerName||r,open:v,target:m,placement:`bottom-start`,flip:!0,material:{container:m?.closest(`[role="row"]`),modifiers:[{name:`offset`,options:{offset:[-1,-d]}}]}},s?.popper,{className:V(u.popup,s?.popper?.className),children:(0,W.jsx)(QD,H({},s?.popperContent,{className:V(u.popperContent,s?.popperContent?.className),style:{"--_width":`${i.computedWidth}px`},children:(0,W.jsx)(eO,H({},e,{valueState:f,setValueState:p}))}))}))]}))}function eO(e){let{id:t,field:n,colDef:r,debounceMs:i=200,onValueChange:a,valueState:o,setValueState:s,hasFocus:c,slotProps:l}=e,u=G.useRef(null),d=Cv(),f=J(),p=qD(f);h(()=>{if(c&&u.current){u.current.focus({preventScroll:!0});let e=u.current.value.length;u.current.setSelectionRange(e,e)}},[c]);let m=G.useCallback(async e=>{let r=e.target.value,o=d.current.getColumn(n),c=r;o?.valueParser&&(c=o.valueParser(r,d.current.getRow(t),o,d)),s(c),d.current.setEditCellValue({id:t,field:n,value:c,debounceMs:i,unstable_skipValueParser:!0},e),a&&await a(e,r)},[d,i,n,t,a,s]),g=G.useCallback(e=>{e.key===`Enter`&&e.shiftKey&&e.stopPropagation(),f.editMode===`cell`&&e.key===`Escape`&&d.current.stopCellEditMode({id:t,field:n,ignoreModifications:!0})},[d,n,t,f.editMode]);return(0,W.jsx)(JD,H({ref:u,as:f.slots.baseTextarea,ownerState:f,"aria-label":r.headerName||n,value:o??``,onChange:m,onKeyDown:g},l?.textarea,{className:V(p.textarea,l?.textarea?.className)}))}var tO=H({},qw,{type:`longText`,display:`flex`,renderCell:KD,renderEditCell:e=>(0,W.jsx)($D,H({},e))}),nO={string:qw,number:SD,date:yD,dateTime:bD,boolean:UT,singleSelect:RD,[bT]:xT,custom:qw,longText:tO},rO=new Set(Object.keys(nO)),iO=e=>e==null||rO.has(e),aO=e=>(e?nO[e]:void 0)??nO.string,oO=nS(e=>e.headerFiltering),sO=Q(oO,e=>e?.enabled??!1),cO=Q(oO,e=>e.editing),lO=Q(oO,e=>e.menuOpen),uO=nS(e=>e.columnGrouping),dO=tS(uO,e=>e?.unwrappedGroupingModel??{}),fO=tS(uO,e=>e?.lookup??{}),pO=tS(uO,e=>e?.headerStructure??[]),mO=Q(uO,e=>e?.maxDepth??0),hO=[`maxWidth`,`minWidth`,`width`,`flex`];function gO({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){let r=new Set(n.map(e=>e.field)),i={all:{},frozenFields:[],freeze:e=>{let t=i.all[e];t&&t.frozen!==!0&&(i.all[e].frozen=!0,i.frozenFields.push(e))}};function a(){if(i.frozenFields.length===r.size)return;let o={min:{},max:{}},s=e,c=t,l=0;i.frozenFields.forEach(e=>{s-=i.all[e].computedWidth,c-=i.all[e].flex});for(let e=0;et.maxWidth&&(l+=t.maxWidth-r,r=t.maxWidth,o.max[t.field]=!0),i.all[t.field]={frozen:!1,computedWidth:r,flex:t.flex}}l<0?Object.keys(o.max).forEach(e=>{i.freeze(e)}):l>0?Object.keys(o.min).forEach(e=>{i.freeze(e)}):n.forEach(({field:e})=>{i.freeze(e)}),a()}return a(),i.all}var _O=(e,t)=>{let n={},r=0,i=0,a=[];e.orderedFields.forEach(t=>{let o=e.lookup[t],s=0,c=!1;e.columnVisibilityModel[t]!==!1&&(o.flex&&o.flex>0?(r+=o.flex,c=!0):s=LC(o.width||qw.width,o.minWidth||qw.minWidth,o.maxWidth||qw.maxWidth),i+=s),o.computedWidth!==s&&(o=H({},o,{computedWidth:s})),c&&a.push(o),n[t]=o});let o=t===void 0?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(o-i,0);if(r>0&&o>0){let e=gO({initialFreeSpace:s,totalFlexUnits:r,flexColumns:a});Object.keys(e).forEach(t=>{n[t]=H({},n[t],{computedWidth:e[t].computedWidth})})}return H({},e,{lookup:n})},vO=(e,t)=>{if(!t)return e;let{orderedFields:n=[],dimensions:r={}}=t,i=Object.keys(r);if(i.length===0&&n.length===0)return e;let a={},o=[];for(let t=0;t!a[e])],c=H({},e.lookup);for(let e=0;e{n[e]=t===-1?1/0:t}),c[t]=n}return H({},e,{orderedFields:s,lookup:c})};function yO(e){return aO(e)}var bO=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=pw(e),keepOnlyColumnsToUpsert:i=!1,updateInitialVisibilityModel:a=!1})=>{let o=!e.current.state.columns,s=e.current.state.props?.signature===QS.DataGrid,c=e=>s&&!iO(e)?yO(void 0):yO(e),l;if(o)l={orderedFields:[],lookup:{},columnVisibilityModel:r,initialColumnVisibilityModel:r};else{let t=lw(e);l={orderedFields:i?[]:[...t.orderedFields],lookup:i?{}:H({},t.lookup),columnVisibilityModel:r,initialColumnVisibilityModel:a?r:t.initialColumnVisibilityModel}}let u={};if(i&&!o)for(let e in l.lookup)Object.prototype.hasOwnProperty.call(l.lookup,e)&&(u[e]=!1);return t.forEach(e=>{let{field:t}=e;u[t]=!0;let n=l.lookup[t];n==null?(n=H({},c(e.type),{field:t,hasBeenResized:!1}),l.orderedFields.push(t)):i&&l.orderedFields.push(t),n&&n.type!==e.type&&(n=H({},c(e.type),{field:t}));let r=n.hasBeenResized;hO.forEach(t=>{e[t]!==void 0&&(r=!0,e[t]===-1&&(e[t]=1/0))});let a=H({},c(e.type),{hasBeenResized:r,field:t}),o;for(o in e)e[o]!==void 0&&o!==`field`&&(a[o]=e[o]);l.lookup[t]=j(n,a)}),i&&!o&&Object.keys(l.lookup).forEach(e=>{u[e]||delete l.lookup[e]}),_O(vO(e.current.unstable_applyPipeProcessors(`hydrateColumns`,l),n),e.current.getRootDimensions?.()??void 0)};function xO(e,t){if(t.listView)return 0;let n=uC(e),r=mO(e),i=sO(e),a=Math.floor(t.columnHeaderHeight*n),o=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*n),s=i?Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*n):0;return a+o*r+s}var SO=1,CO=1.5,wO=e=>{let{scrollDirection:t,classes:n}=e,r={root:[`scrollArea`,`scrollArea--${t}`]};return g(r,zv,n)},TO=m(`div`,{name:`MuiDataGrid`,slot:`ScrollArea`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scrollArea,t[`scrollArea--${n.scrollDirection}`]]}})(()=>({position:`absolute`,zIndex:101,[`&.${X[`scrollArea--left`]}`]:{top:0,left:0,width:20,bottom:0},[`&.${X[`scrollArea--right`]}`]:{top:0,right:0,width:20,bottom:0},[`&.${X[`scrollArea--up`]}`]:{top:0,left:0,right:0,height:20},[`&.${X[`scrollArea--down`]}`]:{bottom:0,left:0,right:0,height:20}})),EO=Q(iS,(e,t)=>t===`left`?e.leftPinnedWidth:t===`right`?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0);function DO(e){let t=Cv(),[n,r]=G.useState(`none`);return $(t,`columnHeaderDragStart`,()=>r(`horizontal`)),$(t,`columnHeaderDragEnd`,()=>r(`none`)),$(t,`rowDragStart`,()=>r(`vertical`)),$(t,`rowDragEnd`,()=>r(`none`)),n===`none`?null:n===`horizontal`?(0,W.jsx)(OO,H({},e)):(0,W.jsx)(kO,H({},e))}function OO(e){let{scrollDirection:t,scrollPosition:n}=e,r=G.useRef(null),i=Cv(),a=L(),o=Z(i,uC),s=Z(i,aS),c=Z(i,EO,t),l=()=>{let e=iS(i);if(t===`left`)return n.current.left>0;if(t===`right`){let t=s-e.viewportInnerSize.width;return n.current.left{let o;if(e.preventDefault(),t===`left`)o=e.clientX-r.current.getBoundingClientRect().right;else if(t===`right`)o=Math.max(1,e.clientX-r.current.getBoundingClientRect().left);else throw Error(dp(55));o=(o-SO)*CO+SO,a.start(0,()=>{i.current.scroll({left:n.current.left+o,top:n.current.top})})});return(0,W.jsx)(AO,H({},e,{ref:r,getCanScrollMore:l,style:p,handleDragOver:m}))}function kO(e){let{scrollDirection:t,scrollPosition:n}=e,r=G.useRef(null),i=Cv(),a=L(),o=Z(i,hS),s=()=>{let e=iS(i);if(t===`up`)return n.current.top>0;if(t===`down`){let t=(o.currentPageTotalHeight||0)-e.viewportInnerSize.height-(e.hasScrollX?e.scrollbarSize:0);return n.current.top{let o;if(e.preventDefault(),t===`up`)o=e.clientY-r.current.getBoundingClientRect().bottom;else if(t===`down`)o=Math.max(1,e.clientY-r.current.getBoundingClientRect().top);else throw Error(dp(55));o=(o-SO)*CO+SO,a.start(0,()=>{i.current.scroll({left:n.current.left,top:n.current.top+o})})});return(0,W.jsx)(AO,H({},e,{ref:r,getCanScrollMore:s,style:l,handleDragOver:u}))}var AO=H_(function(e,t){let{scrollDirection:n,getCanScrollMore:r,style:i,handleDragOver:a}=e,o=Cv(),[s,c]=G.useState(r),l=J(),u=H({},l,{scrollDirection:n}),d=wO(u);return $(o,`scrollPositionChange`,()=>{c(r)}),s?(0,W.jsx)(TO,{ref:t,className:d.root,ownerState:u,onDragOver:a,style:i}):null}),jO=JS(DO);function MO(e,t,n){let r=G.useRef(!0);h(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}function NO(e,t){let n=G.useRef(null);if(n.current)return n.current;let r=e.current.getLogger(t);return n.current=r,r}var PO=(e,t,n,r,i)=>{let a=NO(e,`useNativeEventListener`);oC(e,`rootMount`,()=>{let e=t();if(!(!e||!n))return a.debug(`Binding native ${n} event`),e.addEventListener(n,r,i),()=>{a.debug(`Clearing native ${n} event`),e.removeEventListener(n,r,i)}})};function FO(e){let t=G.useRef(!0);t.current&&(t.current=!1,e())}function IO(e){let t=G.useRef(null),n=G.useCallback((...n)=>{t.current||queueMicrotask(()=>{t.current&&t.current()}),t.current=()=>{t.current=null,e(...n)}},[e]);return G.useLayoutEffect(()=>{t.current&&t.current()}),{schedule:n,cancel:()=>t.current?(t.current=null,!0):!1}}var LO=nS(e=>e.pivoting),RO=Q(LO,e=>e?.active),zO=new Map,BO=Q(LO,e=>e?.initialColumns||zO),VO=(e,t)=>{let n=Z(e,_S),r=Z(e,oE),i=Z(e,AS),a=Z(e,hw),o=n===0&&i===0,s=Z(e,vS),c=Z(e,RO),l=!s&&o,u=!s&&n>0&&r===0,d=!s&&a.length===0,f=l&&c,p=null,m=null;return l&&(p=`noRowsOverlay`),d&&(p=`noColumnsOverlay`),f&&(p=`emptyPivotOverlay`),u&&(p=`noResultsOverlay`),s&&(p=`loadingOverlay`,m=t.slotProps?.loadingOverlay?.[o?`noRowsVariant`:`variant`]??(o?`skeleton`:`linear-progress`)),{overlayType:p,loadingOverlayVariant:m}},HO=nS(e=>e.columnMenu);function UO(){let e=Jv(),t=J(),n=Z(e,hw),r=Z(e,uE),i=Z(e,YT),a=Z(e,PE),o=Z(e,()=>NE(e)===null),s=Z(e,FE),c=Z(e,AE),l=Z(e,jE),u=Z(e,mO),d=Z(e,HO),f=Z(e,pw),p=Z(e,pO),m=!(s===null&&a===null&&o),h=e.current.columnHeadersContainerRef;return(0,W.jsx)(t.slots.columnHeaders,H({ref:h,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:c,columnGroupHeaderFocus:l,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:m},t.slotProps?.columnHeaders))}var WO=JS(UO),GO=m(`div`,{slot:`internal`,shouldForwardProp:void 0})({position:`absolute`,top:`var(--DataGrid-headersTotalHeight)`,left:0,width:`calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))`}),KO=m(`div`,{name:`MuiDataGrid`,slot:`Main`,overridesResolver:(e,t)=>{let{ownerState:n,loadingOverlayVariant:r,overlayType:i}=e,a=r===`skeleton`||i===`noColumnsOverlay`;return[t.main,n.hasPinnedRight&&t[`main--hasPinnedRight`],a&&t[`main--hiddenContent`]]}})({flexGrow:1,position:`relative`,overflow:`hidden`,display:`flex`,flexDirection:`column`}),qO=H_((e,t)=>{let{ownerState:n}=e,r=J(),i=tT().hooks.useGridAriaAttributes();return(0,W.jsxs)(KO,H({ownerState:n,className:e.className,tabIndex:-1},i,r.slotProps?.main,{ref:t,children:[(0,W.jsx)(GO,{role:`none`,"data-id":`gridPanelAnchor`}),e.children]}))}),JO=()=>g({root:[`topContainer`]},zv,{}),YO=m(`div`,{slot:`internal`,shouldForwardProp:void 0})({position:`sticky`,zIndex:40,top:0});function XO(e){let t=JO();return(0,W.jsx)(YO,H({},e,{className:V(t.root,X[`container--top`]),role:`none`}))}var ZO=(e,t)=>{let{classes:n}=e;return g({root:[`virtualScrollerContent`,t&&`virtualScrollerContent--overflowed`]},zv,n)},QO=S(`div`,{name:`MuiDataGrid`,slot:`VirtualScrollerContent`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.virtualScrollerContent,n.overflowedContent&&t[`virtualScrollerContent--overflowed`]]}})({flex:`1 0 auto`,display:`flex`,flexDirection:`column`}),$O=H_(function(e,t){let n=J(),r=!n.autoHeight&&e.style?.minHeight===`auto`,i=ZO(n,r),a={classes:n.classes,overflowedContent:r};return(0,W.jsx)(QO,H({},e,{ownerState:a,className:V(i.root,e.className),ref:t}))}),ek=m(`div`,{slot:`internal`,shouldForwardProp:void 0})({display:`flex`,flexDirection:`row`,width:`var(--DataGrid-rowWidth)`,boxSizing:`border-box`}),tk=m(`div`,{slot:`internal`,shouldForwardProp:void 0})({position:`sticky`,height:`100%`,boxSizing:`border-box`,borderTop:`1px solid var(--rowBorderColor)`,backgroundColor:Y.cell.background.pinned}),nk=m(tk,{slot:`internal`})({left:0}),rk=m(tk,{slot:`internal`})({right:0}),ik=m(`div`,{slot:`internal`,shouldForwardProp:void 0})({flexGrow:1,borderTop:`1px solid var(--rowBorderColor)`});function ak({rowsLength:e}){let{viewportOuterSize:t,minimumSize:n,hasScrollX:r,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:o,rightPinnedWidth:s}=Z(Cv(),iS),c=r?a:0,l=t.height-n.height>0;return c===0&&!l?null:(0,W.jsxs)(ek,{className:X.filler,role:`none`,style:{height:c,"--rowBorderColor":e===0?`transparent`:`var(--DataGrid-rowBorderColor)`},children:[o>0&&(0,W.jsx)(nk,{className:X[`filler--pinnedLeft`],style:{width:o}}),(0,W.jsx)(ik,{}),s>0&&(0,W.jsx)(rk,{className:X[`filler--pinnedRight`],style:{width:s+(i?a:0)}})]})}var ok=JS(ak),sk=e=>{let{classes:t}=e;return g({root:[`virtualScrollerRenderZone`]},zv,t)},ck=S(`div`,{name:`MuiDataGrid`,slot:`VirtualScrollerRenderZone`})({position:`absolute`,display:`flex`,flexDirection:`column`}),lk=H_(function(e,t){let n=J(),r=sk(n);return(0,W.jsx)(ck,H({ownerState:n},e,{className:V(r.root,e.className),ref:t}))}),uk=Q(nS(e=>e.columnResize),e=>e.resizingColumnField),dk={includeHeaders:!0,includeHeaderFilters:!1,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0},fk=nS(e=>e.editRows),pk=Q(fk,(e,{rowId:t,editMode:n})=>n===WC.Row&&!!e[t]),mk=Q(fk,(e,{rowId:t,field:n})=>e[t]?.[n]??null),hk=nS(e=>e.preferencePanel),gk=Q(hk,(e,t)=>!!(e.open&&e.labelId===t)),_k=function(e){return e.filters=`filters`,e.columns=`columns`,e.aiAssistant=`aiAssistant`,e}(_k||{}),vk=!cx,yk=(e,t)=>{let{disableVirtualization:n,autoHeight:r}=t;return H({},e,{virtualization:{enabled:!n&&vk,enabledForColumns:!n&&vk,enabledForRows:!n&&!r&&vk,renderContext:gx}})};function bk(e,t){let{autoHeight:n,disableVirtualization:r}=t,i=t=>{let{virtualizer:r}=e.current;t&&=vk;let i=r.store.getSnapshot();(i.virtualization.enabled!==t||i.virtualization.enabledForRows!==t||i.virtualization.enabledForColumns!==t)&&r.store.set(`virtualization`,H({},r.store.state.virtualization,{enabled:t,enabledForColumns:t,enabledForRows:t&&!n}))};MO(e,{unstable_setVirtualization:i,unstable_setColumnVirtualization:t=>{let{virtualizer:n}=e.current;t&&=vk,n.store.getSnapshot().virtualization.enabledForColumns!==t&&n.store.set(`virtualization`,H({},n.store.state.virtualization,{enabledForColumns:t}))}},`public`);let a=()=>{let{virtualizer:t}=e.current;t?.api.scheduleUpdateRenderContext()};e.current.register(`private`,{updateRenderContext:a}),oC(e,`sortedRowsSet`,a),oC(e,`paginationModelChange`,a),oC(e,`columnsChange`,a),G.useEffect(()=>{e.current.virtualizer&&i(!t.disableVirtualization)},[e,r,n])}var xk=nS(e=>e.virtualization);Q(xk,e=>e.enabled);var Sk=Q(xk,e=>e.enabledForColumns);Q(xk,e=>e.enabledForRows);var Ck=Q(xk,e=>e.layoutMode),wk=Q(xk,e=>e.renderContext),Tk=tS(nS(e=>e.virtualization.renderContext.firstColumnIndex),nS(e=>e.virtualization.renderContext.lastColumnIndex),(e,t)=>({firstColumnIndex:e,lastColumnIndex:t}));function Ek(e){return JSON.stringify([e.filterModel,e.sortModel,e.start,e.end])}var Dk=class{constructor({ttl:e=3e5,getKey:t=Ek}){this.cache={},this.ttl=e,this.getKey=t}set(e,t){let n=this.getKey(e),r=Date.now()+this.ttl;this.cache[n]={value:t,expiry:r}}get(e){let t=this.getKey(e),n=this.cache[t];if(n){if(Date.now()>n.expiry){delete this.cache[t];return}return n.value}}clear(){this.cache={}}},Ok=class extends Error{constructor(e){super(e.message),this.name=`GridGetRowsError`,this.params=e.params,this.cause=e.cause}},kk=class extends Error{constructor(e){super(e.message),this.name=`GridUpdateRowError`,this.params=e.params,this.cause=e.cause}},Ak=(e,t)=>{let{classes:n}=e,r={root:[`scrollbar`,`scrollbar--${t}`],content:[`scrollbarContent`]};return g(r,zv,n)},jk=`calc(max(var(--DataGrid-scrollbarSize), 14px))`,Mk=m(`div`,{slot:`internal`,shouldForwardProp:void 0})({position:`absolute`,display:`inline-block`,zIndex:60,"&:hover":{zIndex:70},"--size":jk,[Ab]:{display:`none`}}),Nk=m(Mk,{slot:`internal`})({width:`var(--size)`,height:`calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-headersTotalHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))`,overflowY:`auto`,overflowX:`hidden`,outline:0,"& > div":{width:`var(--size)`},top:`var(--DataGrid-headersTotalHeight)`,right:0}),Pk=m(Mk,{slot:`internal`})({width:`calc(var(--DataGrid-hasScrollX) * (100% - var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))`,height:`var(--size)`,overflowY:`hidden`,overflowX:`auto`,outline:0,"& > div":{height:`var(--size)`},bottom:0}),Fk=m(Mk,{slot:`internal`})({width:`var(--size)`,height:`var(--size)`,right:0,bottom:0,overflow:`scroll`,"@media print":{display:`none`}}),Ik=H_(function(e,t){let n=Jv(),r=Ak(J(),e.position),i=Z(n,iS),a=e.position===`vertical`?`height`:`width`,o=e.position===`horizontal`?i.minimumSize.width:i.minimumSize.height-i.headersTotalHeight,s=e.position===`vertical`?Nk:Pk,c=G.useMemo(()=>({[a]:`${o}px`}),[a,o]);return(0,W.jsx)(s,{ref:t,className:r.root,tabIndex:-1,"aria-hidden":`true`,onFocus:e=>{e.target.blur()},children:(0,W.jsx)(`div`,{className:r.content,style:c})})}),Lk=e=>{let{classes:t,position:n}=e,r={root:[`scrollShadow`,`scrollShadow--${n}`]};return g(r,zv,t)},Rk=m(`div`,{name:`MuiDataGrid`,slot:`ScrollShadow`,overridesResolver:(e,t)=>[t.root,t[e.position]]})(({theme:e})=>({position:`absolute`,inset:0,pointerEvents:`none`,transition:Y.transition([`box-shadow`],{duration:Y.transitions.duration.short}),"--length":e.palette.mode===`dark`?`8px`:`6px`,"--length-inverse":`calc(var(--length) * -1)`,"--opacity":e.palette.mode===`dark`?`0.7`:`0.18`,"--blur":`var(--length)`,"--spread":`calc(var(--length) * -1)`,"--color":`0, 0, 0`,"--color-start":`rgba(var(--color), calc(var(--hasScrollStart) * var(--opacity)))`,"--color-end":`rgba(var(--color), calc(var(--hasScrollEnd) * var(--opacity)))`,variants:[{props:{position:`vertical`},style:{top:`var(--DataGrid-topContainerHeight)`,bottom:`calc(var(--DataGrid-bottomContainerHeight) + var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))`,boxShadow:`inset 0 var(--length) var(--blur) var(--spread) var(--color-start), inset 0 var(--length-inverse) var(--blur) var(--spread) var(--color-end)`}},{props:{position:`horizontal`},style:{left:`var(--DataGrid-leftPinnedWidth)`,right:`calc(var(--DataGrid-rightPinnedWidth) + var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))`,boxShadow:`inset var(--length) 0 var(--blur) var(--spread) var(--color-start), inset var(--length-inverse) 0 var(--blur) var(--spread) var(--color-end)`}}]}));function zk(e){let{position:t}=e,n={classes:J().classes,position:t},r=Lk(n),i=G.useRef(null),a=Jv(),o=Z(a,sS),s=Z(a,cS),c=Z(a,kS),l=Z(a,_w),u=t===`vertical`?s&&c?.bottom?.length>0:o&&l?.right?.length!==void 0&&l?.right?.length>0,d=Ie(),f=G.useCallback(e=>{if(!i.current)return;let n=Math.abs(Math.round(e)),r=iS(a),o=Math.round(r.contentSize[t===`vertical`?`height`:`width`]-r.viewportInnerSize[t===`vertical`?`height`:`width`]),s=t===`vertical`?c?.top?.length>0:l?.left?.length!==void 0&&l?.left?.length>0,u=t===`vertical`?c?.bottom?.length>0:l?.right?.length!==void 0&&l?.right?.length>0,f=d?n0,p=d?n>0:n{f(e[t===`vertical`?`top`:`left`])}),$(a,`columnResizeStop`,()=>{t===`horizontal`&&f(a.current.virtualScrollerRef?.current?.scrollLeft||0)}),G.useEffect(()=>{f((t===`horizontal`?a.current.virtualScrollerRef?.current?.scrollLeft:a.current.virtualScrollerRef?.current?.scrollTop)??0)},[f,a,t]),(0,W.jsx)(Rk,{className:r.root,ownerState:n,ref:i,style:{"--hasScrollStart":0,"--hasScrollEnd":u?`1`:`0`}})}var Bk=m(`div`,{name:`MuiDataGrid`,slot:`OverlayWrapper`,shouldForwardProp:e=>e!==`overlayType`&&e!==`loadingOverlayVariant`&&e!==`right`})(({overlayType:e,loadingOverlayVariant:t,right:n})=>t===`skeleton`?{}:{position:`sticky`,top:`var(--DataGrid-topContainerHeight)`,left:0,right:`${n}px`,width:0,height:0,zIndex:e===`loadingOverlay`?5:4}),Vk=m(`div`,{name:`MuiDataGrid`,slot:`OverlayWrapperInner`,shouldForwardProp:e=>e!==`overlayType`&&e!==`loadingOverlayVariant`})({}),Hk=e=>{let{classes:t}=e;return g({root:[`overlayWrapper`],inner:[`overlayWrapperInner`]},zv,t)};function Uk(e){let t=Cv(),n=J(),r=Z(t,iS),i=Math.max(r.viewportOuterSize.height-r.topContainerHeight-r.bottomContainerHeight-(r.hasScrollX?r.scrollbarSize:0),0);i===0&&(i=WS);let a=Hk(H({},e,{classes:n.classes}));return(0,W.jsx)(Bk,H({className:a.root},e,{right:r.columnsTotalWidth-r.viewportOuterSize.width,children:(0,W.jsx)(Vk,H({className:a.inner,style:{height:i,width:e.loadingOverlayVariant===`skeleton`?Math.max(r.viewportOuterSize.width,r.columnsTotalWidth):r.viewportOuterSize.width}},e))}))}var Wk=(e,t)=>eD(e),Gk=(e,t)=>Z(e,eD),Kk=tS(Q(kE,wk,eD,hw,(e,t,n,r)=>{if(!e)return!1;let i=n.rowIdToIndexMap.get(e.id),a=r.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex(t=>t.field===e.field);return!(i!==void 0&&a!==-1&&i>=t.firstRowIndex&&i<=t.lastRowIndex)}),hw,eD,kE,(e,t,n,r)=>{if(!e)return null;let i=n.rowIdToIndexMap.get(r.id);if(i===void 0)return null;let a=t.findIndex(e=>e.field===r.field);return a===-1?null:H({},r,{rowIndex:i,columnIndex:a})}),qk={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:` `,columnBufferPx:150,columnFilterDebounceMs:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,dataSourceKeepPreviousData:!1,dataSourceRevalidateMs:0,disableRowSelectionOnClick:!1,disableRowSelectionExcludeModel:!1,disableVirtualization:!1,editMode:WC.Cell,filterDebounceMs:150,filterMode:`client`,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:`error`,pageSizeOptions:[25,50,100],pagination:!1,paginationMode:`client`,resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rows:[],rowSelection:!0,rowSpacingType:`margin`,rowSpanning:!1,showCellVerticalBorder:!1,showColumnVerticalBorder:!1,showToolbar:!1,sortingMode:`client`,sortingOrder:[`asc`,`desc`,null],throttleRowsMs:0,virtualizeColumnsWithAutoRowHeight:!1,tabNavigation:`none`};function Jk(e){"@babel/helpers - typeof";return Jk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Jk(e)}function Yk(e,t){if(Jk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Jk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Xk(e){var t=Yk(e,`string`);return Jk(t)==`symbol`?t:t+``}var Zk=e=>{let t=G.useRef({}),n=G.useRef(!1),r=G.useCallback(e=>{n.current||!e||(n.current=!0,Object.values(e.appliers).forEach(e=>{e()}),n.current=!1)},[]),i=G.useCallback((e,n,r)=>{t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1});let i=t.current[e];return i.processors.get(n)!==r&&(i.processors.set(n,r),i.processorsAsArray=Array.from(t.current[e].processors.values()).filter(e=>e!==null),i.processorsUpdated=!0),()=>{t.current[e].processors.set(n,null),t.current[e].processorsAsArray=Array.from(t.current[e].processors.values()).filter(e=>e!==null)}},[]),a=G.useCallback((e,n,r)=>(t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1}),t.current[e].appliers[n]=r,()=>{let r=t.current[e].appliers,i=K(r,[n].map(Xk));t.current[e].appliers=i}),[]),o=G.useCallback(e=>{r(t.current[e])},[r]),s=G.useCallback(()=>{for(let e in t.current){if(!Object.prototype.hasOwnProperty.call(t.current,e))continue;let n=t.current[e];n.processorsUpdated&&(n.processorsUpdated=!1,r(n))}},[r]),c=G.useCallback((...e)=>{let[n,r,i]=e;if(!t.current[n])return r;let a=t.current[n].processorsAsArray,o=r;for(let e=0;e{let i=G.useRef(null),a=G.useRef(`mui-${Math.round(Math.random()*1e9)}`),o=G.useCallback(()=>{i.current=e.current.registerPipeProcessor(t,a.current,n)},[e,n,t]);FO(()=>{r&&o()});let s=G.useRef(!0);G.useEffect(()=>(s.current?s.current=!1:r&&o(),()=>{i.current&&=(i.current(),null)}),[o,r])},$k=(e,t,n)=>{let r=G.useRef(null),i=G.useRef(`mui-${Math.round(Math.random()*1e9)}`),a=G.useCallback(()=>{r.current=e.current.registerPipeApplier(t,i.current,n)},[e,n,t]);FO(()=>{a()});let o=G.useRef(!0);G.useEffect(()=>(o.current?o.current=!1:a(),()=>{r.current&&=(r.current(),null)}),[a])},eA=(e,t,n)=>{let r=oS(n),i=_S(n),a=UE(n),o=Math.min(a.enabled?a.paginationModel.pageSize:i,i);return H({},e,{rowsMeta:{currentPageTotalHeight:o*r,positions:Array.from({length:o},(e,t)=>t*r),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})},tA=(e,t)=>{let{getRowHeight:n,setLastMeasuredRowIndex:r,storeRowHeightMeasurement:i,resetRowHeights:a,hydrateRowsMeta:o,observeRowHeight:s,rowHasAutoHeight:c,getRowHeightEntry:l,getLastMeasuredRowIndex:u}=e.current.virtualizer.api.rowsMeta;$k(e,`rowHeight`,o);let d={unstable_getRowHeight:n,unstable_setLastMeasuredRowIndex:r,unstable_storeRowHeightMeasurement:i,resetRowHeights:a},f={hydrateRowsMeta:o,observeRowHeight:s,rowHasAutoHeight:c,getRowHeightEntry:l,getLastMeasuredRowIndex:u};MO(e,d,`public`),MO(e,f,`private`)},nA=Q(hw,bw,(e,t)=>{let n=e.length;return n===0?0:Ub(t[n-1]+e[n-1].computedWidth,1)}),rA=()=>Sp((e,t,n,r,i)=>H({},e,{headerHeight:t,groupHeaderHeight:n,headerFilterHeight:r,headersTotalHeight:i}),{maxSize:1});function iA(){let e=Ie(),t=J(),n=Jv(),{listView:r}=t,i=Z(n,hw),a=Z(n,kS),o=vw(n),s=Z(n,pE),c=G.useCallback(e=>s.has(e)&&n.current.isRowSelectable(e),[s,n]),l=Gk(n),u=Z(n,Cw),d=Z(n,pS),f=Z(n,lS),{autoHeight:p}=t,m=r,h=Z(n,uC),g=KS(t.rowHeight,qk.rowHeight,qS),_=Math.floor(g*h),v=Math.floor(t.columnHeaderHeight*h),y=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*h),b=Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*h),x=Z(n,nA),S=xO(n,t),C=o.left.reduce((e,t)=>e+t.computedWidth,0),w=o.right.reduce((e,t)=>e+t.computedWidth,0),T=VO(n,t),E={rowHeight:_,headerHeight:v,columnsTotalWidth:x,leftPinnedWidth:C,rightPinnedWidth:w,topPinnedHeight:S,bottomPinnedHeight:0,autoHeight:p,minimalContentHeight:WS,scrollbarSize:t.scrollbarSize},O=De(rA).current,k=Z(n,_S),A=Z(n,UE),j=Math.min(A.enabled?A.paginationModel.pageSize:k,k),{getRowHeight:M,getEstimatedRowHeight:N,getRowSpacing:P}=t,ee=t.slots.row,F=t.slotProps?.row;Z(n,Kk);let I=De(()=>new Lx({container:n.current.mainElementRef,scroller:n.current.virtualScrollerRef,scrollbarVertical:n.current.virtualScrollbarVerticalRef,scrollbarHorizontal:n.current.virtualScrollbarHorizontalRef})).current,L=$x({layout:I,dimensions:E,virtualization:{layoutMode:t.experimentalFeatures?.virtualizerLayoutMode??`uncontrolled`,isRtl:e,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx},colspan:{enabled:u,getColspan:G.useCallback((e,t)=>{if(typeof t.colSpan==`function`){let r=n.current.getRow(e),i=n.current.getRowValue(r,t);return t.colSpan(i,r,t,n)??0}return t.colSpan??1},[n])},initialState:{scroll:t.initialState?.scroll,rowSpanning:n.current.state.rowSpanning,virtualization:n.current.state.virtualization},rows:l.rows,range:l.range,rowCount:j,columns:i,pinnedRows:a,pinnedColumns:o,disableHorizontalScroll:r,disableVerticalScroll:T.overlayType===`noColumnsOverlay`||T.loadingOverlayVariant===`skeleton`,getRowHeight:G.useMemo(()=>{if(M)return e=>M(H({},e,{densityFactor:h}))},[M,h]),getEstimatedRowHeight:G.useMemo(()=>N?e=>N(H({},e,{densityFactor:h})):void 0,[N,h]),getRowSpacing:G.useMemo(()=>P?e=>{let t=l.rowIdToIndexMap.get(e.id)??-1,r={isFirstVisible:t===0,isLastVisible:t===l.rows.length-1,indexRelativeToCurrentPage:t};return P(H({},e,r,{indexRelativeToCurrentPage:n.current.getRowIndexRelativeToVisibleRows(e.id)}))}:void 0,[n,P,l.rows,l.rowIdToIndexMap]),applyRowHeight:D((e,t)=>n.current.unstable_applyPipeProcessors(`rowHeight`,e,t)),virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight,focusedVirtualCell:D(()=>Kk(n)),resizeThrottleMs:t.resizeThrottleMs,onResize:D(e=>n.current.publishEvent(`resize`,e)),onWheel:D(e=>{n.current.publishEvent(`virtualScrollerWheel`,{},e)}),onTouchMove:D(e=>{n.current.publishEvent(`virtualScrollerTouchMove`,{},e)}),onRenderContextChange:D(e=>{n.current.publishEvent(`renderedRowsIntervalChange`,e)}),onScrollChange:G.useCallback((e,t)=>{n.current.publishEvent(`scrollPositionChange`,{top:e.top,left:e.left,renderContext:t})},[n]),scrollReset:m,renderRow:G.useCallback(e=>(0,W.jsx)(ee,H({row:e.model,rowId:e.id,index:e.rowIndex,selected:c(e.id),offsetLeft:e.offsetLeft,columnsTotalWidth:x,rowHeight:e.baseRowHeight,pinnedColumns:o,visibleColumns:i,firstColumnIndex:e.firstColumnIndex,lastColumnIndex:e.lastColumnIndex,focusedColumnIndex:e.focusedColumnIndex,isFirstVisible:e.isFirstVisible,isLastVisible:e.isLastVisible,isNotVisible:e.isVirtualFocusRow,showBottomBorder:e.showBottomBorder,scrollbarWidth:d,gridHasFiller:f},F),e.id),[x,f,c,o,ee,F,d,i]),renderInfiniteLoadingTrigger:G.useCallback(e=>n.current.getInfiniteLoadingTriggerElement?.({lastRowId:e}),[n])});return FO(()=>{n.current.store.state.dimensions=O(L.store.state.dimensions,v,y,b,S),n.current.store.state.rowsMeta=L.store.state.rowsMeta,n.current.store.state.virtualization=L.store.state.virtualization}),Kp(L.store,qb.selectors.dimensions,(e,t)=>{t.isReady&&n.current.setState(e=>H({},e,{dimensions:O(t,v,y,b,S)}))}),Kp(L.store,qb.selectors.rowsMeta,(e,t)=>{t!==n.current.state.rowsMeta&&n.current.setState(e=>H({},e,{rowsMeta:t}))}),Kp(L.store,vx.selectors.store,(e,t)=>{t.renderContext!==gx&&t!==n.current.state.virtualization&&n.current.setState(e=>H({},e,{virtualization:t}))}),n.current.register(`private`,{virtualizer:L}),tA(n,t),L}var aA=e=>{let{classes:t,hasScrollX:n,hasPinnedRight:r,loadingOverlayVariant:i,overlayType:a}=e;return g({root:[`main`,r&&`main--hasPinnedRight`,(i===`skeleton`||a===`noColumnsOverlay`)&&`main--hiddenContent`],scroller:[`virtualScroller`,n&&`virtualScroller--hasScrollX`]},zv,t)},oA=m(`div`,{name:`MuiDataGrid`,slot:`VirtualScroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.virtualScroller,n.hasScrollX&&t[`virtualScroller--hasScrollX`]]}})({position:`relative`,height:`100%`,flexGrow:1,overflow:`scroll`,display:`flex`,flexDirection:`column`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`},[Ab]:{scrollbarWidth:`auto`,"&::-webkit-scrollbar":{display:`block`}},"@media print":{overflow:`hidden`},zIndex:0}),sA=m(`div`,{slot:`internal`,shouldForwardProp:void 0})({display:`contents`,[`.${X[`virtualizer--layoutControlled`]} &`]:{display:`inline-block`,position:`sticky`,top:0,left:0,overflow:`hidden`}}),cA=e=>e.current.state.dimensions.rightPinnedWidth>0;function lA(e){let t=Jv(),n=J(),r=Z(t,cS),i=Z(t,sS),a=Z(t,cA),o=Z(t,mS),{overlayType:s,loadingOverlayVariant:c}=VO(t,n),l=n.slots?.[s],u={classes:n.classes,hasScrollX:i,hasPinnedRight:a,overlayType:s,loadingOverlayVariant:c},d=aA(u),f=iA(),p=f.store.use(vx.selectors.layoutMode),m=p===`uncontrolled`&&c!==`skeleton`,h=f.store.use(Lx.selectors.containerProps),g=f.store.use(Lx.selectors.scrollerProps),_=f.store.use(Lx.selectors.scrollerContentProps),v=f.store.use(Lx.selectors.viewportProps),y=f.store.use(Lx.selectors.contentProps),b=f.store.use(Lx.selectors.positionerProps),x=f.store.use(Lx.selectors.scrollbarVerticalProps),S=f.store.use(Lx.selectors.scrollbarHorizontalProps),C=f.store.use(Lx.selectors.scrollAreaProps),w=f.store.use(Lx.selectors.containerVerticalProps),T=f.api.getters.getRows(void 0,xS(t));return(0,W.jsxs)(qO,H({className:V(d.root,p===`controlled`&&X[`virtualizer--layoutControlled`])},h,{ownerState:u,children:[(0,W.jsx)(jO,H({scrollDirection:`left`},C)),(0,W.jsx)(jO,H({scrollDirection:`right`},C)),(0,W.jsx)(jO,H({scrollDirection:`up`},C)),(0,W.jsx)(jO,H({scrollDirection:`down`},C)),(0,W.jsx)(oA,H({className:d.scroller},g,{ownerState:u,children:(0,W.jsx)($O,H({},_,{children:(0,W.jsxs)(sA,H({},v,{children:[(0,W.jsxs)(XO,H({},w,{children:[!n.listView&&(0,W.jsx)(WO,{}),(0,W.jsx)(n.slots.pinnedRows,{position:`top`})]})),s&&(0,W.jsx)(Uk,{overlayType:s,loadingOverlayVariant:c,children:(0,W.jsx)(l,H({},n.slotProps?.[s]))}),(0,W.jsxs)(lk,H({role:`rowgroup`},b,{children:[T,(0,W.jsx)(n.slots.detailPanels,{})]})),m&&(0,W.jsx)(`div`,H({className:X.contentFiller},y)),o&&(0,W.jsx)(ok,{rowsLength:T.length}),(0,W.jsx)(n.slots.bottomContainer,H({},w,{children:(0,W.jsx)(n.slots.pinnedRows,{position:`bottom`})}))]}))}))})),i&&(0,W.jsxs)(G.Fragment,{children:[n.pinnedColumnsSectionSeparator?.endsWith(`shadow`)&&(0,W.jsx)(zk,{position:`horizontal`}),(0,W.jsx)(Ik,H({position:`horizontal`},S))]}),r&&(0,W.jsxs)(G.Fragment,{children:[n.pinnedRowsSectionSeparator?.endsWith(`shadow`)&&(0,W.jsx)(zk,{position:`vertical`}),(0,W.jsx)(Ik,H({position:`vertical`},x))]}),i&&r&&(0,W.jsx)(Fk,{"aria-hidden":`true`}),e.children]}))}function uA(){let e=J();return e.hideFooter?null:(0,W.jsx)(e.slots.footer,H({},e.slotProps?.footer))}var dA;function fA(){return dA===void 0&&document.createElement(`div`).focus({get preventScroll(){return dA=!0,!1}}),dA}function pA(e,t){if(fA())e.focus({preventScroll:!0});else{let n=t.current.getScrollPosition();e.focus(),t.current.scroll(n)}}function mA(e,t){let n=e.current.virtualizer.store;if(t!==void 0&&n.use(vx.selectors.layoutMode)===`controlled`){if(t===ST.LEFT)return n.use(vx.selectors.pinnedLeftOffsetSelector);if(t===ST.RIGHT)return n.use(vx.selectors.pinnedRightOffsetSelector)}return 0}function hA({defaultSlots:e,slots:t}){let n=t;if(!n||Object.keys(n).length===0)return e;let r=H({},e);return Object.keys(n).forEach(e=>{let t=e;n[t]!==void 0&&(r[t]=n[t])}),r}var gA=e=>{let t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null},_A=e=>e===`__row_group_by_columns_group__`||gA(e)!==null,vA=(e,t)=>{if(e){if(t){if(e===ST.LEFT)return`right`;if(e===ST.RIGHT)return`left`}else{if(e===ST.LEFT)return`left`;if(e===ST.RIGHT)return`right`}}};function yA(e,t,n,r){let i=vA(n,t);return!i||r===void 0||(e[i]=r),e}var bA=`column.row.rowId.rowNode.align.children.colIndex.width.className.style.colSpan.disableDragEvents.isNotVisible.pinnedOffset.pinnedPosition.showRightBorder.showLeftBorder.onClick.onDoubleClick.onMouseDown.onMouseUp.onMouseOver.onKeyDown.onKeyUp.onDragEnter.onDragOver`.split(`.`),xA=[`changeReason`,`unstable_updateValueOnRender`],SA=e=>{let{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:i,isEditable:a,isSelected:o,isSelectionMode:s,classes:c}=e,l={root:[`cell`,`cell--text${he(t)}`,o&&`selected`,a&&`cell--editable`,n&&`cell--withLeftBorder`,r&&`cell--withRightBorder`,i===ST.LEFT&&`cell--pinnedLeft`,i===ST.RIGHT&&`cell--pinnedRight`,s&&!a&&`cell--selectionMode`]};return g(l,zv,c)},CA=JS(H_(function(e,t){let{column:n,row:r,rowId:i,rowNode:a,align:o,colIndex:s,width:c,className:l,style:u,colSpan:d,disableDragEvents:f,isNotVisible:m,pinnedOffset:g,pinnedPosition:_,showRightBorder:v,showLeftBorder:y,onClick:b,onDoubleClick:x,onMouseDown:S,onMouseUp:C,onMouseOver:w,onKeyDown:T,onKeyUp:E,onDragEnter:D,onDragOver:O}=e,k=K(e,bA),A=Jv(),j=J(),M=Ie(),N=n.field,P=Z(A,mk,{rowId:i,field:N}),ee=tT().hooks.useCellAggregationResult(i,N),F=P?GC.Edit:GC.View,{value:I,formattedValue:L}=ee||{},R=A.current.getCellParamsForRow(i,N,r,{colDef:n,cellMode:F,rowNode:a,tabIndex:Z(A,()=>{let e=NE(A);return e&&e.field===N&&e.id===i?0:-1}),hasFocus:Z(A,()=>{let e=kE(A);return e?.id===i&&e.field===N}),value:I,formattedValue:L});R.api=A.current,Z(A,()=>A.current.isCellEditable(R));let z=Z(A,()=>A.current.unstable_applyPipeProcessors(`isCellSelected`,!1,{id:i,field:N})),te=A.current.virtualizer.store,ne=Hp(te,Jx.selectors.hiddenCells),re=Hp(te,Jx.selectors.spannedCells),{hasFocus:B,isEditable:ie=!1,value:ae}=R,oe=(F===`view`||!ie)&&n.type!==`actions`?R.tabIndex:-1,{classes:se,getCellClassName:ce}=j,le=[Z(A,()=>A.current.unstable_applyPipeProcessors(`cellClassName`,[],{id:i,field:N}).filter(Boolean).join(` `))];n.cellClassName&&le.push(typeof n.cellClassName==`function`?n.cellClassName(R):n.cellClassName),n.display===`flex`&&le.push(X[`cell--flex`]),ce&&le.push(ce(R));let ue=R.formattedValue??ae,de=G.useRef(null),fe=p(t,de),pe=j.cellSelection??!1,me=SA({align:o,showLeftBorder:y,showRightBorder:v,isEditable:ie,classes:j.classes,pinnedPosition:_,isSelected:z,isSelectionMode:pe}),he=G.useCallback(e=>t=>{let n=A.current.getCellParams(i,N||``);A.current.publishEvent(e,n,t),C&&C(t)},[A,N,C,i]),ge=G.useCallback(e=>t=>{let n=A.current.getCellParams(i,N||``);A.current.publishEvent(e,n,t),S&&S(t)},[A,N,S,i]),_e=G.useCallback((e,t)=>n=>{if(!A.current.getRow(i))return;let r=A.current.getCellParams(i,N||``);A.current.publishEvent(e,r,n),t&&t(n)},[A,N,i]),ve=ne[i]?.[s]??!1,ye=re[i]?.[s]??1,be=mA(A,_),xe=G.useMemo(()=>{if(m)return{padding:0,opacity:0,width:0,height:0,border:0};let e=yA(H({"--width":`${c}px`},u),M,_,g===void 0?void 0:g+be),t=_===ST.LEFT,n=_===ST.RIGHT;return ye>1&&(e.height=`calc(var(--height) * ${ye})`,e.zIndex=10,(t||n)&&(e.zIndex=40)),e},[c,m,u,g,_,be,M,ye]);if(h(()=>{if(!B||F===GC.Edit)return;let e=Ue(A.current.rootElementRef.current);de.current&&!de.current.contains(e.activeElement)&&pA(de.current.querySelector(`[tabindex="0"]`)||de.current,A)},[B,F,A]),ve)return(0,W.jsx)(`div`,{"data-colindex":s,role:`none`,style:H({width:`var(--width)`},xe)});let Se=k.onFocus,U,Ce;if(P===null&&n.renderCell&&(U=n.renderCell(R)),P!==null&&n.renderEditCell){let e=A.current.getRowWithUpdatedValues(i,n.field),t=K(P,xA),r=n.valueFormatter?n.valueFormatter(P.value,e,n,A):R.formattedValue,a=H({},R,{row:e,formattedValue:r},t);U=n.renderEditCell(a),le.push(X[`cell--editing`]),le.push(se?.[`cell--editing`])}if(U===void 0){let e=ue?.toString();U=e,Ce=e}let we=f?null:{onDragEnter:_e(`cellDragEnter`,D),onDragOver:_e(`cellDragOver`,O)};return(0,W.jsx)(`div`,H({className:V(me.root,le,l),role:`gridcell`,"data-field":N,"data-colindex":s,"aria-colindex":s+1,"aria-colspan":d,"aria-rowspan":ye,style:xe,title:Ce,tabIndex:oe,onClick:_e(`cellClick`,b),onDoubleClick:_e(`cellDoubleClick`,x),onMouseOver:_e(`cellMouseOver`,w),onMouseDown:ge(`cellMouseDown`),onMouseUp:he(`cellMouseUp`),onKeyDown:_e(`cellKeyDown`,T),onKeyUp:_e(`cellKeyUp`,E)},we,k,{onFocus:Se,ref:fe,children:U}))})),wA=[`field`,`type`,`align`,`width`,`height`,`empty`,`style`,`className`,`skeletonProps`],TA=`1.3em`,EA=`1.2em`,DA=[40,80],OA={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},kA=e=>{let{align:t,classes:n,empty:r}=e,i={root:[`cell`,`cellSkeleton`,`cell--text${t?he(t):`Left`}`,r&&`cellEmpty`]};return g(i,zv,n)},AA=zC(12345);function jA(e){let{field:t,type:n,align:r,width:i,height:a,empty:o=!1,style:s,className:c,skeletonProps:l}=e,u=K(e,wA),d=J(),f=kA({classes:d.classes,align:r,empty:o}),p=G.useMemo(()=>{if(n===`boolean`||n===`actions`)return{variant:`circular`,width:TA,height:TA};let[e,t]=n?OA[n]??DA:DA;return{variant:`text`,width:`${Math.round(AA(e,t))}%`,height:EA}},[n]),m=l&&Object.keys(l).length>0?H({},p,l):p;return(0,W.jsx)(`div`,H({"data-field":t,className:V(f.root,c),style:H({height:a,maxWidth:i,minWidth:i},s)},u,{children:!o&&(0,W.jsx)(d.slots.baseSkeleton,H({},m))}))}var MA=JS(jA),NA=()=>()=>{},PA=()=>!1,FA=()=>!0,IA=()=>(0,zp.useSyncExternalStore)(NA,PA,FA),LA=G.createContext(void 0);function RA(){let e=G.useContext(LA);if(e===void 0)throw Error(dp(61));return e}function zA({children:e}){let[t,n]=G.useState({columnsPanel:null,filterPanel:null,aiAssistantPanel:null}),r=G.useCallback((e,t)=>{n(n=>n[e]===t?n:H({},n,{[e]:t}))},[]),i=G.useCallback(e=>{r(`columnsPanel`,e)},[r]),a=G.useCallback(e=>{r(`filterPanel`,e)},[r]),o=G.useCallback(e=>{r(`aiAssistantPanel`,e)},[r]),s=G.useMemo(()=>({triggers:{columnsPanel:{element:t.columnsPanel,setRef:i},filterPanel:{element:t.filterPanel,setRef:a},aiAssistantPanel:{element:t.aiAssistantPanel,setRef:o}}}),[t,i,a,o]);return(0,W.jsx)(LA.Provider,{value:s,children:e})}function BA(){let e=Cv(),t=Z(e,fw),n=J(),r=Z(e,hk),{triggers:i}=RA(),a=e.current.unstable_applyPipeProcessors(`preferencePanel`,null,r.openedPanelValue??_k.filters),o=null;switch(r.openedPanelValue){case _k.filters:o=i.filterPanel.element;break;case _k.columns:o=i.columnsPanel.element;break;case _k.aiAssistant:o=i.aiAssistantPanel.element}return(0,W.jsx)(n.slots.panel,H({id:r.panelId,open:t.length>0&&r.open,"aria-labelledby":r.labelId,target:o,onClose:()=>e.current.hidePreferences()},n.slotProps?.panel,{children:a}))}function VA(){let e=J();return(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(BA,{}),e.showToolbar&&(0,W.jsx)(e.slots.toolbar,H({},e.slotProps?.toolbar))]})}var HA=[`className`,`children`,`sidePanel`],UA=(e,t)=>{let{autoHeight:n,classes:r,showCellVerticalBorder:i}=e,a={root:[`root`,n&&`autoHeight`,`root--density${he(t)}`,e.slots.toolbar===null&&`root--noToolbar`,`withBorderColor`,i&&`withVerticalBorder`]};return g(a,zv,r)},WA=JS(H_(function(e,t){let n=J(),{className:r,children:i,sidePanel:a}=e,o=K(e,HA),s=Jv(),c=Z(s,lC),l=s.current.rootElementRef,u=G.useCallback(e=>{e!==null&&s.current.publishEvent(`rootMount`,e)},[s]),d=p(l,t,u),f=n,m=UA(f,c),h=aT();return IA()?null:(0,W.jsxs)(ty,H({className:V(m.root,r,h.className,a&&X.withSidePanel),ownerState:f},o,{ref:d,children:[(0,W.jsxs)(`div`,{className:X.mainContent,role:`none`,children:[(0,W.jsx)(VA,{}),(0,W.jsx)(lA,{children:i}),(0,W.jsx)(uA,{})]}),a,h.tag]}))})),GA=[`className`],KA=e=>{let{classes:t}=e;return g({root:[`footerContainer`,`withBorderColor`]},zv,t)},qA=S(`div`,{name:`MuiDataGrid`,slot:`FooterContainer`})({display:`flex`,justifyContent:`space-between`,alignItems:`center`,minHeight:52,borderTop:`1px solid`}),JA=H_(function(e,t){let{className:n}=e,r=K(e,GA),i=J(),a=KA(i);return(0,W.jsx)(qA,H({className:V(a.root,n),ownerState:i},r,{ref:t}))}),YA=[`className`],XA=e=>{let{classes:t}=e;return g({root:[`overlay`]},zv,t)},ZA=S(`div`,{name:`MuiDataGrid`,slot:`Overlay`})({width:`100%`,height:`100%`,display:`flex`,gap:Y.spacing(1),flexDirection:`column`,alignSelf:`center`,alignItems:`center`,justifyContent:`center`,textAlign:`center`,textWrap:`balance`,backgroundColor:Y.colors.background.backdrop}),QA=H_(function(e,t){let{className:n}=e,r=K(e,YA),i=J(),a=XA(i);return(0,W.jsx)(ZA,H({className:V(a.root,n),ownerState:i},r,{ref:t}))});function $A(e,t,n,r={}){return typeof t==`function`?t(n,r):t?(t.props.className&&(n.className=ej(t.props.className,n.className)),(t.props.style||n.style)&&(n.style=H({},n.style,t.props.style)),G.cloneElement(t,n)):G.createElement(e,n)}function ej(e,t){return!e||!t?e||t:`${e} ${t}`}var tj=G.createContext(void 0);function nj(){let e=G.useContext(tj);if(e===void 0)throw Error(dp(63));return e}function rj({children:e}){let[t,n]=G.useState(null),r=G.useRef(t),i=G.useRef(null),[a,o]=G.useState([]),s=G.useCallback(e=>{r.current=e,n(e)},[]),c=G.useCallback(()=>a.sort(ij),[a]),l=G.useCallback((e,t,n=!0)=>{let r=e,i=c(),a=i.length;for(let e=0;e=a){if(!n)return-1;r=0}else if(r<0){if(!n)return-1;r=a-1}if(!i[r].ref.current?.disabled&&i[r].ref.current?.ariaDisabled!==`true`)return r}return-1},[c]),u=G.useCallback((e,t)=>{o(n=>[...n,{id:e,ref:t}])},[]),d=G.useCallback(e=>{o(t=>t.filter(t=>t.id!==e))},[]),f=G.useCallback(e=>{if(!t)return;let n=c(),r=n.findIndex(e=>e.id===t),i=-1;if(e.key===`ArrowRight`?(e.preventDefault(),i=l(r,1)):e.key===`ArrowLeft`?(e.preventDefault(),i=l(r,-1)):e.key===`Home`?(e.preventDefault(),i=l(-1,1,!1)):e.key===`End`&&(e.preventDefault(),i=l(n.length,-1,!1)),i>=0&&i{i.current=e,t!==e&&s(e)},[t,s]),m=G.useCallback((e,t)=>{t.currentTarget.disabled||i.current===e&&(i.current=null)},[]),h=G.useCallback(e=>{let t=i.current===e,n=r.current===e;if(!t&&!n)return;let a=c(),o=a.findIndex(t=>t.id===e);if(o===-1)return;let u=t&&!!a[o].ref.current?.disabled,d=l(o,1);if(d>=0&&d{let e=c();if(e.length!==0){if(!r.current){let t=l(-1,1,!1);s(e[t===-1?0:t].id);return}if(!e.some(e=>e.id===r.current)){let t=e[e.length-1];s(t.id),i.current!==null&&!e.some(e=>e.id===i.current)&&(i.current=t.id,t.ref.current?.focus())}}},[c,l,s]);let g=G.useMemo(()=>({focusableItemId:t,registerItem:u,unregisterItem:d,onItemKeyDown:f,onItemFocus:p,onItemBlur:m,onItemDisabled:h}),[t,u,d,f,p,m,h]);return(0,W.jsx)(tj.Provider,{value:g,children:e})}function ij(e,t){if(!e.ref.current||!t.ref.current)return 0;let n=e.ref.current.compareDocumentPosition(t.ref.current);return n?n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0:0}function aj(e,t){let{onKeyDown:n,onFocus:r,onBlur:i,disabled:a,"aria-disabled":o}=e,s=_e(),{focusableItemId:c,registerItem:l,unregisterItem:u,onItemKeyDown:d,onItemFocus:f,onItemBlur:p,onItemDisabled:m}=nj(),h=e=>{d(e),n?.(e)},g=e=>{f(s),r?.(e)},_=e=>{p(s,e),i?.(e)};G.useEffect(()=>(l(s,t),()=>u(s)),[s,t,l,u]);let v=G.useRef(a);G.useEffect(()=>{v.current!==a&&a===!0&&m(s),v.current=a},[a,s,m]);let y=G.useRef(o);return G.useEffect(()=>{y.current!==o&&o===!0&&m(s),y.current=o},[o,s,m]),{tabIndex:c===s?0:-1,disabled:a,"aria-disabled":o,onKeyDown:h,onFocus:g,onBlur:_}}var oj=[`render`,`className`],sj=e=>{let{classes:t}=e;return g({root:[`toolbar`]},zv,t)},cj=m(`div`,{name:`MuiDataGrid`,slot:`Toolbar`})({flex:`0 1 1px`,display:`flex`,alignItems:`center`,justifyContent:`end`,gap:Y.spacing(.25),padding:Y.spacing(.75),minHeight:52,boxSizing:`border-box`,borderBottom:`1px solid ${Y.colors.border.base}`}),lj=H_(function(e,t){let{render:n,className:r}=e,i=K(e,oj),a=J(),o=sj(a),s=$A(cj,n,H({role:`toolbar`,"aria-orientation":`horizontal`,"aria-label":a.label||void 0,className:V(o.root,r)},i,{ref:t}));return(0,W.jsx)(rj,{children:s})}),uj=[`render`,`onKeyDown`,`onFocus`,`onBlur`,`disabled`,`aria-disabled`],dj=[`tabIndex`],fj=H_(function(e,t){let{render:n}=e,r=K(e,uj),i=J(),a=G.useRef(null),o=p(a,t),s=aj(e,a),{tabIndex:c}=s,l=K(s,dj),u=$A(i.slots.baseIconButton,n,H({},i.slotProps?.baseIconButton,{tabIndex:c},r,l,{ref:o}));return(0,W.jsx)(G.Fragment,{children:u})});function pj(e){let{apiRef:t,colDef:n,defaultSlots:r,defaultSlotProps:i,slots:a={},slotProps:o={}}=e,s=H({},r,a),c=i;if(o&&Object.keys(o).length>0){let e=H({},o);Object.entries(i).forEach(([t,n])=>{e[t]=H({},n,o[t]||{})}),c=e}let l=t.current.unstable_applyPipeProcessors(`columnMenu`,[],n),u=Object.keys(r),d=Object.keys(a).filter(e=>!u.includes(e));return Array.from(new Set([...l,...d])).filter(e=>s[e]!=null).sort((e,t)=>{let n=c[e],r=c[t];return(Number.isFinite(n?.displayOrder)?n.displayOrder:100)-(Number.isFinite(r?.displayOrder)?r.displayOrder:100)})}var mj=e=>{let{classes:t,open:n}=e;return g({root:[`menuIcon`,n&&`menuOpen`],button:[`menuIconButton`]},zv,t)},hj=G.memo(e=>{let{colDef:t,open:n,columnMenuId:r,columnMenuButtonId:i,iconButtonRef:a}=e,o=Cv(),s=J(),c=mj(H({},e,{classes:s.classes})),l=G.useCallback(e=>{e.preventDefault(),e.stopPropagation(),o.current.toggleColumnMenu(t.field)},[o,t.field]),u=t.headerName??t.field;return(0,W.jsx)(`div`,{className:c.root,children:(0,W.jsx)(s.slots.baseTooltip,H({title:o.current.getLocaleText(`columnMenuLabel`),enterDelay:1e3},s.slotProps?.baseTooltip,{children:(0,W.jsx)(s.slots.baseIconButton,H({ref:a,tabIndex:-1,className:c.button,"aria-label":o.current.getLocaleText(`columnMenuAriaLabel`)(u),size:`small`,onClick:l,"aria-haspopup":`menu`,"aria-expanded":n,"aria-controls":n?r:void 0,id:i},s.slotProps?.baseIconButton,{children:(0,W.jsx)(s.slots.columnMenuIcon,{fontSize:`inherit`})}))}))})});function gj({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:i,open:a,target:o,onExited:s}){let c=Cv(),l=c.current.getColumn(i),u=D(e=>{e&&(e.stopPropagation(),o?.contains(e.target))||c.current.hideColumnMenu()});return!o||!l?null:(0,W.jsx)(dT,{position:`bottom-${l.align===`right`?`start`:`end`}`,open:a,target:o,onClose:u,onExited:s,children:(0,W.jsx)(n,H({colDef:l,hideMenu:u,open:a,id:e,labelledby:t},r))})}function _j(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function vj(e,t){return e.closest(`.${t}`)}function yj(e){return e.replace(/["\\]/g,`\\$&`)}function bj(e,t){return e.querySelector(`[role="columnheader"][data-field="${yj(t)}"]`)}function xj(e){return`.${X.row}[data-id="${yj(String(e))}"]`}function Sj(e,t){return e.querySelector(xj(t))}function Cj(e,{id:t,field:n}){let r=`${xj(t)} ${`.${X.cell}[data-field="${yj(n)}"]`}`;return e.querySelector(r)}function wj(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function Tj(e){return e.getAttribute(`data-field`)}function Ej(e,t){return e.querySelector(`[data-field="${yj(t)}"]`)}function Dj(e){return e.getAttribute(`data-fields`).slice(2,-2).split(`-|-`)}function Oj(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${yj(t)}-|"]`)??[])}function kj(e,t){if(!vj(e,X.root))throw Error(dp(58));let n=e.getAttribute(`aria-colindex`);if(!n)return[];let r=Number(n)-1,i=[];return t.virtualScrollerRef?.current?(Bj(t).forEach(e=>{let n=e.getAttribute(`data-id`);if(!n)return;let a=r,o=t.unstable_getCellColSpanInfo(n,r);o&&o.spannedByColSpan&&(a=o.leftVisibleCellIndex);let s=e.querySelector(`[data-colindex="${a}"]`);s&&i.push(s)}),i):[]}function Aj(e,t){return e.rootElementRef.current.querySelector(`.${X[t]}`)}var jj=({api:e,colIndex:t,position:n,filterFn:r})=>{if(t===null)return[];let i=[];return Bj(e).forEach(e=>{e.getAttribute(`data-id`)&&e.querySelectorAll(`.${X[n===`left`?`cell--pinnedLeft`:`cell--pinnedRight`]}`).forEach(e=>{let t=Vj(e);t!==null&&r(t)&&i.push(e)})}),i};function Mj(e,t,n){let r=Vj(t);return jj({api:e,colIndex:r,position:n?`right`:`left`,filterFn:e=>n?er})}function Nj(e,t,n){let r=Vj(t);return jj({api:e,colIndex:r,position:n?`left`:`right`,filterFn:e=>n?e>r:e{if(!e.columnHeadersContainerRef?.current||t===null)return[];let i=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${X[n===`left`?`columnHeader--pinnedLeft`:`columnHeader--pinnedRight`]}`).forEach(e=>{let t=Vj(e);t!==null&&r(t,e)&&i.push(e)}),i};function Fj(e,t,n){let r=Vj(t);return Pj({api:e,position:n?`right`:`left`,colIndex:r,filterFn:e=>n?er})}function Ij(e,t,n){let r=Vj(t);return Pj({api:e,position:n?`left`:`right`,colIndex:r,filterFn:(e,t)=>t.classList.contains(X[`columnHeader--last`])?!1:n?e>r:e div > [data-field="${yj(t)}"][role="columnheader"]`)}function Rj(e,t){return e.columnHeadersContainerRef.current.querySelector(`:scope > .${X.headerFilterRow} > [data-field="${yj(t)}"]`)}function zj(e,t){let n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > div > [data-field="${yj(t)}"][role="gridcell"]`))}function Bj(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > div > .${X.row}, + :scope > div > div > div > div > .${X.row}`)}function Vj(e){let t=e.getAttribute(`aria-colindex`);return t?Number(t)-1:null}var Hj=[`className`,`aria-label`],Uj=e=>{let{classes:t}=e;return g({root:[`columnHeaderTitle`]},zv,t)},Wj=m(`div`,{name:`MuiDataGrid`,slot:`ColumnHeaderTitle`})({textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,fontWeight:`var(--unstable_DataGrid-headWeight)`,lineHeight:`normal`}),Gj=H_(function(e,t){let{className:n}=e,r=K(e,Hj),i=J(),a=Uj(i);return(0,W.jsx)(Wj,H({className:V(a.root,n),ownerState:i},r,{ref:t}))});function Kj(e){let{label:t,description:n}=e,r=J(),i=G.useRef(null),[a,o]=G.useState(``),s=G.useCallback(()=>{!n&&i?.current&&(_j(i.current)?o(t):o(``))},[n,t]);return(0,W.jsx)(r.slots.baseTooltip,H({title:n||a},r.slotProps?.baseTooltip,{children:(0,W.jsx)(Gj,{onMouseOver:s,ref:i,children:t})}))}var qj=[`resizable`,`resizing`,`height`,`side`],Jj=function(e){return e.Left=`left`,e.Right=`right`,e}(Jj||{}),Yj=e=>{let{resizable:t,resizing:n,classes:r,side:i}=e,a={root:[`columnSeparator`,t&&`columnSeparator--resizable`,n&&`columnSeparator--resizing`,i&&`columnSeparator--side${he(i)}`],icon:[`iconSeparator`]};return g(a,zv,r)};function Xj(e){let{height:t,side:n=Jj.Right}=e,r=K(e,qj),i=J(),a=Yj(H({},e,{side:n,classes:i.classes})),o=G.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]);return(0,W.jsx)(`div`,H({className:a.root,style:{minHeight:t}},r,{onClick:o,children:(0,W.jsx)(i.slots.columnResizeIcon,{className:a.icon})}))}var Zj=G.memo(Xj),Qj=[`classes`,`columnMenuOpen`,`colIndex`,`height`,`isResizing`,`sortDirection`,`hasFocus`,`tabIndex`,`separatorSide`,`isDraggable`,`headerComponent`,`description`,`elementId`,`width`,`columnMenuIconButton`,`columnMenu`,`columnTitleIconButtons`,`headerClassName`,`label`,`resizable`,`draggableContainerProps`,`columnHeaderSeparatorProps`,`style`],$j=H_(function(e,t){let{classes:n,colIndex:r,height:i,isResizing:a,sortDirection:o,tabIndex:s,separatorSide:c,isDraggable:l,headerComponent:u,description:d,width:f,columnMenuIconButton:m=null,columnMenu:h=null,columnTitleIconButtons:g=null,headerClassName:_,label:v,resizable:y,draggableContainerProps:b,columnHeaderSeparatorProps:x,style:S}=e,C=K(e,Qj),w=J(),T=G.useRef(null),E=p(T,t),D=`none`;return o!=null&&(D=o===`asc`?`ascending`:`descending`),(0,W.jsxs)(`div`,H({className:V(n.root,_),style:H({},S,{width:f}),role:`columnheader`,tabIndex:s,"aria-colindex":r+1,"aria-sort":D},C,{ref:E,children:[(0,W.jsxs)(`div`,H({className:n.draggableContainer,draggable:l,role:`none`},b,{children:[(0,W.jsxs)(`div`,{className:n.titleContainer,role:`none`,children:[(0,W.jsx)(`div`,{className:n.titleContainerContent,children:u===void 0?(0,W.jsx)(Kj,{label:v,description:d,columnWidth:f}):u}),g]}),m]})),(0,W.jsx)(Zj,H({resizable:!w.disableColumnResize&&!!y,resizing:a,height:i,side:c},x)),h]}))}),eM=e=>{let{disableColumnSorting:t}=J(),{colDef:n,classes:r,isDragging:i,sortDirection:a,showRightBorder:o,showLeftBorder:s,filterItemsCounter:c,pinnedPosition:l,isSiblingFocused:u}=e,d=n.sortable&&!t,f=a!=null,p=c!=null&&c>0,m=n.type===`number`,h={root:[`columnHeader`,n.headerAlign&&`columnHeader--align${he(n.headerAlign)}`,d&&`columnHeader--sortable`,i&&`columnHeader--moving`,f&&`columnHeader--sorted`,p&&`columnHeader--filtered`,m&&`columnHeader--numeric`,`withBorderColor`,o&&`columnHeader--withRightBorder`,s&&`columnHeader--withLeftBorder`,l===ST.LEFT&&`columnHeader--pinnedLeft`,l===ST.RIGHT&&`columnHeader--pinnedRight`,u&&`columnHeader--siblingFocused`],draggableContainer:[`columnHeaderDraggableContainer`],titleContainer:[`columnHeaderTitleContainer`],titleContainerContent:[`columnHeaderTitleContainerContent`]};return g(h,zv,r)};function tM(e){let{colDef:t,columnMenuOpen:n,colIndex:r,headerHeight:i,isResizing:a,isLast:o,sortDirection:s,sortIndex:c,filterItemsCounter:l,hasFocus:u,tabIndex:d,disableReorder:f,separatorSide:p,showLeftBorder:m,showRightBorder:h,pinnedPosition:g,pinnedOffset:_}=e,v=Jv(),y=J(),b=Ie(),x=G.useRef(null),S=_e(),C=_e(),w=G.useRef(null),[T,E]=G.useState(n),D=y.slotProps?.columnMenu,O=y.slots.columnMenu,k=O?.defaultSlots,A=O?.defaultSlotProps,j=k!=null&&A!=null,M=G.useMemo(()=>j?pj({apiRef:v,colDef:t,defaultSlots:k,defaultSlotProps:A,slots:D?.slots,slotProps:D?.slotProps}):[],[v,t,A,k,j,D?.slotProps,D?.slots]),N=!j||M.length>0,P=!y.disableColumnReorder&&!f&&!t.disableReorder,ee;t.renderHeader&&(ee=t.renderHeader(v.current.getColumnHeaderParams(t.field)));let F=eM(H({},e,{classes:y.classes,showRightBorder:h,showLeftBorder:m})),I=G.useCallback(e=>n=>{wj(n)||v.current.publishEvent(e,v.current.getColumnHeaderParams(t.field),n)},[v,t.field]),L=G.useMemo(()=>({onClick:I(`columnHeaderClick`),onContextMenu:I(`columnHeaderContextMenu`),onDoubleClick:I(`columnHeaderDoubleClick`),onMouseOver:I(`columnHeaderOver`),onMouseOut:I(`columnHeaderOut`),onMouseEnter:I(`columnHeaderEnter`),onMouseLeave:I(`columnHeaderLeave`),onKeyDown:I(`columnHeaderKeyDown`),onFocus:I(`columnHeaderFocus`),onBlur:I(`columnHeaderBlur`)}),[I]),R=G.useMemo(()=>P?{onDragStart:I(`columnHeaderDragStart`),onDragEnter:I(`columnHeaderDragEnter`),onDragOver:I(`columnHeaderDragOver`),onDragEndCapture:I(`columnHeaderDragEnd`)}:{},[P,I]),z=G.useMemo(()=>({onMouseDown:I(`columnSeparatorMouseDown`),onDoubleClick:I(`columnSeparatorDoubleClick`)}),[I]);G.useEffect(()=>{!T&&n&&E(n)},[T,n]),G.useEffect(()=>{j&&n&&!N&&v.current.hideColumnMenu()},[v,n,N,j]);let te=G.useCallback(()=>{E(!1)},[]),ne=!y.disableColumnMenu&&!t.disableColumnMenu&&N&&(0,W.jsx)(hj,{colDef:t,columnMenuId:S,columnMenuButtonId:C,open:T,iconButtonRef:w}),re=(0,W.jsx)(gj,{columnMenuId:S,columnMenuButtonId:C,field:t.field,open:n,target:w.current,ContentComponent:y.slots.columnMenu,contentComponentProps:y.slotProps?.columnMenu,onExited:te}),B=t.sortingOrder??y.sortingOrder,ie=(t.sortable||s!=null)&&!t.hideSortIcons&&!y.disableColumnSorting,ae=(0,W.jsxs)(G.Fragment,{children:[!y.disableColumnFilter&&(0,W.jsx)(y.slots.columnHeaderFilterIconButton,H({field:t.field,counter:l},y.slotProps?.columnHeaderFilterIconButton)),ie&&(0,W.jsx)(y.slots.columnHeaderSortIcon,H({field:t.field,direction:s,index:c,sortingOrder:B,disabled:!t.sortable},y.slotProps?.columnHeaderSortIcon))]});G.useLayoutEffect(()=>{let e=v.current.state.columnMenu;if(u&&!e.open){let e=x.current.querySelector(`[tabindex="0"]`)||x.current;if(!e)return;pA(e,v)}},[v,u]);let oe=typeof t.headerClassName==`function`?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,se=t.headerName??t.field,ce=mA(v,g),le=G.useMemo(()=>yA(H({},e.style),b,g,_===void 0?void 0:_+ce),[g,_,ce,e.style,b]);return(0,W.jsx)($j,H({ref:x,classes:F,columnMenuOpen:n,colIndex:r,height:i,isResizing:a,sortDirection:s,hasFocus:u,tabIndex:d,separatorSide:p,isDraggable:P,headerComponent:ee,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:ne,columnTitleIconButtons:ae,headerClassName:V(oe,o&&X[`columnHeader--last`]),label:se,resizable:!y.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:re,draggableContainerProps:R,columnHeaderSeparatorProps:z,style:le},L))}var nM=JS(tM),rM=[`className`],iM=e=>{let{classes:t}=e;return g({root:[`iconButtonContainer`]},zv,t)},aM=m(`div`,{name:`MuiDataGrid`,slot:`IconButtonContainer`})(()=>({display:`flex`,visibility:`hidden`,width:0})),oM=H_(function(e,t){let{className:n}=e,r=K(e,rM),i=J(),a=iM(i);return(0,W.jsx)(aM,H({className:V(a.root,n),ownerState:i},r,{ref:t}))}),sM=[`direction`,`index`,`sortingOrder`,`disabled`,`className`],cM=e=>{let{classes:t}=e;return g({root:[`sortButton`],icon:[`sortIcon`]},zv,t)},lM=m(dC,{name:`MuiDataGrid`,slot:`SortButton`})({transition:Y.transition([`opacity`],{duration:Y.transitions.duration.short,easing:Y.transitions.easing.easeInOut})});function uM(e,t,n,r){let i,a={};return t===`asc`?i=e.columnSortedAscendingIcon:t===`desc`?i=e.columnSortedDescendingIcon:(i=e.columnUnsortedIcon,a.sortingOrder=r),i?(0,W.jsx)(i,H({fontSize:`small`,className:n},a)):null}function dM(e){let{direction:t,index:n,sortingOrder:r,disabled:i,className:a}=e,o=K(e,sM),s=Cv(),c=J(),l=H({},e,{classes:c.classes}),u=cM(l),d=uM(c.slots,t,u.icon,r);if(!d)return null;let f=(0,W.jsx)(lM,H({as:c.slots.baseIconButton,ownerState:l,"aria-label":s.current.getLocaleText(`columnHeaderSortIconLabel`),size:`small`,disabled:i,className:V(u.root,a)},c.slotProps?.baseIconButton,o,{children:d}));return(0,W.jsx)(c.slots.baseTooltip,H({title:s.current.getLocaleText(`columnHeaderSortIconLabel`),enterDelay:1e3},c.slotProps?.baseTooltip,{children:(0,W.jsxs)(`span`,{children:[n!=null&&(0,W.jsx)(c.slots.baseBadge,{badgeContent:n,color:`default`,overlap:`circular`,children:f}),n==null&&f]})}))}function fM(e){return(0,W.jsx)(oM,{children:(0,W.jsx)(dM,H({},e,{tabIndex:-1}))})}var pM=G.memo(fM),mM=e=>{let{classes:t}=e;return g({icon:[`filterIcon`]},zv,t)};function hM(e){return e.counter?(0,W.jsx)(gM,H({},e)):null}function gM(e){let{counter:t,field:n,onClick:r}=e,i=Cv(),a=J(),o=mM(H({},e,{classes:a.classes})),s=_e(),c=Z(i,gk,s),l=_e(),u=G.useCallback(e=>{e.preventDefault(),e.stopPropagation();let{open:t,openedPanelValue:a}=hk(i);t&&a===_k.filters?i.current.hideFilterPanel():i.current.showFilterPanel(void 0,l,s),r&&r(i.current.getColumnHeaderParams(n),e)},[i,n,r,l,s]);if(!t)return null;let d=(0,W.jsx)(a.slots.baseIconButton,H({id:s,onClick:u,"aria-label":i.current.getLocaleText(`columnHeaderFiltersLabel`),size:`small`,tabIndex:-1,"aria-haspopup":`menu`,"aria-expanded":c,"aria-controls":c?l:void 0},a.slotProps?.baseIconButton,{children:(0,W.jsx)(a.slots.columnFilteredIcon,{className:o.icon,fontSize:`small`})}));return(0,W.jsx)(a.slots.baseTooltip,H({title:i.current.getLocaleText(`columnHeaderFiltersTooltipActive`)(t),enterDelay:1e3},a.slotProps?.baseTooltip,{children:(0,W.jsxs)(oM,{children:[t>1&&(0,W.jsx)(a.slots.baseBadge,{badgeContent:t,color:`default`,children:d}),t===1&&d]})}))}var _M=[`rowId`,`material`],vM=H_(function(e,t){let{material:n}=e,r=K(e,_M),i=J();return(0,W.jsx)(i.slots.baseCheckbox,H({},i.slotProps?.baseCheckbox,r,{material:H({disableRipple:e.disabled},n),ref:t}))}),yM=[`hideMenu`,`colDef`,`id`,`labelledby`,`className`,`children`,`open`],bM=m(dC,{slot:`internal`})(()=>({minWidth:248}));function xM(e){e.currentTarget.contains(e.target)&&e.stopPropagation()}var SM=H_(function(e,t){let{hideMenu:n,id:r,labelledby:i,className:a,children:o,open:s}=e,c=K(e,yM),l=J(),u=G.useCallback(e=>{e.key===`Tab`&&e.preventDefault(),Zw(e.key)&&n(e)},[n]);return(0,W.jsx)(bM,H({as:l.slots.baseMenuList,id:r,className:V(X.menuList,a),"aria-labelledby":i,onKeyDown:u,onWheel:xM,onTouchMove:xM,autoFocus:s},c,{ref:t,children:o}))}),CM=[`displayOrder`],wM=e=>{let t=Jv(),n=J(),{defaultSlots:r,defaultSlotProps:i,slots:a={},slotProps:o={},hideMenu:s,colDef:c,addDividers:l=!0}=e,u=G.useMemo(()=>H({},r,a),[r,a]),d=G.useMemo(()=>{if(!o||Object.keys(o).length===0)return i;let e=H({},o);return Object.entries(i).forEach(([t,n])=>{e[t]=H({},n,o[t]||{})}),e},[i,o]);return G.useMemo(()=>{let e=pj({apiRef:t,colDef:c,defaultSlots:r,defaultSlotProps:i,slots:a,slotProps:o});return e.reduce((t,r,i)=>{let a={colDef:c,onClick:s},o=d[r];if(o){let e=K(o,CM);a=H({},a,e)}return l&&i!==e.length-1?[...t,[u[r],a],[n.slots.baseDivider,{}]]:[...t,[u[r],a]]},[])},[l,t,c,i,r,s,u,d,o,a,n.slots.baseDivider])};function TM(e){let{colDef:t,onClick:n}=e,r=Cv(),i=J(),a=hw(r).filter(e=>e.disableColumnMenu!==!0).length===1,o=G.useCallback(e=>{a||(r.current.setColumnVisibility(t.field,!1),n(e))},[r,t.field,n,a]);return i.disableColumnSelector||t.hideable===!1?null:(0,W.jsx)(i.slots.baseMenuItem,{onClick:o,disabled:a,iconStart:(0,W.jsx)(i.slots.columnMenuHideIcon,{fontSize:`small`}),children:r.current.getLocaleText(`columnMenuHideColumn`)})}function EM(e){let{onClick:t}=e,n=Cv(),r=J(),i=G.useCallback(e=>{t(e),n.current.showPreferences(_k.columns)},[n,t]);return r.disableColumnSelector?null:(0,W.jsx)(r.slots.baseMenuItem,{onClick:i,iconStart:(0,W.jsx)(r.slots.columnMenuManageColumnsIcon,{fontSize:`small`}),children:n.current.getLocaleText(`columnMenuManageColumns`)})}function DM(e){return(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(TM,H({},e)),(0,W.jsx)(EM,H({},e))]})}function OM(e){let{colDef:t,onClick:n}=e,r=Cv(),i=J(),a=G.useCallback(e=>{n(e),r.current.showFilterPanel(t.field)},[r,t.field,n]);return i.disableColumnFilter||!t.filterable?null:(0,W.jsx)(i.slots.baseMenuItem,{onClick:a,iconStart:(0,W.jsx)(i.slots.columnMenuFilterIcon,{fontSize:`small`}),children:r.current.getLocaleText(`columnMenuFilter`)})}function kM(e){let{colDef:t,onClick:n}=e,r=Cv(),i=Z(r,JT),a=J(),o=G.useMemo(()=>t?i.find(e=>e.field===t.field)?.sort:null,[t,i]),s=t.sortingOrder??a.sortingOrder,c=G.useCallback(e=>{n(e);let i=e.currentTarget.getAttribute(`data-value`)||null,s=a.multipleColumnsSortingMode===`always`;r.current.sortColumn(t.field,i===o?null:i,s)},[r,t,n,o,a.multipleColumnsSortingMode]);if(a.disableColumnSorting||!t||!t.sortable||!s.some(e=>!!e))return null;let l=e=>{let n=r.current.getLocaleText(e);return typeof n==`function`?n(t):n};return(0,W.jsxs)(G.Fragment,{children:[s.includes(`asc`)&&o!==`asc`?(0,W.jsx)(a.slots.baseMenuItem,{onClick:c,"data-value":`asc`,iconStart:(0,W.jsx)(a.slots.columnMenuSortAscendingIcon,{fontSize:`small`}),children:l(`columnMenuSortAsc`)}):null,s.includes(`desc`)&&o!==`desc`?(0,W.jsx)(a.slots.baseMenuItem,{onClick:c,"data-value":`desc`,iconStart:(0,W.jsx)(a.slots.columnMenuSortDescendingIcon,{fontSize:`small`}),children:l(`columnMenuSortDesc`)}):null,s.includes(null)&&o!=null?(0,W.jsx)(a.slots.baseMenuItem,{onClick:c,iconStart:a.slots.columnMenuUnsortIcon?(0,W.jsx)(a.slots.columnMenuUnsortIcon,{fontSize:`small`}):(0,W.jsx)(`span`,{}),children:r.current.getLocaleText(`columnMenuUnsort`)}):null]})}var AM=[`defaultSlots`,`defaultSlotProps`,`slots`,`slotProps`],jM={columnMenuSortItem:kM,columnMenuFilterItem:OM,columnMenuColumnsItem:DM},MM={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},NM=H_(function(e,t){let{defaultSlots:n,defaultSlotProps:r,slots:i,slotProps:a}=e,o=K(e,AM),s=wM(H({},o,{defaultSlots:n,defaultSlotProps:r,slots:i,slotProps:a}));return(0,W.jsx)(SM,H({},o,{ref:t,children:s.map(([e,t],n)=>(0,W.jsx)(e,H({},t),n))}))}),PM=H_(function(e,t){return(0,W.jsx)(NM,H({},e,{ref:t,defaultSlots:jM,defaultSlotProps:MM}))});PM.defaultSlots=jM,PM.defaultSlotProps=MM;var FM=[`className`],IM=e=>{let{classes:t}=e;return g({root:[`panelWrapper`]},zv,t)},LM=m(`div`,{name:`MuiDataGrid`,slot:`PanelWrapper`})({display:`flex`,flexDirection:`column`,flex:1,"&:focus":{outline:0}}),RM=H_(function(e,t){let{className:n}=e,r=K(e,FM),i=J(),a=IM(i);return(0,W.jsx)(LM,H({tabIndex:-1,className:V(a.root,n),ownerState:i},r,{ref:t}))});function zM(e){let t=J();return(0,W.jsx)(RM,H({},e,{children:(0,W.jsx)(t.slots.columnsManagement,H({},t.slotProps?.columnsManagement))}))}var BM=[`children`,`className`,`classes`,`onClose`],VM=z(`MuiDataGrid`,[`panel`,`paper`]),HM=m(dC,{name:`MuiDataGrid`,slot:`panel`})({zIndex:Y.zIndex.panel}),UM=m(`div`,{name:`MuiDataGrid`,slot:`panelContent`})({backgroundColor:Y.colors.background.overlay,borderRadius:Y.radius.base,boxShadow:Y.shadows.overlay,display:`flex`,maxWidth:`calc(100vw - ${Y.spacing(2)})`,overflow:`auto`}),WM=H_((e,t)=>{let{children:n,className:r,onClose:i}=e,a=K(e,BM),o=Cv(),s=J(),c=VM,[l,u]=G.useState(!1),d=iT(),f=D(()=>u(!0)),p=D(()=>u(!1)),m=D(()=>{i?.()}),h=D(e=>{e.key===`Escape`&&i?.()}),[g,_]=G.useState(null);return G.useEffect(()=>{let e=o.current.rootElementRef?.current?.querySelector(`[data-id="gridPanelAnchor"]`);e&&_(e)},[o]),g?(0,W.jsx)(HM,H({as:s.slots.basePopper,ownerState:s,placement:`bottom-end`,className:V(c.panel,r,d),flip:!0,onDidShow:f,onDidHide:p,onClickAway:m,clickAwayMouseEvent:`onPointerUp`,clickAwayTouchEvent:!1,focusTrap:!0},a,s.slotProps?.basePopper,{target:e.target??g,ref:t,children:(0,W.jsx)(UM,{className:c.paper,ownerState:s,onKeyDown:h,children:l&&n})})):null}),GM=[`className`],KM=e=>{let{classes:t}=e;return g({root:[`panelContent`]},zv,t)},qM=S(`div`,{name:`MuiDataGrid`,slot:`PanelContent`})({display:`flex`,flexDirection:`column`,overflow:`auto`,flex:`1 1`,maxHeight:400,padding:Y.spacing(2.5,1.5,2,1),gap:Y.spacing(2.5)});function JM(e){let{className:t}=e,n=K(e,GM),r=J(),i=KM(r);return(0,W.jsx)(qM,H({className:V(i.root,t),ownerState:r},n))}var YM=[`className`],XM=e=>{let{classes:t}=e;return g({root:[`panelFooter`]},zv,t)},ZM=m(`div`,{name:`MuiDataGrid`,slot:`PanelFooter`})({padding:Y.spacing(1),display:`flex`,justifyContent:`space-between`,borderTop:`1px solid ${Y.colors.border.base}`});function QM(e){let{className:t}=e,n=K(e,YM),r=J(),i=XM(r);return(0,W.jsx)(ZM,H({className:V(i.root,t),ownerState:r},n))}var $M=[`item`,`hasMultipleFilters`,`deleteFilter`,`applyFilterChanges`,`showMultiFilterOperators`,`disableMultiFilterOperator`,`applyMultiFilterOperatorChanges`,`focusElementRef`,`logicOperators`,`columnsSort`,`filterColumns`,`deleteIconProps`,`logicOperatorInputProps`,`operatorInputProps`,`columnInputProps`,`valueInputProps`,`disableDebounce`,`readOnly`,`filterModel`,`children`],eN=[`InputComponentProps`],tN=e=>{let{classes:t}=e;return g({root:[`filterForm`],deleteIcon:[`filterFormDeleteIcon`],logicOperatorInput:[`filterFormLogicOperatorInput`],columnInput:[`filterFormColumnInput`],operatorInput:[`filterFormOperatorInput`],valueInput:[`filterFormValueInput`]},zv,t)},nN=m(`div`,{name:`MuiDataGrid`,slot:`FilterForm`})({display:`flex`,gap:Y.spacing(1.5)}),rN=m(`div`,{name:`MuiDataGrid`,slot:`FilterFormDeleteIcon`})({flexShrink:0,display:`flex`,justifyContent:`center`,alignItems:`center`}),iN=m(`div`,{name:`MuiDataGrid`,slot:`FilterFormLogicOperatorInput`})({minWidth:75,justifyContent:`end`}),aN=m(`div`,{name:`MuiDataGrid`,slot:`FilterFormColumnInput`})({width:150}),oN=m(`div`,{name:`MuiDataGrid`,slot:`FilterFormOperatorInput`})({width:150}),sN=m(`div`,{name:`MuiDataGrid`,slot:`FilterFormValueInput`})({width:190}),cN=e=>{switch(e){case qC.And:return`filterPanelOperatorAnd`;case qC.Or:return`filterPanelOperatorOr`;default:throw Error(dp(71))}},lN=e=>e.headerName||e.field,uN=new Intl.Collator,dN=H_(function(e,t){let{item:n,hasMultipleFilters:r,deleteFilter:i,applyFilterChanges:a,showMultiFilterOperators:o,disableMultiFilterOperator:s,applyMultiFilterOperatorChanges:c,focusElementRef:l,logicOperators:u=[qC.And,qC.Or],columnsSort:d,filterColumns:f,deleteIconProps:p={},logicOperatorInputProps:m={},operatorInputProps:h={},columnInputProps:g={},valueInputProps:_={},disableDebounce:v=!1,readOnly:y,filterModel:b}=e,x=K(e,$M),S=Cv(),C=Z(S,dw),w=Z(S,xw),T=_e(),E=_e(),D=_e(),O=_e(),k=J(),A=tN(k),j=G.useRef(null),M=G.useRef(null),N=b.logicOperator??qC.And,P=r&&u.length>0,ee=(k.slotProps?.baseSelect||{}).native??!1,F=k.slotProps?.baseSelectOption||{},{InputComponentProps:I}=_,L=K(_,eN),R=Z(S,RO),z=Z(S,BO),{filteredColumns:te,selectedField:ne}=G.useMemo(()=>{let e=n.field,t=C[n.field].filterable===!1?C[n.field]:null;if(t)return{filteredColumns:[t],selectedField:e};if(R)return{filteredColumns:w.filter(e=>z.get(e.field)!==void 0),selectedField:e};if(f===void 0||typeof f!=`function`)return{filteredColumns:w,selectedField:e};let r=f({field:n.field,columns:w,currentFilters:b?.items||[]});return{filteredColumns:w.filter(t=>{let i=r.includes(t.field);return t.field===n.field&&!i&&(e=void 0),i}),selectedField:e}},[n.field,C,R,f,w,b?.items,z]),re=G.useMemo(()=>{switch(d){case`asc`:return te.sort((e,t)=>uN.compare(lN(e),lN(t)));case`desc`:return te.sort((e,t)=>-uN.compare(lN(e),lN(t)));default:return te}},[te,d]),B=n.field?S.current.getColumn(n.field):null,ie=G.useMemo(()=>!n.operator||!B?null:B.filterOperators?.find(e=>e.value===n.operator),[n,B]),ae=G.useCallback(e=>{let t=e.target.value,r=S.current.getColumn(t);if(r.field===B.field)return;let i=r.filterOperators.find(e=>e.value===n.operator)||r.filterOperators[0],o=!i.InputComponent||i.InputComponent!==ie?.InputComponent||r.type!==B.type?void 0:n.value;if(r.type===`singleSelect`&&o!==void 0){let e=r,t=wD(e);Array.isArray(o)?o=o.filter(n=>TD(n,t,e?.getOptionValue)!==void 0):TD(n.value,t,e?.getOptionValue)===void 0&&(o=void 0)}a(H({},n,{field:t,operator:i.value,value:o}))},[S,a,n,B,ie]),oe=G.useCallback(e=>{let t=e.target.value,r=B?.filterOperators.find(e=>e.value===t),i=!r?.InputComponent||r?.InputComponent!==ie?.InputComponent;a(H({},n,{operator:t,value:i?void 0:n.value}))},[a,n,B,ie]),se=G.useCallback(e=>{let t=e.target.value===qC.And.toString()?qC.And:qC.Or;c(t)},[c]);return G.useImperativeHandle(l,()=>({focus:()=>{ie?.InputComponent?j?.current?.focus():M.current.focus()}}),[ie]),(0,W.jsxs)(nN,H({className:A.root,"data-id":n.id,ownerState:k},x,{ref:t,children:[(0,W.jsx)(rN,H({},p,{className:V(A.deleteIcon,p.className),ownerState:k,children:(0,W.jsx)(k.slots.baseIconButton,H({"aria-label":S.current.getLocaleText(`filterPanelDeleteIconLabel`),title:S.current.getLocaleText(`filterPanelDeleteIconLabel`),onClick:()=>{i(n)},size:`small`,disabled:y},k.slotProps?.baseIconButton,{children:(0,W.jsx)(k.slots.filterPanelDeleteIcon,{fontSize:`small`})}))})),(0,W.jsx)(iN,H({as:k.slots.baseSelect,sx:[P?{display:`flex`}:{display:`none`},o?{visibility:`visible`}:{visibility:`hidden`},m.sx],className:V(A.logicOperatorInput,m.className),ownerState:k},m,{size:`small`,slotProps:{htmlInput:{"aria-label":S.current.getLocaleText(`filterPanelLogicOperator`)}},value:N??``,onChange:se,disabled:!!s||u.length===1,native:ee},k.slotProps?.baseSelect,{children:u.map(e=>(0,G.createElement)(k.slots.baseSelectOption,H({},F,{native:ee,key:e.toString(),value:e.toString()}),S.current.getLocaleText(cN(e))))})),(0,W.jsx)(aN,H({as:k.slots.baseSelect},g,{className:V(A.columnInput,g.className),ownerState:k,size:`small`,labelId:E,id:T,label:S.current.getLocaleText(`filterPanelColumn`),value:ne??``,onChange:ae,native:ee,disabled:y},k.slotProps?.baseSelect,{children:re.map(e=>(0,G.createElement)(k.slots.baseSelectOption,H({},F,{native:ee,key:e.field,value:e.field}),lN(e)))})),(0,W.jsx)(oN,H({as:k.slots.baseSelect,size:`small`},h,{className:V(A.operatorInput,h.className),ownerState:k,labelId:O,label:S.current.getLocaleText(`filterPanelOperator`),id:D,value:n.operator,onChange:oe,native:ee,inputRef:M,disabled:y},k.slotProps?.baseSelect,{children:B?.filterOperators?.map(e=>(0,G.createElement)(k.slots.baseSelectOption,H({},F,{native:ee,key:e.value,value:e.value}),e.label||S.current.getLocaleText(`filterOperator${he(e.value)}`)))})),(0,W.jsx)(sN,H({},L,{className:V(A.valueInput,L.className),ownerState:k,children:ie?.InputComponent?(0,W.jsx)(ie.InputComponent,H({apiRef:S,item:n,applyValue:a,focusElementRef:j,disabled:y,disableDebounce:v,slotProps:{root:{size:`small`}}},ie.InputComponentProps,I),n.field):null}))]}))}),fN=[`logicOperators`,`columnsSort`,`filterFormProps`,`getColumnForNewFilter`,`children`,`disableAddFilterButton`,`disableRemoveAllButton`,`disableDebounce`,`filterModel`,`onFilterModelChange`,`onClose`],pN=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),mN=H_(function(e,t){let n=Cv(),r=J(),i=Z(n,xw),a=Z(n,Sw),o=G.useRef(null),s=G.useRef(null),{logicOperators:c=[qC.And,qC.Or],columnsSort:l,filterFormProps:u,getColumnForNewFilter:d,disableAddFilterButton:f=!1,disableRemoveAllButton:p=!1,disableDebounce:m=!0,filterModel:h,onFilterModelChange:g,onClose:_}=e,v=K(e,fN),y=G.useCallback(e=>{g(ww(h,e),`upsertFilterItem`)},[h,g]),b=G.useCallback(e=>{g(Dw(h,e),`changeLogicOperator`)},[h,g]),x=G.useCallback(()=>{let e;if(d&&typeof d==`function`){let t=d({currentFilters:h?.items||[],columns:i});if(t===null)return null;e=i.find(({field:e})=>e===t)}else e=i.find(e=>e.filterOperators?.length);return e?pN(e):null},[h?.items,i,d]),S=G.useCallback(()=>{if(d===void 0||typeof d!=`function`)return x();let e=h.items.length?h.items:[x()].filter(Boolean),t=d({currentFilters:e,columns:i});if(t===null)return null;let n=i.find(({field:e})=>e===t);return n?pN(n):null},[h.items,i,d,x]),C=G.useMemo(()=>h.items.length?h.items:(s.current||=x(),s.current?[s.current]:[]),[h.items,x]),w=C.length>1,{readOnlyFilters:T,validFilters:E}=G.useMemo(()=>C.reduce((e,t)=>(a[t.field]?e.validFilters.push(t):e.readOnlyFilters.push(t),e),{readOnlyFilters:[],validFilters:[]}),[C,a]),D=G.useCallback(()=>{let e=S();e&&g(Tw(h,[...C,e]),`upsertFilterItems`)},[h,g,S,C]),O=G.useCallback(e=>{let t=E.length===1;g(Ew(h,e),`deleteFilterItem`),t&&_?.()},[h,g,_,E.length]),k=G.useCallback(()=>{if(E.length===1&&E[0].value===void 0){g(Ew(h,E[0]),`deleteFilterItem`),_?.();return}g(H({},h,{items:T}),`removeAllFilterItems`)},[h,g,_,T,E]);return G.useEffect(()=>{c.length>0&&h.logicOperator&&!c.includes(h.logicOperator)&&b(c[0])},[c,b,h.logicOperator]),G.useEffect(()=>{E.length>0&&o.current.focus()},[E.length]),(0,W.jsxs)(RM,H({},v,{ref:t,children:[(0,W.jsxs)(JM,{children:[T.map((e,t)=>(0,W.jsx)(dN,H({item:e,filterModel:h,applyFilterChanges:y,deleteFilter:O,hasMultipleFilters:w,showMultiFilterOperators:t>0,disableMultiFilterOperator:t!==1,applyMultiFilterOperatorChanges:b,focusElementRef:null,readOnly:!0,logicOperators:c,columnsSort:l,disableDebounce:m},u),e.id==null?t:e.id)),E.map((e,t)=>(0,W.jsx)(dN,H({item:e,filterModel:h,applyFilterChanges:y,deleteFilter:O,hasMultipleFilters:w,showMultiFilterOperators:T.length+t>0,disableMultiFilterOperator:T.length+t!==1,applyMultiFilterOperatorChanges:b,focusElementRef:t===E.length-1?o:null,logicOperators:c,columnsSort:l,disableDebounce:m},u),e.id==null?t+T.length:e.id))]}),!r.disableMultipleColumnsFiltering&&!(f&&p)?(0,W.jsxs)(QM,{children:[f?(0,W.jsx)(`span`,{}):(0,W.jsx)(r.slots.baseButton,H({onClick:D,startIcon:(0,W.jsx)(r.slots.filterPanelAddIcon,{})},r.slotProps?.baseButton,{children:n.current.getLocaleText(`filterPanelAddFilter`)})),!p&&E.length>0?(0,W.jsx)(r.slots.baseButton,H({onClick:k,startIcon:(0,W.jsx)(r.slots.filterPanelRemoveAllIcon,{})},r.slotProps?.baseButton,{children:n.current.getLocaleText(`filterPanelRemoveAll`)})):null]}):null]}))}),hN=H_(function(e,t){let n=Cv(),r=Z(n,ZT),i=G.useCallback((e,t)=>{n.current.setFilterModel(e,t)},[n]),a=G.useCallback(()=>{n.current.hideFilterPanel()},[n]);return(0,W.jsx)(mN,H({},e,{filterModel:r,onFilterModelChange:i,onClose:a,ref:t,disableDebounce:!1}))}),gN=(e,t)=>{let n=new Set(Object.keys(e).filter(t=>e[t]===!1)),r=new Set(Object.keys(t).filter(e=>t[e]===!1));if(n.size!==r.size)return!1;let i=!0;return n.forEach(e=>{r.has(e)||(i=!1)}),i},_N=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,vN=[`children`],yN=ne({from:{opacity:0},to:{opacity:1}}),bN=ne({"from, to":{"--scrollable":`" "`}}),xN=S(`div`,{name:`MuiDataGrid`,slot:`ShadowScrollArea`})` + flex: 1; + display: flex; + flex-direction: column; + animation: ${bN}; + animation-timeline: --scroll-timeline; + animation-fill-mode: none; + box-sizing: border-box; + overflow: auto; + scrollbar-width: thin; + scroll-timeline: --scroll-timeline block; + + &::before, + &::after { + content: ''; + flex-shrink: 0; + display: block; + position: sticky; + left: 0; + width: 100%; + height: 4px; + animation: ${yN} linear both; + animation-timeline: --scroll-timeline; + + // Custom property toggle trick: + // - Detects if the element is scrollable + // - https://css-tricks.com/the-css-custom-property-toggle-trick/ + --visibility-scrollable: var(--scrollable) visible; + --visibility-not-scrollable: hidden; + visibility: var(--visibility-scrollable, var(--visibility-not-scrollable)); + } + + &::before { + top: 0; + background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0, transparent 100%); + animation-range: 0 4px; + } + + &::after { + bottom: 0; + background: linear-gradient(to top, rgba(0, 0, 0, 0.05) 0, transparent 100%); + animation-direction: reverse; + animation-range: calc(100% - 4px) 100%; + } +`,SN=H_(function(e,t){let{children:n}=e,r=K(e,vN);return(0,W.jsx)(xN,H({},r,{ref:t,children:n}))}),CN=e=>{let{classes:t}=e;return g({root:[`columnsManagement`],header:[`columnsManagementHeader`],searchInput:[`columnsManagementSearchInput`],footer:[`columnsManagementFooter`],row:[`columnsManagementRow`]},zv,t)},wN=new Intl.Collator;function TN(e){let t=Cv(),n=G.useRef(null),r=Z(t,mw),i=Z(t,pw),a=J(),[o,s]=G.useState(``),c=CN(a),l=Z(t,fw),u=Z(t,RO),d=Z(t,BO),f=G.useMemo(()=>u?Array.from(d.values()):l,[u,d,l]),{sort:p,searchPredicate:m=_N,autoFocusSearchField:h=!0,disableShowHideToggle:g=!1,disableResetButton:_=!1,toggleAllMode:v=`all`,getTogglableColumns:y,searchInputProps:b,searchDebounceMs:x=a.columnFilterDebounceMs}=e,S=G.useMemo(()=>He(e=>{s(e)},x??150),[x]),C=G.useMemo(()=>gN(i,r),[i,r]),w=G.useMemo(()=>{switch(p){case`asc`:return[...f].sort((e,t)=>wN.compare(e.headerName||e.field,t.headerName||t.field));case`desc`:return[...f].sort((e,t)=>-wN.compare(e.headerName||e.field,t.headerName||t.field));default:return f}},[f,p]),T=e=>{let{name:n}=e.target;t.current.setColumnVisibility(n,i[n]===!1)},E=G.useMemo(()=>{let e=y?y(w):null,t=e?w.filter(({field:t})=>e.includes(t)):w;return o?t.filter(e=>m(e,o.toLowerCase())):t},[w,o,m,y]),D=G.useCallback(e=>{let n=pw(t),r=H({},n),i=y?y(f):null;return(v===`filteredOnly`?E:f).forEach(t=>{t.hideable&&(i==null||i.includes(t.field))&&(e?delete r[t.field]:r[t.field]=!1)}),t.current.setColumnVisibilityModel(r)},[t,f,y,v,E]),O=G.useCallback(e=>{S(e.target.value)},[S]),k=G.useMemo(()=>E.filter(e=>e.hideable),[E]),A=G.useMemo(()=>k.every(e=>i[e.field]==null||i[e.field]!==!1),[i,k]),j=G.useMemo(()=>k.every(e=>i[e.field]===!1),[i,k]),M=G.useRef(null);G.useEffect(()=>{h?n.current?.focus():M.current&&typeof M.current.focus==`function`&&M.current.focus()},[h]);let N=!1,P=e=>N===!1&&e.hideable!==!1&&(N=!0,!0),ee=G.useCallback(()=>{s(``),n.current&&(n.current.value=``,n.current.focus())},[]);return(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(ON,{className:c.header,ownerState:a,children:(0,W.jsx)(kN,H({as:a.slots.baseTextField,ownerState:a,placeholder:t.current.getLocaleText(`columnsManagementSearchTitle`),inputRef:n,className:c.searchInput,onChange:O,size:`small`,type:`search`,slotProps:{input:{startAdornment:(0,W.jsx)(a.slots.quickFilterIcon,{fontSize:`small`}),endAdornment:(0,W.jsx)(a.slots.baseIconButton,H({size:`small`,"aria-label":t.current.getLocaleText(`columnsManagementDeleteIconLabel`),style:o?{visibility:`visible`}:{visibility:`hidden`},tabIndex:-1,onClick:ee,edge:`end`},a.slotProps?.baseIconButton,{children:(0,W.jsx)(a.slots.quickFilterClearIcon,{fontSize:`small`})}))},htmlInput:{"aria-label":t.current.getLocaleText(`columnsManagementSearchTitle`)}},autoComplete:`off`,fullWidth:!0},a.slotProps?.baseTextField,b))}),(0,W.jsx)(DN,{ownerState:a,children:(0,W.jsxs)(EN,{className:c.root,ownerState:a,children:[E.map(e=>(0,W.jsx)(MN,H({as:a.slots.baseCheckbox,className:c.row,disabled:e.hideable===!1||u,checked:i[e.field]!==!1,onChange:T,name:e.field,inputRef:P(e)?M:void 0,label:e.headerName||e.field,density:`compact`,fullWidth:!0},a.slotProps?.baseCheckbox),e.field)),E.length===0&&(0,W.jsx)(jN,{ownerState:a,children:t.current.getLocaleText(`columnsManagementNoColumns`)})]})}),!g||!_?(0,W.jsxs)(AN,{ownerState:a,className:c.footer,children:[g?(0,W.jsx)(`span`,{}):(0,W.jsx)(a.slots.baseCheckbox,H({disabled:k.length===0||u,checked:A,indeterminate:!A&&!j,onChange:()=>D(!A),name:t.current.getLocaleText(`columnsManagementShowHideAllText`),label:t.current.getLocaleText(`columnsManagementShowHideAllText`),density:`compact`},a.slotProps?.baseCheckbox)),_?null:(0,W.jsx)(a.slots.baseButton,H({onClick:()=>t.current.setColumnVisibilityModel(r),disabled:C||u},a.slotProps?.baseButton,{children:t.current.getLocaleText(`columnsManagementReset`)}))]}):null]})}var EN=m(`div`,{name:`MuiDataGrid`,slot:`ColumnsManagement`})({display:`flex`,flexDirection:`column`,padding:Y.spacing(.5,1.5)}),DN=m(SN,{name:`MuiDataGrid`,slot:`ColumnsManagementScrollArea`})({maxHeight:300}),ON=m(`div`,{name:`MuiDataGrid`,slot:`ColumnsManagementHeader`})({padding:Y.spacing(1.5,2),borderBottom:`1px solid ${Y.colors.border.base}`}),kN=m(dC,{name:`MuiDataGrid`,slot:`ColumnsManagementSearchInput`})({[`& .${lt.input}::-webkit-search-decoration, + & .${lt.input}::-webkit-search-cancel-button, + & .${lt.input}::-webkit-search-results-button, + & .${lt.input}::-webkit-search-results-decoration`]:{display:`none`}}),AN=m(`div`,{name:`MuiDataGrid`,slot:`ColumnsManagementFooter`})({padding:Y.spacing(1,1,1,1.5),display:`flex`,justifyContent:`space-between`,borderTop:`1px solid ${Y.colors.border.base}`}),jN=m(`div`,{name:`MuiDataGrid`,slot:`ColumnsManagementEmptyText`})({padding:Y.spacing(1,0),alignSelf:`center`,font:Y.typography.font.body}),MN=m(dC,{name:`MuiDataGrid`,slot:`ColumnsManagementRow`})({}),NN=H_(function(e,t){let{children:n,slotProps:r={}}=e,i=r.button||{},a=r.tooltip||{},o=Cv(),s=J(),c=_e(),l=_e(),[u,d]=G.useState(!1),f=G.useRef(null),m=p(t,f),h=e=>{d(e=>!e),i.onClick?.(e)},g=()=>d(!1);return n==null?null:(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(s.slots.baseTooltip,H({title:o.current.getLocaleText(`toolbarExportLabel`),enterDelay:1e3},s.slotProps?.baseTooltip,a,{children:(0,W.jsx)(s.slots.baseButton,H({size:`small`,startIcon:(0,W.jsx)(s.slots.exportIcon,{}),"aria-expanded":u,"aria-label":o.current.getLocaleText(`toolbarExportLabel`),"aria-haspopup":`menu`,"aria-controls":u?l:void 0,id:c},s.slotProps?.baseButton,i,{onClick:h,ref:m,children:o.current.getLocaleText(`toolbarExport`)}))})),(0,W.jsx)(dT,{open:u,target:f.current,onClose:g,position:`bottom-end`,children:(0,W.jsx)(s.slots.baseMenuList,{id:l,className:X.menuList,"aria-labelledby":c,autoFocusItem:u,children:G.Children.map(n,e=>G.isValidElement(e)?G.cloneElement(e,{hideMenu:g}):e)})})]})}),PN=[`hideMenu`,`options`],FN=[`hideMenu`,`options`],IN=[`csvOptions`,`printOptions`,`excelOptions`];function LN(e){let t=Cv(),n=J(),{hideMenu:r,options:i}=e,a=K(e,PN);return(0,W.jsx)(n.slots.baseMenuItem,H({onClick:()=>{t.current.exportDataAsCsv(i),r?.()}},a,{children:t.current.getLocaleText(`toolbarExportCSV`)}))}function RN(e){let t=Cv(),n=J(),{hideMenu:r,options:i}=e,a=K(e,FN);return(0,W.jsx)(n.slots.baseMenuItem,H({onClick:()=>{t.current.exportDataAsPrint(i),r?.()}},a,{children:t.current.getLocaleText(`toolbarExportPrint`)}))}H_(function(e,t){let n=e,{csvOptions:r={},printOptions:i={},excelOptions:a}=n,o=K(n,IN),s=Cv().current.unstable_applyPipeProcessors(`exportMenu`,[],{excelOptions:a,csvOptions:r,printOptions:i}).sort((e,t)=>e.componentName>t.componentName?1:-1);return s.length===0?null:(0,W.jsx)(NN,H({},o,{ref:t,children:s.map((e,t)=>G.cloneElement(e.component,{key:t}))}))});var zN=G.createContext(void 0);function BN(){let e=G.useContext(zN);if(e===void 0)throw Error(dp(62));return e}var VN=[`render`,`className`,`parser`,`formatter`,`debounceMs`,`defaultExpanded`,`expanded`,`onExpandedChange`],HN=e=>e.split(` `).filter(e=>e!==``),UN=e=>e.join(` `);function WN(e){let t=J(),{render:n,className:r,parser:i=HN,formatter:a=UN,debounceMs:o=t.filterDebounceMs,defaultExpanded:s,expanded:c,onExpandedChange:l}=e,u=K(e,VN),d=Cv(),f=G.useRef(null),p=G.useRef(null),m=Z(d,QT),[g,_]=G.useState(a(m??[])),[v,y]=G.useState(s??g.length>0),b=c??v,x=G.useMemo(()=>({value:g,expanded:b}),[g,b]),S=typeof r==`function`?r(x):r,C=G.useRef(null),w=_e(),T=G.useCallback(e=>{l&&l(e),c===void 0&&y(e)},[l,c]),E=G.useRef(m);G.useEffect(()=>{Hb(E.current,m)||(E.current=m,_(e=>Hb(i(e),m)?e:a(m??[])))},[m,a,i]);let D=G.useRef(!0),O=G.useRef(b);G.useEffect(()=>{if(D.current){D.current=!1;return}O.current!==b&&(b?requestAnimationFrame(()=>{f.current?.focus({preventScroll:!0})}):p.current?.focus({preventScroll:!0}),O.current=b)},[b]);let k=G.useMemo(()=>He(e=>{let t=i(e);E.current=t,d.current.setQuickFilterValues(t)},o),[d,o,i]);G.useEffect(()=>k.clear,[k]);let A=G.useCallback(e=>{let t=e.target.value;_(t),k(t)},[k]),j=G.useCallback(()=>{_(``),d.current.setQuickFilterValues([]),f.current?.focus()},[d,f]),M=G.useMemo(()=>({controlRef:f,triggerRef:p,state:x,controlId:w,clearValue:j,onValueChange:A,onExpandedChange:T}),[w,x,A,j,T]);h(()=>{C.current&&p.current&&C.current.style.setProperty(`--trigger-width`,`${p.current?.offsetWidth}px`)},[]);let N=$A(`div`,n,H({className:S},u,{ref:C}),x);return(0,W.jsx)(zN.Provider,{value:M,children:N})}var GN=[`render`,`className`,`slotProps`,`onKeyDown`,`onChange`],KN=H_(function(e,t){let{render:n,className:r,slotProps:i,onKeyDown:a,onChange:o}=e,s=K(e,GN),c=J(),{state:l,controlId:u,controlRef:d,onValueChange:f,onExpandedChange:m,clearValue:h}=BN(),g=typeof r==`function`?r(l):r,_=p(d,t),v=$A(c.slots.baseTextField,n,H({},c.slotProps?.baseTextField,{slotProps:H({htmlInput:H({role:`searchbox`,id:u,tabIndex:l.expanded?void 0:-1},i?.htmlInput,{onBlur:e=>{l.value===``&&m(!1),i?.htmlInput?.onBlur?.(e)}})},i),value:l.value,className:g},s,{onChange:e=>{l.expanded||m(!0),f(e),o?.(e)},onKeyDown:e=>{e.key===`Escape`&&(l.value===``?m(!1):h()),a?.(e)},ref:_}),l);return(0,W.jsx)(G.Fragment,{children:v})}),qN=[`render`,`className`,`onClick`],JN=H_(function(e,t){let{render:n,className:r,onClick:i}=e,a=K(e,qN),o=J(),{state:s,clearValue:c}=BN(),l=typeof r==`function`?r(s):r,u=$A(o.slots.baseIconButton,n,H({},o.slotProps?.baseIconButton,{className:l,tabIndex:-1},a,{onClick:e=>{c(),i?.(e)},ref:t}),s);return(0,W.jsx)(G.Fragment,{children:u})}),YN=[`render`,`className`,`onClick`],XN=H_(function(e,t){let{render:n,className:r,onClick:i}=e,a=K(e,YN),o=J(),{state:s,controlId:c,onExpandedChange:l,triggerRef:u}=BN(),d=typeof r==`function`?r(s):r,f=p(u,t),m=$A(o.slots.baseButton,n,H({},o.slotProps?.baseButton,{className:d,"aria-controls":c,"aria-expanded":s.expanded},a,{onClick:e=>{l(!s.expanded),i?.(e)},ref:f}),s);return(0,W.jsx)(G.Fragment,{children:m})}),ZN=[`quickFilterParser`,`quickFilterFormatter`,`debounceMs`,`className`,`slotProps`],QN=[`ref`,`slotProps`],$N=e=>{let{classes:t}=e;return g({root:[`toolbarQuickFilter`],trigger:[`toolbarQuickFilterTrigger`],control:[`toolbarQuickFilterControl`]},zv,t)},eP=m(`div`,{name:`MuiDataGrid`,slot:`ToolbarQuickFilter`})({display:`grid`,alignItems:`center`}),tP=m(fj,{name:`MuiDataGrid`,slot:`ToolbarQuickFilterTrigger`})(({ownerState:e})=>({gridArea:`1 / 1`,width:`min-content`,height:`min-content`,zIndex:1,opacity:+!e.expanded,pointerEvents:e.expanded?`none`:`auto`,transition:Y.transition([`opacity`])})),nP=m(e=>{throw Error(dp(57))},{name:`MuiDataGrid`,slot:`ToolbarQuickFilterControl`})(({ownerState:e})=>({gridArea:`1 / 1`,overflowX:`clip`,width:e.expanded?260:`var(--trigger-width)`,opacity:+!!e.expanded,transition:Y.transition([`width`,`opacity`])}));function rP(e){let t=Cv(),n=J(),r={classes:n.classes,expanded:!1},i=$N(r),{quickFilterParser:a,quickFilterFormatter:o,debounceMs:s,className:c,slotProps:l}=e,u=K(e,ZN);return(0,W.jsx)(WN,{parser:a,formatter:o,debounceMs:s,render:(e,a)=>{let o=H({},r,{expanded:a.expanded});return(0,W.jsxs)(eP,H({},e,{className:V(i.root,c),children:[(0,W.jsx)(XN,{render:e=>(0,W.jsx)(n.slots.baseTooltip,{title:t.current.getLocaleText(`toolbarQuickFilterLabel`),enterDelay:0,children:(0,W.jsx)(tP,H({className:i.trigger},e,{ownerState:o,color:`default`,"aria-disabled":a.expanded,children:(0,W.jsx)(n.slots.quickFilterIcon,{fontSize:`small`})}))})}),(0,W.jsx)(KN,{render:e=>{let{ref:r,slotProps:a}=e,s=K(e,QN);return(0,W.jsx)(nP,H({as:n.slots.baseTextField,className:i.control,ownerState:o,inputRef:r,"aria-label":t.current.getLocaleText(`toolbarQuickFilterLabel`),placeholder:t.current.getLocaleText(`toolbarQuickFilterPlaceholder`),size:`small`,slotProps:H({input:H({startAdornment:(0,W.jsx)(n.slots.quickFilterIcon,{fontSize:`small`}),endAdornment:s.value?(0,W.jsx)(JN,{render:(0,W.jsx)(n.slots.baseIconButton,{size:`small`,edge:`end`,"aria-label":t.current.getLocaleText(`toolbarQuickFilterDeleteIconLabel`),children:(0,W.jsx)(n.slots.quickFilterClearIcon,{fontSize:`small`})})}):null},a?.input)},a)},n.slotProps?.baseTextField,s,l?.root,u))}})]}))}})}var iP=[`render`,`className`,`onClick`,`onPointerUp`],aP=H_(function(e,t){let{render:n,className:r,onClick:i,onPointerUp:a}=e,o=K(e,iP),s=J(),c=_e(),l=_e(),u=Cv(),d=Z(u,hk),f=d.open&&d.openedPanelValue===_k.filters,m={open:f,filterCount:Z(u,lE).length},h=typeof r==`function`?r(m):r,{triggers:g}=RA(),_=p(t,g.filterPanel.setRef),v=$A(s.slots.baseButton,n,H({},s.slotProps?.baseButton,{id:c,"aria-haspopup":`true`,"aria-expanded":f?`true`:void 0,"aria-controls":f?l:void 0,onClick:e=>{f?u.current.hidePreferences():u.current.showPreferences(_k.filters,l,c),i?.(e)},onPointerUp:e=>{f&&e.stopPropagation(),a?.(e)},className:h},o,{ref:_}),m);return(0,W.jsx)(G.Fragment,{children:v})}),oP=[`render`,`className`,`onClick`,`onPointerUp`],sP=H_(function(e,t){let{render:n,className:r,onClick:i,onPointerUp:a}=e,o=K(e,oP),s=J(),c=_e(),l=_e(),u=Cv(),d=Z(u,hk),f=d.open&&d.openedPanelValue===_k.columns,m={open:f},h=typeof r==`function`?r(m):r,{triggers:g}=RA(),_=p(t,g.columnsPanel.setRef),v=$A(s.slots.baseButton,n,H({},s.slotProps?.baseButton,{id:c,"aria-haspopup":`true`,"aria-expanded":f?`true`:void 0,"aria-controls":f?l:void 0,className:h},o,{onPointerUp:e=>{f&&e.stopPropagation(),a?.(e)},onClick:e=>{f?u.current.hidePreferences():u.current.showPreferences(_k.columns,l,c),i?.(e)},ref:_}),m);return(0,W.jsx)(G.Fragment,{children:v})}),cP=[`render`,`options`,`onClick`],lP=H_(function(e,t){let{render:n,options:r,onClick:i}=e,a=K(e,cP),o=J(),s=Cv(),c=$A(o.slots.baseButton,n,H({},o.slotProps?.baseButton,{onClick:e=>{s.current.exportDataAsCsv(r),i?.(e)}},a,{ref:t}));return(0,W.jsx)(G.Fragment,{children:c})}),uP=[`render`,`options`,`onClick`],dP=H_(function(e,t){let{render:n,options:r,onClick:i}=e,a=K(e,uP),o=J(),s=Cv(),c=$A(o.slots.baseButton,n,H({},o.slotProps?.baseButton,{onClick:e=>{s.current.exportDataAsPrint(r),i?.(e)}},a,{ref:t}));return(0,W.jsx)(G.Fragment,{children:c})}),fP=[`className`],pP=[`className`],mP=[`showQuickFilter`,`quickFilterProps`,`csvOptions`,`printOptions`,`mainControls`,`additionalExportMenuItems`],hP=e=>{let{classes:t}=e;return g({divider:[`toolbarDivider`],label:[`toolbarLabel`]},zv,t)},gP=m(dC,{name:`MuiDataGrid`,slot:`ToolbarDivider`})({height:`50%`,margin:Y.spacing(0,.5)}),_P=m(`span`,{name:`MuiDataGrid`,slot:`ToolbarLabel`})({flex:1,font:Y.typography.font.large,fontWeight:Y.typography.fontWeight.medium,margin:Y.spacing(0,.5),textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`});function vP(e){let t=K(e,fP),n=J(),r=hP(n);return(0,W.jsx)(gP,H({as:n.slots.baseDivider,orientation:`vertical`,className:r.divider},t))}function yP(e){let t=K(e,pP),n=hP(J());return(0,W.jsx)(_P,H({className:n.label},t))}function bP(e){let{showQuickFilter:t=!0,quickFilterProps:n,csvOptions:r,printOptions:i,mainControls:a,additionalExportMenuItems:o}=e,s=K(e,mP),c=Cv(),l=J(),[u,d]=G.useState(!1),f=G.useRef(null),p=_e(),m=_e(),h=!r?.disableToolbarButton||!i?.disableToolbarButton||o,g=()=>d(!1);return(0,W.jsxs)(lj,H({},s,{children:[l.label&&(0,W.jsx)(yP,{children:l.label}),a||(0,W.jsxs)(G.Fragment,{children:[!l.disableColumnSelector&&(0,W.jsx)(l.slots.baseTooltip,{title:c.current.getLocaleText(`toolbarColumns`),children:(0,W.jsx)(sP,{render:(0,W.jsx)(fj,{}),children:(0,W.jsx)(l.slots.columnSelectorIcon,{fontSize:`small`})})}),!l.disableColumnFilter&&(0,W.jsx)(l.slots.baseTooltip,{title:c.current.getLocaleText(`toolbarFilters`),children:(0,W.jsx)(aP,{render:(e,t)=>(0,W.jsx)(fj,H({},e,{color:t.filterCount>0?`primary`:`default`,children:(0,W.jsx)(l.slots.baseBadge,{badgeContent:t.filterCount,color:`primary`,variant:`dot`,children:(0,W.jsx)(l.slots.openFilterButtonIcon,{fontSize:`small`})})}))})})]}),h&&(!l.disableColumnFilter||!l.disableColumnSelector)&&(0,W.jsx)(vP,{}),h&&(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(l.slots.baseTooltip,{title:c.current.getLocaleText(`toolbarExport`),disableInteractive:u,children:(0,W.jsx)(fj,{ref:f,id:m,"aria-controls":p,"aria-haspopup":`true`,"aria-expanded":u?`true`:void 0,onClick:()=>d(!u),children:(0,W.jsx)(l.slots.exportIcon,{fontSize:`small`})})}),(0,W.jsx)(dT,{target:f.current,open:u,onClose:g,position:`bottom-end`,children:(0,W.jsxs)(l.slots.baseMenuList,H({id:p,"aria-labelledby":m,autoFocusItem:!0},l.slotProps?.baseMenuList,{children:[!i?.disableToolbarButton&&(0,W.jsx)(dP,{render:(0,W.jsx)(l.slots.baseMenuItem,H({},l.slotProps?.baseMenuItem)),options:i,onClick:g,children:c.current.getLocaleText(`toolbarExportPrint`)}),!r?.disableToolbarButton&&(0,W.jsx)(lP,{render:(0,W.jsx)(l.slots.baseMenuItem,H({},l.slotProps?.baseMenuItem)),options:r,onClick:g,children:c.current.getLocaleText(`toolbarExportCSV`)}),o?.(g)]}))})]}),t&&(0,W.jsxs)(G.Fragment,{children:[(0,W.jsx)(vP,{}),(0,W.jsx)(rP,H({},n))]})]}))}var xP=[`className`,`selectedRowCount`],SP=e=>{let{classes:t}=e;return g({root:[`selectedRowCount`]},zv,t)},CP=S(`div`,{name:`MuiDataGrid`,slot:`SelectedRowCount`})({alignItems:`center`,display:`flex`,margin:Y.spacing(0,2),visibility:`hidden`,width:0,height:0,[Y.breakpoints.up(`sm`)]:{visibility:`visible`,width:`auto`,height:`auto`}}),wP=H_(function(e,t){let{className:n,selectedRowCount:r}=e,i=K(e,xP),a=Cv(),o=J(),s=SP(o),c=a.current.getLocaleText(`footerRowSelected`)(r);return(0,W.jsx)(CP,H({className:V(s.root,n),ownerState:o},i,{ref:t,children:c}))}),TP=H_(function(e,t){let n=Cv(),r=J(),i=Z(n,yS),a=Z(n,mE),o=Z(n,sE),s=!r.hideFooterSelectedRowCount&&a>0?(0,W.jsx)(wP,{selectedRowCount:a}):(0,W.jsx)(`div`,{}),c=!r.hideFooterRowCount&&!r.pagination?(0,W.jsx)(r.slots.footerRowCount,H({},r.slotProps?.footerRowCount,{rowCount:i,visibleRowCount:o})):null,l=r.pagination&&!r.hideFooterPagination&&r.slots.pagination&&(0,W.jsx)(r.slots.pagination,H({},r.slotProps?.pagination));return(0,W.jsxs)(JA,H({},e,{ref:t,children:[s,c,l]}))}),EP=(e,t,n,r,i,a)=>{let o;switch(e){case ST.LEFT:o=r[n];break;case ST.RIGHT:o=i-r[n]-t+a;break;default:o=void 0}return Number.isNaN(o)&&(o=void 0),o},DP=(e,t,n,r,i,a)=>{let o=t===n-1;return a?.startsWith(`border`)&&e===ST.LEFT&&o?!0:r?e===ST.LEFT?!0:e===ST.RIGHT?!o:!o||i:!1},OP=(e,t,n,r)=>r?.startsWith(`border`)?e===ST.RIGHT&&t===0:n&&e===ST.RIGHT&&t===0,kP=[`skeletonRowsCount`,`visibleColumns`,`showFirstRowBorder`],AP=m(`div`,{name:`MuiDataGrid`,slot:`SkeletonLoadingOverlay`})({minWidth:`100%`,width:`max-content`,height:`100%`,overflow:`clip`}),jP=e=>{let{classes:t}=e;return g({root:[`skeletonLoadingOverlay`]},zv,t)},MP=e=>parseInt(e.getAttribute(`data-colindex`),10),NP=H_(function(e,t){let n=J(),{slots:r}=n,i=Ie(),a=jP({classes:n.classes}),o=G.useRef(null),s=p(o,t),c=Cv(),l=Z(c,iS),u=Z(c,aS),d=Z(c,bw),f=G.useMemo(()=>d.filter(e=>e<=u).length,[u,d]),{skeletonRowsCount:m,visibleColumns:h,showFirstRowBorder:g}=e,_=K(e,kP),v=Z(c,hw),y=G.useMemo(()=>v.slice(0,f),[v,f]),b=Z(c,vw),x=G.useCallback(e=>{if(b.left.findIndex(t=>t.field===e)!==-1)return ST.LEFT;if(b.right.findIndex(t=>t.field===e)!==-1)return ST.RIGHT},[b.left,b.right]),S=G.useMemo(()=>{let e=[];for(let t=0;te.field===o.field):e-b.left.length,g=l.hasScrollY?l.scrollbarSize:0,_=yA({},i,s,EP(s,o.computedWidth,e,d,l.columnsTotalWidth,g)),v=l.columnsTotalWidth{let{colDef:t,width:n}=e,r=o.current?.querySelectorAll(`[data-field="${yj(t.field)}"]`);if(!r)throw Error(dp(56));let i=y.findIndex(e=>e.field===t.field),a=x(t.field),s=a===ST.LEFT,c=a===ST.RIGHT,l=getComputedStyle(r[0]).getPropertyValue(`--width`),u=parseInt(l,10)-n;r&&r.forEach(e=>{e.style.setProperty(`--width`,`${n}px`)}),s&&(o.current?.querySelectorAll(`.${X[`cell--pinnedLeft`]}`))?.forEach(e=>{MP(e)>i&&(e.style.left=`${parseInt(getComputedStyle(e).left,10)-u}px`)}),c&&(o.current?.querySelectorAll(`.${X[`cell--pinnedRight`]}`))?.forEach(e=>{MP(e)e.slots.baseCircularProgress,style:{}},"linear-progress":{component:e=>e.slots.baseLinearProgress,style:{display:`block`}},skeleton:{component:()=>PP,style:{display:`block`}}},LP=H_(function(e,t){let{variant:n=`linear-progress`,noRowsVariant:r=`skeleton`,style:i}=e,a=K(e,FP),o=Cv(),s=J(),c=IP[Z(o,_S)===0?r:n],l=c.component(s);return(0,W.jsx)(QA,H({style:H({},c.style,i)},a,{ref:t,children:(0,W.jsx)(l,{})}))}),RP=H_(function(e,t){let n=Cv().current.getLocaleText(`noRowsLabel`);return(0,W.jsx)(QA,H({},e,{ref:t,children:n}))}),zP=H_(function(e,t){let n=J(),r=Cv(),i=Z(r,uw),a=()=>{r.current.showPreferences(_k.columns)},o=!n.disableColumnSelector&&i.length>0;return(0,W.jsxs)(QA,H({},e,{ref:t,children:[r.current.getLocaleText(`noColumnsOverlayLabel`),o&&(0,W.jsx)(n.slots.baseButton,H({size:`small`},n.slotProps?.baseButton,{onClick:a,children:r.current.getLocaleText(`noColumnsOverlayManageColumns`)}))]}))}),BP=m(dC,{slot:`internal`})({maxHeight:`calc(100% + 1px)`,flexGrow:1});function VP(){let e=Cv(),t=J(),n=Z(e,GE),r=Z(e,KE),i=Z(e,XE),{paginationMode:a,loading:o}=t,s=r==null||r===-1,c=s&&a===`server`&&o,l=G.useMemo(()=>Math.max(0,i-1),[i]),u=G.useMemo(()=>s||n.page<=l?n.page:l,[l,n.page,s]),d=G.useCallback(t=>{e.current.setPageSize(t)},[e]),f=G.useCallback((t,n)=>{e.current.setPage(n)},[e]),p=(e=>{for(let n=0;n{let{classes:t}=e;return g({root:[`rowCount`]},zv,t)},WP=S(`div`,{name:`MuiDataGrid`,slot:`RowCount`})({alignItems:`center`,display:`flex`,margin:Y.spacing(0,2)}),GP=H_(function(e,t){let{className:n,rowCount:r,visibleRowCount:i}=e,a=K(e,HP),o=Cv(),s=J(),c=UP(s);if(r===0)return null;let l=ie.rowReorder),JP=Q(qP,e=>e?.isActive??!1),YP=Q(qP,e=>e?.dropTarget??{rowId:null,position:null});Q(YP,e=>e.rowId??null);var XP=Q(YP,(e,t)=>e.rowId===t?e.position:null);Q(qP,e=>e?.draggedRowId??null);var ZP=m(`div`,{name:`MuiDataGrid`,slot:`RowDragOverlay`,shouldForwardProp:e=>a(e)&&e!==`action`})(({theme:e,action:t})=>H({position:`absolute`,left:0,right:0,top:0,bottom:0,pointerEvents:`none`,zIndex:1},t===`above`&&{"&::before":{pointerEvents:`none`,content:`""`,position:`absolute`,top:0,left:0,right:0,height:`2px`,backgroundColor:(e.vars||e).palette.primary.main}},t===`below`&&{"&::after":{pointerEvents:`none`,content:`""`,position:`absolute`,bottom:`-2px`,left:0,right:0,height:`2px`,backgroundColor:(e.vars||e).palette.primary.main}},t===`inside`&&{backgroundColor:e.alpha((e.vars||e).palette.primary.main,.1)})),QP=G.memo(function(e){let{rowId:t,className:n}=e,r=Z(Jv(),XP,t);return r?(0,W.jsx)(ZP,{action:r,className:n}):null}),$P=`selected.rowId.row.index.style.rowHeight.className.visibleColumns.pinnedColumns.offsetLeft.columnsTotalWidth.firstColumnIndex.lastColumnIndex.focusedColumnIndex.isFirstVisible.isLastVisible.isNotVisible.showBottomBorder.scrollbarWidth.gridHasFiller.onClick.onDoubleClick.onMouseEnter.onMouseLeave.onMouseOut.onMouseOver`.split(`.`),eF=Q(fk,(e,{rowReordering:t,treeData:n})=>!t||n?!1:!!WT(e)),tF=JS(H_(function(e,t){let{selected:n,rowId:r,row:i,index:a,style:o,rowHeight:s,className:c,visibleColumns:l,pinnedColumns:u,offsetLeft:d,columnsTotalWidth:f,firstColumnIndex:m,lastColumnIndex:h,focusedColumnIndex:g,isFirstVisible:_,isLastVisible:v,isNotVisible:y,showBottomBorder:b,scrollbarWidth:x,gridHasFiller:S,onClick:C,onDoubleClick:w,onMouseEnter:T,onMouseLeave:E,onMouseOut:D,onMouseOver:O}=e,k=K(e,$P),A=Jv(),j=tT(),M=G.useRef(null),N=J(),P=Gk(A,N),ee=Z(A,JT),F=Z(A,bw),I=N.rowReordering,L=N.treeData,R=Z(A,eF,{rowReordering:I,treeData:L}),z=Z(A,JP),te=p(M,t),ne=SS(A,r),re=Z(A,pk,{rowId:r,editMode:N.editMode}),B=N.editMode===WC.Row,ie=g!==void 0,ae=ie&&g>=u.left.length&&g=h,se=KP(N.classes,{root:[`row`,n&&`selected`,B&&`row--editable`,re&&`row--editing`,_&&`row--firstVisible`,v&&`row--lastVisible`,b&&`row--borderBottom`,s===`auto`&&`row--dynamicHeight`]}),ce=j.hooks.useGridRowAriaAttributes();G.useLayoutEffect(()=>{if(P.range){let e=A.current.getRowIndexRelativeToVisibleRows(r);e!==void 0&&A.current.unstable_setLastMeasuredRowIndex(e)}if(M.current&&s===`auto`)return A.current.observeRowHeight(M.current,r)},[A,P.range,s,r]);let le=G.useCallback((e,t)=>n=>{wj(n)||A.current.getRow(r)&&(A.current.publishEvent(e,A.current.getRowParams(r),n),t&&t(n))},[A,r]),ue=G.useCallback(e=>{let t=vj(e.target,X.cell)?.getAttribute(`data-field`);t&&(t===aD.field||t===`__detail_panel_toggle__`||t===`__reorder__`||A.current.getCellMode(r,t)===GC.Edit||A.current.getColumn(t)?.type===`actions`)||le(`rowClick`,C)(e)},[A,C,le,r]),{slots:de,slotProps:fe,disableColumnReorder:pe}=N,me=Z(A,()=>H({},A.current.getRowHeightEntry(r)),void 0,Hv),he=G.useMemo(()=>{if(y)return{opacity:0,width:0,height:0};let e=H({},o,{maxHeight:s===`auto`?`none`:s,minHeight:s,"--height":typeof s==`number`?`${s}px`:s});if(me.spacingTop){let t=N.rowSpacingType===`border`?`borderTopWidth`:`marginTop`;e[t]=me.spacingTop}if(me.spacingBottom){let t=N.rowSpacingType===`border`?`borderBottomWidth`:`marginBottom`,n=e[t];typeof n!=`number`&&(n=parseInt(n||`0`,10)),n+=me.spacingBottom,e[t]=n}return e},[y,s,o,me.spacingTop,me.spacingBottom,N.rowSpacingType]);if(!ne)return null;let ge=A.current.unstable_applyPipeProcessors(`rowClassName`,[],r),_e=ce(ne,a);if(typeof N.getRowClassName==`function`){let e=a-(P.range?.firstRowIndex||0),t=H({},A.current.getRowParams(r),{isFirstVisible:e===0,isLastVisible:e===P.rows.length-1,indexRelativeToCurrentPage:e});ge.push(N.getRowClassName(t))}let ve=(e,t,n,a,o=ST.NONE)=>{let c=A.current.unstable_getCellColSpanInfo(r,n);if(c?.spannedByColSpan)return null;let l=c?.cellProps.width??e.computedWidth,u=c?.cellProps.colSpan??1,d=EP(o,e.computedWidth,n,F,f,x);if(ne.type===`skeletonRow`)return(0,W.jsx)(de.skeletonCell,{type:e.type,width:l,height:s,field:e.field,align:e.align,skeletonProps:{style:{marginLeft:n===0&&ne.depth>0?Y.spacing(ne.depth*2):`0px`}}},e.field);let p=e.field===`__reorder__`,m=!(pe||e.disableReorder),h=R&&!ee.length,g=!(m||p&&h||z),_=o===ST.VIRTUAL,v=OP(o,t,N.showCellVerticalBorder,N.pinnedColumnsSectionSeparator),y=DP(o,t,a,N.showCellVerticalBorder,S,N.pinnedColumnsSectionSeparator);return(0,W.jsx)(de.cell,H({column:e,width:l,rowId:r,align:e.align||`left`,colIndex:n,colSpan:u,disableDragEvents:g,isNotVisible:_,pinnedOffset:d,pinnedPosition:o,showLeftBorder:v,showRightBorder:y,row:i,rowNode:ne},fe?.cell),e.field)},ye=u.left.map((e,t)=>ve(e,t,t,u.left.length,ST.LEFT)),be=u.right.map((e,t)=>{let n=l.length-u.right.length+t;return ve(e,t,n,u.right.length,ST.RIGHT)}),xe=l.length-u.left.length-u.right.length,Se=[];ae&&Se.push(ve(l[g],g-u.left.length,g,xe,ST.VIRTUAL));for(let e=m;e{let e=Jv(),t=J(),n=Z(e,hw),r=Z(e,oE),i=Z(e,mO),a=Z(e,AS),o=t[`aria-label`],s=t[`aria-labelledby`];return{role:`grid`,"aria-label":!o&&!s&&t.label?t.label:o,"aria-labelledby":s,"aria-colcount":n.length,"aria-rowcount":i+1+a+r,"aria-multiselectable":bE(t)}},rF=()=>{let e=Jv(),t=Z(e,mO);return G.useCallback((n,r)=>{let i={};return i[`aria-rowindex`]=r+t+2,n&&e.current.isRowSelectable(n.id)&&(i[`aria-selected`]=e.current.isRowSelected(n.id)),i},[e,t])},iF=e=>{let t=G.useCallback((t,n,r)=>{let i=SS(e,t),a=SS(e,n);if(!i)throw Error(dp(89,t));if(!a)throw Error(dp(89,n));if(i.type!==`leaf`)throw Error(dp(93));if(r===`inside`)throw Error(dp(94));let o=dE(e),s=o[n],c=o[t];if(s===void 0)throw Error(dp(95,n));if(c===void 0)throw Error(dp(96,t));c===s||r===`above`&&c===s-1||r===`below`&&c===s+1||(e.current.setState(i=>{let a=xS(e)[jS],o=a.children,s=[],c=!1,l=!1;for(let e=0;e{let r=SS(e,t);if(!r)throw Error(dp(97,t));if(r.type!==`leaf`)throw Error(dp(98));e.current.setState(r=>{let i=xS(e)[jS],a=i.children,o=a.findIndex(e=>e===t);if(o===-1||o===n)return r;let s=[...a];return s.splice(n,0,s.splice(o,1)[0]),H({},r,{rows:H({},r.rows,{tree:H({},r.rows.tree,{[jS]:H({},i,{children:s})})})})}),e.current.publishEvent(`rowsSet`)},[e]),setRowPosition:t}},aF=e=>{let t=G.useCallback((t,n)=>{let r=e.current.getColumn(n),i=e.current.getRow(t);if(!i)throw Error(dp(87,t));return!r||!r.valueGetter?i[n]:r.valueGetter(i[r.field],i,r,e)},[e]),n=G.useCallback((t,n)=>IS(t,n,e),[e]);return{getCellValue:t,getRowValue:n,getRowFormattedValue:G.useCallback((t,r)=>{let i=n(t,r);return!r||!r.valueFormatter?i:r.valueFormatter(i,t,r,e)},[e,n])}},oF=()=>G.useCallback(e=>!VS(e.rowNode),[]);function sF({privateApiRef:e,configuration:t,props:n,children:r}){let i=G.useRef(e.current.getPublicApi());return(0,W.jsx)(eT.Provider,{value:t,children:(0,W.jsx)(yv.Provider,{value:n,children:(0,W.jsx)(qv.Provider,{value:e,children:(0,W.jsx)(Sv.Provider,{value:i,children:(0,W.jsx)(zA,{children:(0,W.jsx)(oT,{children:r})})})})})})}var cF=e=>{let t=G.useRef(null),n=G.useRef(null),r=G.useRef(null),i=G.useRef(null),a=G.useRef(null),o=G.useRef(null);e.current.register(`public`,{rootElementRef:t}),e.current.register(`private`,{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:i,virtualScrollbarHorizontalRef:a,columnHeadersContainerRef:o})},lF=e=>{let t=Ie();e.current.state.isRtl===void 0&&(e.current.state.isRtl=t);let n=G.useRef(!0);G.useEffect(()=>{n.current?n.current=!1:e.current.setState(e=>H({},e,{isRtl:t}))},[e,t])},uF=FC()&&window.localStorage.getItem(`DEBUG`)!=null,dF=()=>{},fF={debug:dF,info:dF,warn:dF,error:dF},pF=[`debug`,`info`,`warn`,`error`];function mF(e,t,n=console){let r=pF.indexOf(t);if(r===-1)throw Error(dp(65,t));return pF.reduce((t,i,a)=>(t[i]=a>=r?(...t)=>{let[r,...a]=t;n[i](`MUI X: ${e} - ${r}`,...a)}:dF,t),{})}var hF=(e,t)=>{MO(e,{getLogger:G.useCallback(e=>uF?mF(e,`debug`,t.logger):t.logLevel?mF(e,t.logLevel.toString(),t.logger):fF,[t.logLevel,t.logger])},`private`)},gF=(e,t)=>{let n=G.useCallback(e=>{if(t.localeText[e]==null)throw Error(dp(64,e));return t.localeText[e]},[t.localeText]);e.current.register(`public`,{getLocaleText:n})},_F=function(e){return e.DataSource=`dataSource`,e.RowTree=`rowTree`,e}({}),vF=(e,t,n,r)=>{let i=G.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);FO(()=>{i()});let a=G.useRef(!0);G.useEffect(()=>{a.current?a.current=!1:i()},[i])},yF=`none`,bF={dataSourceRootRowsUpdate:_F.DataSource,dataSourceNestedRowsUpdate:_F.DataSource,rowTreeCreation:_F.RowTree,filtering:_F.RowTree,sorting:_F.RowTree,visibleRowsLookupCreation:_F.RowTree},xF=e=>{let t=G.useRef(new Map),n=G.useRef({});MO(e,{registerStrategyProcessor:G.useCallback((t,r,i)=>{let a=()=>{let e=n.current[r],i=K(e,[t].map(Xk));n.current[r]=i};n.current[r]||(n.current[r]={});let o=n.current[r],s=o[t];return o[t]=i,!s||s===i||t===e.current.getActiveStrategy(bF[r])&&e.current.publishEvent(`activeStrategyProcessorChange`,r),a},[e]),applyStrategyProcessor:G.useCallback((t,r)=>{let i=e.current.getActiveStrategy(bF[t]);if(i==null)throw Error(dp(72));let a=n.current[t];if(!a||!a[i])throw Error(dp(73,t,i));let o=a[i];return o(r)},[e]),getActiveStrategy:G.useCallback(e=>Array.from(t.current.entries()).find(([,t])=>t.group===e&&t.isAvailable())?.[0]??`none`,[]),setStrategyAvailability:G.useCallback((n,r,i)=>{t.current.set(r,{group:n,isAvailable:i}),e.current.publishEvent(`strategyAvailabilityChange`)},[e])},`private`)},SF=e=>{let t=G.useRef({}),n=G.useCallback(e=>{t.current[e.stateId]=e},[]),r=G.useCallback((n,r)=>{let i;if(i=NC(n)?n(e.current.state):n,e.current.state===i)return!1;let a={current:{state:i}},o=!1,s=[];if(Object.keys(t.current).forEach(n=>{let r=t.current[n],i=r.stateSelector(e),c=r.stateSelector(a);c!==i&&(s.push({stateId:r.stateId,hasPropChanged:c!==r.propModel}),r.propModel!==void 0&&c!==r.propModel&&(o=!0))}),s.length>1)throw Error(dp(66,s[0].stateId,s.map(e=>e.stateId).join(`, `)));if(o||(e.current.state=i,e.current.publishEvent(`stateChange`,i),e.current.store.update(i)),s.length===1){let{stateId:n,hasPropChanged:i}=s[0],c=t.current[n],l=c.stateSelector(a);c.propOnChange&&i&&c.propOnChange(l,{reason:r,api:e.current}),o||e.current.publishEvent(c.changeEvent,l,{reason:r})}return!o},[e]),i=G.useCallback((t,n,r)=>e.current.setState(e=>H({},e,{[t]:n(e[t])}),r),[e]),a={setState:r},o={updateControlState:i,registerControlState:n};MO(e,a,`public`),MO(e,o,`private`)},CF=(e,t)=>H({},e,{props:{listView:t.listView,getRowId:t.getRowId,isCellEditable:t.isCellEditable,isRowSelectable:t.isRowSelectable,dataSource:t.dataSource,signature:t.signature}}),wF=(e,t)=>{let n=G.useRef(!0);G.useEffect(()=>{if(n.current){n.current=!1;return}e.current.setState(e=>H({},e,{props:{listView:t.listView,getRowId:t.getRowId,isCellEditable:t.isCellEditable,isRowSelectable:t.isRowSelectable,dataSource:t.dataSource,signature:t.signature}}))},[e,t.listView,t.getRowId,t.isCellEditable,t.isRowSelectable,t.dataSource,t.signature])},TF=(e,t)=>{cF(e),wF(e,t),lF(e),hF(e,t),SF(e),Zk(e),xF(e),gF(e,t),e.current.register(`private`,{rootProps:t})},EF=(e,t,n,r)=>{let i=G.useRef(r),a=G.useRef(!1);r!==i.current&&(a.current=!1,i.current=r),a.current||=(t.current.state=e(t.current.state,n,t),!0)};function DF(e,t){if(e==null)return``;let n=typeof e==`string`?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){let e=n.replace(/"/g,`""`);return t.escapeFormulas&&[`=`,`+`,`-`,`@`,` `,`\r`].includes(e[0])?`"'${e}"`:[t.delimiter,` +`,`\r`,`"`].some(e=>n.includes(e))?`"${e}"`:e}return n}var OF=(e,t)=>{let{csvOptions:n,ignoreValueFormatter:r}=t,i;if(r){let t=e.colDef.type;i=t===`number`?String(e.value):t===`date`||t===`dateTime`?e.value?.toISOString():typeof e.value?.toString==`function`?e.value.toString():e.value}else i=e.formattedValue;return DF(i,n)},kF=class{rowString=``;isEmpty=!0;constructor(e){this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue==`function`?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}},AF=({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:i})=>{let a=new kF({csvOptions:r});return t.forEach(t=>{let o=n(e,t.field);String(o.formattedValue),a.addValue(OF(o,{ignoreValueFormatter:i,csvOptions:r}))}),a.getRowString()};function jF(e){let{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:i,apiRef:a}=e,o=n.reduce((e,n)=>`${e}${AF({id:n,columns:t,getCellParams:a.current.getCellParams,ignoreValueFormatter:i,csvOptions:r})}\r\n`,``).trim();if(!r.includeHeaders)return o;let s=t.filter(e=>e.field!==aD.field),c=[];if(r.includeColumnGroupsHeaders){let e=a.current.getAllGroupDetails(),t=0,n=s.reduce((e,n)=>{let r=a.current.getColumnGroupPath(n.field);return e[n.field]=r,t=Math.max(t,r.length),e},{});for(let i=0;i{let a=(n[r.field]||[])[i],o=e[a];t.addValue(o?o.headerName||o.groupId:``)})}}let l=new kF({csvOptions:r,sanitizeCellValue:DF});return s.forEach(e=>{l.addValue(e.headerName||e.field)}),c.push(l),`${`${c.map(e=>e.getRowString()).join(`\r +`)}\r\n`}${o}`.trim()}function MF(e){let t=document.createElement(`span`);t.style.whiteSpace=`pre`,t.style.userSelect=`all`,t.style.opacity=`0px`,t.textContent=e,document.body.appendChild(t);let n=document.createRange();n.selectNode(t);let r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand(`copy`)}finally{document.body.removeChild(t)}}function NF(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{MF(e)}):MF(e)}function PF(e){return!!(window.getSelection()?.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}var FF=(e,t)=>{let n=t.ignoreValueFormatterDuringExport,r=(typeof n==`object`?n?.clipboardExport:n)||!1,i=t.clipboardCopyCellDelimiter;PO(e,()=>e.current.rootElementRef.current,`keydown`,G.useCallback(t=>{if(!$w(t)||PF(t.target))return;let n=``;if(mE(e)>0)n=e.current.getDataAsCsv({includeHeaders:!1,delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1});else{let t=kE(e);t&&(n=OF(e.current.getCellParams(t.id,t.field),{csvOptions:{delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r}))}n=e.current.unstable_applyPipeProcessors(`clipboardCopy`,n),n&&(NF(n),e.current.publishEvent(`clipboardCopy`,n))},[e,r,i])),oC(e,`clipboardCopy`,t.onClipboardCopy)},IF=e=>H({},e,{columnMenu:{open:!1}}),LF=e=>{let t=NO(e,`useGridColumnMenu`),n=G.useRef({}),r=G.useCallback(()=>{n.current.wheel?.(),n.current.touchMove?.()},[]),i=G.useCallback(()=>{r(),n.current.wheel=e.current.subscribeEvent(`virtualScrollerWheel`,e.current.hideColumnMenu),n.current.touchMove=e.current.subscribeEvent(`virtualScrollerTouchMove`,e.current.hideColumnMenu)},[e,r]),a=G.useCallback(n=>{let r=HO(e),a={open:!0,field:n};(a.open!==r.open||a.field!==r.field)&&(e.current.setState(e=>e.columnMenu.open&&e.columnMenu.field===n?e:(t.debug(`Opening Column Menu`),i(),H({},e,{columnMenu:{open:!0,field:n}}))),e.current.hidePreferences())},[e,t,i]),o=G.useCallback(()=>{let n=HO(e);if(n.field){let t=dw(e),r=pw(e),i=uw(e),a=n.field;if(t[a]||(a=i[0]),r[a]===!1){let e=i.filter(e=>e===a||r[e]!==!1),t=e.indexOf(a);a=e[t+1]||e[t-1]}e.current.setColumnHeaderFocus(a)}let i={open:!1,field:void 0};(i.open!==n.open||i.field!==n.field)&&e.current.setState(e=>(t.debug(`Hiding Column Menu`),r(),H({},e,{columnMenu:i})))},[e,t,r]);MO(e,{showColumnMenu:a,hideColumnMenu:o,toggleColumnMenu:G.useCallback(n=>{t.debug(`Toggle Column Menu`);let r=HO(e);!r.open||r.field!==n?a(n):o()},[e,t,a,o])},`public`),$(e,`columnResizeStart`,o)},RF=(e,t,n)=>{n.current.caches.columns={lastColumnsProp:t.columns};let r=bO({apiRef:n,columnsToUpsert:t.columns,initialState:t.initialState?.columns,columnVisibilityModel:t.columnVisibilityModel??t.initialState?.columns?.columnVisibilityModel??{},keepOnlyColumnsToUpsert:!0});return H({},e,{columns:r,pinnedColumns:e.pinnedColumns??ow})};function zF(e,t){let n=NO(e,`useGridColumns`);e.current.registerControlState({stateId:`visibleColumns`,propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:pw,changeEvent:`columnVisibilityModelChange`});let r=G.useCallback(t=>{n.debug(`Updating columns state.`),e.current.setState(BF(t)),e.current.publishEvent(`columnsChange`,t.orderedFields)},[n,e]),i=G.useCallback(t=>dw(e)[t],[e]),a=G.useCallback(()=>fw(e),[e]),o=G.useCallback(()=>hw(e),[e]),s=G.useCallback((t,n=!0)=>(n?hw(e):fw(e)).findIndex(e=>e.field===t),[e]),c=G.useCallback(t=>{let n=s(t);return bw(e)[n]},[e,s]),l=G.useCallback(t=>{pw(e)!==t&&(e.current.setState(n=>H({},n,{columns:bO({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})})),e.current.updateRenderContext?.())},[e]),u=G.useCallback(t=>{let n=t;if(RO(e)){let r=[],i=[],a=BO(e);if(t.forEach(e=>{a.has(e.field)?r.push(e):i.push(e)}),r.length>0&&e.current.updateNonPivotColumns(r),i.length===0)return;n=i}let i=bO({apiRef:e,columnsToUpsert:n,initialState:void 0,keepOnlyColumnsToUpsert:!1,updateInitialVisibilityModel:!0});r(i)},[e,r]),d=G.useCallback((t,n)=>{let r=pw(e);if(n!==(r[t]??!0)){let i=H({},r,{[t]:n});e.current.setColumnVisibilityModel(i)}},[e]),f=G.useCallback(t=>uw(e).findIndex(e=>e===t),[e]),p=G.useCallback((t,i)=>{let a=e.current.getColumn(t);if(!a)return;let o=uw(e),s=f(t);if(s===i)return;n.debug(`Moving column ${t} to index ${i}`);let c=[...o],l=c.splice(s,1)[0];c.splice(i,0,l),r(H({},lw(e),{orderedFields:c}));let u={column:a,targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:s};e.current.publishEvent(`columnIndexChange`,u)},[e,n,r,f]),m={getColumn:i,getAllColumns:a,getColumnIndex:s,getColumnPosition:c,getVisibleColumns:o,getColumnIndexRelativeToVisibleColumns:f,updateColumns:u,setColumnVisibilityModel:l,setColumnVisibility:d,setColumnWidth:G.useCallback((t,i)=>{n.debug(`Updating column ${t} width to ${i}`);let a=lw(e),o=a.lookup[t],s=H({},o,{width:i,hasBeenResized:!0});r(_O(H({},a,{lookup:H({},a.lookup,{[t]:s})}),e.current.getRootDimensions())),e.current.publishEvent(`columnWidthChange`,{element:e.current.getColumnHeaderElement(t),colDef:s,width:i})},[e,n,r])},h={setColumnIndex:p};MO(e,m,`public`),MO(e,h,t.signature===QS.DataGrid?`private`:`public`);let g=G.useCallback((n,r)=>{let i={},a=pw(e);(!r.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys(t.initialState?.columns?.columnVisibilityModel??{}).length>0||Object.keys(a).length>0)&&(i.columnVisibilityModel=a),i.orderedFields=uw(e);let o=fw(e),s={};return o.forEach(e=>{if(e.hasBeenResized){let t={};hO.forEach(n=>{let r=e[n];r===1/0&&(r=-1),t[n]=r}),s[e.field]=t}}),Object.keys(s).length>0&&(i.dimensions=s),H({},n,{columns:i})},[e,t.columnVisibilityModel,t.initialState?.columns]),_=G.useCallback((t,n)=>{let r=n.stateToRestore.columns,i=r?.columnVisibilityModel;if(r==null)return t;let a=bO({apiRef:e,columnsToUpsert:[],initialState:r,columnVisibilityModel:i,keepOnlyColumnsToUpsert:!1});return r!=null&&e.current.setState(e=>H({},e,{columns:H({},e.columns,{lookup:a.lookup,orderedFields:a.orderedFields,initialColumnVisibilityModel:a.initialColumnVisibilityModel})})),i!=null&&e.current.setState(e=>H({},e,{columns:H({},e.columns,{columnVisibilityModel:i})})),r!=null&&e.current.publishEvent(`columnsChange`,a.orderedFields),t},[e]),v=G.useCallback((e,n)=>{if(n===_k.columns){let e=t.slots.columnsPanel;return(0,W.jsx)(e,H({},t.slotProps?.columnsPanel))}return e},[t.slots.columnsPanel,t.slotProps?.columnsPanel]);Qk(e,`columnMenu`,G.useCallback(n=>{let r=RO(e);return t.disableColumnSelector||r?n:[...n,`columnMenuColumnsItem`]},[t.disableColumnSelector,e])),Qk(e,`exportState`,g),Qk(e,`restoreState`,_),Qk(e,`preferencePanel`,v);let y=G.useRef(null);$(e,`viewportInnerSizeChange`,t=>{if(y.current!==t.width){if(y.current=t.width,!hw(e).some(e=>e.flex&&e.flex>0))return;r(_O(lw(e),e.current.getRootDimensions()))}}),$k(e,`hydrateColumns`,G.useCallback(()=>{n.info(`Columns pipe processing have changed, regenerating the columns`);let t=bO({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});r(t)},[e,n,r])),G.useEffect(()=>{if(e.current.caches.columns.lastColumnsProp===t.columns)return;e.current.caches.columns.lastColumnsProp=t.columns,n.info(`GridColumns have changed, new length ${t.columns.length}`);let i=bO({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0,updateInitialVisibilityModel:!0,columnVisibilityModel:t.columnVisibilityModel});r(i)},[n,e,r,t.columns,t.columnVisibilityModel]),G.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,n,t.columnVisibilityModel]),$(e,`columnsChange`,G.useCallback(n=>{if(t.signature!==QS.DataGrid)return;let r=dw(e);n.some(e=>r[e]?.type===`multiSelect`)},[e,t.signature]))}function BF(e){return t=>H({},t,{columns:e})}var VF=(e,t)=>H({},e,{density:t.initialState?.density??t.density??`standard`}),HF=(e,t)=>{let n=NO(e,`useDensity`);e.current.registerControlState({stateId:`density`,propModel:t.density,propOnChange:t.onDensityChange,stateSelector:lC,changeEvent:`densityChange`}),MO(e,{setDensity:D(t=>{lC(e)!==t&&(n.debug(`Set grid density to ${t}`),e.current.setState(e=>H({},e,{density:t})))})},`public`);let r=G.useCallback((n,r)=>{let i=lC(e);return!r.exportOnlyDirtyModels||t.density!=null||t.initialState?.density!=null?H({},n,{density:i}):n},[e,t.density,t.initialState?.density]),i=G.useCallback((t,n)=>{let r=n.stateToRestore?.density?n.stateToRestore.density:lC(e);return e.current.setState(e=>H({},e,{density:r})),t},[e]);Qk(e,`exportState`,r),Qk(e,`restoreState`,i),G.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])};function UF(e,t=`csv`,n=document.title||`untitled`){let r=`${n}.${t}`;if(`download`in HTMLAnchorElement.prototype){let t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=r,n.click(),setTimeout(()=>{URL.revokeObjectURL(t)});return}throw Error(dp(59))}var WF=({apiRef:e,options:t})=>{let n=fw(e);return t.fields?t.fields.reduce((e,t)=>{let r=n.find(e=>e.field===t);return r&&e.push(r),e},[]):(t.allColumns?n:hw(e)).filter(e=>e.disableExport!==!0)},GF=({apiRef:e})=>{let t=iE(e),n=xS(e),r=mE(e),i=t.filter(e=>n[e].type!==`footer`),a=kS(e),o=a?.top?.map(e=>e.id)||[],s=a?.bottom?.map(e=>e.id)||[];if(i.unshift(...o),i.push(...s),r>0){let t=hE(e);return i.filter(e=>t.has(e))}return i},KF=(e,t)=>{let n=NO(e,`useGridCsvExport`),r=t.ignoreValueFormatterDuringExport,i=(typeof r==`object`?r?.csvExport:r)||!1,a=G.useCallback((t={})=>(n.debug(`Get data as CSV`),jF({columns:WF({apiRef:e,options:t}),rowIds:(t.getRowsToExport??GF)({apiRef:e}),csvOptions:{delimiter:t.delimiter||`,`,shouldAppendQuotes:t.shouldAppendQuotes??!0,includeHeaders:t.includeHeaders??!0,includeColumnGroupsHeaders:t.includeColumnGroupsHeaders??!0,escapeFormulas:t.escapeFormulas??!0},ignoreValueFormatter:i,apiRef:e})),[n,e,i]);MO(e,{getDataAsCsv:a,exportDataAsCsv:G.useCallback(e=>{n.debug(`Export data as CSV`);let t=a(e);UF(new Blob([e?.utf8WithBom?new Uint8Array([239,187,191]):``,t],{type:`text/csv`}),`csv`,e?.fileName)},[n,a])},`public`),Qk(e,`exportMenu`,G.useCallback((e,t)=>t.csvOptions?.disableToolbarButton?e:[...e,{component:(0,W.jsx)(LN,{options:t.csvOptions}),componentName:`csvExport`}],[]))};function qF(e,t,n){let r=[],i=t.querySelectorAll(`style, link[rel='stylesheet']`);for(let t=0;t{o.addEventListener(`load`,()=>e())}))}n&&o.setAttribute(`nonce`,n),e.head.appendChild(o),n&&o.setAttribute(`nonce`,n)}return r}var JF=(e,t,n)=>{let r=e.paginationModel,i=e.rowCount,a=n?.pageSize??r.pageSize,o=RE(i,a,n?.page??r.page);n&&(n?.page!==r.page||n?.pageSize!==r.pageSize)&&(r=n);let s=a===-1?0:BE(r.page,o);return s!==r.page&&(r=H({},r,{page:s})),VE(r.pageSize,t),r},YF=(e,t)=>{let n=NO(e,`useGridPaginationModel`),r=Z(e,uC),i=G.useRef(ZT(e)),a=Math.floor(t.rowHeight*r);e.current.registerControlState({stateId:`paginationModel`,propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:GE,changeEvent:`paginationModelChange`});let o=G.useCallback(t=>{let r=GE(e);t!==r.page&&(n.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:r.pageSize}))},[e,n]),s=G.useMemo(()=>He(o,0),[o]);MO(e,{setPage:o,setPageSize:G.useCallback(t=>{let r=GE(e);t!==r.pageSize&&(n.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:r.page}))},[e,n]),setPaginationModel:G.useCallback(r=>{r!==GE(e)&&(n.debug(`Setting 'paginationModel' to`,r),e.current.setState(e=>H({},e,{pagination:H({},e.pagination,{paginationModel:JF(e.pagination,t.signature,r)})}),`setPaginationModel`))},[e,n,t.signature])},`public`);let c=G.useCallback((n,r)=>{let i=GE(e);return!r.exportOnlyDirtyModels||t.paginationModel!=null||t.initialState?.pagination?.paginationModel!=null||i.page!==0&&i.pageSize!==LE(t.autoPageSize)?H({},n,{pagination:H({},n.pagination,{paginationModel:i})}):n},[e,t.paginationModel,t.initialState?.pagination?.paginationModel,t.autoPageSize]),l=G.useCallback((n,r)=>{let i=r.stateToRestore.pagination?.paginationModel?H({},zE(t.autoPageSize),r.stateToRestore.pagination?.paginationModel):GE(e);return e.current.setState(e=>H({},e,{pagination:H({},e.pagination,{paginationModel:JF(e.pagination,t.signature,i)})}),`stateRestorePreProcessing`),n},[e,t.autoPageSize,t.signature]);Qk(e,`exportState`,c),Qk(e,`restoreState`,l);let u=()=>{let t=GE(e);e.current.virtualScrollerRef?.current&&e.current.scrollToIndexes({rowIndex:t.page*t.pageSize})},d=G.useCallback(()=>{if(!t.autoPageSize)return;let n=e.current.getRootDimensions(),r=Math.max(1,Math.floor(n.viewportInnerSize.height/a));e.current.setPageSize(r)},[e,t.autoPageSize,a]),f=G.useCallback(t=>{if(t==null)return;let n=GE(e);if(n.page===0)return;let r=XE(e);n.page>r-1&&queueMicrotask(()=>{s(Math.max(0,r-1))})},[e,s]),p=G.useCallback(()=>{GE(e).page!==0&&s(0),e.current.getScrollPosition().top!==0&&e.current.scroll({top:0})},[e,s]),m=G.useMemo(()=>He(p,0),[p]),h=G.useCallback(t=>{let n=H({},t,{items:lE(e)});Hb(n,i.current)||(i.current=n,m())},[e,m]);$(e,`viewportInnerSizeChange`,d),$(e,`paginationModelChange`,u),$(e,`rowCountChange`,f),$(e,`sortModelChange`,m),$(e,`filterModelChange`,h);let g=G.useRef(!0);G.useEffect(()=>{if(g.current){g.current=!1;return}t.pagination&&e.current.setState(e=>H({},e,{pagination:H({},e.pagination,{paginationModel:JF(e.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.signature,t.pagination]),G.useEffect(()=>{e.current.setState(e=>{let n=t.pagination===!0;return e.pagination.paginationMode===t.paginationMode&&e.pagination.enabled===n?e:H({},e,{pagination:H({},e.pagination,{paginationMode:t.paginationMode,enabled:n})})})},[e,t.paginationMode,t.pagination]),G.useEffect(d,[d])};function XF(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function ZF(e){let t=document.createElement(`iframe`);return t.style.position=`absolute`,t.style.width=`0px`,t.style.height=`0px`,t.title=e||document.title,t}var QF=(e,t)=>{let n=e.current.rootElementRef.current!==null,r=NO(e,`useGridPrintExport`),i=G.useRef(null),a=G.useRef(null),o=G.useRef({}),s=G.useRef([]),c=G.useRef(null);G.useEffect(()=>{i.current=Ue(e.current.rootElementRef.current)},[e,n]);let l=G.useCallback((t,n,r)=>new Promise(i=>{let a=WF({apiRef:e,options:{fields:t,allColumns:n}}).map(e=>e.field),o=fw(e),s={};o.forEach(e=>{s[e.field]=a.includes(e.field)}),r&&(s[aD.field]=!0),e.current.setColumnVisibilityModel(s),i()}),[e]),u=G.useCallback(t=>{let n=t({apiRef:e}).reduce((t,n)=>{let r=e.current.getRow(n);return r[MS]||t.push(r),t},[]);e.current.setRows(n)},[e]),d=G.useCallback((t,n)=>{let r=H({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},n),a=t.contentDocument;if(!a)return;let o=e.current.rootElementRef.current,s=o.cloneNode(!0),c=s.querySelector(`.${X.virtualScrollerContent}`),l=s.querySelector(`.${X.main}`);l.style.overflow=`visible`;let u=s.querySelector(`.${X.virtualScrollerRenderZone}`);u.style.position=`static`,u.style.transform=``;let d=s.querySelector(`.${X.contentFiller}`);if(d.style.display=`none`,c.style.flexBasis=`auto`,s.querySelector(`.${X[`scrollbar--vertical`]}`)?.remove(),!(c.nextSibling instanceof HTMLElement&&c.nextSibling.classList.contains(X.filler))){let e=document.createElement(`div`);e.style.height=jk,c.insertAdjacentElement(`afterend`,e)}let f=s.querySelector(`.${X.footerContainer}`);r.hideToolbar&&s.querySelector(`.${X.toolbar}`)?.remove(),r.hideFooter&&f&&f.remove(),s.style.height=`auto`,s.style.boxSizing=`content-box`,!r.hideFooter&&f&&(f.style.width=`100%`);let p=document.createElement(`div`);p.appendChild(s),a.body.style.marginTop=`0px`,a.body.innerHTML=p.innerHTML;let m=typeof r.pageStyle==`function`?r.pageStyle():r.pageStyle;if(typeof m==`string`){let e=a.createElement(`style`);e.appendChild(a.createTextNode(m)),a.head.appendChild(e)}r.bodyClassName&&a.body.classList.add(...r.bodyClassName.split(` `));let h=[];if(r.copyStyles){let e=o.getRootNode();h=qF(a,e.constructor.name===`ShadowRoot`?e:i.current)}Promise.all(h).then(()=>{t.contentWindow.print()})},[e,i]),f=G.useCallback(t=>{i.current.body.removeChild(t),e.current.restoreState(a.current||{}),a.current?.columns?.columnVisibilityModel||e.current.setColumnVisibilityModel(o.current),e.current.setState(e=>H({},e,{virtualization:c.current})),e.current.setRows(s.current),a.current=null,o.current={},s.current=[]},[e]);MO(e,{exportDataAsPrint:G.useCallback(async n=>{if(r.debug(`Export data as Print`),!e.current.rootElementRef.current)throw Error(dp(80));if(a.current=e.current.exportState(),o.current=pw(e),s.current=e.current.getSortedRows().filter(e=>!e[MS]),t.pagination){let t={page:0,pageSize:oE(e)};e.current.setState(e=>H({},e,{pagination:H({},e.pagination,{paginationModel:JF(e.pagination,`DataGridPro`,t)})}))}c.current=e.current.state.virtualization,e.current.unstable_setVirtualization(!1),await l(n?.fields,n?.allColumns,n?.includeCheckboxes),u(n?.getRowsToExport??GF),await XF();let p=ZF(n?.fileName);p.onload=()=>{d(p,n),p.contentWindow.matchMedia(`print`).addEventListener(`change`,e=>{e.matches===!1&&f(p)})},i.current.body.appendChild(p)},[t,r,e,d,f,l,u])},`public`),Qk(e,`exportMenu`,G.useCallback((e,t)=>t.printOptions?.disableToolbarButton?e:[...e,{component:(0,W.jsx)(RN,{options:t.printOptions}),componentName:`printExport`}],[]))},$F=(e,t,n)=>{let r=t.filterModel??t.initialState?.filter?.filterModel??rw();return H({},e,{filter:H({filterModel:jw(r,t.disableMultipleColumnsFiltering,n)},nw),visibleRowsLookup:{}})},eI=e=>e.filteredRowsLookup;function tI(e,t){return e.current.applyStrategyProcessor(`visibleRowsLookupCreation`,{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function nI(){return Sp(Object.values)}var rI=(e,t,n)=>{let r=NO(e,`useGridFilter`);e.current.registerControlState({stateId:`filter`,propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:ZT,changeEvent:`filterModelChange`});let i=G.useCallback(()=>{e.current.setState(t=>{let n=ZT(e),r=e.current.getFilterState(n),i=H({},t,{filter:H({},t.filter,r)}),a=tI(e,i);return H({},i,{visibleRowsLookup:a})}),e.current.publishEvent(`filteredRowsSet`)},[e]),a=G.useCallback((e,n)=>n==null||n.filterable===!1||t.disableColumnFilter?e:[...e,`columnMenuFilterItem`],[t.disableColumnFilter]),o=G.useCallback(t=>{let n=ZT(e);e.current.setFilterModel(ww(n,t),`upsertFilterItem`)},[e]),s=G.useCallback(t=>{let n=ZT(e);e.current.setFilterModel(Tw(n,t),`upsertFilterItems`)},[e]),c=G.useCallback(t=>{let n=ZT(e);e.current.setFilterModel(Ew(n,t),`deleteFilterItem`)},[e]),l=G.useCallback((n,i,a)=>{if(r.debug(`Displaying filter panel`),n){let r=ZT(e),i=r.items.filter(t=>{if(t.value!==void 0)return!(Array.isArray(t.value)&&t.value.length===0);let n=e.current.getColumn(t.field)?.filterOperators?.find(e=>e.value===t.operator);return!(n?.requiresFilterValue===void 0||n?.requiresFilterValue)}),a,o=i.find(e=>e.field===n),s=e.current.getColumn(n);a=o?i:t.disableMultipleColumnsFiltering?[Aw({field:n,operator:s.filterOperators[0].value},e)]:[...i,Aw({field:n,operator:s.filterOperators[0].value},e)],e.current.setFilterModel(H({},r,{items:a}))}e.current.showPreferences(_k.filters,i,a)},[e,r,t.disableMultipleColumnsFiltering]),u=G.useCallback(()=>{r.debug(`Hiding filter panel`),e.current.hidePreferences()},[e,r]),d=G.useCallback(t=>{let n=ZT(e);e.current.setFilterModel(Dw(n,t),`changeLogicOperator`)},[e]),f=G.useCallback(t=>{let n=ZT(e);Hb(n.quickFilterValues,t)||e.current.setFilterModel(H({},n,{quickFilterValues:[...t]}))},[e]),p=G.useCallback((n,i)=>{ZT(e)!==n&&(r.debug(`Setting filter model`),e.current.updateControlState(`filter`,Mw(n,t.disableMultipleColumnsFiltering,e),i),e.current.unstable_applyFilters())},[e,r,t.disableMultipleColumnsFiltering]),m=G.useCallback(r=>{let i=jw(r,t.disableMultipleColumnsFiltering,e),a=n.hooks.useFilterValueGetter(e,t),o=t.filterMode===`client`?zw(i,a,e,t.disableEval):null,s=e.current.applyStrategyProcessor(`filtering`,{isRowMatchingFilters:o,filterModel:i??rw(),filterValueGetter:a});return H({},s,{filterModel:i})},[e,n.hooks,t]);MO(e,{setFilterLogicOperator:d,unstable_applyFilters:i,deleteFilterItem:c,upsertFilterItem:o,upsertFilterItems:s,setFilterModel:p,showFilterPanel:l,hideFilterPanel:u,setQuickFilterValues:f,ignoreDiacritics:t.ignoreDiacritics,getFilterState:m},`public`);let g=G.useCallback((n,r)=>{let i=ZT(e);return i.items.forEach(e=>{delete e.fromInput}),!r.exportOnlyDirtyModels||t.filterModel!=null||t.initialState?.filter?.filterModel!=null||!Hb(i,rw())?H({},n,{filter:{filterModel:i}}):n},[e,t.filterModel,t.initialState?.filter?.filterModel]),_=G.useCallback((n,r)=>{let i=r.stateToRestore.filter?.filterModel;return i==null?n:(e.current.updateControlState(`filter`,Mw(i,t.disableMultipleColumnsFiltering,e),`restoreState`),H({},n,{callbacks:[...n.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),v=G.useCallback((e,n)=>{if(n===_k.filters){let e=t.slots.filterPanel;return(0,W.jsx)(e,H({},t.slotProps?.filterPanel))}return e},[t.slots.filterPanel,t.slotProps?.filterPanel]),{getRowId:y}=t,b=De(nI),x=G.useCallback(n=>{if(t.filterMode!==`client`||!n.isRowMatchingFilters||!n.filterModel.items.length&&!n.filterModel.quickFilterValues?.length)return nw;let r=bS(e),i={},{isRowMatchingFilters:a}=n,o={},s={passingFilterItems:null,passingQuickFilterValues:null},c=b.current(e.current.state.rows.dataRowIdToModelLookup);for(let t=0;t{r.debug(`onColUpdated - GridColumns changed, applying filters`);let t=ZT(e),n=dw(e),i=t.items.filter(e=>e.field&&n[e.field]);i.length{t===`filtering`&&e.current.unstable_applyFilters()},[e]),w=G.useCallback(()=>{e.current.setState(t=>H({},t,{visibleRowsLookup:tI(e,t)}))},[e]);$(e,`rowsSet`,i),$(e,`columnsChange`,S),$(e,`activeStrategyProcessorChange`,C),$(e,`rowExpansionChange`,w),$(e,`columnVisibilityModelChange`,()=>{let t=ZT(e);t.quickFilterValues?.length&&Lw(t)&&i()}),FO(()=>{t.signature===`DataGrid`&&i()}),h(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,r,t.filterModel])},iI=e=>H({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),aI=(e,t)=>{let n=NO(e,`useGridFocus`),r=G.useRef(null),i=e.current.rootElementRef.current!==null,a=G.useCallback((t,n)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent(`cellFocusOut`,e.current.getCellParams(t.id,t.field),n)},[e]),o=G.useCallback((t,r)=>{let i=kE(e);if(i?.id===t&&i?.field===r){if(e.current.getCellMode(t,r)!==`view`)return;let n=e.current.getCellElement(t,r);if(!n)return;let i=e.current.rootElementRef.current,a=Ue(i),o=a.activeElement;if(!(!o||o===a.body||o===a.documentElement||i?.contains(o))||n.contains(a.activeElement))return;pA(n,e);return}e.current.setState(e=>(n.debug(`Focusing on cell with id=${t} and field=${r}`),H({},e,{tabIndex:{cell:{id:t,field:r},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:r},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.getRow(t)&&(i&&a(i,{}),e.current.publishEvent(`cellFocusIn`,e.current.getCellParams(t,r)))},[e,n,a]),s=G.useCallback((t,r={})=>{let i=kE(e);a(i,r),e.current.setState(e=>(n.debug(`Focusing on column header with colIndex=${t}`),H({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))},[e,n,a]),c=G.useCallback((t,r={})=>{let i=kE(e);a(i,r),e.current.setState(e=>(n.debug(`Focusing on column header filter with colIndex=${t}`),H({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}})))},[e,n,a]),l=G.useCallback((t,n,r={})=>{let i=kE(e);i&&e.current.publishEvent(`cellFocusOut`,e.current.getCellParams(i.id,i.field),r),e.current.setState(e=>H({},e,{tabIndex:{columnGroupHeader:{field:t,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null}}))},[e]),u=G.useCallback(()=>jE(e),[e]),d=G.useCallback((n,r,i)=>{let a=e.current.getColumnIndex(r),o=hw(e),s=Wk(e,{pagination:t.pagination,paginationMode:t.paginationMode}),c=kS(e),l=[].concat(c.top||[],s.rows,c.bottom||[]),u=l.findIndex(e=>e.id===n);i===`right`?a+=1:i===`left`?--a:u+=1,a>=o.length?(u+=1,u=0&&(a=o.length-1)),u=LC(u,0,l.length-1);let d=l[u];if(!d)return;let f=e.current.unstable_getCellColSpanInfo(d.id,a);f&&f.spannedByColSpan&&(i===`left`||i===`below`?a=f.leftVisibleCellIndex:i===`right`&&(a=f.rightVisibleCellIndex)),a=LC(a,0,o.length-1);let p=o[a];e.current.setCellFocus(d.id,p.field)},[e,t.pagination,t.paginationMode]),f=G.useCallback(({id:t,field:n})=>{e.current.setCellFocus(t,n)},[e]),p=G.useCallback((t,n)=>{Qw(n)||n.key===`Enter`||n.key===`Tab`||n.key===`Shift`||Yw(n.key)||e.current.setCellFocus(t.id,t.field)},[e]),m=G.useCallback(({field:t},n)=>{n.target===n.currentTarget&&e.current.setColumnHeaderFocus(t,n)},[e]),h=G.useCallback(({fields:t,depth:n},r)=>{if(r.target!==r.currentTarget)return;let i=jE(e);i!==null&&i.depth===n&&t.includes(i.field)||e.current.setColumnGroupHeaderFocus(t[0],n,r)},[e]),g=G.useCallback((t,r)=>{r.relatedTarget?.getAttribute(`class`)?.includes(X.columnHeader)||r.relatedTarget?.getAttribute(`class`)?.includes(X.cell)||(n.debug(`Clearing focus`),e.current.setState(e=>H({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),_=G.useCallback(e=>{r.current=e},[]),v=G.useCallback(t=>{let n=r.current;r.current=null;let i=kE(e);if(e.current.unstable_applyPipeProcessors(`canUpdateFocus`,!0,{event:t,cell:n})){if(!i){n&&e.current.setCellFocus(n.id,n.field);return}(n?.id!==i.id||n?.field!==i.field)&&(e.current.getCellElement(i.id,i.field)?.contains(t.target)||(n?e.current.setCellFocus(n.id,n.field):(e.current.setState(e=>H({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),a(i,t))))}},[e,a]),y=G.useCallback(t=>{if(t.cellMode===`view`)return;let n=kE(e);(n?.id!==t.id||n?.field!==t.field)&&e.current.setCellFocus(t.id,t.field)},[e]),b=G.useCallback(()=>{let n=kE(e);if(n&&!e.current.getRow(n.id)){let r=n.id,i=null;if(r!==void 0){let n=e.current.getRowElement(r),a=n?.dataset.rowindex?Number(n?.dataset.rowindex):0,o=Wk(e,{pagination:t.pagination,paginationMode:t.paginationMode});i=o.rows[LC(a,0,o.rows.length-1)]?.id??null}e.current.setState(e=>H({},e,{focus:{cell:i===null?null:{id:i,field:n.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),x=G.useMemo(()=>He(b,0),[b]),S=D(()=>{let n=kE(e);if(!n)return;let r=Wk(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(r.rows.find(e=>e.id===n.id)||r.rows.length===0)return;let i=hw(e);e.current.setState(e=>H({},e,{tabIndex:{cell:{id:r.rows[0].id,field:i[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),C={setCellFocus:o,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:c},w={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:l,getColumnGroupHeaderFocus:u};MO(e,C,`public`),MO(e,w,`private`),G.useEffect(()=>{let t=Ue(e.current.rootElementRef.current);return t.addEventListener(`mouseup`,v),()=>{t.removeEventListener(`mouseup`,v)}},[e,i,v]),$(e,`columnHeaderBlur`,g),$(e,`cellDoubleClick`,f),$(e,`cellMouseDown`,_),$(e,`cellKeyDown`,p),$(e,`cellModeChange`,y),$(e,`columnHeaderFocus`,m),$(e,`columnGroupHeaderFocus`,h),$(e,`rowsSet`,x),$(e,`paginationModelChange`,S)},oI=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(et)return e-1;return null},sI=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e=0&&o(t.top||[]).concat(e.rows,t.bottom||[])),uI=(e,t)=>{let n=NO(e,`useGridKeyboardNavigation`),r=Ie(),i=G.useCallback(()=>lI(e),[e]),a=t.signature!==`DataGrid`&&t.headerFilters,o=G.useCallback((t,r,i=`left`,a=`up`)=>{let o=tE(e),s=e.current.unstable_getCellColSpanInfo(r,t);s&&s.spannedByColSpan&&(i===`left`?t=s.leftVisibleCellIndex:i===`right`&&(t=s.rightVisibleCellIndex));let c=gw(e)[t],l=cI(e,r,t,a),u=o.findIndex(e=>e.id===l);n.debug(`Navigating to cell row ${u}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:u}),e.current.setCellFocus(l,c)},[e,n]),s=G.useCallback((t,r)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});let i=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(i,r)},[e,n]),c=G.useCallback((t,r)=>{n.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});let i=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(i,r)},[e,n]),l=G.useCallback((t,r,i)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});let{field:a}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(a,r,i)},[e,n]),u=G.useCallback(e=>i()[e]?.id,[i]),d=G.useCallback((n,d)=>{let f=d.currentTarget.querySelector(`.${X.columnHeaderTitleContainerContent}`);if(f&&f.contains(d.target)&&n.field!==aD.field||!Yw(d.key)&&d.key!==`Tab`&&d.key!==`Enter`||d.key===`Tab`&&(t.tabNavigation===`none`||t.tabNavigation===`content`&&d.shiftKey))return;let p=i(),m=e.current.getViewportPageSize(),h=n.field?e.current.getColumnIndex(n.field):0,g=p.length>0?0:null,_=p.length>0?p.length-1:null,v=Math.max(0,hw(e).length-1),y=mO(e),b=!0;if(d.key===`Tab`&&t.tabNavigation===`content`&&!d.shiftKey){g!==null&&(o(0,u(g)),d.preventDefault());return}switch(d.key){case`ArrowDown`:a?c(h,d):g!==null&&o(h,u(g));break;case`ArrowRight`:{let e=sI({currentColIndex:h,firstColIndex:0,lastColIndex:v,isRtl:r});e!==null&&s(e,d);break}case`ArrowLeft`:{let e=oI({currentColIndex:h,firstColIndex:0,lastColIndex:v,isRtl:r});e!==null&&s(e,d);break}case`ArrowUp`:y>0&&l(h,y-1,d);break;case`PageDown`:g!==null&&_!==null&&o(h,u(Math.min(g+m,_)));break;case`Home`:s(0,d);break;case`End`:s(v,d);break;case`Enter`:(d.ctrlKey||d.metaKey)&&e.current.toggleColumnMenu(n.field);break;case`Tab`:d.shiftKey?h===0?y>0?l(v,y-1,d):b=!1:s(h-1,d):h===v?a?c(0,d):t.tabNavigation===`all`&&g!==null?o(0,u(g)):b=!1:s(h+1,d);break;case` `:break;default:b=!1}b&&d.preventDefault()},[e,t.tabNavigation,i,a,c,o,u,r,s,l]),f=G.useCallback((n,a)=>{let l=cO(e)===n.field;if(lO(e)===n.field||l&&a.key!==`Tab`||!Yw(a.key)&&a.key!==`Tab`||a.key===`Tab`&&(t.tabNavigation===`none`||t.tabNavigation===`content`&&a.shiftKey))return;let d=i(),f=e.current.getViewportPageSize(),p=n.field?e.current.getColumnIndex(n.field):0,m=d.length>0?0:null,h=d.length>0?d.length-1:null,g=Math.max(0,hw(e).length-1),_=!0;if(a.key===`Tab`&&t.tabNavigation===`content`&&!a.shiftKey){m!==null&&(o(0,u(m)),a.preventDefault());return}switch(a.key){case`ArrowDown`:m!==null&&o(p,u(m));break;case`ArrowRight`:{let e=sI({currentColIndex:p,firstColIndex:0,lastColIndex:g,isRtl:r});e!==null&&c(e,a);break}case`ArrowLeft`:{let t=oI({currentColIndex:p,firstColIndex:0,lastColIndex:g,isRtl:r});t===null?e.current.setColumnHeaderFilterFocus(n.field,a):c(t,a);break}case`ArrowUp`:s(p,a);break;case`PageDown`:m!==null&&h!==null&&o(p,u(Math.min(m+f,h)));break;case`Home`:c(0,a);break;case`End`:c(g,a);break;case`Tab`:a.shiftKey?p===0?s(g,a):c(p-1,a):p===g?t.tabNavigation===`all`&&m!==null?o(0,u(m)):_=!1:c(p+1,a);break;case` `:break;default:_=!1}_&&a.preventDefault()},[e,t.tabNavigation,i,c,r,s,o,u]),p=G.useCallback((n,r)=>{let a=jE(e);if(a===null)return;let{field:c,depth:d}=a,{fields:f,depth:p,maxDepth:m}=n;if(!Yw(r.key)&&r.key!==`Tab`||r.key===`Tab`&&(t.tabNavigation===`none`||t.tabNavigation===`content`&&r.shiftKey))return;let h=i(),g=e.current.getViewportPageSize(),_=e.current.getColumnIndex(c),v=c?e.current.getColumnIndex(c):0,y=h.length>0?0:null,b=h.length>0?h.length-1:null,x=Math.max(0,hw(e).length-1),S=!0;if(r.key===`Tab`&&t.tabNavigation===`content`&&!r.shiftKey){y!==null&&(o(0,u(y)),r.preventDefault());return}switch(r.key){case`ArrowDown`:p===m-1?s(_,r):l(_,d+1,r);break;case`ArrowUp`:p>0&&l(_,d-1,r);break;case`ArrowRight`:{let e=f.length-f.indexOf(c)-1;_+e+1<=x&&l(_+e+1,d,r);break}case`ArrowLeft`:{let e=f.indexOf(c);_-e-1>=0&&l(_-e-1,d,r);break}case`PageDown`:y!==null&&b!==null&&o(v,u(Math.min(y+g,b)));break;case`Home`:l(0,d,r);break;case`End`:l(x,d,r);break;case`Tab`:if(r.shiftKey){let e=_-f.indexOf(c)-1;e<0?p===0?S=!1:l(x,d-1,r):l(e,d,r)}else{let e=_+(f.length-f.indexOf(c)-1)+1;e>x&&p===m-1?s(0,r):e>x?l(0,d+1,r):l(e,d,r)}break;case` `:break;default:S=!1}S&&r.preventDefault()},[e,t.tabNavigation,i,s,l,o,u]),m=G.useCallback((n,l)=>{if(wj(l))return;let d=e.current.getCellParams(n.id,n.field);if(d.cellMode===GC.Edit||!Yw(l.key)&&l.key!==`Tab`||l.key===`Tab`&&(t.tabNavigation===`none`||t.tabNavigation===`header`&&!l.shiftKey)||!e.current.unstable_applyPipeProcessors(`canUpdateFocus`,!0,{event:l,cell:d}))return;let f=i();if(f.length===0)return;let p=a?c:s,m=e.current.getViewportPageSize(),h=n.field?e.current.getColumnIndex(n.field):0,g=f.findIndex(e=>e.id===n.id),_=f.length-1,v=Math.max(0,hw(e).length-1),y=!0;if(l.key===`Tab`&&t.tabNavigation===`header`&&l.shiftKey){p(v,l),l.preventDefault();return}switch(l.key){case`ArrowDown`:g<_&&o(h,u(g+1),r?`right`:`left`,`down`);break;case`ArrowUp`:g>0?o(h,u(g-1)):p(h,l);break;case`ArrowRight`:{let e=sI({currentColIndex:h,firstColIndex:0,lastColIndex:v,isRtl:r});e!==null&&o(e,u(g),r?`left`:`right`);break}case`ArrowLeft`:{let e=oI({currentColIndex:h,firstColIndex:0,lastColIndex:v,isRtl:r});e!==null&&o(e,u(g),r?`right`:`left`);break}case`Tab`:l.shiftKey?h===0&&g===0?t.tabNavigation===`all`?p(v,l):y=!1:h===0?o(v,u(g-1)):o(h-1,u(g),`left`):h===v?g===_?y=!1:o(0,u(g+1)):o(h+1,u(g),`right`);break;case` `:{if(n.field===`__detail_panel_toggle__`)break;let e=n.colDef;if(e&&(e.field===`__tree_data_group__`||_A(e.field))||e&&e.type===`longText`)break;!l.shiftKey&&g<_&&o(h,u(Math.min(g+m,_)));break}case`PageDown`:g<_&&o(h,u(Math.min(g+m,_)));break;case`PageUp`:{let e=Math.max(g-m,0);e!==g&&e>=0?o(h,u(e)):s(h,l);break}case`Home`:l.ctrlKey||l.metaKey||l.shiftKey?o(0,u(0)):o(0,u(g));break;case`End`:l.ctrlKey||l.metaKey||l.shiftKey?o(v,u(_)):o(v,u(g));break;default:y=!1}y&&l.preventDefault()},[e,t.tabNavigation,i,r,o,u,a,c,s]);Qk(e,`canStartEditing`,G.useCallback((e,{event:t})=>t.key!==` `&&e,[])),$(e,`columnHeaderKeyDown`,d),$(e,`headerFilterKeyDown`,f),$(e,`columnGroupHeaderKeyDown`,p),$(e,`cellKeyDown`,m)},dI=(e,t)=>{let n=NO(e,`useGridRowCount`),r=De(()=>GE(e).pageSize),i=t.onRowCountChange;e.current.registerControlState({stateId:`paginationRowCount`,propModel:t.rowCount,propOnChange:i,stateSelector:KE,changeEvent:`rowCountChange`}),MO(e,{setRowCount:G.useCallback(t=>{let r=KE(e);if(r!==t){if(n.debug(`Setting 'rowCount' to`,t),r==null||r===-1){let n=H({},e.current.state,{pagination:H({},e.current.state.pagination,{rowCount:t})});e.current.state=n,e.current.store.update(n),e.current.publishEvent(`rowCountChange`,t),i&&i(t);return}e.current.setState(e=>H({},e,{pagination:H({},e.pagination,{rowCount:t})}))}},[e,n,i])},`public`);let a=G.useCallback((n,r)=>{let i=KE(e);return!r.exportOnlyDirtyModels||t.rowCount!=null||t.initialState?.pagination?.rowCount!=null?H({},n,{pagination:H({},n.pagination,{rowCount:i})}):n},[e,t.rowCount,t.initialState?.pagination?.rowCount]),o=G.useCallback((t,n)=>{let r=n.stateToRestore.pagination?.rowCount?n.stateToRestore.pagination.rowCount:KE(e);return e.current.setState(e=>H({},e,{pagination:H({},e.pagination,{rowCount:r})})),t},[e]);Qk(e,`exportState`,a),Qk(e,`restoreState`,o),$(e,`paginationModelChange`,G.useCallback(n=>{t.paginationMode===`client`||!r.current||n.pageSize!==r.current&&(r.current=n.pageSize,KE(e)===-1&&e.current.setPage(0))},[t.paginationMode,r,e])),G.useEffect(()=>{t.paginationMode===`server`&&t.rowCount!=null&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,t.rowCount]),Kp(e.current.store,()=>{if(qE(e).hasNextPage===!1)return!0;if(t.paginationMode===`client`)return sE(e)},(t,n)=>{let r=KE(e);if(n===!0&&(r==null||r===-1)){let t=sE(e),n=GE(e);e.current.setRowCount(n.pageSize*n.page+t)}else typeof n==`number`&&e.current.setRowCount(n)}),G.useEffect(()=>{t.paginationMode===`client`&&e.current.setRowCount(sE(e))},[e,t.paginationMode])},fI=(e,t)=>{let n=NO(e,`useGridPaginationMeta`);e.current.registerControlState({stateId:`paginationMeta`,propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:qE,changeEvent:`paginationMetaChange`}),MO(e,{setPaginationMeta:G.useCallback(t=>{qE(e)!==t&&(n.debug(`Setting 'paginationMeta' to`,t),e.current.setState(e=>H({},e,{pagination:H({},e.pagination,{meta:t})})))},[e,n])},`public`);let r=G.useCallback((n,r)=>{let i=qE(e);return!r.exportOnlyDirtyModels||t.paginationMeta!=null||t.initialState?.pagination?.meta!=null?H({},n,{pagination:H({},n.pagination,{meta:i})}):n},[e,t.paginationMeta,t.initialState?.pagination?.meta]),i=G.useCallback((t,n)=>{let r=n.stateToRestore.pagination?.meta?n.stateToRestore.pagination.meta:qE(e);return e.current.setState(e=>H({},e,{pagination:H({},e.pagination,{meta:r})})),t},[e]);Qk(e,`exportState`,r),Qk(e,`restoreState`,i),G.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])},pI=(e,t)=>{let n=H({},zE(t.autoPageSize),t.paginationModel??t.initialState?.pagination?.paginationModel);VE(n.pageSize,t.signature);let r=t.rowCount??t.initialState?.pagination?.rowCount??(t.paginationMode===`client`?e.rows?.totalRowCount:void 0),i=t.paginationMeta??t.initialState?.pagination?.meta??{};return H({},e,{pagination:H({},e.pagination,{paginationModel:n,rowCount:r,meta:i,enabled:t.pagination===!0,paginationMode:t.paginationMode})})},mI=(e,t)=>{fI(e,t),YF(e,t),dI(e,t)},hI=(e,t)=>H({},e,{preferencePanel:t.initialState?.preferencePanel??{open:!1}}),gI=(e,t)=>{let n=NO(e,`useGridPreferencesPanel`),r=G.useCallback(()=>{e.current.setState(t=>{if(!t.preferencePanel.open)return t;n.debug(`Hiding Preferences Panel`);let r=hk(e);return e.current.publishEvent(`preferencePanelClose`,{openedPanelValue:r.openedPanelValue}),H({},t,{preferencePanel:{open:!1}})})},[e,n]);MO(e,{showPreferences:G.useCallback((t,r,i)=>{n.debug(`Opening Preferences Panel`),e.current.setState(e=>H({},e,{preferencePanel:H({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:r,labelId:i})})),e.current.publishEvent(`preferencePanelOpen`,{openedPanelValue:t})},[n,e]),hidePreferences:r},`public`);let i=G.useCallback((n,r)=>{let i=hk(e);return!r.exportOnlyDirtyModels||t.initialState?.preferencePanel!=null||i.open?H({},n,{preferencePanel:i}):n},[e,t.initialState?.preferencePanel]),a=G.useCallback((t,n)=>{let r=n.stateToRestore.preferencePanel;return r!=null&&e.current.setState(e=>H({},e,{preferencePanel:r})),t},[e]);Qk(e,`exportState`,i),Qk(e,`restoreState`,a)},_I=e=>{switch(e.type){case`boolean`:return!1;case`date`:case`dateTime`:case`number`:return;case`singleSelect`:return``;default:return``}},vI=[`id`,`field`],yI=[`id`,`field`],bI=(e,t)=>{let[n,r]=G.useState({}),i=G.useRef(n),a=G.useRef({}),{processRowUpdate:o,onProcessRowUpdateError:s,cellModesModel:c,onCellModesModelChange:l}=t,u=e=>(...n)=>{t.editMode===WC.Cell&&e(...n)},d=G.useCallback((t,n)=>{let r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw Error(dp(77,t,n))},[e]),f=G.useCallback((t,n,r)=>{if(e.current.getCellMode(t,n)!==r)throw Error(dp(78,t,n,r,r))},[e]),p=G.useCallback((t,n)=>{if(!t.isEditable||t.cellMode===GC.Edit)return;let r=H({},t,{reason:ZC.cellDoubleClick});e.current.publishEvent(`cellEditStart`,r,n)},[e]),m=G.useCallback((t,n)=>{if(t.cellMode===GC.View||e.current.getCellMode(t.id,t.field)===GC.View)return;let r=H({},t,{reason:QC.cellFocusOut});e.current.publishEvent(`cellEditStop`,r,n)},[e]),g=G.useCallback((t,n)=>{if(t.cellMode===GC.Edit){if(n.which===229)return;let r;if(n.key===`Escape`?r=QC.escapeKeyDown:n.key===`Enter`?r=QC.enterKeyDown:n.key===`Tab`&&(r=n.shiftKey?QC.shiftTabKeyDown:QC.tabKeyDown,n.preventDefault()),r){let i=H({},t,{reason:r});e.current.publishEvent(`cellEditStop`,i,n)}}else if(t.isEditable){let r;if(!e.current.unstable_applyPipeProcessors(`canStartEditing`,!0,{event:n,cellParams:t,editMode:`cell`}))return;if(Jw(n)?r=ZC.printableKeyDown:Qw(n)?r=ZC.pasteKeyDown:n.key===`Enter`?(r=ZC.enterKeyDown,n.preventDefault()):(n.key===`Backspace`||n.key===`Delete`)&&(r=ZC.deleteKeyDown),r){let i=H({},t,{reason:r,key:n.key});e.current.publishEvent(`cellEditStart`,i,n)}}},[e]),_=G.useCallback(t=>{let{id:n,field:r,reason:i}=t,a={id:n,field:r};(i===ZC.printableKeyDown||i===ZC.deleteKeyDown||i===ZC.pasteKeyDown)&&(a.deleteValue=!0),e.current.startCellEditMode(a)},[e]),v=G.useCallback(t=>{let{id:n,field:r,reason:i}=t;e.current.runPendingEditCellValueMutation(n,r);let a;i===QC.enterKeyDown?a=`below`:i===QC.tabKeyDown?a=`right`:i===QC.shiftTabKeyDown&&(a=`left`);let o=i===`escapeKeyDown`;e.current.stopCellEditMode({id:n,field:r,ignoreModifications:o,cellToFocusAfter:a})},[e]);$(e,`cellDoubleClick`,u(p)),$(e,`cellFocusOut`,u(m)),$(e,`cellKeyDown`,u(g)),$(e,`cellEditStart`,u(_)),$(e,`cellEditStop`,u(v)),oC(e,`cellEditStart`,t.onCellEditStart),oC(e,`cellEditStop`,(t=>async(...n)=>{if(t){let{id:r,field:i}=n[0];e.current.state.editRows[r][i]?.error||t(...n)}})(t.onCellEditStop));let y=G.useCallback((t,n)=>{let r=fk(e);return r[t]&&r[t][n]?GC.Edit:GC.View},[e]),b=D(n=>{let a=n!==t.cellModesModel;l&&a&&l(n,{api:e.current}),!(t.cellModesModel&&a)&&(r(n),i.current=n,e.current.publishEvent(`cellModesModelChange`,n))}),x=G.useCallback((e,t,n)=>{let r=H({},i.current);if(n!==null)r[e]=H({},r[e],{[t]:H({},n)});else{let n=r[e];r[e]=K(n,[t].map(Xk)),Object.keys(r[e]).length===0&&delete r[e]}b(r)},[b]),S=G.useCallback((t,n,r)=>{e.current.setState(e=>{let i=H({},e.editRows);return r===null?(delete i[t][n],Object.keys(i[t]).length===0&&delete i[t]):i[t]=H({},i[t],{[n]:H({},r)}),H({},e,{editRows:i})})},[e]),C=G.useCallback(e=>{let{id:t,field:n}=e,r=K(e,vI);d(t,n),f(t,n,GC.View),x(t,n,H({mode:GC.Edit},r))},[d,f,x]),w=D(async t=>{let{id:n,field:r,deleteValue:i,initialValue:a}=t,o=e.current.getColumn(r);if(!o)return;let s=e.current.getCellValue(n,r),c=s;i?c=_I(o):a&&(c=a);let l=!!o.preProcessEditCellProps&&i,u={value:c,error:!1,isProcessingProps:l};if(S(n,r,u),e.current.setCellFocus(n,r),l&&(u=await Promise.resolve(o.preProcessEditCellProps({id:n,row:e.current.getRow(n),props:u,hasChanged:c!==s})),e.current.getCellMode(n,r)===GC.Edit)){let t=fk(e);S(n,r,H({},u,{value:t[n][r].value,isProcessingProps:!1}))}}),T=G.useCallback(e=>{let{id:t,field:n}=e,r=K(e,yI);f(t,n,GC.Edit),x(t,n,H({mode:GC.View},r))},[f,x]),E=D(async n=>{let{id:r,field:i,ignoreModifications:c,cellToFocusAfter:l=`none`}=n;f(r,i,GC.Edit),e.current.runPendingEditCellValueMutation(r,i);let u=()=>{S(r,i,null),x(r,i,null),l!==`none`&&e.current.moveFocusToRelativeCell(r,i,l)};if(c){u();return}let{error:d,isProcessingProps:p}=fk(e)[r][i],m=e.current.getRow(r);if(d||p){a.current[r][i].mode=GC.Edit,x(r,i,{mode:GC.Edit});return}let h=e.current.getRowWithUpdatedValuesFromCellEditing(r,i);if(t.dataSource?.updateRow){if(Hb(m,h)){u();return}let t=()=>{a.current[r][i].mode=GC.Edit,x(r,i,{mode:GC.Edit})},n={rowId:r,updatedRow:h,previousRow:m};try{await e.current.dataSource.editRow(n),u()}catch{t()}}else if(o){let t=e=>{a.current[r]?.[i]&&(a.current[r][i].mode=GC.Edit,x(r,i,{mode:GC.Edit})),s&&s(e)};try{Promise.resolve(o(h,m,{rowId:r})).then(t=>{e.current.getRow(r)&&e.current.updateRows([t]),u()}).catch(t)}catch(e){t(e)}}else e.current.getRow(r)&&e.current.updateRows([h]),u()}),O=G.useCallback(async t=>{let{id:n,field:r,value:i,debounceMs:a,unstable_skipValueParser:o}=t;d(n,r),f(n,r,GC.Edit);let s=e.current.getColumn(r);if(!s)return!1;let c=e.current.getRow(n),l=i;s.valueParser&&!o&&(l=s.valueParser(i,c,s,e));let u=fk(e),p=H({},u[n][r],{value:l,changeReason:a?`debouncedSetEditCellValue`:`setEditCellValue`});if(s.preProcessEditCellProps){let e=i!==u[n][r].value;p=H({},p,{isProcessingProps:!0}),S(n,r,p),p=await Promise.resolve(s.preProcessEditCellProps({id:n,row:c,props:p,hasChanged:e}))}return e.current.getCellMode(n,r)!==GC.View&&(u=fk(e),p=H({},p,{isProcessingProps:!1}),p.value=s.preProcessEditCellProps?u[n][r].value:l,S(n,r,p),u=fk(e),!u[n]?.[r]?.error)},[e,d,f,S]),k=G.useCallback((t,n)=>{let r=e.current.getColumn(n),i=fk(e),a=e.current.getRow(t);if(!i[t]||!i[t][n])return e.current.getRow(t);let{value:o}=i[t][n];return r?.valueSetter?r.valueSetter(o,a,r,e):H({},a,{[n]:o})},[e]),A={getCellMode:y,startCellEditMode:C,stopCellEditMode:T},j={setCellEditingEditCellValue:O,getRowWithUpdatedValuesFromCellEditing:k};MO(e,A,`public`),MO(e,j,`private`),G.useEffect(()=>{c&&b(c)},[c,b]),h(()=>{let t=bS(e),r=a.current;a.current=BC(n),Object.entries(n).forEach(([n,i])=>{Object.entries(i).forEach(([i,a])=>{let o=r[n]?.[i]?.mode||GC.View,s=t[n]?e.current.getRowId(t[n]):n;a.mode===GC.Edit&&o===GC.View?w(H({id:s,field:i},a)):a.mode===GC.View&&o===GC.Edit&&E(H({id:s,field:i},a))})})},[e,n,w,E])},xI=[`id`],SI=[`id`],CI=(e,t)=>{let[n,r]=G.useState({}),i=G.useRef(n),a=G.useRef({}),o=G.useRef({}),s=G.useRef(void 0),c=G.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:u,rowModesModel:d,onRowModesModelChange:f}=t,p=e=>(...n)=>{t.editMode===WC.Row&&e(...n)},m=G.useCallback((t,n)=>{let r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw Error(dp(77,t,n))},[e]),g=G.useCallback((t,n)=>{if(e.current.getRowMode(t)!==n)throw Error(dp(79,t,n,n))},[e]),_=G.useCallback(t=>{let n=fk(e);return Object.values(n[t]).some(e=>e.error)},[e]),v=G.useCallback((t,n)=>{if(!t.isEditable||e.current.getRowMode(t.id)===KC.Edit)return;let r=e.current.getRowParams(t.id),i=H({},r,{field:t.field,reason:$C.cellDoubleClick});e.current.publishEvent(`rowEditStart`,i,n)},[e]),y=G.useCallback(e=>{c.current=e},[]),b=G.useCallback((t,n)=>{t.isEditable&&e.current.getRowMode(t.id)!==KC.View&&(c.current=null,s.current=setTimeout(()=>{if(c.current?.id!==t.id){if(!e.current.getRow(t.id)||e.current.getRowMode(t.id)===KC.View||_(t.id))return;let r=e.current.getRowParams(t.id),i=H({},r,{field:t.field,reason:ew.rowFocusOut});e.current.publishEvent(`rowEditStop`,i,n)}}))},[e,_]);G.useEffect(()=>()=>{clearTimeout(s.current)},[]);let x=G.useCallback((t,n)=>{if(t.cellMode===KC.Edit){if(n.which===229)return;let r;if(n.key===`Escape`)r=ew.escapeKeyDown;else if(n.key===`Enter`)r=ew.enterKeyDown;else if(n.key===`Tab`){let i=gw(e).filter(n=>e.current.getColumn(n)?.type===`actions`||e.current.isCellEditable(e.current.getCellParams(t.id,n)));if(n.shiftKey?t.field===i[0]&&(r=ew.shiftTabKeyDown):t.field===i[i.length-1]&&(r=ew.tabKeyDown),n.preventDefault(),!r){let r=i.findIndex(e=>e===t.field),a=i[n.shiftKey?r-1:r+1];e.current.setCellFocus(t.id,a)}}if(r){if(r!==ew.escapeKeyDown&&_(t.id))return;let i=H({},e.current.getRowParams(t.id),{reason:r,field:t.field});e.current.publishEvent(`rowEditStop`,i,n)}}else if(t.isEditable){let r;if(!e.current.unstable_applyPipeProcessors(`canStartEditing`,!0,{event:n,cellParams:t,editMode:`row`}))return;if(Jw(n)||Qw(n)?r=$C.printableKeyDown:n.key===`Enter`?r=$C.enterKeyDown:(n.key===`Backspace`||n.key===`Delete`)&&(r=$C.deleteKeyDown),r){let i=e.current.getRowParams(t.id),a=H({},i,{field:t.field,reason:r,key:d&&Jw(n)?n.key:void 0});e.current.publishEvent(`rowEditStart`,a,n)}}},[e,_,d]),S=G.useCallback(t=>{let{id:n,field:r,reason:i}=t,a={id:n,fieldToFocus:r};(i===$C.printableKeyDown||i===$C.deleteKeyDown)&&(d&&i===$C.printableKeyDown&&t.key&&r?a.initialValue=t.key:a.deleteValue=!!r),e.current.startRowEditMode(a)},[e,d]),C=G.useCallback(t=>{let{id:n,reason:r,field:i}=t;e.current.runPendingEditCellValueMutation(n);let a;r===ew.enterKeyDown?a=`below`:r===ew.tabKeyDown?a=`right`:r===ew.shiftTabKeyDown&&(a=`left`);let o=r===`escapeKeyDown`;e.current.stopRowEditMode({id:n,ignoreModifications:o,field:i,cellToFocusAfter:a})},[e]);$(e,`cellDoubleClick`,p(v)),$(e,`cellFocusIn`,p(y)),$(e,`cellFocusOut`,p(b)),$(e,`cellKeyDown`,p(x)),$(e,`rowEditStart`,p(S)),$(e,`rowEditStop`,p(C)),oC(e,`rowEditStart`,t.onRowEditStart),oC(e,`rowEditStop`,t.onRowEditStop);let w=G.useCallback(n=>pk(e,{rowId:n,editMode:t.editMode})?KC.Edit:KC.View,[e,t.editMode]),T=D(n=>{let a=n!==t.rowModesModel;f&&a&&f(n,{api:e.current}),!(t.rowModesModel&&a)&&(r(n),i.current=n,e.current.publishEvent(`rowModesModelChange`,n))}),E=G.useCallback((e,t)=>{let n=H({},i.current);t===null?delete n[e]:n[e]=H({},t),T(n)},[T]),O=G.useCallback((t,n)=>{e.current.setState(e=>{let r=H({},e.editRows);return n===null?delete r[t]:r[t]=n,H({},e,{editRows:r})})},[e]),k=G.useCallback((t,n,r)=>{e.current.setState(e=>{let i=H({},e.editRows);return r===null?(delete i[t][n],Object.keys(i[t]).length===0&&delete i[t]):i[t]=H({},i[t],{[n]:H({},r)}),H({},e,{editRows:i})})},[e]),A=G.useCallback(e=>{let{id:t}=e,n=K(e,xI);g(t,KC.View),E(t,H({mode:KC.Edit},n))},[g,E]),j=D(t=>{let{id:n,fieldToFocus:r,deleteValue:i,initialValue:a}=t,s=e.current.getRow(n),c=fw(e),l=c.reduce((t,o)=>{let s=o.field;if(!e.current.getCellParams(n,s).isEditable)return t;let c=e.current.getCellValue(n,s);return r===s&&(i||a)&&(i?c=_I(o):a&&(c=a)),t[s]={value:c,error:!1,isProcessingProps:o.editable&&!!o.preProcessEditCellProps&&i},t},{});o.current[n]=s,O(n,l),r&&e.current.setCellFocus(n,r),c.filter(t=>e.current.getCellParams(n,t.field).isEditable&&t.editable&&!!t.preProcessEditCellProps&&i).forEach(t=>{let r=t.field,o=e.current.getCellValue(n,r),c=i?_I(t):a??o;Promise.resolve(t.preProcessEditCellProps({id:n,row:s,props:l[r],hasChanged:c!==o})).then(t=>{if(e.current.getRowMode(n)===KC.Edit){let i=fk(e);k(n,r,H({},t,{value:i[n][r].value,isProcessingProps:!1}))}})})}),M=G.useCallback(e=>{let{id:t}=e,n=K(e,SI);g(t,KC.Edit),E(t,H({mode:KC.View},n))},[g,E]),N=D(async n=>{let{id:r,ignoreModifications:i,field:s,cellToFocusAfter:c=`none`}=n;e.current.runPendingEditCellValueMutation(r);let d=()=>{c!==`none`&&s&&e.current.moveFocusToRelativeCell(r,s,c),O(r,null),E(r,null),delete o.current[r]};if(i){d();return}let f=fk(e);if(!f[r]){d();return}let p=o.current[r];if(Object.values(f[r]).some(e=>e.isProcessingProps)){a.current[r].mode=KC.Edit;return}if(_(r)){a.current[r].mode=KC.Edit,E(r,{mode:KC.Edit});return}let m=e.current.getRowWithUpdatedValuesFromRowEditing(r);if(t.dataSource?.updateRow){if(Hb(p,m)){d();return}let t=()=>{a.current[r].mode=KC.Edit,E(r,{mode:KC.Edit})},n={rowId:r,updatedRow:m,previousRow:p};try{await e.current.dataSource.editRow(n),d()}catch{t()}}else if(l){let t=e=>{a.current[r]&&(a.current[r].mode=KC.Edit,E(r,{mode:KC.Edit})),u&&u(e)};try{Promise.resolve(l(m,p,{rowId:r})).then(t=>{e.current.getRow(r)&&e.current.updateRows([t]),d()}).catch(t)}catch(e){t(e)}}else e.current.getRow(r)&&e.current.updateRows([m]),d()}),P=G.useCallback(t=>{let{id:n,field:r,value:i,debounceMs:a,unstable_skipValueParser:o}=t;m(n,r);let s=e.current.getColumn(r);if(!s)return Promise.resolve(!1);let c=e.current.getRow(n),l=i;s.valueParser&&!o&&(l=s.valueParser(i,c,s,e));let u=fk(e),d=H({},u[n][r],{value:l,changeReason:a?`debouncedSetEditCellValue`:`setEditCellValue`});return s.preProcessEditCellProps||k(n,r,d),new Promise(t=>{let i=[];if(s.preProcessEditCellProps){let a=d.value!==u[n][r].value;d=H({},d,{isProcessingProps:!0}),k(n,r,d);let o=u[n],f=K(o,[r].map(Xk)),p=Promise.resolve(s.preProcessEditCellProps({id:n,row:c,props:d,hasChanged:a,otherFieldsProps:f})).then(i=>{if(e.current.getRowMode(n)===KC.View){t(!1);return}u=fk(e),i=H({},i,{isProcessingProps:!1}),i.value=s.preProcessEditCellProps?u[n][r].value:l,k(n,r,i)});i.push(p)}Object.entries(u[n]).forEach(([a,o])=>{if(a===r)return;let s=e.current.getColumn(a);if(!s?.preProcessEditCellProps)return;o=H({},o,{isProcessingProps:!0}),k(n,a,o),u=fk(e);let l=u[n],d=K(l,[a].map(Xk)),f=Promise.resolve(s.preProcessEditCellProps({id:n,row:c,props:o,hasChanged:!1,otherFieldsProps:d})).then(r=>{if(e.current.getRowMode(n)===KC.View){t(!1);return}r=H({},r,{isProcessingProps:!1}),k(n,a,r)});i.push(f)}),Promise.all(i).then(()=>{e.current.getRowMode(n)===KC.Edit?(u=fk(e),t(!u[n][r].error)):t(!1)})})},[e,m,k]),ee=G.useCallback(t=>{let n=fk(e),r=e.current.getRow(t);if(!n[t])return e.current.getRow(t);let i=H({},o.current[t],r);return Object.entries(n[t]).forEach(([t,n])=>{let r=e.current.getColumn(t);r?.valueSetter?i=r.valueSetter(n.value,i,r,e):i[t]=n.value}),i},[e]),F={getRowMode:w,startRowEditMode:A,stopRowEditMode:M},I={setRowEditingEditCellValue:P,getRowWithUpdatedValuesFromRowEditing:ee};MO(e,F,`public`),MO(e,I,`private`),G.useEffect(()=>{d&&T(d)},[d,T]),h(()=>{let t=bS(e),r=a.current;a.current=BC(n);let i=new Set([...Object.keys(n),...Object.keys(r)]);Array.from(i).forEach(i=>{let a=n[i]??{mode:KC.View},o=r[i]?.mode||KC.View,s=t[i]?e.current.getRowId(t[i]):i;a.mode===KC.Edit&&o===KC.View?j(H({id:s},a)):a.mode===KC.View&&o===KC.Edit&&N(H({id:s},a))})},[e,n,O,j,N,E])},wI=e=>H({},e,{editRows:{}}),TI=(e,t,n)=>{bI(e,t),CI(e,t);let r=G.useRef({}),{isCellEditable:i}=t,a=n.hooks.useIsCellEditable(e,t),o=G.useCallback(e=>!a(e)||!e.colDef.editable||!e.colDef.renderEditCell?!1:!i||i(e),[i,a]),s=(e,t,n,i)=>{if(!n){i();return}if(r.current[e]||(r.current[e]={}),r.current[e][t]){let[n]=r.current[e][t];clearTimeout(n)}let a=()=>{let[n]=r.current[e][t];clearTimeout(n),i(),delete r.current[e][t]},o=setTimeout(()=>{i(),delete r.current[e][t]},n);r.current[e][t]=[o,a]};G.useEffect(()=>{let e=r.current;return()=>{Object.entries(e).forEach(([t,n])=>{Object.keys(n).forEach(n=>{let[r]=e[t][n];clearTimeout(r),delete e[t][n]})})}},[]);let c=G.useCallback((e,t)=>{if(r.current[e]){if(!t)Object.keys(r.current[e]).forEach(t=>{let[,n]=r.current[e][t];n()});else if(r.current[e][t]){let[,n]=r.current[e][t];n()}}},[]),l={isCellEditable:o,setEditCellValue:G.useCallback(n=>{let{id:r,field:i,debounceMs:a}=n;return new Promise(o=>{s(r,i,a,async()=>{let a=t.editMode===WC.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;e.current.getCellMode(r,i)===GC.Edit&&o(await a(n))})})},[e,t.editMode]),getRowWithUpdatedValues:G.useCallback((n,r)=>t.editMode===WC.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(n,r):e.current.getRowWithUpdatedValuesFromRowEditing(n),[e,t.editMode]),unstable_getEditCellMeta:G.useCallback((t,n)=>fk(e)[t]?.[n]??null,[e])},u={runPendingEditCellValueMutation:c};MO(e,l,`public`),MO(e,u,`private`)},EI=(e,t,n)=>{let r=!!t.dataSource;return n.current.caches.rows=LS({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),H({},e,{rows:zS({apiRef:n,rowCountProp:t.rowCount,loadingProp:r?!0:t.loading,previousTree:null,previousTreeDepths:null})})},DI=(e,t,n)=>{let r=NO(e,`useGridRows`),i=G.useRef(Date.now()),a=G.useRef(t.rowCount),o=L(),{setRowIndex:s,setRowPosition:c}=n.hooks.useGridRowsOverridableMethods(e,t),l=G.useCallback(t=>{let n=bS(e)[t];if(n)return n;let r=SS(e,t);return r&&VS(r)?{[MS]:t}:null},[e]),u=G.useCallback(t=>gE(e,t),[e]),d=G.useCallback(({cache:n,throttle:r})=>{let a=()=>{i.current=Date.now(),e.current.setState(n=>H({},n,{rows:zS({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:xS(e),previousTreeDepths:TS(e),previousGroupsToFetch:CS(e)})})),e.current.publishEvent(`rowsSet`)};if(o.clear(),e.current.caches.rows=n,!r){a();return}let s=t.throttleRowsMs-(Date.now()-i.current);if(s>0){o.start(s,a);return}a()},[t.throttleRowsMs,t.rowCount,t.loading,e,o]),f=G.useCallback(n=>{if(r.debug(`Updating all rows, new length ${n.length}`),!t.dataSource&&RO(e)){e.current.updateNonPivotRows(n,!1);return}let i=LS({rows:n,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount});i.rowsBeforePartialUpdates=e.current.caches.rows.rowsBeforePartialUpdates,d({cache:i,throttle:!0})},[r,t.getRowId,t.dataSource,t.loading,t.rowCount,d,e]),p=G.useCallback(n=>{if(t.signature===QS.DataGrid&&n.length>1)throw Error(dp(88));if(!t.dataSource&&RO(e)){e.current.updateNonPivotRows(n);return}let r=US({updates:GS(e,n,t.getRowId),getRowId:t.getRowId,previousCache:e.current.caches.rows});d({cache:r,throttle:!0})},[t.signature,t.dataSource,t.getRowId,d,e]),m=G.useCallback((n,r)=>{let i=US({updates:GS(e,n,t.getRowId),getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:r??[]});d({cache:i,throttle:!1})},[t.getRowId,d,e]),h=G.useCallback(t=>{r.debug(`Setting loading to ${t}`),e.current.setState(e=>H({},e,{rows:H({},e.rows,{loading:t})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t},[e,r]),g=G.useCallback(()=>{let t=DS(e),n=bS(e);return new Map(t.map(e=>[e,n[e]??{}]))},[e]),_=G.useCallback(()=>_S(e),[e]),v=G.useCallback(()=>DS(e),[e]),y=G.useCallback(t=>{let{rowIdToIndexMap:n}=Wk(e);return n.get(t)},[e]),b=G.useCallback((t,n)=>{let r=SS(e,t);if(!r)throw Error(dp(89,t));if(r.type!==`group`)throw Error(dp(90));let i=H({},r,{childrenExpanded:n});e.current.setState(e=>H({},e,{rows:H({},e.rows,{tree:H({},e.rows.tree,{[t]:i})})})),e.current.publishEvent(`rowExpansionChange`,i)},[e]),x=G.useCallback(()=>{let t=H({},xS(e)),n=e=>{let r=t[e];r?.type===`group`&&(t[e]=H({},r,{childrenExpanded:!0}),r.children.forEach(n))};n(jS),e.current.setState(e=>H({},e,{rows:H({},e.rows,{tree:t})})),e.current.publishEvent(`rowExpansionChange`,t[jS])},[e]),S=G.useCallback(()=>{let t=H({},xS(e)),n=e=>{let r=t[e];r?.type===`group`&&(t[e]=H({},r,{childrenExpanded:!1}),r.children.forEach(n))};n(jS),e.current.setState(e=>H({},e,{rows:H({},e.rows,{tree:t})})),e.current.publishEvent(`rowExpansionChange`,t[jS])},[e]),C=G.useCallback(t=>SS(e,t)??null,[e]),w=G.useCallback(({skipAutoGeneratedRows:t=!0,groupId:n,applySorting:r,applyFiltering:i,directChildrenOnly:a=!1})=>{let o=xS(e),s;if(r){let r=o[n];if(!r)return[];let i=KT(e);s=[];let c=i.findIndex(e=>e===n)+1;for(let e=c;er.depth);e+=1){let n=i[e];(!t||!VS(o[n]))&&s.push(n)}}else s=HS(o,n,t,a);if(i){let t=eE(e);s=WT(t)?s:s.filter(e=>t[e]!==!1)}return s},[e]),T={getRow:l,setLoading:h,getRowId:u,getRowModels:g,getRowsCount:_,getAllRowIds:v,setRows:f,updateRows:p,getRowNode:C,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:G.useCallback((n,r)=>{if(t.signature===QS.DataGrid&&r.length>1)throw Error(dp(91));if(r.length===0)return;if(ES(e)>1)throw Error(dp(92));let i=H({},xS(e)),a=H({},bS(e)),o=i[jS],s=[...o.children],c=new Set;for(let e=0;ei[e]?.type===`leaf`);e.current.caches.rows.dataRowIdToModelLookup=a,e.current.setState(e=>H({},e,{rows:H({},e.rows,{loading:t.loading,totalRowCount:Math.max(t.rowCount||0,s.length),dataRowIdToModelLookup:a,dataRowIds:l,tree:i})})),e.current.publishEvent(`rowsSet`)},[e,t.signature,t.getRowId,t.loading,t.rowCount])},E={setRowIndex:s,setRowPosition:c,setRowChildrenExpansion:b,getRowGroupChildren:w,expandAllRows:x,collapseAllRows:S},D={updateNestedRows:m},O=G.useCallback(()=>{r.info(`Row grouping pre-processing have changed, regenerating the row tree`);let n;n=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?H({},e.current.caches.rows,{updates:{type:`full`,rows:DS(e)}}):LS({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),d({cache:n,throttle:!1})},[r,e,t.rows,t.getRowId,t.loading,t.rowCount,d]),k=De(()=>t.dataSource),A=G.useCallback(e=>{if(t.dataSource&&t.dataSource!==k.current){k.current=t.dataSource;return}e===`rowTreeCreation`&&O()},[O,k,t.dataSource]),j=G.useCallback(()=>{e.current.getActiveStrategy(_F.RowTree)!==wS(e)&&O()},[e,O]);$(e,`activeStrategyProcessorChange`,A),$(e,`strategyAvailabilityChange`,j),$k(e,`hydrateRows`,G.useCallback(()=>{e.current.setState(n=>{let r=e.current.unstable_applyPipeProcessors(`hydrateRows`,{tree:xS(e),treeDepths:TS(e),dataRowIds:DS(e),dataRowIdToModelLookup:bS(e)});return H({},n,{rows:H({},n.rows,r,{totalTopLevelRowCount:RS({tree:r.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent(`rowsSet`)},[e,t.rowCount])),MO(e,T,`public`),MO(e,E,t.signature===QS.DataGrid?`private`:`public`),MO(e,D,`private`);let M=G.useRef(!0);G.useEffect(()=>{if(M.current){M.current=!1;return}let n=!1;t.rowCount!==a.current&&(n=!0,a.current=t.rowCount);let i=t.dataSource?OS(e):t.rows,o=e.current.caches.rows.rowsBeforePartialUpdates===i,s=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,c=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;o&&(s||(e.current.setState(e=>H({},e,{rows:H({},e.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading),c||(e.current.setState(e=>H({},e,{rows:H({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount),!n)||(r.debug(`Updating all rows, new length ${i?.length}`),d({cache:LS({rows:i,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,t.dataSource,r,d,e])},OI=e=>{let t={[jS]:H({},NS(),{children:e})};for(let n=0;n{let n=H({},e),r={};for(let e=0;e!r[e])),n[jS]=H({},i,{children:a}),{groupingName:yF,tree:n,treeDepths:{0:a.length},dataRowIds:a}},AI=e=>e.updates.type===`full`?OI(e.updates.rows):kI({previousTree:e.previousTree,actions:e.updates.actions}),jI=e=>{vF(e,yF,`rowTreeCreation`,AI)},MI=class extends Error{};function NI(e,t,n){let r=G.useCallback(t=>({field:t,colDef:e.current.getColumn(t)}),[e]),i=G.useCallback(t=>{let n=e.current.getRow(t);if(!n)throw new MI(`MUI X: No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:n}},[e]),a=G.useCallback((t,n,r,{cellMode:i,colDef:a,hasFocus:o,rowNode:s,tabIndex:c,value:l,formattedValue:u})=>{let d={id:t,field:n,row:r,rowNode:s,colDef:a,cellMode:i,hasFocus:o,tabIndex:c,value:l===void 0?e.current.getRowValue(r,a):l,formattedValue:u===void 0?e.current.getRowFormattedValue(r,a):u,isEditable:!1,api:e.current};return d.isEditable=a&&e.current.isCellEditable(d),d},[e]),o=G.useCallback((n,r)=>{let i=e.current.getRow(n),a=SS(e,n);if(!i||!a)throw new MI(`MUI X: No row with id #${n} found`);let o=kE(e),s=NE(e),c=e.current.getCellMode(n,r);return e.current.getCellParamsForRow(n,r,i,{colDef:t.listView&&t.listViewColumn?.field===r?cw(e):e.current.getColumn(r),rowNode:a,hasFocus:o!==null&&o.field===r&&o.id===n,tabIndex:s&&s.field===r&&s.id===n?0:-1,cellMode:c})},[e,t.listView,t.listViewColumn?.field]),s=G.useCallback(t=>e.current.rootElementRef.current?bj(e.current.rootElementRef.current,t):null,[e]),c=G.useCallback(t=>e.current.rootElementRef.current?Sj(e.current.rootElementRef.current,t):null,[e]),l=G.useCallback((t,n)=>e.current.rootElementRef.current?Cj(e.current.rootElementRef.current,{id:t,field:n}):null,[e]),u=n.hooks.useGridParamsOverridableMethods(e),d={getCellValue:u.getCellValue,getCellParams:o,getCellElement:l,getRowValue:u.getRowValue,getRowFormattedValue:u.getRowFormattedValue,getRowParams:i,getRowElement:c,getColumnHeaderParams:r,getColumnHeaderElement:s},f={getCellParamsForRow:a};MO(e,d,`public`),MO(e,f,`private`)}var PI={type:`include`,ids:new Set},FI=(e,t)=>H({},e,{rowSelection:t.rowSelection?t.rowSelectionModel??PI:PI}),II=(e,t)=>{let n=NO(e,`useGridSelection`),r=Z(e,ES)>1,i=t.signature!==QS.DataGrid&&(t.rowSelectionPropagation?.parents||t.rowSelectionPropagation?.descendants)&&r,a=G.useMemo(()=>t.rowSelectionModel,[t.rowSelectionModel]),o=G.useRef(null);e.current.registerControlState({stateId:`rowSelection`,propModel:a,propOnChange:t.onRowSelectionModelChange,stateSelector:fE,changeEvent:`rowSelectionChange`});let{checkboxSelection:s,disableRowSelectionOnClick:c,isRowSelectable:l}=t,u=bE(t),d=G.useCallback(t=>{let n=t,r=o.current??t,i=e.current.isRowSelected(t);if(i){let t=nE(e),i=t.findIndex(e=>e===r),a=t.findIndex(e=>e===n);if(i===a)return;n=i>a?t[a+1]:t[a-1]}o.current=t,e.current.selectRowRange({startId:r,endId:n},!i)},[e]),f=D(()=>t.pagination&&t.checkboxSelectionVisibleOnly&&t.paginationMode===`client`?$E(e):nE(e)),p=G.useCallback((r,i)=>{if(t.signature===QS.DataGrid&&!u&&(r.type!==`include`||r.ids.size>1))throw Error(dp(84));if(fE(e)!==r){if(n.debug(`Setting selection model`),o.current!==null){let e=r.ids.has(o.current);(r.type===`include`&&!e||r.type===`exclude`&&e)&&(o.current=null)}e.current.setState(e=>H({},e,{rowSelection:t.rowSelection?r:PI}),i)}},[e,n,t.rowSelection,t.signature,u]),m=G.useCallback(t=>pE(e).has(t),[e]),h=G.useCallback(n=>{if(t.rowSelection===!1)return!1;if(t.keepNonExistentRowsSelected&&!e.current.getRow(n))return!0;if(l&&!l(e.current.getRowParams(n)))return!1;let r=SS(e,n);return r?.type!==`footer`&&r?.type!==`pinnedRow`},[e,t.rowSelection,t.keepNonExistentRowsSelected,l]),g=G.useCallback(()=>hE(e),[e]),_=G.useCallback((r,a=!0,s=!1)=>{if(!e.current.isRowSelectable(r))return;let c=xS(e);if(o.current=a?r:null,s){n.debug(`Setting selection for row ${r}`);let o={type:`include`,ids:new Set},s=e=>{o.ids.add(e)};a&&(s(r),i&&CE(e,c,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,s)),e.current.setRowSelectionModel(o,`singleRowSelection`)}else{n.debug(`Toggling selection for row ${r}`);let o=fE(e),s={type:o.type,ids:new Set(o.ids)},l=XC(s);l.unselect(r);let d=e=>{l.select(e)};a?(d(r),i&&CE(e,c,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,d)):i&&wE(e,c,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,e=>{l.unselect(e)}),(s.type===`include`&&s.ids.size<2||u)&&e.current.setRowSelectionModel(s,`singleRowSelection`)}},[e,n,i,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,u]),v=G.useCallback((r,a=!0,o=!1)=>{if(n.debug(`Setting selection for several rows`),t.rowSelection===!1)return;let s=xS(e),c=new Set;for(let t=0;t{n.select(e)};for(let n of c)CE(e,s,n,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,r)}}else d.ids=new Set;if(l.type===d.type&&d.ids.size===l.ids.size&&Array.from(d.ids).every(e=>l.ids.has(e)))return}else{d={type:l.type,ids:new Set(l.ids)};let n=XC(d),r=e=>{n.select(e)},o=e=>{n.unselect(e)};for(let l of c)a?(n.select(l),i&&CE(e,s,l,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,r)):(o(l),i&&wE(e,s,l,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,o))}(d.type===`include`&&d.ids.size<2||u)&&e.current.setRowSelectionModel(d,`multipleRowsSelection`)},[n,i,u,e,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,t.rowSelection]),y=G.useCallback(n=>{if(!r||!i||n.type===`exclude`||n.ids.size===0&&n.type===`include`)return n;let a={type:n.type,ids:new Set(n.ids)},o=xS(e),s=XC(a),c=e=>{s.select(e)};for(let r of n.ids)CE(e,o,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,c,s);return a},[e,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,r,i]),b=G.useCallback(({startId:t,endId:r},i=!0,a=!1)=>{if(!e.current.getRow(t)||!e.current.getRow(r))return;n.debug(`Expanding selection from row ${t} to row ${r}`);let o=nE(e),s=o.indexOf(t),c=o.indexOf(r),[l,u]=s>c?[c,s]:[s,c],d=o.slice(l,u+1);e.current.selectRows(d,i,a)},[e,n]),x={selectRow:_,setRowSelectionModel:p,getSelectedRows:g,isRowSelected:m,isRowSelectable:h},S={selectRows:v,selectRowRange:b,getPropagatedRowSelectionModel:y};MO(e,x,`public`),MO(e,S,t.signature===QS.DataGrid?`private`:`public`);let C=G.useRef(!0),w=G.useCallback(()=>{if(C.current)return;let n=fE(e),i=bS(e),a=xS(e),o=eE(e),s=e=>t.filterMode===`server`?!i[e]:!a[e]||o[e]===!1,c={type:n.type,ids:new Set(n.ids)},l=XC(c),u=n=>{let r=a[n];return!r||t.filterMode!==`server`&&o[n]===!1?!1:r.type===`group`?r.children.some(e=>u(e)):!!i[n]&&e.current.isRowSelectable(n)},d=!1;for(let e of n.ids){if(s(e)){if(t.keepNonExistentRowsSelected)continue;l.unselect(e),d=!0;continue}if(!t.rowSelectionPropagation?.parents)continue;let n=a[e];if(n?.type===`group`){if(n.isAutoGenerated){l.unselect(e),d=!0;continue}n.children.some(e=>o[e]!==!1&&u(e))&&(l.unselect(e),d=!0)}}let p=r&&t.rowSelectionPropagation?.parents&&(c.ids.size>0||c.type===`exclude`);if(d||p){if(p){if(c.type===`exclude`){let n=f(),r=[];for(let e=0;e{let r=n.metaKey||n.ctrlKey,i=!s&&!r&&!Xw(n),a=!u||i,o=e.current.isRowSelected(t),c=mE(e)>1&&a||!o;e.current.selectRow(t,c,a)},[e,u,s]),E=G.useCallback((t,n)=>{if(c)return;let r=n.target.closest(`.${X.cell}`)?.getAttribute(`data-field`);r!==aD.field&&r!==`__detail_panel_toggle__`&&(r&&e.current.getColumn(r)?.type===`actions`||SS(e,t.id).type!==`pinnedRow`&&(n.shiftKey&&u?d(t.id):T(t.id,n)))},[c,u,e,d,T]),O=G.useCallback((e,t)=>{u&&t.shiftKey&&window.getSelection()?.removeAllRanges()},[u]),k=G.useCallback((t,n)=>{u&&n.nativeEvent.shiftKey?d(t.id):e.current.selectRow(t.id,t.value,!u)},[e,d,u]),A=G.useCallback(n=>{let i=ZT(e),a=QT(e),o=i.items.length>0||a?.some(e=>e.length);!t.isRowSelectable&&!t.checkboxSelectionVisibleOnly&&(!r||t.rowSelectionPropagation?.descendants)&&!o&&!t.disableRowSelectionExcludeModel?e.current.setRowSelectionModel({type:n?`exclude`:`include`,ids:new Set},`multipleRowsSelection`):e.current.selectRows(f(),n)},[e,f,t.checkboxSelectionVisibleOnly,t.isRowSelectable,t.rowSelectionPropagation?.descendants,t.disableRowSelectionExcludeModel,r]),j=G.useCallback(e=>{A(e.value)},[A]),M=G.useCallback((t,n)=>{if(e.current.getCellMode(t.id,t.field)!==GC.Edit&&!wj(n)){if(Yw(n.key)&&n.shiftKey){let r=kE(e);if(r&&r.id!==t.id){n.preventDefault();let i=e.current.isRowSelected(r.id);if(!u){e.current.selectRow(r.id,!i,!0);return}let a=e.current.getRowIndexRelativeToVisibleRows(r.id),o=e.current.getRowIndexRelativeToVisibleRows(t.id),s,c;a>o?i?(s=o,c=a-1):(s=o,c=a):i?(s=a+1,c=o):(s=a,c=o);let l=Wk(e),d=[];for(let e=s;e<=c;e+=1)d.push(l.rows[e].id);e.current.selectRows(d,!i);return}}if(n.key===` `&&n.shiftKey){n.preventDefault(),T(t.id,n);return}String.fromCharCode(n.keyCode)===`A`&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),u&&A(!0))}},[e,u,T,A]),N=D(()=>{if(!t.rowSelection){e.current.setRowSelectionModel(PI);return}if(a===void 0)return;if(!i||!r||a.type===`include`&&a.ids.size===0){e.current.setRowSelectionModel(a);return}let n=e.current.getPropagatedRowSelectionModel(a);if(n.type!==a.type||n.ids.size!==a.ids.size||!Array.from(a.ids).every(e=>n.ids.has(e))){e.current.setRowSelectionModel(n);return}e.current.setRowSelectionModel(a)});$(e,`filteredRowsSet`,VC(t.rowSelection,w)),$(e,`rowClick`,VC(t.rowSelection,E)),$(e,`rowSelectionCheckboxChange`,VC(t.rowSelection,k)),$(e,`headerSelectionCheckboxChange`,j),$(e,`cellMouseDown`,VC(t.rowSelection,O)),$(e,`cellKeyDown`,VC(t.rowSelection,M)),G.useEffect(()=>{N()},[e,a,t.rowSelection,N]);let P=a!=null;G.useEffect(()=>{if(P||!t.rowSelection||typeof h!=`function`)return;let n=fE(e);if(n.type!==`include`)return;let r=new Set;for(let e of n.ids)h(e)&&r.add(e);r.size{if(!t.rowSelection||P)return;let n=fE(e);!u&&(n.type===`include`&&n.ids.size>1||n.type===`exclude`)&&e.current.setRowSelectionModel(PI)},[e,u,s,P,t.rowSelection]),G.useEffect(()=>{C.current&&=!1},[])},LI=e=>{let{classes:t}=e;return G.useMemo(()=>g({cellCheckbox:[`cellCheckbox`],columnHeaderCheckbox:[`columnHeaderCheckbox`]},zv,t),[t])},RI=(e,t)=>{let n=LI({classes:t.classes});Qk(e,`hydrateColumns`,G.useCallback(r=>{let i=H({},aD,{cellClassName:n.cellCheckbox,headerClassName:n.columnHeaderCheckbox,headerName:e.current.getLocaleText(`checkboxSelectionHeaderName`)},t.checkboxColDef,{field:aD.field,type:aD.type}),a=t.checkboxSelection,o=r.lookup[iD]!=null;return a&&!o?(r.lookup[iD]=i,r.orderedFields=[iD,...r.orderedFields]):!a&&o?(delete r.lookup[iD],r.orderedFields=r.orderedFields.filter(e=>e!==iD)):a&&o&&(r.lookup[iD]=H({},i,r.lookup[iD]),t.columns.some(e=>e.field===`__check__`)||(r.orderedFields=[iD,...r.orderedFields.filter(e=>e!==iD)])),r},[e,n,t.columns,t.checkboxSelection,t.checkboxColDef]))},zI=(e,t)=>{let n=t.sortModel??t.initialState?.sorting?.sortModel??[];return H({},e,{sorting:{sortModel:_C(n,t.disableMultipleColumnsSorting),sortedRows:[]}})},BI=(e,t)=>{let n=NO(e,`useGridSorting`);e.current.registerControlState({stateId:`sortModel`,propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:JT,changeEvent:`sortModelChange`});let r=G.useCallback((t,n)=>{let r=JT(e),i=r.findIndex(e=>e.field===t),a=[...r];return i>-1?n?.sort==null?a.splice(i,1):a.splice(i,1,n):a=[...r,n],a},[e]),i=G.useCallback((n,r)=>{let i=JT(e).find(e=>e.field===n.field);if(i){let e=r===void 0?CC(n.sortingOrder??t.sortingOrder,i.sort):r;return e===void 0?void 0:H({},i,{sort:e})}return{field:n.field,sort:r===void 0?CC(n.sortingOrder??t.sortingOrder):r}},[e,t.sortingOrder]),a=G.useCallback((e,n)=>n==null||n.sortable===!1||t.disableColumnSorting?e:(n.sortingOrder||t.sortingOrder).some(e=>!!e)?[...e,`columnMenuSortItem`]:e,[t.sortingOrder,t.disableColumnSorting]),o=G.useCallback(()=>{e.current.setState(r=>{if(t.sortingMode===`server`)return n.debug(`Skipping sorting rows as sortingMode = server`),H({},r,{sorting:H({},r.sorting,{sortedRows:HS(xS(e),jS,!1)})});let i=SC(JT(e),e),a=e.current.applyStrategyProcessor(`sorting`,{sortRowList:i});return H({},r,{sorting:H({},r.sorting,{sortedRows:a})})}),e.current.publishEvent(`sortedRowsSet`)},[e,n,t.sortingMode]),s=G.useCallback(r=>{JT(e)!==r&&(n.debug(`Setting sort model`),e.current.setState(vC(r,t.disableMultipleColumnsSorting)),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),c=G.useCallback((n,a,o)=>{let s=e.current.getColumn(n);if(!s)return;let c=i(s,a),l;l=!o||t.disableMultipleColumnsSorting?c?.sort==null?[]:[c]:r(s.field,c),e.current.setSortModel(l)},[e,r,i,t.disableMultipleColumnsSorting]);MO(e,{getSortModel:G.useCallback(()=>JT(e),[e]),getSortedRows:G.useCallback(()=>qT(e).map(e=>e.model),[e]),getSortedRowIds:G.useCallback(()=>KT(e),[e]),getRowIdFromRowIndex:G.useCallback(t=>e.current.getSortedRowIds()[t],[e]),setSortModel:s,sortColumn:c,applySorting:o},`public`);let l=G.useCallback((n,r)=>{let i=JT(e);return!r.exportOnlyDirtyModels||t.sortModel!=null||t.initialState?.sorting?.sortModel!=null||i.length>0?H({},n,{sorting:{sortModel:i}}):n},[e,t.sortModel,t.initialState?.sorting?.sortModel]),u=G.useCallback((n,r)=>{let i=r.stateToRestore.sorting?.sortModel;return i==null?n:(e.current.setState(vC(i,t.disableMultipleColumnsSorting)),H({},n,{callbacks:[...n.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),d=G.useCallback(t=>{let n=xS(e),r=n[jS],i=t.sortRowList?t.sortRowList(r.children.map(e=>n[e])):[...r.children];return r.footerId!=null&&i.push(r.footerId),i},[e]);Qk(e,`exportState`,l),Qk(e,`restoreState`,u),vF(e,yF,`sorting`,d);let f=G.useCallback(({field:e,colDef:n},r)=>{if(!n.sortable||t.disableColumnSorting)return;let i=t.multipleColumnsSortingMode===`always`||r.shiftKey||r.metaKey||r.ctrlKey;c(e,void 0,i)},[c,t.disableColumnSorting,t.multipleColumnsSortingMode]),p=G.useCallback(({field:e,colDef:n},r)=>{!n.sortable||t.disableColumnSorting||r.key===`Enter`&&!r.ctrlKey&&!r.metaKey&&c(e,void 0,t.multipleColumnsSortingMode===`always`||r.shiftKey)},[c,t.disableColumnSorting,t.multipleColumnsSortingMode]),m=G.useCallback(()=>{let t=JT(e),n=dw(e);if(t.length>0){let r=t.filter(e=>n[e.field]);r.length{t===`sorting`&&e.current.applySorting()},[e]);Qk(e,`columnMenu`,a),$(e,`columnHeaderClick`,f),$(e,`columnHeaderKeyDown`,p),$(e,`rowsSet`,e.current.applySorting),$(e,`columnsChange`,m),$(e,`activeStrategyProcessorChange`,g),FO(()=>{t.signature===`DataGrid`&&e.current.applySorting()}),h(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function VI(e){let{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:i}=e,a=i+r;if(r>t)return i;if(a-t>n)return a-t;if(i{let n=Ie(),r=NO(e,`useGridScroll`),i=e.current.columnHeadersContainerRef,a=e.current.virtualScrollerRef,o=G.useCallback(n=>{let i=iS(e),o=_S(e),s=hw(e);if(n.rowIndex!=null&&o===0||s.length===0)return!1;r.debug(`Scrolling to cell at row ${n.rowIndex}, col: ${n.colIndex} `);let c={};if(n.colIndex!==void 0&&s[n.colIndex]){let t=bw(e),r;if(n.rowIndex!==void 0){let t=tE(e)[n.rowIndex]?.id,i=e.current.unstable_getCellColSpanInfo(t,n.colIndex);i&&!i.spannedByColSpan&&(r=i.cellProps.width)}r===void 0&&(r=s[n.colIndex].computedWidth),c.left=VI({containerSize:i.viewportOuterSize.width,scrollPosition:Math.abs(a.current?.scrollLeft??0),elementSize:r,elementOffset:t[n.colIndex]})}if(n.rowIndex!==void 0){let r=hS(e),o=JE(e),s=YE(e),l=t.pagination?n.rowIndex-o*s:n.rowIndex,u=r.positions[l+1]?r.positions[l+1]-r.positions[l]:r.currentPageTotalHeight-r.positions[l];c.top=VI({containerSize:i.viewportInnerSize.height,scrollPosition:a.current?.scrollTop??0,elementSize:u,elementOffset:r.positions[l]})}return c=e.current.unstable_applyPipeProcessors(`scrollToIndexes`,c,n),c.left!==void 0||c.top!==void 0?(e.current.scroll(c),!0):!1},[r,e,a,t.pagination]);MO(e,{scroll:G.useCallback(e=>{if(a.current&&e.left!==void 0&&i.current){let t=n?-1:1;i.current.scrollLeft=e.left,a.current.scrollLeft=t*e.left,r.debug(`Scrolling left: ${e.left}`)}a.current&&e.top!==void 0&&(a.current.scrollTop=e.top,r.debug(`Scrolling top: ${e.top}`)),r.debug(`Scrolling, updating container, and viewport`)},[a,n,i,r]),scrollToIndexes:o,getScrollPosition:G.useCallback(()=>a?.current?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0},[a])},`public`)};function UI(e,t){oC(e,`columnHeaderClick`,t.onColumnHeaderClick),oC(e,`columnHeaderContextMenu`,t.onColumnHeaderContextMenu),oC(e,`columnHeaderDoubleClick`,t.onColumnHeaderDoubleClick),oC(e,`columnHeaderOver`,t.onColumnHeaderOver),oC(e,`columnHeaderOut`,t.onColumnHeaderOut),oC(e,`columnHeaderEnter`,t.onColumnHeaderEnter),oC(e,`columnHeaderLeave`,t.onColumnHeaderLeave),oC(e,`cellClick`,t.onCellClick),oC(e,`cellDoubleClick`,t.onCellDoubleClick),oC(e,`cellKeyDown`,t.onCellKeyDown),oC(e,`preferencePanelClose`,t.onPreferencePanelClose),oC(e,`preferencePanelOpen`,t.onPreferencePanelOpen),oC(e,`menuOpen`,t.onMenuOpen),oC(e,`menuClose`,t.onMenuClose),oC(e,`rowDoubleClick`,t.onRowDoubleClick),oC(e,`rowClick`,t.onRowClick),oC(e,`stateChange`,t.onStateChange)}var WI={width:0,height:0},GI={isReady:!1,root:WI,viewportOuterSize:WI,viewportInnerSize:WI,contentSize:WI,minimumSize:WI,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0,autoHeight:!1,minimalContentHeight:void 0},KI=(e,t,n)=>{let r=GI,i=uC(n),a=H({},r,XI(t,n,i,vw(n)));return n.current.store.state.dimensions=a,H({},e,{dimensions:a})},qI=Q(hw,bw,(e,t)=>{let n=e.length;return n===0?0:Ub(t[n-1]+e[n-1].computedWidth,1)});function JI(e,t){MO(e,{getRootDimensions:G.useCallback(()=>iS(e),[e])},`public`),MO(e,{updateDimensions:()=>e.current.virtualizer.api.updateDimensions(),getViewportPageSize:()=>e.current.virtualizer.api.getViewportPageSize()},`private`),oC(e,`rootMount`,t=>{YI(t,iS(e))}),oC(e,`debouncedResize`,t.onResize),Kp(e.current.store,e=>e.dimensions,(t,n)=>{if(!n.isReady)return;e.current.rootElementRef.current&&YI(e.current.rootElementRef.current,n);let r=e.current.virtualScrollerRef?.current;if(r){let t=Math.max(0,n.rowWidth-n.viewportOuterSize.width);Math.abs(r.scrollLeft)>t&&e.current.scroll({left:t})}ZI(n.viewportInnerSize,t.viewportInnerSize)||e.current.publishEvent(`viewportInnerSizeChange`,n.viewportInnerSize),e.current.publishEvent(`debouncedResize`,n.root)})}function YI(e,t){let n=(t,n)=>e.style.setProperty(t,n);n(`--DataGrid-hasScrollX`,`${Number(t.hasScrollX)}`),n(`--DataGrid-hasScrollY`,`${Number(t.hasScrollY)}`),n(`--DataGrid-scrollbarSize`,`${t.scrollbarSize}px`),n(`--DataGrid-rowWidth`,`${t.rowWidth}px`),n(`--DataGrid-columnsTotalWidth`,`${t.columnsTotalWidth}px`),n(`--DataGrid-leftPinnedWidth`,`${t.leftPinnedWidth}px`),n(`--DataGrid-rightPinnedWidth`,`${t.rightPinnedWidth}px`),n(`--DataGrid-headerHeight`,`${t.headerHeight}px`),n(`--DataGrid-headersTotalHeight`,`${t.headersTotalHeight}px`),n(`--DataGrid-topContainerHeight`,`${t.topContainerHeight}px`),n(`--DataGrid-bottomContainerHeight`,`${t.bottomContainerHeight}px`),n(`--DataGrid-horizontalFiller`,`${Math.max(0,t.viewportOuterSize.width-t.columnsTotalWidth)}px`),n(`--height`,`${t.rowHeight}px`)}function XI(e,t,n,r){let i=KS(e.rowHeight,qk.rowHeight,qS);return{rowHeight:Math.floor(i*n),headerHeight:Math.floor(e.columnHeaderHeight*n),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*n),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*n),columnsTotalWidth:qI(t),headersTotalHeight:xO(t,e),leftPinnedWidth:r.left.reduce((e,t)=>e+t.computedWidth,0),rightPinnedWidth:r.right.reduce((e,t)=>e+t.computedWidth,0)}}function ZI(e,t){return e.width===t.width&&e.height===t.height}var QI=e=>{MO(e,{exportState:G.useCallback((t={})=>e.current.unstable_applyPipeProcessors(`exportState`,{},t),[e]),restoreState:G.useCallback(t=>{e.current.unstable_applyPipeProcessors(`restoreState`,{callbacks:[]},{stateToRestore:t}).callbacks.forEach(e=>{e()})},[e])},`public`)},$I=e=>{let t=()=>e.current.virtualizer.api.resetColSpan(),n=(...t)=>e.current.virtualizer.api.getCellColSpanInfo(...t),r=(...t)=>{e.current.virtualizer.api.calculateColSpan(...t)},i={unstable_getCellColSpanInfo:n},a={resetColSpan:t,calculateColSpan:r};MO(e,i,`public`),MO(e,a,`private`),$(e,`columnOrderChange`,t)},eL=[`groupId`,`children`],tL=e=>{let t={};for(let n=0;n{if(tw(e)){if(n[e.field]!==void 0)throw Error(dp(76,e.field,n[e.field].join(` > `),t.join(` > `)));n[e.field]=t;return}let{groupId:r,children:i}=e;i.forEach(e=>{nL(e,[...t,r],n)})},rL=e=>{if(!e)return{};let t={};return e.forEach(e=>{nL(e,[],t)}),t},iL=(e,t,n)=>{let r=e=>t[e]??[],i=[],a=Math.max(0,...e.map(e=>r(e).length)),o=(e,t,n)=>{let i=r(e),a=r(t);for(let e=0;e<=n;e+=1)if(i[e]!==a[e])return!1;return!0},s=(e,t)=>{let r=n?.left,i=n?.right,a=!!r?.includes(e),o=!!r?.includes(t),s=!!i?.includes(e),c=!!i?.includes(t);return a!==o||s!==c};for(let t=0;t{if(n.current.caches.columnGrouping={lastColumnGroupingModel:t.columnGroupingModel},!t.columnGroupingModel)return H({},e,{columnGrouping:void 0});let r=uw(n),i=gw(n),a=tL(t.columnGroupingModel??[]),o=rL(t.columnGroupingModel??[]),s=iL(r,o,n.current.state.pinnedColumns??{}),c=i.length===0?0:Math.max(...i.map(e=>o[e]?.length??0));return H({},e,{columnGrouping:{lookup:a,unwrappedGroupingModel:o,headerStructure:s,maxDepth:c}})},oL=(e,t)=>{MO(e,{getColumnGroupPath:G.useCallback(t=>dO(e)[t]??[],[e]),getAllGroupDetails:G.useCallback(()=>fO(e),[e])},`public`);let n=G.useCallback(()=>{let n=rL(t.columnGroupingModel??[]);e.current.setState(e=>{let t=e.columns?.orderedFields??[],r=e.pinnedColumns??{},i=iL(t,n,r);return H({},e,{columnGrouping:H({},e.columnGrouping,{headerStructure:i})})})},[e,t.columnGroupingModel]),r=G.useCallback(t=>{if(!t&&!e.current.caches.columnGrouping.lastColumnGroupingModel)return;e.current.caches.columnGrouping.lastColumnGroupingModel=t;let n=e.current.getPinnedColumns?.()??{},r=uw(e),i=gw(e),a=tL(t??[]),o=rL(t??[]),s=iL(r,o,n),c=i.length===0?0:Math.max(...i.map(e=>o[e]?.length??0));e.current.setState(e=>H({},e,{columnGrouping:{lookup:a,unwrappedGroupingModel:o,headerStructure:s,maxDepth:c}}))},[e]);$(e,`columnIndexChange`,n),$(e,`columnsChange`,()=>{r(t.columnGroupingModel)}),$(e,`columnVisibilityModelChange`,()=>{r(t.columnGroupingModel)}),G.useEffect(()=>{t.columnGroupingModel!==e.current.caches.columnGrouping.lastColumnGroupingModel&&r(t.columnGroupingModel)},[e,r,t.columnGroupingModel])};function sL(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function cL(e){let t=iS(e);if(!t.isReady)return!1;let{rows:n}=eD(e);if(n.length===0)return!0;let r=wk(e);return r.lastRowIndex<=r.firstRowIndex?!1:t.hasScrollY?!0:r.firstRowIndex===0&&r.lastRowIndex>=n.length}function lL(e,t){if(t!==void 0&&e.changedTouches){for(let n=0;nSk(e),r=Z(e,n);return G.useEffect(()=>{t.current&&r===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(n()===!1)return Promise.resolve();t.current=sL()}return t.current}}function vL(e,t){if(e.length<4)return e;let n=e.slice();n.sort((e,t)=>e-t);let r=n[Math.floor(n.length*.25)],i=n[Math.floor(n.length*.75)-1],a=i-r,o=a<5?5:a*t;return n.filter(e=>e>r-o&&e{let i=zj(e.current,n.field).map(e=>e.getBoundingClientRect().width??0),o=t.includeOutliers?i:vL(i,t.outliersFactor);if(t.includeHeaders){let t=Lj(e.current,n.field);if(t){let e=t.querySelector(`.${X.columnHeaderTitleContainer}`),n=Array.from(e.children),r=t.querySelector(`.${X.menuIcon}`),i=window.getComputedStyle(e,null),a=parseInt(i.gap,10)||0,s=window.getComputedStyle(t,null),c=parseInt(s.paddingLeft,10)+parseInt(s.paddingRight,10),l=0,u=0;for(let e=0;e0&&(l+=1,u+=t.scrollWidth)}u+=1;let d=u+a*(l-1)+c+(r?.clientWidth??0);o.push(d)}}if(a){let t=Rj(e.current,n.field);if(t){let e=window.getComputedStyle(t,null),n=parseInt(e.paddingLeft,10)+parseInt(e.paddingRight,10),r=t.scrollWidth+n;o.push(r)}}let s=n.minWidth!==-1/0&&n.minWidth!==void 0,c=n.maxWidth!==1/0&&n.maxWidth!==void 0,l=s?n.minWidth:0,u=c?n.maxWidth:1/0,d=o.length===0?0:Math.max(...o);r[n.field]=LC(d,l,u)}),i.classList.remove(X.autosizing),r}var bL=e=>H({},e,{columnResize:{resizingColumnField:``}});function xL(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}var SL=(e,t)=>{let n=Ie(),r=NO(e,`useGridColumnResize`),i=De(xL).current,a=G.useRef(null),o=G.useRef(null),s=L(),c=G.useRef(void 0),l=t=>{r.debug(`Updating width to ${t} for col ${i.colDef.field}`);let a=t-i.columnHeaderElement.offsetWidth,o=t-i.initialColWidth;if(o>0){let t=i.initialTotalWidth+o;e.current.rootElementRef?.current?.style.setProperty(`--DataGrid-rowWidth`,`${t}px`)}i.colDef.computedWidth=t,i.colDef.width=t,i.colDef.flex=0,i.columnHeaderElement.style.width=`${t}px`;let s=i.headerFilterElement;s&&(s.style.width=`${t}px`),i.groupHeaderElements.forEach(e=>{let n=e,r;r=n.getAttribute(`aria-colspan`)===`1`?`${t}px`:`${n.offsetWidth+a}px`,n.style.width=r}),i.cellElements.forEach(e=>{let n=e,r;r=n.getAttribute(`aria-colspan`)===`1`?`${t}px`:`${n.offsetWidth+a}px`,n.style.setProperty(`--width`,r)});let c=iS(e),l=e.current.unstable_applyPipeProcessors(`isColumnPinned`,!1,i.colDef.field);l===aw.LEFT&&(CL(i.fillerLeft,`width`,a),i.leftPinnedCellsAfter.forEach(e=>{CL(e,`left`,a)}),i.leftPinnedHeadersAfter.forEach(e=>{CL(e,`left`,a)}),e.current.rootElementRef?.current?.style.setProperty(mL(n,l),`${hL(c,n,l)+o}px`)),l===aw.RIGHT&&(CL(i.fillerRight,`width`,a),i.rightPinnedCellsBefore.forEach(e=>{CL(e,`right`,a)}),i.rightPinnedHeadersBefore.forEach(e=>{CL(e,`right`,a)}),e.current.rootElementRef?.current?.style.setProperty(mL(n,l),`${hL(c,n,l)+o}px`))},u=t=>{if(v(),i.previousMouseClickEvent){let n=i.previousMouseClickEvent,r=n.timeStamp,a=n.clientX,o=n.clientY;if(t.timeStamp-r<300&&t.clientX===a&&t.clientY===o){i.previousMouseClickEvent=void 0,e.current.publishEvent(`columnResizeStop`,null,t);return}}if(i.colDef){e.current.setColumnWidth(i.colDef.field,i.colDef.width),r.debug(`Updating col ${i.colDef.field} with new width: ${i.colDef.width}`);let t=lw(e);i.groupHeaderElements.forEach(e=>{let n=Dj(e),r=e,i=`${n.reduce((e,n)=>t.columnVisibilityModel[n]===!1?e:e+t.lookup[n].computedWidth,0)}px`;r.style.width=i})}s.start(0,()=>{e.current.publishEvent(`columnResizeStop`,null,t)})},d=()=>{i.columnHeaderElement&&(i.cellElements=kj(i.columnHeaderElement,e.current))},f=(t,r,s)=>{let c=e.current.rootElementRef.current;i.initialColWidth=t.computedWidth,i.initialTotalWidth=e.current.getRootDimensions().rowWidth,i.colDef=t,i.columnHeaderElement=Ej(e.current.columnHeadersContainerRef.current,t.field);let l=c.querySelector(`.${X.headerFilterRow} [data-field="${yj(t.field)}"]`);l&&(i.headerFilterElement=l),i.groupHeaderElements=Oj(e.current.columnHeadersContainerRef?.current,t.field),d(),i.fillerLeft=Aj(e.current,n?`filler--pinnedRight`:`filler--pinnedLeft`),i.fillerRight=Aj(e.current,n?`filler--pinnedLeft`:`filler--pinnedRight`);let u=e.current.unstable_applyPipeProcessors(`isColumnPinned`,!1,i.colDef.field);i.leftPinnedCellsAfter=u===aw.LEFT?Mj(e.current,i.columnHeaderElement,n):[],i.rightPinnedCellsBefore=u===aw.RIGHT?Nj(e.current,i.columnHeaderElement,n):[],i.leftPinnedHeadersAfter=u===aw.LEFT?Fj(e.current,i.columnHeaderElement,n):[],i.rightPinnedHeadersBefore=u===aw.RIGHT?Ij(e.current,i.columnHeaderElement,n):[],o.current=pL(r,n),a.current=dL(s,i.columnHeaderElement.getBoundingClientRect(),o.current)},p=D(u),m=D(t=>{if(t.buttons===0){p(t);return}let n=uL(a.current,t.clientX,i.columnHeaderElement.getBoundingClientRect(),o.current);n=LC(n,i.colDef.minWidth,i.colDef.maxWidth),l(n);let r={element:i.columnHeaderElement,colDef:i.colDef,width:n};e.current.publishEvent(`columnResize`,r,t)}),h=D(e=>{lL(e,c.current)&&u(e)}),g=D(t=>{let n=lL(t,c.current);if(!n)return;if(t.type===`mousemove`&&t.buttons===0){h(t);return}let r=uL(a.current,n.x,i.columnHeaderElement.getBoundingClientRect(),o.current);r=LC(r,i.colDef.minWidth,i.colDef.maxWidth),l(r);let s={element:i.columnHeaderElement,colDef:i.colDef,width:r};e.current.publishEvent(`columnResize`,s,t)}),_=D(t=>{let n=vj(t.target,X[`columnSeparator--resizable`]);if(!n)return;let i=t.changedTouches[0];i!=null&&(c.current=i.identifier);let a=Tj(vj(t.target,X.columnHeader)),o=e.current.getColumn(a);if(!o)return;r.debug(`Start Resize on col ${o.field}`),e.current.publishEvent(`columnResizeStart`,{field:a},t),f(o,n,i.clientX);let s=Ue(t.currentTarget);s.addEventListener(`touchmove`,g),s.addEventListener(`touchend`,h)}),v=G.useCallback(()=>{let t=Ue(e.current.rootElementRef.current);t.body.style.removeProperty(`cursor`),t.removeEventListener(`mousemove`,m),t.removeEventListener(`mouseup`,p),t.removeEventListener(`touchmove`,g),t.removeEventListener(`touchend`,h),setTimeout(()=>{t.removeEventListener(`click`,gL,!0)},100),i.columnHeaderElement&&(i.columnHeaderElement.style.pointerEvents=`unset`)},[e,i,m,p,g,h]),y=G.useCallback(({field:t})=>{e.current.setState(e=>H({},e,{columnResize:H({},e.columnResize,{resizingColumnField:t})}))},[e]),b=G.useCallback(()=>{e.current.setState(e=>H({},e,{columnResize:H({},e.columnResize,{resizingColumnField:``})}))},[e]),x=D(({colDef:t},n)=>{if(n.button!==0||!n.currentTarget.classList.contains(X[`columnSeparator--resizable`]))return;n.preventDefault(),r.debug(`Start Resize on col ${t.field}`),e.current.publishEvent(`columnResizeStart`,{field:t.field},n),f(t,n.currentTarget,n.clientX);let a=Ue(e.current.rootElementRef.current);a.body.style.cursor=`col-resize`,i.previousMouseClickEvent=n.nativeEvent,a.addEventListener(`mousemove`,m),a.addEventListener(`mouseup`,p),a.addEventListener(`click`,gL,!0)}),S=D((n,r)=>{if(t.disableAutosize||r.button!==0)return;let i=e.current.state.columns.lookup[n.field];i.resizable!==!1&&e.current.autosizeColumns(H({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[i.field]}))}),C=_L(e),w=G.useRef(!1),T=G.useCallback(async n=>{if(!e.current.rootElementRef?.current||w.current)return;w.current=!0;let r=lw(e),i=H({},dk,n,{columns:n?.columns??r.orderedFields});i.columns=i.columns.filter(e=>r.columnVisibilityModel[e]!==!1);let a=i.columns.map(t=>e.current.state.columns.lookup[t]);try{!t.disableVirtualization&&i.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await C());let n=yL(e,i,a),o=a.map(e=>H({},e,{width:n[e.field],computedWidth:n[e.field],flex:0}));if(i.expand){let t=r.orderedFields.map(e=>r.lookup[e]).filter(e=>r.columnVisibilityModel[e.field]!==!1).reduce((e,t)=>e+(n[t.field]??t.computedWidth??t.width),0),i=e.current.getRootDimensions().viewportInnerSize.width-t;if(i>0){let e=i/(o.length||1);o.forEach(t=>{t.width+=e,t.computedWidth+=e})}}e.current.updateColumns(o),o.forEach((t,n)=>{if(t.width!==a[n].width){let n=t.width;e.current.publishEvent(`columnWidthChange`,{element:e.current.getColumnHeaderElement(t.field),colDef:t,width:n})}})}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),w.current=!1}},[e,C,t.disableVirtualization]);G.useEffect(()=>v,[v]),te(()=>{if(t.autosizeOnMount){let n,r,i,a=()=>{r?.(),i?.(),r=void 0,i=void 0},o=()=>{n=void 0,a(),e.current.autosizeColumns(t.autosizeOptions)},s=()=>{n===void 0&&(n=requestAnimationFrame(o))},c=()=>{cL(e)&&s()};return r=e.current.subscribeEvent(`stateChange`,c),i=e.current.subscribeEvent(`renderedRowsIntervalChange`,c),c(),()=>{a(),n!==void 0&&cancelAnimationFrame(n)}}}),PO(e,()=>e.current.columnHeadersContainerRef?.current,`touchstart`,_,{passive:!0}),MO(e,{autosizeColumns:T},`public`),$(e,`columnResizeStop`,b),$(e,`columnResizeStart`,y),$(e,`columnSeparatorMouseDown`,x),$(e,`columnSeparatorDoubleClick`,S),$(e,`rowsSet`,()=>{uk(e)!==``&&requestAnimationFrame(()=>{d()})}),oC(e,`columnResize`,t.onColumnResize),oC(e,`columnWidthChange`,t.onColumnWidthChange)};function CL(e,t,n){e&&(e.style[t]=`${Math.round(parseFloat(e.style[t]))+n}px`)}function wL(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex{if(!e||!t)return null;let r=e[t.field];return t.rowSpanValueGetter?t.rowSpanValueGetter(r,e,t,n):IS(e,t,n)},DL={caches:{spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},processedRange:{firstRowIndex:0,lastRowIndex:0}},OL=(e,t,n,r,i,a)=>{let o=e.current.virtualizer,s=a?DL:Jx.selectors.state(o.store.state),c=H({},s.caches.spannedCells),l=H({},s.caches.hiddenCells),u=H({},s.caches.hiddenCellOriginMap),d={firstRowIndex:Math.min(s.processedRange.firstRowIndex,i.firstRowIndex),lastRowIndex:Math.max(s.processedRange.lastRowIndex,i.lastRowIndex)};return t.forEach((t,a)=>{for(let o=i.firstRowIndex;o=r.firstRowIndex&&s&&EL(s.model,t,e)===d;){let e=n[i+1];l[e.id]?l[e.id][a]=!0:l[e.id]={[a]:!0},h.push(o),m+=1,f=s.id,p=i,--i,s=n[i]}}h.forEach(e=>{u[e]?u[e][a]=p:u[e]={[a]:p}});let g=o+1;for(;g<=r.lastRowIndex&&n[g]&&EL(n[g].model,t,e)===d;){let e=n[g];l[e.id]?l[e.id][a]=!0:l[e.id]={[a]:!0},u[g]?u[g][a]=p:u[g]={[a]:p},g+=1,m+=1}m>0&&(c[f]?c[f][a]=m+1:c[f]={[a]:m+1})}}),{caches:{spannedCells:c,hiddenCells:l,hiddenCellOriginMap:u},processedRange:d}},kL=e=>H({},e,{rowSpanning:DL}),AL=(e,t)=>{let n=G.useCallback((t,n=!1)=>{let r=e.current.virtualizer.store,{range:i,rows:a}=Wk(e);if(n&&r.set(`rowSpanning`,DL),i===null||!TL(t))return;let o=n?DL:Jx.selectors.state(r.state),s=wL({firstRowIndex:t.firstRowIndex,lastRowIndex:Math.min(t.lastRowIndex,i.lastRowIndex-i.firstRowIndex+1)},o.processedRange);if(s===null)return;let c=OL(e,hw(e),a,i,s,n),l=Object.keys(c.caches.spannedCells).length,u=Object.keys(c.caches.hiddenCells).length,d=Object.keys(o.caches.spannedCells).length,f=Object.keys(o.caches.hiddenCells).length;!(n||l!==d||u!==f)||l===0&&d===0||r.set(`rowSpanning`,c)},[e]),{schedule:r,cancel:i}=IO(n),a=G.useCallback(()=>{let t=wk(e);TL(t)&&r(t,!0)},[e,r]);$(e,`renderedRowsIntervalChange`,VC(t.rowSpanning,e=>{let t=i();n(e,t)})),$(e,`sortedRowsSet`,VC(t.rowSpanning,a)),$(e,`paginationModelChange`,VC(t.rowSpanning,a)),$(e,`filteredRowsSet`,VC(t.rowSpanning,a)),$(e,`columnsChange`,VC(t.rowSpanning,a)),$(e,`rowExpansionChange`,VC(t.rowSpanning,a)),G.useEffect(()=>{let r=e.current.virtualizer?.store;r&&(t.rowSpanning?r.state.rowSpanning===DL&&n(wk(e)):r.state.rowSpanning!==DL&&r.set(`rowSpanning`,DL))},[e,t.rowSpanning,n])},jL=(e,t,n)=>H({},e,{listViewColumn:t.listViewColumn?H({},t.listViewColumn,{computedWidth:NL(n)}):void 0});function ML(e,t){let n=()=>{e.current.setState(t=>t.listViewColumn?H({},t,{listViewColumn:H({},t.listViewColumn,{computedWidth:NL(e)})}):t)},r=G.useRef(null);$(e,`viewportInnerSizeChange`,e=>{r.current!==e.width&&(r.current=e.width,n())}),$(e,`columnVisibilityModelChange`,n),h(()=>{let n=t.listViewColumn;n&&e.current.setState(t=>H({},t,{listViewColumn:H({},n,{computedWidth:NL(e)})}))},[e,t.listViewColumn]),G.useEffect(()=>{},[t.listView,t.listViewColumn])}function NL(e){return iS(e).viewportInnerSize.width}var PL=Q(ZT,JT,GE,(e,t,n)=>({groupKeys:[],paginationModel:n,sortModel:t,filterModel:e,start:n.page*n.pageSize,end:n.page*n.pageSize+n.pageSize-1})),FL=function(e){return e.Default=`set-flat-rows`,e.LazyLoading=`replace-row-range`,e.GroupedData=`set-grouped-rows`,e.LazyLoadedGroupedData=`replace-grouped-row-range`,e}({}),IL=class{constructor(e){this.chunkSize=e}getCacheKeys=e=>{if(this.chunkSize<1||typeof e.start!=`number`)return[e];let t=[];for(let n=e.start;n<=e.end;n+=this.chunkSize){let r=Math.min(n+this.chunkSize-1,e.end);t.push(H({},e,{start:n,end:r}))}return t};splitResponse=(e,t)=>{let n=this.getCacheKeys(e);if(n.length===1)return new Map([[e,t]]);let r=new Map;return n.forEach(n=>{let i=n.end===e.end,a=H({},t,{pageInfo:H({},t.pageInfo,{hasNextPage:t.pageInfo?.hasNextPage!==void 0&&!i||t.pageInfo?.hasNextPage,nextCursor:t.pageInfo?.nextCursor!==void 0&&!i?t.rows[n.end+1].id:t.pageInfo?.nextCursor}),rows:typeof n.start!=`number`||typeof e.start!=`number`?t.rows:t.rows.slice(n.start-e.start,n.end-e.start+1)});r.set(n,a)}),r};static mergeResponses=e=>e.length===1?e[0]:e.reduce((e,t)=>H({},t,{rows:[...e.rows,...t.rows]}),{rows:[],rowCount:0,pageInfo:{}})},LL=[`skipCache`,`keepChildrenExpanded`,`showChildrenLoading`],RL={clear:()=>{},get:()=>void 0,set:()=>{}};function zL(e,t={}){return e===null?RL:e??new Dk(t)}var BL=(e,t,n={})=>{let r=G.useCallback(()=>{e.current.setStrategyAvailability(_F.DataSource,FL.Default,t.dataSource?()=>!0:()=>!1)},[e,t.dataSource]),[i,a]=G.useState(e.current.getActiveStrategy(_F.DataSource)),o=G.useMemo(()=>i===FL.Default||i===FL.GroupedData,[i]),s=Z(e,GE),c=G.useRef(0),l=G.useRef(!1),u=G.useRef(0),d=G.useRef(null),f=t.onDataSourceError,p=t.dataSourceRevalidateMs,m=De(()=>{if(!t.pagination)return new IL(s.pageSize);let e=t.pageSizeOptions.map(e=>typeof e==`number`?e:e.value).sort((e,t)=>e-t);return new IL(Math.min(s.pageSize,e[0]))}).current,[h,g]=G.useState(()=>zL(t.dataSourceCache,n.cacheOptions)),_=G.useCallback(async(r,i)=>{let a=t.dataSource?.getRows;if(!a)return;let s=i||{},{skipCache:d,keepChildrenExpanded:p,showChildrenLoading:g}=s,_=K(s,LL),v=H({},PL(e),e.current.unstable_applyPipeProcessors(`getRowsParams`,{}),_);if(r&&r!==jS&&t.signature!==`DataGrid`){n.fetchRowChildren?.([r],[v],g);return}n.clearDataSourceState?.();let y=m.getCacheKeys(v).map(e=>h.get(e));if(!d&&y.every(e=>e!==void 0)){c.current+=1,e.current.applyStrategyProcessor(`dataSourceRootRowsUpdate`,{response:IL.mergeResponses(y),fetchParams:v,options:{skipCache:d,keepChildrenExpanded:p}}),l.current=!0,o&&e.current.setLoading(!1);return}(o||e.current.getRowsCount()===0)&&e.current.setLoading(!0);let b=c.current+1;c.current=b,l.current=!1,u.current+=1;try{let t=await a(v);m.splitResponse(v,t).forEach((e,t)=>h.set(t,e)),c.current===b&&(e.current.applyStrategyProcessor(`dataSourceRootRowsUpdate`,{response:t,fetchParams:v,options:{skipCache:d,keepChildrenExpanded:p}}),l.current=!0)}catch(t){c.current===b&&(e.current.applyStrategyProcessor(`dataSourceRootRowsUpdate`,{error:t,fetchParams:v,options:{skipCache:d,keepChildrenExpanded:p}}),typeof f==`function`&&f(new Ok({message:t?.message,params:v,cause:t})))}finally{--u.current,o&&c.current===b&&e.current.setLoading(!1)}},[m,h,e,o,t.dataSource?.getRows,f,n,t.signature]),v=G.useCallback(()=>{a(e.current.getActiveStrategy(_F.DataSource))},[e]),y=n.fetchRowChildren,b=D(async()=>{let n=t.dataSource?.getRows;if(!n||!o)return;let r=()=>{if(i!==FL.GroupedData||!y)return;let t=xS(e),n=eD(e).rows.reduce((e,n)=>{let r=t[n.id];return r.type===`group`&&r.id!==jS&&r.childrenExpanded===!0&&e.push(n.id),e},[]);n.length>0&&y(n,[],!1)},a=H({},PL(e),e.current.unstable_applyPipeProcessors(`getRowsParams`,{}));if(m.getCacheKeys(a).map(e=>h.get(e)).every(e=>e!==void 0)){r();return}try{let t=await n(a);if(!Hb(a,H({},PL(e),e.current.unstable_applyPipeProcessors(`getRowsParams`,{}))))return;m.splitResponse(a,t).forEach((e,t)=>h.set(t,e)),e.current.applyStrategyProcessor(`dataSourceRootRowsUpdate`,{response:t,fetchParams:a,options:{}}),r()}catch{}}),x=G.useCallback(()=>{d.current!==null&&(clearInterval(d.current),d.current=null)},[]),S=D(()=>{x(),!(p<=0||!o)&&(d.current=setInterval(b,p))}),C=G.useCallback(t=>{if(`error`in t){e.current.setRows([]);return}let{response:n}=t;n.rowCount!==void 0&&e.current.setRowCount(n.rowCount),e.current.setRows(n.rows),e.current.unstable_applyPipeProcessors(`processDataSourceRows`,{params:t.fetchParams,response:n},!0),S()},[e,S]),w=t.dataSource?.updateRow,T=n.handleEditRow,E={dataSource:{fetchRows:_,cache:h,editRow:G.useCallback(async t=>{if(w)try{let n=await w(t);return typeof T==`function`?(T(t,n),n):(n&&!Hb(n,t.previousRow)&&e.current.dataSource.cache.clear(),e.current.updateNestedRows([n],[]),n)}catch(e){throw typeof f==`function`&&f(new kk({message:e?.message,params:t,cause:e})),e}},[e,w,f,T])}},O=G.useMemo(()=>He(_,0),[_]),k=G.useCallback(()=>{let n=e.current.getActiveStrategy(_F.DataSource);t.dataSourceKeepPreviousData&&n===FL.Default||e.current.setRows([]),e.current.setLoading(!0),x(),O()},[e,t.dataSourceKeepPreviousData,x,O]),A=G.useRef(!0);G.useEffect(()=>{if(A.current){A.current=!1;return}if(t.dataSourceCache===void 0)return;let e=zL(t.dataSourceCache,n.cacheOptions);g(t=>t===e?t:e)},[t.dataSourceCache,n.cacheOptions]),G.useEffect(()=>{o||x()},[o,x]),G.useEffect(()=>{p<=0&&x()},[p,x]),G.useEffect(()=>x,[x]);let j=G.useRef(e),M=G.useRef(i),N=G.useRef(t.dataSource);return G.useEffect(()=>{let n=e.current?.rootElementRef?.current??null,r=()=>{n?.isConnected||(c.current+=1)};if(i!==FL.Default&&i!==FL.LazyLoading&&i!==FL.GroupedData&&i!==FL.LazyLoadedGroupedData)return;let a=j.current!==e||M.current!==i||N.current!==t.dataSource;return j.current=e,M.current=i,N.current=t.dataSource,!a&&(l.current||u.current>0)||t.dataSource&&(x(),(!t.dataSourceKeepPreviousData||i!==FL.Default)&&e.current.setRows([]),e.current.dataSource.cache.clear(),e.current.dataSource.fetchRows()),r},[e,t.dataSource,t.dataSourceKeepPreviousData,i,x]),G.useEffect(()=>{},[t.dataSourceKeepPreviousData,i]),{api:{public:E},debouncedFetchRows:O,strategyProcessor:{strategyName:FL.Default,group:`dataSourceRootRowsUpdate`,processor:C},setStrategyAvailability:r,startPolling:S,stopPolling:x,cacheChunkManager:m,cache:h,events:{strategyAvailabilityChange:v,sortModelChange:VC(o,k),filterModelChange:VC(o,k),paginationModelChange:VC(o,k)}}},VL=(e,t)=>{let{api:n,strategyProcessor:r,events:i,setStrategyAvailability:a}=BL(e,t);MO(e,n.public,`public`),vF(e,r.strategyName,r.group,r.processor),Object.entries(i).forEach(([t,n])=>{$(e,t,n)}),G.useEffect(()=>{a()},[a])},HL=(e,t,n)=>{TF(e,t),RI(e,t),jI(e),EF(CF,e,t),EF(FI,e,t),EF(RF,e,t),EF(EI,e,t),EF(pI,e,t),EF(wI,e,t),EF(iI,e,t),EF(zI,e,t),EF(hI,e,t),EF($F,e,t),EF(kL,e,t),EF(VF,e,t),EF(bL,e,t),EF(IF,e,t),EF(aL,e,t),EF(yk,e,t),EF(KI,e,t),EF(eA,e,t),EF(jL,e,t),uI(e,t),II(e,t),zF(e,t),DI(e,t,n),AL(e,t),NI(e,t,n),$I(e),oL(e,t),TI(e,t,n),aI(e,t),gI(e,t),rI(e,t,n),BI(e,t),HF(e,t),SL(e,t),mI(e,t),HI(e,t),LF(e),KF(e,t),QF(e,t),FF(e,t),JI(e,t),UI(e,t),QI(e),bk(e,t),ML(e,t),VL(e,t),FO(()=>{e.current.runAppliersForPendingProcessors()}),G.useEffect(()=>{e.current.runAppliersForPendingProcessors()})},UL=e=>{let{classes:t,headerAlign:n,isDragging:r,isLastColumn:i,showLeftBorder:a,showRightBorder:o,groupId:s,pinnedPosition:c}=e,l={root:[`columnHeader`,n&&`columnHeader--align${he(n)}`,r&&`columnHeader--moving`,o&&`columnHeader--withRightBorder`,a&&`columnHeader--withLeftBorder`,`withBorderColor`,s===null?`columnHeader--emptyGroup`:`columnHeader--filledGroup`,c===ST.LEFT&&`columnHeader--pinnedLeft`,c===ST.RIGHT&&`columnHeader--pinnedRight`,i&&`columnHeader--last`],draggableContainer:[`columnHeaderDraggableContainer`],titleContainer:[`columnHeaderTitleContainer`,`withBorderColor`],titleContainerContent:[`columnHeaderTitleContainerContent`]};return g(l,zv,t)};function WL(e){let{groupId:t,width:n,depth:r,maxDepth:i,fields:a,height:o,colIndex:s,hasFocus:c,tabIndex:l,isLastColumn:u,pinnedPosition:d,pinnedOffset:f}=e,p=Jv(),m=J(),h=Ie(),g=G.useRef(null),_=Z(p,fO),v=t?_[t]:{},{headerName:y=t??``,description:b=``,headerAlign:x=void 0}=v,S,C=t&&_[t]?.renderHeaderGroup,w=G.useMemo(()=>({groupId:t,headerName:y,description:b,depth:r,maxDepth:i,fields:a,colIndex:s,isLastColumn:u}),[t,y,b,r,i,a,s,u]);t&&C&&(S=C(w));let T=H({},e,{classes:m.classes,headerAlign:x,depth:r,isDragging:!1}),E=y??t,D=_e(),O=t===null?`empty-group-cell-${D}`:t,k=UL(T);G.useLayoutEffect(()=>{if(c){let e=g.current.querySelector(`[tabindex="0"]`)||g.current;if(!e)return;pA(e,p)}},[p,c]);let A=G.useCallback(e=>t=>{wj(t)||p.current.publishEvent(e,w,t)},[p,w]),j=G.useMemo(()=>({onKeyDown:A(`columnGroupHeaderKeyDown`),onFocus:A(`columnGroupHeaderFocus`),onBlur:A(`columnGroupHeaderBlur`)}),[A]),M=typeof v.headerClassName==`function`?v.headerClassName(w):v.headerClassName,N=mA(p,d),P=G.useMemo(()=>yA(H({},e.style),h,d,f===void 0?void 0:f+N),[d,f,N,e.style,h]);return(0,W.jsx)($j,H({ref:g,classes:k,columnMenuOpen:!1,colIndex:s,height:o,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:l,isDraggable:!1,headerComponent:S,headerClassName:M,description:b,elementId:O,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:E,"aria-colspan":a.length,"data-fields":`|-${a.join(`-|-`)}-|`,style:P},j))}var GL={root:X.scrollbarFiller,pinnedRight:X[`scrollbarFiller--pinnedRight`]};function KL({pinnedRight:e}){let t=mA(Jv(),e?ST.RIGHT:void 0);return(0,W.jsx)(`div`,{role:`none`,className:V(GL.root,e&&GL.pinnedRight),style:{right:t}})}var qL=m(`div`,{name:`MuiDataGrid`,slot:`ColumnHeaderRow`})({display:`flex`}),JL=e=>{let{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:a,columnHeaderFocus:o,columnGroupHeaderFocus:s,headerGroupingMaxDepth:c,columnMenuState:l,columnVisibility:u,columnGroupsHeaderStructure:d,hasOtherElementInTabSequence:f}=e,[p,m]=G.useState(``),[h,g]=G.useState(``),_=Jv(),v=J(),y=Z(_,dO),b=Z(_,bw),x=Z(_,Tk),S=Z(_,vw),C=Z(_,dw),w=Z(_,Ck),T=kx(b,x,S.left.length,w),E=Z(_,aS),D=Z(_,lS),O=Z(_,uS),k=Z(_,dS),A=Z(_,pS),j=G.useCallback(e=>g(e.field),[]),M=G.useCallback(()=>g(``),[]),N=G.useCallback(e=>m(e.field),[]),P=G.useCallback(()=>m(``),[]),ee=G.useMemo(()=>S.left.length?{firstColumnIndex:0,lastColumnIndex:S.left.length}:null,[S.left.length]),F=G.useMemo(()=>S.right.length?{firstColumnIndex:t.length-S.right.length,lastColumnIndex:t.length}:null,[S.right.length,t.length]);$(_,`columnResizeStart`,j),$(_,`columnResizeStop`,M),$(_,`columnHeaderDragStart`,N),$(_,`columnHeaderDragEndNative`,P);let I=e=>{let{renderContext:n=x}=e||{},r=n.firstColumnIndex,i=Math.min(n.lastColumnIndex,t.length);return{renderedColumns:t.slice(r,i),firstColumnToRender:r,lastColumnToRender:i}},L=(e,t,n,r=!1)=>{let i=e?.position===ST.RIGHT,a=e?.position===void 0,o=S.right.length>0&&i||S.right.length===0&&a,s=T-n;return(0,W.jsxs)(G.Fragment,{children:[a&&(0,W.jsx)(`div`,{role:`none`,style:{width:s}}),t,a&&(0,W.jsx)(`div`,{role:`none`,className:V(X.filler,X[`filler--horizontal`],r&&X[`filler--borderBottom`])}),o&&(0,W.jsx)(KL,{pinnedRight:i})]})},R=(e,t={})=>{let{renderedColumns:a,firstColumnToRender:s}=I(e),c=[];for(let u=0;u(0,W.jsxs)(qL,{role:`row`,"aria-rowindex":c+1,ownerState:v,className:X[`row--borderBottom`],style:{height:O,"--height":`${O}px`},children:[ee&&R({position:ST.LEFT,renderContext:ee},{disableReorder:!0}),R({renderContext:x}),F&&R({position:ST.RIGHT,renderContext:F},{disableReorder:!0,separatorSide:Jj.Left})]}),te=({depth:e,params:n})=>{let r=I(n);if(r.renderedColumns.length===0)return null;let{firstColumnToRender:i,lastColumnToRender:o}=r,l=d[e],f=t[i].field,p=y[f]?.[e]??null,m=l.findIndex(({groupId:e,columnFields:t})=>e===p&&t.includes(f)),h=t[o-1].field,g=y[h]?.[e]??null,_=l.findIndex(({groupId:e,columnFields:t})=>e===g&&t.includes(h)),x=l.slice(m,_+1).map(e=>H({},e,{columnFields:e.columnFields.filter(e=>u[e]!==!1)})).filter(e=>e.columnFields.length>0),S=x[0].columnFields.indexOf(f),w=x[0].columnFields.slice(0,S).reduce((e,t)=>e+(C[t].computedWidth??0),0),T=i,O=x.map(({groupId:t,columnFields:r},i)=>{let o=s!==null&&s.depth===e&&r.includes(s.field),l=a!==null&&a.depth===e&&r.includes(a.field)?0:-1,u={groupId:t,width:r.reduce((e,t)=>e+C[t].computedWidth,0),fields:r,colIndex:T,hasFocus:o,tabIndex:l},d=n.position,f=EP(d,u.width,T,b,E,A);T+=r.length;let p=i;return d===ST.LEFT&&(p=T-1),(0,W.jsx)(WL,{groupId:t,width:u.width,fields:u.fields,colIndex:u.colIndex,depth:e,isLastColumn:i===x.length-1,maxDepth:c,height:k,hasFocus:o,tabIndex:l,pinnedPosition:d,pinnedOffset:f,showLeftBorder:OP(d,p,v.showColumnVerticalBorder,v.pinnedColumnsSectionSeparator),showRightBorder:DP(d,p,x.length,v.showColumnVerticalBorder,D,v.pinnedColumnsSectionSeparator)},i)});return L(n,O,w)};return{renderContext:x,leftRenderContext:ee,rightRenderContext:F,pinnedColumns:S,visibleColumns:t,columnPositions:b,getFillers:L,getColumnHeadersRow:z,getColumnsToRender:I,getColumnGroupHeadersRows:()=>{if(c===0)return null;let e=[];for(let t=0;t({role:`rowgroup`})}},YL=[`className`],XL=e=>{let{classes:t}=e;return g({root:[`columnHeaders`]},zv,t)},ZL=S(`div`,{name:`MuiDataGrid`,slot:`ColumnHeaders`})({display:`flex`,flexDirection:`column`,borderTopLeftRadius:`var(--unstable_DataGrid-radius)`,borderTopRightRadius:`var(--unstable_DataGrid-radius)`}),QL=H_(function(e,t){let{className:n}=e,r=K(e,YL),i=J(),a=XL(i);return(0,W.jsx)(ZL,H({className:V(a.root,n),ownerState:i},r,{role:`none`,ref:t}))}),$L=[`className`,`visibleColumns`,`sortColumnLookup`,`filterColumnLookup`,`columnHeaderTabIndexState`,`columnGroupHeaderTabIndexState`,`columnHeaderFocus`,`columnGroupHeaderFocus`,`headerGroupingMaxDepth`,`columnMenuState`,`columnVisibility`,`columnGroupsHeaderStructure`,`hasOtherElementInTabSequence`],eR=JS(H_(function(e,t){let{visibleColumns:n,sortColumnLookup:r,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:o,columnHeaderFocus:s,columnGroupHeaderFocus:c,headerGroupingMaxDepth:l,columnMenuState:u,columnVisibility:d,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:p}=e,m=K(e,$L),{getInnerProps:h,getColumnHeadersRow:g,getColumnGroupHeadersRows:_}=JL({visibleColumns:n,sortColumnLookup:r,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:o,columnHeaderFocus:s,columnGroupHeaderFocus:c,headerGroupingMaxDepth:l,columnMenuState:u,columnVisibility:d,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:p});return(0,W.jsxs)(QL,H({},m,h(),{ref:t,children:[_(),g()]}))}));function tR(e){return null}function nR(e){return null}var rR=H_(function(e,t){let n=Cv().current.getLocaleText(`noResultsOverlayLabel`);return(0,W.jsx)(QA,H({},e,{ref:t,children:n}))}),iR=()=>g({root:[`bottomContainer`]},zv,{}),aR=m(`div`,{slot:`internal`,shouldForwardProp:void 0})({position:`sticky`,zIndex:40,bottom:`calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))`,[`.${X[`virtualizer--layoutControlled`]} &`]:{position:`absolute`}});function oR(e){let t=iR();return(0,W.jsx)(aR,H({},e,{className:V(t.root,X[`container--bottom`]),role:`none`}))}var sR=H({},kb,{cell:CA,skeletonCell:MA,columnHeaderFilterIconButton:hM,columnHeaderSortIcon:pM,columnMenu:PM,columnHeaders:eR,detailPanels:tR,bottomContainer:oR,footer:TP,footerRowCount:GP,toolbar:bP,pinnedRows:nR,loadingOverlay:LP,noResultsOverlay:rR,noRowsOverlay:RP,noColumnsOverlay:zP,pagination:VP,filterPanel:hN,columnsPanel:zM,columnsManagement:TN,panel:WM,row:tF,rowCheckbox:vM}),cR={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:`DataGrid`,listView:!1},lR=e=>H({},cR,e.dataSource?{filterMode:`server`,sortingMode:`server`,paginationMode:`server`}:{}),uR=sR,dR=e=>{let t=ke(),n=G.useMemo(()=>k({props:e,theme:t,name:`MuiDataGrid`}),[t,e]),r=G.useMemo(()=>H({},ZS,n.localeText),[n.localeText]),i=G.useMemo(()=>hA({defaultSlots:uR,slots:n.slots}),[n.slots]),a=G.useMemo(()=>Object.keys(qk).reduce((e,t)=>(e[t]=n[t]??qk[t],e),{}),[n]);return G.useMemo(()=>H({},n,a,{localeText:r,slots:i},lR(n)),[n,r,i,a])},fR=Symbol(`mui.api_private`),pR=e=>e.isPropagationStopped!==void 0,mR=0;function hR(e){let t=e.current?.[fR];if(t)return t;let n={},r={state:n,store:Jp.create(n),instanceId:{id:mR}};return mR+=1,r.getPublicApi=()=>e.current,r.register=(t,n)=>{Object.keys(n).forEach(i=>{let a=n[i],o=r[i];if(o?.spying===!0?o.target=a:r[i]=a,t===`public`){let t=e.current,n=t[i];n?.spying===!0?n.target=a:t[i]=a}})},r.register(`private`,{caches:{},eventManager:new Gh}),r}function gR(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[fR]:e.current}}function _R(e,t){let n=G.useRef(null),r=G.useRef(null);r.current||=hR(n),n.current||=gR(r);let i=G.useCallback((...e)=>{let[n,i,a={}]=e;if(a.defaultMuiPrevented=!1,pR(a)&&a.isPropagationStopped())return;let o=t.signature===QS.DataGridPro||t.signature===QS.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(n,i,a,o)},[r,t.signature]);return MO(r,{subscribeEvent:G.useCallback((e,t,n)=>{r.current.eventManager.on(e,t,n);let i=r.current;return()=>{i.eventManager.removeListener(e,t)}},[r]),publishEvent:i},`public`),e&&!e.current?.state&&(e.current=n.current),G.useImperativeHandle(e,()=>n.current,[n]),G.useEffect(()=>{let e=r.current;return()=>{e.publishEvent(`unmount`)}},[r]),r}var vR={hooks:{useCSSVariables:sy,useGridAriaAttributes:nF,useGridRowAriaAttributes:rF,useGridRowsOverridableMethods:iF,useGridParamsOverridableMethods:aF,useIsCellEditable:oF,useCellAggregationResult:()=>null,useFilterValueGetter:e=>e.current.getRowValue}},yR=G.memo(H_(function(e,t){let n=dR(e),r=_R(n.apiRef,n);return HL(r,n,vR),(0,W.jsx)(sF,{privateApiRef:r,configuration:vR,props:n,children:(0,W.jsx)(WA,H({className:n.className,style:n.style,sx:n.sx},n.slotProps?.root,{ref:t}))})})),bR=`http://localhost:8088`;function xR(e){return{id:e.id,label:e.label,description:e.description,propertyTypeGroupId:e.propertyGroupId}}function SR(e){return{id:e.id,label:e.label,description:e.description,propertyGroupId:e.propertyTypeGroupId}}async function CR(e){return SR((await A_.post(`${bR}/createPropertyType`,{json:xR(e)}).json()).data)}async function wR(e){await A_.delete(`${bR}/deletePropertyType/${e}`)}async function TR(e){return SR((await A_.get(`${bR}/getPropertyType/${e}`).json()).data)}async function ER(e){return((await A_.get(`${bR}/getPropertyTypesByGroupId/${e}`).json()).data??[]).map(SR)}var DR={type:`include`,ids:new Set};function OR(e){return e==null?DR:{type:`include`,ids:new Set([e])}}function kR(e){let[t]=Array.from(e.ids);return t==null?null:Number(t)}var AR=[{field:`id`,headerName:`ID`,width:80},{field:`label`,headerName:`Label`,flex:1},{field:`description`,headerName:`Description`,flex:2}],jR=({groupId:e,groupLabel:t,selectedPropertyTypeId:n,onSelectedPropertyTypeChange:r})=>{let[i,a]=(0,G.useState)([]),[o,s]=(0,G.useState)(!1),[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(``),[f,p]=(0,G.useState)(!1),m=(0,G.useCallback)(async()=>{if(e==null){a([]);return}s(!0),l(null);try{a(await ER(e))}catch{l(`Failed to load property types.`)}finally{s(!1)}},[e]);(0,G.useEffect)(()=>{r(null,null),m()},[e,m,r]);let h=(0,G.useMemo)(()=>{let e=u.trim().toLowerCase();return e?i.filter(t=>t.label.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)):i},[i,u]);return(0,W.jsxs)(pe,{sx:{flex:1,minWidth:320,p:1},spacing:1,children:[(0,W.jsxs)(ve,{variant:`subtitle1`,children:[`Property Types`,t?` - ${t}`:``]}),(0,W.jsxs)(pe,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,W.jsx)(If,{size:`small`,placeholder:`Search property types`,value:u,onChange:e=>d(e.target.value),fullWidth:!0,disabled:e==null,slotProps:{input:{startAdornment:(0,W.jsx)(tc,{position:`start`,children:(0,W.jsx)(ip,{fontSize:`small`})})}}}),(0,W.jsx)(Yu,{title:`Add property type`,children:(0,W.jsx)(`span`,{children:(0,W.jsx)(N,{size:`small`,onClick:()=>p(!0),disabled:e==null,children:(0,W.jsx)(np,{fontSize:`small`})})})}),(0,W.jsx)(Yu,{title:`Remove selected property type`,children:(0,W.jsx)(`span`,{children:(0,W.jsx)(N,{size:`small`,onClick:async()=>{n!=null&&window.confirm(`Remove selected property type?`)&&(await wR(n),r(null,null),await m())},disabled:n==null,children:(0,W.jsx)(rp,{fontSize:`small`})})})})]}),c&&(0,W.jsx)(ve,{color:`error`,variant:`body2`,children:c}),e==null?(0,W.jsx)(ve,{variant:`body2`,sx:{p:2},children:`Select a property type group to view its property types.`}):(0,W.jsx)(Ra,{sx:{flexGrow:1,minHeight:300},children:(0,W.jsx)(yR,{rows:h,columns:AR,loading:o,density:`compact`,rowSelectionModel:OR(n),onRowSelectionModelChange:e=>{let t=kR(e);r(t,t==null?null:i.find(e=>e.id===t)?.label??null)},disableMultipleRowSelection:!0})}),(0,W.jsx)(F_,{open:f,title:`Add Property Type`,onClose:()=>p(!1),onSubmit:async({label:t,description:n})=>{e!=null&&(await CR({id:0,label:t,description:n,propertyGroupId:e}),await m())}})]})},MR=`http://localhost:8088`;async function NR(e,t){return(await A_.post(`${MR}/createValueForPropertyTypeId/${e}`,{json:t}).json()).data}async function PR(e){return(await A_.get(`${MR}/getValuesFromPropertyTypeId/${e}`).json()).data??[]}async function FR(e){return(await A_.get(`${MR}/getValuesFromPropertyId/${e}`).json()).data??[]}async function IR(e,t){return(await A_.post(`${MR}/createValueForPropertyId/${e}`,{json:t}).json()).data}async function LR(e){await A_.put(`${MR}/updateValue`,{json:e})}async function RR(e,t){await A_.delete(`${MR}/deleteValueFromPropertyId/${e}/${t}`)}async function zR(e,t,n){await A_.post(`${MR}/createTerminalPropertyForProductId/${e}/${t}/${encodeURIComponent(n)}`)}var BR={type:`include`,ids:new Set};function VR(e){return e==null?BR:{type:`include`,ids:new Set([e])}}function HR(e){let[t]=Array.from(e.ids);return t==null?null:Number(t)}var UR=[{field:`id`,headerName:`ID`,width:80},{field:`label`,headerName:`Label`,flex:1},{field:`description`,headerName:`Description`,flex:2}],WR=({propertyTypeId:e,propertyTypeLabel:t})=>{let[n,r]=(0,G.useState)([]),[i,a]=(0,G.useState)(!1),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(``),[u,d]=(0,G.useState)(null),[f,p]=(0,G.useState)(!1),m=(0,G.useCallback)(async()=>{if(e==null){r([]);return}a(!0),s(null);try{r(await PR(e))}catch{s(`Failed to load values.`)}finally{a(!1)}},[e]);(0,G.useEffect)(()=>{d(null),m()},[e,m]);let h=(0,G.useMemo)(()=>{let e=c.trim().toLowerCase();return e?n.filter(t=>t.label.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)):n},[n,c]);return(0,W.jsxs)(pe,{sx:{flex:1,minWidth:320,p:1},spacing:1,children:[(0,W.jsxs)(ve,{variant:`subtitle1`,children:[`Values`,t?` - ${t}`:``]}),(0,W.jsxs)(pe,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,W.jsx)(If,{size:`small`,placeholder:`Search values`,value:c,onChange:e=>l(e.target.value),fullWidth:!0,disabled:e==null,slotProps:{input:{startAdornment:(0,W.jsx)(tc,{position:`start`,children:(0,W.jsx)(ip,{fontSize:`small`})})}}}),(0,W.jsx)(Yu,{title:`Add value`,children:(0,W.jsx)(`span`,{children:(0,W.jsx)(N,{size:`small`,onClick:()=>p(!0),disabled:e==null,children:(0,W.jsx)(np,{fontSize:`small`})})})}),(0,W.jsx)(Yu,{title:`Remove selected value`,children:(0,W.jsx)(`span`,{children:(0,W.jsx)(N,{size:`small`,onClick:async()=>{e!=null&&u!=null&&window.confirm(`Remove selected value?`)&&(await RR(u,e),d(null),await m())},disabled:u==null,children:(0,W.jsx)(rp,{fontSize:`small`})})})})]}),o&&(0,W.jsx)(ve,{color:`error`,variant:`body2`,children:o}),e==null?(0,W.jsx)(ve,{variant:`body2`,sx:{p:2},children:`Select a property type to view its values.`}):(0,W.jsx)(Ra,{sx:{flexGrow:1,minHeight:300},children:(0,W.jsx)(yR,{rows:h,columns:UR,loading:i,density:`compact`,rowSelectionModel:VR(u),onRowSelectionModelChange:e=>d(HR(e)),disableMultipleRowSelection:!0})}),(0,W.jsx)(F_,{open:f,title:`Add Value`,onClose:()=>p(!1),onSubmit:async({label:t,description:n})=>{e!=null&&(await NR(e,{id:0,label:t,description:n,propertyId:e}),await m())}})]})},GR=()=>{let[e,t]=(0,G.useState)(null),[n,r]=(0,G.useState)(null),[i,a]=(0,G.useState)(null),[o,s]=(0,G.useState)(null),c=(0,G.useCallback)((e,n)=>{t(e),r(n)},[]),l=(0,G.useCallback)((e,t)=>{a(e),s(t)},[]);return(0,W.jsxs)(Ra,{component:`section`,sx:{p:2,border:`1px dashed grey`},children:[(0,W.jsx)(ve,{variant:`body1`,gutterBottom:!0,children:`Property Type Management`}),(0,W.jsxs)(Ra,{sx:{display:`flex`,flexDirection:`row`,width:`100%`,minHeight:500,bgcolor:`#f5f5f5`},children:[(0,W.jsx)(V_,{selectedGroupId:e,onSelectedGroupChange:c}),(0,W.jsx)(jR,{groupId:e,groupLabel:n,selectedPropertyTypeId:i,onSelectedPropertyTypeChange:l}),(0,W.jsx)(WR,{propertyTypeId:i,propertyTypeLabel:o})]})]})},KR=T((0,W.jsx)(`path`,{d:`M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z`}),`Folder`),qR=T((0,W.jsx)(`path`,{d:`M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z`}),`Description`),JR=`http://localhost:8088`;async function YR(e){return(await A_.post(`${JR}/createProductGroup`,{json:e}).json()).data}async function XR(e){await A_.delete(`${JR}/deleteProductGroup/${e}`)}async function ZR(e){return(await A_.get(`${JR}/getProductGroupsByParentId/${e}`).json()).data??[]}async function QR(e){return(await A_.post(`${JR}/getPropertiesFromProductGroupId/${e}`).json()).data??[]}var $R=`http://localhost:8088`;async function ez(e){return(await A_.post(`${$R}/createProduct`,{json:e}).json()).data}async function tz(e){await A_.put(`${$R}/updateProduct`,{json:e})}async function nz(e){await A_.delete(`${$R}/deleteProduct/${e}`)}async function rz(e){return(await A_.get(`${$R}/getProduct/${e}`).json()).product}async function iz(e){return(await A_.get(`${$R}/getProductsByGroupId/${e}`).json()).products??[]}async function az(e,t){await A_.delete(`${$R}/deletePropertyFromProductId/${e}`,{json:{propertyId:t}})}async function oz(e){return(await A_.get(`${$R}/getPropertiesFromProductId/${e}`).json()).properties??[]}var sz=0,cz=`product-`;function lz(e){return`${cz}${e}`}function uz(e){return e.startsWith(cz)?Number(e.slice(8)):null}var dz=(0,G.forwardRef)(function(e,t){let{itemId:n,label:r,...i}=e,a=uz(n)!=null;return(0,W.jsx)(bh,{...i,ref:t,itemId:n,label:(0,W.jsxs)(pe,{direction:`row`,spacing:.75,sx:{alignItems:`center`},children:[a?(0,W.jsx)(qR,{fontSize:`small`,sx:{color:`primary.main`}}):(0,W.jsx)(KR,{fontSize:`small`}),(0,W.jsx)(ve,{variant:`body2`,sx:a?{color:`primary.main`}:void 0,children:r})]})})});async function fz(e){let[t,n]=await Promise.all([ZR(e),iz(e)]),r=await Promise.all(t.map(async e=>{let t=await fz(e.id);return{id:String(e.id),label:e.label,children:t.length>0?t:void 0}})),i=n.map(e=>({id:lz(e.id),label:e.externalId?`${e.label} (${e.externalId})`:e.label}));return[...r,...i]}function pz(e,t){let n=t.trim().toLowerCase();if(!n)return e;let r=e=>e.reduce((e,t)=>{let i=t.children?r(t.children):[],a=t.label.toLowerCase().includes(n);return(a||i.length>0)&&e.push({...t,children:a?t.children:i}),e},[]);return r(e)}function mz(e){return e.flatMap(e=>[e.id,...e.children?mz(e.children):[]])}function hz(e,t){for(let n of e){if(n.id===t)return n.label;let e=n.children?hz(n.children,t):null;if(e!=null)return e}return null}var gz=({selectedGroupId:e,onSelectedGroupChange:t,selectedProductId:n,onSelectedProductChange:r})=>{let[i,a]=(0,G.useState)([]),[o,s]=(0,G.useState)(!1),[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(``),[f,p]=(0,G.useState)([]),[m,h]=(0,G.useState)(!1),g=(0,G.useCallback)(async()=>{s(!0),l(null);try{a(await fz(sz))}catch{l(`Failed to load product groups.`)}finally{s(!1)}},[]);(0,G.useEffect)(()=>{g()},[g]);let _=(0,G.useMemo)(()=>pz(i,u),[i,u]);(0,G.useEffect)(()=>{u.trim()&&p(mz(_))},[u,_]);let v=n==null?e==null?null:String(e):lz(n);return(0,W.jsxs)(pe,{sx:{width:`33%`,minWidth:280,borderRight:`1px solid #e0e0e0`,p:1},spacing:1,children:[(0,W.jsx)(ve,{variant:`subtitle1`,children:`Product Groups`}),(0,W.jsxs)(pe,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,W.jsx)(If,{size:`small`,placeholder:`Search groups`,value:u,onChange:e=>d(e.target.value),fullWidth:!0,slotProps:{input:{startAdornment:(0,W.jsx)(tc,{position:`start`,children:(0,W.jsx)(ip,{fontSize:`small`})})}}}),(0,W.jsx)(Yu,{title:`Add group`,children:(0,W.jsx)(N,{size:`small`,onClick:()=>h(!0),children:(0,W.jsx)(np,{fontSize:`small`})})}),(0,W.jsx)(Yu,{title:`Remove selected group`,children:(0,W.jsx)(`span`,{children:(0,W.jsx)(N,{size:`small`,onClick:async()=>{e!=null&&window.confirm(`Remove selected product group?`)&&(await XR(e),t(null,null),await g())},disabled:e==null,children:(0,W.jsx)(rp,{fontSize:`small`})})})})]}),c&&(0,W.jsx)(ve,{color:`error`,variant:`body2`,children:c}),(0,W.jsx)(Ra,{sx:{flexGrow:1,overflowY:`auto`,minHeight:300},children:(0,W.jsx)(hg,{items:_,selectedItems:v,onSelectedItemsChange:(e,n)=>{let a=n==null?null:uz(n);if(a!=null){r(a,hz(i,n));return}r(null,null),t(n?Number(n):null,n?hz(i,n):null)},expandedItems:f,onExpandedItemsChange:(e,t)=>p(t),slots:{item:dz}})}),o&&(0,W.jsx)(ve,{variant:`body2`,children:`Loading...`}),(0,W.jsx)(F_,{open:m,title:`Add Product Group`,onClose:()=>h(!1),onSubmit:async({label:t,description:n})=>{await YR({id:0,label:t,description:n,parentGroupId:e??sz}),await g()}})]})},_z=({open:e,onClose:t,onSubmit:n})=>{let[r,i]=(0,G.useState)(``),[a,o]=(0,G.useState)(``),[s,c]=(0,G.useState)(``),[l,u]=(0,G.useState)(!1);return(0,G.useEffect)(()=>{e&&(i(``),o(``),c(``))},[e]),(0,W.jsxs)(Zo,{open:e,onClose:t,fullWidth:!0,maxWidth:`xs`,children:[(0,W.jsx)(us,{children:`Add Product`}),(0,W.jsx)(ss,{children:(0,W.jsxs)(pe,{spacing:2,sx:{mt:1},children:[(0,W.jsx)(If,{label:`Label`,value:r,onChange:e=>i(e.target.value),autoFocus:!0,required:!0,fullWidth:!0}),(0,W.jsx)(If,{label:`External ID`,value:a,onChange:e=>o(e.target.value),fullWidth:!0}),(0,W.jsx)(If,{label:`Description`,value:s,onChange:e=>c(e.target.value),fullWidth:!0,multiline:!0,minRows:2})]})}),(0,W.jsxs)(ts,{children:[(0,W.jsx)(Xa,{onClick:t,disabled:l,children:`Cancel`}),(0,W.jsx)(Xa,{onClick:async()=>{if(r.trim()){u(!0);try{await n({label:r.trim(),externalId:a.trim(),description:s.trim()}),t()}finally{u(!1)}}},variant:`contained`,disabled:l||!r.trim(),children:`Add`})]})]})},vz={type:`include`,ids:new Set};function yz(e){return e==null?vz:{type:`include`,ids:new Set([e])}}function bz(e){let[t]=Array.from(e.ids);return t==null?null:Number(t)}var xz=e=>`propertyType_${e}`;async function Sz(e){let[t,n]=await Promise.all([QR(e),iz(e)]),r=Array.from(new Set(t.filter(e=>!e.productId).map(e=>e.propertyTypeId))),i=await Promise.all(r.map(async e=>({propertyTypeId:e,label:(await TR(e)).label})));return{rows:await Promise.all(n.map(async e=>{let n={id:e.id,externalId:e.externalId,label:e.label,description:e.description},r=t.filter(t=>t.productId===e.id);return await Promise.all(r.map(async e=>{let t=await FR(e.id);n[xz(e.propertyTypeId)]=t.map(e=>e.label).join(`,`)})),n})),propertyTypeColumns:i}}var Cz=({groupId:e,groupLabel:t})=>{let[n,r]=(0,G.useState)([]),[i,a]=(0,G.useState)([]),[o,s]=(0,G.useState)(!1),[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(``),[f,p]=(0,G.useState)(null),[m,h]=(0,G.useState)(!1),g=(0,G.useCallback)(async()=>{if(e==null){r([]),a([]);return}s(!0),l(null);try{let{rows:t,propertyTypeColumns:n}=await Sz(e);r(t),a(n)}catch{l(`Failed to load products.`)}finally{s(!1)}},[e]);(0,G.useEffect)(()=>{p(null),g()},[e,g]);let _=(0,G.useMemo)(()=>[{field:`id`,headerName:`ID`,width:80},{field:`externalId`,headerName:`External ID`,width:140},{field:`label`,headerName:`Label`,flex:1},{field:`description`,headerName:`Description`,flex:1},...i.map(e=>({field:xz(e.propertyTypeId),headerName:e.label,flex:1}))],[i]),v=(0,G.useMemo)(()=>{let e=u.trim().toLowerCase();return e?n.filter(t=>t.label.toLowerCase().includes(e)||t.externalId.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)):n},[n,u]);return(0,W.jsxs)(pe,{sx:{flex:1,minWidth:320,p:1},spacing:1,children:[(0,W.jsxs)(ve,{variant:`subtitle1`,children:[`Products`,t?` - ${t}`:``]}),(0,W.jsxs)(pe,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,W.jsx)(If,{size:`small`,placeholder:`Search products`,value:u,onChange:e=>d(e.target.value),fullWidth:!0,disabled:e==null,slotProps:{input:{startAdornment:(0,W.jsx)(tc,{position:`start`,children:(0,W.jsx)(ip,{fontSize:`small`})})}}}),(0,W.jsx)(Yu,{title:`Add product`,children:(0,W.jsx)(`span`,{children:(0,W.jsx)(N,{size:`small`,onClick:()=>h(!0),disabled:e==null,children:(0,W.jsx)(np,{fontSize:`small`})})})}),(0,W.jsx)(Yu,{title:`Remove selected product`,children:(0,W.jsx)(`span`,{children:(0,W.jsx)(N,{size:`small`,onClick:async()=>{f!=null&&window.confirm(`Remove selected product?`)&&(await nz(f),p(null),await g())},disabled:f==null,children:(0,W.jsx)(rp,{fontSize:`small`})})})})]}),c&&(0,W.jsx)(ve,{color:`error`,variant:`body2`,children:c}),e==null?(0,W.jsx)(ve,{variant:`body2`,sx:{p:2},children:`Select a product group to view its products.`}):(0,W.jsx)(Ra,{sx:{flexGrow:1,minHeight:300},children:(0,W.jsx)(yR,{rows:v,columns:_,loading:o,density:`compact`,rowSelectionModel:yz(f),onRowSelectionModelChange:e=>p(bz(e)),disableMultipleRowSelection:!0})}),(0,W.jsx)(_z,{open:m,onClose:()=>h(!1),onSubmit:async({label:t,externalId:n,description:r})=>{e!=null&&(await ez({id:0,label:t,externalId:n,description:r,productGroupId:e}),await g())}})]})};async function wz(e){let t=await oz(e);return Promise.all(t.map(async e=>({propertyId:e.id,propertyTypeId:e.propertyTypeId,label:e.label,description:e.description,values:await FR(e.id)})))}async function Tz(e,t){return(await QR(e)).filter(e=>!e.productId&&!t.has(e.propertyTypeId)).map(e=>({propertyTypeId:e.propertyTypeId,label:e.label}))}async function Ez(e){let t=await Promise.all(e.map(async e=>[e.propertyId,await PR(e.propertyTypeId)]));return Object.fromEntries(t)}var Dz=({value:e,onSave:t,onDelete:n})=>{let[r,i]=(0,G.useState)(!1),[a,o]=(0,G.useState)(e.label);(0,G.useEffect)(()=>{o(e.label)},[e.label]);let s=async()=>{i(!1),a.trim()&&a!==e.label?await t(a.trim()):o(e.label)};return r?(0,W.jsx)(If,{size:`small`,autoFocus:!0,value:a,onChange:e=>o(e.target.value),onBlur:s,onKeyDown:t=>{t.key===`Enter`&&s(),t.key===`Escape`&&(o(e.label),i(!1))},sx:{width:140}}):(0,W.jsx)(ta,{label:e.label,size:`small`,onClick:()=>i(!0),onDelete:n,deleteIcon:(0,W.jsx)(rp,{fontSize:`small`})})},Oz=({productId:e,onProductChanged:t})=>{let[n,r]=(0,G.useState)(null),[i,a]=(0,G.useState)([]),[o,s]=(0,G.useState)([]),[c,l]=(0,G.useState)({}),[u,d]=(0,G.useState)(!1),[f,p]=(0,G.useState)(null),[m,h]=(0,G.useState)(``),[g,_]=(0,G.useState)(``),[v,y]=(0,G.useState)(``),[b,x]=(0,G.useState)(!1),[S,C]=(0,G.useState)(``),[w,T]=(0,G.useState)(``),E=(0,G.useCallback)(async()=>{d(!0),p(null);try{let t=await rz(e);r(t),h(t.label),_(t.externalId),y(t.description);let n=await wz(e);a(n),l(await Ez(n));let i=new Set(n.map(e=>e.propertyTypeId));s(await Tz(t.productGroupId,i))}catch{p(`Failed to load product.`)}finally{d(!1)}},[e]);(0,G.useEffect)(()=>{E()},[E]);let D=(0,G.useMemo)(()=>n?m!==n.label||g!==n.externalId||v!==n.description:!1,[n,m,g,v]),O=async()=>{!n||!m.trim()||(await tz({...n,label:m.trim(),externalId:g.trim(),description:v.trim()}),await E(),t?.())},k=()=>{C(``),T(``),x(!0)},A=async()=>{S===``||!w.trim()||(await zR(e,S,w.trim()),x(!1),await E())},j=async t=>{window.confirm(`Remove selected property?`)&&(await az(e,t),await E())},M=async(e,t)=>{await LR({...e,label:t}),await E()},P=async e=>{await RR(e.id,e.propertyId),await E()},ee=async(e,t)=>{let n=c[e.propertyId]??[],r=e.values.map(e=>e.label),i=t.filter(e=>!r.includes(e)),a=e.values.filter(e=>!t.includes(e.label));p(null);try{await Promise.all([...i.map(t=>{let r=n.find(e=>e.label===t);return IR(e.propertyId,{id:0,label:t,description:r?.description??``,propertyId:e.propertyId})}),...a.map(t=>RR(t.id,e.propertyId))]),await E()}catch{p(`Failed to update values for this property.`)}};return u&&!n?(0,W.jsx)(pe,{sx:{flex:1,minWidth:320,p:2},children:(0,W.jsx)(ve,{variant:`body2`,children:`Loading...`})}):n?(0,W.jsxs)(pe,{sx:{flex:1,minWidth:320,p:1},spacing:2,children:[(0,W.jsx)(ve,{variant:`subtitle1`,children:`Product Details`}),f&&(0,W.jsx)(ve,{color:`error`,variant:`body2`,children:f}),(0,W.jsxs)(pe,{spacing:1.5,sx:{maxWidth:480},children:[(0,W.jsx)(If,{label:`ID`,value:n.id,size:`small`,disabled:!0,fullWidth:!0}),(0,W.jsx)(If,{label:`External ID`,value:g,size:`small`,fullWidth:!0,onChange:e=>_(e.target.value)}),(0,W.jsx)(If,{label:`Label`,value:m,size:`small`,fullWidth:!0,onChange:e=>h(e.target.value)}),(0,W.jsx)(If,{label:`Description`,value:v,size:`small`,fullWidth:!0,multiline:!0,minRows:2,onChange:e=>y(e.target.value)}),(0,W.jsx)(Ra,{children:(0,W.jsx)(Xa,{variant:`contained`,size:`small`,disabled:!D||!m.trim(),onClick:O,children:`Save`})})]}),(0,W.jsxs)(pe,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,W.jsx)(ve,{variant:`subtitle2`,sx:{flexGrow:1},children:`Properties`}),(0,W.jsx)(Yu,{title:`Add property`,children:(0,W.jsx)(`span`,{children:(0,W.jsx)(N,{size:`small`,onClick:k,disabled:o.length===0,children:(0,W.jsx)(np,{fontSize:`small`})})})})]}),(0,W.jsx)(Ad,{component:de,variant:`outlined`,children:(0,W.jsxs)(md,{size:`small`,children:[(0,W.jsx)(Id,{children:(0,W.jsxs)(ff,{children:[(0,W.jsx)(Ed,{children:`Property`}),(0,W.jsx)(Ed,{children:`Description`}),(0,W.jsx)(Ed,{children:`Values`}),(0,W.jsx)(Ed,{align:`right`,children:`Actions`})]})}),(0,W.jsxs)(xd,{children:[i.map(e=>(0,W.jsxs)(ff,{children:[(0,W.jsx)(Ed,{children:e.label}),(0,W.jsx)(Ed,{children:e.description}),(0,W.jsxs)(Ed,{children:[(0,W.jsx)(pe,{direction:`row`,spacing:.5,sx:{flexWrap:`wrap`,alignItems:`center`,gap:.5},children:e.values.map(e=>(0,W.jsx)(Dz,{value:e,onSave:t=>M(e,t),onDelete:()=>P(e)},e.id))}),(0,W.jsxs)(Es,{size:`small`,sx:{mt:.5,minWidth:180},children:[(0,W.jsx)(ic,{id:`values-select-label-${e.propertyId}`,children:`Select values`}),(0,W.jsx)(ku,{labelId:`values-select-label-${e.propertyId}`,label:`Select values`,multiple:!0,value:e.values.map(e=>e.label),onChange:t=>ee(e,typeof t.target.value==`string`?t.target.value.split(`,`):t.target.value),renderValue:e=>e.join(`, `),disabled:(c[e.propertyId]??[]).length===0,children:(c[e.propertyId]??[]).map(t=>(0,W.jsxs)(Bl,{value:t.label,children:[(0,W.jsx)(uo,{checked:e.values.some(e=>e.label===t.label)}),(0,W.jsx)(Fc,{primary:t.label})]},t.id))})]})]}),(0,W.jsx)(Ed,{align:`right`,children:(0,W.jsx)(Yu,{title:`Remove property`,children:(0,W.jsx)(N,{size:`small`,onClick:()=>j(e.propertyId),children:(0,W.jsx)(rp,{fontSize:`small`})})})})]},e.propertyId)),i.length===0&&(0,W.jsx)(ff,{children:(0,W.jsx)(Ed,{colSpan:4,children:(0,W.jsx)(ve,{variant:`body2`,children:`No properties assigned to this product yet.`})})})]})]})}),(0,W.jsxs)(Zo,{open:b,onClose:()=>x(!1),fullWidth:!0,maxWidth:`xs`,children:[(0,W.jsx)(us,{children:`Add Property`}),(0,W.jsx)(ss,{children:(0,W.jsxs)(pe,{spacing:2,sx:{mt:1},children:[(0,W.jsxs)(Es,{size:`small`,fullWidth:!0,children:[(0,W.jsx)(ic,{id:`property-type-select-label`,children:`Property`}),(0,W.jsx)(ku,{labelId:`property-type-select-label`,label:`Property`,value:S,onChange:e=>C(e.target.value===``?``:Number(e.target.value)),children:o.map(e=>(0,W.jsx)(Bl,{value:e.propertyTypeId,children:e.label},e.propertyTypeId))})]}),(0,W.jsx)(If,{label:`Initial value`,value:w,onChange:e=>T(e.target.value),autoFocus:!0,fullWidth:!0})]})}),(0,W.jsxs)(ts,{children:[(0,W.jsx)(Xa,{onClick:()=>x(!1),children:`Cancel`}),(0,W.jsx)(Xa,{variant:`contained`,onClick:A,disabled:S===``||!w.trim(),children:`Add`})]})]})]}):(0,W.jsx)(pe,{sx:{flex:1,minWidth:320,p:2},children:f&&(0,W.jsx)(ve,{color:`error`,children:f})})},kz=()=>{let[e,t]=(0,G.useState)(null),[n,r]=(0,G.useState)(null),[i,a]=(0,G.useState)(null),o=(0,G.useCallback)((e,n)=>{t(e),r(n)},[]),s=(0,G.useCallback)(e=>{a(e)},[]);return(0,W.jsxs)(Ra,{component:`section`,sx:{p:2,border:`1px dashed grey`},children:[(0,W.jsx)(ve,{variant:`body1`,gutterBottom:!0,children:`Product Management`}),(0,W.jsxs)(Ra,{sx:{display:`flex`,flexDirection:`row`,width:`100%`,minHeight:500,bgcolor:`#f5f5f5`},children:[(0,W.jsx)(gz,{selectedGroupId:e,onSelectedGroupChange:o,selectedProductId:i,onSelectedProductChange:s}),i==null?(0,W.jsx)(Cz,{groupId:e,groupLabel:n}):(0,W.jsx)(Oz,{productId:i})]})]})},Az=()=>{let[e,t]=G.useState(`1`);return(0,W.jsx)(Ra,{sx:{width:`97%`,margin:2,padding:2,border:1,borderColor:`#1976D2`},children:(0,W.jsxs)(qf,{value:e,children:[(0,W.jsxs)(Zf,{onChange:(e,n)=>{t(n)},"aria-label":`Navigation Tab for different editors`,children:[(0,W.jsx)(cd,{value:`1`,label:`Properties`}),(0,W.jsx)(cd,{value:`2`,label:`Products`}),(0,W.jsx)(cd,{value:`3`,label:`Translations`}),(0,W.jsx)(cd,{value:`4`,label:`Pricing`}),(0,W.jsx)(cd,{value:`5`,label:`Calculations`})]}),(0,W.jsx)(tp,{value:`1`,children:(0,W.jsx)(GR,{})}),(0,W.jsx)(tp,{value:`2`,children:(0,W.jsx)(kz,{})}),(0,W.jsx)(tp,{value:`3`,children:`Item Three`}),(0,W.jsx)(tp,{value:`4`,children:`Item Three`}),(0,W.jsx)(tp,{value:`5`,children:`Item Three`})]})})};export{Az as default}; \ No newline at end of file diff --git a/buildtime/client/material-editor/dist/assets/Layout-BA32MBe8.js b/buildtime/client/material-editor/dist/assets/Layout-BA32MBe8.js new file mode 100644 index 000000000..d79640ef4 --- /dev/null +++ b/buildtime/client/material-editor/dist/assets/Layout-BA32MBe8.js @@ -0,0 +1 @@ +import{i as e,n as t,t as n}from"./jsx-runtime-DIhQqKhG.js";import{n as r,t as i}from"./index-CvD27sEa.js";import{F as a,I as o,K as s,N as c,P as l,T as u,a as d,c as f,et as p,h as m,m as h,n as g,nt as _,r as v,t as y,tt as b}from"./Toolbar-Ds5JbX8Q.js";function x(e){return b(`MuiAppBar`,e)}p(`MuiAppBar`,[`root`,`positionFixed`,`positionAbsolute`,`positionSticky`,`positionStatic`,`positionRelative`,`colorDefault`,`colorPrimary`,`colorSecondary`,`colorInherit`,`colorTransparent`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`]);var S=e(t(),1),C=n(),w=e=>{let{color:t,position:n,classes:r}=e,i={root:[`root`,`color${c(t)}`,`position${c(n)}`]};return s(i,x,r)},T=(e,t)=>e?`${e.replace(`)`,``)}, ${t})`:t,E=o(h,{name:`MuiAppBar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${c(n.position)}`],t[`color${c(n.color)}`]]}})(a(({theme:e})=>({display:`flex`,flexDirection:`column`,width:`100%`,boxSizing:`border-box`,flexShrink:0,variants:[{props:{position:`fixed`},style:{position:`fixed`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0,"@media print":{position:`absolute`}}},{props:{position:`absolute`},style:{position:`absolute`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`sticky`},style:{position:`sticky`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`static`},style:{position:`static`}},{props:{position:`relative`},style:{position:`relative`}},{props:{color:`inherit`},style:{"--AppBar-color":`inherit`,color:`var(--AppBar-color)`}},{props:{color:`default`},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles(`dark`,{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(f([`contrastText`])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:e=>e.enableColorOnDark===!0&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`}},{props:e=>e.enableColorOnDark===!1&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundColor:e.vars?T(e.vars.palette.AppBar.darkBg,`var(--AppBar-background)`):null,color:e.vars?T(e.vars.palette.AppBar.darkColor,`var(--AppBar-color)`):null})}},{props:{color:`transparent`},style:{"--AppBar-background":`transparent`,"--AppBar-color":`inherit`,backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundImage:`none`})}}]}))),D=S.forwardRef(function(e,t){let n=l({props:e,name:`MuiAppBar`}),{className:r,color:i=`primary`,enableColorOnDark:a=!1,position:o=`fixed`,...s}=n,c={...n,color:i,position:o,enableColorOnDark:a},u=w(c);return(0,C.jsx)(E,{square:!0,component:`header`,ownerState:c,elevation:4,className:_(u.root,r,o===`fixed`&&`mui-fixed`),ref:t,...s})}),O=u((0,C.jsx)(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`}),`Person`);function k(e){return b(`MuiAvatar`,e)}p(`MuiAvatar`,[`root`,`colorDefault`,`circular`,`rounded`,`square`,`img`,`fallback`]);var A=e=>{let{classes:t,variant:n,colorDefault:r}=e;return s({root:[`root`,n,r&&`colorDefault`],img:[`img`],fallback:[`fallback`]},k,t)},j=o(`div`,{name:`MuiAvatar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(a(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:`50%`,overflow:`hidden`,userSelect:`none`,variants:[{props:{variant:`rounded`},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:`square`},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,"@media (forced-colors: active)":{boxSizing:`border-box`,border:`1px solid ButtonBorder`},...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles(`dark`,{backgroundColor:e.palette.grey[600]})}}}]}))),M=o(`img`,{name:`MuiAvatar`,slot:`Img`})({width:`100%`,height:`100%`,textAlign:`center`,objectFit:`cover`,color:`transparent`,textIndent:1e4}),N=o(O,{name:`MuiAvatar`,slot:`Fallback`})({width:`75%`,height:`75%`});function P(e,t,n,r){let[i,a]=S.useState(!1);return S.useEffect(()=>{if(!e&&!t)return;a(!1);let i=!0,o=new Image;return o.onload=()=>{i&&a(`loaded`)},o.onerror=()=>{i&&a(`error`)},o.crossOrigin=n,o.referrerPolicy=r,o.src=e,t&&(o.srcset=t),()=>{i=!1}},[n,r,e,t]),i}var F=S.forwardRef(function(e,t){let n=l({props:e,name:`MuiAvatar`}),{alt:r,children:i,className:a,component:o=`div`,slots:s={},slotProps:c={},sizes:u,src:d,srcSet:f,variant:p=`circular`,...h}=n,g=null,v={...n,component:o,variant:p},{crossOrigin:y,referrerPolicy:b}=(typeof c.img==`function`?c.img(v):c.img)??{},x=P(d,f,y,b),S=d||f,w=S&&x!==`error`;v.colorDefault=!w,delete v.ownerState;let T=A(v),E={slots:s,slotProps:c},[D,O]=m(`root`,{ref:t,className:_(T.root,a),elementType:j,externalForwardedProps:{...E,component:o,...h},ownerState:v}),[k,F]=m(`img`,{className:T.img,elementType:M,externalForwardedProps:E,additionalProps:{alt:r,src:d,srcSet:f,sizes:u},ownerState:v}),[I,L]=m(`fallback`,{className:T.fallback,elementType:N,externalForwardedProps:E,shouldForwardComponentProp:!0,ownerState:v});return g=w?(0,C.jsx)(k,{...F}):i||i===0?i:S&&r?r[0]:(0,C.jsx)(I,{...L}),(0,C.jsx)(D,{...O,children:g})}),I=`/assets/SimplyCPQ_Logo-CyAEjPYv.svg`;function L(e){let t=0,n;for(n=0;n>n*11&255;r+=`00${e.toString(16)}`.slice(-2)}return r}function R(e){return{sx:{bgcolor:L(e)},children:`${e.split(` `)[0][0]}${e.split(` `)[1][0]}`}}function z(){return(0,C.jsx)(D,{position:`static`,children:(0,C.jsxs)(y,{variant:`dense`,children:[(0,C.jsx)(d,{edge:`start`,color:`inherit`,"aria-label":`SimplyCPQ Logo`,children:(0,C.jsx)(`img`,{src:I,alt:`SimplyCPQ Logo`,style:{width:`28px`,height:`28px`}})}),(0,C.jsx)(v,{variant:`h6`,component:`div`,sx:{flexGrow:1},children:`Simply CPQ Material Editor`}),(0,C.jsxs)(g,{direction:`row`,spacing:2,children:[(0,C.jsxs)(v,{variant:`body1`,children:[`logged in: `,i.tokenParsed?.name]}),(0,C.jsx)(F,{...R(i.tokenParsed?.name),sx:{width:22,height:22,bgcolor:`#d27519`}})]})]})})}function B(){return(0,C.jsx)(D,{position:`static`,children:(0,C.jsx)(y,{variant:`dense`,children:(0,C.jsx)(v,{variant:`body2`,component:`div`,sx:{flexGrow:1},children:`Simply CPQ Material Editor (c) 2026 Dr. Thomas Sindt`})})})}function V(){return(0,C.jsxs)(`div`,{children:[(0,C.jsx)(z,{}),(0,C.jsx)(`main`,{children:(0,C.jsx)(r,{})}),(0,C.jsx)(B,{})]})}export{V as default}; \ No newline at end of file diff --git a/buildtime/client/material-editor/dist/assets/NotFoundPage-BSeqrAsK.js b/buildtime/client/material-editor/dist/assets/NotFoundPage-BSeqrAsK.js new file mode 100644 index 000000000..b66e45176 --- /dev/null +++ b/buildtime/client/material-editor/dist/assets/NotFoundPage-BSeqrAsK.js @@ -0,0 +1 @@ +import{n as e,t}from"./jsx-runtime-DIhQqKhG.js";e();var n=t(),r=()=>(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`h1`,{children:`Page Not Found`}),(0,n.jsx)(`p`,{children:`The page you are looking for does not exist.`})]});export{r as default}; \ No newline at end of file diff --git a/buildtime/client/material-editor/dist/assets/SimplyCPQ_Logo-CyAEjPYv.svg b/buildtime/client/material-editor/dist/assets/SimplyCPQ_Logo-CyAEjPYv.svg new file mode 100644 index 000000000..3088fe1da --- /dev/null +++ b/buildtime/client/material-editor/dist/assets/SimplyCPQ_Logo-CyAEjPYv.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/buildtime/client/material-editor/dist/assets/Toolbar-Ds5JbX8Q.js b/buildtime/client/material-editor/dist/assets/Toolbar-Ds5JbX8Q.js new file mode 100644 index 000000000..d24bdca6e --- /dev/null +++ b/buildtime/client/material-editor/dist/assets/Toolbar-Ds5JbX8Q.js @@ -0,0 +1,133 @@ +import{i as e,n as t,r as n,t as r}from"./jsx-runtime-DIhQqKhG.js";var i=e(t()),a=r(),o={black:`#000`,white:`#fff`},s={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},c={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},l={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},u={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},d={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`},f={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},p={50:`#fafafa`,100:`#f5f5f5`,200:`#eeeeee`,300:`#e0e0e0`,400:`#bdbdbd`,500:`#9e9e9e`,600:`#757575`,700:`#616161`,800:`#424242`,900:`#212121`,A100:`#f5f5f5`,A200:`#eeeeee`,A400:`#bdbdbd`,A700:`#616161`};function m(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var h=`$$material`;function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?T(_e,--k):0,O--,A===10&&(O=1,he--),A}function j(){return A=k2||we(A)>3?``:` `}function ke(e,t){for(;--t&&j()&&!(A<48||A>102||A>57&&A<65||A>70&&A<97););return Ce(e,Se()+(t<6&&M()==32&&j()==32))}function Ae(e){for(;j();)switch(A){case e:return k;case 34:case 39:e!==34&&e!==39&&Ae(A);break;case 40:e===41&&Ae(e);break;case 92:j();break}return k}function je(e,t){for(;j()&&e+A!==57&&(e+A!==84||M()!==47););return`/*`+Ce(t,k-1)+`*`+oe(e===47?e:j())}function Me(e){for(;!we(M());)j();return Ce(e,k)}function Ne(e){return Ee(Pe(``,null,null,null,[``],e=Te(e),0,[0],e))}function Pe(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=j()){case 40:if(m!=108&&T(C,d-1)==58){de(C+=w(De(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=De(v);break;case 9:case 10:case 13:case 32:C+=Oe(m);break;case 92:C+=ke(Se()-1,7);continue;case 47:switch(M()){case 42:case 47:D(Ie(je(j(),Se()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=E(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=w(C,/\f/g,``)),p>0&&E(C)-d&&D(p>32?Le(C+`;`,r,n,d-1):Le(w(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(D(S=Fe(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123){if(u===0)Pe(C,t,S,S,b,a,d,s,x);else switch(f===99&&T(C,3)===110?100:f){case 100:case 108:case 109:case 115:Pe(e,S,S,r&&D(Fe(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:Pe(C,S,S,S,[``],x,0,s,x)}}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+E(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&xe()==125)continue}switch(C+=oe(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(E(C)-1)*_,_=1;break;case 64:M()===45&&(C+=De(j())),f=M(),u=d=E(y=C+=Me(Se())),v++;break;case 45:m===45&&E(C)==2&&(h=0)}}return a}function Fe(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=pe(f),m=0,h=0,g=0;m0?f[_]+` `+v:w(v,/&\f/g,f[_])))&&(c[g++]=y);return ve(e,t,n,i===0?ee:s,c,l,u)}function Ie(e,t,n){return ve(e,t,n,C,oe(be()),fe(e,2,-2),0)}function Le(e,t,n,r){return ve(e,t,n,te,fe(e,0,r),fe(e,r+1,-1),r)}function Re(e,t){for(var n=``,r=pe(e),i=0;i6)switch(T(e,t+1)){case 109:if(T(e,t+4)!==45)break;case 102:return w(e,/(.+:)(.+)-([^]+)/,`$1`+S+`$2-$3$1`+x+(T(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~de(e,`stretch`)?Ye(w(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(T(e,t+1)!==115)break;case 6444:switch(T(e,E(e)-3-(~de(e,`!important`)&&10))){case 107:return w(e,`:`,`:`+S)+e;case 101:return w(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+S+(T(e,14)===45?`inline-`:``)+`box$3$1`+S+`$2$3$1`+b+`$2box$3`)+e}break;case 5936:switch(T(e,t+11)){case 114:return S+e+b+w(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return S+e+b+w(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return S+e+b+w(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return S+e+b+e+e}return e}var Xe=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case te:e.return=Ye(e.value,e.length);break;case re:return Re([ye(e,{value:w(e.value,`@`,`@`+S)})],r);case ee:if(e.length)return me(e.props,function(t){switch(ue(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return Re([ye(e,{props:[w(t,/:(read-\w+)/,`:`+x+`$1`)]})],r);case`::placeholder`:return Re([ye(e,{props:[w(t,/:(plac\w+)/,`:`+S+`input-$1`)]}),ye(e,{props:[w(t,/:(plac\w+)/,`:`+x+`$1`)]}),ye(e,{props:[w(t,/:(plac\w+)/,b+`input-$1`)]})],r)}return``})}}],Ze=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||Xe,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),$e=n(((e,t)=>{t.exports=Qe()})),et=n(((e,t)=>{var n=$e(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var at={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ot=/[A-Z]|^ms/g,st=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ct=function(e){return e.charCodeAt(1)===45},lt=function(e){return e!=null&&typeof e!=`boolean`},ut=He(function(e){return ct(e)?e:e.replace(ot,`-$&`).toLowerCase()}),dt=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(st,function(e,t,n){return ht={name:t,styles:n,next:ht},t})}return at[e]!==1&&!ct(e)&&typeof t==`number`&&t!==0?t+`px`:t};function ft(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return ht={name:i.name,styles:i.styles,next:ht},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)ht={name:o.name,styles:o.styles,next:ht},o=o.next;return a.styles+`;`}return pt(e,t,n);case`function`:if(e!==void 0){var s=ht,c=n(e);return ht=s,ft(e,t,c)}}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function pt(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i96?Pt:Ft},Lt=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},Rt=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return nt(t,n,r),yt(function(){return rt(t,n,r)}),null},zt=function e(t,n){var r=t.__emotion_real===t,a=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var c=Lt(t,n,r),l=c||It(a),u=!l(`as`);return function(){var d=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&f.push(`label:`+o+`;`),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var m=d.length,h=1;h{var t=Symbol.for(`react.fragment`),n=Symbol.for(`react.strict_mode`),r=Symbol.for(`react.profiler`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.suspense`),c=Symbol.for(`react.suspense_list`),l=Symbol.for(`react.memo`),u=Symbol.for(`react.lazy`),d=Symbol.for(`react.client.reference`);e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===t||e===r||e===n||e===s||e===c||typeof e==`object`&&e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===a||e.$$typeof===i||e.$$typeof===o||e.$$typeof===d||e.getModuleId!==void 0))}})),qt=n(((e,t)=>{t.exports=Kt()}))();function Jt(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 Yt(e){if(i.isValidElement(e)||(0,qt.isValidElementType)(e)||!Jt(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=Yt(e[n])}),t}function N(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return Jt(e)&&Jt(t)&&Object.keys(t).forEach(a=>{i.isValidElement(t[a])||(0,qt.isValidElementType)(t[a])?r[a]=t[a]:Jt(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Jt(e[a])?r[a]=N(e[a],t[a],n):n.clone?r[a]=Jt(t[a])?Yt(t[a]):t[a]:r[a]=t[a]}),r}var Xt=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function Zt(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=Xt(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1(e.match(Qt)?.[1]||0)-+(t.match(Qt)?.[1]||0));let r=t;for(let e=0;et.startsWith(`@${e}`))||!!t.match(/^@\d/))}function nn(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function rn(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var an={borderRadius:4};function on(e){if(e==null)return!0;for(let t in e)return!1;return!0}function sn(e,t){let n=Array.isArray(t),r=Array.isArray(e);return fn(t)?t:pn(e)?mn(t):n&&r?un(e,t):n===r?hn(e,t):mn(t)}function cn(e){let t=0,n=e.length,r=Array(n);for(t=0;t({up:t=>{let n=typeof t==`number`?t:_n[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function bn(e,t,n){let r={};return xn(r,e.theme,t,(e,t,i)=>{let a=n(t,i);e?r[e]=a:sn(r,a)})}function xn(e,t,n,r){if(t??=gn,Array.isArray(n)){let i=t.breakpoints??vn;for(let t=0;tN(e,t),{}))}function En(e,t){if(typeof e!=`object`)return{};let n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r{e[t]!=null&&(n[t]=!0)}),n}function Dn(e){let{values:t,breakpoints:n,base:r}=e,i=r||En(t,n),a=Object.keys(i);if(a.length===0)return t;let o;return a.reduce((e,n,r)=>{if(Array.isArray(t))e[n]=t[r]==null?t[o]:t[r],o=r;else if(typeof t==`object`&&t){let r=t;e[n]=r[n]==null?r[o]:r[n],o=n}else e[n]=t;return e},{})}function On(e,t){if(Array.isArray(t))return!0;if(typeof t==`object`&&t){for(let n=0;n{if(e[t]==null)return null;let a=e[t],o=e.theme,s=jn(o,r)||{};return bn(e,a,e=>{let r=An(s,i,e,t);return n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}var Nn={internal_cache:{}},Pn={m:`margin`,p:`padding`},Fn={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},In={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},Ln={};for(let e in Pn)Ln[e]=[Pn[e]];for(let e in Pn)for(let t in Fn){let n=Pn[e],r=Fn[t],i=Array.isArray(r)?r.map(e=>n+e):[n+r];Ln[e+t]=i}for(let e in In)Ln[e]=Ln[In[e]];var Rn=new Set([`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`]),zn=new Set([`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`]);[...Rn,...zn];function Bn(e,t,n,r){let i=jn(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if(typeof e==`string`)return e;let t=i[Math.abs(e)];return e>=0?t:typeof t==`number`?-t:typeof t==`string`&&t.startsWith(`var(`)?`calc(-1 * ${t})`:`-${t}`}:typeof i==`function`?i:()=>void 0}function Vn(e){return Bn(e,`spacing`,8,`spacing`)}function Hn(e,t){return typeof t==`string`||t==null?t:e(t)}var Un=[``];function Wn(e,t){let n=e.theme??Nn,r=n?.internal_cache?.unarySpacing??Vn(n),i={};for(let n in e){if(!t.has(n))continue;let a=Ln[n]??(Un[0]=n,Un),o=e[n];xn(i,e.theme,o,(e,t)=>{let n=e?i[e]:i;for(let e=0;e(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `);return n.mui=!0,n}function Jn(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>{let n={};for(let r in e)t[r]&&sn(n,t[r](e));return n};return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function L(e){return typeof e==`number`?`${e}px solid`:e}function R(e,t){return P({prop:e,themeKey:`borders`,transform:t})}var Yn=R(`border`,L),Xn=R(`borderTop`,L),Zn=R(`borderRight`,L),Qn=R(`borderBottom`,L),$n=R(`borderLeft`,L),er=R(`borderColor`),tr=R(`borderTopColor`),nr=R(`borderRightColor`),rr=R(`borderBottomColor`),ir=R(`borderLeftColor`),ar=R(`outline`,L),or=R(`outlineColor`),sr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=Bn(e.theme,`shape.borderRadius`,4,`borderRadius`);return bn(e,e.borderRadius,e=>({borderRadius:Hn(t,e)}))}return null};sr.propTypes={},sr.filterProps=[`borderRadius`],Jn(Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,sr,ar,or);var cr=e=>{if(e.gap!==void 0&&e.gap!==null){let t=Bn(e.theme,`spacing`,8,`gap`);return bn(e,e.gap,e=>({gap:Hn(t,e)}))}return null};cr.propTypes={},cr.filterProps=[`gap`];var lr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=Bn(e.theme,`spacing`,8,`columnGap`);return bn(e,e.columnGap,e=>({columnGap:Hn(t,e)}))}return null};lr.propTypes={},lr.filterProps=[`columnGap`];var ur=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=Bn(e.theme,`spacing`,8,`rowGap`);return bn(e,e.rowGap,e=>({rowGap:Hn(t,e)}))}return null};ur.propTypes={},ur.filterProps=[`rowGap`],Jn(cr,lr,ur,P({prop:`gridColumn`}),P({prop:`gridRow`}),P({prop:`gridAutoFlow`}),P({prop:`gridAutoColumns`}),P({prop:`gridAutoRows`}),P({prop:`gridTemplateColumns`}),P({prop:`gridTemplateRows`}),P({prop:`gridTemplateAreas`}),P({prop:`gridArea`}));function dr(e,t){return t===`grey`?t:e}Jn(P({prop:`color`,themeKey:`palette`,transform:dr}),P({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:dr}),P({prop:`backgroundColor`,themeKey:`palette`,transform:dr}));var fr=_n;function z(e){return e<=1&&e!==0?`${e*100}%`:e}var pr=P({prop:`width`,transform:z}),mr=e=>e.maxWidth!==void 0&&e.maxWidth!==null?bn(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||fr[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:z(t)}}):null;mr.filterProps=[`maxWidth`];var hr=P({prop:`minWidth`,transform:z}),gr=P({prop:`height`,transform:z}),_r=P({prop:`maxHeight`,transform:z}),vr=P({prop:`minHeight`,transform:z});P({prop:`size`,cssProperty:`width`,transform:z}),P({prop:`size`,cssProperty:`height`,transform:z}),Jn(pr,mr,hr,gr,_r,vr,P({prop:`boxSizing`}));var yr={border:{themeKey:`borders`,transform:L},borderTop:{themeKey:`borders`,transform:L},borderRight:{themeKey:`borders`,transform:L},borderBottom:{themeKey:`borders`,transform:L},borderLeft:{themeKey:`borders`,transform:L},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:L},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:sr},color:{themeKey:`palette`,transform:dr},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:dr},backgroundColor:{themeKey:`palette`,transform:dr},p:{style:I},pt:{style:I},pr:{style:I},pb:{style:I},pl:{style:I},px:{style:I},py:{style:I},padding:{style:I},paddingTop:{style:I},paddingRight:{style:I},paddingBottom:{style:I},paddingLeft:{style:I},paddingX:{style:I},paddingY:{style:I},paddingInline:{style:I},paddingInlineStart:{style:I},paddingInlineEnd:{style:I},paddingBlock:{style:I},paddingBlockStart:{style:I},paddingBlockEnd:{style:I},m:{style:F},mt:{style:F},mr:{style:F},mb:{style:F},ml:{style:F},mx:{style:F},my:{style:F},margin:{style:F},marginTop:{style:F},marginRight:{style:F},marginBottom:{style:F},marginLeft:{style:F},marginX:{style:F},marginY:{style:F},marginInline:{style:F},marginInlineStart:{style:F},marginInlineEnd:{style:F},marginBlock:{style:F},marginBlockStart:{style:F},marginBlockEnd:{style:F},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:cr},rowGap:{style:ur},columnGap:{style:lr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:z},maxWidth:{style:mr},minWidth:{transform:z},height:{transform:z},maxHeight:{transform:z},minHeight:{transform:z},boxSizing:{},font:{themeKey:`font`},fontFamily:{themeKey:`typography`},fontSize:{themeKey:`typography`},fontStyle:{themeKey:`typography`},fontWeight:{themeKey:`typography`},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:`typography`}},br={};function xr(){function e(t){if(!t.sx)return null;let{sx:n,theme:r=br,nested:i}=t,a=r.unstable_sxConfig??yr,o={sx:null,theme:r,nested:!0};function s(n){let s=n;if(typeof n==`function`)s=n(r);else if(typeof n!=`object`)return n;if(!s)return null;let c=r.breakpoints??vn,l=Cn(c);for(let n in s){let i=wr(s[n],r);if(i!=null){if(typeof i!=`object`){Cr(l,n,i,r,a);continue}if(a[n]){Cr(l,n,i,r,a);continue}On(c,i)?xn(l,t.theme,i,(e,t)=>{l[e][n]=t}):(o.sx=i,l[n]=e(o))}}return!i&&r.modularCssLayers?{"@layer sx":$t(r,wn(c,l))}:$t(r,wn(c,l))}return Array.isArray(n)?n.map(s):s(n)}return e.filterProps=[`sx`],e}var Sr=xr();function Cr(e,t,n,r,i){let a=i[t];if(!a){e[t]=n;return}if(n==null)return;let{themeKey:o}=a;if(o===`typography`&&n===`inherit`){e[t]=n;return}let{style:s}=a;if(s){sn(e,s({[t]:n,theme:r}));return}let{cssProperty:c=t,transform:l}=a,u=jn(r,o);xn(e,r,n,(n,r)=>{let i=An(u,l,r,t);c===!1?sn(n?e[n]:e,i):n?e[n][c]=i:e[c]=i})}function wr(e,t){return typeof e==`function`?e(t):e}function Tr(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Er(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=Zt(n),c=qn(i),l=N({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...an,...a}},o);return l=rn(l),l.applyStyles=Tr,l=t.reduce((e,t)=>N(e,t),l),l.unstable_sxConfig={...yr,...o?.unstable_sxConfig},l.unstable_sx=function(e){return Sr({sx:e,theme:this})},l.internal_cache={},l}function Dr(e){return Object.keys(e).length===0}function Or(e=null){let t=i.useContext(Ct);return!t||Dr(t)?e:t}var kr=Er();function Ar(e=kr){return Or(e)}var jr=e=>e,Mr=(()=>{let e=jr;return{configure(t){e=t},generate(t){return e(t)},reset(){e=jr}}})();function Nr(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{r[t]=V(e,t,n)}),r}function Ir(e){let{variants:t,...n}=e,r={variants:t,style:Gt(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=Gt(e.style))}),r}var Lr=Er();function Rr(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function zr(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Br(e){return e?(t,n)=>n[e]:null}function Vr(e,t,n){e.theme=on(e.theme)?n:e.theme[t]||e.theme}function Hr(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Hr(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?zr(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?zr(Gt(i),n):i}return Ur(e,r.variants,[t],n)}return r?.isProcessed?n?zr(Gt(r.style),n):r.style:n?zr(Gt(r),n):r}function Ur(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a{Ut(e,e=>e.filter(e=>e!==Sr));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=Br(Kr(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=Rr;o===`Root`||o===`root`?m=r:o?m=i:Gr(e)&&(m=void 0);let h=Ht(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return Hr(t,e,t.theme.modularCssLayers?d:void 0)};if(Jt(e)){let t=Ir(e);return function(e){return t.variants?Hr(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?zr(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),o=[];if(r.push(a),n&&l&&o.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=Hr(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&o.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?Ur(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(Sr),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(o.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let s=[...r,...i,...o],c=h(...s);return e.muiName&&(c.muiName=e.muiName),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function Gr(e){return typeof e==`string`&&e.charCodeAt(0)>96}function Kr(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}var qr=Wr();function Jr(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=Jr(i[t],o[t],n)}}}else a===`className`&&n&&t.className!==void 0?r.className=B(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}function Yr(e){let{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Jr(t.components[n].defaultProps,r)}function Xr(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,a=Ar(r);return i&&(a=a[i]||a),Yr({theme:a,name:n,props:t})}var Zr=typeof window<`u`?i.useLayoutEffect:i.useEffect;function Qr(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function $r(e,t=0,n=1){return Qr(e,t,n)}function ei(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function ti(e){if(e.type)return e;if(e.charAt(0)===`#`)return ti(ei(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(m(9,e));let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(m(10,i))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var ni=e=>{let t=ti(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},ri=(e,t)=>{try{return ni(e)}catch{return e}};function ii(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function ai(e){e=ti(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),ii({type:s,values:c})}function oi(e){e=ti(e);let t=e.type===`hsl`||e.type===`hsla`?ti(ai(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function si(e,t){let n=oi(e),r=oi(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function ci(e,t){return e=ti(e),t=$r(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,ii(e)}function li(e,t,n){try{return ci(e,t)}catch{return e}}function ui(e,t){if(e=ti(e),t=$r(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ii(e)}function H(e,t,n){try{return ui(e,t)}catch{return e}}function di(e,t){if(e=ti(e),t=$r(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ii(e)}function U(e,t,n){try{return di(e,t)}catch{return e}}function fi(e,t=.15){return oi(e)>.5?ui(e,t):di(e,t)}function pi(e,t,n){try{return fi(e,t)}catch{return e}}var mi=i.createContext(void 0);function hi(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?Jr(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?Jr(i,r,t.components.mergeClassNameAndStyle):r}function gi({props:e,name:t}){return hi({props:e,name:t,theme:{components:i.useContext(mi)}})}var _i=0;function vi(e){let[t,n]=i.useState(e),r=e||t;return i.useEffect(()=>{t??(_i+=1,n(`mui-${_i}`))},[t]),r}var yi={...i}.useId;function bi(e){if(yi!==void 0){let t=yi();return e??t}return vi(e)}var xi={theme:void 0};function Si(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(xi.theme=r.theme,i=Ir(e(xi)),t=i,n=r.theme),i}}function Ci(e=``){function t(...n){if(!n.length)return``;let r=n[0];return typeof r==`string`&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:``}${r}${t(...n.slice(1))})`:`, ${r}`}return(n,...r)=>`var(--${e?`${e}-`:``}${n}${t(...r)})`}var wi=new Set([`__proto__`,`constructor`,`prototype`]),Ti=(e,t,n,r=[])=>{let i=e;for(let e=0;e{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},Di=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function Oi(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return Ei(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=Di(e,t);Object.assign(i,{[r]:c}),Ti(a,e,`var(${r})`,s),Ti(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function ki(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=Oi(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=Oi(n,t);p=N(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=Oi(h,t);p=N(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=N(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function Ai(e){return function(t){return e===`media`?`@media (prefers-color-scheme: ${t})`:e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}function ji(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e(e.push(r),a({row:`Left`,"row-reverse":`Right`,column:`Top`,"column-reverse":`Bottom`})[e],Li=({ownerState:e,theme:t})=>{let n={display:`flex`,flexDirection:`column`,...bn({theme:t},Dn({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let r=Vn(t),i=Object.keys(t.breakpoints.values).reduce((t,n)=>((typeof e.spacing==`object`&&e.spacing[n]!=null||typeof e.direction==`object`&&e.direction[n]!=null)&&(t[n]=!0),t),{}),a=Dn({values:e.direction,base:i}),o=Dn({values:e.spacing,base:i});typeof a==`object`&&Object.keys(a).forEach((e,t,n)=>{if(!a[e]){let r=t>0?a[n[t-1]]:`column`;a[e]=r}}),n=N(n,bn({theme:t},o,(t,n)=>e.useFlexGap?{gap:Hn(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ii(n?a[n]:e.direction)}`]:Hn(r,t)}}))}return n=Tn(t.breakpoints,n),n};function Ri(e={}){let{createStyledComponent:t=Ni,useThemeProps:n=Pi,componentName:r=`MuiStack`}=e,o=()=>ji({root:[`root`]},e=>V(r,e),{}),s=t(Li);return i.forwardRef(function(e,t){let{component:r=`div`,direction:i=`column`,spacing:c=0,divider:l,children:u,className:d,useFlexGap:f=!1,...p}=n(e),m={direction:i,spacing:c,useFlexGap:f},h=o();return(0,a.jsx)(s,{as:r,ownerState:m,ref:t,className:B(h.root,d),...p,children:l?Fi(u,l):u})})}function zi(){return{text:{primary:`rgba(0, 0, 0, 0.87)`,secondary:`rgba(0, 0, 0, 0.6)`,disabled:`rgba(0, 0, 0, 0.38)`},divider:`rgba(0, 0, 0, 0.12)`,background:{paper:o.white,default:o.white},action:{active:`rgba(0, 0, 0, 0.54)`,hover:`rgba(0, 0, 0, 0.04)`,hoverOpacity:.04,selected:`rgba(0, 0, 0, 0.08)`,selectedOpacity:.08,disabled:`rgba(0, 0, 0, 0.26)`,disabledBackground:`rgba(0, 0, 0, 0.12)`,disabledOpacity:.38,focus:`rgba(0, 0, 0, 0.12)`,focusOpacity:.12,activatedOpacity:.12}}}var Bi=zi();function Vi(){return{text:{primary:o.white,secondary:`rgba(255, 255, 255, 0.7)`,disabled:`rgba(255, 255, 255, 0.5)`,icon:`rgba(255, 255, 255, 0.5)`},divider:`rgba(255, 255, 255, 0.12)`,background:{paper:`#121212`,default:`#121212`},action:{active:o.white,hover:`rgba(255, 255, 255, 0.08)`,hoverOpacity:.08,selected:`rgba(255, 255, 255, 0.16)`,selectedOpacity:.16,disabled:`rgba(255, 255, 255, 0.3)`,disabledBackground:`rgba(255, 255, 255, 0.12)`,disabledOpacity:.38,focus:`rgba(255, 255, 255, 0.12)`,focusOpacity:.12,activatedOpacity:.24}}}var Hi=Vi();function Ui(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=di(e.main,i):t===`dark`&&(e.dark=ui(e.main,a)))}function Wi(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function Gi(e=`light`){return e===`dark`?{main:l[200],light:l[50],dark:l[400]}:{main:l[700],light:l[400],dark:l[800]}}function Ki(e=`light`){return e===`dark`?{main:c[200],light:c[50],dark:c[400]}:{main:c[500],light:c[300],dark:c[700]}}function qi(e=`light`){return e===`dark`?{main:s[500],light:s[300],dark:s[700]}:{main:s[700],light:s[400],dark:s[800]}}function Ji(e=`light`){return e===`dark`?{main:u[400],light:u[300],dark:u[700]}:{main:u[700],light:u[500],dark:u[900]}}function Yi(e=`light`){return e===`dark`?{main:d[400],light:d[300],dark:d[700]}:{main:d[800],light:d[500],dark:d[900]}}function Xi(e=`light`){return e===`dark`?{main:f[400],light:f[300],dark:f[700]}:{main:`#ed6c02`,light:f[500],dark:f[900]}}function Zi(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Qi(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,s=e.primary||Gi(t),c=e.secondary||Ki(t),l=e.error||qi(t),u=e.info||Ji(t),d=e.success||Yi(t),f=e.warning||Xi(t);function h(e){return i?Zi(e):si(e,Hi.text.primary)>=n?Hi.text.primary:Bi.text.primary}let g=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(m(11,t?` (${t})`:``,n));if(typeof e.main!=`string`)throw Error(m(12,t?` (${t})`:``,JSON.stringify(e.main)));return i?(Wi(i,e,`light`,a,r),Wi(i,e,`dark`,o,r)):(Ui(e,`light`,a,r),Ui(e,`dark`,o,r)),e.contrastText||(e.contrastText=h(e.main)),e},_;return t===`light`?_=zi():t===`dark`&&(_=Vi()),N({common:{...o},mode:t,primary:g({color:s,name:`primary`}),secondary:g({color:c,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:g({color:l,name:`error`}),warning:g({color:f,name:`warning`}),info:g({color:u,name:`info`}),success:g({color:d,name:`success`}),grey:p,contrastThreshold:n,getContrastText:h,augmentColor:g,tonalOffset:r,..._},a)}function $i(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function ea(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function ta(e){return Math.round(e*1e5)/1e5}var na={textTransform:`uppercase`},ra=`"Roboto", "Helvetica", "Arial", sans-serif`;function ia(e,t){let{fontFamily:n=ra,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t,f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===ra?{letterSpacing:`${ta(i/t)}em`}:{},...a,...l});return N({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,na),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,na),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var aa=.2,oa=.14,sa=.12;function W(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${aa})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${oa})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${sa})`].join(`,`)}var ca=[`none`,W(0,2,1,-1,0,1,1,0,0,1,3,0),W(0,3,1,-2,0,2,2,0,0,1,5,0),W(0,3,3,-2,0,3,4,0,0,1,8,0),W(0,2,4,-1,0,4,5,0,0,1,10,0),W(0,3,5,-1,0,5,8,0,0,1,14,0),W(0,3,5,-1,0,6,10,0,0,1,18,0),W(0,4,5,-2,0,7,10,1,0,2,16,1),W(0,5,5,-3,0,8,10,1,0,3,14,2),W(0,5,6,-3,0,9,12,1,0,3,16,2),W(0,6,6,-3,0,10,14,1,0,4,18,3),W(0,6,7,-4,0,11,15,1,0,4,20,3),W(0,7,8,-4,0,12,17,2,0,5,22,4),W(0,7,8,-4,0,13,19,2,0,5,24,4),W(0,7,9,-4,0,14,21,2,0,5,26,4),W(0,8,9,-5,0,15,22,2,0,6,28,5),W(0,8,10,-5,0,16,24,2,0,6,30,5),W(0,8,11,-5,0,17,26,2,0,6,32,5),W(0,9,11,-5,0,18,28,2,0,7,34,6),W(0,9,12,-6,0,19,29,2,0,7,36,6),W(0,10,13,-6,0,20,31,3,0,8,38,7),W(0,10,13,-6,0,21,33,3,0,8,40,7),W(0,10,14,-6,0,22,35,3,0,8,42,7),W(0,11,14,-7,0,23,36,3,0,9,44,8),W(0,11,15,-7,0,24,38,3,0,9,46,8)],la=[`all`],ua={},da={easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,easeOut:`cubic-bezier(0.0, 0, 0.2, 1)`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,sharp:`cubic-bezier(0.4, 0, 0.6, 1)`},fa={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function pa(e){return`${Math.round(e)}ms`}function ma(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function ha(e){let t={...e};delete t.reducedMotion;let n={...da,...t.easing},r={...fa,...t.duration};return{getAutoHeightDuration:ma,create:t.create??((e=la,t=ua)=>{let{duration:i=r.standard,easing:a=n.easeInOut,delay:o=0,...s}=t;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:pa(i)} ${a} ${typeof o==`string`?o:pa(o)}`).join(`,`)}),...t,easing:n,duration:r}}var ga={};function _a(e=ga){return{reducedMotion:`never`,...e}}var va={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ya(e){return Jt(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function ba(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r{if(!Number.isNaN(+e))return+e;let t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;eN(e,t),h),delete h.transitions.reducedMotion,h.unstable_sxConfig={...yr,...d?.unstable_sxConfig},h.unstable_sx=function(e){return Sr({sx:e,theme:this})},h.toRuntimeSource=ba,Ca(h),h}function Ta(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var Ea=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=Ta(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Da(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function Oa(e){return e===`dark`?Ea:[]}function ka(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=Qi({...t,colorSpace:i});return{palette:o,opacity:{...Da(o.mode),...n},overlays:r||Oa(o.mode),...a}}function Aa(e){return e[0]===`motion`||!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]===`palette`&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var ja=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],Ma=e=>(t,n)=>{let r=e.rootSelector||`:root`,i=e.colorSchemeSelector,a=i;if(i===`class`&&(a=`.%s`),i===`data`&&(a=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t===`dark`){let i={};return ja(e.cssVarPrefix).forEach(e=>{i[e]=n[e],delete n[e]}),a===`media`?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace(`%s`,t)]:i,[`${r}, ${a.replace(`%s`,t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!==`media`)return`${r}, ${a.replace(`%s`,String(t))}`}else if(t){if(a===`media`)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace(`%s`,String(t))}return r};function Na(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function G(e,t,n){!e[t]&&n&&(e[t]=n)}function Pa(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:ai(e)}function Fa(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ri(Pa(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). +To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Ia(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var K=e=>{try{return e()}catch{}},La=(e=`mui`)=>Ci(e);function Ra(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=ka({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=wa({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...Da(a),...n?.opacity},overlays:n?.overlays||Oa(a)},s}function za(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=Aa,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!==`light`?`light`:d),p=La(a),{[f]:h,light:g,dark:_,...v}=n,y={...v},b=h;if((f===`dark`&&!(`dark`in n)||f===`light`&&!(`light`in n))&&(b=!0),!b)throw Error(m(21,f));let x;o&&(x=`oklch`);let S=Ra(x,y,b,u,f);g&&!y.light&&Ra(x,y,g,void 0,`light`),_&&!y.dark&&Ra(x,y,_,void 0,`dark`);let C={defaultColorScheme:f,...S,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:y,font:{...$i(S.typography),...S.font},spacing:Ia(u.spacing)};Object.keys(C.colorSchemes).forEach(e=>{let t=C.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return p(e,t[r][i])};t.mode===`light`&&(G(t.common,`background`,`#fff`),G(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(G(t.common,`background`,`#000`),G(t.common,`onBackground`,`#fff`));function r(e,t,n){if(x){let r;return e===li&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===H&&(r=`#000 ${(n*100).toFixed(0)}%`),e===U&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${x}, ${t}, ${r})`}return e(t,n)}if(Na(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){G(t.Alert,`errorColor`,r(H,o?p(`palette-error-light`):t.error.light,.6)),G(t.Alert,`infoColor`,r(H,o?p(`palette-info-light`):t.info.light,.6)),G(t.Alert,`successColor`,r(H,o?p(`palette-success-light`):t.success.light,.6)),G(t.Alert,`warningColor`,r(H,o?p(`palette-warning-light`):t.warning.light,.6)),G(t.Alert,`errorFilledBg`,n(`palette-error-main`)),G(t.Alert,`infoFilledBg`,n(`palette-info-main`)),G(t.Alert,`successFilledBg`,n(`palette-success-main`)),G(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),G(t.Alert,`errorFilledColor`,K(()=>t.getContrastText(t.error.main))),G(t.Alert,`infoFilledColor`,K(()=>t.getContrastText(t.info.main))),G(t.Alert,`successFilledColor`,K(()=>t.getContrastText(t.success.main))),G(t.Alert,`warningFilledColor`,K(()=>t.getContrastText(t.warning.main))),G(t.Alert,`errorStandardBg`,r(U,o?p(`palette-error-light`):t.error.light,.9)),G(t.Alert,`infoStandardBg`,r(U,o?p(`palette-info-light`):t.info.light,.9)),G(t.Alert,`successStandardBg`,r(U,o?p(`palette-success-light`):t.success.light,.9)),G(t.Alert,`warningStandardBg`,r(U,o?p(`palette-warning-light`):t.warning.light,.9)),G(t.Alert,`errorIconColor`,n(`palette-error-main`)),G(t.Alert,`infoIconColor`,n(`palette-info-main`)),G(t.Alert,`successIconColor`,n(`palette-success-main`)),G(t.Alert,`warningIconColor`,n(`palette-warning-main`)),G(t.AppBar,`defaultBg`,n(`palette-grey-100`)),G(t.Avatar,`defaultBg`,n(`palette-grey-400`)),G(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),G(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),G(t.Chip,`defaultBorder`,n(`palette-grey-400`)),G(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),G(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),G(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),G(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),G(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),G(t.LinearProgress,`primaryBg`,r(U,o?p(`palette-primary-main`):t.primary.main,.62)),G(t.LinearProgress,`secondaryBg`,r(U,o?p(`palette-secondary-main`):t.secondary.main,.62)),G(t.LinearProgress,`errorBg`,r(U,o?p(`palette-error-main`):t.error.main,.62)),G(t.LinearProgress,`infoBg`,r(U,o?p(`palette-info-main`):t.info.main,.62)),G(t.LinearProgress,`successBg`,r(U,o?p(`palette-success-main`):t.success.main,.62)),G(t.LinearProgress,`warningBg`,r(U,o?p(`palette-warning-light`):t.warning.main,.62)),G(t.Skeleton,`bg`,x?r(li,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),G(t.Slider,`primaryTrack`,r(U,o?p(`palette-primary-main`):t.primary.main,.62)),G(t.Slider,`secondaryTrack`,r(U,o?p(`palette-secondary-main`):t.secondary.main,.62)),G(t.Slider,`errorTrack`,r(U,o?p(`palette-error-main`):t.error.main,.62)),G(t.Slider,`infoTrack`,r(U,o?p(`palette-info-main`):t.info.main,.62)),G(t.Slider,`successTrack`,r(U,o?p(`palette-success-main`):t.success.main,.62)),G(t.Slider,`warningTrack`,r(U,o?p(`palette-warning-main`):t.warning.main,.62));let e=x?r(H,o?p(`palette-background-default`):t.background.default,.6825):pi(t.background.default,.8);G(t.SnackbarContent,`bg`,e),G(t.SnackbarContent,`color`,K(()=>x?Hi.text.primary:t.getContrastText(e))),G(t.SpeedDialAction,`fabHoverBg`,pi(t.background.paper,.15)),G(t.StepConnector,`border`,n(`palette-grey-400`)),G(t.StepContent,`border`,n(`palette-grey-400`)),G(t.Switch,`defaultColor`,n(`palette-common-white`)),G(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),G(t.Switch,`primaryDisabledColor`,r(U,o?p(`palette-primary-main`):t.primary.main,.62)),G(t.Switch,`secondaryDisabledColor`,r(U,o?p(`palette-secondary-main`):t.secondary.main,.62)),G(t.Switch,`errorDisabledColor`,r(U,o?p(`palette-error-main`):t.error.main,.62)),G(t.Switch,`infoDisabledColor`,r(U,o?p(`palette-info-main`):t.info.main,.62)),G(t.Switch,`successDisabledColor`,r(U,o?p(`palette-success-main`):t.success.main,.62)),G(t.Switch,`warningDisabledColor`,r(U,o?p(`palette-warning-main`):t.warning.main,.62)),G(t.TableCell,`border`,r(U,li(o?p(`palette-divider`):t.divider,1),.88)),G(t.Tooltip,`bg`,r(li,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){G(t.Alert,`errorColor`,r(U,o?p(`palette-error-light`):t.error.light,.6)),G(t.Alert,`infoColor`,r(U,o?p(`palette-info-light`):t.info.light,.6)),G(t.Alert,`successColor`,r(U,o?p(`palette-success-light`):t.success.light,.6)),G(t.Alert,`warningColor`,r(U,o?p(`palette-warning-light`):t.warning.light,.6)),G(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),G(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),G(t.Alert,`successFilledBg`,n(`palette-success-dark`)),G(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),G(t.Alert,`errorFilledColor`,K(()=>t.getContrastText(t.error.dark))),G(t.Alert,`infoFilledColor`,K(()=>t.getContrastText(t.info.dark))),G(t.Alert,`successFilledColor`,K(()=>t.getContrastText(t.success.dark))),G(t.Alert,`warningFilledColor`,K(()=>t.getContrastText(t.warning.dark))),G(t.Alert,`errorStandardBg`,r(H,o?p(`palette-error-light`):t.error.light,.9)),G(t.Alert,`infoStandardBg`,r(H,o?p(`palette-info-light`):t.info.light,.9)),G(t.Alert,`successStandardBg`,r(H,o?p(`palette-success-light`):t.success.light,.9)),G(t.Alert,`warningStandardBg`,r(H,o?p(`palette-warning-light`):t.warning.light,.9)),G(t.Alert,`errorIconColor`,n(`palette-error-main`)),G(t.Alert,`infoIconColor`,n(`palette-info-main`)),G(t.Alert,`successIconColor`,n(`palette-success-main`)),G(t.Alert,`warningIconColor`,n(`palette-warning-main`)),G(t.AppBar,`defaultBg`,n(`palette-grey-900`)),G(t.AppBar,`darkBg`,n(`palette-background-paper`)),G(t.AppBar,`darkColor`,n(`palette-text-primary`)),G(t.Avatar,`defaultBg`,n(`palette-grey-600`)),G(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),G(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),G(t.Chip,`defaultBorder`,n(`palette-grey-700`)),G(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),G(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),G(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),G(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),G(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),G(t.LinearProgress,`primaryBg`,r(H,o?p(`palette-primary-main`):t.primary.main,.5)),G(t.LinearProgress,`secondaryBg`,r(H,o?p(`palette-secondary-main`):t.secondary.main,.5)),G(t.LinearProgress,`errorBg`,r(H,o?p(`palette-error-main`):t.error.main,.5)),G(t.LinearProgress,`infoBg`,r(H,o?p(`palette-info-main`):t.info.main,.5)),G(t.LinearProgress,`successBg`,r(H,o?p(`palette-success-main`):t.success.main,.5)),G(t.LinearProgress,`warningBg`,r(H,o?p(`palette-warning-main`):t.warning.main,.5)),G(t.Skeleton,`bg`,x?r(li,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),G(t.Slider,`primaryTrack`,r(H,o?p(`palette-primary-main`):t.primary.main,.5)),G(t.Slider,`secondaryTrack`,r(H,o?p(`palette-secondary-main`):t.secondary.main,.5)),G(t.Slider,`errorTrack`,r(H,o?p(`palette-error-main`):t.error.main,.5)),G(t.Slider,`infoTrack`,r(H,o?p(`palette-info-main`):t.info.main,.5)),G(t.Slider,`successTrack`,r(H,o?p(`palette-success-main`):t.success.main,.5)),G(t.Slider,`warningTrack`,r(H,o?p(`palette-warning-light`):t.warning.main,.5));let e=x?r(U,o?p(`palette-background-default`):t.background.default,.985):pi(t.background.default,.98);G(t.SnackbarContent,`bg`,e),G(t.SnackbarContent,`color`,K(()=>x?Bi.text.primary:t.getContrastText(e))),G(t.SpeedDialAction,`fabHoverBg`,pi(t.background.paper,.15)),G(t.StepConnector,`border`,n(`palette-grey-600`)),G(t.StepContent,`border`,n(`palette-grey-600`)),G(t.Switch,`defaultColor`,n(`palette-grey-300`)),G(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),G(t.Switch,`primaryDisabledColor`,r(H,o?p(`palette-primary-main`):t.primary.main,.55)),G(t.Switch,`secondaryDisabledColor`,r(H,o?p(`palette-secondary-main`):t.secondary.main,.55)),G(t.Switch,`errorDisabledColor`,r(H,o?p(`palette-error-main`):t.error.main,.55)),G(t.Switch,`infoDisabledColor`,r(H,o?p(`palette-info-main`):t.info.main,.55)),G(t.Switch,`successDisabledColor`,r(H,o?p(`palette-success-main`):t.success.main,.55)),G(t.Switch,`warningDisabledColor`,r(H,o?p(`palette-warning-light`):t.warning.main,.55)),G(t.TableCell,`border`,r(H,li(o?p(`palette-divider`):t.divider,1),.68)),G(t.Tooltip,`bg`,r(li,o?p(`palette-grey-700`):t.grey[700],.92))}o||(Fa(t.background,`default`),Fa(t.background,`paper`),Fa(t.common,`background`),Fa(t.common,`onBackground`),Fa(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&G(t[e],`mainChannel`,ri(Pa(n.main))),n.light&&G(t[e],`lightChannel`,ri(Pa(n.light))),n.dark&&G(t[e],`darkChannel`,ri(Pa(n.dark))),n.contrastText&&G(t[e],`contrastTextChannel`,ri(Pa(n.contrastText))),e===`text`&&(Fa(t[e],`primary`),Fa(t[e],`secondary`)),e===`action`&&(n.active&&Fa(t[e],`active`),n.selected&&Fa(t[e],`selected`)))})}),C=t.reduce((e,t)=>N(e,t),C);let ee={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:Ma(C),enableContrastVars:o},{vars:te,generateThemeVars:ne,generateStyleSheets:re}=ki(C,ee);return C.vars=te,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([e,t])=>{C[e]=t}),C.generateThemeVars=ne,C.generateStyleSheets=re,C.generateSpacing=function(){return qn(u.spacing,Vn(this))},C.getColorSchemeSelector=Ai(c),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...yr,...u?.unstable_sxConfig},C.unstable_sx=function(e){return Sr({sx:e,theme:this})},C.internal_cache={},C.toRuntimeSource=ba,C}function Ba(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Qi({...n===!0?{}:n.palette,mode:t})})}function Va(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return wa(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=wa({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},Ba(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},Ba(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),za({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}function Ha(e){return typeof e==`string`}function Ua(...e){let t=i.useRef(void 0),n=i.useCallback(t=>{let n=e.map(e=>{if(e==null)return 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 i.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}function Wa(e){let t=i.useRef(e);return Zr(()=>{t.current=e}),i.useRef((...e)=>(0,t.current)(...e)).current}var Ga=Va();function Ka(){let e=Ar(Ga);return e.$$material||e}function qa(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var Ja=e=>qa(e)&&e!==`classes`,q=Wr({themeId:h,defaultTheme:Ga,rootShouldForwardProp:Ja}),J=Si;function Y(e){return gi(e)}var X=kn,Ya=Ua,Xa={transition:`none`};function Za(e,t){return e===`always`?t:e===`system`?{"@media (prefers-reduced-motion: reduce)":t}:null}var Qa=e=>e.scrollTop,$a={},eo=[`all`],to={};function no(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function ro(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function io(e,t){let{timeout:n,easing:r,style:i=$a}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function ao(e,t){let n=t??Xa;return Za(e.motion?.reducedMotion,n)}function oo(e,t=eo,n=to){let r=e.transitions?.create?.(t,n),i=ao(e);if(r===void 0)return i??$a;let a={transition:r};return i?{...a,...i}:a}function so(e){return V(`MuiSvgIcon`,e)}Fr(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var co=e=>{let{color:t,fontSize:n,classes:r}=e;return ji({root:[`root`,t!==`inherit`&&`color${X(t)}`,`fontSize${X(n)}`]},so,r)},lo=q(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${X(n.color)}`],t[`fontSize${X(n.fontSize)}`]]}})(J(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,...oo(e,`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),uo=i.forwardRef(function(e,t){let n=Y({props:e,name:`MuiSvgIcon`}),{children:r,className:o,color:s=`inherit`,component:c=`svg`,fontSize:l=`medium`,htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:p=`0 0 24 24`,...m}=n,h=i.isValidElement(r)&&r.type===`svg`,g={...n,color:s,component:c,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:h},_={};d||(_.viewBox=p);let v=co(g);return(0,a.jsxs)(lo,{as:c,className:B(v.root,o),focusable:`false`,color:u,"aria-hidden":!f||void 0,role:f?`img`:void 0,ref:t,..._,...m,...h&&r.props,ownerState:g,children:[h?r.props.children:r,f?(0,a.jsx)(`title`,{children:f}):null]})});uo.muiName=`SvgIcon`;function fo(e,t){function n(t,n){return(0,a.jsx)(uo,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=uo.muiName,i.memo(i.forwardRef(n))}var po=bi,Z=Wa;function mo(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}var ho={};function go(e,t){let n=i.useRef(ho);return n.current===ho&&(n.current=e(t)),n}var _o=`(prefers-reduced-motion: reduce)`,vo=0,yo=`0ms`,bo=()=>{},xo=()=>!1,So=()=>!0,Co=()=>bo;function wo(e){let[t,n]=i.useState(()=>({enabled:e,matches:e?null:!1})),r=t.matches;return t.enabled!==e&&(r=null,e||(r=!1)),Zr(()=>{let r=t=>{n(n=>n.enabled===e&&n.matches===t?n:{enabled:e,matches:t})};if(!e){t.enabled&&r(!1);return}if(typeof window>`u`||typeof window.matchMedia!=`function`){r(!1);return}let i=window.matchMedia(_o),a=()=>{r(i.matches)};return a(),i.addEventListener(`change`,a),()=>{i.removeEventListener(`change`,a)}},[e,t.enabled]),r}var To={...i}.useSyncExternalStore;function Eo(e){let t=e?So:xo,[n,r]=i.useMemo(()=>{if(!e||typeof window>`u`||typeof window.matchMedia!=`function`)return[xo,Co];let t=window.matchMedia(_o);return[()=>t.matches,e=>(t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)})]},[e]);return To(r,n,t)}var Do=To===void 0?wo:Eo;function Oo(e,t){let n=Do(!t&&e===`system`),r=!t&&(e===`always`||e===`system`&&n!==!1);return i.useMemo(()=>({shouldReduceMotion:r,getTransitionTiming(e){return r?{duration:vo,delay:yo}:e}}),[r])}function ko(e,t,n){return e===void 0||Ha(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Ao(e,t,n){return typeof e==`function`?e(t,n):e}function jo(e){if(e===void 0)return{};let t={};for(let n of Object.keys(e))mo(n,e[n])&&(t[n]=e[n]);return t}function Mo(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function No(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=B(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=jo({...i,...r}),s=Mo(r),c=Mo(i),l=t(o),u=B(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function Po(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=Ao(d[e],i),{props:{component:h,...g},internalRef:_}=No({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=Ua(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,ko(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}function Fo(e){return V(`MuiPaper`,e)}Fr(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var Io=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return ji({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},Fo,i)},Lo=q(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(J(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,...oo(e,`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),Ro=i.forwardRef(function(e,t){let n=Y({props:e,name:`MuiPaper`}),r=Ka(),{className:i,component:o=`div`,elevation:s=1,square:c=!1,variant:l=`elevation`,...u}=n,d={...n,component:o,elevation:s,square:c,variant:l},f=Io(d);return(0,a.jsx)(Lo,{as:o,ownerState:d,className:B(f.root,i),ref:t,...u,style:{...l===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[s],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[s]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${ci(`#fff`,Ta(s))}, ${ci(`#fff`,Ta(s))})`}},...u.style}})});function zo(e){try{return e.matches(`:focus-visible`)}catch{}return!1}function Bo(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:a=0,isNativeButton:o}=e,s=r&&t!==!1,c=r&&t===!1;return i.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=a,!o&&n&&(e.tabIndex=t?a:-1)),(o&&(t||s)||!o&&n)&&(e[`aria-disabled`]=n),o&&(!t||c)&&(e.disabled=n),e},[r,n,t,s,c,o,a])}var Vo={};function Ho(e){let{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:a=!1,disabled:o,type:s,hasFormAction:c=!1,tabIndex:l=0,focusableWhenDisabled:u,stopEventPropagation:d=!1,onBeforeKeyDown:f,onBeforeKeyUp:p}=e,m=i.useRef(null),h=u===!0,g=Bo({focusableWhenDisabled:h,disabled:o,isNativeButton:t,tabIndex:l}),_=i.useCallback(()=>{let e=m.current;return e==null?t:e.tagName===`BUTTON`||!!(e.tagName===`A`&&e.href)},[t]),v=i.useMemo(()=>{let e=h?{}:{tabIndex:o?-1:l};return t?(e.type=s===void 0&&!c?`button`:s,h||(e.disabled=o)):(e.role=`button`,!h&&o&&(e[`aria-disabled`]=o)),h?{...e,...g}:e},[o,h,g,c,t,l,s]);return{getButtonProps:i.useCallback((e=Vo)=>{let{onClick:t,onKeyDown:n,onKeyUp:r,...i}=e,a=e=>{if(d&&e.stopPropagation(),o){e.preventDefault();return}t?.(e)},s=e=>{if(h&&g.onKeyDown(e),!o&&(f?.(e),n?.(e),!(e.target!==e.currentTarget||_()))){if(e.key===` `){e.preventDefault();return}e.key===`Enter`&&(e.preventDefault(),e.currentTarget.click())}},c=e=>{o||(p?.(e),r?.(e),e.target===e.currentTarget&&!_()&&e.key===` `&&!e.defaultPrevented&&e.currentTarget.click())};return{...v,...i,onClick:a,onKeyDown:s,onKeyUp:c}},[v,o,h,g,_,f,p,d]),rootRef:m}}var Uo=class e{static create(){return new e}static use(){let t=go(e.create).current,[n,r]=i.useState(!1);return t.shouldMount=n,t.setShouldMount=r,i.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=Go(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function Wo(){return Uo.use()}function Go(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}var Ko=[];function qo(e){i.useEffect(e,Ko)}var Jo=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function Yo(){let e=go(Jo.create).current;return qo(e.disposeEffect),e}function Xo(e){let{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:s,rippleSize:c,in:l,onExited:u,timeout:d}=e,[f,p]=i.useState(!1),m=Yo(),h=i.useRef(!1),g=i.useRef(u);g.current=u;let _=u!=null,v=B(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),y={width:c,height:c,top:-(c/2)+s,left:-(c/2)+o},b=B(n.child,f&&n.childLeaving,r&&n.childPulsate);return!l&&!f&&p(!0),i.useEffect(()=>{!l&&_?h.current||(h.current=!0,m.start(d,()=>{h.current=!1,g.current?.()})):(h.current=!1,m.clear())},[m,_,l,d]),(0,a.jsx)(`span`,{className:v,style:y,children:(0,a.jsx)(`span`,{className:b})})}var Q=Fr(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),Zo=550,Qo={},$o=[],es=()=>{};function ts(e,t){let n=new Set(t),r=new Map,i=[];for(let t of e)n.has(t)?i.length>0&&(r.set(t,i),i=[]):i.push(t);let a=[];for(let e of t){let t=r.get(e);t&&a.push(...t),a.push(e)}return a.push(...i),a}function ns({event:e,element:t,center:n}){let r=t?t.getBoundingClientRect():{width:0,height:0,left:0,top:0},i,a;if(n||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)i=Math.round(r.width/2),a=Math.round(r.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;i=Math.round(t-r.left),a=Math.round(n-r.top)}let o;if(n)o=Math.sqrt((2*r.width**2+r.height**2)/3),o%2==0&&(o+=1);else{let e=Math.max(Math.abs((t?t.clientWidth:0)-i),i)*2+2,n=Math.max(Math.abs((t?t.clientHeight:0)-a),a)*2+2;o=Math.sqrt(e**2+n**2)}return{rippleX:i,rippleY:a,rippleSize:o}}var rs=Mt` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`,is=Mt` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`,as=Mt` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`;function os(e){if(e.motion.reducedMotion===`always`)return null;let t=jt` + &.${Q.rippleVisible} { + animation-name: ${rs}; + animation-duration: ${Zo}ms; + animation-timing-function: ${e.transitions.easing.easeInOut}; + } + + &.${Q.ripplePulsate} { + animation-duration: ${e.transitions.duration.shorter}ms; + } + + & .${Q.childLeaving} { + animation-name: ${is}; + animation-duration: ${Zo}ms; + animation-timing-function: ${e.transitions.easing.easeInOut}; + } + + & .${Q.childPulsate} { + animation-name: ${as}; + animation-duration: 2500ms; + animation-timing-function: ${e.transitions.easing.easeInOut}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } + `;return e.motion.reducedMotion===`system`?jt` + @media (prefers-reduced-motion: no-preference) { + ${t} + } + `:t}var ss=q(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),cs=q(Xo,{name:`MuiTouchRipple`,slot:`Ripple`})` + opacity: 0; + position: absolute; + + &.${Q.rippleVisible} { + opacity: 0.3; + transform: scale(1); + } + + /* + * Order matters: 'child', 'childLeaving' and 'childPulsate' apply to the same + * element with equal specificity, so the later rule wins. 'child' must come + * before 'childLeaving' so the leaving 'opacity: 0' takes precedence. A focus + * (pulsate) ripple keeps 'pulsateKeyframe' (no opacity animation) on exit, so + * it relies on this static 'opacity: 0' to disappear on blur instead of + * lingering until removal. + */ + & .${Q.child} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${Q.childLeaving} { + opacity: 0; + } + + & .${Q.childPulsate} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + } + + ${({theme:e})=>os(e)} +`,ls=i.forwardRef(function(e,t){let n=Y({props:e,name:`MuiTouchRipple`}),r=Oo(Ka().motion.reducedMotion,!1),{center:o=!1,classes:s=Qo,className:c,...l}=n,[u,d]=i.useState({items:$o,order:$o}),f=u.items,p=i.useRef(0),m=i.useRef(null),h=i.useRef(!1);qo(()=>(h.current=!0,()=>{h.current=!1})),i.useEffect(()=>{m.current&&=(m.current(),null)},[f]);let g=i.useRef(!1),_=Yo(),v=i.useRef(null),y=i.useRef(null),b=Z(e=>{h.current&&d(t=>{let n=t.items.filter(t=>t.key!==e);return{items:n,order:ts(t.order.filter(t=>t!==e),n.filter(e=>!e.exiting).map(e=>e.key))}})}),x=Z(e=>{let{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e,o=p.current;p.current+=1,d(e=>{let a=[...e.items,{key:o,pulsate:t,rippleX:n,rippleY:r,rippleSize:i,exiting:!1}];return{items:a,order:ts(e.order,a.filter(e=>!e.exiting).map(e=>e.key))}}),m.current=a}),S=Z((e=Qo,t=Qo,n=es)=>{let{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if(e?.type===`mousedown`&&g.current){g.current=!1;return}e?.type===`touchstart`&&(g.current=!0);let{rippleX:s,rippleY:c,rippleSize:l}=ns({event:e,element:a?null:y.current,center:i});e?.touches?v.current===null&&(v.current=()=>{x({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})},_.start(80,()=>{v.current&&=(v.current(),null)})):x({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})}),C=Z(()=>{S(Qo,{pulsate:!0})}),ee=Z((e,t)=>{if(_.clear(),e?.type===`touchend`&&v.current){v.current(),v.current=null,_.start(0,()=>{ee(e,t)});return}v.current=null,d(e=>{let t=e.items.findIndex(e=>!e.exiting);if(t===-1)return e;let n=e.items.slice();return n[t]={...n[t],exiting:!0},{items:n,order:ts(e.order,n.filter(e=>!e.exiting).map(e=>e.key))}}),m.current=t});i.useImperativeHandle(t,()=>({pulsate:C,start:S,stop:ee}),[C,S,ee]);let te=new Map(f.map(e=>[e.key,e])),ne=u.order.map(e=>te.get(e)).filter(Boolean);return(0,a.jsx)(ss,{className:B(Q.root,s.root,c),ref:y,...l,children:ne.map(e=>(0,a.jsx)(cs,{classes:{ripple:B(s.ripple,Q.ripple),rippleVisible:B(s.rippleVisible,Q.rippleVisible),ripplePulsate:B(s.ripplePulsate,Q.ripplePulsate),child:B(s.child,Q.child),childLeaving:B(s.childLeaving,Q.childLeaving),childPulsate:B(s.childPulsate,Q.childPulsate)},timeout:r.shouldReduceMotion?0:Zo,pulsate:e.pulsate,rippleX:e.rippleX,rippleY:e.rippleY,rippleSize:e.rippleSize,in:!e.exiting,onExited:()=>b(e.key)},e.key))})});function us(e){return V(`MuiButtonBase`,e)}var ds=Fr(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),fs=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:i,classes:a}=e,o=ji({root:[`root`,t&&`disabled`,n&&!i&&`focusVisible`]},us,a);return n&&!i&&r&&(o.root+=` ${r}`),o},ps=q(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${ds.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),ms=i.forwardRef(function(e,t){let n=Y({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:o=!1,children:s,className:c,component:l=`button`,disabled:u=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:p=!1,focusVisibleClassName:m,focusableWhenDisabled:h,suppressFocusVisible:g=!1,internalNativeButton:_,LinkComponent:v=`a`,nativeButton:y,onBlur:b,onClick:x,onContextMenu:S,onDragLeave:C,onFocus:ee,onFocusVisible:te,onKeyDown:ne,onKeyUp:re,onMouseDown:ie,onMouseLeave:ae,onMouseUp:oe,onTouchEnd:se,onTouchMove:ce,onTouchStart:le,tabIndex:ue=0,TouchRippleProps:w,touchRippleRef:de,type:T,...fe}=n,E=!!(fe.href||fe.to),pe=!!fe.formAction,D=l;D===`button`&&E&&(D=v);let me=typeof D==`string`?D===`button`:_??!1,he=y??me,O=Wo(),ge=Ya(O.ref,de),[k,A]=i.useState(!1);(u||g)&&k&&A(!1);let _e=Z(e=>{p&&!e.repeat&&k&&e.key===` `&&O.stop(e,()=>{O.start(e)})}),ve=Z(e=>{p&&e.key===` `&&k&&!e.defaultPrevented&&O.stop(e,()=>{O.pulsate(e)})}),{getButtonProps:ye,rootRef:be}=Ho({nativeButton:he,nativeButtonProp:y,internalNativeButton:me,allowInferredHostMismatch:E||typeof D==`string`,disabled:u,type:T,hasFormAction:pe,tabIndex:ue,onBeforeKeyDown:_e,onBeforeKeyUp:ve}),{onClick:xe,onKeyDown:j,onKeyUp:M,...Se}=ye({onClick:x,onKeyDown:ne,onKeyUp:re});i.useImperativeHandle(r,()=>({focusVisible:()=>{A(!0),be.current.focus()}}),[be]);let Ce=O.shouldMount&&!d&&!u;i.useEffect(()=>{k&&p&&!d&&O.pulsate()},[d,p,k,O]);let we=hs(O,`start`,ie,f),Te=hs(O,`stop`,S,f),Ee=hs(O,`stop`,C,f),De=hs(O,`stop`,oe,f),Oe=hs(O,`stop`,e=>{k&&e.preventDefault(),ae&&ae(e)},f),ke=hs(O,`start`,le,f),Ae=hs(O,`stop`,se,f),je=hs(O,`stop`,ce,f),Me=hs(O,`stop`,e=>{zo(e.target)||A(!1),b&&b(e)},!1),Ne=Z(e=>{be.current||=e.currentTarget,!g&&zo(e.target)&&(A(!0),te&&te(e)),ee&&ee(e)}),Pe={};E&&(Pe.tabIndex=u?-1:ue,u&&(Pe[`aria-disabled`]=u),Pe.type=T);let Fe=Ya(t,be),Ie={...n,centerRipple:o,component:l,disabled:u,disableRipple:d,disableTouchRipple:f,focusRipple:p,suppressFocusVisible:g,tabIndex:ue,focusVisible:k},Le=fs(Ie);return(0,a.jsxs)(ps,{as:D,className:B(Le.root,c),ownerState:Ie,onBlur:Me,onClick:xe,onContextMenu:Te,onFocus:Ne,onKeyDown:j,onKeyUp:M,onMouseDown:we,onMouseLeave:Oe,onMouseUp:De,onDragLeave:Ee,onTouchEnd:Ae,onTouchMove:je,onTouchStart:ke,ref:Fe,...E?Pe:Se,...fe,children:[s,Ce?(0,a.jsx)(ls,{ref:ge,center:o,...w}):null]})});function hs(e,t,n,r=!1){return Z(i=>(n&&n(i),r||e[t](i),!0))}function gs(e){return typeof e.main==`string`}function _s(e,t=[]){if(!gs(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function vs(e=[]){return([,t])=>t&&_s(t,e)}function ys(e){return V(`MuiCircularProgress`,e)}Fr(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDisableShrink`]);var $=44,bs=Mt` + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +`,xs=Mt` + 0% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -15px; + } + + 100% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: -126px; + } +`,Ss=typeof bs==`string`?null:jt` + animation: ${bs} 1.4s linear infinite; + `,Cs=typeof xs==`string`?null:jt` + animation: ${xs} 1.4s ease-in-out infinite; + `,ws=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return ji({root:[`root`,n,`color${X(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},ys,t)},Ts=q(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${X(n.color)}`]]}})(J(({theme:e})=>{let t=ao(e,{animation:`none`});return{display:`inline-block`,variants:[{props:{variant:`determinate`},style:{...oo(e,`transform`)}},{props:{variant:`indeterminate`},style:Ss||{animation:`${bs} 1.4s linear infinite`}},...t?[{props:{variant:`indeterminate`},style:t}]:[],...Object.entries(e.palette).filter(vs()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}})),Es=q(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Ds=q(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(J(({theme:e})=>{let t=ao(e,{animation:`none`});return{stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{...oo(e,`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:Cs||{animation:`${xs} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:t}]:[]]}})),Os=q(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(J(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),ks=i.forwardRef(function(e,t){let n=Y({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:o=!1,enableTrackSlot:s=!1,min:c,max:l,size:u=40,style:d,thickness:f=3.6,value:p=n.min??0,variant:m=`indeterminate`,...h}=n,g=c??0,_=l??100,v={...n,color:i,disableShrink:o,size:u,thickness:f,value:p,variant:m,enableTrackSlot:s},y=ws(v),b={},x={},S={};if(m===`determinate`){let e=2*Math.PI*(($-f)/2),t=_-g;b.strokeDasharray=e.toFixed(3),b.strokeDashoffset=t>0?`${((_-p)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,x.transform=`rotate(-90deg)`,S[`aria-valuenow`]=p,S[`aria-valuemin`]=g,S[`aria-valuemax`]=_}return(0,a.jsx)(Ts,{className:B(y.root,r),style:{width:u,height:u,...x,...d},ownerState:v,ref:t,role:`progressbar`,...S,...h,children:(0,a.jsxs)(Es,{className:y.svg,ownerState:v,viewBox:`${$/2} ${$/2} ${$} ${$}`,children:[s?(0,a.jsx)(Os,{className:y.track,ownerState:v,cx:$,cy:$,r:($-f)/2,fill:`none`,strokeWidth:f,"aria-hidden":`true`}):null,(0,a.jsx)(Ds,{className:y.circle,style:b,ownerState:v,cx:$,cy:$,r:($-f)/2,fill:`none`,strokeWidth:f})]})})});function As(e){return V(`MuiIconButton`,e)}var js=Fr(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),Ms=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return ji({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${X(r)}`,i&&`edge${X(i)}`,`size${X(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},As,t)},Ns=q(ms,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${X(n.color)}`],n.edge&&t[`edge${X(n.edge)}`],t[`size${X(n.size)}`]]}})(J(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,...oo(e,`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),J(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(vs()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${js.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${js.loading}`]:{color:`transparent`}}))),Ps=q(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),Fs=i.forwardRef(function(e,t){let n=Y({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:o,color:s=`default`,disabled:c=!1,disableFocusRipple:l=!1,size:u=`medium`,id:d,loading:f=null,loadingIndicator:p,...m}=n,h=po(d),g=p??(0,a.jsx)(ks,{"aria-labelledby":h,color:`inherit`,size:16}),_={...n,edge:r,color:s,disabled:c,disableFocusRipple:l,loading:f,loadingIndicator:g,size:u},v=Ms(_);return(0,a.jsxs)(Ns,{id:f?h:d,className:B(v.root,o),centerRipple:!0,internalNativeButton:!0,focusRipple:!l,disabled:c||f,ref:t,...m,ownerState:_,children:[typeof f==`boolean`&&(0,a.jsx)(`span`,{className:v.loadingWrapper,style:{display:`contents`},children:(0,a.jsx)(Ps,{className:v.loadingIndicator,ownerState:_,children:f&&g})}),i]})});function Is(e){return V(`MuiTypography`,e)}var Ls=Fr(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`]),Rs=e=>{let{align:t,gutterBottom:n,noWrap:r,variant:i,classes:a}=e;return ji({root:[`root`,i,e.align!==`inherit`&&`align${X(t)}`,n&&`gutterBottom`,r&&`noWrap`]},Is,a)},zs=q(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${X(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(J(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(vs()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${X(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}}]}))),Bs={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},Vs=i.forwardRef(function(e,t){let n=Y({props:e,name:`MuiTypography`}),{color:r,align:i=`inherit`,className:o,component:s,gutterBottom:c=!1,noWrap:l=!1,variant:u=`body1`,variantMapping:d=Bs,...f}=n,p={...n,align:i,color:r,className:o,component:s,gutterBottom:c,noWrap:l,variant:u,variantMapping:d},m=s||d[u]||Bs[u]||`span`,h=Rs(p);return(0,a.jsx)(zs,{as:m,ref:t,className:B(h.root,o),...f,ownerState:p,style:{...i!==`inherit`&&{"--Typography-textAlign":i},...f.style}})}),Hs=Ri({createStyledComponent:q(`div`,{name:`MuiStack`,slot:`Root`}),useThemeProps:e=>Y({props:e,name:`MuiStack`})});function Us(e){return V(`MuiToolbar`,e)}Fr(`MuiToolbar`,[`root`,`gutters`,`regular`,`dense`]);var Ws=e=>{let{classes:t,disableGutters:n,variant:r}=e;return ji({root:[`root`,!n&&`gutters`,r]},Us,t)},Gs=q(`div`,{name:`MuiToolbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(J(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up(`sm`)]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:`dense`},style:{minHeight:48}},{props:{variant:`regular`},style:e.mixins.toolbar}]}))),Ks=i.forwardRef(function(e,t){let n=Y({props:e,name:`MuiToolbar`}),{className:r,component:i=`div`,disableGutters:o=!1,variant:s=`regular`,...c}=n,l={...n,component:i,disableGutters:o,variant:s},u=Ws(l);return(0,a.jsx)(Gs,{as:i,className:B(u.root,r),ref:t,ownerState:l,...c})});export{Rr as $,no as A,Ga as B,Z as C,ro as D,ao as E,J as F,fa as G,Ua as H,q as I,Zr as J,ji as K,Ja as L,Ya as M,X as N,io as O,Y as P,qr as Q,qa as R,mo as S,fo as T,Ha as U,Wa as V,Va as W,Yr as X,Xr as Y,Jr as Z,jo as _,Fs as a,Sr as at,Oo as b,vs as c,Gt as ct,Yo as d,jt as dt,Fr as et,qo as f,Mt as ft,No as g,Po as h,m as ht,Ls as i,Ar as it,Qa as j,oo as k,ms as l,Ht as lt,Ro as m,h as mt,Hs as n,B as nt,js as o,kn as ot,zo as p,g as pt,bi as q,Vs as r,Mr as rt,ks as s,N as st,Ks as t,V as tt,Jo as u,At as ut,Ao as v,po as w,go as x,ko as y,Ka as z}; \ No newline at end of file diff --git a/buildtime/client/material-editor/dist/assets/index-CvD27sEa.js b/buildtime/client/material-editor/dist/assets/index-CvD27sEa.js new file mode 100644 index 000000000..901331e4f --- /dev/null +++ b/buildtime/client/material-editor/dist/assets/index-CvD27sEa.js @@ -0,0 +1,18 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Layout-BA32MBe8.js","assets/jsx-runtime-DIhQqKhG.js","assets/Toolbar-Ds5JbX8Q.js","assets/HomePage-BT3l1pQe.js","assets/NotFoundPage-BSeqrAsK.js"])))=>i.map(i=>d[i]); +import{i as e,n as t,r as n,t as r}from"./jsx-runtime-DIhQqKhG.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var i=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,E());else{var t=n(l);t!==null&&k(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-Tt&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&k(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?E():S=!1}}}var E;if(typeof y==`function`)E=function(){y(te)};else if(typeof MessageChannel<`u`){var D=new MessageChannel,O=D.port2;D.port1.onmessage=te,E=function(){O.postMessage(null)}}else E=function(){_(te,0)};function k(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,k(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,E()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),a=n(((e,t)=>{t.exports=i()})),o=n((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1{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=o()})),c=n((e=>{var n=a(),r=t(),i=s();function o(e){var t=`https://react.dev/errors/`+e;if(1se||(e.current=oe[se],oe[se]=null,se--)}function P(e,t){se++,oe[se]=e.current,e.current=t}var F=ce(null),le=ce(null),ue=ce(null),de=ce(null);function fe(e,t){switch(P(ue,t),P(le,e),P(F,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}N(F),P(F,e)}function pe(){N(F),N(le),N(ue)}function me(e){e.memoizedState!==null&&P(de,e);var t=F.current,n=Hd(t,e.type);t!==n&&(P(le,e),P(F,n))}function he(e){le.current===e&&(N(F),N(le)),de.current===e&&(N(de),Qf._currentValue=ae)}var ge,_e;function ve(e){if(ge===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ge=t&&t[1]||``,_e=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ye=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ve(n):``}function xe(e,t){switch(e.tag){case 26:case 27:case 5:return ve(e.type);case 16:return ve(`Lazy`);case 13:return e.child!==t&&t!==null?ve(`Suspense Fallback`):ve(`Suspense`);case 19:return ve(`SuspenseList`);case 0:case 15:return be(e.type,!1);case 11:return be(e.type.render,!1);case 1:return be(e.type,!0);case 31:return ve(`Activity`);default:return``}}function Se(e){try{var t=``,n=null;do t+=xe(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var Ce=Object.prototype.hasOwnProperty,we=n.unstable_scheduleCallback,Te=n.unstable_cancelCallback,Ee=n.unstable_shouldYield,De=n.unstable_requestPaint,I=n.unstable_now,Oe=n.unstable_getCurrentPriorityLevel,ke=n.unstable_ImmediatePriority,Ae=n.unstable_UserBlockingPriority,je=n.unstable_NormalPriority,Me=n.unstable_LowPriority,Ne=n.unstable_IdlePriority,Pe=n.log,Fe=n.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $e(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ar=un&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Lt(r)||(r=jr,`selectionStart`in r&&kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&wr(Nr,r)||(Nr=r,r=Ed(Mr,`onSelect`),0>=o,i-=o,Di=1<<32-ze(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),B&&ki(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=a(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),B&&ki(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return B&&ki(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),B&&ki(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Da(l)===r.type){n(e,r.sibling),c=i(r,a.props),Pa(c,a),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}a.type===y?(c=mi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=pi(a.type,a.key,a.props,null,e.mode,c),Pa(c,a),c.return=e,e=c)}return s(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=_i(a,e.mode,c),c.return=e,e=c}return s(e);case E:return a=Da(a),b(e,r,a,c)}if(A(a))return h(e,r,a,c);if(ne(a)){if(l=ne(a),typeof l!=`function`)throw Error(o(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Na(a),c);if(a.$$typeof===C)return b(e,r,ta(e,a),c);Fa(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=hi(a,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ma=0;var i=b(e,t,n,r);return ja=null,i}catch(t){if(t===xa||t===Ca)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function Wa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ka=!1;function qa(){if(Ka){var e=fa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===da&&(Ka=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:za=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(o(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=j.T,s={};j.T=s,Ps(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,ha(c,r),pu(e)):Ns(e,t,r,pu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(o(476));var i=Ts(e).queue;Ss(e,i,t,ae,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:ae},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},pu())}function Ds(){return ea(Qf)}function Os(){return Ao().memoizedState}function ks(){return Ao().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ha(n);var r=Ua(t,e,n);r!==null&&(hu(r,t,n),Wa(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=ri(e,t,n,r),n!==null&&(hu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,pu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Cr(s,o))return ni(e,t,i,0),q===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return hu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(o(479))}else t=ri(e,n,r,2),t!==null&&hu(t,e,2)}function Fs(e){var t=e.alternate;return e===V||t!==null&&t===V}function Is(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var Rs={readContext:ea,use:No,useCallback:U,useContext:U,useEffect:U,useImperativeHandle:U,useLayoutEffect:U,useInsertionEffect:U,useMemo:U,useReducer:U,useRef:U,useState:U,useDebugValue:U,useDeferredValue:U,useTransition:U,useSyncExternalStore:U,useId:U,useHostTransitionStatus:U,useFormState:U,useActionState:U,useOptimistic:U,useMemoCache:U,useCacheRefresh:U};Rs.useEffectEvent=U;var zs={readContext:ea,use:No,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:ea,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(go){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(go){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(ko(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,V,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,i=ko();if(B){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),q===null)throw Error(o(349));Y&127||Bo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ls(Ho.bind(null,r,a,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,a,n,t),null),n},useId:function(){var e=ko(),t=q.identifierPrefix;if(B){var n=Oi,r=Di;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}a[L]=t,a[ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)a.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return W(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(o(166));if(e=ue.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=R,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[L]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Li(t,!0)}else e=Bd(e).createTextNode(r),e[L]=t,t.stateNode=e}return W(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bi(t),n!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(557));e[L]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),e=!1}else n=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(o(558))}return W(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Bi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(o(317));i[L]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),i=!1}else i=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(co(t),t):(co(t),null)}return co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),W(t),null);case 4:return pe(),e===null&&Sd(t.stateNode.containerInfo),W(t),null;case 10:return Ji(t.type),W(t),null;case 19:if(N(lo),r=t.memoizedState,r===null)return W(t),null;if(i=!!(t.flags&128),a=r.rendering,a===null){if(i)Lc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=uo(e),a!==null){for(t.flags|=128,Lc(r,!1),e=a.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return P(lo,lo.current&1|2),B&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&I()>tu&&(t.flags|=128,i=!0,Lc(r,!1),t.lanes=4194304)}}else{if(!i){if(e=uo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!B)return W(t),null}else 2*I()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Lc(r,!1),t.lanes=4194304)}r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(W(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=I(),e.sibling=null,n=lo.current,P(lo,i?n&1|2:n&1),B&&ki(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&N(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ji(oa),W(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function zc(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(oa),pe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return he(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(o(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(lo),null;case 4:return pe(),null;case 10:return Ji(t.type),null;case 22:case 23:return co(t),to(),e!==null&&N(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ji(oa),null;case 25:return null;default:return null}}function Bc(e,t){switch(Mi(t),t.tag){case 3:Ji(oa),pe();break;case 26:case 27:case 5:he(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:N(lo);break;case 10:Ji(t.type);break;case 22:case 23:co(t),to(),e!==null&&N(_a);break;case 24:Ji(oa)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Z(e,e.return,t)}}}function Wc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ct]=t}catch(t){Z(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[L]=e,t[ct]=n}catch(t){Z(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Rd=sp,e=Or(e),kr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==a||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===a&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(a,r,n),a[L]=e,bt(a),r=a;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Er(s,h),v=Er(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,j.T=null,n=lu,lu=null;var a=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(o(331));var c=K;if(K|=4,Pl(a.current),El(a,a.current,s,n),K=c,id(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,a)}catch{}return!0}finally{M.p=i,j.T=r,Vu(e,t)}}function Wu(e,t,n){t=yi(n,t),t=Qs(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Qe(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=yi(n,e),n=$s(2),r=Ua(t,n,2),r!==null&&(ec(n,r,t,e),Qe(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>I()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Xe()),e=ii(e,t),e!==null&&(Qe(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return we(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=qe(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,ld(r,a))}r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=I(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=yt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);bt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=yt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),bt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=yt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),bt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ue.current)?gf(i):null;if(!i)throw Error(o(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=yt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=yt(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(jf(e)))&&!a._p&&(s.instance=a,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,s.state))),t&&r===null)throw Error(o(528,``));return s}if(t&&r!==null)throw Error(o(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=yt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Af(e){return`href="`+zt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),bt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+zt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,bt(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),bt(a);var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,bt(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),bt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(o(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{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=c()})),u=e(t(),1),d=l(),f=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,p=/^[\\/]{2}/;function m(e,t){return t+e.replace(/\\/g,`/`)}var h=`popstate`;function g(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function _(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return S(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:C(t)}return T(t,n,null,e)}function v(e,t){if(e===!1||e==null)throw Error(t)}function y(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function b(){return Math.random().toString(36).substring(2,10)}function x(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function S(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?w(t):t,state:n,key:t&&t.key||r||b(),mask:i}}function C({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function w(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function T(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:_.location,delta:t})}function f(e,t){s=`PUSH`;let r=g(e)?e:S(_.location,e,t);n&&n(r,e),l=u()+1;let d=x(r,l),f=_.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:_.location,delta:1})}function p(e,t){s=`REPLACE`;let r=g(e)?e:S(_.location,e,t);n&&n(r,e),l=u();let i=x(r,l),d=_.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:_.location,delta:0})}function m(e){return ee(i,e)}let _={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(h,d),c=e,()=>{i.removeEventListener(h,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return _}function ee(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),v(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:C(t);return i=i.replace(/ $/,`%20`),!n&&p.test(i)&&(i=r+i),new URL(i,r)}var te=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},E=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function D(e){return E.has(e)}var O=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function k(e){return O.has(e)}function ne(e){return e.index===!0}function re(e){let t={};return e.Component&&Object.assign(t,{element:u.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:u.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:u.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function ie(e,t=re,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(v(e.index!==!0||!e.children,`Cannot specify children on an index route`),v(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ne(e)){let n={...e,id:s};return r[s]=A(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=A(n,t(n)),e.children&&(n.children=ie(e.children,t,o,r,i)),n}})}function A(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function j(e,t,n=`/`){return M(e,t,n,!1)}function M(e,t,n,r,i){let a=Ce((typeof t==`string`?w(t):t).pathname||`/`,n);if(a==null)return null;let o=i??oe(e),s=null,c=Se(a);for(let e=0;s==null&&e{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;v(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Me([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(v(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),se(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ge(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=xe(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ce(e.path))a(e,t,!0,n)}),t}function ce(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ce(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function N(e){e.sort((e,t)=>e.score===t.score?_e(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var P=/^:[\w-]+$/,F=/^:[\w-]+/,le=3.5,ue=3,de=2,fe=1,pe=10,me=-2,he=e=>e===`*`;function ge(e,t){let n=e.split(`/`),r=n.length;return n.some(he)&&(r+=me),t&&(r+=de),n.filter(e=>!he(e)).reduce((e,t)=>e+(P.test(t)?ue:F.test(t)?le:t===``?fe:pe),r)}function _e(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ve(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function xe(e,t=!1,n=!0){y(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Se(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return y(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ce(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function we({basename:e,pathname:t}){return t===`/`?e:Me([e,t])}var Te=e=>f.test(e);function Ee(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?w(e):e,a;return n?(n=je(n),a=n.startsWith(`/`)?De(n.substring(1),`/`):De(n,t)):a=t,{pathname:a,search:Fe(r),hash:Ie(i)}}function De(e,t){let n=Ne(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function I(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Oe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ke(e){let t=Oe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ae(e,t,n,r=!1){let i;typeof e==`string`?i=w(e):(i={...e},v(!i.pathname||!i.pathname.includes(`?`),I(`?`,`pathname`,`search`,i)),v(!i.pathname||!i.pathname.includes(`#`),I(`#`,`pathname`,`hash`,i)),v(!i.search||!i.search.includes(`#`),I(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Ee(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var je=e=>e.replace(/[\\/]{2,}/g,`/`),Me=e=>je(e.join(`/`)),Ne=e=>e.replace(/\/+$/,``),Pe=e=>Ne(e).replace(/^\/*/,`/`),Fe=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ie=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Le=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Re=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ze(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Be(e){return Me(e.map(e=>e.route.path).filter(Boolean))||`/`}function Ve(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?w(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var He=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ue(e,t){let n=e;if(typeof n!=`string`||!f.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(He)try{let e=new URL(window.location.href),r=p.test(n)?new URL(m(n,e.protocol)):new URL(n),a=Ce(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{y(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var We=Symbol(`Uninstrumented`),Ge=new WeakMap;function Ke(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>Qe(await $e(n.lazy,void 0,()=>e(...t),et))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>Qe(await $e(n[`lazy.middleware`],void 0,()=>t(...e),et))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>Qe(await $e(n[`lazy.loader`],void 0,()=>t(...e),et))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>Qe(await $e(n[`lazy.action`],void 0,()=>t(...e),et))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=Je(t.loader),i=async(...t)=>Qe(await $e(n.loader,tt(t[0]),()=>e(...t),et));e.hydrate===!0&&(i.hydrate=!0),Ye(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=Je(t.action),i=async(...t)=>Qe(await $e(n.action,tt(t[0]),()=>e(...t),et));Ye(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=Je(e),r=async(...e)=>Qe(await $e(n.middleware,tt(e[0]),()=>t(...e),et));return Ye(r,t),r})),r}function qe(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=Je(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?C(i):`.`,...nt(e,a??{})};return Qe(await $e(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=Xe(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...et(e),meta:o})))};Ye(r,t),e.navigate=r}if(n.fetch.length>0){let t=Je(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return Qe(await $e(n.fetch,{href:o??`.`,fetcherKey:i,...nt(e,s??{})},async()=>{let n=Xe(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...et(e),meta:c})))};Ye(r,t),e.fetch=r}return e}function Je(e){return e[We]??e}function Ye(e,t){e[We]=t}function Xe(e,t){return Ge.set(e,t),()=>{Ge.get(e)===t&&Ge.delete(e)}}function Ze(e){let t=Ge.get(e);return Ge.delete(e),t}function Qe(e){if(e.type===`error`)throw e.value;return e.value}async function $e(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=$e(e,t,n,r,i,a-1),await s,v(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function et(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function tt(e){let{request:t,context:n,params:r}=e;return{...e,request:rt(t),params:{...r},context:it(n)}}function nt(e,t){return{currentUrl:C(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function rt(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function it(e){return{get:t=>e.get(t)}}var at=[`POST`,`PUT`,`PATCH`,`DELETE`],ot=new Set(at),st=[`GET`,...at],L=new Set(st),ct=new Set([301,302,303,307,308]),lt=new Set([307,308]),ut={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ft={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},pt=`remix-router-transitions`,mt=Symbol(`ResetLoaderData`),ht=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=oe(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=oe(e)}setHmrRoutes(e){this.#n=e,this.#r=oe(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function gt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;v(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...Ke(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new ht(ie(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Nt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,b=M(s.activeRoutes,e.history.location,c,!1,s.branches),x=!1,C=null,T,E;if(b==null&&!e.patchRoutesOnNavigation){let t=rn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=nn(s.activeRoutes);T=!0,E=!T,b=n,C={[r.id]:t}}else if(b&&!e.hydrationData&&L(b,s.activeRoutes,e.history.location.pathname).active&&(b=null),!b){T=!1,E=!T,b=[];let t=L(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(x=!0,b=t.matches)}else if(b.some(e=>e.route.lazy))T=!1,E=!T;else if(!b.some(e=>xt(e.route)))T=!0,E=!T;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=b;if(n){let e=b.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}E=!1,T=!0,r.forEach(e=>{let r=St(e.route,t,n);E||=r.renderFallback,T&&=!r.shouldLoad})}let D,O={historyAction:e.history.action,location:e.history.location,matches:b,initialized:T,renderFallback:E,navigation:ut,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},k=`POP`,ne=null,re=!1,A,j=!1,oe=new Map,se=null,ce=!1,N=!1,P=new Set,F=new Map,le=0,ue=-1,de=new Map,fe=new Set,pe=new Map,me=new Map,he=new Set,ge=new Map,_e,ve=null;function ye(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(_e){_e(),_e=void 0;return}y(ge.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=nt({currentLocation:O.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{_e=e});e.history.go(r*-1),tt(i,{state:`blocked`,location:n,proceed(){tt(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(O.blockers);e.set(i,ft),Se({blockers:e})}}),ne?.resolve(),ne=null;return}return I(t,n)}),n){kn(t,oe);let e=()=>An(t,oe);t.addEventListener(`pagehide`,e),se=()=>t.removeEventListener(`pagehide`,e)}return O.initialized||I(`POP`,O.location,{initialHydration:!0}),D}function be(){d&&d(),se&&se(),f.clear(),A&&A.abort(),O.fetchers.forEach((e,t)=>We(O.fetchers,t)),O.blockers.forEach((e,t)=>et(t))}function xe(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(O,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function Se(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),O={...O,...e};let n=[],r=[];O.fetchers.forEach((e,t)=>{e.state===`idle`&&(he.has(t)?n.push(t):r.push(t))}),he.forEach(e=>{!O.fetchers.has(e)&&!F.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(O,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>We(O.fetchers,e)),r.forEach(e=>O.fetchers.delete(e))}function we(t,n,{flushSync:r}={}){let i=O.actionData!=null&&O.navigation.formMethod!=null&&yn(O.navigation.formMethod)&&O.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?O.actionData:null;let o=n.loaderData?$t(O.loaderData,n.loaderData,n.matches||[],n.errors):O.loaderData,c=O.blockers;c.size>0&&!ce&&(c=new Map(c),c.forEach((e,t)=>c.set(t,ft)));let l=!ce&&st(t,n.matches||O.matches),u=re===!0||O.navigation.formMethod!=null&&yn(O.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ce||k===`POP`||(k===`PUSH`?e.history.push(t,t.state):k===`REPLACE`&&e.history.replace(t,t.state));let d;if(k===`POP`){let e=oe.get(O.location.pathname);e&&e.has(t.pathname)?d={currentLocation:O.location,nextLocation:t}:oe.has(t.pathname)&&(d={currentLocation:t,nextLocation:O.location})}else if(j){let e=oe.get(O.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),oe.set(O.location.pathname,e)),d={currentLocation:O.location,nextLocation:t}}Se({...n,actionData:a,loaderData:o,historyAction:k,location:t,initialized:!0,renderFallback:!1,navigation:ut,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),k=`POP`,re=!1,j=!1,ce=!1,N=!1,ne?.resolve(),ne=null,ve?.resolve(),ve=null}async function Ee(t,n){if(ne?.resolve(),ne=null,typeof t==`number`){ne||=jn();let n=ne.promise;return e.history.go(t),n}let r=Ze(D),{path:i,submission:a,error:o}=yt(!1,vt(O.location,O.matches,c,t,n?.fromRouteId,n?.relative),n),s;n?.mask&&(s={pathname:``,search:``,hash:``,...typeof n.mask==`string`?w(n.mask):{...O.location.mask,...n.mask}});let l=O.location,u=S(l,i,n&&n.state,void 0,s);u={...u,...e.history.encodeLocation(u)};let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&yn(a.formMethod)&&a.formAction===O.location.pathname+O.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=nt({currentLocation:l,nextLocation:u,historyAction:f});if(h){tt(h,{state:`blocked`,location:u,proceed(){tt(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),Ee(t,n)},reset(){let e=new Map(O.blockers);e.set(h,ft),Se({blockers:e})}});return}await I(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function De(){ve||=jn(),Re(),Se({revalidation:`loading`});let e=ve.promise;return O.navigation.state===`submitting`?e:O.navigation.state===`idle`?(I(O.historyAction,O.location,{startUninterruptedRevalidation:!0}),e):(I(k||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation,enableViewTransition:j===!0}),e)}async function I(t,n,r){A&&A.abort(),A=null,k=t,ce=(r&&r.startUninterruptedRevalidation)===!0,ot(O.location,O.matches),re=(r&&r.preventScrollReset)===!0,j=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&O.matches&&O.matches.length>0&&!x?O.matches:M(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&O.initialized&&!N&&sn(O.location,n)&&!(r&&r.submission&&yn(r.submission.formMethod))){we(n,{matches:a},{flushSync:o});return}let l=L(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),r?.instrumentationNavigateMetaReceiver){let t=Sn(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=rt(n.pathname);we(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;A=new AbortController;let d=Jt(e.history,n,A.signal,r&&r.submission),f=e.getContext?await e.getContext():new te,p;if(r&&r.pendingError)p=[tn(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&yn(r.submission.formMethod)){let i=await Oe(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(fn(t)&&ze(t.error)&&t.error.status===404){A=null,we(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=wn(n,a,t,r.submission),o=!1,l.active=!1,d=Jt(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await ke(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(A=null,we(n,{matches:h||a,...en(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Oe(t,n,i,l,u,d,f,p,m={}){if(Re(),Se({navigation:Tn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await ct(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=nn(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=tn(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=rt(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=xn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:rn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Ie(t,n,zt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(pn(h)){let n;return n=m&&m.replace!=null?m.replace:qt(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===O.location.pathname+O.location.search,await Fe(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(fn(h)){let e=tn(l,g.route.id);return(m&&m.replace)!==!0&&(k=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function ke(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||wn(n,i,l,p),x=p||m||Cn(b),S=!ce&&!g;if(d){if(S){let e=Ae(v);Se({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ct(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=nn(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=tn(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=rt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=bt(t,u,a,o,e.history,O,i,x,n,g?[]:r,g===!0,N,P,he,pe,fe,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(ue=++le,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(O.fetchers),t=Xe(e);return we(n,{matches:i,loaderData:{},errors:v&&fn(v[1])?{[v[0]]:v[1].error}:null,...en(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Ae(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=je(T)),Se(e,{flushSync:_})}T.forEach(e=>{Je(e.key),e.controller&&F.set(e.key,e.controller)});let ee=()=>T.forEach(e=>Je(e.key));A&&A.signal.addEventListener(`abort`,ee);let{loaderResults:te,fetcherResults:E}=await Le(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener(`abort`,ee),T.forEach(e=>F.delete(e.key));let D=an(te);if(D)return await Fe(t,D.result,!0,{replace:h}),{shortCircuited:!0};if(D=an(E),D)return fe.add(D.key),await Fe(t,D.result,!0,{replace:h}),{shortCircuited:!0};let k=new Map(O.fetchers),{loaderData:ne,errors:re}=Qt(O,i,te,v,T,E,k);g&&O.errors&&(re={...O.errors,...re});let ie=Xe(k),j=Qe(ue,k),M=ie||j||T.length>0;return{matches:i,loaderData:ne,errors:re,...M?{workingFetchers:k}:{}}}function Ae(e){if(e&&!fn(e[1]))return{[e[0]]:e[1].data};if(O.actionData)return Object.keys(O.actionData).length===0?null:O.actionData}function je(e){let t=new Map(O.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=En(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Me(t,n,r,i){Je(t);let a=(i&&i.flushSync)===!0,o=Ze(D),l=s.activeRoutes,u=vt(O.location,O.matches,c,r,n,i?.relative),d=M(l,u,c,!1,s.branches),f=L(d,l,u);if(f.active&&f.matches&&(d=f.matches),o&&o(Sn(e.history,u,d)),!d){Ve(t,n,rn(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=yt(!0,u,i);if(h){Ve(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new te,_=(i&&i.preventScrollReset)===!0;if(m&&yn(m.formMethod)){await Ne(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate);return}pe.set(t,{routeId:n,path:p}),await Pe(t,n,p,d,g,f.active,a,_,m)}async function Ne(t,n,i,l,u,d,f,p,m,h){Re(),pe.delete(t),Be(t,Dn(m,O.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Jt(e.history,i,g.signal,m);if(d){let e=await ct(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Ve(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{Ve(t,n,rn(404,{pathname:i}),{flushSync:f});return}}let y=xn(l,i);if(!y.route.action&&!y.route.lazy){Ve(t,n,rn(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}F.set(t,g);let b=le,x=zt(a,o,_,i,l,y,r,u),S=await Ie(_,i,x,u,t),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(_.signal.aborted){F.get(t)===g&&F.delete(t);return}if(he.has(t)){if(pn(C)||fn(C)){Be(t,On(void 0));return}}else{if(pn(C)){if(F.delete(t),ue>b){Be(t,On(void 0));return}return fe.add(t),Be(t,En(m)),Fe(_,C,!1,{fetcherSubmission:m,preventScrollReset:p})}if(fn(C)){Ve(t,n,C.error);return}}let w=O.navigation.location||O.location,T=Jt(e.history,w,g.signal),ee=s.activeRoutes,te=O.navigation.state===`idle`?O.matches:M(ee,O.navigation.location,c,!1,s.branches);v(te,`Didn't find any matches after fetcher action`);let E=++le;de.set(t,E);let{dsMatches:D,revalidatingFetchers:ne}=bt(T,u,a,o,e.history,O,te,m,w,r,!1,N,P,he,pe,fe,ee,c,e.patchRoutesOnNavigation!=null,s.branches,[y.route.id,C],h),re=En(m,C.data),ie=new Map(O.fetchers);ie.set(t,re),ne.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=ie.get(t),r=En(void 0,n?n.data:void 0);ie.set(t,r),Je(t),e.controller&&F.set(t,e.controller)}),Se({fetchers:ie});let j=()=>ne.forEach(e=>Je(e.key));g.signal.addEventListener(`abort`,j);let{loaderResults:ae,fetcherResults:oe}=await Le(D,ne,T,w,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,j),de.delete(t),F.delete(t),ne.forEach(e=>F.delete(e.key));let se=O.fetchers.has(t),ce=e=>{if(!se)return e;let n=new Map(e.fetchers);return n.set(t,On(C.data)),{...e,fetchers:n}},me=an(ae);if(me)return O=ce(O),Fe(T,me.result,!1,{preventScrollReset:p});if(me=an(oe),me)return fe.add(me.key),O=ce(O),Fe(T,me.result,!1,{preventScrollReset:p});let ge=new Map(O.fetchers);se&&ge.set(t,On(C.data));let{loaderData:_e,errors:ve}=Qt(O,te,ae,void 0,ne,oe,ge);Qe(E,ge),O.navigation.state===`loading`&&E>ue?(v(k,`Expected pending action`),A&&A.abort(),we(O.navigation.location,{matches:te,loaderData:_e,errors:ve,fetchers:ge})):(Se({errors:ve,loaderData:$t(O.loaderData,_e,te,ve),fetchers:ge}),N=!1)}async function Pe(t,n,i,s,c,l,u,d,f){let p=O.fetchers.get(t);Be(t,En(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Jt(e.history,i,m.signal);if(l){let e=await ct(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Ve(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{Ve(t,n,rn(404,{pathname:i}),{flushSync:u});return}}let g=xn(s,i);F.set(t,m);let _=le,v=await Ie(h,i,zt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(F.get(t)===m&&F.delete(t),!h.signal.aborted){if(he.has(t)){Be(t,On(void 0));return}if(pn(y)){if(ue>_){Be(t,On(void 0));return}fe.add(t),await Fe(h,y,!1,{preventScrollReset:d});return}if(fn(y)){Ve(t,n,y.error);return}Be(t,On(y.data))}}async function Fe(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(ne?.resolve(),ne=null),i.response.headers.has(`X-Remix-Revalidate`)&&(N=!0);let d=i.response.headers.get(`Location`);v(d,`Expected a Location header on the redirect Response`),d=qt(d,new URL(r.url),c,e.history);let f=S(O.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Te(d)){let n=ee(t,d,!0);e=n.origin!==t.location.origin||Ce(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}A=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=O.navigation;!o&&!s&&m&&h&&g&&(o=Cn(O.navigation));let _=o||s;lt.has(i.response.status)&&_&&yn(_.formMethod)?await I(p,f,{submission:{..._,formAction:d},preventScrollReset:l||re,enableViewTransition:a?j:void 0}):await I(p,f,{overrideNavigation:wn(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||re,enableViewTransition:a?j:void 0})}async function Ie(e,t,n,r,i){let a,o={};try{a=await Bt(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!yn(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!O.loaderData.hasOwnProperty(e.route.id)&&(!O.errors||!O.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(dn(r)){let i=r.result;o[t]={type:`redirect`,response:Wt(i,e,t,n,c)}}else o[t]=await Ut(r);return o}async function Le(e,t,n,r,i){let a=Ie(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Ie(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:rn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Re(){N=!0,pe.forEach((e,t)=>{F.has(t)&&P.add(t),Je(t)})}function Be(e,t,n={}){let r=new Map(O.fetchers);r.set(e,t),Se({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Ve(e,t,n,r={}){let i=tn(O.matches,t),a=new Map(O.fetchers);We(a,e),Se({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function He(e){return me.set(e,(me.get(e)||0)+1),he.has(e)&&he.delete(e),O.fetchers.get(e)||dt}function Ue(e,t){Je(e,t?.reason),Be(e,On(null))}function We(e,t){let n=O.fetchers.get(t);F.has(t)&&!(n&&n.state===`loading`&&de.has(t))&&Je(t),pe.delete(t),de.delete(t),fe.delete(t),he.delete(t),P.delete(t),e.delete(t)}function Ge(e){let t=(me.get(e)||0)-1;t<=0?(me.delete(e),he.add(e)):me.set(e,t),Se({fetchers:new Map(O.fetchers)})}function Je(e,t){let n=F.get(e);n&&(n.abort(t),F.delete(e))}function Ye(e,t){for(let n of e){let e=t.get(n);v(e,`Expected fetcher: ${n}`);let r=On(e.data);t.set(n,r)}}function Xe(e){let t=[],n=!1;for(let r of fe){let i=e.get(r);v(i,`Expected fetcher: ${r}`),i.state===`loading`&&(fe.delete(r),t.push(r),n=!0)}return Ye(t,e),n}function Qe(e,t){let n=[];for(let[r,i]of de)if(i0}function $e(e,t){let n=O.blockers.get(e)||ft;return ge.get(e)!==t&&ge.set(e,t),n}function et(e){O.blockers.delete(e),ge.delete(e)}function tt(e,t){let n=O.blockers.get(e)||ft;v(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(O.blockers);r.set(e,t),Se({blockers:r})}function nt({currentLocation:e,nextLocation:t,historyAction:n}){if(ge.size===0)return;ge.size>1&&y(!1,`A router only supports one blocker at a time`);let r=Array.from(ge.entries()),[i,a]=r[r.length-1],o=O.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function rt(e){let t=rn(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=nn(n);return{notFoundMatches:r,route:i,error:t}}function it(e,t,n){if(m=e,g=t,h=n||null,!_&&O.navigation===ut){_=!0;let e=st(O.location,O.matches);e!=null&&Se({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function at(e,t){return h&&h(e,t.map(e=>ae(e,O.loaderData)))||e.key}function ot(e,t){if(m&&g){let n=at(e,t);m[n]=g()}}function st(e,t){if(m){let n=at(e,t),r=m[n];if(typeof r==`number`)return r}return null}function L(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:M(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:M(n,r,c,!0,e)}}return{active:!1,matches:null}}async function ct(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||Et(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=M(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=M(s.activeRoutes,n,c,!0,u),!(f&&l.lengthe.route.id===t[n].route.id)}function mt(e){o={},s.setHmrRoutes(ie(e,a,void 0,o))}function gt(e,t,n=!1){Et(e,t,s,o,a,n),s.hasHMRRoutes||Se({})}return D={get basename(){return c},get future(){return u},get state(){return O},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:ye,subscribe:xe,enableScrollRestoration:it,navigate:Ee,fetch:Me,revalidate:De,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:He,resetFetcher:Ue,deleteFetcher:Ge,dispose:be,getBlocker:$e,deleteBlocker:et,patchRoutes:gt,_internalFetchControllers:F,_internalSetRoutes:mt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){Se(e)}},e.instrumentations&&(D=qe(D,e.instrumentations.map(e=>e.router).filter(Boolean))),D}function _t(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function vt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Ae(r||`.`,ke(o),Ce(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=bn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=we({basename:n,pathname:c.pathname})),C(c)}function yt(e,t,n){if(!n||!_t(n))return{path:t};if(n.formMethod&&!vn(n.formMethod))return{path:t,error:rn(405,{method:n.formMethod})};let r=()=>({path:t,error:rn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=on(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!yn(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!yn(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}v(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Yt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Yt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Xt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Xt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(yn(c.formMethod))return{path:t,submission:c};let l=w(t);return e&&l.search&&bn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:C(l),submission:c}}function bt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?fn(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&fn(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let ee=b?b[1].statusCode:void 0,te=ee&&ee>=400,E={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:ee},D=Be(o),O=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!xt(s))f=!1;else if(u){let{shouldLoad:e}=St(s,a.loaderData,a.errors);f=e}else Ct(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Rt(n,r,e,c,D,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:te?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?wt(a.matches[o],i)&&(p=!0):p=!0;let m={...E,defaultShouldRevalidate:p};return Rt(n,r,e,c,D,i,l,t,Tt(i,m),m,x)}),k=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=M(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;k.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=xn(b,e.path),C=new AbortController,w=Jt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=zt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=zt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!te&&d;let a={...E,defaultShouldRevalidate:i};Tt(S,a)&&(T=zt(n,r,w,e.path,b,S,l,t,a))}T&&k.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:O,revalidatingFetchers:k}}function xt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function St(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!xt(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function Ct(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function wt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Tt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Et(e,t,n,r,i,a){let o;if(e){let t=r[e];v(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Dt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ie(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;et.children?.some(t=>Dt(e,t)))??!1}var Ot=new WeakMap,kt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(v(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Ot.get(i);o||(o={},Ot.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=D(e),n=i[e]!==void 0;if(t)y(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)y(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},At=new WeakMap;function jt(e,t,n,r,i){let a=n[e.id];if(v(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=At.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{v(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=k(e),o=a[e]!==void 0;i?y(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?y(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return At.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=kt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Mt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Nt(e){return e.matches.some(e=>e.route.middleware)?Pt(e,()=>Mt(e)):Mt(e)}function Pt(e,t){return Ft(e,t,e=>{if(_n(e))throw e;return e},ln,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[tn(r,a).route.id]:{type:`error`,result:t}}}}}async function Ft(e,t,n,r,i){let{matches:a,...o}=e;return await It(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function It(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await It(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Lt(e,t,n,r,i){let a=kt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=jt(r.route,yn(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Rt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Lt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Tt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Tt(a,{...l,defaultShouldRevalidate:e}):Tt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!yn(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(yn(n.method)||!p)?Vt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function zt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Rt(e,t,n,r,Be(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Lt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Bt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Ve(t,n),pattern:Be(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Pt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Vt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=yn(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Ve(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw rn(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw rn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Ht(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Ut(e){let{result:t,type:n}=e;if(hn(t)){let e;try{e=await Ht(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Re(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?mn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:cn(t),statusCode:ze(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:ze(t)?t.status:void 0}:mn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Wt(e,t,n,r,i){let a=e.headers.get(`Location`);if(v(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Te(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=vt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Gt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Kt(e){try{return Gt.includes(new URL(e).protocol)}catch{return!1}}function qt(e,t,n,r){if(Te(e)){let r=e,i=p.test(r)?new URL(m(r,t.protocol)):new URL(r);if(Kt(i.toString()))throw Error(`Invalid redirect location`);let a=Ce(i.pathname,n)!=null;if(i.origin===t.origin&&a)return je(i.pathname)+i.search+i.hash}try{if(Kt(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Jt(e,t,n,r){let i=e.createURL(on(t)).toString(),a={signal:n};if(r&&yn(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?Yt(r.formData):r.formData}return new Request(i,a)}function Yt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Xt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Zt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&fn(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(v(!pn(f),`Cannot handle redirect results in processLoaderData`),fn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=tn(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=mt),c||(c=!0,s=ze(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Qt(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Zt(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(v(s,`Did not find corresponding fetcher result`),fn(s)){let t=tn(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(pn(s))v(!1,`Unhandled fetcher revalidation redirect`);else{let e=On(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function $t(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==mt).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function en(e){return e?fn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function tn(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function nn(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function rn(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Re(e||500,o,Error(s),!0)}function an(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(pn(r))return{key:n,result:r}}}function on(e){return C({...typeof e==`string`?w(e):e,hash:``})}function sn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function cn(e){return new Re(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function ln(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&un(t))}function un(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function dn(e){return hn(e.result)&&ct.has(e.result.status)}function fn(e){return e.type===`error`}function pn(e){return(e&&e.type)===`redirect`}function mn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function hn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function gn(e){return ct.has(e)}function _n(e){return hn(e)&&gn(e.status)&&e.headers.has(`Location`)}function vn(e){return L.has(e.toUpperCase())}function yn(e){return ot.has(e.toUpperCase())}function bn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function xn(e,t){let n=typeof t==`string`?w(t).search:t.search;if(e[e.length-1].route.index&&bn(n||``))return e[e.length-1];let r=Oe(e);return r[r.length-1]}function Sn(e,t,n){return{url:Ve(e.createURL(t),t),pattern:n?Be(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function Cn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function wn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Tn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function En(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Dn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function On(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function kn(e,t){try{let n=e.sessionStorage.getItem(pt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function An(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(pt,JSON.stringify(n))}catch(e){y(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function jn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Mn=u.createContext(null);Mn.displayName=`DataRouter`;var Nn=u.createContext(null);Nn.displayName=`DataRouterState`;var Pn=u.createContext(!1);function Fn(){return u.useContext(Pn)}var In=u.createContext({isTransitioning:!1});In.displayName=`ViewTransition`;var Ln=u.createContext(new Map);Ln.displayName=`Fetchers`;var Rn=u.createContext(null);Rn.displayName=`Await`;var zn=u.createContext(null);zn.displayName=`Navigation`;var Bn=u.createContext(null);Bn.displayName=`Location`;var Vn=u.createContext({outlet:null,matches:[],isDataRoute:!1});Vn.displayName=`Route`;var Hn=u.createContext(null);Hn.displayName=`RouteError`;var Un=`REACT_ROUTER_ERROR`,Wn=`REDIRECT`,Gn=`ROUTE_ERROR_RESPONSE`;function Kn(e){if(e.startsWith(`${Un}:${Wn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function qn(e){if(e.startsWith(`${Un}:${Gn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Re(t.status,t.statusText,t.data)}catch{}}function Jn(e,{relative:t}={}){v(Yn(),`useHref() may be used only in the context of a component.`);let{basename:n,navigator:r}=u.useContext(zn),{hash:i,pathname:a,search:o}=nr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Me([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Yn(){return u.useContext(Bn)!=null}function Xn(){return v(Yn(),`useLocation() may be used only in the context of a component.`),u.useContext(Bn).location}var Zn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Qn(){let{isDataRoute:e}=u.useContext(Vn);return e?vr():$n()}function $n(){v(Yn(),`useNavigate() may be used only in the context of a component.`);let e=u.useContext(Mn),{basename:t,navigator:n}=u.useContext(zn),{matches:r}=u.useContext(Vn),{pathname:i}=Xn(),a=JSON.stringify(ke(r)),o=u.useRef(!1);return u.useLayoutEffect(()=>{o.current=!0}),u.useCallback((r,s={})=>{if(y(o.current,Zn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ae(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Me([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var er=u.createContext(null);function tr(e){let t=u.useContext(Vn).outlet;return u.useMemo(()=>t&&u.createElement(er.Provider,{value:e},t),[t,e])}function nr(e,{relative:t}={}){let{matches:n}=u.useContext(Vn),{pathname:r}=Xn(),i=JSON.stringify(ke(n));return u.useMemo(()=>Ae(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function rr(e,t,n){v(Yn(),`useRoutes() may be used only in the context of a component.`);let{navigator:r}=u.useContext(zn),{matches:i}=u.useContext(Vn),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=Xn(),l;if(t){let e=typeof t==`string`?w(t):t;v(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let d=l.pathname||`/`,f=d;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):j(e,{pathname:f}),m=ur(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Me([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:Me([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&m?u.createElement(Bn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},m):m}function ir(){let e=_r(),t=ze(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return u.createElement(u.Fragment,null,u.createElement(`h2`,null,`Unexpected Application Error!`),u.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?u.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var ar=u.createElement(ir,null),or=class extends u.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Pn;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=qn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:u.createElement(Vn.Provider,{value:this.props.routeContext},u.createElement(Hn.Provider,{value:e,children:this.props.component}));return this.context?u.createElement(cr,{error:e},t):t}},sr=new WeakMap;function cr({children:e,error:t}){let{basename:n}=u.useContext(zn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Kn(t.digest);if(e){let r=sr.get(t);if(r)throw r;let i=Ue(e.location,n),a=i.absoluteURL||i.to;if(Kt(a))throw Error(`Invalid redirect location`);if(He&&!sr.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw sr.set(t,n),n}}return u.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function lr({routeContext:e,match:t,children:n}){let r=u.useContext(Mn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),u.createElement(Vn.Provider,{value:e},n)}function ur(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);v(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Be(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||ar,o&&(s<0&&c===0?(br(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===c&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?u.createElement(n.route.Component,null):n.route.element?n.route.element:e,u.createElement(lr,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?u.createElement(or,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function dr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fr(e){let t=u.useContext(Mn);return v(t,dr(e)),t}function pr(e){let t=u.useContext(Nn);return v(t,dr(e)),t}function mr(e){let t=u.useContext(Vn);return v(t,dr(e)),t}function hr(e){let t=mr(e),n=t.matches[t.matches.length-1];return v(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function gr(){return hr(`useRouteId`)}function _r(){let e=u.useContext(Hn),t=pr(`useRouteError`),n=hr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function vr(){let{router:e}=fr(`useNavigate`),t=hr(`useNavigate`),n=u.useRef(!1);return u.useLayoutEffect(()=>{n.current=!0}),u.useCallback(async(r,i={})=>{y(n.current,Zn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var yr={};function br(e,t,n){!t&&!yr[e]&&(yr[e]=!0,y(!1,n))}var xr={};function Sr(e,t){!e&&!xr[t]&&(xr[t]=!0,console.warn(t))}var Cr=[`HydrateFallback`,`hydrateFallbackElement`],wr=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Tr({router:e,flushSync:t,onError:n,useTransitions:r}){r=Fn()||r;let[i,a]=u.useState(e.state),[o,s]=(0,u.useOptimistic)(i),[c,l]=u.useState(),[d,f]=u.useState({isTransitioning:!1}),[p,m]=u.useState(),[h,g]=u.useState(),[_,v]=u.useState(),y=u.useRef(new Map),b=u.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:d,viewTransitionOpts:_})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Be(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),Sr(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Sr(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b){t&&d?t(()=>a(i)):r===!1?a(i):u.startTransition(()=>{r===!0&&s(e=>Er(e,i)),a(i)});return}if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),l(void 0),f({isTransitioning:!1})})}),t(()=>g(n));return}h?(p?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(l(i),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,r,s,n]);u.useLayoutEffect(()=>e.subscribe(b),[e,b]),u.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new wr)},[d]),u.useEffect(()=>{if(p&&c&&e.window){let t=c,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):u.startTransition(()=>{r===!0&&s(e=>Er(e,t)),a(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),l(void 0),f({isTransitioning:!1})}),g(i)}},[c,p,e.window,r,s]),u.useEffect(()=>{p&&c&&o.location.key===c.location.key&&p.resolve()},[p,h,o.location,c]),u.useEffect(()=>{!d.isTransitioning&&_&&(l(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let x=u.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=u.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return u.createElement(u.Fragment,null,u.createElement(Mn.Provider,{value:C},u.createElement(Nn.Provider,{value:o},u.createElement(Ln.Provider,{value:y.current},u.createElement(In.Provider,{value:d},u.createElement(Ar,{basename:S,location:o.location,navigationType:o.historyAction,navigator:x,useTransitions:r},u.createElement(Dr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Er(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Dr=u.memo(Or);function Or({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return rr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function kr(e){return tr(e.context)}function Ar({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){v(!Yn(),`You cannot render a inside another . You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=u.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=w(n));let{pathname:l=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=u.useMemo(()=>{let e=Ce(l,s);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[s,l,d,f,p,m,r,h]);return y(g!=null,` is not able to match the URL "${l}${d}${f}" because it does not start with the basename, so the won't render anything.`),g==null?null:u.createElement(zn.Provider,{value:c},u.createElement(Bn.Provider,{children:t,value:g}))}u.Component;var jr=`application/x-www-form-urlencoded`;function Mr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Nr(e){return Mr(e)&&e.tagName.toLowerCase()===`button`}function Pr(e){return Mr(e)&&e.tagName.toLowerCase()===`form`}function Fr(e){return Mr(e)&&e.tagName.toLowerCase()===`input`}function Ir(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Lr(e,t){return e.button===0&&(!t||t===`_self`)&&!Ir(e)}var Rr=null;function zr(){if(Rr===null)try{new FormData(document.createElement(`form`),0),Rr=!1}catch{Rr=!0}return Rr}var Br=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Vr(e){return e!=null&&!Br.has(e)?(y(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${jr}"`),null):e}function Hr(e,t){let n,r,i,a,o;if(Pr(e)){let o=e.getAttribute(`action`);r=o?Ce(o,t):null,n=e.getAttribute(`method`)||`get`,i=Vr(e.getAttribute(`enctype`))||jr,a=new FormData(e)}else if(Nr(e)||Fr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a