@simoncomputing/mui-bueno-v3 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +33 -0
  3. package/dist/@types/index.d.ts +192 -0
  4. package/dist/common/TestUtils/reactHookForms.d.ts +54 -0
  5. package/dist/common/TestUtils/renderWithReactHookForm.d.ts +7 -0
  6. package/dist/common/Utils/index.d.ts +65 -0
  7. package/dist/common/WindowDimensions/WindowDimensions.d.ts +26 -0
  8. package/dist/components/Alerts/Alert.d.ts +30 -0
  9. package/dist/components/Alerts/ErrorAlert.d.ts +4 -0
  10. package/dist/components/Alerts/InfoAlert.d.ts +4 -0
  11. package/dist/components/Alerts/SuccessAlert.d.ts +4 -0
  12. package/dist/components/Alerts/WarningAlert.d.ts +4 -0
  13. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +10 -0
  14. package/dist/components/Buttons/Button/Button.d.ts +24 -0
  15. package/dist/components/Buttons/ScrollToTop/ScrollToTop.d.ts +14 -0
  16. package/dist/components/Buttons/Submit/Submit.d.ts +11 -0
  17. package/dist/components/Form/Error/Error.d.ts +23 -0
  18. package/dist/components/Form/FormDebugger/FormDebugger.d.ts +8 -0
  19. package/dist/components/Form/Inputs/Autocomplete/Autocomplete.d.ts +81 -0
  20. package/dist/components/Form/Inputs/Autocomplete/DynamicAutocomplete/DynamicAutocomplete.d.ts +31 -0
  21. package/dist/components/Form/Inputs/Autocomplete/MultiAutocomplete/MultiAutocomplete.d.ts +22 -0
  22. package/dist/components/Form/Inputs/Autocomplete/utils.d.ts +2 -0
  23. package/dist/components/Form/Inputs/Checkbox/Checkbox.d.ts +58 -0
  24. package/dist/components/Form/Inputs/CheckboxGroup/CheckboxGroup.d.ts +112 -0
  25. package/dist/components/Form/Inputs/CitationField/CitationBubbleMenuHandler.d.ts +43 -0
  26. package/dist/components/Form/Inputs/CitationField/CitationField.d.ts +78 -0
  27. package/dist/components/Form/Inputs/CitationField/CitationMenu/AttachmentForm.d.ts +13 -0
  28. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationBubbleMenu.d.ts +25 -0
  29. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationForm.d.ts +12 -0
  30. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationMenu.d.ts +62 -0
  31. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationTable.d.ts +16 -0
  32. package/dist/components/Form/Inputs/CitationField/CitationNode.d.ts +2 -0
  33. package/dist/components/Form/Inputs/CitationField/CitationNodeComponent.d.ts +7 -0
  34. package/dist/components/Form/Inputs/CitationField/CitationRefreshContext/CitationRefreshContext.d.ts +29 -0
  35. package/dist/components/Form/Inputs/CitationField/MenuButtonEditCitation.d.ts +3 -0
  36. package/dist/components/Form/Inputs/DateField/DateField.d.ts +73 -0
  37. package/dist/components/Form/Inputs/DateField/DateRangeField/DateRangeField.d.ts +62 -0
  38. package/dist/components/Form/Inputs/DateField/dayjs-utils.d.ts +2 -0
  39. package/dist/components/Form/Inputs/FileUpload/FileList/FileList.d.ts +13 -0
  40. package/dist/components/Form/Inputs/FileUpload/FileUpload.d.ts +62 -0
  41. package/dist/components/Form/Inputs/Location/Location.d.ts +69 -0
  42. package/dist/components/Form/Inputs/Location/Location.types.d.ts +85 -0
  43. package/dist/components/Form/Inputs/Location/LocationOption.d.ts +38 -0
  44. package/dist/components/Form/Inputs/RadioGroup/RadioGroup.d.ts +119 -0
  45. package/dist/components/Form/Inputs/RangeSlider/RangeSlider.d.ts +34 -0
  46. package/dist/components/Form/Inputs/RichTextField/RichTextControls.d.ts +6 -0
  47. package/dist/components/Form/Inputs/RichTextField/RichTextField.d.ts +56 -0
  48. package/dist/components/Form/Inputs/RichTextField/SuggestionList.d.ts +8 -0
  49. package/dist/components/Form/Inputs/RichTextField/mentionSuggestionOptions.d.ts +6 -0
  50. package/dist/components/Form/Inputs/RichTextField/useExtensions.d.ts +10 -0
  51. package/dist/components/Form/Inputs/SearchField/SearchField.d.ts +16 -0
  52. package/dist/components/Form/Inputs/Select/Select.d.ts +91 -0
  53. package/dist/components/Form/Inputs/Switch/Switch.d.ts +61 -0
  54. package/dist/components/Form/Inputs/TextField/TextField.d.ts +60 -0
  55. package/dist/components/Form/MForm/MForm.d.ts +19 -0
  56. package/dist/components/Form/MForm/useMyForm.d.ts +1 -0
  57. package/dist/components/Form/RepeatableFormGroup/RepeatableFormGroup.d.ts +89 -0
  58. package/dist/components/Form/Stepper/Stepper.d.ts +27 -0
  59. package/dist/components/Layout/MGrid/MGrid.d.ts +13 -0
  60. package/dist/components/Layout/MPanel/MPanel.d.ts +13 -0
  61. package/dist/components/Layout/MStack/MStack.d.ts +6 -0
  62. package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +22 -0
  63. package/dist/components/Modals/AlertModal/AlertModal.d.ts +11 -0
  64. package/dist/components/Modals/ConfirmationModal/ConfirmationModal.d.ts +26 -0
  65. package/dist/components/Modals/DecisionModal/DecisionModal.d.ts +37 -0
  66. package/dist/components/Modals/Modal.d.ts +45 -0
  67. package/dist/components/Navigation/Footer/Footer.d.ts +31 -0
  68. package/dist/components/Navigation/Header/DarkModeToggle/DarkModeToggle.d.ts +13 -0
  69. package/dist/components/Navigation/Header/Drawer.d.ts +18 -0
  70. package/dist/components/Navigation/Header/EnvironmentBanner.d.ts +4 -0
  71. package/dist/components/Navigation/Header/Header.d.ts +63 -0
  72. package/dist/components/Navigation/Header/ProfileMenu.d.ts +8 -0
  73. package/dist/components/Navigation/MenuButton/MenuButton.d.ts +9 -0
  74. package/dist/components/Navigation/NavBar/FloatingNavBar/FloatingNavBar.d.ts +24 -0
  75. package/dist/components/Navigation/NavBar/NavBar.d.ts +24 -0
  76. package/dist/components/Navigation/Sidebar/Sidebar.d.ts +14 -0
  77. package/dist/components/Navigation/Tabs/Tabs.d.ts +19 -0
  78. package/dist/components/PageHeader/PageHeader.d.ts +27 -0
  79. package/dist/components/SingleActionCard/SingleActionCard.d.ts +26 -0
  80. package/dist/components/Snackbar/Snackbar.d.ts +28 -0
  81. package/dist/components/Table/ExpandableRow/ExpandableRow.d.ts +16 -0
  82. package/dist/components/Table/PaginatedTable.d.ts +44 -0
  83. package/dist/components/Table/Table.d.ts +129 -0
  84. package/dist/index.cjs.js +410 -0
  85. package/dist/index.css +1 -0
  86. package/dist/index.d.ts +112 -0
  87. package/dist/index.es.js +63994 -0
  88. package/dist/index.umd.js +411 -0
  89. package/dist/styles/3-theme/ThemeDemo.d.ts +3 -0
  90. package/dist/styles/3-theme/theme.d.ts +16 -0
  91. package/dist/styles/theme.d.ts +33 -0
  92. package/package.json +140 -0
@@ -0,0 +1,411 @@
1
+ (function(Be,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("@mui/material"),require("react/jsx-runtime"),require("react"),require("react-router-dom"),require("@emotion/styled"),require("@emotion/react"),require("formik"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","@mui/material","react/jsx-runtime","react","react-router-dom","@emotion/styled","@emotion/react","formik","react-dom"],$):(Be=typeof globalThis<"u"?globalThis:Be||self,$(Be["mui-bueno-v3"]={},Be.MaterialUI,Be["react/jsx-runtime"],Be.React,Be.ReactRouterDom,Be.EmotionStyled,Be.EmotionReact,Be.Formik,Be.ReactDom))})(this,function(Be,$,v,q,vo,dB,xo,Na,Ls){"use strict";var Qhe=Object.defineProperty;var ege=(Be,$,v)=>$ in Be?Qhe(Be,$,{enumerable:!0,configurable:!0,writable:!0,value:v}):Be[$]=v;var fd=(Be,$,v)=>ege(Be,typeof $!="symbol"?$+"":$,v);var p$,h$,g$,m$,y$,b$,v$,x$,S$,w$,C$,_$,T$,k$,E$,O$,M$,A$,I$,D$,P$,N$,L$,$$;var Cw=document.createElement("style");Cw.textContent=`@import url(https://use.typekit.net/kac7fuq.css).sort-icon-asc{-moz-transform: scale(1,-1); -o-transform: scale(1,-1); -webkit-transform: scale(1,-1); transform: scale(1,-1);}.loading-page{width:100%;height:80%;display:flex;flex-direction:column;align-items:center;justify-content:center}.loading-page .text-content{display:flex;flex-direction:column}.citation-link,.selected-citation-link{vertical-align:super;font-size:smaller;padding:0 4px}.selected-citation-link{background-color:#e6e6e6}.citation-link:hover,.selected-citation-link:hover{cursor:pointer}.MuiTiptap-ControlledBubbleMenu-root{z-index:1300!important}
2
+ /*$vite$:1*/`,document.head.appendChild(Cw);function _w(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const P=_w(q),fB=_w(Ls),ue={breakpoints_xs:"0px",breakpoints_sm:"600px",breakpoints_md:"960px",breakpoints_lg:"1100px",breakpoints_xl:"1536px",light_palette_primary_light:"#4c98d7",light_palette_primary_main:"#005ea2",light_palette_primary_dark:"#1a4480",light_palette_secondary_light:"#9bb672",light_palette_secondary_main:"#607f35",light_palette_secondary_dark:"#3c4a29",light_palette_text_primary:"rgba(0, 0, 0, 0.8705882353)",light_palette_text_secondary:"rgba(0, 0, 0, 0.6)",light_palette_text_disabled:"rgba(0, 0, 0, 0.3803921569)",light_palette_error_light:"#dc5b52",light_palette_error_main:"#d83933",light_palette_error_dark:"#b50909",light_palette_warning_light:"#ffbe2e",light_palette_warning_main:"#e5a000",light_palette_warning_dark:"#c2850c",light_palette_info_light:"#4c98d7",light_palette_info_main:"#005ea2",light_palette_info_dark:"#1a4480",light_palette_success_light:"#9bb672",light_palette_success_main:"#607f35",light_palette_success_dark:"#3c4a29",light_palette_background_default:"#f9f9f9",light_palette_background_paper:"#fff",light_palette_background_appBar:"#252f3e",light_palette_divider_default:"#c9c9c9",dark_palette_primary_light:"#98cbfb",dark_palette_primary_main:"#4c98d7",dark_palette_primary_dark:"#005ea2",dark_palette_secondary_light:"#b8d293",dark_palette_secondary_main:"#9bb672",dark_palette_secondary_dark:"#607f35",dark_palette_text_primary:"#fff",dark_palette_text_secondary:"rgba(255, 255, 255, 0.7019607843)",dark_palette_text_disabled:"rgba(255, 255, 255, 0.5019607843)",dark_palette_error_light:"#f1928b",dark_palette_error_main:"#dc5b52",dark_palette_error_dark:"#d83933",dark_palette_warning_light:"#ffe396",dark_palette_warning_main:"#ffbe2e",dark_palette_warning_dark:"#e5a000",dark_palette_info_light:"#98cbfb",dark_palette_info_main:"#4c98d7",dark_palette_info_dark:"#005ea2",dark_palette_success_light:"#b8d293",dark_palette_success_main:"#9bb672",dark_palette_success_dark:"#607f35",dark_palette_background_default:"#121212",dark_palette_background_paper:"#1b1b1b",dark_palette_background_appBar:"#252f3e",dark_palette_divider_default:"#2e2e2e",common_palette_grey_50:"#f0f0f0",common_palette_grey_100:"#e6e6e6",common_palette_grey_200:"#c9c9c9",common_palette_grey_300:"#adadad",common_palette_grey_400:"#919191",common_palette_grey_500:"#757575",common_palette_grey_600:"#5c5c5c",common_palette_grey_700:"#454545",common_palette_grey_800:"#2e2e2e",common_palette_grey_900:"#1b1b1b",common_palette_grey_A100:"#e6e6e6",common_palette_grey_A200:"#c9c9c9",common_palette_grey_A400:"#919191",common_palette_grey_A700:"#454545",common_palette_common_white:"#fff",common_palette_common_black:"#000",shadows_1:"2px 2px 5px 0px rgba(0, 0, 0, 0.05)",shadows_2:"2px 2px 7px 0px rgba(0, 0, 0, 0.075)",shadows_3:"2px 3px 7px 0px rgba(0, 0, 0, 0.075), 0px 1px 10px 0px rgba(0, 0, 0, 0.05)",shadows_4:"2px 4px 8px 0px rgba(0, 0, 0, 0.075), 0px 1px 12px 0px rgba(0, 0, 0, 0.075)",shadows_5:"2px 5px 8px 0px rgba(0, 0, 0, 0.075), 0px 2px 14px 0px rgba(0, 0, 0, 0.1)",shadows_6:"2px 6px 10px 0px rgba(0, 0, 0, 0.1), 0px 2px 18px 0px rgba(0, 0, 0, 0.1)",shadows_7:"2px 7px 10px 1px rgba(0, 0, 0, 0.1), 0px 2px 16px 1px rgba(0, 0, 0, 0.12)",shadows_8:"2px 8px 10px 1px rgba(0, 0, 0, 0.1), 0px 3px 14px 2px rgba(0, 0, 0, 0.12)",shadows_9:"2px 9px 12px 1px rgba(0, 0, 0, 0.1), 0px 3px 16px 2px rgba(0, 0, 0, 0.12)",shadows_10:"2px 10px 14px 1px rgba(0, 0, 0, 0.12), 0px 4px 18px 3px rgba(0, 0, 0, 0.12)",shadows_11:"2px 11px 15px 1px rgba(0, 0, 0, 0.12), 0px 4px 20px 3px rgba(0, 0, 0, 0.12)",shadows_12:"2px 12px 17px 2px rgba(0, 0, 0, 0.12), 0px 5px 22px 4px rgba(0, 0, 0, 0.12)",shadows_13:"2px 13px 19px 2px rgba(0, 0, 0, 0.12), 0px 5px 24px 4px rgba(0, 0, 0, 0.12)",shadows_14:"2px 14px 21px 2px rgba(0, 0, 0, 0.12), 0px 5px 26px 4px rgba(0, 0, 0, 0.12)",shadows_15:"2px 15px 22px 2px rgba(0, 0, 0, 0.12), 0px 6px 28px 5px rgba(0, 0, 0, 0.12)",shadows_16:"2px 16px 24px 2px rgba(0, 0, 0, 0.12), 0px 6px 30px 5px rgba(0, 0, 0, 0.12)",shadows_17:"2px 17px 26px 2px rgba(0, 0, 0, 0.14), 0px 6px 32px 5px rgba(0, 0, 0, 0.12)",shadows_18:"2px 18px 28px 2px rgba(0, 0, 0, 0.14), 0px 7px 34px 6px rgba(0, 0, 0, 0.12)",shadows_19:"2px 19px 29px 2px rgba(0, 0, 0, 0.14), 0px 7px 36px 6px rgba(0, 0, 0, 0.12)",shadows_20:"2px 20px 31px 3px rgba(0, 0, 0, 0.14), 0px 8px 38px 7px rgba(0, 0, 0, 0.12)",shadows_21:"2px 21px 33px 3px rgba(0, 0, 0, 0.14), 0px 8px 40px 7px rgba(0, 0, 0, 0.12)",shadows_22:"2px 22px 35px 3px rgba(0, 0, 0, 0.14), 0px 8px 42px 7px rgba(0, 0, 0, 0.12)",shadows_23:"2px 23px 36px 3px rgba(0, 0, 0, 0.14), 0px 9px 44px 8px rgba(0, 0, 0, 0.12)",shadows_24:"2px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12)",shape_borderRadius:"3px",shape_borderWidth:"1px",shape_buttonBorderWidth:"2px",typography_fontFamily_default:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h1_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h1_fontWeight:"700",typography_h1_fontSize:"2rem",typography_h1_lineHeight:"normal",typography_h1_letterSpacing:"normal",typography_h2_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h2_fontWeight:"700",typography_h2_fontSize:"1.75rem",typography_h2_lineHeight:"normal",typography_h2_letterSpacing:"normal",typography_h3_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h3_fontWeight:"700",typography_h3_fontSize:"1.5rem",typography_h3_lineHeight:"normal",typography_h3_letterSpacing:"normal",typography_h4_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h4_fontWeight:"700",typography_h4_fontSize:"1.35rem",typography_h4_lineHeight:"normal",typography_h4_letterSpacing:"normal",typography_h5_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h5_fontWeight:"700",typography_h5_fontSize:"1.25rem",typography_h5_lineHeight:"normal",typography_h5_letterSpacing:"normal",typography_h6_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h6_fontWeight:"700",typography_h6_fontSize:"1.1rem",typography_h6_lineHeight:"normal",typography_h6_letterSpacing:"normal",typography_subtitle1_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_subtitle1_fontWeight:"600",typography_subtitle1_fontSize:"1.25rem",typography_subtitle1_lineHeight:"normal",typography_subtitle1_letterSpacing:"normal",typography_subtitle2_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_subtitle2_fontWeight:"600",typography_subtitle2_fontSize:"1.125rem",typography_subtitle2_lineHeight:"normal",typography_subtitle2_letterSpacing:"normal",typography_body1_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_body1_fontWeight:"400",typography_body1_fontSize:"1.125rem",typography_body1_lineHeight:"normal",typography_body1_letterSpacing:"normal",typography_body2_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_body2_fontWeight:"400",typography_body2_fontSize:"1rem",typography_body2_lineHeight:"normal",typography_body2_letterSpacing:"normal",typography_button_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_button_fontWeight:"600",typography_button_fontSize:"1rem",typography_button_lineHeight:"normal",typography_button_letterSpacing:"normal",typography_caption_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_caption_fontWeight:"400",typography_caption_fontSize:"0.75rem",typography_caption_lineHeight:"normal",typography_caption_letterSpacing:"normal",typography_overline_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_overline_fontWeight:"400",typography_overline_fontSize:"0.75rem",typography_overline_lineHeight:"normal",typography_overline_letterSpacing:"normal"},In={breakpoints:{values:{xs:parseInt(ue.breakpoints_xs),sm:parseInt(ue.breakpoints_sm),md:parseInt(ue.breakpoints_md),lg:parseInt(ue.breakpoints_lg),xl:parseInt(ue.breakpoints_xl)}},shadows:["none",ue.shadows_1,ue.shadows_2,ue.shadows_3,ue.shadows_4,ue.shadows_5,ue.shadows_6,ue.shadows_7,ue.shadows_8,ue.shadows_9,ue.shadows_10,ue.shadows_11,ue.shadows_12,ue.shadows_13,ue.shadows_14,ue.shadows_15,ue.shadows_16,ue.shadows_17,ue.shadows_18,ue.shadows_19,ue.shadows_20,ue.shadows_21,ue.shadows_22,ue.shadows_23,ue.shadows_24],shape:{borderRadius:parseInt(ue.shape_borderRadius)},typography:{fontFamily:ue.typography_fontFamily_default,h1:{fontFamily:ue.typography_h1_fontFamily,fontWeight:parseInt(ue.typography_h1_fontWeight),fontSize:ue.typography_h1_fontSize,lineHeight:ue.typography_h1_lineHeight,letterSpacing:ue.typography_h1_letterSpacing},h2:{fontFamily:ue.typography_h2_fontFamily,fontWeight:parseInt(ue.typography_h2_fontWeight),fontSize:ue.typography_h2_fontSize,lineHeight:ue.typography_h2_lineHeight,letterSpacing:ue.typography_h2_letterSpacing},h3:{fontFamily:ue.typography_h3_fontFamily,fontWeight:parseInt(ue.typography_h3_fontWeight),fontSize:ue.typography_h3_fontSize,lineHeight:ue.typography_h3_lineHeight,letterSpacing:ue.typography_h3_letterSpacing},h4:{fontFamily:ue.typography_h4_fontFamily,fontWeight:parseInt(ue.typography_h4_fontWeight),fontSize:ue.typography_h4_fontSize,lineHeight:ue.typography_h4_lineHeight,letterSpacing:ue.typography_h4_letterSpacing},h5:{fontFamily:ue.typography_h5_fontFamily,fontWeight:parseInt(ue.typography_h5_fontWeight),fontSize:ue.typography_h5_fontSize,lineHeight:ue.typography_h5_lineHeight,letterSpacing:ue.typography_h5_letterSpacing},h6:{fontFamily:ue.typography_h6_fontFamily,fontWeight:parseInt(ue.typography_h6_fontWeight),fontSize:ue.typography_h6_fontSize,lineHeight:ue.typography_h6_lineHeight,letterSpacing:ue.typography_h6_letterSpacing},subtitle1:{fontFamily:ue.typography_subtitle1_fontFamily,fontWeight:parseInt(ue.typography_subtitle1_fontWeight),fontSize:ue.typography_subtitle1_fontSize,lineHeight:ue.typography_subtitle1_lineHeight,letterSpacing:ue.typography_subtitle1_letterSpacing},subtitle2:{fontFamily:ue.typography_subtitle2_fontFamily,fontWeight:parseInt(ue.typography_subtitle2_fontWeight),fontSize:ue.typography_subtitle2_fontSize,lineHeight:ue.typography_subtitle2_lineHeight,letterSpacing:ue.typography_subtitle2_letterSpacing},body1:{fontFamily:ue.typography_body1_fontFamily,fontWeight:parseInt(ue.typography_body1_fontWeight),fontSize:ue.typography_body1_fontSize,lineHeight:ue.typography_body1_lineHeight,letterSpacing:ue.typography_body1_letterSpacing},body2:{fontFamily:ue.typography_body2_fontFamily,fontWeight:parseInt(ue.typography_body2_fontWeight),fontSize:ue.typography_body2_fontSize,lineHeight:ue.typography_body2_lineHeight,letterSpacing:ue.typography_body2_letterSpacing},button:{fontFamily:ue.typography_button_fontFamily,fontWeight:parseInt(ue.typography_button_fontWeight),fontSize:ue.typography_button_fontSize,lineHeight:ue.typography_button_lineHeight,letterSpacing:ue.typography_button_letterSpacing,textTransform:"none"},caption:{fontFamily:ue.typography_caption_fontFamily,fontWeight:parseInt(ue.typography_caption_fontWeight),fontSize:ue.typography_caption_fontSize,lineHeight:ue.typography_caption_lineHeight,letterSpacing:ue.typography_caption_letterSpacing},overline:{fontFamily:ue.typography_overline_fontFamily,fontWeight:parseInt(ue.typography_overline_fontWeight),fontSize:ue.typography_overline_fontSize,lineHeight:ue.typography_overline_lineHeight,letterSpacing:ue.typography_overline_letterSpacing}},palette:{grey:{50:ue.common_palette_grey_50,100:ue.common_palette_grey_100,200:ue.common_palette_grey_200,300:ue.common_palette_grey_300,400:ue.common_palette_grey_400,500:ue.common_palette_grey_500,600:ue.common_palette_grey_600,700:ue.common_palette_grey_700,800:ue.common_palette_grey_800,900:ue.common_palette_grey_900,A100:ue.common_palette_grey_A100,A200:ue.common_palette_grey_A200,A400:ue.common_palette_grey_A400,A700:ue.common_palette_grey_A700},common:{black:ue.common_palette_common_black,white:ue.common_palette_common_white},white:ue.common_palette_common_white},components:{MuiCard:{defaultProps:{elevation:0},styleOverrides:{root:{borderStyle:"solid",borderWidth:ue.shape_borderWidth}}},MuiAppBar:{styleOverrides:{root:{backgroundImage:"none"}}},MuiButton:{styleOverrides:{outlined:{borderWidth:ue.shape_buttonBorderWidth,":hover":{borderWidth:ue.shape_buttonBorderWidth}}}},MuiTable:{styleOverrides:{root:({ownerState:t})=>({...t.size==="x-small"&&{"& .MuiTableCell-root":{padding:"0px 16px"}}})}}}},pB=$.createTheme({...In,palette:{...In.palette,mode:"light",primary:{light:ue.light_palette_primary_light,main:ue.light_palette_primary_main,dark:ue.light_palette_primary_dark},secondary:{light:ue.light_palette_secondary_light,main:ue.light_palette_secondary_main,dark:ue.light_palette_secondary_dark},text:{primary:ue.light_palette_text_primary,secondary:ue.light_palette_text_secondary,disabled:ue.light_palette_text_disabled},background:{default:ue.light_palette_background_default,paper:ue.light_palette_background_paper},error:{light:ue.light_palette_error_light,main:ue.light_palette_error_main,dark:ue.light_palette_error_dark},success:{light:ue.light_palette_success_light,main:ue.light_palette_success_main,dark:ue.light_palette_success_dark},info:{light:ue.light_palette_info_light,main:ue.light_palette_info_main,dark:ue.light_palette_info_dark},warning:{light:ue.light_palette_warning_light,main:ue.light_palette_warning_main,dark:ue.light_palette_warning_dark}},components:{...In.components,MuiAppBar:{...(p$=In.components)==null?void 0:p$.MuiAppBar,styleOverrides:{...(g$=(h$=In.components)==null?void 0:h$.MuiAppBar)==null?void 0:g$.styleOverrides,root:{...(b$=(y$=(m$=In.components)==null?void 0:m$.MuiAppBar)==null?void 0:y$.styleOverrides)==null?void 0:b$.root,backgroundColor:ue.light_palette_background_appBar}}},MuiCard:{...(v$=In.components)==null?void 0:v$.MuiCard,styleOverrides:{...(S$=(x$=In.components)==null?void 0:x$.MuiCard)==null?void 0:S$.styleOverrides,root:{...(_$=(C$=(w$=In.components)==null?void 0:w$.MuiCard)==null?void 0:C$.styleOverrides)==null?void 0:_$.root,borderColor:ue.light_palette_divider_default}}}}}),hB=$.createTheme({...In,palette:{...In.palette,mode:"dark",primary:{light:ue.dark_palette_primary_light,main:ue.dark_palette_primary_main,dark:ue.dark_palette_primary_dark},secondary:{light:ue.dark_palette_secondary_light,main:ue.dark_palette_secondary_main,dark:ue.dark_palette_secondary_dark},text:{primary:ue.dark_palette_text_primary,secondary:ue.dark_palette_text_secondary,disabled:ue.dark_palette_text_disabled},background:{default:ue.dark_palette_background_default,paper:ue.dark_palette_background_paper},error:{light:ue.dark_palette_error_light,main:ue.dark_palette_error_main,dark:ue.dark_palette_error_dark},success:{light:ue.dark_palette_success_light,main:ue.dark_palette_success_main,dark:ue.dark_palette_success_dark},info:{light:ue.dark_palette_info_light,main:ue.dark_palette_info_main,dark:ue.dark_palette_info_dark},warning:{light:ue.dark_palette_warning_light,main:ue.dark_palette_warning_main,dark:ue.dark_palette_warning_dark}},components:{...In.components,MuiAppBar:{...(T$=In.components)==null?void 0:T$.MuiAppBar,styleOverrides:{...(E$=(k$=In.components)==null?void 0:k$.MuiAppBar)==null?void 0:E$.styleOverrides,root:{...(A$=(M$=(O$=In.components)==null?void 0:O$.MuiAppBar)==null?void 0:M$.styleOverrides)==null?void 0:A$.root,backgroundColor:ue.dark_palette_background_appBar,backgroundImage:"none"}}},MuiCard:{...(I$=In.components)==null?void 0:I$.MuiCard,styleOverrides:{...(P$=(D$=In.components)==null?void 0:D$.MuiCard)==null?void 0:P$.styleOverrides,root:{...($$=(L$=(N$=In.components)==null?void 0:N$.MuiCard)==null?void 0:L$.styleOverrides)==null?void 0:$$.root,borderColor:ue.dark_palette_divider_default}}}}});var ec=t=>t.type==="checkbox",$s=t=>t instanceof Date,sr=t=>t==null;const Tw=t=>typeof t=="object";var xn=t=>!sr(t)&&!Array.isArray(t)&&Tw(t)&&!$s(t),kw=t=>xn(t)&&t.target?ec(t.target)?t.target.checked:t.target.value:t,gB=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,Ew=(t,e)=>t.has(gB(e)),mB=t=>{const e=t.constructor&&t.constructor.prototype;return xn(e)&&e.hasOwnProperty("isPrototypeOf")},Dg=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Jt(t){let e;const n=Array.isArray(t),r=typeof FileList<"u"?t instanceof FileList:!1;if(t instanceof Date)e=new Date(t);else if(!(Dg&&(t instanceof Blob||r))&&(n||xn(t)))if(e=n?[]:{},!n&&!mB(t))e=t;else for(const o in t)t.hasOwnProperty(o)&&(e[o]=Jt(t[o]));else return t;return e}var pd=t=>/^\w*$/.test(t),Xt=t=>t===void 0,hd=t=>Array.isArray(t)?t.filter(Boolean):[],Pg=t=>hd(t.replace(/["|']|\]/g,"").split(/\.|\[/)),Fe=(t,e,n)=>{if(!e||!xn(t))return n;const r=(pd(e)?[e]:Pg(e)).reduce((o,i)=>sr(o)?o:o[i],t);return Xt(r)||r===t?Xt(t[e])?n:t[e]:r},Pr=t=>typeof t=="boolean",Ot=(t,e,n)=>{let r=-1;const o=pd(e)?[e]:Pg(e),i=o.length,s=i-1;for(;++r<i;){const a=o[r];let l=n;if(r!==s){const u=t[a];l=xn(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;t[a]=l,t=t[a]}};const gd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Kr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ii={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ng=q.createContext(null);Ng.displayName="HookFormContext";const an=()=>q.useContext(Ng),yB=t=>{const{children:e,...n}=t;return q.createElement(Ng.Provider,{value:n},e)};var Ow=(t,e,n,r=!0)=>{const o={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(o,i,{get:()=>{const s=i;return e._proxyFormState[s]!==Kr.all&&(e._proxyFormState[s]=!r||Kr.all),n&&(n[s]=!0),t[s]}});return o};const md=typeof window<"u"?P.useLayoutEffect:P.useEffect;function bB(t){const e=an(),{control:n=e.control,disabled:r,name:o,exact:i}=t||{},[s,a]=q.useState(n._formState),l=q.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return md(()=>n._subscribe({name:o,formState:l.current,exact:i,callback:u=>{!r&&a({...n._formState,...u})}}),[o,r,i]),q.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),q.useMemo(()=>Ow(s,n,l.current,!1),[s,n])}var $o=t=>typeof t=="string",Mw=(t,e,n,r,o)=>$o(t)?(r&&e.watch.add(t),Fe(n,t,o)):Array.isArray(t)?t.map(i=>(r&&e.watch.add(i),Fe(n,i))):(r&&(e.watchAll=!0),n);function yd(t){const e=an(),{control:n=e.control,name:r,defaultValue:o,disabled:i,exact:s}=t||{},a=q.useRef(o),[l,u]=q.useState(n._getWatch(r,a.current));return md(()=>n._subscribe({name:r,formState:{values:!0},exact:s,callback:f=>!i&&u(Mw(r,n._names,f.values||n._formValues,!1,a.current))}),[r,n,i,s]),q.useEffect(()=>n._removeUnmounted()),l}function vB(t){const e=an(),{name:n,disabled:r,control:o=e.control,shouldUnregister:i}=t,s=Ew(o._names.array,n),a=yd({control:o,name:n,defaultValue:Fe(o._formValues,n,Fe(o._defaultValues,n,t.defaultValue)),exact:!0}),l=bB({control:o,name:n,exact:!0}),u=q.useRef(t),f=q.useRef(o.register(n,{...t.rules,value:a,...Pr(t.disabled)?{disabled:t.disabled}:{}})),p=q.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Fe(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!Fe(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Fe(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Fe(l.validatingFields,n)},error:{enumerable:!0,get:()=>Fe(l.errors,n)}}),[l,n]),g=q.useCallback(x=>f.current.onChange({target:{value:kw(x),name:n},type:gd.CHANGE}),[n]),m=q.useCallback(()=>f.current.onBlur({target:{value:Fe(o._formValues,n),name:n},type:gd.BLUR}),[n,o._formValues]),b=q.useCallback(x=>{const w=Fe(o._fields,n);w&&x&&(w._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:T=>x.setCustomValidity(T),reportValidity:()=>x.reportValidity()})},[o._fields,n]),y=q.useMemo(()=>({name:n,value:a,...Pr(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:g,onBlur:m,ref:b}),[n,r,l.disabled,g,m,b,a]);return q.useEffect(()=>{const x=o._options.shouldUnregister||i;o.register(n,{...u.current.rules,...Pr(u.current.disabled)?{disabled:u.current.disabled}:{}});const w=(T,_)=>{const C=Fe(o._fields,T);C&&C._f&&(C._f.mount=_)};if(w(n,!0),x){const T=Jt(Fe(o._options.defaultValues,n));Ot(o._defaultValues,n,T),Xt(Fe(o._formValues,n))&&Ot(o._formValues,n,T)}return!s&&o.register(n),()=>{(s?x&&!o._state.action:x)?o.unregister(n):w(n,!1)}},[n,o,s,i]),q.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),q.useMemo(()=>({field:y,formState:l,fieldState:p}),[y,l,p])}const Xn=t=>t.render(vB(t));var Aw=(t,e,n,r,o)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:o||!0}}:{},vr=t=>Array.isArray(t)?t:[t],Iw=()=>{let t=[];return{get observers(){return t},next:o=>{for(const i of t)i.next&&i.next(o)},subscribe:o=>(t.push(o),{unsubscribe:()=>{t=t.filter(i=>i!==o)}}),unsubscribe:()=>{t=[]}}},Lg=t=>sr(t)||!Tw(t);function ji(t,e,n=new WeakSet){if(Lg(t)||Lg(e))return t===e;if($s(t)&&$s(e))return t.getTime()===e.getTime();const r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const i of r){const s=t[i];if(!o.includes(i))return!1;if(i!=="ref"){const a=e[i];if($s(s)&&$s(a)||xn(s)&&xn(a)||Array.isArray(s)&&Array.isArray(a)?!ji(s,a,n):s!==a)return!1}}return!0}var ar=t=>xn(t)&&!Object.keys(t).length,$g=t=>t.type==="file",So=t=>typeof t=="function",bd=t=>{if(!Dg)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Dw=t=>t.type==="select-multiple",Fg=t=>t.type==="radio",xB=t=>Fg(t)||ec(t),Rg=t=>bd(t)&&t.isConnected;function SB(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=Xt(t)?r++:t[e[r++]];return t}function wB(t){for(const e in t)if(t.hasOwnProperty(e)&&!Xt(t[e]))return!1;return!0}function Sn(t,e){const n=Array.isArray(e)?e:pd(e)?[e]:Pg(e),r=n.length===1?t:SB(t,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(xn(r)&&ar(r)||Array.isArray(r)&&wB(r))&&Sn(t,n.slice(0,-1)),t}var Pw=t=>{for(const e in t)if(So(t[e]))return!0;return!1};function vd(t,e={}){const n=Array.isArray(t);if(xn(t)||n)for(const r in t)Array.isArray(t[r])||xn(t[r])&&!Pw(t[r])?(e[r]=Array.isArray(t[r])?[]:{},vd(t[r],e[r])):sr(t[r])||(e[r]=!0);return e}function Nw(t,e,n){const r=Array.isArray(t);if(xn(t)||r)for(const o in t)Array.isArray(t[o])||xn(t[o])&&!Pw(t[o])?Xt(e)||Lg(n[o])?n[o]=Array.isArray(t[o])?vd(t[o],[]):{...vd(t[o])}:Nw(t[o],sr(e)?{}:e[o],n[o]):n[o]=!ji(t[o],e[o]);return n}var tc=(t,e)=>Nw(t,e,vd(e));const Lw={value:!1,isValid:!1},$w={value:!0,isValid:!0};var Fw=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Xt(t[0].attributes.value)?Xt(t[0].value)||t[0].value===""?$w:{value:t[0].value,isValid:!0}:$w:Lw}return Lw},Rw=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>Xt(t)?t:e?t===""?NaN:t&&+t:n&&$o(t)?new Date(t):r?r(t):t;const Bw={isValid:!1,value:null};var Vw=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,Bw):Bw;function zw(t){const e=t.ref;return $g(e)?e.files:Fg(e)?Vw(t.refs).value:Dw(e)?[...e.selectedOptions].map(({value:n})=>n):ec(e)?Fw(t.refs).value:Rw(Xt(e.value)?t.ref.value:e.value,t)}var CB=(t,e,n,r)=>{const o={};for(const i of t){const s=Fe(e,i);s&&Ot(o,i,s._f)}return{criteriaMode:n,names:[...t],fields:o,shouldUseNativeValidation:r}},xd=t=>t instanceof RegExp,nc=t=>Xt(t)?t:xd(t)?t.source:xn(t)?xd(t.value)?t.value.source:t.value:t,La=t=>({isOnSubmit:!t||t===Kr.onSubmit,isOnBlur:t===Kr.onBlur,isOnChange:t===Kr.onChange,isOnAll:t===Kr.all,isOnTouch:t===Kr.onTouched});const Hw="AsyncFunction";var _B=t=>!!t&&!!t.validate&&!!(So(t.validate)&&t.validate.constructor.name===Hw||xn(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===Hw)),TB=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),Bg=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const $a=(t,e,n,r)=>{for(const o of n||Object.keys(t)){const i=Fe(t,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&e(s.refs[0],o)&&!r)return!0;if(s.ref&&e(s.ref,s.name)&&!r)return!0;if($a(a,e))break}else if(xn(a)&&$a(a,e))break}}};function jw(t,e,n){const r=Fe(t,n);if(r||pd(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=Fe(e,i),a=Fe(t,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};if(a&&a.root&&a.root.type)return{name:`${i}.root`,error:a.root};o.pop()}return{name:n}}var kB=(t,e,n,r)=>{n(t);const{name:o,...i}=t;return ar(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(s=>e[s]===(!r||Kr.all))},EB=(t,e,n)=>!t||!e||t===e||vr(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r))),OB=(t,e,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(e||t):(n?r.isOnBlur:o.isOnBlur)?!t:(n?r.isOnChange:o.isOnChange)?t:!0,MB=(t,e)=>!hd(Fe(t,e)).length&&Sn(t,e),Ww=(t,e,n)=>{const r=vr(Fe(t,n));return Ot(r,"root",e[n]),Ot(t,n,r),t},Sd=t=>$o(t);function qw(t,e,n="validate"){if(Sd(t)||Array.isArray(t)&&t.every(Sd)||Pr(t)&&!t)return{type:n,message:Sd(t)?t:"",ref:e}}var Fa=t=>xn(t)&&!xd(t)?t:{value:t,message:""},Vg=async(t,e,n,r,o,i)=>{const{ref:s,refs:a,required:l,maxLength:u,minLength:f,min:p,max:g,pattern:m,validate:b,name:y,valueAsNumber:x,mount:w}=t._f,T=Fe(n,y);if(!w||e.has(y))return{};const _=a?a[0]:s,C=F=>{o&&_.reportValidity&&(_.setCustomValidity(Pr(F)?"":F||""),_.reportValidity())},E={},M=Fg(s),A=ec(s),I=M||A,L=(x||$g(s))&&Xt(s.value)&&Xt(T)||bd(s)&&s.value===""||T===""||Array.isArray(T)&&!T.length,O=Aw.bind(null,y,r,E),D=(F,V,z,R=ii.maxLength,B=ii.minLength)=>{const U=F?V:z;E[y]={type:F?R:B,message:U,ref:s,...O(F?R:B,U)}};if(i?!Array.isArray(T)||!T.length:l&&(!I&&(L||sr(T))||Pr(T)&&!T||A&&!Fw(a).isValid||M&&!Vw(a).isValid)){const{value:F,message:V}=Sd(l)?{value:!!l,message:l}:Fa(l);if(F&&(E[y]={type:ii.required,message:V,ref:_,...O(ii.required,V)},!r))return C(V),E}if(!L&&(!sr(p)||!sr(g))){let F,V;const z=Fa(g),R=Fa(p);if(!sr(T)&&!isNaN(T)){const B=s.valueAsNumber||T&&+T;sr(z.value)||(F=B>z.value),sr(R.value)||(V=B<R.value)}else{const B=s.valueAsDate||new Date(T),U=G=>new Date(new Date().toDateString()+" "+G),K=s.type=="time",Y=s.type=="week";$o(z.value)&&T&&(F=K?U(T)>U(z.value):Y?T>z.value:B>new Date(z.value)),$o(R.value)&&T&&(V=K?U(T)<U(R.value):Y?T<R.value:B<new Date(R.value))}if((F||V)&&(D(!!F,z.message,R.message,ii.max,ii.min),!r))return C(E[y].message),E}if((u||f)&&!L&&($o(T)||i&&Array.isArray(T))){const F=Fa(u),V=Fa(f),z=!sr(F.value)&&T.length>+F.value,R=!sr(V.value)&&T.length<+V.value;if((z||R)&&(D(z,F.message,V.message),!r))return C(E[y].message),E}if(m&&!L&&$o(T)){const{value:F,message:V}=Fa(m);if(xd(F)&&!T.match(F)&&(E[y]={type:ii.pattern,message:V,ref:s,...O(ii.pattern,V)},!r))return C(V),E}if(b){if(So(b)){const F=await b(T,n),V=qw(F,_);if(V&&(E[y]={...V,...O(ii.validate,V.message)},!r))return C(V.message),E}else if(xn(b)){let F={};for(const V in b){if(!ar(F)&&!r)break;const z=qw(await b[V](T,n),_,V);z&&(F={...z,...O(V,z.message)},C(z.message),r&&(E[y]=F))}if(!ar(F)&&(E[y]={ref:_,...F},!r))return E}}return C(!0),E};const AB={mode:Kr.onSubmit,reValidateMode:Kr.onChange,shouldFocusError:!0};function IB(t={}){let e={...AB,...t},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:So(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},o=xn(e.defaultValues)||xn(e.values)?Jt(e.defaultValues||e.values)||{}:{},i=e.shouldUnregister?{}:Jt(o),s={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let p={...f};const g={array:Iw(),state:Iw()},m=e.criteriaMode===Kr.all,b=W=>te=>{clearTimeout(u),u=setTimeout(W,te)},y=async W=>{if(!e.disabled&&(f.isValid||p.isValid||W)){const te=e.resolver?ar((await A()).errors):await L(r,!0);te!==n.isValid&&g.state.next({isValid:te})}},x=(W,te)=>{!e.disabled&&(f.isValidating||f.validatingFields||p.isValidating||p.validatingFields)&&((W||Array.from(a.mount)).forEach(re=>{re&&(te?Ot(n.validatingFields,re,te):Sn(n.validatingFields,re))}),g.state.next({validatingFields:n.validatingFields,isValidating:!ar(n.validatingFields)}))},w=(W,te=[],re,Me,Ie=!0,De=!0)=>{if(Me&&re&&!e.disabled){if(s.action=!0,De&&Array.isArray(Fe(r,W))){const je=re(Fe(r,W),Me.argA,Me.argB);Ie&&Ot(r,W,je)}if(De&&Array.isArray(Fe(n.errors,W))){const je=re(Fe(n.errors,W),Me.argA,Me.argB);Ie&&Ot(n.errors,W,je),MB(n.errors,W)}if((f.touchedFields||p.touchedFields)&&De&&Array.isArray(Fe(n.touchedFields,W))){const je=re(Fe(n.touchedFields,W),Me.argA,Me.argB);Ie&&Ot(n.touchedFields,W,je)}(f.dirtyFields||p.dirtyFields)&&(n.dirtyFields=tc(o,i)),g.state.next({name:W,isDirty:D(W,te),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ot(i,W,te)},T=(W,te)=>{Ot(n.errors,W,te),g.state.next({errors:n.errors})},_=W=>{n.errors=W,g.state.next({errors:n.errors,isValid:!1})},C=(W,te,re,Me)=>{const Ie=Fe(r,W);if(Ie){const De=Fe(i,W,Xt(re)?Fe(o,W):re);Xt(De)||Me&&Me.defaultChecked||te?Ot(i,W,te?De:zw(Ie._f)):z(W,De),s.mount&&y()}},E=(W,te,re,Me,Ie)=>{let De=!1,je=!1;const ot={name:W};if(!e.disabled){if(!re||Me){(f.isDirty||p.isDirty)&&(je=n.isDirty,n.isDirty=ot.isDirty=D(),De=je!==ot.isDirty);const nt=ji(Fe(o,W),te);je=!!Fe(n.dirtyFields,W),nt?Sn(n.dirtyFields,W):Ot(n.dirtyFields,W,!0),ot.dirtyFields=n.dirtyFields,De=De||(f.dirtyFields||p.dirtyFields)&&je!==!nt}if(re){const nt=Fe(n.touchedFields,W);nt||(Ot(n.touchedFields,W,re),ot.touchedFields=n.touchedFields,De=De||(f.touchedFields||p.touchedFields)&&nt!==re)}De&&Ie&&g.state.next(ot)}return De?ot:{}},M=(W,te,re,Me)=>{const Ie=Fe(n.errors,W),De=(f.isValid||p.isValid)&&Pr(te)&&n.isValid!==te;if(e.delayError&&re?(l=b(()=>T(W,re)),l(e.delayError)):(clearTimeout(u),l=null,re?Ot(n.errors,W,re):Sn(n.errors,W)),(re?!ji(Ie,re):Ie)||!ar(Me)||De){const je={...Me,...De&&Pr(te)?{isValid:te}:{},errors:n.errors,name:W};n={...n,...je},g.state.next(je)}},A=async W=>{x(W,!0);const te=await e.resolver(i,e.context,CB(W||a.mount,r,e.criteriaMode,e.shouldUseNativeValidation));return x(W),te},I=async W=>{const{errors:te}=await A(W);if(W)for(const re of W){const Me=Fe(te,re);Me?Ot(n.errors,re,Me):Sn(n.errors,re)}else n.errors=te;return te},L=async(W,te,re={valid:!0})=>{for(const Me in W){const Ie=W[Me];if(Ie){const{_f:De,...je}=Ie;if(De){const ot=a.array.has(De.name),nt=Ie._f&&_B(Ie._f);nt&&f.validatingFields&&x([Me],!0);const At=await Vg(Ie,a.disabled,i,m,e.shouldUseNativeValidation&&!te,ot);if(nt&&f.validatingFields&&x([Me]),At[De.name]&&(re.valid=!1,te))break;!te&&(Fe(At,De.name)?ot?Ww(n.errors,At,De.name):Ot(n.errors,De.name,At[De.name]):Sn(n.errors,De.name))}!ar(je)&&await L(je,te,re)}}return re.valid},O=()=>{for(const W of a.unMount){const te=Fe(r,W);te&&(te._f.refs?te._f.refs.every(re=>!Rg(re)):!Rg(te._f.ref))&&de(W)}a.unMount=new Set},D=(W,te)=>!e.disabled&&(W&&te&&Ot(i,W,te),!ji(G(),o)),F=(W,te,re)=>Mw(W,a,{...s.mount?i:Xt(te)?o:$o(W)?{[W]:te}:te},re,te),V=W=>hd(Fe(s.mount?i:o,W,e.shouldUnregister?Fe(o,W,[]):[])),z=(W,te,re={})=>{const Me=Fe(r,W);let Ie=te;if(Me){const De=Me._f;De&&(!De.disabled&&Ot(i,W,Rw(te,De)),Ie=bd(De.ref)&&sr(te)?"":te,Dw(De.ref)?[...De.ref.options].forEach(je=>je.selected=Ie.includes(je.value)):De.refs?ec(De.ref)?De.refs.forEach(je=>{(!je.defaultChecked||!je.disabled)&&(Array.isArray(Ie)?je.checked=!!Ie.find(ot=>ot===je.value):je.checked=Ie===je.value||!!Ie)}):De.refs.forEach(je=>je.checked=je.value===Ie):$g(De.ref)?De.ref.value="":(De.ref.value=Ie,De.ref.type||g.state.next({name:W,values:Jt(i)})))}(re.shouldDirty||re.shouldTouch)&&E(W,Ie,re.shouldTouch,re.shouldDirty,!0),re.shouldValidate&&Y(W)},R=(W,te,re)=>{for(const Me in te){if(!te.hasOwnProperty(Me))return;const Ie=te[Me],De=W+"."+Me,je=Fe(r,De);(a.array.has(W)||xn(Ie)||je&&!je._f)&&!$s(Ie)?R(De,Ie,re):z(De,Ie,re)}},B=(W,te,re={})=>{const Me=Fe(r,W),Ie=a.array.has(W),De=Jt(te);Ot(i,W,De),Ie?(g.array.next({name:W,values:Jt(i)}),(f.isDirty||f.dirtyFields||p.isDirty||p.dirtyFields)&&re.shouldDirty&&g.state.next({name:W,dirtyFields:tc(o,i),isDirty:D(W,De)})):Me&&!Me._f&&!sr(De)?R(W,De,re):z(W,De,re),Bg(W,a)&&g.state.next({...n}),g.state.next({name:s.mount?W:void 0,values:Jt(i)})},U=async W=>{s.mount=!0;const te=W.target;let re=te.name,Me=!0;const Ie=Fe(r,re),De=nt=>{Me=Number.isNaN(nt)||$s(nt)&&isNaN(nt.getTime())||ji(nt,Fe(i,re,nt))},je=La(e.mode),ot=La(e.reValidateMode);if(Ie){let nt,At;const _n=te.type?zw(Ie._f):kw(W),ut=W.type===gd.BLUR||W.type===gd.FOCUS_OUT,Pn=!TB(Ie._f)&&!e.resolver&&!Fe(n.errors,re)&&!Ie._f.deps||OB(ut,Fe(n.touchedFields,re),n.isSubmitted,ot,je),$t=Bg(re,a,ut);Ot(i,re,_n),ut?(Ie._f.onBlur&&Ie._f.onBlur(W),l&&l(0)):Ie._f.onChange&&Ie._f.onChange(W);const pe=E(re,_n,ut),We=!ar(pe)||$t;if(!ut&&g.state.next({name:re,type:W.type,values:Jt(i)}),Pn)return(f.isValid||p.isValid)&&(e.mode==="onBlur"?ut&&y():ut||y()),We&&g.state.next({name:re,...$t?{}:pe});if(!ut&&$t&&g.state.next({...n}),e.resolver){const{errors:Ae}=await A([re]);if(De(_n),Me){const qe=jw(n.errors,r,re),Xe=jw(Ae,r,qe.name||re);nt=Xe.error,re=Xe.name,At=ar(Ae)}}else x([re],!0),nt=(await Vg(Ie,a.disabled,i,m,e.shouldUseNativeValidation))[re],x([re]),De(_n),Me&&(nt?At=!1:(f.isValid||p.isValid)&&(At=await L(r,!0)));Me&&(Ie._f.deps&&Y(Ie._f.deps),M(re,At,nt,pe))}},K=(W,te)=>{if(Fe(n.errors,te)&&W.focus)return W.focus(),1},Y=async(W,te={})=>{let re,Me;const Ie=vr(W);if(e.resolver){const De=await I(Xt(W)?W:Ie);re=ar(De),Me=W?!Ie.some(je=>Fe(De,je)):re}else W?(Me=(await Promise.all(Ie.map(async De=>{const je=Fe(r,De);return await L(je&&je._f?{[De]:je}:je)}))).every(Boolean),!(!Me&&!n.isValid)&&y()):Me=re=await L(r);return g.state.next({...!$o(W)||(f.isValid||p.isValid)&&re!==n.isValid?{}:{name:W},...e.resolver||!W?{isValid:re}:{},errors:n.errors}),te.shouldFocus&&!Me&&$a(r,K,W?Ie:a.mount),Me},G=W=>{const te={...s.mount?i:o};return Xt(W)?te:$o(W)?Fe(te,W):W.map(re=>Fe(te,re))},Z=(W,te)=>({invalid:!!Fe((te||n).errors,W),isDirty:!!Fe((te||n).dirtyFields,W),error:Fe((te||n).errors,W),isValidating:!!Fe(n.validatingFields,W),isTouched:!!Fe((te||n).touchedFields,W)}),ge=W=>{W&&vr(W).forEach(te=>Sn(n.errors,te)),g.state.next({errors:W?n.errors:{}})},he=(W,te,re)=>{const Me=(Fe(r,W,{_f:{}})._f||{}).ref,Ie=Fe(n.errors,W)||{},{ref:De,message:je,type:ot,...nt}=Ie;Ot(n.errors,W,{...nt,...te,ref:Me}),g.state.next({name:W,errors:n.errors,isValid:!1}),re&&re.shouldFocus&&Me&&Me.focus&&Me.focus()},me=(W,te)=>So(W)?g.state.subscribe({next:re=>W(F(void 0,te),re)}):F(W,te,!0),oe=W=>g.state.subscribe({next:te=>{EB(W.name,te.name,W.exact)&&kB(te,W.formState||f,_e,W.reRenderRoot)&&W.callback({values:{...i},...n,...te})}}).unsubscribe,ye=W=>(s.mount=!0,p={...p,...W.formState},oe({...W,formState:p})),de=(W,te={})=>{for(const re of W?vr(W):a.mount)a.mount.delete(re),a.array.delete(re),te.keepValue||(Sn(r,re),Sn(i,re)),!te.keepError&&Sn(n.errors,re),!te.keepDirty&&Sn(n.dirtyFields,re),!te.keepTouched&&Sn(n.touchedFields,re),!te.keepIsValidating&&Sn(n.validatingFields,re),!e.shouldUnregister&&!te.keepDefaultValue&&Sn(o,re);g.state.next({values:Jt(i)}),g.state.next({...n,...te.keepDirty?{isDirty:D()}:{}}),!te.keepIsValid&&y()},X=({disabled:W,name:te})=>{(Pr(W)&&s.mount||W||a.disabled.has(te))&&(W?a.disabled.add(te):a.disabled.delete(te))},Q=(W,te={})=>{let re=Fe(r,W);const Me=Pr(te.disabled)||Pr(e.disabled);return Ot(r,W,{...re||{},_f:{...re&&re._f?re._f:{ref:{name:W}},name:W,mount:!0,...te}}),a.mount.add(W),re?X({disabled:Pr(te.disabled)?te.disabled:e.disabled,name:W}):C(W,!0,te.value),{...Me?{disabled:te.disabled||e.disabled}:{},...e.progressive?{required:!!te.required,min:nc(te.min),max:nc(te.max),minLength:nc(te.minLength),maxLength:nc(te.maxLength),pattern:nc(te.pattern)}:{},name:W,onChange:U,onBlur:U,ref:Ie=>{if(Ie){Q(W,te),re=Fe(r,W);const De=Xt(Ie.value)&&Ie.querySelectorAll&&Ie.querySelectorAll("input,select,textarea")[0]||Ie,je=xB(De),ot=re._f.refs||[];if(je?ot.find(nt=>nt===De):De===re._f.ref)return;Ot(r,W,{_f:{...re._f,...je?{refs:[...ot.filter(Rg),De,...Array.isArray(Fe(o,W))?[{}]:[]],ref:{type:De.type,name:W}}:{ref:De}}}),C(W,!1,void 0,De)}else re=Fe(r,W,{}),re._f&&(re._f.mount=!1),(e.shouldUnregister||te.shouldUnregister)&&!(Ew(a.array,W)&&s.action)&&a.unMount.add(W)}}},ae=()=>e.shouldFocusError&&$a(r,K,a.mount),ve=W=>{Pr(W)&&(g.state.next({disabled:W}),$a(r,(te,re)=>{const Me=Fe(r,re);Me&&(te.disabled=Me._f.disabled||W,Array.isArray(Me._f.refs)&&Me._f.refs.forEach(Ie=>{Ie.disabled=Me._f.disabled||W}))},0,!1))},ne=(W,te)=>async re=>{let Me;re&&(re.preventDefault&&re.preventDefault(),re.persist&&re.persist());let Ie=Jt(i);if(g.state.next({isSubmitting:!0}),e.resolver){const{errors:De,values:je}=await A();n.errors=De,Ie=Jt(je)}else await L(r);if(a.disabled.size)for(const De of a.disabled)Sn(Ie,De);if(Sn(n.errors,"root"),ar(n.errors)){g.state.next({errors:{}});try{await W(Ie,re)}catch(De){Me=De}}else te&&await te({...n.errors},re),ae(),setTimeout(ae);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ar(n.errors)&&!Me,submitCount:n.submitCount+1,errors:n.errors}),Me)throw Me},ce=(W,te={})=>{Fe(r,W)&&(Xt(te.defaultValue)?B(W,Jt(Fe(o,W))):(B(W,te.defaultValue),Ot(o,W,Jt(te.defaultValue))),te.keepTouched||Sn(n.touchedFields,W),te.keepDirty||(Sn(n.dirtyFields,W),n.isDirty=te.defaultValue?D(W,Jt(Fe(o,W))):D()),te.keepError||(Sn(n.errors,W),f.isValid&&y()),g.state.next({...n}))},fe=(W,te={})=>{const re=W?Jt(W):o,Me=Jt(re),Ie=ar(W),De=Ie?o:Me;if(te.keepDefaultValues||(o=re),!te.keepValues){if(te.keepDirtyValues){const je=new Set([...a.mount,...Object.keys(tc(o,i))]);for(const ot of Array.from(je))Fe(n.dirtyFields,ot)?Ot(De,ot,Fe(i,ot)):B(ot,Fe(De,ot))}else{if(Dg&&Xt(W))for(const je of a.mount){const ot=Fe(r,je);if(ot&&ot._f){const nt=Array.isArray(ot._f.refs)?ot._f.refs[0]:ot._f.ref;if(bd(nt)){const At=nt.closest("form");if(At){At.reset();break}}}}if(te.keepFieldsRef)for(const je of a.mount)B(je,Fe(De,je));else r={}}i=e.shouldUnregister?te.keepDefaultValues?Jt(o):{}:Jt(De),g.array.next({values:{...De}}),g.state.next({values:{...De}})}a={mount:te.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!f.isValid||!!te.keepIsValid||!!te.keepDirtyValues,s.watch=!!e.shouldUnregister,g.state.next({submitCount:te.keepSubmitCount?n.submitCount:0,isDirty:Ie?!1:te.keepDirty?n.isDirty:!!(te.keepDefaultValues&&!ji(W,o)),isSubmitted:te.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ie?{}:te.keepDirtyValues?te.keepDefaultValues&&i?tc(o,i):n.dirtyFields:te.keepDefaultValues&&W?tc(o,W):te.keepDirty?n.dirtyFields:{},touchedFields:te.keepTouched?n.touchedFields:{},errors:te.keepErrors?n.errors:{},isSubmitSuccessful:te.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},xe=(W,te)=>fe(So(W)?W(i):W,te),Te=(W,te={})=>{const re=Fe(r,W),Me=re&&re._f;if(Me){const Ie=Me.refs?Me.refs[0]:Me.ref;Ie.focus&&(Ie.focus(),te.shouldSelect&&So(Ie.select)&&Ie.select())}},_e=W=>{n={...n,...W}},He={control:{register:Q,unregister:de,getFieldState:Z,handleSubmit:ne,setError:he,_subscribe:oe,_runSchema:A,_focusError:ae,_getWatch:F,_getDirty:D,_setValid:y,_setFieldArray:w,_setDisabledField:X,_setErrors:_,_getFieldArray:V,_reset:fe,_resetDefaultValues:()=>So(e.defaultValues)&&e.defaultValues().then(W=>{xe(W,e.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:O,_disableForm:ve,_subjects:g,_proxyFormState:f,get _fields(){return r},get _formValues(){return i},get _state(){return s},set _state(W){s=W},get _defaultValues(){return o},get _names(){return a},set _names(W){a=W},get _formState(){return n},get _options(){return e},set _options(W){e={...e,...W}}},subscribe:ye,trigger:Y,register:Q,handleSubmit:ne,watch:me,setValue:B,getValues:G,reset:xe,resetField:ce,clearErrors:ge,unregister:de,setError:he,setFocus:Te,getFieldState:Z};return{...He,formControl:He}}var Wi=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const t=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(Math.random()*16+t)%16|0;return(e=="x"?n:n&3|8).toString(16)})},zg=(t,e,n={})=>n.shouldFocus||Xt(n.shouldFocus)?n.focusName||`${t}.${Xt(n.focusIndex)?e:n.focusIndex}.`:"",Hg=(t,e)=>[...t,...vr(e)],jg=t=>Array.isArray(t)?t.map(()=>{}):void 0;function Wg(t,e,n){return[...t.slice(0,e),...vr(n),...t.slice(e)]}var qg=(t,e,n)=>Array.isArray(t)?(Xt(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],Ug=(t,e)=>[...vr(e),...vr(t)];function DB(t,e){let n=0;const r=[...t];for(const o of e)r.splice(o-n,1),n++;return hd(r).length?r:[]}var Kg=(t,e)=>Xt(e)?[]:DB(t,vr(e).sort((n,r)=>n-r)),Gg=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]},Uw=(t,e,n)=>(t[e]=n,t);function PB(t){const e=an(),{control:n=e.control,name:r,keyName:o="id",shouldUnregister:i,rules:s}=t,[a,l]=q.useState(n._getFieldArray(r)),u=q.useRef(n._getFieldArray(r).map(Wi)),f=q.useRef(a),p=q.useRef(r),g=q.useRef(!1);p.current=r,f.current=a,n._names.array.add(r),s&&n.register(r,s),md(()=>n._subjects.array.subscribe({next:({values:M,name:A})=>{if(A===p.current||!A){const I=Fe(M,p.current);Array.isArray(I)&&(l(I),u.current=I.map(Wi))}}}).unsubscribe,[n]);const m=q.useCallback(M=>{g.current=!0,n._setFieldArray(r,M)},[n,r]),b=(M,A)=>{const I=vr(Jt(M)),L=Hg(n._getFieldArray(r),I);n._names.focus=zg(r,L.length-1,A),u.current=Hg(u.current,I.map(Wi)),m(L),l(L),n._setFieldArray(r,L,Hg,{argA:jg(M)})},y=(M,A)=>{const I=vr(Jt(M)),L=Ug(n._getFieldArray(r),I);n._names.focus=zg(r,0,A),u.current=Ug(u.current,I.map(Wi)),m(L),l(L),n._setFieldArray(r,L,Ug,{argA:jg(M)})},x=M=>{const A=Kg(n._getFieldArray(r),M);u.current=Kg(u.current,M),m(A),l(A),!Array.isArray(Fe(n._fields,r))&&Ot(n._fields,r,void 0),n._setFieldArray(r,A,Kg,{argA:M})},w=(M,A,I)=>{const L=vr(Jt(A)),O=Wg(n._getFieldArray(r),M,L);n._names.focus=zg(r,M,I),u.current=Wg(u.current,M,L.map(Wi)),m(O),l(O),n._setFieldArray(r,O,Wg,{argA:M,argB:jg(A)})},T=(M,A)=>{const I=n._getFieldArray(r);Gg(I,M,A),Gg(u.current,M,A),m(I),l(I),n._setFieldArray(r,I,Gg,{argA:M,argB:A},!1)},_=(M,A)=>{const I=n._getFieldArray(r);qg(I,M,A),qg(u.current,M,A),m(I),l(I),n._setFieldArray(r,I,qg,{argA:M,argB:A},!1)},C=(M,A)=>{const I=Jt(A),L=Uw(n._getFieldArray(r),M,I);u.current=[...L].map((O,D)=>!O||D===M?Wi():u.current[D]),m(L),l([...L]),n._setFieldArray(r,L,Uw,{argA:M,argB:I},!0,!1)},E=M=>{const A=vr(Jt(M));u.current=A.map(Wi),m([...A]),l([...A]),n._setFieldArray(r,[...A],I=>I,{},!0,!1)};return q.useEffect(()=>{if(n._state.action=!1,Bg(r,n._names)&&n._subjects.state.next({...n._formState}),g.current&&(!La(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!La(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([r]).then(M=>{const A=Fe(M.errors,r),I=Fe(n._formState.errors,r);(I?!A&&I.type||A&&(I.type!==A.type||I.message!==A.message):A&&A.type)&&(A?Ot(n._formState.errors,r,A):Sn(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const M=Fe(n._fields,r);M&&M._f&&!(La(n._options.reValidateMode).isOnSubmit&&La(n._options.mode).isOnSubmit)&&Vg(M,n._names.disabled,n._formValues,n._options.criteriaMode===Kr.all,n._options.shouldUseNativeValidation,!0).then(A=>!ar(A)&&n._subjects.state.next({errors:Ww(n._formState.errors,A,r)}))}n._subjects.state.next({name:r,values:Jt(n._formValues)}),n._names.focus&&$a(n._fields,(M,A)=>{if(n._names.focus&&A.startsWith(n._names.focus)&&M.focus)return M.focus(),1}),n._names.focus="",n._setValid(),g.current=!1},[a,r,n]),q.useEffect(()=>(!Fe(n._formValues,r)&&n._setFieldArray(r),()=>{const M=(A,I)=>{const L=Fe(n._fields,A);L&&L._f&&(L._f.mount=I)};n._options.shouldUnregister||i?n.unregister(r):M(r,!1)}),[r,n,o,i]),{swap:q.useCallback(T,[m,r,n]),move:q.useCallback(_,[m,r,n]),prepend:q.useCallback(y,[m,r,n]),append:q.useCallback(b,[m,r,n]),remove:q.useCallback(x,[m,r,n]),insert:q.useCallback(w,[m,r,n]),update:q.useCallback(C,[m,r,n]),replace:q.useCallback(E,[m,r,n]),fields:q.useMemo(()=>a.map((M,A)=>({...M,[o]:u.current[A]||Wi()})),[a,o])}}function NB(t={}){const e=q.useRef(void 0),n=q.useRef(void 0),[r,o]=q.useState({isDirty:!1,isValidating:!1,isLoading:So(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:So(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!So(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:s,...a}=IB(t);e.current={...a,formState:r}}const i=e.current.control;return i._options=t,md(()=>{const s=i._subscribe({formState:i._proxyFormState,callback:()=>o({...i._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),i._formState.isReady=!0,s},[i]),q.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),q.useEffect(()=>{t.mode&&(i._options.mode=t.mode),t.reValidateMode&&(i._options.reValidateMode=t.reValidateMode)},[i,t.mode,t.reValidateMode]),q.useEffect(()=>{t.errors&&(i._setErrors(t.errors),i._focusError())},[i,t.errors]),q.useEffect(()=>{t.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,t.shouldUnregister]),q.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==r.isDirty&&i._subjects.state.next({isDirty:s})}},[i,r.isDirty]),q.useEffect(()=>{t.values&&!ji(t.values,n.current)?(i._reset(t.values,{keepFieldsRef:!0,...i._options.resetOptions}),n.current=t.values,o(s=>({...s}))):i._resetDefaultValues()},[i,t.values]),q.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),e.current.formState=Ow(r,i),e.current}const LB=["w","xs","sm","md","lg","xl","alignment","justify","noMP","noGrid","gridClassName","gridStyle"],Kw=t=>t>47&&t<58,Gw=t=>t>64&&t<123&&(t<91||t>96),$B=(t,e,n,r)=>{let o="",i=0,s=0,a=0,l=0;const u=r.selectionStart;let f=!1;if(t.length<=e.length){for(let _=0;_<t.length&&_<e.length;_++){for(;i<e.length&&e[i]!=="X"&&e[i]!=="9";)a++,s++,i++;(Kw(t.charCodeAt(_))&&e[i]==="9"||Gw(t.charCodeAt(_))&&e[i]==="X")&&(a>0&&(l=a,a=0),o+=t[_],i++)}const p=Kw(t.charCodeAt(u-1))?"number":Gw(t.charCodeAt(u-1))?"letter":"something else",g=p!=="number"&&e[u-1]==="9",m=p!=="letter"&&e[u-1]==="X";(g||m||p==="something else")&&(f=!0);let y="",x=0;Math.abs(n.length-t.length)<=1&&(s=0);let w=u+s;for(let _=0;_<o.length;_++){for(;x<e.length&&e[x]!=="X"&&e[x]!=="9";)y+=e[x],x++;y+=o[_],x++}t.length<n.length?window.requestAnimationFrame(()=>{r.selectionStart=w,r.selectionEnd=w}):e[w-1]!=="X"&&e[w-1]!=="9"?window.requestAnimationFrame(()=>{r.selectionStart=w+l,r.selectionEnd=w+l}):(f&&(w-=1),window.requestAnimationFrame(()=>{r.selectionStart=w,r.selectionEnd=w}));const T=e.slice(x);return T.indexOf("X")===-1&&T.indexOf("9")===-1&&(y+=T),y}return window.requestAnimationFrame(()=>{r.selectionStart=u-1,r.selectionEnd=u-1}),n};function lr(t,e){const r=Object.keys(t).filter(i=>e.includes(i)),o={...t};for(const i of LB)delete o[i];for(const i of r)delete o[i];return o}const Wn=t=>t.split(/(?=[A-Z])|[.\-_\s]+/).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).filter(Boolean).join(" ");function FB(t,e,n=!1,r=""){let o="";if(e==null||e.length==0)return r;if(n){let i="";const s=e.toString().split(",");let a=0;t.forEach(l=>{s.includes(String(l.value).toString())&&(i+=l.label,a<s.length-1&&(i+=", "),a++)}),o=i}else{const i=t.find(s=>e==s.value);i!=null&&(o=i.label)}return o}function rc(t,e,n){return t.onClick?{onClick:()=>{t.onClick(),t.path&&e(t.path),t.externalLink&&window.open(t.externalLink,"_blank","noopener"),n&&n()}}:t.path?{component:vo.Link,to:t.path}:t.externalLink?{href:t.externalLink}:{}}function si(t,e){return process.env.NODE_ENV==="production"?()=>null:function(...r){return t(...r)||e(...r)}}var qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var wd={exports:{}},Rt={};/**
3
+ * @license React
4
+ * react-is.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var Yw;function RB(){if(Yw)return Rt;Yw=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function b(y){if(typeof y=="object"&&y!==null){var x=y.$$typeof;switch(x){case t:switch(y=y.type,y){case n:case o:case r:case l:case u:case g:return y;default:switch(y=y&&y.$$typeof,y){case s:case a:case p:case f:return y;case i:return y;default:return x}}case e:return x}}}return Rt.ContextConsumer=i,Rt.ContextProvider=s,Rt.Element=t,Rt.ForwardRef=a,Rt.Fragment=n,Rt.Lazy=p,Rt.Memo=f,Rt.Portal=e,Rt.Profiler=o,Rt.StrictMode=r,Rt.Suspense=l,Rt.SuspenseList=u,Rt.isContextConsumer=function(y){return b(y)===i},Rt.isContextProvider=function(y){return b(y)===s},Rt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Rt.isForwardRef=function(y){return b(y)===a},Rt.isFragment=function(y){return b(y)===n},Rt.isLazy=function(y){return b(y)===p},Rt.isMemo=function(y){return b(y)===f},Rt.isPortal=function(y){return b(y)===e},Rt.isProfiler=function(y){return b(y)===o},Rt.isStrictMode=function(y){return b(y)===r},Rt.isSuspense=function(y){return b(y)===l},Rt.isSuspenseList=function(y){return b(y)===u},Rt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===o||y===r||y===l||y===u||typeof y=="object"&&y!==null&&(y.$$typeof===p||y.$$typeof===f||y.$$typeof===s||y.$$typeof===i||y.$$typeof===a||y.$$typeof===m||y.getModuleId!==void 0)},Rt.typeOf=b,Rt}var Bt={};/**
11
+ * @license React
12
+ * react-is.development.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var Jw;function BB(){return Jw||(Jw=1,process.env.NODE_ENV!=="production"&&function(){function t(y){if(typeof y=="object"&&y!==null){var x=y.$$typeof;switch(x){case e:switch(y=y.type,y){case r:case i:case o:case u:case f:case m:return y;default:switch(y=y&&y.$$typeof,y){case a:case l:case g:case p:return y;case s:return y;default:return x}}case n:return x}}}var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");Bt.ContextConsumer=s,Bt.ContextProvider=a,Bt.Element=e,Bt.ForwardRef=l,Bt.Fragment=r,Bt.Lazy=g,Bt.Memo=p,Bt.Portal=n,Bt.Profiler=i,Bt.StrictMode=o,Bt.Suspense=u,Bt.SuspenseList=f,Bt.isContextConsumer=function(y){return t(y)===s},Bt.isContextProvider=function(y){return t(y)===a},Bt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},Bt.isForwardRef=function(y){return t(y)===l},Bt.isFragment=function(y){return t(y)===r},Bt.isLazy=function(y){return t(y)===g},Bt.isMemo=function(y){return t(y)===p},Bt.isPortal=function(y){return t(y)===n},Bt.isProfiler=function(y){return t(y)===i},Bt.isStrictMode=function(y){return t(y)===o},Bt.isSuspense=function(y){return t(y)===u},Bt.isSuspenseList=function(y){return t(y)===f},Bt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===i||y===o||y===u||y===f||typeof y=="object"&&y!==null&&(y.$$typeof===g||y.$$typeof===p||y.$$typeof===a||y.$$typeof===s||y.$$typeof===l||y.$$typeof===b||y.getModuleId!==void 0)},Bt.typeOf=t}()),Bt}var Xw;function VB(){return Xw||(Xw=1,process.env.NODE_ENV==="production"?wd.exports=RB():wd.exports=BB()),wd.exports}var ai=VB();function Fo(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Zw(t){if(P.isValidElement(t)||ai.isValidElementType(t)||!Fo(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=Zw(t[n])}),e}function $n(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return Fo(t)&&Fo(e)&&Object.keys(e).forEach(o=>{P.isValidElement(e[o])||ai.isValidElementType(e[o])?r[o]=e[o]:Fo(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&Fo(t[o])?r[o]=$n(t[o],e[o],n):n.clone?r[o]=Fo(e[o])?Zw(e[o]):e[o]:r[o]=e[o]}),r}var Cd={exports:{}},_d={exports:{}},Dt={};/** @license React v16.13.1
19
+ * react-is.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Qw;function zB(){if(Qw)return Dt;Qw=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,g=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,b=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,T=t?Symbol.for("react.scope"):60119;function _(E){if(typeof E=="object"&&E!==null){var M=E.$$typeof;switch(M){case e:switch(E=E.type,E){case l:case u:case r:case i:case o:case p:return E;default:switch(E=E&&E.$$typeof,E){case a:case f:case b:case m:case s:return E;default:return M}}case n:return M}}}function C(E){return _(E)===u}return Dt.AsyncMode=l,Dt.ConcurrentMode=u,Dt.ContextConsumer=a,Dt.ContextProvider=s,Dt.Element=e,Dt.ForwardRef=f,Dt.Fragment=r,Dt.Lazy=b,Dt.Memo=m,Dt.Portal=n,Dt.Profiler=i,Dt.StrictMode=o,Dt.Suspense=p,Dt.isAsyncMode=function(E){return C(E)||_(E)===l},Dt.isConcurrentMode=C,Dt.isContextConsumer=function(E){return _(E)===a},Dt.isContextProvider=function(E){return _(E)===s},Dt.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===e},Dt.isForwardRef=function(E){return _(E)===f},Dt.isFragment=function(E){return _(E)===r},Dt.isLazy=function(E){return _(E)===b},Dt.isMemo=function(E){return _(E)===m},Dt.isPortal=function(E){return _(E)===n},Dt.isProfiler=function(E){return _(E)===i},Dt.isStrictMode=function(E){return _(E)===o},Dt.isSuspense=function(E){return _(E)===p},Dt.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===u||E===i||E===o||E===p||E===g||typeof E=="object"&&E!==null&&(E.$$typeof===b||E.$$typeof===m||E.$$typeof===s||E.$$typeof===a||E.$$typeof===f||E.$$typeof===x||E.$$typeof===w||E.$$typeof===T||E.$$typeof===y)},Dt.typeOf=_,Dt}var Pt={};/** @license React v16.13.1
26
+ * react-is.development.js
27
+ *
28
+ * Copyright (c) Facebook, Inc. and its affiliates.
29
+ *
30
+ * This source code is licensed under the MIT license found in the
31
+ * LICENSE file in the root directory of this source tree.
32
+ */var eC;function HB(){return eC||(eC=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,g=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,b=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,T=t?Symbol.for("react.scope"):60119;function _(ne){return typeof ne=="string"||typeof ne=="function"||ne===r||ne===u||ne===i||ne===o||ne===p||ne===g||typeof ne=="object"&&ne!==null&&(ne.$$typeof===b||ne.$$typeof===m||ne.$$typeof===s||ne.$$typeof===a||ne.$$typeof===f||ne.$$typeof===x||ne.$$typeof===w||ne.$$typeof===T||ne.$$typeof===y)}function C(ne){if(typeof ne=="object"&&ne!==null){var ce=ne.$$typeof;switch(ce){case e:var fe=ne.type;switch(fe){case l:case u:case r:case i:case o:case p:return fe;default:var xe=fe&&fe.$$typeof;switch(xe){case a:case f:case b:case m:case s:return xe;default:return ce}}case n:return ce}}}var E=l,M=u,A=a,I=s,L=e,O=f,D=r,F=b,V=m,z=n,R=i,B=o,U=p,K=!1;function Y(ne){return K||(K=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),G(ne)||C(ne)===l}function G(ne){return C(ne)===u}function Z(ne){return C(ne)===a}function ge(ne){return C(ne)===s}function he(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===e}function me(ne){return C(ne)===f}function oe(ne){return C(ne)===r}function ye(ne){return C(ne)===b}function de(ne){return C(ne)===m}function X(ne){return C(ne)===n}function Q(ne){return C(ne)===i}function ae(ne){return C(ne)===o}function ve(ne){return C(ne)===p}Pt.AsyncMode=E,Pt.ConcurrentMode=M,Pt.ContextConsumer=A,Pt.ContextProvider=I,Pt.Element=L,Pt.ForwardRef=O,Pt.Fragment=D,Pt.Lazy=F,Pt.Memo=V,Pt.Portal=z,Pt.Profiler=R,Pt.StrictMode=B,Pt.Suspense=U,Pt.isAsyncMode=Y,Pt.isConcurrentMode=G,Pt.isContextConsumer=Z,Pt.isContextProvider=ge,Pt.isElement=he,Pt.isForwardRef=me,Pt.isFragment=oe,Pt.isLazy=ye,Pt.isMemo=de,Pt.isPortal=X,Pt.isProfiler=Q,Pt.isStrictMode=ae,Pt.isSuspense=ve,Pt.isValidElementType=_,Pt.typeOf=C}()),Pt}var tC;function nC(){return tC||(tC=1,process.env.NODE_ENV==="production"?_d.exports=zB():_d.exports=HB()),_d.exports}/*
33
+ object-assign
34
+ (c) Sindre Sorhus
35
+ @license MIT
36
+ */var Yg,rC;function jB(){if(rC)return Yg;rC=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Yg=o()?Object.assign:function(i,s){for(var a,l=r(i),u,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var p in a)e.call(a,p)&&(l[p]=a[p]);if(t){u=t(a);for(var g=0;g<u.length;g++)n.call(a,u[g])&&(l[u[g]]=a[u[g]])}}return l},Yg}var Jg,oC;function Xg(){if(oC)return Jg;oC=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Jg=t,Jg}var Zg,iC;function sC(){return iC||(iC=1,Zg=Function.call.bind(Object.prototype.hasOwnProperty)),Zg}var Qg,aC;function WB(){if(aC)return Qg;aC=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Xg(),n={},r=sC();t=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,u){if(process.env.NODE_ENV!=="production"){for(var f in i)if(r(i,f)){var p;try{if(typeof i[f]!="function"){var g=Error((l||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}p=i[f](s,f,l,a,null,e)}catch(b){p=b}if(p&&!(p instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in n)){n[p.message]=!0;var m=u?u():"";t("Failed "+a+" type: "+p.message+(m??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Qg=o,Qg}var em,lC;function qB(){if(lC)return em;lC=1;var t=nC(),e=jB(),n=Xg(),r=sC(),o=WB(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return em=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function p(G){var Z=G&&(u&&G[u]||G[f]);if(typeof Z=="function")return Z}var g="<<anonymous>>",m={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:T(),arrayOf:_,element:C(),elementType:E(),instanceOf:M,node:O(),objectOf:I,oneOf:A,oneOfType:L,shape:F,exact:V};function b(G,Z){return G===Z?G!==0||1/G===1/Z:G!==G&&Z!==Z}function y(G,Z){this.message=G,this.data=Z&&typeof Z=="object"?Z:{},this.stack=""}y.prototype=Error.prototype;function x(G){if(process.env.NODE_ENV!=="production")var Z={},ge=0;function he(oe,ye,de,X,Q,ae,ve){if(X=X||g,ae=ae||de,ve!==n){if(l){var ne=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ne.name="Invariant Violation",ne}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ce=X+":"+de;!Z[ce]&&ge<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ae+"` prop on `"+X+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Z[ce]=!0,ge++)}}return ye[de]==null?oe?ye[de]===null?new y("The "+Q+" `"+ae+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new y("The "+Q+" `"+ae+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:G(ye,de,X,Q,ae)}var me=he.bind(null,!1);return me.isRequired=he.bind(null,!0),me}function w(G){function Z(ge,he,me,oe,ye,de){var X=ge[he],Q=B(X);if(Q!==G){var ae=U(X);return new y("Invalid "+oe+" `"+ye+"` of type "+("`"+ae+"` supplied to `"+me+"`, expected ")+("`"+G+"`."),{expectedType:G})}return null}return x(Z)}function T(){return x(s)}function _(G){function Z(ge,he,me,oe,ye){if(typeof G!="function")return new y("Property `"+ye+"` of component `"+me+"` has invalid PropType notation inside arrayOf.");var de=ge[he];if(!Array.isArray(de)){var X=B(de);return new y("Invalid "+oe+" `"+ye+"` of type "+("`"+X+"` supplied to `"+me+"`, expected an array."))}for(var Q=0;Q<de.length;Q++){var ae=G(de,Q,me,oe,ye+"["+Q+"]",n);if(ae instanceof Error)return ae}return null}return x(Z)}function C(){function G(Z,ge,he,me,oe){var ye=Z[ge];if(!a(ye)){var de=B(ye);return new y("Invalid "+me+" `"+oe+"` of type "+("`"+de+"` supplied to `"+he+"`, expected a single ReactElement."))}return null}return x(G)}function E(){function G(Z,ge,he,me,oe){var ye=Z[ge];if(!t.isValidElementType(ye)){var de=B(ye);return new y("Invalid "+me+" `"+oe+"` of type "+("`"+de+"` supplied to `"+he+"`, expected a single ReactElement type."))}return null}return x(G)}function M(G){function Z(ge,he,me,oe,ye){if(!(ge[he]instanceof G)){var de=G.name||g,X=Y(ge[he]);return new y("Invalid "+oe+" `"+ye+"` of type "+("`"+X+"` supplied to `"+me+"`, expected ")+("instance of `"+de+"`."))}return null}return x(Z)}function A(G){if(!Array.isArray(G))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function Z(ge,he,me,oe,ye){for(var de=ge[he],X=0;X<G.length;X++)if(b(de,G[X]))return null;var Q=JSON.stringify(G,function(ve,ne){var ce=U(ne);return ce==="symbol"?String(ne):ne});return new y("Invalid "+oe+" `"+ye+"` of value `"+String(de)+"` "+("supplied to `"+me+"`, expected one of "+Q+"."))}return x(Z)}function I(G){function Z(ge,he,me,oe,ye){if(typeof G!="function")return new y("Property `"+ye+"` of component `"+me+"` has invalid PropType notation inside objectOf.");var de=ge[he],X=B(de);if(X!=="object")return new y("Invalid "+oe+" `"+ye+"` of type "+("`"+X+"` supplied to `"+me+"`, expected an object."));for(var Q in de)if(r(de,Q)){var ae=G(de,Q,me,oe,ye+"."+Q,n);if(ae instanceof Error)return ae}return null}return x(Z)}function L(G){if(!Array.isArray(G))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var Z=0;Z<G.length;Z++){var ge=G[Z];if(typeof ge!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+K(ge)+" at index "+Z+"."),s}function he(me,oe,ye,de,X){for(var Q=[],ae=0;ae<G.length;ae++){var ve=G[ae],ne=ve(me,oe,ye,de,X,n);if(ne==null)return null;ne.data&&r(ne.data,"expectedType")&&Q.push(ne.data.expectedType)}var ce=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new y("Invalid "+de+" `"+X+"` supplied to "+("`"+ye+"`"+ce+"."))}return x(he)}function O(){function G(Z,ge,he,me,oe){return z(Z[ge])?null:new y("Invalid "+me+" `"+oe+"` supplied to "+("`"+he+"`, expected a ReactNode."))}return x(G)}function D(G,Z,ge,he,me){return new y((G||"React class")+": "+Z+" type `"+ge+"."+he+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+me+"`.")}function F(G){function Z(ge,he,me,oe,ye){var de=ge[he],X=B(de);if(X!=="object")return new y("Invalid "+oe+" `"+ye+"` of type `"+X+"` "+("supplied to `"+me+"`, expected `object`."));for(var Q in G){var ae=G[Q];if(typeof ae!="function")return D(me,oe,ye,Q,U(ae));var ve=ae(de,Q,me,oe,ye+"."+Q,n);if(ve)return ve}return null}return x(Z)}function V(G){function Z(ge,he,me,oe,ye){var de=ge[he],X=B(de);if(X!=="object")return new y("Invalid "+oe+" `"+ye+"` of type `"+X+"` "+("supplied to `"+me+"`, expected `object`."));var Q=e({},ge[he],G);for(var ae in Q){var ve=G[ae];if(r(G,ae)&&typeof ve!="function")return D(me,oe,ye,ae,U(ve));if(!ve)return new y("Invalid "+oe+" `"+ye+"` key `"+ae+"` supplied to `"+me+"`.\nBad object: "+JSON.stringify(ge[he],null," ")+`
37
+ Valid keys: `+JSON.stringify(Object.keys(G),null," "));var ne=ve(de,ae,me,oe,ye+"."+ae,n);if(ne)return ne}return null}return x(Z)}function z(G){switch(typeof G){case"number":case"string":case"undefined":return!0;case"boolean":return!G;case"object":if(Array.isArray(G))return G.every(z);if(G===null||a(G))return!0;var Z=p(G);if(Z){var ge=Z.call(G),he;if(Z!==G.entries){for(;!(he=ge.next()).done;)if(!z(he.value))return!1}else for(;!(he=ge.next()).done;){var me=he.value;if(me&&!z(me[1]))return!1}}else return!1;return!0;default:return!1}}function R(G,Z){return G==="symbol"?!0:Z?Z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Z instanceof Symbol:!1}function B(G){var Z=typeof G;return Array.isArray(G)?"array":G instanceof RegExp?"object":R(Z,G)?"symbol":Z}function U(G){if(typeof G>"u"||G===null)return""+G;var Z=B(G);if(Z==="object"){if(G instanceof Date)return"date";if(G instanceof RegExp)return"regexp"}return Z}function K(G){var Z=U(G);switch(Z){case"array":case"object":return"an "+Z;case"boolean":case"date":case"regexp":return"a "+Z;default:return Z}}function Y(G){return!G.constructor||!G.constructor.name?g:G.constructor.name}return m.checkPropTypes=o,m.resetWarningCache=o.resetWarningCache,m.PropTypes=m,m},em}var tm,cC;function UB(){if(cC)return tm;cC=1;var t=Xg();function e(){}function n(){}return n.resetWarningCache=e,tm=function(){function r(s,a,l,u,f,p){if(p!==t){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},tm}var uC;function KB(){if(uC)return Cd.exports;if(uC=1,process.env.NODE_ENV!=="production"){var t=nC(),e=!0;Cd.exports=qB()(t.isElement,e)}else Cd.exports=UB()();return Cd.exports}var GB=KB();const c=cr(GB);function YB(t){const{prototype:e={}}=t;return!!e.isReactComponent}function dC(t,e,n,r,o){const i=t[e],s=o||e;if(i==null||typeof window>"u")return null;let a;const l=i.type;return typeof l=="function"&&!YB(l)&&(a="Did you accidentally use a plain function component for an element instead?"),a!==void 0?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const oc=si(c.element,dC);oc.isRequired=si(c.element.isRequired,dC);function JB(t){const{prototype:e={}}=t;return!!e.isReactComponent}function XB(t,e,n,r,o){const i=t[e],s=o||e;if(i==null||typeof window>"u")return null;let a;return typeof i=="function"&&!JB(i)&&(a="Did you accidentally provide a plain function component instead?"),a!==void 0?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Td=si(c.elementType,XB),ZB="exact-prop: ​";function fC(t){return process.env.NODE_ENV==="production"?t:{...t,[ZB]:e=>{const n=Object.keys(e).filter(r=>!t.hasOwnProperty(r));return n.length>0?new Error(`The following props are not supported: ${n.map(r=>`\`${r}\``).join(", ")}. Please remove them.`):null}}}function Ro(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${t}; visit ${n} for the full message.`}function pC(t,e=""){return t.displayName||t.name||e}function hC(t,e,n){const r=pC(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function QB(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return pC(t,"Component");if(typeof t=="object")switch(t.$$typeof){case ai.ForwardRef:return hC(t,t.render,"ForwardRef");case ai.Memo:return hC(t,t.type,"memo");default:return}}}function li(t,e,n,r,o){if(process.env.NODE_ENV==="production")return null;const i=t[e],s=o||e;return i==null?null:i&&i.nodeType!==1?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}const En=c.oneOfType([c.func,c.object]);function $e(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Ro(7));return t.charAt(0).toUpperCase()+t.slice(1)}function gC(...t){return t.reduce((e,n)=>n==null?e:function(...o){e.apply(this,o),n.apply(this,o)},()=>{})}function mC(t,e=166){let n;function r(...o){const i=()=>{t.apply(this,o)};clearTimeout(n),n=setTimeout(i,e)}return r.clear=()=>{clearTimeout(n)},r}function Ra(t,e){var n,r,o;return P.isValidElement(t)&&e.indexOf(t.type.muiName??((o=(r=(n=t.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function Zn(t){return t&&t.ownerDocument||document}function ci(t){return Zn(t).defaultView||window}function e5(t,e){if(process.env.NODE_ENV==="production")return()=>null;const n=e?{...e.propTypes}:null;return o=>(i,s,a,l,u,...f)=>{const p=u||s,g=n==null?void 0:n[p];if(g){const m=g(i,s,a,l,u,...f);if(m)return m}return typeof i[s]<"u"&&!i[o]?new Error(`The prop \`${p}\` of \`${t}\` can only be used together with the \`${o}\` prop.`):null}}function yC(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Fn=typeof window<"u"?P.useLayoutEffect:P.useEffect;let bC=0;function t5(t){const[e,n]=P.useState(t),r=t||e;return P.useEffect(()=>{e==null&&(bC+=1,n(`mui-${bC}`))},[e]),r}const vC={...P}.useId;function Bo(t){if(vC!==void 0){const e=vC();return t??e}return t5(t)}function n5(t,e,n,r,o){if(process.env.NODE_ENV==="production")return null;const i=o||e;return typeof t[e]<"u"?new Error(`The prop \`${i}\` is not supported. Please remove it.`):null}function ui({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=P.useRef(t!==void 0),[i,s]=P.useState(e),a=o?t:i;if(process.env.NODE_ENV!=="production"){P.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
38
+ `))},[r,n,t]);const{current:u}=P.useRef(e);P.useEffect(()=>{!o&&!Object.is(u,e)&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
39
+ `))},[JSON.stringify(e)])}const l=P.useCallback(u=>{o||s(u)},[]);return[a,l]}function Ue(t){const e=P.useRef(t);return Fn(()=>{e.current=t}),P.useRef((...n)=>(0,e.current)(...n)).current}function Nt(...t){const e=P.useRef(void 0),n=P.useCallback(r=>{const o=t.map(i=>{if(i==null)return null;if(typeof i=="function"){const s=i,a=s(r);return typeof a=="function"?a:()=>{s(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i==null?void 0:i())}},t);return P.useMemo(()=>t.every(r=>r==null)?null:r=>{e.current&&(e.current(),e.current=void 0),r!=null&&(e.current=n(r))},t)}const xC={};function SC(t,e){const n=P.useRef(xC);return n.current===xC&&(n.current=t(e)),n}const r5=[];function o5(t){P.useEffect(t,r5)}class nm{constructor(){fd(this,"currentId",null);fd(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});fd(this,"disposeEffect",()=>this.clear)}static create(){return new nm}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function wC(){const t=SC(nm.create).current;return o5(t.disposeEffect),t}function CC(t){try{return t.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
40
+ `))}return!1}function _C(t=window){const e=t.document.documentElement.clientWidth;return t.innerWidth-e}const i5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function s5(t){const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":Number.isFinite(t)?t!==Math.floor(t)?"float":"number":"Infinity";case"object":return t===null?"null":t.constructor.name;default:return e}}function TC(t,e,n,r){const o=t[e];if(o==null||!Number.isInteger(o)){const i=s5(o);return new RangeError(`Invalid ${r} \`${e}\` of type \`${i}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function kC(t,e,...n){return t[e]===void 0?null:TC(t,e,...n)}function rm(){return null}kC.isRequired=TC,rm.isRequired=rm;const EC=process.env.NODE_ENV==="production"?rm:kC;function ic(t,e){const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const o=r;if(o==="components"||o==="slots")n[o]={...t[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=t[o],s=e[o];if(!s)n[o]=i||{};else if(!i)n[o]=s;else{n[o]={...s};for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const l=a;n[o][l]=ic(i[l],s[l])}}}else n[o]===void 0&&(n[o]=t[o])}return n}function Ze(t,e,n=void 0){const r={};for(const o in t){const i=t[o];let s="",a=!0;for(let l=0;l<i.length;l+=1){const u=i[l];u&&(s+=(a===!0?"":" ")+e(u),a=!1,n&&n[u]&&(s+=" "+n[u]))}r[o]=s}return r}const OC=t=>t,a5=(()=>{let t=OC;return{configure(e){t=e},generate(e){return t(e)},reset(){t=OC}}})(),l5={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Qe(t,e,n="Mui"){const r=l5[e];return r?`${n}-${r}`:`${a5.generate(t)}-${e}`}function tt(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=Qe(t,o,n)}),r}function c5(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function u5(t){return typeof t=="string"}function MC(t,e,n){return t===void 0||u5(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function AC(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=AC(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function ze(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=AC(t))&&(r&&(r+=" "),r+=e);return r}function IC(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function DC(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function PC(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const m=ze(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),b={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},y={...n,...o,...r};return m.length>0&&(y.className=m),Object.keys(b).length>0&&(y.style=b),{props:y,internalRef:void 0}}const s=IC({...o,...r}),a=DC(r),l=DC(o),u=e(s),f=ze(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),p={...u==null?void 0:u.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},g={...u,...n,...l,...a};return f.length>0&&(g.className=f),Object.keys(p).length>0&&(g.style=p),{props:g,internalRef:u.ref}}function kd(t,e,n){return typeof t=="function"?t(e,n):t}function Mt(t){var p;const{elementType:e,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=t,s=o?{}:kd(n,r),{props:a,internalRef:l}=PC({...i,externalSlotProps:s}),u=Nt(l,s==null?void 0:s.ref,(p=t.additionalProps)==null?void 0:p.ref);return MC(e,{...a,ref:u},r)}function sc(t){var e;return parseInt(P.version,10)>=19?((e=t==null?void 0:t.props)==null?void 0:e.ref)||null:(t==null?void 0:t.ref)||null}function ac(t,e){return e?$n(t,e,{clone:!1}):t}const Ui=process.env.NODE_ENV!=="production"?c.oneOfType([c.number,c.string,c.object,c.array]):{};function NC(t,e){if(!t.containerQueries)return e;const n=Object.keys(e).filter(r=>r.startsWith("@container")).sort((r,o)=>{var s,a;const i=/min-width:\s*([0-9.]+)/;return+(((s=r.match(i))==null?void 0:s[1])||0)-+(((a=o.match(i))==null?void 0:a[1])||0)});return n.length?n.reduce((r,o)=>{const i=e[o];return delete r[o],r[o]=i,r},{...e}):e}function d5(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function f5(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${e})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
41
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Ro(18,`(${e})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return t.containerQueries(o).up(i)}function p5(t){const e=(i,s)=>i.replace("@media",s?`@container ${s}`:"@container");function n(i,s){i.up=(...a)=>e(t.breakpoints.up(...a),s),i.down=(...a)=>e(t.breakpoints.down(...a),s),i.between=(...a)=>e(t.breakpoints.between(...a),s),i.only=(...a)=>e(t.breakpoints.only(...a),s),i.not=(...a)=>{const l=e(t.breakpoints.not(...a),s);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...t,containerQueries:o}}const Ed={xs:0,sm:600,md:900,lg:1200,xl:1536},LC={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${Ed[t]}px)`},h5={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:Ed[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function wo(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||LC;return e.reduce((s,a,l)=>(s[i.up(i.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const i=r.breakpoints||LC;return Object.keys(e).reduce((s,a)=>{if(d5(i.keys,a)){const l=f5(r.containerQueries?r:h5,a);l&&(s[l]=n(e[a],a))}else if(Object.keys(i.values||Ed).includes(a)){const l=i.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function $C(t={}){var n;return((n=t.keys)==null?void 0:n.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function om(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function g5(t,...e){const n=$C(t),r=[n,...e].reduce((o,i)=>$n(o,i),{});return om(Object.keys(n),r)}function m5(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((o,i)=>{i<t.length&&(n[o]=!0)}):r.forEach(o=>{t[o]!=null&&(n[o]=!0)}),n}function im({values:t,breakpoints:e,base:n}){const r=n||m5(t,e),o=Object.keys(r);if(o.length===0)return t;let i;return o.reduce((s,a,l)=>(Array.isArray(t)?(s[a]=t[l]!=null?t[l]:t[i],i=l):typeof t=="object"?(s[a]=t[a]!=null?t[a]:t[i],i=a):s[a]=t,s),{})}function Od(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function Md(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=Od(t,n)||r,e&&(o=e(o,r,t)),o}function wn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,i=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,u=Od(l,r)||{};return wo(s,a,p=>{let g=Md(u,o,p);return p===g&&typeof p=="string"&&(g=Md(u,o,`${e}${p==="default"?"":$e(p)}`,p)),n===!1?g:{[n]:g}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:Ui}:{},i.filterProps=[e],i}function y5(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const b5={m:"margin",p:"padding"},v5={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},FC={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},x5=y5(t=>{if(t.length>2)if(FC[t])t=FC[t];else return[t];const[e,n]=t.split(""),r=b5[e],o=v5[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Ad=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Id=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],S5=[...Ad,...Id];function lc(t,e,n,r){const o=Od(t,e,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),typeof o=="string"?`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const s=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
42
+ `)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
43
+ `)));const a=o[s];return i>=0?a:typeof a=="number"?-a:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
44
+ `)),()=>{})}function Dd(t){return lc(t,"spacing",8,"spacing")}function Fs(t,e){return typeof e=="string"||e==null?e:t(e)}function w5(t,e){return n=>t.reduce((r,o)=>(r[o]=Fs(e,n),r),{})}function C5(t,e,n,r){if(!e.includes(n))return null;const o=x5(n),i=w5(o,r),s=t[n];return wo(t,s,i)}function RC(t,e){const n=Dd(t.theme);return Object.keys(t).map(r=>C5(t,e,r,n)).reduce(ac,{})}function dn(t){return RC(t,Ad)}dn.propTypes=process.env.NODE_ENV!=="production"?Ad.reduce((t,e)=>(t[e]=Ui,t),{}):{},dn.filterProps=Ad;function fn(t){return RC(t,Id)}fn.propTypes=process.env.NODE_ENV!=="production"?Id.reduce((t,e)=>(t[e]=Ui,t),{}):{},fn.filterProps=Id,process.env.NODE_ENV!=="production"&&S5.reduce((t,e)=>(t[e]=Ui,t),{});function Pd(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>e[i]?ac(o,e[i](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?t.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Gr(t){return typeof t!="number"?t:`${t}px solid`}function Yr(t,e){return wn({prop:t,themeKey:"borders",transform:e})}const _5=Yr("border",Gr),T5=Yr("borderTop",Gr),k5=Yr("borderRight",Gr),E5=Yr("borderBottom",Gr),O5=Yr("borderLeft",Gr),M5=Yr("borderColor"),A5=Yr("borderTopColor"),I5=Yr("borderRightColor"),D5=Yr("borderBottomColor"),P5=Yr("borderLeftColor"),N5=Yr("outline",Gr),L5=Yr("outlineColor"),Nd=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=lc(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Fs(e,r)});return wo(t,t.borderRadius,n)}return null};Nd.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ui}:{},Nd.filterProps=["borderRadius"],Pd(_5,T5,k5,E5,O5,M5,A5,I5,D5,P5,Nd,N5,L5);const Ld=t=>{if(t.gap!==void 0&&t.gap!==null){const e=lc(t.theme,"spacing",8,"gap"),n=r=>({gap:Fs(e,r)});return wo(t,t.gap,n)}return null};Ld.propTypes=process.env.NODE_ENV!=="production"?{gap:Ui}:{},Ld.filterProps=["gap"];const $d=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=lc(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Fs(e,r)});return wo(t,t.columnGap,n)}return null};$d.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ui}:{},$d.filterProps=["columnGap"];const Fd=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=lc(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Fs(e,r)});return wo(t,t.rowGap,n)}return null};Fd.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ui}:{},Fd.filterProps=["rowGap"];const $5=wn({prop:"gridColumn"}),F5=wn({prop:"gridRow"}),R5=wn({prop:"gridAutoFlow"}),B5=wn({prop:"gridAutoColumns"}),V5=wn({prop:"gridAutoRows"}),z5=wn({prop:"gridTemplateColumns"}),H5=wn({prop:"gridTemplateRows"}),j5=wn({prop:"gridTemplateAreas"}),W5=wn({prop:"gridArea"});Pd(Ld,$d,Fd,$5,F5,R5,B5,V5,z5,H5,j5,W5);function Ba(t,e){return e==="grey"?e:t}const q5=wn({prop:"color",themeKey:"palette",transform:Ba}),U5=wn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ba}),K5=wn({prop:"backgroundColor",themeKey:"palette",transform:Ba});Pd(q5,U5,K5);function Nr(t){return t<=1&&t!==0?`${t*100}%`:t}const G5=wn({prop:"width",transform:Nr}),sm=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var o,i,s,a,l;const r=((s=(i=(o=t.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:s[n])||Ed[n];return r?((l=(a=t.theme)==null?void 0:a.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${t.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Nr(n)}};return wo(t,t.maxWidth,e)}return null};sm.filterProps=["maxWidth"];const Y5=wn({prop:"minWidth",transform:Nr}),J5=wn({prop:"height",transform:Nr}),X5=wn({prop:"maxHeight",transform:Nr}),Z5=wn({prop:"minHeight",transform:Nr});wn({prop:"size",cssProperty:"width",transform:Nr}),wn({prop:"size",cssProperty:"height",transform:Nr});const Q5=wn({prop:"boxSizing"});Pd(G5,sm,Y5,J5,X5,Z5,Q5);const cc={border:{themeKey:"borders",transform:Gr},borderTop:{themeKey:"borders",transform:Gr},borderRight:{themeKey:"borders",transform:Gr},borderBottom:{themeKey:"borders",transform:Gr},borderLeft:{themeKey:"borders",transform:Gr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Gr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Nd},color:{themeKey:"palette",transform:Ba},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ba},backgroundColor:{themeKey:"palette",transform:Ba},p:{style:fn},pt:{style:fn},pr:{style:fn},pb:{style:fn},pl:{style:fn},px:{style:fn},py:{style:fn},padding:{style:fn},paddingTop:{style:fn},paddingRight:{style:fn},paddingBottom:{style:fn},paddingLeft:{style:fn},paddingX:{style:fn},paddingY:{style:fn},paddingInline:{style:fn},paddingInlineStart:{style:fn},paddingInlineEnd:{style:fn},paddingBlock:{style:fn},paddingBlockStart:{style:fn},paddingBlockEnd:{style:fn},m:{style:dn},mt:{style:dn},mr:{style:dn},mb:{style:dn},ml:{style:dn},mx:{style:dn},my:{style:dn},margin:{style:dn},marginTop:{style:dn},marginRight:{style:dn},marginBottom:{style:dn},marginLeft:{style:dn},marginX:{style:dn},marginY:{style:dn},marginInline:{style:dn},marginInlineStart:{style:dn},marginInlineEnd:{style:dn},marginBlock:{style:dn},marginBlockStart:{style:dn},marginBlockEnd:{style:dn},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ld},rowGap:{style:Fd},columnGap:{style:$d},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Nr},maxWidth:{style:sm},minWidth:{transform:Nr},height:{transform:Nr},maxHeight:{transform:Nr},minHeight:{transform:Nr},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"}};function eV(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function tV(t,e){return typeof t=="function"?t(e):t}function nV(){function t(n,r,o,i){const s={[n]:r,theme:o},a=i[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:f,style:p}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const g=Od(o,u)||{};return p?p(s):wo(s,r,b=>{let y=Md(g,f,b);return b===y&&typeof b=="string"&&(y=Md(g,f,`${n}${b==="default"?"":$e(b)}`,b)),l===!1?y:{[l]:y}})}function e(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const s=o.unstable_sxConfig??cc;function a(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const f=$C(o.breakpoints),p=Object.keys(f);let g=f;return Object.keys(u).forEach(m=>{const b=tV(u[m],o);if(b!=null)if(typeof b=="object")if(s[m])g=ac(g,t(m,b,o,s));else{const y=wo({theme:o},b,x=>({[m]:x}));eV(y,b)?g[m]=e({sx:b,theme:o,nested:!0}):g=ac(g,y)}else g=ac(g,t(m,b,o,s))}),!i&&o.modularCssLayers?{"@layer sx":NC(o,om(p,g))}:NC(o,om(p,g))}return Array.isArray(r)?r.map(a):a(r)}return e}const Va=nV();Va.filterProps=["sx"];const rV=t=>{var r;const e={systemProps:{},otherProps:{}},n=((r=t==null?void 0:t.theme)==null?void 0:r.unstable_sxConfig)??cc;return Object.keys(t).forEach(o=>{n[o]?e.systemProps[o]=t[o]:e.otherProps[o]=t[o]}),e};function am(t){const{sx:e,...n}=t,{systemProps:r,otherProps:o}=rV(n);let i;return Array.isArray(e)?i=[r,...e]:typeof e=="function"?i=(...s)=>{const a=e(...s);return Fo(a)?{...r,...a}:r}:i={...r,...e},{...o,sx:i}}function oV(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var iV={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};function sV(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var aV=/[A-Z]|^ms/g,lV=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BC=function(e){return e.charCodeAt(1)===45},VC=function(e){return e!=null&&typeof e!="boolean"},lm=sV(function(t){return BC(t)?t:t.replace(aV,"-$&").toLowerCase()}),zC=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(lV,function(r,o,i){return Ki={name:o,styles:i,next:Ki},o})}return iV[e]!==1&&!BC(e)&&typeof n=="number"&&n!==0?n+"px":n};function Rd(t,e,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 o=n;if(o.anim===1)return Ki={name:o.name,styles:o.styles,next:Ki},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)Ki={name:s.name,styles:s.styles,next:Ki},s=s.next;var a=i.styles+";";return a}return cV(t,e,n)}}var l=n;if(e==null)return l;var u=e[l];return u!==void 0?u:l}function cV(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Rd(t,e,n[o])+";";else for(var i in n){var s=n[i];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?r+=i+"{"+e[a]+"}":VC(a)&&(r+=lm(i)+":"+zC(i,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)VC(s[l])&&(r+=lm(i)+":"+zC(i,s[l])+";");else{var u=Rd(t,e,s);switch(i){case"animation":case"animationName":{r+=lm(i)+":"+u+";";break}default:r+=i+"{"+u+"}"}}}return r}var HC=/label:\s*([^\s;{]+)\s*(;|$)/g,Ki;function jC(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,o="";Ki=void 0;var i=t[0];if(i==null||i.raw===void 0)r=!1,o+=Rd(n,e,i);else{var s=i;o+=s[0]}for(var a=1;a<t.length;a++)if(o+=Rd(n,e,t[a]),r){var l=i;o+=l[a]}HC.lastIndex=0;for(var u="",f;(f=HC.exec(o))!==null;)u+="-"+f[1];var p=oV(o)+u;return{name:p,styles:o,next:Ki}}function uV(t){return t==null||Object.keys(t).length===0}function WC(t){const{styles:e,defaultTheme:n={}}=t,r=typeof e=="function"?o=>e(uV(o)?n:o):e;return v.jsx(xo.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(WC.propTypes={defaultTheme:c.object,styles:c.oneOfType([c.array,c.string,c.object,c.func])});/**
45
+ * @mui/styled-engine v6.5.0
46
+ *
47
+ * @license MIT
48
+ * This source code is licensed under the MIT license found in the
49
+ * LICENSE file in the root directory of this source tree.
50
+ */function dV(t,e){const n=dB(t,e);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof t=="string"?`"${t}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
51
+ `)):r.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function fV(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const qC=[];function Gi(t){return qC[0]=t,jC(qC)}const pV=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function hV(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=t,i=pV(e),s=Object.keys(i);function a(g){return`@media (min-width:${typeof e[g]=="number"?e[g]:g}${n})`}function l(g){return`@media (max-width:${(typeof e[g]=="number"?e[g]:g)-r/100}${n})`}function u(g,m){const b=s.indexOf(m);return`@media (min-width:${typeof e[g]=="number"?e[g]:g}${n}) and (max-width:${(b!==-1&&typeof e[s[b]]=="number"?e[s[b]]:m)-r/100}${n})`}function f(g){return s.indexOf(g)+1<s.length?u(g,s[s.indexOf(g)+1]):a(g)}function p(g){const m=s.indexOf(g);return m===0?a(s[1]):m===s.length-1?l(s[m]):u(g,s[s.indexOf(g)+1]).replace("@media","@media not all and")}return{keys:s,values:i,up:a,down:l,between:u,only:f,not:p,unit:n,...o}}const gV={borderRadius:4};function UC(t=8,e=Dd({spacing:t})){if(t.mui)return t;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(i=>{const s=e(i);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function mV(t,e){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[t])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(t);return o==="&"?e:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:e})}return n.palette.mode===t?e:{}}function uc(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...s}=t,a=hV(n),l=UC(o);let u=$n({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...gV,...i}},s);return u=p5(u),u.applyStyles=mV,u=e.reduce((f,p)=>$n(f,p),u),u.unstable_sxConfig={...cc,...s==null?void 0:s.unstable_sxConfig},u.unstable_sx=function(p){return Va({sx:p,theme:this})},u}function yV(t){return Object.keys(t).length===0}function KC(t=null){const e=P.useContext(xo.ThemeContext);return!e||yV(e)?t:e}const bV=uc();function Bd(t=bV){return KC(t)}function cm(t){const e=Gi(t);return t!==e&&e.styles?(e.styles.match(/^@layer\s+[^{]*$/)||(e.styles=`@layer global{${e.styles}}`),e):t}function GC({styles:t,themeId:e,defaultTheme:n={}}){const r=Bd(n),o=e&&r[e]||r;let i=typeof t=="function"?t(o):t;return o.modularCssLayers&&(Array.isArray(i)?i=i.map(s=>cm(typeof s=="function"?s(o):s)):i=cm(i)),v.jsx(WC,{styles:i})}process.env.NODE_ENV!=="production"&&(GC.propTypes={defaultTheme:c.object,styles:c.oneOfType([c.array,c.func,c.number,c.object,c.string,c.bool]),themeId:c.string});function YC(t){const{variants:e,...n}=t,r={variants:e,style:Gi(n),isProcessed:!0};return r.style===n||e&&e.forEach(o=>{typeof o.style!="function"&&(o.style=Gi(o.style))}),r}const vV=uc();function um(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function Rs(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function xV(t){return t?(e,n)=>n[t]:null}function SV(t,e,n){t.theme=_V(t.theme)?n:t.theme[e]||t.theme}function Vd(t,e,n){const r=typeof e=="function"?e(t):e;if(Array.isArray(r))return r.flatMap(o=>Vd(t,o,n));if(Array.isArray(r==null?void 0:r.variants)){let o;if(r.isProcessed)o=n?Rs(r.style,n):r.style;else{const{variants:i,...s}=r;o=n?Rs(Gi(s),n):s}return JC(t,r.variants,[o],n)}return r!=null&&r.isProcessed?n?Rs(Gi(r.style),n):r.style:n?Rs(Gi(r),n):r}function JC(t,e,n=[],r=void 0){var i;let o;e:for(let s=0;s<e.length;s+=1){const a=e[s];if(typeof a.props=="function"){if(o??(o={...t,...t.ownerState,ownerState:t.ownerState}),!a.props(o))continue}else for(const l in a.props)if(t[l]!==a.props[l]&&((i=t.ownerState)==null?void 0:i[l])!==a.props[l])continue e;typeof a.style=="function"?(o??(o={...t,...t.ownerState,ownerState:t.ownerState}),n.push(r?Rs(Gi(a.style(o)),r):a.style(o))):n.push(r?Rs(Gi(a.style),r):a.style)}return n}function XC(t={}){const{themeId:e,defaultTheme:n=vV,rootShouldForwardProp:r=um,slotShouldForwardProp:o=um}=t;function i(a){SV(a,e,n)}return(a,l={})=>{fV(a,M=>M.filter(A=>A!==Va));const{name:u,slot:f,skipVariantsResolver:p,skipSx:g,overridesResolver:m=xV(ZC(f)),...b}=l,y=u&&u.startsWith("Mui")||f?"components":"custom",x=p!==void 0?p:f&&f!=="Root"&&f!=="root"||!1,w=g||!1;let T=um;f==="Root"||f==="root"?T=r:f?T=o:TV(a)&&(T=void 0);const _=dV(a,{shouldForwardProp:T,label:CV(u,f),...b}),C=M=>{if(M.__emotion_real===M)return M;if(typeof M=="function")return function(I){return Vd(I,M,I.theme.modularCssLayers?y:void 0)};if(Fo(M)){const A=YC(M);return function(L){return A.variants?Vd(L,A,L.theme.modularCssLayers?y:void 0):L.theme.modularCssLayers?Rs(A.style,y):A.style}}return M},E=(...M)=>{const A=[],I=M.map(C),L=[];if(A.push(i),u&&m&&L.push(function(V){var U,K;const R=(K=(U=V.theme.components)==null?void 0:U[u])==null?void 0:K.styleOverrides;if(!R)return null;const B={};for(const Y in R)B[Y]=Vd(V,R[Y],V.theme.modularCssLayers?"theme":void 0);return m(V,B)}),u&&!x&&L.push(function(V){var B,U;const z=V.theme,R=(U=(B=z==null?void 0:z.components)==null?void 0:B[u])==null?void 0:U.variants;return R?JC(V,R,[],V.theme.modularCssLayers?"theme":void 0):null}),w||L.push(Va),Array.isArray(I[0])){const F=I.shift(),V=new Array(A.length).fill(""),z=new Array(L.length).fill("");let R;R=[...V,...F,...z],R.raw=[...V,...F.raw,...z],A.unshift(R)}const O=[...A,...I,...L],D=_(...O);return a.muiName&&(D.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(D.displayName=wV(u,f,a)),D};return _.withConfig&&(E.withConfig=_.withConfig),E}}function wV(t,e,n){return t?`${t}${$e(e||"")}`:`Styled(${QB(n)})`}function CV(t,e){let n;return process.env.NODE_ENV!=="production"&&t&&(n=`${t}-${ZC(e||"Root")}`),n}function _V(t){for(const e in t)return!1;return!0}function TV(t){return typeof t=="string"&&t.charCodeAt(0)>96}function ZC(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}const QC=XC();function e_(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:ic(e.components[n].defaultProps,r)}function dm({props:t,name:e,defaultTheme:n,themeId:r}){let o=Bd(n);return r&&(o=o[r]||o),e_({theme:o,name:e,props:t})}function kV(t,e,n,r,o){const[i,s]=P.useState(()=>o&&n?n(t).matches:r?r(t).matches:e);return Fn(()=>{if(!n)return;const a=n(t),l=()=>{s(a.matches)};return l(),a.addEventListener("change",l),()=>{a.removeEventListener("change",l)}},[t,n]),i}const t_={...P}.useSyncExternalStore;function EV(t,e,n,r,o){const i=P.useCallback(()=>e,[e]),s=P.useMemo(()=>{if(o&&n)return()=>n(t).matches;if(r!==null){const{matches:f}=r(t);return()=>f}return i},[i,t,r,o,n]),[a,l]=P.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const f=n(t);return[()=>f.matches,p=>(f.addEventListener("change",p),()=>{f.removeEventListener("change",p)})]},[i,n,t]);return t_(l,a,s)}function n_(t={}){const{themeId:e}=t;return function(r,o={}){let i=KC();i&&e&&(i=i[e]||i);const s=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:a=!1,matchMedia:l=s?window.matchMedia:null,ssrMatchMedia:u=null,noSsr:f=!1}=e_({name:"MuiUseMediaQuery",props:o,theme:i});process.env.NODE_ENV!=="production"&&typeof r=="function"&&i===null&&console.error(["MUI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join(`
52
+ `));let p=typeof r=="function"?r(i):r;p=p.replace(/^@media( ?)/m,""),p.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
53
+ `));const m=(t_!==void 0?EV:kV)(p,a,l,u,f);return process.env.NODE_ENV!=="production"&&P.useDebugValue({query:p,match:m}),m}}n_();function fm(t,e=0,n=1){return process.env.NODE_ENV!=="production"&&(t<e||t>n)&&console.error(`MUI: The value provided ${t} is out of range [${e}, ${n}].`),c5(t,e,n)}function OV(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&t.length!==t.trim().length&&console.error(`MUI: The color: "${t}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Yi(t){if(t.type)return t;if(t.charAt(0)==="#")return Yi(OV(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
54
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Ro(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=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(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
55
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Ro(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const MV=t=>{const e=Yi(t);return e.values.slice(0,3).map((n,r)=>e.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},dc=(t,e)=>{try{return MV(t)}catch{return e&&process.env.NODE_ENV!=="production"&&console.warn(e),t}};function zd(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):e.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function r_(t){t=Yi(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,i=r*Math.min(o,1-o),s=(u,f=(u+n/30)%12)=>o-i*Math.max(Math.min(f-3,9-f,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),zd({type:a,values:l})}function pm(t){t=Yi(t);let e=t.type==="hsl"||t.type==="hsla"?Yi(r_(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function o_(t,e){const n=pm(t),r=pm(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Kt(t,e){return t=Yi(t),e=fm(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,zd(t)}function Hd(t,e,n){try{return Kt(t,e)}catch{return t}}function fc(t,e){if(t=Yi(t),e=fm(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return zd(t)}function Ht(t,e,n){try{return fc(t,e)}catch{return t}}function pc(t,e){if(t=Yi(t),e=fm(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return zd(t)}function jt(t,e,n){try{return pc(t,e)}catch{return t}}function AV(t,e=.15){return pm(t)>.5?fc(t,e):pc(t,e)}function jd(t,e,n){try{return AV(t,e)}catch{return t}}const IV=P.createContext();process.env.NODE_ENV!=="production"&&(c.node,c.bool);const i_=()=>P.useContext(IV)??!1,DV=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(c.node,c.object);function PV(t){const{theme:e,name:n,props:r}=t;if(!e||!e.components||!e.components[n])return r;const o=e.components[n];return o.defaultProps?ic(o.defaultProps,r):!o.styleOverrides&&!o.variants?ic(o,r):r}function NV({props:t,name:e}){const n=P.useContext(DV);return PV({props:t,name:e,theme:{components:n}})}const s_={theme:void 0};function LV(t){let e,n;return function(o){let i=e;return(i===void 0||o.theme!==n)&&(s_.theme=o.theme,i=YC(t(s_)),e=i,n=o.theme),i}}function $V(t=""){function e(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${t?`${t}-`:""}${o}${e(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${t?`${t}-`:""}${r}${e(...o)})`}const a_=(t,e,n,r=[])=>{let o=t;e.forEach((i,s)=>{s===e.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},FV=(t,e,n)=>{function r(o,i=[],s=[]){Object.entries(o).forEach(([a,l])=>{(!n||n&&!n([...i,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,a],Array.isArray(l)?[...s,a]:s):e([...i,a],l,s))})}r(t)},RV=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>t.includes(r))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function hm(t,e){const{prefix:n,shouldSkipGeneratingVar:r}=e||{},o={},i={},s={};return FV(t,(a,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const f=`--${n?`${n}-`:""}${a.join("-")}`,p=RV(a,l);Object.assign(o,{[f]:p}),a_(i,a,`var(${f})`,u),a_(s,a,`var(${f}, ${p})`,u)}},a=>a[0]==="vars"),{css:o,vars:i,varsWithDefaults:s}}function BV(t,e={}){const{getSelector:n=x,disableCssColorScheme:r,colorSchemeSelector:o}=e,{colorSchemes:i={},components:s,defaultColorScheme:a="light",...l}=t,{vars:u,css:f,varsWithDefaults:p}=hm(l,e);let g=p;const m={},{[a]:b,...y}=i;if(Object.entries(y||{}).forEach(([_,C])=>{const{vars:E,css:M,varsWithDefaults:A}=hm(C,e);g=$n(g,A),m[_]={css:M,vars:E}}),b){const{css:_,vars:C,varsWithDefaults:E}=hm(b,e);g=$n(g,E),m[a]={css:_,vars:C}}function x(_,C){var M,A;let E=o;if(o==="class"&&(E=".%s"),o==="data"&&(E="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(E=`[${o}="%s"]`),_){if(E==="media")return t.defaultColorScheme===_?":root":{[`@media (prefers-color-scheme: ${((A=(M=i[_])==null?void 0:M.palette)==null?void 0:A.mode)||_})`]:{":root":C}};if(E)return t.defaultColorScheme===_?`:root, ${E.replace("%s",String(_))}`:E.replace("%s",String(_))}return":root"}return{vars:g,generateThemeVars:()=>{let _={...u};return Object.entries(m).forEach(([,{vars:C}])=>{_=$n(_,C)}),_},generateStyleSheets:()=>{var I,L;const _=[],C=t.defaultColorScheme||"light";function E(O,D){Object.keys(D).length&&_.push(typeof O=="string"?{[O]:{...D}}:O)}E(n(void 0,{...f}),f);const{[C]:M,...A}=m;if(M){const{css:O}=M,D=(L=(I=i[C])==null?void 0:I.palette)==null?void 0:L.mode,F=!r&&D?{colorScheme:D,...O}:{...O};E(n(C,{...F}),F)}return Object.entries(A).forEach(([O,{css:D}])=>{var z,R;const F=(R=(z=i[O])==null?void 0:z.palette)==null?void 0:R.mode,V=!r&&F?{colorScheme:F,...D}:{...D};E(n(O,{...V}),V)}),_}}}function VV(t){return function(n){return t==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${n}"] &`:t==="class"?`.${n} &`:t==="data"?`[data-${n}] &`:`${t.replace("%s",n)} &`:"&"}}const zV=(t,e)=>t.filter(n=>e.includes(n)),za=(t,e,n)=>{const r=t.keys[0];Array.isArray(e)?e.forEach((o,i)=>{n((s,a)=>{i<=t.keys.length-1&&(i===0?Object.assign(s,a):s[t.up(t.keys[i])]=a)},o)}):e&&typeof e=="object"?(Object.keys(e).length>t.keys.length?t.keys:zV(t.keys,Object.keys(e))).forEach(i=>{if(t.keys.includes(i)){const s=e[i];s!==void 0&&n((a,l)=>{r===i?Object.assign(a,l):a[t.up(i)]=l},s)}}):(typeof e=="number"||typeof e=="string")&&n((o,i)=>{Object.assign(o,i)},e)};function Wd(t){return`--Grid-${t}Spacing`}function qd(t){return`--Grid-parent-${t}Spacing`}const l_="--Grid-columns",Ha="--Grid-parent-columns",HV=({theme:t,ownerState:e})=>{const n={};return za(t.breakpoints,e.size,(r,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${Ha}) - (var(${Ha}) - ${o}) * (var(${qd("column")}) / var(${Ha})))`}),r(n,i)}),n},jV=({theme:t,ownerState:e})=>{const n={};return za(t.breakpoints,e.offset,(r,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${Ha}) + var(${qd("column")}) * ${o} / var(${Ha}))`}),r(n,i)}),n},WV=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={[l_]:12};return za(t.breakpoints,e.columns,(r,o)=>{const i=o??12;r(n,{[l_]:i,"> *":{[Ha]:i}})}),n},qV=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return za(t.breakpoints,e.rowSpacing,(r,o)=>{var s;const i=typeof o=="string"?o:(s=t.spacing)==null?void 0:s.call(t,o);r(n,{[Wd("row")]:i,"> *":{[qd("row")]:i}})}),n},UV=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return za(t.breakpoints,e.columnSpacing,(r,o)=>{var s;const i=typeof o=="string"?o:(s=t.spacing)==null?void 0:s.call(t,o);r(n,{[Wd("column")]:i,"> *":{[qd("column")]:i}})}),n},KV=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return za(t.breakpoints,e.direction,(r,o)=>{r(n,{flexDirection:o})}),n},GV=({ownerState:t})=>({minWidth:0,boxSizing:"border-box",...t.container&&{display:"flex",flexWrap:"wrap",...t.wrap&&t.wrap!=="wrap"&&{flexWrap:t.wrap},gap:`var(${Wd("row")}) var(${Wd("column")})`}}),YV=t=>{const e=[];return Object.entries(t).forEach(([n,r])=>{r!==!1&&r!==void 0&&e.push(`grid-${n}-${String(r)}`)}),e},JV=(t,e="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(t))return[`spacing-${e}-${String(t)}`];if(typeof t=="object"&&!Array.isArray(t)){const r=[];return Object.entries(t).forEach(([o,i])=>{n(i)&&r.push(`spacing-${o}-${String(i)}`)}),r}return[]},XV=t=>t===void 0?[]:typeof t=="object"?Object.entries(t).map(([e,n])=>`direction-${e}-${n}`):[`direction-xs-${String(t)}`],ZV=t=>["item","zeroMinWidth"].includes(t)?`The \`${t}\` prop has been removed and is no longer necessary. You can safely remove it.`:`The \`${t}\` prop has been removed. See https://v6.mui.com/material-ui/migration/upgrade-to-grid-v2/ for migration instructions.`,c_=[];function QV(t,e){const n=[];t.item!==void 0&&(delete t.item,n.push("item")),t.zeroMinWidth!==void 0&&(delete t.zeroMinWidth,n.push("zeroMinWidth")),e.keys.forEach(r=>{t[r]!==void 0&&(n.push(r),delete t[r])}),process.env.NODE_ENV!=="production"&&n.forEach(r=>{c_.includes(r)||(c_.push(r),console.warn(`MUI Grid2: ${ZV(r)}
56
+ `))})}const e3=uc(),t3=QC("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>e.root});function n3(t){return dm({props:t,name:"MuiGrid",defaultTheme:e3})}function r3(t={}){const{createStyledComponent:e=t3,useThemeProps:n=n3,useTheme:r=Bd,componentName:o="MuiGrid"}=t,i=(u,f)=>{const{container:p,direction:g,spacing:m,wrap:b,size:y}=u,x={root:["root",p&&"container",b!=="wrap"&&`wrap-xs-${String(b)}`,...XV(g),...YV(y),...p?JV(m,f.breakpoints.keys[0]):[]]};return Ze(x,w=>Qe(o,w),{})};function s(u,f,p=()=>!0){const g={};return u===null||(Array.isArray(u)?u.forEach((m,b)=>{m!==null&&p(m)&&f.keys[b]&&(g[f.keys[b]]=m)}):typeof u=="object"?Object.keys(u).forEach(m=>{const b=u[m];b!=null&&p(b)&&(g[m]=b)}):g[f.keys[0]]=u),g}const a=e(WV,UV,qV,HV,KV,GV,jV),l=P.forwardRef(function(f,p){const g=r(),m=n(f),b=am(m);QV(b,g.breakpoints);const{className:y,children:x,columns:w=12,container:T=!1,component:_="div",direction:C="row",wrap:E="wrap",size:M={},offset:A={},spacing:I=0,rowSpacing:L=I,columnSpacing:O=I,unstable_level:D=0,...F}=b,V=s(M,g.breakpoints,Z=>Z!==!1),z=s(A,g.breakpoints),R=f.columns??(D?void 0:w),B=f.spacing??(D?void 0:I),U=f.rowSpacing??f.spacing??(D?void 0:L),K=f.columnSpacing??f.spacing??(D?void 0:O),Y={...b,level:D,columns:R,container:T,direction:C,wrap:E,spacing:B,rowSpacing:U,columnSpacing:K,size:V,offset:z},G=i(Y,g);return v.jsx(a,{ref:p,as:_,ownerState:Y,className:ze(G.root,y),...F,children:P.Children.map(x,Z=>{var ge;return P.isValidElement(Z)&&Ra(Z,["Grid"])&&T&&Z.props.container?P.cloneElement(Z,{unstable_level:((ge=Z.props)==null?void 0:ge.unstable_level)??D+1}):Z})})});return process.env.NODE_ENV!=="production"&&(l.propTypes={children:c.node,className:c.string,columns:c.oneOfType([c.arrayOf(c.number),c.number,c.object]),columnSpacing:c.oneOfType([c.arrayOf(c.oneOfType([c.number,c.string])),c.number,c.object,c.string]),component:c.elementType,container:c.bool,direction:c.oneOfType([c.oneOf(["column-reverse","column","row-reverse","row"]),c.arrayOf(c.oneOf(["column-reverse","column","row-reverse","row"])),c.object]),offset:c.oneOfType([c.string,c.number,c.arrayOf(c.oneOfType([c.string,c.number])),c.object]),rowSpacing:c.oneOfType([c.arrayOf(c.oneOfType([c.number,c.string])),c.number,c.object,c.string]),size:c.oneOfType([c.string,c.bool,c.number,c.arrayOf(c.oneOfType([c.string,c.bool,c.number])),c.object]),spacing:c.oneOfType([c.arrayOf(c.oneOfType([c.number,c.string])),c.number,c.object,c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),wrap:c.oneOf(["nowrap","wrap-reverse","wrap"])}),l.muiName="Grid",l}const o3=uc(),i3=QC("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function s3(t){return dm({props:t,name:"MuiStack",defaultTheme:o3})}function a3(t,e){const n=P.Children.toArray(t).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(P.cloneElement(e,{key:`separator-${i}`})),r),[])}const l3=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],c3=({ownerState:t,theme:e})=>{let n={display:"flex",flexDirection:"column",...wo({theme:e},im({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r}))};if(t.spacing){const r=Dd(e),o=Object.keys(e.breakpoints.values).reduce((l,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(l[u]=!0),l),{}),i=im({values:t.direction,base:o}),s=im({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,u,f)=>{if(!i[l]){const g=u>0?i[f[u-1]]:"column";i[l]=g}}),n=$n(n,wo({theme:e},s,(l,u)=>t.useFlexGap?{gap:Fs(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${l3(u?i[u]:t.direction)}`]:Fs(r,l)}}))}return n=g5(e.breakpoints,n),n};function u3(t={}){const{createStyledComponent:e=i3,useThemeProps:n=s3,componentName:r="MuiStack"}=t,o=()=>Ze({root:["root"]},l=>Qe(r,l),{}),i=e(c3),s=P.forwardRef(function(l,u){const f=n(l),p=am(f),{component:g="div",direction:m="column",spacing:b=0,divider:y,children:x,className:w,useFlexGap:T=!1,..._}=p,C={direction:m,spacing:b,useFlexGap:T},E=o();return v.jsx(i,{as:g,ownerState:C,ref:u,className:ze(E.root,w),..._,children:y?a3(x,y):x})});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:c.node,direction:c.oneOfType([c.oneOf(["column-reverse","column","row-reverse","row"]),c.arrayOf(c.oneOf(["column-reverse","column","row-reverse","row"])),c.object]),divider:c.node,spacing:c.oneOfType([c.arrayOf(c.oneOfType([c.number,c.string])),c.number,c.object,c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])}),s}const hc={black:"#000",white:"#fff"},d3={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"},ja={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Wa={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},gc={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},qa={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ua={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Ka={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function u_(){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:hc.white,default:hc.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}}}const f3=u_();function d_(){return{text:{primary:hc.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:hc.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}}}const f_=d_();function p_(t,e,n,r){const o=r.light||r,i=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=pc(t.main,o):e==="dark"&&(t.dark=fc(t.main,i)))}function p3(t="light"){return t==="dark"?{main:qa[200],light:qa[50],dark:qa[400]}:{main:qa[700],light:qa[400],dark:qa[800]}}function h3(t="light"){return t==="dark"?{main:ja[200],light:ja[50],dark:ja[400]}:{main:ja[500],light:ja[300],dark:ja[700]}}function g3(t="light"){return t==="dark"?{main:Wa[500],light:Wa[300],dark:Wa[700]}:{main:Wa[700],light:Wa[400],dark:Wa[800]}}function m3(t="light"){return t==="dark"?{main:Ua[400],light:Ua[300],dark:Ua[700]}:{main:Ua[700],light:Ua[500],dark:Ua[900]}}function y3(t="light"){return t==="dark"?{main:Ka[400],light:Ka[300],dark:Ka[700]}:{main:Ka[800],light:Ka[500],dark:Ka[900]}}function b3(t="light"){return t==="dark"?{main:gc[400],light:gc[300],dark:gc[700]}:{main:"#ed6c02",light:gc[500],dark:gc[900]}}function gm(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=t,i=t.primary||p3(e),s=t.secondary||h3(e),a=t.error||g3(e),l=t.info||m3(e),u=t.success||y3(e),f=t.warning||b3(e);function p(y){const x=o_(y,f_.text.primary)>=n?f_.text.primary:f3.text.primary;if(process.env.NODE_ENV!=="production"){const w=o_(y,x);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${x} on ${y}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
57
+ `))}return x}const g=({color:y,name:x,mainShade:w=500,lightShade:T=300,darkShade:_=700})=>{if(y={...y},!y.main&&y[w]&&(y.main=y[w]),!y.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
58
+ The color object needs to have a \`main\` property or a \`${w}\` property.`:Ro(11,x?` (${x})`:"",w));if(typeof y.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
59
+ \`color.main\` should be a string, but \`${JSON.stringify(y.main)}\` was provided instead.
60
+
61
+ Did you intend to use one of the following approaches?
62
+
63
+ import { green } from "@mui/material/colors";
64
+
65
+ const theme1 = createTheme({ palette: {
66
+ primary: green,
67
+ } });
68
+
69
+ const theme2 = createTheme({ palette: {
70
+ primary: { main: green[500] },
71
+ } });`:Ro(12,x?` (${x})`:"",JSON.stringify(y.main)));return p_(y,"light",T,r),p_(y,"dark",_,r),y.contrastText||(y.contrastText=p(y.main)),y};let m;return e==="light"?m=u_():e==="dark"&&(m=d_()),process.env.NODE_ENV!=="production"&&(m||console.error(`MUI: The palette mode \`${e}\` is not supported.`)),$n({common:{...hc},mode:e,primary:g({color:i,name:"primary"}),secondary:g({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:a,name:"error"}),warning:g({color:f,name:"warning"}),info:g({color:l,name:"info"}),success:g({color:u,name:"success"}),grey:d3,contrastThreshold:n,getContrastText:p,augmentColor:g,tonalOffset:r,...m},o)}function v3(t){const e={};return Object.entries(t).forEach(r=>{const[o,i]=r;typeof i=="object"&&(e[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),e}function x3(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function S3(t){return Math.round(t*1e5)/1e5}const h_={textTransform:"uppercase"},g_='"Roboto", "Helvetica", "Arial", sans-serif';function w3(t,e){const{fontFamily:n=g_,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:s=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:u,pxToRem:f,...p}=typeof e=="function"?e(t):e;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const g=r/14,m=f||(x=>`${x/l*g}rem`),b=(x,w,T,_,C)=>({fontFamily:n,fontWeight:x,fontSize:m(w),lineHeight:T,...n===g_?{letterSpacing:`${S3(_/w)}em`}:{},...C,...u}),y={h1:b(o,96,1.167,-1.5),h2:b(o,60,1.2,-.5),h3:b(i,48,1.167,0),h4:b(i,34,1.235,.25),h5:b(i,24,1.334,0),h6:b(s,20,1.6,.15),subtitle1:b(i,16,1.75,.15),subtitle2:b(s,14,1.57,.1),body1:b(i,16,1.5,.15),body2:b(i,14,1.43,.15),button:b(s,14,1.75,.4,h_),caption:b(i,12,1.66,.4),overline:b(i,12,2.66,1,h_),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return $n({htmlFontSize:l,pxToRem:m,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:s,fontWeightBold:a,...y},p,{clone:!1})}const C3=.2,_3=.14,T3=.12;function rn(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${C3})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${_3})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${T3})`].join(",")}const k3=["none",rn(0,2,1,-1,0,1,1,0,0,1,3,0),rn(0,3,1,-2,0,2,2,0,0,1,5,0),rn(0,3,3,-2,0,3,4,0,0,1,8,0),rn(0,2,4,-1,0,4,5,0,0,1,10,0),rn(0,3,5,-1,0,5,8,0,0,1,14,0),rn(0,3,5,-1,0,6,10,0,0,1,18,0),rn(0,4,5,-2,0,7,10,1,0,2,16,1),rn(0,5,5,-3,0,8,10,1,0,3,14,2),rn(0,5,6,-3,0,9,12,1,0,3,16,2),rn(0,6,6,-3,0,10,14,1,0,4,18,3),rn(0,6,7,-4,0,11,15,1,0,4,20,3),rn(0,7,8,-4,0,12,17,2,0,5,22,4),rn(0,7,8,-4,0,13,19,2,0,5,24,4),rn(0,7,9,-4,0,14,21,2,0,5,26,4),rn(0,8,9,-5,0,15,22,2,0,6,28,5),rn(0,8,10,-5,0,16,24,2,0,6,30,5),rn(0,8,11,-5,0,17,26,2,0,6,32,5),rn(0,9,11,-5,0,18,28,2,0,7,34,6),rn(0,9,12,-6,0,19,29,2,0,7,36,6),rn(0,10,13,-6,0,20,31,3,0,8,38,7),rn(0,10,13,-6,0,21,33,3,0,8,40,7),rn(0,10,14,-6,0,22,35,3,0,8,42,7),rn(0,11,14,-7,0,23,36,3,0,9,44,8),rn(0,11,15,-7,0,24,38,3,0,9,46,8)],E3={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)"},O3={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function m_(t){return`${Math.round(t)}ms`}function M3(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function A3(t){const e={...E3,...t.easing},n={...O3,...t.duration};return{getAutoHeightDuration:M3,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0,...u}=i;if(process.env.NODE_ENV!=="production"){const f=g=>typeof g=="string",p=g=>!Number.isNaN(parseFloat(g));!f(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!p(s)&&!f(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),f(a)||console.error('MUI: Argument "easing" must be a string.'),!p(l)&&!f(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
72
+ `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(f=>`${f} ${typeof s=="string"?s:m_(s)} ${a} ${typeof l=="string"?l:m_(l)}`).join(",")},...t,easing:e,duration:n}}const I3={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function D3(t){return Fo(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function y_(t={}){const e={...t};function n(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[s,a]=o[i];!D3(a)||s.startsWith("unstable_")?delete r[s]:Fo(a)&&(r[s]={...a},n(r[s]))}}return n(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
73
+
74
+ const theme = ${JSON.stringify(e,null,2)};
75
+
76
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
77
+ theme.transitions = createTransitions(theme.transitions || {});
78
+
79
+ export default theme;`}function mm(t={},...e){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:s={},typography:a={},shape:l,...u}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Ro(20));const f=gm(i),p=uc(t);let g=$n(p,{mixins:x3(p.breakpoints,r),palette:f,shadows:k3.slice(),typography:w3(f,a),transitions:A3(s),zIndex:{...I3}});if(g=$n(g,u),g=e.reduce((m,b)=>$n(m,b),g),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(y,x)=>{let w;for(w in y){const T=y[w];if(m.includes(w)&&Object.keys(T).length>0){if(process.env.NODE_ENV!=="production"){const _=Qe("",w);console.error([`MUI: The \`${x}\` component increases the CSS specificity of the \`${w}\` internal state.`,"You can not override it like this: ",JSON.stringify(y,null,2),"",`Instead, you need to use the '&.${_}' syntax:`,JSON.stringify({root:{[`&.${_}`]:T}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
80
+ `))}y[w]={}}}};Object.keys(g.components).forEach(y=>{const x=g.components[y].styleOverrides;x&&y.startsWith("Mui")&&b(x,y)})}return g.unstable_sxConfig={...cc,...u==null?void 0:u.unstable_sxConfig},g.unstable_sx=function(b){return Va({sx:b,theme:this})},g.toRuntimeSource=y_,g}function ym(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const P3=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=ym(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function b_(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function v_(t){return t==="dark"?P3:[]}function N3(t){const{palette:e={mode:"light"},opacity:n,overlays:r,...o}=t,i=gm(e);return{palette:i,opacity:{...b_(i.mode),...n},overlays:r||v_(i.mode),...o}}function L3(t){var e;return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!((e=t[1])!=null&&e.match(/(mode|contrastThreshold|tonalOffset)/))}const $3=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],F3=t=>(e,n)=>{const r=t.rootSelector||":root",o=t.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const s={};return $3(t.cssVarPrefix).forEach(a=>{s[a]=n[a],delete n[a]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:s}}:i?{[i.replace("%s",e)]:s,[`${r}, ${i.replace("%s",e)}`]:n}:{[r]:{...n,...s}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(e))}`}else if(e){if(i==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[r]:n}};if(i)return i.replace("%s",String(e))}return r};function R3(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function we(t,e,n){!t[e]&&n&&(t[e]=n)}function mc(t){return typeof t!="string"||!t.startsWith("hsl")?t:r_(t)}function di(t,e){`${e}Channel`in t||(t[`${e}Channel`]=dc(mc(t[e]),`MUI: Can't create \`palette.${e}Channel\` because \`palette.${e}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
81
+ To suppress this warning, you need to explicitly provide the \`palette.${e}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function B3(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const Vo=t=>{try{return t()}catch{}},V3=(t="mui")=>$V(t);function bm(t,e,n,r){if(!e)return;e=e===!0?{}:e;const o=r==="dark"?"dark":"light";if(!n){t[r]=N3({...e,palette:{mode:o,...e==null?void 0:e.palette}});return}const{palette:i,...s}=mm({...n,palette:{mode:o,...e==null?void 0:e.palette}});return t[r]={...e,palette:i,opacity:{...b_(o),...e==null?void 0:e.opacity},overlays:(e==null?void 0:e.overlays)||v_(o)},s}function z3(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:s=L3,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...u}=t,f=Object.keys(n)[0],p=r||(n.light&&f!=="light"?"light":f),g=V3(i),{[p]:m,light:b,dark:y,...x}=n,w={...x};let T=m;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(T=!0),!T)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Ro(21,p));const _=bm(w,T,u,p);b&&!w.light&&bm(w,b,void 0,"light"),y&&!w.dark&&bm(w,y,void 0,"dark");let C={defaultColorScheme:p,..._,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:l,getCssVar:g,colorSchemes:w,font:{...v3(_.typography),..._.font},spacing:B3(u.spacing)};Object.keys(C.colorSchemes).forEach(L=>{const O=C.colorSchemes[L].palette,D=F=>{const V=F.split("-"),z=V[1],R=V[2];return g(F,O[z][R])};if(O.mode==="light"&&(we(O.common,"background","#fff"),we(O.common,"onBackground","#000")),O.mode==="dark"&&(we(O.common,"background","#000"),we(O.common,"onBackground","#fff")),R3(O,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),O.mode==="light"){we(O.Alert,"errorColor",Ht(O.error.light,.6)),we(O.Alert,"infoColor",Ht(O.info.light,.6)),we(O.Alert,"successColor",Ht(O.success.light,.6)),we(O.Alert,"warningColor",Ht(O.warning.light,.6)),we(O.Alert,"errorFilledBg",D("palette-error-main")),we(O.Alert,"infoFilledBg",D("palette-info-main")),we(O.Alert,"successFilledBg",D("palette-success-main")),we(O.Alert,"warningFilledBg",D("palette-warning-main")),we(O.Alert,"errorFilledColor",Vo(()=>O.getContrastText(O.error.main))),we(O.Alert,"infoFilledColor",Vo(()=>O.getContrastText(O.info.main))),we(O.Alert,"successFilledColor",Vo(()=>O.getContrastText(O.success.main))),we(O.Alert,"warningFilledColor",Vo(()=>O.getContrastText(O.warning.main))),we(O.Alert,"errorStandardBg",jt(O.error.light,.9)),we(O.Alert,"infoStandardBg",jt(O.info.light,.9)),we(O.Alert,"successStandardBg",jt(O.success.light,.9)),we(O.Alert,"warningStandardBg",jt(O.warning.light,.9)),we(O.Alert,"errorIconColor",D("palette-error-main")),we(O.Alert,"infoIconColor",D("palette-info-main")),we(O.Alert,"successIconColor",D("palette-success-main")),we(O.Alert,"warningIconColor",D("palette-warning-main")),we(O.AppBar,"defaultBg",D("palette-grey-100")),we(O.Avatar,"defaultBg",D("palette-grey-400")),we(O.Button,"inheritContainedBg",D("palette-grey-300")),we(O.Button,"inheritContainedHoverBg",D("palette-grey-A100")),we(O.Chip,"defaultBorder",D("palette-grey-400")),we(O.Chip,"defaultAvatarColor",D("palette-grey-700")),we(O.Chip,"defaultIconColor",D("palette-grey-700")),we(O.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),we(O.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),we(O.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),we(O.LinearProgress,"primaryBg",jt(O.primary.main,.62)),we(O.LinearProgress,"secondaryBg",jt(O.secondary.main,.62)),we(O.LinearProgress,"errorBg",jt(O.error.main,.62)),we(O.LinearProgress,"infoBg",jt(O.info.main,.62)),we(O.LinearProgress,"successBg",jt(O.success.main,.62)),we(O.LinearProgress,"warningBg",jt(O.warning.main,.62)),we(O.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.11)`),we(O.Slider,"primaryTrack",jt(O.primary.main,.62)),we(O.Slider,"secondaryTrack",jt(O.secondary.main,.62)),we(O.Slider,"errorTrack",jt(O.error.main,.62)),we(O.Slider,"infoTrack",jt(O.info.main,.62)),we(O.Slider,"successTrack",jt(O.success.main,.62)),we(O.Slider,"warningTrack",jt(O.warning.main,.62));const F=jd(O.background.default,.8);we(O.SnackbarContent,"bg",F),we(O.SnackbarContent,"color",Vo(()=>O.getContrastText(F))),we(O.SpeedDialAction,"fabHoverBg",jd(O.background.paper,.15)),we(O.StepConnector,"border",D("palette-grey-400")),we(O.StepContent,"border",D("palette-grey-400")),we(O.Switch,"defaultColor",D("palette-common-white")),we(O.Switch,"defaultDisabledColor",D("palette-grey-100")),we(O.Switch,"primaryDisabledColor",jt(O.primary.main,.62)),we(O.Switch,"secondaryDisabledColor",jt(O.secondary.main,.62)),we(O.Switch,"errorDisabledColor",jt(O.error.main,.62)),we(O.Switch,"infoDisabledColor",jt(O.info.main,.62)),we(O.Switch,"successDisabledColor",jt(O.success.main,.62)),we(O.Switch,"warningDisabledColor",jt(O.warning.main,.62)),we(O.TableCell,"border",jt(Hd(O.divider,1),.88)),we(O.Tooltip,"bg",Hd(O.grey[700],.92))}if(O.mode==="dark"){we(O.Alert,"errorColor",jt(O.error.light,.6)),we(O.Alert,"infoColor",jt(O.info.light,.6)),we(O.Alert,"successColor",jt(O.success.light,.6)),we(O.Alert,"warningColor",jt(O.warning.light,.6)),we(O.Alert,"errorFilledBg",D("palette-error-dark")),we(O.Alert,"infoFilledBg",D("palette-info-dark")),we(O.Alert,"successFilledBg",D("palette-success-dark")),we(O.Alert,"warningFilledBg",D("palette-warning-dark")),we(O.Alert,"errorFilledColor",Vo(()=>O.getContrastText(O.error.dark))),we(O.Alert,"infoFilledColor",Vo(()=>O.getContrastText(O.info.dark))),we(O.Alert,"successFilledColor",Vo(()=>O.getContrastText(O.success.dark))),we(O.Alert,"warningFilledColor",Vo(()=>O.getContrastText(O.warning.dark))),we(O.Alert,"errorStandardBg",Ht(O.error.light,.9)),we(O.Alert,"infoStandardBg",Ht(O.info.light,.9)),we(O.Alert,"successStandardBg",Ht(O.success.light,.9)),we(O.Alert,"warningStandardBg",Ht(O.warning.light,.9)),we(O.Alert,"errorIconColor",D("palette-error-main")),we(O.Alert,"infoIconColor",D("palette-info-main")),we(O.Alert,"successIconColor",D("palette-success-main")),we(O.Alert,"warningIconColor",D("palette-warning-main")),we(O.AppBar,"defaultBg",D("palette-grey-900")),we(O.AppBar,"darkBg",D("palette-background-paper")),we(O.AppBar,"darkColor",D("palette-text-primary")),we(O.Avatar,"defaultBg",D("palette-grey-600")),we(O.Button,"inheritContainedBg",D("palette-grey-800")),we(O.Button,"inheritContainedHoverBg",D("palette-grey-700")),we(O.Chip,"defaultBorder",D("palette-grey-700")),we(O.Chip,"defaultAvatarColor",D("palette-grey-300")),we(O.Chip,"defaultIconColor",D("palette-grey-300")),we(O.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),we(O.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),we(O.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),we(O.LinearProgress,"primaryBg",Ht(O.primary.main,.5)),we(O.LinearProgress,"secondaryBg",Ht(O.secondary.main,.5)),we(O.LinearProgress,"errorBg",Ht(O.error.main,.5)),we(O.LinearProgress,"infoBg",Ht(O.info.main,.5)),we(O.LinearProgress,"successBg",Ht(O.success.main,.5)),we(O.LinearProgress,"warningBg",Ht(O.warning.main,.5)),we(O.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.13)`),we(O.Slider,"primaryTrack",Ht(O.primary.main,.5)),we(O.Slider,"secondaryTrack",Ht(O.secondary.main,.5)),we(O.Slider,"errorTrack",Ht(O.error.main,.5)),we(O.Slider,"infoTrack",Ht(O.info.main,.5)),we(O.Slider,"successTrack",Ht(O.success.main,.5)),we(O.Slider,"warningTrack",Ht(O.warning.main,.5));const F=jd(O.background.default,.98);we(O.SnackbarContent,"bg",F),we(O.SnackbarContent,"color",Vo(()=>O.getContrastText(F))),we(O.SpeedDialAction,"fabHoverBg",jd(O.background.paper,.15)),we(O.StepConnector,"border",D("palette-grey-600")),we(O.StepContent,"border",D("palette-grey-600")),we(O.Switch,"defaultColor",D("palette-grey-300")),we(O.Switch,"defaultDisabledColor",D("palette-grey-600")),we(O.Switch,"primaryDisabledColor",Ht(O.primary.main,.55)),we(O.Switch,"secondaryDisabledColor",Ht(O.secondary.main,.55)),we(O.Switch,"errorDisabledColor",Ht(O.error.main,.55)),we(O.Switch,"infoDisabledColor",Ht(O.info.main,.55)),we(O.Switch,"successDisabledColor",Ht(O.success.main,.55)),we(O.Switch,"warningDisabledColor",Ht(O.warning.main,.55)),we(O.TableCell,"border",Ht(Hd(O.divider,1),.68)),we(O.Tooltip,"bg",Hd(O.grey[700],.92))}di(O.background,"default"),di(O.background,"paper"),di(O.common,"background"),di(O.common,"onBackground"),di(O,"divider"),Object.keys(O).forEach(F=>{const V=O[F];F!=="tonalOffset"&&V&&typeof V=="object"&&(V.main&&we(O[F],"mainChannel",dc(mc(V.main))),V.light&&we(O[F],"lightChannel",dc(mc(V.light))),V.dark&&we(O[F],"darkChannel",dc(mc(V.dark))),V.contrastText&&we(O[F],"contrastTextChannel",dc(mc(V.contrastText))),F==="text"&&(di(O[F],"primary"),di(O[F],"secondary")),F==="action"&&(V.active&&di(O[F],"active"),V.selected&&di(O[F],"selected")))})}),C=e.reduce((L,O)=>$n(L,O),C);const E={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:F3(C)},{vars:M,generateThemeVars:A,generateStyleSheets:I}=BV(C,E);return C.vars=M,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([L,O])=>{C[L]=O}),C.generateThemeVars=A,C.generateStyleSheets=I,C.generateSpacing=function(){return UC(u.spacing,Dd(this))},C.getColorSchemeSelector=VV(a),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...cc,...u==null?void 0:u.unstable_sxConfig},C.unstable_sx=function(O){return Va({sx:O,theme:this})},C.toRuntimeSource=y_,C}function x_(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:gm({...n===!0?{}:n.palette,mode:e})})}function H3(t={},...e){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...s}=t,a=i||"light",l=o==null?void 0:o[a],u={...o,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in t))return mm(t,...e);let f=n;"palette"in t||u[a]&&(u[a]!==!0?f=u[a].palette:a==="dark"&&(f={mode:"dark"}));const p=mm({...t,palette:f},...e);return p.defaultColorScheme=a,p.colorSchemes=u,p.palette.mode==="light"&&(p.colorSchemes.light={...u.light!==!0&&u.light,palette:p.palette},x_(p,"dark",u.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:p.palette},x_(p,"light",u.light)),p}return!n&&!("light"in u)&&a==="light"&&(u.light=!0),z3({...s,colorSchemes:u,defaultColorScheme:a,...typeof r!="boolean"&&r},...e)}const Ud=H3(),yc="$$material";function fi(){const t=Bd(Ud);return process.env.NODE_ENV!=="production"&&P.useDebugValue(t),t[yc]||t}function S_(t){return v.jsx(GC,{...t,defaultTheme:Ud,themeId:yc})}process.env.NODE_ENV!=="production"&&(S_.propTypes={styles:c.oneOfType([c.array,c.func,c.number,c.object,c.string,c.bool])});function w_(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const Co=t=>w_(t)&&t!=="classes",Se=XC({themeId:yc,defaultTheme:Ud,rootShouldForwardProp:Co});function j3(t){return function(n){return v.jsx(S_,{styles:typeof t=="function"?r=>t({theme:r,...n}):t})}}function W3(){return am}const Vt=LV;process.env.NODE_ENV!=="production"&&(c.node,c.object.isRequired);function Et(t){return NV(t)}function q3(t){return Qe("MuiSvgIcon",t)}tt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const U3=t=>{const{color:e,fontSize:n,classes:r}=t,o={root:["root",e!=="inherit"&&`color${$e(e)}`,`fontSize${$e(n)}`]};return Ze(o,q3,r)},K3=Se("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${$e(n.color)}`],e[`fontSize${$e(n.fontSize)}`]]}})(Vt(({theme:t})=>{var e,n,r,o,i,s,a,l,u,f,p,g,m,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(e=t.transitions)==null?void 0:e.create)==null?void 0:o.call(e,"fill",{duration:(r=(n=(t.vars??t).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(i=t.typography)==null?void 0:i.pxToRem)==null?void 0:s.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(a=t.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(u=t.typography)==null?void 0:u.pxToRem)==null?void 0:f.call(u,35))||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter(([,y])=>y&&y.main).map(([y])=>{var x,w;return{props:{color:y},style:{color:(w=(x=(t.vars??t).palette)==null?void 0:x[y])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(g=(p=(t.vars??t).palette)==null?void 0:p.action)==null?void 0:g.active}},{props:{color:"disabled"},style:{color:(b=(m=(t.vars??t).palette)==null?void 0:m.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Kd=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiSvgIcon"}),{children:o,className:i,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:p,viewBox:g="0 0 24 24",...m}=r,b=P.isValidElement(o)&&o.type==="svg",y={...r,color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:g,hasSvgAsChild:b},x={};f||(x.viewBox=g);const w=U3(y);return v.jsxs(K3,{as:a,className:ze(w.root,i),focusable:"false",color:u,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:n,...x,...m,...b&&o.props,ownerState:y,children:[b?o.props.children:o,p?v.jsx("title",{children:p}):null]})});process.env.NODE_ENV!=="production"&&(Kd.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,fontSize:c.oneOfType([c.oneOf(["inherit","large","medium","small"]),c.string]),htmlColor:c.string,inheritViewBox:c.bool,shapeRendering:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),titleAccess:c.string,viewBox:c.string}),Kd.muiName="SvgIcon";function Ke(t,e){function n(r,o){return v.jsx(Kd,{"data-testid":`${e}Icon`,ref:o,...r,children:t})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${e}Icon`),n.muiName=Kd.muiName,P.memo(P.forwardRef(n))}function G3(t,e){if(!t)return e;if(typeof t=="function"||typeof e=="function")return o=>{const i=typeof e=="function"?e(o):e,s=typeof t=="function"?t({...o,...i}):t,a=ze(o==null?void 0:o.className,i==null?void 0:i.className,s==null?void 0:s.className);return{...i,...s,...!!a&&{className:a},...(i==null?void 0:i.style)&&(s==null?void 0:s.style)&&{style:{...i.style,...s.style}},...(i==null?void 0:i.sx)&&(s==null?void 0:s.sx)&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(s.sx)?s.sx:[s.sx]]}}};const n=e,r=ze(n==null?void 0:n.className,t==null?void 0:t.className);return{...e,...t,...!!r&&{className:r},...(n==null?void 0:n.style)&&(t==null?void 0:t.style)&&{style:{...n.style,...t.style}},...(n==null?void 0:n.sx)&&(t==null?void 0:t.sx)&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(t.sx)?t.sx:[t.sx]]}}}const C_=Ke(v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),ur=t=>{var i;const{name:e,id:n,className:r}=t,{formState:{errors:o}}=an();return v.jsxs($.Typography,{id:n,variant:"caption",display:"block",color:"error",style:{visibility:o[e]?"visible":"hidden"},className:r,fontSize:".9rem",children:[v.jsx($.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",position:"relative",top:"3px",mr:.5},children:v.jsx(C_,{fontSize:"inherit"})}),`${(i=o[e])==null?void 0:i.message}`]})},__=t=>{const{name:e,label:n=Wn(e),options:r=[],filterSelectedOptions:o=!0,variant:i="outlined",staticLabel:s=!1,staticLabelProps:a={fontSize:".9em",color:"#808080"},readOnly:l,margin:u="dense",fullWidth:f=!0,required:p,onChange:g,clearOnSelect:m=!1,onInputChange:b,getOptionLabel:y=D=>typeof D=="string"?D:String(D),isOptionEqualToValue:x=(D,F)=>JSON.stringify(D)===JSON.stringify(F),useFieldAsValue:w,...T}=t,{setValue:_,getValues:C,formState:{errors:E},control:M}=an(),[A,I]=P.useState(""),L={...lr(T,["useFieldAsValue"]),getOptionLabel:y,options:r,filterSelectedOptions:o,isOptionEqualToValue:x,renderInput:D=>v.jsx($.TextField,{...D,variant:i,label:s?void 0:n,error:!!E[e],required:p}),onChange:(D,F,V,z)=>{m?(I(""),_(e,null,{shouldValidate:!0})):w?_(e,F?F[w]:null,{shouldValidate:!0}):_(e,F,{shouldValidate:!0}),g&&g(D,F,V,z)},onInputChange:(D,F,V)=>{I(F),b&&b(D,F,V)},fullWidth:!0,inputValue:A,value:w?r.find(D=>D[w]===C(e))||null:C(e),slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}},O=()=>{if(!C(e))return"";if(w){const D=r.find(F=>F[w]===C(e));return D?y(D):""}return y(C(e))};return v.jsx(Xn,{name:e,control:M,render:()=>v.jsxs($.FormControl,{margin:u,fullWidth:f,required:p,children:[(s||l)&&v.jsx($.Typography,{...a,children:n}),l?v.jsx($.Typography,{children:O()}):v.jsxs($.Box,{children:[v.jsx($.Autocomplete,{...L}),v.jsx(ur,{name:e,id:`${e}-err`})]})]})})};var bc={exports:{}};/**
82
+ * @license
83
+ * Lodash <https://lodash.com/>
84
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
85
+ * Released under MIT license <https://lodash.com/license>
86
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
87
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
88
+ */var Y3=bc.exports,T_;function J3(){return T_||(T_=1,function(t,e){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",p=1,g=2,m=4,b=1,y=2,x=1,w=2,T=4,_=8,C=16,E=32,M=64,A=128,I=256,L=512,O=30,D="...",F=800,V=16,z=1,R=2,B=3,U=1/0,K=9007199254740991,Y=17976931348623157e292,G=NaN,Z=4294967295,ge=Z-1,he=Z>>>1,me=[["ary",A],["bind",x],["bindKey",w],["curry",_],["curryRight",C],["flip",L],["partial",E],["partialRight",M],["rearg",I]],oe="[object Arguments]",ye="[object Array]",de="[object AsyncFunction]",X="[object Boolean]",Q="[object Date]",ae="[object DOMException]",ve="[object Error]",ne="[object Function]",ce="[object GeneratorFunction]",fe="[object Map]",xe="[object Number]",Te="[object Null]",_e="[object Object]",Ne="[object Promise]",He="[object Proxy]",W="[object RegExp]",te="[object Set]",re="[object String]",Me="[object Symbol]",Ie="[object Undefined]",De="[object WeakMap]",je="[object WeakSet]",ot="[object ArrayBuffer]",nt="[object DataView]",At="[object Float32Array]",_n="[object Float64Array]",ut="[object Int8Array]",Pn="[object Int16Array]",$t="[object Int32Array]",pe="[object Uint8Array]",We="[object Uint8ClampedArray]",Ae="[object Uint16Array]",qe="[object Uint32Array]",Xe=/\b__p \+= '';/g,ct=/\b(__p \+=) '' \+/g,zt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gr=/&(?:amp|lt|gt|quot|#39);/g,Or=/[&<>"']/g,Di=RegExp(gr.source),Yu=RegExp(Or.source),Rl=/<%-([\s\S]+?)%>/g,Ts=/<%([\s\S]+?)%>/g,Hh=/<%=([\s\S]+?)%>/g,Ju=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bl=/^\w*$/,Mae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cS=/[\\^$.*+?()[\]{}|]/g,Aae=RegExp(cS.source),uS=/^\s+/,Iae=/\s/,Dae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pae=/\{\n\/\* \[wrapped with (.+)\] \*/,Nae=/,? & /,Lae=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$ae=/[()=,{}\[\]\/\s]/,Fae=/\\(\\)?/g,Rae=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,F$=/\w*$/,Bae=/^[-+]0x[0-9a-f]+$/i,Vae=/^0b[01]+$/i,zae=/^\[object .+?Constructor\]$/,Hae=/^0o[0-7]+$/i,jae=/^(?:0|[1-9]\d*)$/,Wae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jh=/($^)/,qae=/['\n\r\u2028\u2029\\]/g,Wh="\\ud800-\\udfff",Uae="\\u0300-\\u036f",Kae="\\ufe20-\\ufe2f",Gae="\\u20d0-\\u20ff",R$=Uae+Kae+Gae,B$="\\u2700-\\u27bf",V$="a-z\\xdf-\\xf6\\xf8-\\xff",Yae="\\xac\\xb1\\xd7\\xf7",Jae="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xae="\\u2000-\\u206f",Zae=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",z$="A-Z\\xc0-\\xd6\\xd8-\\xde",H$="\\ufe0e\\ufe0f",j$=Yae+Jae+Xae+Zae,dS="['’]",Qae="["+Wh+"]",W$="["+j$+"]",qh="["+R$+"]",q$="\\d+",ele="["+B$+"]",U$="["+V$+"]",K$="[^"+Wh+j$+q$+B$+V$+z$+"]",fS="\\ud83c[\\udffb-\\udfff]",tle="(?:"+qh+"|"+fS+")",G$="[^"+Wh+"]",pS="(?:\\ud83c[\\udde6-\\uddff]){2}",hS="[\\ud800-\\udbff][\\udc00-\\udfff]",Vl="["+z$+"]",Y$="\\u200d",J$="(?:"+U$+"|"+K$+")",nle="(?:"+Vl+"|"+K$+")",X$="(?:"+dS+"(?:d|ll|m|re|s|t|ve))?",Z$="(?:"+dS+"(?:D|LL|M|RE|S|T|VE))?",Q$=tle+"?",eF="["+H$+"]?",rle="(?:"+Y$+"(?:"+[G$,pS,hS].join("|")+")"+eF+Q$+")*",ole="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ile="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tF=eF+Q$+rle,sle="(?:"+[ele,pS,hS].join("|")+")"+tF,ale="(?:"+[G$+qh+"?",qh,pS,hS,Qae].join("|")+")",lle=RegExp(dS,"g"),cle=RegExp(qh,"g"),gS=RegExp(fS+"(?="+fS+")|"+ale+tF,"g"),ule=RegExp([Vl+"?"+U$+"+"+X$+"(?="+[W$,Vl,"$"].join("|")+")",nle+"+"+Z$+"(?="+[W$,Vl+J$,"$"].join("|")+")",Vl+"?"+J$+"+"+X$,Vl+"+"+Z$,ile,ole,q$,sle].join("|"),"g"),dle=RegExp("["+Y$+Wh+R$+H$+"]"),fle=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ple=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],hle=-1,nn={};nn[At]=nn[_n]=nn[ut]=nn[Pn]=nn[$t]=nn[pe]=nn[We]=nn[Ae]=nn[qe]=!0,nn[oe]=nn[ye]=nn[ot]=nn[X]=nn[nt]=nn[Q]=nn[ve]=nn[ne]=nn[fe]=nn[xe]=nn[_e]=nn[W]=nn[te]=nn[re]=nn[De]=!1;var Yt={};Yt[oe]=Yt[ye]=Yt[ot]=Yt[nt]=Yt[X]=Yt[Q]=Yt[At]=Yt[_n]=Yt[ut]=Yt[Pn]=Yt[$t]=Yt[fe]=Yt[xe]=Yt[_e]=Yt[W]=Yt[te]=Yt[re]=Yt[Me]=Yt[pe]=Yt[We]=Yt[Ae]=Yt[qe]=!0,Yt[ve]=Yt[ne]=Yt[De]=!1;var gle={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},mle={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yle={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},ble={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},vle=parseFloat,xle=parseInt,nF=typeof qi=="object"&&qi&&qi.Object===Object&&qi,Sle=typeof self=="object"&&self&&self.Object===Object&&self,Yn=nF||Sle||Function("return this")(),mS=e&&!e.nodeType&&e,Ta=mS&&!0&&t&&!t.nodeType&&t,rF=Ta&&Ta.exports===mS,yS=rF&&nF.process,uo=function(){try{var se=Ta&&Ta.require&&Ta.require("util").types;return se||yS&&yS.binding&&yS.binding("util")}catch{}}(),oF=uo&&uo.isArrayBuffer,iF=uo&&uo.isDate,sF=uo&&uo.isMap,aF=uo&&uo.isRegExp,lF=uo&&uo.isSet,cF=uo&&uo.isTypedArray;function zr(se,Ce,be){switch(be.length){case 0:return se.call(Ce);case 1:return se.call(Ce,be[0]);case 2:return se.call(Ce,be[0],be[1]);case 3:return se.call(Ce,be[0],be[1],be[2])}return se.apply(Ce,be)}function wle(se,Ce,be,Ge){for(var ft=-1,It=se==null?0:se.length;++ft<It;){var Nn=se[ft];Ce(Ge,Nn,be(Nn),se)}return Ge}function fo(se,Ce){for(var be=-1,Ge=se==null?0:se.length;++be<Ge&&Ce(se[be],be,se)!==!1;);return se}function Cle(se,Ce){for(var be=se==null?0:se.length;be--&&Ce(se[be],be,se)!==!1;);return se}function uF(se,Ce){for(var be=-1,Ge=se==null?0:se.length;++be<Ge;)if(!Ce(se[be],be,se))return!1;return!0}function ks(se,Ce){for(var be=-1,Ge=se==null?0:se.length,ft=0,It=[];++be<Ge;){var Nn=se[be];Ce(Nn,be,se)&&(It[ft++]=Nn)}return It}function Uh(se,Ce){var be=se==null?0:se.length;return!!be&&zl(se,Ce,0)>-1}function bS(se,Ce,be){for(var Ge=-1,ft=se==null?0:se.length;++Ge<ft;)if(be(Ce,se[Ge]))return!0;return!1}function sn(se,Ce){for(var be=-1,Ge=se==null?0:se.length,ft=Array(Ge);++be<Ge;)ft[be]=Ce(se[be],be,se);return ft}function Es(se,Ce){for(var be=-1,Ge=Ce.length,ft=se.length;++be<Ge;)se[ft+be]=Ce[be];return se}function vS(se,Ce,be,Ge){var ft=-1,It=se==null?0:se.length;for(Ge&&It&&(be=se[++ft]);++ft<It;)be=Ce(be,se[ft],ft,se);return be}function _le(se,Ce,be,Ge){var ft=se==null?0:se.length;for(Ge&&ft&&(be=se[--ft]);ft--;)be=Ce(be,se[ft],ft,se);return be}function xS(se,Ce){for(var be=-1,Ge=se==null?0:se.length;++be<Ge;)if(Ce(se[be],be,se))return!0;return!1}var Tle=SS("length");function kle(se){return se.split("")}function Ele(se){return se.match(Lae)||[]}function dF(se,Ce,be){var Ge;return be(se,function(ft,It,Nn){if(Ce(ft,It,Nn))return Ge=It,!1}),Ge}function Kh(se,Ce,be,Ge){for(var ft=se.length,It=be+(Ge?1:-1);Ge?It--:++It<ft;)if(Ce(se[It],It,se))return It;return-1}function zl(se,Ce,be){return Ce===Ce?Ble(se,Ce,be):Kh(se,fF,be)}function Ole(se,Ce,be,Ge){for(var ft=be-1,It=se.length;++ft<It;)if(Ge(se[ft],Ce))return ft;return-1}function fF(se){return se!==se}function pF(se,Ce){var be=se==null?0:se.length;return be?CS(se,Ce)/be:G}function SS(se){return function(Ce){return Ce==null?n:Ce[se]}}function wS(se){return function(Ce){return se==null?n:se[Ce]}}function hF(se,Ce,be,Ge,ft){return ft(se,function(It,Nn,Ut){be=Ge?(Ge=!1,It):Ce(be,It,Nn,Ut)}),be}function Mle(se,Ce){var be=se.length;for(se.sort(Ce);be--;)se[be]=se[be].value;return se}function CS(se,Ce){for(var be,Ge=-1,ft=se.length;++Ge<ft;){var It=Ce(se[Ge]);It!==n&&(be=be===n?It:be+It)}return be}function _S(se,Ce){for(var be=-1,Ge=Array(se);++be<se;)Ge[be]=Ce(be);return Ge}function Ale(se,Ce){return sn(Ce,function(be){return[be,se[be]]})}function gF(se){return se&&se.slice(0,vF(se)+1).replace(uS,"")}function Hr(se){return function(Ce){return se(Ce)}}function TS(se,Ce){return sn(Ce,function(be){return se[be]})}function Xu(se,Ce){return se.has(Ce)}function mF(se,Ce){for(var be=-1,Ge=se.length;++be<Ge&&zl(Ce,se[be],0)>-1;);return be}function yF(se,Ce){for(var be=se.length;be--&&zl(Ce,se[be],0)>-1;);return be}function Ile(se,Ce){for(var be=se.length,Ge=0;be--;)se[be]===Ce&&++Ge;return Ge}var Dle=wS(gle),Ple=wS(mle);function Nle(se){return"\\"+ble[se]}function Lle(se,Ce){return se==null?n:se[Ce]}function Hl(se){return dle.test(se)}function $le(se){return fle.test(se)}function Fle(se){for(var Ce,be=[];!(Ce=se.next()).done;)be.push(Ce.value);return be}function kS(se){var Ce=-1,be=Array(se.size);return se.forEach(function(Ge,ft){be[++Ce]=[ft,Ge]}),be}function bF(se,Ce){return function(be){return se(Ce(be))}}function Os(se,Ce){for(var be=-1,Ge=se.length,ft=0,It=[];++be<Ge;){var Nn=se[be];(Nn===Ce||Nn===f)&&(se[be]=f,It[ft++]=be)}return It}function Gh(se){var Ce=-1,be=Array(se.size);return se.forEach(function(Ge){be[++Ce]=Ge}),be}function Rle(se){var Ce=-1,be=Array(se.size);return se.forEach(function(Ge){be[++Ce]=[Ge,Ge]}),be}function Ble(se,Ce,be){for(var Ge=be-1,ft=se.length;++Ge<ft;)if(se[Ge]===Ce)return Ge;return-1}function Vle(se,Ce,be){for(var Ge=be+1;Ge--;)if(se[Ge]===Ce)return Ge;return Ge}function jl(se){return Hl(se)?Hle(se):Tle(se)}function Do(se){return Hl(se)?jle(se):kle(se)}function vF(se){for(var Ce=se.length;Ce--&&Iae.test(se.charAt(Ce)););return Ce}var zle=wS(yle);function Hle(se){for(var Ce=gS.lastIndex=0;gS.test(se);)++Ce;return Ce}function jle(se){return se.match(gS)||[]}function Wle(se){return se.match(ule)||[]}var qle=function se(Ce){Ce=Ce==null?Yn:Wl.defaults(Yn.Object(),Ce,Wl.pick(Yn,ple));var be=Ce.Array,Ge=Ce.Date,ft=Ce.Error,It=Ce.Function,Nn=Ce.Math,Ut=Ce.Object,ES=Ce.RegExp,Ule=Ce.String,po=Ce.TypeError,Yh=be.prototype,Kle=It.prototype,ql=Ut.prototype,Jh=Ce["__core-js_shared__"],Xh=Kle.toString,Ft=ql.hasOwnProperty,Gle=0,xF=function(){var d=/[^.]+$/.exec(Jh&&Jh.keys&&Jh.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),Zh=ql.toString,Yle=Xh.call(Ut),Jle=Yn._,Xle=ES("^"+Xh.call(Ft).replace(cS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qh=rF?Ce.Buffer:n,Ms=Ce.Symbol,eg=Ce.Uint8Array,SF=Qh?Qh.allocUnsafe:n,tg=bF(Ut.getPrototypeOf,Ut),wF=Ut.create,CF=ql.propertyIsEnumerable,ng=Yh.splice,_F=Ms?Ms.isConcatSpreadable:n,Zu=Ms?Ms.iterator:n,ka=Ms?Ms.toStringTag:n,rg=function(){try{var d=Ia(Ut,"defineProperty");return d({},"",{}),d}catch{}}(),Zle=Ce.clearTimeout!==Yn.clearTimeout&&Ce.clearTimeout,Qle=Ge&&Ge.now!==Yn.Date.now&&Ge.now,ece=Ce.setTimeout!==Yn.setTimeout&&Ce.setTimeout,og=Nn.ceil,ig=Nn.floor,OS=Ut.getOwnPropertySymbols,tce=Qh?Qh.isBuffer:n,TF=Ce.isFinite,nce=Yh.join,rce=bF(Ut.keys,Ut),Ln=Nn.max,or=Nn.min,oce=Ge.now,ice=Ce.parseInt,kF=Nn.random,sce=Yh.reverse,MS=Ia(Ce,"DataView"),Qu=Ia(Ce,"Map"),AS=Ia(Ce,"Promise"),Ul=Ia(Ce,"Set"),ed=Ia(Ce,"WeakMap"),td=Ia(Ut,"create"),sg=ed&&new ed,Kl={},ace=Da(MS),lce=Da(Qu),cce=Da(AS),uce=Da(Ul),dce=Da(ed),ag=Ms?Ms.prototype:n,nd=ag?ag.valueOf:n,EF=ag?ag.toString:n;function H(d){if(vn(d)&&!pt(d)&&!(d instanceof wt)){if(d instanceof ho)return d;if(Ft.call(d,"__wrapped__"))return OR(d)}return new ho(d)}var Gl=function(){function d(){}return function(h){if(!un(h))return{};if(wF)return wF(h);d.prototype=h;var S=new d;return d.prototype=n,S}}();function lg(){}function ho(d,h){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=n}H.templateSettings={escape:Rl,evaluate:Ts,interpolate:Hh,variable:"",imports:{_:H}},H.prototype=lg.prototype,H.prototype.constructor=H,ho.prototype=Gl(lg.prototype),ho.prototype.constructor=ho;function wt(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Z,this.__views__=[]}function fce(){var d=new wt(this.__wrapped__);return d.__actions__=Mr(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=Mr(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=Mr(this.__views__),d}function pce(){if(this.__filtered__){var d=new wt(this);d.__dir__=-1,d.__filtered__=!0}else d=this.clone(),d.__dir__*=-1;return d}function hce(){var d=this.__wrapped__.value(),h=this.__dir__,S=pt(d),k=h<0,N=S?d.length:0,j=kue(0,N,this.__views__),J=j.start,ee=j.end,le=ee-J,ke=k?ee:J-1,Ee=this.__iteratees__,Pe=Ee.length,Ve=0,Je=or(le,this.__takeCount__);if(!S||!k&&N==le&&Je==le)return XF(d,this.__actions__);var at=[];e:for(;le--&&Ve<Je;){ke+=h;for(var yt=-1,lt=d[ke];++yt<Pe;){var xt=Ee[yt],kt=xt.iteratee,qr=xt.type,br=kt(lt);if(qr==R)lt=br;else if(!br){if(qr==z)continue e;break e}}at[Ve++]=lt}return at}wt.prototype=Gl(lg.prototype),wt.prototype.constructor=wt;function Ea(d){var h=-1,S=d==null?0:d.length;for(this.clear();++h<S;){var k=d[h];this.set(k[0],k[1])}}function gce(){this.__data__=td?td(null):{},this.size=0}function mce(d){var h=this.has(d)&&delete this.__data__[d];return this.size-=h?1:0,h}function yce(d){var h=this.__data__;if(td){var S=h[d];return S===l?n:S}return Ft.call(h,d)?h[d]:n}function bce(d){var h=this.__data__;return td?h[d]!==n:Ft.call(h,d)}function vce(d,h){var S=this.__data__;return this.size+=this.has(d)?0:1,S[d]=td&&h===n?l:h,this}Ea.prototype.clear=gce,Ea.prototype.delete=mce,Ea.prototype.get=yce,Ea.prototype.has=bce,Ea.prototype.set=vce;function Pi(d){var h=-1,S=d==null?0:d.length;for(this.clear();++h<S;){var k=d[h];this.set(k[0],k[1])}}function xce(){this.__data__=[],this.size=0}function Sce(d){var h=this.__data__,S=cg(h,d);if(S<0)return!1;var k=h.length-1;return S==k?h.pop():ng.call(h,S,1),--this.size,!0}function wce(d){var h=this.__data__,S=cg(h,d);return S<0?n:h[S][1]}function Cce(d){return cg(this.__data__,d)>-1}function _ce(d,h){var S=this.__data__,k=cg(S,d);return k<0?(++this.size,S.push([d,h])):S[k][1]=h,this}Pi.prototype.clear=xce,Pi.prototype.delete=Sce,Pi.prototype.get=wce,Pi.prototype.has=Cce,Pi.prototype.set=_ce;function Ni(d){var h=-1,S=d==null?0:d.length;for(this.clear();++h<S;){var k=d[h];this.set(k[0],k[1])}}function Tce(){this.size=0,this.__data__={hash:new Ea,map:new(Qu||Pi),string:new Ea}}function kce(d){var h=Sg(this,d).delete(d);return this.size-=h?1:0,h}function Ece(d){return Sg(this,d).get(d)}function Oce(d){return Sg(this,d).has(d)}function Mce(d,h){var S=Sg(this,d),k=S.size;return S.set(d,h),this.size+=S.size==k?0:1,this}Ni.prototype.clear=Tce,Ni.prototype.delete=kce,Ni.prototype.get=Ece,Ni.prototype.has=Oce,Ni.prototype.set=Mce;function Oa(d){var h=-1,S=d==null?0:d.length;for(this.__data__=new Ni;++h<S;)this.add(d[h])}function Ace(d){return this.__data__.set(d,l),this}function Ice(d){return this.__data__.has(d)}Oa.prototype.add=Oa.prototype.push=Ace,Oa.prototype.has=Ice;function Po(d){var h=this.__data__=new Pi(d);this.size=h.size}function Dce(){this.__data__=new Pi,this.size=0}function Pce(d){var h=this.__data__,S=h.delete(d);return this.size=h.size,S}function Nce(d){return this.__data__.get(d)}function Lce(d){return this.__data__.has(d)}function $ce(d,h){var S=this.__data__;if(S instanceof Pi){var k=S.__data__;if(!Qu||k.length<o-1)return k.push([d,h]),this.size=++S.size,this;S=this.__data__=new Ni(k)}return S.set(d,h),this.size=S.size,this}Po.prototype.clear=Dce,Po.prototype.delete=Pce,Po.prototype.get=Nce,Po.prototype.has=Lce,Po.prototype.set=$ce;function OF(d,h){var S=pt(d),k=!S&&Pa(d),N=!S&&!k&&Ns(d),j=!S&&!k&&!N&&Zl(d),J=S||k||N||j,ee=J?_S(d.length,Ule):[],le=ee.length;for(var ke in d)(h||Ft.call(d,ke))&&!(J&&(ke=="length"||N&&(ke=="offset"||ke=="parent")||j&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||Ri(ke,le)))&&ee.push(ke);return ee}function MF(d){var h=d.length;return h?d[zS(0,h-1)]:n}function Fce(d,h){return wg(Mr(d),Ma(h,0,d.length))}function Rce(d){return wg(Mr(d))}function IS(d,h,S){(S!==n&&!No(d[h],S)||S===n&&!(h in d))&&Li(d,h,S)}function rd(d,h,S){var k=d[h];(!(Ft.call(d,h)&&No(k,S))||S===n&&!(h in d))&&Li(d,h,S)}function cg(d,h){for(var S=d.length;S--;)if(No(d[S][0],h))return S;return-1}function Bce(d,h,S,k){return As(d,function(N,j,J){h(k,N,S(N),J)}),k}function AF(d,h){return d&&ri(h,jn(h),d)}function Vce(d,h){return d&&ri(h,Ir(h),d)}function Li(d,h,S){h=="__proto__"&&rg?rg(d,h,{configurable:!0,enumerable:!0,value:S,writable:!0}):d[h]=S}function DS(d,h){for(var S=-1,k=h.length,N=be(k),j=d==null;++S<k;)N[S]=j?n:fw(d,h[S]);return N}function Ma(d,h,S){return d===d&&(S!==n&&(d=d<=S?d:S),h!==n&&(d=d>=h?d:h)),d}function go(d,h,S,k,N,j){var J,ee=h&p,le=h&g,ke=h&m;if(S&&(J=N?S(d,k,N,j):S(d)),J!==n)return J;if(!un(d))return d;var Ee=pt(d);if(Ee){if(J=Oue(d),!ee)return Mr(d,J)}else{var Pe=ir(d),Ve=Pe==ne||Pe==ce;if(Ns(d))return eR(d,ee);if(Pe==_e||Pe==oe||Ve&&!N){if(J=le||Ve?{}:vR(d),!ee)return le?yue(d,Vce(J,d)):mue(d,AF(J,d))}else{if(!Yt[Pe])return N?d:{};J=Mue(d,Pe,ee)}}j||(j=new Po);var Je=j.get(d);if(Je)return Je;j.set(d,J),GR(d)?d.forEach(function(lt){J.add(go(lt,h,S,lt,d,j))}):UR(d)&&d.forEach(function(lt,xt){J.set(xt,go(lt,h,S,xt,d,j))});var at=ke?le?ZS:XS:le?Ir:jn,yt=Ee?n:at(d);return fo(yt||d,function(lt,xt){yt&&(xt=lt,lt=d[xt]),rd(J,xt,go(lt,h,S,xt,d,j))}),J}function zce(d){var h=jn(d);return function(S){return IF(S,d,h)}}function IF(d,h,S){var k=S.length;if(d==null)return!k;for(d=Ut(d);k--;){var N=S[k],j=h[N],J=d[N];if(J===n&&!(N in d)||!j(J))return!1}return!0}function DF(d,h,S){if(typeof d!="function")throw new po(s);return ud(function(){d.apply(n,S)},h)}function od(d,h,S,k){var N=-1,j=Uh,J=!0,ee=d.length,le=[],ke=h.length;if(!ee)return le;S&&(h=sn(h,Hr(S))),k?(j=bS,J=!1):h.length>=o&&(j=Xu,J=!1,h=new Oa(h));e:for(;++N<ee;){var Ee=d[N],Pe=S==null?Ee:S(Ee);if(Ee=k||Ee!==0?Ee:0,J&&Pe===Pe){for(var Ve=ke;Ve--;)if(h[Ve]===Pe)continue e;le.push(Ee)}else j(h,Pe,k)||le.push(Ee)}return le}var As=iR(ni),PF=iR(NS,!0);function Hce(d,h){var S=!0;return As(d,function(k,N,j){return S=!!h(k,N,j),S}),S}function ug(d,h,S){for(var k=-1,N=d.length;++k<N;){var j=d[k],J=h(j);if(J!=null&&(ee===n?J===J&&!Wr(J):S(J,ee)))var ee=J,le=j}return le}function jce(d,h,S,k){var N=d.length;for(S=ht(S),S<0&&(S=-S>N?0:N+S),k=k===n||k>N?N:ht(k),k<0&&(k+=N),k=S>k?0:JR(k);S<k;)d[S++]=h;return d}function NF(d,h){var S=[];return As(d,function(k,N,j){h(k,N,j)&&S.push(k)}),S}function Jn(d,h,S,k,N){var j=-1,J=d.length;for(S||(S=Iue),N||(N=[]);++j<J;){var ee=d[j];h>0&&S(ee)?h>1?Jn(ee,h-1,S,k,N):Es(N,ee):k||(N[N.length]=ee)}return N}var PS=sR(),LF=sR(!0);function ni(d,h){return d&&PS(d,h,jn)}function NS(d,h){return d&&LF(d,h,jn)}function dg(d,h){return ks(h,function(S){return Bi(d[S])})}function Aa(d,h){h=Ds(h,d);for(var S=0,k=h.length;d!=null&&S<k;)d=d[oi(h[S++])];return S&&S==k?d:n}function $F(d,h,S){var k=h(d);return pt(d)?k:Es(k,S(d))}function mr(d){return d==null?d===n?Ie:Te:ka&&ka in Ut(d)?Tue(d):Rue(d)}function LS(d,h){return d>h}function Wce(d,h){return d!=null&&Ft.call(d,h)}function qce(d,h){return d!=null&&h in Ut(d)}function Uce(d,h,S){return d>=or(h,S)&&d<Ln(h,S)}function $S(d,h,S){for(var k=S?bS:Uh,N=d[0].length,j=d.length,J=j,ee=be(j),le=1/0,ke=[];J--;){var Ee=d[J];J&&h&&(Ee=sn(Ee,Hr(h))),le=or(Ee.length,le),ee[J]=!S&&(h||N>=120&&Ee.length>=120)?new Oa(J&&Ee):n}Ee=d[0];var Pe=-1,Ve=ee[0];e:for(;++Pe<N&&ke.length<le;){var Je=Ee[Pe],at=h?h(Je):Je;if(Je=S||Je!==0?Je:0,!(Ve?Xu(Ve,at):k(ke,at,S))){for(J=j;--J;){var yt=ee[J];if(!(yt?Xu(yt,at):k(d[J],at,S)))continue e}Ve&&Ve.push(at),ke.push(Je)}}return ke}function Kce(d,h,S,k){return ni(d,function(N,j,J){h(k,S(N),j,J)}),k}function id(d,h,S){h=Ds(h,d),d=CR(d,h);var k=d==null?d:d[oi(yo(h))];return k==null?n:zr(k,d,S)}function FF(d){return vn(d)&&mr(d)==oe}function Gce(d){return vn(d)&&mr(d)==ot}function Yce(d){return vn(d)&&mr(d)==Q}function sd(d,h,S,k,N){return d===h?!0:d==null||h==null||!vn(d)&&!vn(h)?d!==d&&h!==h:Jce(d,h,S,k,sd,N)}function Jce(d,h,S,k,N,j){var J=pt(d),ee=pt(h),le=J?ye:ir(d),ke=ee?ye:ir(h);le=le==oe?_e:le,ke=ke==oe?_e:ke;var Ee=le==_e,Pe=ke==_e,Ve=le==ke;if(Ve&&Ns(d)){if(!Ns(h))return!1;J=!0,Ee=!1}if(Ve&&!Ee)return j||(j=new Po),J||Zl(d)?mR(d,h,S,k,N,j):Cue(d,h,le,S,k,N,j);if(!(S&b)){var Je=Ee&&Ft.call(d,"__wrapped__"),at=Pe&&Ft.call(h,"__wrapped__");if(Je||at){var yt=Je?d.value():d,lt=at?h.value():h;return j||(j=new Po),N(yt,lt,S,k,j)}}return Ve?(j||(j=new Po),_ue(d,h,S,k,N,j)):!1}function Xce(d){return vn(d)&&ir(d)==fe}function FS(d,h,S,k){var N=S.length,j=N,J=!k;if(d==null)return!j;for(d=Ut(d);N--;){var ee=S[N];if(J&&ee[2]?ee[1]!==d[ee[0]]:!(ee[0]in d))return!1}for(;++N<j;){ee=S[N];var le=ee[0],ke=d[le],Ee=ee[1];if(J&&ee[2]){if(ke===n&&!(le in d))return!1}else{var Pe=new Po;if(k)var Ve=k(ke,Ee,le,d,h,Pe);if(!(Ve===n?sd(Ee,ke,b|y,k,Pe):Ve))return!1}}return!0}function RF(d){if(!un(d)||Pue(d))return!1;var h=Bi(d)?Xle:zae;return h.test(Da(d))}function Zce(d){return vn(d)&&mr(d)==W}function Qce(d){return vn(d)&&ir(d)==te}function eue(d){return vn(d)&&Og(d.length)&&!!nn[mr(d)]}function BF(d){return typeof d=="function"?d:d==null?Dr:typeof d=="object"?pt(d)?HF(d[0],d[1]):zF(d):aB(d)}function RS(d){if(!cd(d))return rce(d);var h=[];for(var S in Ut(d))Ft.call(d,S)&&S!="constructor"&&h.push(S);return h}function tue(d){if(!un(d))return Fue(d);var h=cd(d),S=[];for(var k in d)k=="constructor"&&(h||!Ft.call(d,k))||S.push(k);return S}function BS(d,h){return d<h}function VF(d,h){var S=-1,k=Ar(d)?be(d.length):[];return As(d,function(N,j,J){k[++S]=h(N,j,J)}),k}function zF(d){var h=ew(d);return h.length==1&&h[0][2]?SR(h[0][0],h[0][1]):function(S){return S===d||FS(S,d,h)}}function HF(d,h){return nw(d)&&xR(h)?SR(oi(d),h):function(S){var k=fw(S,d);return k===n&&k===h?pw(S,d):sd(h,k,b|y)}}function fg(d,h,S,k,N){d!==h&&PS(h,function(j,J){if(N||(N=new Po),un(j))nue(d,h,J,S,fg,k,N);else{var ee=k?k(ow(d,J),j,J+"",d,h,N):n;ee===n&&(ee=j),IS(d,J,ee)}},Ir)}function nue(d,h,S,k,N,j,J){var ee=ow(d,S),le=ow(h,S),ke=J.get(le);if(ke){IS(d,S,ke);return}var Ee=j?j(ee,le,S+"",d,h,J):n,Pe=Ee===n;if(Pe){var Ve=pt(le),Je=!Ve&&Ns(le),at=!Ve&&!Je&&Zl(le);Ee=le,Ve||Je||at?pt(ee)?Ee=ee:Tn(ee)?Ee=Mr(ee):Je?(Pe=!1,Ee=eR(le,!0)):at?(Pe=!1,Ee=tR(le,!0)):Ee=[]:dd(le)||Pa(le)?(Ee=ee,Pa(ee)?Ee=XR(ee):(!un(ee)||Bi(ee))&&(Ee=vR(le))):Pe=!1}Pe&&(J.set(le,Ee),N(Ee,le,k,j,J),J.delete(le)),IS(d,S,Ee)}function jF(d,h){var S=d.length;if(S)return h+=h<0?S:0,Ri(h,S)?d[h]:n}function WF(d,h,S){h.length?h=sn(h,function(j){return pt(j)?function(J){return Aa(J,j.length===1?j[0]:j)}:j}):h=[Dr];var k=-1;h=sn(h,Hr(it()));var N=VF(d,function(j,J,ee){var le=sn(h,function(ke){return ke(j)});return{criteria:le,index:++k,value:j}});return Mle(N,function(j,J){return gue(j,J,S)})}function rue(d,h){return qF(d,h,function(S,k){return pw(d,k)})}function qF(d,h,S){for(var k=-1,N=h.length,j={};++k<N;){var J=h[k],ee=Aa(d,J);S(ee,J)&&ad(j,Ds(J,d),ee)}return j}function oue(d){return function(h){return Aa(h,d)}}function VS(d,h,S,k){var N=k?Ole:zl,j=-1,J=h.length,ee=d;for(d===h&&(h=Mr(h)),S&&(ee=sn(d,Hr(S)));++j<J;)for(var le=0,ke=h[j],Ee=S?S(ke):ke;(le=N(ee,Ee,le,k))>-1;)ee!==d&&ng.call(ee,le,1),ng.call(d,le,1);return d}function UF(d,h){for(var S=d?h.length:0,k=S-1;S--;){var N=h[S];if(S==k||N!==j){var j=N;Ri(N)?ng.call(d,N,1):WS(d,N)}}return d}function zS(d,h){return d+ig(kF()*(h-d+1))}function iue(d,h,S,k){for(var N=-1,j=Ln(og((h-d)/(S||1)),0),J=be(j);j--;)J[k?j:++N]=d,d+=S;return J}function HS(d,h){var S="";if(!d||h<1||h>K)return S;do h%2&&(S+=d),h=ig(h/2),h&&(d+=d);while(h);return S}function bt(d,h){return iw(wR(d,h,Dr),d+"")}function sue(d){return MF(Ql(d))}function aue(d,h){var S=Ql(d);return wg(S,Ma(h,0,S.length))}function ad(d,h,S,k){if(!un(d))return d;h=Ds(h,d);for(var N=-1,j=h.length,J=j-1,ee=d;ee!=null&&++N<j;){var le=oi(h[N]),ke=S;if(le==="__proto__"||le==="constructor"||le==="prototype")return d;if(N!=J){var Ee=ee[le];ke=k?k(Ee,le,ee):n,ke===n&&(ke=un(Ee)?Ee:Ri(h[N+1])?[]:{})}rd(ee,le,ke),ee=ee[le]}return d}var KF=sg?function(d,h){return sg.set(d,h),d}:Dr,lue=rg?function(d,h){return rg(d,"toString",{configurable:!0,enumerable:!1,value:gw(h),writable:!0})}:Dr;function cue(d){return wg(Ql(d))}function mo(d,h,S){var k=-1,N=d.length;h<0&&(h=-h>N?0:N+h),S=S>N?N:S,S<0&&(S+=N),N=h>S?0:S-h>>>0,h>>>=0;for(var j=be(N);++k<N;)j[k]=d[k+h];return j}function uue(d,h){var S;return As(d,function(k,N,j){return S=h(k,N,j),!S}),!!S}function pg(d,h,S){var k=0,N=d==null?k:d.length;if(typeof h=="number"&&h===h&&N<=he){for(;k<N;){var j=k+N>>>1,J=d[j];J!==null&&!Wr(J)&&(S?J<=h:J<h)?k=j+1:N=j}return N}return jS(d,h,Dr,S)}function jS(d,h,S,k){var N=0,j=d==null?0:d.length;if(j===0)return 0;h=S(h);for(var J=h!==h,ee=h===null,le=Wr(h),ke=h===n;N<j;){var Ee=ig((N+j)/2),Pe=S(d[Ee]),Ve=Pe!==n,Je=Pe===null,at=Pe===Pe,yt=Wr(Pe);if(J)var lt=k||at;else ke?lt=at&&(k||Ve):ee?lt=at&&Ve&&(k||!Je):le?lt=at&&Ve&&!Je&&(k||!yt):Je||yt?lt=!1:lt=k?Pe<=h:Pe<h;lt?N=Ee+1:j=Ee}return or(j,ge)}function GF(d,h){for(var S=-1,k=d.length,N=0,j=[];++S<k;){var J=d[S],ee=h?h(J):J;if(!S||!No(ee,le)){var le=ee;j[N++]=J===0?0:J}}return j}function YF(d){return typeof d=="number"?d:Wr(d)?G:+d}function jr(d){if(typeof d=="string")return d;if(pt(d))return sn(d,jr)+"";if(Wr(d))return EF?EF.call(d):"";var h=d+"";return h=="0"&&1/d==-U?"-0":h}function Is(d,h,S){var k=-1,N=Uh,j=d.length,J=!0,ee=[],le=ee;if(S)J=!1,N=bS;else if(j>=o){var ke=h?null:Sue(d);if(ke)return Gh(ke);J=!1,N=Xu,le=new Oa}else le=h?[]:ee;e:for(;++k<j;){var Ee=d[k],Pe=h?h(Ee):Ee;if(Ee=S||Ee!==0?Ee:0,J&&Pe===Pe){for(var Ve=le.length;Ve--;)if(le[Ve]===Pe)continue e;h&&le.push(Pe),ee.push(Ee)}else N(le,Pe,S)||(le!==ee&&le.push(Pe),ee.push(Ee))}return ee}function WS(d,h){return h=Ds(h,d),d=CR(d,h),d==null||delete d[oi(yo(h))]}function JF(d,h,S,k){return ad(d,h,S(Aa(d,h)),k)}function hg(d,h,S,k){for(var N=d.length,j=k?N:-1;(k?j--:++j<N)&&h(d[j],j,d););return S?mo(d,k?0:j,k?j+1:N):mo(d,k?j+1:0,k?N:j)}function XF(d,h){var S=d;return S instanceof wt&&(S=S.value()),vS(h,function(k,N){return N.func.apply(N.thisArg,Es([k],N.args))},S)}function qS(d,h,S){var k=d.length;if(k<2)return k?Is(d[0]):[];for(var N=-1,j=be(k);++N<k;)for(var J=d[N],ee=-1;++ee<k;)ee!=N&&(j[N]=od(j[N]||J,d[ee],h,S));return Is(Jn(j,1),h,S)}function ZF(d,h,S){for(var k=-1,N=d.length,j=h.length,J={};++k<N;){var ee=k<j?h[k]:n;S(J,d[k],ee)}return J}function US(d){return Tn(d)?d:[]}function KS(d){return typeof d=="function"?d:Dr}function Ds(d,h){return pt(d)?d:nw(d,h)?[d]:ER(Lt(d))}var due=bt;function Ps(d,h,S){var k=d.length;return S=S===n?k:S,!h&&S>=k?d:mo(d,h,S)}var QF=Zle||function(d){return Yn.clearTimeout(d)};function eR(d,h){if(h)return d.slice();var S=d.length,k=SF?SF(S):new d.constructor(S);return d.copy(k),k}function GS(d){var h=new d.constructor(d.byteLength);return new eg(h).set(new eg(d)),h}function fue(d,h){var S=h?GS(d.buffer):d.buffer;return new d.constructor(S,d.byteOffset,d.byteLength)}function pue(d){var h=new d.constructor(d.source,F$.exec(d));return h.lastIndex=d.lastIndex,h}function hue(d){return nd?Ut(nd.call(d)):{}}function tR(d,h){var S=h?GS(d.buffer):d.buffer;return new d.constructor(S,d.byteOffset,d.length)}function nR(d,h){if(d!==h){var S=d!==n,k=d===null,N=d===d,j=Wr(d),J=h!==n,ee=h===null,le=h===h,ke=Wr(h);if(!ee&&!ke&&!j&&d>h||j&&J&&le&&!ee&&!ke||k&&J&&le||!S&&le||!N)return 1;if(!k&&!j&&!ke&&d<h||ke&&S&&N&&!k&&!j||ee&&S&&N||!J&&N||!le)return-1}return 0}function gue(d,h,S){for(var k=-1,N=d.criteria,j=h.criteria,J=N.length,ee=S.length;++k<J;){var le=nR(N[k],j[k]);if(le){if(k>=ee)return le;var ke=S[k];return le*(ke=="desc"?-1:1)}}return d.index-h.index}function rR(d,h,S,k){for(var N=-1,j=d.length,J=S.length,ee=-1,le=h.length,ke=Ln(j-J,0),Ee=be(le+ke),Pe=!k;++ee<le;)Ee[ee]=h[ee];for(;++N<J;)(Pe||N<j)&&(Ee[S[N]]=d[N]);for(;ke--;)Ee[ee++]=d[N++];return Ee}function oR(d,h,S,k){for(var N=-1,j=d.length,J=-1,ee=S.length,le=-1,ke=h.length,Ee=Ln(j-ee,0),Pe=be(Ee+ke),Ve=!k;++N<Ee;)Pe[N]=d[N];for(var Je=N;++le<ke;)Pe[Je+le]=h[le];for(;++J<ee;)(Ve||N<j)&&(Pe[Je+S[J]]=d[N++]);return Pe}function Mr(d,h){var S=-1,k=d.length;for(h||(h=be(k));++S<k;)h[S]=d[S];return h}function ri(d,h,S,k){var N=!S;S||(S={});for(var j=-1,J=h.length;++j<J;){var ee=h[j],le=k?k(S[ee],d[ee],ee,S,d):n;le===n&&(le=d[ee]),N?Li(S,ee,le):rd(S,ee,le)}return S}function mue(d,h){return ri(d,tw(d),h)}function yue(d,h){return ri(d,yR(d),h)}function gg(d,h){return function(S,k){var N=pt(S)?wle:Bce,j=h?h():{};return N(S,d,it(k,2),j)}}function Yl(d){return bt(function(h,S){var k=-1,N=S.length,j=N>1?S[N-1]:n,J=N>2?S[2]:n;for(j=d.length>3&&typeof j=="function"?(N--,j):n,J&&yr(S[0],S[1],J)&&(j=N<3?n:j,N=1),h=Ut(h);++k<N;){var ee=S[k];ee&&d(h,ee,k,j)}return h})}function iR(d,h){return function(S,k){if(S==null)return S;if(!Ar(S))return d(S,k);for(var N=S.length,j=h?N:-1,J=Ut(S);(h?j--:++j<N)&&k(J[j],j,J)!==!1;);return S}}function sR(d){return function(h,S,k){for(var N=-1,j=Ut(h),J=k(h),ee=J.length;ee--;){var le=J[d?ee:++N];if(S(j[le],le,j)===!1)break}return h}}function bue(d,h,S){var k=h&x,N=ld(d);function j(){var J=this&&this!==Yn&&this instanceof j?N:d;return J.apply(k?S:this,arguments)}return j}function aR(d){return function(h){h=Lt(h);var S=Hl(h)?Do(h):n,k=S?S[0]:h.charAt(0),N=S?Ps(S,1).join(""):h.slice(1);return k[d]()+N}}function Jl(d){return function(h){return vS(iB(oB(h).replace(lle,"")),d,"")}}function ld(d){return function(){var h=arguments;switch(h.length){case 0:return new d;case 1:return new d(h[0]);case 2:return new d(h[0],h[1]);case 3:return new d(h[0],h[1],h[2]);case 4:return new d(h[0],h[1],h[2],h[3]);case 5:return new d(h[0],h[1],h[2],h[3],h[4]);case 6:return new d(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new d(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var S=Gl(d.prototype),k=d.apply(S,h);return un(k)?k:S}}function vue(d,h,S){var k=ld(d);function N(){for(var j=arguments.length,J=be(j),ee=j,le=Xl(N);ee--;)J[ee]=arguments[ee];var ke=j<3&&J[0]!==le&&J[j-1]!==le?[]:Os(J,le);if(j-=ke.length,j<S)return fR(d,h,mg,N.placeholder,n,J,ke,n,n,S-j);var Ee=this&&this!==Yn&&this instanceof N?k:d;return zr(Ee,this,J)}return N}function lR(d){return function(h,S,k){var N=Ut(h);if(!Ar(h)){var j=it(S,3);h=jn(h),S=function(ee){return j(N[ee],ee,N)}}var J=d(h,S,k);return J>-1?N[j?h[J]:J]:n}}function cR(d){return Fi(function(h){var S=h.length,k=S,N=ho.prototype.thru;for(d&&h.reverse();k--;){var j=h[k];if(typeof j!="function")throw new po(s);if(N&&!J&&xg(j)=="wrapper")var J=new ho([],!0)}for(k=J?k:S;++k<S;){j=h[k];var ee=xg(j),le=ee=="wrapper"?QS(j):n;le&&rw(le[0])&&le[1]==(A|_|E|I)&&!le[4].length&&le[9]==1?J=J[xg(le[0])].apply(J,le[3]):J=j.length==1&&rw(j)?J[ee]():J.thru(j)}return function(){var ke=arguments,Ee=ke[0];if(J&&ke.length==1&&pt(Ee))return J.plant(Ee).value();for(var Pe=0,Ve=S?h[Pe].apply(this,ke):Ee;++Pe<S;)Ve=h[Pe].call(this,Ve);return Ve}})}function mg(d,h,S,k,N,j,J,ee,le,ke){var Ee=h&A,Pe=h&x,Ve=h&w,Je=h&(_|C),at=h&L,yt=Ve?n:ld(d);function lt(){for(var xt=arguments.length,kt=be(xt),qr=xt;qr--;)kt[qr]=arguments[qr];if(Je)var br=Xl(lt),Ur=Ile(kt,br);if(k&&(kt=rR(kt,k,N,Je)),j&&(kt=oR(kt,j,J,Je)),xt-=Ur,Je&&xt<ke){var kn=Os(kt,br);return fR(d,h,mg,lt.placeholder,S,kt,kn,ee,le,ke-xt)}var Lo=Pe?S:this,zi=Ve?Lo[d]:d;return xt=kt.length,ee?kt=Bue(kt,ee):at&&xt>1&&kt.reverse(),Ee&&le<xt&&(kt.length=le),this&&this!==Yn&&this instanceof lt&&(zi=yt||ld(zi)),zi.apply(Lo,kt)}return lt}function uR(d,h){return function(S,k){return Kce(S,d,h(k),{})}}function yg(d,h){return function(S,k){var N;if(S===n&&k===n)return h;if(S!==n&&(N=S),k!==n){if(N===n)return k;typeof S=="string"||typeof k=="string"?(S=jr(S),k=jr(k)):(S=YF(S),k=YF(k)),N=d(S,k)}return N}}function YS(d){return Fi(function(h){return h=sn(h,Hr(it())),bt(function(S){var k=this;return d(h,function(N){return zr(N,k,S)})})})}function bg(d,h){h=h===n?" ":jr(h);var S=h.length;if(S<2)return S?HS(h,d):h;var k=HS(h,og(d/jl(h)));return Hl(h)?Ps(Do(k),0,d).join(""):k.slice(0,d)}function xue(d,h,S,k){var N=h&x,j=ld(d);function J(){for(var ee=-1,le=arguments.length,ke=-1,Ee=k.length,Pe=be(Ee+le),Ve=this&&this!==Yn&&this instanceof J?j:d;++ke<Ee;)Pe[ke]=k[ke];for(;le--;)Pe[ke++]=arguments[++ee];return zr(Ve,N?S:this,Pe)}return J}function dR(d){return function(h,S,k){return k&&typeof k!="number"&&yr(h,S,k)&&(S=k=n),h=Vi(h),S===n?(S=h,h=0):S=Vi(S),k=k===n?h<S?1:-1:Vi(k),iue(h,S,k,d)}}function vg(d){return function(h,S){return typeof h=="string"&&typeof S=="string"||(h=bo(h),S=bo(S)),d(h,S)}}function fR(d,h,S,k,N,j,J,ee,le,ke){var Ee=h&_,Pe=Ee?J:n,Ve=Ee?n:J,Je=Ee?j:n,at=Ee?n:j;h|=Ee?E:M,h&=~(Ee?M:E),h&T||(h&=-4);var yt=[d,h,N,Je,Pe,at,Ve,ee,le,ke],lt=S.apply(n,yt);return rw(d)&&_R(lt,yt),lt.placeholder=k,TR(lt,d,h)}function JS(d){var h=Nn[d];return function(S,k){if(S=bo(S),k=k==null?0:or(ht(k),292),k&&TF(S)){var N=(Lt(S)+"e").split("e"),j=h(N[0]+"e"+(+N[1]+k));return N=(Lt(j)+"e").split("e"),+(N[0]+"e"+(+N[1]-k))}return h(S)}}var Sue=Ul&&1/Gh(new Ul([,-0]))[1]==U?function(d){return new Ul(d)}:bw;function pR(d){return function(h){var S=ir(h);return S==fe?kS(h):S==te?Rle(h):Ale(h,d(h))}}function $i(d,h,S,k,N,j,J,ee){var le=h&w;if(!le&&typeof d!="function")throw new po(s);var ke=k?k.length:0;if(ke||(h&=-97,k=N=n),J=J===n?J:Ln(ht(J),0),ee=ee===n?ee:ht(ee),ke-=N?N.length:0,h&M){var Ee=k,Pe=N;k=N=n}var Ve=le?n:QS(d),Je=[d,h,S,k,N,Ee,Pe,j,J,ee];if(Ve&&$ue(Je,Ve),d=Je[0],h=Je[1],S=Je[2],k=Je[3],N=Je[4],ee=Je[9]=Je[9]===n?le?0:d.length:Ln(Je[9]-ke,0),!ee&&h&(_|C)&&(h&=-25),!h||h==x)var at=bue(d,h,S);else h==_||h==C?at=vue(d,h,ee):(h==E||h==(x|E))&&!N.length?at=xue(d,h,S,k):at=mg.apply(n,Je);var yt=Ve?KF:_R;return TR(yt(at,Je),d,h)}function hR(d,h,S,k){return d===n||No(d,ql[S])&&!Ft.call(k,S)?h:d}function gR(d,h,S,k,N,j){return un(d)&&un(h)&&(j.set(h,d),fg(d,h,n,gR,j),j.delete(h)),d}function wue(d){return dd(d)?n:d}function mR(d,h,S,k,N,j){var J=S&b,ee=d.length,le=h.length;if(ee!=le&&!(J&&le>ee))return!1;var ke=j.get(d),Ee=j.get(h);if(ke&&Ee)return ke==h&&Ee==d;var Pe=-1,Ve=!0,Je=S&y?new Oa:n;for(j.set(d,h),j.set(h,d);++Pe<ee;){var at=d[Pe],yt=h[Pe];if(k)var lt=J?k(yt,at,Pe,h,d,j):k(at,yt,Pe,d,h,j);if(lt!==n){if(lt)continue;Ve=!1;break}if(Je){if(!xS(h,function(xt,kt){if(!Xu(Je,kt)&&(at===xt||N(at,xt,S,k,j)))return Je.push(kt)})){Ve=!1;break}}else if(!(at===yt||N(at,yt,S,k,j))){Ve=!1;break}}return j.delete(d),j.delete(h),Ve}function Cue(d,h,S,k,N,j,J){switch(S){case nt:if(d.byteLength!=h.byteLength||d.byteOffset!=h.byteOffset)return!1;d=d.buffer,h=h.buffer;case ot:return!(d.byteLength!=h.byteLength||!j(new eg(d),new eg(h)));case X:case Q:case xe:return No(+d,+h);case ve:return d.name==h.name&&d.message==h.message;case W:case re:return d==h+"";case fe:var ee=kS;case te:var le=k&b;if(ee||(ee=Gh),d.size!=h.size&&!le)return!1;var ke=J.get(d);if(ke)return ke==h;k|=y,J.set(d,h);var Ee=mR(ee(d),ee(h),k,N,j,J);return J.delete(d),Ee;case Me:if(nd)return nd.call(d)==nd.call(h)}return!1}function _ue(d,h,S,k,N,j){var J=S&b,ee=XS(d),le=ee.length,ke=XS(h),Ee=ke.length;if(le!=Ee&&!J)return!1;for(var Pe=le;Pe--;){var Ve=ee[Pe];if(!(J?Ve in h:Ft.call(h,Ve)))return!1}var Je=j.get(d),at=j.get(h);if(Je&&at)return Je==h&&at==d;var yt=!0;j.set(d,h),j.set(h,d);for(var lt=J;++Pe<le;){Ve=ee[Pe];var xt=d[Ve],kt=h[Ve];if(k)var qr=J?k(kt,xt,Ve,h,d,j):k(xt,kt,Ve,d,h,j);if(!(qr===n?xt===kt||N(xt,kt,S,k,j):qr)){yt=!1;break}lt||(lt=Ve=="constructor")}if(yt&&!lt){var br=d.constructor,Ur=h.constructor;br!=Ur&&"constructor"in d&&"constructor"in h&&!(typeof br=="function"&&br instanceof br&&typeof Ur=="function"&&Ur instanceof Ur)&&(yt=!1)}return j.delete(d),j.delete(h),yt}function Fi(d){return iw(wR(d,n,IR),d+"")}function XS(d){return $F(d,jn,tw)}function ZS(d){return $F(d,Ir,yR)}var QS=sg?function(d){return sg.get(d)}:bw;function xg(d){for(var h=d.name+"",S=Kl[h],k=Ft.call(Kl,h)?S.length:0;k--;){var N=S[k],j=N.func;if(j==null||j==d)return N.name}return h}function Xl(d){var h=Ft.call(H,"placeholder")?H:d;return h.placeholder}function it(){var d=H.iteratee||mw;return d=d===mw?BF:d,arguments.length?d(arguments[0],arguments[1]):d}function Sg(d,h){var S=d.__data__;return Due(h)?S[typeof h=="string"?"string":"hash"]:S.map}function ew(d){for(var h=jn(d),S=h.length;S--;){var k=h[S],N=d[k];h[S]=[k,N,xR(N)]}return h}function Ia(d,h){var S=Lle(d,h);return RF(S)?S:n}function Tue(d){var h=Ft.call(d,ka),S=d[ka];try{d[ka]=n;var k=!0}catch{}var N=Zh.call(d);return k&&(h?d[ka]=S:delete d[ka]),N}var tw=OS?function(d){return d==null?[]:(d=Ut(d),ks(OS(d),function(h){return CF.call(d,h)}))}:vw,yR=OS?function(d){for(var h=[];d;)Es(h,tw(d)),d=tg(d);return h}:vw,ir=mr;(MS&&ir(new MS(new ArrayBuffer(1)))!=nt||Qu&&ir(new Qu)!=fe||AS&&ir(AS.resolve())!=Ne||Ul&&ir(new Ul)!=te||ed&&ir(new ed)!=De)&&(ir=function(d){var h=mr(d),S=h==_e?d.constructor:n,k=S?Da(S):"";if(k)switch(k){case ace:return nt;case lce:return fe;case cce:return Ne;case uce:return te;case dce:return De}return h});function kue(d,h,S){for(var k=-1,N=S.length;++k<N;){var j=S[k],J=j.size;switch(j.type){case"drop":d+=J;break;case"dropRight":h-=J;break;case"take":h=or(h,d+J);break;case"takeRight":d=Ln(d,h-J);break}}return{start:d,end:h}}function Eue(d){var h=d.match(Pae);return h?h[1].split(Nae):[]}function bR(d,h,S){h=Ds(h,d);for(var k=-1,N=h.length,j=!1;++k<N;){var J=oi(h[k]);if(!(j=d!=null&&S(d,J)))break;d=d[J]}return j||++k!=N?j:(N=d==null?0:d.length,!!N&&Og(N)&&Ri(J,N)&&(pt(d)||Pa(d)))}function Oue(d){var h=d.length,S=new d.constructor(h);return h&&typeof d[0]=="string"&&Ft.call(d,"index")&&(S.index=d.index,S.input=d.input),S}function vR(d){return typeof d.constructor=="function"&&!cd(d)?Gl(tg(d)):{}}function Mue(d,h,S){var k=d.constructor;switch(h){case ot:return GS(d);case X:case Q:return new k(+d);case nt:return fue(d,S);case At:case _n:case ut:case Pn:case $t:case pe:case We:case Ae:case qe:return tR(d,S);case fe:return new k;case xe:case re:return new k(d);case W:return pue(d);case te:return new k;case Me:return hue(d)}}function Aue(d,h){var S=h.length;if(!S)return d;var k=S-1;return h[k]=(S>1?"& ":"")+h[k],h=h.join(S>2?", ":" "),d.replace(Dae,`{
89
+ /* [wrapped with `+h+`] */
90
+ `)}function Iue(d){return pt(d)||Pa(d)||!!(_F&&d&&d[_F])}function Ri(d,h){var S=typeof d;return h=h??K,!!h&&(S=="number"||S!="symbol"&&jae.test(d))&&d>-1&&d%1==0&&d<h}function yr(d,h,S){if(!un(S))return!1;var k=typeof h;return(k=="number"?Ar(S)&&Ri(h,S.length):k=="string"&&h in S)?No(S[h],d):!1}function nw(d,h){if(pt(d))return!1;var S=typeof d;return S=="number"||S=="symbol"||S=="boolean"||d==null||Wr(d)?!0:Bl.test(d)||!Ju.test(d)||h!=null&&d in Ut(h)}function Due(d){var h=typeof d;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?d!=="__proto__":d===null}function rw(d){var h=xg(d),S=H[h];if(typeof S!="function"||!(h in wt.prototype))return!1;if(d===S)return!0;var k=QS(S);return!!k&&d===k[0]}function Pue(d){return!!xF&&xF in d}var Nue=Jh?Bi:xw;function cd(d){var h=d&&d.constructor,S=typeof h=="function"&&h.prototype||ql;return d===S}function xR(d){return d===d&&!un(d)}function SR(d,h){return function(S){return S==null?!1:S[d]===h&&(h!==n||d in Ut(S))}}function Lue(d){var h=kg(d,function(k){return S.size===u&&S.clear(),k}),S=h.cache;return h}function $ue(d,h){var S=d[1],k=h[1],N=S|k,j=N<(x|w|A),J=k==A&&S==_||k==A&&S==I&&d[7].length<=h[8]||k==(A|I)&&h[7].length<=h[8]&&S==_;if(!(j||J))return d;k&x&&(d[2]=h[2],N|=S&x?0:T);var ee=h[3];if(ee){var le=d[3];d[3]=le?rR(le,ee,h[4]):ee,d[4]=le?Os(d[3],f):h[4]}return ee=h[5],ee&&(le=d[5],d[5]=le?oR(le,ee,h[6]):ee,d[6]=le?Os(d[5],f):h[6]),ee=h[7],ee&&(d[7]=ee),k&A&&(d[8]=d[8]==null?h[8]:or(d[8],h[8])),d[9]==null&&(d[9]=h[9]),d[0]=h[0],d[1]=N,d}function Fue(d){var h=[];if(d!=null)for(var S in Ut(d))h.push(S);return h}function Rue(d){return Zh.call(d)}function wR(d,h,S){return h=Ln(h===n?d.length-1:h,0),function(){for(var k=arguments,N=-1,j=Ln(k.length-h,0),J=be(j);++N<j;)J[N]=k[h+N];N=-1;for(var ee=be(h+1);++N<h;)ee[N]=k[N];return ee[h]=S(J),zr(d,this,ee)}}function CR(d,h){return h.length<2?d:Aa(d,mo(h,0,-1))}function Bue(d,h){for(var S=d.length,k=or(h.length,S),N=Mr(d);k--;){var j=h[k];d[k]=Ri(j,S)?N[j]:n}return d}function ow(d,h){if(!(h==="constructor"&&typeof d[h]=="function")&&h!="__proto__")return d[h]}var _R=kR(KF),ud=ece||function(d,h){return Yn.setTimeout(d,h)},iw=kR(lue);function TR(d,h,S){var k=h+"";return iw(d,Aue(k,Vue(Eue(k),S)))}function kR(d){var h=0,S=0;return function(){var k=oce(),N=V-(k-S);if(S=k,N>0){if(++h>=F)return arguments[0]}else h=0;return d.apply(n,arguments)}}function wg(d,h){var S=-1,k=d.length,N=k-1;for(h=h===n?k:h;++S<h;){var j=zS(S,N),J=d[j];d[j]=d[S],d[S]=J}return d.length=h,d}var ER=Lue(function(d){var h=[];return d.charCodeAt(0)===46&&h.push(""),d.replace(Mae,function(S,k,N,j){h.push(N?j.replace(Fae,"$1"):k||S)}),h});function oi(d){if(typeof d=="string"||Wr(d))return d;var h=d+"";return h=="0"&&1/d==-U?"-0":h}function Da(d){if(d!=null){try{return Xh.call(d)}catch{}try{return d+""}catch{}}return""}function Vue(d,h){return fo(me,function(S){var k="_."+S[0];h&S[1]&&!Uh(d,k)&&d.push(k)}),d.sort()}function OR(d){if(d instanceof wt)return d.clone();var h=new ho(d.__wrapped__,d.__chain__);return h.__actions__=Mr(d.__actions__),h.__index__=d.__index__,h.__values__=d.__values__,h}function zue(d,h,S){(S?yr(d,h,S):h===n)?h=1:h=Ln(ht(h),0);var k=d==null?0:d.length;if(!k||h<1)return[];for(var N=0,j=0,J=be(og(k/h));N<k;)J[j++]=mo(d,N,N+=h);return J}function Hue(d){for(var h=-1,S=d==null?0:d.length,k=0,N=[];++h<S;){var j=d[h];j&&(N[k++]=j)}return N}function jue(){var d=arguments.length;if(!d)return[];for(var h=be(d-1),S=arguments[0],k=d;k--;)h[k-1]=arguments[k];return Es(pt(S)?Mr(S):[S],Jn(h,1))}var Wue=bt(function(d,h){return Tn(d)?od(d,Jn(h,1,Tn,!0)):[]}),que=bt(function(d,h){var S=yo(h);return Tn(S)&&(S=n),Tn(d)?od(d,Jn(h,1,Tn,!0),it(S,2)):[]}),Uue=bt(function(d,h){var S=yo(h);return Tn(S)&&(S=n),Tn(d)?od(d,Jn(h,1,Tn,!0),n,S):[]});function Kue(d,h,S){var k=d==null?0:d.length;return k?(h=S||h===n?1:ht(h),mo(d,h<0?0:h,k)):[]}function Gue(d,h,S){var k=d==null?0:d.length;return k?(h=S||h===n?1:ht(h),h=k-h,mo(d,0,h<0?0:h)):[]}function Yue(d,h){return d&&d.length?hg(d,it(h,3),!0,!0):[]}function Jue(d,h){return d&&d.length?hg(d,it(h,3),!0):[]}function Xue(d,h,S,k){var N=d==null?0:d.length;return N?(S&&typeof S!="number"&&yr(d,h,S)&&(S=0,k=N),jce(d,h,S,k)):[]}function MR(d,h,S){var k=d==null?0:d.length;if(!k)return-1;var N=S==null?0:ht(S);return N<0&&(N=Ln(k+N,0)),Kh(d,it(h,3),N)}function AR(d,h,S){var k=d==null?0:d.length;if(!k)return-1;var N=k-1;return S!==n&&(N=ht(S),N=S<0?Ln(k+N,0):or(N,k-1)),Kh(d,it(h,3),N,!0)}function IR(d){var h=d==null?0:d.length;return h?Jn(d,1):[]}function Zue(d){var h=d==null?0:d.length;return h?Jn(d,U):[]}function Que(d,h){var S=d==null?0:d.length;return S?(h=h===n?1:ht(h),Jn(d,h)):[]}function ede(d){for(var h=-1,S=d==null?0:d.length,k={};++h<S;){var N=d[h];k[N[0]]=N[1]}return k}function DR(d){return d&&d.length?d[0]:n}function tde(d,h,S){var k=d==null?0:d.length;if(!k)return-1;var N=S==null?0:ht(S);return N<0&&(N=Ln(k+N,0)),zl(d,h,N)}function nde(d){var h=d==null?0:d.length;return h?mo(d,0,-1):[]}var rde=bt(function(d){var h=sn(d,US);return h.length&&h[0]===d[0]?$S(h):[]}),ode=bt(function(d){var h=yo(d),S=sn(d,US);return h===yo(S)?h=n:S.pop(),S.length&&S[0]===d[0]?$S(S,it(h,2)):[]}),ide=bt(function(d){var h=yo(d),S=sn(d,US);return h=typeof h=="function"?h:n,h&&S.pop(),S.length&&S[0]===d[0]?$S(S,n,h):[]});function sde(d,h){return d==null?"":nce.call(d,h)}function yo(d){var h=d==null?0:d.length;return h?d[h-1]:n}function ade(d,h,S){var k=d==null?0:d.length;if(!k)return-1;var N=k;return S!==n&&(N=ht(S),N=N<0?Ln(k+N,0):or(N,k-1)),h===h?Vle(d,h,N):Kh(d,fF,N,!0)}function lde(d,h){return d&&d.length?jF(d,ht(h)):n}var cde=bt(PR);function PR(d,h){return d&&d.length&&h&&h.length?VS(d,h):d}function ude(d,h,S){return d&&d.length&&h&&h.length?VS(d,h,it(S,2)):d}function dde(d,h,S){return d&&d.length&&h&&h.length?VS(d,h,n,S):d}var fde=Fi(function(d,h){var S=d==null?0:d.length,k=DS(d,h);return UF(d,sn(h,function(N){return Ri(N,S)?+N:N}).sort(nR)),k});function pde(d,h){var S=[];if(!(d&&d.length))return S;var k=-1,N=[],j=d.length;for(h=it(h,3);++k<j;){var J=d[k];h(J,k,d)&&(S.push(J),N.push(k))}return UF(d,N),S}function sw(d){return d==null?d:sce.call(d)}function hde(d,h,S){var k=d==null?0:d.length;return k?(S&&typeof S!="number"&&yr(d,h,S)?(h=0,S=k):(h=h==null?0:ht(h),S=S===n?k:ht(S)),mo(d,h,S)):[]}function gde(d,h){return pg(d,h)}function mde(d,h,S){return jS(d,h,it(S,2))}function yde(d,h){var S=d==null?0:d.length;if(S){var k=pg(d,h);if(k<S&&No(d[k],h))return k}return-1}function bde(d,h){return pg(d,h,!0)}function vde(d,h,S){return jS(d,h,it(S,2),!0)}function xde(d,h){var S=d==null?0:d.length;if(S){var k=pg(d,h,!0)-1;if(No(d[k],h))return k}return-1}function Sde(d){return d&&d.length?GF(d):[]}function wde(d,h){return d&&d.length?GF(d,it(h,2)):[]}function Cde(d){var h=d==null?0:d.length;return h?mo(d,1,h):[]}function _de(d,h,S){return d&&d.length?(h=S||h===n?1:ht(h),mo(d,0,h<0?0:h)):[]}function Tde(d,h,S){var k=d==null?0:d.length;return k?(h=S||h===n?1:ht(h),h=k-h,mo(d,h<0?0:h,k)):[]}function kde(d,h){return d&&d.length?hg(d,it(h,3),!1,!0):[]}function Ede(d,h){return d&&d.length?hg(d,it(h,3)):[]}var Ode=bt(function(d){return Is(Jn(d,1,Tn,!0))}),Mde=bt(function(d){var h=yo(d);return Tn(h)&&(h=n),Is(Jn(d,1,Tn,!0),it(h,2))}),Ade=bt(function(d){var h=yo(d);return h=typeof h=="function"?h:n,Is(Jn(d,1,Tn,!0),n,h)});function Ide(d){return d&&d.length?Is(d):[]}function Dde(d,h){return d&&d.length?Is(d,it(h,2)):[]}function Pde(d,h){return h=typeof h=="function"?h:n,d&&d.length?Is(d,n,h):[]}function aw(d){if(!(d&&d.length))return[];var h=0;return d=ks(d,function(S){if(Tn(S))return h=Ln(S.length,h),!0}),_S(h,function(S){return sn(d,SS(S))})}function NR(d,h){if(!(d&&d.length))return[];var S=aw(d);return h==null?S:sn(S,function(k){return zr(h,n,k)})}var Nde=bt(function(d,h){return Tn(d)?od(d,h):[]}),Lde=bt(function(d){return qS(ks(d,Tn))}),$de=bt(function(d){var h=yo(d);return Tn(h)&&(h=n),qS(ks(d,Tn),it(h,2))}),Fde=bt(function(d){var h=yo(d);return h=typeof h=="function"?h:n,qS(ks(d,Tn),n,h)}),Rde=bt(aw);function Bde(d,h){return ZF(d||[],h||[],rd)}function Vde(d,h){return ZF(d||[],h||[],ad)}var zde=bt(function(d){var h=d.length,S=h>1?d[h-1]:n;return S=typeof S=="function"?(d.pop(),S):n,NR(d,S)});function LR(d){var h=H(d);return h.__chain__=!0,h}function Hde(d,h){return h(d),d}function Cg(d,h){return h(d)}var jde=Fi(function(d){var h=d.length,S=h?d[0]:0,k=this.__wrapped__,N=function(j){return DS(j,d)};return h>1||this.__actions__.length||!(k instanceof wt)||!Ri(S)?this.thru(N):(k=k.slice(S,+S+(h?1:0)),k.__actions__.push({func:Cg,args:[N],thisArg:n}),new ho(k,this.__chain__).thru(function(j){return h&&!j.length&&j.push(n),j}))});function Wde(){return LR(this)}function qde(){return new ho(this.value(),this.__chain__)}function Ude(){this.__values__===n&&(this.__values__=YR(this.value()));var d=this.__index__>=this.__values__.length,h=d?n:this.__values__[this.__index__++];return{done:d,value:h}}function Kde(){return this}function Gde(d){for(var h,S=this;S instanceof lg;){var k=OR(S);k.__index__=0,k.__values__=n,h?N.__wrapped__=k:h=k;var N=k;S=S.__wrapped__}return N.__wrapped__=d,h}function Yde(){var d=this.__wrapped__;if(d instanceof wt){var h=d;return this.__actions__.length&&(h=new wt(this)),h=h.reverse(),h.__actions__.push({func:Cg,args:[sw],thisArg:n}),new ho(h,this.__chain__)}return this.thru(sw)}function Jde(){return XF(this.__wrapped__,this.__actions__)}var Xde=gg(function(d,h,S){Ft.call(d,S)?++d[S]:Li(d,S,1)});function Zde(d,h,S){var k=pt(d)?uF:Hce;return S&&yr(d,h,S)&&(h=n),k(d,it(h,3))}function Qde(d,h){var S=pt(d)?ks:NF;return S(d,it(h,3))}var efe=lR(MR),tfe=lR(AR);function nfe(d,h){return Jn(_g(d,h),1)}function rfe(d,h){return Jn(_g(d,h),U)}function ofe(d,h,S){return S=S===n?1:ht(S),Jn(_g(d,h),S)}function $R(d,h){var S=pt(d)?fo:As;return S(d,it(h,3))}function FR(d,h){var S=pt(d)?Cle:PF;return S(d,it(h,3))}var ife=gg(function(d,h,S){Ft.call(d,S)?d[S].push(h):Li(d,S,[h])});function sfe(d,h,S,k){d=Ar(d)?d:Ql(d),S=S&&!k?ht(S):0;var N=d.length;return S<0&&(S=Ln(N+S,0)),Mg(d)?S<=N&&d.indexOf(h,S)>-1:!!N&&zl(d,h,S)>-1}var afe=bt(function(d,h,S){var k=-1,N=typeof h=="function",j=Ar(d)?be(d.length):[];return As(d,function(J){j[++k]=N?zr(h,J,S):id(J,h,S)}),j}),lfe=gg(function(d,h,S){Li(d,S,h)});function _g(d,h){var S=pt(d)?sn:VF;return S(d,it(h,3))}function cfe(d,h,S,k){return d==null?[]:(pt(h)||(h=h==null?[]:[h]),S=k?n:S,pt(S)||(S=S==null?[]:[S]),WF(d,h,S))}var ufe=gg(function(d,h,S){d[S?0:1].push(h)},function(){return[[],[]]});function dfe(d,h,S){var k=pt(d)?vS:hF,N=arguments.length<3;return k(d,it(h,4),S,N,As)}function ffe(d,h,S){var k=pt(d)?_le:hF,N=arguments.length<3;return k(d,it(h,4),S,N,PF)}function pfe(d,h){var S=pt(d)?ks:NF;return S(d,Eg(it(h,3)))}function hfe(d){var h=pt(d)?MF:sue;return h(d)}function gfe(d,h,S){(S?yr(d,h,S):h===n)?h=1:h=ht(h);var k=pt(d)?Fce:aue;return k(d,h)}function mfe(d){var h=pt(d)?Rce:cue;return h(d)}function yfe(d){if(d==null)return 0;if(Ar(d))return Mg(d)?jl(d):d.length;var h=ir(d);return h==fe||h==te?d.size:RS(d).length}function bfe(d,h,S){var k=pt(d)?xS:uue;return S&&yr(d,h,S)&&(h=n),k(d,it(h,3))}var vfe=bt(function(d,h){if(d==null)return[];var S=h.length;return S>1&&yr(d,h[0],h[1])?h=[]:S>2&&yr(h[0],h[1],h[2])&&(h=[h[0]]),WF(d,Jn(h,1),[])}),Tg=Qle||function(){return Yn.Date.now()};function xfe(d,h){if(typeof h!="function")throw new po(s);return d=ht(d),function(){if(--d<1)return h.apply(this,arguments)}}function RR(d,h,S){return h=S?n:h,h=d&&h==null?d.length:h,$i(d,A,n,n,n,n,h)}function BR(d,h){var S;if(typeof h!="function")throw new po(s);return d=ht(d),function(){return--d>0&&(S=h.apply(this,arguments)),d<=1&&(h=n),S}}var lw=bt(function(d,h,S){var k=x;if(S.length){var N=Os(S,Xl(lw));k|=E}return $i(d,k,h,S,N)}),VR=bt(function(d,h,S){var k=x|w;if(S.length){var N=Os(S,Xl(VR));k|=E}return $i(h,k,d,S,N)});function zR(d,h,S){h=S?n:h;var k=$i(d,_,n,n,n,n,n,h);return k.placeholder=zR.placeholder,k}function HR(d,h,S){h=S?n:h;var k=$i(d,C,n,n,n,n,n,h);return k.placeholder=HR.placeholder,k}function jR(d,h,S){var k,N,j,J,ee,le,ke=0,Ee=!1,Pe=!1,Ve=!0;if(typeof d!="function")throw new po(s);h=bo(h)||0,un(S)&&(Ee=!!S.leading,Pe="maxWait"in S,j=Pe?Ln(bo(S.maxWait)||0,h):j,Ve="trailing"in S?!!S.trailing:Ve);function Je(kn){var Lo=k,zi=N;return k=N=n,ke=kn,J=d.apply(zi,Lo),J}function at(kn){return ke=kn,ee=ud(xt,h),Ee?Je(kn):J}function yt(kn){var Lo=kn-le,zi=kn-ke,lB=h-Lo;return Pe?or(lB,j-zi):lB}function lt(kn){var Lo=kn-le,zi=kn-ke;return le===n||Lo>=h||Lo<0||Pe&&zi>=j}function xt(){var kn=Tg();if(lt(kn))return kt(kn);ee=ud(xt,yt(kn))}function kt(kn){return ee=n,Ve&&k?Je(kn):(k=N=n,J)}function qr(){ee!==n&&QF(ee),ke=0,k=le=N=ee=n}function br(){return ee===n?J:kt(Tg())}function Ur(){var kn=Tg(),Lo=lt(kn);if(k=arguments,N=this,le=kn,Lo){if(ee===n)return at(le);if(Pe)return QF(ee),ee=ud(xt,h),Je(le)}return ee===n&&(ee=ud(xt,h)),J}return Ur.cancel=qr,Ur.flush=br,Ur}var Sfe=bt(function(d,h){return DF(d,1,h)}),wfe=bt(function(d,h,S){return DF(d,bo(h)||0,S)});function Cfe(d){return $i(d,L)}function kg(d,h){if(typeof d!="function"||h!=null&&typeof h!="function")throw new po(s);var S=function(){var k=arguments,N=h?h.apply(this,k):k[0],j=S.cache;if(j.has(N))return j.get(N);var J=d.apply(this,k);return S.cache=j.set(N,J)||j,J};return S.cache=new(kg.Cache||Ni),S}kg.Cache=Ni;function Eg(d){if(typeof d!="function")throw new po(s);return function(){var h=arguments;switch(h.length){case 0:return!d.call(this);case 1:return!d.call(this,h[0]);case 2:return!d.call(this,h[0],h[1]);case 3:return!d.call(this,h[0],h[1],h[2])}return!d.apply(this,h)}}function _fe(d){return BR(2,d)}var Tfe=due(function(d,h){h=h.length==1&&pt(h[0])?sn(h[0],Hr(it())):sn(Jn(h,1),Hr(it()));var S=h.length;return bt(function(k){for(var N=-1,j=or(k.length,S);++N<j;)k[N]=h[N].call(this,k[N]);return zr(d,this,k)})}),cw=bt(function(d,h){var S=Os(h,Xl(cw));return $i(d,E,n,h,S)}),WR=bt(function(d,h){var S=Os(h,Xl(WR));return $i(d,M,n,h,S)}),kfe=Fi(function(d,h){return $i(d,I,n,n,n,h)});function Efe(d,h){if(typeof d!="function")throw new po(s);return h=h===n?h:ht(h),bt(d,h)}function Ofe(d,h){if(typeof d!="function")throw new po(s);return h=h==null?0:Ln(ht(h),0),bt(function(S){var k=S[h],N=Ps(S,0,h);return k&&Es(N,k),zr(d,this,N)})}function Mfe(d,h,S){var k=!0,N=!0;if(typeof d!="function")throw new po(s);return un(S)&&(k="leading"in S?!!S.leading:k,N="trailing"in S?!!S.trailing:N),jR(d,h,{leading:k,maxWait:h,trailing:N})}function Afe(d){return RR(d,1)}function Ife(d,h){return cw(KS(h),d)}function Dfe(){if(!arguments.length)return[];var d=arguments[0];return pt(d)?d:[d]}function Pfe(d){return go(d,m)}function Nfe(d,h){return h=typeof h=="function"?h:n,go(d,m,h)}function Lfe(d){return go(d,p|m)}function $fe(d,h){return h=typeof h=="function"?h:n,go(d,p|m,h)}function Ffe(d,h){return h==null||IF(d,h,jn(h))}function No(d,h){return d===h||d!==d&&h!==h}var Rfe=vg(LS),Bfe=vg(function(d,h){return d>=h}),Pa=FF(function(){return arguments}())?FF:function(d){return vn(d)&&Ft.call(d,"callee")&&!CF.call(d,"callee")},pt=be.isArray,Vfe=oF?Hr(oF):Gce;function Ar(d){return d!=null&&Og(d.length)&&!Bi(d)}function Tn(d){return vn(d)&&Ar(d)}function zfe(d){return d===!0||d===!1||vn(d)&&mr(d)==X}var Ns=tce||xw,Hfe=iF?Hr(iF):Yce;function jfe(d){return vn(d)&&d.nodeType===1&&!dd(d)}function Wfe(d){if(d==null)return!0;if(Ar(d)&&(pt(d)||typeof d=="string"||typeof d.splice=="function"||Ns(d)||Zl(d)||Pa(d)))return!d.length;var h=ir(d);if(h==fe||h==te)return!d.size;if(cd(d))return!RS(d).length;for(var S in d)if(Ft.call(d,S))return!1;return!0}function qfe(d,h){return sd(d,h)}function Ufe(d,h,S){S=typeof S=="function"?S:n;var k=S?S(d,h):n;return k===n?sd(d,h,n,S):!!k}function uw(d){if(!vn(d))return!1;var h=mr(d);return h==ve||h==ae||typeof d.message=="string"&&typeof d.name=="string"&&!dd(d)}function Kfe(d){return typeof d=="number"&&TF(d)}function Bi(d){if(!un(d))return!1;var h=mr(d);return h==ne||h==ce||h==de||h==He}function qR(d){return typeof d=="number"&&d==ht(d)}function Og(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=K}function un(d){var h=typeof d;return d!=null&&(h=="object"||h=="function")}function vn(d){return d!=null&&typeof d=="object"}var UR=sF?Hr(sF):Xce;function Gfe(d,h){return d===h||FS(d,h,ew(h))}function Yfe(d,h,S){return S=typeof S=="function"?S:n,FS(d,h,ew(h),S)}function Jfe(d){return KR(d)&&d!=+d}function Xfe(d){if(Nue(d))throw new ft(i);return RF(d)}function Zfe(d){return d===null}function Qfe(d){return d==null}function KR(d){return typeof d=="number"||vn(d)&&mr(d)==xe}function dd(d){if(!vn(d)||mr(d)!=_e)return!1;var h=tg(d);if(h===null)return!0;var S=Ft.call(h,"constructor")&&h.constructor;return typeof S=="function"&&S instanceof S&&Xh.call(S)==Yle}var dw=aF?Hr(aF):Zce;function epe(d){return qR(d)&&d>=-K&&d<=K}var GR=lF?Hr(lF):Qce;function Mg(d){return typeof d=="string"||!pt(d)&&vn(d)&&mr(d)==re}function Wr(d){return typeof d=="symbol"||vn(d)&&mr(d)==Me}var Zl=cF?Hr(cF):eue;function tpe(d){return d===n}function npe(d){return vn(d)&&ir(d)==De}function rpe(d){return vn(d)&&mr(d)==je}var ope=vg(BS),ipe=vg(function(d,h){return d<=h});function YR(d){if(!d)return[];if(Ar(d))return Mg(d)?Do(d):Mr(d);if(Zu&&d[Zu])return Fle(d[Zu]());var h=ir(d),S=h==fe?kS:h==te?Gh:Ql;return S(d)}function Vi(d){if(!d)return d===0?d:0;if(d=bo(d),d===U||d===-U){var h=d<0?-1:1;return h*Y}return d===d?d:0}function ht(d){var h=Vi(d),S=h%1;return h===h?S?h-S:h:0}function JR(d){return d?Ma(ht(d),0,Z):0}function bo(d){if(typeof d=="number")return d;if(Wr(d))return G;if(un(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=un(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=gF(d);var S=Vae.test(d);return S||Hae.test(d)?xle(d.slice(2),S?2:8):Bae.test(d)?G:+d}function XR(d){return ri(d,Ir(d))}function spe(d){return d?Ma(ht(d),-K,K):d===0?d:0}function Lt(d){return d==null?"":jr(d)}var ape=Yl(function(d,h){if(cd(h)||Ar(h)){ri(h,jn(h),d);return}for(var S in h)Ft.call(h,S)&&rd(d,S,h[S])}),ZR=Yl(function(d,h){ri(h,Ir(h),d)}),Ag=Yl(function(d,h,S,k){ri(h,Ir(h),d,k)}),lpe=Yl(function(d,h,S,k){ri(h,jn(h),d,k)}),cpe=Fi(DS);function upe(d,h){var S=Gl(d);return h==null?S:AF(S,h)}var dpe=bt(function(d,h){d=Ut(d);var S=-1,k=h.length,N=k>2?h[2]:n;for(N&&yr(h[0],h[1],N)&&(k=1);++S<k;)for(var j=h[S],J=Ir(j),ee=-1,le=J.length;++ee<le;){var ke=J[ee],Ee=d[ke];(Ee===n||No(Ee,ql[ke])&&!Ft.call(d,ke))&&(d[ke]=j[ke])}return d}),fpe=bt(function(d){return d.push(n,gR),zr(QR,n,d)});function ppe(d,h){return dF(d,it(h,3),ni)}function hpe(d,h){return dF(d,it(h,3),NS)}function gpe(d,h){return d==null?d:PS(d,it(h,3),Ir)}function mpe(d,h){return d==null?d:LF(d,it(h,3),Ir)}function ype(d,h){return d&&ni(d,it(h,3))}function bpe(d,h){return d&&NS(d,it(h,3))}function vpe(d){return d==null?[]:dg(d,jn(d))}function xpe(d){return d==null?[]:dg(d,Ir(d))}function fw(d,h,S){var k=d==null?n:Aa(d,h);return k===n?S:k}function Spe(d,h){return d!=null&&bR(d,h,Wce)}function pw(d,h){return d!=null&&bR(d,h,qce)}var wpe=uR(function(d,h,S){h!=null&&typeof h.toString!="function"&&(h=Zh.call(h)),d[h]=S},gw(Dr)),Cpe=uR(function(d,h,S){h!=null&&typeof h.toString!="function"&&(h=Zh.call(h)),Ft.call(d,h)?d[h].push(S):d[h]=[S]},it),_pe=bt(id);function jn(d){return Ar(d)?OF(d):RS(d)}function Ir(d){return Ar(d)?OF(d,!0):tue(d)}function Tpe(d,h){var S={};return h=it(h,3),ni(d,function(k,N,j){Li(S,h(k,N,j),k)}),S}function kpe(d,h){var S={};return h=it(h,3),ni(d,function(k,N,j){Li(S,N,h(k,N,j))}),S}var Epe=Yl(function(d,h,S){fg(d,h,S)}),QR=Yl(function(d,h,S,k){fg(d,h,S,k)}),Ope=Fi(function(d,h){var S={};if(d==null)return S;var k=!1;h=sn(h,function(j){return j=Ds(j,d),k||(k=j.length>1),j}),ri(d,ZS(d),S),k&&(S=go(S,p|g|m,wue));for(var N=h.length;N--;)WS(S,h[N]);return S});function Mpe(d,h){return eB(d,Eg(it(h)))}var Ape=Fi(function(d,h){return d==null?{}:rue(d,h)});function eB(d,h){if(d==null)return{};var S=sn(ZS(d),function(k){return[k]});return h=it(h),qF(d,S,function(k,N){return h(k,N[0])})}function Ipe(d,h,S){h=Ds(h,d);var k=-1,N=h.length;for(N||(N=1,d=n);++k<N;){var j=d==null?n:d[oi(h[k])];j===n&&(k=N,j=S),d=Bi(j)?j.call(d):j}return d}function Dpe(d,h,S){return d==null?d:ad(d,h,S)}function Ppe(d,h,S,k){return k=typeof k=="function"?k:n,d==null?d:ad(d,h,S,k)}var tB=pR(jn),nB=pR(Ir);function Npe(d,h,S){var k=pt(d),N=k||Ns(d)||Zl(d);if(h=it(h,4),S==null){var j=d&&d.constructor;N?S=k?new j:[]:un(d)?S=Bi(j)?Gl(tg(d)):{}:S={}}return(N?fo:ni)(d,function(J,ee,le){return h(S,J,ee,le)}),S}function Lpe(d,h){return d==null?!0:WS(d,h)}function $pe(d,h,S){return d==null?d:JF(d,h,KS(S))}function Fpe(d,h,S,k){return k=typeof k=="function"?k:n,d==null?d:JF(d,h,KS(S),k)}function Ql(d){return d==null?[]:TS(d,jn(d))}function Rpe(d){return d==null?[]:TS(d,Ir(d))}function Bpe(d,h,S){return S===n&&(S=h,h=n),S!==n&&(S=bo(S),S=S===S?S:0),h!==n&&(h=bo(h),h=h===h?h:0),Ma(bo(d),h,S)}function Vpe(d,h,S){return h=Vi(h),S===n?(S=h,h=0):S=Vi(S),d=bo(d),Uce(d,h,S)}function zpe(d,h,S){if(S&&typeof S!="boolean"&&yr(d,h,S)&&(h=S=n),S===n&&(typeof h=="boolean"?(S=h,h=n):typeof d=="boolean"&&(S=d,d=n)),d===n&&h===n?(d=0,h=1):(d=Vi(d),h===n?(h=d,d=0):h=Vi(h)),d>h){var k=d;d=h,h=k}if(S||d%1||h%1){var N=kF();return or(d+N*(h-d+vle("1e-"+((N+"").length-1))),h)}return zS(d,h)}var Hpe=Jl(function(d,h,S){return h=h.toLowerCase(),d+(S?rB(h):h)});function rB(d){return hw(Lt(d).toLowerCase())}function oB(d){return d=Lt(d),d&&d.replace(Wae,Dle).replace(cle,"")}function jpe(d,h,S){d=Lt(d),h=jr(h);var k=d.length;S=S===n?k:Ma(ht(S),0,k);var N=S;return S-=h.length,S>=0&&d.slice(S,N)==h}function Wpe(d){return d=Lt(d),d&&Yu.test(d)?d.replace(Or,Ple):d}function qpe(d){return d=Lt(d),d&&Aae.test(d)?d.replace(cS,"\\$&"):d}var Upe=Jl(function(d,h,S){return d+(S?"-":"")+h.toLowerCase()}),Kpe=Jl(function(d,h,S){return d+(S?" ":"")+h.toLowerCase()}),Gpe=aR("toLowerCase");function Ype(d,h,S){d=Lt(d),h=ht(h);var k=h?jl(d):0;if(!h||k>=h)return d;var N=(h-k)/2;return bg(ig(N),S)+d+bg(og(N),S)}function Jpe(d,h,S){d=Lt(d),h=ht(h);var k=h?jl(d):0;return h&&k<h?d+bg(h-k,S):d}function Xpe(d,h,S){d=Lt(d),h=ht(h);var k=h?jl(d):0;return h&&k<h?bg(h-k,S)+d:d}function Zpe(d,h,S){return S||h==null?h=0:h&&(h=+h),ice(Lt(d).replace(uS,""),h||0)}function Qpe(d,h,S){return(S?yr(d,h,S):h===n)?h=1:h=ht(h),HS(Lt(d),h)}function ehe(){var d=arguments,h=Lt(d[0]);return d.length<3?h:h.replace(d[1],d[2])}var the=Jl(function(d,h,S){return d+(S?"_":"")+h.toLowerCase()});function nhe(d,h,S){return S&&typeof S!="number"&&yr(d,h,S)&&(h=S=n),S=S===n?Z:S>>>0,S?(d=Lt(d),d&&(typeof h=="string"||h!=null&&!dw(h))&&(h=jr(h),!h&&Hl(d))?Ps(Do(d),0,S):d.split(h,S)):[]}var rhe=Jl(function(d,h,S){return d+(S?" ":"")+hw(h)});function ohe(d,h,S){return d=Lt(d),S=S==null?0:Ma(ht(S),0,d.length),h=jr(h),d.slice(S,S+h.length)==h}function ihe(d,h,S){var k=H.templateSettings;S&&yr(d,h,S)&&(h=n),d=Lt(d),h=Ag({},h,k,hR);var N=Ag({},h.imports,k.imports,hR),j=jn(N),J=TS(N,j),ee,le,ke=0,Ee=h.interpolate||jh,Pe="__p += '",Ve=ES((h.escape||jh).source+"|"+Ee.source+"|"+(Ee===Hh?Rae:jh).source+"|"+(h.evaluate||jh).source+"|$","g"),Je="//# sourceURL="+(Ft.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++hle+"]")+`
91
+ `;d.replace(Ve,function(lt,xt,kt,qr,br,Ur){return kt||(kt=qr),Pe+=d.slice(ke,Ur).replace(qae,Nle),xt&&(ee=!0,Pe+=`' +
92
+ __e(`+xt+`) +
93
+ '`),br&&(le=!0,Pe+=`';
94
+ `+br+`;
95
+ __p += '`),kt&&(Pe+=`' +
96
+ ((__t = (`+kt+`)) == null ? '' : __t) +
97
+ '`),ke=Ur+lt.length,lt}),Pe+=`';
98
+ `;var at=Ft.call(h,"variable")&&h.variable;if(!at)Pe=`with (obj) {
99
+ `+Pe+`
100
+ }
101
+ `;else if($ae.test(at))throw new ft(a);Pe=(le?Pe.replace(Xe,""):Pe).replace(ct,"$1").replace(zt,"$1;"),Pe="function("+(at||"obj")+`) {
102
+ `+(at?"":`obj || (obj = {});
103
+ `)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(le?`, __j = Array.prototype.join;
104
+ function print() { __p += __j.call(arguments, '') }
105
+ `:`;
106
+ `)+Pe+`return __p
107
+ }`;var yt=sB(function(){return It(j,Je+"return "+Pe).apply(n,J)});if(yt.source=Pe,uw(yt))throw yt;return yt}function she(d){return Lt(d).toLowerCase()}function ahe(d){return Lt(d).toUpperCase()}function lhe(d,h,S){if(d=Lt(d),d&&(S||h===n))return gF(d);if(!d||!(h=jr(h)))return d;var k=Do(d),N=Do(h),j=mF(k,N),J=yF(k,N)+1;return Ps(k,j,J).join("")}function che(d,h,S){if(d=Lt(d),d&&(S||h===n))return d.slice(0,vF(d)+1);if(!d||!(h=jr(h)))return d;var k=Do(d),N=yF(k,Do(h))+1;return Ps(k,0,N).join("")}function uhe(d,h,S){if(d=Lt(d),d&&(S||h===n))return d.replace(uS,"");if(!d||!(h=jr(h)))return d;var k=Do(d),N=mF(k,Do(h));return Ps(k,N).join("")}function dhe(d,h){var S=O,k=D;if(un(h)){var N="separator"in h?h.separator:N;S="length"in h?ht(h.length):S,k="omission"in h?jr(h.omission):k}d=Lt(d);var j=d.length;if(Hl(d)){var J=Do(d);j=J.length}if(S>=j)return d;var ee=S-jl(k);if(ee<1)return k;var le=J?Ps(J,0,ee).join(""):d.slice(0,ee);if(N===n)return le+k;if(J&&(ee+=le.length-ee),dw(N)){if(d.slice(ee).search(N)){var ke,Ee=le;for(N.global||(N=ES(N.source,Lt(F$.exec(N))+"g")),N.lastIndex=0;ke=N.exec(Ee);)var Pe=ke.index;le=le.slice(0,Pe===n?ee:Pe)}}else if(d.indexOf(jr(N),ee)!=ee){var Ve=le.lastIndexOf(N);Ve>-1&&(le=le.slice(0,Ve))}return le+k}function fhe(d){return d=Lt(d),d&&Di.test(d)?d.replace(gr,zle):d}var phe=Jl(function(d,h,S){return d+(S?" ":"")+h.toUpperCase()}),hw=aR("toUpperCase");function iB(d,h,S){return d=Lt(d),h=S?n:h,h===n?$le(d)?Wle(d):Ele(d):d.match(h)||[]}var sB=bt(function(d,h){try{return zr(d,n,h)}catch(S){return uw(S)?S:new ft(S)}}),hhe=Fi(function(d,h){return fo(h,function(S){S=oi(S),Li(d,S,lw(d[S],d))}),d});function ghe(d){var h=d==null?0:d.length,S=it();return d=h?sn(d,function(k){if(typeof k[1]!="function")throw new po(s);return[S(k[0]),k[1]]}):[],bt(function(k){for(var N=-1;++N<h;){var j=d[N];if(zr(j[0],this,k))return zr(j[1],this,k)}})}function mhe(d){return zce(go(d,p))}function gw(d){return function(){return d}}function yhe(d,h){return d==null||d!==d?h:d}var bhe=cR(),vhe=cR(!0);function Dr(d){return d}function mw(d){return BF(typeof d=="function"?d:go(d,p))}function xhe(d){return zF(go(d,p))}function She(d,h){return HF(d,go(h,p))}var whe=bt(function(d,h){return function(S){return id(S,d,h)}}),Che=bt(function(d,h){return function(S){return id(d,S,h)}});function yw(d,h,S){var k=jn(h),N=dg(h,k);S==null&&!(un(h)&&(N.length||!k.length))&&(S=h,h=d,d=this,N=dg(h,jn(h)));var j=!(un(S)&&"chain"in S)||!!S.chain,J=Bi(d);return fo(N,function(ee){var le=h[ee];d[ee]=le,J&&(d.prototype[ee]=function(){var ke=this.__chain__;if(j||ke){var Ee=d(this.__wrapped__),Pe=Ee.__actions__=Mr(this.__actions__);return Pe.push({func:le,args:arguments,thisArg:d}),Ee.__chain__=ke,Ee}return le.apply(d,Es([this.value()],arguments))})}),d}function _he(){return Yn._===this&&(Yn._=Jle),this}function bw(){}function The(d){return d=ht(d),bt(function(h){return jF(h,d)})}var khe=YS(sn),Ehe=YS(uF),Ohe=YS(xS);function aB(d){return nw(d)?SS(oi(d)):oue(d)}function Mhe(d){return function(h){return d==null?n:Aa(d,h)}}var Ahe=dR(),Ihe=dR(!0);function vw(){return[]}function xw(){return!1}function Dhe(){return{}}function Phe(){return""}function Nhe(){return!0}function Lhe(d,h){if(d=ht(d),d<1||d>K)return[];var S=Z,k=or(d,Z);h=it(h),d-=Z;for(var N=_S(k,h);++S<d;)h(S);return N}function $he(d){return pt(d)?sn(d,oi):Wr(d)?[d]:Mr(ER(Lt(d)))}function Fhe(d){var h=++Gle;return Lt(d)+h}var Rhe=yg(function(d,h){return d+h},0),Bhe=JS("ceil"),Vhe=yg(function(d,h){return d/h},1),zhe=JS("floor");function Hhe(d){return d&&d.length?ug(d,Dr,LS):n}function jhe(d,h){return d&&d.length?ug(d,it(h,2),LS):n}function Whe(d){return pF(d,Dr)}function qhe(d,h){return pF(d,it(h,2))}function Uhe(d){return d&&d.length?ug(d,Dr,BS):n}function Khe(d,h){return d&&d.length?ug(d,it(h,2),BS):n}var Ghe=yg(function(d,h){return d*h},1),Yhe=JS("round"),Jhe=yg(function(d,h){return d-h},0);function Xhe(d){return d&&d.length?CS(d,Dr):0}function Zhe(d,h){return d&&d.length?CS(d,it(h,2)):0}return H.after=xfe,H.ary=RR,H.assign=ape,H.assignIn=ZR,H.assignInWith=Ag,H.assignWith=lpe,H.at=cpe,H.before=BR,H.bind=lw,H.bindAll=hhe,H.bindKey=VR,H.castArray=Dfe,H.chain=LR,H.chunk=zue,H.compact=Hue,H.concat=jue,H.cond=ghe,H.conforms=mhe,H.constant=gw,H.countBy=Xde,H.create=upe,H.curry=zR,H.curryRight=HR,H.debounce=jR,H.defaults=dpe,H.defaultsDeep=fpe,H.defer=Sfe,H.delay=wfe,H.difference=Wue,H.differenceBy=que,H.differenceWith=Uue,H.drop=Kue,H.dropRight=Gue,H.dropRightWhile=Yue,H.dropWhile=Jue,H.fill=Xue,H.filter=Qde,H.flatMap=nfe,H.flatMapDeep=rfe,H.flatMapDepth=ofe,H.flatten=IR,H.flattenDeep=Zue,H.flattenDepth=Que,H.flip=Cfe,H.flow=bhe,H.flowRight=vhe,H.fromPairs=ede,H.functions=vpe,H.functionsIn=xpe,H.groupBy=ife,H.initial=nde,H.intersection=rde,H.intersectionBy=ode,H.intersectionWith=ide,H.invert=wpe,H.invertBy=Cpe,H.invokeMap=afe,H.iteratee=mw,H.keyBy=lfe,H.keys=jn,H.keysIn=Ir,H.map=_g,H.mapKeys=Tpe,H.mapValues=kpe,H.matches=xhe,H.matchesProperty=She,H.memoize=kg,H.merge=Epe,H.mergeWith=QR,H.method=whe,H.methodOf=Che,H.mixin=yw,H.negate=Eg,H.nthArg=The,H.omit=Ope,H.omitBy=Mpe,H.once=_fe,H.orderBy=cfe,H.over=khe,H.overArgs=Tfe,H.overEvery=Ehe,H.overSome=Ohe,H.partial=cw,H.partialRight=WR,H.partition=ufe,H.pick=Ape,H.pickBy=eB,H.property=aB,H.propertyOf=Mhe,H.pull=cde,H.pullAll=PR,H.pullAllBy=ude,H.pullAllWith=dde,H.pullAt=fde,H.range=Ahe,H.rangeRight=Ihe,H.rearg=kfe,H.reject=pfe,H.remove=pde,H.rest=Efe,H.reverse=sw,H.sampleSize=gfe,H.set=Dpe,H.setWith=Ppe,H.shuffle=mfe,H.slice=hde,H.sortBy=vfe,H.sortedUniq=Sde,H.sortedUniqBy=wde,H.split=nhe,H.spread=Ofe,H.tail=Cde,H.take=_de,H.takeRight=Tde,H.takeRightWhile=kde,H.takeWhile=Ede,H.tap=Hde,H.throttle=Mfe,H.thru=Cg,H.toArray=YR,H.toPairs=tB,H.toPairsIn=nB,H.toPath=$he,H.toPlainObject=XR,H.transform=Npe,H.unary=Afe,H.union=Ode,H.unionBy=Mde,H.unionWith=Ade,H.uniq=Ide,H.uniqBy=Dde,H.uniqWith=Pde,H.unset=Lpe,H.unzip=aw,H.unzipWith=NR,H.update=$pe,H.updateWith=Fpe,H.values=Ql,H.valuesIn=Rpe,H.without=Nde,H.words=iB,H.wrap=Ife,H.xor=Lde,H.xorBy=$de,H.xorWith=Fde,H.zip=Rde,H.zipObject=Bde,H.zipObjectDeep=Vde,H.zipWith=zde,H.entries=tB,H.entriesIn=nB,H.extend=ZR,H.extendWith=Ag,yw(H,H),H.add=Rhe,H.attempt=sB,H.camelCase=Hpe,H.capitalize=rB,H.ceil=Bhe,H.clamp=Bpe,H.clone=Pfe,H.cloneDeep=Lfe,H.cloneDeepWith=$fe,H.cloneWith=Nfe,H.conformsTo=Ffe,H.deburr=oB,H.defaultTo=yhe,H.divide=Vhe,H.endsWith=jpe,H.eq=No,H.escape=Wpe,H.escapeRegExp=qpe,H.every=Zde,H.find=efe,H.findIndex=MR,H.findKey=ppe,H.findLast=tfe,H.findLastIndex=AR,H.findLastKey=hpe,H.floor=zhe,H.forEach=$R,H.forEachRight=FR,H.forIn=gpe,H.forInRight=mpe,H.forOwn=ype,H.forOwnRight=bpe,H.get=fw,H.gt=Rfe,H.gte=Bfe,H.has=Spe,H.hasIn=pw,H.head=DR,H.identity=Dr,H.includes=sfe,H.indexOf=tde,H.inRange=Vpe,H.invoke=_pe,H.isArguments=Pa,H.isArray=pt,H.isArrayBuffer=Vfe,H.isArrayLike=Ar,H.isArrayLikeObject=Tn,H.isBoolean=zfe,H.isBuffer=Ns,H.isDate=Hfe,H.isElement=jfe,H.isEmpty=Wfe,H.isEqual=qfe,H.isEqualWith=Ufe,H.isError=uw,H.isFinite=Kfe,H.isFunction=Bi,H.isInteger=qR,H.isLength=Og,H.isMap=UR,H.isMatch=Gfe,H.isMatchWith=Yfe,H.isNaN=Jfe,H.isNative=Xfe,H.isNil=Qfe,H.isNull=Zfe,H.isNumber=KR,H.isObject=un,H.isObjectLike=vn,H.isPlainObject=dd,H.isRegExp=dw,H.isSafeInteger=epe,H.isSet=GR,H.isString=Mg,H.isSymbol=Wr,H.isTypedArray=Zl,H.isUndefined=tpe,H.isWeakMap=npe,H.isWeakSet=rpe,H.join=sde,H.kebabCase=Upe,H.last=yo,H.lastIndexOf=ade,H.lowerCase=Kpe,H.lowerFirst=Gpe,H.lt=ope,H.lte=ipe,H.max=Hhe,H.maxBy=jhe,H.mean=Whe,H.meanBy=qhe,H.min=Uhe,H.minBy=Khe,H.stubArray=vw,H.stubFalse=xw,H.stubObject=Dhe,H.stubString=Phe,H.stubTrue=Nhe,H.multiply=Ghe,H.nth=lde,H.noConflict=_he,H.noop=bw,H.now=Tg,H.pad=Ype,H.padEnd=Jpe,H.padStart=Xpe,H.parseInt=Zpe,H.random=zpe,H.reduce=dfe,H.reduceRight=ffe,H.repeat=Qpe,H.replace=ehe,H.result=Ipe,H.round=Yhe,H.runInContext=se,H.sample=hfe,H.size=yfe,H.snakeCase=the,H.some=bfe,H.sortedIndex=gde,H.sortedIndexBy=mde,H.sortedIndexOf=yde,H.sortedLastIndex=bde,H.sortedLastIndexBy=vde,H.sortedLastIndexOf=xde,H.startCase=rhe,H.startsWith=ohe,H.subtract=Jhe,H.sum=Xhe,H.sumBy=Zhe,H.template=ihe,H.times=Lhe,H.toFinite=Vi,H.toInteger=ht,H.toLength=JR,H.toLower=she,H.toNumber=bo,H.toSafeInteger=spe,H.toString=Lt,H.toUpper=ahe,H.trim=lhe,H.trimEnd=che,H.trimStart=uhe,H.truncate=dhe,H.unescape=fhe,H.uniqueId=Fhe,H.upperCase=phe,H.upperFirst=hw,H.each=$R,H.eachRight=FR,H.first=DR,yw(H,function(){var d={};return ni(H,function(h,S){Ft.call(H.prototype,S)||(d[S]=h)}),d}(),{chain:!1}),H.VERSION=r,fo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){H[d].placeholder=H}),fo(["drop","take"],function(d,h){wt.prototype[d]=function(S){S=S===n?1:Ln(ht(S),0);var k=this.__filtered__&&!h?new wt(this):this.clone();return k.__filtered__?k.__takeCount__=or(S,k.__takeCount__):k.__views__.push({size:or(S,Z),type:d+(k.__dir__<0?"Right":"")}),k},wt.prototype[d+"Right"]=function(S){return this.reverse()[d](S).reverse()}}),fo(["filter","map","takeWhile"],function(d,h){var S=h+1,k=S==z||S==B;wt.prototype[d]=function(N){var j=this.clone();return j.__iteratees__.push({iteratee:it(N,3),type:S}),j.__filtered__=j.__filtered__||k,j}}),fo(["head","last"],function(d,h){var S="take"+(h?"Right":"");wt.prototype[d]=function(){return this[S](1).value()[0]}}),fo(["initial","tail"],function(d,h){var S="drop"+(h?"":"Right");wt.prototype[d]=function(){return this.__filtered__?new wt(this):this[S](1)}}),wt.prototype.compact=function(){return this.filter(Dr)},wt.prototype.find=function(d){return this.filter(d).head()},wt.prototype.findLast=function(d){return this.reverse().find(d)},wt.prototype.invokeMap=bt(function(d,h){return typeof d=="function"?new wt(this):this.map(function(S){return id(S,d,h)})}),wt.prototype.reject=function(d){return this.filter(Eg(it(d)))},wt.prototype.slice=function(d,h){d=ht(d);var S=this;return S.__filtered__&&(d>0||h<0)?new wt(S):(d<0?S=S.takeRight(-d):d&&(S=S.drop(d)),h!==n&&(h=ht(h),S=h<0?S.dropRight(-h):S.take(h-d)),S)},wt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},wt.prototype.toArray=function(){return this.take(Z)},ni(wt.prototype,function(d,h){var S=/^(?:filter|find|map|reject)|While$/.test(h),k=/^(?:head|last)$/.test(h),N=H[k?"take"+(h=="last"?"Right":""):h],j=k||/^find/.test(h);N&&(H.prototype[h]=function(){var J=this.__wrapped__,ee=k?[1]:arguments,le=J instanceof wt,ke=ee[0],Ee=le||pt(J),Pe=function(xt){var kt=N.apply(H,Es([xt],ee));return k&&Ve?kt[0]:kt};Ee&&S&&typeof ke=="function"&&ke.length!=1&&(le=Ee=!1);var Ve=this.__chain__,Je=!!this.__actions__.length,at=j&&!Ve,yt=le&&!Je;if(!j&&Ee){J=yt?J:new wt(this);var lt=d.apply(J,ee);return lt.__actions__.push({func:Cg,args:[Pe],thisArg:n}),new ho(lt,Ve)}return at&&yt?d.apply(this,ee):(lt=this.thru(Pe),at?k?lt.value()[0]:lt.value():lt)})}),fo(["pop","push","shift","sort","splice","unshift"],function(d){var h=Yh[d],S=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",k=/^(?:pop|shift)$/.test(d);H.prototype[d]=function(){var N=arguments;if(k&&!this.__chain__){var j=this.value();return h.apply(pt(j)?j:[],N)}return this[S](function(J){return h.apply(pt(J)?J:[],N)})}}),ni(wt.prototype,function(d,h){var S=H[h];if(S){var k=S.name+"";Ft.call(Kl,k)||(Kl[k]=[]),Kl[k].push({name:h,func:S})}}),Kl[mg(n,w).name]=[{name:"wrapper",func:n}],wt.prototype.clone=fce,wt.prototype.reverse=pce,wt.prototype.value=hce,H.prototype.at=jde,H.prototype.chain=Wde,H.prototype.commit=qde,H.prototype.next=Ude,H.prototype.plant=Gde,H.prototype.reverse=Yde,H.prototype.toJSON=H.prototype.valueOf=H.prototype.value=Jde,H.prototype.first=H.prototype.head,Zu&&(H.prototype[Zu]=Kde),H},Wl=qle();Ta?((Ta.exports=Wl)._=Wl,mS._=Wl):Yn._=Wl}).call(Y3)}(bc,bc.exports)),bc.exports}var vm=J3();const X3=t=>{const{name:e,onInputChange:n,onChange:r,onFilter:o,onFilterError:i,fetchOnCount:s=1,preFilterMessage:a=s?"Start typing to see options...":t.noOptionsText,noOptionsText:l,filterOptions:u=M=>M,includeInputInList:f=!0,autoComplete:p=!0,...g}=t,{setValue:m,getValues:b}=an(),[y,x]=q.useState(""),[w,T]=q.useState([]),[_,C]=q.useState(!1),E=vm.debounce(async(M,A)=>{try{C(!0);const I=await o(M.input);A(I)}catch(I){throw I}finally{C(!1)}},400);return q.useEffect(()=>{if(y===""){T(b(e)?[b(e)]:[]);return}y.length>=s&&E({input:y},M=>{let A=[];M?(A=M,b(e)&&(A=[b(e),...M.filter(I=>JSON.stringify(I)!==JSON.stringify(b(e)))])):b(e)&&(A=[b(e)]),T(A)})},[b(e),y]),v.jsx(__,{name:e,loading:_,filterOptions:u,noOptionsText:y.length<s?a:l,options:w,autoComplete:p,includeInputInList:f,onChange:(M,A,I,L)=>{T(A?[A,...w]:w),m(e,A,{shouldValidate:!0}),r&&r(M,A,I,L)},onInputChange:(M,A,I)=>{x(A),n&&n(M,A,I)},...g})},Z3=t=>{const{name:e,label:n=Wn(e),options:r=[],filterSelectedOptions:o=!0,variant:i="outlined",staticLabel:s=!1,staticLabelProps:a={fontSize:".9em",color:"#808080"},readOnly:l,margin:u="dense",fullWidth:f=!0,required:p,onChange:g,getOptionLabel:m=A=>typeof A=="string"?A:String(A),isOptionEqualToValue:b=(A,I)=>JSON.stringify(A)===JSON.stringify(I),useFieldAsValue:y,...x}=t,{setValue:w,getValues:T,formState:{errors:_},control:C}=an(),E={...lr(x,["useFieldAsValue"]),getOptionLabel:m,options:r,filterSelectedOptions:o,isOptionEqualToValue:b,renderInput:A=>v.jsx($.TextField,{...A,variant:i,label:s?void 0:n,error:!!_[e],required:p}),onChange:(A,I,L,O)=>{y?w(e,I.map(D=>D[y]),{shouldValidate:!0}):w(e,I,{shouldValidate:!0}),g&&g(A,I,L,O)},fullWidth:!0,value:y?r.filter(A=>T(e).includes(A[y]))||[]:T(e),slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}},M=()=>T(e).length===0?"":(y?r.filter(I=>T(e).includes(I[y]))||[]:T(e)).map(I=>m(I)).join(", ");return v.jsx(Xn,{name:e,control:C,render:()=>v.jsxs($.FormControl,{margin:u,fullWidth:f,required:p,children:[(s||l)&&v.jsx($.Typography,{...a,children:n}),l?v.jsx($.Typography,{children:M()}):v.jsxs($.Box,{children:[v.jsx($.Autocomplete,{...E,multiple:!0}),v.jsx(ur,{name:e,id:`${e}-err`})]})]})})},Q3=t=>{const{name:e,label:n=Wn(e),sublabel:r,required:o=!1,labelPlacement:i="end",labelAlignment:s=i==="end"||i==="start"?"top":"center",readOnly:a=!1,staticLabelProps:l={fontSize:".9em",color:"#808080"},onChange:u,...f}=t;s==="top"&&(i==="bottom"||i==="top")&&console.error(`Checkbox: Ignoring labelAlignment='top'. labelAlignment cannot be 'top' when labelPlacement=${i}`);const{control:p,setValue:g,getValues:m}=an(),b=r?v.jsxs("div",{children:[v.jsx("p",{style:{margin:0},children:n}),v.jsx($.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:r})]}):n,y=s==="top"&&(i==="start"||i==="end");return a?v.jsx(Xn,{name:e,control:p,render:({})=>m(e)&&v.jsx($.Typography,{...l,children:b})}):v.jsx(Xn,{name:e,control:p,render:({field:x})=>v.jsxs($.Box,{children:[v.jsx($.FormControlLabel,{sx:{alignItems:y?"flex-start":"center"},label:v.jsx("span",{"data-testid":n,style:{display:"inline-block",marginTop:y?"10px":0},children:b}),required:o,labelPlacement:i,control:v.jsx($.Checkbox,{"data-testid":"checkbox",...f,...x,onChange:(w,T)=>{g(e,w.target.checked),u&&u(w,T)},checked:x.value})}),v.jsx(ur,{name:e,id:`${e}-err`})]})})},ez=t=>{const{name:e,checkboxes:n=[],label:r=Wn(e),labelPlacement:o="end",labelAlignment:i=o==="end"||o==="start"?"top":"center",required:s=!1,disabled:a=!1,readOnly:l=!1,min:u=0,max:f=n.length,minMaxSubtitle:p="Please select between {min} and {max} options",maxSubtitle:g="Up to {max} max",minSubtitle:m="Please select {min} or more",margin:b="dense",staticLabelProps:y={fontSize:".9em",color:"#808080"}}=t,{control:x,setValue:w,getValues:T,resetField:_,formState:{errors:C}}=an();(u<0||u>=n.length)&&console.error(`CheckboxGroup: "min" cannot be ${u}. It must be a value between 0 and ${n.length-1}.`),(f<=1||f>n.length)&&console.error(`CheckboxGroup: "max" must be a value between 2 and ${n.length}.`),i==="top"&&(o==="bottom"||o==="top")&&console.error(`CheckboxGroup: Ignoring labelAlignment='top'. labelAlignment cannot be 'top' when labelPlacement=${o}`);const E=()=>t.labelPlacement=="start"?"right":t.labelPlacement=="top"||t.labelPlacement=="bottom"?"center":"left",M=I=>typeof I=="string"?I:!I.textField&&!I.sublabel?I.label:v.jsxs($.Box,{display:"flex",flexDirection:"row",justifyContent:"center",gap:"0.5rem",alignItems:"baseline",children:[v.jsxs($.Box,{display:"flex",flexDirection:"column",justifyContent:"center",children:[v.jsx("p",{style:{margin:0},children:I.label}),I.sublabel&&v.jsx($.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:I.sublabel})]}),I.textField&&v.jsx($.TextField,{label:"",size:"small",margin:"none",sx:{"& .MuiInputBase-input":{height:14}},...I.textField})]}),A=()=>{if(f<n.length&&u>0)return v.jsx($.Typography,{variant:"subtitle2",children:p.replace("{min}",`${u}`).replace("{max}",`${f}`)});if(f<n.length)return v.jsx($.Typography,{variant:"subtitle2",children:g.replace("{max}",`${f}`)});if(u>0)return v.jsx($.Typography,{variant:"subtitle2",children:m.replace("{min}",`${u}`)})};return v.jsx(Xn,{name:e,control:x,render:({field:I})=>v.jsx($.FormControl,{margin:b,fullWidth:!0,children:l?v.jsxs($.Box,{children:[v.jsx($.Typography,{...y,children:r}),T(e).join(", ")]}):v.jsxs($.FormControl,{onChange:L=>{const O=L.target.value,D=L.target.checked,F=n.find(V=>typeof V=="string"?V===O:V.label===O);D?w(e,[...T(e),O]):(F&&typeof F=="object"&&F.textField&&F.textField.name&&_(e),w(e,I.value.filter(V=>V!=O)))},fullWidth:!0,margin:b,error:!!C[e],children:[v.jsx($.FormLabel,{focused:t.focused,htmlFor:e,required:s,disabled:t.disableLabel,children:r}),A(),n.map(L=>{const O=typeof L=="string"?L:L.label,D=i==="top"&&(o==="start"||o==="end");return v.jsx($.FormControlLabel,{sx:{alignItems:D?"flex-start":"center"},value:O,control:v.jsx($.Checkbox,{}),label:v.jsx("div",{"data-testid":typeof L=="string"?L:L.label,style:{marginTop:D?"10px":0},children:M(L)}),labelPlacement:o,checked:T(e).includes(O),disabled:a||!T(e).includes(O)&&T(e).length===f,style:{textAlign:E()}},`checkbox-group-${O}`)}),v.jsx(ur,{name:e,id:`${e}-err`})]})})})},k_=Ke(v.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"CloudUpload"),E_=t=>{const{name:e,multiple:n=!1,readOnly:r=!1,variant:o=n?"drag-and-drop":"button",duplicateFilesCallback:i,incorrectFileTypesCallback:s,staticLabelProps:a={fontSize:".9em",color:"#808080"}}=t,{control:l,setValue:u,getValues:f,formState:{errors:p}}=an(),g=t.fileType?Array.isArray(t.fileType)?t.fileType:[t.fileType]:[],m=t.subtitle??(g.length>0?`Allowed file extensions: ${g.join(", ")}`:""),b=M=>{x(Array.from(M.target.files??[]))},y=M=>{M.preventDefault(),x(Array.from(M.dataTransfer.files))},x=M=>{if(M&&M.length>0){const A=f(e)?Array.isArray(f(e))?f(e):[f(e)]:[],I=vm.partition(M,L=>A.find(O=>T(L,O)));if(M=I[1],i&&I[0].length>0&&i(I[0]),g.length>0){const L=vm.partition(M,O=>g.find(D=>O.name.endsWith(D)));M=L[0],s&&L[1].length>0&&s(L[1])}n?u(e,[...w(),...M]):!Array.isArray(f(e))&&M.length>0&&u(e,M[0])}},w=()=>f(e)?Array.isArray(f(e))?f(e):[f(e)]:[],T=(M,A)=>M.lastModified===A.lastModified&&M.name===A.name&&M.type===A.type&&M.size===A.size,_=()=>w().map(M=>M.name).join(", ");return r?v.jsx($.Typography,{"data-testid":"fileupload-readonly",...a,children:_()}):o==="drag-and-drop"?v.jsx(Xn,{name:e,control:l,render:()=>v.jsxs("div",{style:{border:`4px dashed ${Object.keys(p).length>0?"red":"lightgray"}`,padding:"30px 10px",display:"flex",alignItems:"center",flexDirection:"column"},onDrop:y,onDragOver:M=>M.preventDefault(),"data-testid":"dropzone",children:[v.jsx(k_,{color:"primary",sx:{fontSize:"40px"}}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"baseline"},children:[v.jsx($.Typography,{children:"Drag and drop or"}),v.jsxs($.Button,{component:"label",role:void 0,variant:"text",tabIndex:-1,sx:{textTransform:"none",fontSize:"16px",textDecoration:"underline"},children:["browse",v.jsx("input",{"data-testid":"file-input",id:e,hidden:!0,type:"file",onChange:b,multiple:!0,accept:g==null?void 0:g.toString()})]})]}),m&&v.jsx($.Typography,{variant:"caption",children:m}),v.jsx(ur,{name:e,id:`${e}-err`})]})}):v.jsx(Xn,{name:e,control:l,render:()=>v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("div",{style:{display:"flex",alignItems:"center",marginBottom:"4px"},children:v.jsxs($.Button,{component:"label",role:void 0,variant:"contained",tabIndex:-1,startIcon:v.jsx(k_,{}),children:["Upload a file",v.jsx("input",{"data-testid":"file-input",id:e,hidden:!0,type:"file",onChange:b,accept:g==null?void 0:g.toString()})]})}),v.jsx(ur,{name:e,id:`${e}-err`})]})})},tz=Ke(v.jsx("path",{d:"M15 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V7zM6 20V4h8v4h4v12zm10-10v5c0 2.21-1.79 4-4 4s-4-1.79-4-4V8.5c0-1.47 1.26-2.64 2.76-2.49 1.3.13 2.24 1.32 2.24 2.63V15h-2V8.5c0-.28-.22-.5-.5-.5s-.5.22-.5.5V15c0 1.1.9 2 2 2s2-.9 2-2v-5z"}),"FilePresent"),nz=Ke(v.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"),rz=t=>{const{name:e}=t,{control:n,setValue:r,getValues:o}=an();return v.jsx(Xn,{name:e,control:n,render:()=>v.jsx("div",{style:{width:"100%"},children:o(e).map(i=>v.jsx($.Card,{sx:{margin:"10px 0px"},children:v.jsxs($.CardContent,{style:{display:"flex",alignItems:"center",padding:"8px 12px"},children:[v.jsx(tz,{sx:{color:"gray",fontSize:"20px"}}),v.jsx($.Typography,{sx:{padding:"8px",overflowWrap:"anywhere"},children:i.name}),v.jsx($.IconButton,{"aria-label":"remove file",onClick:()=>r(e,o(e).filter(s=>s!==i)),edge:"end",style:{marginLeft:"auto",order:"2"},children:v.jsx(nz,{})})]})},`${i.name}-${i.type}-${i.size}-${i.lastModified}`))})})};var xm,O_;function pi(){if(O_)return xm;O_=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return xm=t,xm}var Sm,M_;function A_(){if(M_)return Sm;M_=1;var t=typeof qi=="object"&&qi&&qi.Object===Object&&qi;return Sm=t,Sm}var wm,I_;function _o(){if(I_)return wm;I_=1;var t=A_(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return wm=n,wm}var Cm,D_;function oz(){if(D_)return Cm;D_=1;var t=_o(),e=function(){return t.Date.now()};return Cm=e,Cm}var _m,P_;function iz(){if(P_)return _m;P_=1;var t=/\s/;function e(n){for(var r=n.length;r--&&t.test(n.charAt(r)););return r}return _m=e,_m}var Tm,N_;function sz(){if(N_)return Tm;N_=1;var t=iz(),e=/^\s+/;function n(r){return r&&r.slice(0,t(r)+1).replace(e,"")}return Tm=n,Tm}var km,L_;function vc(){if(L_)return km;L_=1;var t=_o(),e=t.Symbol;return km=e,km}var Em,$_;function az(){if($_)return Em;$_=1;var t=vc(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,o=t?t.toStringTag:void 0;function i(s){var a=n.call(s,o),l=s[o];try{s[o]=void 0;var u=!0}catch{}var f=r.call(s);return u&&(a?s[o]=l:delete s[o]),f}return Em=i,Em}var Om,F_;function lz(){if(F_)return Om;F_=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return Om=n,Om}var Mm,R_;function Bs(){if(R_)return Mm;R_=1;var t=vc(),e=az(),n=lz(),r="[object Null]",o="[object Undefined]",i=t?t.toStringTag:void 0;function s(a){return a==null?a===void 0?o:r:i&&i in Object(a)?e(a):n(a)}return Mm=s,Mm}var Am,B_;function Ji(){if(B_)return Am;B_=1;function t(e){return e!=null&&typeof e=="object"}return Am=t,Am}var Im,V_;function Gd(){if(V_)return Im;V_=1;var t=Bs(),e=Ji(),n="[object Symbol]";function r(o){return typeof o=="symbol"||e(o)&&t(o)==n}return Im=r,Im}var Dm,z_;function H_(){if(z_)return Dm;z_=1;var t=sz(),e=pi(),n=Gd(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(e(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=e(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=t(u);var p=i.test(u);return p||s.test(u)?a(u.slice(2),p?2:8):o.test(u)?r:+u}return Dm=l,Dm}var Pm,j_;function W_(){if(j_)return Pm;j_=1;var t=pi(),e=oz(),n=H_(),r="Expected a function",o=Math.max,i=Math.min;function s(a,l,u){var f,p,g,m,b,y,x=0,w=!1,T=!1,_=!0;if(typeof a!="function")throw new TypeError(r);l=n(l)||0,t(u)&&(w=!!u.leading,T="maxWait"in u,g=T?o(n(u.maxWait)||0,l):g,_="trailing"in u?!!u.trailing:_);function C(V){var z=f,R=p;return f=p=void 0,x=V,m=a.apply(R,z),m}function E(V){return x=V,b=setTimeout(I,l),w?C(V):m}function M(V){var z=V-y,R=V-x,B=l-z;return T?i(B,g-R):B}function A(V){var z=V-y,R=V-x;return y===void 0||z>=l||z<0||T&&R>=g}function I(){var V=e();if(A(V))return L(V);b=setTimeout(I,M(V))}function L(V){return b=void 0,_&&f?C(V):(f=p=void 0,m)}function O(){b!==void 0&&clearTimeout(b),x=0,f=y=p=b=void 0}function D(){return b===void 0?m:L(e())}function F(){var V=e(),z=A(V);if(f=arguments,p=this,y=V,z){if(b===void 0)return E(y);if(T)return clearTimeout(b),b=setTimeout(I,l),C(y)}return b===void 0&&(b=setTimeout(I,l)),m}return F.cancel=O,F.flush=D,F}return Pm=s,Pm}var Nm,q_;function cz(){if(q_)return Nm;q_=1;var t=W_(),e=pi(),n="Expected a function";function r(o,i,s){var a=!0,l=!0;if(typeof o!="function")throw new TypeError(n);return e(s)&&(a="leading"in s?!!s.leading:a,l="trailing"in s?!!s.trailing:l),t(o,i,{leading:a,maxWait:i,trailing:l})}return Nm=r,Nm}var uz=cz();const U_=cr(uz),dz=Ke(v.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn");var Yd={exports:{}},fz=Yd.exports,K_;function pz(){return K_||(K_=1,function(t,e){(function(n,r){t.exports=r()})(fz,()=>{return n={705:o=>{o.exports=function(i,s){const a=[];return s.length===0?a.push({text:i,highlight:!1}):s[0][0]>0&&a.push({text:i.slice(0,s[0][0]),highlight:!1}),s.forEach((l,u)=>{const f=l[0],p=l[1];a.push({text:i.slice(f,p),highlight:!0}),u===s.length-1?p<i.length&&a.push({text:i.slice(p,i.length),highlight:!1}):p<s[u+1][0]&&a.push({text:i.slice(p,s[u+1][0]),highlight:!1})}),a}}},r={},function o(i){var s=r[i];if(s!==void 0)return s.exports;var a=r[i]={exports:{}};return n[i](a,a.exports,o),a.exports}(705);var n,r})}(Yd)),Yd.exports}var hz=pz();const gz=cr(hz),mz=t=>{const{listItemProps:e,option:n,resultIcon:r,highlightMatches:o}=t,{main_text:i,secondary_text:s,main_text_matched_substrings:a}=n.structured_formatting,l=gz(i,a.map(u=>[u.offset,u.offset+u.length]));return v.jsx("li",{...lr({...e},["key"]),"data-testid":`loc-${n.place_id}`,children:v.jsxs($.Box,{display:"flex",flexDirection:"row",alignItems:"center",children:[r?P.cloneElement(r):null,v.jsxs($.Box,{children:[l.map(u=>{const f=o&&u.highlight?700:400;return v.jsx("span",{style:{fontWeight:f},children:u.text},`${n.place_id}_${u.text}`)}),v.jsx($.Typography,{variant:"body2",color:"textSecondary",children:s})]})]})})};function yz(t,e,n){if(!e)return;const r=document.createElement("script");r.setAttribute("async",""),r.setAttribute("id",n),r.src=t,r.onerror=()=>console.error(`Failed to load script: ${t}`),e.appendChild(r)}const xc={current:null},bz=t=>{const{name:e,label:n=Wn(e),resultIcon:r=v.jsx(dz,{}),apiKey:o,highlightMatches:i=!0,types:s,variant:a="outlined",staticLabel:l=!1,staticLabelProps:u={fontSize:".9em",color:"#808080"},readOnly:f=!1,margin:p="dense"}=t,[g,m]=P.useState(null),[b,y]=P.useState(""),[x,w]=P.useState([]),T=P.useRef(!1),[,_,C]=Na.useField(e),{setValue:E}=C,{error:M}=_;typeof window<"u"&&!T.current&&(document.querySelector("#google-maps")||yz(`https://maps.googleapis.com/maps/api/js?key=${o}&libraries=places`,document.querySelector("head"),"google-maps"),T.current=!0);const A=P.useMemo(()=>U_((R,B)=>{xc.current&&xc.current.getPlacePredictions(R,B)},200),[]);P.useEffect(()=>{let R=!0;if(!xc.current&&window.google&&(xc.current=new window.google.maps.places.AutocompleteService),!xc.current)return;if(b===""){w(g?[g]:[]);return}return A({input:b,types:s?[s]:[]},K=>{if(R){let Y=[];g&&(Y=[g]),K&&(Y=[...Y,...K]);const G=Y.filter((Z,ge,he)=>ge===he.findIndex(me=>me.place_id===Z.place_id));w(G)}}),()=>{R=!1}},[g,b,A,s]);const I=P.useCallback(R=>{const U=(R?[R,...x]:x).filter((K,Y,G)=>Y===G.findIndex(Z=>Z.place_id===K.place_id));w(U),m(R),E(R?R.description:"")},[x,w,m,E]),L=R=>{y(R)},O=["name","apiKey","resultIcon","highlightMatches","variant","staticLabel","staticLabelProps","margin"],D=R=>v.jsx($.TextField,{margin:p,variant:a,...R,...lr({...t},O),label:l?void 0:n,hiddenLabel:l,error:!!M}),F=R=>typeof R=="string"?R:R.description,V=(R,B)=>v.jsx(mz,{listItemProps:R,option:B,resultIcon:r,highlightMatches:i},B.place_id);P.useEffect(()=>{const R=B=>{B.key==="Enter"&&x.length>0&&I(x[0])};return window.addEventListener("keydown",R),()=>{window.removeEventListener("keydown",R)}},[x,I]);const z=v.jsx($.Autocomplete,{id:`${e}-loc`,"data-testid":"location-autocomplete",getOptionLabel:F,filterOptions:R=>R,options:x,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:g,onChange:(R,B)=>I(B),onInputChange:(R,B)=>L(B),disabled:t.disabled,renderOption:V,renderInput:D});return v.jsxs($.FormControl,{margin:p,fullWidth:!0,children:[(l||f)&&v.jsx($.Typography,{...u,children:n}),f?v.jsx($.Typography,{children:g==null?void 0:g.description}):v.jsxs($.Box,{children:[z,v.jsx(ur,{name:e,id:`${e}-err`})]})]})},G_=t=>{const{name:e,radios:n=[],label:r=Wn(e),labelPlacement:o="end",labelAlignment:i=o==="end"||o==="start"?"top":"center",required:s=!1,disabled:a=!1,readOnly:l=!1,margin:u="dense",onChange:f,staticLabelProps:p={fontSize:".9em",color:"#808080"}}=t;i==="top"&&(o==="bottom"||o==="top")&&console.error(`RadioGroup: Ignoring labelAlignment='top'. labelAlignment cannot be 'top' when labelPlacement=${o}`);const{control:g,setValue:m,getValues:b,formState:{errors:y}}=an(),x=["radioProps","labelPlacement"],w=["disableRedLabelOnError","disableLabel","sameButtonColor","labelPlacement","focused","margin","fullWidth","labelAlignment"],T=()=>t.labelPlacement=="start"?"right":t.labelPlacement=="top"||t.labelPlacement=="bottom"?"center":"left",_=n.map((A,I)=>{const L=i==="top"&&(o==="start"||o==="end"),O=A.sublabel?v.jsxs("div",{children:[v.jsx("p",{style:{margin:0},children:A.label}),v.jsx($.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:A.sublabel})]}):A.label;return v.jsx($.FormControlLabel,{sx:{alignItems:L?"flex-start":"center"},value:I.toString(),control:v.jsx($.Radio,{id:`${A.value}-rb`,color:t.sameButtonColor?t.sameButtonColor:A.color??"default",...lr({...A},x)}),label:v.jsx("div",{style:{marginTop:L?"10px":0},children:O}),labelPlacement:o,disabled:A.disabled||a,style:{textAlign:T()}},`rb-${I}-${r}`)}),C=()=>{const A=n.find(I=>I.value===b(e));return v.jsxs($.Box,{children:[v.jsx($.Typography,{...p,children:r}),E(A)]})},E=A=>v.jsxs($.Box,{children:[v.jsx($.Typography,{children:A==null?void 0:A.label}),(A==null?void 0:A.sublabel)&&v.jsx($.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:A.sublabel})]}),M=A=>{m(e,A.target.value),f&&f(A.target.value)};return v.jsx(Xn,{name:e,control:g,render:({})=>v.jsx($.FormControl,{focused:t.focused,margin:u,fullWidth:t.fullWidth,error:!!y,children:l?C():v.jsxs(v.Fragment,{children:[v.jsx($.FormLabel,{htmlFor:e,required:s,disabled:t.disableLabel,children:r}),v.jsx($.RadioGroup,{id:e,value:b(e)??"",...lr({...t},w),onChange:M,children:_}),v.jsx(ur,{name:e,id:`${e}-err`})]})})})},vz=t=>{const{name:e,label:n=Wn(e),min:r=0,max:o=100,step:i=1,readOnly:s,staticLabelProps:a={fontSize:".9em",color:"#808080"}}=t,{control:l,setValue:u,getValues:f}=an(),p=["label"];return s?(()=>{let m;const b=f(e);return Array.isArray(b)?m=s==="percent"?`${100*(b[0]??0)/o}% - ${100*(b[1]??0)/o}%`:`${b[0]??0} - ${b[1]??0}`:m=s==="percent"?`${100*(b??0)/o}%`:`${b??0}`,v.jsx(Xn,{name:e,control:l,render:({})=>v.jsxs($.Box,{children:[v.jsx($.Typography,{...a,children:n}),v.jsx($.Typography,{children:m})]})})})():v.jsx(Xn,{name:e,control:l,render:({})=>v.jsxs($.FormControl,{fullWidth:!0,children:[v.jsx($.Typography,{gutterBottom:!0,color:"textSecondary",children:n}),v.jsx($.Slider,{...lr({...t},p),id:t.name,value:f(e)??0,onChange:(m,b)=>{u(e,b)},min:r,max:o,step:i})]})})},xz=t=>{const{name:e,options:n=[],label:r=Wn(e),selectedOptionIcon:o=void 0,staticLabel:i=!1,staticLabelProps:s={fontSize:".9em",color:"#808080"},variant:a="outlined",readOnly:l=!1,margin:u="dense",required:f}=t,{setValue:p,getValues:g,formState:{errors:m},control:b}=an(),y=P.useCallback(()=>{let L="";for(let O=0;O<n.length;O++)JSON.stringify(n[O].value)===JSON.stringify(g(e))&&(L=O.toString());return L},[n,g(e)]),x=P.useCallback(()=>{const L=[],O=g(e).toString().split(",");for(const D of O)for(let F=0;F<n.length;F++)n[F].value===D&&L.push(F);return L},[n,g(e)]);P.useEffect(()=>{_(t.multiple?x():y())},[n,t.multiple,g(e),x,y]);const w=(L,O)=>t.multiple?!!g(e).toString().split(",").find(D=>D===JSON.stringify(L.value)):O===n.findIndex(D=>g(e)===D.value),[T,_]=P.useState(t.multiple?x:y),C=n.map((L,O)=>{const D=o&&w(L,O)?o:void 0;return v.jsxs($.MenuItem,{id:`select-${e}-option-${L.value}`,value:O,disabled:L.disabled,children:[o&&v.jsx($.ListItemIcon,{children:D}),L.label]},O.toString())}),E=L=>{if(t.multiple){const O=[];L.target.value.forEach(D=>{n[D].value&&O.push(n[D].value)}),p(e,O.join(","),{shouldValidate:!0})}else p(e,n[L.target.value].value,{shouldValidate:!0});_(L.target.value)},M=["name","options",i?"label":"","required","selectedOptionIcon","variant","staticLabel","staticLabelProps"],A=()=>FB(n,g(e),t.multiple),I=t.renderValue??A;return v.jsx(Xn,{name:e,control:b,render:()=>v.jsxs($.FormControl,{fullWidth:!0,variant:a,error:!!m[e],margin:u,required:f,children:[i||l?v.jsx($.Typography,{...s,children:r}):v.jsx($.InputLabel,{id:`${e}-select-label`,children:r}),l?v.jsx($.Typography,{children:A()}):v.jsxs($.Box,{children:[v.jsx($.Select,{id:`${e}-sel`,labelId:`${e}-select-label`,label:i?void 0:r,...lr({...t},M),name:e,value:T,fullWidth:!0,onChange:L=>E(L),displayEmpty:i,renderValue:I,children:C}),v.jsx(ur,{name:e,id:`${e}-err`})]})]})})},Sz=t=>{const{name:e,label:n=Wn(e),labelPlacement:r="end",readOnly:o,staticLabelProps:i={fontSize:".9em",color:"#808080"},onChange:s,color:a="primary",chipColor:l,activeValue:u=!0,inactiveValue:f=!1}=t,{control:p,setValue:g,getValues:m}=an();m(e)===void 0&&console.error(`Please set an initial value for ${e}`);const b=["labelPlacement","chipColor","activeValue","inactiveValue"],y=x=>{if(typeof x!="boolean")return String(x);switch(o){case"YES_NO":return x===u?"Yes":"No";case"ON_OFF":return x===u?"On":"Off";default:return x===u?"True":"False"}};return o?v.jsxs($.Box,{children:[v.jsx($.Typography,{...i,children:n}),v.jsx($.Typography,{children:y(m(e))})]}):v.jsx(Xn,{name:e,control:p,render:({field:x})=>v.jsxs($.Box,{bgcolor:l??"inherit",sx:l?{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"32px",padding:"2px 0px 2px 12px"}:{},children:[v.jsx($.FormControlLabel,{label:n,sx:{"& .MuiFormControlLabel-label":{color:a}},labelPlacement:r,control:v.jsx($.Switch,{...lr({...t},b),id:e,...x,onChange:w=>{if(typeof u=="string"&&typeof f=="string"){const T=w.target.checked?u:f;g(e,T),s&&s(T)}else g(e,w.target.checked),s&&s(w.target.checked)},checked:m(e)===u})}),v.jsx(ur,{name:e,id:`${e}-err`})]})})},Sc=({noTrimOnBlur:t,...e})=>{const{name:n,label:r=Wn(n),format:o="",autoFormat:i=o,placeholder:s=r,staticLabel:a=!1,staticLabelProps:l={fontSize:".9em",color:"#808080"},readOnly:u=!1,startIcon:f,endIcon:p,margin:g="dense"}=e,{control:m,setValue:b,getValues:y,formState:{errors:x}}=an();y(n)===void 0&&console.error(`Please set an initial value for ${n}`),!o&&i&&console.error("Can't auto format when there is no format");const w=_=>{if(i){const C=$B(_.target.value,o,y(n),_.target);b(n,C)}else b(n,_.target.value);e.onChange&&e.onChange(_)},T=["autoFormat","format","staticLabel","staticLabelProps","endIcon","startIcon"];return v.jsx(Xn,{name:n,control:m,render:({field:_})=>v.jsxs($.FormControl,{margin:g,fullWidth:!0,children:[(a||u)&&v.jsx($.Typography,{...l,children:r}),u?v.jsx($.Typography,{children:y(n)}):v.jsxs($.Box,{children:[v.jsx($.TextField,{..._,variant:"outlined",fullWidth:!0,...y,id:`${n}-tf`,error:!!x[n],placeholder:s,...lr({...e},T),onChange:w,label:a?void 0:r,slotProps:{input:{endAdornment:p,startAdornment:f}},onBlur:C=>{t||b(n,C.target.value.trim()),e.onBlur&&e.onBlur(C)}}),v.jsx(ur,{name:n,id:`${n}-err`})]})]})})},wz=Ke([v.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),v.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime"),Cz=Ke(v.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline"),_z=Ke(v.jsx("path",{d:"M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8zM5 19l3-4 2 3 3-4 4 5z"}),"AddPhotoAlternate"),Tz=Ke(v.jsx("path",{d:"M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5"}),"Attachment"),kz=Ke(v.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Ez=Ke(v.jsx("path",{d:"M22 7h-9v2h9zm0 8h-9v2h9zM5.54 11 2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}),"Checklist"),Oz=Ke(v.jsx("path",{d:"M19 6.41 17.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"),Mz=Ke(v.jsx("path",{d:"M19 6.41 17.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"}),"CloseOutlined"),Az=Ke(v.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code"),Y_=Ke(v.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode"),Iz=Ke(v.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),Dz=Ke(v.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenter"),Pz=Ke(v.jsx("path",{d:"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z"}),"FormatAlignJustify"),Nz=Ke(v.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeft"),Lz=Ke(v.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRight"),$z=Ke(v.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5"}),"FormatBold"),Fz=Ke(v.jsx("path",{d:"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z"}),"FormatClear"),Rz=Ke(v.jsx("path",{d:"M16.56 8.94 7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12M5.21 10 10 5.21 14.79 10zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5M2 20h20v4H2z"}),"FormatColorFill"),Bz=Ke(v.jsx("path",{d:"M11 17h10v-2H11zm-8-5 4 4V8zm0 9h18v-2H3zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z"}),"FormatIndentDecrease"),Vz=Ke(v.jsx("path",{d:"M3 21h18v-2H3zM3 8v8l4-4zm8 9h10v-2H11zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z"}),"FormatIndentIncrease"),zz=Ke(v.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),Hz=Ke(v.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z"}),"FormatListBulleted"),jz=Ke(v.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z"}),"FormatListNumbered"),Wz=Ke(v.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"}),"FormatQuote"),qz=Ke(v.jsx("path",{d:"M9 4v3h5v12h3V7h5V4zm-6 8h3v7h3v-7h3V9H3z"}),"FormatSize"),Uz=Ke(v.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z"}),"FormatUnderlined"),Kz=Ke(v.jsx("path",{d:"M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2zm8 0h4v4h-4zM1.27 1.27 0 2.55l2 2V20c0 1.1.9 2 2 2h15.46l2 2 1.27-1.27zM10 12.55 11.45 14H10zm-6-6L5.45 8H4zM8 20H4v-4h4zm0-6H4v-4h3.45l.55.55zm6 6h-4v-4h3.45l.55.54zm2 0v-1.46L17.46 20z"}),"GridOff"),Gz=Ke(v.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRule"),Yz=Ke(v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),Jz=Ke(v.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),J_=Ke(v.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),X_=Ke(v.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode"),Lm=Ke(v.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),Xz=Ke(v.jsx("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout"),Zz=Ke(v.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),Qz=Ke(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),Z_=Ke(v.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 14h-3v3h-2v-3H8v-2h3v-3h2v3h3zm-3-7V3.5L18.5 9z"}),"NoteAdd"),e4=Ke(v.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 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),t4=Ke(v.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"),n4=Ke(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),r4=Ke(v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11H7v-2h10z"}),"RemoveCircle"),o4=Ke(v.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"}),"SearchOutlined"),i4=Ke(v.jsx("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort"),s4=Ke(v.jsx("path",{d:"M6.85 7.08C6.85 4.37 9.45 3 12.24 3c1.64 0 3 .49 3.9 1.28.77.65 1.46 1.73 1.46 3.24h-3.01c0-.31-.05-.59-.15-.85-.29-.86-1.2-1.28-2.25-1.28-1.86 0-2.34 1.02-2.34 1.7 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.21-.34-.54-.89-.54-1.92M21 12v-2H3v2h9.62c1.15.45 1.96.75 1.96 1.97 0 1-.81 1.67-2.28 1.67-1.54 0-2.93-.54-2.93-2.51H6.4c0 .55.08 1.13.24 1.58.81 2.29 3.29 3.3 5.67 3.3 2.27 0 5.3-.89 5.3-4.05 0-.3-.01-1.16-.48-1.94H21z"}),"StrikethroughS"),a4=Ke(v.jsx("path",{d:"M22 18h-2v1h3v1h-4v-2c0-.55.45-1 1-1h2v-1h-3v-1h3c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1M5.88 18h2.66l3.4-5.42h.12l3.4 5.42h2.66l-4.65-7.27L17.81 4h-2.68l-3.07 4.99h-.12L8.85 4H6.19l4.32 6.73z"}),"Subscript"),l4=Ke(v.jsx("path",{d:"M22 7h-2v1h3v1h-4V7c0-.55.45-1 1-1h2V5h-3V4h3c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1M5.88 20h2.66l3.4-5.42h.12l3.4 5.42h2.66l-4.65-7.27L17.81 6h-2.68l-3.07 4.99h-.12L8.85 6H6.19l4.32 6.73z"}),"Superscript"),c4=Ke(v.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"),u4=t=>{const{onSearch:e,initialValue:n="",lazySearch:r=!1}=t,[o,i]=q.useState(n),s=f=>{i(f.target.value),r||e(f.target.value)},a=f=>{f.key==="Enter"&&l()},l=()=>{e(o)},u=()=>{i(""),e("")};return v.jsx($.TextField,{type:"text",placeholder:"Search...",value:o,onChange:s,onKeyDown:a,className:"search-bar",size:"small",fullWidth:!0,slotProps:{input:{startAdornment:v.jsx($.InputAdornment,{position:"start",children:v.jsx($.IconButton,{"data-testid":"search-button",style:{marginLeft:-10},onClick:l,children:v.jsx(o4,{})})}),endAdornment:o&&v.jsx($.IconButton,{style:{marginRight:-10},"aria-label":"clear search","data-testid":"clear-search",onClick:u,children:v.jsx(Mz,{})})}}})};function ie(){return ie=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ie.apply(null,arguments)}function dt(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Zt({props:t,name:e}){return dm({props:t,name:e,defaultTheme:Ud,themeId:yc})}const d4=["localeText"],Jd=P.createContext(null);process.env.NODE_ENV!=="production"&&(Jd.displayName="MuiPickersAdapterContext");const $m=function(e){const{localeText:n}=e,r=dt(e,d4),{utils:o,localeText:i}=P.useContext(Jd)??{utils:void 0,localeText:void 0},s=Zt({props:r,name:"MuiLocalizationProvider"}),{children:a,dateAdapter:l,dateFormats:u,dateLibInstance:f,adapterLocale:p,localeText:g}=s,m=P.useMemo(()=>ie({},g,i,n),[g,i,n]),b=P.useMemo(()=>{if(!l)return o||null;const w=new l({locale:p,formats:u,instance:f});if(!w.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
108
+ `));return w},[l,p,u,f,o]),y=P.useMemo(()=>b?{minDate:b.date("1900-01-01T00:00:00.000"),maxDate:b.date("2099-12-31T00:00:00.000")}:null,[b]),x=P.useMemo(()=>({utils:b,defaultDates:y,localeText:m}),[y,b,m]);return v.jsx(Jd.Provider,{value:x,children:a})};process.env.NODE_ENV!=="production"&&($m.propTypes={adapterLocale:c.any,children:c.node,dateAdapter:c.func,dateFormats:c.shape({dayOfMonth:c.string,dayOfMonthFull:c.string,fullDate:c.string,fullTime:c.string,fullTime12h:c.string,fullTime24h:c.string,hours12h:c.string,hours24h:c.string,keyboardDate:c.string,keyboardDateTime:c.string,keyboardDateTime12h:c.string,keyboardDateTime24h:c.string,meridiem:c.string,minutes:c.string,month:c.string,monthShort:c.string,normalDate:c.string,normalDateWithWeekday:c.string,seconds:c.string,shortDate:c.string,weekday:c.string,weekdayShort:c.string,year:c.string}),dateLibInstance:c.any,localeText:c.object});var Xd={exports:{}},f4=Xd.exports,Q_;function p4(){return Q_||(Q_=1,function(t,e){(function(n,r){t.exports=r()})(f4,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",l="hour",u="day",f="week",p="month",g="quarter",m="year",b="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var R=["th","st","nd","rd"],B=z%100;return"["+z+(R[(B-20)%10]||R[B]||R[0])+"]"}},_=function(z,R,B){var U=String(z);return!U||U.length>=R?z:""+Array(R+1-U.length).join(B)+z},C={s:_,z:function(z){var R=-z.utcOffset(),B=Math.abs(R),U=Math.floor(B/60),K=B%60;return(R<=0?"+":"-")+_(U,2,"0")+":"+_(K,2,"0")},m:function z(R,B){if(R.date()<B.date())return-z(B,R);var U=12*(B.year()-R.year())+(B.month()-R.month()),K=R.clone().add(U,p),Y=B-K<0,G=R.clone().add(U+(Y?-1:1),p);return+(-(U+(B-K)/(Y?K-G:G-K))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:p,y:m,w:f,d:u,D:b,h:l,m:a,s,ms:i,Q:g}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},E="en",M={};M[E]=T;var A="$isDayjsObject",I=function(z){return z instanceof F||!(!z||!z[A])},L=function z(R,B,U){var K;if(!R)return E;if(typeof R=="string"){var Y=R.toLowerCase();M[Y]&&(K=Y),B&&(M[Y]=B,K=Y);var G=R.split("-");if(!K&&G.length>1)return z(G[0])}else{var Z=R.name;M[Z]=R,K=Z}return!U&&K&&(E=K),K||!U&&E},O=function(z,R){if(I(z))return z.clone();var B=typeof R=="object"?R:{};return B.date=z,B.args=arguments,new F(B)},D=C;D.l=L,D.i=I,D.w=function(z,R){return O(z,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var F=function(){function z(B){this.$L=L(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[A]=!0}var R=z.prototype;return R.parse=function(B){this.$d=function(U){var K=U.date,Y=U.utc;if(K===null)return new Date(NaN);if(D.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var G=K.match(x);if(G){var Z=G[2]-1||0,ge=(G[7]||"0").substring(0,3);return Y?new Date(Date.UTC(G[1],Z,G[3]||1,G[4]||0,G[5]||0,G[6]||0,ge)):new Date(G[1],Z,G[3]||1,G[4]||0,G[5]||0,G[6]||0,ge)}}return new Date(K)}(B),this.init()},R.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},R.$utils=function(){return D},R.isValid=function(){return this.$d.toString()!==y},R.isSame=function(B,U){var K=O(B);return this.startOf(U)<=K&&K<=this.endOf(U)},R.isAfter=function(B,U){return O(B)<this.startOf(U)},R.isBefore=function(B,U){return this.endOf(U)<O(B)},R.$g=function(B,U,K){return D.u(B)?this[U]:this.set(K,B)},R.unix=function(){return Math.floor(this.valueOf()/1e3)},R.valueOf=function(){return this.$d.getTime()},R.startOf=function(B,U){var K=this,Y=!!D.u(U)||U,G=D.p(B),Z=function(Q,ae){var ve=D.w(K.$u?Date.UTC(K.$y,ae,Q):new Date(K.$y,ae,Q),K);return Y?ve:ve.endOf(u)},ge=function(Q,ae){return D.w(K.toDate()[Q].apply(K.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(ae)),K)},he=this.$W,me=this.$M,oe=this.$D,ye="set"+(this.$u?"UTC":"");switch(G){case m:return Y?Z(1,0):Z(31,11);case p:return Y?Z(1,me):Z(0,me+1);case f:var de=this.$locale().weekStart||0,X=(he<de?he+7:he)-de;return Z(Y?oe-X:oe+(6-X),me);case u:case b:return ge(ye+"Hours",0);case l:return ge(ye+"Minutes",1);case a:return ge(ye+"Seconds",2);case s:return ge(ye+"Milliseconds",3);default:return this.clone()}},R.endOf=function(B){return this.startOf(B,!1)},R.$set=function(B,U){var K,Y=D.p(B),G="set"+(this.$u?"UTC":""),Z=(K={},K[u]=G+"Date",K[b]=G+"Date",K[p]=G+"Month",K[m]=G+"FullYear",K[l]=G+"Hours",K[a]=G+"Minutes",K[s]=G+"Seconds",K[i]=G+"Milliseconds",K)[Y],ge=Y===u?this.$D+(U-this.$W):U;if(Y===p||Y===m){var he=this.clone().set(b,1);he.$d[Z](ge),he.init(),this.$d=he.set(b,Math.min(this.$D,he.daysInMonth())).$d}else Z&&this.$d[Z](ge);return this.init(),this},R.set=function(B,U){return this.clone().$set(B,U)},R.get=function(B){return this[D.p(B)]()},R.add=function(B,U){var K,Y=this;B=Number(B);var G=D.p(U),Z=function(me){var oe=O(Y);return D.w(oe.date(oe.date()+Math.round(me*B)),Y)};if(G===p)return this.set(p,this.$M+B);if(G===m)return this.set(m,this.$y+B);if(G===u)return Z(1);if(G===f)return Z(7);var ge=(K={},K[a]=r,K[l]=o,K[s]=n,K)[G]||1,he=this.$d.getTime()+B*ge;return D.w(he,this)},R.subtract=function(B,U){return this.add(-1*B,U)},R.format=function(B){var U=this,K=this.$locale();if(!this.isValid())return K.invalidDate||y;var Y=B||"YYYY-MM-DDTHH:mm:ssZ",G=D.z(this),Z=this.$H,ge=this.$m,he=this.$M,me=K.weekdays,oe=K.months,ye=K.meridiem,de=function(ae,ve,ne,ce){return ae&&(ae[ve]||ae(U,Y))||ne[ve].slice(0,ce)},X=function(ae){return D.s(Z%12||12,ae,"0")},Q=ye||function(ae,ve,ne){var ce=ae<12?"AM":"PM";return ne?ce.toLowerCase():ce};return Y.replace(w,function(ae,ve){return ve||function(ne){switch(ne){case"YY":return String(U.$y).slice(-2);case"YYYY":return D.s(U.$y,4,"0");case"M":return he+1;case"MM":return D.s(he+1,2,"0");case"MMM":return de(K.monthsShort,he,oe,3);case"MMMM":return de(oe,he);case"D":return U.$D;case"DD":return D.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return de(K.weekdaysMin,U.$W,me,2);case"ddd":return de(K.weekdaysShort,U.$W,me,3);case"dddd":return me[U.$W];case"H":return String(Z);case"HH":return D.s(Z,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return Q(Z,ge,!0);case"A":return Q(Z,ge,!1);case"m":return String(ge);case"mm":return D.s(ge,2,"0");case"s":return String(U.$s);case"ss":return D.s(U.$s,2,"0");case"SSS":return D.s(U.$ms,3,"0");case"Z":return G}return null}(ae)||G.replace(":","")})},R.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},R.diff=function(B,U,K){var Y,G=this,Z=D.p(U),ge=O(B),he=(ge.utcOffset()-this.utcOffset())*r,me=this-ge,oe=function(){return D.m(G,ge)};switch(Z){case m:Y=oe()/12;break;case p:Y=oe();break;case g:Y=oe()/3;break;case f:Y=(me-he)/6048e5;break;case u:Y=(me-he)/864e5;break;case l:Y=me/o;break;case a:Y=me/r;break;case s:Y=me/n;break;default:Y=me}return K?Y:D.a(Y)},R.daysInMonth=function(){return this.endOf(p).$D},R.$locale=function(){return M[this.$L]},R.locale=function(B,U){if(!B)return this.$L;var K=this.clone(),Y=L(B,U,!0);return Y&&(K.$L=Y),K},R.clone=function(){return D.w(this.$d,this)},R.toDate=function(){return new Date(this.valueOf())},R.toJSON=function(){return this.isValid()?this.toISOString():null},R.toISOString=function(){return this.$d.toISOString()},R.toString=function(){return this.$d.toUTCString()},z}(),V=F.prototype;return O.prototype=V,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",u],["$M",p],["$y",m],["$D",b]].forEach(function(z){V[z[1]]=function(R){return this.$g(R,z[0],z[1])}}),O.extend=function(z,R){return z.$i||(z(R,F,O),z.$i=!0),O},O.locale=L,O.isDayjs=I,O.unix=function(z){return O(1e3*z)},O.en=M[E],O.Ls=M,O.p={},O})}(Xd)),Xd.exports}var h4=p4();const On=cr(h4);var Zd={exports:{}},g4=Zd.exports,eT;function m4(){return eT||(eT=1,function(t,e){(function(n,r){t.exports=r()})(g4,function(){var n="week",r="year";return function(o,i,s){var a=i.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var f=s(this).startOf(r).add(1,r).date(u),p=s(this).endOf(n);if(f.isBefore(p))return 1}var g=s(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),m=this.diff(g,n,!0);return m<0?s(this).startOf("week").week():Math.ceil(m)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})}(Zd)),Zd.exports}var y4=m4();const b4=cr(y4);var Qd={exports:{}},v4=Qd.exports,tT;function x4(){return tT||(tT=1,function(t,e){(function(n,r){t.exports=r()})(v4,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},u=function(x){return(x=+x)+(x>68?1900:2e3)},f=function(x){return function(w){this[x]=+w}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(x){(this.zone||(this.zone={})).offset=function(w){if(!w||w==="Z")return 0;var T=w.match(/([+-]|\d\d)/g),_=60*T[1]+(+T[2]||0);return _===0?0:T[0]==="+"?-_:_}(x)}],g=function(x){var w=l[x];return w&&(w.indexOf?w:w.s.concat(w.f))},m=function(x,w){var T,_=l.meridiem;if(_){for(var C=1;C<=24;C+=1)if(x.indexOf(_(C,0,w))>-1){T=C>12;break}}else T=x===(w?"pm":"PM");return T},b={A:[a,function(x){this.afternoon=m(x,!1)}],a:[a,function(x){this.afternoon=m(x,!0)}],Q:[o,function(x){this.month=3*(x-1)+1}],S:[o,function(x){this.milliseconds=100*+x}],SS:[i,function(x){this.milliseconds=10*+x}],SSS:[/\d{3}/,function(x){this.milliseconds=+x}],s:[s,f("seconds")],ss:[s,f("seconds")],m:[s,f("minutes")],mm:[s,f("minutes")],H:[s,f("hours")],h:[s,f("hours")],HH:[s,f("hours")],hh:[s,f("hours")],D:[s,f("day")],DD:[i,f("day")],Do:[a,function(x){var w=l.ordinal,T=x.match(/\d+/);if(this.day=T[0],w)for(var _=1;_<=31;_+=1)w(_).replace(/\[|\]/g,"")===x&&(this.day=_)}],w:[s,f("week")],ww:[i,f("week")],M:[s,f("month")],MM:[i,f("month")],MMM:[a,function(x){var w=g("months"),T=(g("monthsShort")||w.map(function(_){return _.slice(0,3)})).indexOf(x)+1;if(T<1)throw new Error;this.month=T%12||T}],MMMM:[a,function(x){var w=g("months").indexOf(x)+1;if(w<1)throw new Error;this.month=w%12||w}],Y:[/[+-]?\d+/,f("year")],YY:[i,function(x){this.year=u(x)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function y(x){var w,T;w=x,T=l&&l.formats;for(var _=(x=w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,D,F){var V=F&&F.toUpperCase();return D||T[F]||n[F]||T[V].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(z,R,B){return R||B.slice(1)})})).match(r),C=_.length,E=0;E<C;E+=1){var M=_[E],A=b[M],I=A&&A[0],L=A&&A[1];_[E]=L?{regex:I,parser:L}:M.replace(/^\[|\]$/g,"")}return function(O){for(var D={},F=0,V=0;F<C;F+=1){var z=_[F];if(typeof z=="string")V+=z.length;else{var R=z.regex,B=z.parser,U=O.slice(V),K=R.exec(U)[0];B.call(D,K),O=O.replace(K,"")}}return function(Y){var G=Y.afternoon;if(G!==void 0){var Z=Y.hours;G?Z<12&&(Y.hours+=12):Z===12&&(Y.hours=0),delete Y.afternoon}}(D),D}}return function(x,w,T){T.p.customParseFormat=!0,x&&x.parseTwoDigitYear&&(u=x.parseTwoDigitYear);var _=w.prototype,C=_.parse;_.parse=function(E){var M=E.date,A=E.utc,I=E.args;this.$u=A;var L=I[1];if(typeof L=="string"){var O=I[2]===!0,D=I[3]===!0,F=O||D,V=I[2];D&&(V=I[2]),l=this.$locale(),!O&&V&&(l=T.Ls[V]),this.$d=function(U,K,Y,G){try{if(["x","X"].indexOf(K)>-1)return new Date((K==="X"?1e3:1)*U);var Z=y(K)(U),ge=Z.year,he=Z.month,me=Z.day,oe=Z.hours,ye=Z.minutes,de=Z.seconds,X=Z.milliseconds,Q=Z.zone,ae=Z.week,ve=new Date,ne=me||(ge||he?1:ve.getDate()),ce=ge||ve.getFullYear(),fe=0;ge&&!he||(fe=he>0?he-1:ve.getMonth());var xe,Te=oe||0,_e=ye||0,Ne=de||0,He=X||0;return Q?new Date(Date.UTC(ce,fe,ne,Te,_e,Ne,He+60*Q.offset*1e3)):Y?new Date(Date.UTC(ce,fe,ne,Te,_e,Ne,He)):(xe=new Date(ce,fe,ne,Te,_e,Ne,He),ae&&(xe=G(xe).week(ae).toDate()),xe)}catch{return new Date("")}}(M,L,A,T),this.init(),V&&V!==!0&&(this.$L=this.locale(V).$L),F&&M!=this.format(L)&&(this.$d=new Date("")),l={}}else if(L instanceof Array)for(var z=L.length,R=1;R<=z;R+=1){I[1]=L[R-1];var B=T.apply(this,I);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}R===z&&(this.$d=new Date(""))}else C.call(this,E)}}})}(Qd)),Qd.exports}var S4=x4();const w4=cr(S4);var ef={exports:{}},C4=ef.exports,nT;function _4(){return nT||(nT=1,function(t,e){(function(n,r){t.exports=r()})(C4,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var s=o.prototype,a=s.format;i.en.formats=n,s.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(p,g){return p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(m,b,y){var x=y&&y.toUpperCase();return b||g[y]||n[y]||g[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,T,_){return T||_.slice(1)})})}(l,u===void 0?{}:u);return a.call(this,f)}}})}(ef)),ef.exports}var T4=_4();const k4=cr(T4);var tf={exports:{}},E4=tf.exports,rT;function O4(){return rT||(rT=1,function(t,e){(function(n,r){t.exports=r()})(E4,function(){return function(n,r,o){r.prototype.isBetween=function(i,s,a,l){var u=o(i),f=o(s),p=(l=l||"()")[0]==="(",g=l[1]===")";return(p?this.isAfter(u,a):!this.isBefore(u,a))&&(g?this.isBefore(f,a):!this.isAfter(f,a))||(p?this.isBefore(u,a):!this.isAfter(u,a))&&(g?this.isAfter(f,a):!this.isBefore(f,a))}}})}(tf)),tf.exports}var M4=O4();const A4=cr(M4);var nf={exports:{}},I4=nf.exports,oT;function D4(){return oT||(oT=1,function(t,e){(function(n,r){t.exports=r()})(I4,function(){return function(n,r){var o=r.prototype,i=o.format;o.format=function(s){var a=this,l=this.$locale();if(!this.isValid())return i.bind(this)(s);var u=this.$utils(),f=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(p){switch(p){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return u.s(a.week(),p==="w"?1:2,"0");case"W":case"WW":return u.s(a.isoWeek(),p==="W"?1:2,"0");case"k":case"kk":return u.s(String(a.$H===0?24:a.$H),p==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return p}});return i.bind(this)(f)}}})}(nf)),nf.exports}var P4=D4();const N4=cr(P4),iT=new Set;function sT(t,e="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(t)?t.join(`
109
+ `):t;iT.has(n)||(iT.add(n),e==="error"?console.error(n):console.warn(n))}On.extend(k4),On.extend(b4),On.extend(A4),On.extend(N4);const L4={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},$4={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Fm=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
110
+ `),aT=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
111
+ `),F4=(t,e)=>e?(...n)=>t(...n).locale(e):t;class R4{constructor({locale:e,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=L4,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale()?r:r.locale(o)},this.hasUTCPlugin=()=>typeof On.utc<"u",this.hasTimezonePlugin=()=>typeof On.tz<"u",this.isSame=(r,o,i)=>{const s=this.setTimezone(o,this.getTimezone(r));return r.format(i)===s.format(i)},this.cleanTimezone=r=>{switch(r){case"default":return;case"system":return On.tz.guess();default:return r}},this.createSystemDate=r=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const o=On.tz.guess();return o!=="UTC"?On.tz(r,o):On(r)}return On(r)},this.createUTCDate=r=>{if(!this.hasUTCPlugin())throw new Error(Fm);return On.utc(r)},this.createTZDate=(r,o)=>{if(!this.hasUTCPlugin())throw new Error(Fm);if(!this.hasTimezonePlugin())throw new Error(aT);const i=r!==void 0&&!r.endsWith("Z");return On(r).tz(this.cleanTimezone(o),i)},this.getLocaleFormats=()=>{const r=On.Ls,o=this.locale||"en";let i=r[o];return i===void 0&&(process.env.NODE_ENV!=="production"&&sT(["MUI X: Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale."]),i=r.en),i.formats},this.adjustOffset=r=>{if(!this.hasTimezonePlugin())return r;const o=this.getTimezone(r);if(o!=="UTC"){const i=r.tz(this.cleanTimezone(o),!0);if(i.$offset===(r.$offset??0))return r;r.$offset=i.$offset}return r},this.date=(r,o="default")=>{if(r===null)return null;let i;return o==="UTC"?i=this.createUTCDate(r):o==="system"||o==="default"&&!this.hasTimezonePlugin()?i=this.createSystemDate(r):i=this.createTZDate(r,o),this.locale===void 0?i:i.locale(this.locale)},this.getInvalidDate=()=>On(new Date("Invalid date")),this.getTimezone=r=>{var o;if(this.hasTimezonePlugin()){const i=(o=r.$x)==null?void 0:o.$timezone;if(i)return i}return this.hasUTCPlugin()&&r.isUTC()?"UTC":"system"},this.setTimezone=(r,o)=>{if(this.getTimezone(r)===o)return r;if(o==="UTC"){if(!this.hasUTCPlugin())throw new Error(Fm);return r.utc()}if(o==="system")return r.local();if(!this.hasTimezonePlugin()){if(o==="default")return r;throw new Error(aT)}return On.tz(r,this.cleanTimezone(o))},this.toJsDate=r=>r.toDate(),this.parse=(r,o)=>r===""?null:this.dayjs(r,o,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=r=>{const o=this.getLocaleFormats(),i=s=>s.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(a,l,u)=>l||u.slice(1));return r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(s,a,l)=>{const u=l&&l.toUpperCase();return a||o[l]||i(o[u])})},this.isValid=r=>r==null?!1:r.isValid(),this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>this.dayjs(r).format(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:r.toDate().getTime()===o.toDate().getTime(),this.isSameYear=(r,o)=>this.isSame(r,o,"YYYY"),this.isSameMonth=(r,o)=>this.isSame(r,o,"YYYY-MM"),this.isSameDay=(r,o)=>this.isSame(r,o,"YYYY-MM-DD"),this.isSameHour=(r,o)=>r.isSame(o,"hour"),this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>this.hasUTCPlugin()?!this.isSameYear(r,o)&&r.utc()>o.utc():r.isAfter(o,"year"),this.isAfterDay=(r,o)=>this.hasUTCPlugin()?!this.isSameDay(r,o)&&r.utc()>o.utc():r.isAfter(o,"day"),this.isBefore=(r,o)=>r<o,this.isBeforeYear=(r,o)=>this.hasUTCPlugin()?!this.isSameYear(r,o)&&r.utc()<o.utc():r.isBefore(o,"year"),this.isBeforeDay=(r,o)=>this.hasUTCPlugin()?!this.isSameDay(r,o)&&r.utc()<o.utc():r.isBefore(o,"day"),this.isWithinRange=(r,[o,i])=>r>=o&&r<=i,this.startOfYear=r=>this.adjustOffset(r.startOf("year")),this.startOfMonth=r=>this.adjustOffset(r.startOf("month")),this.startOfWeek=r=>this.adjustOffset(this.setLocaleToValue(r).startOf("week")),this.startOfDay=r=>this.adjustOffset(r.startOf("day")),this.endOfYear=r=>this.adjustOffset(r.endOf("year")),this.endOfMonth=r=>this.adjustOffset(r.endOf("month")),this.endOfWeek=r=>this.adjustOffset(this.setLocaleToValue(r).endOf("week")),this.endOfDay=r=>this.adjustOffset(r.endOf("day")),this.addYears=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"year"):r.add(o,"year")),this.addMonths=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"month"):r.add(o,"month")),this.addWeeks=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"week"):r.add(o,"week")),this.addDays=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"day"):r.add(o,"day")),this.addHours=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"hour"):r.add(o,"hour")),this.addMinutes=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"minute"):r.add(o,"minute")),this.addSeconds=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"second"):r.add(o,"second")),this.getYear=r=>r.year(),this.getMonth=r=>r.month(),this.getDate=r=>r.date(),this.getHours=r=>r.hour(),this.getMinutes=r=>r.minute(),this.getSeconds=r=>r.second(),this.getMilliseconds=r=>r.millisecond(),this.setYear=(r,o)=>this.adjustOffset(r.set("year",o)),this.setMonth=(r,o)=>this.adjustOffset(r.set("month",o)),this.setDate=(r,o)=>this.adjustOffset(r.set("date",o)),this.setHours=(r,o)=>this.adjustOffset(r.set("hour",o)),this.setMinutes=(r,o)=>this.adjustOffset(r.set("minute",o)),this.setSeconds=(r,o)=>this.adjustOffset(r.set("second",o)),this.setMilliseconds=(r,o)=>this.adjustOffset(r.set("millisecond",o)),this.getDaysInMonth=r=>r.daysInMonth(),this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r));let s=0,a=o;const l=[];for(;a<i;){const u=Math.floor(s/7);l[u]=l[u]||[],l[u].push(a),a=this.addDays(a,1),s+=1}return l},this.getWeekNumber=r=>r.week(),this.getYearRange=([r,o])=>{const i=this.startOfYear(r),s=this.endOfYear(o),a=[];let l=i;for(;this.isBefore(l,s);)a.push(l),l=this.addYears(l,1);return a},this.dayjs=F4(On,e),this.locale=e,this.formats=ie({},$4,n),On.extend(w4)}getDayOfWeek(e){return e.day()+1}}function rf(t){return parseInt(t,10)||0}const B4={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function V4(t){for(const e in t)return!1;return!0}function lT(t){return V4(t)||t.outerHeightStyle===0&&!t.overflowing}const cT=P.forwardRef(function(e,n){const{onChange:r,maxRows:o,minRows:i=1,style:s,value:a,...l}=e,{current:u}=P.useRef(a!=null),f=P.useRef(null),p=Nt(n,f),g=P.useRef(null),m=P.useRef(null),b=P.useCallback(()=>{const _=f.current,C=m.current;if(!_||!C)return;const M=ci(_).getComputedStyle(_);if(M.width==="0px")return{outerHeightStyle:0,overflowing:!1};C.style.width=M.width,C.value=_.value||e.placeholder||"x",C.value.slice(-1)===`
112
+ `&&(C.value+=" ");const A=M.boxSizing,I=rf(M.paddingBottom)+rf(M.paddingTop),L=rf(M.borderBottomWidth)+rf(M.borderTopWidth),O=C.scrollHeight;C.value="x";const D=C.scrollHeight;let F=O;i&&(F=Math.max(Number(i)*D,F)),o&&(F=Math.min(Number(o)*D,F)),F=Math.max(F,D);const V=F+(A==="border-box"?I+L:0),z=Math.abs(F-O)<=1;return{outerHeightStyle:V,overflowing:z}},[o,i,e.placeholder]),y=Ue(()=>{const _=f.current,C=b();if(!_||!C||lT(C))return!1;const E=C.outerHeightStyle;return g.current!=null&&g.current!==E}),x=P.useCallback(()=>{const _=f.current,C=b();if(!_||!C||lT(C))return;const E=C.outerHeightStyle;g.current!==E&&(g.current=E,_.style.height=`${E}px`),_.style.overflow=C.overflowing?"hidden":""},[b]),w=P.useRef(-1);Fn(()=>{const _=mC(x),C=f==null?void 0:f.current;if(!C)return;const E=ci(C);E.addEventListener("resize",_);let M;return typeof ResizeObserver<"u"&&(M=new ResizeObserver(()=>{y()&&(M.unobserve(C),cancelAnimationFrame(w.current),x(),w.current=requestAnimationFrame(()=>{M.observe(C)}))}),M.observe(C)),()=>{_.clear(),cancelAnimationFrame(w.current),E.removeEventListener("resize",_),M&&M.disconnect()}},[b,x,y]),Fn(()=>{x()});const T=_=>{u||x(),r&&r(_)};return v.jsxs(P.Fragment,{children:[v.jsx("textarea",{value:a,onChange:T,ref:p,rows:i,style:s,...l}),v.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:m,tabIndex:-1,style:{...B4.shadow,...s,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(cT.propTypes={className:c.string,maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),onChange:c.func,placeholder:c.string,style:c.object,value:c.oneOfType([c.arrayOf(c.string),c.number,c.string])});function wc(t){return typeof t=="string"}function Ga({props:t,states:e,muiFormControl:n}){return e.reduce((r,o)=>(r[o]=t[o],n&&typeof t[o]>"u"&&(r[o]=n[o]),r),{})}const Cc=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Cc.displayName="FormControlContext");function To(){return P.useContext(Cc)}function uT(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function of(t,e=!1){return t&&(uT(t.value)&&t.value!==""||e&&uT(t.defaultValue)&&t.defaultValue!=="")}function z4(t){return t.startAdornment}function H4(t){return Qe("MuiInputBase",t)}const Ya=tt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var dT;const sf=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${$e(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},af=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},j4=t=>{const{classes:e,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:a,fullWidth:l,hiddenLabel:u,multiline:f,readOnly:p,size:g,startAdornment:m,type:b}=t,y={root:["root",`color${$e(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",g&&g!=="medium"&&`size${$e(g)}`,f&&"multiline",m&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",p&&"readOnly"],input:["input",r&&"disabled",b==="search"&&"inputTypeSearch",f&&"inputMultiline",g==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",m&&"inputAdornedStart",i&&"inputAdornedEnd",p&&"readOnly"]};return Ze(y,H4,e)},lf=Se("div",{name:"MuiInputBase",slot:"Root",overridesResolver:sf})(Vt(({theme:t})=>({...t.typography.body1,color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Ya.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:n})=>e.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),cf=Se("input",{name:"MuiInputBase",slot:"Input",overridesResolver:af})(Vt(({theme:t})=>{const e=t.palette.mode==="light",n={color:"currentColor",...t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.42:.5},transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},r={opacity:"0 !important"},o=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.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] + .${Ya.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Ya.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),fT=j3({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),uf=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:s,className:a,color:l,components:u={},componentsProps:f={},defaultValue:p,disabled:g,disableInjectingGlobalStyles:m,endAdornment:b,error:y,fullWidth:x=!1,id:w,inputComponent:T="input",inputProps:_={},inputRef:C,margin:E,maxRows:M,minRows:A,multiline:I=!1,name:L,onBlur:O,onChange:D,onClick:F,onFocus:V,onKeyDown:z,onKeyUp:R,placeholder:B,readOnly:U,renderSuffix:K,rows:Y,size:G,slotProps:Z={},slots:ge={},startAdornment:he,type:me="text",value:oe,...ye}=r,de=_.value!=null?_.value:oe,{current:X}=P.useRef(de!=null),Q=P.useRef(),ae=P.useCallback(ut=>{process.env.NODE_ENV!=="production"&&ut&&ut.nodeName!=="INPUT"&&!ut.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
113
+ `))},[]),ve=Nt(Q,C,_.ref,ae),[ne,ce]=P.useState(!1),fe=To();process.env.NODE_ENV!=="production"&&P.useEffect(()=>{if(fe)return fe.registerEffect()},[fe]);const xe=Ga({props:r,muiFormControl:fe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});xe.focused=fe?fe.focused:ne,P.useEffect(()=>{!fe&&g&&ne&&(ce(!1),O&&O())},[fe,g,ne,O]);const Te=fe&&fe.onFilled,_e=fe&&fe.onEmpty,Ne=P.useCallback(ut=>{of(ut)?Te&&Te():_e&&_e()},[Te,_e]);Fn(()=>{X&&Ne({value:de})},[de,Ne,X]);const He=ut=>{V&&V(ut),_.onFocus&&_.onFocus(ut),fe&&fe.onFocus?fe.onFocus(ut):ce(!0)},W=ut=>{O&&O(ut),_.onBlur&&_.onBlur(ut),fe&&fe.onBlur?fe.onBlur(ut):ce(!1)},te=(ut,...Pn)=>{if(!X){const $t=ut.target||Q.current;if($t==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Ro(1));Ne({value:$t.value})}_.onChange&&_.onChange(ut,...Pn),D&&D(ut,...Pn)};P.useEffect(()=>{Ne(Q.current)},[]);const re=ut=>{Q.current&&ut.currentTarget===ut.target&&Q.current.focus(),F&&F(ut)};let Me=T,Ie=_;I&&Me==="input"&&(Y?(process.env.NODE_ENV!=="production"&&(A||M)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),Ie={type:void 0,minRows:Y,maxRows:Y,...Ie}):Ie={type:void 0,maxRows:M,minRows:A,...Ie},Me=cT);const De=ut=>{Ne(ut.animationName==="mui-auto-fill-cancel"?Q.current:{value:"x"})};P.useEffect(()=>{fe&&fe.setAdornedStart(!!he)},[fe,he]);const je={...r,color:xe.color||"primary",disabled:xe.disabled,endAdornment:b,error:xe.error,focused:xe.focused,formControl:fe,fullWidth:x,hiddenLabel:xe.hiddenLabel,multiline:I,size:xe.size,startAdornment:he,type:me},ot=j4(je),nt=ge.root||u.Root||lf,At=Z.root||f.root||{},_n=ge.input||u.Input||cf;return Ie={...Ie,...Z.input??f.input},v.jsxs(P.Fragment,{children:[!m&&typeof fT=="function"&&(dT||(dT=v.jsx(fT,{}))),v.jsxs(nt,{...At,ref:n,onClick:re,...ye,...!wc(nt)&&{ownerState:{...je,...At.ownerState}},className:ze(ot.root,At.className,a,U&&"MuiInputBase-readOnly"),children:[he,v.jsx(Cc.Provider,{value:null,children:v.jsx(_n,{"aria-invalid":xe.error,"aria-describedby":o,autoComplete:i,autoFocus:s,defaultValue:p,disabled:xe.disabled,id:w,onAnimationStart:De,name:L,placeholder:B,readOnly:U,required:xe.required,rows:Y,value:de,onKeyDown:z,onKeyUp:R,type:me,...Ie,...!wc(_n)&&{as:Me,ownerState:{...je,...Ie.ownerState}},ref:ve,className:ze(ot.input,Ie.className,U&&"MuiInputBase-readOnly"),onBlur:W,onChange:te,onFocus:He})}),b,K?K({...xe,startAdornment:he}):null]})]})});process.env.NODE_ENV!=="production"&&(uf.propTypes={"aria-describedby":c.string,autoComplete:c.string,autoFocus:c.bool,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","error","info","success","warning"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),componentsProps:c.shape({input:c.object,root:c.object}),defaultValue:c.any,disabled:c.bool,disableInjectingGlobalStyles:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,id:c.string,inputComponent:Td,inputProps:c.object,inputRef:En,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onBlur:c.func,onChange:c.func,onClick:c.func,onFocus:c.func,onInvalid:c.func,onKeyDown:c.func,onKeyUp:c.func,placeholder:c.string,readOnly:c.bool,renderSuffix:c.func,required:c.bool,rows:c.oneOfType([c.number,c.string]),size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),slotProps:c.shape({input:c.object,root:c.object}),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any});function W4(t){return typeof t.main=="string"}function q4(t,e=[]){if(!W4(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function Qn(t=[]){return([,e])=>e&&q4(e,t)}function U4(t){return Qe("MuiInput",t)}const _c={...Ya,...tt("MuiInput",["root","underline","input"])},K4=t=>{const{classes:e,disableUnderline:n}=t,o=Ze({root:["root",!n&&"underline"],input:["input"]},U4,e);return{...e,...o}},G4=Se(lf,{shouldForwardProp:t=>Co(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...sf(t,e),!n.disableUnderline&&e.underline]}})(Vt(({theme:t})=>{let n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${_c.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${_c.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${_c.disabled}, .${_c.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${_c.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Qn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}}))]}})),Y4=Se(cf,{name:"MuiInput",slot:"Input",overridesResolver:af})({}),df=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:s,fullWidth:a=!1,inputComponent:l="input",multiline:u=!1,slotProps:f,slots:p={},type:g="text",...m}=r,b=K4(r),x={root:{ownerState:{disableUnderline:o}}},w=f??s?$n(f??s,x):x,T=p.root??i.Root??G4,_=p.input??i.Input??Y4;return v.jsx(uf,{slots:{root:T,input:_},slotProps:w,fullWidth:a,inputComponent:l,multiline:u,ref:n,type:g,...m,classes:b})});process.env.NODE_ENV!=="production"&&(df.propTypes={autoComplete:c.string,autoFocus:c.bool,classes:c.object,color:c.oneOfType([c.oneOf(["primary","secondary"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),componentsProps:c.shape({input:c.object,root:c.object}),defaultValue:c.any,disabled:c.bool,disableUnderline:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,id:c.string,inputComponent:c.elementType,inputProps:c.object,inputRef:En,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onChange:c.func,placeholder:c.string,readOnly:c.bool,required:c.bool,rows:c.oneOfType([c.number,c.string]),slotProps:c.shape({input:c.object,root:c.object}),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any}),df.muiName="Input";function J4(t){return Qe("MuiFilledInput",t)}const Vs={...Ya,...tt("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},X4=t=>{const{classes:e,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:s,multiline:a}=t,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${$e(i)}`,s&&"hiddenLabel",a&&"multiline"],input:["input"]},u=Ze(l,J4,e);return{...e,...u}},Z4=Se(lf,{shouldForwardProp:t=>Co(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...sf(t,e),!n.disableUnderline&&e.underline]}})(Vt(({theme:t})=>{const e=t.palette.mode==="light",n=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=e?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=e?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=e?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r}},[`&.${Vs.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r},[`&.${Vs.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:s})=>!s.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Vs.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Vs.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Vs.disabled}, .${Vs.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Vs.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Qn()).map(([s])=>{var a;return{props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(a=(t.vars||t).palette[s])==null?void 0:a.main}`}}}}),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:a})=>s.multiline&&a==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),Q4=Se(cf,{name:"MuiFilledInput",slot:"Input",overridesResolver:af})(Vt(({theme:t})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{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}}]}))),ff=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:s,fullWidth:a=!1,hiddenLabel:l,inputComponent:u="input",multiline:f=!1,slotProps:p,slots:g={},type:m="text",...b}=r,y={...r,disableUnderline:o,fullWidth:a,inputComponent:u,multiline:f,type:m},x=X4(r),w={root:{ownerState:y},input:{ownerState:y}},T=p??s?$n(w,p??s):w,_=g.root??i.Root??Z4,C=g.input??i.Input??Q4;return v.jsx(uf,{slots:{root:_,input:C},slotProps:T,fullWidth:a,inputComponent:u,multiline:f,ref:n,type:m,...b,classes:x})});process.env.NODE_ENV!=="production"&&(ff.propTypes={autoComplete:c.string,autoFocus:c.bool,classes:c.object,color:c.oneOfType([c.oneOf(["primary","secondary"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),componentsProps:c.shape({input:c.object,root:c.object}),defaultValue:c.any,disabled:c.bool,disableUnderline:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,hiddenLabel:c.bool,id:c.string,inputComponent:c.elementType,inputProps:c.object,inputRef:En,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onChange:c.func,placeholder:c.string,readOnly:c.bool,required:c.bool,rows:c.oneOfType([c.number,c.string]),slotProps:c.shape({input:c.object,root:c.object}),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any}),ff.muiName="Input";var pT;const eH=Se("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Co})({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%"}),tH=Se("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Co})(Vt(({theme:t})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.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%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]})));function hT(t){const{children:e,classes:n,className:r,label:o,notched:i,...s}=t,a=o!=null&&o!=="",l={...t,notched:i,withLabel:a};return v.jsx(eH,{"aria-hidden":!0,className:r,ownerState:l,...s,children:v.jsx(tH,{ownerState:l,children:a?v.jsx("span",{children:o}):pT||(pT=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}process.env.NODE_ENV!=="production"&&(hT.propTypes={children:c.node,classes:c.object,className:c.string,label:c.node,notched:c.bool.isRequired,style:c.object});function nH(t){return Qe("MuiOutlinedInput",t)}const zo={...Ya,...tt("MuiOutlinedInput",["root","notchedOutline","input"])};function Wt(t,e){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:s,shouldForwardComponentProp:a=!1,...l}=e,{component:u,slots:f={[t]:void 0},slotProps:p={[t]:void 0},...g}=i,m=f[t]||r,b=kd(p[t],o),{props:{component:y,...x},internalRef:w}=PC({className:n,...l,externalForwardedProps:t==="root"?g:void 0,externalSlotProps:b}),T=Nt(w,b==null?void 0:b.ref,e.ref),_=t==="root"?y||u:y,C=MC(m,{...t==="root"&&!u&&!f[t]&&s,...t!=="root"&&!f[t]&&s,...x,..._&&!a&&{as:_},..._&&a&&{component:_},ref:T},o);return[m,C]}const rH=t=>{const{classes:e}=t,r=Ze({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},nH,e);return{...e,...r}},oH=Se(lf,{shouldForwardProp:t=>Co(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:sf})(Vt(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${zo.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${zo.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}},[`&.${zo.focused} .${zo.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(t.palette).filter(Qn()).map(([n])=>({props:{color:n},style:{[`&.${zo.focused} .${zo.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}})),{props:{},style:{[`&.${zo.error} .${zo.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${zo.disabled} .${zo.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),iH=Se(hT,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(Vt(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}})),sH=Se(cf,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:af})(Vt(({theme:t})=>({padding:"16.5px 14px",...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{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}}]}))),pf=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiOutlinedInput"}),{components:o={},fullWidth:i=!1,inputComponent:s="input",label:a,multiline:l=!1,notched:u,slots:f={},slotProps:p={},type:g="text",...m}=r,b=rH(r),y=To(),x=Ga({props:r,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...r,color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:y,fullWidth:i,hiddenLabel:x.hiddenLabel,multiline:l,size:x.size,type:g},T=f.root??o.Root??oH,_=f.input??o.Input??sH,[C,E]=Wt("notchedOutline",{elementType:iH,className:b.notchedOutline,shouldForwardComponentProp:!0,ownerState:w,externalForwardedProps:{slots:f,slotProps:p},additionalProps:{label:a!=null&&a!==""&&x.required?v.jsxs(P.Fragment,{children:[a," ","*"]}):a}});return v.jsx(uf,{slots:{root:T,input:_},slotProps:p,renderSuffix:M=>v.jsx(C,{...E,notched:typeof u<"u"?u:!!(M.startAdornment||M.filled||M.focused)}),fullWidth:i,inputComponent:s,multiline:l,ref:n,type:g,...m,classes:{...b,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(pf.propTypes={autoComplete:c.string,autoFocus:c.bool,classes:c.object,color:c.oneOfType([c.oneOf(["primary","secondary"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),defaultValue:c.any,disabled:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,id:c.string,inputComponent:c.elementType,inputProps:c.object,inputRef:En,label:c.node,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,notched:c.bool,onChange:c.func,placeholder:c.string,readOnly:c.bool,required:c.bool,rows:c.oneOfType([c.number,c.string]),slotProps:c.shape({input:c.object,notchedOutline:c.oneOfType([c.func,c.object]),root:c.object}),slots:c.shape({input:c.elementType,notchedOutline:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any}),pf.muiName="Input";function aH(t){return Qe("MuiFormLabel",t)}const Tc=tt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),lH=t=>{const{classes:e,color:n,focused:r,disabled:o,error:i,filled:s,required:a}=t,l={root:["root",`color${$e(n)}`,o&&"disabled",i&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",i&&"error"]};return Ze(l,aH,e)},cH=Se("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color==="secondary"&&e.colorSecondary,n.filled&&e.filled]}})(Vt(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(t.palette).filter(Qn()).map(([e])=>({props:{color:e},style:{[`&.${Tc.focused}`]:{color:(t.vars||t).palette[e].main}}})),{props:{},style:{[`&.${Tc.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Tc.error}`]:{color:(t.vars||t).palette.error.main}}}]}))),uH=Se("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(Vt(({theme:t})=>({[`&.${Tc.error}`]:{color:(t.vars||t).palette.error.main}}))),gT=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiFormLabel"}),{children:o,className:i,color:s,component:a="label",disabled:l,error:u,filled:f,focused:p,required:g,...m}=r,b=To(),y=Ga({props:r,muiFormControl:b,states:["color","required","focused","disabled","error","filled"]}),x={...r,color:y.color||"primary",component:a,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required},w=lH(x);return v.jsxs(cH,{as:a,ownerState:x,className:ze(w.root,i),ref:n,...m,children:[o,y.required&&v.jsxs(uH,{ownerState:x,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})});process.env.NODE_ENV!=="production"&&(gT.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["error","info","primary","secondary","success","warning"]),c.string]),component:c.elementType,disabled:c.bool,error:c.bool,filled:c.bool,focused:c.bool,required:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function dH(t){return Qe("MuiInputLabel",t)}tt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const fH=t=>{const{classes:e,formControl:n,size:r,shrink:o,disableAnimation:i,variant:s,required:a}=t,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${$e(r)}`,s],asterisk:[a&&"asterisk"]},u=Ze(l,dH,e);return{...e,...u}},pH=Se(gT,{shouldForwardProp:t=>Co(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Tc.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(Vt(({theme:t})=>({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:{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.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:n})=>e==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:n,size:r})=>e==="filled"&&n.shrink&&r==="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:n})=>e==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Rm=P.forwardRef(function(e,n){const r=Et({name:"MuiInputLabel",props:e}),{disableAnimation:o=!1,margin:i,shrink:s,variant:a,className:l,...u}=r,f=To();let p=s;typeof p>"u"&&f&&(p=f.filled||f.focused||f.adornedStart);const g=Ga({props:r,muiFormControl:f,states:["size","variant","required","focused"]}),m={...r,disableAnimation:o,formControl:f,shrink:p,size:g.size,variant:g.variant,required:g.required,focused:g.focused},b=fH(m);return v.jsx(pH,{"data-shrink":p,ref:n,className:ze(b.root,l),...u,ownerState:m,classes:b})});process.env.NODE_ENV!=="production"&&(Rm.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["error","info","primary","secondary","success","warning"]),c.string]),disableAnimation:c.bool,disabled:c.bool,error:c.bool,focused:c.bool,margin:c.oneOf(["dense"]),required:c.bool,shrink:c.bool,size:c.oneOfType([c.oneOf(["normal","small"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOf(["filled","outlined","standard"])});function hH(t){return Qe("MuiFormControl",t)}tt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const gH=t=>{const{classes:e,margin:n,fullWidth:r}=t,o={root:["root",n!=="none"&&`margin${$e(n)}`,r&&"fullWidth"]};return Ze(o,hH,e)},mH=Se("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`margin${$e(n.margin)}`],n.fullWidth&&e.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%"}}]}),Bm=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiFormControl"}),{children:o,className:i,color:s="primary",component:a="div",disabled:l=!1,error:u=!1,focused:f,fullWidth:p=!1,hiddenLabel:g=!1,margin:m="none",required:b=!1,size:y="medium",variant:x="outlined",...w}=r,T={...r,color:s,component:a,disabled:l,error:u,fullWidth:p,hiddenLabel:g,margin:m,required:b,size:y,variant:x},_=gH(T),[C,E]=P.useState(()=>{let B=!1;return o&&P.Children.forEach(o,U=>{if(!Ra(U,["Input","Select"]))return;const K=Ra(U,["Select"])?U.props.input:U;K&&z4(K.props)&&(B=!0)}),B}),[M,A]=P.useState(()=>{let B=!1;return o&&P.Children.forEach(o,U=>{Ra(U,["Input","Select"])&&(of(U.props,!0)||of(U.props.inputProps,!0))&&(B=!0)}),B}),[I,L]=P.useState(!1);l&&I&&L(!1);const O=f!==void 0&&!l?f:I;let D;const F=P.useRef(!1);process.env.NODE_ENV!=="production"&&(D=()=>(F.current&&console.error(["MUI: There are multiple `InputBase` components inside a FormControl.","This creates visual inconsistencies, only use one `InputBase`."].join(`
114
+ `)),F.current=!0,()=>{F.current=!1}));const V=P.useCallback(()=>{A(!0)},[]),z=P.useCallback(()=>{A(!1)},[]),R=P.useMemo(()=>({adornedStart:C,setAdornedStart:E,color:s,disabled:l,error:u,filled:M,focused:O,fullWidth:p,hiddenLabel:g,size:y,onBlur:()=>{L(!1)},onFocus:()=>{L(!0)},onEmpty:z,onFilled:V,registerEffect:D,required:b,variant:x}),[C,s,l,u,M,O,p,g,D,z,V,b,y,x]);return v.jsx(Cc.Provider,{value:R,children:v.jsx(mH,{as:a,ownerState:T,className:ze(_.root,i),ref:n,...w,children:o})})});process.env.NODE_ENV!=="production"&&(Bm.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,disabled:c.bool,error:c.bool,focused:c.bool,fullWidth:c.bool,hiddenLabel:c.bool,margin:c.oneOf(["dense","none","normal"]),required:c.bool,size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOf(["filled","outlined","standard"])});function yH(t){return Qe("MuiFormHelperText",t)}const mT=tt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var yT;const bH=t=>{const{classes:e,contained:n,size:r,disabled:o,error:i,filled:s,focused:a,required:l}=t,u={root:["root",o&&"disabled",i&&"error",r&&`size${$e(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Ze(u,yH,e)},vH=Se("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${$e(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(Vt(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${mT.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${mT.error}`]:{color:(t.vars||t).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),Vm=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiFormHelperText"}),{children:o,className:i,component:s="p",disabled:a,error:l,filled:u,focused:f,margin:p,required:g,variant:m,...b}=r,y=To(),x=Ga({props:r,muiFormControl:y,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:s,contained:x.variant==="filled"||x.variant==="outlined",variant:x.variant,size:x.size,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required};delete w.ownerState;const T=bH(w);return v.jsx(vH,{as:s,className:ze(T.root,i),ref:n,...b,ownerState:w,children:o===" "?yT||(yT=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})});process.env.NODE_ENV!=="production"&&(Vm.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,disabled:c.bool,error:c.bool,filled:c.bool,focused:c.bool,margin:c.oneOf(["dense"]),required:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["filled","outlined","standard"]),c.string])});const Ja=P.createContext({});process.env.NODE_ENV!=="production"&&(Ja.displayName="ListContext");function xH(t){return Qe("MuiList",t)}tt("MuiList",["root","padding","dense","subheader"]);const SH=t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t;return Ze({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},xH,e)},wH=Se("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>t.subheader,style:{paddingTop:0}}]}),zm=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:u,...f}=r,p=P.useMemo(()=>({dense:a}),[a]),g={...r,component:s,dense:a,disablePadding:l},m=SH(g);return v.jsx(Ja.Provider,{value:p,children:v.jsxs(wH,{as:s,className:ze(m.root,i),ref:n,ownerState:g,...f,children:[u,o]})})});process.env.NODE_ENV!=="production"&&(zm.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,dense:c.bool,disablePadding:c.bool,subheader:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function Hm(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function bT(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function vT(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.startsWith(e.keys.join(""))}function kc(t,e,n,r,o,i){let s=!1,a=o(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!vT(a,i)||l)a=o(t,a,n);else return a.focus(),!0}return!1}const xT=P.forwardRef(function(e,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:f,variant:p="selectedMenu",...g}=e,m=P.useRef(null),b=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Fn(()=>{o&&m.current.focus()},[o]),P.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(_,{direction:C})=>{const E=!m.current.style.width;if(_.clientHeight<m.current.clientHeight&&E){const M=`${_C(ci(_))}px`;m.current.style[C==="rtl"?"paddingLeft":"paddingRight"]=M,m.current.style.width=`calc(100% + ${M})`}return m.current}}),[]);const y=_=>{const C=m.current,E=_.key;if(_.ctrlKey||_.metaKey||_.altKey){f&&f(_);return}const A=Zn(C).activeElement;if(E==="ArrowDown")_.preventDefault(),kc(C,A,u,l,Hm);else if(E==="ArrowUp")_.preventDefault(),kc(C,A,u,l,bT);else if(E==="Home")_.preventDefault(),kc(C,null,u,l,Hm);else if(E==="End")_.preventDefault(),kc(C,null,u,l,bT);else if(E.length===1){const I=b.current,L=E.toLowerCase(),O=performance.now();I.keys.length>0&&(O-I.lastTime>500?(I.keys=[],I.repeating=!0,I.previousKeyMatched=!0):I.repeating&&L!==I.keys[0]&&(I.repeating=!1)),I.lastTime=O,I.keys.push(L);const D=A&&!I.repeating&&vT(A,I);I.previousKeyMatched&&(D||kc(C,A,!1,l,Hm,I))?_.preventDefault():I.previousKeyMatched=!1}f&&f(_)},x=Nt(m,n);let w=-1;P.Children.forEach(s,(_,C)=>{if(!P.isValidElement(_)){w===C&&(w+=1,w>=s.length&&(w=-1));return}process.env.NODE_ENV!=="production"&&ai.isFragment(_)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
115
+ `)),_.props.disabled||(p==="selectedMenu"&&_.props.selected||w===-1)&&(w=C),w===C&&(_.props.disabled||_.props.muiSkipListHighlight||_.type.muiSkipListHighlight)&&(w+=1,w>=s.length&&(w=-1))});const T=P.Children.map(s,(_,C)=>{if(C===w){const E={};return i&&(E.autoFocus=!0),_.props.tabIndex===void 0&&p==="selectedMenu"&&(E.tabIndex=0),P.cloneElement(_,E)}return _});return v.jsx(zm,{role:"menu",ref:x,className:a,onKeyDown:y,tabIndex:o?0:-1,...g,children:T})});process.env.NODE_ENV!=="production"&&(xT.propTypes={autoFocus:c.bool,autoFocusItem:c.bool,children:c.node,className:c.string,disabledItemsFocusable:c.bool,disableListWrap:c.bool,onKeyDown:c.func,variant:c.oneOf(["menu","selectedMenu"])});function jm(t,e){return jm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},jm(t,e)}function Wm(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,jm(t,e)}function CH(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function _H(t,e){t.classList?t.classList.add(e):CH(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function ST(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function TH(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=ST(t.className,e):t.setAttribute("class",ST(t.className&&t.className.baseVal||"",e))}const wT={disabled:!1};var kH=process.env.NODE_ENV!=="production"?c.oneOfType([c.number,c.shape({enter:c.number,exit:c.number,appear:c.number}).isRequired]):null,EH=process.env.NODE_ENV!=="production"?c.oneOfType([c.string,c.shape({enter:c.string,exit:c.string,active:c.string}),c.shape({enter:c.string,enterDone:c.string,enterActive:c.string,exit:c.string,exitDone:c.string,exitActive:c.string})]):null;const hf=q.createContext(null);var CT=function(e){return e.scrollTop},Ec="unmounted",zs="exited",Hs="entering",Xa="entered",qm="exiting",Jr=function(t){Wm(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=o,a=s&&!s.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?a?(l=zs,i.appearStatus=Hs):l=Xa:r.unmountOnExit||r.mountOnEnter?l=Ec:l=zs,i.state={status:l},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===Ec?{status:zs}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==Hs&&s!==Xa&&(i=Hs):(s===Hs||s===Xa)&&(i=qm)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:a}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Hs){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Ls.findDOMNode(this);s&&CT(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===zs&&this.setState({status:Ec})},n.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[Ls.findDOMNode(this),a],u=l[0],f=l[1],p=this.getTimeouts(),g=a?p.appear:p.enter;if(!o&&!s||wT.disabled){this.safeSetState({status:Xa},function(){i.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:Hs},function(){i.props.onEntering(u,f),i.onTransitionEnd(g,function(){i.safeSetState({status:Xa},function(){i.props.onEntered(u,f)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Ls.findDOMNode(this);if(!i||wT.disabled){this.safeSetState({status:zs},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:qm},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:zs},function(){o.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:Ls.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=l[0],f=l[1];this.props.addEndListener(u,f)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Ec)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=dt(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return q.createElement(hf.Provider,{value:null},typeof s=="function"?s(o,a):q.cloneElement(q.Children.only(s),a))},e}(q.Component);Jr.contextType=hf,Jr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:c.shape({current:typeof Element>"u"?c.any:function(t,e,n,r,o,i){var s=t[e];return c.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(t,e,n,r,o,i)}}),children:c.oneOfType([c.func.isRequired,c.element.isRequired]).isRequired,in:c.bool,mountOnEnter:c.bool,unmountOnExit:c.bool,appear:c.bool,enter:c.bool,exit:c.bool,timeout:function(e){var n=kH;e.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.apply(void 0,[e].concat(o))},addEndListener:c.func,onEnter:c.func,onEntering:c.func,onEntered:c.func,onExit:c.func,onExiting:c.func,onExited:c.func}:{};function Za(){}Jr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Za,onEntering:Za,onEntered:Za,onExit:Za,onExiting:Za,onExited:Za},Jr.UNMOUNTED=Ec,Jr.EXITED=zs,Jr.ENTERING=Hs,Jr.ENTERED=Xa,Jr.EXITING=qm;var OH=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return _H(e,r)})},Um=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return TH(e,r)})},Km=function(t){Wm(e,t);function e(){for(var r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var u=r.resolveArguments(a,l),f=u[0],p=u[1];r.removeClasses(f,"exit"),r.addClass(f,p?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var u=r.resolveArguments(a,l),f=u[0],p=u[1],g=p?"appear":"enter";r.addClass(f,g,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),f=u[0],p=u[1],g=p?"appear":"enter";r.removeClasses(f,g),r.addClass(f,g,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a),u=l[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a),u=l[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a),u=l[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,u=typeof l=="string",f=u&&l?l+"-":"",p=u?""+f+a:l[a],g=u?p+"-active":l[a+"Active"],m=u?p+"-done":l[a+"Done"];return{baseClassName:p,activeClassName:g,doneClassName:m}},r}var n=e.prototype;return n.addClass=function(o,i,s){var a=this.getClassNames(i)[s+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;i==="appear"&&s==="done"&&u&&(a+=" "+u),s==="active"&&o&&CT(o),a&&(this.appliedClasses[i][s]=a,OH(o,a))},n.removeClasses=function(o,i){var s=this.appliedClasses[i],a=s.base,l=s.active,u=s.done;this.appliedClasses[i]={},a&&Um(o,a),l&&Um(o,l),u&&Um(o,u)},n.render=function(){var o=this.props;o.classNames;var i=dt(o,["classNames"]);return q.createElement(Jr,ie({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(q.Component);Km.defaultProps={classNames:""},Km.propTypes=process.env.NODE_ENV!=="production"?ie({},Jr.propTypes,{classNames:EH,onEnter:c.func,onEntering:c.func,onEntered:c.func,onExit:c.func,onExiting:c.func,onExited:c.func}):{};function MH(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gm(t,e){var n=function(i){return e&&q.isValidElement(i)?e(i):i},r=Object.create(null);return t&&q.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function AH(t,e){t=t||{},e=e||{};function n(f){return f in e?e[f]:t[f]}var r=Object.create(null),o=[];for(var i in t)i in e?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var l in e){if(r[l])for(s=0;s<r[l].length;s++){var u=r[l][s];a[r[l][s]]=n(u)}a[l]=n(l)}for(s=0;s<o.length;s++)a[o[s]]=n(o[s]);return a}function js(t,e,n){return n[e]!=null?n[e]:t.props[e]}function IH(t,e){return Gm(t.children,function(n){return q.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:js(n,"appear",t),enter:js(n,"enter",t),exit:js(n,"exit",t)})})}function DH(t,e,n){var r=Gm(t.children),o=AH(e,r);return Object.keys(o).forEach(function(i){var s=o[i];if(q.isValidElement(s)){var a=i in e,l=i in r,u=e[i],f=q.isValidElement(u)&&!u.props.in;l&&(!a||f)?o[i]=q.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:js(s,"exit",t),enter:js(s,"enter",t)}):!l&&a&&!f?o[i]=q.cloneElement(s,{in:!1}):l&&a&&q.isValidElement(u)&&(o[i]=q.cloneElement(s,{onExited:n.bind(null,s),in:u.props.in,exit:js(s,"exit",t),enter:js(s,"enter",t)}))}}),o}var PH=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},NH={component:"div",childFactory:function(e){return e}},Oc=function(t){Wm(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=i.handleExited.bind(MH(i));return i.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},i}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(o,i){var s=i.children,a=i.handleExited,l=i.firstRender;return{children:l?IH(o,a):DH(o,s,a),firstRender:!1}},n.handleExited=function(o,i){var s=Gm(this.props.children);o.key in s||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(a){var l=ie({},a.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,i=o.component,s=o.childFactory,a=dt(o,["component","childFactory"]),l=this.state.contextValue,u=PH(this.state.children).map(s);return delete a.appear,delete a.enter,delete a.exit,i===null?q.createElement(hf.Provider,{value:l},u):q.createElement(hf.Provider,{value:l},q.createElement(i,a,u))},e}(q.Component);Oc.propTypes=process.env.NODE_ENV!=="production"?{component:c.any,children:c.node,appear:c.bool,enter:c.bool,exit:c.bool,childFactory:c.func}:{},Oc.defaultProps=NH;const _T=t=>t.scrollTop;function gf(t,e){const{timeout:n,easing:r,style:o={}}=t;return{duration:o.transitionDuration??(typeof n=="number"?n:n[e.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[e.mode]:r),delay:o.transitionDelay}}function Ym(t){return`scale(${t}, ${t**2})`}const LH={entering:{opacity:1,transform:Ym(1)},entered:{opacity:1,transform:"none"}},Jm=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Mc=P.forwardRef(function(e,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:a,onEnter:l,onEntered:u,onEntering:f,onExit:p,onExited:g,onExiting:m,style:b,timeout:y="auto",TransitionComponent:x=Jr,...w}=e,T=wC(),_=P.useRef(),C=fi(),E=P.useRef(null),M=Nt(E,sc(i),n),A=R=>B=>{if(R){const U=E.current;B===void 0?R(U):R(U,B)}},I=A(f),L=A((R,B)=>{_T(R);const{duration:U,delay:K,easing:Y}=gf({style:b,timeout:y,easing:s},{mode:"enter"});let G;y==="auto"?(G=C.transitions.getAutoHeightDuration(R.clientHeight),_.current=G):G=U,R.style.transition=[C.transitions.create("opacity",{duration:G,delay:K}),C.transitions.create("transform",{duration:Jm?G:G*.666,delay:K,easing:Y})].join(","),l&&l(R,B)}),O=A(u),D=A(m),F=A(R=>{const{duration:B,delay:U,easing:K}=gf({style:b,timeout:y,easing:s},{mode:"exit"});let Y;y==="auto"?(Y=C.transitions.getAutoHeightDuration(R.clientHeight),_.current=Y):Y=B,R.style.transition=[C.transitions.create("opacity",{duration:Y,delay:U}),C.transitions.create("transform",{duration:Jm?Y:Y*.666,delay:Jm?U:U||Y*.333,easing:K})].join(","),R.style.opacity=0,R.style.transform=Ym(.75),p&&p(R)}),V=A(g),z=R=>{y==="auto"&&T.start(_.current||0,R),r&&r(E.current,R)};return v.jsx(x,{appear:o,in:a,nodeRef:E,onEnter:L,onEntered:O,onEntering:I,onExit:F,onExited:V,onExiting:D,addEndListener:z,timeout:y==="auto"?null:y,...w,children:(R,{ownerState:B,...U})=>P.cloneElement(i,{style:{opacity:0,transform:Ym(.75),visibility:R==="exited"&&!a?"hidden":void 0,...LH[R],...b,...i.props.style},ref:M,...U})})});process.env.NODE_ENV!=="production"&&(Mc.propTypes={addEndListener:c.func,appear:c.bool,children:oc.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])}),Mc&&(Mc.muiSupportAuto=!0);function $H(t){const e=Zn(t);return e.body===t?ci(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Ac(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function TT(t){return parseInt(ci(t).getComputedStyle(t).paddingRight,10)||0}function FH(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(t.tagName),r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function kT(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,s=>{const a=!i.includes(s),l=!FH(s);a&&l&&Ac(s,o)})}function Xm(t,e){let n=-1;return t.some((r,o)=>e(r)?(n=o,!0):!1),n}function RH(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if($H(r)){const s=_C(ci(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${TT(r)+s}px`;const a=Zn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${TT(l)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Zn(r).body;else{const s=r.parentElement,a=ci(r);i=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:s,property:a})=>{i?s.style.setProperty(a,i):s.style.removeProperty(a)})}}function BH(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class VH{constructor(){this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Ac(e.modalRef,!1);const o=BH(n);kT(n,e.mount,e.modalRef,o,!0);const i=Xm(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:o}),r)}mount(e,n){const r=Xm(this.containers,i=>i.modals.includes(e)),o=this.containers[r];o.restore||(o.restore=RH(o,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const o=Xm(this.containers,s=>s.modals.includes(e)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Ac(e.modalRef,n),kT(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&Ac(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const zH=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function HH(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function jH(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function WH(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||jH(t))}function qH(t){const e=[],n=[];return Array.from(t.querySelectorAll(zH)).forEach((r,o)=>{const i=HH(r);i===-1||!WH(r)||(i===0?e.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(e)}function UH(){return!0}function Ic(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=qH,isEnabled:s=UH,open:a}=t,l=P.useRef(!1),u=P.useRef(null),f=P.useRef(null),p=P.useRef(null),g=P.useRef(null),m=P.useRef(!1),b=P.useRef(null),y=Nt(sc(e),b),x=P.useRef(null);P.useEffect(()=>{!a||!b.current||(m.current=!n)},[n,a]),P.useEffect(()=>{if(!a||!b.current)return;const _=Zn(b.current);return b.current.contains(_.activeElement)||(b.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
116
+ `)),b.current.setAttribute("tabIndex","-1")),m.current&&b.current.focus()),()=>{o||(p.current&&p.current.focus&&(l.current=!0,p.current.focus()),p.current=null)}},[a]),P.useEffect(()=>{if(!a||!b.current)return;const _=Zn(b.current),C=A=>{x.current=A,!(r||!s()||A.key!=="Tab")&&_.activeElement===b.current&&A.shiftKey&&(l.current=!0,f.current&&f.current.focus())},E=()=>{var L,O;const A=b.current;if(A===null)return;if(!_.hasFocus()||!s()||l.current){l.current=!1;return}if(A.contains(_.activeElement)||r&&_.activeElement!==u.current&&_.activeElement!==f.current)return;if(_.activeElement!==g.current)g.current=null;else if(g.current!==null)return;if(!m.current)return;let I=[];if((_.activeElement===u.current||_.activeElement===f.current)&&(I=i(b.current)),I.length>0){const D=!!((L=x.current)!=null&&L.shiftKey&&((O=x.current)==null?void 0:O.key)==="Tab"),F=I[0],V=I[I.length-1];typeof F!="string"&&typeof V!="string"&&(D?V.focus():F.focus())}else A.focus()};_.addEventListener("focusin",E),_.addEventListener("keydown",C,!0);const M=setInterval(()=>{_.activeElement&&_.activeElement.tagName==="BODY"&&E()},50);return()=>{clearInterval(M),_.removeEventListener("focusin",E),_.removeEventListener("keydown",C,!0)}},[n,r,o,s,a,i]);const w=_=>{p.current===null&&(p.current=_.relatedTarget),m.current=!0,g.current=_.target;const C=e.props.onFocus;C&&C(_)},T=_=>{p.current===null&&(p.current=_.relatedTarget),m.current=!0};return v.jsxs(P.Fragment,{children:[v.jsx("div",{tabIndex:a?0:-1,onFocus:T,ref:u,"data-testid":"sentinelStart"}),P.cloneElement(e,{ref:y,onFocus:w}),v.jsx("div",{tabIndex:a?0:-1,onFocus:T,ref:f,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Ic.propTypes={children:oc,disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableRestoreFocus:c.bool,getTabbable:c.func,isEnabled:c.func,open:c.bool.isRequired}),process.env.NODE_ENV!=="production"&&(Ic.propTypes=fC(Ic.propTypes));function KH(t){return typeof t=="function"?t():t}const Dc=P.forwardRef(function(e,n){const{children:r,container:o,disablePortal:i=!1}=e,[s,a]=P.useState(null),l=Nt(P.isValidElement(r)?sc(r):null,n);if(Fn(()=>{i||a(KH(o)||document.body)},[o,i]),Fn(()=>{if(s&&!i)return yC(n,s),()=>{yC(n,null)}},[n,s,i]),i){if(P.isValidElement(r)){const u={ref:l};return P.cloneElement(r,u)}return r}return s&&fB.createPortal(r,s)});process.env.NODE_ENV!=="production"&&(Dc.propTypes={children:c.node,container:c.oneOfType([li,c.func]),disablePortal:c.bool}),process.env.NODE_ENV!=="production"&&(Dc.propTypes=fC(Dc.propTypes));const GH={entering:{opacity:1},entered:{opacity:1}},Xi=P.forwardRef(function(e,n){const r=fi(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:a,easing:l,in:u,onEnter:f,onEntered:p,onEntering:g,onExit:m,onExited:b,onExiting:y,style:x,timeout:w=o,TransitionComponent:T=Jr,..._}=e,C=P.useRef(null),E=Nt(C,sc(a),n),M=z=>R=>{if(z){const B=C.current;R===void 0?z(B):z(B,R)}},A=M(g),I=M((z,R)=>{_T(z);const B=gf({style:x,timeout:w,easing:l},{mode:"enter"});z.style.webkitTransition=r.transitions.create("opacity",B),z.style.transition=r.transitions.create("opacity",B),f&&f(z,R)}),L=M(p),O=M(y),D=M(z=>{const R=gf({style:x,timeout:w,easing:l},{mode:"exit"});z.style.webkitTransition=r.transitions.create("opacity",R),z.style.transition=r.transitions.create("opacity",R),m&&m(z)}),F=M(b),V=z=>{i&&i(C.current,z)};return v.jsx(T,{appear:s,in:u,nodeRef:C,onEnter:I,onEntered:L,onEntering:A,onExit:D,onExited:F,onExiting:O,addEndListener:V,timeout:w,..._,children:(z,{ownerState:R,...B})=>P.cloneElement(a,{style:{opacity:0,visibility:z==="exited"&&!u?"hidden":void 0,...GH[z],...x,...a.props.style},ref:E,...B})})});process.env.NODE_ENV!=="production"&&(Xi.propTypes={addEndListener:c.func,appear:c.bool,children:oc.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});function YH(t){return Qe("MuiBackdrop",t)}tt("MuiBackdrop",["root","invisible"]);const JH=t=>{const{classes:e,invisible:n}=t;return Ze({root:["root",n&&"invisible"]},YH,e)},XH=Se("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.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"}}]}),Zm=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiBackdrop"}),{children:o,className:i,component:s="div",invisible:a=!1,open:l,components:u={},componentsProps:f={},slotProps:p={},slots:g={},TransitionComponent:m,transitionDuration:b,...y}=r,x={...r,component:s,invisible:a},w=JH(x),T={transition:m,root:u.Root,...g},_={...f,...p},C={slots:T,slotProps:_},[E,M]=Wt("root",{elementType:XH,externalForwardedProps:C,className:ze(w.root,i),ownerState:x}),[A,I]=Wt("transition",{elementType:Xi,externalForwardedProps:C,ownerState:x});return v.jsx(A,{in:l,timeout:b,...y,...I,children:v.jsx(E,{"aria-hidden":!0,...M,classes:w,ref:n,children:o})})});process.env.NODE_ENV!=="production"&&(Zm.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.object}),invisible:c.bool,open:c.bool.isRequired,slotProps:c.shape({root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});function ZH(t){return typeof t=="function"?t():t}function QH(t){return t?t.props.hasOwnProperty("in"):!1}const ET=()=>{},mf=new VH;function ej(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:s,children:a,onClose:l,open:u,rootRef:f}=t,p=P.useRef({}),g=P.useRef(null),m=P.useRef(null),b=Nt(m,f),[y,x]=P.useState(!u),w=QH(a);let T=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(T=!1);const _=()=>Zn(g.current),C=()=>(p.current.modalRef=m.current,p.current.mount=g.current,p.current),E=()=>{mf.mount(C(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},M=Ue(()=>{const R=ZH(e)||_().body;mf.add(C(),R),m.current&&E()}),A=()=>mf.isTopModal(C()),I=Ue(R=>{g.current=R,R&&(u&&A()?E():m.current&&Ac(m.current,T))}),L=P.useCallback(()=>{mf.remove(C(),T)},[T]);P.useEffect(()=>()=>{L()},[L]),P.useEffect(()=>{u?M():(!w||!o)&&L()},[u,L,w,o,M]);const O=R=>B=>{var U;(U=R.onKeyDown)==null||U.call(R,B),!(B.key!=="Escape"||B.which===229||!A())&&(n||(B.stopPropagation(),l&&l(B,"escapeKeyDown")))},D=R=>B=>{var U;(U=R.onClick)==null||U.call(R,B),B.target===B.currentTarget&&l&&l(B,"backdropClick")};return{getRootProps:(R={})=>{const B=IC(t);delete B.onTransitionEnter,delete B.onTransitionExited;const U={...B,...R};return{role:"presentation",...U,onKeyDown:O(U),ref:b}},getBackdropProps:(R={})=>{const B=R;return{"aria-hidden":!0,...B,onClick:D(B),open:u}},getTransitionProps:()=>{const R=()=>{x(!1),i&&i()},B=()=>{x(!0),s&&s(),o&&L()};return{onEnter:gC(R,(a==null?void 0:a.props.onEnter)??ET),onExited:gC(B,(a==null?void 0:a.props.onExited)??ET)}},rootRef:b,portalRef:I,isTopModal:A,exited:y,hasTransition:w}}function tj(t){return Qe("MuiModal",t)}tt("MuiModal",["root","hidden","backdrop"]);const nj=t=>{const{open:e,exited:n,classes:r}=t;return Ze({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},tj,r)},rj=Se("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(Vt(({theme:t})=>({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),oj=Se(Zm,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),Qm=P.forwardRef(function(e,n){const r=Et({name:"MuiModal",props:e}),{BackdropComponent:o=oj,BackdropProps:i,classes:s,className:a,closeAfterTransition:l=!1,children:u,container:f,component:p,components:g={},componentsProps:m={},disableAutoFocus:b=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:T=!1,disableScrollLock:_=!1,hideBackdrop:C=!1,keepMounted:E=!1,onBackdropClick:M,onClose:A,onTransitionEnter:I,onTransitionExited:L,open:O,slotProps:D={},slots:F={},theme:V,...z}=r,R={...r,closeAfterTransition:l,disableAutoFocus:b,disableEnforceFocus:y,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:T,disableScrollLock:_,hideBackdrop:C,keepMounted:E},{getRootProps:B,getBackdropProps:U,getTransitionProps:K,portalRef:Y,isTopModal:G,exited:Z,hasTransition:ge}=ej({...R,rootRef:n}),he={...R,exited:Z},me=nj(he),oe={};if(u.props.tabIndex===void 0&&(oe.tabIndex="-1"),ge){const{onEnter:ve,onExited:ne}=K();oe.onEnter=ve,oe.onExited=ne}const ye={slots:{root:g.Root,backdrop:g.Backdrop,...F},slotProps:{...m,...D}},[de,X]=Wt("root",{ref:n,elementType:rj,externalForwardedProps:{...ye,...z,component:p},getSlotProps:B,ownerState:he,className:ze(a,me==null?void 0:me.root,!he.open&&he.exited&&(me==null?void 0:me.hidden))}),[Q,ae]=Wt("backdrop",{ref:i==null?void 0:i.ref,elementType:o,externalForwardedProps:ye,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:ve=>U({...ve,onClick:ne=>{M&&M(ne),ve!=null&&ve.onClick&&ve.onClick(ne)}}),className:ze(i==null?void 0:i.className,me==null?void 0:me.backdrop),ownerState:he});return!E&&!O&&(!ge||Z)?null:v.jsx(Dc,{ref:Y,container:f,disablePortal:w,children:v.jsxs(de,{...X,children:[!C&&o?v.jsx(Q,{...ae}):null,v.jsx(Ic,{disableEnforceFocus:y,disableAutoFocus:b,disableRestoreFocus:T,isEnabled:G,open:O,children:P.cloneElement(u,oe)})]})})});process.env.NODE_ENV!=="production"&&(Qm.propTypes={BackdropComponent:c.elementType,BackdropProps:c.object,children:oc.isRequired,classes:c.object,className:c.string,closeAfterTransition:c.bool,component:c.elementType,components:c.shape({Backdrop:c.elementType,Root:c.elementType}),componentsProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),container:c.oneOfType([li,c.func]),disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableEscapeKeyDown:c.bool,disablePortal:c.bool,disableRestoreFocus:c.bool,disableScrollLock:c.bool,hideBackdrop:c.bool,keepMounted:c.bool,onBackdropClick:c.func,onClose:c.func,onTransitionEnter:c.func,onTransitionExited:c.func,open:c.bool.isRequired,slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function ij(t){return Qe("MuiPaper",t)}tt("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"]);const sj=t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Ze(i,ij,o)},aj=Se("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(Vt(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Ws=P.forwardRef(function(e,n){var m;const r=Et({props:e,name:"MuiPaper"}),o=fi(),{className:i,component:s="div",elevation:a=1,square:l=!1,variant:u="elevation",...f}=r,p={...r,component:s,elevation:a,square:l,variant:u},g=sj(p);return process.env.NODE_ENV!=="production"&&o.shadows[a]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${a}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${a}]\` is defined.`].join(`
117
+ `)),v.jsx(aj,{as:s,ownerState:p,className:ze(g.root,i),ref:n,...f,style:{...u==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[a],...o.vars&&{"--Paper-overlay":(m=o.vars.overlays)==null?void 0:m[a]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Kt("#fff",ym(a))}, ${Kt("#fff",ym(a))})`}},...f.style}})});process.env.NODE_ENV!=="production"&&(Ws.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,elevation:si(EC,t=>{const{elevation:e,variant:n}=t;return e>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${e}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:c.bool,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["elevation","outlined"]),c.string])});function lj(t){return Qe("MuiPopover",t)}tt("MuiPopover",["root","paper"]);function OT(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function MT(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function AT(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function Pc(t){return typeof t=="function"?t():t}const cj=t=>{const{classes:e}=t;return Ze({root:["root"],paper:["paper"]},lj,e)},uj=Se(Qm,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),IT=Se(Ws,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),DT=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:l="anchorEl",children:u,className:f,container:p,elevation:g=8,marginThreshold:m=16,open:b,PaperProps:y={},slots:x={},slotProps:w={},transformOrigin:T={vertical:"top",horizontal:"left"},TransitionComponent:_,transitionDuration:C="auto",TransitionProps:E={},disableScrollLock:M=!1,...A}=r,I=P.useRef(),L={...r,anchorOrigin:s,anchorReference:l,elevation:g,marginThreshold:m,transformOrigin:T,TransitionComponent:_,transitionDuration:C,TransitionProps:E},O=cj(L),D=P.useCallback(()=>{if(l==="anchorPosition")return process.env.NODE_ENV!=="production"&&(a||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),a;const ae=Pc(i),ve=ae&&ae.nodeType===1?ae:Zn(I.current).body,ne=ve.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const ce=ve.getBoundingClientRect();process.env.NODE_ENV!=="test"&&ce.top===0&&ce.left===0&&ce.right===0&&ce.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
118
+ `))}return{top:ne.top+OT(ne,s.vertical),left:ne.left+MT(ne,s.horizontal)}},[i,s.horizontal,s.vertical,a,l]),F=P.useCallback(ae=>({vertical:OT(ae,T.vertical),horizontal:MT(ae,T.horizontal)}),[T.horizontal,T.vertical]),V=P.useCallback(ae=>{const ve={width:ae.offsetWidth,height:ae.offsetHeight},ne=F(ve);if(l==="none")return{top:null,left:null,transformOrigin:AT(ne)};const ce=D();let fe=ce.top-ne.vertical,xe=ce.left-ne.horizontal;const Te=fe+ve.height,_e=xe+ve.width,Ne=ci(Pc(i)),He=Ne.innerHeight-m,W=Ne.innerWidth-m;if(m!==null&&fe<m){const te=fe-m;fe-=te,ne.vertical+=te}else if(m!==null&&Te>He){const te=Te-He;fe-=te,ne.vertical+=te}if(process.env.NODE_ENV!=="production"&&ve.height>He&&ve.height&&He&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${ve.height-He}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
119
+ `)),m!==null&&xe<m){const te=xe-m;xe-=te,ne.horizontal+=te}else if(_e>W){const te=_e-W;xe-=te,ne.horizontal+=te}return{top:`${Math.round(fe)}px`,left:`${Math.round(xe)}px`,transformOrigin:AT(ne)}},[i,l,D,F,m]),[z,R]=P.useState(b),B=P.useCallback(()=>{const ae=I.current;if(!ae)return;const ve=V(ae);ve.top!==null&&ae.style.setProperty("top",ve.top),ve.left!==null&&(ae.style.left=ve.left),ae.style.transformOrigin=ve.transformOrigin,R(!0)},[V]);P.useEffect(()=>(M&&window.addEventListener("scroll",B),()=>window.removeEventListener("scroll",B)),[i,M,B]);const U=()=>{B()},K=()=>{R(!1)};P.useEffect(()=>{b&&B()}),P.useImperativeHandle(o,()=>b?{updatePosition:()=>{B()}}:null,[b,B]),P.useEffect(()=>{if(!b)return;const ae=mC(()=>{B()}),ve=ci(Pc(i));return ve.addEventListener("resize",ae),()=>{ae.clear(),ve.removeEventListener("resize",ae)}},[i,b,B]);let Y=C;const G={slots:{transition:_,...x},slotProps:{transition:E,paper:y,...w}},[Z,ge]=Wt("transition",{elementType:Mc,externalForwardedProps:G,ownerState:L,getSlotProps:ae=>({...ae,onEntering:(ve,ne)=>{var ce;(ce=ae.onEntering)==null||ce.call(ae,ve,ne),U()},onExited:ve=>{var ne;(ne=ae.onExited)==null||ne.call(ae,ve),K()}}),additionalProps:{appear:!0,in:b}});C==="auto"&&!Z.muiSupportAuto&&(Y=void 0);const he=p||(i?Zn(Pc(i)).body:void 0),[me,{slots:oe,slotProps:ye,...de}]=Wt("root",{ref:n,elementType:uj,externalForwardedProps:{...G,...A},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:x.backdrop},slotProps:{backdrop:G3(typeof w.backdrop=="function"?w.backdrop(L):w.backdrop,{invisible:!0})},container:he,open:b},ownerState:L,className:ze(O.root,f)}),[X,Q]=Wt("paper",{ref:I,className:O.paper,elementType:IT,externalForwardedProps:G,shouldForwardComponentProp:!0,additionalProps:{elevation:g,style:z?void 0:{opacity:0}},ownerState:L});return v.jsx(me,{...de,...!wc(me)&&{slots:oe,slotProps:ye,disableScrollLock:M},children:v.jsx(Z,{...ge,timeout:Y,children:v.jsx(X,{...Q,children:u})})})});process.env.NODE_ENV!=="production"&&(DT.propTypes={action:En,anchorEl:si(c.oneOfType([li,c.func]),t=>{if(t.open&&(!t.anchorReference||t.anchorReference==="anchorEl")){const e=Pc(t.anchorEl);if(e&&e.nodeType===1){const n=e.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
120
+ `))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${e}\` instead.`].join(`
121
+ `))}return null}),anchorOrigin:c.shape({horizontal:c.oneOfType([c.oneOf(["center","left","right"]),c.number]).isRequired,vertical:c.oneOfType([c.oneOf(["bottom","center","top"]),c.number]).isRequired}),anchorPosition:c.shape({left:c.number.isRequired,top:c.number.isRequired}),anchorReference:c.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:c.elementType,BackdropProps:c.object,children:c.node,classes:c.object,className:c.string,container:c.oneOfType([li,c.func]),disableScrollLock:c.bool,elevation:EC,marginThreshold:c.number,onClose:c.func,open:c.bool.isRequired,PaperProps:c.shape({component:Td}),slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),paper:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,paper:c.elementType,root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),transformOrigin:c.shape({horizontal:c.oneOfType([c.oneOf(["center","left","right"]),c.number]).isRequired,vertical:c.oneOfType([c.oneOf(["bottom","center","top"]),c.number]).isRequired}),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})]),TransitionProps:c.object});function dj(t){return Qe("MuiMenu",t)}tt("MuiMenu",["root","paper","list"]);const fj={vertical:"top",horizontal:"right"},pj={vertical:"top",horizontal:"left"},hj=t=>{const{classes:e}=t;return Ze({root:["root"],paper:["paper"],list:["list"]},dj,e)},gj=Se(DT,{shouldForwardProp:t=>Co(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),mj=Se(IT,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),yj=Se(xT,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),PT=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:s,disableAutoFocusItem:a=!1,MenuListProps:l={},onClose:u,open:f,PaperProps:p={},PopoverClasses:g,transitionDuration:m="auto",TransitionProps:{onEntering:b,...y}={},variant:x="selectedMenu",slots:w={},slotProps:T={},..._}=r,C=i_(),E={...r,autoFocus:o,disableAutoFocusItem:a,MenuListProps:l,onEntering:b,PaperProps:p,transitionDuration:m,TransitionProps:y,variant:x},M=hj(E),A=o&&!a&&f,I=P.useRef(null),L=(Y,G)=>{I.current&&I.current.adjustStyleForScrollbar(Y,{direction:C?"rtl":"ltr"}),b&&b(Y,G)},O=Y=>{Y.key==="Tab"&&(Y.preventDefault(),u&&u(Y,"tabKeyDown"))};let D=-1;P.Children.map(i,(Y,G)=>{P.isValidElement(Y)&&(process.env.NODE_ENV!=="production"&&ai.isFragment(Y)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
122
+ `)),Y.props.disabled||(x==="selectedMenu"&&Y.props.selected||D===-1)&&(D=G))});const F={slots:w,slotProps:{list:l,transition:y,paper:p,...T}},V=Mt({elementType:w.root,externalSlotProps:T.root,ownerState:E,className:[M.root,s]}),[z,R]=Wt("paper",{className:M.paper,elementType:mj,externalForwardedProps:F,shouldForwardComponentProp:!0,ownerState:E}),[B,U]=Wt("list",{className:ze(M.list,l.className),elementType:yj,shouldForwardComponentProp:!0,externalForwardedProps:F,getSlotProps:Y=>({...Y,onKeyDown:G=>{var Z;O(G),(Z=Y.onKeyDown)==null||Z.call(Y,G)}}),ownerState:E}),K=typeof F.slotProps.transition=="function"?F.slotProps.transition(E):F.slotProps.transition;return v.jsx(gj,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:C?"right":"left"},transformOrigin:C?fj:pj,slots:{root:w.root,paper:z,backdrop:w.backdrop,...w.transition&&{transition:w.transition}},slotProps:{root:V,paper:R,backdrop:typeof T.backdrop=="function"?T.backdrop(E):T.backdrop,transition:{...K,onEntering:(...Y)=>{var G;L(...Y),(G=K==null?void 0:K.onEntering)==null||G.call(K,...Y)}}},open:f,ref:n,transitionDuration:m,ownerState:E,..._,classes:g,children:v.jsx(B,{actions:I,autoFocus:o&&(D===-1||a),autoFocusItem:A,variant:x,...U,children:i})})});process.env.NODE_ENV!=="production"&&(PT.propTypes={anchorEl:c.oneOfType([li,c.func]),autoFocus:c.bool,children:c.node,classes:c.object,className:c.string,disableAutoFocusItem:c.bool,MenuListProps:c.object,onClose:c.func,open:c.bool.isRequired,PaperProps:c.object,PopoverClasses:c.object,slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),list:c.oneOfType([c.func,c.object]),paper:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,list:c.elementType,paper:c.elementType,root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),transitionDuration:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})]),TransitionProps:c.object,variant:c.oneOf(["menu","selectedMenu"])});function bj(t){return Qe("MuiNativeSelect",t)}const ey=tt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),vj=t=>{const{classes:e,variant:n,disabled:r,multiple:o,open:i,error:s}=t,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${$e(n)}`,i&&"iconOpen",r&&"disabled"]};return Ze(a,bj,e)},NT=Se("select",{name:"MuiNativeSelect"})(({theme:t})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${ey.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!=="filled"&&e.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}}]})),xj=Se(NT,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Co,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${ey.multiple}`]:e.multiple}]}})({}),LT=Se("svg",{name:"MuiNativeSelect"})(({theme:t})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${ey.disabled}`]:{color:(t.vars||t).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}}]})),Sj=Se(LT,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${$e(n.variant)}`],n.open&&e.iconOpen]}})({}),$T=P.forwardRef(function(e,n){const{className:r,disabled:o,error:i,IconComponent:s,inputRef:a,variant:l="standard",...u}=e,f={...e,disabled:o,variant:l,error:i},p=vj(f);return v.jsxs(P.Fragment,{children:[v.jsx(xj,{ownerState:f,className:ze(p.select,r),disabled:o,ref:a||n,...u}),e.multiple?null:v.jsx(Sj,{as:s,ownerState:f,className:p.icon})]})});process.env.NODE_ENV!=="production"&&($T.propTypes={children:c.node,classes:c.object,className:c.string,disabled:c.bool,error:c.bool,IconComponent:c.elementType.isRequired,inputRef:En,multiple:c.bool,name:c.string,onChange:c.func,value:c.any,variant:c.oneOf(["standard","outlined","filled"])});function FT(t){return Qe("MuiSelect",t)}const Nc=tt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var RT;const wj=Se(NT,{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${Nc.select}`]:e.select},{[`&.${Nc.select}`]:e[n.variant]},{[`&.${Nc.error}`]:e.error},{[`&.${Nc.multiple}`]:e.multiple}]}})({[`&.${Nc.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Cj=Se(LT,{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${$e(n.variant)}`],n.open&&e.iconOpen]}})({}),_j=Se("input",{shouldForwardProp:t=>w_(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function BT(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Tj(t){return t==null||typeof t=="string"&&!t.trim()}const kj=t=>{const{classes:e,variant:n,disabled:r,multiple:o,open:i,error:s}=t,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${$e(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Ze(a,FT,e)},VT=P.forwardRef(function(e,n){var We;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:s,children:a,className:l,defaultOpen:u,defaultValue:f,disabled:p,displayEmpty:g,error:m=!1,IconComponent:b,inputRef:y,labelId:x,MenuProps:w={},multiple:T,name:_,onBlur:C,onChange:E,onClose:M,onFocus:A,onOpen:I,open:L,readOnly:O,renderValue:D,required:F,SelectDisplayProps:V={},tabIndex:z,type:R,value:B,variant:U="standard",...K}=e,[Y,G]=ui({controlled:B,default:f,name:"Select"}),[Z,ge]=ui({controlled:L,default:u,name:"Select"}),he=P.useRef(null),me=P.useRef(null),[oe,ye]=P.useState(null),{current:de}=P.useRef(L!=null),[X,Q]=P.useState(),ae=Nt(n,y),ve=P.useCallback(Ae=>{me.current=Ae,Ae&&ye(Ae)},[]),ne=oe==null?void 0:oe.parentNode;P.useImperativeHandle(ae,()=>({focus:()=>{me.current.focus()},node:he.current,value:Y}),[Y]),P.useEffect(()=>{u&&Z&&oe&&!de&&(Q(s?null:ne.clientWidth),me.current.focus())},[oe,s]),P.useEffect(()=>{i&&me.current.focus()},[i]),P.useEffect(()=>{if(!x)return;const Ae=Zn(me.current).getElementById(x);if(Ae){const qe=()=>{getSelection().isCollapsed&&me.current.focus()};return Ae.addEventListener("click",qe),()=>{Ae.removeEventListener("click",qe)}}},[x]);const ce=(Ae,qe)=>{Ae?I&&I(qe):M&&M(qe),de||(Q(s?null:ne.clientWidth),ge(Ae))},fe=Ae=>{Ae.button===0&&(Ae.preventDefault(),me.current.focus(),ce(!0,Ae))},xe=Ae=>{ce(!1,Ae)},Te=P.Children.toArray(a),_e=Ae=>{const qe=Te.find(Xe=>Xe.props.value===Ae.target.value);qe!==void 0&&(G(qe.props.value),E&&E(Ae,qe))},Ne=Ae=>qe=>{let Xe;if(qe.currentTarget.hasAttribute("tabindex")){if(T){Xe=Array.isArray(Y)?Y.slice():[];const ct=Y.indexOf(Ae.props.value);ct===-1?Xe.push(Ae.props.value):Xe.splice(ct,1)}else Xe=Ae.props.value;if(Ae.props.onClick&&Ae.props.onClick(qe),Y!==Xe&&(G(Xe),E)){const ct=qe.nativeEvent||qe,zt=new ct.constructor(ct.type,ct);Object.defineProperty(zt,"target",{writable:!0,value:{value:Xe,name:_}}),E(zt,Ae)}T||ce(!1,qe)}},He=Ae=>{O||[" ","ArrowUp","ArrowDown","Enter"].includes(Ae.key)&&(Ae.preventDefault(),ce(!0,Ae))},W=oe!==null&&Z,te=Ae=>{!W&&C&&(Object.defineProperty(Ae,"target",{writable:!0,value:{value:Y,name:_}}),C(Ae))};delete K["aria-invalid"];let re,Me;const Ie=[];let De=!1,je=!1;(of({value:Y})||g)&&(D?re=D(Y):De=!0);const ot=Te.map(Ae=>{if(!P.isValidElement(Ae))return null;process.env.NODE_ENV!=="production"&&ai.isFragment(Ae)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
123
+ `));let qe;if(T){if(!Array.isArray(Y))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":Ro(2));qe=Y.some(Xe=>BT(Xe,Ae.props.value)),qe&&De&&Ie.push(Ae.props.children)}else qe=BT(Y,Ae.props.value),qe&&De&&(Me=Ae.props.children);return qe&&(je=!0),P.cloneElement(Ae,{"aria-selected":qe?"true":"false",onClick:Ne(Ae),onKeyUp:Xe=>{Xe.key===" "&&Xe.preventDefault(),Ae.props.onKeyUp&&Ae.props.onKeyUp(Xe)},role:"option",selected:qe,value:void 0,"data-value":Ae.props.value})});process.env.NODE_ENV!=="production"&&P.useEffect(()=>{if(!je&&!T&&Y!==""){const Ae=Te.map(qe=>qe.props.value);console.warn([`MUI: You have provided an out-of-range value \`${Y}\` for the select ${_?`(name="${_}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${Ae.filter(qe=>qe!=null).map(qe=>`\`${qe}\``).join(", ")||'""'}.`].join(`
124
+ `))}},[je,Te,T,_,Y]),De&&(T?Ie.length===0?re=null:re=Ie.reduce((Ae,qe,Xe)=>(Ae.push(qe),Xe<Ie.length-1&&Ae.push(", "),Ae),[]):re=Me);let nt=X;!s&&de&&oe&&(nt=ne.clientWidth);let At;typeof z<"u"?At=z:At=p?null:0;const _n=V.id||(_?`mui-component-select-${_}`:void 0),ut={...e,variant:U,value:Y,open:W,error:m},Pn=kj(ut),$t={...w.PaperProps,...(We=w.slotProps)==null?void 0:We.paper},pe=Bo();return v.jsxs(P.Fragment,{children:[v.jsx(wj,{as:"div",ref:ve,tabIndex:At,role:"combobox","aria-controls":W?pe:void 0,"aria-disabled":p?"true":void 0,"aria-expanded":W?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[x,_n].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":F?"true":void 0,"aria-invalid":m?"true":void 0,onKeyDown:He,onMouseDown:p||O?null:fe,onBlur:te,onFocus:A,...V,ownerState:ut,className:ze(V.className,Pn.select,l),id:_n,children:Tj(re)?RT||(RT=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):re}),v.jsx(_j,{"aria-invalid":m,value:Array.isArray(Y)?Y.join(","):Y,name:_,ref:he,"aria-hidden":!0,onChange:_e,tabIndex:-1,disabled:p,className:Pn.nativeInput,autoFocus:i,required:F,...K,ownerState:ut}),v.jsx(Cj,{as:b,className:Pn.icon,ownerState:ut}),v.jsx(PT,{id:`menu-${_||""}`,anchorEl:ne,open:W,onClose:xe,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...w,slotProps:{...w.slotProps,list:{"aria-labelledby":x,role:"listbox","aria-multiselectable":T?"true":void 0,disableListWrap:!0,id:pe,...w.MenuListProps},paper:{...$t,style:{minWidth:nt,...$t!=null?$t.style:null}}},children:ot})]})});process.env.NODE_ENV!=="production"&&(VT.propTypes={"aria-describedby":c.string,"aria-label":c.string,autoFocus:c.bool,autoWidth:c.bool,children:c.node,classes:c.object,className:c.string,defaultOpen:c.bool,defaultValue:c.any,disabled:c.bool,displayEmpty:c.bool,error:c.bool,IconComponent:c.elementType.isRequired,inputRef:En,labelId:c.string,MenuProps:c.object,multiple:c.bool,name:c.string,onBlur:c.func,onChange:c.func,onClose:c.func,onFocus:c.func,onOpen:c.func,open:c.bool,readOnly:c.bool,renderValue:c.func,required:c.bool,SelectDisplayProps:c.object,tabIndex:c.oneOfType([c.number,c.string]),type:c.any,value:c.any,variant:c.oneOf(["standard","outlined","filled"])});const Ej=Ke(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Oj=t=>{const{classes:e}=t,r=Ze({root:["root"]},FT,e);return{...e,...r}},ty={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Co(t)&&t!=="variant",slot:"Root"},Mj=Se(df,ty)(""),Aj=Se(pf,ty)(""),Ij=Se(ff,ty)(""),ny=P.forwardRef(function(e,n){const r=Et({name:"MuiSelect",props:e}),{autoWidth:o=!1,children:i,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:f=Ej,id:p,input:g,inputProps:m,label:b,labelId:y,MenuProps:x,multiple:w=!1,native:T=!1,onClose:_,onOpen:C,open:E,renderValue:M,SelectDisplayProps:A,variant:I="outlined",...L}=r,O=T?$T:VT,D=To(),F=Ga({props:r,muiFormControl:D,states:["variant","error"]}),V=F.variant||I,z={...r,variant:V,classes:s},R=Oj(z),{root:B,...U}=R,K=g||{standard:v.jsx(Mj,{ownerState:z}),outlined:v.jsx(Aj,{label:b,ownerState:z}),filled:v.jsx(Ij,{ownerState:z})}[V],Y=Nt(n,sc(K));return v.jsx(P.Fragment,{children:P.cloneElement(K,{inputComponent:O,inputProps:{children:i,error:F.error,IconComponent:f,variant:V,type:void 0,multiple:w,...T?{id:p}:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:y,MenuProps:x,onClose:_,onOpen:C,open:E,renderValue:M,SelectDisplayProps:{id:p,...A}},...m,classes:m?$n(U,m.classes):U,...g?g.props.inputProps:{}},...(w&&T||u)&&V==="outlined"?{notched:!0}:{},ref:Y,className:ze(K.props.className,a,R.root),...!g&&{variant:V},...L})})});process.env.NODE_ENV!=="production"&&(ny.propTypes={autoWidth:c.bool,children:c.node,classes:c.object,className:c.string,defaultOpen:c.bool,defaultValue:c.any,displayEmpty:c.bool,IconComponent:c.elementType,id:c.string,input:c.element,inputProps:c.object,label:c.node,labelId:c.string,MenuProps:c.object,multiple:c.bool,native:c.bool,onChange:c.func,onClose:c.func,onOpen:c.func,open:c.bool,renderValue:c.func,SelectDisplayProps:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.oneOfType([c.oneOf([""]),c.any]),variant:c.oneOf(["filled","outlined","standard"])}),ny.muiName="Select";function Dj(t){return Qe("MuiTextField",t)}tt("MuiTextField",["root"]);const Pj={standard:df,filled:ff,outlined:pf},Nj=t=>{const{classes:e}=t;return Ze({root:["root"]},Dj,e)},Lj=Se(Bm,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),zT=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:s,className:a,color:l="primary",defaultValue:u,disabled:f=!1,error:p=!1,FormHelperTextProps:g,fullWidth:m=!1,helperText:b,id:y,InputLabelProps:x,inputProps:w,InputProps:T,inputRef:_,label:C,maxRows:E,minRows:M,multiline:A=!1,name:I,onBlur:L,onChange:O,onFocus:D,placeholder:F,required:V=!1,rows:z,select:R=!1,SelectProps:B,slots:U={},slotProps:K={},type:Y,value:G,variant:Z="outlined",...ge}=r,he={...r,autoFocus:i,color:l,disabled:f,error:p,fullWidth:m,multiline:A,required:V,select:R,variant:Z},me=Nj(he);process.env.NODE_ENV!=="production"&&R&&!s&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const oe=Bo(y),ye=b&&oe?`${oe}-helper-text`:void 0,de=C&&oe?`${oe}-label`:void 0,X=Pj[Z],Q={slots:U,slotProps:{input:T,inputLabel:x,htmlInput:w,formHelperText:g,select:B,...K}},ae={},ve=Q.slotProps.inputLabel;Z==="outlined"&&(ve&&typeof ve.shrink<"u"&&(ae.notched=ve.shrink),ae.label=C),R&&((!B||!B.native)&&(ae.id=void 0),ae["aria-describedby"]=void 0);const[ne,ce]=Wt("root",{elementType:Lj,shouldForwardComponentProp:!0,externalForwardedProps:{...Q,...ge},ownerState:he,className:ze(me.root,a),ref:n,additionalProps:{disabled:f,error:p,fullWidth:m,required:V,color:l,variant:Z}}),[fe,xe]=Wt("input",{elementType:X,externalForwardedProps:Q,additionalProps:ae,ownerState:he}),[Te,_e]=Wt("inputLabel",{elementType:Rm,externalForwardedProps:Q,ownerState:he}),[Ne,He]=Wt("htmlInput",{elementType:"input",externalForwardedProps:Q,ownerState:he}),[W,te]=Wt("formHelperText",{elementType:Vm,externalForwardedProps:Q,ownerState:he}),[re,Me]=Wt("select",{elementType:ny,externalForwardedProps:Q,ownerState:he}),Ie=v.jsx(fe,{"aria-describedby":ye,autoComplete:o,autoFocus:i,defaultValue:u,fullWidth:m,multiline:A,name:I,rows:z,maxRows:E,minRows:M,type:Y,value:G,id:oe,inputRef:_,onBlur:L,onChange:O,onFocus:D,placeholder:F,inputProps:He,slots:{input:U.htmlInput?Ne:void 0},...xe});return v.jsxs(ne,{...ce,children:[C!=null&&C!==""&&v.jsx(Te,{htmlFor:oe,id:de,..._e,children:C}),R?v.jsx(re,{"aria-describedby":ye,id:oe,labelId:de,value:G,input:Ie,...Me,children:s}):Ie,b&&v.jsx(W,{id:ye,...te,children:b})]})});process.env.NODE_ENV!=="production"&&(zT.propTypes={autoComplete:c.string,autoFocus:c.bool,children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","error","info","success","warning"]),c.string]),defaultValue:c.any,disabled:c.bool,error:c.bool,FormHelperTextProps:c.object,fullWidth:c.bool,helperText:c.node,id:c.string,InputLabelProps:c.object,inputProps:c.object,InputProps:c.object,inputRef:En,label:c.node,margin:c.oneOf(["dense","none","normal"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onBlur:c.func,onChange:c.func,onFocus:c.func,placeholder:c.string,required:c.bool,rows:c.oneOfType([c.number,c.string]),select:c.bool,SelectProps:c.object,size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),slotProps:c.shape({formHelperText:c.oneOfType([c.func,c.object]),htmlInput:c.oneOfType([c.func,c.object]),input:c.oneOfType([c.func,c.object]),inputLabel:c.oneOfType([c.func,c.object]),select:c.oneOfType([c.func,c.object])}),slots:c.shape({formHelperText:c.elementType,htmlInput:c.elementType,input:c.elementType,inputLabel:c.elementType,root:c.elementType,select:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any,variant:c.oneOf(["filled","outlined","standard"])});const Lc=(t,e)=>t.length!==e.length?!1:e.every(n=>t.includes(n)),$j=({openTo:t,defaultOpenTo:e,views:n,defaultViews:r})=>{const o=n??r;let i;if(t!=null)i=t;else if(o.includes(e))i=e;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},yf=(t,e,n)=>{let r=e;return r=t.setHours(r,t.getHours(n)),r=t.setMinutes(r,t.getMinutes(n)),r=t.setSeconds(r,t.getSeconds(n)),r=t.setMilliseconds(r,t.getMilliseconds(n)),r},$c=({date:t,disableFuture:e,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:s,timezone:a})=>{const l=yf(s,s.date(void 0,a),t);n&&s.isBefore(o,l)&&(o=l),e&&s.isAfter(r,l)&&(r=l);let u=t,f=t;for(s.isBefore(t,o)&&(u=o,f=null),s.isAfter(t,r)&&(f&&(f=r),u=null);u||f;){if(u&&s.isAfter(u,r)&&(u=null),f&&s.isBefore(f,o)&&(f=null),u){if(!i(u))return u;u=s.addDays(u,1)}if(f){if(!i(f))return f;f=s.addDays(f,-1)}}return null},Fj=(t,e)=>e==null||!t.isValid(e)?null:e,Xr=(t,e,n)=>e==null||!t.isValid(e)?n:e,Rj=(t,e,n)=>!t.isValid(e)&&e!=null&&!t.isValid(n)&&n!=null?!0:t.isEqual(e,n),ry=(t,e)=>{const r=[t.startOfYear(e)];for(;r.length<12;){const o=r[r.length-1];r.push(t.addMonths(o,1))}return r},HT=(t,e,n)=>n==="date"?t.startOfDay(t.date(void 0,e)):t.date(void 0,e),Bj=["year","month","day"],jT=t=>Bj.includes(t),oy=(t,{format:e,views:n},r)=>{if(e!=null)return e;const o=t.formats;return Lc(n,["year"])?o.year:Lc(n,["month"])?o.month:Lc(n,["day"])?o.dayOfMonth:Lc(n,["month","year"])?`${o.month} ${o.year}`:Lc(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(t.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},Vj=(t,e)=>{const n=t.startOfWeek(e);return[0,1,2,3,4,5,6].map(r=>t.addDays(n,r))},zj=["hours","minutes","seconds"],Hj=t=>zj.includes(t),WT=(t,e)=>e.getHours(t)*3600+e.getMinutes(t)*60+e.getSeconds(t),jj=(t,e)=>(n,r)=>t?e.isAfter(n,r):WT(n,e)>WT(r,e),Ho={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},Wj=t=>Math.max(...t.map(e=>Ho[e.type]??1)),Fc=(t,e,n)=>{if(e===Ho.year)return t.startOfYear(n);if(e===Ho.month)return t.startOfMonth(n);if(e===Ho.day)return t.startOfDay(n);let r=n;return e<Ho.minutes&&(r=t.setMinutes(r,0)),e<Ho.seconds&&(r=t.setSeconds(r,0)),e<Ho.milliseconds&&(r=t.setMilliseconds(r,0)),r},qj=({props:t,utils:e,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():Fc(e,n,HT(e,r));t.minDate!=null&&e.isAfterDay(t.minDate,i)&&(i=Fc(e,n,t.minDate)),t.maxDate!=null&&e.isBeforeDay(t.maxDate,i)&&(i=Fc(e,n,t.maxDate));const s=jj(t.disableIgnoringDatePartForTimeValidation??!1,e);return t.minTime!=null&&s(t.minTime,i)&&(i=Fc(e,n,t.disableIgnoringDatePartForTimeValidation?t.minTime:yf(e,i,t.minTime))),t.maxTime!=null&&s(i,t.maxTime)&&(i=Fc(e,n,t.disableIgnoringDatePartForTimeValidation?t.maxTime:yf(e,i,t.maxTime))),i},iy=(t,e)=>{const n=t.formatTokenMap[e];if(n==null)throw new Error([`MUI X: The token "${e}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
125
+ `));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},Uj=t=>{switch(t){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},bf=(t,e)=>{const n=[],r=t.date(void 0,"default"),o=t.startOfWeek(r),i=t.endOfWeek(r);let s=o;for(;t.isBefore(s,i);)n.push(s),s=t.addDays(s,1);return n.map(a=>t.formatByString(a,e))},qT=(t,e,n,r)=>{switch(n){case"month":return ry(t,t.date(void 0,e)).map(o=>t.formatByString(o,r));case"weekDay":return bf(t,r);case"meridiem":{const o=t.date(void 0,e);return[t.startOfDay(o),t.endOfDay(o)].map(i=>t.formatByString(i,r))}default:return[]}},UT="s",Kj=["0","1","2","3","4","5","6","7","8","9"],Gj=t=>{const e=t.date(void 0);return t.formatByString(t.setSeconds(e,0),UT)==="0"?Kj:Array.from({length:10}).map((r,o)=>t.formatByString(t.setSeconds(e,o),UT))},qs=(t,e)=>{if(e[0]==="0")return t;const n=[];let r="";for(let o=0;o<t.length;o+=1){r+=t[o];const i=e.indexOf(r);i>-1&&(n.push(i.toString()),r="")}return n.join("")},sy=(t,e)=>e[0]==="0"?t:t.split("").map(n=>e[Number(n)]).join(""),KT=(t,e)=>{const n=qs(t,e);return n!==" "&&!Number.isNaN(Number(n))},GT=(t,e)=>{let n=t;for(n=Number(n).toString();n.length<e;)n=`0${n}`;return n},YT=(t,e,n,r,o)=>{if(process.env.NODE_ENV!=="production"&&o.type!=="day"&&o.contentType==="digit-with-letter")throw new Error([`MUI X: The token "${o.format}" is a digit format with letter in it.'
126
+ This type of format is only supported for 'day' sections`].join(`
127
+ `));if(o.type==="day"&&o.contentType==="digit-with-letter"){const s=t.setDate(n.longestMonth,e);return t.formatByString(s,o.format)}let i=e.toString();return o.hasLeadingZerosInInput&&(i=GT(i,o.maxLength)),sy(i,r)},Yj=(t,e,n,r,o,i,s,a)=>{const l=Uj(r),u=r==="Home",f=r==="End",p=n.value===""||u||f,g=()=>{const b=o[n.type]({currentDate:s,format:n.format,contentType:n.contentType}),y=T=>YT(t,T,b,i,n),x=n.type==="minutes"&&(a!=null&&a.minutesStep)?a.minutesStep:1;let w;if(p){if(n.type==="year"&&!f&&!u)return t.formatByString(t.date(void 0,e),n.format);l>0||u?w=b.minimum:w=b.maximum}else w=parseInt(qs(n.value,i),10)+l*x;return w%x!==0&&((l<0||u)&&(w+=x-(x+w)%x),(l>0||f)&&(w-=w%x)),w>b.maximum?y(b.minimum+(w-b.maximum-1)%(b.maximum-b.minimum+1)):w<b.minimum?y(b.maximum-(b.minimum-w-1)%(b.maximum-b.minimum+1)):y(w)},m=()=>{const b=qT(t,e,n.type,n.format);if(b.length===0)return n.value;if(p)return l>0||u?b[0]:b[b.length-1];const w=((b.indexOf(n.value)+l)%b.length+b.length)%b.length;return b[w]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?g():m()},ay=(t,e,n)=>{let r=t.value||t.placeholder;const o=e==="non-input"?t.hasLeadingZerosInFormat:t.hasLeadingZerosInInput;return e==="non-input"&&t.hasLeadingZerosInInput&&!t.hasLeadingZerosInFormat&&(r=Number(qs(r,n)).toString()),["input-rtl","input-ltr"].includes(e)&&t.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),e==="input-rtl"&&(r=`⁨${r}⁩`),r},JT=(t,e,n,r)=>{if(process.env.NODE_ENV!=="production"&&iy(t,n).type==="weekDay")throw new Error("changeSectionValueFormat doesn't support week day formats");return t.formatByString(t.parse(e,n),r)},Jj=(t,e)=>t.formatByString(t.date(void 0,"system"),e).length===4,XT=(t,e,n,r)=>{if(e!=="digit")return!1;const o=t.date(void 0,"default");switch(n){case"year":return t.lib==="dayjs"&&r==="YY"?!0:t.formatByString(t.setYear(o,1),r).startsWith("0");case"month":return t.formatByString(t.startOfYear(o),r).length>1;case"day":return t.formatByString(t.startOfMonth(o),r).length>1;case"weekDay":return t.formatByString(t.startOfWeek(o),r).length>1;case"hours":return t.formatByString(t.setHours(o,1),r).length>1;case"minutes":return t.formatByString(t.setMinutes(o,1),r).length>1;case"seconds":return t.formatByString(t.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},Xj=(t,e,n)=>{const r=e.some(l=>l.type==="day"),o=[],i=[];for(let l=0;l<e.length;l+=1){const u=e[l];r&&u.type==="weekDay"||(o.push(u.format),i.push(ay(u,"non-input",n)))}const s=o.join(" "),a=i.join(" ");return t.parse(a,s)},Zj=t=>t.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),Qj=(t,e,n)=>{const o=t.map(i=>{const s=ay(i,n?"input-rtl":"input-ltr",e);return`${i.startSeparator}${s}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},eW=(t,e,n)=>{const r=t.date(void 0,n),o=t.endOfYear(r),i=t.endOfDay(r),{maxDaysInMonth:s,longestMonth:a}=ry(t,r).reduce((l,u)=>{const f=t.getDaysInMonth(u);return f>l.maxDaysInMonth?{maxDaysInMonth:f,longestMonth:u}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:Jj(t,l)?9999:99}),month:()=>({minimum:1,maximum:t.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&t.isValid(l)?t.getDaysInMonth(l):s,longestMonth:a}),weekDay:({format:l,contentType:u})=>{if(u==="digit"){const f=bf(t,l).map(Number);return{minimum:Math.min(...f),maximum:Math.max(...f)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const u=t.getHours(i);return qs(t.formatByString(t.endOfDay(r),l),e)!==u.toString()?{minimum:1,maximum:Number(qs(t.formatByString(t.startOfDay(r),l),e))}:{minimum:0,maximum:u}},minutes:()=>({minimum:0,maximum:t.getMinutes(i)}),seconds:()=>({minimum:0,maximum:t.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}};let ZT=!1;const QT=(t,e)=>{if(process.env.NODE_ENV!=="production"&&!ZT){const n=["empty"];["date","date-time"].includes(e)&&n.push("weekDay","day","month","year"),["time","date-time"].includes(e)&&n.push("hours","minutes","seconds","meridiem");const r=t.find(o=>!n.includes(o.type));r&&(console.warn(`MUI X: The field component you are using is not compatible with the "${r.type}" date section.`,`The supported date sections are ["${n.join('", "')}"]\`.`),ZT=!0)}},tW=(t,e,n,r)=>{switch(e.type){case"year":return t.setYear(r,t.getYear(n));case"month":return t.setMonth(r,t.getMonth(n));case"weekDay":{const o=bf(t,e.format),i=t.formatByString(n,e.format),s=o.indexOf(i),l=o.indexOf(e.value)-s;return t.addDays(n,l)}case"day":return t.setDate(r,t.getDate(n));case"meridiem":{const o=t.getHours(n)<12,i=t.getHours(r);return o&&i>=12?t.addHours(r,-12):!o&&i<12?t.addHours(r,12):r}case"hours":return t.setHours(r,t.getHours(n));case"minutes":return t.setMinutes(r,t.getMinutes(n));case"seconds":return t.setSeconds(r,t.getSeconds(n));default:return r}},ek={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},tk=(t,e,n,r,o)=>[...n].sort((i,s)=>ek[i.type]-ek[s.type]).reduce((i,s)=>!o||s.modified?tW(t,s,e,i):i,r),nW=()=>navigator.userAgent.toLowerCase().includes("android"),rW=(t,e)=>{const n={};if(!e)return t.forEach((l,u)=>{const f=u===0?null:u-1,p=u===t.length-1?null:u+1;n[u]={leftIndex:f,rightIndex:p}}),{neighbors:n,startIndex:0,endIndex:t.length-1};const r={},o={};let i=0,s=0,a=t.length-1;for(;a>=0;){s=t.findIndex((l,u)=>{var f;return u>=i&&((f=l.endSeparator)==null?void 0:f.includes(" "))&&l.endSeparator!==" / "}),s===-1&&(s=t.length-1);for(let l=s;l>=i;l-=1)o[l]=a,r[a]=l,a-=1;i=s+1}return t.forEach((l,u)=>{const f=o[u],p=f===0?null:r[f-1],g=f===t.length-1?null:r[f+1];n[u]={leftIndex:p,rightIndex:g}}),{neighbors:n,startIndex:r[0],endIndex:r[t.length-1]}},ly=(t,e)=>{if(t==null)return null;if(t==="all")return"all";if(typeof t=="string"){const n=e.findIndex(r=>r.type===t);return n===-1?null:n}return t},oW=(t,e)=>{if(t.value)switch(t.type){case"month":{if(t.contentType==="digit")return e.format(e.setMonth(e.date(),Number(t.value)-1),"month");const n=e.parse(t.value,t.format);return n?e.format(n,"month"):void 0}case"day":return t.contentType==="digit"?e.format(e.setDate(e.startOfYear(e.date()),Number(t.value)),"dayOfMonthFull"):t.value;case"weekDay":return;default:return}},iW=(t,e)=>{if(t.value)switch(t.type){case"weekDay":return t.contentType==="letter"?void 0:Number(t.value);case"meridiem":{const n=e.parse(`01:00 ${t.value}`,`${e.formats.hours12h}:${e.formats.minutes} ${t.format}`);return n?e.getHours(n)>=12?1:0:void 0}case"day":return t.contentType==="digit-with-letter"?parseInt(t.value,10):Number(t.value);case"month":{if(t.contentType==="digit")return Number(t.value);const n=e.parse(t.value,t.format);return n?e.getMonth(n)+1:void 0}default:return t.contentType!=="letter"?Number(t.value):void 0}},sW=["value","referenceDate"],jo={emptyValue:null,getTodayValue:HT,getInitialReferenceValue:t=>{let{value:e,referenceDate:n}=t,r=dt(t,sW);return e!=null&&r.utils.isValid(e)?e:n??qj(r)},cleanValue:Fj,areValuesEqual:Rj,isSameError:(t,e)=>t===e,hasError:t=>t!=null,defaultErrorState:null,getTimezone:(t,e)=>e==null||!t.isValid(e)?null:t.getTimezone(e),setTimezone:(t,e,n)=>n==null?null:t.setTimezone(n,e)},aW={updateReferenceValue:(t,e,n)=>e==null||!t.isValid(e)?n:e,getSectionsFromValue:(t,e,n,r)=>!t.isValid(e)&&!!n?n:r(e),getV7HiddenInputValueFromSections:Zj,getV6InputValueFromSections:Qj,getActiveDateManager:(t,e)=>({date:e.value,referenceDate:e.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!t.isValid(n)?e.referenceValue:n})}),parseValueStr:(t,e,n)=>n(t.trim(),e)},lW=P.createContext();process.env.NODE_ENV!=="production"&&(c.node,c.bool);const hi=()=>P.useContext(lW)??!1,Rc=({props:t,value:e,timezone:n,adapter:r})=>{if(e===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:s,disablePast:a,disableFuture:l}=t,u=r.utils.date(void 0,n),f=Xr(r.utils,t.minDate,r.defaultDates.minDate),p=Xr(r.utils,t.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(e):return"invalidDate";case!!(o&&o(e)):return"shouldDisableDate";case!!(i&&i(e)):return"shouldDisableMonth";case!!(s&&s(e)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(e,u)):return"disableFuture";case!!(a&&r.utils.isBeforeDay(e,u)):return"disablePast";case!!(f&&r.utils.isBeforeDay(e,f)):return"minDate";case!!(p&&r.utils.isAfterDay(e,p)):return"maxDate";default:return null}};Rc.valueManager=jo;const nk=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],cW=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],uW=["minDateTime","maxDateTime"],dW=[...nk,...cW,...uW],rk=t=>dW.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{}),fW=t=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:ie({},t)}}}}),ok=t=>{const{utils:e,formatKey:n,contextTranslation:r,propsTranslation:o}=t;return i=>{const s=i!==null&&e.isValid(i)?e.format(i,n):null;return(o??r)(i,e,s)}},ik={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:t=>t==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(t,e,n,r)=>`Select ${t}. ${!r&&(e===null||!n.isValid(e))?"No time selected":`Selected time is ${r??n.format(e,"fullTime")}`}`,hoursClockNumberText:t=>`${t} hours`,minutesClockNumberText:t=>`${t} minutes`,secondsClockNumberText:t=>`${t} seconds`,selectViewText:t=>`Select ${t}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:t=>`Week ${t}`,calendarWeekNumberText:t=>`${t}`,openDatePickerDialogue:(t,e,n)=>n||t!==null&&e.isValid(t)?`Choose date, selected date is ${n??e.format(t,"fullDate")}`:"Choose date",openTimePickerDialogue:(t,e,n)=>n||t!==null&&e.isValid(t)?`Choose time, selected time is ${n??e.format(t,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:t=>"Y".repeat(t.digitAmount),fieldMonthPlaceholder:t=>t.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:t=>t.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},pW=ik;fW(ik);const Us=()=>{const t=P.useContext(Jd);if(t===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
128
+ `));if(t.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
129
+ `));const e=P.useMemo(()=>ie({},pW,t.localeText),[t.localeText]);return P.useMemo(()=>ie({},t,{localeText:e}),[t,e])},Qt=()=>Us().utils,Bc=()=>Us().defaultDates,vf=t=>{const e=Qt(),n=P.useRef(void 0);return n.current===void 0&&(n.current=e.date(void 0,t)),n.current};function sk(t){const{props:e,validator:n,value:r,timezone:o,onError:i}=t,s=Us(),a=P.useRef(n.valueManager.defaultErrorState),l=n({adapter:s,value:r,timezone:o,props:e}),u=n.valueManager.hasError(l);P.useEffect(()=>{i&&!n.valueManager.isSameError(l,a.current)&&i(l,r),a.current=l},[n,i,l,r]);const f=Ue(p=>n({adapter:s,value:p,timezone:o,props:e}));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:f}}const gi=()=>Us().localeText,hW=({utils:t,format:e})=>{let n=10,r=e,o=t.expandFormat(e);for(;o!==r;)if(r=o,o=t.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},gW=({utils:t,expandedFormat:e})=>{const n=[],{start:r,end:o}=t.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let s=null;for(;s=i.exec(e);)n.push({start:s.index,end:i.lastIndex-1});return n},mW=(t,e,n,r)=>{switch(n.type){case"year":return e.fieldYearPlaceholder({digitAmount:t.formatByString(t.date(void 0,"default"),r).length,format:r});case"month":return e.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return e.fieldDayPlaceholder({format:r});case"weekDay":return e.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return e.fieldHoursPlaceholder({format:r});case"minutes":return e.fieldMinutesPlaceholder({format:r});case"seconds":return e.fieldSecondsPlaceholder({format:r});case"meridiem":return e.fieldMeridiemPlaceholder({format:r});default:return r}},yW=({utils:t,date:e,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:s,startSeparator:a})=>{if(s==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=iy(t,s),u=XT(t,l.contentType,l.type,s),f=n?u:l.contentType==="digit",p=e!=null&&t.isValid(e);let g=p?t.formatByString(e,s):"",m=null;if(f)if(u)m=g===""?t.formatByString(i,s).length:g.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${s} should have a 'maxDigitNumber' property on it's adapter`);m=l.maxLength,p&&(g=sy(GT(qs(g,o),m),o))}return ie({},l,{format:s,maxLength:m,value:g,placeholder:mW(t,r,l,s),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:f,startSeparator:a,endSeparator:"",modified:!1})},bW=t=>{var m;const{utils:e,expandedFormat:n,escapedParts:r}=t,o=e.date(void 0),i=[];let s="";const a=Object.keys(e.formatTokenMap).sort((b,y)=>y.length-b.length),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${a.join("|")})*$`),f=new RegExp(`^(${a.join("|")})`),p=b=>r.find(y=>y.start<=b&&y.end>=b);let g=0;for(;g<n.length;){const b=p(g),y=b!=null,x=(m=l.exec(n.slice(g)))==null?void 0:m[1];if(!y&&x!=null&&u.test(x)){let w=x;for(;w.length>0;){const T=f.exec(w)[1];w=w.slice(T.length),i.push(yW(ie({},t,{now:o,token:T,startSeparator:s}))),s=""}g+=x.length}else{const w=n[g];y&&(b==null?void 0:b.start)===g||(b==null?void 0:b.end)===g||(i.length===0?s+=w:i[i.length-1].endSeparator+=w),g+=1}}return i.length===0&&s.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:s,endSeparator:"",modified:!1}),i},vW=({isRtl:t,formatDensity:e,sections:n})=>n.map(r=>{const o=i=>{let s=i;return t&&s!==null&&s.includes(" ")&&(s=`⁩${s}⁦`),e==="spacious"&&["/",".","-"].includes(s)&&(s=` ${s} `),s};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),ak=t=>{let e=hW(t);t.isRtl&&t.enableAccessibleFieldDOMStructure&&(e=e.split(" ").reverse().join(" "));const n=gW(ie({},t,{expandedFormat:e})),r=bW(ie({},t,{expandedFormat:e,escapedParts:n}));return vW(ie({},t,{sections:r}))},cy=({timezone:t,value:e,defaultValue:n,referenceDate:r,onChange:o,valueManager:i})=>{const s=Qt(),a=P.useRef(n),l=e??a.current??i.emptyValue,u=P.useMemo(()=>i.getTimezone(s,l),[s,i,l]),f=Ue(b=>u==null?b:i.setTimezone(s,u,b));let p;t?p=t:u?p=u:r?p=s.getTimezone(r):p="default";const g=P.useMemo(()=>i.setTimezone(s,p,l),[i,s,p,l]),m=Ue((b,...y)=>{const x=f(b);o==null||o(x,...y)});return{value:g,handleValueChange:m,timezone:p}},uy=({name:t,timezone:e,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:s})=>{const[a,l]=ui({name:t,state:"value",controlled:n,default:r??s.emptyValue}),u=Ue((f,...p)=>{l(f),i==null||i(f,...p)});return cy({timezone:e,value:a,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:s})},xW=t=>{const e=Qt(),n=gi(),r=Us(),o=hi(),{valueManager:i,fieldValueManager:s,valueType:a,validator:l,internalProps:u,internalProps:{value:f,defaultValue:p,referenceDate:g,onChange:m,format:b,formatDensity:y="dense",selectedSections:x,onSelectedSectionsChange:w,shouldRespectLeadingZeros:T=!1,timezone:_,enableAccessibleFieldDOMStructure:C=!1}}=t,{timezone:E,value:M,handleValueChange:A}=cy({timezone:_,value:f,defaultValue:p,referenceDate:g,onChange:m,valueManager:i}),I=P.useMemo(()=>Gj(e),[e]),L=P.useMemo(()=>eW(e,I,E),[e,I,E]),O=P.useCallback((oe,ye=null)=>s.getSectionsFromValue(e,oe,ye,de=>ak({utils:e,localeText:n,localizedDigits:I,format:b,date:de,formatDensity:y,shouldRespectLeadingZeros:T,enableAccessibleFieldDOMStructure:C,isRtl:o})),[s,b,n,I,o,T,e,y,C]),[D,F]=P.useState(()=>{const oe=O(M);QT(oe,a);const ye={sections:oe,value:M,referenceValue:i.emptyValue,tempValueStrAndroid:null},de=Wj(oe),X=i.getInitialReferenceValue({referenceDate:g,value:M,utils:e,props:u,granularity:de,timezone:E});return ie({},ye,{referenceValue:X})}),[V,z]=ui({controlled:x,default:null,name:"useField",state:"selectedSections"}),R=oe=>{z(oe),w==null||w(oe)},B=P.useMemo(()=>ly(V,D.sections),[V,D.sections]),U=B==="all"?0:B,K=({value:oe,referenceValue:ye,sections:de})=>{if(F(Q=>ie({},Q,{sections:de,value:oe,referenceValue:ye,tempValueStrAndroid:null})),i.areValuesEqual(e,D.value,oe))return;const X={validationError:l({adapter:r,value:oe,timezone:E,props:u})};A(oe,X)},Y=(oe,ye)=>{const de=[...D.sections];return de[oe]=ie({},de[oe],{value:ye,modified:!0}),de},G=()=>{K({value:i.emptyValue,referenceValue:D.referenceValue,sections:O(i.emptyValue)})},Z=()=>{if(U==null)return;const oe=D.sections[U],ye=s.getActiveDateManager(e,D,oe),X=ye.getSections(D.sections).filter(ne=>ne.value!=="").length===(oe.value===""?0:1),Q=Y(U,""),ae=X?null:e.getInvalidDate(),ve=ye.getNewValuesFromNewActiveDate(ae);K(ie({},ve,{sections:Q}))},ge=oe=>{const ye=(Q,ae)=>{const ve=e.parse(Q,b);if(ve==null||!e.isValid(ve))return null;const ne=ak({utils:e,localeText:n,localizedDigits:I,format:b,date:ve,formatDensity:y,shouldRespectLeadingZeros:T,enableAccessibleFieldDOMStructure:C,isRtl:o});return tk(e,ve,ne,ae,!1)},de=s.parseValueStr(oe,D.referenceValue,ye),X=s.updateReferenceValue(e,de,D.referenceValue);K({value:de,referenceValue:X,sections:O(de,D.sections)})},he=({activeSection:oe,newSectionValue:ye,shouldGoToNextSection:de})=>{de&&U<D.sections.length-1&&R(U+1);const X=s.getActiveDateManager(e,D,oe),Q=Y(U,ye),ae=X.getSections(Q),ve=Xj(e,ae,I);let ne,ce;if(ve!=null&&e.isValid(ve)){const fe=tk(e,ve,ae,X.referenceDate,!0);ne=X.getNewValuesFromNewActiveDate(fe),ce=!0}else ne=X.getNewValuesFromNewActiveDate(ve),ce=(ve!=null&&!e.isValid(ve))!=(X.date!=null&&!e.isValid(X.date));return ce?K(ie({},ne,{sections:Q})):F(fe=>ie({},fe,ne,{sections:Q,tempValueStrAndroid:null}))},me=oe=>F(ye=>ie({},ye,{tempValueStrAndroid:oe}));return P.useEffect(()=>{const oe=O(D.value);QT(oe,a),F(ye=>ie({},ye,{sections:oe}))},[b,e.locale,o]),P.useEffect(()=>{let oe;i.areValuesEqual(e,D.value,M)?oe=i.getTimezone(e,D.value)!==i.getTimezone(e,M):oe=!0,oe&&F(ye=>ie({},ye,{value:M,referenceValue:s.updateReferenceValue(e,M,ye.referenceValue),sections:O(M)}))},[M]),{state:D,activeSectionIndex:U,parsedSelectedSections:B,setSelectedSections:R,clearValue:G,clearActiveSection:Z,updateSectionValue:he,updateValueFromValueStr:ge,setTempAndroidValueStr:me,getSectionsFromValue:O,sectionsValueBoundaries:L,localizedDigits:I,timezone:E}},SW=5e3,Qa=t=>t.saveQuery!=null,wW=({sections:t,updateSectionValue:e,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const s=Qt(),[a,l]=P.useState(null),u=Ue(()=>l(null));P.useEffect(()=>{var b;a!=null&&((b=t[a.sectionIndex])==null?void 0:b.type)!==a.sectionType&&u()},[t,a,u]),P.useEffect(()=>{if(a!=null){const b=setTimeout(()=>u(),SW);return()=>{clearTimeout(b)}}return()=>{}},[a,u]);const f=({keyPressed:b,sectionIndex:y},x,w)=>{const T=b.toLowerCase(),_=t[y];if(a!=null&&(!w||w(a.value))&&a.sectionIndex===y){const E=`${a.value}${T}`,M=x(E,_);if(!Qa(M))return l({sectionIndex:y,value:E,sectionType:_.type}),M}const C=x(T,_);return Qa(C)&&!C.saveQuery?(u(),null):(l({sectionIndex:y,value:T,sectionType:_.type}),Qa(C)?null:C)},p=b=>{const y=(T,_,C)=>{const E=_.filter(M=>M.toLowerCase().startsWith(C));return E.length===0?{saveQuery:!1}:{sectionValue:E[0],shouldGoToNextSection:E.length===1}},x=(T,_,C,E)=>{const M=A=>qT(s,i,_.type,A);if(_.contentType==="letter")return y(_.format,M(_.format),T);if(C&&E!=null&&iy(s,C).contentType==="letter"){const A=M(C),I=y(C,A,T);return Qa(I)?{saveQuery:!1}:ie({},I,{sectionValue:E(I.sectionValue,A)})}return{saveQuery:!1}};return f(b,(T,_)=>{switch(_.type){case"month":{const C=E=>JT(s,E,s.formats.month,_.format);return x(T,_,s.formats.month,C)}case"weekDay":{const C=(E,M)=>M.indexOf(E).toString();return x(T,_,s.formats.weekday,C)}case"meridiem":return x(T,_);default:return{saveQuery:!1}}})},g=b=>{const y=(w,T)=>{const _=qs(w,r),C=Number(_),E=n[T.type]({currentDate:null,format:T.format,contentType:T.contentType});if(C>E.maximum)return{saveQuery:!1};if(C<E.minimum)return{saveQuery:!0};const M=C*10>E.maximum||_.length===E.maximum.toString().length;return{sectionValue:YT(s,C,E,r,T),shouldGoToNextSection:M}};return f(b,(w,T)=>{if(T.contentType==="digit"||T.contentType==="digit-with-letter")return y(w,T);if(T.type==="month"){XT(s,"digit","month","MM");const _=y(w,{type:T.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Qa(_))return _;const C=JT(s,_.sectionValue,"MM",T.format);return ie({},_,{sectionValue:C})}if(T.type==="weekDay"){const _=y(w,T);if(Qa(_))return _;const C=bf(s,T.format)[Number(_.sectionValue)-1];return ie({},_,{sectionValue:C})}return{saveQuery:!1}},w=>KT(w,r))};return{applyCharacterEditing:Ue(b=>{const y=t[b.sectionIndex],w=KT(b.keyPressed,r)?g(ie({},b,{keyPressed:sy(b.keyPressed,r)})):p(b);if(w==null){o(null);return}e({activeSection:y,newSectionValue:w.sectionValue,shouldGoToNextSection:w.shouldGoToNextSection})}),resetCharacterQuery:u}};function CW(t,e){return Array.isArray(e)?e.every(n=>t.indexOf(n)!==-1):t.indexOf(e)!==-1}const _W=(t,e)=>n=>{(n.key==="Enter"||n.key===" ")&&(t(n),n.preventDefault(),n.stopPropagation())},xr=(t=document)=>{const e=t.activeElement;return e?e.shadowRoot?xr(e.shadowRoot):e:null},TW="@media (pointer: fine)",kW=t=>{const{internalProps:{disabled:e,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:s,onInput:a,onPaste:l,focused:u,autoFocus:f=!1},fieldValueManager:p,applyCharacterEditing:g,resetCharacterQuery:m,setSelectedSections:b,parsedSelectedSections:y,state:x,clearActiveSection:w,clearValue:T,updateSectionValue:_,updateValueFromValueStr:C,sectionOrder:E,areAllSectionsEmpty:M,sectionsValueBoundaries:A}=t,I=P.useRef(null),L=Nt(r,I),O=gi(),D=Qt(),F=Bo(),[V,z]=P.useState(!1),R=P.useMemo(()=>({syncSelectionToDOM:()=>{if(!I.current)return;const ce=document.getSelection();if(!ce)return;if(y==null){ce.rangeCount>0&&I.current.getRoot().contains(ce.getRangeAt(0).startContainer)&&ce.removeAllRanges(),V&&I.current.getRoot().blur();return}if(!I.current.getRoot().contains(xr(document)))return;const fe=new window.Range;let xe;y==="all"?xe=I.current.getRoot():x.sections[y].type==="empty"?xe=I.current.getSectionContainer(y):xe=I.current.getSectionContent(y),fe.selectNodeContents(xe),xe.focus(),ce.removeAllRanges(),ce.addRange(fe)},getActiveSectionIndexFromDOM:()=>{const ce=xr(document);return!ce||!I.current||!I.current.getRoot().contains(ce)?null:I.current.getSectionIndexFromDOMElement(ce)},focusField:(ce=0)=>{if(!I.current||R.getActiveSectionIndexFromDOM()!=null)return;const fe=ly(ce,x.sections);z(!0),I.current.getSectionContent(fe).focus()},setSelectedSections:ce=>{if(!I.current)return;const fe=ly(ce,x.sections);z((fe==="all"?0:fe)!==null),b(ce)},isFieldFocused:()=>{const ce=xr(document);return!!I.current&&I.current.getRoot().contains(ce)}}),[y,b,x.sections,V]),B=Ue(ce=>{if(!I.current)return;const fe=x.sections[ce];I.current.getSectionContent(ce).innerHTML=fe.value||fe.placeholder,R.syncSelectionToDOM()}),U=Ue((ce,...fe)=>{ce.isDefaultPrevented()||!I.current||(z(!0),i==null||i(ce,...fe),y==="all"?setTimeout(()=>{const xe=document.getSelection().getRangeAt(0).startOffset;if(xe===0){b(E.startIndex);return}let Te=0,_e=0;for(;_e<xe&&Te<x.sections.length;){const Ne=x.sections[Te];Te+=1,_e+=`${Ne.startSeparator}${Ne.value||Ne.placeholder}${Ne.endSeparator}`.length}b(Te-1)}):V?I.current.getRoot().contains(ce.target)||b(E.startIndex):(z(!0),b(E.startIndex)))}),K=Ue(ce=>{if(a==null||a(ce),!I.current||y!=="all")return;const xe=ce.target.textContent??"";I.current.getRoot().innerHTML=x.sections.map(Te=>`${Te.startSeparator}${Te.value||Te.placeholder}${Te.endSeparator}`).join(""),R.syncSelectionToDOM(),xe.length===0||xe.charCodeAt(0)===10?(m(),T(),b("all")):xe.length>1?C(xe):(y==="all"&&b(0),g({keyPressed:xe,sectionIndex:0}))}),Y=Ue(ce=>{if(l==null||l(ce),n||y!=="all"){ce.preventDefault();return}const fe=ce.clipboardData.getData("text");ce.preventDefault(),m(),C(fe)}),G=Ue((...ce)=>{if(s==null||s(...ce),V||!I.current)return;z(!0),I.current.getSectionIndexFromDOMElement(xr(document))!=null||b(E.startIndex)}),Z=Ue((...ce)=>{o==null||o(...ce),setTimeout(()=>{if(!I.current)return;const fe=xr(document);!I.current.getRoot().contains(fe)&&(z(!1),b(null))})}),ge=Ue(ce=>fe=>{fe.isDefaultPrevented()||b(ce)}),he=Ue(ce=>{ce.preventDefault()}),me=Ue(ce=>()=>{b(ce)}),oe=Ue(ce=>{if(ce.preventDefault(),n||e||typeof y!="number")return;const fe=x.sections[y],xe=ce.clipboardData.getData("text"),Te=/^[a-zA-Z]+$/.test(xe),_e=/^[0-9]+$/.test(xe),Ne=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(xe);fe.contentType==="letter"&&Te||fe.contentType==="digit"&&_e||fe.contentType==="digit-with-letter"&&Ne?(m(),_({activeSection:fe,newSectionValue:xe,shouldGoToNextSection:!0})):!Te&&!_e&&(m(),C(xe))}),ye=Ue(ce=>{ce.preventDefault(),ce.dataTransfer.dropEffect="none"}),de=Ue(ce=>{if(!I.current)return;const fe=ce.target,xe=fe.textContent??"",Te=I.current.getSectionIndexFromDOMElement(fe),_e=x.sections[Te];if(n||!I.current){B(Te);return}if(xe.length===0){if(_e.value===""){B(Te);return}const Ne=ce.nativeEvent.inputType;if(Ne==="insertParagraph"||Ne==="insertLineBreak"){B(Te);return}m(),w();return}g({keyPressed:xe,sectionIndex:Te}),B(Te)});Fn(()=>{if(!(!V||!I.current)){if(y==="all")I.current.getRoot().focus();else if(typeof y=="number"){const ce=I.current.getSectionContent(y);ce&&ce.focus()}}},[y,V]);const X=P.useMemo(()=>x.sections.reduce((ce,fe)=>(ce[fe.type]=A[fe.type]({currentDate:null,contentType:fe.contentType,format:fe.format}),ce),{}),[A,x.sections]),Q=y==="all",ae=P.useMemo(()=>x.sections.map((ce,fe)=>{const xe=!Q&&!e&&!n;return{container:{"data-sectionindex":fe,onClick:ge(fe)},content:{tabIndex:Q||fe>0?-1:0,contentEditable:!Q&&!e&&!n,role:"spinbutton",id:`${F}-${ce.type}`,"aria-labelledby":`${F}-${ce.type}`,"aria-readonly":n,"aria-valuenow":iW(ce,D),"aria-valuemin":X[ce.type].minimum,"aria-valuemax":X[ce.type].maximum,"aria-valuetext":ce.value?oW(ce,D):O.empty,"aria-label":O[ce.type],"aria-disabled":e,spellCheck:xe?!1:void 0,autoCapitalize:xe?"off":void 0,autoCorrect:xe?"off":void 0,[parseInt(P.version,10)>=17?"enterKeyHint":"enterkeyhint"]:xe?"next":void 0,children:ce.value||ce.placeholder,onInput:de,onPaste:oe,onFocus:me(fe),onDragOver:ye,onMouseUp:he,inputMode:ce.contentType==="letter"?"text":"numeric"},before:{children:ce.startSeparator},after:{children:ce.endSeparator}}}),[x.sections,me,oe,ye,de,ge,he,e,n,Q,O,D,X,F]),ve=Ue(ce=>{C(ce.target.value)}),ne=P.useMemo(()=>M?"":p.getV7HiddenInputValueFromSections(x.sections),[M,x.sections,p]);return P.useEffect(()=>{if(I.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","<DatePicker slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
130
+ `));f&&I.current&&I.current.getSectionContent(E.startIndex).focus()},[]),{interactions:R,returnedValue:{autoFocus:f,readOnly:n,focused:u??V,sectionListRef:L,onBlur:Z,onClick:U,onFocus:G,onInput:K,onPaste:Y,enableAccessibleFieldDOMStructure:!0,elements:ae,tabIndex:y===0?-1:0,contentEditable:Q,value:ne,onChange:ve,areAllSectionsEmpty:M}}},el=t=>t.replace(/[\u2066\u2067\u2068\u2069]/g,""),EW=(t,e,n)=>{let r=0,o=n?1:0;const i=[];for(let s=0;s<t.length;s+=1){const a=t[s],l=ay(a,n?"input-rtl":"input-ltr",e),u=`${a.startSeparator}${l}${a.endSeparator}`,f=el(u).length,p=u.length,g=el(l),m=o+(g===""?0:l.indexOf(g[0]))+a.startSeparator.length,b=m+g.length;i.push(ie({},a,{start:r,end:r+f,startInInput:m,endInInput:b})),r+=f,o+=p}return i},OW=t=>{const e=hi(),n=P.useRef(void 0),r=P.useRef(void 0),{forwardedProps:{onFocus:o,onClick:i,onPaste:s,onBlur:a,inputRef:l,placeholder:u},internalProps:{readOnly:f=!1,disabled:p=!1},parsedSelectedSections:g,activeSectionIndex:m,state:b,fieldValueManager:y,valueManager:x,applyCharacterEditing:w,resetCharacterQuery:T,updateSectionValue:_,updateValueFromValueStr:C,clearActiveSection:E,clearValue:M,setTempAndroidValueStr:A,setSelectedSections:I,getSectionsFromValue:L,areAllSectionsEmpty:O,localizedDigits:D}=t,F=P.useRef(null),V=Nt(l,F),z=P.useMemo(()=>EW(b.sections,D,e),[b.sections,D,e]),R=P.useMemo(()=>({syncSelectionToDOM:()=>{if(!F.current)return;if(g==null){F.current.scrollLeft&&(F.current.scrollLeft=0);return}if(F.current!==xr(document))return;const de=F.current.scrollTop;if(g==="all")F.current.select();else{const X=z[g],Q=X.type==="empty"?X.startInInput-X.startSeparator.length:X.startInInput,ae=X.type==="empty"?X.endInInput+X.endSeparator.length:X.endInInput;(Q!==F.current.selectionStart||ae!==F.current.selectionEnd)&&F.current===xr(document)&&F.current.setSelectionRange(Q,ae),clearTimeout(r.current),r.current=setTimeout(()=>{F.current&&F.current===xr(document)&&F.current.selectionStart===F.current.selectionEnd&&(F.current.selectionStart!==Q||F.current.selectionEnd!==ae)&&R.syncSelectionToDOM()})}F.current.scrollTop=de},getActiveSectionIndexFromDOM:()=>{const de=F.current.selectionStart??0,X=F.current.selectionEnd??0;if(de===0&&X===0)return null;const Q=de<=z[0].startInInput?1:z.findIndex(ae=>ae.startInInput-ae.startSeparator.length>de);return Q===-1?z.length-1:Q-1},focusField:(de=0)=>{var X;xr(document)!==F.current&&((X=F.current)==null||X.focus(),I(de))},setSelectedSections:de=>I(de),isFieldFocused:()=>F.current===xr(document)}),[F,g,z,I]),B=()=>{const de=F.current.selectionStart??0;let X;de<=z[0].startInInput||de>=z[z.length-1].endInInput?X=1:X=z.findIndex(ae=>ae.startInInput-ae.startSeparator.length>de);const Q=X===-1?z.length-1:X-1;I(Q)},U=Ue((...de)=>{o==null||o(...de);const X=F.current;clearTimeout(n.current),n.current=setTimeout(()=>{!X||X!==F.current||m==null&&(X.value.length&&Number(X.selectionEnd)-Number(X.selectionStart)===X.value.length?I("all"):B())})}),K=Ue((de,...X)=>{de.isDefaultPrevented()||(i==null||i(de,...X),B())}),Y=Ue(de=>{if(s==null||s(de),de.preventDefault(),f||p)return;const X=de.clipboardData.getData("text");if(typeof g=="number"){const Q=b.sections[g],ae=/^[a-zA-Z]+$/.test(X),ve=/^[0-9]+$/.test(X),ne=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(X);if(Q.contentType==="letter"&&ae||Q.contentType==="digit"&&ve||Q.contentType==="digit-with-letter"&&ne){T(),_({activeSection:Q,newSectionValue:X,shouldGoToNextSection:!0});return}if(ae||ve)return}T(),C(X)}),G=Ue((...de)=>{a==null||a(...de),I(null)}),Z=Ue(de=>{if(f)return;const X=de.target.value;if(X===""){T(),M();return}const Q=de.nativeEvent.data,ae=Q&&Q.length>1,ve=ae?Q:X,ne=el(ve);if(g==="all"&&I(m),m==null||ae){C(ae?Q:ne);return}let ce;if(g==="all"&&ne.length===1)ce=ne;else{const fe=el(y.getV6InputValueFromSections(z,D,e));let xe=-1,Te=-1;for(let W=0;W<fe.length;W+=1)xe===-1&&fe[W]!==ne[W]&&(xe=W),Te===-1&&fe[fe.length-W-1]!==ne[ne.length-W-1]&&(Te=W);const _e=z[m];if(xe<_e.start||fe.length-Te-1>_e.end)return;const He=ne.length-fe.length+_e.end-el(_e.endSeparator||"").length;ce=ne.slice(_e.start+el(_e.startSeparator||"").length,He)}if(ce.length===0){nW()&&A(ve),T(),E();return}w({keyPressed:ce,sectionIndex:m})}),ge=P.useMemo(()=>u!==void 0?u:y.getV6InputValueFromSections(L(x.emptyValue),D,e),[u,y,L,x.emptyValue,D,e]),he=P.useMemo(()=>b.tempValueStrAndroid??y.getV6InputValueFromSections(b.sections,D,e),[b.sections,y,b.tempValueStrAndroid,D,e]);P.useEffect(()=>(F.current&&F.current===xr(document)&&I("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const me=P.useMemo(()=>m==null||b.sections[m].contentType==="letter"?"text":"numeric",[m,b.sections]),ye=!(F.current&&F.current===xr(document))&&O;return{interactions:R,returnedValue:{readOnly:f,onBlur:G,onClick:K,onFocus:U,onPaste:Y,inputRef:V,enableAccessibleFieldDOMStructure:!1,placeholder:ge,inputMode:me,autoComplete:"off",value:ye?"":he,onChange:Z}}},MW=t=>{const e=Qt(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:s=!1,readOnly:a=!1},forwardedProps:{onKeyDown:l,error:u,clearable:f,onClear:p},fieldValueManager:g,valueManager:m,validator:b}=t,y=hi(),x=xW(t),{state:w,activeSectionIndex:T,parsedSelectedSections:_,setSelectedSections:C,clearValue:E,clearActiveSection:M,updateSectionValue:A,setTempAndroidValueStr:I,sectionsValueBoundaries:L,localizedDigits:O,timezone:D}=x,F=wW({sections:w.sections,updateSectionValue:A,sectionsValueBoundaries:L,localizedDigits:O,setTempAndroidValueStr:I,timezone:D}),{resetCharacterQuery:V}=F,z=m.areValuesEqual(e,w.value,m.emptyValue),R=i?kW:OW,B=P.useMemo(()=>rW(w.sections,y&&!i),[w.sections,y,i]),{returnedValue:U,interactions:K}=R(ie({},t,x,F,{areAllSectionsEmpty:z,sectionOrder:B})),Y=Ue(oe=>{if(l==null||l(oe),!s)switch(!0){case((oe.ctrlKey||oe.metaKey)&&String.fromCharCode(oe.keyCode)==="A"&&!oe.shiftKey&&!oe.altKey):{oe.preventDefault(),C("all");break}case oe.key==="ArrowRight":{if(oe.preventDefault(),_==null)C(B.startIndex);else if(_==="all")C(B.endIndex);else{const ye=B.neighbors[_].rightIndex;ye!==null&&C(ye)}break}case oe.key==="ArrowLeft":{if(oe.preventDefault(),_==null)C(B.endIndex);else if(_==="all")C(B.startIndex);else{const ye=B.neighbors[_].leftIndex;ye!==null&&C(ye)}break}case oe.key==="Delete":{if(oe.preventDefault(),a)break;_==null||_==="all"?E():M(),V();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(oe.key):{if(oe.preventDefault(),a||T==null)break;_==="all"&&C(T);const ye=w.sections[T],de=g.getActiveDateManager(e,w,ye),X=Yj(e,D,ye,oe.key,L,O,de.date,{minutesStep:o});A({activeSection:ye,newSectionValue:X,shouldGoToNextSection:!1});break}}});Fn(()=>{K.syncSelectionToDOM()});const{hasValidationError:G}=sk({props:n,validator:b,timezone:D,value:w.value,onError:n.onError}),Z=P.useMemo(()=>u!==void 0?u:G,[G,u]);P.useEffect(()=>{!Z&&T==null&&V()},[w.referenceValue,T,Z]),P.useEffect(()=>{w.tempValueStrAndroid!=null&&T!=null&&(V(),M())},[w.sections]),P.useImperativeHandle(r,()=>({getSections:()=>w.sections,getActiveSectionIndex:K.getActiveSectionIndexFromDOM,setSelectedSections:K.setSelectedSections,focusField:K.focusField,isFieldFocused:K.isFieldFocused}));const ge=Ue((oe,...ye)=>{oe.preventDefault(),p==null||p(oe,...ye),E(),K.isFieldFocused()?C(B.startIndex):K.focusField(0)}),he={onKeyDown:Y,onClear:ge,error:Z,clearable:!!(f&&!z&&!a&&!s)},me={disabled:s,readOnly:a};return ie({},t.forwardedProps,he,me,U)};class xf{constructor(){fd(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new xf}static use(){const e=SC(xf.create).current,[n,r]=P.useState(!1);return e.shouldMount=n,e.setShouldMount=r,P.useEffect(e.mountEffect,[n]),e}mount(){return this.mounted||(this.mounted=IW(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...e)})}stop(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...e)})}pulsate(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...e)})}}function AW(){return xf.use()}function IW(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function lk(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:l,timeout:u}=t,[f,p]=P.useState(!1),g=ze(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},b=ze(n.child,f&&n.childLeaving,r&&n.childPulsate);return!a&&!f&&p(!0),P.useEffect(()=>{if(!a&&l!=null){const y=setTimeout(l,u);return()=>{clearTimeout(y)}}},[l,a,u]),v.jsx("span",{className:g,style:m,children:v.jsx("span",{className:b})})}process.env.NODE_ENV!=="production"&&(lk.propTypes={classes:c.object.isRequired,className:c.string,in:c.bool,onExited:c.func,pulsate:c.bool,rippleSize:c.number,rippleX:c.number,rippleY:c.number,timeout:c.number.isRequired});const Zr=tt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),dy=550,DW=80,PW=xo.keyframes`
131
+ 0% {
132
+ transform: scale(0);
133
+ opacity: 0.1;
134
+ }
135
+
136
+ 100% {
137
+ transform: scale(1);
138
+ opacity: 0.3;
139
+ }
140
+ `,NW=xo.keyframes`
141
+ 0% {
142
+ opacity: 1;
143
+ }
144
+
145
+ 100% {
146
+ opacity: 0;
147
+ }
148
+ `,LW=xo.keyframes`
149
+ 0% {
150
+ transform: scale(1);
151
+ }
152
+
153
+ 50% {
154
+ transform: scale(0.92);
155
+ }
156
+
157
+ 100% {
158
+ transform: scale(1);
159
+ }
160
+ `,$W=Se("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),FW=Se(lk,{name:"MuiTouchRipple",slot:"Ripple"})`
161
+ opacity: 0;
162
+ position: absolute;
163
+
164
+ &.${Zr.rippleVisible} {
165
+ opacity: 0.3;
166
+ transform: scale(1);
167
+ animation-name: ${PW};
168
+ animation-duration: ${dy}ms;
169
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
170
+ }
171
+
172
+ &.${Zr.ripplePulsate} {
173
+ animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
174
+ }
175
+
176
+ & .${Zr.child} {
177
+ opacity: 1;
178
+ display: block;
179
+ width: 100%;
180
+ height: 100%;
181
+ border-radius: 50%;
182
+ background-color: currentColor;
183
+ }
184
+
185
+ & .${Zr.childLeaving} {
186
+ opacity: 0;
187
+ animation-name: ${NW};
188
+ animation-duration: ${dy}ms;
189
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
190
+ }
191
+
192
+ & .${Zr.childPulsate} {
193
+ position: absolute;
194
+ /* @noflip */
195
+ left: 0px;
196
+ top: 0;
197
+ animation-name: ${LW};
198
+ animation-duration: 2500ms;
199
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
200
+ animation-iteration-count: infinite;
201
+ animation-delay: 200ms;
202
+ }
203
+ `,ck=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s,...a}=r,[l,u]=P.useState([]),f=P.useRef(0),p=P.useRef(null);P.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);const g=P.useRef(!1),m=wC(),b=P.useRef(null),y=P.useRef(null),x=P.useCallback(C=>{const{pulsate:E,rippleX:M,rippleY:A,rippleSize:I,cb:L}=C;u(O=>[...O,v.jsx(FW,{classes:{ripple:ze(i.ripple,Zr.ripple),rippleVisible:ze(i.rippleVisible,Zr.rippleVisible),ripplePulsate:ze(i.ripplePulsate,Zr.ripplePulsate),child:ze(i.child,Zr.child),childLeaving:ze(i.childLeaving,Zr.childLeaving),childPulsate:ze(i.childPulsate,Zr.childPulsate)},timeout:dy,pulsate:E,rippleX:M,rippleY:A,rippleSize:I},f.current)]),f.current+=1,p.current=L},[i]),w=P.useCallback((C={},E={},M=()=>{})=>{const{pulsate:A=!1,center:I=o||E.pulsate,fakeElement:L=!1}=E;if((C==null?void 0:C.type)==="mousedown"&&g.current){g.current=!1;return}(C==null?void 0:C.type)==="touchstart"&&(g.current=!0);const O=L?null:y.current,D=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,V,z;if(I||C===void 0||C.clientX===0&&C.clientY===0||!C.clientX&&!C.touches)F=Math.round(D.width/2),V=Math.round(D.height/2);else{const{clientX:R,clientY:B}=C.touches&&C.touches.length>0?C.touches[0]:C;F=Math.round(R-D.left),V=Math.round(B-D.top)}if(I)z=Math.sqrt((2*D.width**2+D.height**2)/3),z%2===0&&(z+=1);else{const R=Math.max(Math.abs((O?O.clientWidth:0)-F),F)*2+2,B=Math.max(Math.abs((O?O.clientHeight:0)-V),V)*2+2;z=Math.sqrt(R**2+B**2)}C!=null&&C.touches?b.current===null&&(b.current=()=>{x({pulsate:A,rippleX:F,rippleY:V,rippleSize:z,cb:M})},m.start(DW,()=>{b.current&&(b.current(),b.current=null)})):x({pulsate:A,rippleX:F,rippleY:V,rippleSize:z,cb:M})},[o,x,m]),T=P.useCallback(()=>{w({},{pulsate:!0})},[w]),_=P.useCallback((C,E)=>{if(m.clear(),(C==null?void 0:C.type)==="touchend"&&b.current){b.current(),b.current=null,m.start(0,()=>{_(C,E)});return}b.current=null,u(M=>M.length>0?M.slice(1):M),p.current=E},[m]);return P.useImperativeHandle(n,()=>({pulsate:T,start:w,stop:_}),[T,w,_]),v.jsx($W,{className:ze(Zr.root,i.root,s),ref:y,...a,children:v.jsx(Oc,{component:null,exit:!0,children:l})})});process.env.NODE_ENV!=="production"&&(ck.propTypes={center:c.bool,classes:c.object,className:c.string});function RW(t){return Qe("MuiButtonBase",t)}const BW=tt("MuiButtonBase",["root","disabled","focusVisible"]),VW=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,s=Ze({root:["root",e&&"disabled",n&&"focusVisible"]},RW,o);return n&&r&&(s.root+=` ${r}`),s},zW=Se("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.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"},[`&.${BW.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),tl=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:l="button",disabled:u=!1,disableRipple:f=!1,disableTouchRipple:p=!1,focusRipple:g=!1,focusVisibleClassName:m,LinkComponent:b="a",onBlur:y,onClick:x,onContextMenu:w,onDragLeave:T,onFocus:_,onFocusVisible:C,onKeyDown:E,onKeyUp:M,onMouseDown:A,onMouseLeave:I,onMouseUp:L,onTouchEnd:O,onTouchMove:D,onTouchStart:F,tabIndex:V=0,TouchRippleProps:z,touchRippleRef:R,type:B,...U}=r,K=P.useRef(null),Y=AW(),G=Nt(Y.ref,R),[Z,ge]=P.useState(!1);u&&Z&&ge(!1),P.useImperativeHandle(o,()=>({focusVisible:()=>{ge(!0),K.current.focus()}}),[]);const he=Y.shouldMount&&!f&&!u;P.useEffect(()=>{Z&&g&&!f&&Y.pulsate()},[f,g,Z,Y]);const me=mi(Y,"start",A,p),oe=mi(Y,"stop",w,p),ye=mi(Y,"stop",T,p),de=mi(Y,"stop",L,p),X=mi(Y,"stop",re=>{Z&&re.preventDefault(),I&&I(re)},p),Q=mi(Y,"start",F,p),ae=mi(Y,"stop",O,p),ve=mi(Y,"stop",D,p),ne=mi(Y,"stop",re=>{CC(re.target)||ge(!1),y&&y(re)},!1),ce=Ue(re=>{K.current||(K.current=re.currentTarget),CC(re.target)&&(ge(!0),C&&C(re)),_&&_(re)}),fe=()=>{const re=K.current;return l&&l!=="button"&&!(re.tagName==="A"&&re.href)},xe=Ue(re=>{g&&!re.repeat&&Z&&re.key===" "&&Y.stop(re,()=>{Y.start(re)}),re.target===re.currentTarget&&fe()&&re.key===" "&&re.preventDefault(),E&&E(re),re.target===re.currentTarget&&fe()&&re.key==="Enter"&&!u&&(re.preventDefault(),x&&x(re))}),Te=Ue(re=>{g&&re.key===" "&&Z&&!re.defaultPrevented&&Y.stop(re,()=>{Y.pulsate(re)}),M&&M(re),x&&re.target===re.currentTarget&&fe()&&re.key===" "&&!re.defaultPrevented&&x(re)});let _e=l;_e==="button"&&(U.href||U.to)&&(_e=b);const Ne={};_e==="button"?(Ne.type=B===void 0?"button":B,Ne.disabled=u):(!U.href&&!U.to&&(Ne.role="button"),u&&(Ne["aria-disabled"]=u));const He=Nt(n,K),W={...r,centerRipple:i,component:l,disabled:u,disableRipple:f,disableTouchRipple:p,focusRipple:g,tabIndex:V,focusVisible:Z},te=VW(W);return v.jsxs(zW,{as:_e,className:ze(te.root,a),ownerState:W,onBlur:ne,onClick:x,onContextMenu:oe,onFocus:ce,onKeyDown:xe,onKeyUp:Te,onMouseDown:me,onMouseLeave:X,onMouseUp:de,onDragLeave:ye,onTouchEnd:ae,onTouchMove:ve,onTouchStart:Q,ref:He,tabIndex:u?-1:V,type:B,...Ne,...U,children:[s,he?v.jsx(ck,{ref:G,center:i,...z}):null]})});function mi(t,e,n,r=!1){return Ue(o=>(n&&n(o),r||t[e](o),!0))}process.env.NODE_ENV!=="production"&&(tl.propTypes={action:En,centerRipple:c.bool,children:c.node,classes:c.object,className:c.string,component:Td,disabled:c.bool,disableRipple:c.bool,disableTouchRipple:c.bool,focusRipple:c.bool,focusVisibleClassName:c.string,href:c.any,LinkComponent:c.elementType,onBlur:c.func,onClick:c.func,onContextMenu:c.func,onDragLeave:c.func,onFocus:c.func,onFocusVisible:c.func,onKeyDown:c.func,onKeyUp:c.func,onMouseDown:c.func,onMouseLeave:c.func,onMouseUp:c.func,onTouchEnd:c.func,onTouchMove:c.func,onTouchStart:c.func,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),tabIndex:c.number,TouchRippleProps:c.object,touchRippleRef:c.oneOfType([c.func,c.shape({current:c.shape({pulsate:c.func.isRequired,start:c.func.isRequired,stop:c.func.isRequired})})]),type:c.oneOfType([c.oneOf(["button","reset","submit"]),c.string])});function HW(t){return Qe("MuiCircularProgress",t)}tt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Zi=44,fy=xo.keyframes`
204
+ 0% {
205
+ transform: rotate(0deg);
206
+ }
207
+
208
+ 100% {
209
+ transform: rotate(360deg);
210
+ }
211
+ `,py=xo.keyframes`
212
+ 0% {
213
+ stroke-dasharray: 1px, 200px;
214
+ stroke-dashoffset: 0;
215
+ }
216
+
217
+ 50% {
218
+ stroke-dasharray: 100px, 200px;
219
+ stroke-dashoffset: -15px;
220
+ }
221
+
222
+ 100% {
223
+ stroke-dasharray: 1px, 200px;
224
+ stroke-dashoffset: -126px;
225
+ }
226
+ `,jW=typeof fy!="string"?xo.css`
227
+ animation: ${fy} 1.4s linear infinite;
228
+ `:null,WW=typeof py!="string"?xo.css`
229
+ animation: ${py} 1.4s ease-in-out infinite;
230
+ `:null,qW=t=>{const{classes:e,variant:n,color:r,disableShrink:o}=t,i={root:["root",n,`color${$e(r)}`],svg:["svg"],circle:["circle",`circle${$e(n)}`,o&&"circleDisableShrink"]};return Ze(i,HW,e)},UW=Se("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${$e(n.color)}`]]}})(Vt(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:jW||{animation:`${fy} 1.4s linear infinite`}},...Object.entries(t.palette).filter(Qn()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),KW=Se("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),GW=Se("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${$e(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(Vt(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:WW||{animation:`${py} 1.4s ease-in-out infinite`}}]}))),hy=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:s=!1,size:a=40,style:l,thickness:u=3.6,value:f=0,variant:p="indeterminate",...g}=r,m={...r,color:i,disableShrink:s,size:a,thickness:u,value:f,variant:p},b=qW(m),y={},x={},w={};if(p==="determinate"){const T=2*Math.PI*((Zi-u)/2);y.strokeDasharray=T.toFixed(3),w["aria-valuenow"]=Math.round(f),y.strokeDashoffset=`${((100-f)/100*T).toFixed(3)}px`,x.transform="rotate(-90deg)"}return v.jsx(UW,{className:ze(b.root,o),style:{width:a,height:a,...x,...l},ownerState:m,ref:n,role:"progressbar",...w,...g,children:v.jsx(KW,{className:b.svg,ownerState:m,viewBox:`${Zi/2} ${Zi/2} ${Zi} ${Zi}`,children:v.jsx(GW,{className:b.circle,style:y,ownerState:m,cx:Zi,cy:Zi,r:(Zi-u)/2,fill:"none",strokeWidth:u})})})});process.env.NODE_ENV!=="production"&&(hy.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:si(c.bool,t=>t.disableShrink&&t.variant&&t.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});function YW(t){return Qe("MuiIconButton",t)}const uk=tt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),JW=t=>{const{classes:e,disabled:n,color:r,edge:o,size:i,loading:s}=t,a={root:["root",s&&"loading",n&&"disabled",r!=="default"&&`color${$e(r)}`,o&&`edge${$e(o)}`,`size${$e(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ze(a,YW,e)},XW=Se(tl,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.loading&&e.loading,n.color!=="default"&&e[`color${$e(n.color)}`],n.edge&&e[`edge${$e(n.edge)}`],e[`size${$e(n.size)}`]]}})(Vt(({theme:t})=>({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt(t.palette.action.active,t.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}}]})),Vt(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(Qn()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(Qn()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.vars?`rgba(${(t.vars||t).palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt((t.vars||t).palette[e].main,t.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${uk.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${uk.loading}`]:{color:"transparent"}}))),ZW=Se("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),nl=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:l=!1,disableFocusRipple:u=!1,size:f="medium",id:p,loading:g=null,loadingIndicator:m,...b}=r,y=Bo(p),x=m??v.jsx(hy,{"aria-labelledby":y,color:"inherit",size:16}),w={...r,edge:o,color:a,disabled:l,disableFocusRipple:u,loading:g,loadingIndicator:x,size:f},T=JW(w);return v.jsxs(XW,{id:g?y:p,className:ze(T.root,s),centerRipple:!0,focusRipple:!u,disabled:l||g,ref:n,...b,ownerState:w,children:[typeof g=="boolean"&&v.jsx("span",{className:T.loadingWrapper,style:{display:"contents"},children:v.jsx(ZW,{className:T.loadingIndicator,ownerState:w,children:g&&x})}),i]})});process.env.NODE_ENV!=="production"&&(nl.propTypes={children:si(c.node,t=>P.Children.toArray(t.children).some(n=>P.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
231
+ `)):null),classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),c.string]),disabled:c.bool,disableFocusRipple:c.bool,disableRipple:c.bool,edge:c.oneOf(["end","start",!1]),id:c.string,loading:c.bool,loadingIndicator:c.node,size:c.oneOfType([c.oneOf(["small","medium","large"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function QW(t){return Qe("MuiTypography",t)}tt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const e6={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},t6=W3(),n6=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=t,a={root:["root",i,t.align!=="inherit"&&`align${$e(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Ze(a,QW,s)},r6=Se("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${$e(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(Vt(({theme:t})=>{var e;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(t.palette).filter(Qn()).map(([n])=>({props:{color:n},style:{color:(t.vars||t).palette[n].main}})),...Object.entries(((e=t.palette)==null?void 0:e.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${$e(n)}`},style:{color:(t.vars||t).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),dk={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},yi=P.forwardRef(function(e,n){const{color:r,...o}=Et({props:e,name:"MuiTypography"}),i=!e6[r],s=t6({...o,...i&&{color:r}}),{align:a="inherit",className:l,component:u,gutterBottom:f=!1,noWrap:p=!1,paragraph:g=!1,variant:m="body1",variantMapping:b=dk,...y}=s,x={...s,align:a,color:r,className:l,component:u,gutterBottom:f,noWrap:p,paragraph:g,variant:m,variantMapping:b},w=u||(g?"p":b[m]||dk[m])||"span",T=n6(x);return v.jsx(r6,{as:w,ref:n,className:ze(T.root,l),...y,ownerState:x,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...y.style}})});process.env.NODE_ENV!=="production"&&(yi.propTypes={align:c.oneOf(["center","inherit","justify","left","right"]),children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),c.string]),component:c.elementType,gutterBottom:c.bool,noWrap:c.bool,paragraph:c.bool,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),c.string]),variantMapping:c.object});function o6(t){return Qe("MuiInputAdornment",t)}const fk=tt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var pk;const i6=(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${$e(n.position)}`],n.disablePointerEvents===!0&&e.disablePointerEvents,e[n.variant]]},s6=t=>{const{classes:e,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:s}=t,a={root:["root",n&&"disablePointerEvents",o&&`position${$e(o)}`,s,r&&"hiddenLabel",i&&`size${$e(i)}`]};return Ze(a,o6,e)},a6=Se("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:i6})(Vt(({theme:t})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${fk.positionStart}&:not(.${fk.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),gy=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiInputAdornment"}),{children:o,className:i,component:s="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:u,variant:f,...p}=r,g=To()||{};let m=f;f&&g.variant&&process.env.NODE_ENV!=="production"&&f===g.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),g&&!m&&(m=g.variant);const b={...r,hiddenLabel:g.hiddenLabel,size:g.size,disablePointerEvents:a,position:u,variant:m},y=s6(b);return v.jsx(Cc.Provider,{value:null,children:v.jsx(a6,{as:s,ownerState:b,className:ze(y.root,i),ref:n,...p,children:typeof o=="string"&&!l?v.jsx(yi,{color:"textSecondary",children:o}):v.jsxs(P.Fragment,{children:[u==="start"?pk||(pk=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});process.env.NODE_ENV!=="production"&&(gy.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,disablePointerEvents:c.bool,disableTypography:c.bool,position:c.oneOf(["end","start"]).isRequired,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOf(["filled","outlined","standard"])});const l6=Ke(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),c6=Ke(v.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),u6=Ke(v.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),d6=Ke(v.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");Ke(v.jsxs(P.Fragment,{children:[v.jsx("path",{d:"M11.99 2C6.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"}),v.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),Ke(v.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),Ke(v.jsxs(P.Fragment,{children:[v.jsx("path",{d:"M11.99 2C6.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"}),v.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const f6=Ke(v.jsx("path",{d:"M19 6.41 17.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"}),"Clear"),p6=["clearable","onClear","InputProps","sx","slots","slotProps"],h6=["ownerState"],g6=t=>{const e=gi(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:s,slotProps:a}=t,l=dt(t,p6),u=(s==null?void 0:s.clearButton)??nl,f=Mt({elementType:u,externalSlotProps:a==null?void 0:a.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:e.fieldClearLabel}}),p=dt(f,h6),g=(s==null?void 0:s.clearIcon)??f6,m=Mt({elementType:g,externalSlotProps:a==null?void 0:a.clearIcon,ownerState:{}});return ie({},l,{InputProps:ie({},o,{endAdornment:v.jsxs(P.Fragment,{children:[n&&v.jsx(gy,{position:"end",sx:{marginRight:o!=null&&o.endAdornment?-1:-1.5},children:v.jsx(u,ie({},p,{onClick:r,children:v.jsx(g,ie({fontSize:"small"},m))}))}),o==null?void 0:o.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},m6=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],y6=(t,e)=>P.useMemo(()=>{const n=ie({},t),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return m6.forEach(o),nk.forEach(o),{forwardedProps:n,internalProps:r}},[t,e]),b6=P.createContext(null);function hk(t){const{contextValue:e,localeText:n,children:r}=t;return v.jsx(b6.Provider,{value:e,children:v.jsx($m,{localeText:n,children:r})})}const v6=t=>{const e=Qt(),n=Bc();return ie({},t,{disablePast:t.disablePast??!1,disableFuture:t.disableFuture??!1,format:t.format??e.formats.keyboardDate,minDate:Xr(e,t.minDate,n.minDate),maxDate:Xr(e,t.maxDate,n.maxDate)})},x6=t=>{const e=v6(t),{forwardedProps:n,internalProps:r}=y6(e,"date");return MW({forwardedProps:n,internalProps:r,valueManager:jo,fieldValueManager:aW,validator:Rc,valueType:"date"})};function S6(t){return Qe("MuiPickersTextField",t)}tt("MuiPickersTextField",["root","focused","disabled","error","required"]);function w6(t){return Qe("MuiPickersInputBase",t)}const rl=tt("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function C6(t){return Qe("MuiPickersSectionList",t)}const Vc=tt("MuiPickersSectionList",["root","section","sectionContent"]),_6=["slots","slotProps","elements","sectionListRef"],gk=Se("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(t,e)=>e.root})({direction:"ltr /*! @noflip */",outline:"none"}),mk=Se("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(t,e)=>e.section})({}),yk=Se("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(t,e)=>e.sectionSeparator})({whiteSpace:"pre"}),bk=Se("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(t,e)=>e.sectionContent})({outline:"none"}),T6=t=>{const{classes:e}=t;return Ze({root:["root"],section:["section"],sectionContent:["sectionContent"]},C6,e)};function vk(t){const{slots:e,slotProps:n,element:r,classes:o}=t,i=(e==null?void 0:e.section)??mk,s=Mt({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),a=(e==null?void 0:e.sectionContent)??bk,l=Mt({elementType:a,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),u=(e==null?void 0:e.sectionSeparator)??yk,f=Mt({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),p=Mt({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return v.jsxs(i,ie({},s,{children:[v.jsx(u,ie({},f)),v.jsx(a,ie({},l)),v.jsx(u,ie({},p))]}))}process.env.NODE_ENV!=="production"&&(vk.propTypes={classes:c.object.isRequired,element:c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired}).isRequired,slotProps:c.object,slots:c.object});const xk=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:s,sectionListRef:a}=r,l=dt(r,_6),u=T6(r),f=P.useRef(null),p=Nt(n,f),g=y=>{if(!f.current)throw new Error(`MUI X: Cannot call sectionListRef.${y} before the mount of the component.`);return f.current};P.useImperativeHandle(a,()=>({getRoot(){return g("getRoot")},getSectionContainer(y){return g("getSectionContainer").querySelector(`.${Vc.section}[data-sectionindex="${y}"]`)},getSectionContent(y){return g("getSectionContent").querySelector(`.${Vc.section}[data-sectionindex="${y}"] .${Vc.sectionContent}`)},getSectionIndexFromDOMElement(y){const x=g("getSectionIndexFromDOMElement");if(y==null||!x.contains(y))return null;let w=null;return y.classList.contains(Vc.section)?w=y:y.classList.contains(Vc.sectionContent)&&(w=y.parentElement),w==null?null:Number(w.dataset.sectionindex)}}));const m=(o==null?void 0:o.root)??gk,b=Mt({elementType:m,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:p,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return v.jsx(m,ie({},b,{children:b.contentEditable?s.map(({content:y,before:x,after:w})=>`${x.children}${y.children}${w.children}`).join(""):v.jsx(P.Fragment,{children:s.map((y,x)=>v.jsx(vk,{slots:o,slotProps:i,element:y,classes:u},x))})}))});process.env.NODE_ENV!=="production"&&(xk.propTypes={classes:c.object,contentEditable:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object});const k6=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],E6=t=>Math.round(t*1e5)/1e5,Sf=Se("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>ie({},t.typography.body1,{color:(t.vars||t).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${E6(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),my=Se(gk,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})(({theme:t})=>({padding:"4px 0 5px",fontFamily:t.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:e,focused:n,filled:r,label:o})=>!e&&!n&&!r&&o==null,style:t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:t.palette.mode==="light"?.42:.5}}]})),O6=Se(mk,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(t,e)=>e.section})(({theme:t})=>({fontFamily:t.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),M6=Se(bk,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(t,e)=>e.content})(({theme:t})=>({fontFamily:t.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),A6=Se(yk,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(t,e)=>e.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),I6=Se("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(t,e)=>e.hiddenInput})(ie({},i5)),D6=t=>{const{focused:e,disabled:n,error:r,classes:o,fullWidth:i,readOnly:s,color:a,size:l,endAdornment:u,startAdornment:f}=t,p={root:["root",e&&!n&&"focused",n&&"disabled",s&&"readOnly",r&&"error",i&&"fullWidth",`color${$e(a)}`,l==="small"&&"inputSizeSmall",!!f&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Ze(p,w6,o)},wf=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:s,onChange:a,id:l,endAdornment:u,startAdornment:f,renderSuffix:p,slots:g,slotProps:m,contentEditable:b,tabIndex:y,onInput:x,onPaste:w,onKeyDown:T,name:_,readOnly:C,inputProps:E,inputRef:M,sectionListRef:A}=r,I=dt(r,k6),L=P.useRef(null),O=Nt(n,L),D=Nt(E==null?void 0:E.ref,M),F=hi(),V=To();if(!V)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const z=G=>{var Z;if(V.disabled){G.stopPropagation();return}(Z=V.onFocus)==null||Z.call(V,G)};P.useEffect(()=>{V&&V.setAdornedStart(!!f)},[V,f]),P.useEffect(()=>{V&&(i?V.onEmpty():V.onFilled())},[V,i]);const R=ie({},r,V,{isRtl:F}),B=D6(R),U=(g==null?void 0:g.root)||Sf,K=Mt({elementType:U,externalSlotProps:m==null?void 0:m.root,externalForwardedProps:I,additionalProps:{"aria-invalid":V.error,ref:O},className:B.root,ownerState:R}),Y=(g==null?void 0:g.input)||my;return v.jsxs(U,ie({},K,{children:[f,v.jsx(xk,{sectionListRef:A,elements:o,contentEditable:b,tabIndex:y,className:B.sectionsContainer,onFocus:z,onBlur:V.onBlur,onInput:x,onPaste:w,onKeyDown:T,slots:{root:Y,section:O6,sectionContent:M6,sectionSeparator:A6},slotProps:{root:{ownerState:R},sectionContent:{className:rl.sectionContent},sectionSeparator:({position:G})=>({className:G==="before"?rl.sectionBefore:rl.sectionAfter})}}),u,p?p(ie({},V)):null,v.jsx(I6,ie({name:_,className:B.input,value:s,onChange:a,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:C,required:V.required,disabled:V.disabled},E,{ref:D}))]}))});process.env.NODE_ENV!=="production"&&(wf.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,id:c.string,inputProps:c.object,inputRef:En,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired});function P6(t){return Qe("MuiPickersOutlinedInput",t)}const ko=ie({},rl,tt("MuiPickersOutlinedInput",["root","notchedOutline","input"])),N6=["children","className","label","notched","shrink"],L6=Se("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{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%",borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Sk=Se("span")(({theme:t})=>({fontFamily:t.typography.fontFamily,fontSize:"inherit"})),$6=Se("legend")(({theme:t})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]}));function F6(t){const{className:e,label:n}=t,r=dt(t,N6),o=n!=null&&n!=="",i=ie({},t,{withLabel:o});return v.jsx(L6,ie({"aria-hidden":!0,className:e},r,{ownerState:i,children:v.jsx($6,{ownerState:i,children:o?v.jsx(Sk,{children:n}):v.jsx(Sk,{className:"notranslate",children:"​"})})}))}const R6=["label","autoFocus","ownerState","notched"],B6=Se(Sf,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${ko.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${ko.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}},[`&.${ko.focused} .${ko.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${ko.disabled}`]:{[`& .${ko.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled},"*":{color:(t.vars||t).palette.action.disabled}},[`&.${ko.error} .${ko.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},variants:Object.keys((t.vars??t).palette).filter(n=>{var r;return((r=(t.vars??t).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{color:n},style:{[`&.${ko.focused}:not(.${ko.error}) .${ko.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}}))}}),V6=Se(my,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),z6=t=>{const{classes:e}=t,r=Ze({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},P6,e);return ie({},e,r)},yy=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:s}=r,a=dt(r,R6),l=To(),u=ie({},r,i,l,{color:(l==null?void 0:l.color)||"primary"}),f=z6(u);return v.jsx(wf,ie({slots:{root:B6,input:V6},renderSuffix:p=>v.jsx(F6,{shrink:!!(s||p.adornedStart||p.focused||p.filled),notched:!!(s||p.adornedStart||p.focused||p.filled),className:f.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?v.jsxs(P.Fragment,{children:[o," ","*"]}):o,ownerState:u})},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(yy.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,id:c.string,inputProps:c.object,inputRef:En,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,notched:c.bool,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired}),yy.muiName="Input";function Cf(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${t}; visit ${n} for the full message.`}function ol(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function wk(t){if(P.isValidElement(t)||ai.isValidElementType(t)||!ol(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=wk(t[n])}),e}function _f(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return ol(t)&&ol(e)&&Object.keys(e).forEach(o=>{P.isValidElement(e[o])||ai.isValidElementType(e[o])?r[o]=e[o]:ol(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&ol(t[o])?r[o]=_f(t[o],e[o],n):n.clone?r[o]=ol(e[o])?wk(e[o]):e[o]:r[o]=e[o]}),r}const H6=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function j6(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=t,i=H6(e),s=Object.keys(i);function a(g){return`@media (min-width:${typeof e[g]=="number"?e[g]:g}${n})`}function l(g){return`@media (max-width:${(typeof e[g]=="number"?e[g]:g)-r/100}${n})`}function u(g,m){const b=s.indexOf(m);return`@media (min-width:${typeof e[g]=="number"?e[g]:g}${n}) and (max-width:${(b!==-1&&typeof e[s[b]]=="number"?e[s[b]]:m)-r/100}${n})`}function f(g){return s.indexOf(g)+1<s.length?u(g,s[s.indexOf(g)+1]):a(g)}function p(g){const m=s.indexOf(g);return m===0?a(s[1]):m===s.length-1?l(s[m]):u(g,s[s.indexOf(g)+1]).replace("@media","@media not all and")}return{keys:s,values:i,up:a,down:l,between:u,only:f,not:p,unit:n,...o}}function Ck(t,e){if(!t.containerQueries)return e;const n=Object.keys(e).filter(r=>r.startsWith("@container")).sort((r,o)=>{var s,a;const i=/min-width:\s*([0-9.]+)/;return+(((s=r.match(i))==null?void 0:s[1])||0)-+(((a=o.match(i))==null?void 0:a[1])||0)});return n.length?n.reduce((r,o)=>{const i=e[o];return delete r[o],r[o]=i,r},{...e}):e}function W6(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function q6(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${e})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
232
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Cf(18,`(${e})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return t.containerQueries(o).up(i)}function U6(t){const e=(i,s)=>i.replace("@media",s?`@container ${s}`:"@container");function n(i,s){i.up=(...a)=>e(t.breakpoints.up(...a),s),i.down=(...a)=>e(t.breakpoints.down(...a),s),i.between=(...a)=>e(t.breakpoints.between(...a),s),i.only=(...a)=>e(t.breakpoints.only(...a),s),i.not=(...a)=>{const l=e(t.breakpoints.not(...a),s);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...t,containerQueries:o}}const K6={borderRadius:4},Qi=process.env.NODE_ENV!=="production"?c.oneOfType([c.number,c.string,c.object,c.array]):{};function zc(t,e){return e?_f(t,e,{clone:!1}):t}const Tf={xs:0,sm:600,md:900,lg:1200,xl:1536},_k={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${Tf[t]}px)`},G6={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:Tf[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function bi(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||_k;return e.reduce((s,a,l)=>(s[i.up(i.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const i=r.breakpoints||_k;return Object.keys(e).reduce((s,a)=>{if(W6(i.keys,a)){const l=q6(r.containerQueries?r:G6,a);l&&(s[l]=n(e[a],a))}else if(Object.keys(i.values||Tf).includes(a)){const l=i.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function Y6(t={}){var n;return((n=t.keys)==null?void 0:n.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function Tk(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function kk(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Cf(7));return t.charAt(0).toUpperCase()+t.slice(1)}function kf(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function Ef(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=kf(t,n)||r,e&&(o=e(o,r,t)),o}function Cn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,i=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,u=kf(l,r)||{};return bi(s,a,p=>{let g=Ef(u,o,p);return p===g&&typeof p=="string"&&(g=Ef(u,o,`${e}${p==="default"?"":kk(p)}`,p)),n===!1?g:{[n]:g}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:Qi}:{},i.filterProps=[e],i}function J6(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const X6={m:"margin",p:"padding"},Z6={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ek={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Q6=J6(t=>{if(t.length>2)if(Ek[t])t=Ek[t];else return[t];const[e,n]=t.split(""),r=X6[e],o=Z6[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Of=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Mf=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],eq=[...Of,...Mf];function Hc(t,e,n,r){const o=kf(t,e,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const s=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
233
+ `)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
234
+ `)));const a=o[s];return i>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
235
+ `)),()=>{})}function Ok(t){return Hc(t,"spacing",8,"spacing")}function jc(t,e){return typeof e=="string"||e==null?e:t(e)}function tq(t,e){return n=>t.reduce((r,o)=>(r[o]=jc(e,n),r),{})}function nq(t,e,n,r){if(!e.includes(n))return null;const o=Q6(n),i=tq(o,r),s=t[n];return bi(t,s,i)}function Mk(t,e){const n=Ok(t.theme);return Object.keys(t).map(r=>nq(t,e,r,n)).reduce(zc,{})}function pn(t){return Mk(t,Of)}pn.propTypes=process.env.NODE_ENV!=="production"?Of.reduce((t,e)=>(t[e]=Qi,t),{}):{},pn.filterProps=Of;function hn(t){return Mk(t,Mf)}hn.propTypes=process.env.NODE_ENV!=="production"?Mf.reduce((t,e)=>(t[e]=Qi,t),{}):{},hn.filterProps=Mf,process.env.NODE_ENV!=="production"&&eq.reduce((t,e)=>(t[e]=Qi,t),{});function rq(t=8,e=Ok({spacing:t})){if(t.mui)return t;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(i=>{const s=e(i);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function Af(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>e[i]?zc(o,e[i](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?t.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Qr(t){return typeof t!="number"?t:`${t}px solid`}function eo(t,e){return Cn({prop:t,themeKey:"borders",transform:e})}const oq=eo("border",Qr),iq=eo("borderTop",Qr),sq=eo("borderRight",Qr),aq=eo("borderBottom",Qr),lq=eo("borderLeft",Qr),cq=eo("borderColor"),uq=eo("borderTopColor"),dq=eo("borderRightColor"),fq=eo("borderBottomColor"),pq=eo("borderLeftColor"),hq=eo("outline",Qr),gq=eo("outlineColor"),If=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Hc(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:jc(e,r)});return bi(t,t.borderRadius,n)}return null};If.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Qi}:{},If.filterProps=["borderRadius"],Af(oq,iq,sq,aq,lq,cq,uq,dq,fq,pq,If,hq,gq);const Df=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Hc(t.theme,"spacing",8,"gap"),n=r=>({gap:jc(e,r)});return bi(t,t.gap,n)}return null};Df.propTypes=process.env.NODE_ENV!=="production"?{gap:Qi}:{},Df.filterProps=["gap"];const Pf=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Hc(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:jc(e,r)});return bi(t,t.columnGap,n)}return null};Pf.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Qi}:{},Pf.filterProps=["columnGap"];const Nf=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Hc(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:jc(e,r)});return bi(t,t.rowGap,n)}return null};Nf.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Qi}:{},Nf.filterProps=["rowGap"];const mq=Cn({prop:"gridColumn"}),yq=Cn({prop:"gridRow"}),bq=Cn({prop:"gridAutoFlow"}),vq=Cn({prop:"gridAutoColumns"}),xq=Cn({prop:"gridAutoRows"}),Sq=Cn({prop:"gridTemplateColumns"}),wq=Cn({prop:"gridTemplateRows"}),Cq=Cn({prop:"gridTemplateAreas"}),_q=Cn({prop:"gridArea"});Af(Df,Pf,Nf,mq,yq,bq,vq,xq,Sq,wq,Cq,_q);function il(t,e){return e==="grey"?e:t}const Tq=Cn({prop:"color",themeKey:"palette",transform:il}),kq=Cn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:il}),Eq=Cn({prop:"backgroundColor",themeKey:"palette",transform:il});Af(Tq,kq,Eq);function Lr(t){return t<=1&&t!==0?`${t*100}%`:t}const Oq=Cn({prop:"width",transform:Lr}),by=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var o,i,s,a,l;const r=((s=(i=(o=t.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:s[n])||Tf[n];return r?((l=(a=t.theme)==null?void 0:a.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${t.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Lr(n)}};return bi(t,t.maxWidth,e)}return null};by.filterProps=["maxWidth"];const Mq=Cn({prop:"minWidth",transform:Lr}),Aq=Cn({prop:"height",transform:Lr}),Iq=Cn({prop:"maxHeight",transform:Lr}),Dq=Cn({prop:"minHeight",transform:Lr});Cn({prop:"size",cssProperty:"width",transform:Lr}),Cn({prop:"size",cssProperty:"height",transform:Lr});const Pq=Cn({prop:"boxSizing"});Af(Oq,by,Mq,Aq,Iq,Dq,Pq);const Ak={border:{themeKey:"borders",transform:Qr},borderTop:{themeKey:"borders",transform:Qr},borderRight:{themeKey:"borders",transform:Qr},borderBottom:{themeKey:"borders",transform:Qr},borderLeft:{themeKey:"borders",transform:Qr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Qr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:If},color:{themeKey:"palette",transform:il},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:il},backgroundColor:{themeKey:"palette",transform:il},p:{style:hn},pt:{style:hn},pr:{style:hn},pb:{style:hn},pl:{style:hn},px:{style:hn},py:{style:hn},padding:{style:hn},paddingTop:{style:hn},paddingRight:{style:hn},paddingBottom:{style:hn},paddingLeft:{style:hn},paddingX:{style:hn},paddingY:{style:hn},paddingInline:{style:hn},paddingInlineStart:{style:hn},paddingInlineEnd:{style:hn},paddingBlock:{style:hn},paddingBlockStart:{style:hn},paddingBlockEnd:{style:hn},m:{style:pn},mt:{style:pn},mr:{style:pn},mb:{style:pn},ml:{style:pn},mx:{style:pn},my:{style:pn},margin:{style:pn},marginTop:{style:pn},marginRight:{style:pn},marginBottom:{style:pn},marginLeft:{style:pn},marginX:{style:pn},marginY:{style:pn},marginInline:{style:pn},marginInlineStart:{style:pn},marginInlineEnd:{style:pn},marginBlock:{style:pn},marginBlockStart:{style:pn},marginBlockEnd:{style:pn},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Df},rowGap:{style:Nf},columnGap:{style:Pf},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Lr},maxWidth:{style:by},minWidth:{transform:Lr},height:{transform:Lr},maxHeight:{transform:Lr},minHeight:{transform:Lr},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"}};function Nq(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function Lq(t,e){return typeof t=="function"?t(e):t}function $q(){function t(n,r,o,i){const s={[n]:r,theme:o},a=i[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:f,style:p}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const g=kf(o,u)||{};return p?p(s):bi(s,r,b=>{let y=Ef(g,f,b);return b===y&&typeof b=="string"&&(y=Ef(g,f,`${n}${b==="default"?"":kk(b)}`,b)),l===!1?y:{[l]:y}})}function e(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const s=o.unstable_sxConfig??Ak;function a(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const f=Y6(o.breakpoints),p=Object.keys(f);let g=f;return Object.keys(u).forEach(m=>{const b=Lq(u[m],o);if(b!=null)if(typeof b=="object")if(s[m])g=zc(g,t(m,b,o,s));else{const y=bi({theme:o},b,x=>({[m]:x}));Nq(y,b)?g[m]=e({sx:b,theme:o,nested:!0}):g=zc(g,y)}else g=zc(g,t(m,b,o,s))}),!i&&o.modularCssLayers?{"@layer sx":Ck(o,Tk(p,g))}:Ck(o,Tk(p,g))}return Array.isArray(r)?r.map(a):a(r)}return e}const Ik=$q();Ik.filterProps=["sx"];function Fq(t,e){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[t])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(t);return o==="&"?e:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:e})}return n.palette.mode===t?e:{}}function Rq(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...s}=t,a=j6(n),l=rq(o);let u=_f({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...K6,...i}},s);return u=U6(u),u.applyStyles=Fq,u=e.reduce((f,p)=>_f(f,p),u),u.unstable_sxConfig={...Ak,...s==null?void 0:s.unstable_sxConfig},u.unstable_sx=function(p){return Ik({sx:p,theme:this})},u}Rq();function Bq(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function Vq(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function zq(t,e=0,n=1){return process.env.NODE_ENV!=="production"&&(t<e||t>n)&&console.error(`MUI: The value provided ${t} is out of range [${e}, ${n}].`),Vq(t,e,n)}function Hq(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&t.length!==t.trim().length&&console.error(`MUI: The color: "${t}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Dk(t){if(t.type)return t;if(t.charAt(0)==="#")return Dk(Hq(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
236
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Cf(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=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(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
237
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Cf(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function jq(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):e.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function Wq(t,e){if(t=Dk(t),e=zq(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return jq(t)}function qq(t){return Qe("MuiPickersFilledInput",t)}const Ks=ie({},rl,tt("MuiPickersFilledInput",["root","underline","input"])),Uq=["label","autoFocus","disableUnderline","ownerState"],Kq=Se(Sf,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Bq(t)&&t!=="disableUnderline"})(({theme:t})=>{const e=t.palette.mode==="light",n=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=e?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=e?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=e?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r}},[`&.${Ks.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r},[`&.${Ks.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((t.vars??t).palette).filter(s=>(t.vars??t).palette[s].main).map(s=>{var a;return{props:{color:s,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(a=(t.vars||t).palette[s])==null?void 0:a.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ks.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ks.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ks.disabled}, .${Ks.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Ks.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:s})=>!!s,style:{paddingLeft:12}},{props:({endAdornment:s})=>!!s,style:{paddingRight:12}}]}}),Gq=Se(my,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:t})=>!!t,style:{paddingLeft:0}},{props:({endAdornment:t})=>!!t,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),Yq=t=>{const{classes:e,disableUnderline:n}=t,o=Ze({root:["root",!n&&"underline"],input:["input"]},qq,e);return ie({},e,o)},vy=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:s}=r,a=dt(r,Uq),l=To(),u=ie({},r,s,l,{color:(l==null?void 0:l.color)||"primary"}),f=Yq(u);return v.jsx(wf,ie({slots:{root:Kq,input:Gq},slotProps:{root:{disableUnderline:i}}},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(vy.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,disableUnderline:c.bool,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,hiddenLabel:c.bool,id:c.string,inputProps:c.object,inputRef:En,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired}),vy.muiName="Input";function Jq(t){return Qe("MuiPickersFilledInput",t)}const Wc=ie({},rl,tt("MuiPickersInput",["root","input"])),Xq=["label","autoFocus","disableUnderline","ownerState"],Zq=Se(Sf,{name:"MuiPickersInput",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{let n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((t.vars??t).palette).filter(r=>(t.vars??t).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Wc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Wc.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Wc.disabled}, .${Wc.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Wc.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),Qq=t=>{const{classes:e,disableUnderline:n}=t,o=Ze({root:["root",!n&&"underline"],input:["input"]},Jq,e);return ie({},e,o)},xy=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:s}=r,a=dt(r,Xq),l=To(),u=ie({},r,s,l,{disableUnderline:i,color:(l==null?void 0:l.color)||"primary"}),f=Qq(u);return v.jsx(wf,ie({slots:{root:Zq}},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(xy.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,disableUnderline:c.bool,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,id:c.string,inputProps:c.object,inputRef:En,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired}),xy.muiName="Input";const e9=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],t9={standard:xy,filled:vy,outlined:yy},n9=Se(Bm,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({maxWidth:"100%"}),r9=t=>{const{focused:e,disabled:n,classes:r,required:o}=t;return Ze({root:["root",e&&!n&&"focused",n&&"disabled",o&&"required"]},S6,r)},Pk=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:s,color:a="primary",disabled:l=!1,error:u=!1,variant:f="outlined",required:p=!1,InputProps:g,inputProps:m,inputRef:b,sectionListRef:y,elements:x,areAllSectionsEmpty:w,onClick:T,onKeyDown:_,onKeyUp:C,onPaste:E,onInput:M,endAdornment:A,startAdornment:I,tabIndex:L,contentEditable:O,focused:D,value:F,onChange:V,fullWidth:z,id:R,name:B,helperText:U,FormHelperTextProps:K,label:Y,InputLabelProps:G}=r,Z=dt(r,e9),ge=P.useRef(null),he=Nt(n,ge),me=Bo(R),oe=U&&me?`${me}-helper-text`:void 0,ye=Y&&me?`${me}-label`:void 0,de=ie({},r,{color:a,disabled:l,error:u,focused:D,required:p,variant:f}),X=r9(de),Q=t9[f];return v.jsxs(n9,ie({className:ze(X.root,s),ref:he,focused:D,onFocus:o,onBlur:i,disabled:l,variant:f,error:u,color:a,fullWidth:z,required:p,ownerState:de},Z,{children:[v.jsx(Rm,ie({htmlFor:me,id:ye},G,{children:Y})),v.jsx(Q,ie({elements:x,areAllSectionsEmpty:w,onClick:T,onKeyDown:_,onKeyUp:C,onInput:M,onPaste:E,endAdornment:A,startAdornment:I,tabIndex:L,contentEditable:O,value:F,onChange:V,id:me,fullWidth:z,inputProps:m,inputRef:b,sectionListRef:y,label:Y,name:B,role:"group","aria-labelledby":ye,"aria-describedby":oe,"aria-live":oe?"polite":void 0},g)),U&&v.jsx(Vm,ie({id:oe},K,{children:U}))]}))});process.env.NODE_ENV!=="production"&&(Pk.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,color:c.oneOf(["error","info","primary","secondary","success","warning"]),component:c.elementType,contentEditable:c.bool.isRequired,disabled:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,error:c.bool.isRequired,focused:c.bool,FormHelperTextProps:c.object,fullWidth:c.bool,helperText:c.node,hiddenLabel:c.bool,id:c.string,InputLabelProps:c.object,inputProps:c.object,InputProps:c.object,inputRef:En,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onBlur:c.func.isRequired,onChange:c.func.isRequired,onClick:c.func.isRequired,onFocus:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,readOnly:c.bool,required:c.bool,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),size:c.oneOf(["medium","small"]),startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired,variant:c.oneOf(["filled","outlined","standard"])});const o9=["enableAccessibleFieldDOMStructure"],i9=["InputProps","readOnly"],s9=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],a9=t=>{let{enableAccessibleFieldDOMStructure:e}=t,n=dt(t,o9);if(e){const{InputProps:p,readOnly:g}=n,m=dt(n,i9);return ie({},m,{InputProps:ie({},p??{},{readOnly:g})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:s,InputProps:a,inputProps:l,inputRef:u}=n,f=dt(n,s9);return ie({},f,{InputProps:ie({},a??{},{readOnly:s}),inputProps:ie({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})},l9=["slots","slotProps","InputProps","inputProps"],Lf=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:s,inputProps:a}=r,l=dt(r,l9),u=r,f=(o==null?void 0:o.textField)??(e.enableAccessibleFieldDOMStructure?Pk:zT),p=Mt({elementType:f,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:u});p.inputProps=ie({},a,p.inputProps),p.InputProps=ie({},s,p.InputProps);const g=x6(p),m=a9(g),b=g6(ie({},m,{slots:o,slotProps:i}));return v.jsx(f,ie({},b))});process.env.NODE_ENV!=="production"&&(Lf.propTypes={autoFocus:c.bool,className:c.string,clearable:c.bool,color:c.oneOf(["error","info","primary","secondary","success","warning"]),component:c.elementType,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disablePast:c.bool,enableAccessibleFieldDOMStructure:c.bool,focused:c.bool,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),FormHelperTextProps:c.object,fullWidth:c.bool,helperText:c.node,hiddenLabel:c.bool,id:c.string,InputLabelProps:c.object,inputProps:c.object,InputProps:c.object,inputRef:En,label:c.node,margin:c.oneOf(["dense","none","normal"]),maxDate:c.object,minDate:c.object,name:c.string,onBlur:c.func,onChange:c.func,onClear:c.func,onError:c.func,onFocus:c.func,onSelectedSectionsChange:c.func,readOnly:c.bool,referenceDate:c.object,required:c.bool,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,shouldRespectLeadingZeros:c.bool,size:c.oneOf(["medium","small"]),slotProps:c.object,slots:c.object,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,unstableFieldRef:c.oneOfType([c.func,c.object]),value:c.object,variant:c.oneOf(["filled","outlined","standard"])});var $f={exports:{}},c9=$f.exports,Nk;function u9(){return Nk||(Nk=1,function(t,e){(function(n,r){t.exports=r()})(c9,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(i,s,a){var l=s.prototype;a.utc=function(y){var x={date:y,utc:!0,args:arguments};return new s(x)},l.utc=function(y){var x=a(this.toDate(),{locale:this.$L,utc:!0});return y?x.add(this.utcOffset(),n):x},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(y){y.utc&&(this.$u=!0),this.$utils().u(y.$offset)||(this.$offset=y.$offset),u.call(this,y)};var f=l.init;l.init=function(){if(this.$u){var y=this.$d;this.$y=y.getUTCFullYear(),this.$M=y.getUTCMonth(),this.$D=y.getUTCDate(),this.$W=y.getUTCDay(),this.$H=y.getUTCHours(),this.$m=y.getUTCMinutes(),this.$s=y.getUTCSeconds(),this.$ms=y.getUTCMilliseconds()}else f.call(this)};var p=l.utcOffset;l.utcOffset=function(y,x){var w=this.$utils().u;if(w(y))return this.$u?0:w(this.$offset)?p.call(this):this.$offset;if(typeof y=="string"&&(y=function(E){E===void 0&&(E="");var M=E.match(r);if(!M)return null;var A=(""+M[0]).match(o)||["-",0,0],I=A[0],L=60*+A[1]+ +A[2];return L===0?0:I==="+"?L:-L}(y),y===null))return this;var T=Math.abs(y)<=16?60*y:y,_=this;if(x)return _.$offset=T,_.$u=y===0,_;if(y!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(_=this.local().add(T+C,n)).$offset=T,_.$x.$localOffset=C}else _=this.utc();return _};var g=l.format;l.format=function(y){var x=y||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return g.call(this,x)},l.valueOf=function(){var y=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*y},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var m=l.toDate;l.toDate=function(y){return y==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var b=l.diff;l.diff=function(y,x,w){if(y&&this.$u===y.$u)return b.call(this,y,x,w);var T=this.local(),_=a(y).local();return b.call(T,_,x,w)}}})}($f)),$f.exports}var d9=u9();const f9=cr(d9);On.extend(f9);const Lk=n_({themeId:yc});function p9(t){return Qe("MuiPickersToolbar",t)}tt("MuiPickersToolbar",["root","content"]);const h9=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],g9=t=>{const{classes:e}=t;return Ze({root:["root"],content:["content"]},p9,e)},m9=Se("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),y9=Se("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(t,e)=>e.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),b9=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:s,hidden:a,titleId:l}=r,u=dt(r,h9),f=r,p=g9(f);return a?null:v.jsxs(m9,ie({ref:n,className:ze(p.root,i),ownerState:f},u,{children:[v.jsx(yi,{color:"text.secondary",variant:"overline",id:l,children:s}),v.jsx(y9,{className:p.content,ownerState:f,children:o})]}))});function v9(t){return Qe("MuiDatePickerToolbar",t)}tt("MuiDatePickerToolbar",["root","title"]);const x9=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],S9=t=>{const{classes:e}=t;return Ze({root:["root"],title:["title"]},v9,e)},w9=Se(b9,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),C9=Se(yi,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(t,e)=>e.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),$k=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:s,toolbarPlaceholder:a="––",views:l,className:u}=r,f=dt(r,x9),p=Qt(),g=gi(),m=S9(r),b=P.useMemo(()=>{if(!o)return a;const x=oy(p,{format:s,views:l},!0);return p.formatByString(o,x)},[o,s,a,p,l]),y=r;return v.jsx(w9,ie({ref:n,toolbarTitle:g.datePickerToolbarTitle,isLandscape:i,className:ze(m.root,u)},f,{children:v.jsx(C9,{variant:"h4",align:i?"left":"center",ownerState:y,className:m.title,children:b})}))});process.env.NODE_ENV!=="production"&&($k.propTypes={classes:c.object,className:c.string,disabled:c.bool,hidden:c.bool,isLandscape:c.bool.isRequired,onChange:c.func.isRequired,onViewChange:c.func.isRequired,readOnly:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),titleId:c.string,toolbarFormat:c.string,toolbarPlaceholder:c.node,value:c.object,view:c.oneOf(["day","month","year"]).isRequired,views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired).isRequired});function Fk(t,e){const n=Qt(),r=Bc(),o=Zt({props:t,name:e}),i=P.useMemo(()=>{var s;return((s=o.localeText)==null?void 0:s.toolbarTitle)==null?o.localeText:ie({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return ie({},o,{localeText:i},$j({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Xr(n,o.minDate,r.minDate),maxDate:Xr(n,o.maxDate,r.maxDate),slots:ie({toolbar:$k},o.slots)})}var Sr="top",to="bottom",no="right",wr="left",Sy="auto",qc=[Sr,to,no,wr],sl="start",Uc="end",_9="clippingParents",Rk="viewport",Kc="popper",T9="reference",Bk=qc.reduce(function(t,e){return t.concat([e+"-"+sl,e+"-"+Uc])},[]),Vk=[].concat(qc,[Sy]).reduce(function(t,e){return t.concat([e,e+"-"+sl,e+"-"+Uc])},[]),k9="beforeRead",E9="read",O9="afterRead",M9="beforeMain",A9="main",I9="afterMain",D9="beforeWrite",P9="write",N9="afterWrite",L9=[k9,E9,O9,M9,A9,I9,D9,P9,N9];function Wo(t){return t?(t.nodeName||"").toLowerCase():null}function $r(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Gs(t){var e=$r(t).Element;return t instanceof e||t instanceof Element}function ro(t){var e=$r(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function wy(t){if(typeof ShadowRoot>"u")return!1;var e=$r(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function $9(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!ro(i)||!Wo(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function F9(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!ro(o)||!Wo(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const zk={name:"applyStyles",enabled:!0,phase:"write",fn:$9,effect:F9,requires:["computeStyles"]};function qo(t){return t.split("-")[0]}var Ys=Math.max,Ff=Math.min,al=Math.round;function Cy(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Hk(){return!/^((?!chrome|android).)*safari/i.test(Cy())}function ll(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&ro(t)&&(o=t.offsetWidth>0&&al(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&al(r.height)/t.offsetHeight||1);var s=Gs(t)?$r(t):window,a=s.visualViewport,l=!Hk()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/o,f=(r.top+(l&&a?a.offsetTop:0))/i,p=r.width/o,g=r.height/i;return{width:p,height:g,top:f,right:u+p,bottom:f+g,left:u,x:u,y:f}}function _y(t){var e=ll(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function jk(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&wy(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function vi(t){return $r(t).getComputedStyle(t)}function R9(t){return["table","td","th"].indexOf(Wo(t))>=0}function es(t){return((Gs(t)?t.ownerDocument:t.document)||window.document).documentElement}function Rf(t){return Wo(t)==="html"?t:t.assignedSlot||t.parentNode||(wy(t)?t.host:null)||es(t)}function Wk(t){return!ro(t)||vi(t).position==="fixed"?null:t.offsetParent}function B9(t){var e=/firefox/i.test(Cy()),n=/Trident/i.test(Cy());if(n&&ro(t)){var r=vi(t);if(r.position==="fixed")return null}var o=Rf(t);for(wy(o)&&(o=o.host);ro(o)&&["html","body"].indexOf(Wo(o))<0;){var i=vi(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Gc(t){for(var e=$r(t),n=Wk(t);n&&R9(n)&&vi(n).position==="static";)n=Wk(n);return n&&(Wo(n)==="html"||Wo(n)==="body"&&vi(n).position==="static")?e:n||B9(t)||e}function Ty(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Yc(t,e,n){return Ys(t,Ff(e,n))}function V9(t,e,n){var r=Yc(t,e,n);return r>n?n:r}function qk(){return{top:0,right:0,bottom:0,left:0}}function Uk(t){return Object.assign({},qk(),t)}function Kk(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var z9=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,Uk(typeof e!="number"?e:Kk(e,qc))};function H9(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=qo(n.placement),l=Ty(a),u=[wr,no].indexOf(a)>=0,f=u?"height":"width";if(!(!i||!s)){var p=z9(o.padding,n),g=_y(i),m=l==="y"?Sr:wr,b=l==="y"?to:no,y=n.rects.reference[f]+n.rects.reference[l]-s[l]-n.rects.popper[f],x=s[l]-n.rects.reference[l],w=Gc(i),T=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,_=y/2-x/2,C=p[m],E=T-g[f]-p[b],M=T/2-g[f]/2+_,A=Yc(C,M,E),I=l;n.modifiersData[r]=(e={},e[I]=A,e.centerOffset=A-M,e)}}function j9(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||jk(e.elements.popper,o)&&(e.elements.arrow=o))}const W9={name:"arrow",enabled:!0,phase:"main",fn:H9,effect:j9,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function cl(t){return t.split("-")[1]}var q9={top:"auto",right:"auto",bottom:"auto",left:"auto"};function U9(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:al(n*o)/o||0,y:al(r*o)/o||0}}function Gk(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,f=t.roundOffsets,p=t.isFixed,g=s.x,m=g===void 0?0:g,b=s.y,y=b===void 0?0:b,x=typeof f=="function"?f({x:m,y}):{x:m,y};m=x.x,y=x.y;var w=s.hasOwnProperty("x"),T=s.hasOwnProperty("y"),_=wr,C=Sr,E=window;if(u){var M=Gc(n),A="clientHeight",I="clientWidth";if(M===$r(n)&&(M=es(n),vi(M).position!=="static"&&a==="absolute"&&(A="scrollHeight",I="scrollWidth")),M=M,o===Sr||(o===wr||o===no)&&i===Uc){C=to;var L=p&&M===E&&E.visualViewport?E.visualViewport.height:M[A];y-=L-r.height,y*=l?1:-1}if(o===wr||(o===Sr||o===to)&&i===Uc){_=no;var O=p&&M===E&&E.visualViewport?E.visualViewport.width:M[I];m-=O-r.width,m*=l?1:-1}}var D=Object.assign({position:a},u&&q9),F=f===!0?U9({x:m,y},$r(n)):{x:m,y};if(m=F.x,y=F.y,l){var V;return Object.assign({},D,(V={},V[C]=T?"0":"",V[_]=w?"0":"",V.transform=(E.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",V))}return Object.assign({},D,(e={},e[C]=T?y+"px":"",e[_]=w?m+"px":"",e.transform="",e))}function K9(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:qo(e.placement),variation:cl(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Gk(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Gk(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const G9={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:K9,data:{}};var Bf={passive:!0};function Y9(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,a=s===void 0?!0:s,l=$r(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(f){f.addEventListener("scroll",n.update,Bf)}),a&&l.addEventListener("resize",n.update,Bf),function(){i&&u.forEach(function(f){f.removeEventListener("scroll",n.update,Bf)}),a&&l.removeEventListener("resize",n.update,Bf)}}const J9={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Y9,data:{}};var X9={left:"right",right:"left",bottom:"top",top:"bottom"};function Vf(t){return t.replace(/left|right|bottom|top/g,function(e){return X9[e]})}var Z9={start:"end",end:"start"};function Yk(t){return t.replace(/start|end/g,function(e){return Z9[e]})}function ky(t){var e=$r(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ey(t){return ll(es(t)).left+ky(t).scrollLeft}function Q9(t,e){var n=$r(t),r=es(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var u=Hk();(u||!u&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+Ey(t),y:l}}function eU(t){var e,n=es(t),r=ky(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=Ys(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Ys(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+Ey(t),l=-r.scrollTop;return vi(o||n).direction==="rtl"&&(a+=Ys(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function Oy(t){var e=vi(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Jk(t){return["html","body","#document"].indexOf(Wo(t))>=0?t.ownerDocument.body:ro(t)&&Oy(t)?t:Jk(Rf(t))}function Jc(t,e){var n;e===void 0&&(e=[]);var r=Jk(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=$r(r),s=o?[i].concat(i.visualViewport||[],Oy(r)?r:[]):r,a=e.concat(s);return o?a:a.concat(Jc(Rf(s)))}function My(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function tU(t,e){var n=ll(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Xk(t,e,n){return e===Rk?My(Q9(t,n)):Gs(e)?tU(e,n):My(eU(es(t)))}function nU(t){var e=Jc(Rf(t)),n=["absolute","fixed"].indexOf(vi(t).position)>=0,r=n&&ro(t)?Gc(t):t;return Gs(r)?e.filter(function(o){return Gs(o)&&jk(o,r)&&Wo(o)!=="body"}):[]}function rU(t,e,n,r){var o=e==="clippingParents"?nU(t):[].concat(e),i=[].concat(o,[n]),s=i[0],a=i.reduce(function(l,u){var f=Xk(t,u,r);return l.top=Ys(f.top,l.top),l.right=Ff(f.right,l.right),l.bottom=Ff(f.bottom,l.bottom),l.left=Ys(f.left,l.left),l},Xk(t,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Zk(t){var e=t.reference,n=t.element,r=t.placement,o=r?qo(r):null,i=r?cl(r):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(o){case Sr:l={x:s,y:e.y-n.height};break;case to:l={x:s,y:e.y+e.height};break;case no:l={x:e.x+e.width,y:a};break;case wr:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=o?Ty(o):null;if(u!=null){var f=u==="y"?"height":"width";switch(i){case sl:l[u]=l[u]-(e[f]/2-n[f]/2);break;case Uc:l[u]=l[u]+(e[f]/2-n[f]/2);break}}return l}function Xc(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.strategy,s=i===void 0?t.strategy:i,a=n.boundary,l=a===void 0?_9:a,u=n.rootBoundary,f=u===void 0?Rk:u,p=n.elementContext,g=p===void 0?Kc:p,m=n.altBoundary,b=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,w=Uk(typeof x!="number"?x:Kk(x,qc)),T=g===Kc?T9:Kc,_=t.rects.popper,C=t.elements[b?T:g],E=rU(Gs(C)?C:C.contextElement||es(t.elements.popper),l,f,s),M=ll(t.elements.reference),A=Zk({reference:M,element:_,placement:o}),I=My(Object.assign({},_,A)),L=g===Kc?I:M,O={top:E.top-L.top+w.top,bottom:L.bottom-E.bottom+w.bottom,left:E.left-L.left+w.left,right:L.right-E.right+w.right},D=t.modifiersData.offset;if(g===Kc&&D){var F=D[o];Object.keys(O).forEach(function(V){var z=[no,to].indexOf(V)>=0?1:-1,R=[Sr,to].indexOf(V)>=0?"y":"x";O[V]+=F[R]*z})}return O}function oU(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Vk:l,f=cl(r),p=f?a?Bk:Bk.filter(function(b){return cl(b)===f}):qc,g=p.filter(function(b){return u.indexOf(b)>=0});g.length===0&&(g=p);var m=g.reduce(function(b,y){return b[y]=Xc(t,{placement:y,boundary:o,rootBoundary:i,padding:s})[qo(y)],b},{});return Object.keys(m).sort(function(b,y){return m[b]-m[y]})}function iU(t){if(qo(t)===Sy)return[];var e=Vf(t);return[Yk(t),e,Yk(e)]}function sU(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,f=n.boundary,p=n.rootBoundary,g=n.altBoundary,m=n.flipVariations,b=m===void 0?!0:m,y=n.allowedAutoPlacements,x=e.options.placement,w=qo(x),T=w===x,_=l||(T||!b?[Vf(x)]:iU(x)),C=[x].concat(_).reduce(function(me,oe){return me.concat(qo(oe)===Sy?oU(e,{placement:oe,boundary:f,rootBoundary:p,padding:u,flipVariations:b,allowedAutoPlacements:y}):oe)},[]),E=e.rects.reference,M=e.rects.popper,A=new Map,I=!0,L=C[0],O=0;O<C.length;O++){var D=C[O],F=qo(D),V=cl(D)===sl,z=[Sr,to].indexOf(F)>=0,R=z?"width":"height",B=Xc(e,{placement:D,boundary:f,rootBoundary:p,altBoundary:g,padding:u}),U=z?V?no:wr:V?to:Sr;E[R]>M[R]&&(U=Vf(U));var K=Vf(U),Y=[];if(i&&Y.push(B[F]<=0),a&&Y.push(B[U]<=0,B[K]<=0),Y.every(function(me){return me})){L=D,I=!1;break}A.set(D,Y)}if(I)for(var G=b?3:1,Z=function(oe){var ye=C.find(function(de){var X=A.get(de);if(X)return X.slice(0,oe).every(function(Q){return Q})});if(ye)return L=ye,"break"},ge=G;ge>0;ge--){var he=Z(ge);if(he==="break")break}e.placement!==L&&(e.modifiersData[r]._skip=!0,e.placement=L,e.reset=!0)}}const aU={name:"flip",enabled:!0,phase:"main",fn:sU,requiresIfExists:["offset"],data:{_skip:!1}};function Qk(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function eE(t){return[Sr,no,to,wr].some(function(e){return t[e]>=0})}function lU(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=Xc(e,{elementContext:"reference"}),a=Xc(e,{altBoundary:!0}),l=Qk(s,r),u=Qk(a,o,i),f=eE(l),p=eE(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}const cU={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:lU};function uU(t,e,n){var r=qo(t),o=[wr,Sr].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[wr,no].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function dU(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=Vk.reduce(function(f,p){return f[p]=uU(p,e.rects,i),f},{}),a=s[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}const fU={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:dU};function pU(t){var e=t.state,n=t.name;e.modifiersData[n]=Zk({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const hU={name:"popperOffsets",enabled:!0,phase:"read",fn:pU,data:{}};function gU(t){return t==="x"?"y":"x"}function mU(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,f=n.altBoundary,p=n.padding,g=n.tether,m=g===void 0?!0:g,b=n.tetherOffset,y=b===void 0?0:b,x=Xc(e,{boundary:l,rootBoundary:u,padding:p,altBoundary:f}),w=qo(e.placement),T=cl(e.placement),_=!T,C=Ty(w),E=gU(C),M=e.modifiersData.popperOffsets,A=e.rects.reference,I=e.rects.popper,L=typeof y=="function"?y(Object.assign({},e.rects,{placement:e.placement})):y,O=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(M){if(i){var V,z=C==="y"?Sr:wr,R=C==="y"?to:no,B=C==="y"?"height":"width",U=M[C],K=U+x[z],Y=U-x[R],G=m?-I[B]/2:0,Z=T===sl?A[B]:I[B],ge=T===sl?-I[B]:-A[B],he=e.elements.arrow,me=m&&he?_y(he):{width:0,height:0},oe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:qk(),ye=oe[z],de=oe[R],X=Yc(0,A[B],me[B]),Q=_?A[B]/2-G-X-ye-O.mainAxis:Z-X-ye-O.mainAxis,ae=_?-A[B]/2+G+X+de+O.mainAxis:ge+X+de+O.mainAxis,ve=e.elements.arrow&&Gc(e.elements.arrow),ne=ve?C==="y"?ve.clientTop||0:ve.clientLeft||0:0,ce=(V=D==null?void 0:D[C])!=null?V:0,fe=U+Q-ce-ne,xe=U+ae-ce,Te=Yc(m?Ff(K,fe):K,U,m?Ys(Y,xe):Y);M[C]=Te,F[C]=Te-U}if(a){var _e,Ne=C==="x"?Sr:wr,He=C==="x"?to:no,W=M[E],te=E==="y"?"height":"width",re=W+x[Ne],Me=W-x[He],Ie=[Sr,wr].indexOf(w)!==-1,De=(_e=D==null?void 0:D[E])!=null?_e:0,je=Ie?re:W-A[te]-I[te]-De+O.altAxis,ot=Ie?W+A[te]+I[te]-De-O.altAxis:Me,nt=m&&Ie?V9(je,W,ot):Yc(m?je:re,W,m?ot:Me);M[E]=nt,F[E]=nt-W}e.modifiersData[r]=F}}const yU={name:"preventOverflow",enabled:!0,phase:"main",fn:mU,requiresIfExists:["offset"]};function bU(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function vU(t){return t===$r(t)||!ro(t)?ky(t):bU(t)}function xU(t){var e=t.getBoundingClientRect(),n=al(e.width)/t.offsetWidth||1,r=al(e.height)/t.offsetHeight||1;return n!==1||r!==1}function SU(t,e,n){n===void 0&&(n=!1);var r=ro(e),o=ro(e)&&xU(e),i=es(e),s=ll(t,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Wo(e)!=="body"||Oy(i))&&(a=vU(e)),ro(e)?(l=ll(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=Ey(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function wU(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&o(l)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function CU(t){var e=wU(t);return L9.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function _U(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function TU(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var tE={placement:"bottom",modifiers:[],strategy:"absolute"};function nE(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function kU(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?tE:o;return function(a,l,u){u===void 0&&(u=i);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},tE,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},p=[],g=!1,m={state:f,setOptions:function(w){var T=typeof w=="function"?w(f.options):w;y(),f.options=Object.assign({},i,f.options,T),f.scrollParents={reference:Gs(a)?Jc(a):a.contextElement?Jc(a.contextElement):[],popper:Jc(l)};var _=CU(TU([].concat(r,f.options.modifiers)));return f.orderedModifiers=_.filter(function(C){return C.enabled}),b(),m.update()},forceUpdate:function(){if(!g){var w=f.elements,T=w.reference,_=w.popper;if(nE(T,_)){f.rects={reference:SU(T,Gc(_),f.options.strategy==="fixed"),popper:_y(_)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(O){return f.modifiersData[O.name]=Object.assign({},O.data)});for(var C=0;C<f.orderedModifiers.length;C++){if(f.reset===!0){f.reset=!1,C=-1;continue}var E=f.orderedModifiers[C],M=E.fn,A=E.options,I=A===void 0?{}:A,L=E.name;typeof M=="function"&&(f=M({state:f,options:I,name:L,instance:m})||f)}}}},update:_U(function(){return new Promise(function(x){m.forceUpdate(),x(f)})}),destroy:function(){y(),g=!0}};if(!nE(a,l))return m;m.setOptions(u).then(function(x){!g&&u.onFirstUpdate&&u.onFirstUpdate(x)});function b(){f.orderedModifiers.forEach(function(x){var w=x.name,T=x.options,_=T===void 0?{}:T,C=x.effect;if(typeof C=="function"){var E=C({state:f,name:w,instance:m,options:_}),M=function(){};p.push(E||M)}})}function y(){p.forEach(function(x){return x()}),p=[]}return m}}var EU=[J9,hU,G9,zk,fU,aU,yU,W9,cU],rE=kU({defaultModifiers:EU});function OU(t){return Qe("MuiPopper",t)}tt("MuiPopper",["root"]);function MU(t,e){if(e==="ltr")return t;switch(t){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 t}}function zf(t){return typeof t=="function"?t():t}function Hf(t){return t.nodeType!==void 0}function AU(t){return!Hf(t)}const IU=t=>{const{classes:e}=t;return Ze({root:["root"]},OU,e)},DU={},PU=P.forwardRef(function(e,n){const{anchorEl:r,children:o,direction:i,disablePortal:s,modifiers:a,open:l,placement:u,popperOptions:f,popperRef:p,slotProps:g={},slots:m={},TransitionProps:b,ownerState:y,...x}=e,w=P.useRef(null),T=Nt(w,n),_=P.useRef(null),C=Nt(_,p),E=P.useRef(C);Fn(()=>{E.current=C},[C]),P.useImperativeHandle(p,()=>_.current,[]);const M=MU(u,i),[A,I]=P.useState(M),[L,O]=P.useState(zf(r));P.useEffect(()=>{_.current&&_.current.forceUpdate()}),P.useEffect(()=>{r&&O(zf(r))},[r]),Fn(()=>{if(!L||!l)return;const R=K=>{I(K.placement)};if(process.env.NODE_ENV!=="production"&&L&&Hf(L)&&L.nodeType===1){const K=L.getBoundingClientRect();process.env.NODE_ENV!=="test"&&K.top===0&&K.left===0&&K.right===0&&K.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
238
+ `))}let B=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:K})=>{R(K)}}];a!=null&&(B=B.concat(a)),f&&f.modifiers!=null&&(B=B.concat(f.modifiers));const U=rE(L,w.current,{placement:M,...f,modifiers:B});return E.current(U),()=>{U.destroy(),E.current(null)}},[L,s,a,l,f,M]);const D={placement:A};b!==null&&(D.TransitionProps=b);const F=IU(e),V=m.root??"div",z=Mt({elementType:V,externalSlotProps:g.root,externalForwardedProps:x,additionalProps:{role:"tooltip",ref:T},ownerState:e,className:F.root});return v.jsx(V,{...z,children:typeof o=="function"?o(D):o})}),oE=P.forwardRef(function(e,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:u,open:f,placement:p="bottom",popperOptions:g=DU,popperRef:m,style:b,transition:y=!1,slotProps:x={},slots:w={},...T}=e,[_,C]=P.useState(!0),E=()=>{C(!1)},M=()=>{C(!0)};if(!l&&!f&&(!y||_))return null;let A;if(i)A=i;else if(r){const O=zf(r);A=O&&Hf(O)?Zn(O).body:Zn(null).body}const I=!f&&l&&(!y||_)?"none":void 0,L=y?{in:f,onEnter:E,onExited:M}:void 0;return v.jsx(Dc,{disablePortal:a,container:A,children:v.jsx(PU,{anchorEl:r,direction:s,disablePortal:a,modifiers:u,ref:n,open:y?!_:f,placement:p,popperOptions:g,popperRef:m,slotProps:x,slots:w,...T,style:{position:"fixed",top:0,left:0,display:I,...b},TransitionProps:L,children:o})})});process.env.NODE_ENV!=="production"&&(oE.propTypes={anchorEl:si(c.oneOfType([li,c.object,c.func]),t=>{if(t.open){const e=zf(t.anchorEl);if(e&&Hf(e)&&e.nodeType===1){const n=e.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
239
+ `))}else if(!e||typeof e.getBoundingClientRect!="function"||AU(e)&&e.contextElement!=null&&e.contextElement.nodeType!==1)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
240
+ `))}return null}),children:c.oneOfType([c.node,c.func]),container:c.oneOfType([li,c.func]),direction:c.oneOf(["ltr","rtl"]),disablePortal:c.bool,keepMounted:c.bool,modifiers:c.arrayOf(c.shape({data:c.object,effect:c.func,enabled:c.bool,fn:c.func,name:c.any,options:c.object,phase:c.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:c.arrayOf(c.string),requiresIfExists:c.arrayOf(c.string)})),open:c.bool.isRequired,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:c.shape({modifiers:c.array,onFirstUpdate:c.func,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:c.oneOf(["absolute","fixed"])}),popperRef:En,slotProps:c.shape({root:c.oneOfType([c.func,c.object])}),slots:c.shape({root:c.elementType}),transition:c.bool});const NU=Se(oE,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),iE=P.forwardRef(function(e,n){const r=i_(),o=Et({props:e,name:"MuiPopper"}),{anchorEl:i,component:s,components:a,componentsProps:l,container:u,disablePortal:f,keepMounted:p,modifiers:g,open:m,placement:b,popperOptions:y,popperRef:x,transition:w,slots:T,slotProps:_,...C}=o,E=(T==null?void 0:T.root)??(a==null?void 0:a.Root),M={anchorEl:i,container:u,disablePortal:f,keepMounted:p,modifiers:g,open:m,placement:b,popperOptions:y,popperRef:x,transition:w,...C};return v.jsx(NU,{as:s,direction:r?"rtl":"ltr",slots:{root:E},slotProps:_??l,...M,ref:n})});process.env.NODE_ENV!=="production"&&(iE.propTypes={anchorEl:c.oneOfType([li,c.object,c.func]),children:c.oneOfType([c.node,c.func]),component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.oneOfType([c.func,c.object])}),container:c.oneOfType([li,c.func]),disablePortal:c.bool,keepMounted:c.bool,modifiers:c.arrayOf(c.shape({data:c.object,effect:c.func,enabled:c.bool,fn:c.func,name:c.any,options:c.object,phase:c.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:c.arrayOf(c.string),requiresIfExists:c.arrayOf(c.string)})),open:c.bool.isRequired,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:c.shape({modifiers:c.array,onFirstUpdate:c.func,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:c.oneOf(["absolute","fixed"])}),popperRef:En,slotProps:c.shape({root:c.oneOfType([c.func,c.object])}),slots:c.shape({root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),transition:c.bool});function LU(t){return Qe("MuiPickersPopper",t)}tt("MuiPickersPopper",["root","paper"]);const $U="@media (prefers-reduced-motion: reduce)",ul=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),sE=ul&&ul[1]?parseInt(ul[1],10):null,aE=ul&&ul[2]?parseInt(ul[2],10):null,FU=sE&&sE<10||aE&&aE<13||!1,lE=()=>Lk($U,{defaultMatches:!1})||FU,RU=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],BU=t=>{const{classes:e}=t;return Ze({root:["root"],paper:["paper"]},LU,e)},VU=Se(iE,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({zIndex:t.zIndex.modal})),zU=Se(Ws,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(t,e)=>e.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:t})=>["top","top-start","top-end"].includes(t),style:{transformOrigin:"bottom center"}}]});function HU(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function jU(t,e){const n=P.useRef(!1),r=P.useRef(!1),o=P.useRef(null),i=P.useRef(!1);P.useEffect(()=>{if(!t)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[t]);const s=Ue(l=>{if(!i.current)return;const u=r.current;r.current=!1;const f=Zn(o.current);if(!o.current||"clientX"in l&&HU(l,f))return;if(n.current){n.current=!1;return}let p;l.composedPath?p=l.composedPath().indexOf(o.current)>-1:p=!f.documentElement.contains(l.target)||o.current.contains(l.target),!p&&!u&&e(l)}),a=()=>{r.current=!0};return P.useEffect(()=>{if(t){const l=Zn(o.current),u=()=>{n.current=!0};return l.addEventListener("touchstart",s),l.addEventListener("touchmove",u),()=>{l.removeEventListener("touchstart",s),l.removeEventListener("touchmove",u)}}},[t,s]),P.useEffect(()=>{if(t){const l=Zn(o.current);return l.addEventListener("click",s),()=>{l.removeEventListener("click",s),r.current=!1}}},[t,s]),[o,a,a]}const WU=P.forwardRef((t,e)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:s,paperClasses:a,onPaperClick:l,onPaperTouchStart:u}=t,f=dt(t,RU),p=ie({},o,{placement:r}),g=Mt({elementType:n,externalSlotProps:s,additionalProps:{tabIndex:-1,elevation:8,ref:e},className:a,ownerState:p});return v.jsx(n,ie({},f,g,{onClick:m=>{var b;l(m),(b=g.onClick)==null||b.call(g,m)},onTouchStart:m=>{var b;u(m),(b=g.onTouchStart)==null||b.call(g,m)},ownerState:p,children:i}))});function qU(t){const e=Zt({props:t,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:s,onDismiss:a,open:l,role:u,placement:f,slots:p,slotProps:g,reduceAnimations:m}=e;P.useEffect(()=>{function R(B){l&&B.key==="Escape"&&a()}return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R)}},[a,l]);const b=P.useRef(null);P.useEffect(()=>{u==="tooltip"||i&&!i()||(l?b.current=xr(document):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[l,u,i]);const[y,x,w]=jU(l,s??a),T=P.useRef(null),_=Nt(T,o),C=Nt(_,y),E=e,M=BU(E),A=lE(),I=m??A,L=R=>{R.key==="Escape"&&(R.stopPropagation(),a())},O=(p==null?void 0:p.desktopTransition)??I?Xi:Mc,D=(p==null?void 0:p.desktopTrapFocus)??Ic,F=(p==null?void 0:p.desktopPaper)??zU,V=(p==null?void 0:p.popper)??VU,z=Mt({elementType:V,externalSlotProps:g==null?void 0:g.popper,additionalProps:{transition:!0,role:u,open:l,anchorEl:n,placement:f,onKeyDown:L},className:M.root,ownerState:e});return v.jsx(V,ie({},z,{children:({TransitionProps:R,placement:B})=>v.jsx(D,ie({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},g==null?void 0:g.desktopTrapFocus,{children:v.jsx(O,ie({},R,g==null?void 0:g.desktopTransition,{children:v.jsx(WU,{PaperComponent:F,ownerState:E,popperPlacement:B,ref:C,onPaperClick:x,onPaperTouchStart:w,paperClasses:M.paper,paperSlotProps:g==null?void 0:g.desktopPaper,children:r})}))}))}))}const UU=({open:t,onOpen:e,onClose:n})=>{const r=P.useRef(typeof t=="boolean").current,[o,i]=P.useState(!1);P.useEffect(()=>{if(r){if(typeof t!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(t)}},[r,t]);const s=P.useCallback(a=>{r||i(a),a&&e&&e(),!a&&n&&n()},[r,e,n]);return{isOpen:o,setIsOpen:s}},KU=t=>{const{action:e,hasChanged:n,dateState:r,isControlled:o}=t,i=!o&&!r.hasBeenModifiedSinceMount;return e.name==="setValueFromField"?!0:e.name==="setValueFromAction"?i&&["accept","today","clear"].includes(e.pickerAction)?!0:n(r.lastPublishedValue):e.name==="setValueFromView"&&e.selectionState!=="shallow"||e.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},GU=t=>{const{action:e,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=t,s=!o&&!r.hasBeenModifiedSinceMount;return e.name==="setValueFromAction"?s&&["accept","today","clear"].includes(e.pickerAction)?!0:n(r.lastCommittedValue):e.name==="setValueFromView"&&e.selectionState==="finish"&&i?s?!0:n(r.lastCommittedValue):e.name==="setValueFromShortcut"?e.changeImportance==="accept"&&n(r.lastCommittedValue):!1},YU=t=>{const{action:e,closeOnSelect:n}=t;return e.name==="setValueFromAction"?!0:e.name==="setValueFromView"?e.selectionState==="finish"&&n:e.name==="setValueFromShortcut"?e.changeImportance==="accept":!1},JU=({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:s,value:a,defaultValue:l,closeOnSelect:u=r==="desktop",timezone:f,referenceDate:p}=t,{current:g}=P.useRef(l),{current:m}=P.useRef(a!==void 0),[b,y]=P.useState(f);process.env.NODE_ENV!=="production"&&(P.useEffect(()=>{m!==(a!==void 0)&&console.error([`MUI X: A component is changing the ${m?"":"un"}controlled value of a picker to be ${m?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).","Decide between using a controlled or uncontrolled valuefor the lifetime of the component.","The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
241
+ `))},[a]),P.useEffect(()=>{!m&&g!==l&&console.error(["MUI X: A component is changing the defaultValue of an uncontrolled picker after being initialized. To suppress this warning opt to use a controlled value."].join(`
242
+ `))},[JSON.stringify(g)]));const x=Qt(),w=Us(),{isOpen:T,setIsOpen:_}=UU(t),{timezone:C,value:E,handleValueChange:M}=cy({timezone:f,value:a,defaultValue:g,referenceDate:p,onChange:s,valueManager:e}),[A,I]=P.useState(()=>{let Q;return E!==void 0?Q=E:g!==void 0?Q=g:Q=e.emptyValue,{draft:Q,lastPublishedValue:Q,lastCommittedValue:Q,lastControlledValue:a,hasBeenModifiedSinceMount:!1}}),L=e.getTimezone(x,A.draft);b!==f&&(y(f),f&&L&&f!==L&&I(Q=>ie({},Q,{draft:e.setTimezone(x,f,Q.draft)})));const{getValidationErrorForNewValue:O}=sk({props:t,validator:o,timezone:C,value:A.draft,onError:t.onError}),D=Ue(Q=>{const ae={action:Q,dateState:A,hasChanged:Te=>!e.areValuesEqual(x,Q.value,Te),isControlled:m,closeOnSelect:u},ve=KU(ae),ne=GU(ae),ce=YU(ae);I(Te=>ie({},Te,{draft:Q.value,lastPublishedValue:ve?Q.value:Te.lastPublishedValue,lastCommittedValue:ne?Q.value:Te.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let fe=null;const xe=()=>(fe||(fe={validationError:Q.name==="setValueFromField"?Q.context.validationError:O(Q.value)},Q.name==="setValueFromShortcut"&&(fe.shortcut=Q.shortcut)),fe);ve&&M(Q.value,xe()),ne&&i&&i(Q.value,xe()),ce&&_(!1)});if(A.lastControlledValue!==a){const Q=e.areValuesEqual(x,A.draft,E);I(ae=>ie({},ae,{lastControlledValue:a},Q?{}:{lastCommittedValue:E,lastPublishedValue:E,draft:E,hasBeenModifiedSinceMount:!0}))}const F=Ue(()=>{D({value:e.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),V=Ue(()=>{D({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),z=Ue(()=>{D({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),R=Ue(()=>{D({value:A.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),B=Ue(()=>{D({value:e.getTodayValue(x,C,n),name:"setValueFromAction",pickerAction:"today"})}),U=Ue(Q=>{Q.preventDefault(),_(!0)}),K=Ue(Q=>{Q==null||Q.preventDefault(),_(!1)}),Y=Ue((Q,ae="partial")=>D({name:"setValueFromView",value:Q,selectionState:ae})),G=Ue((Q,ae,ve)=>D({name:"setValueFromShortcut",value:Q,changeImportance:ae,shortcut:ve})),Z=Ue((Q,ae)=>D({name:"setValueFromField",value:Q,context:ae})),ge={onClear:F,onAccept:V,onDismiss:z,onCancel:R,onSetToday:B,onOpen:U,onClose:K},he={value:A.draft,onChange:Z},me=P.useMemo(()=>e.cleanValue(x,A.draft),[x,e,A.draft]),oe={value:me,onChange:Y,onClose:K,open:T},de=ie({},ge,{value:me,onChange:Y,onSelectShortcut:G,isValid:Q=>{const ae=o({adapter:w,value:Q,timezone:C,props:t});return!e.hasError(ae)}}),X=P.useMemo(()=>({onOpen:U,onClose:K,open:T}),[T,K,U]);return{open:T,fieldProps:he,viewProps:oe,layoutProps:de,actions:ge,contextValue:X}};let Ay=!1;function cE({onChange:t,onViewChange:e,openTo:n,view:r,views:o,autoFocus:i,focusedView:s,onFocusedViewChange:a}){process.env.NODE_ENV!=="production"&&(Ay||(r!=null&&!o.includes(r)&&(console.warn(`MUI X: \`view="${r}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),Ay=!0),r==null&&n!=null&&!o.includes(n)&&(console.warn(`MUI X: \`openTo="${n}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),Ay=!0)));const l=P.useRef(n),u=P.useRef(o),f=P.useRef(o.includes(n)?n:o[0]),[p,g]=ui({name:"useViews",state:"view",controlled:r,default:f.current}),m=P.useRef(i?p:null),[b,y]=ui({name:"useViews",state:"focusedView",controlled:s,default:m.current});P.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(A=>!o.includes(A)))&&(g(o.includes(n)?n:o[0]),u.current=o,l.current=n)},[n,g,p,o]);const x=o.indexOf(p),w=o[x-1]??null,T=o[x+1]??null,_=Ue((A,I)=>{y(I?A:L=>A===L?null:L),a==null||a(A,I)}),C=Ue(A=>{_(A,!0),A!==p&&(g(A),e&&e(A))}),E=Ue(()=>{T&&C(T)}),M=Ue((A,I,L)=>{const O=I==="finish",D=L?o.indexOf(L)<o.length-1:!!T;if(t(A,O&&D?"partial":I,L),L&&L!==p){const V=o[o.indexOf(L)+1];V&&C(V)}else O&&E()});return{view:p,setView:C,focusedView:b,setFocusedView:_,nextView:T,previousView:w,defaultView:o.includes(n)?n:o[0],goToNextView:E,setValueAndGoToNextView:M}}const XU=["className","sx"],ZU=({props:t,propsFromPickerValue:e,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:s,open:a,onClose:l}=e,{view:u,views:f,openTo:p,onViewChange:g,viewRenderers:m,timezone:b}=t,y=dt(t,XU),{view:x,setView:w,defaultView:T,focusedView:_,setFocusedView:C,setValueAndGoToNextView:E}=cE({view:u,views:f,openTo:p,onChange:s,onViewChange:g,autoFocus:r}),{hasUIView:M,viewModeLookup:A}=P.useMemo(()=>f.reduce((z,R)=>{let B;return m[R]!=null?B="UI":B="field",z.viewModeLookup[R]=B,B==="UI"&&(z.hasUIView=!0),z},{hasUIView:!1,viewModeLookup:{}}),[m,f]),I=P.useMemo(()=>f.reduce((z,R)=>m[R]!=null&&Hj(R)?z+1:z,0),[m,f]),L=A[x],O=Ue(()=>L==="UI"),[D,F]=P.useState(L==="UI"?x:null);return D!==x&&A[x]==="UI"&&F(x),Fn(()=>{L==="field"&&a&&(l(),setTimeout(()=>{var z,R;(z=i==null?void 0:i.current)==null||z.setSelectedSections(x),(R=i==null?void 0:i.current)==null||R.focusField(x)}))},[x]),Fn(()=>{if(!a)return;let z=x;L==="field"&&D!=null&&(z=D),z!==T&&A[z]==="UI"&&A[T]==="UI"&&(z=T),z!==x&&w(z),C(z,!0)},[a]),{hasUIView:M,shouldRestoreFocus:O,layoutProps:{views:f,view:D,onViewChange:w},renderCurrentView:()=>{if(D==null)return null;const z=m[D];if(z==null)return null;const R=ie({},y,n,e,{views:f,timezone:b,onChange:E,view:D,onViewChange:w,focusedView:_,onFocusedViewChange:C,showViewSwitcher:I>1,timeViewsCount:I});return o?o(m,D,R):z(R)}}};function uE(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const QU=(t,e)=>{const[n,r]=P.useState(uE);return Fn(()=>{const i=()=>{r(uE())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),CW(t,["hours","minutes","seconds"])?!1:(e||n)==="landscape"},e8=({props:t,propsFromPickerValue:e,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=t,i=QU(n.views,o),s=hi();return{layoutProps:ie({},n,e,{isLandscape:i,isRtl:s,wrapperVariant:r,disabled:t.disabled,readOnly:t.readOnly})}};function t8(t){const{props:e,pickerValueResponse:n}=t;return P.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:e.disabled??!1,readOnly:e.readOnly??!1}),[n.viewProps.value,n.open,e.disabled,e.readOnly])}const dE=({props:t,valueManager:e,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:s,rendererInterceptor:a,fieldRef:l})=>{process.env.NODE_ENV!=="production"&&t.renderInput!=null&&sT(["MUI X: The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const u=JU({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:i}),f=ZU({props:t,additionalViewProps:o,autoFocusView:s,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:a}),p=e8({props:t,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:f.layoutProps}),g=t8({props:t,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:f.renderCurrentView,hasUIView:f.hasUIView,shouldRestoreFocus:f.shouldRestoreFocus,layoutProps:p.layoutProps,contextValue:u.contextValue,ownerState:g}};function fE(t){return Qe("MuiPickersLayout",t)}const Js=tt("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]);function n8(t){return Qe("MuiButton",t)}const Xs=tt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),pE=P.createContext({});process.env.NODE_ENV!=="production"&&(pE.displayName="ButtonGroupContext");const hE=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(hE.displayName="ButtonGroupButtonContext");const r8=t=>{const{color:e,disableElevation:n,fullWidth:r,size:o,variant:i,loading:s,loadingPosition:a,classes:l}=t,u={root:["root",s&&"loading",i,`${i}${$e(e)}`,`size${$e(o)}`,`${i}Size${$e(o)}`,`color${$e(e)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${$e(a)}`],startIcon:["icon","startIcon",`iconSize${$e(o)}`],endIcon:["icon","endIcon",`iconSize${$e(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},f=Ze(u,n8,l);return{...l,...f}},gE=[{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}}}],o8=Se(tl,{shouldForwardProp:t=>Co(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${$e(n.color)}`],e[`size${$e(n.size)}`],e[`${n.variant}Size${$e(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,n.loading&&e.loading]}})(Vt(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],n=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Xs.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${Xs.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${Xs.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).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)",[`&.${Xs.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(Qn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(t.vars||t).palette[r].main,"--variant-outlinedColor":(t.vars||t).palette[r].main,"--variant-outlinedBorder":t.vars?`rgba(${t.vars.palette[r].mainChannel} / 0.5)`:Kt(t.palette[r].main,.5),"--variant-containedColor":(t.vars||t).palette[r].contrastText,"--variant-containedBg":(t.vars||t).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[r].dark,"--variant-textBg":t.vars?`rgba(${t.vars.palette[r].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt(t.palette[r].main,t.palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[r].main,"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette[r].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt(t.palette[r].main,t.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt(t.palette.text.primary,t.palette.action.hoverOpacity),"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt(t.palette.text.primary,t.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Xs.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Xs.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${Xs.loading}`]:{color:"transparent"}}}]}})),i8=Se("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,n.loading&&e.startIconLoadingStart,e[`iconSize${$e(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...gE]})),s8=Se("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,n.loading&&e.endIconLoadingEnd,e[`iconSize${$e(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...gE]})),a8=Se("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({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:(t.vars||t).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}}]})),mE=Se("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(t,e)=>e.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),Zc=P.forwardRef(function(e,n){const r=P.useContext(pE),o=P.useContext(hE),i=ic(r,e),s=Et({props:i,name:"MuiButton"}),{children:a,color:l="primary",component:u="button",className:f,disabled:p=!1,disableElevation:g=!1,disableFocusRipple:m=!1,endIcon:b,focusVisibleClassName:y,fullWidth:x=!1,id:w,loading:T=null,loadingIndicator:_,loadingPosition:C="center",size:E="medium",startIcon:M,type:A,variant:I="text",...L}=s,O=Bo(w),D=_??v.jsx(hy,{"aria-labelledby":O,color:"inherit",size:16}),F={...s,color:l,component:u,disabled:p,disableElevation:g,disableFocusRipple:m,fullWidth:x,loading:T,loadingIndicator:D,loadingPosition:C,size:E,type:A,variant:I},V=r8(F),z=(M||T&&C==="start")&&v.jsx(i8,{className:V.startIcon,ownerState:F,children:M||v.jsx(mE,{className:V.loadingIconPlaceholder,ownerState:F})}),R=(b||T&&C==="end")&&v.jsx(s8,{className:V.endIcon,ownerState:F,children:b||v.jsx(mE,{className:V.loadingIconPlaceholder,ownerState:F})}),B=o||"",U=typeof T=="boolean"?v.jsx("span",{className:V.loadingWrapper,style:{display:"contents"},children:T&&v.jsx(a8,{className:V.loadingIndicator,ownerState:F,children:D})}):null;return v.jsxs(o8,{ownerState:F,className:ze(r.className,V.root,f,B),component:u,disabled:p||T,focusRipple:!m,focusVisibleClassName:ze(V.focusVisible,y),ref:n,type:A,id:T?O:w,...L,classes:V,children:[z,C!=="end"&&U,a,C==="end"&&U,R]})});process.env.NODE_ENV!=="production"&&(Zc.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","success","error","info","warning"]),c.string]),component:c.elementType,disabled:c.bool,disableElevation:c.bool,disableFocusRipple:c.bool,disableRipple:c.bool,endIcon:c.node,focusVisibleClassName:c.string,fullWidth:c.bool,href:c.string,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:c.oneOf(["center","end","start"]),size:c.oneOfType([c.oneOf(["small","medium","large"]),c.string]),startIcon:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.oneOfType([c.oneOf(["button","reset","submit"]),c.string]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});function l8(t){return Qe("MuiDialogActions",t)}tt("MuiDialogActions",["root","spacing"]);const c8=t=>{const{classes:e,disableSpacing:n}=t;return Ze({root:["root",!n&&"spacing"]},l8,e)},u8=Se("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:t})=>!t.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),yE=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...s}=r,a={...r,disableSpacing:i},l=c8(a);return v.jsx(u8,{className:ze(l.root,o),ownerState:a,ref:n,...s})});process.env.NODE_ENV!=="production"&&(yE.propTypes={children:c.node,classes:c.object,className:c.string,disableSpacing:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const d8=["onAccept","onClear","onCancel","onSetToday","actions"];function bE(t){const{onAccept:e,onClear:n,onCancel:r,onSetToday:o,actions:i}=t,s=dt(t,d8),a=gi();if(i==null||i.length===0)return null;const l=i==null?void 0:i.map(u=>{switch(u){case"clear":return v.jsx(Zc,{onClick:n,children:a.clearButtonLabel},u);case"cancel":return v.jsx(Zc,{onClick:r,children:a.cancelButtonLabel},u);case"accept":return v.jsx(Zc,{onClick:e,children:a.okButtonLabel},u);case"today":return v.jsx(Zc,{onClick:o,children:a.todayButtonLabel},u);default:return null}});return v.jsx(yE,ie({},s,{children:l}))}process.env.NODE_ENV!=="production"&&(bE.propTypes={actions:c.arrayOf(c.oneOf(["accept","cancel","clear","today"]).isRequired),disableSpacing:c.bool,onAccept:c.func.isRequired,onCancel:c.func.isRequired,onClear:c.func.isRequired,onSetToday:c.func.isRequired,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function f8(t){return Qe("MuiListItem",t)}tt("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const p8=tt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function h8(t){return Qe("MuiListItemSecondaryAction",t)}tt("MuiListItemSecondaryAction",["root","disableGutters"]);const g8=t=>{const{disableGutters:e,classes:n}=t;return Ze({root:["root",e&&"disableGutters"]},h8,n)},m8=Se("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:t})=>t.disableGutters,style:{right:0}}]}),Iy=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,s=P.useContext(Ja),a={...r,disableGutters:s.disableGutters},l=g8(a);return v.jsx(m8,{className:ze(l.root,o),ownerState:a,ref:n,...i})});process.env.NODE_ENV!=="production"&&(Iy.propTypes={children:c.node,classes:c.object,className:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])}),Iy.muiName="ListItemSecondaryAction";const y8=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.hasSecondaryAction&&e.secondaryAction]},b8=t=>{const{alignItems:e,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:s,hasSecondaryAction:a}=t;return Ze({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",s&&"divider",e==="flex-start"&&"alignItemsFlexStart",a&&"secondaryAction"],container:["container"]},f8,n)},v8=Se("div",{name:"MuiListItem",slot:"Root",overridesResolver:y8})(Vt(({theme:t})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${p8.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),x8=Se("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),vE=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiListItem"}),{alignItems:o="center",children:i,className:s,component:a,components:l={},componentsProps:u={},ContainerComponent:f="li",ContainerProps:{className:p,...g}={},dense:m=!1,disableGutters:b=!1,disablePadding:y=!1,divider:x=!1,secondaryAction:w,slotProps:T={},slots:_={},...C}=r,E=P.useContext(Ja),M=P.useMemo(()=>({dense:m||E.dense||!1,alignItems:o,disableGutters:b}),[o,E.dense,m,b]),A=P.useRef(null),I=P.Children.toArray(i),L=I.length&&Ra(I[I.length-1],["ListItemSecondaryAction"]),O={...r,alignItems:o,dense:M.dense,disableGutters:b,disablePadding:y,divider:x,hasSecondaryAction:L},D=b8(O),F=Nt(A,n),V=_.root||l.Root||v8,z=T.root||u.root||{},R={className:ze(D.root,z.className,s),...C};let B=a||"li";return L?(B=!R.component&&!a?"div":B,f==="li"&&(B==="li"?B="div":R.component==="li"&&(R.component="div")),v.jsx(Ja.Provider,{value:M,children:v.jsxs(x8,{as:f,className:ze(D.container,p),ref:F,ownerState:O,...g,children:[v.jsx(V,{...z,...!wc(V)&&{as:B,ownerState:{...O,...z.ownerState}},...R,children:I}),I.pop()]})})):v.jsx(Ja.Provider,{value:M,children:v.jsxs(V,{...z,as:B,ref:F,...!wc(V)&&{ownerState:{...O,...z.ownerState}},...R,children:[I,w&&v.jsx(Iy,{children:w})]})})});process.env.NODE_ENV!=="production"&&(vE.propTypes={alignItems:c.oneOf(["center","flex-start"]),children:si(c.node,t=>{const e=P.Children.toArray(t.children);let n=-1;for(let r=e.length-1;r>=0;r-=1){const o=e[r];if(Ra(o,["ListItemSecondaryAction"])){n=r;break}}return n!==-1&&n!==e.length-1?new Error("MUI: You used an element after ListItemSecondaryAction. For ListItem to detect that it has a secondary action you must pass it as the last child to ListItem."):null}),classes:c.object,className:c.string,component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.object}),ContainerComponent:Td,ContainerProps:c.object,dense:c.bool,disableGutters:c.bool,disablePadding:c.bool,divider:c.bool,secondaryAction:c.node,slotProps:c.shape({root:c.object}),slots:c.shape({root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const S8=Ke(v.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 w8(t){return Qe("MuiChip",t)}const vt=tt("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),C8=t=>{const{classes:e,disabled:n,size:r,color:o,iconColor:i,onDelete:s,clickable:a,variant:l}=t,u={root:["root",l,n&&"disabled",`size${$e(r)}`,`color${$e(o)}`,a&&"clickable",a&&`clickableColor${$e(o)}`,s&&"deletable",s&&`deletableColor${$e(o)}`,`${l}${$e(o)}`],label:["label",`label${$e(r)}`],avatar:["avatar",`avatar${$e(r)}`,`avatarColor${$e(o)}`],icon:["icon",`icon${$e(r)}`,`iconColor${$e(i)}`],deleteIcon:["deleteIcon",`deleteIcon${$e(r)}`,`deleteIconColor${$e(o)}`,`deleteIcon${$e(l)}Color${$e(o)}`]};return Ze(u,w8,e)},_8=Se("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{color:r,iconColor:o,clickable:i,onDelete:s,size:a,variant:l}=n;return[{[`& .${vt.avatar}`]:e.avatar},{[`& .${vt.avatar}`]:e[`avatar${$e(a)}`]},{[`& .${vt.avatar}`]:e[`avatarColor${$e(r)}`]},{[`& .${vt.icon}`]:e.icon},{[`& .${vt.icon}`]:e[`icon${$e(a)}`]},{[`& .${vt.icon}`]:e[`iconColor${$e(o)}`]},{[`& .${vt.deleteIcon}`]:e.deleteIcon},{[`& .${vt.deleteIcon}`]:e[`deleteIcon${$e(a)}`]},{[`& .${vt.deleteIcon}`]:e[`deleteIconColor${$e(r)}`]},{[`& .${vt.deleteIcon}`]:e[`deleteIcon${$e(l)}Color${$e(r)}`]},e.root,e[`size${$e(a)}`],e[`color${$e(r)}`],i&&e.clickable,i&&r!=="default"&&e[`clickableColor${$e(r)})`],s&&e.deletable,s&&r!=="default"&&e[`deletableColor${$e(r)}`],e[l],e[`${l}${$e(r)}`]]}})(Vt(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return{maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${vt.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${vt.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:e,fontSize:t.typography.pxToRem(12)},[`& .${vt.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${vt.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${vt.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${vt.icon}`]:{marginLeft:5,marginRight:-6},[`& .${vt.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:Kt(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:Kt(t.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${vt.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${vt.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(t.palette).filter(Qn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(t.vars||t).palette[n].main,color:(t.vars||t).palette[n].contrastText,[`& .${vt.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n].contrastTextChannel} / 0.7)`:Kt(t.palette[n].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${vt.icon}`]:{color:t.vars?t.vars.palette.Chip.defaultIconColor:e}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${vt.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${vt.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Kt(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}},...Object.entries(t.palette).filter(Qn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${vt.focusVisible}`]:{background:(t.vars||t).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Kt(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${vt.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Kt(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}}},...Object.entries(t.palette).filter(Qn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${vt.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${vt.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${vt.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${vt.avatar}`]:{marginLeft:4},[`& .${vt.avatarSmall}`]:{marginLeft:2},[`& .${vt.icon}`]:{marginLeft:4},[`& .${vt.iconSmall}`]:{marginLeft:2},[`& .${vt.deleteIcon}`]:{marginRight:5},[`& .${vt.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(t.palette).filter(Qn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(t.vars||t).palette[n].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.7)`:Kt(t.palette[n].main,.7)}`,[`&.${vt.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt(t.palette[n].main,t.palette.action.hoverOpacity)},[`&.${vt.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.focusOpacity})`:Kt(t.palette[n].main,t.palette.action.focusOpacity)},[`& .${vt.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.7)`:Kt(t.palette[n].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].main}}}}))]}})),T8=Se("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:r}=n;return[e.label,e[`label${$e(r)}`]]}})({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 xE(t){return t.key==="Backspace"||t.key==="Delete"}const SE=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiChip"}),{avatar:o,className:i,clickable:s,color:a="default",component:l,deleteIcon:u,disabled:f=!1,icon:p,label:g,onClick:m,onDelete:b,onKeyDown:y,onKeyUp:x,size:w="medium",variant:T="filled",tabIndex:_,skipFocusWhenDisabled:C=!1,...E}=r,M=P.useRef(null),A=Nt(M,n),I=Y=>{Y.stopPropagation(),b&&b(Y)},L=Y=>{Y.currentTarget===Y.target&&xE(Y)&&Y.preventDefault(),y&&y(Y)},O=Y=>{Y.currentTarget===Y.target&&b&&xE(Y)&&b(Y),x&&x(Y)},D=s!==!1&&m?!0:s,F=D||b?tl:l||"div",V={...r,component:F,disabled:f,size:w,color:a,iconColor:P.isValidElement(p)&&p.props.color||a,onDelete:!!b,clickable:D,variant:T},z=C8(V),R=F===tl?{component:l||"div",focusVisibleClassName:z.focusVisible,...b&&{disableRipple:!0}}:{};let B=null;b&&(B=u&&P.isValidElement(u)?P.cloneElement(u,{className:ze(u.props.className,z.deleteIcon),onClick:I}):v.jsx(S8,{className:ze(z.deleteIcon),onClick:I}));let U=null;o&&P.isValidElement(o)&&(U=P.cloneElement(o,{className:ze(z.avatar,o.props.className)}));let K=null;return p&&P.isValidElement(p)&&(K=P.cloneElement(p,{className:ze(z.icon,p.props.className)})),process.env.NODE_ENV!=="production"&&U&&K&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."),v.jsxs(_8,{as:F,className:ze(z.root,i),disabled:D&&f?!0:void 0,onClick:m,onKeyDown:L,onKeyUp:O,ref:A,tabIndex:C&&f?-1:_,ownerState:V,...R,...E,children:[U||K,v.jsx(T8,{className:ze(z.label),ownerState:V,children:g}),B]})});process.env.NODE_ENV!=="production"&&(SE.propTypes={avatar:c.element,children:n5,classes:c.object,className:c.string,clickable:c.bool,color:c.oneOfType([c.oneOf(["default","primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,deleteIcon:c.element,disabled:c.bool,icon:c.element,label:c.node,onClick:c.func,onDelete:c.func,onKeyDown:c.func,onKeyUp:c.func,size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),skipFocusWhenDisabled:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),tabIndex:c.number,variant:c.oneOfType([c.oneOf(["filled","outlined"]),c.string])});const Qc=36,jf=2,Wf=320,k8=280,Dy=336,E8=["items","changeImportance","isLandscape","onChange","isValid"],O8=["getValue"];function wE(t){const{items:e,changeImportance:n="accept",onChange:r,isValid:o}=t,i=dt(t,E8);if(e==null||e.length===0)return null;const s=e.map(a=>{let{getValue:l}=a,u=dt(a,O8);const f=l({isValid:o});return ie({},u,{label:u.label,onClick:()=>{r(f,n,u)},disabled:!o(f)})});return v.jsx(zm,ie({dense:!0,sx:[{maxHeight:Dy,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:s.map(a=>v.jsx(vE,{children:v.jsx(SE,ie({},a))},a.id??a.label))}))}process.env.NODE_ENV!=="production"&&(wE.propTypes={changeImportance:c.oneOf(["accept","set"]),className:c.string,component:c.elementType,dense:c.bool,disablePadding:c.bool,isLandscape:c.bool.isRequired,isValid:c.func.isRequired,items:c.arrayOf(c.shape({getValue:c.func.isRequired,id:c.string,label:c.string.isRequired})),onChange:c.func.isRequired,style:c.object,subheader:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function M8(t){return t.view!==null}const A8=t=>{const{classes:e,isLandscape:n}=t;return Ze({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},fE,e)},I8=t=>{const{wrapperVariant:e,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:s,views:a,onViewChange:l,value:u,onChange:f,onSelectShortcut:p,isValid:g,isLandscape:m,disabled:b,readOnly:y,children:x,slots:w,slotProps:T}=t,_=A8(t),C=(w==null?void 0:w.actionBar)??bE,E=Mt({elementType:C,externalSlotProps:T==null?void 0:T.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:e==="desktop"?[]:["cancel","accept"]},className:_.actionBar,ownerState:ie({},t,{wrapperVariant:e})}),M=v.jsx(C,ie({},E)),A=w==null?void 0:w.toolbar,I=Mt({elementType:A,externalSlotProps:T==null?void 0:T.toolbar,additionalProps:{isLandscape:m,onChange:f,value:u,view:s,onViewChange:l,views:a,disabled:b,readOnly:y},className:_.toolbar,ownerState:ie({},t,{wrapperVariant:e})}),L=M8(I)&&A?v.jsx(A,ie({},I)):null,O=x,D=w==null?void 0:w.tabs,F=s&&D?v.jsx(D,ie({view:s,onViewChange:l,className:_.tabs},T==null?void 0:T.tabs)):null,V=(w==null?void 0:w.shortcuts)??wE,z=Mt({elementType:V,externalSlotProps:T==null?void 0:T.shortcuts,additionalProps:{isValid:g,isLandscape:m,onChange:p},className:_.shortcuts,ownerState:{isValid:g,isLandscape:m,onChange:p,wrapperVariant:e}}),R=s&&V?v.jsx(V,ie({},z)):null;return{toolbar:L,content:O,tabs:F,actionBar:M,shortcuts:R}},D8=t=>{const{isLandscape:e,classes:n}=t;return Ze({root:["root",e&&"landscape"],contentWrapper:["contentWrapper"]},fE,n)},P8=Se("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Js.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Js.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Js.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Js.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Js.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Js.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Js.shortcuts}`]:{gridColumn:3}}}]}),N8=Se("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(t,e)=>e.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Py=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:s,actionBar:a,shortcuts:l}=I8(r),{sx:u,className:f,isLandscape:p,wrapperVariant:g}=r,m=D8(r);return v.jsxs(P8,{ref:n,sx:u,className:ze(m.root,f),ownerState:r,children:[p?l:o,p?o:l,v.jsx(N8,{className:m.contentWrapper,children:g==="desktop"?v.jsxs(P.Fragment,{children:[i,s]}):v.jsxs(P.Fragment,{children:[s,i]})}),a]})});process.env.NODE_ENV!=="production"&&(Py.propTypes={children:c.node,classes:c.object,className:c.string,disabled:c.bool,isLandscape:c.bool.isRequired,isRtl:c.bool.isRequired,isValid:c.func.isRequired,onAccept:c.func.isRequired,onCancel:c.func.isRequired,onChange:c.func.isRequired,onClear:c.func.isRequired,onClose:c.func.isRequired,onDismiss:c.func.isRequired,onOpen:c.func.isRequired,onSelectShortcut:c.func.isRequired,onSetToday:c.func.isRequired,onViewChange:c.func.isRequired,orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.any,view:c.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),views:c.arrayOf(c.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]).isRequired).isRequired,wrapperVariant:c.oneOf(["desktop","mobile"])});const L8=["props","getOpenDialogAriaText"],$8=["ownerState"],F8=["ownerState"],R8=t=>{var xe;let{props:e,getOpenDialogAriaText:n}=t,r=dt(t,L8);const{slots:o,slotProps:i,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:g,timezone:m,name:b,label:y,inputRef:x,readOnly:w,disabled:T,autoFocus:_,localeText:C,reduceAnimations:E}=e,M=P.useRef(null),A=P.useRef(null),I=Bo(),L=((xe=i==null?void 0:i.toolbar)==null?void 0:xe.hidden)??!1,{open:O,actions:D,hasUIView:F,layoutProps:V,renderCurrentView:z,shouldRestoreFocus:R,fieldProps:B,contextValue:U,ownerState:K}=dE(ie({},r,{props:e,fieldRef:A,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),Y=o.inputAdornment??gy,G=Mt({elementType:Y,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:e}),Z=dt(G,$8),ge=o.openPickerButton??nl,he=Mt({elementType:ge,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:T||w,onClick:O?D.onClose:D.onOpen,"aria-label":n(B.value),edge:Z.position},ownerState:e}),me=dt(he,F8),oe=o.openPickerIcon,ye=Mt({elementType:oe,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:K}),de=o.field,X=Mt({elementType:de,externalSlotProps:i==null?void 0:i.field,additionalProps:ie({},B,L&&{id:I},{readOnly:w,disabled:T,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:g,timezone:m,label:y,name:b,autoFocus:_&&!e.open,focused:O?!0:void 0},x?{inputRef:x}:{}),ownerState:e});F&&(X.InputProps=ie({},X.InputProps,{ref:M},!e.disableOpenPicker&&{[`${Z.position}Adornment`]:v.jsx(Y,ie({},Z,{children:v.jsx(ge,ie({},me,{children:v.jsx(oe,ie({},ye))}))}))}));const Q=ie({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},X.slots),ae=o.layout??Py;let ve=I;L&&(y?ve=`${I}-label`:ve=void 0);const ne=ie({},i,{toolbar:ie({},i==null?void 0:i.toolbar,{titleId:I}),popper:ie({"aria-labelledby":ve},i==null?void 0:i.popper)}),ce=Nt(A,X.unstableFieldRef);return{renderPicker:()=>v.jsxs(hk,{contextValue:U,localeText:C,children:[v.jsx(de,ie({},X,{slots:Q,slotProps:ne,unstableFieldRef:ce})),v.jsx(qU,ie({role:"dialog",placement:"bottom-start",anchorEl:M.current},D,{open:O,slots:o,slotProps:ne,shouldRestoreFocus:R,reduceAnimations:E,children:v.jsx(ae,ie({},V,ne==null?void 0:ne.layout,{slots:o,slotProps:ne,children:z()}))}))]})}},CE=({shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s,timezone:a})=>{const l=Us();return P.useCallback(u=>Rc({adapter:l,value:u,timezone:a,props:{shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s}})!==null,[l,t,e,n,r,o,i,s,a])},B8=(t,e,n)=>(r,o)=>{switch(o.type){case"changeMonth":return ie({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!t});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let s=n.setTimezone(r.currentMonth,i);return n.getMonth(s)!==n.getMonth(r.currentMonth)&&(s=n.setMonth(s,n.getMonth(r.currentMonth))),ie({},r,{currentMonth:s})}case"finishMonthSwitchingAnimation":return ie({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!e&&!n.isSameMonth(r.currentMonth,o.focusedDay);return ie({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!t&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},V8=t=>{const{value:e,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:s,minDate:a,onMonthChange:l,reduceAnimations:u,shouldDisableDate:f,timezone:p}=t,g=Qt(),m=P.useRef(B8(!!u,i,g)).current,b=P.useMemo(()=>jo.getInitialReferenceValue({value:e,utils:g,timezone:p,props:t,referenceDate:n,granularity:Ho.day}),[n,p]),[y,x]=P.useReducer(m,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:g.startOfMonth(b),slideDirection:"left"});P.useEffect(()=>{x({type:"changeMonthTimezone",newTimezone:g.getTimezone(b)})},[b,g]);const w=P.useCallback(M=>{x(ie({type:"changeMonth"},M)),l&&l(M.newMonth)},[l]),T=P.useCallback(M=>{const A=M;g.isSameMonth(A,y.currentMonth)||w({newMonth:g.startOfMonth(A),direction:g.isAfterDay(A,y.currentMonth)?"left":"right"})},[y.currentMonth,w,g]),_=CE({shouldDisableDate:f,minDate:a,maxDate:s,disableFuture:r,disablePast:o,timezone:p}),C=P.useCallback(()=>{x({type:"finishMonthSwitchingAnimation"})},[]),E=Ue((M,A)=>{_(M)||x({type:"changeFocusedDay",focusedDay:M,withoutMonthSwitchingAnimation:A})});return{referenceDate:b,calendarState:y,changeMonth:T,changeFocusedDay:E,isDateDisabled:_,onMonthSwitchingAnimationEnd:C,handleChangeMonth:w}},z8=t=>Qe("MuiPickersFadeTransitionGroup",t);tt("MuiPickersFadeTransitionGroup",["root"]);const H8=t=>{const{classes:e}=t;return Ze({root:["root"]},z8,e)},j8=Se(Oc,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"block",position:"relative"});function _E(t){const e=Zt({props:t,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=H8(e),a=fi();return o?n:v.jsx(j8,{className:ze(s.root,r),children:v.jsx(Xi,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:a.transitions.duration.enteringScreen,enter:a.transitions.duration.enteringScreen,exit:0},children:n},i)})}function W8(t){return Qe("MuiPickersDay",t)}const Zs=tt("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),q8=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],U8=t=>{const{selected:e,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:s,showDaysOutsideCurrentMonth:a,classes:l}=t,u=s&&!a;return Ze({root:["root",e&&!u&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",s&&a&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},W8,l)},TE=({theme:t})=>ie({},t.typography.caption,{width:Qc,height:Qc,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),color:(t.vars||t).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt(t.palette.primary.main,t.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:Kt(t.palette.primary.main,t.palette.action.focusOpacity),[`&.${Zs.selected}`]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${Zs.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${Zs.disabled}:not(.${Zs.selected})`]:{color:(t.vars||t).palette.text.disabled},[`&.${Zs.disabled}&.${Zs.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${jf}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(t.vars||t).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${Zs.selected})`]:{border:`1px solid ${(t.vars||t).palette.text.secondary}`}}}]}),kE=(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableMargin&&e.dayWithMargin,!n.disableHighlightToday&&n.today&&e.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&e.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&e.hiddenDaySpacingFiller]},K8=Se(tl,{name:"MuiPickersDay",slot:"Root",overridesResolver:kE})(TE),G8=Se("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:kE})(({theme:t})=>ie({},TE({theme:t}),{opacity:0,pointerEvents:"none"})),eu=()=>{},EE=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:s,disabled:a=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:f,onClick:p,onDaySelect:g,onFocus:m=eu,onBlur:b=eu,onKeyDown:y=eu,onMouseDown:x=eu,onMouseEnter:w=eu,outsideCurrentMonth:T,selected:_=!1,showDaysOutsideCurrentMonth:C=!1,children:E,today:M=!1}=r,A=dt(r,q8),I=ie({},r,{autoFocus:o,disabled:a,disableHighlightToday:l,disableMargin:u,selected:_,showDaysOutsideCurrentMonth:C,today:M}),L=U8(I),O=Qt(),D=P.useRef(null),F=Nt(D,n);Fn(()=>{o&&!a&&!f&&!T&&D.current.focus()},[o,a,f,T]);const V=R=>{x(R),T&&R.preventDefault()},z=R=>{a||g(s),T&&R.currentTarget.focus(),p&&p(R)};return T&&!C?v.jsx(G8,{className:ze(L.root,L.hiddenDaySpacingFiller,i),ownerState:I,role:A.role}):v.jsx(K8,ie({className:ze(L.root,i),ref:F,centerRipple:!0,disabled:a,tabIndex:_?0:-1,onKeyDown:R=>y(R,s),onFocus:R=>m(R,s),onBlur:R=>b(R,s),onMouseEnter:R=>w(R,s),onClick:z,onMouseDown:V},A,{ownerState:I,children:E||O.format(s,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(EE.propTypes={action:c.oneOfType([c.func,c.shape({current:c.shape({focusVisible:c.func.isRequired})})]),centerRipple:c.bool,classes:c.object,className:c.string,component:c.elementType,day:c.object.isRequired,disabled:c.bool,disableHighlightToday:c.bool,disableMargin:c.bool,disableRipple:c.bool,disableTouchRipple:c.bool,focusRipple:c.bool,focusVisibleClassName:c.string,isAnimating:c.bool,isFirstVisibleCell:c.bool.isRequired,isLastVisibleCell:c.bool.isRequired,onBlur:c.func,onDaySelect:c.func.isRequired,onFocus:c.func,onFocusVisible:c.func,onKeyDown:c.func,onMouseEnter:c.func,outsideCurrentMonth:c.bool.isRequired,selected:c.bool,showDaysOutsideCurrentMonth:c.bool,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),tabIndex:c.number,today:c.bool,TouchRippleProps:c.object,touchRippleRef:c.oneOfType([c.func,c.shape({current:c.shape({pulsate:c.func.isRequired,start:c.func.isRequired,stop:c.func.isRequired})})])});const Y8=P.memo(EE),J8=t=>Qe("MuiPickersSlideTransition",t),oo=tt("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),X8=["children","className","reduceAnimations","slideDirection","transKey","classes"],Z8=t=>{const{classes:e,slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Ze(r,J8,e)},Q8=Se(Oc,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`.${oo["slideEnter-left"]}`]:e["slideEnter-left"]},{[`.${oo["slideEnter-right"]}`]:e["slideEnter-right"]},{[`.${oo.slideEnterActive}`]:e.slideEnterActive},{[`.${oo.slideExit}`]:e.slideExit},{[`.${oo["slideExitActiveLeft-left"]}`]:e["slideExitActiveLeft-left"]},{[`.${oo["slideExitActiveLeft-right"]}`]:e["slideExitActiveLeft-right"]}]})(({theme:t})=>{const e=t.transitions.create("transform",{duration:t.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${oo["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${oo["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${oo.slideEnterActive}`]:{transform:"translate(0%)",transition:e},[`& .${oo.slideExit}`]:{transform:"translate(0%)"},[`& .${oo["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:e,zIndex:0},[`& .${oo["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:e,zIndex:0}}});function e7(t){const e=Zt({props:t,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=dt(e,X8),a=Z8(e),l=fi();if(o)return v.jsx("div",{className:ze(a.root,r),children:n});const u={exit:a.exit,enterActive:a.enterActive,enter:a.enter,exitActive:a.exitActive};return v.jsx(Q8,{className:ze(a.root,r),childFactory:f=>P.cloneElement(f,{classNames:u}),role:"presentation",children:v.jsx(Km,ie({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},s,{children:n}),i)})}const t7=t=>Qe("MuiDayCalendar",t);tt("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const n7=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],r7=["ownerState"],o7=t=>{const{classes:e}=t;return Ze({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},t7,e)},OE=(Qc+jf*2)*6,i7=Se("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),s7=Se("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(t,e)=>e.header})({display:"flex",justifyContent:"center",alignItems:"center"}),a7=Se(yi,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(t,e)=>e.weekDayLabel})(({theme:t})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(t.vars||t).palette.text.secondary})),l7=Se(yi,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(t,e)=>e.weekNumberLabel})(({theme:t})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.disabled})),c7=Se(yi,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(t,e)=>e.weekNumber})(({theme:t})=>ie({},t.typography.caption,{width:Qc,height:Qc,padding:0,margin:`0 ${jf}px`,color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),u7=Se("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(t,e)=>e.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:OE}),d7=Se(e7,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(t,e)=>e.slideTransition})({minHeight:OE}),f7=Se("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(t,e)=>e.monthContainer})({overflow:"hidden"}),p7=Se("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(t,e)=>e.weekContainer})({margin:`${jf}px 0`,display:"flex",justifyContent:"center"});function h7(t){let{parentProps:e,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:s,isViewFocused:a}=t,l=dt(t,n7);const{disabled:u,disableHighlightToday:f,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:g,slots:m,slotProps:b,timezone:y}=e,x=Qt(),w=vf(y),T=r!==null&&x.isSameDay(n,r),_=o.some(F=>x.isSameDay(F,n)),C=x.isSameDay(n,w),E=(m==null?void 0:m.day)??Y8,M=Mt({elementType:E,externalSlotProps:b==null?void 0:b.day,additionalProps:ie({disableHighlightToday:f,showDaysOutsideCurrentMonth:g,role:"gridcell",isAnimating:p,"data-timestamp":x.toJsDate(n).valueOf()},l),ownerState:ie({},e,{day:n,selected:_})}),A=dt(M,r7),I=P.useMemo(()=>u||i(n),[u,i,n]),L=P.useMemo(()=>x.getMonth(n)!==s,[x,n,s]),O=P.useMemo(()=>{const F=x.startOfMonth(x.setMonth(n,s));return g?x.isSameDay(n,x.startOfWeek(F)):x.isSameDay(n,F)},[s,n,g,x]),D=P.useMemo(()=>{const F=x.endOfMonth(x.setMonth(n,s));return g?x.isSameDay(n,x.endOfWeek(F)):x.isSameDay(n,F)},[s,n,g,x]);return v.jsx(E,ie({},A,{day:n,disabled:I,autoFocus:a&&T,today:C,outsideCurrentMonth:L,isFirstVisibleCell:O,isLastVisibleCell:D,selected:_,tabIndex:T?0:-1,"aria-selected":_,"aria-current":C?"date":void 0}))}function g7(t){const e=Zt({props:t,name:"MuiDayCalendar"}),n=Qt(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:s,focusedDay:a,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:f,readOnly:p,reduceAnimations:g,renderLoading:m=()=>v.jsx("span",{children:"..."}),slideDirection:b,TransitionProps:y,disablePast:x,disableFuture:w,minDate:T,maxDate:_,shouldDisableDate:C,shouldDisableMonth:E,shouldDisableYear:M,dayOfWeekFormatter:A=Te=>n.format(Te,"weekdayShort").charAt(0).toUpperCase(),hasFocus:I,onFocusedViewChange:L,gridLabelId:O,displayWeekNumber:D,fixedWeekNumber:F,autoFocus:V,timezone:z}=e,R=vf(z),B=o7(e),U=hi(),K=CE({shouldDisableDate:C,shouldDisableMonth:E,shouldDisableYear:M,minDate:T,maxDate:_,disablePast:x,disableFuture:w,timezone:z}),Y=gi(),[G,Z]=ui({name:"DayCalendar",state:"hasFocus",controlled:I,default:V??!1}),[ge,he]=P.useState(()=>a||R),me=Ue(Te=>{p||u(Te)}),oe=Te=>{K(Te)||(r(Te),he(Te),L==null||L(!0),Z(!0))},ye=Ue((Te,_e)=>{switch(Te.key){case"ArrowUp":oe(n.addDays(_e,-7)),Te.preventDefault();break;case"ArrowDown":oe(n.addDays(_e,7)),Te.preventDefault();break;case"ArrowLeft":{const Ne=n.addDays(_e,U?1:-1),He=n.addMonths(_e,U?1:-1),W=$c({utils:n,date:Ne,minDate:U?Ne:n.startOfMonth(He),maxDate:U?n.endOfMonth(He):Ne,isDateDisabled:K,timezone:z});oe(W||Ne),Te.preventDefault();break}case"ArrowRight":{const Ne=n.addDays(_e,U?-1:1),He=n.addMonths(_e,U?-1:1),W=$c({utils:n,date:Ne,minDate:U?n.startOfMonth(He):Ne,maxDate:U?Ne:n.endOfMonth(He),isDateDisabled:K,timezone:z});oe(W||Ne),Te.preventDefault();break}case"Home":oe(n.startOfWeek(_e)),Te.preventDefault();break;case"End":oe(n.endOfWeek(_e)),Te.preventDefault();break;case"PageUp":oe(n.addMonths(_e,1)),Te.preventDefault();break;case"PageDown":oe(n.addMonths(_e,-1)),Te.preventDefault();break}}),de=Ue((Te,_e)=>oe(_e)),X=Ue((Te,_e)=>{G&&n.isSameDay(ge,_e)&&(L==null||L(!1))}),Q=n.getMonth(i),ae=n.getYear(i),ve=P.useMemo(()=>s.filter(Te=>!!Te).map(Te=>n.startOfDay(Te)),[n,s]),ne=`${ae}-${Q}`,ce=P.useMemo(()=>P.createRef(),[ne]),fe=P.useMemo(()=>{const Te=n.startOfMonth(i),_e=n.endOfMonth(i);return K(ge)||n.isAfterDay(ge,_e)||n.isBeforeDay(ge,Te)?$c({utils:n,date:ge,minDate:Te,maxDate:_e,disablePast:x,disableFuture:w,isDateDisabled:K,timezone:z}):ge},[i,w,x,ge,K,n,z]),xe=P.useMemo(()=>{const Te=n.getWeekArray(i);let _e=n.addMonths(i,1);for(;F&&Te.length<F;){const Ne=n.getWeekArray(_e),He=n.isSameDay(Te[Te.length-1][0],Ne[0][0]);Ne.slice(He?1:0).forEach(W=>{Te.length<F&&Te.push(W)}),_e=n.addMonths(_e,1)}return Te},[i,F,n]);return v.jsxs(i7,{role:"grid","aria-labelledby":O,className:B.root,children:[v.jsxs(s7,{role:"row",className:B.header,children:[D&&v.jsx(l7,{variant:"caption",role:"columnheader","aria-label":Y.calendarWeekNumberHeaderLabel,className:B.weekNumberLabel,children:Y.calendarWeekNumberHeaderText}),Vj(n,R).map((Te,_e)=>v.jsx(a7,{variant:"caption",role:"columnheader","aria-label":n.format(Te,"weekday"),className:B.weekDayLabel,children:A(Te)},_e.toString()))]}),l?v.jsx(u7,{className:B.loadingContainer,children:m()}):v.jsx(d7,ie({transKey:ne,onExited:f,reduceAnimations:g,slideDirection:b,className:ze(o,B.slideTransition)},y,{nodeRef:ce,children:v.jsx(f7,{ref:ce,role:"rowgroup",className:B.monthContainer,children:xe.map((Te,_e)=>v.jsxs(p7,{role:"row",className:B.weekContainer,"aria-rowindex":_e+1,children:[D&&v.jsx(c7,{className:B.weekNumber,role:"rowheader","aria-label":Y.calendarWeekNumberAriaLabelText(n.getWeekNumber(Te[0])),children:Y.calendarWeekNumberText(n.getWeekNumber(Te[0]))}),Te.map((Ne,He)=>v.jsx(h7,{parentProps:e,day:Ne,selectedDays:ve,focusableDay:fe,onKeyDown:ye,onFocus:de,onBlur:X,onDaySelect:me,isDateDisabled:K,currentMonthNumber:Q,isViewFocused:G,"aria-colindex":He+1},Ne.toString()))]},`week-${Te[0]}`))})}))]})}function m7(t){return Qe("MuiPickersMonth",t)}const qf=tt("MuiPickersMonth",["root","monthButton","disabled","selected"]),y7=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],b7=t=>{const{disabled:e,selected:n,classes:r}=t;return Ze({root:["root"],monthButton:["monthButton",e&&"disabled",n&&"selected"]},m7,r)},v7=Se("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(t,e)=>[e.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),x7=Se("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(t,e)=>[e.monthButton,{[`&.${qf.disabled}`]:e.disabled},{[`&.${qf.selected}`]:e.selected}]})(({theme:t})=>ie({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt(t.palette.action.active,t.palette.action.hoverOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${qf.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${qf.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),S7=P.memo(function(e){const n=Zt({props:e,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:l,tabIndex:u,onClick:f,onKeyDown:p,onFocus:g,onBlur:m,"aria-current":b,"aria-label":y,slots:x,slotProps:w}=n,T=dt(n,y7),_=P.useRef(null),C=b7(n);Fn(()=>{var A;r&&((A=_.current)==null||A.focus())},[r]);const E=(x==null?void 0:x.monthButton)??x7,M=Mt({elementType:E,externalSlotProps:w==null?void 0:w.monthButton,additionalProps:{children:i,disabled:s,tabIndex:u,ref:_,type:"button",role:"radio","aria-current":b,"aria-checked":a,"aria-label":y,onClick:A=>f(A,l),onKeyDown:A=>p(A,l),onFocus:A=>g(A,l),onBlur:A=>m(A,l)},ownerState:n,className:C.monthButton});return v.jsx(v7,ie({className:ze(C.root,o),ownerState:n},T,{children:v.jsx(E,ie({},M))}))});function w7(t){return Qe("MuiMonthCalendar",t)}tt("MuiMonthCalendar",["root"]);const C7=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],_7=t=>{const{classes:e}=t;return Ze({root:["root"]},w7,e)};function T7(t,e){const n=Qt(),r=Bc(),o=Zt({props:t,name:e});return ie({disableFuture:!1,disablePast:!1},o,{minDate:Xr(n,o.minDate,r.minDate),maxDate:Xr(n,o.maxDate,r.maxDate)})}const k7=Se("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Wf,boxSizing:"border-box"}),ME=P.forwardRef(function(e,n){const r=T7(e,"MuiMonthCalendar"),{className:o,value:i,defaultValue:s,referenceDate:a,disabled:l,disableFuture:u,disablePast:f,maxDate:p,minDate:g,onChange:m,shouldDisableMonth:b,readOnly:y,autoFocus:x=!1,onMonthFocus:w,hasFocus:T,onFocusedViewChange:_,monthsPerRow:C=3,timezone:E,gridLabelId:M,slots:A,slotProps:I}=r,L=dt(r,C7),{value:O,handleValueChange:D,timezone:F}=uy({name:"MonthCalendar",timezone:E,value:i,defaultValue:s,referenceDate:a,onChange:m,valueManager:jo}),V=vf(F),z=hi(),R=Qt(),B=P.useMemo(()=>jo.getInitialReferenceValue({value:O,utils:R,props:r,timezone:F,referenceDate:a,granularity:Ho.month}),[]),U=r,K=_7(U),Y=P.useMemo(()=>R.getMonth(V),[R,V]),G=P.useMemo(()=>O!=null?R.getMonth(O):null,[O,R]),[Z,ge]=P.useState(()=>G||R.getMonth(B)),[he,me]=ui({name:"MonthCalendar",state:"hasFocus",controlled:T,default:x??!1}),oe=Ue(ne=>{me(ne),_&&_(ne)}),ye=P.useCallback(ne=>{const ce=R.startOfMonth(f&&R.isAfter(V,g)?V:g),fe=R.startOfMonth(u&&R.isBefore(V,p)?V:p),xe=R.startOfMonth(ne);return R.isBefore(xe,ce)||R.isAfter(xe,fe)?!0:b?b(xe):!1},[u,f,p,g,V,b,R]),de=Ue((ne,ce)=>{if(y)return;const fe=R.setMonth(O??B,ce);D(fe)}),X=Ue(ne=>{ye(R.setMonth(O??B,ne))||(ge(ne),oe(!0),w&&w(ne))});P.useEffect(()=>{ge(ne=>G!==null&&ne!==G?G:ne)},[G]);const Q=Ue((ne,ce)=>{switch(ne.key){case"ArrowUp":X((12+ce-3)%12),ne.preventDefault();break;case"ArrowDown":X((12+ce+3)%12),ne.preventDefault();break;case"ArrowLeft":X((12+ce+(z?1:-1))%12),ne.preventDefault();break;case"ArrowRight":X((12+ce+(z?-1:1))%12),ne.preventDefault();break}}),ae=Ue((ne,ce)=>{X(ce)}),ve=Ue((ne,ce)=>{Z===ce&&oe(!1)});return v.jsx(k7,ie({ref:n,className:ze(K.root,o),ownerState:U,role:"radiogroup","aria-labelledby":M},L,{children:ry(R,O??B).map(ne=>{const ce=R.getMonth(ne),fe=R.format(ne,"monthShort"),xe=R.format(ne,"month"),Te=ce===G,_e=l||ye(ne);return v.jsx(S7,{selected:Te,value:ce,onClick:de,onKeyDown:Q,autoFocus:he&&ce===Z,disabled:_e,tabIndex:ce===Z&&!_e?0:-1,onFocus:ae,onBlur:ve,"aria-current":Y===ce?"date":void 0,"aria-label":xe,monthsPerRow:C,slots:A,slotProps:I,children:fe},fe)})}))});process.env.NODE_ENV!=="production"&&(ME.propTypes={autoFocus:c.bool,classes:c.object,className:c.string,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disablePast:c.bool,gridLabelId:c.string,hasFocus:c.bool,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),onChange:c.func,onFocusedViewChange:c.func,onMonthFocus:c.func,readOnly:c.bool,referenceDate:c.object,shouldDisableMonth:c.func,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object});function E7(t){return Qe("MuiPickersYear",t)}const Uf=tt("MuiPickersYear",["root","yearButton","selected","disabled"]),O7=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],M7=t=>{const{disabled:e,selected:n,classes:r}=t;return Ze({root:["root"],yearButton:["yearButton",e&&"disabled",n&&"selected"]},E7,r)},A7=Se("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(t,e)=>[e.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),I7=Se("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(t,e)=>[e.yearButton,{[`&.${Uf.disabled}`]:e.disabled},{[`&.${Uf.selected}`]:e.selected}]})(({theme:t})=>ie({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.focusOpacity})`:Kt(t.palette.action.active,t.palette.action.focusOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Kt(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Uf.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${Uf.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),D7=P.memo(function(e){const n=Zt({props:e,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:l,tabIndex:u,onClick:f,onKeyDown:p,onFocus:g,onBlur:m,"aria-current":b,slots:y,slotProps:x}=n,w=dt(n,O7),T=P.useRef(null),_=M7(n);Fn(()=>{var M;r&&((M=T.current)==null||M.focus())},[r]);const C=(y==null?void 0:y.yearButton)??I7,E=Mt({elementType:C,externalSlotProps:x==null?void 0:x.yearButton,additionalProps:{children:i,disabled:s,tabIndex:u,ref:T,type:"button",role:"radio","aria-current":b,"aria-checked":a,onClick:M=>f(M,l),onKeyDown:M=>p(M,l),onFocus:M=>g(M,l),onBlur:M=>m(M,l)},ownerState:n,className:_.yearButton});return v.jsx(A7,ie({className:ze(_.root,o),ownerState:n},w,{children:v.jsx(C,ie({},E))}))});function P7(t){return Qe("MuiYearCalendar",t)}tt("MuiYearCalendar",["root"]);const N7=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],L7=t=>{const{classes:e}=t;return Ze({root:["root"]},P7,e)};function $7(t,e){const n=Qt(),r=Bc(),o=Zt({props:t,name:e});return ie({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Xr(n,o.minDate,r.minDate),maxDate:Xr(n,o.maxDate,r.maxDate)})}const F7=Se("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Wf,maxHeight:k8,boxSizing:"border-box",position:"relative"}),AE=P.forwardRef(function(e,n){const r=$7(e,"MuiYearCalendar"),{autoFocus:o,className:i,value:s,defaultValue:a,referenceDate:l,disabled:u,disableFuture:f,disablePast:p,maxDate:g,minDate:m,onChange:b,readOnly:y,shouldDisableYear:x,onYearFocus:w,hasFocus:T,onFocusedViewChange:_,yearsOrder:C="asc",yearsPerRow:E,timezone:M,gridLabelId:A,slots:I,slotProps:L}=r,O=dt(r,N7),{value:D,handleValueChange:F,timezone:V}=uy({name:"YearCalendar",timezone:M,value:s,defaultValue:a,referenceDate:l,onChange:b,valueManager:jo}),z=vf(V),R=hi(),B=Qt(),U=P.useMemo(()=>jo.getInitialReferenceValue({value:D,utils:B,props:r,timezone:V,referenceDate:l,granularity:Ho.year}),[]),K=r,Y=L7(K),G=P.useMemo(()=>B.getYear(z),[B,z]),Z=P.useMemo(()=>D!=null?B.getYear(D):null,[D,B]),[ge,he]=P.useState(()=>Z||B.getYear(U)),[me,oe]=ui({name:"YearCalendar",state:"hasFocus",controlled:T,default:o??!1}),ye=Ue(Ne=>{oe(Ne),_&&_(Ne)}),de=P.useCallback(Ne=>{if(p&&B.isBeforeYear(Ne,z)||f&&B.isAfterYear(Ne,z)||m&&B.isBeforeYear(Ne,m)||g&&B.isAfterYear(Ne,g))return!0;if(!x)return!1;const He=B.startOfYear(Ne);return x(He)},[f,p,g,m,z,x,B]),X=Ue((Ne,He)=>{if(y)return;const W=B.setYear(D??U,He);F(W)}),Q=Ue(Ne=>{de(B.setYear(D??U,Ne))||(he(Ne),ye(!0),w==null||w(Ne))});P.useEffect(()=>{he(Ne=>Z!==null&&Ne!==Z?Z:Ne)},[Z]);const ae=C!=="desc"?E*1:E*-1,ve=R&&C==="asc"||!R&&C==="desc"?-1:1,ne=Ue((Ne,He)=>{switch(Ne.key){case"ArrowUp":Q(He-ae),Ne.preventDefault();break;case"ArrowDown":Q(He+ae),Ne.preventDefault();break;case"ArrowLeft":Q(He-ve),Ne.preventDefault();break;case"ArrowRight":Q(He+ve),Ne.preventDefault();break}}),ce=Ue((Ne,He)=>{Q(He)}),fe=Ue((Ne,He)=>{ge===He&&ye(!1)}),xe=P.useRef(null),Te=Nt(n,xe);P.useEffect(()=>{if(o||xe.current===null)return;const Ne=xe.current.querySelector('[tabindex="0"]');if(!Ne)return;const He=Ne.offsetHeight,W=Ne.offsetTop,te=xe.current.clientHeight,re=xe.current.scrollTop,Me=W+He;He>te||W<re||(xe.current.scrollTop=Me-te/2-He/2)},[o]);const _e=B.getYearRange([m,g]);return C==="desc"&&_e.reverse(),v.jsx(F7,ie({ref:Te,className:ze(Y.root,i),ownerState:K,role:"radiogroup","aria-labelledby":A},O,{children:_e.map(Ne=>{const He=B.getYear(Ne),W=He===Z,te=u||de(Ne);return v.jsx(D7,{selected:W,value:He,onClick:X,onKeyDown:ne,autoFocus:me&&He===ge,disabled:te,tabIndex:He===ge&&!te?0:-1,onFocus:ce,onBlur:fe,"aria-current":G===He?"date":void 0,yearsPerRow:E,slots:I,slotProps:L,children:B.format(Ne,"year")},B.format(Ne,"year"))})}))});process.env.NODE_ENV!=="production"&&(AE.propTypes={autoFocus:c.bool,classes:c.object,className:c.string,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disablePast:c.bool,gridLabelId:c.string,hasFocus:c.bool,maxDate:c.object,minDate:c.object,onChange:c.func,onFocusedViewChange:c.func,onYearFocus:c.func,readOnly:c.bool,referenceDate:c.object,shouldDisableYear:c.func,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])});const R7=t=>Qe("MuiPickersCalendarHeader",t),B7=tt("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function V7(t){return Qe("MuiPickersArrowSwitcher",t)}tt("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const z7=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],H7=["ownerState"],j7=["ownerState"],W7=Se("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex"}),q7=Se("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})(({theme:t})=>({width:t.spacing(3)})),IE=Se(nl,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(t,e)=>e.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),U7=t=>{const{classes:e}=t;return Ze({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},V7,e)},K7=P.forwardRef(function(e,n){const r=hi(),o=Zt({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:s,slots:a,slotProps:l,isNextDisabled:u,isNextHidden:f,onGoToNext:p,nextLabel:g,isPreviousDisabled:m,isPreviousHidden:b,onGoToPrevious:y,previousLabel:x,labelId:w}=o,T=dt(o,z7),_=o,C=U7(_),E={isDisabled:u,isHidden:f,goTo:p,label:g},M={isDisabled:m,isHidden:b,goTo:y,label:x},A=(a==null?void 0:a.previousIconButton)??IE,I=Mt({elementType:A,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:M.label,"aria-label":M.label,disabled:M.isDisabled,edge:"end",onClick:M.goTo},ownerState:ie({},_,{hidden:M.isHidden}),className:ze(C.button,C.previousIconButton)}),L=(a==null?void 0:a.nextIconButton)??IE,O=Mt({elementType:L,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:E.label,"aria-label":E.label,disabled:E.isDisabled,edge:"start",onClick:E.goTo},ownerState:ie({},_,{hidden:E.isHidden}),className:ze(C.button,C.nextIconButton)}),D=(a==null?void 0:a.leftArrowIcon)??c6,F=Mt({elementType:D,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:_,className:C.leftArrowIcon}),V=dt(F,H7),z=(a==null?void 0:a.rightArrowIcon)??u6,R=Mt({elementType:z,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:_,className:C.rightArrowIcon}),B=dt(R,j7);return v.jsxs(W7,ie({ref:n,className:ze(C.root,s),ownerState:_},T,{children:[v.jsx(A,ie({},I,{children:r?v.jsx(z,ie({},B)):v.jsx(D,ie({},V))})),i?v.jsx(yi,{variant:"subtitle1",component:"span",id:w,children:i}):v.jsx(q7,{className:C.spacer,ownerState:_}),v.jsx(L,ie({},O,{children:r?v.jsx(D,ie({},V)):v.jsx(z,ie({},B))}))]}))});function G7(t,{disableFuture:e,maxDate:n,timezone:r}){const o=Qt();return P.useMemo(()=>{const i=o.date(void 0,r),s=o.startOfMonth(e&&o.isBefore(i,n)?i:n);return!o.isAfter(s,t)},[e,n,t,o,r])}function Y7(t,{disablePast:e,minDate:n,timezone:r}){const o=Qt();return P.useMemo(()=>{const i=o.date(void 0,r),s=o.startOfMonth(e&&o.isAfter(i,n)?i:n);return!o.isBefore(s,t)},[e,n,t,o,r])}const J7=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],X7=["ownerState"],Z7=t=>{const{classes:e}=t;return Ze({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},R7,e)},Q7=Se("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),eK=Se("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(t,e)=>e.labelContainer})(({theme:t})=>ie({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})),tK=Se("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(t,e)=>e.label})({marginRight:6}),nK=Se(nl,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(t,e)=>e.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${B7.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),rK=Se(l6,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(t,e)=>e.switchViewIcon})(({theme:t})=>({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"})),DE=P.forwardRef(function(e,n){const r=gi(),o=Qt(),i=Zt({props:e,name:"MuiPickersCalendarHeader"}),{slots:s,slotProps:a,currentMonth:l,disabled:u,disableFuture:f,disablePast:p,maxDate:g,minDate:m,onMonthChange:b,onViewChange:y,view:x,reduceAnimations:w,views:T,labelId:_,className:C,timezone:E,format:M=`${o.formats.month} ${o.formats.year}`}=i,A=dt(i,J7),I=i,L=Z7(i),O=(s==null?void 0:s.switchViewButton)??nK,D=Mt({elementType:O,externalSlotProps:a==null?void 0:a.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(x)},ownerState:I,className:L.switchViewButton}),F=(s==null?void 0:s.switchViewIcon)??rK,V=Mt({elementType:F,externalSlotProps:a==null?void 0:a.switchViewIcon,ownerState:I,className:L.switchViewIcon}),z=dt(V,X7),R=()=>b(o.addMonths(l,1),"left"),B=()=>b(o.addMonths(l,-1),"right"),U=G7(l,{disableFuture:f,maxDate:g,timezone:E}),K=Y7(l,{disablePast:p,minDate:m,timezone:E}),Y=()=>{if(!(T.length===1||!y||u))if(T.length===2)y(T.find(Z=>Z!==x)||T[0]);else{const Z=T.indexOf(x)!==0?0:1;y(T[Z])}};if(T.length===1&&T[0]==="year")return null;const G=o.formatByString(l,M);return v.jsxs(Q7,ie({},A,{ownerState:I,className:ze(L.root,C),ref:n,children:[v.jsxs(eK,{role:"presentation",onClick:Y,ownerState:I,"aria-live":"polite",className:L.labelContainer,children:[v.jsx(_E,{reduceAnimations:w,transKey:G,children:v.jsx(tK,{id:_,ownerState:I,className:L.label,children:G})}),T.length>1&&!u&&v.jsx(O,ie({},D,{children:v.jsx(F,ie({},z))}))]}),v.jsx(Xi,{in:x==="day",appear:!w,enter:!w,children:v.jsx(K7,{slots:s,slotProps:a,onGoToPrevious:B,isPreviousDisabled:K,previousLabel:r.previousMonth,onGoToNext:R,isNextDisabled:U,nextLabel:r.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(DE.propTypes={classes:c.object,className:c.string,currentMonth:c.object.isRequired,disabled:c.bool,disableFuture:c.bool,disablePast:c.bool,format:c.string,labelId:c.string,maxDate:c.object.isRequired,minDate:c.object.isRequired,onMonthChange:c.func.isRequired,onViewChange:c.func,reduceAnimations:c.bool.isRequired,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string.isRequired,view:c.oneOf(["day","month","year"]).isRequired,views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired).isRequired});const oK=Se("div")({overflow:"hidden",width:Wf,maxHeight:Dy,display:"flex",flexDirection:"column",margin:"0 auto"}),iK=t=>Qe("MuiDateCalendar",t);tt("MuiDateCalendar",["root","viewTransitionContainer"]);const sK=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],aK=t=>{const{classes:e}=t;return Ze({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},iK,e)};function lK(t,e){const n=Qt(),r=Bc(),o=lE(),i=Zt({props:t,name:e});return ie({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>v.jsx("span",{children:"..."})),minDate:Xr(n,i.minDate,r.minDate),maxDate:Xr(n,i.maxDate,r.maxDate)})}const cK=Se(oK,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"column",height:Dy}),uK=Se(_E,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(t,e)=>e.viewTransitionContainer})({}),PE=P.forwardRef(function(e,n){const r=Qt(),o=Bo(),i=lK(e,"MuiDateCalendar"),{autoFocus:s,onViewChange:a,value:l,defaultValue:u,referenceDate:f,disableFuture:p,disablePast:g,onChange:m,onYearChange:b,onMonthChange:y,reduceAnimations:x,shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:_,view:C,views:E,openTo:M,className:A,disabled:I,readOnly:L,minDate:O,maxDate:D,disableHighlightToday:F,focusedView:V,onFocusedViewChange:z,showDaysOutsideCurrentMonth:R,fixedWeekNumber:B,dayOfWeekFormatter:U,slots:K,slotProps:Y,loading:G,renderLoading:Z,displayWeekNumber:ge,yearsOrder:he,yearsPerRow:me,monthsPerRow:oe,timezone:ye}=i,de=dt(i,sK),{value:X,handleValueChange:Q,timezone:ae}=uy({name:"DateCalendar",timezone:ye,value:l,defaultValue:u,referenceDate:f,onChange:m,valueManager:jo}),{view:ve,setView:ne,focusedView:ce,setFocusedView:fe,goToNextView:xe,setValueAndGoToNextView:Te}=cE({view:C,views:E,openTo:M,onChange:Q,onViewChange:a,autoFocus:s,focusedView:V,onFocusedViewChange:z}),{referenceDate:_e,calendarState:Ne,changeFocusedDay:He,changeMonth:W,handleChangeMonth:te,isDateDisabled:re,onMonthSwitchingAnimationEnd:Me}=V8({value:X,referenceDate:f,reduceAnimations:x,onMonthChange:y,minDate:O,maxDate:D,shouldDisableDate:w,disablePast:g,disableFuture:p,timezone:ae}),Ie=I&&X||O,De=I&&X||D,je=`${o}-grid-label`,ot=ce!==null,nt=(K==null?void 0:K.calendarHeader)??DE,At=Mt({elementType:nt,externalSlotProps:Y==null?void 0:Y.calendarHeader,additionalProps:{views:E,view:ve,currentMonth:Ne.currentMonth,onViewChange:ne,onMonthChange:(ct,zt)=>te({newMonth:ct,direction:zt}),minDate:Ie,maxDate:De,disabled:I,disablePast:g,disableFuture:p,reduceAnimations:x,timezone:ae,labelId:je},ownerState:i}),_n=Ue(ct=>{const zt=r.startOfMonth(ct),gr=r.endOfMonth(ct),Or=re(ct)?$c({utils:r,date:ct,minDate:r.isBefore(O,zt)?zt:O,maxDate:r.isAfter(D,gr)?gr:D,disablePast:g,disableFuture:p,isDateDisabled:re,timezone:ae}):ct;Or?(Te(Or,"finish"),y==null||y(zt)):(xe(),W(zt)),He(Or,!0)}),ut=Ue(ct=>{const zt=r.startOfYear(ct),gr=r.endOfYear(ct),Or=re(ct)?$c({utils:r,date:ct,minDate:r.isBefore(O,zt)?zt:O,maxDate:r.isAfter(D,gr)?gr:D,disablePast:g,disableFuture:p,isDateDisabled:re,timezone:ae}):ct;Or?(Te(Or,"finish"),b==null||b(Or)):(xe(),W(zt)),He(Or,!0)}),Pn=Ue(ct=>Q(ct&&yf(r,ct,X??_e),"finish",ve));P.useEffect(()=>{X!=null&&r.isValid(X)&&W(X)},[X]);const $t=i,pe=aK($t),We={disablePast:g,disableFuture:p,maxDate:D,minDate:O},Ae={disableHighlightToday:F,readOnly:L,disabled:I,timezone:ae,gridLabelId:je,slots:K,slotProps:Y},qe=P.useRef(ve);P.useEffect(()=>{qe.current!==ve&&(ce===qe.current&&fe(ve,!0),qe.current=ve)},[ce,fe,ve]);const Xe=P.useMemo(()=>[X],[X]);return v.jsxs(cK,ie({ref:n,className:ze(pe.root,A),ownerState:$t},de,{children:[v.jsx(nt,ie({},At,{slots:K,slotProps:Y})),v.jsx(uK,{reduceAnimations:x,className:pe.viewTransitionContainer,transKey:ve,ownerState:$t,children:v.jsxs("div",{children:[ve==="year"&&v.jsx(AE,ie({},We,Ae,{value:X,onChange:ut,shouldDisableYear:_,hasFocus:ot,onFocusedViewChange:ct=>fe("year",ct),yearsOrder:he,yearsPerRow:me,referenceDate:_e})),ve==="month"&&v.jsx(ME,ie({},We,Ae,{hasFocus:ot,className:A,value:X,onChange:_n,shouldDisableMonth:T,onFocusedViewChange:ct=>fe("month",ct),monthsPerRow:oe,referenceDate:_e})),ve==="day"&&v.jsx(g7,ie({},Ne,We,Ae,{onMonthSwitchingAnimationEnd:Me,onFocusedDayChange:He,reduceAnimations:x,selectedDays:Xe,onSelectedDaysChange:Pn,shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:_,hasFocus:ot,onFocusedViewChange:ct=>fe("day",ct),showDaysOutsideCurrentMonth:R,fixedWeekNumber:B,dayOfWeekFormatter:U,displayWeekNumber:ge,loading:G,renderLoading:Z}))]})})]}))});process.env.NODE_ENV!=="production"&&(PE.propTypes={autoFocus:c.bool,classes:c.object,className:c.string,dayOfWeekFormatter:c.func,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,fixedWeekNumber:c.number,focusedView:c.oneOf(["day","month","year"]),loading:c.bool,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),onChange:c.func,onFocusedViewChange:c.func,onMonthChange:c.func,onViewChange:c.func,onYearChange:c.func,openTo:c.oneOf(["day","month","year"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])});const dl=({view:t,onViewChange:e,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:l,className:u,classes:f,disableFuture:p,disablePast:g,minDate:m,maxDate:b,shouldDisableDate:y,shouldDisableMonth:x,shouldDisableYear:w,reduceAnimations:T,onMonthChange:_,monthsPerRow:C,onYearChange:E,yearsOrder:M,yearsPerRow:A,slots:I,slotProps:L,loading:O,renderLoading:D,disableHighlightToday:F,readOnly:V,disabled:z,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:B,sx:U,autoFocus:K,fixedWeekNumber:Y,displayWeekNumber:G,timezone:Z})=>v.jsx(PE,{view:t,onViewChange:e,views:n.filter(jT),focusedView:r&&jT(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:l,className:u,classes:f,disableFuture:p,disablePast:g,minDate:m,maxDate:b,shouldDisableDate:y,shouldDisableMonth:x,shouldDisableYear:w,reduceAnimations:T,onMonthChange:_,monthsPerRow:C,onYearChange:E,yearsOrder:M,yearsPerRow:A,slots:I,slotProps:L,loading:O,renderLoading:D,disableHighlightToday:F,readOnly:V,disabled:z,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:B,sx:U,autoFocus:K,fixedWeekNumber:Y,displayWeekNumber:G,timezone:Z}),NE=P.forwardRef(function(e,n){var u,f;const r=gi(),o=Qt(),i=Fk(e,"MuiDesktopDatePicker"),s=ie({day:dl,month:dl,year:dl},i.viewRenderers),a=ie({},i,{viewRenderers:s,format:oy(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:ie({openPickerIcon:d6,field:Lf},i.slots),slotProps:ie({},i.slotProps,{field:p=>{var g;return ie({},kd((g=i.slotProps)==null?void 0:g.field,p),rk(i),{ref:n})},toolbar:ie({hidden:!0},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:l}=R8({props:a,valueManager:jo,valueType:"date",getOpenDialogAriaText:ok({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=a.localeText)==null?void 0:f.openDatePickerDialogue}),validator:Rc});return l()});NE.propTypes={autoFocus:c.bool,className:c.string,closeOnSelect:c.bool,dayOfWeekFormatter:c.func,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disableOpenPicker:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,enableAccessibleFieldDOMStructure:c.any,fixedWeekNumber:c.number,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),inputRef:En,label:c.node,loading:c.bool,localeText:c.object,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),name:c.string,onAccept:c.func,onChange:c.func,onClose:c.func,onError:c.func,onMonthChange:c.func,onOpen:c.func,onSelectedSectionsChange:c.func,onViewChange:c.func,onYearChange:c.func,open:c.bool,openTo:c.oneOf(["day","month","year"]),orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),viewRenderers:c.shape({day:c.func,month:c.func,year:c.func}),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])};function dK(t){return Qe("MuiDialogContent",t)}tt("MuiDialogContent",["root","dividers"]);const fK=tt("MuiDialogTitle",["root"]),pK=t=>{const{classes:e,dividers:n}=t;return Ze({root:["root",n&&"dividers"]},dK,e)},hK=Se("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(Vt(({theme:t})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${fK.root} + &`]:{paddingTop:0}}}]}))),LE=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...s}=r,a={...r,dividers:i},l=pK(a);return v.jsx(hK,{className:ze(l.root,o),ownerState:a,ref:n,...s})});process.env.NODE_ENV!=="production"&&(LE.propTypes={children:c.node,classes:c.object,className:c.string,dividers:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function gK(t){return Qe("MuiDialog",t)}const tu=tt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),$E=P.createContext({});process.env.NODE_ENV!=="production"&&($E.displayName="DialogContext");const mK=Se(Zm,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),yK=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=t,s={root:["root"],container:["container",`scroll${$e(n)}`],paper:["paper",`paperScroll${$e(n)}`,`paperWidth${$e(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Ze(s,gK,e)},bK=Se(Qm,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),vK=Se("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${$e(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"}}}]}),xK=Se(Ws,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${$e(n.scroll)}`],e[`paperWidth${$e(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(Vt(({theme:t})=>({margin:32,position:"relative",overflowY:"auto","@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:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${tu.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(t.breakpoints.values).filter(e=>e!=="xs").map(e=>({props:{maxWidth:e},style:{maxWidth:`${t.breakpoints.values[e]}${t.breakpoints.unit}`,[`&.${tu.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e]+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,[`&.${tu.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),FE=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiDialog"}),o=fi(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:f,children:p,className:g,disableEscapeKeyDown:m=!1,fullScreen:b=!1,fullWidth:y=!1,maxWidth:x="sm",onBackdropClick:w,onClick:T,onClose:_,open:C,PaperComponent:E=Ws,PaperProps:M={},scroll:A="paper",slots:I={},slotProps:L={},TransitionComponent:O=Xi,transitionDuration:D=i,TransitionProps:F,...V}=r,z={...r,disableEscapeKeyDown:m,fullScreen:b,fullWidth:y,maxWidth:x,scroll:A},R=yK(z),B=P.useRef(),U=fe=>{B.current=fe.target===fe.currentTarget},K=fe=>{T&&T(fe),B.current&&(B.current=null,w&&w(fe),_&&_(fe,"backdropClick"))},Y=Bo(a),G=P.useMemo(()=>({titleId:Y}),[Y]),Z={transition:O,...I},ge={transition:F,paper:M,backdrop:f,...L},he={slots:Z,slotProps:ge},[me,oe]=Wt("root",{elementType:bK,shouldForwardComponentProp:!0,externalForwardedProps:he,ownerState:z,className:ze(R.root,g),ref:n}),[ye,de]=Wt("backdrop",{elementType:mK,shouldForwardComponentProp:!0,externalForwardedProps:he,ownerState:z}),[X,Q]=Wt("paper",{elementType:xK,shouldForwardComponentProp:!0,externalForwardedProps:he,ownerState:z,className:ze(R.paper,M.className)}),[ae,ve]=Wt("container",{elementType:vK,externalForwardedProps:he,ownerState:z,className:ze(R.container)}),[ne,ce]=Wt("transition",{elementType:Xi,externalForwardedProps:he,ownerState:z,additionalProps:{appear:!0,in:C,timeout:D,role:"presentation"}});return v.jsx(me,{closeAfterTransition:!0,slots:{backdrop:ye},slotProps:{backdrop:{transitionDuration:D,as:u,...de}},disableEscapeKeyDown:m,onClose:_,open:C,onClick:K,...oe,...V,children:v.jsx(ne,{...ce,children:v.jsx(ae,{onMouseDown:U,...ve,children:v.jsx(X,{as:E,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":Y,"aria-modal":l,...Q,children:v.jsx($E.Provider,{value:G,children:p})})})})})});process.env.NODE_ENV!=="production"&&(FE.propTypes={"aria-describedby":c.string,"aria-labelledby":c.string,"aria-modal":c.oneOfType([c.oneOf(["false","true"]),c.bool]),BackdropComponent:c.elementType,BackdropProps:c.object,children:c.node,classes:c.object,className:c.string,disableEscapeKeyDown:c.bool,fullScreen:c.bool,fullWidth:c.bool,maxWidth:c.oneOfType([c.oneOf(["xs","sm","md","lg","xl",!1]),c.string]),onBackdropClick:c.func,onClick:c.func,onClose:c.func,open:c.bool.isRequired,PaperComponent:c.elementType,PaperProps:c.object,scroll:c.oneOf(["body","paper"]),slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),container:c.oneOfType([c.func,c.object]),paper:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,container:c.elementType,paper:c.elementType,root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})]),TransitionProps:c.object});const SK=Se(FE)({[`& .${tu.container}`]:{outline:0},[`& .${tu.paper}`]:{outline:0,minWidth:Wf}}),wK=Se(LE)({"&:first-of-type":{padding:0}});function CK(t){const{children:e,onDismiss:n,open:r,slots:o,slotProps:i}=t,s=(o==null?void 0:o.dialog)??SK,a=(o==null?void 0:o.mobileTransition)??Xi;return v.jsx(s,ie({open:r,onClose:n},i==null?void 0:i.dialog,{TransitionComponent:a,TransitionProps:i==null?void 0:i.mobileTransition,PaperComponent:o==null?void 0:o.mobilePaper,PaperProps:i==null?void 0:i.mobilePaper,children:v.jsx(wK,{children:e})}))}const _K=["props","getOpenDialogAriaText"],TK=t=>{var Z;let{props:e,getOpenDialogAriaText:n}=t,r=dt(t,_K);const{slots:o,slotProps:i,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:g,timezone:m,name:b,label:y,inputRef:x,readOnly:w,disabled:T,localeText:_}=e,C=P.useRef(null),E=Bo(),M=((Z=i==null?void 0:i.toolbar)==null?void 0:Z.hidden)??!1,{open:A,actions:I,layoutProps:L,renderCurrentView:O,fieldProps:D,contextValue:F}=dE(ie({},r,{props:e,fieldRef:C,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),V=o.field,z=Mt({elementType:V,externalSlotProps:i==null?void 0:i.field,additionalProps:ie({},D,M&&{id:E},!(T||w)&&{onClick:I.onOpen,onKeyDown:_W(I.onOpen)},{readOnly:w??!0,disabled:T,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:g,timezone:m,label:y,name:b},x?{inputRef:x}:{}),ownerState:e});z.inputProps=ie({},z.inputProps,{"aria-label":n(D.value)});const R=ie({textField:o.textField},z.slots),B=o.layout??Py;let U=E;M&&(y?U=`${E}-label`:U=void 0);const K=ie({},i,{toolbar:ie({},i==null?void 0:i.toolbar,{titleId:E}),mobilePaper:ie({"aria-labelledby":U},i==null?void 0:i.mobilePaper)}),Y=Nt(C,z.unstableFieldRef);return{renderPicker:()=>v.jsxs(hk,{contextValue:F,localeText:_,children:[v.jsx(V,ie({},z,{slots:R,slotProps:K,unstableFieldRef:Y})),v.jsx(CK,ie({},I,{open:A,slots:o,slotProps:K,children:v.jsx(B,ie({},L,K==null?void 0:K.layout,{slots:o,slotProps:K,children:O()}))}))]})}},RE=P.forwardRef(function(e,n){var u,f;const r=gi(),o=Qt(),i=Fk(e,"MuiMobileDatePicker"),s=ie({day:dl,month:dl,year:dl},i.viewRenderers),a=ie({},i,{viewRenderers:s,format:oy(o,i,!1),slots:ie({field:Lf},i.slots),slotProps:ie({},i.slotProps,{field:p=>{var g;return ie({},kd((g=i.slotProps)==null?void 0:g.field,p),rk(i),{ref:n})},toolbar:ie({hidden:!1},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:l}=TK({props:a,valueManager:jo,valueType:"date",getOpenDialogAriaText:ok({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=a.localeText)==null?void 0:f.openDatePickerDialogue}),validator:Rc});return l()});RE.propTypes={autoFocus:c.bool,className:c.string,closeOnSelect:c.bool,dayOfWeekFormatter:c.func,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disableOpenPicker:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,enableAccessibleFieldDOMStructure:c.any,fixedWeekNumber:c.number,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),inputRef:En,label:c.node,loading:c.bool,localeText:c.object,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),name:c.string,onAccept:c.func,onChange:c.func,onClose:c.func,onError:c.func,onMonthChange:c.func,onOpen:c.func,onSelectedSectionsChange:c.func,onViewChange:c.func,onYearChange:c.func,open:c.bool,openTo:c.oneOf(["day","month","year"]),orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),viewRenderers:c.shape({day:c.func,month:c.func,year:c.func}),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])};const kK=["desktopModeMediaQuery"],BE=P.forwardRef(function(e,n){const r=Zt({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=TW}=r,i=dt(r,kK);return Lk(o,{defaultMatches:!0})?v.jsx(NE,ie({ref:n},i)):v.jsx(RE,ie({ref:n},i))});process.env.NODE_ENV!=="production"&&(BE.propTypes={autoFocus:c.bool,className:c.string,closeOnSelect:c.bool,dayOfWeekFormatter:c.func,defaultValue:c.object,desktopModeMediaQuery:c.string,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disableOpenPicker:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,enableAccessibleFieldDOMStructure:c.any,fixedWeekNumber:c.number,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),inputRef:En,label:c.node,loading:c.bool,localeText:c.object,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),name:c.string,onAccept:c.func,onChange:c.func,onClose:c.func,onError:c.func,onMonthChange:c.func,onOpen:c.func,onSelectedSectionsChange:c.func,onViewChange:c.func,onYearChange:c.func,open:c.bool,openTo:c.oneOf(["day","month","year"]),orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),viewRenderers:c.shape({day:c.func,month:c.func,year:c.func}),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])});const EK={invalidDate:"Date selected is invalid",minDate:"Date selected is too far in the past",maxDate:"Date selected is too far in the future",disableFuture:"Date selected cannot be in the future",disablePast:"Date selected cannot be in the past"},Kf=t=>{const{name:e,label:n=Wn(e),required:r=!1,readOnly:o=!1,format:i="MM/DD/YYYY",errorMessages:s,isDatePicker:a=!1,margin:l="dense",staticLabel:u=!1,staticLabelProps:f={fontSize:".9em",color:"#808080"}}=t,{control:p,setValue:g,getValues:m,setError:b,clearErrors:y,formState:{errors:x}}=an(),[w,T]=P.useState(null),_={...EK,...s},C=["staticLabel","staticLabelProps","label","errorMessages","isDatePicker","dateFieldProps","datePickerProps","useIso","onChange"];P.useEffect(()=>{w?b(e,{type:"manual",message:_[w]??w}):y(e)},[w]);const E=A=>{if(A!=null)return A==null||A==""?null:On.utc(A)},M={label:u?void 0:n,onChange:(A,I)=>{let L="";try{const O=A==null?void 0:A.utc();L=(O==null?void 0:O.toISOString())??""}catch{}g(e,L,{shouldValidate:!0}),t.onChange&&t.onChange(L,I)},format:i,onError:T,value:E(m(e)),...lr({...t},C)};return v.jsx(Xn,{name:e,control:p,render:({field:A})=>{var I;return v.jsxs($.FormControl,{fullWidth:!0,margin:l,children:[(u||o)&&v.jsx($.Typography,{...f,children:n}),o?v.jsx($.Typography,{children:(I=E(m(e)))==null?void 0:I.format(i)}):v.jsxs($.Box,{children:[v.jsx($m,{dateAdapter:R4,children:v.jsx($.Box,{children:a?v.jsx(BE,{...A,...M,slotProps:{textField:{fullWidth:!0,error:!!x[e],required:!!r}}}):v.jsx(Lf,{id:`${e}-df`,...A,...M,fullWidth:!0,slotProps:{textField:{error:!!x[e]}}})})}),v.jsx(ur,{name:e,id:`${e}-err`})]})]})}})},OK=t=>{const{nameTo:e,nameFrom:n,labelTo:r=Wn(e),labelFrom:o=Wn(n),fromFieldProps:i,toFieldProps:s,staticLabels:a=!1}=t,l=["nameTo","nameFrom","toFieldProps","fromFieldProps","labelTo","labelFrom"],u=$.useMediaQuery($.useTheme().breakpoints.down("sm")),{trigger:f}=an(),p=yd({name:n}),g=yd({name:e});return P.useEffect(()=>{p!==void 0&&f(e),g!==void 0&&f(n)},[p,g]),v.jsxs("div",{style:{display:"flex",flexDirection:u?"column":"row",justifyContent:"space-between",gap:"10px"},children:[v.jsx(Kf,{name:n,staticLabel:a,label:o,...lr({...t,...i},l)}),v.jsx(Kf,{name:e,staticLabel:a,label:r,...lr({...t,...s},l)})]})};function qn(t){this.content=t}qn.prototype={constructor:qn,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new qn(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new qn(n)},addToStart:function(t,e){return new qn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new qn(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new qn(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=qn.from(t),t.size?new qn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=qn.from(t),t.size?new qn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=qn.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},qn.from=function(t){if(t instanceof qn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new qn(e)};function VE(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=VE(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function zE(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),a=e.child(--i),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,f=Math.min(s.text.length,a.text.length);for(;u<f&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=zE(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class Oe{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&r(l,o+a,i||null,s)!==!1&&l.content.size){let f=a+1;l.nodesBetween(Math.max(0,e-f),Math.min(l.content.size,n-f),r,o+f)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new Oe(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let a=this.content[i],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=l}return new Oe(r,o)}cutByIndex(e,n){return e==n?Oe.empty:e==0&&n==this.content.length?this:new Oe(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new Oe(o,i)}addToStart(e){return new Oe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Oe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return VE(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return zE(this,e,n,r)}findIndex(e){if(e==0)return Gf(0,e);if(e==this.size)return Gf(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e?Gf(n+1,i):Gf(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Oe.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Oe(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Oe.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Oe(n||e,r)}static from(e){if(!e)return Oe.empty;if(e instanceof Oe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Oe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Oe.empty=new Oe([],0);const Ny={index:0,offset:0};function Gf(t,e){return Ny.index=t,Ny.offset=e,Ny}function Yf(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Yf(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Yf(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let qt=class Sw{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Yf(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Sw.none;if(e instanceof Sw)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};qt.none=[];class Jf extends Error{}class Re{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=jE(this.content,e+this.openStart,n);return r&&new Re(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Re(HE(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Re.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Re(Oe.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new Re(e,r,o)}}Re.empty=new Re(Oe.empty,0,0);function HE(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(o==e||i.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(HE(i.content,e-o-1,n-o-1)))}function jE(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return t.cut(0,e).append(n).append(t.cut(e));let a=jE(s.content,e-i-1,n);return a&&t.replaceChild(o,s.copy(a))}function MK(t,e,n){if(n.openStart>t.depth)throw new Jf("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Jf("Inconsistent open depths");return WE(t,e,n,0)}function WE(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=WE(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,a=s.content;return ea(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=AK(n,t);return ea(i,UE(t,s,a,e,r))}else return ea(i,Xf(t,e,r))}function qE(t,e){if(!e.type.compatibleContent(t.type))throw new Jf("Cannot join "+e.type.name+" onto "+t.type.name)}function Ly(t,e,n){let r=t.node(n);return qE(r,e.node(n)),r}function Qs(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function nu(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Qs(t.nodeAfter,r),i++));for(let a=i;a<s;a++)Qs(o.child(a),r);e&&e.depth==n&&e.textOffset&&Qs(e.nodeBefore,r)}function ea(t,e){return t.type.checkContent(e),t.copy(e)}function UE(t,e,n,r,o){let i=t.depth>o&&Ly(t,e,o+1),s=r.depth>o&&Ly(n,r,o+1),a=[];return nu(null,t,o,a),i&&s&&e.index(o)==n.index(o)?(qE(i,s),Qs(ea(i,UE(t,e,n,r,o+1)),a)):(i&&Qs(ea(i,Xf(t,e,o+1)),a),nu(e,n,o,a),s&&Qs(ea(s,Xf(n,r,o+1)),a)),nu(r,null,o,a),new Oe(a)}function Xf(t,e,n){let r=[];if(nu(null,t,n,r),t.depth>n){let o=Ly(t,e,n+1);Qs(ea(o,Xf(t,e,n+1)),r)}return nu(e,null,n,r),new Oe(r)}function AK(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(Oe.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class ru{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return qt.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let a=r;r=o,o=a}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Zf(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,a,o+l),!u||(s=s.child(a),s.isText))break;i=u-1,o+=l+1}return new ru(n,r,i)}static resolveCached(e,n){let r=KE.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else KE.set(e,r=new IK);let o=r.elts[r.i]=ru.resolve(e,n);return r.i=(r.i+1)%DK,o}}class IK{constructor(){this.elts=[],this.i=0}}const DK=12,KE=new WeakMap;class Zf{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const PK=Object.create(null);let xi=class ww{constructor(e,n,r,o=qt.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||Oe.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Yf(this.attrs,n||e.defaultAttrs||PK)&&qt.sameSet(this.marks,r||qt.none)}copy(e=null){return e==this.content?this:new ww(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ww(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Re.empty;let o=this.resolve(e),i=this.resolve(n),s=r?0:o.sharedDepth(n),a=o.start(s),u=o.node(s).content.cut(o.pos-a,i.pos-a);return new Re(u,o.depth-s,i.depth-s)}replace(e,n,r){return MK(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return ru.resolveCached(this,e)}resolveNoCache(e){return ru.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),GE(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=Oe.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=qt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!qt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=Oe.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};xi.prototype.text=void 0;class Qf extends xi{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):GE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Qf(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Qf(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function GE(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class ta{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new NK(e,n);if(r.next==null)return ta.empty;let o=YE(r);r.next&&r.err("Unexpected trailing text");let i=zK(VK(o));return HK(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return Oe.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:f,next:p}=s.next[u];if(!(f.isText||f.hasRequiredAttrs())&&o.indexOf(p)==-1){o.push(p);let g=i(p,a.concat(f));if(g)return g}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let a=o;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:a,next:l}=i.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!o.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:o}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
243
+ `)}}ta.empty=new ta(!0);class NK{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function YE(t){let e=[];do e.push(LK(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function LK(t){let e=[];do e.push($K(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function $K(t){let e=BK(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=FK(t,e);else break;return e}function JE(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function FK(t,e){let n=JE(t),r=n;return t.eat(",")&&(t.next!="}"?r=JE(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function RK(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function BK(t){if(t.eat("(")){let e=YE(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=RK(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function VK(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,a,l){let u={term:l,to:a};return e[s].push(u),u}function o(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(i(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=i(s.exprs[l],a);if(l==s.exprs.length-1)return u;o(u,a=n())}else if(s.type=="star"){let l=n();return r(a,l),o(i(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return o(i(s.expr,a),l),o(i(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let f=n();o(i(s.expr,l),f),l=f}if(s.max==-1)o(i(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let f=n();r(l,f),o(i(s.expr,l),f),l=f}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function XE(t,e){return e-t}function ZE(t,e){let n=[];return r(e),n.sort(XE);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:a,to:l}=i[s];!a&&n.indexOf(l)==-1&&r(l)}}}function zK(t){let e=Object.create(null);return n(ZE(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let f=0;f<o.length;f++)o[f][0]==a&&(u=o[f][1]);ZE(t,l).forEach(f=>{u||o.push([a,u=[]]),u.indexOf(f)==-1&&u.push(f)})})});let i=e[r.join(",")]=new ta(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let a=o[s][1].sort(XE);i.next.push({type:o[s][0],next:e[a.join(",")]||n(a)})}return i}}function HK(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let a=0;a<o.next.length;a++){let{type:l,next:u}=o.next[a];s.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(u)==-1&&r.push(u)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function QE(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function eO(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function tO(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function nO(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new WK(t,r,e[r]);return n}let rO=class cB{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=nO(e,r.attrs),this.defaultAttrs=QE(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ta.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:eO(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new xi(this,this.computeAttrs(e),Oe.from(n),qt.setFrom(r))}createChecked(e=null,n,r){return n=Oe.from(n),this.checkContent(n),new xi(this,this.computeAttrs(e),n,qt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=Oe.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(Oe.empty,!0);return i?new xi(this,e,n.append(i),qt.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){tO(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:qt.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new cB(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function jK(t,e,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class WK{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?jK(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ep{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=nO(e,o.attrs),this.excluded=null;let i=QE(this.attrs);this.instance=i?new qt(this,i):null}create(e=null){return!e&&this.instance?this.instance:new qt(this,eO(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new ep(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){tO(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let oO=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=qn.from(e.nodes),n.marks=qn.from(e.marks||{}),this.nodes=rO.compile(this.spec.nodes,this),this.marks=ep.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=ta.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?iO(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:iO(this,s.split(" "))}this.nodeFromJSON=o=>xi.fromJSON(this,o),this.markFromJSON=o=>qt.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof rO){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Qf(r,r.defaultAttrs,e,qt.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function iO(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let a in t.marks){let l=t.marks[a];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function qK(t){return t.tag!=null}function UK(t){return t.style!=null}class ts{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(qK(o))this.tags.push(o);else if(UK(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new cO(this,n,!1);return r.addAll(e,qt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new cO(this,n,!0);return r.addAll(e,qt.none,n.from,n.to),Re.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(YK(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<i)break}n.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=uO(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=uO(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new ts(e,ts.schemaRules(e)))}}const sO={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},KK={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},aO={ol:!0,ul:!0},ou=1,$y=2,iu=4;function lO(t,e,n){return e!=null?(e?ou:0)|(e==="full"?$y:0):t&&t.whitespace=="pre"?ou|$y:n&~iu}class tp{constructor(e,n,r,o,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=qt.none,this.match=i||(s&iu?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Oe.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&ou)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=Oe.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Oe.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!sO.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class cO{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=lO(null,n.preserveWhitespace,0)|(r?iu:0);o?i=new tp(o.type,o.attrs,qt.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new tp(null,null,qt.none,!0,null,s):i=new tp(e.schema.topNodeType,null,qt.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,i=o.options&$y?"full":this.localPreserveWS||(o.options&ou)>0;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
244
+ `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=o.content[o.content.length-1],a=e.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;aO.hasOwnProperty(s)&&this.parser.normalizeLists&&GK(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:KK.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,f=this.needsBlock;if(sO.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let p=l&&l.skip?n:this.readStyles(e,n);p&&this.addAll(e,p),u&&this.sync(i),this.needsBlock=f}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
245
+ `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(i,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(a)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=o==null?null:e.childNodes[o];s!=a;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!o||o.length>u.length+a)&&(o=u,i=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=qt.none;for(let a of o.concat(e.marks))(i.type?i.type.allowsMarkType(a.type):dO(a.type,e.type))&&(s=a.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=lO(e,i,s.options);s.options&iu&&s.content.length==0&&(a|=iu);let l=qt.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):dO(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new tp(e,n,l,o,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ou)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(s(a-1,l))return!0;return!1}else{let f=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!f||f.name!=u&&!f.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function GK(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&aO.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function YK(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function uO(t){let e={};for(let n in t)e[n]=t[n];return e}function dO(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=a=>{i.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:f}=a.edge(l);if(u==e||i.indexOf(f)<0&&s(f))return!0}};if(s(o.contentMatch))return!0}}class na{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Fy(n).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let a=0,l=0;for(;a<i.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(i[a][0])||u.type.spec.spanning===!1)break;a++,l++}for(;a<i.length;)o=i.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],f=this.serializeMark(u,s.isInline,n);f&&(i.push([u,o]),o.appendChild(f.dom),o=f.contentDOM||f.dom)}}o.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=np(Fy(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&np(Fy(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return np(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new na(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=fO(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return fO(e.marks)}}function fO(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Fy(t){return t.document||window.document}const pO=new WeakMap;function JK(t){let e=pO.get(t);return e===void 0&&pO.set(t,e=XK(t)),e}function XK(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function np(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=JK(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let a,l=n?t.createElementNS(n,o):t.createElement(o),u=e[1],f=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){f=2;for(let p in u)if(u[p]!=null){let g=p.indexOf(" ");g>0?l.setAttributeNS(p.slice(0,g),p.slice(g+1),u[p]):p=="style"&&l.style?l.style.cssText=u[p]:l.setAttribute(p,u[p])}}for(let p=f;p<e.length;p++){let g=e[p];if(g===0){if(p<e.length-1||p>f)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:m,contentDOM:b}=np(t,g,n,r);if(l.appendChild(m),b){if(a)throw new RangeError("Multiple content holes");a=b}}}return{dom:l,contentDOM:a}}const hO=65535,gO=Math.pow(2,16);function ZK(t,e){return t+e*gO}function mO(t){return t&hO}function QK(t){return(t-(t&hO))/gO}const yO=1,bO=2,rp=4,vO=8;class Ry{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&vO)>0}get deletedBefore(){return(this.delInfo&(yO|rp))>0}get deletedAfter(){return(this.delInfo&(bO|rp))>0}get deletedAcross(){return(this.delInfo&rp)>0}}class Fr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Fr.empty)return Fr.empty}recover(e){let n=0,r=mO(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+QK(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?o:0);if(l>e)break;let u=this.ranges[a+i],f=this.ranges[a+s],p=l+u;if(e<=p){let g=u?e==l?-1:e==p?1:n:n,m=l+o+(g<0?0:f);if(r)return m;let b=e==(n<0?l:p)?null:ZK(a/3,e-l),y=e==l?bO:e==p?yO:rp;return(n<0?e!=l:e!=p)&&(y|=vO),new Ry(m,y,b)}o+=f-u}return r?e+o:new Ry(e+o,0,null)}touches(e,n){let r=0,o=mO(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+i],f=l+u;if(e<=f&&a==o*3)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],a=s-(this.inverted?i:0),l=s+(this.inverted?0:i),u=this.ranges[o+n],f=this.ranges[o+r];e(a,a+u,l,l+f),i+=f-u}}invert(){return new Fr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Fr.empty:new Fr(e<0?[0,-e,0]:[0,0,e])}}Fr.empty=new Fr([]);class su{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new su(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new su;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],a=s.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(a.recover);continue}}o|=a.delInfo,e=a.pos}return r?e:new Ry(e,o,null)}}const By=Object.create(null);class er{getMap(){return Fr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=By[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in By)throw new RangeError("Duplicate use of step JSON ID "+e);return By[e]=n,n.prototype.jsonID=e,n}}class Mn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Mn(e,null)}static fail(e){return new Mn(null,e)}static fromReplace(e,n,r,o){try{return Mn.ok(e.replace(n,r,o))}catch(i){if(i instanceof Jf)return Mn.fail(i.message);throw i}}}function Vy(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(Vy(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return Oe.fromArray(r)}class ns extends er{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Re(Vy(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return Mn.fromReplace(e,this.from,this.to,i)}invert(){return new Uo(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ns(n.pos,r.pos,this.mark)}merge(e){return e instanceof ns&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ns(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ns(n.from,n.to,e.markFromJSON(n.mark))}}er.jsonID("addMark",ns);class Uo extends er{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Re(Vy(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return Mn.fromReplace(e,this.from,this.to,r)}invert(){return new ns(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Uo(n.pos,r.pos,this.mark)}merge(e){return e instanceof Uo&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Uo(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Uo(n.from,n.to,e.markFromJSON(n.mark))}}er.jsonID("removeMark",Uo);class rs extends er{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Mn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Mn.fromReplace(e,this.pos,this.pos+1,new Re(Oe.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new rs(this.pos,n.marks[o]);return new rs(this.pos,this.mark)}}return new ra(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new rs(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new rs(n.pos,e.markFromJSON(n.mark))}}er.jsonID("addNodeMark",rs);class ra extends er{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Mn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Mn.fromReplace(e,this.pos,this.pos+1,new Re(Oe.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new rs(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ra(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ra(n.pos,e.markFromJSON(n.mark))}}er.jsonID("removeNodeMark",ra);class Rn extends er{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&zy(e,this.from,this.to)?Mn.fail("Structure replace would overwrite content"):Mn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Fr([this.from,this.to-this.from,this.slice.size])}invert(e){return new Rn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Rn(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Rn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Re.empty:new Re(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Rn(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Re.empty:new Re(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Rn(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Rn(n.from,n.to,Re.fromJSON(e,n.slice),!!n.structure)}}er.jsonID("replace",Rn);class Bn extends er{constructor(e,n,r,o,i,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=a}apply(e){if(this.structure&&(zy(e,this.from,this.gapFrom)||zy(e,this.gapTo,this.to)))return Mn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Mn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Mn.fromReplace(e,this.from,this.to,r):Mn.fail("Content does not fit in gap")}getMap(){return new Fr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Bn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new Bn(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Bn(n.from,n.to,n.gapFrom,n.gapTo,Re.fromJSON(e,n.slice),n.insert,!!n.structure)}}er.jsonID("replaceAround",Bn);function zy(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function eG(t,e,n,r){let o=[],i=[],s,a;t.doc.nodesBetween(e,n,(l,u,f)=>{if(!l.isInline)return;let p=l.marks;if(!r.isInSet(p)&&f.type.allowsMarkType(r.type)){let g=Math.max(u,e),m=Math.min(u+l.nodeSize,n),b=r.addToSet(p);for(let y=0;y<p.length;y++)p[y].isInSet(b)||(s&&s.to==g&&s.mark.eq(p[y])?s.to=m:o.push(s=new Uo(g,m,p[y])));a&&a.to==g?a.to=m:i.push(a=new ns(g,m,r))}}),o.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function tG(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,a)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof ep){let u=s.marks,f;for(;f=r.isInSet(u);)(l||(l=[])).push(f),u=f.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(a+s.nodeSize,n);for(let f=0;f<l.length;f++){let p=l[f],g;for(let m=0;m<o.length;m++){let b=o[m];b.step==i-1&&p.eq(o[m].style)&&(g=b)}g?(g.to=u,g.step=i):o.push({style:p,from:Math.max(a,e),to:u,step:i})}}}),o.forEach(s=>t.step(new Uo(s.from,s.to,s.style)))}function Hy(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<i.childCount;l++){let u=i.child(l),f=a+u.nodeSize,p=r.matchType(u.type);if(!p)s.push(new Rn(a,f,Re.empty));else{r=p;for(let g=0;g<u.marks.length;g++)n.allowsMarkType(u.marks[g].type)||t.step(new Uo(a,f,u.marks[g]));if(o&&u.isText&&n.whitespace!="pre"){let g,m=/\r?\n|\r/g,b;for(;g=m.exec(u.text);)b||(b=new Re(Oe.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Rn(a+g.index,a+g.index+g[0].length,b))}}a=f}if(!r.validEnd){let l=r.fillBefore(Oe.empty,!0);t.replace(a,a,new Re(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function nG(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function fl(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let o=t.$from.node(r),i=t.$from.index(r),s=t.$to.indexAfter(r);if(r<t.depth&&o.canReplace(i,s,n))return r;if(r==0||o.type.spec.isolating||!nG(o,i,s))break}return null}function rG(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),a=o.after(i+1),l=s,u=a,f=Oe.empty,p=0;for(let b=i,y=!1;b>n;b--)y||r.index(b)>0?(y=!0,f=Oe.from(r.node(b).copy(f)),p++):l--;let g=Oe.empty,m=0;for(let b=i,y=!1;b>n;b--)y||o.after(b+1)<o.end(b)?(y=!0,g=Oe.from(o.node(b).copy(g)),m++):u++;t.step(new Bn(l,u,s,a,new Re(f.append(g),p,m),f.size-p,!0))}function jy(t,e,n=null,r=t){let o=oG(t,e),i=o&&iG(r,e);return i?o.map(xO).concat({type:e,attrs:n}).concat(i.map(xO)):null}function xO(t){return{type:t,attrs:null}}function oG(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}function iG(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let u=r;l&&u<o;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function sG(t,e,n){let r=Oe.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Oe.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new Bn(o,i,o,i,new Re(r,0,0),n.length,!0))}function aG(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,a)=>{let l=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,l)&&lG(t.doc,t.mapping.slice(i).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",b=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!b?u=!1:!m&&b&&(u=!0)}u===!1&&wO(t,s,a,i),Hy(t,t.mapping.slice(i).map(a,1),r,void 0,u===null);let f=t.mapping.slice(i),p=f.map(a,1),g=f.map(a+s.nodeSize,1);return t.step(new Bn(p,g,p+1,g-1,new Re(Oe.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&SO(t,s,a,i),!1}})}function SO(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(o.text);){let l=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function wO(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
246
+ `))}})}function lG(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function cG(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Bn(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new Re(Oe.from(s),0,0),1,!0))}function Si(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,f=n-2;u>i;u--,f--){let p=o.node(u),g=o.index(u);if(p.type.spec.isolating)return!1;let m=p.content.cutByIndex(g,p.childCount),b=r&&r[f+1];b&&(m=m.replaceChild(0,b.type.create(b.attrs)));let y=r&&r[f]||p;if(!p.canReplace(g+1,p.childCount)||!y.type.validContent(m))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function uG(t,e,n=1,r){let o=t.doc.resolve(e),i=Oe.empty,s=Oe.empty;for(let a=o.depth,l=o.depth-n,u=n-1;a>l;a--,u--){i=Oe.from(o.node(a).copy(i));let f=r&&r[u];s=Oe.from(f?f.type.create(f.attrs,s):o.node(a).copy(s))}t.step(new Rn(e,e,new Re(i.append(s),n,n),!0))}function is(t,e){let n=t.resolve(e),r=n.index();return CO(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function dG(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function CO(t,e){return!!(t&&e&&!t.isLeaf&&dG(t,e))}function op(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,a=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&CO(i,s)&&r.node(o).canReplace(a,a+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function fG(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let f=s.whitespace=="pre",p=!!s.contentMatch.matchType(o);f&&!p?r=!1:!f&&p&&(r=!0)}let a=t.steps.length;if(r===!1){let f=t.doc.resolve(e+n);wO(t,f.node(),f.before(),a)}s.inlineContent&&Hy(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let l=t.mapping.slice(a),u=l.map(e-n);if(t.step(new Rn(u,l.map(e+n,-1),Re.empty,!0)),r===!0){let f=t.doc.resolve(u);SO(t,f.node(),f.before(),t.steps.length)}return t}function pG(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function _O(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),u=r.node(s),f=!1;if(i==1)f=u.canReplace(l,l,o);else{let p=u.contentMatchAt(l).findWrapping(o.firstChild.type);f=p&&u.canReplaceWith(l,l,p[0])}if(f)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function ip(t,e,n=e,r=Re.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return TO(o,i,r)?new Rn(e,n,r):new hG(o,i,r).fit()}function TO(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class hG{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Oe.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=Oe.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let l=new Re(i,s,a);return e>-1?new Bn(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Rn(r.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Wy(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],f,p=null;if(n==1&&(s?u.matchType(s.type)||(p=u.fillBefore(Oe.from(s),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:p};if(n==2&&s&&(f=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:f};if(i&&u.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Wy(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Re(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Wy(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new Re(au(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Re(au(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let y=0;y<i.length;y++)this.openFrontierNode(i[y]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,u=0,f=[],{match:p,type:g}=this.frontier[n];if(o){for(let y=0;y<o.childCount;y++)f.push(o.child(y));p=p.matchFragment(o)}let m=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let y=a.child(u),x=p.matchType(y.type);if(!x)break;u++,(u>1||l==0||y.content.size)&&(p=x,f.push(kO(y.mark(g.allowedMarks(y.marks)),u==1?l:0,u==a.childCount?m:-1)))}let b=u==a.childCount;b||(m=-1),this.placed=lu(this.placed,n,Oe.from(f)),this.frontier[n].match=p,b&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let y=0,x=a;y<m;y++){let w=x.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),x=w.content}this.unplaced=b?e==0?Re.empty:new Re(au(s.content,e-1,1),e-1,m<0?s.openEnd:e-1):new Re(au(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!qy(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=qy(e,n,o,r,i);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],f=qy(e,a,u,l,!0);if(!f||f.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=lu(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=lu(this.placed,this.depth,Oe.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Oe.empty,!0);n.childCount&&(this.placed=lu(this.placed,this.frontier.length,n))}}function au(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(au(t.firstChild.content,e-1,n)))}function lu(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(lu(t.lastChild.content,e-1,n)))}function Wy(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function kO(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,kO(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(Oe.empty,!0)))),t.copy(r)}function qy(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!gG(n,i.content,s)?a:null}function gG(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function mG(t){return t.spec.defining||t.spec.definingForContent}function yG(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(TO(o,i,r))return t.step(new Rn(e,n,r));let s=OO(o,t.doc.resolve(n));s[s.length-1]==0&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let g=o.depth,m=o.pos-1;g>0;g--,m--){let b=o.node(g).type.spec;if(b.defining||b.definingAsContext||b.isolating)break;s.indexOf(g)>-1?a=g:o.before(g)==m&&s.splice(1,0,-g)}let l=s.indexOf(a),u=[],f=r.openStart;for(let g=r.content,m=0;;m++){let b=g.firstChild;if(u.push(b),m==r.openStart)break;g=b.content}for(let g=f-1;g>=0;g--){let m=u[g],b=mG(m.type);if(b&&!m.sameMarkup(o.node(Math.abs(a)-1)))f=g;else if(b||!m.type.isTextblock)break}for(let g=r.openStart;g>=0;g--){let m=(g+f+1)%(r.openStart+1),b=u[m];if(b)for(let y=0;y<s.length;y++){let x=s[(y+l)%s.length],w=!0;x<0&&(w=!1,x=-x);let T=o.node(x-1),_=o.index(x-1);if(T.canReplaceWith(_,_,b.type,b.marks))return t.replace(o.before(x),w?i.after(x):n,new Re(EO(r.content,0,r.openStart,m),m,r.openEnd))}}let p=t.steps.length;for(let g=s.length-1;g>=0&&(t.replace(e,n,r),!(t.steps.length>p));g--){let m=s[g];m<0||(e=o.before(m),n=i.after(m))}}function EO(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(EO(i.content,e+1,n,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(Oe.empty,!0))}return t}function bG(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=pG(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new Re(Oe.from(r),0,0))}function vG(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=OO(r,o);for(let s=0;s<i.length;s++){let a=i[s],l=s==i.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),o.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return t.delete(r.before(a),o.after(a))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}function OO(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class pl extends er{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Mn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Mn.fromReplace(e,this.pos,this.pos+1,new Re(Oe.from(o),0,n.isLeaf?0:1))}getMap(){return Fr.empty}invert(e){return new pl(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new pl(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new pl(n.pos,n.attr,n.value)}}er.jsonID("attr",pl);class cu extends er{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Mn.ok(r)}getMap(){return Fr.empty}invert(e){return new cu(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new cu(n.attr,n.value)}}er.jsonID("docAttr",cu);let hl=class extends Error{};hl=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},hl.prototype=Object.create(Error.prototype),hl.prototype.constructor=hl,hl.prototype.name="TransformError";class Uy{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new su}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new hl(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=Re.empty){let o=ip(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new Re(Oe.from(r),0,0))}delete(e,n){return this.replace(e,n,Re.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return yG(this,e,n,r),this}replaceRangeWith(e,n,r){return bG(this,e,n,r),this}deleteRange(e,n){return vG(this,e,n),this}lift(e,n){return rG(this,e,n),this}join(e,n=1){return fG(this,e,n),this}wrap(e,n){return sG(this,e,n),this}setBlockType(e,n=e,r,o=null){return aG(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return cG(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new pl(e,n,r)),this}setDocAttribute(e,n){return this.step(new cu(e,n)),this}addNodeMark(e,n){return this.step(new rs(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof qt)n.isInSet(r.marks)&&this.step(new ra(e,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new ra(e,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(e,n=1,r){return uG(this,e,n,r),this}addMark(e,n,r){return eG(this,e,n,r),this}removeMark(e,n,r){return tG(this,e,n,r),this}clearIncompatible(e,n,r){return Hy(this,e,n,r),this}}const Ky=Object.create(null);class st{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new MO(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Re.empty){let r=n.content.lastChild,o=null;for(let a=0;a<n.openEnd;a++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],f=e.mapping.slice(i);e.replaceRange(f.map(l.pos),f.map(u.pos),a?Re.empty:n),a==0&&DO(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:a}=o[i],l=e.mapping.slice(r),u=l.map(s.pos),f=l.map(a.pos);i?e.deleteRange(u,f):(e.replaceRangeWith(u,f,n),DO(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new rt(e):gl(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=n<0?gl(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):gl(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Rr(e.node(0))}static atStart(e){return gl(e,e,0,0,1)||new Rr(e)}static atEnd(e){return gl(e,e,e.content.size,e.childCount,-1)||new Rr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Ky[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ky)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ky[e]=n,n.prototype.jsonID=e,n}getBookmark(){return rt.between(this.$anchor,this.$head).getBookmark()}}st.prototype.visible=!0;class MO{constructor(e,n){this.$from=e,this.$to=n}}let AO=!1;function IO(t){!AO&&!t.parent.inlineContent&&(AO=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class rt extends st{constructor(e,n=e){IO(e),IO(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return st.near(r);let o=e.resolve(n.map(this.anchor));return new rt(o.parent.inlineContent?o:r,r)}replace(e,n=Re.empty){if(super.replace(e,n),n==Re.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof rt&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new sp(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new rt(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=st.findFrom(n,r,!0)||st.findFrom(n,-r,!0);if(i)n=i.$head;else return st.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(st.findFrom(e,-r,!0)||st.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new rt(e,n)}}st.jsonID("text",rt);class sp{constructor(e,n){this.anchor=e,this.head=n}map(e){return new sp(e.map(this.anchor),e.map(this.head))}resolve(e){return rt.between(e.resolve(this.anchor),e.resolve(this.head))}}class et extends st{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=e.resolve(o);return r?st.near(i):new et(i)}content(){return new Re(Oe.from(this.node),0,0)}eq(e){return e instanceof et&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Gy(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new et(e.resolve(n.anchor))}static create(e,n){return new et(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}et.prototype.visible=!1,st.jsonID("node",et);class Gy{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new sp(r,r):new Gy(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&et.isSelectable(r)?new et(n):st.near(n)}}class Rr extends st{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Re.empty){if(n==Re.empty){e.delete(0,e.doc.content.size);let r=st.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Rr(e)}map(e){return new Rr(e)}eq(e){return e instanceof Rr}getBookmark(){return xG}}st.jsonID("all",Rr);const xG={map(){return this},resolve(t){return new Rr(t)}};function gl(t,e,n,r,o,i=!1){if(e.inlineContent)return rt.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let a=e.child(s);if(a.isAtom){if(!i&&et.isSelectable(a))return et.create(t,n-(o<0?a.nodeSize:0))}else{let l=gl(t,a,n+o,o<0?a.childCount:0,o,i);if(l)return l}n+=a.nodeSize*o}return null}function DO(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof Rn||o instanceof Bn))return;let i=t.mapping.maps[r],s;i.forEach((a,l,u,f)=>{s==null&&(s=f)}),t.setSelection(st.near(t.doc.resolve(s),n))}const PO=1,ap=2,NO=4;class SG extends Uy{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|PO)&~ap,this.storedMarks=null,this}get selectionSet(){return(this.updated&PO)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=ap,this}ensureMarks(e){return qt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&ap)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~ap,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||qt.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),this.selection.empty||this.setSelection(st.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=NO,this}get scrolledIntoView(){return(this.updated&NO)>0}}function LO(t,e){return!e||!t?t:t.bind(e)}class uu{constructor(e,n,r){this.name=e,this.init=LO(n.init,r),this.apply=LO(n.apply,r)}}const wG=[new uu("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new uu("selection",{init(t,e){return t.selection||st.atStart(e.doc)},apply(t){return t.selection}}),new uu("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new uu("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Yy{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=wG.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new uu(r.key,r.spec.state,r))})}}class ml{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=o?o[s].n:0,u=o?o[s].state:this,f=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,r);if(f&&r.filterTransaction(f,s)){if(f.setMeta("appendedTransaction",e),!o){o=[];for(let p=0;p<this.config.plugins.length;p++)o.push(p<s?{state:r,n:n.length}:{state:this,n:0})}n.push(f),r=r.applyInner(f),i=!0}o&&(o[s]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new ml(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new SG(this)}static create(e){let n=new Yy(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new ml(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new Yy(this.schema,e.plugins),r=n.fields,o=new ml(n);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Yy(e.schema,e.plugins),i=new ml(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=xi.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=st.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[s.name]=u.fromJSON.call(l,e,n[a],i);return}}i[s.name]=s.init(e,i)}}),i}}function $O(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=$O(o,e,{})),n[r]=o}return n}class ln{constructor(e){this.spec=e,this.props={},e.props&&$O(e.props,this,this.props),this.key=e.key?e.key.key:FO("plugin")}getState(e){return e[this.key]}}const Jy=Object.create(null);function FO(t){return t in Jy?t+"$"+ ++Jy[t]:(Jy[t]=0,t+"$")}class An{constructor(e="key"){this.key=FO(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Un=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},yl=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Xy=null;const wi=function(t,e,n){let r=Xy||(Xy=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},CG=function(){Xy=null},oa=function(t,e,n,r){return n&&(RO(t,e,n,r,-1)||RO(t,e,n,r,1))},_G=/^(img|br|input|textarea|hr)$/i;function RO(t,e,n,r,o){for(var i;;){if(t==n&&e==r)return!0;if(e==(o<0?0:io(t))){let s=t.parentNode;if(!s||s.nodeType!=1||du(t)||_G.test(t.nodeName)||t.contentEditable=="false")return!1;e=Un(t)+(o<0?0:1),t=s}else if(t.nodeType==1){let s=t.childNodes[e+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=o;else return!1;else t=s,e=o<0?io(t):0}else return!1}}function io(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function TG(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=io(t)}else if(t.parentNode&&!du(t))e=Un(t),t=t.parentNode;else return null}}function kG(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!du(t))e=Un(t)+1,t=t.parentNode;else return null}}function EG(t,e,n){for(let r=e==0,o=e==io(t);r||o;){if(t==n)return!0;let i=Un(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==io(t)}}function du(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const lp=function(t){return t.focusNode&&oa(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ia(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function OG(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function MG(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(io(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(io(r.startContainer),r.startOffset)}}}const Ko=typeof navigator<"u"?navigator:null,BO=typeof document<"u"?document:null,ss=Ko&&Ko.userAgent||"",Zy=/Edge\/(\d+)/.exec(ss),VO=/MSIE \d/.exec(ss),Qy=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ss),Cr=!!(VO||Qy||Zy),as=VO?document.documentMode:Qy?+Qy[1]:Zy?+Zy[1]:0,Eo=!Cr&&/gecko\/(\d+)/i.test(ss);Eo&&+(/Firefox\/(\d+)/.exec(ss)||[0,0])[1];const eb=!Cr&&/Chrome\/(\d+)/.exec(ss),tr=!!eb,zO=eb?+eb[1]:0,dr=!Cr&&!!Ko&&/Apple Computer/.test(Ko.vendor),bl=dr&&(/Mobile\/\w+/.test(ss)||!!Ko&&Ko.maxTouchPoints>2),so=bl||(Ko?/Mac/.test(Ko.platform):!1),AG=Ko?/Win/.test(Ko.platform):!1,Ci=/Android \d/.test(ss),fu=!!BO&&"webkitFontSmoothing"in BO.documentElement.style,IG=fu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function DG(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function _i(t,e){return typeof t=="number"?t:t[e]}function PG(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function HO(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=yl(s);continue}let a=s,l=a==i.body,u=l?DG(i):PG(a),f=0,p=0;if(e.top<u.top+_i(r,"top")?p=-(u.top-e.top+_i(o,"top")):e.bottom>u.bottom-_i(r,"bottom")&&(p=e.bottom-e.top>u.bottom-u.top?e.top+_i(o,"top")-u.top:e.bottom-u.bottom+_i(o,"bottom")),e.left<u.left+_i(r,"left")?f=-(u.left-e.left+_i(o,"left")):e.right>u.right-_i(r,"right")&&(f=e.right-u.right+_i(o,"right")),f||p)if(l)i.defaultView.scrollBy(f,p);else{let m=a.scrollLeft,b=a.scrollTop;p&&(a.scrollTop+=p),f&&(a.scrollLeft+=f);let y=a.scrollLeft-m,x=a.scrollTop-b;e={left:e.left-y,top:e.top-x,right:e.right-y,bottom:e.bottom-x}}let g=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(g))break;s=g=="absolute"?s.offsetParent:yl(s)}}function NG(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let a=t.root.elementFromPoint(i,s);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,o=l.top;break}}return{refDOM:r,refTop:o,stack:jO(t.dom)}}function jO(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=yl(r));return e}function LG({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;WO(n,r==0?0:r-e)}function WO(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let vl=null;function $G(t){if(t.setActive)return t.setActive();if(vl)return t.focus(vl);let e=jO(t);t.focus(vl==null?{get preventScroll(){return vl={preventScroll:!0},!0}}:void 0),vl||(vl=!1,WO(e,0))}function qO(t,e){let n,r=2e8,o,i=0,s=e.top,a=e.top,l,u;for(let f=t.firstChild,p=0;f;f=f.nextSibling,p++){let g;if(f.nodeType==1)g=f.getClientRects();else if(f.nodeType==3)g=wi(f).getClientRects();else continue;for(let m=0;m<g.length;m++){let b=g[m];if(b.top<=s&&b.bottom>=a){s=Math.max(b.bottom,s),a=Math.min(b.top,a);let y=b.left>e.left?b.left-e.left:b.right<e.left?e.left-b.right:0;if(y<r){n=f,r=y,o=y&&n.nodeType==3?{left:b.right<e.left?b.right:b.left,top:e.top}:e,f.nodeType==1&&y&&(i=p+(e.left>=(b.left+b.right)/2?1:0));continue}}else b.top>e.top&&!l&&b.left<=e.left&&b.right>=e.left&&(l=f,u={left:Math.max(b.left,Math.min(b.right,e.left)),top:b.top});!n&&(e.left>=b.right&&e.top>=b.top||e.left>=b.left&&e.top>=b.bottom)&&(i=p+1)}}return!n&&l&&(n=l,o=u,r=0),n&&n.nodeType==3?FG(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:qO(n,o)}function FG(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let i=ls(r,1);if(i.top!=i.bottom&&tb(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function tb(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function RG(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function BG(t,e,n){let{node:r,offset:o}=qO(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function VG(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let a=t.docView.nearestDesc(i,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&l.left>r.left||l.top>r.top?o=a.posBefore:(!s&&l.right<r.left||l.bottom<r.top)&&(o=a.posAfter),s=!0),!a.contentDOM&&o<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;i=a.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function UO(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let s=t.childNodes[i];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(tb(e,u))return UO(s,e,u)}}if((i=(i+1)%r)==o)break}return t}function zG(t,e){let n=t.dom.ownerDocument,r,o=0,i=MG(n,e.left,e.top);i&&({node:r,offset:o}=i);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let u=t.dom.getBoundingClientRect();if(!tb(e,u)||(s=UO(t.dom,e,u),!s))return null}if(dr)for(let u=s;r&&u;u=yl(u))u.draggable&&(r=void 0);if(s=RG(s,e),r){if(Eo&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let f=r.childNodes[o],p;f.nodeName=="IMG"&&(p=f.getBoundingClientRect()).right<=e.left&&p.bottom>e.top&&o++}let u;fu&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=VG(t,r,o,e))}a==null&&(a=BG(t,s,e));let l=t.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function KO(t){return t.top<t.bottom||t.left<t.right}function ls(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(KO(r))return r}return Array.prototype.find.call(n,KO)||t.getBoundingClientRect()}const HG=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function GO(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=fu||Eo;if(r.nodeType==3)if(s&&(HG.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=ls(wi(r,o,o),n);if(Eo&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let u=ls(wi(r,o-1,o-1),-1);if(u.top==l.top){let f=ls(wi(r,o,o+1),-1);if(f.top!=l.top)return pu(f,f.left<u.left)}}return l}else{let l=o,u=o,f=n<0?1:-1;return n<0&&!o?(u++,f=-1):n>=0&&o==r.nodeValue.length?(l--,f=1):n<0?l--:u++,pu(ls(wi(r,l,u),f),f<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==io(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return nb(l.getBoundingClientRect(),!1)}if(i==null&&o<io(r)){let l=r.childNodes[o];if(l.nodeType==1)return nb(l.getBoundingClientRect(),!0)}return nb(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==io(r))){let l=r.childNodes[o-1],u=l.nodeType==3?wi(l,io(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return pu(ls(u,1),!1)}if(i==null&&o<io(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?wi(l,0,s?0:1):l.nodeType==1?l:null:null;if(u)return pu(ls(u,-1),!0)}return pu(ls(r.nodeType==3?wi(r):r,-n),n>=0)}function pu(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function nb(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function YO(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function jG(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return YO(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=GO(t,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=wi(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let f=l[u];if(f.bottom>f.top+1&&(n=="up"?s.top-f.top>(f.bottom-s.top)*2:f.bottom-s.bottom>(s.bottom-f.top)*2))return!1}}return!0})}const WG=/[\u0590-\u08ac]/;function qG(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=t.domSelection();return a?!WG.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:YO(t,e,()=>{let{focusNode:l,focusOffset:u,anchorNode:f,anchorOffset:p}=t.domSelectionRange(),g=a.caretBidiLevel;a.modify("move",n,"character");let m=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:b,focusOffset:y}=t.domSelectionRange(),x=b&&!m.contains(b.nodeType==1?b:b.parentNode)||l==b&&u==y;try{a.collapse(f,p),l&&(l!=f||u!=p)&&a.extend&&a.extend(l,u)}catch{}return g!=null&&(a.caretBidiLevel=g),x}):r.pos==r.start()||r.pos==r.end()}let JO=null,XO=null,ZO=!1;function UG(t,e,n){return JO==e&&XO==n?ZO:(JO=e,XO=n,ZO=n=="up"||n=="down"?jG(t,e,n):qG(t,e,n))}const ao=0,QO=1,sa=2,Go=3;class hu{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=ao,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>Un(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let s=0;s<o.children.length;s++){let a=o.children[s];if(a.size){o=a;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],a=i+s.size;if(a>e||s instanceof nM){o=e-i;break}i=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof eM&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Un(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Un(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,a=0;;a++){let l=this.children[a],u=s+l.size;if(o==-1&&e<=u){let f=s+l.border;if(e>=f&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,f);e=s;for(let p=a;p>0;p--){let g=this.children[p-1];if(g.size&&g.dom.parentNode==this.contentDOM&&!g.emptyChildAt(1)){o=Un(g.dom)+1;break}e-=g.size}o==-1&&(o=0)}if(o>-1&&(u>n||a==this.children.length-1)){n=u;for(let f=a+1;f<this.children.length;f++){let p=this.children[f];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){i=Un(p.dom);break}n+=p.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let i=Math.min(e,n),s=Math.max(e,n);for(let m=0,b=0;m<this.children.length;m++){let y=this.children[m],x=b+y.size;if(i>b&&s<x)return y.setSelection(e-b-y.border,n-b-y.border,r,o);b=x}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),f=r.domSelectionRange(),p=!1;if((Eo||dr)&&e==n){let{node:m,offset:b}=a;if(m.nodeType==3){if(p=!!(b&&m.nodeValue[b-1]==`
247
+ `),p&&b==m.nodeValue.length)for(let y=m,x;y;y=y.parentNode){if(x=y.nextSibling){x.nodeName=="BR"&&(a=l={node:x.parentNode,offset:Un(x)+1});break}let w=y.pmViewDesc;if(w&&w.node&&w.node.isBlock)break}}else{let y=m.childNodes[b-1];p=y&&(y.nodeName=="BR"||y.contentEditable=="false")}}if(Eo&&f.focusNode&&f.focusNode!=l.node&&f.focusNode.nodeType==1){let m=f.focusNode.childNodes[f.focusOffset];m&&m.contentEditable=="false"&&(o=!0)}if(!(o||p&&dr)&&oa(a.node,a.offset,f.anchorNode,f.anchorOffset)&&oa(l.node,l.offset,f.focusNode,f.focusOffset))return;let g=!1;if((u.extend||e==n)&&!p){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),g=!0}catch{}}if(!g){if(e>n){let b=a;a=l,l=b}let m=document.createRange();m.setEnd(l.node,l.offset),m.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(m)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let a=r+i.border,l=s-i.border;if(e>=a&&n<=l){this.dirty=e==r||n==s?sa:QO,e==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Go:i.markDirty(e-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?sa:Go}r=s}this.dirty=sa}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?sa:QO;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class eM extends hu{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==ao&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class KG extends hu{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class aa extends hu{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=na.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new aa(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Go||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Go&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=ao){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=ao}}slice(e,n,r){let o=aa.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=ob(i,n,s,r)),e>0&&(i=ob(i,0,e,r));for(let a=0;a<i.length;a++)i[a].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class cs extends hu{constructor(e,n,r,o,i,s,a,l,u){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=a}static create(e,n,r,o,i,s){let a=i.nodeViews[n.type.name],l,u=a&&a(n,i,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,o),f=u&&u.dom,p=u&&u.contentDOM;if(n.isText){if(!f)f=document.createTextNode(n.text);else if(f.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else f||({dom:f,contentDOM:p}=na.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!p&&!n.isText&&f.nodeName!="BR"&&(f.hasAttribute("contenteditable")||(f.contentEditable="false"),n.type.spec.draggable&&(f.draggable=!0));let g=f;return f=iM(f,r,n),u?l=new GG(e,n,r,o,f,p||null,g,u,i,s+1):n.isText?new cp(e,n,r,o,f,g,i):new cs(e,n,r,o,f,p||null,g,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Oe.empty)}return e}matchesNode(e,n,r){return this.dirty==ao&&e.eq(this.node)&&up(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new JG(this,s&&s.node,e);QG(this.node,this.innerDeco,(u,f,p)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!p&&l.syncToMarks(f==this.node.childCount?qt.none:this.node.child(f).marks,r,e),l.placeWidget(u,e,o)},(u,f,p,g)=>{l.syncToMarks(u.marks,r,e);let m;l.findNodeMatch(u,f,p,g)||a&&e.state.selection.from>o&&e.state.selection.to<o+u.nodeSize&&(m=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(u,f,p,m,e)||l.updateNextNode(u,f,p,e,g,o)||l.addNode(u,f,p,e,o),o+=u.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==sa)&&(s&&this.protectLocalComposition(e,s),rM(this.contentDOM,this.children,e),bl&&eY(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof rt)||r<n||o>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,a=tY(this.node.content,s,r-n,o-n);return a<0?null:{node:i,pos:a,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new KG(this,i,n,o);e.input.compositionNodes.push(s),this.children=ob(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==Go||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=ao}updateOuterDeco(e){if(up(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=oM(this.dom,this.nodeDOM,rb(this.outerDeco,this.node,n),rb(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function tM(t,e,n,r,o){iM(r,e,t);let i=new cs(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class cp extends cs{constructor(e,n,r,o,i,s,a){super(e,n,r,o,i,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==Go||this.dirty!=ao&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=ao||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=ao,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new cp(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Go)}get domAtom(){return!1}isText(e){return this.node.text==e}}class nM extends hu{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==ao&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class GG extends cs{constructor(e,n,r,o,i,s,a,l,u,f){super(e,n,r,o,i,s,a,u,f),this.spec=l}update(e,n,r,o){if(this.dirty==Go)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function rM(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=sM(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(a,r);if(s instanceof aa){let l=r?r.previousSibling:t.lastChild;rM(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=sM(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const gu=function(t){t&&(this.nodeName=t)};gu.prototype=Object.create(null);const la=[new gu];function rb(t,e,n){if(t.length==0)return la;let r=n?la[0]:new gu,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new gu(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&o.length==1&&o.push(r=new gu(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return o}function oM(t,e,n,r){if(n==la&&r==la)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],a=n[i];if(i){let l;a&&a.nodeName==s.nodeName&&o!=t&&(l=o.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(o),a=la[0]),o=l}YG(o,a||la[0],s)}return o}function YG(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&t.classList.add(o[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function iM(t,e,n){return oM(t,t,la,rb(e,n,t.nodeType!=1))}function up(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function sM(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class JG{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=XG(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let o=0,i=this.stack.length>>1,s=Math.min(i,e.length);for(;o<s&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=ao,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let u=this.top.children[l];if(u.matchesMark(e[i])&&!this.isLocked(u.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=aa.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){i=a;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,o,i){let s=this.top.children[o];return s.dirty==Go&&s.dom==s.contentDOM&&(s.dirty=sa),s.update(e,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,i,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof cs){let u=this.preMatch.matched.get(l);if(u!=null&&u!=i)return!1;let f=l.dom,p,g=this.isLocked(f)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Go&&up(n,l.outerDeco));if(!g&&l.update(e,n,r,o))return this.destroyBetween(this.index,a),l.dom!=f&&(this.changed=!0),this.index++,!0;if(!g&&(p=this.recreateWrapper(l,e,n,r,o,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=p,p.contentDOM&&(p.dirty=sa,p.updateChildren(o,s+1),p.dirty=ao),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,i,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!up(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let a=cs.create(this.top,n,r,o,i,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,o,i){let s=cs.create(this.top,e,n,r,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new eM(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof aa;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof cp)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((dr||tr)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new nM(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function XG(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];e:for(;o>0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof aa)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function ZG(t,e){return t.type.side-e.type.side}function QG(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let u=0;u<t.childCount;u++){let f=t.child(u);r(f,o,e.forChild(i,f),u),i+=f.nodeSize}return}let s=0,a=[],l=null;for(let u=0;;){let f,p;for(;s<o.length&&o[s].to==i;){let x=o[s++];x.widget&&(f?(p||(p=[f])).push(x):f=x)}if(f)if(p){p.sort(ZG);for(let x=0;x<p.length;x++)n(p[x],u,!!l)}else n(f,u,!!l);let g,m;if(l)m=-1,g=l,l=null;else if(u<t.childCount)m=u,g=t.child(u++);else break;for(let x=0;x<a.length;x++)a[x].to<=i&&a.splice(x--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);let b=i+g.nodeSize;if(g.isText){let x=b;s<o.length&&o[s].from<x&&(x=o[s].from);for(let w=0;w<a.length;w++)a[w].to<x&&(x=a[w].to);x<b&&(l=g.cut(x-i),g=g.cut(0,x-i),b=x,m=-1)}else for(;s<o.length&&o[s].to<b;)s++;let y=g.isInline&&!g.isLeaf?a.filter(x=>!x.inline):a.slice();r(g,y,e.forChild(i,g),m),i=b}}function eY(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function tY(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),a=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;o<t.childCount;){let u=t.child(o++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=n){if(i>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let u=a<r?l.lastIndexOf(e,r-a-1):-1;if(u>=0&&u+e.length+a>=n)return a+u;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function ob(t,e,n,r,o){let i=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],u=a,f=a+=l.size;u>=n||f<=e?i.push(l):(u<e&&i.push(l.slice(0,e-u,r)),o&&(i.push(o),o=void 0),f>n&&i.push(l.slice(n-u,l.size,r)))}return i}function ib(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,u;if(lp(n)){for(l=s;o&&!o.node;)o=o.parent;let p=o.node;if(o&&p.isAtom&&et.isSelectable(p)&&o.parent&&!(p.isInline&&EG(n.focusNode,n.focusOffset,o.dom))){let g=o.posBefore;u=new et(s==g?a:r.resolve(g))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let p=s,g=s;for(let m=0;m<n.rangeCount;m++){let b=n.getRangeAt(m);p=Math.min(p,t.docView.posFromDOM(b.startContainer,b.startOffset,1)),g=Math.max(g,t.docView.posFromDOM(b.endContainer,b.endOffset,-1))}if(p<0)return null;[l,s]=g==t.state.selection.anchor?[g,p]:[p,g],a=r.resolve(s)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let f=r.resolve(l);if(!u){let p=e=="pointer"||t.state.selection.head<a.pos&&!i?1:-1;u=ab(t,f,a,p)}return u}function aM(t){return t.editable?t.hasFocus():hM(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Ti(t,e=!1){let n=t.state.selection;if(dM(t,n),!!aM(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&tr){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&oa(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)rY(t);else{let{anchor:r,head:o}=n,i,s;lM&&!(n instanceof rt)&&(n.$from.parent.inlineContent||(i=cM(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=cM(t,n.to))),t.docView.setSelection(r,o,t,e),lM&&(i&&uM(i),s&&uM(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&nY(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const lM=dr||tr&&zO<63;function cM(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(dr&&o&&o.contentEditable=="false")return sb(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return sb(o);if(i)return sb(i)}}function sb(t){return t.contentEditable="true",dr&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function uM(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function nY(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!aM(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function rY(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setStart(r.parentNode,Un(r)+1):n.setStart(r,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&Cr&&as<=11&&(r.disabled=!0,r.disabled=!1)}function dM(t,e){if(e instanceof et){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(fM(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else fM(t)}function fM(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function ab(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||rt.between(e,n,r)}function pM(t){return t.editable&&!t.hasFocus()?!1:hM(t)}function hM(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function oY(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return oa(e.node,e.offset,n.anchorNode,n.anchorOffset)}function lb(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&st.findFrom(i,e)}function us(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function gM(t,e,n){let r=t.state.selection;if(r instanceof rt)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return us(t,new rt(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=lb(t.state,e);return o&&o instanceof et?us(t,o):!1}else if(!(so&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(a))&&!s.contentDOM?et.isSelectable(i)?us(t,new et(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):fu?us(t,new rt(t.state.doc.resolve(e<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof et&&r.node.isInline)return us(t,new rt(e>0?r.$to:r.$from));{let o=lb(t.state,e);return o?us(t,o):!1}}}function dp(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function mu(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function xl(t,e){return e<0?iY(t):sY(t)}function iY(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(Eo&&n.nodeType==1&&r<dp(n)&&mu(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(mu(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(mM(n))break;{let a=n.previousSibling;for(;a&&mu(a,-1);)o=n.parentNode,i=Un(a),a=a.previousSibling;if(a)n=a,r=dp(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?cb(t,n,r):o&&cb(t,o,i)}function sY(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=dp(n),i,s;for(;;)if(r<o){if(n.nodeType!=1)break;let a=n.childNodes[r];if(mu(a,1))i=n,s=++r;else break}else{if(mM(n))break;{let a=n.nextSibling;for(;a&&mu(a,1);)i=a.parentNode,s=Un(a)+1,a=a.nextSibling;if(a)n=a,r=0,o=dp(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&cb(t,i,s)}function mM(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function aY(t,e){for(;t&&e==t.childNodes.length&&!du(t);)e=Un(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function lY(t,e){for(;t&&!e&&!du(t);)e=Un(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function cb(t,e,n){if(e.nodeType!=3){let i,s;(s=aY(e,n))?(e=s,n=0):(i=lY(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(lp(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&Ti(t)},50)}function yM(t,e){let n=t.state.doc.resolve(e);if(!(tr||AG)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function bM(t,e,n){let r=t.state.selection;if(r instanceof rt&&!r.empty||n.indexOf("s")>-1||so&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=lb(t.state,e);if(s&&s instanceof et)return us(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,a=r instanceof Rr?st.near(s,e):st.findFrom(s,e);return a?us(t,a):!1}return!1}function vM(t,e){if(!(t.state.selection instanceof rt))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function xM(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function cY(t){if(!dr||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;xM(t,r,"true"),setTimeout(()=>xM(t,r,"false"),20)}return!1}function uY(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function dY(t,e){let n=e.keyCode,r=uY(e);if(n==8||so&&n==72&&r=="c")return vM(t,-1)||xl(t,-1);if(n==46&&!e.shiftKey||so&&n==68&&r=="c")return vM(t,1)||xl(t,1);if(n==13||n==27)return!0;if(n==37||so&&n==66&&r=="c"){let o=n==37?yM(t,t.state.selection.from)=="ltr"?-1:1:-1;return gM(t,o,r)||xl(t,o)}else if(n==39||so&&n==70&&r=="c"){let o=n==39?yM(t,t.state.selection.from)=="ltr"?1:-1:1;return gM(t,o,r)||xl(t,o)}else{if(n==38||so&&n==80&&r=="c")return bM(t,-1,r)||xl(t,-1);if(n==40||so&&n==78&&r=="c")return cY(t)||bM(t,1,r)||xl(t,1);if(r==(so?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function ub(t,e){t.someProp("transformCopied",m=>{e=m(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let m=r.firstChild;n.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),r=m.content}let s=t.someProp("clipboardSerializer")||na.fromSchema(t.state.schema),a=OM(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u=l.firstChild,f,p=0;for(;u&&u.nodeType==1&&(f=kM[u.nodeName.toLowerCase()]);){for(let m=f.length-1;m>=0;m--){let b=a.createElement(f[m]);for(;l.firstChild;)b.appendChild(l.firstChild);l.appendChild(b),p++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${p?` -${p}`:""} ${JSON.stringify(n)}`);let g=t.someProp("clipboardTextSerializer",m=>m(e,t))||e.content.textBetween(0,e.content.size,`
248
+
249
+ `);return{dom:l,text:g,slice:e}}function SM(t,e,n,r,o){let i=o.parent.type.spec.code,s,a;if(!n&&!e)return null;let l=e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",g=>{e=g(e,i||r,t)}),i)return e?new Re(Oe.from(t.state.schema.text(e.replace(/\r\n?/g,`
250
+ `))),0,0):Re.empty;let p=t.someProp("clipboardTextParser",g=>g(e,o,r,t));if(p)a=p;else{let g=o.marks(),{schema:m}=t.state,b=na.fromSchema(m);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(y=>{let x=s.appendChild(document.createElement("p"));y&&x.appendChild(b.serializeNode(m.text(y,g)))})}}else t.someProp("transformPastedHTML",p=>{n=p(n,t)}),s=gY(n),fu&&mY(s);let u=s&&s.querySelector("[data-pm-slice]"),f=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(f&&f[3])for(let p=+f[3];p>0;p--){let g=s.firstChild;for(;g&&g.nodeType!=1;)g=g.nextSibling;if(!g)break;s=g}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||ts.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||f),context:o,ruleFromNode(g){return g.nodeName=="BR"&&!g.nextSibling&&g.parentNode&&!fY.test(g.parentNode.nodeName)?{ignore:!0}:null}})),f)a=yY(TM(a,+f[1],+f[2]),f[4]);else if(a=Re.maxOpen(pY(a.content,o),!0),a.openStart||a.openEnd){let p=0,g=0;for(let m=a.content.firstChild;p<a.openStart&&!m.type.spec.isolating;p++,m=m.firstChild);for(let m=a.content.lastChild;g<a.openEnd&&!m.type.spec.isolating;g++,m=m.lastChild);a=TM(a,p,g)}return t.someProp("transformPasted",p=>{a=p(a,t)}),a}const fY=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function pY(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(a=>{if(!s)return;let l=o.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&i.length&&CM(l,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=_M(s[s.length-1],i.length));let f=wM(a,l);s.push(f),o=o.matchType(f.type),i=l}}),s)return Oe.from(s)}return t}function wM(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Oe.from(t));return t}function CM(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=CM(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(Oe.from(wM(n,t,o+1))))}}function _M(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,_M(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Oe.empty,!0);return t.copy(n.append(r))}function db(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,a=s.content;return t.childCount>1&&(i=0),o<r-1&&(a=db(a,e,n,r,o+1,i)),o>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Oe.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function TM(t,e,n){return e<t.openStart&&(t=new Re(db(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Re(db(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const kM={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let EM=null;function OM(){return EM||(EM=document.implementation.createHTMLDocument("title"))}let fb=null;function hY(t){let e=window.trustedTypes;return e?(fb||(fb=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),fb.createHTML(t)):t}function gY(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=OM().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&kM[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=hY(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function mY(t){let e=t.querySelectorAll(tr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function yY(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;o=Oe.from(l.create(r[a+1],o)),i++,s++}return new Re(o,i,s)}const fr={},pr={},bY={touchstart:!0,touchmove:!0};class vY{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function xY(t){for(let e in fr){let n=fr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{wY(t,r)&&!hb(t,r)&&(t.editable||!(r.type in pr))&&n(t,r)},bY[e]?{passive:!0}:void 0)}dr&&t.dom.addEventListener("input",()=>null),pb(t)}function ds(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function SY(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function pb(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>hb(t,r))})}function hb(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function wY(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function CY(t,e){!hb(t,e)&&fr[e.type]&&(t.editable||!(e.type in pr))&&fr[e.type](t,e)}pr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!AM(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Ci&&tr&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),bl&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,ia(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||dY(t,n)?n.preventDefault():ds(t,"key")},pr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},pr.keypress=(t,e)=>{let n=e;if(AM(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||so&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof rt)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,o,i))&&t.dispatch(i()),n.preventDefault()}};function fp(t){return{left:t.clientX,top:t.clientY}}function _Y(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function gb(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,a=>s>i.depth?a(t,n,i.nodeAfter,i.before(s),o,!0):a(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function Sl(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function TY(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&et.isSelectable(r)?(Sl(t,new et(n)),!0):!1}function kY(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof et&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(et.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(Sl(t,et.create(t.state.doc,o)),!0):!1}function EY(t,e,n,r,o){return gb(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?kY(t,n):TY(t,n))}function OY(t,e,n,r){return gb(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function MY(t,e,n,r){return gb(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||AY(t,n,r)}function AY(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Sl(t,rt.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)Sl(t,rt.create(r,a+1,a+1+s.content.size));else if(et.isSelectable(s))Sl(t,et.create(r,a));else continue;return!0}}function mb(t){return pp(t)}const MM=so?"metaKey":"ctrlKey";fr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=mb(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&_Y(n,t.input.lastClick)&&!n[MM]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=t.posAtCoords(fp(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new IY(t,s,n,!!r)):(i=="doubleClick"?OY:MY)(t,s.pos,s.inside,n)?n.preventDefault():ds(t,"pointer"))};class IY{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[MM],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let f=e.state.doc.resolve(n.pos);i=f.parent,s=f.depth?f.before():0}const a=o?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:u}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof et&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Eo&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ds(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ti(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(fp(e))),this.updateAllowDefault(e),this.allowDefault||!n?ds(this.view,"pointer"):EY(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||dr&&this.mightDrag&&!this.mightDrag.node.isAtom||tr&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Sl(this.view,st.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):ds(this.view,"pointer")}move(e){this.updateAllowDefault(e),ds(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}fr.touchstart=t=>{t.input.lastTouch=Date.now(),mb(t),ds(t,"pointer")},fr.touchmove=t=>{t.input.lastTouch=Date.now(),ds(t,"pointer")},fr.contextmenu=t=>mb(t);function AM(t,e){return t.composing?!0:dr&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const DY=Ci?5e3:-1;pr.compositionstart=pr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof rt&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),pp(t,!0),t.markCursor=null;else if(pp(t,!e.selection.empty),Eo&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let a=t.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}IM(t,DY)},pr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,IM(t,20))};function IM(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>pp(t),e))}function DM(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=NY());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function PY(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=TG(e.focusNode,e.focusOffset),r=kG(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function NY(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function pp(t,e=!1){if(!(Ci&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),DM(t),e||t.docView&&t.docView.dirty){let n=ib(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function LY(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const yu=Cr&&as<15||bl&&IG<604;fr.copy=pr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=yu?null:n.clipboardData,s=r.content(),{dom:a,text:l}=ub(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):LY(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function $Y(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function FY(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?bu(t,r.value,null,o,e):bu(t,r.textContent,r.innerHTML,o,e)},50)}function bu(t,e,n,r,o){let i=SM(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,o,i||Re.empty)))return!0;if(!i)return!1;let s=$Y(i),a=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function PM(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}pr.paste=(t,e)=>{let n=e;if(t.composing&&!Ci)return;let r=yu?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&bu(t,PM(r),r.getData("text/html"),o,n)?n.preventDefault():FY(t,n)};class NM{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const RY=so?"altKey":"ctrlKey";function LM(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[RY]}fr.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(fp(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof et?o.to-1:o.to))){if(r&&r.mightDrag)s=et.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let p=t.docView.nearestDesc(n.target,!0);p&&p.node.type.spec.draggable&&p!=t.docView&&(s=et.create(t.state.doc,p.posBefore))}}let a=(s||t.state.selection).content(),{dom:l,text:u,slice:f}=ub(t,a);(!n.dataTransfer.files.length||!tr||zO>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(yu?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",yu||n.dataTransfer.setData("text/plain",u),t.dragging=new NM(f,LM(t,n),s)},fr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},pr.dragover=pr.dragenter=(t,e)=>e.preventDefault(),pr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(fp(n));if(!o)return;let i=t.state.doc.resolve(o.pos),s=r&&r.slice;s?t.someProp("transformPasted",b=>{s=b(s,t)}):s=SM(t,PM(n.dataTransfer),yu?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&LM(t,n));if(t.someProp("handleDrop",b=>b(t,n,s||Re.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let l=s?_O(t.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let u=t.state.tr;if(a){let{node:b}=r;b?b.replace(u):u.deleteSelection()}let f=u.mapping.map(l),p=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,g=u.doc;if(p?u.replaceRangeWith(f,f,s.content.firstChild):u.replaceRange(f,f,s),u.doc.eq(g))return;let m=u.doc.resolve(f);if(p&&et.isSelectable(s.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new et(m));else{let b=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((y,x,w,T)=>b=T),u.setSelection(ab(t,m,u.doc.resolve(b)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))},fr.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Ti(t)},20))},fr.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},fr.beforeinput=(t,e)=>{if(tr&&Ci&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,ia(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in pr)fr[t]=pr[t];function vu(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class hp{constructor(e,n){this.toDOM=e,this.spec=n||ca,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new Kn(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof hp&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&vu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class fs{constructor(e,n){this.attrs=e,this.spec=n||ca}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new Kn(i,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof fs&&vu(this.attrs,e.attrs)&&vu(this.spec,e.spec)}static is(e){return e.type instanceof fs}destroy(){}}class yb{constructor(e,n){this.attrs=e,this.spec=n||ca}map(e,n,r,o){let i=e.mapResult(n.from+o,1);if(i.deleted)return null;let s=e.mapResult(n.to+o,-1);return s.deleted||s.pos<=i.pos?null:new Kn(i.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),i;return o==n.from&&!(i=e.child(r)).isText&&o+i.nodeSize==n.to}eq(e){return this==e||e instanceof yb&&vu(this.attrs,e.attrs)&&vu(this.spec,e.spec)}destroy(){}}class Kn{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Kn(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Kn(e,e,new hp(n,r))}static inline(e,n,r,o){return new Kn(e,n,new fs(r,o))}static node(e,n,r,o){return new Kn(e,n,new yb(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof fs}get widget(){return this.type instanceof hp}}const wl=[],ca={};class on{constructor(e,n){this.local=e.length?e:wl,this.children=n.length?n:wl}static create(e,n){return n.length?gp(n,e,0,ca):nr}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,i){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=e&&(!i||i(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,n-a,r,o+a,i)}}map(e,n,r){return this==nr||e.maps.length==0?this:this.mapInner(e,n,0,0,r||ca)}mapInner(e,n,r,o,i){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,o);l&&l.type.valid(n,l)?(s||(s=[])).push(l):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?BY(this.children,s||[],e,n,r,o,i):s?new on(s.sort(ua),wl):nr}add(e,n){return n.length?this==nr?on.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((a,l)=>{let u=l+r,f;if(f=FM(n,a,u)){for(o||(o=this.children.slice());i<o.length&&o[i]<l;)i+=3;o[i]==l?o[i+2]=o[i+2].addInner(a,f,u+1):o.splice(i,0,l,l+a.nodeSize,gp(f,a,u+1,ca)),i+=3}});let s=$M(i?RM(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new on(s.length?this.local.concat(s).sort(ua):this.local,o||this.children)}remove(e){return e.length==0||this==nr?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let s,a=r[i]+n,l=r[i+1]+n;for(let f=0,p;f<e.length;f++)(p=e[f])&&p.from>a&&p.to<l&&(e[f]=null,(s||(s=[])).push(p));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[i+2].removeInner(s,a+1);u!=nr?r[i+2]=u:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,s;i<e.length;i++)if(s=e[i])for(let a=0;a<o.length;a++)o[a].eq(s,n)&&(o==this.local&&(o=this.local.slice()),o.splice(a--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new on(o,r):nr}forChild(e,n){if(this==nr)return this;if(n.isLeaf)return on.empty;let r,o;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let i=e+1,s=i+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>i&&l.type instanceof fs){let u=Math.max(i,l.from)-i,f=Math.min(s,l.to)-i;u<f&&(o||(o=[])).push(l.copy(u,f))}}if(o){let a=new on(o.sort(ua),wl);return r?new ps([a,r]):a}return r||nr}eq(e){if(this==e)return!0;if(!(e instanceof on)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return bb(this.localsInner(e))}localsInner(e){if(this==nr)return wl;if(e.inlineContent||!this.local.some(fs.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof fs||n.push(this.local[r]);return n}forEachSet(e){e(this)}}on.empty=new on([],[]),on.removeOverlap=bb;const nr=on.empty;class ps{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,ca));return ps.from(r)}forChild(e,n){if(n.isLeaf)return on.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=nr&&(i instanceof ps?r=r.concat(i.members):r.push(i))}return ps.from(r)}eq(e){if(!(e instanceof ps)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let s=0;s<i.length;s++)n.push(i[s])}}return n?bb(r?n:n.sort(ua)):wl}static from(e){switch(e.length){case 0:return nr;case 1:return e[0];default:return new ps(e.every(n=>n instanceof on)?e:e.reduce((n,r)=>n.concat(r instanceof on?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function BY(t,e,n,r,o,i,s){let a=t.slice();for(let u=0,f=i;u<n.maps.length;u++){let p=0;n.maps[u].forEach((g,m,b,y)=>{let x=y-b-(m-g);for(let w=0;w<a.length;w+=3){let T=a[w+1];if(T<0||g>T+f-p)continue;let _=a[w]+f-p;m>=_?a[w+1]=g<=_?-2:-1:g>=f&&x&&(a[w]+=x,a[w+1]+=x)}p+=x}),f=n.maps[u].map(f,-1)}let l=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){l=!0,a[u+1]=-1;continue}let f=n.map(t[u]+i),p=f-o;if(p<0||p>=r.content.size){l=!0;continue}let g=n.map(t[u+1]+i,-1),m=g-o,{index:b,offset:y}=r.content.findIndex(p),x=r.maybeChild(b);if(x&&y==p&&y+x.nodeSize==m){let w=a[u+2].mapInner(n,x,f+1,t[u]+i+1,s);w!=nr?(a[u]=p,a[u+1]=m,a[u+2]=w):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=VY(a,t,e,n,o,i,s),f=gp(u,r,0,s);e=f.local;for(let p=0;p<a.length;p+=3)a[p+1]<0&&(a.splice(p,3),p-=3);for(let p=0,g=0;p<f.children.length;p+=3){let m=f.children[p];for(;g<a.length&&a[g]<m;)g+=3;a.splice(g,0,f.children[p],f.children[p+1],f.children[p+2])}}return new on(e.sort(ua),a)}function $M(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new Kn(o.from+e,o.to+e,o.type))}return n}function VY(t,e,n,r,o,i,s){function a(l,u){for(let f=0;f<l.local.length;f++){let p=l.local[f].map(r,o,u);p?n.push(p):s.onRemove&&s.onRemove(l.local[f].spec)}for(let f=0;f<l.children.length;f+=3)a(l.children[f+2],l.children[f]+u+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+i+1);return n}function FM(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i=0,s;i<t.length;i++)(s=t[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),t[i]=null);return o}function RM(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function gp(t,e,n,r){let o=[],i=!1;e.forEach((a,l)=>{let u=FM(t,a,l+n);if(u){i=!0;let f=gp(u,a,n+l+1,r);f!=nr&&o.push(l,l+a.nodeSize,f)}});let s=$M(i?RM(t):t,-n).sort(ua);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||o.length?new on(s,o):nr}function ua(t,e){return t.from-e.from||t.to-e.to}function bb(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),BM(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),BM(e,o,r.copy(i.from,r.to)));break}}}return e}function BM(t,e,n){for(;e<t.length&&ua(n,t[e])>0;)e++;t.splice(e,0,n)}function vb(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=nr&&e.push(r)}),t.cursorWrapper&&e.push(on.create(t.state.doc,[t.cursorWrapper.deco])),ps.from(e)}const zY={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},HY=Cr&&as<=11;class jY{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class WY{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new jY,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Cr&&as<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),HY&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,zY)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(pM(this.view)){if(this.suppressingSelectionUpdates)return Ti(this.view);if(Cr&&as<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&oa(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=yl(i))n.add(i);for(let i=e.anchorNode;i;i=yl(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&pM(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,a=!1,l=[];if(e.editable)for(let f=0;f<n.length;f++){let p=this.registerMutation(n[f],l);p&&(i=i<0?p.from:Math.min(p.from,i),s=s<0?p.to:Math.max(p.to,s),p.typeOver&&(a=!0))}if(Eo&&l.length){let f=l.filter(p=>p.nodeName=="BR");if(f.length==2){let[p,g]=f;p.parentNode&&p.parentNode.parentNode==g.parentNode?g.remove():p.remove()}else{let{focusNode:p}=this.currentSelection;for(let g of f){let m=g.parentNode;m&&m.nodeName=="LI"&&(!p||KY(e,p)!=m)&&g.remove()}}}let u=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&lp(r)&&(u=ib(e))&&u.eq(st.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ti(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),qY(e)),this.handleDOMChange(i,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Ti(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let f=0;f<e.addedNodes.length;f++){let p=e.addedNodes[f];n.push(p),p.nodeType==3&&(this.lastChangedTextNode=p)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(Cr&&as<=11&&e.addedNodes.length)for(let f=0;f<e.addedNodes.length;f++){let{previousSibling:p,nextSibling:g}=e.addedNodes[f];(!p||Array.prototype.indexOf.call(e.addedNodes,p)<0)&&(o=p),(!g||Array.prototype.indexOf.call(e.addedNodes,g)<0)&&(i=g)}let s=o&&o.parentNode==e.target?Un(o)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=i&&i.parentNode==e.target?Un(i):e.target.childNodes.length,u=r.localPosFromDOM(e.target,l,1);return{from:a,to:u}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let VM=new WeakMap,zM=!1;function qY(t){if(!VM.has(t)&&(VM.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Eo,zM)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),zM=!0}}function HM(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return oa(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function UY(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return HM(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?HM(t,n):null}function KY(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function GY(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:s,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),u,f=l.anchorNode;if(f&&t.dom.contains(f.nodeType==1?f:f.parentNode)&&(u=[{node:f,offset:l.anchorOffset}],lp(l)||u.push({node:l.focusNode,offset:l.focusOffset})),tr&&t.input.lastKeyCode===8)for(let x=i;x>o;x--){let w=r.childNodes[x-1],T=w.pmViewDesc;if(w.nodeName=="BR"&&!T){i=x;break}if(!T||T.size)break}let p=t.state.doc,g=t.someProp("domParser")||ts.fromSchema(t.state.schema),m=p.resolve(s),b=null,y=g.parse(r,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:o,to:i,preserveWhitespace:m.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:YY,context:m});if(u&&u[0].pos!=null){let x=u[0].pos,w=u[1]&&u[1].pos;w==null&&(w=x),b={anchor:x+s,head:w+s}}return{doc:y,sel:b,from:s,to:a}}function YY(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(dr&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||dr&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const JY=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function XY(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let I=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,L=ib(t,I);if(L&&!t.state.selection.eq(L)){if(tr&&Ci&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",D=>D(t,ia(13,"Enter"))))return;let O=t.state.tr.setSelection(L);I=="pointer"?O.setMeta("pointer",!0):I=="key"&&O.scrollIntoView(),i&&O.setMeta("composition",i),t.dispatch(O)}return}let s=t.state.doc.resolve(e),a=s.sharedDepth(n);e=s.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,u=GY(t,e,n),f=t.state.doc,p=f.slice(u.from,u.to),g,m;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(g=t.state.selection.to,m="end"):(g=t.state.selection.from,m="start"),t.input.lastKeyCode=null;let b=eJ(p.content,u.doc.content,u.from,g,m);if(b&&t.input.domChangeCount++,(bl&&t.input.lastIOSEnter>Date.now()-225||Ci)&&o.some(I=>I.nodeType==1&&!JY.test(I.nodeName))&&(!b||b.endA>=b.endB)&&t.someProp("handleKeyDown",I=>I(t,ia(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!b)if(r&&l instanceof rt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))b={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let I=jM(t,t.state.doc,u.sel);if(I&&!I.eq(t.state.selection)){let L=t.state.tr.setSelection(I);i&&L.setMeta("composition",i),t.dispatch(L)}}return}t.state.selection.from<t.state.selection.to&&b.start==b.endB&&t.state.selection instanceof rt&&(b.start>t.state.selection.from&&b.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?b.start=t.state.selection.from:b.endA<t.state.selection.to&&b.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(b.endB+=t.state.selection.to-b.endA,b.endA=t.state.selection.to)),Cr&&as<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>u.from&&u.doc.textBetween(b.start-u.from-1,b.start-u.from+1)=="  "&&(b.start--,b.endA--,b.endB--);let y=u.doc.resolveNoCache(b.start-u.from),x=u.doc.resolveNoCache(b.endB-u.from),w=f.resolve(b.start),T=y.sameParent(x)&&y.parent.inlineContent&&w.end()>=b.endA,_;if((bl&&t.input.lastIOSEnter>Date.now()-225&&(!T||o.some(I=>I.nodeName=="DIV"||I.nodeName=="P"))||!T&&y.pos<u.doc.content.size&&(!y.sameParent(x)||!y.parent.inlineContent)&&!/\S/.test(u.doc.textBetween(y.pos,x.pos,"",""))&&(_=st.findFrom(u.doc.resolve(y.pos+1),1,!0))&&_.head>y.pos)&&t.someProp("handleKeyDown",I=>I(t,ia(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>b.start&&QY(f,b.start,b.endA,y,x)&&t.someProp("handleKeyDown",I=>I(t,ia(8,"Backspace")))){Ci&&tr&&t.domObserver.suppressSelectionUpdates();return}tr&&b.endB==b.start&&(t.input.lastChromeDelete=Date.now()),Ci&&!T&&y.start()!=x.start()&&x.parentOffset==0&&y.depth==x.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==b.endA&&(b.endB-=2,x=u.doc.resolveNoCache(b.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(I){return I(t,ia(13,"Enter"))})},20));let C=b.start,E=b.endA,M=I=>{let L=I||t.state.tr.replace(C,E,u.doc.slice(b.start-u.from,b.endB-u.from));if(u.sel){let O=jM(t,L.doc,u.sel);O&&!(tr&&t.composing&&O.empty&&(b.start!=b.endB||t.input.lastChromeDelete<Date.now()-100)&&(O.head==C||O.head==L.mapping.map(E)-1)||Cr&&O.empty&&O.head==C)&&L.setSelection(O)}return i&&L.setMeta("composition",i),L.scrollIntoView()},A;if(T){if(y.pos==x.pos){Cr&&as<=11&&y.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ti(t),20));let I=M(t.state.tr.delete(C,E)),L=f.resolve(b.start).marksAcross(f.resolve(b.endA));L&&I.ensureMarks(L),t.dispatch(I)}else if(b.endA==b.endB&&(A=ZY(y.parent.content.cut(y.parentOffset,x.parentOffset),w.parent.content.cut(w.parentOffset,b.endA-w.start())))){let I=M(t.state.tr);A.type=="add"?I.addMark(C,E,A.mark):I.removeMark(C,E,A.mark),t.dispatch(I)}else if(y.parent.child(y.index()).isText&&y.index()==x.index()-(x.textOffset?0:1)){let I=y.parent.textBetween(y.parentOffset,x.parentOffset),L=()=>M(t.state.tr.insertText(I,C,E));t.someProp("handleTextInput",O=>O(t,C,E,I,L))||t.dispatch(L())}}else t.dispatch(M())}function jM(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:ab(t,e.resolve(n.anchor),e.resolve(n.head))}function ZY(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,a,l;for(let f=0;f<r.length;f++)o=r[f].removeFromSet(o);for(let f=0;f<n.length;f++)i=n[f].removeFromSet(i);if(o.length==1&&i.length==0)a=o[0],s="add",l=f=>f.mark(a.addToSet(f.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",l=f=>f.mark(a.removeFromSet(f.marks));else return null;let u=[];for(let f=0;f<e.childCount;f++)u.push(l(e.child(f)));if(Oe.from(u).eq(t))return{mark:a,type:s}}function QY(t,e,n,r,o){if(n-e<=o.pos-r.pos||xb(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let a=i.nodeAfter;return a!=null&&n==e+a.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(xb(i,!0,!0));return!s.parent.isTextblock||s.pos>n||xb(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function xb(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function eJ(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let l=Math.max(0,i-Math.min(s,a));r-=s+l-i}if(s<i&&t.size<e.size){let l=r<=i&&r>=s?i-r:0;i-=l,i&&i<e.size&&WM(e.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-s),s=i}else if(a<i){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<t.size&&WM(t.textBetween(i-1,i+1))&&(i+=l?1:-1),s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}function WM(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class qM{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new vY,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(JM),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=GM(this),KM(this),this.nodeViews=YM(this),this.docView=tM(this.state.doc,UM(this),vb(this),this.dom,this),this.domObserver=new WY(this,(r,o,i,s)=>XY(this,r,o,i,s)),this.domObserver.start(),xY(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&pb(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(JM),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(DM(this),s=!0),this.state=e;let a=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let m=YM(this);nJ(m,this.nodeViews)&&(this.nodeViews=m,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&pb(this),this.editable=GM(this),KM(this);let l=vb(this),u=UM(this),f=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",p=i||!this.docView.matchesNode(e.doc,u,l);(p||!e.selection.eq(o.selection))&&(s=!0);let g=f=="preserve"&&s&&this.dom.style.overflowAnchor==null&&NG(this);if(s){this.domObserver.stop();let m=p&&(Cr||tr)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&tJ(o.selection,e.selection);if(p){let b=tr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=PY(this)),(i||!this.docView.update(e.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=tM(e.doc,u,l,this.dom,this)),b&&!this.trackWrites&&(m=!0)}m||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&oY(this))?Ti(this,m):(dM(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),f=="reset"?this.dom.scrollTop=0:f=="to selection"?this.scrollToSelection():g&&LG(g)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof et){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&HO(this,n.getBoundingClientRect(),e)}else HO(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new NM(e.slice,e.move,o<0?void 0:et.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(o=n?n(a):a))return o}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let a=i[s].props[e];if(a!=null&&(o=n?n(a):a))return o}}hasFocus(){if(Cr){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&$G(this.dom),Ti(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return zG(this,e)}coordsAtPos(e,n=1){return GO(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return UG(this,n||this.state,e)}pasteHTML(e,n){return bu(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return bu(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return ub(this,e)}destroy(){this.docView&&(SY(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],vb(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,CG())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return CY(this,e)}domSelectionRange(){let e=this.domSelection();return e?dr&&this.root.nodeType===11&&OG(this.dom.ownerDocument)==this.dom&&UY(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}qM.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function UM(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Kn.node(0,t.state.doc.content.size,e)]}function KM(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Kn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function GM(t){return!t.someProp("editable",e=>e(t.state)===!1)}function tJ(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function YM(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function nJ(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function JM(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var hs={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},mp={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rJ=typeof navigator<"u"&&/Mac/.test(navigator.platform),oJ=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Gn=0;Gn<10;Gn++)hs[48+Gn]=hs[96+Gn]=String(Gn);for(var Gn=1;Gn<=24;Gn++)hs[Gn+111]="F"+Gn;for(var Gn=65;Gn<=90;Gn++)hs[Gn]=String.fromCharCode(Gn+32),mp[Gn]=String.fromCharCode(Gn);for(var Sb in hs)mp.hasOwnProperty(Sb)||(mp[Sb]=hs[Sb]);function iJ(t){var e=rJ&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||oJ&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?mp:hs)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const sJ=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),aJ=typeof navigator<"u"&&/Win/.test(navigator.platform);function lJ(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))sJ?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function cJ(t){let e=Object.create(null);for(let n in t)e[lJ(n)]=t[n];return e}function wb(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function uJ(t){return new ln({props:{handleKeyDown:Cb(t)}})}function Cb(t){let e=cJ(t);return function(n,r){let o=iJ(r),i,s=e[wb(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[wb(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(aJ&&r.ctrlKey&&r.altKey)&&(i=hs[r.keyCode])&&i!=o){let a=e[wb(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const _b=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function XM(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const ZM=(t,e,n)=>{let r=XM(t,n);if(!r)return!1;let o=Tb(r);if(!o){let s=r.blockRange(),a=s&&fl(s);return a==null?!1:(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(aA(t,o,e,-1))return!0;if(r.parent.content.size==0&&(Cl(i,"end")||et.isSelectable(i)))for(let s=r.depth;;s--){let a=ip(t.doc,r.before(s),r.after(s),Re.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(Cl(i,"end")?st.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):et.create(l.doc,o.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},dJ=(t,e,n)=>{let r=XM(t,n);if(!r)return!1;let o=Tb(r);return o?QM(t,o,e):!1},fJ=(t,e,n)=>{let r=tA(t,n);if(!r)return!1;let o=kb(r);return o?QM(t,o,e):!1};function QM(t,e,n){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let f=o.lastChild;if(!f)return!1;o=f}let s=e.nodeAfter,a=s,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let f=a.firstChild;if(!f)return!1;a=f}let u=ip(t.doc,i,l,Re.empty);if(!u||u.from!=i||u instanceof Rn&&u.slice.size>=l-i)return!1;if(n){let f=t.tr.step(u);f.setSelection(rt.create(f.doc,i)),n(f.scrollIntoView())}return!0}function Cl(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const eA=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=Tb(r)}let s=i&&i.nodeBefore;return!s||!et.isSelectable(s)?!1:(e&&e(t.tr.setSelection(et.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Tb(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function tA(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const nA=(t,e,n)=>{let r=tA(t,n);if(!r)return!1;let o=kb(r);if(!o)return!1;let i=o.nodeAfter;if(aA(t,o,e,1))return!0;if(r.parent.content.size==0&&(Cl(i,"start")||et.isSelectable(i))){let s=ip(t.doc,r.before(),r.after(),Re.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(Cl(i,"start")?st.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):et.create(a.doc,a.mapping.map(o.pos))),e(a.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},rA=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=kb(r)}let s=i&&i.nodeAfter;return!s||!et.isSelectable(s)?!1:(e&&e(t.tr.setSelection(et.create(t.doc,i.pos)).scrollIntoView()),!0)};function kb(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const pJ=(t,e)=>{let n=t.selection,r=n instanceof et,o;if(r){if(n.node.isTextblock||!is(t.doc,n.from))return!1;o=n.from}else if(o=op(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(et.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},hJ=(t,e)=>{let n=t.selection,r;if(n instanceof et){if(n.node.isTextblock||!is(t.doc,n.to))return!1;r=n.to}else if(r=op(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},gJ=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&fl(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},oA=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
251
+ `).scrollIntoView()),!0)};function Eb(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const mJ=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Eb(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection(st.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},iA=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof Rr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Eb(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,a=t.tr.insert(s,i.createAndFill());a.setSelection(rt.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},sA=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Si(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&fl(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function yJ(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof et&&e.selection.node.isBlock)return!r.parentOffset||!Si(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,a,l=!1,u=!1;for(let m=r.depth;;m--)if(r.node(m).isBlock){l=r.end(m)==r.pos+(r.depth-m),u=r.start(m)==r.pos-(r.depth-m),a=Eb(r.node(m-1).contentMatchAt(r.indexAfter(m-1))),i.unshift(l&&a?{type:a}:null),s=m;break}else{if(m==1)return!1;i.unshift(null)}let f=e.tr;(e.selection instanceof rt||e.selection instanceof Rr)&&f.deleteSelection();let p=f.mapping.map(r.pos),g=Si(f.doc,p,i.length,i);if(g||(i[0]=a?{type:a}:null,g=Si(f.doc,p,i.length,i)),!g)return!1;if(f.split(p,i.length,i),!l&&u&&r.node(s).type!=a){let m=f.mapping.map(r.before(s)),b=f.doc.resolve(m);a&&r.node(s-1).canReplaceWith(b.index(),b.index()+1,a)&&f.setNodeMarkup(f.mapping.map(r.before(s)),a)}return n&&n(f.scrollIntoView()),!0}}const bJ=yJ(),vJ=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(et.create(t.doc,o))),!0)};function xJ(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||is(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function aA(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,a,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&xJ(t,e,n))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(s=(a=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&a.matchType(s[0]||i.type).validEnd){if(n){let m=e.pos+i.nodeSize,b=Oe.empty;for(let w=s.length-1;w>=0;w--)b=Oe.from(s[w].create(null,b));b=Oe.from(o.copy(b));let y=t.tr.step(new Bn(e.pos-1,m,e.pos,m,new Re(b,1,0),s.length,!0)),x=y.doc.resolve(m+2*s.length);x.nodeAfter&&x.nodeAfter.type==o.type&&is(y.doc,x.pos)&&y.join(x.pos),n(y.scrollIntoView())}return!0}let f=i.type.spec.isolating||r>0&&l?null:st.findFrom(e,1),p=f&&f.$from.blockRange(f.$to),g=p&&fl(p);if(g!=null&&g>=e.depth)return n&&n(t.tr.lift(p,g).scrollIntoView()),!0;if(u&&Cl(i,"start",!0)&&Cl(o,"end")){let m=o,b=[];for(;b.push(m),!m.isTextblock;)m=m.lastChild;let y=i,x=1;for(;!y.isTextblock;y=y.firstChild)x++;if(m.canReplace(m.childCount,m.childCount,y.content)){if(n){let w=Oe.empty;for(let _=b.length-1;_>=0;_--)w=Oe.from(b[_].copy(w));let T=t.tr.step(new Bn(e.pos-b.length,e.pos+i.nodeSize,e.pos+x,e.pos+i.nodeSize-x,new Re(w,b.length,0),0,!0));n(T.scrollIntoView())}return!0}}return!1}function lA(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(rt.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const SJ=lA(-1),wJ=lA(1);function CJ(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&jy(s,t,e);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function cA(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[i];n.doc.nodesBetween(s,a,(l,u)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)o=!0;else{let f=n.doc.resolve(u),p=f.index();o=f.parent.canReplaceWith(p,p+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];i.setBlockType(a,l,t,e)}r(i.scrollIntoView())}return!0}}function Ob(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}Ob(_b,ZM,eA),Ob(_b,nA,rA),Ob(oA,iA,sA,bJ),typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function _J(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i);if(!s)return!1;let a=r?n.tr:null;return TJ(a,s,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function TJ(t,e,n,r=null){let o=!1,i=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=s.resolve(e.start-2);i=new Zf(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Zf(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let a=jy(i,n,r,e);return a?(t&&kJ(t,e,a,o,n),!0):!1}function kJ(t,e,n,r,o){let i=Oe.empty;for(let f=n.length-1;f>=0;f--)i=Oe.from(n[f].type.create(n[f].attrs,i));t.step(new Bn(e.start-(r?2:0),e.end,e.start,e.end,new Re(i,0,0),n.length,!0));let s=0;for(let f=0;f<n.length;f++)n[f].type==o&&(s=f+1);let a=n.length-s,l=e.start+n.length-(r?2:0),u=e.parent;for(let f=e.startIndex,p=e.endIndex,g=!0;f<p;f++,g=!1)!g&&Si(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=u.child(f).nodeSize;return t}function EJ(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,s=>s.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?OJ(e,n,t,i):MJ(e,n,i):!0:!1}}function OJ(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new Bn(i-1,s,i,s,new Re(Oe.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Zf(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const a=fl(r);if(a==null)return!1;o.lift(r,a);let l=o.doc.resolve(o.mapping.map(i,-1)-1);return is(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),e(o.scrollIntoView()),!0}function MJ(t,e,n){let r=t.tr,o=n.parent;for(let m=n.end,b=n.endIndex-1,y=n.startIndex;b>y;b--)m-=o.child(b).nodeSize,r.delete(m-1,m+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==o.childCount,u=i.node(-1),f=i.index(-1);if(!u.canReplace(f+(a?0:1),f+1,s.content.append(l?Oe.empty:Oe.from(o))))return!1;let p=i.pos,g=p+s.nodeSize;return r.step(new Bn(p-(a?1:0),g+(l?1:0),p+1,g-1,new Re((a?Oe.empty:Oe.from(o.copy(Oe.empty))).append(l?Oe.empty:Oe.from(o.copy(Oe.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function AJ(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==t);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let a=i.parent,l=a.child(s-1);if(l.type!=t)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,f=Oe.from(u?t.create():null),p=new Re(Oe.from(t.create(null,Oe.from(a.type.create(null,f)))),u?3:1,0),g=i.start,m=i.end;n(e.tr.step(new Bn(g-(u?3:1),m,g,m,p,1,!0)).scrollIntoView())}return!0}}function yp(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}class bp{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:r}=this,{view:o}=n,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...f)=>{const p=l(...f)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),p}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a=[],l=!!e,u=e||i.tr,f=()=>(!l&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(g=>g===!0)),p={...Object.fromEntries(Object.entries(r).map(([g,m])=>[g,(...y)=>{const x=this.buildProps(u,n),w=m(...y)(x);return a.push(w),p}])),run:f};return p}createCan(e){const{rawCommands:n,state:r}=this,o=!1,i=e||r.tr,s=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...f)=>u(...f)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(e,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a={tr:e,editor:o,view:s,state:yp({state:i,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,u])=>[l,(...f)=>u(...f)(a)]))}};return a}}class IJ{constructor(){this.callbacks={}}on(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),this}emit(e,...n){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,n)),this}off(e,n){const r=this.callbacks[e];return r&&(n?this.callbacks[e]=r.filter(o=>o!==n):delete this.callbacks[e]),this}once(e,n){const r=(...o)=>{this.off(e,r),n.apply(this,o)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}}function Ye(t,e,n){return t.config[e]===void 0&&t.parent?Ye(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Ye(t.parent,e,n):null}):t.config[e]}function vp(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function uA(t){const e=[],{nodeExtensions:n,markExtensions:r}=vp(t),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage,extensions:o},l=Ye(s,"addGlobalAttributes",a);if(!l)return;l().forEach(f=>{f.types.forEach(p=>{Object.entries(f.attributes).forEach(([g,m])=>{e.push({type:p,name:g,attribute:{...i,...m}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=Ye(s,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([f,p])=>{const g={...i,...p};typeof(g==null?void 0:g.default)=="function"&&(g.default=g.default()),g!=null&&g.isRequired&&(g==null?void 0:g.default)===void 0&&delete g.default,e.push({type:s.name,name:f,attribute:g})})}),e}function Dn(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Ct(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const a=i?String(i).split(" "):[],l=r[o]?r[o].split(" "):[],u=a.filter(f=>!l.includes(f));r[o]=[...l,...u].join(" ")}else if(o==="style"){const a=i?i.split(";").map(f=>f.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(f=>f.trim()).filter(Boolean):[],u=new Map;l.forEach(f=>{const[p,g]=f.split(":").map(m=>m.trim());u.set(p,g)}),a.forEach(f=>{const[p,g]=f.split(":").map(m=>m.trim());u.set(p,g)}),r[o]=Array.from(u.entries()).map(([f,p])=>`${f}: ${p}`).join("; ")}else r[o]=i}),r},{})}function xp(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Ct(n,r),{})}function dA(t){return typeof t=="function"}function gt(t,e=void 0,...n){return dA(t)?e?t.bind(e)(...n):t(...n):t}function DJ(t={}){return Object.keys(t).length===0&&t.constructor===Object}function PJ(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function fA(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((i,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):PJ(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function pA(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&DJ(n)?!1:n!=null))}function NJ(t,e){var n;const r=uA(t),{nodeExtensions:o,markExtensions:i}=vp(t),s=(n=o.find(u=>Ye(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(u=>{const f=r.filter(w=>w.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:e},g=t.reduce((w,T)=>{const _=Ye(T,"extendNodeSchema",p);return{...w,..._?_(u):{}}},{}),m=pA({...g,content:gt(Ye(u,"content",p)),marks:gt(Ye(u,"marks",p)),group:gt(Ye(u,"group",p)),inline:gt(Ye(u,"inline",p)),atom:gt(Ye(u,"atom",p)),selectable:gt(Ye(u,"selectable",p)),draggable:gt(Ye(u,"draggable",p)),code:gt(Ye(u,"code",p)),whitespace:gt(Ye(u,"whitespace",p)),linebreakReplacement:gt(Ye(u,"linebreakReplacement",p)),defining:gt(Ye(u,"defining",p)),isolating:gt(Ye(u,"isolating",p)),attrs:Object.fromEntries(f.map(w=>{var T;return[w.name,{default:(T=w==null?void 0:w.attribute)===null||T===void 0?void 0:T.default}]}))}),b=gt(Ye(u,"parseHTML",p));b&&(m.parseDOM=b.map(w=>fA(w,f)));const y=Ye(u,"renderHTML",p);y&&(m.toDOM=w=>y({node:w,HTMLAttributes:xp(w,f)}));const x=Ye(u,"renderText",p);return x&&(m.toText=x),[u.name,m]})),l=Object.fromEntries(i.map(u=>{const f=r.filter(x=>x.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:e},g=t.reduce((x,w)=>{const T=Ye(w,"extendMarkSchema",p);return{...x,...T?T(u):{}}},{}),m=pA({...g,inclusive:gt(Ye(u,"inclusive",p)),excludes:gt(Ye(u,"excludes",p)),group:gt(Ye(u,"group",p)),spanning:gt(Ye(u,"spanning",p)),code:gt(Ye(u,"code",p)),attrs:Object.fromEntries(f.map(x=>{var w;return[x.name,{default:(w=x==null?void 0:x.attribute)===null||w===void 0?void 0:w.default}]}))}),b=gt(Ye(u,"parseHTML",p));b&&(m.parseDOM=b.map(x=>fA(x,f)));const y=Ye(u,"renderHTML",p);return y&&(m.toDOM=x=>y({mark:x,HTMLAttributes:xp(x,f)})),[u.name,m]}));return new oO({topNode:s,nodes:a,marks:l})}function Mb(t,e){return e.nodes[t]||e.marks[t]||null}function hA(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Ab(t,e){const n=na.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}const LJ=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,a)=>{var l,u;const f=((u=(l=o.type.spec).toText)===null||u===void 0?void 0:u.call(l,{node:o,pos:i,parent:s,index:a}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?f:f.slice(0,Math.max(0,r-i))}),n};function Ib(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class xu{constructor(e){this.find=e.find,this.handler=e.handler}}const $J=(t,e)=>{if(Ib(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Sp(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const u=l.state.doc.resolve(r);if(u.parent.type.spec.code||!((e=u.nodeBefore||u.nodeAfter)===null||e===void 0)&&e.marks.find(g=>g.type.spec.code))return!1;let f=!1;const p=LJ(u)+i;return s.forEach(g=>{if(f)return;const m=$J(p,g.find);if(!m)return;const b=l.state.tr,y=yp({state:l.state,transaction:b}),x={from:r-(m[0].length-i.length),to:o},{commands:w,chain:T,can:_}=new bp({editor:n,state:y});g.handler({state:y,range:x,match:m,commands:w,chain:T,can:_})===null||!b.steps.length||(b.setMeta(a,{transform:b,from:r,to:o,text:i}),l.dispatch(b),f=!0)}),f}function FJ(t){const{editor:e,rules:n}=t,r=new ln({state:{init(){return null},apply(o,i,s){const a=o.getMeta(r);if(a)return a;const l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:f}=l;typeof f=="string"?f=f:f=Ab(Oe.from(f),s.schema);const{from:p}=l,g=p+f.length;Sp({editor:e,from:p,to:g,text:f,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,a){return Sp({editor:e,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&Sp({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?Sp({editor:e,from:s.pos,to:s.pos,text:`
252
+ `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function RJ(t){return Object.prototype.toString.call(t).slice(8,-1)}function wp(t){return RJ(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Cp(t,e){const n={...t};return wp(t)&&wp(e)&&Object.keys(e).forEach(r=>{wp(e[r])&&wp(t[r])?n[r]=Cp(t[r],e[r]):n[r]=e[r]}),n}class _r{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=gt(Ye(this,"addOptions",{name:this.name}))),this.storage=gt(Ye(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new _r(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Cp(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new _r(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=gt(Ye(n,"addOptions",{name:n.name})),n.storage=gt(Ye(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const l=s.find(u=>(u==null?void 0:u.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}function BJ(t){return typeof t=="number"}class VJ{constructor(e){this.find=e.find,this.handler=e.handler}}const zJ=(t,e,n)=>{if(Ib(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function HJ(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:u,can:f}=new bp({editor:e,state:n}),p=[];return n.doc.nodesBetween(r,o,(m,b)=>{if(!m.isTextblock||m.type.spec.code)return;const y=Math.max(r,b),x=Math.min(o,b+m.content.size),w=m.textBetween(y-b,x-b,void 0,"");zJ(w,i.find,s).forEach(_=>{if(_.index===void 0)return;const C=y+_.index+1,E=C+_[0].length,M={from:n.tr.mapping.map(C),to:n.tr.mapping.map(E)},A=i.handler({state:n,range:M,match:_,commands:l,chain:u,can:f,pasteEvent:s,dropEvent:a});p.push(A)})}),p.every(m=>m!==null)}let _p=null;const jJ=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function WJ(t){const{editor:e,rules:n}=t;let r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:f,from:p,to:g,rule:m,pasteEvt:b})=>{const y=f.tr,x=yp({state:f,transaction:y});if(!(!HJ({editor:e,state:x,from:Math.max(p-1,0),to:g.b-1,rule:m,pasteEvent:b,dropEvent:a})||!y.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,y}};return n.map(f=>new ln({view(p){const g=b=>{var y;r=!((y=p.dom.parentElement)===null||y===void 0)&&y.contains(b.target)?p.dom.parentElement:null,r&&(_p=e)},m=()=>{_p&&(_p=null)};return window.addEventListener("dragstart",g),window.addEventListener("dragend",m),{destroy(){window.removeEventListener("dragstart",g),window.removeEventListener("dragend",m)}}},props:{handleDOMEvents:{drop:(p,g)=>{if(i=r===p.dom.parentElement,a=g,!i){const m=_p;m!=null&&m.isEditable&&setTimeout(()=>{const b=m.state.selection;b&&m.commands.deleteRange({from:b.from,to:b.to})},10)}return!1},paste:(p,g)=>{var m;const b=(m=g.clipboardData)===null||m===void 0?void 0:m.getData("text/html");return s=g,o=!!(b!=null&&b.includes("data-pm-slice")),!1}}},appendTransaction:(p,g,m)=>{const b=p[0],y=b.getMeta("uiEvent")==="paste"&&!o,x=b.getMeta("uiEvent")==="drop"&&!i,w=b.getMeta("applyPasteRules"),T=!!w;if(!y&&!x&&!T)return;if(T){let{text:E}=w;typeof E=="string"?E=E:E=Ab(Oe.from(E),m.schema);const{from:M}=w,A=M+E.length,I=jJ(E);return l({rule:f,state:m,from:M,to:{b:A},pasteEvt:I})}const _=g.doc.content.findDiffStart(m.doc.content),C=g.doc.content.findDiffEnd(m.doc.content);if(!(!BJ(_)||!C||_===C.b))return l({rule:f,state:m,from:_,to:C,pasteEvt:s})}}))}function qJ(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}class _l{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=_l.resolve(e),this.schema=NJ(this.extensions,n),this.setupExtensions()}static resolve(e){const n=_l.sort(_l.flatten(e)),r=qJ(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(e){return e.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=Ye(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=Ye(r,"priority")||100,s=Ye(o,"priority")||100;return i>s?-1:i<s?1:0})}get commands(){return this.extensions.reduce((e,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:Mb(n.name,this.schema)},o=Ye(n,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,n=_l.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:Mb(s.name,this.schema)},l=[],u=Ye(s,"addKeyboardShortcuts",a);let f={};if(s.type==="mark"&&Ye(s,"exitable",a)&&(f.ArrowRight=()=>_r.handleExit({editor:e,mark:s})),u){const y=Object.fromEntries(Object.entries(u()).map(([x,w])=>[x,()=>w({editor:e})]));f={...f,...y}}const p=uJ(f);l.push(p);const g=Ye(s,"addInputRules",a);hA(s,e.options.enableInputRules)&&g&&r.push(...g());const m=Ye(s,"addPasteRules",a);hA(s,e.options.enablePasteRules)&&m&&o.push(...m());const b=Ye(s,"addProseMirrorPlugins",a);if(b){const y=b();l.push(...y)}return l}).flat();return[FJ({editor:e,rules:r}),...WJ({editor:e,rules:o}),...i]}get attributes(){return uA(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=vp(this.extensions);return Object.fromEntries(n.filter(r=>!!Ye(r,"addNodeView")).map(r=>{const o=this.attributes.filter(l=>l.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:e,type:Dn(r.name,this.schema)},s=Ye(r,"addNodeView",i);if(!s)return[];const a=(l,u,f,p,g)=>{const m=xp(l,o);return s()({node:l,view:u,getPos:f,decorations:p,innerDecorations:g,editor:e,extension:r,HTMLAttributes:m})};return[r.name,a]}))}setupExtensions(){this.extensions.forEach(e=>{var n;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:Mb(e.name,this.schema)};e.type==="mark"&&(!((n=gt(Ye(e,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const o=Ye(e,"onBeforeCreate",r),i=Ye(e,"onCreate",r),s=Ye(e,"onUpdate",r),a=Ye(e,"onSelectionUpdate",r),l=Ye(e,"onTransaction",r),u=Ye(e,"onFocus",r),f=Ye(e,"onBlur",r),p=Ye(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),f&&this.editor.on("blur",f),p&&this.editor.on("destroy",p)})}}class gn{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=gt(Ye(this,"addOptions",{name:this.name}))),this.storage=gt(Ye(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new gn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Cp(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new gn({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=gt(Ye(n,"addOptions",{name:n.name})),n.storage=gt(Ye(n,"addStorage",{name:n.name,options:n.options})),n}}function gA(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
253
+
254
+ `,textSerializers:s={}}=n||{};let a="";return t.nodesBetween(r,o,(l,u,f,p)=>{var g;l.isBlock&&u>r&&(a+=i);const m=s==null?void 0:s[l.type.name];if(m)return f&&(a+=m({node:l,pos:u,parent:f,index:p,range:e})),!1;l.isText&&(a+=(g=l==null?void 0:l.text)===null||g===void 0?void 0:g.slice(Math.max(r,u)-u,o-u))}),a}function Db(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const UJ=gn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ln({key:new An("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o,s=Math.min(...i.map(f=>f.$from.pos)),a=Math.max(...i.map(f=>f.$to.pos)),l=Db(n);return gA(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),KJ=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),GJ=(t=!1)=>({commands:e})=>e.setContent("",t),YJ=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{t.doc.nodesBetween(i.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:f}=e,p=u.resolve(f.map(l)),g=u.resolve(f.map(l+a.nodeSize)),m=p.blockRange(g);if(!m)return;const b=fl(m);if(a.type.isTextblock){const{defaultType:y}=p.parent.contentMatchAt(p.index());e.setNodeMarkup(m.start,y)}(b||b===0)&&e.lift(m,b)})}),!0},JJ=t=>e=>t(e),XJ=()=>({state:t,dispatch:e})=>iA(t,e),ZJ=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new rt(r.doc.resolve(Math.max(s-1,0)))),!0},QJ=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const a=o.before(i),l=o.after(i);t.delete(a,l).scrollIntoView()}return!0}return!1},eX=t=>({tr:e,state:n,dispatch:r})=>{const o=Dn(t,n.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const l=i.before(s),u=i.after(s);e.delete(l,u).scrollIntoView()}return!0}return!1},tX=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},nX=()=>({state:t,dispatch:e})=>_b(t,e),rX=()=>({commands:t})=>t.keyboardShortcut("Enter"),oX=()=>({state:t,dispatch:e})=>mJ(t,e);function Tp(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Ib(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function mA(t,e,n={}){return t.find(r=>r.type===e&&Tp(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function yA(t,e,n={}){return!!mA(t,e,n)}function Su(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(f=>f.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(f=>f.type===e)||(n=n||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!mA([...o.node.marks],e,n)))return;let s=o.index,a=t.start()+o.offset,l=s+1,u=a+o.node.nodeSize;for(;s>0&&yA([...t.parent.child(s-1).marks],e,n);)s-=1,a-=t.parent.child(s).nodeSize;for(;l<t.parent.childCount&&yA([...t.parent.child(l).marks],e,n);)u+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function Oo(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const iX=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=Oo(t,r.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:f}=a;if(o){const p=Su(l,i,e);if(p&&p.from<=u&&p.to>=f){const g=rt.create(s,p.from,p.to);n.setSelection(g)}}return!0},sX=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function bA(t){return t instanceof rt}function ki(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function vA(t,e=null){if(!e)return null;const n=st.atStart(t),r=st.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?rt.create(t,ki(0,o,i),ki(t.content.size,o,i)):rt.create(t,ki(e,o,i),ki(e,o,i))}function xA(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function kp(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const aX=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{(kp()||xA())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&t===null||t===!1)return!0;if(i&&t===null&&!bA(n.state.selection))return s(),!0;const a=vA(o.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},lX=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),cX=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),SA=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&SA(r)}return t};function Ep(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return SA(n)}function wu(t,e,n){if(t instanceof xi||t instanceof Oe)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return Oe.fromArray(t.map(a=>e.nodeFromJSON(a)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),wu("",e,n)}if(o){if(n.errorOnInvalidContent){let s=!1,a="";const l=new oO({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?ts.fromSchema(l).parseSlice(Ep(t),n.parseOptions):ts.fromSchema(l).parse(Ep(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const i=ts.fromSchema(e);return n.slice?i.parseSlice(Ep(t),n.parseOptions).content:i.parse(Ep(t),n.parseOptions)}return wu("",e,n)}function uX(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof Rn||o instanceof Bn))return;const i=t.mapping.maps[r];let s=0;i.forEach((a,l,u,f)=>{s===0&&(s=f)}),t.setSelection(st.near(t.doc.resolve(s),n))}const dX=t=>!("type"in t),fX=(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=x=>{i.emit("contentError",{editor:i,error:x,disableCollaboration:()=>{i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{wu(e,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(x){l(x)}try{a=wu(e,i.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!==null&&s!==void 0?s:i.options.enableContentCheck})}catch(x){return l(x),!1}let{from:f,to:p}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},g=!0,m=!0;if((dX(a)?a:[a]).forEach(x=>{x.check(),g=g?x.isText&&x.marks.length===0:!1,m=m?x.isBlock:!1}),f===p&&m){const{parent:x}=r.doc.resolve(f);x.isTextblock&&!x.type.spec.code&&!x.childCount&&(f-=1,p+=1)}let y;if(g){if(Array.isArray(e))y=e.map(x=>x.text||"").join("");else if(e instanceof Oe){let x="";e.forEach(w=>{w.text&&(x+=w.text)}),y=x}else typeof e=="object"&&e&&e.text?y=e.text:y=e;r.insertText(y,f,p)}else y=a,r.replaceWith(f,p,y);n.updateSelection&&uX(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:f,text:y}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:f,text:y})}return!0},pX=()=>({state:t,dispatch:e})=>pJ(t,e),hX=()=>({state:t,dispatch:e})=>hJ(t,e),gX=()=>({state:t,dispatch:e})=>ZM(t,e),mX=()=>({state:t,dispatch:e})=>nA(t,e),yX=()=>({state:t,dispatch:e,tr:n})=>{try{const r=op(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},bX=()=>({state:t,dispatch:e,tr:n})=>{try{const r=op(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},vX=()=>({state:t,dispatch:e})=>dJ(t,e),xX=()=>({state:t,dispatch:e})=>fJ(t,e);function wA(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function SX(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))kp()||wA()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}const wX=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=SX(t).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l==null||l.steps.forEach(u=>{const f=u.map(r.mapping);f&&o&&r.maybeStep(f)}),!0};function Cu(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?Dn(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,(p,g)=>{if(p.isText)return;const m=Math.max(r,g),b=Math.min(o,g+p.nodeSize);a.push({node:p,from:m,to:b})});const l=o-r,u=a.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>Tp(p.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((p,g)=>p+g.to-g.from,0)>=l}const CX=(t,e={})=>({state:n,dispatch:r})=>{const o=Dn(t,n.schema);return Cu(n,o,e)?gJ(n,r):!1},_X=()=>({state:t,dispatch:e})=>sA(t,e),TX=t=>({state:e,dispatch:n})=>{const r=Dn(t,e.schema);return EJ(r)(e,n)},kX=()=>({state:t,dispatch:e})=>oA(t,e);function _u(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function CA(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}const EX=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=_u(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(i=Dn(t,r.schema)),a==="mark"&&(s=Oo(t,r.schema)),o&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,f)=>{i&&i===u.type&&n.setNodeMarkup(f,void 0,CA(u.attrs,e)),s&&u.marks.length&&u.marks.forEach(p=>{s===p.type&&n.addMark(f,f+u.nodeSize,s.create(CA(p.attrs,e)))})})}),!0):!1},OX=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),MX=()=>({tr:t,dispatch:e})=>{if(e){const n=new Rr(t.doc);t.setSelection(n)}return!0},AX=()=>({state:t,dispatch:e})=>eA(t,e),IX=()=>({state:t,dispatch:e})=>rA(t,e),DX=()=>({state:t,dispatch:e})=>vJ(t,e),PX=()=>({state:t,dispatch:e})=>wJ(t,e),NX=()=>({state:t,dispatch:e})=>SJ(t,e);function Pb(t,e,n={},r={}){return wu(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const LX=(t,e=!1,n={},r={})=>({editor:o,tr:i,dispatch:s,commands:a})=>{var l,u;const{doc:f}=i;if(n.preserveWhitespace!=="full"){const p=Pb(t,o.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:o.options.enableContentCheck});return s&&i.replaceWith(0,f.content.size,p).setMeta("preventUpdate",!e),!0}return s&&i.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:f.content.size},t,{parseOptions:n,errorOnInvalidContent:(u=r.errorOnInvalidContent)!==null&&u!==void 0?u:o.options.enableContentCheck})};function _A(t,e){const n=Oo(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function $X(t,e){const n=new Uy(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function FX(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function RX(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function Nb(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Lb(t){return e=>Nb(e.$from,t)}function TA(t,e){const n={from:0,to:t.content.size};return gA(t,n,e)}function BX(t,e){const n=Dn(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,a=>{i.push(a)});const s=i.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function $b(t,e){const n=_u(typeof e=="string"?e:e.name,t.schema);return n==="node"?BX(t,e):n==="mark"?_A(t,e):{}}function VX(t,e=JSON.stringify){const n={};return t.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function zX(t){const e=VX(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function HX(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const u=e.slice(i).map(a,-1),f=e.slice(i).map(l),p=e.invert().map(u,-1),g=e.invert().map(f);r.push({oldRange:{from:p,to:g},newRange:{from:u,to:f}})})}),zX(r)}function Fb(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),s=Su(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}function Op(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function Rb(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?Oo(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>Tp(p.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:p,$to:g})=>{const m=p.pos,b=g.pos;t.doc.nodesBetween(m,b,(y,x)=>{if(!y.isText&&!y.marks.length)return;const w=Math.max(m,x),T=Math.min(b,x+y.nodeSize),_=T-w;s+=_,a.push(...y.marks.map(C=>({mark:C,from:w,to:T})))})}),s===0)return!1;const l=a.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>Tp(p.mark.attrs,n,{strict:!1})).reduce((p,g)=>p+g.to-g.from,0),u=a.filter(p=>i?p.mark.type!==i&&p.mark.type.excludes(i):!0).reduce((p,g)=>p+g.to-g.from,0);return(l>0?l+u:l)>=s}function jX(t,e,n={}){if(!e)return Cu(t,null,n)||Rb(t,null,n);const r=_u(e,t.schema);return r==="node"?Cu(t,e,n):r==="mark"?Rb(t,e,n):!1}function kA(t,e){const{nodeExtensions:n}=vp(e),r=n.find(s=>s.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=gt(Ye(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Mp(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!==null&&r!==void 0?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(Mp(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function EA(t){return t instanceof et}function OA(t,e,n){const o=t.state.doc.content.size,i=ki(e,0,o),s=ki(n,0,o),a=t.coordsAtPos(i),l=t.coordsAtPos(s,-1),u=Math.min(a.top,l.top),f=Math.max(a.bottom,l.bottom),p=Math.min(a.left,l.left),g=Math.max(a.right,l.right),m=g-p,b=f-u,w={top:u,bottom:f,left:p,right:g,width:m,height:b,x:p,y:u};return{...w,toJSON:()=>w}}function WX(t,e,n){var r;const{selection:o}=e;let i=null;if(bA(o)&&(i=o.$cursor),i){const a=(r=t.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:s}=o;return s.some(({$from:a,$to:l})=>{let u=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(f,p,g)=>{if(u)return!1;if(f.isInline){const m=!g||g.type.allowsMarkType(n),b=!!n.isInSet(f.marks)||!f.marks.some(y=>y.type.excludes(n));u=m&&b}return!u}),u})}const qX=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=Oo(t,r.schema);if(o)if(s){const u=_A(r,l);n.addStoredMark(l.create({...u,...e}))}else a.forEach(u=>{const f=u.$from.pos,p=u.$to.pos;r.doc.nodesBetween(f,p,(g,m)=>{const b=Math.max(m,f),y=Math.min(m+g.nodeSize,p);g.marks.find(w=>w.type===l)?g.marks.forEach(w=>{l===w.type&&n.addMark(b,y,l.create({...w.attrs,...e}))}):n.addMark(b,y,l.create(e))})});return WX(r,n,l)},UX=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),KX=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=Dn(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:a})=>cA(i,{...s,...e})(n)?!0:a.clearNodes()).command(({state:a})=>cA(i,{...s,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},GX=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=ki(t,0,r.content.size),i=et.create(r,o);e.setSelection(i)}return!0},YX=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,s=rt.atStart(r).from,a=rt.atEnd(r).to,l=ki(o,s,a),u=ki(i,s,a),f=rt.create(r,l,u);e.setSelection(f)}return!0},JX=t=>({state:e,dispatch:n})=>{const r=Dn(t,e.schema);return AJ(r)(e,n)};function MA(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}const XX=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:a,$to:l}=i,u=o.extensionManager.attributes,f=Op(u,a.node().type.name,a.node().attrs);if(i instanceof et&&i.node.isBlock)return!a.parentOffset||!Si(s,a.pos)?!1:(r&&(t&&MA(n,o.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const p=l.parentOffset===l.parent.content.size,g=a.depth===0?void 0:FX(a.node(-1).contentMatchAt(a.indexAfter(-1)));let m=p&&g?[{type:g,attrs:f}]:void 0,b=Si(e.doc,e.mapping.map(a.pos),1,m);if(!m&&!b&&Si(e.doc,e.mapping.map(a.pos),1,g?[{type:g}]:void 0)&&(b=!0,m=g?[{type:g,attrs:f}]:void 0),r){if(b&&(i instanceof rt&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,m),g&&!p&&!a.parentOffset&&a.parent.type!==g)){const y=e.mapping.map(a.before()),x=e.doc.resolve(y);a.node(-1).canReplaceWith(x.index(),x.index()+1,g)&&e.setNodeMarkup(e.mapping.map(a.before()),g)}t&&MA(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return b},ZX=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const a=Dn(t,r.schema),{$from:l,$to:u}=r.selection,f=r.selection.node;if(f&&f.isBlock||l.depth<2||!l.sameParent(u))return!1;const p=l.node(-1);if(p.type!==a)return!1;const g=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let w=Oe.empty;const T=l.index(-1)?1:l.index(-2)?2:3;for(let I=l.depth-T;I>=l.depth-3;I-=1)w=Oe.from(l.node(I).copy(w));const _=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,C={...Op(g,l.node().type.name,l.node().attrs),...e},E=((s=a.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(C))||void 0;w=w.append(Oe.from(a.createAndFill(null,E)||void 0));const M=l.before(l.depth-(T-1));n.replace(M,l.after(-_),new Re(w,4-T,0));let A=-1;n.doc.nodesBetween(M,n.doc.content.size,(I,L)=>{if(A>-1)return!1;I.isTextblock&&I.content.size===0&&(A=L+1)}),A>-1&&n.setSelection(rt.near(n.doc.resolve(A))),n.scrollIntoView()}return!0}const m=u.pos===l.end()?p.contentMatchAt(0).defaultType:null,b={...Op(g,p.type.name,p.attrs),...e},y={...Op(g,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,u.pos);const x=m?[{type:a,attrs:b},{type:m,attrs:y}]:[{type:a,attrs:b}];if(!Si(n.doc,l.pos,2))return!1;if(o){const{selection:w,storedMarks:T}=r,{splittableMarks:_}=i.extensionManager,C=T||w.$to.parentOffset&&w.$from.marks();if(n.split(l.pos,2,x).scrollIntoView(),!C||!o)return!0;const E=C.filter(M=>_.includes(M.type.name));n.ensureMarks(E)}return!0},Bb=(t,e)=>{const n=Lb(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&is(t.doc,n.pos)&&t.join(n.pos),!0},Vb=(t,e)=>{const n=Lb(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&is(t.doc,r)&&t.join(r),!0};var QX=Object.freeze({__proto__:null,blur:KJ,clearContent:GJ,clearNodes:YJ,command:JJ,createParagraphNear:XJ,cut:ZJ,deleteCurrentNode:QJ,deleteNode:eX,deleteRange:tX,deleteSelection:nX,enter:rX,exitCode:oX,extendMarkRange:iX,first:sX,focus:aX,forEach:lX,insertContent:cX,insertContentAt:fX,joinBackward:gX,joinDown:hX,joinForward:mX,joinItemBackward:yX,joinItemForward:bX,joinTextblockBackward:vX,joinTextblockForward:xX,joinUp:pX,keyboardShortcut:wX,lift:CX,liftEmptyBlock:_X,liftListItem:TX,newlineInCode:kX,resetAttributes:EX,scrollIntoView:OX,selectAll:MX,selectNodeBackward:AX,selectNodeForward:IX,selectParentNode:DX,selectTextblockEnd:PX,selectTextblockStart:NX,setContent:LX,setMark:qX,setMeta:UX,setNode:KX,setNodeSelection:GX,setTextSelection:YX,sinkListItem:JX,splitBlock:XX,splitListItem:ZX,toggleList:(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:l,commands:u,can:f})=>{const{extensions:p,splittableMarks:g}=o.extensionManager,m=Dn(t,s.schema),b=Dn(e,s.schema),{selection:y,storedMarks:x}=s,{$from:w,$to:T}=y,_=w.blockRange(T),C=x||y.$to.parentOffset&&y.$from.marks();if(!_)return!1;const E=Lb(M=>kA(M.type.name,p))(y);if(_.depth>=1&&E&&_.depth-E.depth<=1){if(E.node.type===m)return u.liftListItem(b);if(kA(E.node.type.name,p)&&m.validContent(E.node.content)&&a)return l().command(()=>(i.setNodeMarkup(E.pos,m),!0)).command(()=>Bb(i,m)).command(()=>Vb(i,m)).run()}return!n||!C||!a?l().command(()=>f().wrapInList(m,r)?!0:u.clearNodes()).wrapInList(m,r).command(()=>Bb(i,m)).command(()=>Vb(i,m)).run():l().command(()=>{const M=f().wrapInList(m,r),A=C.filter(I=>g.includes(I.type.name));return i.ensureMarks(A),M?!0:u.clearNodes()}).wrapInList(m,r).command(()=>Bb(i,m)).command(()=>Vb(i,m)).run()},toggleMark:(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Oo(t,r.schema);return Rb(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},toggleNode:(t,e,n={})=>({state:r,commands:o})=>{const i=Dn(t,r.schema),s=Dn(e,r.schema),a=Cu(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?o.setNode(s,l):o.setNode(i,{...l,...n})},toggleWrap:(t,e={})=>({state:n,commands:r})=>{const o=Dn(t,n.schema);return Cu(n,o,e)?r.lift(o):r.wrapIn(o,e)},undoInputRule:()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const s=t.tr,a=i.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(i.text){const l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else s.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},unsetMark:(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=Oo(t,r.schema),{$from:u,empty:f,ranges:p}=a;if(!o)return!0;if(f&&s){let{from:g,to:m}=a;const b=(i=u.marks().find(x=>x.type===l))===null||i===void 0?void 0:i.attrs,y=Su(u,l,b);y&&(g=y.from,m=y.to),n.removeMark(g,m,l)}else p.forEach(g=>{n.removeMark(g.$from.pos,g.$to.pos,l)});return n.removeStoredMark(l),!0},updateAttributes:(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=_u(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(i=Dn(t,r.schema)),a==="mark"&&(s=Oo(t,r.schema)),o&&n.selection.ranges.forEach(l=>{const u=l.$from.pos,f=l.$to.pos;let p,g,m,b;n.selection.empty?r.doc.nodesBetween(u,f,(y,x)=>{i&&i===y.type&&(m=Math.max(x,u),b=Math.min(x+y.nodeSize,f),p=x,g=y)}):r.doc.nodesBetween(u,f,(y,x)=>{x<u&&i&&i===y.type&&(m=Math.max(x,u),b=Math.min(x+y.nodeSize,f),p=x,g=y),x>=u&&x<=f&&(i&&i===y.type&&n.setNodeMarkup(x,void 0,{...y.attrs,...e}),s&&y.marks.length&&y.marks.forEach(w=>{if(s===w.type){const T=Math.max(x,u),_=Math.min(x+y.nodeSize,f);n.addMark(T,_,s.create({...w.attrs,...e}))}}))}),g&&(p!==void 0&&n.setNodeMarkup(p,void 0,{...g.attrs,...e}),s&&g.marks.length&&g.marks.forEach(y=>{s===y.type&&n.addMark(m,b,s.create({...y.attrs,...e}))}))}),!0):!1},wrapIn:(t,e={})=>({state:n,dispatch:r})=>{const o=Dn(t,n.schema);return CJ(o,e)(n,r)},wrapInList:(t,e={})=>({state:n,dispatch:r})=>{const o=Dn(t,n.schema);return _J(o,e)(n,r)}});const eZ=gn.create({name:"commands",addCommands(){return{...QX}}}),tZ=gn.create({name:"drop",addProseMirrorPlugins(){return[new ln({key:new An("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),nZ=gn.create({name:"editable",addProseMirrorPlugins(){return[new ln({key:new An("editable"),props:{editable:()=>this.editor.options.editable}})]}}),rZ=new An("focusEvents"),oZ=gn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new ln({key:rZ,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),iZ=gn.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:f,$anchor:p}=l,{pos:g,parent:m}=p,b=p.parent.isTextblock&&g>0?a.doc.resolve(g-1):p,y=b.parent.type.spec.isolating,x=p.pos-p.parentOffset,w=y&&b.parent.childCount===1?x===p.pos:st.atStart(u).from===g;return!f||!m.type.isTextblock||m.textContent.length||!w||w&&p.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return kp()||wA()?i:o},addProseMirrorPlugins(){return[new ln({key:new An("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(y=>y.getMeta("composition")))return;const r=t.some(y=>y.docChanged)&&!e.doc.eq(n.doc),o=t.some(y=>y.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:s,to:a}=e.selection,l=st.atStart(e.doc).from,u=st.atEnd(e.doc).to;if(i||!(s===l&&a===u)||!Mp(n.doc))return;const g=n.tr,m=yp({state:n,transaction:g}),{commands:b}=new bp({editor:this.editor,state:m});if(b.clearNodes(),!!g.steps.length)return g}})]}}),sZ=gn.create({name:"paste",addProseMirrorPlugins(){return[new ln({key:new An("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),aZ=gn.create({name:"tabindex",addProseMirrorPlugins(){return[new ln({key:new An("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class da{get name(){return this.node.type.name}constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=o}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new da(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new da(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new da(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(s);if(!o&&a.depth<=this.depth)return;const l=new da(a,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),e.push(new da(a,this.editor,o,o?n:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const i=o.node.attrs,s=Object.keys(n);for(let a=0;a<s.length;a+=1){const l=s[a];if(i[l]!==n[l])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(n);return this.children.forEach(s=>{r&&o.length>0||(s.node.type.name===e&&i.every(l=>n[l]===s.node.attrs[l])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(e,n,r))))}),o}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}}const lZ=`.ProseMirror {
255
+ position: relative;
256
+ }
257
+
258
+ .ProseMirror {
259
+ word-wrap: break-word;
260
+ white-space: pre-wrap;
261
+ white-space: break-spaces;
262
+ -webkit-font-variant-ligatures: none;
263
+ font-variant-ligatures: none;
264
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
265
+ }
266
+
267
+ .ProseMirror [contenteditable="false"] {
268
+ white-space: normal;
269
+ }
270
+
271
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
272
+ white-space: pre-wrap;
273
+ }
274
+
275
+ .ProseMirror pre {
276
+ white-space: pre-wrap;
277
+ }
278
+
279
+ img.ProseMirror-separator {
280
+ display: inline !important;
281
+ border: none !important;
282
+ margin: 0 !important;
283
+ width: 0 !important;
284
+ height: 0 !important;
285
+ }
286
+
287
+ .ProseMirror-gapcursor {
288
+ display: none;
289
+ pointer-events: none;
290
+ position: absolute;
291
+ margin: 0;
292
+ }
293
+
294
+ .ProseMirror-gapcursor:after {
295
+ content: "";
296
+ display: block;
297
+ position: absolute;
298
+ top: -2px;
299
+ width: 20px;
300
+ border-top: 1px solid black;
301
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
302
+ }
303
+
304
+ @keyframes ProseMirror-cursor-blink {
305
+ to {
306
+ visibility: hidden;
307
+ }
308
+ }
309
+
310
+ .ProseMirror-hideselection *::selection {
311
+ background: transparent;
312
+ }
313
+
314
+ .ProseMirror-hideselection *::-moz-selection {
315
+ background: transparent;
316
+ }
317
+
318
+ .ProseMirror-hideselection * {
319
+ caret-color: transparent;
320
+ }
321
+
322
+ .ProseMirror-focused .ProseMirror-gapcursor {
323
+ display: block;
324
+ }
325
+
326
+ .tippy-box[data-animation=fade][data-state=hidden] {
327
+ opacity: 0
328
+ }`;function cZ(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}class uZ extends IJ{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:o})=>this.options.onDrop(n,r,o)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=cZ(lZ,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,n){const r=dA(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(e){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(e).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;r=r.filter(a=>!a.key.startsWith(s))}),n.length===r.length)return;const o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var e,n;const o=[...this.options.enableCoreExtensions?[nZ,UJ.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),eZ,oZ,iZ,aZ,tZ,sZ].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new _l(o,this)}createCommandManager(){this.commandManager=new bp({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let n;try{n=Pb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),n=Pb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=vA(n,this.options.autofocus);this.view=new qM(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:ml.create({doc:n,selection:r||void 0})});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return $b(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,o=typeof e=="string"?n:e;return jX(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ab(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
329
+
330
+ `,textSerializers:r={}}=e||{};return TA(this.state.doc,{blockSeparator:n,textSerializers:{...Db(this.schema),...r}})}get isEmpty(){return Mp(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new da(n,this)}get $doc(){return this.$pos(0)}}function fa(t){return new xu({find:t.find,handler:({state:e,range:n,match:r})=>{const o=gt(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),u=n.from+a.indexOf(s),f=u+s.length;if(Fb(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(y=>y===t.type&&y!==m.mark.type)).filter(m=>m.to>u).length)return null;f<n.to&&i.delete(f,n.to),u>n.from&&i.delete(n.from+l,u);const g=n.from+l+s.length;i.addMark(n.from+l,g,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function AA(t){return new xu({find:t.find,handler:({state:e,range:n,match:r})=>{const o=gt(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from;let a=n.to;const l=t.type.create(o);if(r[1]){const u=r[0].lastIndexOf(r[1]);let f=s+u;f>a?f=a:a=f+r[1].length;const p=r[0][r[0].length-1];i.insertText(p,s+r[0].length-1),i.replaceWith(f,a,l)}else if(r[0]){const u=t.type.isInline?s:s-1;i.insert(u,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a))}i.scrollIntoView()}})}function zb(t){return new xu({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=gt(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}function Tl(t){return new xu({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=gt(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),u=l&&jy(l,t.type,i);if(!u)return null;if(s.wrap(l,u),t.keepMarks&&t.editor){const{selection:p,storedMarks:g}=e,{splittableMarks:m}=t.editor.extensionManager,b=g||p.$to.parentOffset&&p.$from.marks();if(b){const y=b.filter(x=>m.includes(x.type.name));s.ensureMarks(y)}}if(t.keepAttributes){const p=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(p,i).run()}const f=s.doc.resolve(n.from-1).nodeBefore;f&&f.type===t.type&&is(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,f))&&s.join(n.from-1)}})}class cn{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=gt(Ye(this,"addOptions",{name:this.name}))),this.storage=gt(Ye(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new cn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Cp(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new cn(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=gt(Ye(n,"addOptions",{name:n.name})),n.storage=gt(Ye(n,"addStorage",{name:n.name,options:n.options})),n}}class dZ{constructor(e,n,r){this.isDragging=!1,this.component=e,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var n,r,o,i,s,a,l;const{view:u}=this.editor,f=e.target,p=f.nodeType===3?(n=f.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):f.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(f)||!p)return;let g=0,m=0;if(this.dom!==p){const T=this.dom.getBoundingClientRect(),_=p.getBoundingClientRect(),C=(o=e.offsetX)!==null&&o!==void 0?o:(i=e.nativeEvent)===null||i===void 0?void 0:i.offsetX,E=(s=e.offsetY)!==null&&s!==void 0?s:(a=e.nativeEvent)===null||a===void 0?void 0:a.offsetY;g=_.x-T.x+C,m=_.y-T.y+E}const b=this.dom.cloneNode(!0);(l=e.dataTransfer)===null||l===void 0||l.setDragImage(b,g,m);const y=this.getPos();if(typeof y!="number")return;const x=et.create(u.state.doc,y),w=u.state.tr.setSelection(x);u.dispatch(w)}stopEvent(e){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const r=e.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const i=e.type.startsWith("drag"),s=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!s&&!i)return!0;const{isEditable:l}=this.editor,{isDragging:u}=this,f=!!this.node.type.spec.draggable,p=et.isSelectable(this.node),g=e.type==="copy",m=e.type==="paste",b=e.type==="cut",y=e.type==="mousedown";if(!f&&p&&i&&e.target===this.dom&&e.preventDefault(),f&&i&&!u&&e.target===this.dom)return e.preventDefault(),!1;if(f&&l&&!u&&y){const x=r.closest("[data-drag-handle]");x&&(this.dom===x||this.dom.contains(x))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(u||s||g||m||b||y&&p)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(kp()||xA())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return typeof r!="number"?!1:(n.setNodeMarkup(r,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const n=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:n})}}function gs(t){return new VJ({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=gt(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let u=n.to;if(a){const f=l.search(/\S/),p=n.from+l.indexOf(a),g=p+a.length;if(Fb(n.from,n.to,e.doc).filter(b=>b.mark.type.excluded.find(x=>x===t.type&&x!==b.mark.type)).filter(b=>b.to>p).length)return null;g<n.to&&s.delete(g,n.to),p>n.from&&s.delete(n.from+f,p),u=n.from+f+a.length,s.addMark(n.from+f,u,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function fZ(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof et){const i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let o=r.depth;for(;o>=0;){const i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(e))return!0;o-=1}return!1}function pZ(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}const IA=Object.fromEntries?Object.fromEntries:t=>{if(!t||!t[Symbol.iterator])throw new Error("Object.fromEntries() requires a single iterable argument");const e={};return Object.keys(t).forEach(n=>{const[r,o]=t[n];e[r]=o}),e};function ms(t){return Object.keys(t)}function pa(t,e){if(!t)throw new Error(e)}function Hb(t,e){return e}const jb=t=>{const e=t.length;let n=0,r="";for(;n<e;n++){const o=t[n];if(o==null)continue;let i;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=jb(o);else{pa(!Hb(o,!1)),process.env.NODE_ENV!=="production"&&o.styles!==void 0&&o.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),i="";for(const s in o)o[s]&&s&&(i&&(i+=" "),i+=s)}break}default:i=o}i&&(r&&(r+=" "),r+=i)}return r};function hZ(t,e,n){var r="";return n.split(" ").forEach(function(o){t[o]!==void 0?e.push(t[o]+";"):o&&(r+=o+" ")}),r}var gZ=function(e,n,r){var o=e.key+"-"+n.name;e.registered[o]===void 0&&(e.registered[o]=n.styles)},mZ=function(e,n,r){gZ(e,n);var o=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var i=n;do e.insert(n===i?"."+o:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};function yZ(t,e){var n;const r=q.useRef();return(!r.current||e.length!==((n=r.current.prevDeps)===null||n===void 0?void 0:n.length)||r.current.prevDeps.map((o,i)=>o===e[i]).indexOf(!1)>=0)&&(r.current={v:t(),prevDeps:[...e]}),r.current.v}function bZ(t){return t instanceof Object&&!("styles"in t)&&!("length"in t)&&!("__emotion_styles"in t)}const{createCssAndCx:vZ}=(()=>{function t(n,r,o){const i=[],s=hZ(n,i,o);return i.length<2?o:s+r(i)}function e(n){const{cache:r}=n,o=(...s)=>{const a=jC(s,r.registered);mZ(r,a);const l=`${r.key}-${a.name}`;e:{const u=s[0];if(!bZ(u))break e;PA.saveClassNameCSSObjectMapping(r,l,u)}return l};return{css:o,cx:(...s)=>{const a=jb(s),l=PA.fixClassName(r,a,o);return t(r.registered,o,l)}}}return{createCssAndCx:e}})();function DA(t){const{useCache:e}=t;function n(){const r=e(),{css:o,cx:i}=yZ(()=>vZ({cache:r}),[r]);return{css:o,cx:i}}return{useCssAndCx:n}}const PA=(()=>{const t=new WeakMap;return{saveClassNameCSSObjectMapping:(e,n,r)=>{let o=t.get(e);o===void 0&&(o=new Map,t.set(e,o)),o.set(n,r)},fixClassName:(()=>{function e(n){let r=!1;return n.map(([o,i])=>{if(i===void 0)return o;let s;if(r)s={"&&":i};else{s=o;for(const a in i)if(a.startsWith("@media")){r=!0;break}}return s})}return(n,r,o)=>{const i=t.get(n);return jb(e(r.split(" ").map(s=>[s,i==null?void 0:i.get(s)])).map(s=>typeof s=="string"?s:o(s)))}})()}})();function ys(t){if(!(t instanceof Object)||typeof t=="function")return t;const e=[];for(const n in t){const r=t[n],o=typeof r;if(!(o==="string"||o==="number"&&!isNaN(r)||o==="boolean"||r===void 0||r===null))return t;e.push(`${n}:${o}_${r}`)}return"xSqLiJdLMd9s"+e.join("|")}function Wb(t,e,n){if(!(e instanceof Object))return t;const r={};return ms(t).forEach(o=>r[o]=n(t[o],e[o])),ms(e).forEach(o=>{if(o in t)return;const i=e[o];typeof i=="string"&&(r[o]=i)}),r}const NA=({classes:t,theme:e,muiStyleOverridesParams:n,css:r,cx:o,name:i})=>{var s,a;e:{if(i==="makeStyle no name"){i=void 0;break e}if(n!==void 0&&i===void 0)throw new Error("To use muiStyleOverridesParams, you must specify a name using .withName('MyComponent')")}let l;try{l=i===void 0?void 0:((a=(s=e.components)===null||s===void 0?void 0:s[i])===null||a===void 0?void 0:a.styleOverrides)||void 0}catch{}const u=q.useMemo(()=>{if(l===void 0)return;const f={};for(const p in l){const g=l[p];g instanceof Object&&(f[p]=r(typeof g=="function"?g({theme:e,ownerState:n==null?void 0:n.ownerState,...n==null?void 0:n.props}):g))}return f},[l,ys(n==null?void 0:n.props),ys(n==null?void 0:n.ownerState),r]);return t=q.useMemo(()=>Wb(t,u,o),[t,u,o]),{classes:t}},xZ=xo.__unsafe_useEmotionCache;let SZ=0;function LA(t){const{useTheme:e,cache:n}=t,{useCache:r}=$A({cacheProvidedAtInception:n}),{useCssAndCx:o}=DA({useCache:r});function i(a){const{name:l,uniqId:u=`${SZ++}`}=a??{},f=typeof l!="object"?l:Object.keys(l)[0];return function(p){const g=typeof p=="function"?p:()=>p;return function(b,y){const x=e();let{css:w,cx:T}=o();const _=r();let C=q.useMemo(()=>{const E={},M=typeof Proxy<"u"&&new Proxy({},{get:(L,O)=>(typeof O=="symbol"&&pa(!1),E[O]=`${_.key}-${u}${f!==void 0?`-${f}`:""}-${O}-ref`)}),A=g(x,b,M||{}),I=IA(ms(A).map(L=>{const O=A[L];return O.label||(O.label=`${f!==void 0?`${f}-`:""}${L}`),[L,`${w(O)}${Hb(L,L in E)?` ${E[L]}`:""}`]}));return ms(E).forEach(L=>{L in I||(I[L]=E[L])}),I},[_,w,T,x,ys(b)]);{const E=y==null?void 0:y.props.classes;C=q.useMemo(()=>Wb(C,E,T),[C,ys(E),T])}{const E=NA({classes:C,css:w,cx:T,name:f??"makeStyle no name",muiStyleOverridesParams:y,theme:x});E.classes!==void 0&&(C=E.classes),E.css!==void 0&&(w=E.css),E.cx!==void 0&&(T=E.cx)}return{classes:C,theme:x,css:w,cx:T}}}}function s(){const a=e(),{css:l,cx:u}=o();return{theme:a,css:l,cx:u}}return{makeStyles:i,useStyles:s}}const wZ=q.createContext(void 0),{createUseCache:$A}=(()=>{function t(){return q.useContext(wZ)}function e(n){const{cacheProvidedAtInception:r}=n;function o(){var i;const s=xZ(),a=t(),l=(i=r??a)!==null&&i!==void 0?i:s;if(l===null)throw new Error(["In order to get SSR working with tss-react you need to explicitly provide an Emotion cache.","MUI users be aware: This is not an error strictly related to tss-react, with or without tss-react,","MUI needs an Emotion cache to be provided for SSR to work.","Here is the MUI documentation related to SSR setup: https://mui.com/material-ui/guides/server-rendering/","TSS provides helper that makes the process of setting up SSR easier: https://docs.tss-react.dev/ssr"].join(`
331
+ `));return l}return{useCache:o}}return{createUseCache:e}})();function FA(t){return t.charAt(0).toUpperCase()+t.slice(1)}function CZ(t){const{useTheme:e,cache:n}=t,{makeStyles:r}=LA({useTheme:e,cache:n});function o(i,s,a){const l=typeof i=="string"?(()=>{const m=i,b=function({children:y,...x}){return q.createElement(m,x,y)};return Object.defineProperty(b,"name",{value:FA(m)}),b})():i,u=(()=>{{const{name:b}=a??{};if(b!==void 0)return typeof b!="object"?b:Object.keys(b)[0]}let m;e:{const b=l.displayName;if(typeof b!="string"||b==="")break e;m=b}e:{if(m!==void 0)break e;const b=l.name;if(typeof b!="string"||b==="")break e;m=b}if(m!==void 0)return m=m.replace(/\$/g,"usd"),m=m.replace(/\(/g,"_").replace(/\)/g,"_"),m=m.replace(/[^a-zA-Z0-9-_]/g,"_"),m})(),f=r({...a,name:u})(typeof s=="function"?(m,b,y)=>VA(s(m,b,y)):VA(s));function p(m){for(const b in m)if(b!=="root")return!0;return!1}const g=q.forwardRef(function(m,b){const{className:y,classes:x,...w}=m,{classes:T,cx:_}=f(m,{props:m}),C=_(T.root,y);return RA.set(T,{...T,root:C}),q.createElement(l,{ref:b,className:p(T)?y:C,...typeof i=="string"?{}:{classes:T},...w})});return u!==void 0&&(g.displayName=`${FA(u)}WithStyles`,Object.defineProperty(g,"name",{value:g.displayName})),g}return o.getClasses=_Z,{withStyles:o}}const RA=new WeakMap,BA="getClasses should only be used in conjunction with withStyles";function _Z(t){const e=t.classes;if(e===void 0)throw new Error(BA);const n=RA.get(e);if(n===void 0)throw new Error(BA);return n}function VA(t){const e={},n={};return Object.keys(t).forEach(r=>(r.startsWith("@media")?n:e)[r]=t[r]),Object.keys(n).forEach(r=>{const o=n[r];Object.keys(o).forEach(i=>{var s;return e[i]={...(s=e[i])!==null&&s!==void 0?s:{},[r]:o[i]}})}),e}const TZ=!(typeof document=="object"&&typeof(document==null?void 0:document.getElementById)=="function")&&!(typeof jest<"u")&&!(typeof mocha<"u")&&!(typeof __vitest_worker__<"u");function zA(t){HA=0,bs.splice(0,bs.length);const{useContext:e,usePlugin:n,cache:r}=t,{useCache:o}=$A({cacheProvidedAtInception:r}),{useCssAndCx:i}=DA({useCache:o});return{tss:Ap({useContext:e,useCache:o,useCssAndCx:i,usePlugin:n??(({classes:l,cx:u,css:f})=>({classes:l,cx:u,css:f})),name:void 0,doesUseNestedSelectors:!1})}}let HA=0;const bs=[];function Ap(t){const{useContext:e,useCache:n,useCssAndCx:r,usePlugin:o,name:i,doesUseNestedSelectors:s}=t;return{withParams:()=>Ap({...t}),withName:a=>Ap({...t,name:typeof a!="object"?a:Object.keys(a)[0]}),withNestedSelectors:()=>Ap({...t,doesUseNestedSelectors:!0}),create:a=>{const l=`x${HA++}`;if(i!==void 0)for(;;){const f=bs.find(p=>p.name===i);if(f===void 0)break;bs.splice(bs.indexOf(f),1)}const u=typeof a=="function"?a:()=>a;return function(p){var g,m,b;const{classesOverrides:y,...x}=p??{},w=e(),{css:T,cx:_}=r(),C=n(),E=()=>{const I={},L=u({...p,...w,...s?{classes:typeof Proxy>"u"?{}:new Proxy({},{get:(D,F)=>{if(typeof F=="symbol"&&pa(!1),TZ&&i===void 0)throw new Error(["tss-react: In SSR setups, in order to use nested selectors, you must also give a unique name to the useStyle function.",'Solution: Use tss.withName("ComponentName").withNestedSelectors<...>()... to set a name.'].join(`
332
+ `));e:{if(i===void 0)break e;let V=bs.find(z=>z.name===i&&z.idOfUseStyles===l);V===void 0&&(V={name:i,idOfUseStyles:l,nestedSelectorRuleNames:new Set},bs.push(V)),V.nestedSelectorRuleNames.add(F)}e:{if(i===void 0||!(bs.find(z=>z.name===i&&z.idOfUseStyles!==l&&z.nestedSelectorRuleNames.has(F))!==void 0))break e;throw new Error([`tss-react: There are in your codebase two different useStyles named "${i}" that`,`both use use the nested selector ${F}.
333
+ `,`This may lead to CSS class name collisions, causing nested selectors to target elements outside of the intended scope.
334
+ `,`Solution: Ensure each useStyles using nested selectors has a unique name.
335
+ `,'Use: tss.withName("UniqueName").withNestedSelectors<...>()...'].join(" "))}return I[F]=`${C.key}-${i!==void 0?i:l}-${F}-ref`}})}:{}});let O=IA(ms(L).map(D=>{const F=L[D];return F.label||(F.label=`${i!==void 0?`${i}-`:""}${D}`),[D,`${T(F)}${Hb(D,D in I)?` ${I[D]}`:""}`]}));return ms(I).forEach(D=>{D in O||(O[D]=I[D])}),O=Wb(O,y,_),O},M=kZ({cache:C,cssObjectByRuleNameOrGetCssObjectByRuleName:a,classesOverridesRef:ys(y),paramsAndPluginParamsRef:ys(x),idOfUseStyles:l,context:w,getClasses:E}),A=o({classes:M,css:T,cx:_,idOfUseStyles:l,name:i,...w,...x});return{classes:(g=A.classes)!==null&&g!==void 0?g:M,css:(m=A.css)!==null&&m!==void 0?m:T,cx:(b=A.cx)!==null&&b!==void 0?b:_,...w}}}}}const Ip=new WeakMap;function kZ(t){const{cache:e,cssObjectByRuleNameOrGetCssObjectByRuleName:n,classesOverridesRef:r,paramsAndPluginParamsRef:o,idOfUseStyles:i,context:s,getClasses:a}=t;e:{const u=Ip.get(e);if(u===void 0)break e;const f=u.get(n);if(f===void 0)break e;const p=f.get(r);if(p===void 0)break e;const g=p.get(o);if(g===void 0)break e;const m=g.find(({context:b})=>{if(b===s)return!0;if(ms(b).length!==ms(s).length)return!1;for(const y in b)if(ys(b[y])!==ys(s[y]))return!1;return!0});if(m===void 0)break e;if((m==null?void 0:m.idOfUseStyles)!==i){g.splice(g.indexOf(m),1);break e}return m.result}const l=a();{Ip.has(e)||Ip.set(e,new WeakMap);const u=Ip.get(e);pa(u!==void 0),u.has(n)||u.set(n,new Map);const f=u.get(n);pa(f!==void 0),f.has(r)||(f.size>200&&f.clear(),f.set(r,new Map));const p=f.get(r);if(pa(p!==void 0),!p.has(o)){e:{const m=typeof o=="string"?257:5;if(p.size<m)break e;p.clear()}p.set(o,[])}let g=p.get(o);pa(g!==void 0),g.length>5&&(g=[]),g.push({idOfUseStyles:i,context:s,result:l})}return l}function EZ(t){return{...LA(t),...CZ(t)}}const{tss:OZ}=zA({useContext:()=>({})});OZ.create({});const{makeStyles:en}=EZ({useTheme:fi}),{tss:MZ}=zA({useContext:function(){return{theme:fi()}},usePlugin:NA});MZ.create({});var qb,jA;function WA(){if(jA)return qb;jA=1;function t(e,n){for(var r=-1,o=e==null?0:e.length,i=Array(o);++r<o;)i[r]=n(e[r],r,e);return i}return qb=t,qb}var Ub,qA;function AZ(){if(qA)return Ub;qA=1;function t(){this.__data__=[],this.size=0}return Ub=t,Ub}var Kb,UA;function KA(){if(UA)return Kb;UA=1;function t(e,n){return e===n||e!==e&&n!==n}return Kb=t,Kb}var Gb,GA;function Dp(){if(GA)return Gb;GA=1;var t=KA();function e(n,r){for(var o=n.length;o--;)if(t(n[o][0],r))return o;return-1}return Gb=e,Gb}var Yb,YA;function IZ(){if(YA)return Yb;YA=1;var t=Dp(),e=Array.prototype,n=e.splice;function r(o){var i=this.__data__,s=t(i,o);if(s<0)return!1;var a=i.length-1;return s==a?i.pop():n.call(i,s,1),--this.size,!0}return Yb=r,Yb}var Jb,JA;function DZ(){if(JA)return Jb;JA=1;var t=Dp();function e(n){var r=this.__data__,o=t(r,n);return o<0?void 0:r[o][1]}return Jb=e,Jb}var Xb,XA;function PZ(){if(XA)return Xb;XA=1;var t=Dp();function e(n){return t(this.__data__,n)>-1}return Xb=e,Xb}var Zb,ZA;function NZ(){if(ZA)return Zb;ZA=1;var t=Dp();function e(n,r){var o=this.__data__,i=t(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}return Zb=e,Zb}var Qb,QA;function Pp(){if(QA)return Qb;QA=1;var t=AZ(),e=IZ(),n=DZ(),r=PZ(),o=NZ();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Qb=i,Qb}var ev,e2;function LZ(){if(e2)return ev;e2=1;var t=Pp();function e(){this.__data__=new t,this.size=0}return ev=e,ev}var tv,t2;function $Z(){if(t2)return tv;t2=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return tv=t,tv}var nv,n2;function FZ(){if(n2)return nv;n2=1;function t(e){return this.__data__.get(e)}return nv=t,nv}var rv,r2;function RZ(){if(r2)return rv;r2=1;function t(e){return this.__data__.has(e)}return rv=t,rv}var ov,o2;function i2(){if(o2)return ov;o2=1;var t=Bs(),e=pi(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function s(a){if(!e(a))return!1;var l=t(a);return l==r||l==o||l==n||l==i}return ov=s,ov}var iv,s2;function BZ(){if(s2)return iv;s2=1;var t=_o(),e=t["__core-js_shared__"];return iv=e,iv}var sv,a2;function VZ(){if(a2)return sv;a2=1;var t=BZ(),e=function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!e&&e in r}return sv=n,sv}var av,l2;function c2(){if(l2)return av;l2=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return av=n,av}var lv,u2;function zZ(){if(u2)return lv;u2=1;var t=i2(),e=VZ(),n=pi(),r=c2(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,l=s.toString,u=a.hasOwnProperty,f=RegExp("^"+l.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(g){if(!n(g)||e(g))return!1;var m=t(g)?f:i;return m.test(r(g))}return lv=p,lv}var cv,d2;function HZ(){if(d2)return cv;d2=1;function t(e,n){return e==null?void 0:e[n]}return cv=t,cv}var uv,f2;function ha(){if(f2)return uv;f2=1;var t=zZ(),e=HZ();function n(r,o){var i=e(r,o);return t(i)?i:void 0}return uv=n,uv}var dv,p2;function fv(){if(p2)return dv;p2=1;var t=ha(),e=_o(),n=t(e,"Map");return dv=n,dv}var pv,h2;function Np(){if(h2)return pv;h2=1;var t=ha(),e=t(Object,"create");return pv=e,pv}var hv,g2;function jZ(){if(g2)return hv;g2=1;var t=Np();function e(){this.__data__=t?t(null):{},this.size=0}return hv=e,hv}var gv,m2;function WZ(){if(m2)return gv;m2=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return gv=t,gv}var mv,y2;function qZ(){if(y2)return mv;y2=1;var t=Np(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(i){var s=this.__data__;if(t){var a=s[i];return a===e?void 0:a}return r.call(s,i)?s[i]:void 0}return mv=o,mv}var yv,b2;function UZ(){if(b2)return yv;b2=1;var t=Np(),e=Object.prototype,n=e.hasOwnProperty;function r(o){var i=this.__data__;return t?i[o]!==void 0:n.call(i,o)}return yv=r,yv}var bv,v2;function KZ(){if(v2)return bv;v2=1;var t=Np(),e="__lodash_hash_undefined__";function n(r,o){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=t&&o===void 0?e:o,this}return bv=n,bv}var vv,x2;function GZ(){if(x2)return vv;x2=1;var t=jZ(),e=WZ(),n=qZ(),r=UZ(),o=KZ();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,vv=i,vv}var xv,S2;function YZ(){if(S2)return xv;S2=1;var t=GZ(),e=Pp(),n=fv();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return xv=r,xv}var Sv,w2;function JZ(){if(w2)return Sv;w2=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return Sv=t,Sv}var wv,C2;function Lp(){if(C2)return wv;C2=1;var t=JZ();function e(n,r){var o=n.__data__;return t(r)?o[typeof r=="string"?"string":"hash"]:o.map}return wv=e,wv}var Cv,_2;function XZ(){if(_2)return Cv;_2=1;var t=Lp();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return Cv=e,Cv}var _v,T2;function ZZ(){if(T2)return _v;T2=1;var t=Lp();function e(n){return t(this,n).get(n)}return _v=e,_v}var Tv,k2;function QZ(){if(k2)return Tv;k2=1;var t=Lp();function e(n){return t(this,n).has(n)}return Tv=e,Tv}var kv,E2;function eQ(){if(E2)return kv;E2=1;var t=Lp();function e(n,r){var o=t(this,n),i=o.size;return o.set(n,r),this.size+=o.size==i?0:1,this}return kv=e,kv}var Ev,O2;function M2(){if(O2)return Ev;O2=1;var t=YZ(),e=XZ(),n=ZZ(),r=QZ(),o=eQ();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Ev=i,Ev}var Ov,A2;function tQ(){if(A2)return Ov;A2=1;var t=Pp(),e=fv(),n=M2(),r=200;function o(i,s){var a=this.__data__;if(a instanceof t){var l=a.__data__;if(!e||l.length<r-1)return l.push([i,s]),this.size=++a.size,this;a=this.__data__=new n(l)}return a.set(i,s),this.size=a.size,this}return Ov=o,Ov}var Mv,I2;function nQ(){if(I2)return Mv;I2=1;var t=Pp(),e=LZ(),n=$Z(),r=FZ(),o=RZ(),i=tQ();function s(a){var l=this.__data__=new t(a);this.size=l.size}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=o,s.prototype.set=i,Mv=s,Mv}var Av,D2;function rQ(){if(D2)return Av;D2=1;function t(e,n){for(var r=-1,o=e==null?0:e.length;++r<o&&n(e[r],r,e)!==!1;);return e}return Av=t,Av}var Iv,P2;function N2(){if(P2)return Iv;P2=1;var t=ha(),e=function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}}();return Iv=e,Iv}var Dv,L2;function $2(){if(L2)return Dv;L2=1;var t=N2();function e(n,r,o){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return Dv=e,Dv}var Pv,F2;function R2(){if(F2)return Pv;F2=1;var t=$2(),e=KA(),n=Object.prototype,r=n.hasOwnProperty;function o(i,s,a){var l=i[s];(!(r.call(i,s)&&e(l,a))||a===void 0&&!(s in i))&&t(i,s,a)}return Pv=o,Pv}var Nv,B2;function Tu(){if(B2)return Nv;B2=1;var t=R2(),e=$2();function n(r,o,i,s){var a=!i;i||(i={});for(var l=-1,u=o.length;++l<u;){var f=o[l],p=s?s(i[f],r[f],f,i,r):void 0;p===void 0&&(p=r[f]),a?e(i,f,p):t(i,f,p)}return i}return Nv=n,Nv}var Lv,V2;function oQ(){if(V2)return Lv;V2=1;function t(e,n){for(var r=-1,o=Array(e);++r<e;)o[r]=n(r);return o}return Lv=t,Lv}var $v,z2;function iQ(){if(z2)return $v;z2=1;var t=Bs(),e=Ji(),n="[object Arguments]";function r(o){return e(o)&&t(o)==n}return $v=r,$v}var Fv,H2;function j2(){if(H2)return Fv;H2=1;var t=iQ(),e=Ji(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(s){return e(s)&&r.call(s,"callee")&&!o.call(s,"callee")};return Fv=i,Fv}var Rv,W2;function ga(){if(W2)return Rv;W2=1;var t=Array.isArray;return Rv=t,Rv}var ku={exports:{}},Bv,q2;function sQ(){if(q2)return Bv;q2=1;function t(){return!1}return Bv=t,Bv}ku.exports;var U2;function K2(){return U2||(U2=1,function(t,e){var n=_o(),r=sQ(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,s=i&&i.exports===o,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,u=l||r;t.exports=u}(ku,ku.exports)),ku.exports}var Vv,G2;function aQ(){if(G2)return Vv;G2=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,o){var i=typeof r;return o=o??t,!!o&&(i=="number"||i!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<o}return Vv=n,Vv}var zv,Y2;function J2(){if(Y2)return zv;Y2=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return zv=e,zv}var Hv,X2;function lQ(){if(X2)return Hv;X2=1;var t=Bs(),e=J2(),n=Ji(),r="[object Arguments]",o="[object Array]",i="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",u="[object Map]",f="[object Number]",p="[object Object]",g="[object RegExp]",m="[object Set]",b="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",w="[object DataView]",T="[object Float32Array]",_="[object Float64Array]",C="[object Int8Array]",E="[object Int16Array]",M="[object Int32Array]",A="[object Uint8Array]",I="[object Uint8ClampedArray]",L="[object Uint16Array]",O="[object Uint32Array]",D={};D[T]=D[_]=D[C]=D[E]=D[M]=D[A]=D[I]=D[L]=D[O]=!0,D[r]=D[o]=D[x]=D[i]=D[w]=D[s]=D[a]=D[l]=D[u]=D[f]=D[p]=D[g]=D[m]=D[b]=D[y]=!1;function F(V){return n(V)&&e(V.length)&&!!D[t(V)]}return Hv=F,Hv}var jv,Z2;function $p(){if(Z2)return jv;Z2=1;function t(e){return function(n){return e(n)}}return jv=t,jv}var Eu={exports:{}};Eu.exports;var Q2;function Fp(){return Q2||(Q2=1,function(t,e){var n=A_(),r=e&&!e.nodeType&&e,o=r&&!0&&t&&!t.nodeType&&t,i=o&&o.exports===r,s=i&&n.process,a=function(){try{var l=o&&o.require&&o.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=a}(Eu,Eu.exports)),Eu.exports}var Wv,eI;function cQ(){if(eI)return Wv;eI=1;var t=lQ(),e=$p(),n=Fp(),r=n&&n.isTypedArray,o=r?e(r):t;return Wv=o,Wv}var qv,tI;function nI(){if(tI)return qv;tI=1;var t=oQ(),e=j2(),n=ga(),r=K2(),o=aQ(),i=cQ(),s=Object.prototype,a=s.hasOwnProperty;function l(u,f){var p=n(u),g=!p&&e(u),m=!p&&!g&&r(u),b=!p&&!g&&!m&&i(u),y=p||g||m||b,x=y?t(u.length,String):[],w=x.length;for(var T in u)(f||a.call(u,T))&&!(y&&(T=="length"||m&&(T=="offset"||T=="parent")||b&&(T=="buffer"||T=="byteLength"||T=="byteOffset")||o(T,w)))&&x.push(T);return x}return qv=l,qv}var Uv,rI;function Kv(){if(rI)return Uv;rI=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||t;return n===o}return Uv=e,Uv}var Gv,oI;function iI(){if(oI)return Gv;oI=1;function t(e,n){return function(r){return e(n(r))}}return Gv=t,Gv}var Yv,sI;function uQ(){if(sI)return Yv;sI=1;var t=iI(),e=t(Object.keys,Object);return Yv=e,Yv}var Jv,aI;function dQ(){if(aI)return Jv;aI=1;var t=Kv(),e=uQ(),n=Object.prototype,r=n.hasOwnProperty;function o(i){if(!t(i))return e(i);var s=[];for(var a in Object(i))r.call(i,a)&&a!="constructor"&&s.push(a);return s}return Jv=o,Jv}var Xv,lI;function cI(){if(lI)return Xv;lI=1;var t=i2(),e=J2();function n(r){return r!=null&&e(r.length)&&!t(r)}return Xv=n,Xv}var Zv,uI;function Qv(){if(uI)return Zv;uI=1;var t=nI(),e=dQ(),n=cI();function r(o){return n(o)?t(o):e(o)}return Zv=r,Zv}var e0,dI;function fQ(){if(dI)return e0;dI=1;var t=Tu(),e=Qv();function n(r,o){return r&&t(o,e(o),r)}return e0=n,e0}var t0,fI;function pQ(){if(fI)return t0;fI=1;function t(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}return t0=t,t0}var n0,pI;function hQ(){if(pI)return n0;pI=1;var t=pi(),e=Kv(),n=pQ(),r=Object.prototype,o=r.hasOwnProperty;function i(s){if(!t(s))return n(s);var a=e(s),l=[];for(var u in s)u=="constructor"&&(a||!o.call(s,u))||l.push(u);return l}return n0=i,n0}var r0,hI;function o0(){if(hI)return r0;hI=1;var t=nI(),e=hQ(),n=cI();function r(o){return n(o)?t(o,!0):e(o)}return r0=r,r0}var i0,gI;function gQ(){if(gI)return i0;gI=1;var t=Tu(),e=o0();function n(r,o){return r&&t(o,e(o),r)}return i0=n,i0}var Ou={exports:{}};Ou.exports;var mI;function mQ(){return mI||(mI=1,function(t,e){var n=_o(),r=e&&!e.nodeType&&e,o=r&&!0&&t&&!t.nodeType&&t,i=o&&o.exports===r,s=i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;function l(u,f){if(f)return u.slice();var p=u.length,g=a?a(p):new u.constructor(p);return u.copy(g),g}t.exports=l}(Ou,Ou.exports)),Ou.exports}var s0,yI;function yQ(){if(yI)return s0;yI=1;function t(e,n){var r=-1,o=e.length;for(n||(n=Array(o));++r<o;)n[r]=e[r];return n}return s0=t,s0}var a0,bI;function bQ(){if(bI)return a0;bI=1;function t(e,n){for(var r=-1,o=e==null?0:e.length,i=0,s=[];++r<o;){var a=e[r];n(a,r,e)&&(s[i++]=a)}return s}return a0=t,a0}var l0,vI;function xI(){if(vI)return l0;vI=1;function t(){return[]}return l0=t,l0}var c0,SI;function u0(){if(SI)return c0;SI=1;var t=bQ(),e=xI(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(s){return s==null?[]:(s=Object(s),t(o(s),function(a){return r.call(s,a)}))}:e;return c0=i,c0}var d0,wI;function vQ(){if(wI)return d0;wI=1;var t=Tu(),e=u0();function n(r,o){return t(r,e(r),o)}return d0=n,d0}var f0,CI;function p0(){if(CI)return f0;CI=1;function t(e,n){for(var r=-1,o=n.length,i=e.length;++r<o;)e[i+r]=n[r];return e}return f0=t,f0}var h0,_I;function g0(){if(_I)return h0;_I=1;var t=iI(),e=t(Object.getPrototypeOf,Object);return h0=e,h0}var m0,TI;function kI(){if(TI)return m0;TI=1;var t=p0(),e=g0(),n=u0(),r=xI(),o=Object.getOwnPropertySymbols,i=o?function(s){for(var a=[];s;)t(a,n(s)),s=e(s);return a}:r;return m0=i,m0}var y0,EI;function xQ(){if(EI)return y0;EI=1;var t=Tu(),e=kI();function n(r,o){return t(r,e(r),o)}return y0=n,y0}var b0,OI;function MI(){if(OI)return b0;OI=1;var t=p0(),e=ga();function n(r,o,i){var s=o(r);return e(r)?s:t(s,i(r))}return b0=n,b0}var v0,AI;function SQ(){if(AI)return v0;AI=1;var t=MI(),e=u0(),n=Qv();function r(o){return t(o,n,e)}return v0=r,v0}var x0,II;function DI(){if(II)return x0;II=1;var t=MI(),e=kI(),n=o0();function r(o){return t(o,n,e)}return x0=r,x0}var S0,PI;function wQ(){if(PI)return S0;PI=1;var t=ha(),e=_o(),n=t(e,"DataView");return S0=n,S0}var w0,NI;function CQ(){if(NI)return w0;NI=1;var t=ha(),e=_o(),n=t(e,"Promise");return w0=n,w0}var C0,LI;function _Q(){if(LI)return C0;LI=1;var t=ha(),e=_o(),n=t(e,"Set");return C0=n,C0}var _0,$I;function TQ(){if($I)return _0;$I=1;var t=ha(),e=_o(),n=t(e,"WeakMap");return _0=n,_0}var T0,FI;function k0(){if(FI)return T0;FI=1;var t=wQ(),e=fv(),n=CQ(),r=_Q(),o=TQ(),i=Bs(),s=c2(),a="[object Map]",l="[object Object]",u="[object Promise]",f="[object Set]",p="[object WeakMap]",g="[object DataView]",m=s(t),b=s(e),y=s(n),x=s(r),w=s(o),T=i;return(t&&T(new t(new ArrayBuffer(1)))!=g||e&&T(new e)!=a||n&&T(n.resolve())!=u||r&&T(new r)!=f||o&&T(new o)!=p)&&(T=function(_){var C=i(_),E=C==l?_.constructor:void 0,M=E?s(E):"";if(M)switch(M){case m:return g;case b:return a;case y:return u;case x:return f;case w:return p}return C}),T0=T,T0}var E0,RI;function kQ(){if(RI)return E0;RI=1;var t=Object.prototype,e=t.hasOwnProperty;function n(r){var o=r.length,i=new r.constructor(o);return o&&typeof r[0]=="string"&&e.call(r,"index")&&(i.index=r.index,i.input=r.input),i}return E0=n,E0}var O0,BI;function EQ(){if(BI)return O0;BI=1;var t=_o(),e=t.Uint8Array;return O0=e,O0}var M0,VI;function A0(){if(VI)return M0;VI=1;var t=EQ();function e(n){var r=new n.constructor(n.byteLength);return new t(r).set(new t(n)),r}return M0=e,M0}var I0,zI;function OQ(){if(zI)return I0;zI=1;var t=A0();function e(n,r){var o=r?t(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}return I0=e,I0}var D0,HI;function MQ(){if(HI)return D0;HI=1;var t=/\w*$/;function e(n){var r=new n.constructor(n.source,t.exec(n));return r.lastIndex=n.lastIndex,r}return D0=e,D0}var P0,jI;function AQ(){if(jI)return P0;jI=1;var t=vc(),e=t?t.prototype:void 0,n=e?e.valueOf:void 0;function r(o){return n?Object(n.call(o)):{}}return P0=r,P0}var N0,WI;function IQ(){if(WI)return N0;WI=1;var t=A0();function e(n,r){var o=r?t(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return N0=e,N0}var L0,qI;function DQ(){if(qI)return L0;qI=1;var t=A0(),e=OQ(),n=MQ(),r=AQ(),o=IQ(),i="[object Boolean]",s="[object Date]",a="[object Map]",l="[object Number]",u="[object RegExp]",f="[object Set]",p="[object String]",g="[object Symbol]",m="[object ArrayBuffer]",b="[object DataView]",y="[object Float32Array]",x="[object Float64Array]",w="[object Int8Array]",T="[object Int16Array]",_="[object Int32Array]",C="[object Uint8Array]",E="[object Uint8ClampedArray]",M="[object Uint16Array]",A="[object Uint32Array]";function I(L,O,D){var F=L.constructor;switch(O){case m:return t(L);case i:case s:return new F(+L);case b:return e(L,D);case y:case x:case w:case T:case _:case C:case E:case M:case A:return o(L,D);case a:return new F;case l:case p:return new F(L);case u:return n(L);case f:return new F;case g:return r(L)}}return L0=I,L0}var $0,UI;function PQ(){if(UI)return $0;UI=1;var t=pi(),e=Object.create,n=function(){function r(){}return function(o){if(!t(o))return{};if(e)return e(o);r.prototype=o;var i=new r;return r.prototype=void 0,i}}();return $0=n,$0}var F0,KI;function NQ(){if(KI)return F0;KI=1;var t=PQ(),e=g0(),n=Kv();function r(o){return typeof o.constructor=="function"&&!n(o)?t(e(o)):{}}return F0=r,F0}var R0,GI;function LQ(){if(GI)return R0;GI=1;var t=k0(),e=Ji(),n="[object Map]";function r(o){return e(o)&&t(o)==n}return R0=r,R0}var B0,YI;function $Q(){if(YI)return B0;YI=1;var t=LQ(),e=$p(),n=Fp(),r=n&&n.isMap,o=r?e(r):t;return B0=o,B0}var V0,JI;function FQ(){if(JI)return V0;JI=1;var t=k0(),e=Ji(),n="[object Set]";function r(o){return e(o)&&t(o)==n}return V0=r,V0}var z0,XI;function RQ(){if(XI)return z0;XI=1;var t=FQ(),e=$p(),n=Fp(),r=n&&n.isSet,o=r?e(r):t;return z0=o,z0}var H0,ZI;function BQ(){if(ZI)return H0;ZI=1;var t=nQ(),e=rQ(),n=R2(),r=fQ(),o=gQ(),i=mQ(),s=yQ(),a=vQ(),l=xQ(),u=SQ(),f=DI(),p=k0(),g=kQ(),m=DQ(),b=NQ(),y=ga(),x=K2(),w=$Q(),T=pi(),_=RQ(),C=Qv(),E=o0(),M=1,A=2,I=4,L="[object Arguments]",O="[object Array]",D="[object Boolean]",F="[object Date]",V="[object Error]",z="[object Function]",R="[object GeneratorFunction]",B="[object Map]",U="[object Number]",K="[object Object]",Y="[object RegExp]",G="[object Set]",Z="[object String]",ge="[object Symbol]",he="[object WeakMap]",me="[object ArrayBuffer]",oe="[object DataView]",ye="[object Float32Array]",de="[object Float64Array]",X="[object Int8Array]",Q="[object Int16Array]",ae="[object Int32Array]",ve="[object Uint8Array]",ne="[object Uint8ClampedArray]",ce="[object Uint16Array]",fe="[object Uint32Array]",xe={};xe[L]=xe[O]=xe[me]=xe[oe]=xe[D]=xe[F]=xe[ye]=xe[de]=xe[X]=xe[Q]=xe[ae]=xe[B]=xe[U]=xe[K]=xe[Y]=xe[G]=xe[Z]=xe[ge]=xe[ve]=xe[ne]=xe[ce]=xe[fe]=!0,xe[V]=xe[z]=xe[he]=!1;function Te(_e,Ne,He,W,te,re){var Me,Ie=Ne&M,De=Ne&A,je=Ne&I;if(He&&(Me=te?He(_e,W,te,re):He(_e)),Me!==void 0)return Me;if(!T(_e))return _e;var ot=y(_e);if(ot){if(Me=g(_e),!Ie)return s(_e,Me)}else{var nt=p(_e),At=nt==z||nt==R;if(x(_e))return i(_e,Ie);if(nt==K||nt==L||At&&!te){if(Me=De||At?{}:b(_e),!Ie)return De?l(_e,o(Me,_e)):a(_e,r(Me,_e))}else{if(!xe[nt])return te?_e:{};Me=m(_e,nt,Ie)}}re||(re=new t);var _n=re.get(_e);if(_n)return _n;re.set(_e,Me),_(_e)?_e.forEach(function($t){Me.add(Te($t,Ne,He,$t,_e,re))}):w(_e)&&_e.forEach(function($t,pe){Me.set(pe,Te($t,Ne,He,pe,_e,re))});var ut=je?De?f:u:De?E:C,Pn=ot?void 0:ut(_e);return e(Pn||_e,function($t,pe){Pn&&(pe=$t,$t=_e[pe]),n(Me,pe,Te($t,Ne,He,pe,_e,re))}),Me}return H0=Te,H0}var j0,QI;function VQ(){if(QI)return j0;QI=1;var t=ga(),e=Gd(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,s){if(t(i))return!1;var a=typeof i;return a=="number"||a=="symbol"||a=="boolean"||i==null||e(i)?!0:r.test(i)||!n.test(i)||s!=null&&i in Object(s)}return j0=o,j0}var W0,eD;function zQ(){if(eD)return W0;eD=1;var t=M2(),e="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(e);var i=function(){var s=arguments,a=o?o.apply(this,s):s[0],l=i.cache;if(l.has(a))return l.get(a);var u=r.apply(this,s);return i.cache=l.set(a,u)||l,u};return i.cache=new(n.Cache||t),i}return n.Cache=t,W0=n,W0}var q0,tD;function HQ(){if(tD)return q0;tD=1;var t=zQ(),e=500;function n(r){var o=t(r,function(s){return i.size===e&&i.clear(),s}),i=o.cache;return o}return q0=n,q0}var U0,nD;function jQ(){if(nD)return U0;nD=1;var t=HQ(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(e,function(s,a,l,u){i.push(l?u.replace(n,"$1"):a||s)}),i});return U0=r,U0}var K0,rD;function oD(){if(rD)return K0;rD=1;var t=vc(),e=WA(),n=ga(),r=Gd(),o=t?t.prototype:void 0,i=o?o.toString:void 0;function s(a){if(typeof a=="string")return a;if(n(a))return e(a,s)+"";if(r(a))return i?i.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return K0=s,K0}var G0,iD;function sD(){if(iD)return G0;iD=1;var t=oD();function e(n){return n==null?"":t(n)}return G0=e,G0}var Y0,aD;function J0(){if(aD)return Y0;aD=1;var t=ga(),e=VQ(),n=jQ(),r=sD();function o(i,s){return t(i)?i:e(i,s)?[i]:n(r(i))}return Y0=o,Y0}var X0,lD;function WQ(){if(lD)return X0;lD=1;function t(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}return X0=t,X0}var Z0,cD;function uD(){if(cD)return Z0;cD=1;var t=Gd();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Z0=e,Z0}var Q0,dD;function qQ(){if(dD)return Q0;dD=1;var t=J0(),e=uD();function n(r,o){o=t(o,r);for(var i=0,s=o.length;r!=null&&i<s;)r=r[e(o[i++])];return i&&i==s?r:void 0}return Q0=n,Q0}var e1,fD;function pD(){if(fD)return e1;fD=1;function t(e,n,r){var o=-1,i=e.length;n<0&&(n=-n>i?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var s=Array(i);++o<i;)s[o]=e[o+n];return s}return e1=t,e1}var t1,hD;function UQ(){if(hD)return t1;hD=1;var t=qQ(),e=pD();function n(r,o){return o.length<2?r:t(r,e(o,0,-1))}return t1=n,t1}var n1,gD;function KQ(){if(gD)return n1;gD=1;var t=J0(),e=WQ(),n=UQ(),r=uD();function o(i,s){return s=t(s,i),i=n(i,s),i==null||delete i[r(e(s))]}return n1=o,n1}var r1,mD;function GQ(){if(mD)return r1;mD=1;var t=Bs(),e=g0(),n=Ji(),r="[object Object]",o=Function.prototype,i=Object.prototype,s=o.toString,a=i.hasOwnProperty,l=s.call(Object);function u(f){if(!n(f)||t(f)!=r)return!1;var p=e(f);if(p===null)return!0;var g=a.call(p,"constructor")&&p.constructor;return typeof g=="function"&&g instanceof g&&s.call(g)==l}return r1=u,r1}var o1,yD;function YQ(){if(yD)return o1;yD=1;var t=GQ();function e(n){return t(n)?void 0:n}return o1=e,o1}var i1,bD;function JQ(){if(bD)return i1;bD=1;var t=vc(),e=j2(),n=ga(),r=t?t.isConcatSpreadable:void 0;function o(i){return n(i)||e(i)||!!(r&&i&&i[r])}return i1=o,i1}var s1,vD;function XQ(){if(vD)return s1;vD=1;var t=p0(),e=JQ();function n(r,o,i,s,a){var l=-1,u=r.length;for(i||(i=e),a||(a=[]);++l<u;){var f=r[l];o>0&&i(f)?o>1?n(f,o-1,i,s,a):t(a,f):s||(a[a.length]=f)}return a}return s1=n,s1}var a1,xD;function ZQ(){if(xD)return a1;xD=1;var t=XQ();function e(n){var r=n==null?0:n.length;return r?t(n,1):[]}return a1=e,a1}var l1,SD;function QQ(){if(SD)return l1;SD=1;function t(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}return l1=t,l1}var c1,wD;function eee(){if(wD)return c1;wD=1;var t=QQ(),e=Math.max;function n(r,o,i){return o=e(o===void 0?r.length-1:o,0),function(){for(var s=arguments,a=-1,l=e(s.length-o,0),u=Array(l);++a<l;)u[a]=s[o+a];a=-1;for(var f=Array(o+1);++a<o;)f[a]=s[a];return f[o]=i(u),t(r,this,f)}}return c1=n,c1}var u1,CD;function tee(){if(CD)return u1;CD=1;function t(e){return function(){return e}}return u1=t,u1}var d1,_D;function nee(){if(_D)return d1;_D=1;function t(e){return e}return d1=t,d1}var f1,TD;function ree(){if(TD)return f1;TD=1;var t=tee(),e=N2(),n=nee(),r=e?function(o,i){return e(o,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:n;return f1=r,f1}var p1,kD;function oee(){if(kD)return p1;kD=1;var t=800,e=16,n=Date.now;function r(o){var i=0,s=0;return function(){var a=n(),l=e-(a-s);if(s=a,l>0){if(++i>=t)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return p1=r,p1}var h1,ED;function iee(){if(ED)return h1;ED=1;var t=ree(),e=oee(),n=e(t);return h1=n,h1}var g1,OD;function see(){if(OD)return g1;OD=1;var t=ZQ(),e=eee(),n=iee();function r(o){return n(e(o,void 0,t),o+"")}return g1=r,g1}var m1,MD;function aee(){if(MD)return m1;MD=1;var t=WA(),e=BQ(),n=KQ(),r=J0(),o=Tu(),i=YQ(),s=see(),a=DI(),l=1,u=2,f=4,p=s(function(g,m){var b={};if(g==null)return b;var y=!1;m=t(m,function(w){return w=r(w,g),y||(y=w.length>1),w}),o(g,a(g),b),y&&(b=e(b,l|u|f,i));for(var x=m.length;x--;)n(b,m[x]);return b});return m1=p,m1}var lee=aee();const kl=cr(lee),Rp={TABLE_ELEMENT:1,MENU_BAR:2,NOTCHED_OUTLINE:2};function AD(t){var e,n,r,o;const i=Object.keys((e=t.typography.h1)!==null&&e!==void 0?e:{}).some(a=>a.includes("@media")),s=xo.keyframes`
336
+ 0%, 95% {
337
+ opacity: 1;
338
+ }
339
+ 100% {
340
+ opacity: 0;
341
+ }
342
+ `;return{...kl(t.typography.body1,["lineHeight"]),"&:focus":{outline:"none"},"& h1":{fontFamily:(n=t.typography.h3)===null||n===void 0?void 0:n.fontFamily,fontWeight:"bold",...i?{fontSize:`${(1.5625*1.2).toFixed(4)}rem`,[t.breakpoints.up("sm")]:{fontSize:`${(1.8219*1.2).toFixed(4)}rem`},[t.breakpoints.up("md")]:{fontSize:`${(2.0243*1.2).toFixed(4)}rem`},[t.breakpoints.up("lg")]:{fontSize:`${(2.0243*1.2).toFixed(4)}rem`}}:{fontSize:`${(2.0243*1.2).toFixed(4)}rem`}},"& h2":{...kl(t.typography.h4,["lineHeight"]),fontWeight:500},"& h3":{...kl(t.typography.h5,["lineHeight"]),fontWeight:500},"& h4":{...kl(t.typography.h6,["lineHeight"]),fontWeight:500},"& h5":{...kl(t.typography.subtitle1,["lineHeight"]),fontWeight:500},"& h6":{...kl(t.typography.subtitle2,["lineHeight"]),fontWeight:500},"& h1, & h2, & h3, & h4, & h5, & h6, & p":{marginBlockStart:0,marginBlockEnd:0},'& a:not([data-type="mention"])':{color:t.palette.primary.main,textDecoration:"none","&:hover":{textDecoration:"underline"}},"& ul, & ol":{marginBlockStart:0,marginBlockEnd:0},"& ol":{listStyleType:"decimal","& ol":{listStyleType:"lower-alpha","& ol":{listStyleType:"lower-roman","& ol":{listStyleType:"decimal","& ol":{listStyleType:"lower-alpha","& ol":{listStyleType:"lower-roman"}}}}}},"& ul":{listStyleType:"disc","& ul":{listStyleType:"circle","& ul":{listStyleType:"square","& ul":{listStyleType:"disc","& ul":{listStyleType:"circle","& ul":{listStyleType:"square"}}}}}},'& ul[data-type="taskList"]':{listStyle:"none",padding:0,"& li":{display:"flex","& > label":{flex:"0 0 auto",marginRight:"0.5rem",userSelect:"none"},"& > div":{flex:"1 1 auto"}}},"& blockquote":{paddingLeft:"1rem",marginInlineStart:t.spacing(1),marginInlineEnd:t.spacing(1),position:"relative","&:before":{position:"absolute",top:0,bottom:0,left:0,display:"block",width:4,borderRadius:t.shape.borderRadius,background:t.palette.text.disabled,content:'""'}},"& :not(pre) > code":{padding:"2px 3px 1px",borderWidth:1,borderStyle:"solid",borderColor:t.palette.divider,borderRadius:3,backgroundColor:t.palette.action.hover,color:t.palette.mode==="dark"?t.palette.secondary.main:$.darken(t.palette.secondary.dark,.1)},"& pre":{marginTop:t.spacing(.5),marginBottom:t.spacing(.5),padding:t.spacing(1),borderWidth:1,borderStyle:"solid",borderColor:t.palette.divider,borderRadius:t.shape.borderRadius,background:t.palette.action.hover,lineHeight:1.4,overflowX:"auto",whiteSpace:"pre !important"},'& [data-type="mention"]':{padding:"0 0.25rem",lineHeight:"1.3em",borderRadius:t.shape.borderRadius,color:t.palette.primary.main,background:t.palette.mode==="dark"?$.alpha($.darken(t.palette.primary.dark,.7),.5):$.alpha($.lighten(t.palette.primary.light,.6),.3),textDecoration:"none"},"& img:not(.ProseMirror-separator)":{maxWidth:"100%",height:"auto",display:"inline-flex",...cee(t),"&.ProseMirror-selectednode":{outline:`3px solid ${t.palette.primary.main}`}},"& hr":{borderWidth:0,borderTopWidth:"thin",borderStyle:"solid",borderColor:t.palette.text.secondary,"&.ProseMirror-selectednode":{borderColor:t.palette.primary.main}},"& table":{borderCollapse:"collapse",tableLayout:"fixed",margin:0,overflowY:"hidden",overflowX:"auto",display:"block","& td, th":{minWidth:"1em",borderWidth:1,borderStyle:"solid",borderColor:t.palette.mode==="dark"?t.palette.grey[500]:t.palette.grey[400],padding:"3px 5px",verticalAlign:"top",boxSizing:"border-box",position:"relative","& > *":{marginBottom:0}},"& th":{fontWeight:500,textAlign:"left",backgroundColor:t.palette.action.selected}},"& .tableWrapper":{overflowX:"auto","& table":{overflow:"hidden",display:"table"}},"& .selectedCell:after":{zIndex:Rp.TABLE_ELEMENT,position:"absolute",content:'""',left:0,right:0,top:0,bottom:0,background:"rgba(200, 200, 255, 0.4)",pointerEvents:"none"},'&[contenteditable="true"]':{"& .column-resize-handle":{position:"absolute",right:-2,top:-1,bottom:-2,width:4,zIndex:Rp.TABLE_ELEMENT,backgroundColor:t.palette.primary.light,pointerEvents:"none"},"&.resize-cursor":{cursor:"col-resize"}},'&[contenteditable="false"]':{"& .column-resize-handle":{display:"none"},"&.resize-cursor":{pointerEvents:"none"}},"& p.is-editor-empty:first-of-type::before":{color:t.palette.text.disabled,content:"attr(data-placeholder)",float:"left",height:0,pointerEvents:"none"},"& .ProseMirror-gapcursor:after":{borderColor:t.palette.text.primary},"& .collaboration-cursor__caret":{borderLeft:"1px solid #0d0d0d",borderRight:"1px solid #0d0d0d",marginLeft:"-1px",marginRight:"-1px",position:"relative",wordBreak:"normal",cursor:"text","&:after":{position:"absolute",content:'""',left:-3,right:0,top:-2,borderWidth:3,borderStyle:"solid",borderColor:"inherit"},"&:hover .collaboration-cursor__label":{opacity:1,transition:t.transitions.create("opacity",{delay:0,duration:100,easing:"linear"})}},"& .collaboration-cursor__label":{borderRadius:"3px 3px 3px 0",color:"#0d0d0d",fontSize:12,fontStyle:"normal",fontWeight:600,fontFamily:(o=(r=t.typography.body1)===null||r===void 0?void 0:r.fontFamily)!==null&&o!==void 0?o:"initial",left:-1,lineHeight:"normal",padding:"0.1rem 0.3rem",position:"absolute",top:"-1.4em",userSelect:"none",whiteSpace:"nowrap",pointerEvents:"none",opacity:0,transition:t.transitions.create("opacity",{delay:500,duration:100,easing:"linear"}),animation:`${s} 3s linear 1`}}}function cee(t){if(t.palette.mode!=="dark")return{};const e=t.palette.grey[200];return{backgroundColor:e,color:t.palette.getContrastText(e)}}const uee="MuiTiptap-";function dee(t,e){return`${uee}${t}-${e}`}function ma(t,e){const n={};return e.forEach(r=>{n[r]=dee(t,r)}),n}const ID=ma("ControlledBubbleMenu",["root","paper"]),fee=en({name:{ControlledBubbleMenu:Bp}})(t=>({root:{zIndex:t.zIndex.tooltip},paper:{backgroundColor:t.palette.background.default}}));function Bp({editor:t,open:e,className:n,classes:r={},sx:o,children:i,anchorEl:s,container:a,disablePortal:l,placement:u="top",fallbackPlacements:f=["top","bottom","top-start","bottom-start","top-end","bottom-end"],flipPadding:p=8,PaperProps:g,...m}){const{classes:b,cx:y}=fee(void 0,{props:{classes:r}}),x=$.useTheme(),w=q.useCallback(()=>{const{ranges:T}=t.state.selection,_=Math.min(...T.map(E=>E.$from.pos)),C=Math.max(...T.map(E=>E.$to.pos));return{getBoundingClientRect:()=>{if(EA(t.state.selection)){const E=t.view.nodeDOM(_);if(E instanceof HTMLElement)return E.getBoundingClientRect()}return OA(t.view,_,C)}}},[t]);return v.jsx($.Popper,{open:e,placement:u,modifiers:[{name:"offset",options:{offset:[0,6]}},{name:"flip",enabled:!0,options:{boundary:t.options.element,fallbackPlacements:f,padding:p}},{name:"preventOverflow",enabled:!0,options:{altAxis:!0,boundary:"clippingParents",padding:8}}],anchorEl:s??w,className:y(ID.root,b.root,n),sx:o,container:a,disablePortal:l,transition:!0,...m,children:({TransitionProps:T})=>v.jsx($.Fade,{...T,timeout:{enter:x.transitions.duration.enteringScreen,exit:0},children:v.jsx($.Paper,{elevation:7,...g,className:y(ID.paper,b.paper,g==null?void 0:g.className),children:i})})})}const DD=q.createContext(void 0);function _t(){const t=q.useContext(DD);if(t===void 0)throw new Error("Tiptap editor not found in component context. Be sure to use <RichTextEditorProvider editor={editor} />!");return t}var hr;(function(t){t[t.HIDDEN=0]="HIDDEN",t[t.VIEW_LINK_DETAILS=1]="VIEW_LINK_DETAILS",t[t.EDIT_LINK=2]="EDIT_LINK"})(hr||(hr={}));const pee=gn.create({name:"linkBubbleMenuHandler",addStorage(){return{state:hr.HIDDEN,bubbleMenuOptions:void 0}},addCommands(){return{openLinkBubbleMenu:(t={})=>({editor:e,chain:n,dispatch:r})=>{const o=this.storage.state;let i;return e.isActive("link")?(o!==hr.VIEW_LINK_DETAILS&&n().extendMarkRange("link").focus().run(),i=hr.VIEW_LINK_DETAILS):i=hr.EDIT_LINK,r&&(this.storage.state=i,this.storage.bubbleMenuOptions=t),!0},editLinkInBubbleMenu:()=>({dispatch:t})=>{const e=this.storage.state,n=hr.EDIT_LINK;return e===n?!1:(t&&(this.storage.state=n),!0)},closeLinkBubbleMenu:()=>({commands:t,dispatch:e})=>this.storage.state===hr.HIDDEN?!1:(t.focus(),e&&(this.storage.state=hr.HIDDEN),!0)}},onSelectionUpdate(){this.storage.state===hr.EDIT_LINK?this.editor.commands.closeLinkBubbleMenu():this.storage.state===hr.VIEW_LINK_DETAILS&&!this.editor.isActive("link")&&this.editor.commands.closeLinkBubbleMenu()},addKeyboardShortcuts(){return{"Mod-Shift-u":()=>(this.editor.commands.openLinkBubbleMenu(),!0)}},addProseMirrorPlugins(){return[new ln({key:new An("handleClickLinkForMenu"),props:{handleClick:(t,e,n)=>{const r=$b(t.state,"link");return n.target.closest("a")&&r.href&&this.storage.state===hr.HIDDEN?this.editor.commands.openLinkBubbleMenu():this.editor.commands.closeLinkBubbleMenu(),!1}}})]}});function PD(t,e){const n=q.useRef(e);q.useEffect(()=>{n.current=e},[e]),q.useEffect(()=>{function r(o){t===o.key&&n.current(o)}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t])}/*!
343
+ * encodeurl
344
+ * Copyright(c) 2016 Douglas Christopher Wilson
345
+ * MIT Licensed
346
+ */var y1,ND;function hee(){if(ND)return y1;ND=1,y1=r;var t=/(?:[^\x21\x23-\x3B\x3D\x3F-\x5F\x61-\x7A\x7C\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g,e=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g,n="$1�$2";function r(o){return String(o).replace(e,n).replace(t,encodeURI)}return y1}var gee=hee();const mee=cr(gee);function LD(t){let e=t.trim();return e&&!/^(https?:\/\/|mailto:|tel:|sms:|\/|#)/.test(e)&&(e=`http://${e}`),mee(e)}function yee({editor:t,onCancel:e,onSave:n,labels:r,formatHref:o=LD}){var i,s,a,l,u,f;const p=t.isActive("link")?t.getAttributes("link").href:"",g=Su(t.state.selection.$from,Oo("link",t.schema)),m=g?t.state.doc.textBetween(g.from,g.to):"",b=t.state.doc.textBetween(t.state.selection.$from.pos,t.state.selection.$to.pos),y=m||b,[x,w]=q.useState(y),[T,_]=q.useState(p),C=q.useRef(null),E=q.useRef(null),M=!p,A=(i=r==null?void 0:r.editLinkAddTitle)!==null&&i!==void 0?i:"Add link",I=(s=r==null?void 0:r.editLinkEditTitle)!==null&&s!==void 0?s:"Edit link",L=M?A:I;q.useEffect(()=>{var V,z;!M||!y?(V=C.current)===null||V===void 0||V.focus({preventScroll:!0}):(z=E.current)===null||z===void 0||z.focus({preventScroll:!0})},[M,y]),PD("Escape",e);function O(){E.current&&_(o(E.current.value))}const[D,F]=q.useState(!1);return v.jsxs("form",{onSubmit:V=>{var z,R,B,U;V.preventDefault(),V.stopPropagation(),F(!0);const K=(R=(z=C.current)===null||z===void 0?void 0:z.value)!==null&&R!==void 0?R:"",Y=(U=(B=E.current)===null||B===void 0?void 0:B.value)!==null&&U!==void 0?U:"";n({text:K,link:Y}),F(!1)},autoComplete:"off",children:[v.jsx($.Typography,{variant:"h6",children:L}),v.jsx($.TextField,{inputRef:C,value:x,disabled:D,onChange:V=>{w(V.target.value)},label:(a=r==null?void 0:r.editLinkTextInputLabel)!==null&&a!==void 0?a:"Text",margin:"normal",size:"small",fullWidth:!0,required:!0}),v.jsx($.TextField,{inputRef:E,value:T,onChange:V=>{_(V.target.value)},disabled:D,label:(l=r==null?void 0:r.editLinkHrefInputLabel)!==null&&l!==void 0?l:"Link",margin:"dense",size:"small",type:"text",onBlur:O,onKeyDown:V=>{V.key==="Enter"&&O()},fullWidth:!0,required:!0}),v.jsxs($.DialogActions,{sx:{px:0},children:[v.jsx($.Button,{onClick:e,variant:"outlined",size:"small",children:(u=r==null?void 0:r.editLinkCancelButtonLabel)!==null&&u!==void 0?u:"Cancel"}),v.jsx($.Button,{type:"submit",color:"primary",variant:"outlined",size:"small",disabled:D,children:(f=r==null?void 0:r.editLinkSaveButtonLabel)!==null&&f!==void 0?f:"Save"})]})]})}var b1,$D;function bee(){if($D)return b1;$D=1;var t=pD();function e(n,r,o){var i=n.length;return o=o===void 0?i:o,!r&&o>=i?n:t(n,r,o)}return b1=e,b1}var v1,FD;function x1(){if(FD)return v1;FD=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=e+n+r,i="\\ufe0e\\ufe0f",s="\\u200d",a=RegExp("["+s+t+o+i+"]");function l(u){return a.test(u)}return v1=l,v1}var S1,RD;function vee(){if(RD)return S1;RD=1;var t=Bs(),e=Ji(),n="[object RegExp]";function r(o){return e(o)&&t(o)==n}return S1=r,S1}var w1,BD;function xee(){if(BD)return w1;BD=1;var t=vee(),e=$p(),n=Fp(),r=n&&n.isRegExp,o=r?e(r):t;return w1=o,w1}var C1,VD;function See(){if(VD)return C1;VD=1;function t(e){return function(n){return n==null?void 0:n[e]}}return C1=t,C1}var _1,zD;function wee(){if(zD)return _1;zD=1;var t=See(),e=t("length");return _1=e,_1}var T1,HD;function Cee(){if(HD)return T1;HD=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=e+n+r,i="\\ufe0e\\ufe0f",s="["+t+"]",a="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+a+"|"+l+")",f="[^"+t+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",b=u+"?",y="["+i+"]?",x="(?:"+m+"(?:"+[f,p,g].join("|")+")"+y+b+")*",w=y+b+x,T="(?:"+[f+a+"?",a,p,g,s].join("|")+")",_=RegExp(l+"(?="+l+")|"+T+w,"g");function C(E){for(var M=_.lastIndex=0;_.test(E);)++M;return M}return T1=C,T1}var k1,jD;function _ee(){if(jD)return k1;jD=1;var t=wee(),e=x1(),n=Cee();function r(o){return e(o)?n(o):t(o)}return k1=r,k1}var E1,WD;function Tee(){if(WD)return E1;WD=1;function t(e){return e.split("")}return E1=t,E1}var O1,qD;function kee(){if(qD)return O1;qD=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=e+n+r,i="\\ufe0e\\ufe0f",s="["+t+"]",a="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+a+"|"+l+")",f="[^"+t+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",b=u+"?",y="["+i+"]?",x="(?:"+m+"(?:"+[f,p,g].join("|")+")"+y+b+")*",w=y+b+x,T="(?:"+[f+a+"?",a,p,g,s].join("|")+")",_=RegExp(l+"(?="+l+")|"+T+w,"g");function C(E){return E.match(_)||[]}return O1=C,O1}var M1,UD;function Eee(){if(UD)return M1;UD=1;var t=Tee(),e=x1(),n=kee();function r(o){return e(o)?n(o):t(o)}return M1=r,M1}var A1,KD;function Oee(){if(KD)return A1;KD=1;var t=H_(),e=1/0,n=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=t(o),o===e||o===-e){var i=o<0?-1:1;return i*n}return o===o?o:0}return A1=r,A1}var I1,GD;function Mee(){if(GD)return I1;GD=1;var t=Oee();function e(n){var r=t(n),o=r%1;return r===r?o?r-o:r:0}return I1=e,I1}var D1,YD;function Aee(){if(YD)return D1;YD=1;var t=oD(),e=bee(),n=x1(),r=pi(),o=xee(),i=_ee(),s=Eee(),a=Mee(),l=sD(),u=30,f="...",p=/\w*$/;function g(m,b){var y=u,x=f;if(r(b)){var w="separator"in b?b.separator:w;y="length"in b?a(b.length):y,x="omission"in b?t(b.omission):x}m=l(m);var T=m.length;if(n(m)){var _=s(m);T=_.length}if(y>=T)return m;var C=y-i(x);if(C<1)return x;var E=_?e(_,0,C).join(""):m.slice(0,C);if(w===void 0)return E+x;if(_&&(C+=E.length-C),o(w)){if(m.slice(C).search(w)){var M,A=E;for(w.global||(w=RegExp(w.source,l(p.exec(w))+"g")),w.lastIndex=0;M=w.exec(A);)var I=M.index;E=E.slice(0,I===void 0?C:I)}}else if(m.indexOf(t(w),C)!=C){var L=E.lastIndexOf(w);L>-1&&(E=E.slice(0,L))}return E+x}return D1=g,D1}var Iee=Aee();const Dee=cr(Iee);function Pee(t,e=20){if(t.length<=e)return t;const n=Math.floor(e/2);return`${t.slice(0,n).trim()}…${t.slice(-n).trim()}`}const Nee=en({name:{ViewLinkMenuContent:JD}})({linkPreviewText:{overflowWrap:"anywhere"}});function JD({editor:t,onCancel:e,onEdit:n,onRemove:r,labels:o}){var i,s,a;const{classes:l}=Nee(),u=Su(t.state.selection.$to,Oo("link",t.schema)),f=u?t.state.doc.textBetween(u.from,u.to):"",p=(i=t.getAttributes("link").href)!==null&&i!==void 0?i:"";return PD("Escape",e),v.jsxs(v.Fragment,{children:[v.jsx("div",{className:l.linkPreviewText,children:Dee(f,{length:50,omission:"…"})}),v.jsx("div",{className:l.linkPreviewText,children:v.jsx($.Link,{href:p,target:"_blank",rel:"noopener",children:Pee(p,50)})}),v.jsxs($.DialogActions,{sx:{px:0},children:[v.jsx($.Button,{onClick:n,color:"primary",variant:"outlined",size:"small",children:(s=o==null?void 0:o.viewLinkEditButtonLabel)!==null&&s!==void 0?s:"Edit"}),v.jsx($.Button,{onClick:r,color:"error",variant:"outlined",size:"small",children:(a=o==null?void 0:o.viewLinkRemoveButtonLabel)!==null&&a!==void 0?a:"Remove"})]})]})}const Lee=en({name:{LinkBubbleMenu:XD}})(t=>({content:{padding:t.spacing(1.5,2,.5)}}));function XD({labels:t,formatHref:e,...n}){const{classes:r}=Lee(),o=_t();if(!(o!=null&&o.isEditable))return null;if(!("linkBubbleMenuHandler"in o.storage))throw new Error("You must add the LinkBubbleMenuHandler extension to the useEditor `extensions` array in order to use this component!");const i=o.storage.linkBubbleMenuHandler,s=i.state;let a=null;return s===hr.VIEW_LINK_DETAILS?a=v.jsx(JD,{editor:o,onCancel:o.commands.closeLinkBubbleMenu,onEdit:o.commands.editLinkInBubbleMenu,onRemove:()=>{o.chain().unsetLink().setTextSelection(o.state.selection.to).focus().run()},labels:t}):s===hr.EDIT_LINK&&(a=v.jsx(yee,{editor:o,onCancel:o.commands.closeLinkBubbleMenu,onSave:({text:l,link:u})=>{o.chain().extendMarkRange("link").insertContent({type:"text",marks:[{type:"link",attrs:{href:u}}],text:l}).setLink({href:u}).focus().run(),o.commands.closeLinkBubbleMenu()},labels:t,formatHref:e})),v.jsx(Bp,{editor:o,open:s!==hr.HIDDEN,...i.bubbleMenuOptions,...n,children:v.jsx("div",{className:r.content,children:a})})}const P1=ma("MenuBar",["root","sticky","nonSticky","content"]),$ee=en({name:{MenuBar:ZD}})((t,{stickyOffset:e})=>({root:{borderBottomColor:t.palette.divider,borderBottomStyle:"solid",borderBottomWidth:1},sticky:{position:"sticky",top:e??0,zIndex:Rp.MENU_BAR,background:t.palette.background.default},nonSticky:{},content:{}}));function ZD({hide:t,disableSticky:e,stickyOffset:n,children:r,className:o,classes:i,unmountOnExit:s=!0,...a}){const{classes:l,cx:u}=$ee({stickyOffset:n},{props:{classes:i}});return v.jsx($.Collapse,{...a,in:!t,unmountOnExit:s,className:u(P1.root,l.root,e?[P1.nonSticky,l.nonSticky]:[P1.sticky,l.sticky],o),children:v.jsx("div",{className:l.content,children:r})})}const Fee=en({name:{MenuDivider:Vn}})(t=>({root:{height:18,margin:t.spacing(0,.5)}}));function Vn(t){const{classes:e,cx:n}=Fee();return v.jsx($.Divider,{orientation:"vertical",...t,className:n(e.root,t.className)})}var Ree="tippy-box",QD="tippy-content",Bee="tippy-backdrop",eP="tippy-arrow",tP="tippy-svg-arrow",ya={passive:!0,capture:!0},nP=function(){return document.body};function Vee(t,e){return{}.hasOwnProperty.call(t,e)}function N1(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function L1(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function rP(t,e){return typeof t=="function"?t.apply(void 0,e):t}function oP(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function zee(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function Hee(t){return t.split(/\s+/).filter(Boolean)}function El(t){return[].concat(t)}function iP(t,e){t.indexOf(e)===-1&&t.push(e)}function jee(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function Wee(t){return t.split("-")[0]}function Vp(t){return[].slice.call(t)}function sP(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function Mu(){return document.createElement("div")}function Au(t){return["Element","Fragment"].some(function(e){return L1(t,e)})}function qee(t){return L1(t,"NodeList")}function Uee(t){return L1(t,"MouseEvent")}function Kee(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function Gee(t){return Au(t)?[t]:qee(t)?Vp(t):Array.isArray(t)?t:Vp(document.querySelectorAll(t))}function $1(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function aP(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function Yee(t){var e,n=El(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function Jee(t,e){var n=e.clientX,r=e.clientY;return t.every(function(o){var i=o.popperRect,s=o.popperState,a=o.props,l=a.interactiveBorder,u=Wee(s.placement),f=s.modifiersData.offset;if(!f)return!0;var p=u==="bottom"?f.top.y:0,g=u==="top"?f.bottom.y:0,m=u==="right"?f.left.x:0,b=u==="left"?f.right.x:0,y=i.top-r+p>l,x=r-i.bottom-g>l,w=i.left-n+m>l,T=n-i.right-b>l;return y||x||w||T})}function F1(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){t[r](o,n)})}function lP(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Yo={isTouch:!1},cP=0;function Xee(){Yo.isTouch||(Yo.isTouch=!0,window.performance&&document.addEventListener("mousemove",uP))}function uP(){var t=performance.now();t-cP<20&&(Yo.isTouch=!1,document.removeEventListener("mousemove",uP)),cP=t}function Zee(){var t=document.activeElement;if(Kee(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Qee(){document.addEventListener("touchstart",Xee,ya),window.addEventListener("blur",Zee)}var ete=typeof window<"u"&&typeof document<"u",tte=ete?!!window.msCrypto:!1;function Ol(t){var e=t==="destroy"?"n already-":" ";return[t+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function dP(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function nte(t){return dP(`
347
+ %ctippy.js
348
+
349
+ %c`+dP(t)+`
350
+
351
+ %c👷‍ This is a development-only message. It will be removed in production.
352
+ `)}function fP(t){return[nte(t),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Iu;process.env.NODE_ENV!=="production"&&rte();function rte(){Iu=new Set}function Ei(t,e){if(t&&!Iu.has(e)){var n;Iu.add(e),(n=console).warn.apply(n,fP(e))}}function R1(t,e){if(t&&!Iu.has(e)){var n;Iu.add(e),(n=console).error.apply(n,fP(e))}}function ote(t){var e=!t,n=Object.prototype.toString.call(t)==="[object Object]"&&!t.addEventListener;R1(e,["tippy() was passed","`"+String(t)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),R1(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var pP={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ite={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Br=Object.assign({appendTo:nP,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},pP,ite),ste=Object.keys(Br),ate=function(e){process.env.NODE_ENV!=="production"&&mP(e,[]);var n=Object.keys(e);n.forEach(function(r){Br[r]=e[r]})};function hP(t){var e=t.plugins||[],n=e.reduce(function(r,o){var i=o.name,s=o.defaultValue;if(i){var a;r[i]=t[i]!==void 0?t[i]:(a=Br[i])!=null?a:s}return r},{});return Object.assign({},t,n)}function lte(t,e){var n=e?Object.keys(hP(Object.assign({},Br,{plugins:e}))):ste,r=n.reduce(function(o,i){var s=(t.getAttribute("data-tippy-"+i)||"").trim();if(!s)return o;if(i==="content")o[i]=s;else try{o[i]=JSON.parse(s)}catch{o[i]=s}return o},{});return r}function gP(t,e){var n=Object.assign({},e,{content:rP(e.content,[t])},e.ignoreAttributes?{}:lte(t,e.plugins));return n.aria=Object.assign({},Br.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}function mP(t,e){t===void 0&&(t={}),e===void 0&&(e=[]);var n=Object.keys(t);n.forEach(function(r){var o=zee(Br,Object.keys(pP)),i=!Vee(o,r);i&&(i=e.filter(function(s){return s.name===r}).length===0),Ei(i,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
353
+
354
+ `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
355
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var cte=function(){return"innerHTML"};function B1(t,e){t[cte()]=e}function yP(t){var e=Mu();return t===!0?e.className=eP:(e.className=tP,Au(t)?e.appendChild(t):B1(e,t)),e}function bP(t,e){Au(e.content)?(B1(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?B1(t,e.content):t.textContent=e.content)}function V1(t){var e=t.firstElementChild,n=Vp(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(QD)}),arrow:n.find(function(r){return r.classList.contains(eP)||r.classList.contains(tP)}),backdrop:n.find(function(r){return r.classList.contains(Bee)})}}function vP(t){var e=Mu(),n=Mu();n.className=Ree,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Mu();r.className=QD,r.setAttribute("data-state","hidden"),bP(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props);function o(i,s){var a=V1(e),l=a.box,u=a.content,f=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(i.content!==s.content||i.allowHTML!==s.allowHTML)&&bP(u,t.props),s.arrow?f?i.arrow!==s.arrow&&(l.removeChild(f),l.appendChild(yP(s.arrow))):l.appendChild(yP(s.arrow)):f&&l.removeChild(f)}return{popper:e,onUpdate:o}}vP.$$tippy=!0;var ute=1,zp=[],z1=[];function dte(t,e){var n=gP(t,Object.assign({},Br,hP(sP(e)))),r,o,i,s=!1,a=!1,l=!1,u=!1,f,p,g,m=[],b=oP(fe,n.interactiveDebounce),y,x=ute++,w=null,T=jee(n.plugins),_={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:x,reference:t,popper:Mu(),popperInstance:w,props:n,state:_,plugins:T,clearDelayTimeouts:je,setProps:ot,setContent:nt,show:At,hide:_n,hideWithInteractivity:ut,enable:Ie,disable:De,unmount:Pn,destroy:$t};if(!n.render)return process.env.NODE_ENV!=="production"&&R1(!0,"render() function has not been supplied."),C;var E=n.render(C),M=E.popper,A=E.onUpdate;M.setAttribute("data-tippy-root",""),M.id="tippy-"+C.id,C.popper=M,t._tippy=C,M._tippy=C;var I=T.map(function(pe){return pe.fn(C)}),L=t.hasAttribute("aria-expanded");return ve(),G(),U(),K("onCreate",[C]),n.showOnCreate&&re(),M.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),M.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&z().addEventListener("mousemove",b)}),C;function O(){var pe=C.props.touch;return Array.isArray(pe)?pe:[pe,0]}function D(){return O()[0]==="hold"}function F(){var pe;return!!((pe=C.props.render)!=null&&pe.$$tippy)}function V(){return y||t}function z(){var pe=V().parentNode;return pe?Yee(pe):document}function R(){return V1(M)}function B(pe){return C.state.isMounted&&!C.state.isVisible||Yo.isTouch||f&&f.type==="focus"?0:N1(C.props.delay,pe?0:1,Br.delay)}function U(pe){pe===void 0&&(pe=!1),M.style.pointerEvents=C.props.interactive&&!pe?"":"none",M.style.zIndex=""+C.props.zIndex}function K(pe,We,Ae){if(Ae===void 0&&(Ae=!0),I.forEach(function(Xe){Xe[pe]&&Xe[pe].apply(Xe,We)}),Ae){var qe;(qe=C.props)[pe].apply(qe,We)}}function Y(){var pe=C.props.aria;if(pe.content){var We="aria-"+pe.content,Ae=M.id,qe=El(C.props.triggerTarget||t);qe.forEach(function(Xe){var ct=Xe.getAttribute(We);if(C.state.isVisible)Xe.setAttribute(We,ct?ct+" "+Ae:Ae);else{var zt=ct&&ct.replace(Ae,"").trim();zt?Xe.setAttribute(We,zt):Xe.removeAttribute(We)}})}}function G(){if(!(L||!C.props.aria.expanded)){var pe=El(C.props.triggerTarget||t);pe.forEach(function(We){C.props.interactive?We.setAttribute("aria-expanded",C.state.isVisible&&We===V()?"true":"false"):We.removeAttribute("aria-expanded")})}}function Z(){z().removeEventListener("mousemove",b),zp=zp.filter(function(pe){return pe!==b})}function ge(pe){if(!(Yo.isTouch&&(l||pe.type==="mousedown"))){var We=pe.composedPath&&pe.composedPath()[0]||pe.target;if(!(C.props.interactive&&lP(M,We))){if(El(C.props.triggerTarget||t).some(function(Ae){return lP(Ae,We)})){if(Yo.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else K("onClickOutside",[C,pe]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),a=!0,setTimeout(function(){a=!1}),C.state.isMounted||ye())}}}function he(){l=!0}function me(){l=!1}function oe(){var pe=z();pe.addEventListener("mousedown",ge,!0),pe.addEventListener("touchend",ge,ya),pe.addEventListener("touchstart",me,ya),pe.addEventListener("touchmove",he,ya)}function ye(){var pe=z();pe.removeEventListener("mousedown",ge,!0),pe.removeEventListener("touchend",ge,ya),pe.removeEventListener("touchstart",me,ya),pe.removeEventListener("touchmove",he,ya)}function de(pe,We){Q(pe,function(){!C.state.isVisible&&M.parentNode&&M.parentNode.contains(M)&&We()})}function X(pe,We){Q(pe,We)}function Q(pe,We){var Ae=R().box;function qe(Xe){Xe.target===Ae&&(F1(Ae,"remove",qe),We())}if(pe===0)return We();F1(Ae,"remove",p),F1(Ae,"add",qe),p=qe}function ae(pe,We,Ae){Ae===void 0&&(Ae=!1);var qe=El(C.props.triggerTarget||t);qe.forEach(function(Xe){Xe.addEventListener(pe,We,Ae),m.push({node:Xe,eventType:pe,handler:We,options:Ae})})}function ve(){D()&&(ae("touchstart",ce,{passive:!0}),ae("touchend",xe,{passive:!0})),Hee(C.props.trigger).forEach(function(pe){if(pe!=="manual")switch(ae(pe,ce),pe){case"mouseenter":ae("mouseleave",xe);break;case"focus":ae(tte?"focusout":"blur",Te);break;case"focusin":ae("focusout",Te);break}})}function ne(){m.forEach(function(pe){var We=pe.node,Ae=pe.eventType,qe=pe.handler,Xe=pe.options;We.removeEventListener(Ae,qe,Xe)}),m=[]}function ce(pe){var We,Ae=!1;if(!(!C.state.isEnabled||_e(pe)||a)){var qe=((We=f)==null?void 0:We.type)==="focus";f=pe,y=pe.currentTarget,G(),!C.state.isVisible&&Uee(pe)&&zp.forEach(function(Xe){return Xe(pe)}),pe.type==="click"&&(C.props.trigger.indexOf("mouseenter")<0||s)&&C.props.hideOnClick!==!1&&C.state.isVisible?Ae=!0:re(pe),pe.type==="click"&&(s=!Ae),Ae&&!qe&&Me(pe)}}function fe(pe){var We=pe.target,Ae=V().contains(We)||M.contains(We);if(!(pe.type==="mousemove"&&Ae)){var qe=te().concat(M).map(function(Xe){var ct,zt=Xe._tippy,gr=(ct=zt.popperInstance)==null?void 0:ct.state;return gr?{popperRect:Xe.getBoundingClientRect(),popperState:gr,props:n}:null}).filter(Boolean);Jee(qe,pe)&&(Z(),Me(pe))}}function xe(pe){var We=_e(pe)||C.props.trigger.indexOf("click")>=0&&s;if(!We){if(C.props.interactive){C.hideWithInteractivity(pe);return}Me(pe)}}function Te(pe){C.props.trigger.indexOf("focusin")<0&&pe.target!==V()||C.props.interactive&&pe.relatedTarget&&M.contains(pe.relatedTarget)||Me(pe)}function _e(pe){return Yo.isTouch?D()!==pe.type.indexOf("touch")>=0:!1}function Ne(){He();var pe=C.props,We=pe.popperOptions,Ae=pe.placement,qe=pe.offset,Xe=pe.getReferenceClientRect,ct=pe.moveTransition,zt=F()?V1(M).arrow:null,gr=Xe?{getBoundingClientRect:Xe,contextElement:Xe.contextElement||V()}:t,Or={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Rl){var Ts=Rl.state;if(F()){var Hh=R(),Ju=Hh.box;["placement","reference-hidden","escaped"].forEach(function(Bl){Bl==="placement"?Ju.setAttribute("data-placement",Ts.placement):Ts.attributes.popper["data-popper-"+Bl]?Ju.setAttribute("data-"+Bl,""):Ju.removeAttribute("data-"+Bl)}),Ts.attributes.popper={}}}},Di=[{name:"offset",options:{offset:qe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ct}},Or];F()&&zt&&Di.push({name:"arrow",options:{element:zt,padding:3}}),Di.push.apply(Di,(We==null?void 0:We.modifiers)||[]),C.popperInstance=rE(gr,M,Object.assign({},We,{placement:Ae,onFirstUpdate:g,modifiers:Di}))}function He(){C.popperInstance&&(C.popperInstance.destroy(),C.popperInstance=null)}function W(){var pe=C.props.appendTo,We,Ae=V();C.props.interactive&&pe===nP||pe==="parent"?We=Ae.parentNode:We=rP(pe,[Ae]),We.contains(M)||We.appendChild(M),C.state.isMounted=!0,Ne(),process.env.NODE_ENV!=="production"&&Ei(C.props.interactive&&pe===Br.appendTo&&Ae.nextElementSibling!==M,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
356
+
357
+ `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
358
+
359
+ `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
360
+
361
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function te(){return Vp(M.querySelectorAll("[data-tippy-root]"))}function re(pe){C.clearDelayTimeouts(),pe&&K("onTrigger",[C,pe]),oe();var We=B(!0),Ae=O(),qe=Ae[0],Xe=Ae[1];Yo.isTouch&&qe==="hold"&&Xe&&(We=Xe),We?r=setTimeout(function(){C.show()},We):C.show()}function Me(pe){if(C.clearDelayTimeouts(),K("onUntrigger",[C,pe]),!C.state.isVisible){ye();return}if(!(C.props.trigger.indexOf("mouseenter")>=0&&C.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(pe.type)>=0&&s)){var We=B(!1);We?o=setTimeout(function(){C.state.isVisible&&C.hide()},We):i=requestAnimationFrame(function(){C.hide()})}}function Ie(){C.state.isEnabled=!0}function De(){C.hide(),C.state.isEnabled=!1}function je(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)}function ot(pe){if(process.env.NODE_ENV!=="production"&&Ei(C.state.isDestroyed,Ol("setProps")),!C.state.isDestroyed){K("onBeforeUpdate",[C,pe]),ne();var We=C.props,Ae=gP(t,Object.assign({},We,sP(pe),{ignoreAttributes:!0}));C.props=Ae,ve(),We.interactiveDebounce!==Ae.interactiveDebounce&&(Z(),b=oP(fe,Ae.interactiveDebounce)),We.triggerTarget&&!Ae.triggerTarget?El(We.triggerTarget).forEach(function(qe){qe.removeAttribute("aria-expanded")}):Ae.triggerTarget&&t.removeAttribute("aria-expanded"),G(),U(),A&&A(We,Ae),C.popperInstance&&(Ne(),te().forEach(function(qe){requestAnimationFrame(qe._tippy.popperInstance.forceUpdate)})),K("onAfterUpdate",[C,pe])}}function nt(pe){C.setProps({content:pe})}function At(){process.env.NODE_ENV!=="production"&&Ei(C.state.isDestroyed,Ol("show"));var pe=C.state.isVisible,We=C.state.isDestroyed,Ae=!C.state.isEnabled,qe=Yo.isTouch&&!C.props.touch,Xe=N1(C.props.duration,0,Br.duration);if(!(pe||We||Ae||qe)&&!V().hasAttribute("disabled")&&(K("onShow",[C],!1),C.props.onShow(C)!==!1)){if(C.state.isVisible=!0,F()&&(M.style.visibility="visible"),U(),oe(),C.state.isMounted||(M.style.transition="none"),F()){var ct=R(),zt=ct.box,gr=ct.content;$1([zt,gr],0)}g=function(){var Di;if(!(!C.state.isVisible||u)){if(u=!0,M.offsetHeight,M.style.transition=C.props.moveTransition,F()&&C.props.animation){var Yu=R(),Rl=Yu.box,Ts=Yu.content;$1([Rl,Ts],Xe),aP([Rl,Ts],"visible")}Y(),G(),iP(z1,C),(Di=C.popperInstance)==null||Di.forceUpdate(),K("onMount",[C]),C.props.animation&&F()&&X(Xe,function(){C.state.isShown=!0,K("onShown",[C])})}},W()}}function _n(){process.env.NODE_ENV!=="production"&&Ei(C.state.isDestroyed,Ol("hide"));var pe=!C.state.isVisible,We=C.state.isDestroyed,Ae=!C.state.isEnabled,qe=N1(C.props.duration,1,Br.duration);if(!(pe||We||Ae)&&(K("onHide",[C],!1),C.props.onHide(C)!==!1)){if(C.state.isVisible=!1,C.state.isShown=!1,u=!1,s=!1,F()&&(M.style.visibility="hidden"),Z(),ye(),U(!0),F()){var Xe=R(),ct=Xe.box,zt=Xe.content;C.props.animation&&($1([ct,zt],qe),aP([ct,zt],"hidden"))}Y(),G(),C.props.animation?F()&&de(qe,C.unmount):C.unmount()}}function ut(pe){process.env.NODE_ENV!=="production"&&Ei(C.state.isDestroyed,Ol("hideWithInteractivity")),z().addEventListener("mousemove",b),iP(zp,b),b(pe)}function Pn(){process.env.NODE_ENV!=="production"&&Ei(C.state.isDestroyed,Ol("unmount")),C.state.isVisible&&C.hide(),C.state.isMounted&&(He(),te().forEach(function(pe){pe._tippy.unmount()}),M.parentNode&&M.parentNode.removeChild(M),z1=z1.filter(function(pe){return pe!==C}),C.state.isMounted=!1,K("onHidden",[C]))}function $t(){process.env.NODE_ENV!=="production"&&Ei(C.state.isDestroyed,Ol("destroy")),!C.state.isDestroyed&&(C.clearDelayTimeouts(),C.unmount(),ne(),delete t._tippy,C.state.isDestroyed=!0,K("onDestroy",[C]))}}function Du(t,e){e===void 0&&(e={});var n=Br.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(ote(t),mP(e,n)),Qee();var r=Object.assign({},e,{plugins:n}),o=Gee(t);if(process.env.NODE_ENV!=="production"){var i=Au(r.content),s=o.length>1;Ei(i&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
362
+
363
+ `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
364
+
365
+ `,`1) content: element.innerHTML
366
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var a=o.reduce(function(l,u){var f=u&&dte(u,r);return f&&l.push(f),l},[]);return Au(t)?a[0]:a}Du.defaultProps=Br,Du.setDefaultProps=ate,Du.currentInput=Yo,Object.assign({},zk,{effect:function(e){var n=e.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),Du.setDefaultProps({render:vP});function fte(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var H1={exports:{}},j1={};/**
367
+ * @license React
368
+ * use-sync-external-store-shim.production.min.js
369
+ *
370
+ * Copyright (c) Facebook, Inc. and its affiliates.
371
+ *
372
+ * This source code is licensed under the MIT license found in the
373
+ * LICENSE file in the root directory of this source tree.
374
+ */var xP;function pte(){if(xP)return j1;xP=1;var t=q;function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function a(p,g){var m=g(),b=r({inst:{value:m,getSnapshot:g}}),y=b[0].inst,x=b[1];return i(function(){y.value=m,y.getSnapshot=g,l(y)&&x({inst:y})},[p,m,g]),o(function(){return l(y)&&x({inst:y}),p(function(){l(y)&&x({inst:y})})},[p]),s(m),m}function l(p){var g=p.getSnapshot;p=p.value;try{var m=g();return!n(p,m)}catch{return!0}}function u(p,g){return g()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return j1.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:f,j1}var W1={};/**
375
+ * @license React
376
+ * use-sync-external-store-shim.development.js
377
+ *
378
+ * Copyright (c) Facebook, Inc. and its affiliates.
379
+ *
380
+ * This source code is licensed under the MIT license found in the
381
+ * LICENSE file in the root directory of this source tree.
382
+ */var SP;function hte(){return SP||(SP=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=q,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(_){{for(var C=arguments.length,E=new Array(C>1?C-1:0),M=1;M<C;M++)E[M-1]=arguments[M];r("error",_,E)}}function r(_,C,E){{var M=e.ReactDebugCurrentFrame,A=M.getStackAddendum();A!==""&&(C+="%s",E=E.concat([A]));var I=E.map(function(L){return String(L)});I.unshift("Warning: "+C),Function.prototype.apply.call(console[_],console,I)}}function o(_,C){return _===C&&(_!==0||1/_===1/C)||_!==_&&C!==C}var i=typeof Object.is=="function"?Object.is:o,s=t.useState,a=t.useEffect,l=t.useLayoutEffect,u=t.useDebugValue,f=!1,p=!1;function g(_,C,E){f||t.startTransition!==void 0&&(f=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var M=C();if(!p){var A=C();i(M,A)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}var I=s({inst:{value:M,getSnapshot:C}}),L=I[0].inst,O=I[1];return l(function(){L.value=M,L.getSnapshot=C,m(L)&&O({inst:L})},[_,M,C]),a(function(){m(L)&&O({inst:L});var D=function(){m(L)&&O({inst:L})};return _(D)},[_]),u(M),M}function m(_){var C=_.getSnapshot,E=_.value;try{var M=C();return!i(E,M)}catch{return!0}}function b(_,C,E){return C()}var y=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",x=!y,w=x?b:g,T=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:w;W1.useSyncExternalStore=T,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),W1}process.env.NODE_ENV==="production"?H1.exports=pte():H1.exports=hte();var Hp=H1.exports;const gte=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},mte=({contentComponent:t})=>{const e=Hp.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return q.createElement(q.Fragment,null,Object.values(e))};function yte(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:Ls.createPortal(r.reactElement,r.element,n)},t.forEach(o=>o())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(o=>o())}}}class bte extends q.Component{constructor(e){var n;super(e),this.editorContentRef=q.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=e.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.options.element.childNodes),e.setOptions({element:n}),e.contentComponent=yte(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const e=this.props.editor;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild))return;const n=document.createElement("div");n.append(...e.options.element.childNodes),e.setOptions({element:n})}render(){const{editor:e,innerRef:n,...r}=this.props;return q.createElement(q.Fragment,null,q.createElement("div",{ref:gte(n,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&q.createElement(mte,{contentComponent:e.contentComponent}))}}const vte=q.forwardRef((t,e)=>{const n=q.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return q.createElement(bte,{key:n,innerRef:e,...t})}),xte=q.memo(vte);var Ste=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;for(o of e.entries())if(!t(o[1],n.get(o[0])))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(e[o]!==n[o])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},wte=fte(Ste),q1={exports:{}},U1={};/**
383
+ * @license React
384
+ * use-sync-external-store-shim/with-selector.production.min.js
385
+ *
386
+ * Copyright (c) Facebook, Inc. and its affiliates.
387
+ *
388
+ * This source code is licensed under the MIT license found in the
389
+ * LICENSE file in the root directory of this source tree.
390
+ */var wP;function Cte(){if(wP)return U1;wP=1;var t=q,e=Hp;function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;return U1.useSyncExternalStoreWithSelector=function(u,f,p,g,m){var b=i(null);if(b.current===null){var y={hasValue:!1,value:null};b.current=y}else y=b.current;b=a(function(){function w(M){if(!T){if(T=!0,_=M,M=g(M),m!==void 0&&y.hasValue){var A=y.value;if(m(A,M))return C=A}return C=M}if(A=C,r(_,M))return A;var I=g(M);return m!==void 0&&m(A,I)?A:(_=M,C=I)}var T=!1,_,C,E=p===void 0?null:p;return[function(){return w(f())},E===null?void 0:function(){return w(E())}]},[f,p,g,m]);var x=o(u,b[0],b[1]);return s(function(){y.hasValue=!0,y.value=x},[x]),l(x),x},U1}var K1={};/**
391
+ * @license React
392
+ * use-sync-external-store-shim/with-selector.development.js
393
+ *
394
+ * Copyright (c) Facebook, Inc. and its affiliates.
395
+ *
396
+ * This source code is licensed under the MIT license found in the
397
+ * LICENSE file in the root directory of this source tree.
398
+ */var CP;function _te(){return CP||(CP=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=q,e=Hp;function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;function u(f,p,g,m,b){var y=i(null),x;y.current===null?(x={hasValue:!1,value:null},y.current=x):x=y.current;var w=a(function(){var E=!1,M,A,I=function(F){if(!E){E=!0,M=F;var V=m(F);if(b!==void 0&&x.hasValue){var z=x.value;if(b(z,V))return A=z,z}return A=V,V}var R=M,B=A;if(r(R,F))return B;var U=m(F);return b!==void 0&&b(B,U)?B:(M=F,A=U,U)},L=g===void 0?null:g,O=function(){return I(p())},D=L===null?void 0:function(){return I(L())};return[O,D]},[p,g,m,b]),T=w[0],_=w[1],C=o(f,T,_);return s(function(){x.hasValue=!0,x.value=C},[C]),l(C),C}K1.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),K1}process.env.NODE_ENV==="production"?q1.exports=Cte():q1.exports=_te();var Tte=q1.exports;const kte=typeof window<"u"?q.useLayoutEffect:q.useEffect;class Ete{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const n=()=>{this.transactionNumber+=1,this.subscribers.forEach(o=>o())},r=this.editor;return r.on("transaction",n),()=>{r.off("transaction",n)}}}}function Ote(t){var e;const[n]=q.useState(()=>new Ete(t.editor)),r=Tte.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!==null&&e!==void 0?e:wte);return kte(()=>n.watch(t.editor),[t.editor,n]),q.useDebugValue(r),r}const _P=process.env.NODE_ENV!=="production",G1=typeof window>"u",Mte=G1||!!(typeof window<"u"&&window.next);class Y1{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return G1||Mte?(_P&&console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."),null):this.createEditor();if(this.options.current.immediatelyRender&&G1&&_P)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)===null||i===void 0?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)===null||i===void 0?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)===null||i===void 0?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)===null||i===void 0?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)===null||i===void 0?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)===null||i===void 0?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)===null||i===void 0?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)===null||i===void 0?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)===null||i===void 0?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)===null||i===void 0?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)===null||i===void 0?void 0:i.call(o,...r)}};return new uZ(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((o,i)=>{var s;return o===((s=n.extensions)===null||s===void 0?void 0:s[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?Y1.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,o)=>r===e[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}}function TP(t={},e=[]){const n=q.useRef(t);n.current=t;const[r]=q.useState(()=>new Y1(n)),o=Hp.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return q.useDebugValue(o),q.useEffect(r.onRender(e)),Ote({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1?null:t.immediatelyRender&&i===0?0:i+1}),o}q.createContext({editor:null}).Consumer;const kP=q.createContext({onDragStart:void 0}),EP=()=>q.useContext(kP),Ate=t=>{const e=t.as||"div",{nodeViewContentRef:n}=EP();return q.createElement(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style}})},J1=q.forwardRef((t,e)=>{const{onDragStart:n}=EP(),r=t.as||"div";return q.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function OP(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function MP(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.forward_ref)"||t.$$typeof.description==="react.forward_ref"))}function Ite(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.memo)"||t.$$typeof.description==="react.memo"))}function Dte(t){if(OP(t)||MP(t))return!0;if(Ite(t)){const e=t.type;if(e)return OP(e)||MP(e)}return!1}function Pte(){try{if(q.version)return parseInt(q.version.split(".")[0],10)>=19}catch{}return!1}class AP{constructor(e,{editor:n,props:r={},as:o="div",className:i=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=n,this.props=r,this.element=document.createElement(o),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?Ls.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;const n=this.component,r=this.props,o=this.editor,i=Pte(),s=Dte(n),a={...r};a.ref&&!(i||s)&&delete a.ref,!a.ref&&(i||s)&&(a.ref=l=>{this.ref=l}),this.reactElement=q.createElement(n,{...a}),(e=o==null?void 0:o.contentComponent)===null||e===void 0||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;const n=this.editor;(e=n==null?void 0:n.contentComponent)===null||e===void 0||e.removeRenderer(this.id)}updateAttributes(e){Object.keys(e).forEach(n=>{this.element.setAttribute(n,e[n])})}}class Nte extends dZ{constructor(e,n,r){if(super(e,n,r),!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const o=this.dom.querySelector("[data-node-view-content]");if(!o)return;o.appendChild(this.contentDOMElement)}}mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(u={})=>this.updateAttributes(u),deleteNode:()=>this.deleteNode(),ref:q.createRef()};if(!this.component.displayName){const u=f=>f.charAt(0).toUpperCase()+f.substring(1);this.component.displayName=u(this.extension.name)}const o={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:u=>{u&&this.contentDOMElement&&u.firstChild!==this.contentDOMElement&&(u.hasAttribute("data-node-view-wrapper")&&u.removeAttribute("data-node-view-wrapper"),u.appendChild(this.contentDOMElement))}},i=this.component,s=q.memo(u=>q.createElement(kP.Provider,{value:o},q.createElement(i,u)));s.displayName="ReactNodeView";let a=this.node.isInline?"span":"div";this.options.as&&(a=this.options.as);const{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new AP(s,{editor:this.editor,props:e,as:a,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(!((e=this.renderer.element.firstElementChild)===null||e===void 0)&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:e,to:n}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(e<=r&&n>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,n,r){const o=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,s=this.decorations,a=this.innerDecorations;return this.node=e,this.decorations=n,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:s,newNode:e,newDecorations:n,oldInnerDecorations:a,innerDecorations:r,updateProps:()=>o({node:e,decorations:n,innerDecorations:r})})}return e===this.node&&this.decorations===n&&this.innerDecorations===r||(this.node=e,this.decorations=n,this.innerDecorations=r,o({node:e,decorations:n,innerDecorations:r})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){const n=this.editor.extensionManager.attributes,r=xp(this.node,n);e=this.options.attrs({node:this.node,HTMLAttributes:r})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function X1(t,e){return n=>n.editor.contentComponent?new Nte(t,n,e):{}}const Z1=ma("RichTextContent",["root","readonly","editable"]),Lte=en({name:{RichTextContent:Q1}})((t,{disableDefaultStyles:e=!1})=>({root:e?{}:{"& .ProseMirror":{...AD(t)}},readonly:{},editable:{}}));function Q1({className:t,classes:e={},disableDefaultStyles:n=!1,...r}){const{classes:o,cx:i}=Lte({disableDefaultStyles:n},{props:{classes:e}}),s=_t(),a=q.useMemo(()=>i(Z1.root,t,o.root,s!=null&&s.isEditable?[Z1.editable,o.editable]:[Z1.readonly,o.readonly]),[t,o,i,s==null?void 0:s.isEditable]);return v.jsx($.Box,{...r,className:a,component:xte,editor:s})}function IP({editor:t,children:e}){return v.jsx(DD.Provider,{value:t,children:e})}const Ml=ma("FieldContainer",["root","outlined","standard","focused","disabled","notchedOutline"]),$te=en({name:{FieldContainer:DP},uniqId:"Os7ZPW"})((t,e,n)=>({root:{},outlined:{borderRadius:t.shape.borderRadius,padding:1,position:"relative",[`&:hover .${n.notchedOutline}`]:{borderColor:t.palette.text.primary},[`&.${n.focused} .${n.notchedOutline}`]:{borderColor:t.palette.primary.main,borderWidth:2},[`&.${n.disabled} .${n.notchedOutline}`]:{borderColor:t.palette.action.disabled}},standard:{},focused:{},disabled:{},notchedOutline:{position:"absolute",inset:0,borderRadius:"inherit",borderColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)",borderStyle:"solid",borderWidth:1,pointerEvents:"none",overflow:"hidden",zIndex:Rp.NOTCHED_OUTLINE}}));function DP({variant:t="outlined",children:e,focused:n,disabled:r,classes:o={},className:i,...s}){const{classes:a,cx:l}=$te(void 0,{props:{classes:o}});return v.jsxs($.Box,{...s,className:l(Ml.root,a.root,t==="outlined"?[Ml.outlined,a.outlined]:[Ml.standard,a.standard],n&&[Ml.focused,a.focused],r&&[Ml.disabled,a.disabled],i),children:[e,t==="outlined"&&v.jsx("div",{className:l(Ml.notchedOutline,a.notchedOutline),"aria-hidden":!0})]})}var Fte=W_();const PP=cr(Fte);function NP({editor:t,wait:e=250}){const[n,r]=q.useState(!!(t!=null&&t.isFocused)),o=q.useMemo(()=>PP(i=>{r(i)},e),[e]);return q.useEffect(()=>{const i=!!(t!=null&&t.isFocused);return o(i),i&&o.flush(),()=>{o.cancel()}},[t==null?void 0:t.isFocused,o]),n}class ex extends q.Component{constructor(e){var n,r;super(e),this.updateDebounced=PP(this.forceUpdate,(n=e.wait)!==null&&n!==void 0?n:170,(r=e.options)!==null&&r!==void 0?r:{leading:!0,trailing:!0,maxWait:300})}shouldComponentUpdate(){return this.updateDebounced(),!1}componentWillUnmount(){this.updateDebounced.cancel()}render(){return this.props.children}}const Al=ma("RichTextField",["root","standard","outlined","menuBar","menuBarContent","content"]),Rte=en({name:{RichTextField:LP},uniqId:"E2Alw3"})((t,e,n)=>({root:{},standard:{[`& .${n.content}`]:{padding:t.spacing(1.5,0)},[`& .${n.menuBarContent}`]:{padding:t.spacing(1,0)}},outlined:{[`& .${n.content}`]:{padding:t.spacing(1.5)},[`& .${n.menuBarContent}`]:{padding:t.spacing(1,1.5)}},menuBar:{},menuBarContent:{},content:{}}));function LP({variant:t="outlined",controls:e,disableDebounceRenderControls:n=!1,disabled:r,className:o,classes:i={},footer:s,MenuBarProps:a,RichTextContentProps:l,...u}){var f,p;const{classes:g,cx:m}=Rte(void 0,{props:{classes:i}}),b=_t(),y=NP({editor:b});return v.jsxs(DP,{...u,variant:t,focused:!r&&y,disabled:r,className:m(Al.root,g.root,t==="outlined"?[Al.outlined,g.outlined]:[Al.standard,g.standard],o),children:[e&&v.jsx(ZD,{...a,classes:{...a==null?void 0:a.classes,root:m(Al.menuBar,g.menuBar,(f=a==null?void 0:a.classes)===null||f===void 0?void 0:f.root),content:m(Al.content,g.menuBarContent,(p=a==null?void 0:a.classes)===null||p===void 0?void 0:p.content)},children:n?e:v.jsx(ex,{children:e})}),v.jsx(Q1,{...l,className:m(Al.content,g.content,l==null?void 0:l.className)}),s]})}const $P=q.forwardRef(function({className:e,renderControls:n,RichTextFieldProps:r={},sx:o,children:i,editorDependencies:s=[],editable:a=!0,...l},u){const f=TP({editable:a,...l},s);return q.useImperativeHandle(u,()=>({editor:f}),[f]),q.useEffect(()=>{!f||f.isDestroyed||f.isEditable===a||queueMicrotask(()=>{f.setEditable(a)})},[a,f]),v.jsxs(IP,{editor:f,children:[v.jsx(LP,{disabled:!a,controls:n==null?void 0:n(f),className:e,sx:o,...r}),i==null?void 0:i(f)]})});function Bte({RichTextContentProps:t,sx:e,...n}){const r=TP({...n,editable:!1}),o=q.useRef(n.content);return q.useEffect(()=>{!r||r.isDestroyed||n.content===void 0||n.content===o.current||queueMicrotask(()=>{n.content!==void 0&&r.commands.setContent(n.content)})},[n.content,r]),q.useEffect(()=>{o.current=n.content},[n.content]),v.jsx(IP,{editor:r,children:v.jsx(Q1,{sx:e,...t})})}function Vte(t){return t.content?v.jsx(Bte,{...t}):null}const zte=$.createSvgIcon(v.jsxs(v.Fragment,{children:[v.jsx("path",{d:"M20 3H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2zM4 19V7h16l.002 12H4z"}),v.jsx("path",{d:"M9.293 9.293 5.586 13l3.707 3.707 1.414-1.414L8.414 13l2.293-2.293zm5.414 0-1.414 1.414L15.586 13l-2.293 2.293 1.414 1.414L18.414 13z"})]}),"CodeBlock"),Hte=$.createSvgIcon(v.jsx("path",{d:"M12 3C12.5523 3 13 3.44772 13 4L12.9998 11.9998C13.8355 11.372 14.8743 11 16 11C18.7614 11 21 13.2386 21 16C21 18.7614 18.7614 21 16 21C14.9681 21 14.0092 20.6874 13.2129 20.1518L13 20C13 20.5523 12.5523 21 12 21H6C5.44772 21 5 20.5523 5 20V4C5 3.44772 5.44772 3 6 3H12ZM11 5H7V19H11V5ZM19 15H13V17H19V15Z"}),"DeleteColumn"),jte=$.createSvgIcon(v.jsx("path",{d:"M20 5C20.5523 5 21 5.44772 21 6V12C21 12.5523 20.5523 13 20 13C20.628 13.8355 21 14.8743 21 16C21 18.7614 18.7614 21 16 21C13.2386 21 11 18.7614 11 16C11 14.8743 11.372 13.8355 11.9998 12.9998L4 13C3.44772 13 3 12.5523 3 12V6C3 5.44772 3.44772 5 4 5H20ZM13 15V17H19V15H13ZM19 7H5V11H19V7Z"}),"DeleteRow"),Wte=$.createSvgIcon(v.jsx("path",{d:"M 2 20 h 20 v 4 H 2 v -4 z"}),"FormatColorBar"),qte=$.createSvgIcon(v.jsx("path",{d:"M 5.49 17 h 2.42 l 1.27 -3.58 h 5.65 L 16.09 17 h 2.42 L 13.25 3 h -2.5 L 5.49 17 z m 4.42 -5.61 l 2.03 -5.79 h 0.12 l 2.03 5.79 H 9.91 z"}),"FormatColorTextNoBar"),Ute=$.createSvgIcon(v.jsx("path",{d:"M 10.6 8 l 5.4 5.425 l -4 4 q -0.6 0.6 -1.413 0.6 t -1.412 -0.6 L 8.5 18 h -5 l 3.15 -3.125 q -0.6 -0.6 -0.625 -1.438 T 6.6 12 l 4 -4 Z M 12 6.575 L 16 2.6 q 0.6 -0.6 1.413 -0.6 t 1.412 0.6 l 2.6 2.575 q 0.6 0.6 0.6 1.413 T 21.425 8 l -4 4 L 12 6.575 Z"}),"FormatInkHighlighterNoBar"),Kte=$.createSvgIcon(v.jsx("path",{d:"M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H14C13.4477 21 13 20.5523 13 20V4C13 3.44772 13.4477 3 14 3H20ZM19 5H15V19H19V5ZM6 7C8.76142 7 11 9.23858 11 12C11 14.7614 8.76142 17 6 17C3.23858 17 1 14.7614 1 12C1 9.23858 3.23858 7 6 7ZM7 9H5V10.999L3 11V13L5 12.999V15H7V12.999L9 13V11L7 10.999V9Z"}),"InsertColumnLeft"),Gte=$.createSvgIcon(v.jsx("path",{d:"M10 3C10.5523 3 11 3.44772 11 4V20C11 20.5523 10.5523 21 10 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H10ZM9 5H5V19H9V5ZM18 7C20.7614 7 23 9.23858 23 12C23 14.7614 20.7614 17 18 17C15.2386 17 13 14.7614 13 12C13 9.23858 15.2386 7 18 7ZM19 9H17V10.999L15 11V13L17 12.999V15H19V12.999L21 13V11L19 10.999V9Z"}),"InsertColumnRight"),Yte=$.createSvgIcon(v.jsx("path",{d:"M12 13C14.7614 13 17 15.2386 17 18C17 20.7614 14.7614 23 12 23C9.23858 23 7 20.7614 7 18C7 15.2386 9.23858 13 12 13ZM13 15H11V16.999L9 17V19L11 18.999V21H13V18.999L15 19V17L13 16.999V15ZM20 3C20.5523 3 21 3.44772 21 4V10C21 10.5523 20.5523 11 20 11H4C3.44772 11 3 10.5523 3 10V4C3 3.44772 3.44772 3 4 3H20ZM5 5V9H19V5H5Z"}),"InsertRowBottom"),Jte=$.createSvgIcon(v.jsx("path",{d:"M20 13C20.5523 13 21 13.4477 21 14V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V14C3 13.4477 3.44772 13 4 13H20ZM19 15H5V19H19V15ZM12 1C14.7614 1 17 3.23858 17 6C17 8.76142 14.7614 11 12 11C9.23858 11 7 8.76142 7 6C7 3.23858 9.23858 1 12 1ZM13 3H11V4.999L9 5V7L11 6.999V9H13V6.999L15 7V5L13 4.999V3Z"}),"InsertRowTop"),Xte=$.createSvgIcon(v.jsx("path",{d:"M12 5V19H19V5H12ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3Z"}),"LayoutColumnFill"),Zte=$.createSvgIcon(v.jsx("path",{d:"M19 12H5V19H19V12ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3Z"}),"LayoutRowFill"),Qte=$.createSvgIcon(v.jsx("path",{d:"M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V10.999H7V9L10 12L7 15V13H5V19H11V17H13V19H19V13H17V15L14 12L17 9V10.999H19V5H13V7H11V5ZM13 13V15H11V13H13ZM13 9V11H11V9H13Z"}),"MergeCellsHorizontal"),ene=$.createSvgIcon(v.jsx("path",{d:"M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V19H11V15H13V19H19V5H13V9H11V5ZM15 9L18 12L15 15V13H9V15L6 12L9 9V11H15V9Z"}),"SplitCellsHorizontal"),tne=$.createSvgIcon(v.jsx("path",{d:"M4 21h15.893c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2zm0-2v-5h4v5H4zM14 7v5h-4V7h4zM8 7v5H4V7h4zm2 12v-5h4v5h-4zm6 0v-5h3.894v5H16zm3.893-7H16V7h3.893v5z"}),"Table");let tx,nx;function nne(){return tx===void 0&&(tx=navigator.platform.includes("Mac")),tx}function rne(){return nne()?"⌘":"Ctrl"}function one(){return nx===void 0&&(nx=window&&"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),nx}const ine=en({name:{MenuButtonTooltip:Mo}})(t=>({titleContainer:{textAlign:"center"},label:{fontSize:t.typography.pxToRem(13)},shortcutKey:{fontSize:t.typography.pxToRem(12),border:`1px solid ${$.alpha(t.palette.text.secondary,.2)}`,backgroundColor:$.alpha(t.palette.background.paper,.3),height:"19px",lineHeight:"19px",padding:"0 4px",minWidth:17,borderRadius:t.shape.borderRadius,display:"inline-block","&:not(:first-of-type)":{marginLeft:1}}}));function Mo({label:t,shortcutKeys:e,placement:n="top",contentWrapperClassName:r,children:o,...i}){const{classes:s}=ine();return v.jsx($.Tooltip,{title:t||e&&e.length>0?v.jsxs("div",{className:s.titleContainer,children:[v.jsx("div",{className:s.label,children:t}),e&&e.length>0&&v.jsx($.Typography,{variant:"body2",component:"div",children:e.map((a,l)=>v.jsx("span",{className:s.shortcutKey,children:a==="mod"?rne():a},l))})]}):"",placement:n,arrow:!0,...i,children:v.jsx("span",{className:r,children:o})})}const Pu="1.25rem",sne=en({name:{MenuButton:St}})({root:{[`&& .${$.toggleButtonClasses.root}`]:{border:"none",padding:5}},menuButtonIcon:{fontSize:Pu}});function St({tooltipLabel:t,tooltipShortcutKeys:e,IconComponent:n,buttonRef:r,children:o,...i}){const{classes:s}=sne();return v.jsx("span",{className:s.root,children:v.jsx(Mo,{label:t,shortcutKeys:e,children:v.jsx($.ToggleButton,{ref:r,size:"small",value:t,...i,children:o??(n&&v.jsx(n,{className:s.menuButtonIcon}))})})})}const ane=en({name:{MenuControlsContainer:jp}})(t=>({root:{display:"flex",rowGap:t.spacing(.3),columnGap:t.spacing(.3),alignItems:"center",flexWrap:"wrap"}}));function jp({children:t,className:e,debounced:n,DebounceProps:r,...o}){const{classes:i,cx:s}=ane(),a=v.jsx($.Box,{...o,className:s(i.root,e),children:t});return n?v.jsx(ex,{...r,children:a}):a}function lne({className:t,labels:e}){var n,r,o,i,s,a,l,u,f,p,g,m,b;const y=_t();return v.jsxs(jp,{className:t,children:[v.jsx(St,{tooltipLabel:(n=e==null?void 0:e.insertColumnBefore)!==null&&n!==void 0?n:"Insert column before",IconComponent:Kte,onClick:()=>y==null?void 0:y.chain().focus().addColumnBefore().run(),disabled:!(y!=null&&y.can().addColumnBefore())}),v.jsx(St,{tooltipLabel:(r=e==null?void 0:e.insertColumnAfter)!==null&&r!==void 0?r:"Insert column after",IconComponent:Gte,onClick:()=>y==null?void 0:y.chain().focus().addColumnAfter().run(),disabled:!(y!=null&&y.can().addColumnAfter())}),v.jsx(St,{tooltipLabel:(o=e==null?void 0:e.deleteColumn)!==null&&o!==void 0?o:"Delete column",IconComponent:Hte,onClick:()=>y==null?void 0:y.chain().focus().deleteColumn().run(),disabled:!(y!=null&&y.can().deleteColumn())}),v.jsx(Vn,{}),v.jsx(St,{tooltipLabel:(i=e==null?void 0:e.insertRowAbove)!==null&&i!==void 0?i:"Insert row above",IconComponent:Jte,onClick:()=>y==null?void 0:y.chain().focus().addRowBefore().run(),disabled:!(y!=null&&y.can().addRowBefore())}),v.jsx(St,{tooltipLabel:(s=e==null?void 0:e.insertRowBelow)!==null&&s!==void 0?s:"Insert row below",IconComponent:Yte,onClick:()=>y==null?void 0:y.chain().focus().addRowAfter().run(),disabled:!(y!=null&&y.can().addRowAfter())}),v.jsx(St,{tooltipLabel:(a=e==null?void 0:e.deleteRow)!==null&&a!==void 0?a:"Delete row",IconComponent:jte,onClick:()=>y==null?void 0:y.chain().focus().deleteRow().run(),disabled:!(y!=null&&y.can().deleteRow())}),v.jsx(Vn,{}),v.jsx(St,{tooltipLabel:(l=e==null?void 0:e.mergeCells)!==null&&l!==void 0?l:"Merge cells",IconComponent:Qte,onClick:()=>y==null?void 0:y.chain().focus().mergeCells().run(),disabled:!(y!=null&&y.can().mergeCells())}),v.jsx(St,{tooltipLabel:(u=e==null?void 0:e.splitCell)!==null&&u!==void 0?u:"Split cell",IconComponent:ene,onClick:()=>y==null?void 0:y.chain().focus().splitCell().run(),disabled:!(y!=null&&y.can().splitCell())}),v.jsx(Vn,{}),v.jsx(St,{tooltipLabel:(f=e==null?void 0:e.toggleHeaderRow)!==null&&f!==void 0?f:"Toggle header row",IconComponent:Zte,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderRow().run(),disabled:!(y!=null&&y.can().toggleHeaderRow())}),v.jsx(St,{tooltipLabel:(p=e==null?void 0:e.toggleHeaderColumn)!==null&&p!==void 0?p:"Toggle header column",IconComponent:Xte,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderColumn().run(),disabled:!(y!=null&&y.can().toggleHeaderColumn())}),v.jsx(St,{tooltipLabel:(g=e==null?void 0:e.toggleHeaderCell)!==null&&g!==void 0?g:"Toggle header cell",IconComponent:Rz,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderCell().run(),disabled:!(y!=null&&y.can().toggleHeaderCell()),selected:(m=y==null?void 0:y.isActive("tableHeader"))!==null&&m!==void 0?m:!1}),v.jsx(Vn,{}),v.jsx(St,{tooltipLabel:(b=e==null?void 0:e.deleteTable)!==null&&b!==void 0?b:"Delete table",IconComponent:Kz,onClick:()=>y==null?void 0:y.chain().focus().deleteTable().run(),disabled:!(y!=null&&y.can().deleteTable())})]})}const cne=en({name:{TableBubbleMenu:FP}})(t=>({controls:{maxWidth:"90vw",padding:t.spacing(.5,1)}}));function FP({disableDebounce:t=!1,DebounceProps:e,labels:n,...r}){const o=_t(),{classes:i}=cne(),s=NP({editor:o}),a=q.useMemo(()=>o?{getBoundingClientRect:()=>{const u=o.isActive("table")?Nb(o.state.selection.$anchor,m=>m.type.name==="table"):null;if(u){const m=o.view.nodeDOM(u.pos),b=m==null?void 0:m.querySelector("table");if(b)return b.getBoundingClientRect()}const{ranges:f}=o.state.selection,p=Math.min(...f.map(m=>m.$from.pos)),g=Math.max(...f.map(m=>m.$to.pos));return OA(o.view,p,g)}}:null,[o]);if(!(o!=null&&o.isEditable))return null;const l=v.jsx(lne,{className:i.controls,labels:n});return v.jsx(Bp,{editor:o,open:s&&o.isActive("table"),anchorEl:a,placement:"top-start",fallbackPlacements:["bottom-start","top","bottom","top-end","bottom-end"],flipPadding:{top:35,left:8,right:8,bottom:-1/0},...r,children:t?l:v.jsx(ex,{...e,children:l})})}function Il(){return(Il=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function rx(t,e){if(t==null)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e.indexOf(n=i[r])>=0||(o[n]=t[n]);return o}function ox(t){var e=q.useRef(t),n=q.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var Dl=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},Nu=function(t){return"touches"in t},ix=function(t){return t&&t.ownerDocument.defaultView||self},RP=function(t,e,n){var r=t.getBoundingClientRect(),o=Nu(e)?function(i,s){for(var a=0;a<i.length;a++)if(i[a].identifier===s)return i[a];return i[0]}(e.touches,n):e;return{left:Dl((o.pageX-(r.left+ix(t).pageXOffset))/r.width),top:Dl((o.pageY-(r.top+ix(t).pageYOffset))/r.height)}},BP=function(t){!Nu(t)&&t.preventDefault()},sx=q.memo(function(t){var e=t.onMove,n=t.onKey,r=rx(t,["onMove","onKey"]),o=q.useRef(null),i=ox(e),s=ox(n),a=q.useRef(null),l=q.useRef(!1),u=q.useMemo(function(){var m=function(x){BP(x),(Nu(x)?x.touches.length>0:x.buttons>0)&&o.current?i(RP(o.current,x,a.current)):y(!1)},b=function(){return y(!1)};function y(x){var w=l.current,T=ix(o.current),_=x?T.addEventListener:T.removeEventListener;_(w?"touchmove":"mousemove",m),_(w?"touchend":"mouseup",b)}return[function(x){var w=x.nativeEvent,T=o.current;if(T&&(BP(w),!function(C,E){return E&&!Nu(C)}(w,l.current)&&T)){if(Nu(w)){l.current=!0;var _=w.changedTouches||[];_.length&&(a.current=_[0].identifier)}T.focus(),i(RP(T,w,a.current)),y(!0)}},function(x){var w=x.which||x.keyCode;w<37||w>40||(x.preventDefault(),s({left:w===39?.05:w===37?-.05:0,top:w===40?.05:w===38?-.05:0}))},y]},[s,i]),f=u[0],p=u[1],g=u[2];return q.useEffect(function(){return g},[g]),q.createElement("div",Il({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:o,onKeyDown:p,tabIndex:0,role:"slider"}))}),Lu=function(t){return t.filter(Boolean).join(" ")},ax=function(t){var e=t.color,n=t.left,r=t.top,o=r===void 0?.5:r,i=Lu(["react-colorful__pointer",t.className]);return q.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},q.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},zn=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},VP=function(t){return fne(lx(t))},lx=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?zn(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?zn(parseInt(t.substring(6,8),16)/255,2):1}},zP=function(t){return dne(une(t))},HP=function(t){var e=t.s,n=t.v,r=t.a,o=(200-e)*n/100;return{h:zn(t.h),s:zn(o>0&&o<200?e*n/100/(o<=100?o:200-o)*100:0),l:zn(o/2),a:zn(r,2)}},cx=function(t){var e=HP(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},ux=function(t){var e=HP(t);return"hsla("+e.h+", "+e.s+"%, "+e.l+"%, "+e.a+")"},une=function(t){var e=t.h,n=t.s,r=t.v,o=t.a;e=e/360*6,n/=100,r/=100;var i=Math.floor(e),s=r*(1-n),a=r*(1-(e-i)*n),l=r*(1-(1-e+i)*n),u=i%6;return{r:zn(255*[r,a,s,s,l,r][u]),g:zn(255*[l,r,r,a,s,s][u]),b:zn(255*[s,s,l,r,r,a][u]),a:zn(o,2)}},Wp=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},dne=function(t){var e=t.r,n=t.g,r=t.b,o=t.a,i=o<1?Wp(zn(255*o)):"";return"#"+Wp(e)+Wp(n)+Wp(r)+i},fne=function(t){var e=t.r,n=t.g,r=t.b,o=t.a,i=Math.max(e,n,r),s=i-Math.min(e,n,r),a=s?i===e?(n-r)/s:i===n?2+(r-e)/s:4+(e-n)/s:0;return{h:zn(60*(a<0?a+6:a)),s:zn(i?s/i*100:0),v:zn(i/255*100),a:o}},jP=q.memo(function(t){var e=t.hue,n=t.onChange,r=Lu(["react-colorful__hue",t.className]);return q.createElement("div",{className:r},q.createElement(sx,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:Dl(e+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":zn(e),"aria-valuemax":"360","aria-valuemin":"0"},q.createElement(ax,{className:"react-colorful__hue-pointer",left:e/360,color:cx({h:e,s:100,v:100,a:1})})))}),WP=q.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:cx({h:e.h,s:100,v:100,a:1})};return q.createElement("div",{className:"react-colorful__saturation",style:r},q.createElement(sx,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:Dl(e.s+100*o.left,0,100),v:Dl(e.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+zn(e.s)+"%, Brightness "+zn(e.v)+"%"},q.createElement(ax,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:cx(e)})))}),qP=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},UP=function(t,e){return t.toLowerCase()===e.toLowerCase()||qP(lx(t),lx(e))};function KP(t,e,n){var r=ox(n),o=q.useState(function(){return t.toHsva(e)}),i=o[0],s=o[1],a=q.useRef({color:e,hsva:i});q.useEffect(function(){if(!t.equal(e,a.current.color)){var u=t.toHsva(e);a.current={hsva:u,color:e},s(u)}},[e,t]),q.useEffect(function(){var u;qP(i,a.current.hsva)||t.equal(u=t.fromHsva(i),a.current.color)||(a.current={hsva:i,color:u},r(u))},[i,t,r]);var l=q.useCallback(function(u){s(function(f){return Object.assign({},f,u)})},[]);return[i,l]}var pne=typeof window<"u"?q.useLayoutEffect:q.useEffect,hne=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},GP=new Map,YP=function(t){pne(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!GP.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,GP.set(e,n);var r=hne();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},gne=function(t){var e=t.className,n=t.colorModel,r=t.color,o=r===void 0?n.defaultColor:r,i=t.onChange,s=rx(t,["className","colorModel","color","onChange"]),a=q.useRef(null);YP(a);var l=KP(n,o,i),u=l[0],f=l[1],p=Lu(["react-colorful",e]);return q.createElement("div",Il({},s,{ref:a,className:p}),q.createElement(WP,{hsva:u,onChange:f}),q.createElement(jP,{hue:u.h,onChange:f,className:"react-colorful__last-control"}))},mne={defaultColor:"000",toHsva:VP,fromHsva:function(t){return zP({h:t.h,s:t.s,v:t.v,a:1})},equal:UP},yne=function(t){return q.createElement(gne,Il({},t,{colorModel:mne}))},bne=function(t){var e=t.className,n=t.hsva,r=t.onChange,o={backgroundImage:"linear-gradient(90deg, "+ux(Object.assign({},n,{a:0}))+", "+ux(Object.assign({},n,{a:1}))+")"},i=Lu(["react-colorful__alpha",e]),s=zn(100*n.a);return q.createElement("div",{className:i},q.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),q.createElement(sx,{onMove:function(a){r({a:a.left})},onKey:function(a){r({a:Dl(n.a+a.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},q.createElement(ax,{className:"react-colorful__alpha-pointer",left:n.a,color:ux(n)})))},vne=function(t){var e=t.className,n=t.colorModel,r=t.color,o=r===void 0?n.defaultColor:r,i=t.onChange,s=rx(t,["className","colorModel","color","onChange"]),a=q.useRef(null);YP(a);var l=KP(n,o,i),u=l[0],f=l[1],p=Lu(["react-colorful",e]);return q.createElement("div",Il({},s,{ref:a,className:p}),q.createElement(WP,{hsva:u,onChange:f}),q.createElement(jP,{hue:u.h,onChange:f}),q.createElement(bne,{hsva:u,onChange:f,className:"react-colorful__last-control"}))},xne={defaultColor:"0001",toHsva:VP,fromHsva:zP,equal:UP},Sne=function(t){return q.createElement(vne,Il({},t,{colorModel:xne}))};function wne(t){try{return $.rgbToHex(t)}catch{return null}}const dx=q.forwardRef(({value:t,label:e,padding:n,active:r,...o},i)=>{const{classes:s,cx:a,theme:l}=Cne();return v.jsx("button",{ref:i,type:"button",style:{backgroundColor:t,padding:n},"aria-label":e??t,value:t,...o,className:a(s.root,!t&&s.colorNotSet,o.className),children:r&&v.jsx(kz,{fontSize:"small",className:s.activeIcon,style:{color:t?l.palette.getContrastText(t):void 0}})})}),Cne=en({name:{ColorSwatchButton:dx}})(t=>({root:{height:t.spacing(2.5),width:t.spacing(2.5),minWidth:t.spacing(2.5),borderRadius:t.shape.borderRadius,borderColor:t.palette.mode==="dark"?t.palette.grey[700]:t.palette.grey[400],borderStyle:"solid",borderWidth:1,cursor:"pointer",padding:0,backgroundClip:"content-box"},activeIcon:{height:"100%",width:"80%",verticalAlign:"middle"},colorNotSet:{background:`repeating-conic-gradient(
399
+ ${t.palette.grey[400]} 0% 25%, ${t.palette.common.white} 0% 50%)
400
+ 50% / 12px 12px`,backgroundClip:"content-box"}}));dx.displayName="ColorSwatchButton";const qp=ma("ColorPicker",["gradientPicker","colorTextInput","swatchContainer"]),_ne=en({name:{ColorPicker:JP}})(t=>({gradientPicker:{"&&":{width:"100%"}},colorTextInput:{marginTop:t.spacing(1)},swatchContainer:{display:"flex",flexWrap:"wrap",gap:5,marginTop:t.spacing(1)}}));function JP({value:t,onChange:e,swatchColors:n,colorToHex:r=wne,disableAlpha:o=!1,labels:i={},classes:s={}}){const{classes:a,cx:l}=_ne(void 0,{props:{classes:s}}),{textFieldPlaceholder:u='Ex: "#7cb5ec"'}=i,f=q.useRef(null);q.useEffect(()=>{f.current&&f.current!==document.activeElement&&(f.current.value=t)},[t]);const p=(n??[]).map(m=>typeof m=="string"?{value:m}:m),g=r(t);return v.jsxs(v.Fragment,{children:[o?v.jsx(yne,{color:g??"#000000",className:l(qp.gradientPicker,a.gradientPicker),onChange:m=>{e(m,"gradient")}}):v.jsx(Sne,{color:g??"#000000",className:l(qp.gradientPicker,a.gradientPicker),onChange:m=>{e(m,"gradient")}}),v.jsx($.TextField,{placeholder:u,variant:"outlined",size:"small",defaultValue:t||"",inputRef:f,spellCheck:!1,className:l(qp.colorTextInput,a.colorTextInput),onChange:m=>{const b=m.target.value,y=r(b);y&&e(y,"text")},fullWidth:!0}),p.length>0&&v.jsx("div",{className:l(qp.swatchContainer,a.swatchContainer),children:p.map(m=>v.jsx(dx,{value:m.value,label:m.label,onClick:()=>{var b;e((b=m.value)!==null&&b!==void 0?b:"","swatch")},active:m.value==t||!m.value&&!t||!!m.value&&!!g&&r(m.value)===g},m.value))})]})}function Tne({value:t,onCancel:e,onSave:n,swatchColors:r,labels:o={},ColorPickerProps:i}){const{removeColorButton:s="None",removeColorButtonTooltipTitle:a="",cancelButton:l="Cancel",saveButton:u="OK"}=o,[f,p]=q.useState(t);return q.useEffect(()=>{p(t)},[t]),v.jsxs(v.Fragment,{children:[v.jsx(JP,{swatchColors:r,value:f,onChange:g=>{p(g)},labels:o,...i}),v.jsxs($.Stack,{direction:"row",justifyContent:"space-between",sx:{mt:1},children:[v.jsx($.Tooltip,{title:a,arrow:!0,children:v.jsx($.Button,{onClick:()=>{n("")},size:"small",children:s})}),v.jsx($.Button,{onClick:e,size:"small",children:l}),v.jsx($.Button,{onClick:()=>{n(f)},size:"small",children:u})]})]})}const kne=en({name:{ColorPickerPopper:XP}})(t=>({root:{zIndex:t.zIndex.tooltip,width:235}}));function XP({value:t,onSave:e,onCancel:n,swatchColors:r,ColorPickerProps:o,labels:i,...s}){const{classes:a,cx:l}=kne();return v.jsx($.Popper,{transition:!0,placement:"bottom-start",...s,className:l(a.root,s.className),children:({TransitionProps:u})=>v.jsx($.Fade,{...u,timeout:100,children:v.jsx("div",{children:v.jsx($.ClickAwayListener,{mouseEvent:"onMouseDown",touchEvent:"onTouchStart",onClickAway:n,children:v.jsx($.Paper,{elevation:5,sx:{p:2.5,pb:1},children:v.jsx(Tne,{value:t||"",onSave:e,onCancel:n,swatchColors:r,ColorPickerProps:o,labels:i})})})})})})}function Ene({...t}){const e=_t();return v.jsx(St,{tooltipLabel:"Insert image",IconComponent:_z,disabled:!(e!=null&&e.isEditable)||!e.can().setImage({src:"http://example.com"}),...t})}function One(t){const e=_t();return v.jsx(St,{tooltipLabel:"Insert table",IconComponent:tne,disabled:!(e!=null&&e.isEditable)||!e.can().insertTable(),onClick:()=>e==null?void 0:e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),...t})}function Mne(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Blockquote",tooltipShortcutKeys:["mod","Shift","B"],IconComponent:Wz,selected:(e=n==null?void 0:n.isActive("blockquote"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleBlockquote(),onClick:()=>n==null?void 0:n.chain().focus().toggleBlockquote().run(),...t})}function Ane(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Bold",tooltipShortcutKeys:["mod","B"],IconComponent:$z,selected:(e=n==null?void 0:n.isActive("bold"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleBold(),onClick:()=>n==null?void 0:n.chain().focus().toggleBold().run(),...t})}function Ine(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Bulleted list",tooltipShortcutKeys:["mod","Shift","8"],IconComponent:Hz,selected:(e=n==null?void 0:n.isActive("bulletList"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleBulletList(),onClick:()=>n==null?void 0:n.chain().focus().toggleBulletList().run(),...t})}function Dne(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Code",tooltipShortcutKeys:["mod","E"],IconComponent:Az,selected:(e=n==null?void 0:n.isActive("code"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleCode(),onClick:()=>n==null?void 0:n.chain().focus().toggleCode().run(),...t})}function Pne(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Code block",tooltipShortcutKeys:["mod","Alt","C"],IconComponent:zte,selected:(e=n==null?void 0:n.isActive("codeBlock"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleCodeBlock(),onClick:()=>n==null?void 0:n.chain().focus().toggleCodeBlock().run(),...t})}const Nne=en({name:{MenuButtonColorPicker:fx}})(t=>({menuButtonIcon:{fontSize:Pu},colorIndicatorIcon:{position:"absolute"},colorIndicatorIconDisabled:{color:t.palette.action.disabled}}));function fx({value:t,onChange:e,swatchColors:n,labels:r,hideColorIndicator:o=!1,popperId:i,PopperProps:s,ColorPickerProps:a,...l}){const{classes:u,cx:f}=Nne(),[p,g]=q.useState(null),m=()=>{g(null)},{IconComponent:b,children:y,...x}=l;return v.jsxs(v.Fragment,{children:[v.jsx(St,{onClick:w=>{p?m():g(w.currentTarget)},"aria-describedby":i,...x,children:y??v.jsxs(v.Fragment,{children:[b&&v.jsx(b,{className:u.menuButtonIcon}),!o&&t&&v.jsx(Wte,{className:f(u.menuButtonIcon,u.colorIndicatorIcon,l.disabled&&u.colorIndicatorIconDisabled),style:l.disabled?void 0:{color:t}})]})}),v.jsx(XP,{id:i,open:!!p,anchorEl:p,value:t??"",onSave:w=>{e(w),m()},onCancel:m,swatchColors:n,ColorPickerProps:a,labels:r,...s})]})}function Lne(t){const e=_t(),n=q.useRef(null);return v.jsx(St,{buttonRef:n,tooltipLabel:"Link",tooltipShortcutKeys:["mod","Shift","U"],IconComponent:Lm,selected:e==null?void 0:e.isActive("link"),disabled:!(e!=null&&e.isEditable),onClick:()=>e==null?void 0:e.commands.openLinkBubbleMenu({anchorEl:n.current,placement:"bottom"}),...t})}function $ne({defaultMarkColor:t="#ffff00",...e}){const n=_t(),r=n!=null&&n.isActive("highlight")?n.getAttributes("highlight").color||t:"";return v.jsx(fx,{IconComponent:Ute,tooltipLabel:"Highlight color",tooltipShortcutKeys:["mod","Shift","H"],value:r,onChange:o=>{o?n==null||n.chain().focus().setHighlight({color:o}).run():n==null||n.chain().focus().unsetHighlight().run()},disabled:!(n!=null&&n.isEditable)||!n.can().toggleHighlight(),...e,labels:{removeColorButton:"None",removeColorButtonTooltipTitle:"Remove highlighting from this text",...e.labels}})}function Fne(t){const e=_t();return v.jsx(St,{tooltipLabel:"Insert horizontal line",IconComponent:Gz,disabled:!(e!=null&&e.isEditable)||!e.can().setHorizontalRule(),onClick:()=>e==null?void 0:e.chain().focus().setHorizontalRule().run(),...t})}function Rne(t,e){const n=Oo(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];return i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,a=>{s.push(...a.marks)}),s.filter(a=>a.type.name===n.name).map(a=>({...a.attrs}))}function Bne(t,e){const n=Dn(e,t.schema),{from:r,to:o}=t.selection,i=[];return t.doc.nodesBetween(r,o,s=>{i.push(s)}),i.reverse().filter(s=>s.type.name===n.name).map(s=>({...s.attrs}))}function Up(t,e){const n=_u(typeof e=="string"?e:e.name,t.schema);return n==="node"?Bne(t,e):n==="mark"?Rne(t,e):[]}function px({images:t,editor:e,position:n}){if(!e||e.isDestroyed||t.length===0)return;const r=t.filter(o=>!!o.src).map(o=>({type:e.schema.nodes.image.name,attrs:o}));e.chain().command(({commands:o})=>n==null?o.insertContent(r):o.insertContentAt(n,r)).focus().run()}function Vne(t){return t.toLowerCase().normalize("NFKD").replace(/[^\w\s-]+/g,"").replace(/[-\s]+/g,"-").replace(/^[\s-_]+|[\s-_]+$/g,"")}function zne({onUploadFiles:t,inputProps:e,insertImages:n=px,...r}){const o=_t(),i=q.useRef(null),s=async a=>{if(!o||o.isDestroyed||a.length===0)return;const l=await t(Array.from(a));n({editor:o,images:l})};return v.jsxs(v.Fragment,{children:[v.jsx(Ene,{tooltipLabel:"Upload images",onClick:()=>{var a;return(a=i.current)===null||a===void 0?void 0:a.click()},...r}),v.jsx("input",{ref:i,type:"file",accept:"image/*",multiple:!0,onChange:async a=>{a.target.files&&await s(a.target.files),a.target.value=""},style:{display:"none"},...e})]})}function Hne(t){const e=_t();return v.jsx(St,{tooltipLabel:"Indent",tooltipShortcutKeys:["Tab"],IconComponent:Vz,disabled:!(e!=null&&e.isEditable)||!e.can().sinkListItem("listItem"),onClick:()=>e==null?void 0:e.chain().focus().sinkListItem("listItem").run(),...t})}function jne(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Italic",tooltipShortcutKeys:["mod","I"],IconComponent:zz,selected:(e=n==null?void 0:n.isActive("italic"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleItalic(),onClick:()=>n==null?void 0:n.chain().focus().toggleItalic().run(),...t})}function Wne(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Ordered list",tooltipShortcutKeys:["mod","Shift","7"],IconComponent:jz,selected:(e=n==null?void 0:n.isActive("orderedList"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleOrderedList(),onClick:()=>n==null?void 0:n.chain().focus().toggleOrderedList().run(),...t})}function qne(t){const e=_t();return v.jsx(St,{tooltipLabel:"Redo",tooltipShortcutKeys:["mod","Shift","Z"],IconComponent:t4,disabled:!(e!=null&&e.isEditable)||!e.can().redo(),onClick:()=>e==null?void 0:e.chain().focus().redo().run(),...t})}function Une(t){const e=_t();return v.jsx(St,{tooltipLabel:"Remove inline formatting",IconComponent:Fz,disabled:!(e!=null&&e.isEditable)||!e.can().unsetAllMarks(),onClick:()=>e==null?void 0:e.chain().focus().unsetAllMarks().run(),...t})}function Kne(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Strikethrough",tooltipShortcutKeys:["mod","Shift","S"],IconComponent:s4,selected:(e=n==null?void 0:n.isActive("strike"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleStrike(),onClick:()=>n==null?void 0:n.chain().focus().toggleStrike().run(),...t})}function Gne(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Subscript",tooltipShortcutKeys:["mod",","],IconComponent:a4,selected:(e=n==null?void 0:n.isActive("subscript"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleSubscript(),onClick:()=>n==null?void 0:n.chain().focus().toggleSubscript().run(),...t})}function Yne(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Superscript",tooltipShortcutKeys:["mod","."],IconComponent:l4,selected:(e=n==null?void 0:n.isActive("superscript"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleSuperscript(),onClick:()=>n==null?void 0:n.chain().focus().toggleSuperscript().run(),...t})}function Jne(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Task checklist",tooltipShortcutKeys:["mod","Shift","9"],IconComponent:Ez,selected:(e=n==null?void 0:n.isActive("taskList"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleTaskList(),onClick:()=>n==null?void 0:n.chain().focus().toggleTaskList().run(),...t})}function Xne({IconComponent:t=qte,tooltipLabel:e="Text color",defaultTextColor:n="",...r}){const o=_t(),i=o?Up(o.state,"textStyle"):[],s=!!(o!=null&&o.isActive("textStyle")),a=i.map(f=>f.color||n);s||a.push(n);const l=new Set(a).size;let u;return l===1?u=a[0]:l>1?u="":u=n,v.jsx(fx,{IconComponent:t,tooltipLabel:e,value:u,onChange:f=>{o==null||o.chain().focus().setColor(f).run()},disabled:!(o!=null&&o.isEditable)||!o.can().setColor("#000"),...r,labels:{removeColorButton:"Reset",...r.labels}})}function Zne(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Underline",tooltipShortcutKeys:["mod","U"],IconComponent:Uz,selected:(e=n==null?void 0:n.isActive("underline"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleUnderline(),onClick:()=>n==null?void 0:n.chain().focus().toggleUnderline().run(),...t})}function Qne(t){const e=_t();return v.jsx(St,{tooltipLabel:"Undo",tooltipShortcutKeys:["mod","Z"],IconComponent:c4,disabled:!(e!=null&&e.isEditable)||!e.can().undo(),onClick:()=>e==null?void 0:e.chain().focus().undo().run(),...t})}function ere(t){const e=_t();return v.jsx(St,{tooltipLabel:"Unindent",tooltipShortcutKeys:["Shift","Tab"],IconComponent:Bz,disabled:!(e!=null&&e.isEditable)||!e.can().liftListItem("listItem"),onClick:()=>e==null?void 0:e.chain().focus().liftListItem("listItem").run(),...t})}const tre=en({name:{MenuSelect:$u}})(t=>({rootTooltipWrapper:{display:"inline-flex"},selectRoot:{[`&:not(:hover):not(.${$.outlinedInputClasses.focused}) .${$.outlinedInputClasses.notchedOutline}`]:{borderWidth:0},[`& .${$.svgIconClasses.root}`]:{color:t.palette.action.active},[`&.${$.selectClasses.disabled} .${$.svgIconClasses.root}`]:{color:t.palette.action.disabled}},select:{"&&&":{paddingLeft:t.spacing(1),paddingRight:t.spacing(3)}},selectDropdownIcon:{right:1},input:{paddingTop:"3px",paddingBottom:"3px",fontSize:"0.9em"}}));function $u({tooltipTitle:t,...e}){var n,r,o;const{classes:i,cx:s}=tre(),[a,l]=q.useState(!1),u=v.jsx($.Select,{margin:"none",variant:"outlined",size:"small",...e,onMouseEnter:(...f)=>{var p;l(!0),(p=e.onMouseEnter)===null||p===void 0||p.call(e,...f)},onMouseLeave:(...f)=>{var p;l(!1),(p=e.onMouseLeave)===null||p===void 0||p.call(e,...f)},onClick:(...f)=>{var p;l(!1),(p=e.onClick)===null||p===void 0||p.call(e,...f)},onOpen:(...f)=>{var p;l(!1),(p=e.onOpen)===null||p===void 0||p.call(e,...f)},inputProps:{...e.inputProps,className:s(i.input,(n=e.inputProps)===null||n===void 0?void 0:n.className)},MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},...e.MenuProps},className:s(i.selectRoot,e.className),classes:{...e.classes,select:s(i.select,(r=e.classes)===null||r===void 0?void 0:r.select),icon:s(i.selectDropdownIcon,(o=e.classes)===null||o===void 0?void 0:o.icon)}});return t?v.jsx(Mo,{label:t,contentWrapperClassName:i.rootTooltipWrapper,open:a,children:u}):u}const nre=en({name:{MenuSelectFontFamily:ZP}})({selectInput:{width:55}}),hx="MULTIPLE";function ZP({options:t,hideUnsetOption:e=!1,unsetOptionLabel:n="Default",emptyLabel:r="Font",...o}){var i;const{classes:s,cx:a}=nre(),l=_t(),u=l?Up(l.state,"textStyle"):[],f=!!(l!=null&&l.isActive("textStyle")),p=u.map(b=>{var y;return(y=b.fontFamily)!==null&&y!==void 0?y:""});f||p.push("");const g=new Set(p).size;let m;return g===1?m=p[0]:g>1?m=hx:m="",v.jsxs($u,{onChange:b=>{const y=b.target.value;y?l==null||l.chain().setFontFamily(y).focus().run():l==null||l.chain().unsetFontFamily().focus().run()},disabled:!(l!=null&&l.isEditable)||!l.can().setFontFamily("serif"),renderValue:b=>{var y,x;return!b||b===hx?r:(x=(y=t.find(w=>w.value===b))===null||y===void 0?void 0:y.label)!==null&&x!==void 0?x:b},displayEmpty:!0,"aria-label":"Font families",tooltipTitle:"Font",...o,value:m||"",inputProps:{...o.inputProps,className:a(s.selectInput,(i=o.inputProps)===null||i===void 0?void 0:i.className)},children:[!e&&v.jsx($.MenuItem,{value:"",children:n}),v.jsx($.MenuItem,{style:{display:"none"},value:hx}),t.map(b=>{var y;return v.jsx($.MenuItem,{value:b.value,children:v.jsx("span",{style:{fontFamily:b.value},children:(y=b.label)!==null&&y!==void 0?y:b.value})},b.value)})]})}const rre=en({name:{MenuSelectFontSize:eN}})({selectInput:{width:17,display:"flex",alignItems:"center"},fontSizeIcon:{fontSize:Pu}}),ore=["8px","9px","10px","11px","12px","14px","16px","18px","24px","30px","36px","48px","60px","72px","96px"];function QP(t){return t.replace("px","")}const gx="MULTIPLE";function eN({options:t=ore,sizeOptions:e,hideUnsetOption:n=!1,unsetOptionLabel:r="Default",unsetOptionContent:o,emptyLabel:i,emptyValue:s,...a}){var l;const{classes:u,cx:f}=rre(),p=_t();i=s??i,r=o??r,t=e??t;const g=(t??[]).map(T=>typeof T=="string"?{value:T}:T),m=p?Up(p.state,"textStyle"):[],b=!!(p!=null&&p.isActive("textStyle")),y=m.map(T=>{var _;return(_=T.fontSize)!==null&&_!==void 0?_:""});b||y.push("");const x=new Set(y).size;let w;return x===1?w=y[0]:x>1?w=gx:w="",v.jsxs($u,{onChange:T=>{const _=T.target.value;_?p==null||p.chain().setFontSize(_).focus().run():p==null||p.chain().unsetFontSize().focus().run()},disabled:!(p!=null&&p.isEditable)||!p.can().setFontSize("12px"),renderValue:T=>!T||T===gx?i??v.jsx(qz,{className:u.fontSizeIcon}):QP(T),displayEmpty:!0,"aria-label":"Font sizes",tooltipTitle:"Font size",...a,value:w||"",inputProps:{...a.inputProps,className:f(u.selectInput,(l=a.inputProps)===null||l===void 0?void 0:l.className)},children:[!n&&v.jsx($.MenuItem,{value:"",children:r}),v.jsx($.MenuItem,{style:{display:"none"},value:gx}),g.map(T=>{var _;return v.jsx($.MenuItem,{value:T.value,children:(_=T.label)!==null&&_!==void 0?_:QP(T.value)},T.value)})]})}const ire=en({name:{MenuSelectHeading:rN}})(t=>{const e=AD(t);return{selectInput:{width:77},menuOption:{display:"block",width:"100%"},headingOption:{marginBlockStart:0,marginBlockEnd:0,fontWeight:"bold"},headingOption1:{fontSize:e["& h1"].fontSize},headingOption2:{fontSize:e["& h2"].fontSize},headingOption3:{fontSize:e["& h3"].fontSize},headingOption4:{fontSize:e["& h4"].fontSize},headingOption5:{fontSize:e["& h5"].fontSize},headingOption6:{fontSize:e["& h6"].fontSize}}}),Tt={Paragraph:"Paragraph",Heading1:"Heading 1",Heading2:"Heading 2",Heading3:"Heading 3",Heading4:"Heading 4",Heading5:"Heading 5",Heading6:"Heading 6"},tN={[Tt.Heading1]:1,[Tt.Heading2]:2,[Tt.Heading3]:3,[Tt.Heading4]:4,[Tt.Heading5]:5,[Tt.Heading6]:6},nN={1:Tt.Heading1,2:Tt.Heading2,3:Tt.Heading3,4:Tt.Heading4,5:Tt.Heading5,6:Tt.Heading6};function rN({labels:t,hideShortcuts:e=!1,...n}){var r,o,i,s,a,l,u,f;const{classes:p,cx:g}=ire(),m=_t(),b=q.useCallback(A=>{const I=A.target.value;I===Tt.Paragraph?m==null||m.chain().setParagraph().focus().run():I in tN&&(m==null||m.chain().setHeading({level:tN[I]}).focus().run())},[m]);let y="",x;if(m!=null&&m.isActive("paragraph"))y=Tt.Paragraph;else if(m!=null&&m.isActive("heading")){const I=Up(m.state,"heading").map(O=>O.level);x=new Set(I).size===1?I[0]:void 0,x&&x in nN&&(y=nN[x])}const w=y!=="",T=!!(m!=null&&m.can().setParagraph()),_=q.useMemo(()=>{var A;const I=m==null?void 0:m.extensionManager.extensions.find(L=>L.name=="heading");return new Set((A=I==null?void 0:I.options.levels)!==null&&A!==void 0?A:[])},[m]),C=_.values().next(),E=C.done?void 0:C.value,M=E!==void 0&&(x===E||!!(m!=null&&m.can().setHeading({level:E})));return v.jsxs($u,{onChange:b,disabled:!(m!=null&&m.isEditable)||!w&&!T&&!M,displayEmpty:!0,renderValue:A=>{var I,L;let O;return A===""?O=(L=(I=t==null?void 0:t.emptyValue)!==null&&I!==void 0?I:t==null?void 0:t.empty)!==null&&L!==void 0?L:v.jsx("em",{children:"Change to…"}):A===Tt.Paragraph?O=t==null?void 0:t.paragraph:A===Tt.Heading1?O=t==null?void 0:t.heading1:A===Tt.Heading2?O=t==null?void 0:t.heading2:A===Tt.Heading3?O=t==null?void 0:t.heading3:A===Tt.Heading4?O=t==null?void 0:t.heading4:A===Tt.Heading5?O=t==null?void 0:t.heading5:A===Tt.Heading6&&(O=t==null?void 0:t.heading6),O??A},"aria-label":"Text headings",tooltipTitle:"Styles",...n,value:y,inputProps:{...n.inputProps,className:g(p.selectInput,(r=n.inputProps)===null||r===void 0?void 0:r.className)},children:[v.jsx($.MenuItem,{value:Tt.Paragraph,disabled:!w&&!T,children:v.jsx(Mo,{label:"",shortcutKeys:e?void 0:["mod","alt","0"],placement:"right",contentWrapperClassName:p.menuOption,children:(o=t==null?void 0:t.paragraph)!==null&&o!==void 0?o:Tt.Paragraph})}),_.has(1)&&v.jsx($.MenuItem,{value:Tt.Heading1,disabled:!M,children:v.jsx(Mo,{label:"",shortcutKeys:e?void 0:["mod","alt","1"],placement:"right",contentWrapperClassName:g(p.menuOption,p.headingOption,p.headingOption1),children:(i=t==null?void 0:t.heading1)!==null&&i!==void 0?i:Tt.Heading1})}),_.has(2)&&v.jsx($.MenuItem,{value:Tt.Heading2,disabled:!M,children:v.jsx(Mo,{label:"",shortcutKeys:e?void 0:["mod","alt","2"],placement:"right",contentWrapperClassName:g(p.menuOption,p.headingOption,p.headingOption2),children:(s=t==null?void 0:t.heading2)!==null&&s!==void 0?s:Tt.Heading2})}),_.has(3)&&v.jsx($.MenuItem,{value:Tt.Heading3,disabled:!M,children:v.jsx(Mo,{label:"",shortcutKeys:e?void 0:["mod","alt","3"],placement:"right",contentWrapperClassName:g(p.menuOption,p.headingOption,p.headingOption3),children:(a=t==null?void 0:t.heading3)!==null&&a!==void 0?a:Tt.Heading3})}),_.has(4)&&v.jsx($.MenuItem,{value:Tt.Heading4,disabled:!M,children:v.jsx(Mo,{label:"",shortcutKeys:e?void 0:["mod","alt","4"],placement:"right",contentWrapperClassName:g(p.menuOption,p.headingOption,p.headingOption4),children:(l=t==null?void 0:t.heading4)!==null&&l!==void 0?l:Tt.Heading4})}),_.has(5)&&v.jsx($.MenuItem,{value:Tt.Heading5,disabled:!M,children:v.jsx(Mo,{label:"",shortcutKeys:e?void 0:["mod","alt","5"],placement:"right",contentWrapperClassName:g(p.menuOption,p.headingOption,p.headingOption5),children:(u=t==null?void 0:t.heading5)!==null&&u!==void 0?u:Tt.Heading5})}),_.has(6)&&v.jsx($.MenuItem,{value:Tt.Heading6,disabled:!M,children:v.jsx(Mo,{label:"",shortcutKeys:e?void 0:["mod","alt","6"],placement:"right",contentWrapperClassName:g(p.menuOption,p.headingOption,p.headingOption6),children:(f=t==null?void 0:t.heading6)!==null&&f!==void 0?f:Tt.Heading6})})]})}const sre=en({name:{MenuSelectTextAlign:oN}})(t=>({selectInput:{width:Pu},menuItem:{paddingLeft:0,paddingRight:0},menuOption:{display:"flex",width:"100%",justifyContent:"center"},menuButtonIcon:{fontSize:Pu,color:t.palette.action.active}})),are=[{value:"left",label:"Left",shortcutKeys:["mod","Shift","L"],IconComponent:Nz},{value:"center",label:"Center",shortcutKeys:["mod","Shift","E"],IconComponent:Dz},{value:"right",label:"Right",shortcutKeys:["mod","Shift","R"],IconComponent:Lz},{value:"justify",label:"Justify",shortcutKeys:["mod","Shift","J"],IconComponent:Pz}];function oN({options:t=are,emptyLabel:e="",alignmentOptions:n,...r}){var o,i,s;const{classes:a,cx:l}=sre(),u=_t();t=(o=n==null?void 0:n.map(b=>({...b,value:b.alignment})))!==null&&o!==void 0?o:t;const f=q.useCallback(b=>{const y=b.target.value;u==null||u.chain().setTextAlign(y).focus().run()},[u]),p=q.useMemo(()=>{const b=u==null?void 0:u.extensionManager.extensions.find(y=>y.name=="textAlign");return b==null?void 0:b.options},[u]),g=q.useMemo(()=>new Set(p==null?void 0:p.alignments),[p]),m=(i=Array.from(g).find(b=>u==null?void 0:u.isActive({textAlign:b})))!==null&&i!==void 0?i:"";return v.jsx($u,{onChange:f,disabled:!(u!=null&&u.isEditable)||!Array.from(g).some(b=>u.can().setTextAlign(b)),renderValue:b=>{let y;if(b){const x=t.find(w=>w.value===b);y=x?v.jsx(x.IconComponent,{className:a.menuButtonIcon}):b}else y=e;return v.jsx("span",{className:a.menuOption,children:y})},"aria-label":"Text alignments",tooltipTitle:"Align",value:m,displayEmpty:!0,...r,inputProps:{...r.inputProps,className:l(a.selectInput,(s=r.inputProps)===null||s===void 0?void 0:s.className)},children:t.filter(b=>g.has(b.value)).map(b=>{var y;return v.jsx($.MenuItem,{value:b.value,disabled:!(u!=null&&u.can().setTextAlign(b.value)),className:a.menuItem,children:v.jsx(Mo,{label:(y=b.label)!==null&&y!==void 0?y:"",shortcutKeys:b.shortcutKeys,placement:"right",contentWrapperClassName:a.menuOption,children:v.jsx(b.IconComponent,{className:a.menuButtonIcon})})},b.value)})})}const lre=gn.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replace(/['"]+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),iN=cn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Ct(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>zb({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),cre=en({name:{HeadingWithAnchorComponent:sN},uniqId:"kNc4LD"})((t,e,n)=>({root:{[`&:hover .${n.link}`]:{opacity:100}},container:{display:"inline-block",position:"relative"},link:{position:"absolute",left:-21,color:`${t.palette.text.secondary} !important`,opacity:0,transition:t.transitions.create("opacity"),textDecoration:"none",outline:"none",[t.breakpoints.down("sm")]:{left:-18},'.ProseMirror[contenteditable="true"] &':{display:"none"}},linkIcon:{transform:"rotate(-45deg)",fontSize:"1.25rem",[t.breakpoints.down("sm")]:{fontSize:"1.15rem"}}})),Kp=ma("HeadingWithAnchorComponent",["root","container","link","linkIcon"]);function sN({editor:t,node:e,extension:n}){const{classes:r,cx:o}=cre(),a=`h${n.options.levels.includes(e.attrs.level)?e.attrs.level:n.options.levels[0]}`,l=q.useMemo(()=>Db(t.schema),[t.schema]),u=Vne(TA(e,{textSerializers:l}));return v.jsx(J1,{as:a,id:u,...n.options.HTMLAttributes,className:o(Kp.root,r.root),style:{textAlign:e.attrs.textAlign},children:v.jsxs("span",{className:o(Kp.container,r.container),children:[v.jsx("a",{href:`#${u}`,contentEditable:!1,className:o(Kp.link,r.link),children:v.jsx(Lm,{className:o(Kp.linkIcon,r.linkIcon)})}),v.jsx(Ate,{as:"span"})]})})}const ure=iN.extend({addOptions(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),scrollToAnchorOnMount:!0}},onCreate(){this.options.scrollToAnchorOnMount&&setTimeout(()=>{dre(this.editor)})},addNodeView(){return X1(sN)}});function dre(t){if(t.isDestroyed||!("heading"in t.storage))return;const n=window.location.hash.slice(1);if(!n)return;const r=window.document.getElementById(n);r&&t.options.element.contains(r)&&r.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}const fre=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,pre=cn.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",Ct(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[AA({find:fre,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),hre=en({name:{ResizableImageResizer:aN}})(t=>({root:{position:"absolute",bottom:-3,right:-3,width:12,height:12,background:t.palette.primary.main,cursor:"nwse-resize"}}));function aN({onResize:t,className:e,mouseDown:n,setMouseDown:r}){const{classes:o,cx:i}=hre();q.useEffect(()=>{if(!n)return;const a=l=>{t(l)};return window.addEventListener("mousemove",a),()=>{window.removeEventListener("mousemove",a)}},[n,t]),q.useEffect(()=>{const a=()=>{r(!1)};return window.addEventListener("mouseup",a),()=>{window.removeEventListener("mouseup",a)}},[r]);const s=q.useCallback(a=>{a.preventDefault(),a.stopPropagation(),r(!0)},[r]);return v.jsx("div",{className:i(o.root,e),onMouseDown:s})}const gre=15,mre=en({name:{ResizableImageComponent:lN}})(t=>({imageContainer:{display:"inline-flex",position:"relative"},image:{display:"block"},imageSelected:{outline:`3px solid ${t.palette.primary.main}`},resizer:{'.ProseMirror[contenteditable="false"] &':{display:"none"}}}));function lN(t){var e;const{node:n,selected:r,updateAttributes:o,extension:i}=t,{classes:s,cx:a}=mre(),{attrs:l}=n,u=q.useRef(null),[f,p]=q.useState(!1),g=r||f,m=q.useMemo(()=>U_(y=>{if(!u.current)return;const x=u.current.getBoundingClientRect(),w=y.clientX-x.x,T=y.clientY-x.y,_=Math.max(w,x.width/x.height*T,gre);o({width:Math.round(_)})},50,{trailing:!0}),[o]),b=i.options.ChildComponent;return v.jsx(J1,{style:{textAlign:l.textAlign,width:"100%"},as:i.options.inline?"span":"div",children:v.jsxs("div",{className:s.imageContainer,children:[v.jsx("img",{ref:u,src:l.src,height:"auto",width:l.width?l.width:void 0,alt:l.alt||void 0,title:l.title||void 0,className:a(s.image,g&&"ProseMirror-selectednode",g&&s.imageSelected),style:{maxWidth:l.width?void 0:"auto",aspectRatio:(e=l.aspectRatio)!==null&&e!==void 0?e:void 0},"data-drag-handle":!0,onLoad:y=>{const x={};l.width||(x.width=y.currentTarget.naturalWidth),l.aspectRatio||(x.aspectRatio=String(y.currentTarget.naturalWidth/y.currentTarget.naturalHeight)),(x.width||x.aspectRatio)&&o(x)}}),g&&v.jsx(aN,{onResize:m,className:s.resizer,mouseDown:f,setMouseDown:p}),b&&v.jsx(b,{...t})]})})}const yre=pre.extend({addOptions(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),isAllowedImgSrc:e=>!!e}},addAttributes(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),width:{default:null,renderHTML:e=>({width:e.width}),parseHTML:e=>e.getAttribute("width")},aspectRatio:{default:null,renderHTML:e=>e.aspectRatio?{style:`aspect-ratio: ${e.aspectRatio}`}:{},parseHTML:e=>e.style.aspectRatio}}},renderHTML({HTMLAttributes:t}){return["img",Ct({height:"auto"},this.options.HTMLAttributes,t)]},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])',getAttrs:t=>{if(!(t instanceof Element))return!1;const e=t.getAttribute("src");return this.options.isAllowedImgSrc(e)&&null}}]},addInputRules(){var t;const e=(t=this.parent)===null||t===void 0?void 0:t.call(this);if(!e)return[];const n=r=>{const[,,o,i,s]=r;return{src:i,alt:o,title:s}};return e.map(r=>new xu({find:r.find,handler:o=>{const i=n(o.match);if(this.options.isAllowedImgSrc(i.src))return r.handler(o)}}))},addNodeView(){return X1(lN)}});var mx,yx;if(typeof WeakMap<"u"){let t=new WeakMap;mx=e=>t.get(e),yx=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;mx=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},yx=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var mn=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let i=r+1,s=o+1;for(let a=1;i<this.width&&this.map[e+a]==n;a++)i++;for(let a=1;s<this.height&&this.map[e+this.width*a]==n;a++)s++;return{left:r,top:o,right:i,bottom:s}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:i,bottom:s}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?i==0:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:i}=this.findCell(t),{left:s,right:a,top:l,bottom:u}=this.findCell(e);return{left:Math.min(n,s),top:Math.min(o,l),right:Math.max(r,a),bottom:Math.max(i,u)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,!(o==t.left&&o&&this.map[i-1]==s||r==t.top&&r&&this.map[i-this.width]==s)&&e.push(s))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==t){let s=e+t*this.width;const a=(t+1)*this.width;for(;s<a&&this.map[s]<o;)s++;return s==a?i-1:this.map[s]}o=i}}static get(t){return mx(t)||yx(t,bre(t))}};function bre(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=vre(t),n=t.childCount,r=[];let o=0,i=null;const s=[];for(let u=0,f=e*n;u<f;u++)r[u]=0;for(let u=0,f=0;u<n;u++){const p=t.child(u);f++;for(let b=0;;b++){for(;o<r.length&&r[o]!=0;)o++;if(b==p.childCount)break;const y=p.child(b),{colspan:x,rowspan:w,colwidth:T}=y.attrs;for(let _=0;_<w;_++){if(_+u>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:f,n:w-_});break}const C=o+_*e;for(let E=0;E<x;E++){r[C+E]==0?r[C+E]=f:(i||(i=[])).push({type:"collision",row:u,pos:f,n:x-E});const M=T&&T[E];if(M){const A=(C+E)%e*2,I=s[A];I==null||I!=M&&s[A+1]==1?(s[A]=M,s[A+1]=1):I==M&&s[A+1]++}}}o+=x,f+=y.nodeSize}const g=(u+1)*e;let m=0;for(;o<g;)r[o++]==0&&m++;m&&(i||(i=[])).push({type:"missing",row:u,n:m}),f++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const a=new mn(e,n,r,i);let l=!1;for(let u=0;!l&&u<s.length;u+=2)s[u]!=null&&s[u+1]<n&&(l=!0);return l&&xre(a,s,t),a}function vre(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let i=0;if(n)for(let s=0;s<r;s++){const a=t.child(s);for(let l=0;l<a.childCount;l++){const u=a.child(l);s+u.attrs.rowspan>r&&(i+=u.attrs.colspan)}}for(let s=0;s<o.childCount;s++){const a=o.child(s);i+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function xre(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const i=t.map[o];if(r[i])continue;r[i]=!0;const s=n.nodeAt(i);if(!s)throw new RangeError(`No cell with offset ${i} found`);let a=null;const l=s.attrs;for(let u=0;u<l.colspan;u++){const f=(o+u)%t.width,p=e[f*2];p!=null&&(!l.colwidth||l.colwidth[u]!=p)&&((a||(a=Sre(l)))[u]=p)}a&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}function Sre(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function rr(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}var vs=new An("selectingCells");function Pl(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function wre(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function Ao(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function Gp(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Pl(e.$head)||Cre(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function Cre(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function bx(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function _re(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function vx(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function cN(t,e,n){const r=t.node(-1),o=mn.get(r),i=t.start(-1),s=o.nextCell(t.pos-i,e,n);return s==null?null:t.node(0).resolve(i+s)}function ba(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function uN(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function Tre(t,e,n){const r=rr(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var Gt=class Hi extends st{constructor(e,n=e){const r=e.node(-1),o=mn.get(r),i=e.start(-1),s=o.rectBetween(e.pos-i,n.pos-i),a=e.node(0),l=o.cellsInRect(s).filter(f=>f!=n.pos-i);l.unshift(n.pos-i);const u=l.map(f=>{const p=r.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const g=i+f+1;return new MO(a.resolve(g),a.resolve(g+p.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(bx(r)&&bx(o)&&vx(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?Hi.rowSelection(r,o):i&&this.isColSelection()?Hi.colSelection(r,o):new Hi(r,o)}return rt.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=mn.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let l=o.top;l<o.bottom;l++){const u=[];for(let f=l*n.width+o.left,p=o.left;p<o.right;p++,f++){const g=n.map[f];if(i[g])continue;i[g]=!0;const m=n.findCell(g);let b=e.nodeAt(g);if(!b)throw RangeError(`No cell with offset ${g} found`);const y=o.left-m.left,x=m.right-o.right;if(y>0||x>0){let w=b.attrs;if(y>0&&(w=ba(w,0,y)),x>0&&(w=ba(w,w.colspan-x,x)),m.left<o.left){if(b=b.type.createAndFill(w),!b)throw RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else b=b.type.create(w,b.content)}if(m.top<o.top||m.bottom>o.bottom){const w={...b.attrs,rowspan:Math.min(m.bottom,o.bottom)-Math.max(m.top,o.top)};m.top<o.top?b=b.type.createAndFill(w):b=b.type.create(w,b.content)}u.push(b)}s.push(e.child(l).copy(Oe.from(u)))}const a=this.isColSelection()&&this.isRowSelection()?e:s;return new Re(Oe.from(a),1,1)}replace(e,n=Re.empty){const r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){const{$from:a,$to:l}=o[s],u=e.mapping.slice(r);e.replace(u.map(a.pos),u.map(l.pos),s?Re.empty:n)}const i=st.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new Re(Oe.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=mn.get(n),o=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let s=0;s<i.length;s++)e(n.nodeAt(i[s]),o+i[s])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=mn.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),l=e.node(0);return s.top<=a.top?(s.top>0&&(e=l.resolve(i+o.map[s.left])),a.bottom<o.height&&(n=l.resolve(i+o.map[o.width*(o.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(i+o.map[a.left])),s.bottom<o.height&&(e=l.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))),new Hi(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=mn.get(e),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),i=n.colCount(this.$headCell.pos-r);if(Math.min(o,i)>0)return!1;const s=o+this.$anchorCell.nodeAfter.attrs.colspan,a=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(e){return e instanceof Hi&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=mn.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),l=e.node(0);return s.left<=a.left?(s.left>0&&(e=l.resolve(i+o.map[s.top*o.width])),a.right<o.width&&(n=l.resolve(i+o.map[o.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(i+o.map[a.top*o.width])),s.right<o.width&&(e=l.resolve(i+o.map[o.width*(s.top+1)-1]))),new Hi(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Hi(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Hi(e.resolve(n),e.resolve(r))}getBookmark(){return new kre(this.$anchorCell.pos,this.$headCell.pos)}};Gt.prototype.visible=!1,st.jsonID("cell",Gt);var kre=class uB{constructor(e,n){this.anchor=e,this.head=n}map(e){return new uB(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&vx(n,r)?new Gt(n,r):st.near(r,1)}};function Ere(t){if(!(t.selection instanceof Gt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Kn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),on.create(t.doc,e)}function Ore({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function Mre({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=e.depth;o>0;o--){const i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&e.parentOffset===0}function Are(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,s;if(r instanceof et&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=Gt.create(o,r.from);else if(s=="row"){const a=o.resolve(r.from+1);i=Gt.rowSelection(a,a)}else if(!n){const a=mn.get(r.node),l=r.from+1,u=l+a.map[a.width*a.height-1];i=Gt.create(o,l+1,u)}}else r instanceof rt&&Ore(r)?i=rt.create(o,r.from):r instanceof rt&&Mre(r)&&(i=rt.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var Ire=new An("fix-tables");function dN(t,e,n,r){const o=t.childCount,i=e.childCount;e:for(let s=0,a=0;s<i;s++){const l=e.child(s);for(let u=a,f=Math.min(o,s+3);u<f;u++)if(t.child(u)==l){a=u+1,n+=l.nodeSize;continue e}r(l,n),a<o&&t.child(a).sameMarkup(l)?dN(t.child(a),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function fN(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=Dre(t,o,i,n))};return e?e.doc!=t.doc&&dN(e.doc,t.doc,0,r):t.doc.descendants(r),n}function Dre(t,e,n,r){const o=mn.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let l=0;l<o.height;l++)i.push(0);for(let l=0;l<o.problems.length;l++){const u=o.problems[l];if(u.type=="collision"){const f=e.nodeAt(u.pos);if(!f)continue;const p=f.attrs;for(let g=0;g<p.rowspan;g++)i[u.row+g]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,ba(p,p.colspan-u.n,u.n))}else if(u.type=="missing")i[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const f=e.nodeAt(u.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...f.attrs,rowspan:f.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const f=e.nodeAt(u.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...f.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){const f=r.mapping.map(n);r.delete(f,f+e.nodeSize)}}let s,a;for(let l=0;l<i.length;l++)i[l]&&(s==null&&(s=l),a=l);for(let l=0,u=n+1;l<o.height;l++){const f=e.child(l),p=u+f.nodeSize,g=i[l];if(g>0){let m="cell";f.firstChild&&(m=f.firstChild.type.spec.tableRole);const b=[];for(let x=0;x<g;x++){const w=rr(t.schema)[m].createAndFill();w&&b.push(w)}const y=(l==0||s==l-1)&&a==l?u+1:p-1;r.insert(r.mapping.map(y),b)}u=p}return r.setMeta(Ire,{fixTables:!0})}function Jo(t){const e=t.selection,n=Gp(t),r=n.node(-1),o=n.start(-1),i=mn.get(r);return{...e instanceof Gt?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function pN(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;Tre(e,r,o+i)&&(i=o==0||o==e.width?null:0);for(let s=0;s<e.height;s++){const a=s*e.width+o;if(o>0&&o<e.width&&e.map[a-1]==e.map[a]){const l=e.map[a],u=r.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,uN(u.attrs,o-e.colCount(l))),s+=u.attrs.rowspan-1}else{const l=i==null?rr(r.type.schema).cell:r.nodeAt(e.map[a+i]).type,u=e.positionAt(s,o,r);t.insert(t.mapping.map(n+u),l.createAndFill())}}return t}function Pre(t,e){if(!Ao(t))return!1;if(e){const n=Jo(t);e(pN(t.tr,n,n.left))}return!0}function Nre(t,e){if(!Ao(t))return!1;if(e){const n=Jo(t);e(pN(t.tr,n,n.right))}return!0}function Lre(t,{map:e,table:n,tableStart:r},o){const i=t.mapping.maps.length;for(let s=0;s<e.height;){const a=s*e.width+o,l=e.map[a],u=n.nodeAt(l),f=u.attrs;if(o>0&&e.map[a-1]==l||o<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(i).map(r+l),null,ba(f,o-e.colCount(l)));else{const p=t.mapping.slice(i).map(r+l);t.delete(p,p+u.nodeSize)}s+=f.rowspan}}function $re(t,e){if(!Ao(t))return!1;if(e){const n=Jo(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;Lre(r,n,o),o!=n.left;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=mn.get(i)}e(r)}return!0}function Fre(t,e,n){var r;const o=rr(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((r=e.nodeAt(t.map[i+n*t.width]))==null?void 0:r.type)!=o)return!1;return!0}function hN(t,{map:e,tableStart:n,table:r},o){var i;let s=n;for(let u=0;u<o;u++)s+=r.child(u).nodeSize;const a=[];let l=o>0?-1:0;Fre(e,r,o+l)&&(l=o==0||o==e.height?null:0);for(let u=0,f=e.width*o;u<e.width;u++,f++)if(o>0&&o<e.height&&e.map[f]==e.map[f-e.width]){const p=e.map[f],g=r.nodeAt(p).attrs;t.setNodeMarkup(n+p,null,{...g,rowspan:g.rowspan+1}),u+=g.colspan-1}else{const p=l==null?rr(r.type.schema).cell:(i=r.nodeAt(e.map[f+l*e.width]))==null?void 0:i.type,g=p==null?void 0:p.createAndFill();g&&a.push(g)}return t.insert(s,rr(r.type.schema).row.create(null,a)),t}function Rre(t,e){if(!Ao(t))return!1;if(e){const n=Jo(t);e(hN(t.tr,n,n.top))}return!0}function Bre(t,e){if(!Ao(t))return!1;if(e){const n=Jo(t);e(hN(t.tr,n,n.bottom))}return!0}function Vre(t,{map:e,table:n,tableStart:r},o){let i=0;for(let u=0;u<o;u++)i+=n.child(u).nodeSize;const s=i+n.child(o).nodeSize,a=t.mapping.maps.length;t.delete(i+r,s+r);const l=new Set;for(let u=0,f=o*e.width;u<e.width;u++,f++){const p=e.map[f];if(!l.has(p)){if(l.add(p),o>0&&p==e.map[f-e.width]){const g=n.nodeAt(p).attrs;t.setNodeMarkup(t.mapping.slice(a).map(p+r),null,{...g,rowspan:g.rowspan-1}),u+=g.colspan-1}else if(o<e.height&&p==e.map[f+e.width]){const g=n.nodeAt(p),m=g.attrs,b=g.type.create({...m,rowspan:g.attrs.rowspan-1},g.content),y=e.positionAt(o+1,u,n);t.insert(t.mapping.slice(a).map(r+y),b),u+=m.colspan-1}}}}function zre(t,e){if(!Ao(t))return!1;if(e){const n=Jo(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;Vre(r,n,o),o!=n.top;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=mn.get(n.table)}e(r)}return!0}function gN(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function Hre({width:t,height:e,map:n},r){let o=r.top*t+r.left,i=o,s=(r.bottom-1)*t+r.left,a=o+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[i]==n[i-1]||r.right<t&&n[a]==n[a+1])return!0;i+=t,a+=t}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[s]==n[s+t])return!0;o++,s++}return!1}function mN(t,e){const n=t.selection;if(!(n instanceof Gt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=Jo(t),{map:o}=r;if(Hre(o,r))return!1;if(e){const i=t.tr,s={};let a=Oe.empty,l,u;for(let f=r.top;f<r.bottom;f++)for(let p=r.left;p<r.right;p++){const g=o.map[f*o.width+p],m=r.table.nodeAt(g);if(!(s[g]||!m))if(s[g]=!0,l==null)l=g,u=m;else{gN(m)||(a=a.append(m.content));const b=i.mapping.map(g+r.tableStart);i.delete(b,b+m.nodeSize)}}if(l==null||u==null)return!0;if(i.setNodeMarkup(l+r.tableStart,null,{...uN(u.attrs,u.attrs.colspan,r.right-r.left-u.attrs.colspan),rowspan:r.bottom-r.top}),a.size){const f=l+1+u.content.size,p=gN(u)?l+1:f;i.replaceWith(p+r.tableStart,f+r.tableStart,a)}i.setSelection(new Gt(i.doc.resolve(l+r.tableStart))),e(i)}return!0}function yN(t,e){const n=rr(t.schema);return jre(({node:r})=>n[r.type.spec.tableRole])(t,e)}function jre(t){return(e,n)=>{var r;const o=e.selection;let i,s;if(o instanceof Gt){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,s=o.$anchorCell.pos}else{if(i=wre(o.$from),!i)return!1;s=(r=Pl(o.$from))==null?void 0:r.pos}if(i==null||s==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let a=i.attrs;const l=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const f=Jo(e),p=e.tr;for(let m=0;m<f.right-f.left;m++)l.push(u?{...a,colwidth:u&&u[m]?[u[m]]:null}:a);let g;for(let m=f.top;m<f.bottom;m++){let b=f.map.positionAt(m,f.left,f.table);m==f.top&&(b+=i.nodeSize);for(let y=f.left,x=0;y<f.right;y++,x++)y==f.left&&m==f.top||p.insert(g=p.mapping.map(b+f.tableStart,1),t({node:i,row:m,col:y}).createAndFill(l[x]))}p.setNodeMarkup(s,t({node:i,row:f.top,col:f.left}),l[0]),o instanceof Gt&&p.setSelection(new Gt(p.doc.resolve(o.$anchorCell.pos),g?p.doc.resolve(g):void 0)),n(p)}return!0}}function Wre(t,e){return function(n,r){if(!Ao(n))return!1;const o=Gp(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof Gt?n.selection.forEachCell((s,a)=>{s.attrs[t]!==e&&i.setNodeMarkup(a,null,{...s.attrs,[t]:e})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}function qre(t){return function(e,n){if(!Ao(e))return!1;if(n){const r=rr(e.schema),o=Jo(e),i=e.tr,s=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),a=s.map(l=>o.table.nodeAt(l));for(let l=0;l<s.length;l++)a[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[l],r.cell,a[l].attrs);if(i.steps.length==0)for(let l=0;l<s.length;l++)i.setNodeMarkup(o.tableStart+s[l],r.header_cell,a[l].attrs);n(i)}return!0}}function bN(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let o=0;o<r.length;o++){const i=e.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function Fu(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?qre(t):function(n,r){if(!Ao(n))return!1;if(r){const o=rr(n.schema),i=Jo(n),s=n.tr,a=bN("row",i,o),l=bN("column",i,o),f=(t==="column"?a:t==="row"?l:!1)?1:0,p=t=="column"?{left:0,top:f,right:1,bottom:i.map.height}:t=="row"?{left:f,top:0,right:i.map.width,bottom:1}:i,g=t=="column"?l?o.cell:o.header_cell:t=="row"?a?o.cell:o.header_cell:o.cell;i.map.cellsInRect(p).forEach(m=>{const b=m+i.tableStart,y=s.doc.nodeAt(b);y&&s.setNodeMarkup(b,g,y.attrs)}),r(s)}return!0}}Fu("row",{useDeprecatedLogic:!0}),Fu("column",{useDeprecatedLogic:!0});var Ure=Fu("cell",{useDeprecatedLogic:!0});function Kre(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const i=t.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),o=t.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return o+1;o+=i.nodeSize}}return null}function vN(t){return function(e,n){if(!Ao(e))return!1;const r=Kre(Gp(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(rt.between(o,_re(o))).scrollIntoView())}return!0}}function Gre(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Yp(t,e){const n=t.selection;if(!(n instanceof Gt))return!1;if(e){const r=t.tr,o=rr(t.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new Re(o,0,0))}),r.docChanged&&e(r)}return!0}function Yre(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const o=e.child(0),i=o.type.spec.tableRole,s=o.type.schema,a=[];if(i=="row")for(let l=0;l<e.childCount;l++){let u=e.child(l).content;const f=l?0:Math.max(0,n-1),p=l<e.childCount-1?0:Math.max(0,r-1);(f||p)&&(u=xx(rr(s).row,new Re(u,f,p)).content),a.push(u)}else if(i=="cell"||i=="header_cell")a.push(n||r?xx(rr(s).row,new Re(e,n,r)).content:e);else return null;return Jre(s,a)}function Jre(t,e){const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(let s=i.childCount-1;s>=0;s--){const{rowspan:a,colspan:l}=i.child(s).attrs;for(let u=o;u<o+a;u++)n[u]=(n[u]||0)+l}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(Oe.empty),n[o]<r){const i=rr(t).cell.createAndFill(),s=[];for(let a=n[o];a<r;a++)s.push(i);e[o]=e[o].append(Oe.from(s))}return{height:e.length,width:r,rows:e}}function xx(t,e){const n=t.createAndFill();return new Uy(n).replace(0,n.content.size,e).doc}function Xre({width:t,height:e,rows:n},r,o){if(t!=r){const i=[],s=[];for(let a=0;a<n.length;a++){const l=n[a],u=[];for(let f=i[a]||0,p=0;f<r;p++){let g=l.child(p%l.childCount);f+g.attrs.colspan>r&&(g=g.type.createChecked(ba(g.attrs,g.attrs.colspan,f+g.attrs.colspan-r),g.content)),u.push(g),f+=g.attrs.colspan;for(let m=1;m<g.attrs.rowspan;m++)i[a+m]=(i[a+m]||0)+g.attrs.colspan}s.push(Oe.from(u))}n=s,t=r}if(e!=o){const i=[];for(let s=0,a=0;s<o;s++,a++){const l=[],u=n[a%e];for(let f=0;f<u.childCount;f++){let p=u.child(f);s+p.attrs.rowspan>o&&(p=p.type.create({...p.attrs,rowspan:Math.max(1,o-p.attrs.rowspan)},p.content)),l.push(p)}i.push(Oe.from(l))}n=i,e=o}return{width:t,height:e,rows:n}}function Zre(t,e,n,r,o,i,s){const a=t.doc.type.schema,l=rr(a);let u,f;if(o>e.width)for(let p=0,g=0;p<e.height;p++){const m=n.child(p);g+=m.nodeSize;const b=[];let y;m.lastChild==null||m.lastChild.type==l.cell?y=u||(u=l.cell.createAndFill()):y=f||(f=l.header_cell.createAndFill());for(let x=e.width;x<o;x++)b.push(y);t.insert(t.mapping.slice(s).map(g-1+r),b)}if(i>e.height){const p=[];for(let b=0,y=(e.height-1)*e.width;b<Math.max(e.width,o);b++){const x=b>=e.width?!1:n.nodeAt(e.map[y+b]).type==l.header_cell;p.push(x?f||(f=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}const g=l.row.create(null,Oe.from(p)),m=[];for(let b=e.height;b<i;b++)m.push(g);t.insert(t.mapping.slice(s).map(r+n.nodeSize-2),m)}return!!(u||f)}function xN(t,e,n,r,o,i,s,a){if(s==0||s==e.height)return!1;let l=!1;for(let u=o;u<i;u++){const f=s*e.width+u,p=e.map[f];if(e.map[f-e.width]==p){l=!0;const g=n.nodeAt(p),{top:m,left:b}=e.findCell(p);t.setNodeMarkup(t.mapping.slice(a).map(p+r),null,{...g.attrs,rowspan:s-m}),t.insert(t.mapping.slice(a).map(e.positionAt(s,b,n)),g.type.createAndFill({...g.attrs,rowspan:m+g.attrs.rowspan-s})),u+=g.attrs.colspan-1}}return l}function SN(t,e,n,r,o,i,s,a){if(s==0||s==e.width)return!1;let l=!1;for(let u=o;u<i;u++){const f=u*e.width+s,p=e.map[f];if(e.map[f-1]==p){l=!0;const g=n.nodeAt(p),m=e.colCount(p),b=t.mapping.slice(a).map(p+r);t.setNodeMarkup(b,null,ba(g.attrs,s-m,g.attrs.colspan-(s-m))),t.insert(b+g.nodeSize,g.type.createAndFill(ba(g.attrs,0,s-m))),u+=g.attrs.rowspan-1}}return l}function wN(t,e,n,r,o){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw new Error("No table found");let s=mn.get(i);const{top:a,left:l}=r,u=l+o.width,f=a+o.height,p=t.tr;let g=0;function m(){if(i=n?p.doc.nodeAt(n-1):p.doc,!i)throw new Error("No table found");s=mn.get(i),g=p.mapping.maps.length}Zre(p,s,i,n,u,f,g)&&m(),xN(p,s,i,n,l,u,a,g)&&m(),xN(p,s,i,n,l,u,f,g)&&m(),SN(p,s,i,n,a,f,l,g)&&m(),SN(p,s,i,n,a,f,u,g)&&m();for(let b=a;b<f;b++){const y=s.positionAt(b,l,i),x=s.positionAt(b,u,i);p.replace(p.mapping.slice(g).map(y+n),p.mapping.slice(g).map(x+n),new Re(o.rows[b-a],0,0))}m(),p.setSelection(new Gt(p.doc.resolve(n+s.positionAt(a,l,i)),p.doc.resolve(n+s.positionAt(f-1,u-1,i)))),e(p)}var Qre=Cb({ArrowLeft:Xp("horiz",-1),ArrowRight:Xp("horiz",1),ArrowUp:Xp("vert",-1),ArrowDown:Xp("vert",1),"Shift-ArrowLeft":Zp("horiz",-1),"Shift-ArrowRight":Zp("horiz",1),"Shift-ArrowUp":Zp("vert",-1),"Shift-ArrowDown":Zp("vert",1),Backspace:Yp,"Mod-Backspace":Yp,Delete:Yp,"Mod-Delete":Yp});function Jp(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Xp(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof Gt)return Jp(n,r,st.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const s=CN(o,t,e);if(s==null)return!1;if(t=="horiz")return Jp(n,r,st.near(n.doc.resolve(i.head+e),e));{const a=n.doc.resolve(s),l=cN(a,t,e);let u;return l?u=st.near(l,1):e<0?u=st.near(n.doc.resolve(a.before(-1)),-1):u=st.near(n.doc.resolve(a.after(-1)),1),Jp(n,r,u)}}}function Zp(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof Gt)s=i;else{const l=CN(o,t,e);if(l==null)return!1;s=new Gt(n.doc.resolve(l))}const a=cN(s.$headCell,t,e);return a?Jp(n,r,new Gt(s.$anchorCell,a)):!1}}function eoe(t,e){const n=t.state.doc,r=Pl(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Gt(r))),!0):!1}function toe(t,e,n){if(!Ao(t.state))return!1;let r=Yre(n);const o=t.state.selection;if(o instanceof Gt){r||(r={width:1,height:1,rows:[Oe.from(xx(rr(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),a=mn.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=Xre(r,a.right-a.left,a.bottom-a.top),wN(t.state,t.dispatch,s,a,r),!0}else if(r){const i=Gp(t.state),s=i.start(-1);return wN(t.state,t.dispatch,s,mn.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function noe(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=_N(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof Gt)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=Pl(t.state.selection.$anchor))!=null&&((n=Sx(t,e))==null?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(l,u){let f=Sx(t,u);const p=vs.getState(t.state)==null;if(!f||!vx(l,f))if(p)f=l;else return;const g=new Gt(l,f);if(p||!t.state.selection.eq(g)){const m=t.state.tr.setSelection(g);p&&m.setMeta(vs,l.pos),t.dispatch(m)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",a),vs.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(vs,-1))}function a(l){const u=l,f=vs.getState(t.state);let p;if(f!=null)p=t.state.doc.resolve(f);else if(_N(t,u.target)!=r&&(p=Sx(t,e),!p))return s();p&&i(p,u)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",a)}function CN(t,e,n){if(!(t.state.selection instanceof rt))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const a=r.before(o),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?a:null}}return null}function _N(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Sx(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Pl(t.state.doc.resolve(n.pos)):null}var roe=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),wx(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,wx(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function wx(t,e,n,r,o,i){var s;let a=0,l=!0,u=e.firstChild;const f=t.firstChild;if(f){for(let p=0,g=0;p<f.childCount;p++){const{colspan:m,colwidth:b}=f.child(p).attrs;for(let y=0;y<m;y++,g++){const x=o==g?i:b&&b[y],w=x?x+"px":"";if(a+=x||r,x||(l=!1),u)u.style.width!=w&&(u.style.width=w),u=u.nextSibling;else{const T=document.createElement("col");T.style.width=w,e.appendChild(T)}}}for(;u;){const p=u.nextSibling;(s=u.parentNode)==null||s.removeChild(u),u=p}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var Vr=new An("tableColumnResizing");function TN({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=roe,lastColumnResizable:o=!0}={}){const i=new ln({key:Vr,state:{init(s,a){var l,u;const f=(u=(l=i.spec)==null?void 0:l.props)==null?void 0:u.nodeViews,p=rr(a.schema).table.name;return r&&f&&(f[p]=(g,m)=>new r(g,n,m)),new ooe(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=Vr.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{ioe(s,a,t,o)},mouseleave:s=>{soe(s)},mousedown:(s,a)=>{aoe(s,a,e,n)}},decorations:s=>{const a=Vr.getState(s);if(a&&a.activeHandle>-1)return foe(s,a.activeHandle)},nodeViews:{}}});return i}var ooe=class Ig{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Vr);if(r&&r.setHandle!=null)return new Ig(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Ig(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return bx(e.doc.resolve(o))||(o=-1),new Ig(o,n.dragging)}return n}};function ioe(t,e,n,r){if(!t.editable)return;const o=Vr.getState(t.state);if(o&&!o.dragging){const i=coe(e.target);let s=-1;if(i){const{left:a,right:l}=i.getBoundingClientRect();e.clientX-a<=n?s=kN(t,e,"left",n):l-e.clientX<=n&&(s=kN(t,e,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){const a=t.state.doc.resolve(s),l=a.node(-1),u=mn.get(l),f=a.start(-1);if(u.colCount(a.pos-f)+a.nodeAfter.attrs.colspan-1==u.width-1)return}ON(t,s)}}}function soe(t){if(!t.editable)return;const e=Vr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&ON(t,-1)}function aoe(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!=null?o:window,s=Vr.getState(t.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=t.state.doc.nodeAt(s.activeHandle),l=loe(t,s.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(Vr,{setDragging:{startX:e.clientX,startWidth:l}}));function u(p){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",f);const g=Vr.getState(t.state);g!=null&&g.dragging&&(uoe(t,g.activeHandle,EN(g.dragging,p,n)),t.dispatch(t.state.tr.setMeta(Vr,{setDragging:null})))}function f(p){if(!p.which)return u(p);const g=Vr.getState(t.state);if(g&&g.dragging){const m=EN(g.dragging,p,n);MN(t,g.activeHandle,m,r)}}return MN(t,s.activeHandle,l,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",f),e.preventDefault(),!0}function loe(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let a=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let u=0;u<n;u++)r[u]&&(a-=r[u],l--);return a/l}function coe(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function kN(t,e,n,r){const o=n=="right"?-r:r,i=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!i)return-1;const{pos:s}=i,a=Pl(t.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;const l=mn.get(a.node(-1)),u=a.start(-1),f=l.map.indexOf(a.pos-u);return f%l.width==0?-1:u+l.map[f-1]}function EN(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function ON(t,e){t.dispatch(t.state.tr.setMeta(Vr,{setHandle:e}))}function uoe(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=mn.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let u=0;u<i.height;u++){const f=u*i.width+a;if(u&&i.map[f]==i.map[f-i.width])continue;const p=i.map[f],g=o.nodeAt(p).attrs,m=g.colspan==1?0:a-i.colCount(p);if(g.colwidth&&g.colwidth[m]==n)continue;const b=g.colwidth?g.colwidth.slice():doe(g.colspan);b[m]=n,l.setNodeMarkup(s+p,null,{...g,colwidth:b})}l.docChanged&&t.dispatch(l)}function MN(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),s=o.start(-1),a=mn.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let l=t.domAtPos(o.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&wx(i,l.firstChild,l,r,a,n)}function doe(t){return Array(t).fill(0)}function foe(t,e){var n;const r=[],o=t.doc.resolve(e),i=o.node(-1);if(!i)return on.empty;const s=mn.get(i),a=o.start(-1),l=s.colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;for(let u=0;u<s.height;u++){const f=l+u*s.width;if((l==s.width-1||s.map[f]!=s.map[f+1])&&(u==0||s.map[f]!=s.map[f-s.width])){const p=s.map[f],g=a+p+i.nodeAt(p).nodeSize-1,m=document.createElement("div");m.className="column-resize-handle",(n=Vr.getState(t))!=null&&n.dragging&&r.push(Kn.node(a+p,a+p+i.nodeAt(p).nodeSize,{class:"column-resize-dragging"})),r.push(Kn.widget(g,m))}}return on.create(t.doc,r)}function AN({allowTableNodeSelection:t=!1}={}){return new ln({key:vs,state:{init(){return null},apply(e,n){const r=e.getMeta(vs);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:i}=e.mapping.mapResult(n);return o?null:i}},props:{decorations:Ere,handleDOMEvents:{mousedown:noe},createSelectionBetween(e){return vs.getState(e.state)!=null?e.state.selection:null},handleTripleClick:eoe,handleKeyDown:Qre,handlePaste:toe},appendTransaction(e,n,r){return Are(r,fN(r,n),t)}})}function Cx(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function IN(t,e,n,r,o,i){var s;let a=0,l=!0,u=e.firstChild;const f=t.firstChild;if(f!==null)for(let p=0,g=0;p<f.childCount;p+=1){const{colspan:m,colwidth:b}=f.child(p).attrs;for(let y=0;y<m;y+=1,g+=1){const x=o===g?i:b&&b[y],w=x?`${x}px`:"";if(a+=x||r,x||(l=!1),u){if(u.style.width!==w){const[T,_]=Cx(r,x);u.style.setProperty(T,_)}u=u.nextSibling}else{const T=document.createElement("col"),[_,C]=Cx(r,x);T.style.setProperty(_,C),e.appendChild(T)}}}for(;u;){const p=u.nextSibling;(s=u.parentNode)===null||s===void 0||s.removeChild(u),u=p}l?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}class poe{constructor(e,n){this.node=e,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),IN(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,IN(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function hoe(t,e,n,r){let o=0,i=!0;const s=[],a=t.firstChild;if(!a)return{};for(let p=0,g=0;p<a.childCount;p+=1){const{colspan:m,colwidth:b}=a.child(p).attrs;for(let y=0;y<m;y+=1,g+=1){const x=n===g?r:b&&b[y];o+=x||e,x||(i=!1);const[w,T]=Cx(e,x);s.push(["col",{style:`${w}: ${T}`}])}}const l=i?`${o}px`:"",u=i?"":`${o}px`;return{colgroup:["colgroup",{},...s],tableWidth:l,tableMinWidth:u}}function DN(t,e){return t.createAndFill()}function goe(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function moe(t,e,n,r,o){const i=goe(t),s=[],a=[];for(let u=0;u<n;u+=1){const f=DN(i.cell);if(f&&a.push(f),r){const p=DN(i.header_cell);p&&s.push(p)}}const l=[];for(let u=0;u<e;u+=1)l.push(i.row.createChecked(null,r&&u===0?s:a));return i.table.createChecked(null,l)}function yoe(t){return t instanceof Gt}const Qp=({editor:t})=>{const{selection:e}=t.state;if(!yoe(e))return!1;let n=0;const r=Nb(e.ranges[0].$from,i=>i.type.name==="table");return r==null||r.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},boe=cn.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:poe,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=hoe(t,this.options.cellMinWidth);return["table",Ct(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const s=moe(i.schema,t,e,n);if(o){const a=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(rt.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Pre(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>Nre(t,e),deleteColumn:()=>({state:t,dispatch:e})=>$re(t,e),addRowBefore:()=>({state:t,dispatch:e})=>Rre(t,e),addRowAfter:()=>({state:t,dispatch:e})=>Bre(t,e),deleteRow:()=>({state:t,dispatch:e})=>zre(t,e),deleteTable:()=>({state:t,dispatch:e})=>Gre(t,e),mergeCells:()=>({state:t,dispatch:e})=>mN(t,e),splitCell:()=>({state:t,dispatch:e})=>yN(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Fu("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Fu("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Ure(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>mN(t,e)?!0:yN(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>Wre(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>vN(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>vN(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&fN(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=Gt.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Qp,"Mod-Backspace":Qp,Delete:Qp,"Mod-Delete":Qp}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[TN({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],AN({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:gt(Ye(t,"tableRole",e))}}}).extend({addProseMirrorPlugins(){return[...this.options.resizable?[TN({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],AN({allowTableNodeSelection:this.options.allowTableNodeSelection})]}}),voe=t=>{const{onUploadFiles:e}=t,n=$.useTheme();return v.jsxs(jp,{children:[v.jsx(ZP,{options:[{label:"Monospace",value:"monospace"},{label:"Serif",value:"serif"}]}),v.jsx(Vn,{}),v.jsx(rN,{}),v.jsx(Vn,{}),v.jsx(eN,{}),v.jsx(Vn,{}),v.jsx(Ane,{}),v.jsx(jne,{}),v.jsx(Zne,{}),v.jsx(Kne,{}),v.jsx(Gne,{}),v.jsx(Yne,{}),v.jsx(Vn,{}),v.jsx(Xne,{defaultTextColor:n.palette.text.primary,swatchColors:[{value:"#000000",label:"Black"},{value:"#ffffff",label:"White"},{value:"#888888",label:"Grey"},{value:"#ff0000",label:"Red"},{value:"#ff9900",label:"Orange"},{value:"#ffff00",label:"Yellow"},{value:"#00d000",label:"Green"},{value:"#0000ff",label:"Blue"}]}),v.jsx($ne,{swatchColors:[{value:"#595959",label:"Dark grey"},{value:"#dddddd",label:"Light grey"},{value:"#ffa6a6",label:"Light red"},{value:"#ffd699",label:"Light orange"},{value:"#ffff00",label:"Yellow"},{value:"#99cc99",label:"Light green"},{value:"#90c6ff",label:"Light blue"},{value:"#8085e9",label:"Light purple"}]}),v.jsx(Vn,{}),v.jsx(Lne,{}),v.jsx(Vn,{}),v.jsx(oN,{}),v.jsx(Vn,{}),v.jsx(Wne,{}),v.jsx(Ine,{}),v.jsx(Jne,{}),one()&&v.jsxs(v.Fragment,{children:[v.jsx(Hne,{}),v.jsx(ere,{})]}),v.jsx(Vn,{}),v.jsx(Mne,{}),v.jsx(Vn,{}),v.jsx(Dne,{}),v.jsx(Pne,{}),v.jsx(Vn,{}),v.jsx(zne,{onUploadFiles:e}),v.jsx(Vn,{}),v.jsx(Fne,{}),v.jsx(One,{}),v.jsx(Vn,{}),v.jsx(Une,{}),v.jsx(Vn,{}),v.jsx(Qne,{}),v.jsx(qne,{})]})},xoe=/^\s*>\s$/,PN=cn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Tl({find:xoe,type:this.type})]}}),Soe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,woe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Coe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,_oe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,NN=_r.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[fa({find:Soe,type:this.type}),fa({find:Coe,type:this.type})]},addPasteRules(){return[gs({find:woe,type:this.type}),gs({find:_oe,type:this.type})]}}),Toe="listItem",LN="textStyle",$N=/^\s*([-+*])\s$/,FN=cn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Toe,this.editor.getAttributes(LN)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Tl({find:$N,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Tl({find:$N,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(LN),editor:this.editor})),[t]}}),koe=/(^|[^`])`([^`]+)`(?!`)/,Eoe=/(^|[^`])`([^`]+)`(?!`)/g,RN=_r.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[fa({find:koe,type:this.type})]},addPasteRules(){return[gs({find:Eoe,type:this.type})]}}),Ooe=/^```([a-z]+)?[\s\n]$/,Moe=/^~~~([a-z]+)?[\s\n]$/,BN=cn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,i=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Ct(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(`
401
+
402
+ `);return!i||!s?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const a=o.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:u})=>(u.setSelection(st.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[zb({find:Ooe,type:this.type,getAttributes:t=>({language:t[1]})}),zb({find:Moe,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new ln({key:new An("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o==null?void 0:o.mode;if(!n||!i)return!1;const{tr:s,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
403
+ `));return s.replaceSelectionWith(this.type.create({language:i},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(rt.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),Aoe=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,o;const i=n.getAttribute("style"),s=(o=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||o===void 0?void 0:o.getAttribute("style");n.setAttribute("style",`${s};${i}`)})},Ioe=_r.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Aoe(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(o=>o.type===this.type).some(o=>Object.values(o.attrs).some(i=>!!i))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),Doe=gn.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),VN=cn.create({name:"doc",topNode:!0,content:"block+"});function Poe(t={}){return new ln({view(e){return new Noe(e,t)}})}class Noe{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),s=i.width/o.offsetWidth,a=i.height/o.offsetHeight;if(n){let p=e.nodeBefore,g=e.nodeAfter;if(p||g){let m=this.editorView.nodeDOM(this.cursorPos-(p?p.nodeSize:0));if(m){let b=m.getBoundingClientRect(),y=p?b.bottom:b.top;p&&g&&(y=(y+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let x=this.width/2*a;r={left:b.left,right:b.right,top:y-x,bottom:y+x}}}}if(!r){let p=this.editorView.coordsAtPos(this.cursorPos),g=this.width/2*s;r={left:p.left-g,right:p.left+g,top:p.top,bottom:p.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,f;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,f=-pageYOffset;else{let p=l.getBoundingClientRect(),g=p.width/l.offsetWidth,m=p.height/l.offsetHeight;u=p.left-l.scrollLeft*g,f=p.top-l.scrollTop*m}this.element.style.left=(r.left-u)/s+"px",this.element.style.top=(r.top-f)/a+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=_O(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const zN=gn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Poe(this.options)]}}),Loe=gn.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});class yn extends st{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return yn.valid(r)?new yn(r):st.near(r)}content(){return Re.empty}eq(e){return e instanceof yn&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new yn(e.resolve(n.pos))}getBookmark(){return new _x(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!$oe(e)||!Foe(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&yn.valid(e))return e;let o=e.pos,i=null;for(let s=e.depth;;s--){let a=e.node(s);if(n>0?e.indexAfter(s)<a.childCount:e.index(s)>0){i=a.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;o+=n;let l=e.doc.resolve(o);if(yn.valid(l))return l}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!et.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let a=e.doc.resolve(o);if(yn.valid(a))return a}return null}}}yn.prototype.visible=!1,yn.findFrom=yn.findGapCursorFrom,st.jsonID("gapcursor",yn);class _x{constructor(e){this.pos=e}map(e){return new _x(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return yn.valid(n)?new yn(n):st.near(n)}}function $oe(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function Foe(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function Roe(){return new ln({props:{decorations:Hoe,createSelectionBetween(t,e,n){return e.pos==n.pos&&yn.valid(n)?new yn(n):null},handleClick:Voe,handleKeyDown:Boe,handleDOMEvents:{beforeinput:zoe}}})}const Boe=Cb({ArrowLeft:eh("horiz",-1),ArrowRight:eh("horiz",1),ArrowUp:eh("vert",-1),ArrowDown:eh("vert",1)});function eh(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let s=r.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof rt){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let u=yn.findGapCursorFrom(a,e,l);return u?(o&&o(r.tr.setSelection(new yn(u))),!0):!1}}function Voe(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!yn.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&et.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new yn(r))),!0)}function zoe(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof yn))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=Oe.empty;for(let s=r.length-1;s>=0;s--)o=Oe.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new Re(o,0,0));return i.setSelection(rt.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function Hoe(t){if(!(t.selection instanceof yn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",on.create(t.doc,[Kn.widget(t.selection.head,e,{key:"gapcursor"})])}const HN=gn.create({name:"gapCursor",addProseMirrorPlugins(){return[Roe()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=gt(Ye(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),jN=cn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Ct(this.options.HTMLAttributes,t)]},renderText(){return`
404
+ `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:f})=>{if(f&&l&&s){const p=l.filter(g=>a.includes(g.type.name));u.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),joe=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Woe=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,qoe=_r.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[fa({find:joe,type:this.type})]},addPasteRules(){return[gs({find:Woe,type:this.type})]}});var th=200,Hn=function(){};Hn.prototype.append=function(e){return e.length?(e=Hn.from(e),!this.length&&e||e.length<th&&this.leafAppend(e)||this.length<th&&e.leafPrepend(this)||this.appendInner(e)):this},Hn.prototype.prepend=function(e){return e.length?Hn.from(e).append(this):this},Hn.prototype.appendInner=function(e){return new Uoe(this,e)},Hn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Hn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},Hn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Hn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)},Hn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o},Hn.from=function(e){return e instanceof Hn?e:e&&e.length?new WN(e):Hn.empty};var WN=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,a){for(var l=i;l<s;l++)if(o(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,s,a){for(var l=i-1;l>=s;l--)if(o(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=th)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=th)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Hn);Hn.empty=new WN([]);var Uoe=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,s){var a=this.left.length;if(o<a&&this.left.forEachInner(r,o,Math.min(i,a),s)===!1||i>a&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(o,a),i,s)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Hn);const Koe=500;class Io{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,a,l,u=[],f=[];return this.items.forEach((p,g)=>{if(!p.step){o||(o=this.remapping(r,g+1),i=o.maps.length),i--,f.push(p);return}if(o){f.push(new Xo(p.map));let m=p.step.map(o.slice(i)),b;m&&s.maybeStep(m).doc&&(b=s.mapping.maps[s.mapping.maps.length-1],u.push(new Xo(b,void 0,void 0,u.length+f.length))),i--,b&&o.appendMap(b,i)}else s.maybeStep(p.step);if(p.selection)return a=o?p.selection.map(o.slice(i)):p.selection,l=new Io(this.items.slice(0,r).append(f.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,n,r,o){let i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let f=0;f<e.steps.length;f++){let p=e.steps[f].invert(e.docs[f]),g=new Xo(e.mapping.maps[f],p,n),m;(m=l&&l.merge(g))&&(g=m,f?i.pop():a=a.slice(0,a.length-1)),i.push(g),n&&(s++,n=void 0),o||(l=g)}let u=s-r.depth;return u>Yoe&&(a=Goe(a,u),s-=u),new Io(a.append(i),s)}remapping(e,n){let r=new su;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new Io(this.items.append(e.map(n=>new Xo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(g=>{g.selection&&a--},o);let l=n;this.items.forEach(g=>{let m=i.getMirror(--l);if(m==null)return;s=Math.min(s,m);let b=i.maps[m];if(g.step){let y=e.steps[m].invert(e.docs[m]),x=g.selection&&g.selection.map(i.slice(l+1,m));x&&a++,r.push(new Xo(b,y,x))}else r.push(new Xo(b))},o);let u=[];for(let g=n;g<s;g++)u.push(new Xo(i.maps[g]));let f=this.items.slice(0,o).append(u).append(r),p=new Io(f,a);return p.emptyItemCount()>Koe&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=e)o.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let f=s.selection&&s.selection.map(n.slice(r));f&&i++;let p=new Xo(u.invert(),l,f),g,m=o.length-1;(g=o.length&&o[m].merge(p))?o[m]=g:o.push(p)}}else s.map&&r--},this.items.length,0),new Io(Hn.from(o.reverse()),i)}}Io.empty=new Io(Hn.empty,0);function Goe(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Xo{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Xo(n.getMap().invert(),n,this.selection)}}}class xs{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const Yoe=20;function Joe(t,e,n,r){let o=n.getMeta(va),i;if(o)return o.historyState;n.getMeta(Qoe)&&(t=new xs(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(va))return s.getMeta(va).redo?new xs(t.done.addTransform(n,void 0,r,nh(e)),t.undone,qN(n.mapping.maps),t.prevTime,t.prevComposition):new xs(t.done,t.undone.addTransform(n,void 0,r,nh(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!Xoe(n,t.prevRanges)),u=s?Tx(t.prevRanges,n.mapping):qN(n.mapping.maps);return new xs(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,nh(e)),Io.empty,u,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new xs(t.done.rebased(n,i),t.undone.rebased(n,i),Tx(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new xs(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Tx(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Xoe(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function qN(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,s)=>e.push(i,s));return e}function Tx(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function Zoe(t,e,n){let r=nh(e),o=va.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),l=new xs(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(s).setMeta(va,{redo:n,historyState:l})}let kx=!1,UN=null;function nh(t){let e=t.plugins;if(UN!=e){kx=!1,UN=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){kx=!0;break}}return kx}const va=new An("history"),Qoe=new An("closeHistory");function eie(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ln({key:va,state:{init(){return new xs(Io.empty,Io.empty,null,0,-1)},apply(e,n,r){return Joe(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?GN:r=="historyRedo"?YN:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function KN(t,e){return(n,r)=>{let o=va.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=Zoe(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const GN=KN(!1,!0),YN=KN(!0,!0),JN=gn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>GN(t,e),redo:()=>({state:t,dispatch:e})=>YN(t,e)}},addProseMirrorPlugins(){return[eie(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),XN=cn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Ct(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!fZ(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$from:r,$to:o}=n,i=t();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):EA(n)?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:s,dispatch:a})=>{var l;if(a){const{$to:u}=s.selection,f=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?s.setSelection(rt.create(s.doc,u.pos+1)):u.nodeAfter.isBlock?s.setSelection(et.create(s.doc,u.pos)):s.setSelection(rt.create(s.doc,u.pos));else{const p=(l=u.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();p&&(s.insert(f,p),s.setSelection(rt.create(s.doc,f+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[AA({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),tie=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,nie=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,rie=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,oie=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,ZN=_r.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[fa({find:tie,type:this.type}),fa({find:rie,type:this.type})]},addPasteRules(){return[gs({find:nie,type:this.type}),gs({find:oie,type:this.type})]}}),iie="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",sie="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Nl=(t,e)=>{for(const n in e)t[n]=e[n];return t},Ex="numeric",Ox="ascii",Mx="alpha",Ru="asciinumeric",Bu="alphanumeric",Ax="domain",QN="emoji",aie="scheme",lie="slashscheme",Ix="whitespace";function cie(t,e){return t in e||(e[t]=[]),e[t]}function xa(t,e,n){e[Ex]&&(e[Ru]=!0,e[Bu]=!0),e[Ox]&&(e[Ru]=!0,e[Mx]=!0),e[Ru]&&(e[Bu]=!0),e[Mx]&&(e[Bu]=!0),e[Bu]&&(e[Ax]=!0),e[QN]&&(e[Ax]=!0);for(const r in e){const o=cie(r,n);o.indexOf(t)<0&&o.push(t)}}function uie(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Tr(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Tr.groups={},Tr.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],i=e.jr[r][1];if(i&&o.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){r=r||Tr.groups;let o;return e&&e.j?o=e:(o=new Tr(e),n&&r&&xa(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this;const i=t.length;if(!i)return o;for(let s=0;s<i-1;s++)o=o.tt(t[s]);return o.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||Tr.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const i=e;let s,a=o.go(t);if(a?(s=new Tr,Nl(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Tr,i){if(r)if(s.t&&typeof s.t=="string"){const l=Nl(uie(s.t,r),n);xa(i,l,r)}else n&&xa(i,n,r);s.t=i}return o.j[t]=s,s}};const mt=(t,e,n,r,o)=>t.ta(e,n,r,o),bn=(t,e,n,r,o)=>t.tr(e,n,r,o),eL=(t,e,n,r,o)=>t.ts(e,n,r,o),Le=(t,e,n,r,o)=>t.tt(e,n,r,o),Oi="WORD",Dx="UWORD",tL="ASCIINUMERICAL",nL="ALPHANUMERICAL",Vu="LOCALHOST",Px="TLD",Nx="UTLD",rh="SCHEME",Ll="SLASH_SCHEME",Lx="NUM",$x="WS",Fx="NL",zu="OPENBRACE",Hu="CLOSEBRACE",oh="OPENBRACKET",ih="CLOSEBRACKET",sh="OPENPAREN",ah="CLOSEPAREN",lh="OPENANGLEBRACKET",ch="CLOSEANGLEBRACKET",uh="FULLWIDTHLEFTPAREN",dh="FULLWIDTHRIGHTPAREN",fh="LEFTCORNERBRACKET",ph="RIGHTCORNERBRACKET",hh="LEFTWHITECORNERBRACKET",gh="RIGHTWHITECORNERBRACKET",mh="FULLWIDTHLESSTHAN",yh="FULLWIDTHGREATERTHAN",bh="AMPERSAND",vh="APOSTROPHE",xh="ASTERISK",Ss="AT",Sh="BACKSLASH",wh="BACKTICK",Ch="CARET",ws="COLON",Rx="COMMA",_h="DOLLAR",Zo="DOT",Th="EQUALS",Bx="EXCLAMATION",lo="HYPHEN",ju="PERCENT",kh="PIPE",Eh="PLUS",Oh="POUND",Wu="QUERY",Vx="QUOTE",rL="FULLWIDTHMIDDLEDOT",zx="SEMI",Qo="SLASH",qu="TILDE",Mh="UNDERSCORE",oL="EMOJI",Ah="SYM";var iL=Object.freeze({__proto__:null,ALPHANUMERICAL:nL,AMPERSAND:bh,APOSTROPHE:vh,ASCIINUMERICAL:tL,ASTERISK:xh,AT:Ss,BACKSLASH:Sh,BACKTICK:wh,CARET:Ch,CLOSEANGLEBRACKET:ch,CLOSEBRACE:Hu,CLOSEBRACKET:ih,CLOSEPAREN:ah,COLON:ws,COMMA:Rx,DOLLAR:_h,DOT:Zo,EMOJI:oL,EQUALS:Th,EXCLAMATION:Bx,FULLWIDTHGREATERTHAN:yh,FULLWIDTHLEFTPAREN:uh,FULLWIDTHLESSTHAN:mh,FULLWIDTHMIDDLEDOT:rL,FULLWIDTHRIGHTPAREN:dh,HYPHEN:lo,LEFTCORNERBRACKET:fh,LEFTWHITECORNERBRACKET:hh,LOCALHOST:Vu,NL:Fx,NUM:Lx,OPENANGLEBRACKET:lh,OPENBRACE:zu,OPENBRACKET:oh,OPENPAREN:sh,PERCENT:ju,PIPE:kh,PLUS:Eh,POUND:Oh,QUERY:Wu,QUOTE:Vx,RIGHTCORNERBRACKET:ph,RIGHTWHITECORNERBRACKET:gh,SCHEME:rh,SEMI:zx,SLASH:Qo,SLASH_SCHEME:Ll,SYM:Ah,TILDE:qu,TLD:Px,UNDERSCORE:Mh,UTLD:Nx,UWORD:Dx,WORD:Oi,WS:$x});const Mi=/[a-z]/,Uu=new RegExp("\\p{L}","u"),Hx=new RegExp("\\p{Emoji}","u"),Ai=/\d/,jx=/\s/,sL="\r",Wx=`
405
+ `,die="️",fie="‍",qx="";let Ih=null,Dh=null;function pie(t=[]){const e={};Tr.groups=e;const n=new Tr;Ih==null&&(Ih=lL(iie)),Dh==null&&(Dh=lL(sie)),Le(n,"'",vh),Le(n,"{",zu),Le(n,"}",Hu),Le(n,"[",oh),Le(n,"]",ih),Le(n,"(",sh),Le(n,")",ah),Le(n,"<",lh),Le(n,">",ch),Le(n,"(",uh),Le(n,")",dh),Le(n,"「",fh),Le(n,"」",ph),Le(n,"『",hh),Le(n,"』",gh),Le(n,"<",mh),Le(n,">",yh),Le(n,"&",bh),Le(n,"*",xh),Le(n,"@",Ss),Le(n,"`",wh),Le(n,"^",Ch),Le(n,":",ws),Le(n,",",Rx),Le(n,"$",_h),Le(n,".",Zo),Le(n,"=",Th),Le(n,"!",Bx),Le(n,"-",lo),Le(n,"%",ju),Le(n,"|",kh),Le(n,"+",Eh),Le(n,"#",Oh),Le(n,"?",Wu),Le(n,'"',Vx),Le(n,"/",Qo),Le(n,";",zx),Le(n,"~",qu),Le(n,"_",Mh),Le(n,"\\",Sh),Le(n,"・",rL);const r=bn(n,Ai,Lx,{[Ex]:!0});bn(r,Ai,r);const o=bn(r,Mi,tL,{[Ru]:!0}),i=bn(r,Uu,nL,{[Bu]:!0}),s=bn(n,Mi,Oi,{[Ox]:!0});bn(s,Ai,o),bn(s,Mi,s),bn(o,Ai,o),bn(o,Mi,o);const a=bn(n,Uu,Dx,{[Mx]:!0});bn(a,Mi),bn(a,Ai,i),bn(a,Uu,a),bn(i,Ai,i),bn(i,Mi),bn(i,Uu,i);const l=Le(n,Wx,Fx,{[Ix]:!0}),u=Le(n,sL,$x,{[Ix]:!0}),f=bn(n,jx,$x,{[Ix]:!0});Le(n,qx,f),Le(u,Wx,l),Le(u,qx,f),bn(u,jx,f),Le(f,sL),Le(f,Wx),bn(f,jx,f),Le(f,qx,f);const p=bn(n,Hx,oL,{[QN]:!0});Le(p,"#"),bn(p,Hx,p),Le(p,die,p);const g=Le(p,fie);Le(g,"#"),bn(g,Hx,p);const m=[[Mi,s],[Ai,o]],b=[[Mi,null],[Uu,a],[Ai,i]];for(let y=0;y<Ih.length;y++)Cs(n,Ih[y],Px,Oi,m);for(let y=0;y<Dh.length;y++)Cs(n,Dh[y],Nx,Dx,b);xa(Px,{tld:!0,ascii:!0},e),xa(Nx,{utld:!0,alpha:!0},e),Cs(n,"file",rh,Oi,m),Cs(n,"mailto",rh,Oi,m),Cs(n,"http",Ll,Oi,m),Cs(n,"https",Ll,Oi,m),Cs(n,"ftp",Ll,Oi,m),Cs(n,"ftps",Ll,Oi,m),xa(rh,{scheme:!0,ascii:!0},e),xa(Ll,{slashscheme:!0,ascii:!0},e),t=t.sort((y,x)=>y[0]>x[0]?1:-1);for(let y=0;y<t.length;y++){const x=t[y][0],T=t[y][1]?{[aie]:!0}:{[lie]:!0};x.indexOf("-")>=0?T[Ax]=!0:Mi.test(x)?Ai.test(x)?T[Ru]=!0:T[Ox]=!0:T[Ex]=!0,eL(n,x,x,T)}return eL(n,"localhost",Vu,{ascii:!0}),n.jd=new Tr(Ah),{start:n,tokens:Nl({groups:e},iL)}}function aL(t,e){const n=hie(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s<r;){let a=t,l=null,u=0,f=null,p=-1,g=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(p=0,g=0,f=a):p>=0&&(p+=n[s].length,g++),u+=n[s].length,i+=n[s].length,s++;i-=p,s-=g,u-=p,o.push({t:f.t,v:e.slice(i-u,i),s:i-u,e:i})}return o}function hie(t){const e=[],n=t.length;let r=0;for(;r<n;){let o=t.charCodeAt(r),i,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function Cs(t,e,n,r,o){let i;const s=e.length;for(let a=0;a<s-1;a++){const l=e[a];t.j[l]?i=t.j[l]:(i=new Tr(r),i.jr=o.slice(),t.j[l]=i),t=i}return i=new Tr(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function lL(t){const e=[],n=[];let r=0,o="0123456789";for(;r<t.length;){let i=0;for(;o.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(t[r]),r++}return e}const Ku={defaultProtocol:"http",events:null,format:cL,formatHref:cL,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ux(t,e=null){let n=Nl({},Ku);t&&(n=Nl(n,t instanceof Ux?t.o:t));const r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}Ux.prototype={o:Ku,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:Ku[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function cL(t){return t}function uL(t,e){this.t="token",this.v=t,this.tk=e}uL.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Ku.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},a=t.get("className",n,e),l=t.get("target",n,e),u=t.get("rel",n,e),f=t.getObj("attributes",n,e),p=t.getObj("events",n,e);return s.href=r,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),f&&Nl(s,f),{tagName:o,attributes:s,content:i,eventListeners:p}}};function Ph(t,e){class n extends uL{constructor(o,i){super(o,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const dL=Ph("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),fL=Ph("text"),gie=Ph("nl"),Nh=Ph("url",{isLink:!0,toHref(t=Ku.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Vu&&t[1].t===ws}}),co=t=>new Tr(t);function mie({groups:t}){const e=t.domain.concat([bh,xh,Ss,Sh,wh,Ch,_h,Th,lo,Lx,ju,kh,Eh,Oh,Qo,Ah,qu,Mh]),n=[vh,ws,Rx,Zo,Bx,ju,Wu,Vx,zx,lh,ch,zu,Hu,ih,oh,sh,ah,uh,dh,fh,ph,hh,gh,mh,yh],r=[bh,vh,xh,Sh,wh,Ch,_h,Th,lo,zu,Hu,ju,kh,Eh,Oh,Wu,Qo,Ah,qu,Mh],o=co(),i=Le(o,qu);mt(i,r,i),mt(i,t.domain,i);const s=co(),a=co(),l=co();mt(o,t.domain,s),mt(o,t.scheme,a),mt(o,t.slashscheme,l),mt(s,r,i),mt(s,t.domain,s);const u=Le(s,Ss);Le(i,Ss,u),Le(a,Ss,u),Le(l,Ss,u);const f=Le(i,Zo);mt(f,r,i),mt(f,t.domain,i);const p=co();mt(u,t.domain,p),mt(p,t.domain,p);const g=Le(p,Zo);mt(g,t.domain,p);const m=co(dL);mt(g,t.tld,m),mt(g,t.utld,m),Le(u,Vu,m);const b=Le(p,lo);Le(b,lo,b),mt(b,t.domain,p),mt(m,t.domain,p),Le(m,Zo,g),Le(m,lo,b);const y=Le(m,ws);mt(y,t.numeric,dL);const x=Le(s,lo),w=Le(s,Zo);Le(x,lo,x),mt(x,t.domain,s),mt(w,r,i),mt(w,t.domain,s);const T=co(Nh);mt(w,t.tld,T),mt(w,t.utld,T),mt(T,t.domain,s),mt(T,r,i),Le(T,Zo,w),Le(T,lo,x),Le(T,Ss,u);const _=Le(T,ws),C=co(Nh);mt(_,t.numeric,C);const E=co(Nh),M=co();mt(E,e,E),mt(E,n,M),mt(M,e,E),mt(M,n,M),Le(T,Qo,E),Le(C,Qo,E);const A=Le(a,ws),I=Le(l,ws),L=Le(I,Qo),O=Le(L,Qo);mt(a,t.domain,s),Le(a,Zo,w),Le(a,lo,x),mt(l,t.domain,s),Le(l,Zo,w),Le(l,lo,x),mt(A,t.domain,E),Le(A,Qo,E),Le(A,Wu,E),mt(O,t.domain,E),mt(O,e,E),Le(O,Qo,E);const D=[[zu,Hu],[oh,ih],[sh,ah],[lh,ch],[uh,dh],[fh,ph],[hh,gh],[mh,yh]];for(let F=0;F<D.length;F++){const[V,z]=D[F],R=Le(E,V);Le(M,V,R),Le(R,z,E);const B=co(Nh);mt(R,e,B);const U=co();mt(R,n),mt(B,e,B),mt(B,n,U),mt(U,e,B),mt(U,n,U),Le(B,z,E),Le(U,z,E)}return Le(o,Vu,T),Le(o,Fx,gie),{start:o,tokens:iL}}function yie(t,e,n){let r=n.length,o=0,i=[],s=[];for(;o<r;){let a=t,l=null,u=null,f=0,p=null,g=-1;for(;o<r&&!(l=a.go(n[o].t));)s.push(n[o++]);for(;o<r&&(u=l||a.go(n[o].t));)l=null,a=u,a.accepts()?(g=0,p=a):g>=0&&g++,o++,f++;if(g<0)o-=f,o<r&&(s.push(n[o]),o++);else{s.length>0&&(i.push(Kx(fL,e,s)),s=[]),o-=g,f-=g;const m=p.t,b=n.slice(o-f,o);i.push(Kx(m,e,b))}}return s.length>0&&i.push(Kx(fL,e,s)),i}function Kx(t,e,n){const r=n[0].s,o=n[n.length-1].e,i=e.slice(r,o);return new t(i,n)}const bie=typeof console<"u"&&console&&console.warn||(()=>{}),vie="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",tn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function xie(){return Tr.groups={},tn.scanner=null,tn.parser=null,tn.tokenQueue=[],tn.pluginQueue=[],tn.customSchemes=[],tn.initialized=!1,tn}function pL(t,e=!1){if(tn.initialized&&bie(`linkifyjs: already initialized - will not register custom scheme "${t}" ${vie}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
406
+ 1. Must only contain digits, lowercase ASCII letters or "-"
407
+ 2. Cannot start or end with "-"
408
+ 3. "-" cannot repeat`);tn.customSchemes.push([t,e])}function Sie(){tn.scanner=pie(tn.customSchemes);for(let t=0;t<tn.tokenQueue.length;t++)tn.tokenQueue[t][1]({scanner:tn.scanner});tn.parser=mie(tn.scanner.tokens);for(let t=0;t<tn.pluginQueue.length;t++)tn.pluginQueue[t][1]({scanner:tn.scanner,parser:tn.parser});return tn.initialized=!0,tn}function Gx(t){return tn.initialized||Sie(),yie(tn.parser.start,t,aL(tn.scanner.start,t))}Gx.scan=aL;function hL(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Ux(n),o=Gx(t),i=[];for(let s=0;s<o.length;s++){const a=o[s];a.isLink&&(!e||a.t===e)&&r.check(a)&&i.push(a.toFormattedObject(r))}return i}const Yx="[\0-   ᠎ -\u2029  ]",wie=new RegExp(Yx),Cie=new RegExp(`${Yx}$`),_ie=new RegExp(Yx,"g");function Tie(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function kie(t){return new ln({key:new An("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=e.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,a=$X(n.doc,[...e]);if(HX(a).forEach(({newRange:u})=>{const f=RX(r.doc,u,m=>m.isTextblock);let p,g;if(f.length>1)p=f[0],g=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ");else if(f.length){const m=r.doc.textBetween(u.from,u.to," "," ");if(!Cie.test(m))return;p=f[0],g=r.doc.textBetween(p.pos,u.to,void 0," ")}if(p&&g){const m=g.split(wie).filter(Boolean);if(m.length<=0)return!1;const b=m[m.length-1],y=p.pos+g.lastIndexOf(b);if(!b)return!1;const x=Gx(b).map(w=>w.toObject(t.defaultProtocol));if(!Tie(x))return!1;x.filter(w=>w.isLink).map(w=>({...w,from:y+w.start+1,to:y+w.end+1})).filter(w=>r.schema.marks.code?!r.doc.rangeHasMark(w.from,w.to,r.schema.marks.code):!0).filter(w=>t.validate(w.value)).filter(w=>t.shouldAutoLink(w.value)).forEach(w=>{Fb(w.from,w.to,r.doc).some(T=>T.mark.type===t.type)||s.addMark(w.from,w.to,t.type.create({href:w.href}))})}}),!!s.steps.length)return s}})}function Eie(t){return new ln({key:new An("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=r.target;const a=[];for(;s.nodeName!=="DIV";)a.push(s),s=s.parentNode;if(!a.find(g=>g.nodeName==="A"))return!1;const l=$b(e.state,t.type.name),u=r.target,f=(o=u==null?void 0:u.href)!==null&&o!==void 0?o:l.href,p=(i=u==null?void 0:u.target)!==null&&i!==void 0?i:l.target;return u&&f?(window.open(f,p),!0):!1}}})}function Oie(t){return new ln({key:new An("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});const l=hL(a,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!l?!1:t.editor.commands.setMark(t.type,{href:l.href})}}})}function Sa(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(_ie,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const Mie=_r.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){pL(t);return}pL(t.scheme,t.optionalSlashes)})},onDestroy(){xie()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Sa(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Sa(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Sa(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Ct(this.options.HTMLAttributes,t),0]:["a",Ct(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Sa(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Sa(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[gs({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=hL(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!Sa(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(kie({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Sa(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(Eie({type:this.type})),this.options.linkOnPaste&&t.push(Oie({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),gL=cn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ct(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});function Aie(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:a}=t,l=r&&!o,u=pZ(n),f=new RegExp(`\\s${u}$`),p=s?"^":"",g=o?"":u,m=l?new RegExp(`${p}${u}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${p}(?:^)?${u}[^\\s${g}]*`,"gm"),b=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!b)return null;const y=a.pos-b.length,x=Array.from(b.matchAll(m)).pop();if(!x||x.input===void 0||x.index===void 0)return null;const w=x.input.slice(Math.max(0,x.index-1),x.index),T=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(w);if(i!==null&&!T)return null;const _=y+x.index;let C=_+x[0].length;return l&&f.test(b.slice(C-1,C+1))&&(x[0]+=" ",C+=1),_<a.pos&&C>=a.pos?{range:{from:_,to:C},query:x[0].slice(n.length),text:x[0]}:null}const Iie=new An("suggestion");function Die({pluginKey:t=Iie,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:u="",decorationEmptyClass:f="is-empty",command:p=()=>null,items:g=()=>[],render:m=()=>({}),allow:b=()=>!0,findSuggestionMatch:y=Aie}){let x;const w=m==null?void 0:m(),T=new ln({key:t,view(){return{update:async(_,C)=>{var E,M,A,I,L,O,D;const F=(E=this.key)===null||E===void 0?void 0:E.getState(C),V=(M=this.key)===null||M===void 0?void 0:M.getState(_.state),z=F.active&&V.active&&F.range.from!==V.range.from,R=!F.active&&V.active,B=F.active&&!V.active,U=!R&&!B&&F.query!==V.query,K=R||z&&U,Y=U||z,G=B||z&&U;if(!K&&!Y&&!G)return;const Z=G&&!K?F:V,ge=_.dom.querySelector(`[data-decoration-id="${Z.decorationId}"]`);x={editor:e,range:Z.range,query:Z.query,text:Z.text,items:[],command:he=>p({editor:e,range:Z.range,props:he}),decorationNode:ge,clientRect:ge?()=>{var he;const{decorationId:me}=(he=this.key)===null||he===void 0?void 0:he.getState(e.state),oe=_.dom.querySelector(`[data-decoration-id="${me}"]`);return(oe==null?void 0:oe.getBoundingClientRect())||null}:null},K&&((A=w==null?void 0:w.onBeforeStart)===null||A===void 0||A.call(w,x)),Y&&((I=w==null?void 0:w.onBeforeUpdate)===null||I===void 0||I.call(w,x)),(Y||K)&&(x.items=await g({editor:e,query:Z.query})),G&&((L=w==null?void 0:w.onExit)===null||L===void 0||L.call(w,x)),Y&&((O=w==null?void 0:w.onUpdate)===null||O===void 0||O.call(w,x)),K&&((D=w==null?void 0:w.onStart)===null||D===void 0||D.call(w,x))},destroy:()=>{var _;x&&((_=w==null?void 0:w.onExit)===null||_===void 0||_.call(w,x))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(_,C,E,M){const{isEditable:A}=e,{composing:I}=e.view,{selection:L}=_,{empty:O,from:D}=L,F={...C};if(F.composing=I,A&&(O||e.view.composing)){(D<C.range.from||D>C.range.to)&&!I&&!C.composing&&(F.active=!1);const V=y({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:L.$from}),z=`id_${Math.floor(Math.random()*4294967295)}`;V&&b({editor:e,state:M,range:V.range,isActive:C.active})?(F.active=!0,F.decorationId=C.decorationId?C.decorationId:z,F.range=V.range,F.query=V.query,F.text=V.text):F.active=!1}else F.active=!1;return F.active||(F.decorationId=null,F.range={from:0,to:0},F.query=null,F.text=null),F}},props:{handleKeyDown(_,C){var E;const{active:M,range:A}=T.getState(_.state);return M&&((E=w==null?void 0:w.onKeyDown)===null||E===void 0?void 0:E.call(w,{view:_,event:C,range:A}))||!1},decorations(_){const{active:C,range:E,decorationId:M,query:A}=T.getState(_);if(!C)return null;const I=!(A!=null&&A.length),L=[l];return I&&L.push(f),on.create(_.doc,[Kn.inline(E.from,E.to,{nodeName:a,class:L.join(" "),"data-decoration-id":M,"data-decoration-content":u})])}}});return T}function Pie({editor:t,overrideSuggestionOptions:e,extensionName:n,char:r="@"}){const o=new An;return{editor:t,char:r,pluginKey:o,command:({editor:i,range:s,props:a})=>{var l,u,f;const p=i.view.state.selection.$to.nodeAfter;((l=p==null?void 0:p.text)===null||l===void 0?void 0:l.startsWith(" "))&&(s.to+=1),i.chain().focus().insertContentAt(s,[{type:n,attrs:{...a,mentionSuggestionChar:r}},{type:"text",text:" "}]).run(),(f=(u=i.view.dom.ownerDocument.defaultView)===null||u===void 0?void 0:u.getSelection())===null||f===void 0||f.collapseToEnd()},allow:({state:i,range:s})=>{const a=i.doc.resolve(s.from),l=i.schema.nodes[n];return!!a.parent.type.contentMatch.matchType(l)},...e}}function mL(t){return(t.options.suggestions.length?t.options.suggestions:[t.options.suggestion]).map(e=>Pie({editor:t.editor,overrideSuggestionOptions:e,extensionName:t.name,char:e.char}))}function yL(t,e){const n=mL(t),r=n.find(o=>o.char===e);return r||(n.length?n[0]:null)}const Nie=cn.create({name:"mention",priority:101,addOptions(){return{HTMLAttributes:{},renderText({node:t,suggestion:e}){var n,r;return`${(n=e==null?void 0:e.char)!==null&&n!==void 0?n:"@"}${(r=t.attrs.label)!==null&&r!==void 0?r:t.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:t,node:e,suggestion:n}){var r,o;return["span",Ct(this.HTMLAttributes,t.HTMLAttributes),`${(r=n==null?void 0:n.char)!==null&&r!==void 0?r:"@"}${(o=e.attrs.label)!==null&&o!==void 0?o:e.attrs.id}`]},suggestions:[],suggestion:{}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}},mentionSuggestionChar:{default:"@",parseHTML:t=>t.getAttribute("data-mention-suggestion-char"),renderHTML:t=>({"data-mention-suggestion-char":t.mentionSuggestionChar})}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){const n=yL(this,t.attrs.mentionSuggestionChar);if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",Ct({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t,suggestion:n})];const r={...this.options};r.HTMLAttributes=Ct({"data-type":this.name},this.options.HTMLAttributes,e);const o=this.options.renderHTML({options:r,node:t,suggestion:n});return typeof o=="string"?["span",Ct({"data-type":this.name},this.options.HTMLAttributes,e),o]:o},renderText({node:t}){const e={options:this.options,node:t,suggestion:yL(this,t.attrs.mentionSuggestionChar)};return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel(e)):this.options.renderText(e)},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let n=!1;const{selection:r}=e,{empty:o,anchor:i}=r;if(!o)return!1;e.doc.nodesBetween(i-1,i,(l,u)=>{if(l.type.name===this.name)return n=!0,t.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",u,u+l.nodeSize),!1});let s=new xi,a=0;return e.doc.nodesBetween(i-1,i,(l,u)=>{if(l.type.name===this.name)return n=!0,s=l,a=u,!1}),n&&t.insertText(this.options.deleteTriggerWithBackspace?"":s.attrs.mentionSuggestionChar,a,a+s.nodeSize),n})}},addProseMirrorPlugins(){return mL(this).map(Die)}}),Lie="listItem",bL="textStyle",vL=/^(\d+)\.\s$/,xL=cn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Ct(this.options.HTMLAttributes,n),0]:["ol",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Lie,this.editor.getAttributes(bL)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Tl({find:vL,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Tl({find:vL,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(bL)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),SL=cn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),wL=gn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new ln({key:new An("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];if(!n)return null;const i=this.editor.isEmpty;return t.descendants((s,a)=>{const l=r>=a&&r<=a+s.nodeSize,u=!s.isLeaf&&Mp(s);if((l||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];i&&f.push(this.options.emptyEditorClass);const p=Kn.node(a,a+s.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:a,hasAnchor:l}):this.options.placeholder});o.push(p)}return this.options.includeChildren}),on.create(t,o)}}})]}}),$ie=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Fie=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,CL=_r.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[fa({find:$ie,type:this.type})]},addPasteRules(){return[gs({find:Fie,type:this.type})]}}),Rie=_r.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Bie=_r.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),Vie=cn.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",Ct(this.options.HTMLAttributes,t),0]}}),zie=cn.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",Ct(this.options.HTMLAttributes,t),0]}}),Hie=cn.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Ct(this.options.HTMLAttributes,t),0]}}),jie=/^\s*(\[([( |x])?\])\s$/,Wie=cn.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Ct(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),u=()=>{var f,p;a.ariaLabel=((p=(f=this.options.a11y)===null||f===void 0?void 0:f.checkboxLabel)===null||p===void 0?void 0:p.call(f,t,a.checked))||`Task item checkbox for ${t.textContent||"empty task item"}`};return u(),i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",f=>f.preventDefault()),a.addEventListener("change",f=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:p}=f.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:g})=>{const m=n();if(typeof m!="number")return!1;const b=g.doc.nodeAt(m);return g.setNodeMarkup(m,void 0,{...b==null?void 0:b.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,p)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([f,p])=>{o.setAttribute(f,p)}),o.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,i.append(a,s),o.append(i,l),Object.entries(e).forEach(([f,p])=>{o.setAttribute(f,p)}),{dom:o,contentDOM:l,update:f=>f.type!==this.type?!1:(o.dataset.checked=f.attrs.checked,a.checked=f.attrs.checked,u(),!0)}}},addInputRules(){return[Tl({find:jie,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),qie=cn.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Ct(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),_L=cn.create({name:"text",group:"inline"}),Uie=gn.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Kie=_r.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Ct(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),TL=q.forwardRef((t,e)=>{const[n,r]=q.useState(0),o=l=>{if(l>=t.items.length)return;const u=t.items[l],f={id:u.id,label:u.mentionLabel};t.command(f)},i=()=>{r((n+t.items.length-1)%t.items.length)},s=()=>{r((n+1)%t.items.length)},a=()=>{o(n)};return q.useEffect(()=>r(0),[t.items]),q.useImperativeHandle(e,()=>({onKeyDown:({event:l})=>l.key==="ArrowUp"?(i(),!0):l.key==="ArrowDown"?(s(),!0):l.key==="Enter"?(a(),!0):!1})),t.items.length>0?v.jsx($.Paper,{elevation:5,children:v.jsx($.List,{dense:!0,sx:{overflow:"hidden"},children:t.items.map((l,u)=>v.jsx($.ListItem,{disablePadding:!0,children:v.jsx($.ListItemButton,{selected:u===n,onClick:()=>o(u),children:l.mentionLabel})},l.id))})}):null});TL.displayName="SuggestionList";const kL={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0,toJSON(){return{}}},Gie={items:async({query:t})=>Promise.resolve(["Lea Thompson","Cyndi Lauper","Tom Cruise","Madonna","Jerry Hall","Joan Collins","Winona Ryder","Christina Applegate","Alyssa Milano","Molly Ringwald","Ally Sheedy","Debbie Harry","Olivia Newton-John","Elton John","Michael J. Fox","Axl Rose","Emilio Estevez","Ralph Macchio","Rob Lowe","Jennifer Grey","Mickey Rourke","John Cusack","Matthew Broderick","Justine Bateman","Lisa Bonet","Benicio Monserrate Rafael del Toro Sánchez"].map((e,n)=>({mentionLabel:e,id:n.toString()})).filter(e=>e.mentionLabel.toLowerCase().startsWith(t.toLowerCase())).slice(0,5)),render:()=>{let t,e;return{onStart:n=>{t=new AP(TL,{props:n,editor:n.editor}),e=Du("body",{getReferenceClientRect:()=>{var r;return((r=n.clientRect)==null?void 0:r.call(n))??kL},appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"})[0]},onUpdate(n){t==null||t.updateProps(n),e==null||e.setProps({getReferenceClientRect:()=>{var r;return((r=n.clientRect)==null?void 0:r.call(n))??kL}})},onKeyDown(n){return n.event.key==="Escape"?(e==null||e.hide(),!0):t!=null&&t.ref?t.ref.onKeyDown(n):!1},onExit(){e==null||e.destroy(),t==null||t.destroy(),e=void 0,t=void 0}}}},Yie=Mie.extend({inclusive:!1}),Jie=Rie.extend({excludes:"superscript"}),Xie=Bie.extend({excludes:"subscript"});function Zie({placeholder:t}={}){return q.useMemo(()=>[boe.configure({resizable:!0}),Hie,zie,Vie,FN,BN,VN,jN,gL,xL,SL,Jie,Xie,_L,NN,PN,RN,ZN,Kie,CL,Yie.configure({autolink:!0,linkOnPaste:!0,openOnClick:!1}),pee,HN,ure,Uie.configure({types:["heading","paragraph","image"]}),Ioe,Doe,Loe,lre,qoe.configure({multicolor:!0}),XN,yre,zN,qie,Wie.configure({nested:!0}),Nie.configure({suggestion:Gie}),wL.configure({placeholder:t}),JN],[t])}function EL(t){return Array.from(t).filter(e=>(e.type||"").toLowerCase().startsWith("image/"))}const Qie=t=>{const e=Zie({placeholder:"Add your own content here..."});if(t.renderContentOnly)return v.jsx(Vte,{content:t.renderContentOnly,extensions:e});const{name:n,label:r,labelProps:o={fontSize:"0.9em",color:"#808080",fontWeight:"400"},onUploadFiles:i,readOnly:s=!1}=t,{control:a,setValue:l,getValues:u}=an();q.useEffect(()=>{var y,x,w;(w=(x=(y=f==null?void 0:f.current)==null?void 0:y.editor)==null?void 0:x.commands)==null||w.setContent(u(n))},[u(n)]);const f=q.useRef(null),p=q.useCallback((y,x)=>{var T;const w=(T=f.current)==null?void 0:T.editor;if(w)if(i instanceof Promise)i(y).then(_=>{px({images:_,editor:w,position:x})});else{const _=i(y);px({images:_,editor:w,position:x})}},[]),g=q.useCallback((y,x,w,T)=>{var C;if(!(x instanceof DragEvent)||!x.dataTransfer)return!1;const _=EL(x.dataTransfer.files);if(_.length>0){const E=(C=y.posAtCoords({left:x.clientX,top:x.clientY}))==null?void 0:C.pos;return p(_,E),x.preventDefault(),!0}return!1},[p]),m=q.useCallback((y,x,w)=>{if(!x.clipboardData)return!1;const T=EL(x.clipboardData.files);return T.length>0?(p(T),!0):!1},[p]),b=v.jsx($.Box,{sx:{"& .ProseMirror":{"& h1, & h2, & h3, & h4, & h5, & h6":{scrollMarginTop:s?0:50}}},children:v.jsx(Xn,{name:n,control:a,render:({field:y})=>v.jsx($P,{...y,ref:f,extensions:e,content:u(n),editable:!s,editorProps:{handleDrop:g,handlePaste:m},renderControls:s?void 0:()=>v.jsx(voe,{onUploadFiles:i}),onBlur:()=>{var x,w;return l(n,((w=(x=f.current)==null?void 0:x.editor)==null?void 0:w.getHTML())??"",{shouldValidate:!0})},RichTextFieldProps:{variant:"outlined",MenuBarProps:{hide:s}},children:()=>v.jsxs(v.Fragment,{children:[v.jsx(XD,{}),v.jsx(FP,{})]})})})});return v.jsxs($.Box,{display:"flex",flexDirection:"column",children:[r&&v.jsx($.Typography,{...o,children:r}),b]})},Jx=t=>{const{title:e="Loading...",message:n}=t;return v.jsxs($.Box,{className:"loading-page",sx:{gap:2},"data-testid":"loading-page",children:[v.jsxs($.Box,{className:"text-content",children:[v.jsx($.Typography,{variant:"h1","data-testid":"title",children:e}),n&&v.jsx($.Typography,{"data-testid":"message",children:n})]}),v.jsx($.CircularProgress,{size:75,"data-testid":"loading-spinner"})]})},OL=t=>{const{colSpan:e,isExpanded:n,renderExpand:r,obj:o,asMobileCard:i=!1}=t,[s,a]=q.useState(!1),[l,u]=q.useState(void 0);return q.useEffect(()=>{n&&!s&&(a(!0),u(r(o)))},[n]),i?v.jsx($.Box,{children:v.jsx($.Collapse,{in:n,children:l})}):v.jsx($.TableRow,{children:v.jsx($.TableCell,{style:{paddingBottom:0,paddingTop:0},colSpan:e,children:v.jsx($.Collapse,{in:n,children:l})})})},ML=t=>{const{id:e,getRowKey:n=X=>"id"in X&&(typeof X.id=="string"||typeof X.id=="number")?X.id:(console.warn(`Table: "id: string | number" not found in ${JSON.stringify(X)}. Please implement the Table.getRowKey prop so Table knows how to uniquely identify this row.`),JSON.stringify(X)),columns:r,data:o=[],onRowClick:i,renderExpand:s,hideColumnsOnMobile:a=[],sortField:l,sortOrder:u,onSortChange:f,allowSortCols:p,fixedLayout:g=!1,className:m,emptyTableMsg:b="No items to display",errorTableMsg:y,retryCallback:x,isLoading:w=!1,disableMobileCards:T=!1,highlightSelectedRow:_=!1,headerRowStyle:C={},stickyHeader:E,...M}=t,{palette:A}=$.useTheme(),[I,L]=q.useState(void 0),[O,D]=q.useState(void 0);Array.isArray(g)&&g.length!==r.length&&console.error('Table component: Length of "fixedLayout" is not equal to the length of "columns".');const F=X=>{X!==l?f&&f(X,"asc"):f&&f(l,u==="asc"?"desc":"asc")},V=X=>l===X?u:null,z=$.useMediaQuery($.useTheme().breakpoints.down("sm")),R=z&&a?r.filter(X=>!a.includes(X.fieldName)):r,B=(X,Q)=>Q.split(".").reduce((ae,ve)=>{if(ae&&typeof ae=="object")return ae[ve]},X),U=(X,Q)=>{const ae=B(Q,X.fieldName);return X.render?X.render(ae,Q,z):ae},K=f!==void 0,Y=X=>K?p?p.includes(X):!0:!1,G=v.jsxs($.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:[v.jsx(Yz,{})," ",b]}),Z=v.jsxs($.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:[v.jsx(C_,{})," ",y,x&&v.jsx($.Button,{variant:"text",onClick:x,children:"Retry?"})]}),ge=()=>{if(w)return v.jsx($.TableRow,{children:v.jsx($.TableCell,{colSpan:r.length,align:"center",children:v.jsx($.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:v.jsx(Jx,{})})})});if(y)return v.jsx($.TableRow,{children:v.jsx($.TableCell,{colSpan:r.length,align:"center",children:Z})});if(o.length===0)return v.jsx($.TableRow,{children:v.jsx($.TableCell,{colSpan:r.length,align:"center",children:G})})},he=()=>{if(w)return v.jsx(Jx,{});if(y)return Z;if(o.length===0)return G},me=X=>{_&&D(X)},oe=X=>{if(i&&(i(X),me(X)),s){const Q=I===X?void 0:X;L(Q),me(Q)}},ye=typeof _=="string"?_:A.grey[A.mode=="dark"?600:50],de=X=>{const Q=O===n(X)?ye:"inherit";return{cursor:i||s?"pointer":"default",backgroundColor:Q,...i&&{"&:hover":{backgroundColor:Q===ye?Wq(Q,.1):ye}}}};return z&&!T?v.jsxs("div",{...e?{id:`mobile-table-${e}`}:{},className:m,"data-testid":"mui-table-mobile",children:[K&&v.jsxs(v.Fragment,{children:[v.jsxs($.Box,{display:"flex",className:"MBv2_Table_Stack_Sort",children:[v.jsx($.TextField,{select:!0,sx:{flexGrow:1},id:"demo-simple-select",size:"small",value:l??"",label:"Sort By...",onChange:X=>F(X.target.value),fullWidth:!0,children:R.map(X=>{if(Y(X.fieldName))return v.jsx($.MenuItem,{value:X.sortName??X.fieldName,children:X.label??Wn(X.fieldName)},`${X.key??"rowHeader"}-${X.fieldName}`)})}),v.jsx($.IconButton,{onClick:()=>{l&&F(l)},children:v.jsx(i4,{className:`sort-icon-${u}`})})]}),v.jsx($.Divider,{sx:{margin:"10px 0"}})]}),he()??o.map(X=>v.jsxs($.Card,{className:"MBv2_Table_Stack_Container",sx:{margin:"5px 0",padding:"5px",...de(X)},onClick:()=>oe(n(X)),"data-testid":`card-${n(X)}`,children:[v.jsx("table",{className:"MBv2_Table_Stack",children:v.jsx("tbody",{className:"MBv2_Table_Stack_Body",children:R.map(Q=>v.jsxs("tr",{className:"MBv2_Table_Stack_Row",children:[v.jsx("td",{className:`MBv2_Table_Stack_Cell_Label MBv2_Table_Stack_Col_${Q.fieldName}`,children:Q.label??Wn(Q.fieldName)}),v.jsx("td",{className:`MBv2_Table_Stack_Cell_Value MBv2_Table_Stack_Val_${Q.fieldName}`,style:{paddingLeft:"10px"},children:U(Q,X)})]},`${Q.key??"row"}-${n(X)}-${Q.fieldName}`))})}),s&&v.jsx(OL,{colSpan:r.length,isExpanded:n(X)===I,obj:X,renderExpand:Q=>s(Q),asMobileCard:!0})]},n(X)))]}):v.jsx($.TableContainer,{component:$.Card,"data-testid":"mui-table",...e?{id:`table-${e}`}:{},className:m,style:E?{maxHeight:E,overflow:"auto"}:{},children:v.jsxs($.Table,{stickyHeader:E!=="undefined",style:{tableLayout:g?"fixed":"auto"},className:"MBv2_Table",sx:C?{"& .MuiTableCell-head":{...C}}:{},...M,children:[v.jsx($.TableHead,{className:"MBv2_Table_Head",children:v.jsx($.TableRow,{className:"MBv2_Table_Head_Row",children:R.map((X,Q)=>{const ae=Y(X.fieldName);return v.jsx($.TableCell,{width:Array.isArray(g)?g[Q]:"auto",children:v.jsx($.Box,{style:{display:"flex",alignItems:"center"},children:v.jsxs($.Box,{sx:[ae&&{"&:hover":{cursor:"pointer",backgroundColor:A.mode==="dark"?"#222222":"#ededed",borderRadius:2}}],style:{display:"flex",alignItems:"center",padding:"5px",paddingLeft:"6px",marginLeft:"-6px"},onClick:ae?()=>F(X.sortName??X.fieldName):void 0,children:[v.jsx("strong",{className:"MBv2_Table_Col_Label",style:{wordBreak:"normal"},children:X.label??Wn(X.fieldName)}),ae&&V(X.fieldName)==="asc"&&v.jsx(J_,{style:{marginLeft:"5px"}}),ae&&V(X.fieldName)==="desc"&&v.jsx(Jz,{style:{marginLeft:"5px"}}),ae&&V(X.fieldName)!=="asc"&&V(X.fieldName)!=="desc"&&v.jsx(n4,{style:{marginLeft:"5px"}})]})})},`${X.key??"rowHeader"}-${X.fieldName}`)})})}),v.jsx($.TableBody,{className:"MBv2_Table_Body",children:ge()??o.map(X=>v.jsxs(q.Fragment,{children:[v.jsx($.TableRow,{"data-testid":`row-${n(X)}`,className:"MBv2_Table_Body_Row",onClick:()=>oe(n(X)),sx:de(X),children:R.map(Q=>v.jsx($.TableCell,{className:`MBv2_Table_Body_Cell MBv2_Table_Body_Col_${Q.fieldName}`,children:U(Q,X)},`${Q.key??"row"}-${n(X)}-${Q.fieldName}`))}),s&&v.jsx(OL,{colSpan:r.length,isExpanded:n(X)===I,obj:X,renderExpand:Q=>s(Q)})]},n(X)))})]})})},AL=t=>{const{paginationState:e,onPageChange:n,onRowsPerPageChange:r,hidePaginationControls:o=!1,rowsPerPageOptions:i=[5,10,25],...s}=t,{pageNo:a,pageSize:l,totalCount:u,sortField:f,sortOrder:p}=e,g=x=>{n(x)},m=x=>{r(parseInt(x.target.value,10))},b=$.useMediaQuery($.useTheme().breakpoints.down("sm")),y=!t.data||t.data&&t.data.length===0;return v.jsxs($.Box,{children:[v.jsx(ML,{sortOrder:p,sortField:f,...s}),!o&&!y&&v.jsx($.TablePagination,{"data-testid":"pagination-controls",component:"div",rowsPerPageOptions:b?[]:i,count:u,rowsPerPage:l,page:a,onPageChange:(x,w)=>g(w),onRowsPerPageChange:m,sx:{flexGrow:1,marginRight:{xs:0,md:15}}})]})},ese=t=>{const{editMenuTitle:e,onCancel:n,onNewCitation:r,onNewAttachment:o,onEditCitation:i,onEditAttachment:s,onSelect:a,fetchExistingCitations:l,selectedIds:u,toggleCheckbox:f}=t,[p,g]=q.useState([]),[m,b]=q.useState(!1),[y,x]=q.useState(!0),[w,T]=q.useState({pageNo:0,pageSize:5,totalCount:0}),_=()=>{b(!1),x(!0),l({pageNo:w.pageNo,pageSize:w.pageSize}).then(C=>{g(C.data),T({...w,totalCount:C.totalCount})}).catch(()=>{b(!0),g([])}).finally(()=>x(!1))};return q.useEffect(()=>{_()},[w.pageNo,w.pageSize]),v.jsxs($.Box,{width:"500px","data-testid":"citation-table",children:[v.jsx($.Typography,{variant:"h6",children:e}),v.jsx(AL,{size:"x-small",isLoading:y,columns:[{fieldName:"id",key:"select",label:"",render:(C,E)=>v.jsx($.Checkbox,{"data-testid":`citation-table_checkbox-${C}`,onChange:()=>f(E),checked:u.includes(C)})},{fieldName:"title"},{fieldName:"fileName",key:"CitationOrAttachment",label:"Type",render:C=>C?"Attachment":"Citation"},{fieldName:"id",key:"Action",label:"Action",render:(C,E)=>v.jsx($.IconButton,{color:"primary",onClick:()=>E.fileName?s(E):i(E),"data-testid":`citation-table_edit-btn-${C}`,children:v.jsx(Iz,{})})}],data:p,paginationState:w,onPageChange:C=>T({...w,pageNo:C}),onRowsPerPageChange:C=>T({...w,pageSize:C,pageNo:0}),fixedLayout:["60px","auto","auto","120px"],errorTableMsg:m?"Failed to load citations.":void 0,retryCallback:_}),v.jsxs($.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:"20px",children:[v.jsxs($.Box,{display:"flex",flexDirection:"row",gap:".25rem",children:[v.jsx($.Button,{variant:"outlined",size:"small",onClick:r,startIcon:v.jsx(Lm,{}),children:"Add Citation"}),v.jsx($.Button,{variant:"outlined",size:"small",onClick:o,startIcon:v.jsx(Tz,{}),children:"Add Attachment"})]}),v.jsxs($.Box,{display:"flex",flexDirection:"row",gap:".25rem",children:[v.jsx($.Button,{variant:"outlined",size:"small",onClick:n,children:"Cancel"}),v.jsxs($.Button,{variant:"contained",size:"small",onClick:()=>a(u),children:["Select",u.length>0&&` (${u.length})`]})]})]})]})},IL=()=>({height:window.innerHeight,width:window.innerWidth}),DL=()=>{const[t,e]=q.useState(IL());return q.useEffect(()=>{const n=()=>{e(IL())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t},Xx=t=>{const{name:e="button",color:n="primary",fullWidthOnMobile:r=!0,type:o="button",variant:i="contained"}=t,{width:s}=DL(),a=["locationInBar","closeDialog","fullWidthOnMobile"],l=r&&s<600;return v.jsx($.Button,{role:"button",name:e,color:n,variant:i,type:o,fullWidth:t.fullWidth?!0:l,...lr({...t},a)})},PL=t=>{const{name:e="submit"}=t;return v.jsx(Xx,{name:e,type:"submit",...t})},tse=t=>{const{id:e,editMenuTitle:n,onSave:r,onCancel:o,getCitationById:i,onTitleChanged:s}=t,a=q.useRef(null),[l,u]=q.useState(!0),[f,p]=q.useState({source:"",title:"",accessedAt:null,url:"",classification:""}),[g,m]=q.useState("");q.useEffect(()=>{if(e===void 0){u(!1);return}i(e).then(y=>{p(y),m(y.title),u(!1)}).catch(()=>{u(!1)})},[]);const b=()=>{var x,w,T;const y=(w=(x=a==null?void 0:a.current)==null?void 0:x.values)==null?void 0:w.url;y&&((T=a==null?void 0:a.current)==null||T.setFieldValue("url",LD(y)))};return v.jsxs($.Box,{width:"500px",children:[v.jsx($.Typography,{variant:"h6",marginBottom:"10px",children:n}),v.jsx(Na.Formik,{innerRef:a,enableReinitialize:!0,initialValues:f,onSubmit:async y=>{u(!0),r(y).then(()=>{e!==void 0&&g!==y.title&&(s==null||s(e))}).finally(()=>u(!1))},children:v.jsxs(Na.Form,{autoComplete:"off",children:[v.jsx(Sc,{name:"source",disabled:l,required:!0,margin:"none"}),v.jsx(Sc,{name:"title",disabled:l,required:!0,margin:"none"}),v.jsx(Kf,{name:"accessedAt",disabled:l,required:!0,margin:"none"}),v.jsx(Sc,{name:"url",disabled:l,required:!0,onBlur:b,margin:"none"}),v.jsx(G_,{row:!0,name:"classification",required:!0,radios:[{label:"Public Source",value:"Public Source"},{label:"Unclassified",value:"Unclassified"}],margin:"none"}),v.jsxs($.DialogActions,{sx:{px:0},children:[v.jsx($.Button,{onClick:o,variant:"outlined",size:"small",children:"Cancel"}),v.jsx(PL,{color:"primary",variant:"contained",size:"small",disabled:l,children:e?"Update Citation":"Add New Citation"})]})]})})]})};var Zx,NL;function nse(){if(NL)return Zx;NL=1;function t(w){this._maxSize=w,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(w){return this._values[w]},t.prototype.set=function(w,T){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=T};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,a=new t(s),l=new t(s),u=new t(s);Zx={Cache:t,split:p,normalizePath:f,setter:function(w){var T=f(w);return l.get(w)||l.set(w,function(C,E){for(var M=0,A=T.length,I=C;M<A-1;){var L=T[M];if(L==="__proto__"||L==="constructor"||L==="prototype")return C;I=I[T[M++]]}I[T[M]]=E})},getter:function(w,T){var _=f(w);return u.get(w)||u.set(w,function(E){for(var M=0,A=_.length;M<A;)if(E!=null||!T)E=E[_[M++]];else return;return E})},join:function(w){return w.reduce(function(T,_){return T+(m(_)||n.test(_)?"["+_+"]":(T?".":"")+_)},"")},forEach:function(w,T,_){g(Array.isArray(w)?w:p(w),T,_)}};function f(w){return a.get(w)||a.set(w,p(w).map(function(T){return T.replace(i,"$2")}))}function p(w){return w.match(e)||[""]}function g(w,T,_){var C=w.length,E,M,A,I;for(M=0;M<C;M++)E=w[M],E&&(x(E)&&(E='"'+E+'"'),I=m(E),A=!I&&/^\d+$/.test(E),T.call(_,E,I,A,M,w))}function m(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function b(w){return w.match(r)&&!w.match(n)}function y(w){return o.test(w)}function x(w){return!m(w)&&(b(w)||y(w))}return Zx}var wa=nse(),Qx,LL;function rse(){if(LL)return Qx;LL=1;const t=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,e=f=>f.match(t)||[],n=f=>f[0].toUpperCase()+f.slice(1),r=(f,p)=>e(f).join(p).toLowerCase(),o=f=>e(f).reduce((p,g)=>`${p}${p?g[0].toUpperCase()+g.slice(1).toLowerCase():g.toLowerCase()}`,"");return Qx={words:e,upperFirst:n,camelCase:o,pascalCase:f=>n(o(f)),snakeCase:f=>r(f,"_"),kebabCase:f=>r(f,"-"),sentenceCase:f=>n(r(f," ")),titleCase:f=>e(f).map(n).join(" ")},Qx}var eS=rse(),Lh={exports:{}},$L;function ose(){if($L)return Lh.exports;$L=1,Lh.exports=function(o){return t(e(o),o)},Lh.exports.array=t;function t(o,i){var s=o.length,a=new Array(s),l={},u=s,f=n(i),p=r(o);for(i.forEach(function(m){if(!p.has(m[0])||!p.has(m[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||g(o[u],u,new Set);return a;function g(m,b,y){if(y.has(m)){var x;try{x=", node was:"+JSON.stringify(m)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!p.has(m))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(m));if(!l[b]){l[b]=!0;var w=f.get(m)||new Set;if(w=Array.from(w),b=w.length){y.add(m);do{var T=w[--b];g(T,p.get(T),y)}while(b);y.delete(m)}a[--s]=m}}}function e(o){for(var i=new Set,s=0,a=o.length;s<a;s++){var l=o[s];i.add(l[0]),i.add(l[1])}return Array.from(i)}function n(o){for(var i=new Map,s=0,a=o.length;s<a;s++){var l=o[s];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function r(o){for(var i=new Map,s=0,a=o.length;s<a;s++)i.set(o[s],s);return i}return Lh.exports}var ise=ose();const sse=cr(ise),ase=Object.prototype.toString,lse=Error.prototype.toString,cse=RegExp.prototype.toString,use=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",dse=/^Symbol\((.*)\)(.*)$/;function fse(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function FL(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const n=typeof t;if(n==="number")return fse(t);if(n==="string")return e?`"${t}"`:t;if(n==="function")return"[Function "+(t.name||"anonymous")+"]";if(n==="symbol")return use.call(t).replace(dse,"Symbol($1)");const r=ase.call(t).slice(8,-1);return r==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):r==="Error"||t instanceof Error?"["+lse.call(t)+"]":r==="RegExp"?cse.call(t):null}function _s(t,e){let n=FL(t,e);return n!==null?n:JSON.stringify(t,function(r,o){let i=FL(this[r],e);return i!==null?i:o},2)}function RL(t){return t==null?[]:[].concat(t)}let BL,VL,zL,pse=/\$\{\s*(\w+)\s*\}/g;BL=Symbol.toStringTag;class HL{constructor(e,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[BL]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],RL(e).forEach(i=>{if(kr.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}VL=Symbol.hasInstance,zL=Symbol.toStringTag;class kr extends Error{static formatError(e,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof e=="string"?e.replace(pse,(o,i)=>_s(n[i])):typeof e=="function"?e(n):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,n,r,o,i){const s=new HL(e,n,r,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[zL]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,kr)}static[VL](e){return HL[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let ei={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${_s(r,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${_s(n,!0)}\``+o:`${t} must match the configured type. The validated value was: \`${_s(n,!0)}\``+o}},Er={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},hse={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},tS={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},gse={isValue:"${path} field must be ${value}"},$h={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:ei,string:Er,number:hse,date:tS,object:$h,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:gse,tuple:{notType:t=>{const{path:e,value:n,spec:r}=t,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${e} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${_s(n,!0)}\``;if(n.length>o)return`${e} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${_s(n,!0)}\``}return kr.formatError(ei.notType,t)}}});const nS=t=>t&&t.__isYupSchema__;class Fh{static fromOptions(e,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,s=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Fh(e,(a,l)=>{var u;let f=s(...a)?o:i;return(u=f==null?void 0:f(l))!=null?u:l})}constructor(e,n){this.fn=void 0,this.refs=e,this.refs=e,this.fn=n}resolve(e,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,e,n);if(o===void 0||o===e)return e;if(!nS(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const Rh={context:"$",value:"."};class Ca{constructor(e,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Rh.context,this.isValue=this.key[0]===Rh.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Rh.context:this.isValue?Rh.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&wa.getter(this.path,!0),this.map=n.map}getValue(e,n,r){let o=this.isContext?r:this.isValue?e:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(e,n){return this.getValue(e,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Ca.prototype.__isYupRef=!0;const _a=t=>t==null;function $l(t){function e({value:n,path:r="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:f,params:p,message:g,skipAbsent:m}=t;let{parent:b,context:y,abortEarly:x=s.spec.abortEarly,disableStackTrace:w=s.spec.disableStackTrace}=o;function T(D){return Ca.isRef(D)?D.getValue(n,b,y):D}function _(D={}){const F=Object.assign({value:n,originalValue:i,label:s.spec.label,path:D.path||r,spec:s.spec,disableStackTrace:D.disableStackTrace||w},p,D.params);for(const z of Object.keys(F))F[z]=T(F[z]);const V=new kr(kr.formatError(D.message||g,F),n,F.path,D.type||u,F.disableStackTrace);return V.params=F,V}const C=x?a:l;let E={path:r,parent:b,type:u,from:o.from,createError:_,resolve:T,options:o,originalValue:i,schema:s};const M=D=>{kr.isError(D)?C(D):D?l(null):C(_())},A=D=>{kr.isError(D)?C(D):a(D)};if(m&&_a(n))return M(!0);let L;try{var O;if(L=f.call(E,n,E),typeof((O=L)==null?void 0:O.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(L).then(M,A)}}catch(D){A(D);return}M(L)}return e.OPTIONS=t,e}function mse(t,e,n,r=n){let o,i,s;return e?(wa.forEach(e,(a,l,u)=>{let f=l?a.slice(1,a.length-1):a;t=t.resolve({context:r,parent:o,value:n});let p=t.type==="tuple",g=u?parseInt(f,10):0;if(t.innerType||p){if(p&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(n&&g>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${e}. because there is no value at that index. `);o=n,n=n&&n[g],t=p?t.spec.types[g]:t.innerType}if(!u){if(!t.fields||!t.fields[f])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);o=n,n=n&&n[f],t=t.fields[f]}i=f,s=l?"["+a+"]":"."+a}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}class Bh extends Set{describe(){const e=[];for(const n of this.values())e.push(Ca.isRef(n)?n.describe():n);return e}resolveAll(e){let n=[];for(const r of this.values())n.push(e(r));return n}clone(){return new Bh(this.values())}merge(e,n){const r=this.clone();return e.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Fl(t,e=new Map){if(nS(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let n;if(t instanceof Date)n=new Date(t.getTime()),e.set(t,n);else if(t instanceof RegExp)n=new RegExp(t),e.set(t,n);else if(Array.isArray(t)){n=new Array(t.length),e.set(t,n);for(let r=0;r<t.length;r++)n[r]=Fl(t[r],e)}else if(t instanceof Map){n=new Map,e.set(t,n);for(const[r,o]of t.entries())n.set(r,Fl(o,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const r of t)n.add(Fl(r,e))}else if(t instanceof Object){n={},e.set(t,n);for(const[r,o]of Object.entries(t))n[r]=Fl(o,e)}else throw Error(`Unable to clone ${t}`);return n}class ti{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Bh,this._blacklist=new Bh,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(ei.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Fl(Object.assign({},this.spec,e)),n}label(e){let n=this.clone();return n.spec.label=e,n}meta(...e){if(e.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},e[0]),n}withMutation(e){let n=this._mutate;this._mutate=!0;let r=e(this);return this._mutate=n,r}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let n=this,r=e.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(e._whitelist,e._blacklist),r._blacklist=n._blacklist.merge(e._blacklist,e._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{e.tests.forEach(s=>{i.test(s.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,e),n),n=n.resolve(e)}return n}resolveOptions(e){var n,r,o,i;return Object.assign({},e,{from:e.from||[],strict:(n=e.strict)!=null?n:this.spec.strict,abortEarly:(r=e.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=e.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=e.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(e,n={}){let r=this.resolve(Object.assign({value:e},n)),o=n.assert==="ignore-optionality",i=r._cast(e,n);if(n.assert!==!1&&!r.isType(i)){if(o&&_a(i))return i;let s=_s(e),a=_s(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
409
+
410
+ attempted value: ${s}
411
+ `+(a!==s?`result of cast: ${a}`:""))}return i}_cast(e,n){let r=e===void 0?e:this.transforms.reduce((o,i)=>i.call(this,o,e,this),e);return r===void 0&&(r=this.getDefault(n)),r}_validate(e,n={},r,o){let{path:i,originalValue:s=e,strict:a=this.spec.strict}=n,l=e;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:i,value:l,originalValue:s,options:n,tests:u},r,f=>{if(f.length)return o(f,l);this.runTests({path:i,value:l,originalValue:s,options:n,tests:this.tests},r,o)})}runTests(e,n,r){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=e,f=y=>{o||(o=!0,n(y,s))},p=y=>{o||(o=!0,r(y,s))},g=i.length,m=[];if(!g)return p([]);let b={value:s,originalValue:a,path:l,options:u,schema:this};for(let y=0;y<i.length;y++){const x=i[y];x(b,f,function(T){T&&(Array.isArray(T)?m.push(...T):m.push(T)),--g<=0&&p(m)})}}asNestedTest({key:e,index:n,parent:r,parentPath:o,originalParent:i,options:s}){const a=e??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const f=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+e});return(p,g,m)=>this.resolve(f)._validate(u,f,g,m)}validate(e,n){var r;let o=this.resolve(Object.assign({},n,{value:e})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(e,n,(l,u)=>{kr.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new kr(l,u,void 0,void 0,i)):s(u)}))}validateSync(e,n){var r;let o=this.resolve(Object.assign({},n,{value:e})),i,s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(e,Object.assign({},n,{sync:!0}),(a,l)=>{throw kr.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new kr(a,e,void 0,void 0,s);i=l}),i}isValid(e,n){return this.validate(e,n).then(()=>!0,r=>{if(kr.isError(r))return!1;throw r})}isValidSync(e,n){try{return this.validateSync(e,n),!0}catch(r){if(kr.isError(r))return!1;throw r}}_getDefault(e){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,e):Fl(n)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,n){const r=this.clone({nullable:e});return r.internalTests.nullable=$l({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(e,n){const r=this.clone({optional:e});return r.internalTests.optionality=$l({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(e=ei.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=ei.notNull){return this.nullability(!1,e)}required(e=ei.required){return this.clone().withMutation(n=>n.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let n=this.clone();return n.transforms.push(e),n}test(...e){let n;if(e.length===1?typeof e[0]=="function"?n={test:e[0]}:n=e[0]:e.length===2?n={name:e[0],test:e[1]}:n={name:e[0],message:e[1],test:e[2]},n.message===void 0&&(n.message=ei.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=$l(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(s=>!(s.OPTIONS.name===n.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(e,n){!Array.isArray(e)&&typeof e!="string"&&(n=e,e=".");let r=this.clone(),o=RL(e).map(i=>new Ca(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new Fh(o,n):Fh.fromOptions(o,n)),r}typeError(e){let n=this.clone();return n.internalTests.typeError=$l({message:e,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(e,n=ei.oneOf){let r=this.clone();return e.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=$l({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),r}notOneOf(e,n=ei.notOneOf){let r=this.clone();return e.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=$l({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),r}strip(e=!0){let n=this.clone();return n.spec.strip=e,n}describe(e){const n=(e?this.resolve(e):this).clone(),{label:r,meta:o,optional:i,nullable:s}=n.spec;return{meta:o,label:r,optional:i,nullable:s,default:n.getDefault(e),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,f)=>f.findIndex(p=>p.name===l.name)===u)}}}ti.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])ti.prototype[`${t}At`]=function(e,n,r={}){const{parent:o,parentPath:i,schema:s}=mse(this,e,n,r.context);return s[t](o&&o[i],Object.assign({},r,{parent:o,path:e}))};for(const t of["equals","is"])ti.prototype[t]=ti.prototype.oneOf;for(const t of["not","nope"])ti.prototype[t]=ti.prototype.notOneOf;const yse=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function bse(t){const e=rS(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let n=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(n=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(n=0-n)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+n,e.second,e.millisecond)}function rS(t){var e,n;const r=yse.exec(t);return r?{year:Ii(r[1]),month:Ii(r[2],1)-1,day:Ii(r[3],1),hour:Ii(r[4]),minute:Ii(r[5]),second:Ii(r[6]),millisecond:r[7]?Ii(r[7].substring(0,3)):0,precision:(e=(n=r[7])==null?void 0:n.length)!=null?e:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Ii(r[10]),minuteOffset:Ii(r[11])}:null}function Ii(t,e=0){return Number(t)||e}let vse=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,xse=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Sse=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,wse="^\\d{4}-\\d{2}-\\d{2}",Cse="\\d{2}:\\d{2}:\\d{2}",_se="(([+-]\\d{2}(:?\\d{2})?)|Z)",Tse=new RegExp(`${wse}T${Cse}(\\.\\d+)?${_se}$`),kse=t=>_a(t)||t===t.trim(),Ese={}.toString();function oS(){return new jL}class jL extends ti{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,n,r)=>{if(!r.spec.coerce||r.isType(e)||Array.isArray(e))return e;const o=e!=null&&e.toString?e.toString():e;return o===Ese?e:o})})}required(e){return super.required(e).withMutation(n=>n.test({message:e||ei.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(n=>n.OPTIONS.name!=="required"),e))}length(e,n=Er.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(r){return r.length===this.resolve(e)}})}min(e,n=Er.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(r){return r.length>=this.resolve(e)}})}max(e,n=Er.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:e},skipAbsent:!0,test(r){return r.length<=this.resolve(e)}})}matches(e,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||Er.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&r||s.search(e)!==-1})}email(e=Er.email){return this.matches(vse,{name:"email",message:e,excludeEmptyString:!0})}url(e=Er.url){return this.matches(xse,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Er.uuid){return this.matches(Sse,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let n="",r,o;return e&&(typeof e=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=e:n=e),this.matches(Tse,{name:"datetime",message:n||Er.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Er.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const s=rS(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:n||Er.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=rS(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Er.trim){return this.transform(n=>n!=null?n.trim():n).test({message:e,name:"trim",test:kse})}lowercase(e=Er.lowercase){return this.transform(n=>_a(n)?n:n.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>_a(n)||n===n.toLowerCase()})}uppercase(e=Er.uppercase){return this.transform(n=>_a(n)?n:n.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>_a(n)||n===n.toUpperCase()})}}oS.prototype=jL.prototype;let Ose=new Date(""),Mse=t=>Object.prototype.toString.call(t)==="[object Date]";class iS extends ti{constructor(){super({type:"date",check(e){return Mse(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,n,r)=>!r.spec.coerce||r.isType(e)||e===null?e:(e=bse(e),isNaN(e)?iS.INVALID_DATE:new Date(e)))})}prepareParam(e,n){let r;if(Ca.isRef(e))r=e;else{let o=this.cast(e);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(e,n=tS.min){let r=this.prepareParam(e,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(e,n=tS.max){let r=this.prepareParam(e,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}iS.INVALID_DATE=Ose;function Ase(t,e=[]){let n=[],r=new Set,o=new Set(e.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=wa.split(s)[0];r.add(l),o.has(`${a}-${l}`)||n.push([a,l])}for(const s of Object.keys(t)){let a=t[s];r.add(s),Ca.isRef(a)&&a.isSibling?i(a.path,s):nS(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return sse.array(Array.from(r),n).reverse()}function WL(t,e){let n=1/0;return t.some((r,o)=>{var i;if((i=e.path)!=null&&i.includes(r))return n=o,!0}),n}function qL(t){return(e,n)=>WL(t,e)-WL(t,n)}const Ise=(t,e,n)=>{if(typeof t!="string")return t;let r=t;try{r=JSON.parse(t)}catch{}return n.isType(r)?r:t};function Vh(t){if("fields"in t){const e={};for(const[n,r]of Object.entries(t.fields))e[n]=Vh(r);return t.setFields(e)}if(t.type==="array"){const e=t.optional();return e.innerType&&(e.innerType=Vh(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(Vh)}):"optional"in t?t.optional():t}const Dse=(t,e)=>{const n=[...wa.normalizePath(e)];if(n.length===1)return n[0]in t;let r=n.pop(),o=wa.getter(wa.join(n),!0)(t);return!!(o&&r in o)};let UL=t=>Object.prototype.toString.call(t)==="[object Object]";function KL(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter(r=>n.indexOf(r)===-1)}const Pse=qL([]);function sS(t){return new GL(t)}class GL extends ti{constructor(e){super({type:"object",check(n){return UL(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Pse,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,n={}){var r;let o=super._cast(e,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,s=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(p=>!this._nodes.includes(p))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const p of a){let g=i[p],m=p in o;if(g){let b,y=o[p];u.path=(n.path?`${n.path}.`:"")+p,g=g.resolve({value:y,context:n.context,parent:l});let x=g instanceof ti?g.spec:void 0,w=x==null?void 0:x.strict;if(x!=null&&x.strip){f=f||p in o;continue}b=!n.__validating||!w?g.cast(o[p],u):o[p],b!==void 0&&(l[p]=b)}else m&&!s&&(l[p]=o[p]);(m!==p in l||l[p]!==o[p])&&(f=!0)}return f?l:o}_validate(e,n={},r,o){let{from:i=[],originalValue:s=e,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:s},...i],n.__validating=!0,n.originalValue=s,super._validate(e,n,r,(l,u)=>{if(!a||!UL(u)){o(l,u);return}s=s||u;let f=[];for(let p of this._nodes){let g=this.fields[p];!g||Ca.isRef(g)||f.push(g.asNestedTest({options:n,key:p,parent:u,parentPath:n.path,originalParent:s}))}this.runTests({tests:f,value:u,originalValue:s,options:n},r,p=>{o(p.sort(this._sortErrors).concat(l),u)})})}clone(e){const n=super.clone(e);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(e){let n=super.concat(e),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const s=r[o];r[o]=s===void 0?i:s}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let s=e;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(s):void 0}),n}setFields(e,n){let r=this.clone();return r.fields=e,r._nodes=Ase(e,n),r._sortErrors=qL(Object.keys(e)),n&&(r._excludedEdges=n),r}shape(e,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,e),o)})}partial(){const e={};for(const[n,r]of Object.entries(this.fields))e[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(e)}deepPartial(){return Vh(this)}pick(e){const n={};for(const r of e)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>e.includes(r)&&e.includes(o)))}omit(e){const n=[];for(const r of Object.keys(this.fields))e.includes(r)||n.push(r);return this.pick(n)}from(e,n,r){let o=wa.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return Dse(i,e)&&(s=Object.assign({},i),r||delete s[e],s[n]=o(i)),s})}json(){return this.transform(Ise)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||$h.exact,test(n){if(n==null)return!0;const r=KL(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,n=$h.noUnknown){typeof e!="boolean"&&(n=e,e=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=KL(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=e,r}unknown(e=!0,n=$h.noUnknown){return this.noUnknown(!e,n)}transformKeys(e){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[e(o)]=n[o];return r})}camelCase(){return this.transformKeys(eS.camelCase)}snakeCase(){return this.transformKeys(eS.snakeCase)}constantCase(){return this.transformKeys(e=>eS.snakeCase(e).toUpperCase())}describe(e){const n=(e?this.resolve(e):this).clone(),r=super.describe(e);r.fields={};for(const[i,s]of Object.entries(n.fields)){var o;let a=e;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),r.fields[i]=s.describe(a)}return r}}sS.prototype=GL.prototype;const Nse=t=>{const{id:e,editMenuTitle:n,onSave:r,onCancel:o,getCitationById:i,disableFileUpload:s=!1,onTitleChanged:a}=t,l=q.useRef(null),[u,f]=q.useState(!0),[p,g]=q.useState(""),[m,b]=q.useState({title:"",file:void 0,fileName:""});return q.useEffect(()=>{if(e===void 0){f(!1);return}i(e).then(y=>{b({...y,file:void 0}),g(y.title),f(!1)}).catch(()=>{f(!1)})},[]),v.jsxs($.Box,{width:"500px",children:[v.jsx($.Typography,{variant:"h6",marginBottom:"10px",children:n}),v.jsx(Na.Formik,{innerRef:l,enableReinitialize:!0,initialValues:m,validationSchema:sS().shape({title:oS().required("Title is required"),fileName:oS().required("A file is required")}),onSubmit:async y=>{f(!0),r(y).then(()=>{e!==void 0&&p!==y.title&&(a==null||a(e))}).finally(()=>f(!1))},children:({values:y,setFieldValue:x})=>{var w;return q.useEffect(()=>{var T,_;(T=y.file)!=null&&T.name&&x("fileName",(_=y.file)==null?void 0:_.name)},[(w=y.file)==null?void 0:w.name]),v.jsxs(Na.Form,{autoComplete:"off",children:[v.jsx(Sc,{name:"title",disabled:u,required:!0,margin:"none"}),v.jsxs($.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",children:[v.jsx(E_,{name:"file",readOnly:s}),y.fileName&&v.jsx("span",{style:{margin:"6px 0 0 10px"},children:y.fileName}),v.jsx(ur,{name:"fileName",id:"fileName-err"})]}),v.jsxs($.DialogActions,{sx:{px:0},children:[v.jsx($.Button,{onClick:o,variant:"outlined",size:"small",children:"Cancel"}),v.jsx($.Button,{type:"submit",color:"primary",variant:"contained",size:"small",disabled:u,children:e?"Update Attachment":"Add New Attachment"})]})]})}})]})};function YL({fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onSelectCitations:i,onCancel:s,initialSelectedIds:a=[],onContentUpdate:l,onTitleChanged:u}){const[f,p]=q.useState(0),[g,m]=q.useState(a),[b,y]=q.useState(void 0);q.useEffect(()=>l==null?void 0:l(),[f,g]);const x=async _=>{if(f===2){if(_.id===void 0)throw Error("Failed to update citation. Citation is missing id");await n(_).then(()=>p(0))}else f===1&&await e(_).then(C=>{m([...g,C.id]),p(0)})},w=async _=>{if(f===4){if(_.id===void 0)throw Error("Failed to update citation. Citation is missing id");await n(_).then(()=>p(0))}else f===3&&await o(_).then(C=>{m([...g,C.id]),p(0)})};let T=null;return f===0?T=v.jsx(ese,{fetchExistingCitations:t,editMenuTitle:"Insert Citation/Attachment(s)",onCancel:s,onNewCitation:()=>{y(void 0),p(1)},onNewAttachment:()=>{y(void 0),p(3)},onEditCitation:_=>{y(_.id),p(2)},onEditAttachment:_=>{y(_.id),p(4)},onSelect:i,selectedIds:g,toggleCheckbox:_=>{const C=g.includes(_.id);m(C?g.filter(E=>E!==_.id):[...g,_.id])}}):f===1||f===2?T=v.jsx(tse,{id:b,editMenuTitle:`${f===1?"Add":"Edit"} Citation`,onSave:x,onCancel:()=>p(0),getCitationById:r,onTitleChanged:u}):(f===3||f===4)&&(T=v.jsx(Nse,{id:b,editMenuTitle:`${f===3?"Add":"Edit"} Attachment`,onSave:w,onCancel:()=>p(0),getCitationById:r,disableFileUpload:f===4,onTitleChanged:u})),T}const Lse=en({name:{CitationBubbleMenuTipTap:JL}})(t=>({content:{padding:t.spacing(1.5,2,.5),backgroundColor:"#f9f9f9"}}));function JL({fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onTitleChanged:i,...s}){const{classes:a}=Lse(),l=_t();if(!(l!=null&&l.isEditable))return null;if(!("citationBubbleMenuHandler"in l.storage))throw new Error("You must add the CitationBubbleMenuHandler extension to the useEditor `extensions` array in order to use this component!");const u=l.storage.citationBubbleMenuHandler,f=u.isOpen,p=u.selectedIds,g=u.selectedNodePos,m=()=>{!l||!g||l.chain().focus().deleteRange({from:g,to:g+1}).run()},b=_=>{l&&l.chain().focus().insertContent({type:"citation",attrs:{ids:_}}).run()},y=_=>{!l||!g||l.chain().focus().command(({tr:C})=>{const E=g,M=C.doc.nodeAt(E);return M?(C.setNodeMarkup(E,void 0,{...M.attrs,ids:_}),!0):!1}).run()},x=_=>{_.length===0?m():p.length===0?b(_):y(_)},w=_=>{x(_),l.commands.closeCitationBubbleMenu()},T=()=>{x(p),l.commands.closeCitationBubbleMenu()};return v.jsx(Bp,{editor:l,open:f,...u.bubbleMenuOptions,...s,children:v.jsx("div",{className:a.content,children:v.jsx(YL,{fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onSelectCitations:w,onCancel:T,initialSelectedIds:p,onContentUpdate:()=>{requestAnimationFrame(()=>{l!=null&&l.view&&l.view.dispatch(l.view.state.tr)})},onTitleChanged:i})})})}const $se=gn.create({name:"starterKit",addExtensions(){const t=[];return this.options.bold!==!1&&t.push(NN.configure(this.options.bold)),this.options.blockquote!==!1&&t.push(PN.configure(this.options.blockquote)),this.options.bulletList!==!1&&t.push(FN.configure(this.options.bulletList)),this.options.code!==!1&&t.push(RN.configure(this.options.code)),this.options.codeBlock!==!1&&t.push(BN.configure(this.options.codeBlock)),this.options.document!==!1&&t.push(VN.configure(this.options.document)),this.options.dropcursor!==!1&&t.push(zN.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&t.push(HN.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&t.push(jN.configure(this.options.hardBreak)),this.options.heading!==!1&&t.push(iN.configure(this.options.heading)),this.options.history!==!1&&t.push(JN.configure(this.options.history)),this.options.horizontalRule!==!1&&t.push(XN.configure(this.options.horizontalRule)),this.options.italic!==!1&&t.push(ZN.configure(this.options.italic)),this.options.listItem!==!1&&t.push(gL.configure(this.options.listItem)),this.options.orderedList!==!1&&t.push(xL.configure(this.options.orderedList)),this.options.paragraph!==!1&&t.push(SL.configure(this.options.paragraph)),this.options.strike!==!1&&t.push(CL.configure(this.options.strike)),this.options.text!==!1&&t.push(_L.configure(this.options.text)),t}}),Fse=gn.create({name:"citationBubbleMenuHandler",addStorage(){return{isOpen:!1,selectedIds:[],bubbleMenuOptions:void 0,selectedNodePos:void 0}},addCommands(){return{openCitationBubbleMenu:(t={},e)=>({editor:n,dispatch:r})=>{var a;const{doc:o}=n.state,i=e!==void 0?o.nodeAt(e):void 0,s=((a=i==null?void 0:i.attrs)==null?void 0:a.ids)??[];return n.getAttributes,r&&(this.storage.isOpen=!0,this.storage.selectedIds=s,this.storage.bubbleMenuOptions=t,this.storage.selectedNodePos=e),!0},closeCitationBubbleMenu:()=>({commands:t,dispatch:e})=>this.storage.isOpen?(t.focus(),e&&(this.storage.isOpen=!1,this.storage.selectedIds=[],this.storage.selectedNodePos=void 0),!0):!1}},onSelectionUpdate(){this.storage.isOpen&&!this.editor.isActive("citation")&&this.editor.commands.closeCitationBubbleMenu()},addKeyboardShortcuts(){return{"Mod-Shift-c":()=>(this.editor.commands.openCitationBubbleMenu(),!0)}}});function Rse(t){const e=_t(),n=q.useRef(null);return v.jsx(St,{buttonRef:n,tooltipLabel:"Insert Citation",tooltipShortcutKeys:["mod","Shift","C"],IconComponent:Z_,disabled:!(e!=null&&e.isEditable),onClick:()=>e==null?void 0:e.commands.openCitationBubbleMenu({anchorEl:n.current,placement:"bottom"}),...t,children:v.jsxs($.Box,{display:"flex",flexDirection:"row",children:[v.jsx(Z_,{fontSize:"small"}),v.jsx($.Typography,{variant:"body2",marginTop:"1px",children:"Insert Citation"})]})})}const XL=q.createContext({citations:[]});function Bse({children:t,citationIds:e,getCitationsByIds:n,titleChangedId:r}){const[o,i]=q.useState([]),s=()=>n(e).then(a=>i(a));return q.useEffect(()=>{const a=o.map(l=>l.id);if(a.length<e.length)s();else if(a.length>e.length)i(o.filter(l=>e.includes(l.id)));else{if(r===void 0||!a.includes(r))return;s()}},[e,r]),v.jsx(XL.Provider,{value:{citations:o},children:t})}const Vse=()=>q.useContext(XL),zse=({node:t,HTMLAttributes:e,selected:n})=>{const r=t.attrs.ids||[],{citations:o}=Vse(),[i,s]=q.useState(r?String(r):"");return q.useEffect(()=>{const l=o.filter(u=>r.includes(u.id)).map(u=>u.title).join(", ");s(l)},[o]),v.jsx(J1,{as:"span",...e,children:v.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),a.stopPropagation()},className:n?"selected-citation-link":"citation-link",children:i})})},Hse=cn.create({name:"citation",group:"inline",inline:!0,atom:!0,selectable:!0,addAttributes(){return{ids:{default:[],parseHTML:t=>{const e=t.getAttribute("ids");return e?e.split(",").map(n=>parseInt(n.trim(),10)).filter(n=>!isNaN(n)):[]},renderHTML:t=>({ids:Array.isArray(t.ids)?t.ids.join(","):""})}}},parseHTML(){return[{tag:"citation"}]},renderHTML({HTMLAttributes:t}){return["citation",Ct(t)]},addNodeView(){return X1(zse)},addProseMirrorPlugins(){return[new ln({props:{handleClickOn:(t,e,n,r,o,i)=>n&&n.type.name==="citation"?(this.editor.commands.openCitationBubbleMenu({},r),!0):!1}})]}}),jse=t=>{const e=[$se,wL.configure({placeholder:"Start typing here..."}),Fse,Hse],{name:n,label:r,labelProps:o={fontSize:"0.9em",color:"#808080",fontWeight:"400"},readOnly:i=!1,margin:s="dense",fetchExistingCitations:a,onCreateCitation:l,onUpdateCitation:u,getCitationById:f,onStoreAttachment:p,getCitationsByIds:g}=t,[m,b,y]=Na.useField({name:n}),{setValue:x}=y,{value:w}=m;q.useEffect(()=>{var D,F;w!==((F=(D=T==null?void 0:T.current)==null?void 0:D.editor)==null?void 0:F.getHTML())&&setTimeout(()=>{var V,z,R;(R=(z=(V=T==null?void 0:T.current)==null?void 0:V.editor)==null?void 0:z.commands)==null||R.setContent(w),L()},0)},[w]);const T=q.useRef(null),_={normal:{marginTop:"16px",marginBottom:"8px"},dense:{marginTop:"8px",marginBottom:"4px"},none:{margin:0}},C=()=>{var V,z;const D=((z=(V=T.current)==null?void 0:V.editor)==null?void 0:z.getHTML())??"<p></p>",F=!D.replace(/<\/?p>|<br>/g,"").trim();x(F?"<p></p>":D)},[E,M]=q.useState([]),[A,I]=q.useState(void 0),L=D=>{var z,R,B,U;if(!((R=(z=T==null?void 0:T.current)==null?void 0:z.editor)!=null&&R.state.doc))return;const F=[];(U=(B=T==null?void 0:T.current)==null?void 0:B.editor)==null||U.state.doc.descendants(K=>{K.type.name==="citation"&&F.push(K.attrs.ids)});const V=[...new Set(F.flat())].sort();JSON.stringify(V)!==JSON.stringify(E)&&M(V),I(D)},O=v.jsxs($.Box,{sx:{"& .ProseMirror":{"& h1, & h2, & h3, & h4, & h5, & h6":{scrollMarginTop:i?0:50}}},..._[s],children:[v.jsx(Bse,{citationIds:E,getCitationsByIds:g,titleChangedId:A,children:v.jsx($P,{ref:T,extensions:e,content:w,editable:!i,renderControls:i?void 0:()=>v.jsx(jp,{children:v.jsx(Rse,{})}),onBlur:C,onUpdate:()=>{L()},RichTextFieldProps:{variant:"outlined",MenuBarProps:{hide:i}},children:()=>v.jsx(JL,{fetchExistingCitations:a,onCreateCitation:l,onUpdateCitation:u,getCitationById:f,onStoreAttachment:p,onTitleChanged:D=>L(D)})})}),v.jsx(ur,{name:n,id:`${n}-err`})]});return v.jsxs($.Box,{display:"flex",flexDirection:"column",width:"100%",children:[r&&v.jsx($.Typography,{...o,children:r}),O]})},Wse=t=>{const{label:e="Return to Top",icon:n=J_,scrollThresholdPx:r=100}=t,o=$.useScrollTrigger({threshold:r}),i=q.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]);return v.jsx($.Zoom,{in:o,children:v.jsx($.Box,{sx:{position:"fixed",bottom:32,right:32,zIndex:1},children:v.jsxs($.Fab,{onClick:i,color:"primary",size:"small",variant:"extended","aria-label":"Scroll back to top",children:[v.jsx(n,{fontSize:"medium"}),e]})})})},qse=()=>{const{getValues:t,formState:{errors:e,isSubmitSuccessful:n}}=an(),{palette:r}=$.useTheme();return v.jsx($.Paper,{style:{backgroundColor:r.mode==="dark"?"#303030":"#f0f0f0",margin:"10px 0"},children:v.jsxs($.List,{children:[v.jsxs($.ListItem,{children:[v.jsx($.Typography,{display:"block",variant:"h6",children:"Values"}),v.jsx("br",{}),v.jsx($.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(t(),null,2)})]}),v.jsx($.Divider,{variant:"inset",component:"li"}),v.jsxs($.ListItem,{id:"testing",children:[v.jsx($.Typography,{display:"block",variant:"h6",children:"Errors"}),v.jsx("br",{}),v.jsx($.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(e,null,2)})]}),v.jsxs($.ListItem,{children:[v.jsx($.Typography,{display:"block",variant:"h6",children:"Status"}),v.jsx("br",{}),v.jsx($.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(n,null,2)})]})]})})},Use=t=>{const{steps:e,orientation:n,inlineLabel:r=n=="vertical",isResponsive:o=!1}=t,{width:i}=DL();let s=!r,a=n;o&&(n&&console.warn("Stepper: Ignoring orientation. isResponsive is set to true, so the orientation is determined automatically based on the window size."),a=i<600?"vertical":"horizontal",a=="vertical"?s=!1:s=!r),n=="vertical"&&!r&&(console.warn("Stepper: ignoring inlineLabel={false}. Must use inline labels when orientation is vertical"),s=!1);const l=["steps","inlineLabel","orientation","isResponsive"],u={alternativeLabel:s,orientation:a,...lr({...t},l)};return v.jsx($.Stepper,{...u,children:e.map(f=>v.jsx($.Step,{children:v.jsx($.StepLabel,{children:f})},f))})},Kse=t=>{const{name:e,label:n=Wn(e),labelProps:r={fontSize:"1.1em",color:"#808080",fontWeight:"600"},initialState:o,renderFormGroup:i,addButtonContent:s="Add Another",removeButtonContent:a=t.removePosition==="right"?v.jsx(r4,{}):"Remove",variant:l="card",addButtonSx:u,removeButtonSx:f,allowRemoveAll:p=!1,readOnly:g=!1,emptyListMsg:m="None",showDivider:b=!1,removePosition:y="bottom"}=t,{control:x,getValues:w}=an(),{fields:T,append:_,remove:C}=PB({control:x,name:e}),E=M=>({display:"flex",flexDirection:M==="bottom"?"column":"row",alignItems:M==="bottom"?"flex-start":"center"});return v.jsxs($.FormControl,{fullWidth:!0,children:[v.jsx($.Typography,{...r,children:n}),g&&w(e).length===0?v.jsx($.Typography,{children:m}):v.jsxs("div",{children:[T.map((M,A)=>v.jsx(q.Fragment,{children:v.jsx(Gse,{variant:l,content:v.jsxs($.Box,{"data-testid":"form-group-container",sx:typeof y=="string"?E(y):{...y},children:[v.jsxs($.Box,{width:"100%",children:[i(`${e}.${A}`,A),b&&A!==T.length-1&&v.jsx($.Divider,{"data-testid":"divider"})]}),!g&&T.length>(p?0:1)&&v.jsx($.Button,{"data-testid":"repeatable-form-group_remove-btn",sx:f,onClick:()=>C(A),children:a})]})})},M.id)),!g&&v.jsx($.Button,{"data-testid":"repeatable-form-group_add-btn",onClick:()=>_(o),sx:u,children:s})]})]})},Gse=({variant:t,content:e})=>{switch(t){case"card":return v.jsx($.Card,{"data-testid":"repeatable-form-group_card",sx:{padding:"8px",marginBottom:"8px"},children:v.jsx($.CardContent,{children:e})});case"elevatedCard":return v.jsx($.Card,{"data-testid":"repeatable-form-group_elevated-card",elevation:4,sx:{border:"unset",padding:"8px",marginBottom:"8px"},children:v.jsx($.CardContent,{children:e})});case"none":return e}},ZL=(t,e,n)=>{if(t&&"reportValidity"in t){const r=Fe(n,e);t.setCustomValidity(r&&r.message||""),t.reportValidity()}},QL=(t,e)=>{for(const n in e.fields){const r=e.fields[n];r&&r.ref&&"reportValidity"in r.ref?ZL(r.ref,n,t):r&&r.refs&&r.refs.forEach(o=>ZL(o,n,t))}},Yse=(t,e)=>{e.shouldUseNativeValidation&&QL(t,e);const n={};for(const r in t){const o=Fe(e.fields,r),i=Object.assign(t[r]||{},{ref:o&&o.ref});if(Jse(e.names||Object.keys(t),r)){const s=Object.assign({},Fe(n,r));Ot(s,"root",i),Ot(n,r,s)}else Ot(n,r,i)}return n},Jse=(t,e)=>{const n=e$(e);return t.some(r=>e$(r).match(`^${n}\\.\\d+`))};function e$(t){return t.replace(/\]|\[/g,"")}function Xse(t,e,n){return n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve(function(s,a){try{var l=(e!=null&&e.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(t[n.mode==="sync"?"validateSync":"validate"](r,Object.assign({abortEarly:!1},e,{context:o}))).then(function(u){return i.shouldUseNativeValidation&&QL({},i),{values:n.raw?Object.assign({},r):u,errors:{}}}))}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:Yse((a=s,l=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),l){var p=u[f.path].types,g=p&&p[f.type];u[f.path]=Aw(f.path,l,u,f.type,g?[].concat(g,f.message):f.message)}return u},{})),i)};var a,l}))}catch(s){return Promise.reject(s)}}}function Zse({initialValues:t,onSubmit:e,children:n,initialErrors:r,validationSchema:o=sS({}),shouldValidateOption:i=!0,shouldDirtyOption:s=!0,validationOnMount:a=!1,enableReinitialize:l=!1}){const{setValue:u,trigger:f,reset:p,...g}=NB({defaultValues:t,resolver:Xse(o),mode:"onChange",errors:r}),{control:m}=g,b=yd({control:m}),y=(x,w)=>{u(x,w,{shouldValidate:i,shouldDirty:s})};return q.useEffect(()=>{a&&f(),l&&p(t)},[f,t,p]),v.jsx(yB,{...g,setValue:y,trigger:f,reset:p,children:v.jsx("form",{onSubmit:g.handleSubmit(e),children:typeof n=="function"?n({values:b,setValue:y,methods:{...g,setValue:y,trigger:f,reset:p}}):n})})}function Qse(){const t=an();if(!t)throw new Error("useMyForm must be used inside an MForm");return t}const aS=t=>{const{open:e=!1,onClose:n,title:r,children:o,actions:i,closeBtnLabel:s="Cancel",closeButtonPosition:a="bottom",closeButtonProps:l={color:"primary",variant:"text"},disableDismiss:u=!1,...f}=t;if(!e)return null;const p=()=>{if(a!=="top")return v.jsx($.Button,{className:"MBv2_Modal_Close",onClick:t.onClose,...l,children:s})},g=()=>i?v.jsx($.DialogActions,{className:"MBv2_Modal_Actions",children:v.jsxs($.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",gap:"0.25rem",children:[v.jsx($.Box,{children:p()}),v.jsxs($.Box,{display:"flex",gap:".25rem",children:[...i]})]})}):v.jsx($.DialogActions,{className:"MBv2_Modal_Actions",children:v.jsx($.Box,{children:p()})});return v.jsxs($.Dialog,{className:"MBv2_Modal",open:e,onClose:()=>{u||n==null||n()},...f,children:[typeof r=="string"?v.jsx($.DialogTitle,{className:"MBv2_Modal_Title",children:v.jsxs($.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[r,a!=="bottom"&&v.jsx($.IconButton,{"data-testid":"modal-header-close-btn",onClick:n,children:v.jsx(Oz,{})})]})}):r,o&&(typeof o=="string"?v.jsx($.DialogContent,{className:"MBv2_Modal_Content",children:v.jsx($.DialogContentText,{className:"MBv2_Modal_Content_Text",children:o})}):o),g()]})},eae=t=>{const{confirmBtnLabel:e,onConfirm:n,confirmButtonProps:r={color:"primary",variant:"contained"},closeButtonProps:o={},...i}=t;return v.jsx(aS,{actions:[v.jsx($.Button,{className:"MBv2_ConfirmationModal_ConfirmBtn",onClick:n,...r,children:e})],...i})},tae=t=>{const{closeBtnLabel:e="OK",closeButtonProps:n={color:"primary",variant:"contained"}}=t;return v.jsx(aS,{closeBtnLabel:e,closeButtonProps:n,...t})},nae=t=>{const{primaryBtnLabel:e,onPrimaryAction:n,primaryActionProps:r={color:"primary",variant:"contained"},secondaryBtnLabel:o,onSecondaryAction:i,secondaryActionProps:s={color:"primary",variant:"outlined"},...a}=t;return v.jsx(aS,{actions:[v.jsx($.Button,{className:"MBv2_DecisionModal_SecondaryAction",onClick:i,...s,children:o}),v.jsx($.Button,{className:"MBv2_DecisionModal_PrimaryAction",onClick:n,...r,children:e})],...a})},rae=t=>{const{featureMenuOptions:e=[],copyright:n,logo:r,sx:o={},fontColor:i="primary"}=t,{palette:s}=$.useTheme(),a=vo.useNavigate();return v.jsxs($.Box,{className:"MBv2_Footer",sx:{backgroundColor:s.mode==="dark"?"#222222":"#ededed",padding:"25px 30px",...o},children:[v.jsx($.Box,{className:"MBv2_Footer_Logo",sx:{display:"flex",gap:2,alignItems:"center",paddingBottom:1},children:typeof r=="string"?v.jsx("img",{draggable:"false",src:r,style:{width:"200px"},alt:"logo"}):r}),v.jsxs($.Box,{display:"flex",justifyContent:"space-between",flexWrap:"wrap",className:"MBv2_Footer_Nav_Links_Container",gap:2,children:[v.jsx($.Box,{sx:{flexGrow:1},className:"MBv2_Footer_Nav_Links",display:"flex",flexDirection:"row",justifyContent:"flex-start",gap:3,children:e==null?void 0:e.map(l=>v.jsx($.Link,{"data-testid":l.label,sx:{cursor:"pointer",fontSize:15},color:i,...rc(l,a),children:l.label},l.label))}),n&&v.jsx($.Typography,{style:{fontSize:15},"data-testid":"copyright",className:"MBv2_Footer_Copyright",color:i,children:n})]})]})},t$=t=>{const{menuOptionLists:e,anchor:n="left",children:r}=t,{pathname:o}=vo.useLocation(),i=vo.useNavigate(),[s,a]=q.useState(!1),l=(g,m)=>v.jsx($.MenuList,{children:g.map(b=>v.jsxs($.MenuItem,{...rc(b,i,()=>a(!1)),children:[b.icon&&v.jsx($.ListItemIcon,{children:b.icon}),v.jsx($.ListItemText,{primary:b.label})]},`mobile-drawer-group-${m}-item-${b.path}`))}),f=(()=>{if(e){const g=e.filter(m=>m&&m.length>0);return g.length===0?null:g.map((m,b)=>v.jsxs(q.Fragment,{children:[l(m,b),b<g.length-1&&v.jsx($.Divider,{})]},`mobile-drawer-group-${b}`))}return r?v.jsx($.Box,{role:"presentation",onClick:()=>a(!1),children:r}):null})(),p=f??!1;return q.useEffect(()=>{a(!1)},[o]),p&&v.jsxs(v.Fragment,{children:[v.jsx($.IconButton,{onClick:()=>a(!0),color:"inherit",title:"Menu",children:v.jsx(Zz,{})}),v.jsx($.Drawer,{"data-testid":"mobile-drawer",anchor:n,open:s,onClose:()=>a(!1),children:v.jsx($.Box,{sx:{width:300},display:"flex",flexDirection:"column",justifyContent:"space-between",children:v.jsx($.Box,{display:"flex",justifyContent:"start",flexDirection:"column",children:f})})})]})},n$=t=>{const{env:e,isProd:n}=t;return n?null:v.jsx($.Paper,{sx:{borderRadius:0,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs($.Typography,{variant:"h6",color:"error",children:[e," Environment - Test Data Only"]})})},r$=t=>{const{label:e,menuOptions:n=[],icon:r}=t,o=vo.useNavigate(),[i,s]=P.useState(null),a=!!i,l=f=>{s(f.currentTarget)},u=()=>{s(null)};return n.length===0?null:v.jsxs(v.Fragment,{children:[v.jsx($.Button,{startIcon:r,variant:"outlined",color:"inherit",sx:{minWidth:0,padding:1},onClick:l,children:e}),v.jsx($.Menu,{anchorEl:i,open:a,onClick:u,children:n.map(f=>v.jsxs($.MenuItem,{...rc(f,o),children:[f.icon&&v.jsx($.ListItemIcon,{children:f.icon}),v.jsx($.ListItemText,{primary:f.label})]},f.label))})]})},o$=t=>{const{displayName:e,userMenuOptions:n}=t;return v.jsx(r$,{label:e,menuOptions:n,icon:v.jsx(e4,{})})},zh=t=>{const{menuOptions:e,orientation:n="horizontal",activeTabIdx:r,sx:o=n=="vertical"?{"& .MuiTabs-indicator":{left:0}}:void 0,slotProps:i={indicator:{sx:n=="horizontal"?{height:4}:{width:4}}}}=t,{palette:s}=$.useTheme(),a=vo.useNavigate();return v.jsx($.Tabs,{orientation:n,value:r??!1,sx:o,slotProps:i,children:e.map((l,u)=>v.jsx($.Tab,{icon:l.icon,label:l.label,value:u,...rc(l,a),sx:{alignItems:n=="vertical"?"flex-start":void 0,borderBottom:n=="vertical"?"1px solid":void 0,borderColor:"divider","&.Mui-selected":{backgroundColor:n=="vertical"?s.grey[s.mode=="dark"?800:50]:void 0,color:"inherit"}}},l.label))})},i$=t=>{const{featureMenuOptions:e=[],activeTabIdx:n,sx:r}=t;return e.length>0&&v.jsx($.Paper,{sx:{pl:4,pr:4,borderRadius:0},"data-testid":"navBar",children:v.jsx(zh,{menuOptions:e,activeTabIdx:n,sx:r})})},s$=t=>{const{onToggle:e}=t,{palette:n}=$.useTheme(),r=n.mode==="dark";return v.jsx($.IconButton,{onClick:e,color:"inherit",title:"Dark Mode Toggle",children:r?v.jsx(X_,{}):v.jsx(Y_,{})})},oae=t=>{const{envInfo:e,headerRef:n,logo:r,featureMenuOptions:o=[],userMenuOptions:i=[],onToggleDarkMode:s,quickLinks:a=[],displayName:l,banner:u,position:f="fixed",children:p,sx:g,navBarSx:m}=t,b=vo.useNavigate(),y=$.useMediaQuery($.useTheme().breakpoints.down("sm")),{palette:x}=$.useTheme(),{pathname:w}=vo.useLocation(),T=x.mode==="dark",[_,C]=P.useState(void 0);P.useEffect(()=>{const A=o.findIndex(I=>I.path&&w.startsWith(I.path));C(A>=0?A:void 0)},[w,o]);const E=s&&v.jsx(s$,{onToggle:s}),M=s&&(y||!y&&l)?[{icon:T?v.jsx(X_,{}):v.jsx(Y_,{}),label:`Switch to ${T?"Light":"Dark"} mode`,onClick:s},...i]:i;return v.jsxs($.AppBar,{ref:n,position:f,sx:g,elevation:4,children:[e&&v.jsx(n$,{...e}),u,v.jsxs($.Toolbar,{sx:{color:"white",display:"flex",justifyContent:"space-between",gap:2},children:[v.jsx($.Button,{disableRipple:!0,component:vo.Link,to:"/",children:r&&typeof r=="string"?v.jsx("img",{draggable:"false",src:r,style:{width:"200px",filter:"brightness(0) invert(1)"},alt:"logo"}):r}),v.jsxs($.Box,{display:"flex",gap:2,alignItems:"center",children:[!l&&!y&&E,y&&v.jsx(t$,{menuOptionLists:[o,a,M],anchor:"right"}),!y&&v.jsxs(v.Fragment,{children:[v.jsx($.Box,{display:"flex",gap:0,children:a==null?void 0:a.map((A,I)=>v.jsxs($.Box,{display:"flex",alignItems:"center",children:[I>0&&v.jsx($.Typography,{className:"quickLink-divider",color:x.primary.contrastText,children:"|"}),v.jsx($.Button,{variant:"text",sx:{color:"white"},...rc(A,b),children:v.jsxs($.Box,{display:"flex",gap:"3px",alignItems:"center",children:[A.icon,A.label]})})]},A.label))}),p,l&&v.jsx(o$,{displayName:l,userMenuOptions:M})]})]})]}),!y&&v.jsx(i$,{featureMenuOptions:o,activeTabIdx:_,sx:m})]})},iae=t=>{const{sx:e,menuOptions:n=[]}=t,{pathname:r}=vo.useLocation(),o=$.useMediaQuery($.useTheme().breakpoints.down("sm")),[i,s]=q.useState(void 0);return q.useEffect(()=>{const a=n.findIndex(l=>l.path&&r.startsWith(l.path))??-1;s(a>=0?a:void 0)},[r,n]),!o&&n.length>0&&v.jsx($.Box,{sx:e,children:v.jsx($.Card,{sx:{height:"100%",width:200},children:v.jsx(zh,{orientation:"vertical",menuOptions:n,activeTabIdx:i})})})},sae=t=>{const{featureMenuOptions:e=[],activeTabIdx:n,sx:r}=t,{palette:o}=$.useTheme();return e.length>0&&v.jsx(zh,{menuOptions:e,activeTabIdx:n,sx:{margin:"8px",backgroundColor:o.primary.dark,borderRadius:"8px","& .MuiTab-root":{color:o.secondary.light,flexDirection:"row",gap:"2px","& .MuiTab-icon":{marginBottom:"unset"},minHeight:"58px"},"& .MuiTab-root.Mui-selected":{color:o.primary.contrastText,fontSize:"120%"},"& .MuiTabs-indicator":{display:"none"},...r}})},lS=r3({createStyledComponent:Se("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.container&&e.container]}}),componentName:"MuiGrid2",useThemeProps:t=>Et({props:t,name:"MuiGrid2"}),useTheme:fi});if(process.env.NODE_ENV!=="production"&&(lS.propTypes={children:c.node,columns:c.oneOfType([c.arrayOf(c.number),c.number,c.object]),columnSpacing:c.oneOfType([c.arrayOf(c.oneOfType([c.number,c.string])),c.number,c.object,c.string]),container:c.bool,direction:c.oneOfType([c.oneOf(["column-reverse","column","row-reverse","row"]),c.arrayOf(c.oneOf(["column-reverse","column","row-reverse","row"])),c.object]),offset:c.oneOfType([c.string,c.number,c.arrayOf(c.oneOfType([c.string,c.number])),c.object]),rowSpacing:c.oneOfType([c.arrayOf(c.oneOfType([c.number,c.string])),c.number,c.object,c.string]),size:c.oneOfType([c.string,c.bool,c.number,c.arrayOf(c.oneOfType([c.string,c.bool,c.number])),c.object]),spacing:c.oneOfType([c.arrayOf(c.oneOfType([c.number,c.string])),c.number,c.object,c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),unstable_level:c.number,wrap:c.oneOf(["nowrap","wrap-reverse","wrap"])}),process.env.NODE_ENV!=="production"){const t=lS,e=e5("Grid2",t);t.propTypes={...t.propTypes,direction:e("container"),spacing:e("container"),wrap:e("container")}}function aae({size:t={xs:12},spacing:e=2,sm:n,...r}){return n&&(t={xs:12,sm:n}),v.jsx(lS,{size:t,spacing:e,...r,children:r.children})}function lae(t){const{title:e="Title Goes Here",sx:n={p:2},children:r,...o}=t;return v.jsxs(Ws,{sx:n,...o,children:[v.jsx(yi,{variant:"h6",sx:{fontWeight:"bold"},gutterBottom:!0,children:e}),r]})}const a$=u3({createStyledComponent:Se("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Et({props:t,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(a$.propTypes={children:c.node,component:c.elementType,direction:c.oneOfType([c.oneOf(["column-reverse","column","row-reverse","row"]),c.arrayOf(c.oneOf(["column-reverse","column","row-reverse","row"])),c.object]),divider:c.node,spacing:c.oneOfType([c.arrayOf(c.oneOfType([c.number,c.string])),c.number,c.object,c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),useFlexGap:c.bool});function cae(t){return v.jsx(a$,{className:t.className,...t,spacing:2,children:t.children})}function uae(t){return Qe("MuiAlert",t)}const l$=tt("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),dae=Ke(v.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"),fae=Ke(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),pae=Ke(v.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"),hae=Ke(v.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"),gae=Ke(v.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"),mae=t=>{const{variant:e,color:n,severity:r,classes:o}=t,i={root:["root",`color${$e(n||r)}`,`${e}${$e(n||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return Ze(i,uae,o)},yae=Se(Ws,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${$e(n.color||n.severity)}`]]}})(Vt(({theme:t})=>{const e=t.palette.mode==="light"?fc:pc,n=t.palette.mode==="light"?pc:fc;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(Qn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${r}StandardBg`]:n(t.palette[r].light,.9),[`& .${l$.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Qn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${l$.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Qn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:t.typography.fontWeightMedium,...t.vars?{color:t.vars.palette.Alert[`${r}FilledColor`],backgroundColor:t.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[r].dark:t.palette[r].main,color:t.palette.getContrastText(t.palette[r].main)}}}))]}})),bae=Se("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),vae=Se("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),xae=Se("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),c$={success:v.jsx(dae,{fontSize:"inherit"}),warning:v.jsx(fae,{fontSize:"inherit"}),error:v.jsx(pae,{fontSize:"inherit"}),info:v.jsx(hae,{fontSize:"inherit"})},u$=P.forwardRef(function(e,n){const r=Et({props:e,name:"MuiAlert"}),{action:o,children:i,className:s,closeText:a="Close",color:l,components:u={},componentsProps:f={},icon:p,iconMapping:g=c$,onClose:m,role:b="alert",severity:y="success",slotProps:x={},slots:w={},variant:T="standard",..._}=r,C={...r,color:l,severity:y,variant:T,colorSeverity:l||y},E=mae(C),M={slots:{closeButton:u.CloseButton,closeIcon:u.CloseIcon,...w},slotProps:{...f,...x}},[A,I]=Wt("root",{ref:n,shouldForwardComponentProp:!0,className:ze(E.root,s),elementType:yae,externalForwardedProps:{...M,..._},ownerState:C,additionalProps:{role:b,elevation:0}}),[L,O]=Wt("icon",{className:E.icon,elementType:bae,externalForwardedProps:M,ownerState:C}),[D,F]=Wt("message",{className:E.message,elementType:vae,externalForwardedProps:M,ownerState:C}),[V,z]=Wt("action",{className:E.action,elementType:xae,externalForwardedProps:M,ownerState:C}),[R,B]=Wt("closeButton",{elementType:nl,externalForwardedProps:M,ownerState:C}),[U,K]=Wt("closeIcon",{elementType:gae,externalForwardedProps:M,ownerState:C});return v.jsxs(A,{...I,children:[p!==!1?v.jsx(L,{...O,children:p||g[y]||c$[y]}):null,v.jsx(D,{...F,children:i}),o!=null?v.jsx(V,{...z,children:o}):null,o==null&&m?v.jsx(V,{...z,children:v.jsx(R,{size:"small","aria-label":a,title:a,color:"inherit",onClick:m,...B,children:v.jsx(U,{fontSize:"small",...K})})}):null]})});process.env.NODE_ENV!=="production"&&(u$.propTypes={action:c.node,children:c.node,classes:c.object,className:c.string,closeText:c.string,color:c.oneOfType([c.oneOf(["error","info","success","warning"]),c.string]),components:c.shape({CloseButton:c.elementType,CloseIcon:c.elementType}),componentsProps:c.shape({closeButton:c.object,closeIcon:c.object}),icon:c.node,iconMapping:c.shape({error:c.node,info:c.node,success:c.node,warning:c.node}),onClose:c.func,role:c.string,severity:c.oneOfType([c.oneOf(["error","info","success","warning"]),c.string]),slotProps:c.shape({action:c.oneOfType([c.func,c.object]),closeButton:c.oneOfType([c.func,c.object]),closeIcon:c.oneOfType([c.func,c.object]),icon:c.oneOfType([c.func,c.object]),message:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),slots:c.shape({action:c.elementType,closeButton:c.elementType,closeIcon:c.elementType,icon:c.elementType,message:c.elementType,root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["filled","outlined","standard"]),c.string])});const Gu=t=>{var m;const{noIcon:e=!1,children:n,severity:r="success",variant:o="leftBorder",sx:i,title:s,...a}=t,{palette:l}=$.useTheme(),u=e?{icon:!1}:{},f=o==="leftBorder"?"standard":o,p=o==="leftBorder"?{...i,borderLeft:`4px solid ${(m=l[r])==null?void 0:m.main}`}:i,g=s?{icon:{sx:{mt:"6px"}}}:{};return v.jsxs(u$,{severity:r,variant:f,sx:p,slotProps:g,...u,...a,children:[s&&v.jsx($.Typography,{variant:"h3",children:s}),n]})},Sae=t=>v.jsx(Gu,{severity:"success",...t}),wae=t=>v.jsx(Gu,{severity:"info",...t}),Cae=t=>v.jsx(Gu,{severity:"warning",...t}),_ae=t=>v.jsx(Gu,{severity:"error",...t}),d$=t=>{const{crumbInfo:e}=t,n=vo.useNavigate();return v.jsx($.Breadcrumbs,{"aria-label":"breadcrumb",separator:v.jsx(Qz,{color:"primary"}),sx:{marginBottom:2},children:e.map(({label:r,path:o},i)=>o&&i<e.length-1?v.jsx($.Link,{color:"primary",sx:{cursor:"pointer"},onClick:()=>n(o),children:r},r):v.jsx($.Typography,{color:"primary",children:r},r))})},Tae=t=>{const{title:e,message:n,type:r,onClose:o,autoHideDuration:i=8e3,variant:s="leftBorder",elevation:a=6}=t,l=kae(r);return v.jsx($.Snackbar,{"data-testid":"message-snackbar",anchorOrigin:{vertical:"bottom",horizontal:"right"},open:!0,onClose:u=>{u==null&&o()},autoHideDuration:i,children:v.jsx(Gu,{"data-testid":"message-snackbar-alert",severity:l,iconMapping:{info:f$(r),warning:f$(r)},onClose:o,elevation:a,variant:s,children:n?v.jsxs(v.Fragment,{children:[v.jsx($.AlertTitle,{"data-testid":"alertTitle",sx:{fontWeight:"bold"},children:e}),n]}):e})})},kae=t=>t=="logout"?"info":t=="timeout"?"warning":t,f$=t=>{if(t=="timeout")return v.jsx(wz,{});if(t=="logout")return v.jsx(Xz,{})},Eae=t=>{const{title:e,createButtonLabel:n,showAddButton:r=!1,onAdd:o=()=>alert("Not implemented yet"),breadcrumbs:i=[],children:s,sx:a}=t,l=$.useMediaQuery($.useTheme().breakpoints.down("sm"));return r&&o.toString()==='() => alert("Not implemented yet")'&&console.warn('PageHeader: "showAddButton" is true but "onAdd" is not defined.'),v.jsxs($.Box,{sx:a,children:[i.length>0&&v.jsx(d$,{crumbInfo:i}),v.jsxs($.Box,{className:"MBv2_PageHeader_Header",display:"flex",flexDirection:l?"column":"row",justifyContent:"space-between",alignItems:"center",gap:1,children:[v.jsxs($.Box,{className:"MBv2_PageHeader_TitleAndCreateBtn",display:"flex",flexDirection:"row",justifyContent:l||!s?"space-between":"start",alignItems:"center",width:"100%",gap:1,children:[typeof e=="string"?v.jsx($.Typography,{className:"MBv2_PageHeader_Title",variant:"h2",children:e}):e,r&&v.jsxs(Xx,{className:"MBv2_PageHeader_CreateBtn",onClick:()=>o(),children:[v.jsx(Cz,{style:{marginRight:"0.5rem"}}),n]})]}),s&&v.jsx($.Box,{width:l?"100%":"50%",children:s})]})]})},Oae=t=>{const{title:e,titleIcon:n,fullWidthIcon:r=!1,children:o,actionLabel:i,action:s,sx:a}=t,l=$.useMediaQuery($.useTheme().breakpoints.down("sm"));return v.jsxs($.Card,{sx:a||{padding:"30px 40px",display:"flex",flexDirection:"column",gap:"1rem"},children:[n&&v.jsx($.Box,{className:"MBv2_SingleActionCard_Img",sx:[r?{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"20px",marginBottom:"10px"}:{display:"inline"}],children:n}),v.jsx($.Typography,{variant:"h1",display:"inline",fontSize:"calc(20px + .9vw)",className:"MBv2_SingleActionCard_Title",children:e}),o,v.jsx($.Button,{variant:"contained",color:"primary",onClick:s,fullWidth:l,className:"MBv2_SingleActionCard_ActionButton",children:i})]})};Be.AlertModal=tae,Be.Autocomplete=__,Be.Breadcrumbs=d$,Be.Button=Xx,Be.Checkbox=Q3,Be.CheckboxGroup=ez,Be.CitationField=jse,Be.CitationMenu=YL,Be.ConfirmationModal=eae,Be.DarkModeToggle=s$,Be.DateField=Kf,Be.DateRangeField=OK,Be.DecisionModal=nae,Be.Drawer=t$,Be.DynamicAutocomplete=X3,Be.EnvironmentBanner=n$,Be.Error=ur,Be.ErrorAlert=_ae,Be.FileList=rz,Be.FileUpload=E_,Be.FloatingNavBar=sae,Be.Footer=rae,Be.FormDebugger=qse,Be.Header=oae,Be.InfoAlert=wae,Be.LoadingIndicator=Jx,Be.Location=bz,Be.MForm=Zse,Be.MGrid=aae,Be.MPanel=lae,Be.MStack=cae,Be.MenuButton=r$,Be.MultiAutocomplete=Z3,Be.NavBar=i$,Be.PageHeader=Eae,Be.PaginatedTable=AL,Be.ProfileMenu=o$,Be.RadioGroup=G_,Be.RangeSlider=vz,Be.RepeatableFormGroup=Kse,Be.RichTextField=Qie,Be.ScrollToTop=Wse,Be.SearchField=u4,Be.Select=xz,Be.Sidebar=iae,Be.SingleActionCard=Oae,Be.Snackbar=Tae,Be.Stepper=Use,Be.Submit=PL,Be.SuccessAlert=Sae,Be.Switch=Sz,Be.Table=ML,Be.Tabs=zh,Be.TextField=Sc,Be.WarningAlert=Cae,Be.commonTheme=In,Be.darkTheme=hB,Be.lightTheme=pB,Be.useMyForm=Qse,Object.defineProperty(Be,Symbol.toStringTag,{value:"Module"})});