@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.
- package/CHANGELOG.md +45 -0
- package/README.md +33 -0
- package/dist/@types/index.d.ts +192 -0
- package/dist/common/TestUtils/reactHookForms.d.ts +54 -0
- package/dist/common/TestUtils/renderWithReactHookForm.d.ts +7 -0
- package/dist/common/Utils/index.d.ts +65 -0
- package/dist/common/WindowDimensions/WindowDimensions.d.ts +26 -0
- package/dist/components/Alerts/Alert.d.ts +30 -0
- package/dist/components/Alerts/ErrorAlert.d.ts +4 -0
- package/dist/components/Alerts/InfoAlert.d.ts +4 -0
- package/dist/components/Alerts/SuccessAlert.d.ts +4 -0
- package/dist/components/Alerts/WarningAlert.d.ts +4 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +10 -0
- package/dist/components/Buttons/Button/Button.d.ts +24 -0
- package/dist/components/Buttons/ScrollToTop/ScrollToTop.d.ts +14 -0
- package/dist/components/Buttons/Submit/Submit.d.ts +11 -0
- package/dist/components/Form/Error/Error.d.ts +23 -0
- package/dist/components/Form/FormDebugger/FormDebugger.d.ts +8 -0
- package/dist/components/Form/Inputs/Autocomplete/Autocomplete.d.ts +81 -0
- package/dist/components/Form/Inputs/Autocomplete/DynamicAutocomplete/DynamicAutocomplete.d.ts +31 -0
- package/dist/components/Form/Inputs/Autocomplete/MultiAutocomplete/MultiAutocomplete.d.ts +22 -0
- package/dist/components/Form/Inputs/Autocomplete/utils.d.ts +2 -0
- package/dist/components/Form/Inputs/Checkbox/Checkbox.d.ts +58 -0
- package/dist/components/Form/Inputs/CheckboxGroup/CheckboxGroup.d.ts +112 -0
- package/dist/components/Form/Inputs/CitationField/CitationBubbleMenuHandler.d.ts +43 -0
- package/dist/components/Form/Inputs/CitationField/CitationField.d.ts +78 -0
- package/dist/components/Form/Inputs/CitationField/CitationMenu/AttachmentForm.d.ts +13 -0
- package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationBubbleMenu.d.ts +25 -0
- package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationForm.d.ts +12 -0
- package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationMenu.d.ts +62 -0
- package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationTable.d.ts +16 -0
- package/dist/components/Form/Inputs/CitationField/CitationNode.d.ts +2 -0
- package/dist/components/Form/Inputs/CitationField/CitationNodeComponent.d.ts +7 -0
- package/dist/components/Form/Inputs/CitationField/CitationRefreshContext/CitationRefreshContext.d.ts +29 -0
- package/dist/components/Form/Inputs/CitationField/MenuButtonEditCitation.d.ts +3 -0
- package/dist/components/Form/Inputs/DateField/DateField.d.ts +73 -0
- package/dist/components/Form/Inputs/DateField/DateRangeField/DateRangeField.d.ts +62 -0
- package/dist/components/Form/Inputs/DateField/dayjs-utils.d.ts +2 -0
- package/dist/components/Form/Inputs/FileUpload/FileList/FileList.d.ts +13 -0
- package/dist/components/Form/Inputs/FileUpload/FileUpload.d.ts +62 -0
- package/dist/components/Form/Inputs/Location/Location.d.ts +69 -0
- package/dist/components/Form/Inputs/Location/Location.types.d.ts +85 -0
- package/dist/components/Form/Inputs/Location/LocationOption.d.ts +38 -0
- package/dist/components/Form/Inputs/RadioGroup/RadioGroup.d.ts +119 -0
- package/dist/components/Form/Inputs/RangeSlider/RangeSlider.d.ts +34 -0
- package/dist/components/Form/Inputs/RichTextField/RichTextControls.d.ts +6 -0
- package/dist/components/Form/Inputs/RichTextField/RichTextField.d.ts +56 -0
- package/dist/components/Form/Inputs/RichTextField/SuggestionList.d.ts +8 -0
- package/dist/components/Form/Inputs/RichTextField/mentionSuggestionOptions.d.ts +6 -0
- package/dist/components/Form/Inputs/RichTextField/useExtensions.d.ts +10 -0
- package/dist/components/Form/Inputs/SearchField/SearchField.d.ts +16 -0
- package/dist/components/Form/Inputs/Select/Select.d.ts +91 -0
- package/dist/components/Form/Inputs/Switch/Switch.d.ts +61 -0
- package/dist/components/Form/Inputs/TextField/TextField.d.ts +60 -0
- package/dist/components/Form/MForm/MForm.d.ts +19 -0
- package/dist/components/Form/MForm/useMyForm.d.ts +1 -0
- package/dist/components/Form/RepeatableFormGroup/RepeatableFormGroup.d.ts +89 -0
- package/dist/components/Form/Stepper/Stepper.d.ts +27 -0
- package/dist/components/Layout/MGrid/MGrid.d.ts +13 -0
- package/dist/components/Layout/MPanel/MPanel.d.ts +13 -0
- package/dist/components/Layout/MStack/MStack.d.ts +6 -0
- package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +22 -0
- package/dist/components/Modals/AlertModal/AlertModal.d.ts +11 -0
- package/dist/components/Modals/ConfirmationModal/ConfirmationModal.d.ts +26 -0
- package/dist/components/Modals/DecisionModal/DecisionModal.d.ts +37 -0
- package/dist/components/Modals/Modal.d.ts +45 -0
- package/dist/components/Navigation/Footer/Footer.d.ts +31 -0
- package/dist/components/Navigation/Header/DarkModeToggle/DarkModeToggle.d.ts +13 -0
- package/dist/components/Navigation/Header/Drawer.d.ts +18 -0
- package/dist/components/Navigation/Header/EnvironmentBanner.d.ts +4 -0
- package/dist/components/Navigation/Header/Header.d.ts +63 -0
- package/dist/components/Navigation/Header/ProfileMenu.d.ts +8 -0
- package/dist/components/Navigation/MenuButton/MenuButton.d.ts +9 -0
- package/dist/components/Navigation/NavBar/FloatingNavBar/FloatingNavBar.d.ts +24 -0
- package/dist/components/Navigation/NavBar/NavBar.d.ts +24 -0
- package/dist/components/Navigation/Sidebar/Sidebar.d.ts +14 -0
- package/dist/components/Navigation/Tabs/Tabs.d.ts +19 -0
- package/dist/components/PageHeader/PageHeader.d.ts +27 -0
- package/dist/components/SingleActionCard/SingleActionCard.d.ts +26 -0
- package/dist/components/Snackbar/Snackbar.d.ts +28 -0
- package/dist/components/Table/ExpandableRow/ExpandableRow.d.ts +16 -0
- package/dist/components/Table/PaginatedTable.d.ts +44 -0
- package/dist/components/Table/Table.d.ts +129 -0
- package/dist/index.cjs.js +410 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.es.js +63994 -0
- package/dist/index.umd.js +411 -0
- package/dist/styles/3-theme/ThemeDemo.d.ts +3 -0
- package/dist/styles/3-theme/theme.d.ts +16 -0
- package/dist/styles/theme.d.ts +33 -0
- package/package.json +140 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
"use strict";require('./index.css');var DH=Object.defineProperty;var PH=(t,e,n)=>e in t?DH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var gc=(t,e,n)=>PH(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("@mui/material"),v=require("react/jsx-runtime"),q=require("react"),Eo=require("react-router-dom"),NH=require("@emotion/styled"),Mo=require("@emotion/react"),Il=require("formik"),ea=require("react-dom");function U2(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 D=U2(q),LH=U2(ea),jH="0px",$H="600px",FH="960px",BH="1100px",VH="1536px",zH="#4c98d7",HH="#005ea2",WH="#1a4480",qH="#9bb672",UH="#607f35",KH="#3c4a29",GH="rgba(0, 0, 0, 0.8705882353)",YH="rgba(0, 0, 0, 0.6)",JH="rgba(0, 0, 0, 0.3803921569)",XH="#dc5b52",ZH="#d83933",QH="#b50909",eW="#ffbe2e",tW="#e5a000",nW="#c2850c",rW="#4c98d7",oW="#005ea2",iW="#1a4480",sW="#9bb672",aW="#607f35",lW="#3c4a29",cW="#f9f9f9",uW="#fff",dW="#252f3e",fW="#c9c9c9",pW="#98cbfb",hW="#4c98d7",mW="#005ea2",gW="#b8d293",yW="#9bb672",bW="#607f35",vW="#fff",xW="rgba(255, 255, 255, 0.7019607843)",SW="rgba(255, 255, 255, 0.5019607843)",CW="#f1928b",wW="#dc5b52",TW="#d83933",_W="#ffe396",EW="#ffbe2e",kW="#e5a000",OW="#98cbfb",MW="#4c98d7",AW="#005ea2",RW="#b8d293",IW="#9bb672",DW="#607f35",PW="#121212",NW="#1b1b1b",LW="#252f3e",jW="#2e2e2e",$W="#f0f0f0",FW="#e6e6e6",BW="#c9c9c9",VW="#adadad",zW="#919191",HW="#757575",WW="#5c5c5c",qW="#454545",UW="#2e2e2e",KW="#1b1b1b",GW="#e6e6e6",YW="#c9c9c9",JW="#919191",XW="#454545",ZW="#fff",QW="#000",e6="2px 2px 5px 0px rgba(0, 0, 0, 0.05)",t6="2px 2px 7px 0px rgba(0, 0, 0, 0.075)",n6="2px 3px 7px 0px rgba(0, 0, 0, 0.075), 0px 1px 10px 0px rgba(0, 0, 0, 0.05)",r6="2px 4px 8px 0px rgba(0, 0, 0, 0.075), 0px 1px 12px 0px rgba(0, 0, 0, 0.075)",o6="2px 5px 8px 0px rgba(0, 0, 0, 0.075), 0px 2px 14px 0px rgba(0, 0, 0, 0.1)",i6="2px 6px 10px 0px rgba(0, 0, 0, 0.1), 0px 2px 18px 0px rgba(0, 0, 0, 0.1)",s6="2px 7px 10px 1px rgba(0, 0, 0, 0.1), 0px 2px 16px 1px rgba(0, 0, 0, 0.12)",a6="2px 8px 10px 1px rgba(0, 0, 0, 0.1), 0px 3px 14px 2px rgba(0, 0, 0, 0.12)",l6="2px 9px 12px 1px rgba(0, 0, 0, 0.1), 0px 3px 16px 2px rgba(0, 0, 0, 0.12)",c6="2px 10px 14px 1px rgba(0, 0, 0, 0.12), 0px 4px 18px 3px rgba(0, 0, 0, 0.12)",u6="2px 11px 15px 1px rgba(0, 0, 0, 0.12), 0px 4px 20px 3px rgba(0, 0, 0, 0.12)",d6="2px 12px 17px 2px rgba(0, 0, 0, 0.12), 0px 5px 22px 4px rgba(0, 0, 0, 0.12)",f6="2px 13px 19px 2px rgba(0, 0, 0, 0.12), 0px 5px 24px 4px rgba(0, 0, 0, 0.12)",p6="2px 14px 21px 2px rgba(0, 0, 0, 0.12), 0px 5px 26px 4px rgba(0, 0, 0, 0.12)",h6="2px 15px 22px 2px rgba(0, 0, 0, 0.12), 0px 6px 28px 5px rgba(0, 0, 0, 0.12)",m6="2px 16px 24px 2px rgba(0, 0, 0, 0.12), 0px 6px 30px 5px rgba(0, 0, 0, 0.12)",g6="2px 17px 26px 2px rgba(0, 0, 0, 0.14), 0px 6px 32px 5px rgba(0, 0, 0, 0.12)",y6="2px 18px 28px 2px rgba(0, 0, 0, 0.14), 0px 7px 34px 6px rgba(0, 0, 0, 0.12)",b6="2px 19px 29px 2px rgba(0, 0, 0, 0.14), 0px 7px 36px 6px rgba(0, 0, 0, 0.12)",v6="2px 20px 31px 3px rgba(0, 0, 0, 0.14), 0px 8px 38px 7px rgba(0, 0, 0, 0.12)",x6="2px 21px 33px 3px rgba(0, 0, 0, 0.14), 0px 8px 40px 7px rgba(0, 0, 0, 0.12)",S6="2px 22px 35px 3px rgba(0, 0, 0, 0.14), 0px 8px 42px 7px rgba(0, 0, 0, 0.12)",C6="2px 23px 36px 3px rgba(0, 0, 0, 0.14), 0px 9px 44px 8px rgba(0, 0, 0, 0.12)",w6="2px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12)",T6="3px",_6="1px",E6="2px",k6='"source-sans-pro", "helvetica", "arial", sans-serif',O6='"source-sans-pro", "helvetica", "arial", sans-serif',M6="700",A6="2rem",R6="normal",I6="normal",D6='"source-sans-pro", "helvetica", "arial", sans-serif',P6="700",N6="1.75rem",L6="normal",j6="normal",$6='"source-sans-pro", "helvetica", "arial", sans-serif',F6="700",B6="1.5rem",V6="normal",z6="normal",H6='"source-sans-pro", "helvetica", "arial", sans-serif',W6="700",q6="1.35rem",U6="normal",K6="normal",G6='"source-sans-pro", "helvetica", "arial", sans-serif',Y6="700",J6="1.25rem",X6="normal",Z6="normal",Q6='"source-sans-pro", "helvetica", "arial", sans-serif',eq="700",tq="1.1rem",nq="normal",rq="normal",oq='"source-sans-pro", "helvetica", "arial", sans-serif',iq="600",sq="1.25rem",aq="normal",lq="normal",cq='"source-sans-pro", "helvetica", "arial", sans-serif',uq="600",dq="1.125rem",fq="normal",pq="normal",hq='"source-sans-pro", "helvetica", "arial", sans-serif',mq="400",gq="1.125rem",yq="normal",bq="normal",vq='"source-sans-pro", "helvetica", "arial", sans-serif',xq="400",Sq="1rem",Cq="normal",wq="normal",Tq='"source-sans-pro", "helvetica", "arial", sans-serif',_q="600",Eq="1rem",kq="normal",Oq="normal",Mq='"source-sans-pro", "helvetica", "arial", sans-serif',Aq="400",Rq="0.75rem",Iq="normal",Dq="normal",Pq='"source-sans-pro", "helvetica", "arial", sans-serif',Nq="400",Lq="0.75rem",jq="normal",$q="normal",ue={breakpoints_xs:jH,breakpoints_sm:$H,breakpoints_md:FH,breakpoints_lg:BH,breakpoints_xl:VH,light_palette_primary_light:zH,light_palette_primary_main:HH,light_palette_primary_dark:WH,light_palette_secondary_light:qH,light_palette_secondary_main:UH,light_palette_secondary_dark:KH,light_palette_text_primary:GH,light_palette_text_secondary:YH,light_palette_text_disabled:JH,light_palette_error_light:XH,light_palette_error_main:ZH,light_palette_error_dark:QH,light_palette_warning_light:eW,light_palette_warning_main:tW,light_palette_warning_dark:nW,light_palette_info_light:rW,light_palette_info_main:oW,light_palette_info_dark:iW,light_palette_success_light:sW,light_palette_success_main:aW,light_palette_success_dark:lW,light_palette_background_default:cW,light_palette_background_paper:uW,light_palette_background_appBar:dW,light_palette_divider_default:fW,dark_palette_primary_light:pW,dark_palette_primary_main:hW,dark_palette_primary_dark:mW,dark_palette_secondary_light:gW,dark_palette_secondary_main:yW,dark_palette_secondary_dark:bW,dark_palette_text_primary:vW,dark_palette_text_secondary:xW,dark_palette_text_disabled:SW,dark_palette_error_light:CW,dark_palette_error_main:wW,dark_palette_error_dark:TW,dark_palette_warning_light:_W,dark_palette_warning_main:EW,dark_palette_warning_dark:kW,dark_palette_info_light:OW,dark_palette_info_main:MW,dark_palette_info_dark:AW,dark_palette_success_light:RW,dark_palette_success_main:IW,dark_palette_success_dark:DW,dark_palette_background_default:PW,dark_palette_background_paper:NW,dark_palette_background_appBar:LW,dark_palette_divider_default:jW,common_palette_grey_50:$W,common_palette_grey_100:FW,common_palette_grey_200:BW,common_palette_grey_300:VW,common_palette_grey_400:zW,common_palette_grey_500:HW,common_palette_grey_600:WW,common_palette_grey_700:qW,common_palette_grey_800:UW,common_palette_grey_900:KW,common_palette_grey_A100:GW,common_palette_grey_A200:YW,common_palette_grey_A400:JW,common_palette_grey_A700:XW,common_palette_common_white:ZW,common_palette_common_black:QW,shadows_1:e6,shadows_2:t6,shadows_3:n6,shadows_4:r6,shadows_5:o6,shadows_6:i6,shadows_7:s6,shadows_8:a6,shadows_9:l6,shadows_10:c6,shadows_11:u6,shadows_12:d6,shadows_13:f6,shadows_14:p6,shadows_15:h6,shadows_16:m6,shadows_17:g6,shadows_18:y6,shadows_19:b6,shadows_20:v6,shadows_21:x6,shadows_22:S6,shadows_23:C6,shadows_24:w6,shape_borderRadius:T6,shape_borderWidth:_6,shape_buttonBorderWidth:E6,typography_fontFamily_default:k6,typography_h1_fontFamily:O6,typography_h1_fontWeight:M6,typography_h1_fontSize:A6,typography_h1_lineHeight:R6,typography_h1_letterSpacing:I6,typography_h2_fontFamily:D6,typography_h2_fontWeight:P6,typography_h2_fontSize:N6,typography_h2_lineHeight:L6,typography_h2_letterSpacing:j6,typography_h3_fontFamily:$6,typography_h3_fontWeight:F6,typography_h3_fontSize:B6,typography_h3_lineHeight:V6,typography_h3_letterSpacing:z6,typography_h4_fontFamily:H6,typography_h4_fontWeight:W6,typography_h4_fontSize:q6,typography_h4_lineHeight:U6,typography_h4_letterSpacing:K6,typography_h5_fontFamily:G6,typography_h5_fontWeight:Y6,typography_h5_fontSize:J6,typography_h5_lineHeight:X6,typography_h5_letterSpacing:Z6,typography_h6_fontFamily:Q6,typography_h6_fontWeight:eq,typography_h6_fontSize:tq,typography_h6_lineHeight:nq,typography_h6_letterSpacing:rq,typography_subtitle1_fontFamily:oq,typography_subtitle1_fontWeight:iq,typography_subtitle1_fontSize:sq,typography_subtitle1_lineHeight:aq,typography_subtitle1_letterSpacing:lq,typography_subtitle2_fontFamily:cq,typography_subtitle2_fontWeight:uq,typography_subtitle2_fontSize:dq,typography_subtitle2_lineHeight:fq,typography_subtitle2_letterSpacing:pq,typography_body1_fontFamily:hq,typography_body1_fontWeight:mq,typography_body1_fontSize:gq,typography_body1_lineHeight:yq,typography_body1_letterSpacing:bq,typography_body2_fontFamily:vq,typography_body2_fontWeight:xq,typography_body2_fontSize:Sq,typography_body2_lineHeight:Cq,typography_body2_letterSpacing:wq,typography_button_fontFamily:Tq,typography_button_fontWeight:_q,typography_button_fontSize:Eq,typography_button_lineHeight:kq,typography_button_letterSpacing:Oq,typography_caption_fontFamily:Mq,typography_caption_fontWeight:Aq,typography_caption_fontSize:Rq,typography_caption_lineHeight:Iq,typography_caption_letterSpacing:Dq,typography_overline_fontFamily:Pq,typography_overline_fontWeight:Nq,typography_overline_fontSize:Lq,typography_overline_lineHeight:jq,typography_overline_letterSpacing:$q},Dn={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"}}})}}}};var C2,w2,T2,_2,E2,k2,O2,M2,A2,R2,I2,D2;const Fq=$.createTheme({...Dn,palette:{...Dn.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:{...Dn.components,MuiAppBar:{...(C2=Dn.components)==null?void 0:C2.MuiAppBar,styleOverrides:{...(T2=(w2=Dn.components)==null?void 0:w2.MuiAppBar)==null?void 0:T2.styleOverrides,root:{...(k2=(E2=(_2=Dn.components)==null?void 0:_2.MuiAppBar)==null?void 0:E2.styleOverrides)==null?void 0:k2.root,backgroundColor:ue.light_palette_background_appBar}}},MuiCard:{...(O2=Dn.components)==null?void 0:O2.MuiCard,styleOverrides:{...(A2=(M2=Dn.components)==null?void 0:M2.MuiCard)==null?void 0:A2.styleOverrides,root:{...(D2=(I2=(R2=Dn.components)==null?void 0:R2.MuiCard)==null?void 0:I2.styleOverrides)==null?void 0:D2.root,borderColor:ue.light_palette_divider_default}}}}});var P2,N2,L2,j2,$2,F2,B2,V2,z2,H2,W2,q2;const Bq=$.createTheme({...Dn,palette:{...Dn.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:{...Dn.components,MuiAppBar:{...(P2=Dn.components)==null?void 0:P2.MuiAppBar,styleOverrides:{...(L2=(N2=Dn.components)==null?void 0:N2.MuiAppBar)==null?void 0:L2.styleOverrides,root:{...(F2=($2=(j2=Dn.components)==null?void 0:j2.MuiAppBar)==null?void 0:$2.styleOverrides)==null?void 0:F2.root,backgroundColor:ue.dark_palette_background_appBar,backgroundImage:"none"}}},MuiCard:{...(B2=Dn.components)==null?void 0:B2.MuiCard,styleOverrides:{...(z2=(V2=Dn.components)==null?void 0:V2.MuiCard)==null?void 0:z2.styleOverrides,root:{...(q2=(W2=(H2=Dn.components)==null?void 0:H2.MuiCard)==null?void 0:W2.styleOverrides)==null?void 0:q2.root,borderColor:ue.dark_palette_divider_default}}}}});var $u=t=>t.type==="checkbox",ta=t=>t instanceof Date,dr=t=>t==null;const K2=t=>typeof t=="object";var wn=t=>!dr(t)&&!Array.isArray(t)&&K2(t)&&!ta(t),G2=t=>wn(t)&&t.target?$u(t.target)?t.target.checked:t.target.value:t,Vq=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,Y2=(t,e)=>t.has(Vq(e)),zq=t=>{const e=t.constructor&&t.constructor.prototype;return wn(e)&&e.hasOwnProperty("isPrototypeOf")},d1=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(!(d1&&(t instanceof Blob||r))&&(n||wn(t)))if(e=n?[]:{},!n&&!zq(t))e=t;else for(const o in t)t.hasOwnProperty(o)&&(e[o]=Jt(t[o]));else return t;return e}var ph=t=>/^\w*$/.test(t),Zt=t=>t===void 0,hh=t=>Array.isArray(t)?t.filter(Boolean):[],f1=t=>hh(t.replace(/["|']|\]/g,"").split(/\.|\[/)),je=(t,e,n)=>{if(!e||!wn(t))return n;const r=(ph(e)?[e]:f1(e)).reduce((o,i)=>dr(o)?o:o[i],t);return Zt(r)||r===t?Zt(t[e])?n:t[e]:r},$r=t=>typeof t=="boolean",Mt=(t,e,n)=>{let r=-1;const o=ph(e)?[e]:f1(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=wn(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;t[a]=l,t=t[a]}};const tp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ao={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},hi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},p1=q.createContext(null);p1.displayName="HookFormContext";const ln=()=>q.useContext(p1),Hq=t=>{const{children:e,...n}=t;return q.createElement(p1.Provider,{value:n},e)};var J2=(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]!==ao.all&&(e._proxyFormState[s]=!r||ao.all),n&&(n[s]=!0),t[s]}});return o};const mh=typeof window<"u"?D.useLayoutEffect:D.useEffect;function Wq(t){const e=ln(),{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 mh(()=>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(()=>J2(s,n,l.current,!1),[s,n])}var Ko=t=>typeof t=="string",X2=(t,e,n,r,o)=>Ko(t)?(r&&e.watch.add(t),je(n,t,o)):Array.isArray(t)?t.map(i=>(r&&e.watch.add(i),je(n,i))):(r&&(e.watchAll=!0),n);function np(t){const e=ln(),{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 mh(()=>n._subscribe({name:r,formState:{values:!0},exact:s,callback:f=>!i&&u(X2(r,n._names,f.values||n._formValues,!1,a.current))}),[r,n,i,s]),q.useEffect(()=>n._removeUnmounted()),l}function qq(t){const e=ln(),{name:n,disabled:r,control:o=e.control,shouldUnregister:i}=t,s=Y2(o._names.array,n),a=np({control:o,name:n,defaultValue:je(o._formValues,n,je(o._defaultValues,n,t.defaultValue)),exact:!0}),l=Wq({control:o,name:n,exact:!0}),u=q.useRef(t),f=q.useRef(o.register(n,{...t.rules,value:a,...$r(t.disabled)?{disabled:t.disabled}:{}})),p=q.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!je(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!je(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!je(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!je(l.validatingFields,n)},error:{enumerable:!0,get:()=>je(l.errors,n)}}),[l,n]),m=q.useCallback(x=>f.current.onChange({target:{value:G2(x),name:n},type:tp.CHANGE}),[n]),g=q.useCallback(()=>f.current.onBlur({target:{value:je(o._formValues,n),name:n},type:tp.BLUR}),[n,o._formValues]),b=q.useCallback(x=>{const C=je(o._fields,n);C&&x&&(C._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:_=>x.setCustomValidity(_),reportValidity:()=>x.reportValidity()})},[o._fields,n]),y=q.useMemo(()=>({name:n,value:a,...$r(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:m,onBlur:g,ref:b}),[n,r,l.disabled,m,g,b,a]);return q.useEffect(()=>{const x=o._options.shouldUnregister||i;o.register(n,{...u.current.rules,...$r(u.current.disabled)?{disabled:u.current.disabled}:{}});const C=(_,T)=>{const w=je(o._fields,_);w&&w._f&&(w._f.mount=T)};if(C(n,!0),x){const _=Jt(je(o._options.defaultValues,n));Mt(o._defaultValues,n,_),Zt(je(o._formValues,n))&&Mt(o._formValues,n,_)}return!s&&o.register(n),()=>{(s?x&&!o._state.action:x)?o.unregister(n):C(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 nr=t=>t.render(qq(t));var Z2=(t,e,n,r,o)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:o||!0}}:{},kr=t=>Array.isArray(t)?t:[t],GT=()=>{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=[]}}},Q0=t=>dr(t)||!K2(t);function as(t,e,n=new WeakSet){if(Q0(t)||Q0(e))return t===e;if(ta(t)&&ta(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(ta(s)&&ta(a)||wn(s)&&wn(a)||Array.isArray(s)&&Array.isArray(a)?!as(s,a,n):s!==a)return!1}}return!0}var cr=t=>wn(t)&&!Object.keys(t).length,h1=t=>t.type==="file",To=t=>typeof t=="function",rp=t=>{if(!d1)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Q2=t=>t.type==="select-multiple",m1=t=>t.type==="radio",Uq=t=>m1(t)||$u(t),Hg=t=>rp(t)&&t.isConnected;function Kq(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=Zt(t)?r++:t[e[r++]];return t}function Gq(t){for(const e in t)if(t.hasOwnProperty(e)&&!Zt(t[e]))return!1;return!0}function Cn(t,e){const n=Array.isArray(e)?e:ph(e)?[e]:f1(e),r=n.length===1?t:Kq(t,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(wn(r)&&cr(r)||Array.isArray(r)&&Gq(r))&&Cn(t,n.slice(0,-1)),t}var eI=t=>{for(const e in t)if(To(t[e]))return!0;return!1};function op(t,e={}){const n=Array.isArray(t);if(wn(t)||n)for(const r in t)Array.isArray(t[r])||wn(t[r])&&!eI(t[r])?(e[r]=Array.isArray(t[r])?[]:{},op(t[r],e[r])):dr(t[r])||(e[r]=!0);return e}function tI(t,e,n){const r=Array.isArray(t);if(wn(t)||r)for(const o in t)Array.isArray(t[o])||wn(t[o])&&!eI(t[o])?Zt(e)||Q0(n[o])?n[o]=Array.isArray(t[o])?op(t[o],[]):{...op(t[o])}:tI(t[o],dr(e)?{}:e[o],n[o]):n[o]=!as(t[o],e[o]);return n}var yc=(t,e)=>tI(t,e,op(e));const YT={value:!1,isValid:!1},JT={value:!0,isValid:!0};var nI=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&&!Zt(t[0].attributes.value)?Zt(t[0].value)||t[0].value===""?JT:{value:t[0].value,isValid:!0}:JT:YT}return YT},rI=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>Zt(t)?t:e?t===""?NaN:t&&+t:n&&Ko(t)?new Date(t):r?r(t):t;const XT={isValid:!1,value:null};var oI=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,XT):XT;function ZT(t){const e=t.ref;return h1(e)?e.files:m1(e)?oI(t.refs).value:Q2(e)?[...e.selectedOptions].map(({value:n})=>n):$u(e)?nI(t.refs).value:rI(Zt(e.value)?t.ref.value:e.value,t)}var Yq=(t,e,n,r)=>{const o={};for(const i of t){const s=je(e,i);s&&Mt(o,i,s._f)}return{criteriaMode:n,names:[...t],fields:o,shouldUseNativeValidation:r}},ip=t=>t instanceof RegExp,bc=t=>Zt(t)?t:ip(t)?t.source:wn(t)?ip(t.value)?t.value.source:t.value:t,gl=t=>({isOnSubmit:!t||t===ao.onSubmit,isOnBlur:t===ao.onBlur,isOnChange:t===ao.onChange,isOnAll:t===ao.all,isOnTouch:t===ao.onTouched});const QT="AsyncFunction";var Jq=t=>!!t&&!!t.validate&&!!(To(t.validate)&&t.validate.constructor.name===QT||wn(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===QT)),Xq=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),ex=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const Sl=(t,e,n,r)=>{for(const o of n||Object.keys(t)){const i=je(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(Sl(a,e))break}else if(wn(a)&&Sl(a,e))break}}};function e_(t,e,n){const r=je(t,n);if(r||ph(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=je(e,i),a=je(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 Zq=(t,e,n,r)=>{n(t);const{name:o,...i}=t;return cr(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(s=>e[s]===(!r||ao.all))},Qq=(t,e,n)=>!t||!e||t===e||kr(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r))),e9=(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,t9=(t,e)=>!hh(je(t,e)).length&&Cn(t,e),iI=(t,e,n)=>{const r=kr(je(t,n));return Mt(r,"root",e[n]),Mt(t,n,r),t},Pf=t=>Ko(t);function t_(t,e,n="validate"){if(Pf(t)||Array.isArray(t)&&t.every(Pf)||$r(t)&&!t)return{type:n,message:Pf(t)?t:"",ref:e}}var Ya=t=>wn(t)&&!ip(t)?t:{value:t,message:""},tx=async(t,e,n,r,o,i)=>{const{ref:s,refs:a,required:l,maxLength:u,minLength:f,min:p,max:m,pattern:g,validate:b,name:y,valueAsNumber:x,mount:C}=t._f,_=je(n,y);if(!C||e.has(y))return{};const T=a?a[0]:s,w=L=>{o&&T.reportValidity&&(T.setCustomValidity($r(L)?"":L||""),T.reportValidity())},k={},M=m1(s),A=$u(s),R=M||A,N=(x||h1(s))&&Zt(s.value)&&Zt(_)||rp(s)&&s.value===""||_===""||Array.isArray(_)&&!_.length,O=Z2.bind(null,y,r,k),I=(L,B,V,j=hi.maxLength,F=hi.minLength)=>{const U=L?B:V;k[y]={type:L?j:F,message:U,ref:s,...O(L?j:F,U)}};if(i?!Array.isArray(_)||!_.length:l&&(!R&&(N||dr(_))||$r(_)&&!_||A&&!nI(a).isValid||M&&!oI(a).isValid)){const{value:L,message:B}=Pf(l)?{value:!!l,message:l}:Ya(l);if(L&&(k[y]={type:hi.required,message:B,ref:T,...O(hi.required,B)},!r))return w(B),k}if(!N&&(!dr(p)||!dr(m))){let L,B;const V=Ya(m),j=Ya(p);if(!dr(_)&&!isNaN(_)){const F=s.valueAsNumber||_&&+_;dr(V.value)||(L=F>V.value),dr(j.value)||(B=F<j.value)}else{const F=s.valueAsDate||new Date(_),U=G=>new Date(new Date().toDateString()+" "+G),K=s.type=="time",Y=s.type=="week";Ko(V.value)&&_&&(L=K?U(_)>U(V.value):Y?_>V.value:F>new Date(V.value)),Ko(j.value)&&_&&(B=K?U(_)<U(j.value):Y?_<j.value:F<new Date(j.value))}if((L||B)&&(I(!!L,V.message,j.message,hi.max,hi.min),!r))return w(k[y].message),k}if((u||f)&&!N&&(Ko(_)||i&&Array.isArray(_))){const L=Ya(u),B=Ya(f),V=!dr(L.value)&&_.length>+L.value,j=!dr(B.value)&&_.length<+B.value;if((V||j)&&(I(V,L.message,B.message),!r))return w(k[y].message),k}if(g&&!N&&Ko(_)){const{value:L,message:B}=Ya(g);if(ip(L)&&!_.match(L)&&(k[y]={type:hi.pattern,message:B,ref:s,...O(hi.pattern,B)},!r))return w(B),k}if(b){if(To(b)){const L=await b(_,n),B=t_(L,T);if(B&&(k[y]={...B,...O(hi.validate,B.message)},!r))return w(B.message),k}else if(wn(b)){let L={};for(const B in b){if(!cr(L)&&!r)break;const V=t_(await b[B](_,n),T,B);V&&(L={...V,...O(B,V.message)},w(V.message),r&&(k[y]=L))}if(!cr(L)&&(k[y]={ref:T,...L},!r))return k}}return w(!0),k};const n9={mode:ao.onSubmit,reValidateMode:ao.onChange,shouldFocusError:!0};function r9(t={}){let e={...n9,...t},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:To(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},o=wn(e.defaultValues)||wn(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 m={array:GT(),state:GT()},g=e.criteriaMode===ao.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?cr((await A()).errors):await N(r,!0);te!==n.isValid&&m.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?Mt(n.validatingFields,re,te):Cn(n.validatingFields,re))}),m.state.next({validatingFields:n.validatingFields,isValidating:!cr(n.validatingFields)}))},C=(W,te=[],re,Oe,Re=!0,Ie=!0)=>{if(Oe&&re&&!e.disabled){if(s.action=!0,Ie&&Array.isArray(je(r,W))){const Ve=re(je(r,W),Oe.argA,Oe.argB);Re&&Mt(r,W,Ve)}if(Ie&&Array.isArray(je(n.errors,W))){const Ve=re(je(n.errors,W),Oe.argA,Oe.argB);Re&&Mt(n.errors,W,Ve),t9(n.errors,W)}if((f.touchedFields||p.touchedFields)&&Ie&&Array.isArray(je(n.touchedFields,W))){const Ve=re(je(n.touchedFields,W),Oe.argA,Oe.argB);Re&&Mt(n.touchedFields,W,Ve)}(f.dirtyFields||p.dirtyFields)&&(n.dirtyFields=yc(o,i)),m.state.next({name:W,isDirty:I(W,te),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Mt(i,W,te)},_=(W,te)=>{Mt(n.errors,W,te),m.state.next({errors:n.errors})},T=W=>{n.errors=W,m.state.next({errors:n.errors,isValid:!1})},w=(W,te,re,Oe)=>{const Re=je(r,W);if(Re){const Ie=je(i,W,Zt(re)?je(o,W):re);Zt(Ie)||Oe&&Oe.defaultChecked||te?Mt(i,W,te?Ie:ZT(Re._f)):V(W,Ie),s.mount&&y()}},k=(W,te,re,Oe,Re)=>{let Ie=!1,Ve=!1;const rt={name:W};if(!e.disabled){if(!re||Oe){(f.isDirty||p.isDirty)&&(Ve=n.isDirty,n.isDirty=rt.isDirty=I(),Ie=Ve!==rt.isDirty);const tt=as(je(o,W),te);Ve=!!je(n.dirtyFields,W),tt?Cn(n.dirtyFields,W):Mt(n.dirtyFields,W,!0),rt.dirtyFields=n.dirtyFields,Ie=Ie||(f.dirtyFields||p.dirtyFields)&&Ve!==!tt}if(re){const tt=je(n.touchedFields,W);tt||(Mt(n.touchedFields,W,re),rt.touchedFields=n.touchedFields,Ie=Ie||(f.touchedFields||p.touchedFields)&&tt!==re)}Ie&&Re&&m.state.next(rt)}return Ie?rt:{}},M=(W,te,re,Oe)=>{const Re=je(n.errors,W),Ie=(f.isValid||p.isValid)&&$r(te)&&n.isValid!==te;if(e.delayError&&re?(l=b(()=>_(W,re)),l(e.delayError)):(clearTimeout(u),l=null,re?Mt(n.errors,W,re):Cn(n.errors,W)),(re?!as(Re,re):Re)||!cr(Oe)||Ie){const Ve={...Oe,...Ie&&$r(te)?{isValid:te}:{},errors:n.errors,name:W};n={...n,...Ve},m.state.next(Ve)}},A=async W=>{x(W,!0);const te=await e.resolver(i,e.context,Yq(W||a.mount,r,e.criteriaMode,e.shouldUseNativeValidation));return x(W),te},R=async W=>{const{errors:te}=await A(W);if(W)for(const re of W){const Oe=je(te,re);Oe?Mt(n.errors,re,Oe):Cn(n.errors,re)}else n.errors=te;return te},N=async(W,te,re={valid:!0})=>{for(const Oe in W){const Re=W[Oe];if(Re){const{_f:Ie,...Ve}=Re;if(Ie){const rt=a.array.has(Ie.name),tt=Re._f&&Jq(Re._f);tt&&f.validatingFields&&x([Oe],!0);const kt=await tx(Re,a.disabled,i,g,e.shouldUseNativeValidation&&!te,rt);if(tt&&f.validatingFields&&x([Oe]),kt[Ie.name]&&(re.valid=!1,te))break;!te&&(je(kt,Ie.name)?rt?iI(n.errors,kt,Ie.name):Mt(n.errors,Ie.name,kt[Ie.name]):Cn(n.errors,Ie.name))}!cr(Ve)&&await N(Ve,te,re)}}return re.valid},O=()=>{for(const W of a.unMount){const te=je(r,W);te&&(te._f.refs?te._f.refs.every(re=>!Hg(re)):!Hg(te._f.ref))&&de(W)}a.unMount=new Set},I=(W,te)=>!e.disabled&&(W&&te&&Mt(i,W,te),!as(G(),o)),L=(W,te,re)=>X2(W,a,{...s.mount?i:Zt(te)?o:Ko(W)?{[W]:te}:te},re,te),B=W=>hh(je(s.mount?i:o,W,e.shouldUnregister?je(o,W,[]):[])),V=(W,te,re={})=>{const Oe=je(r,W);let Re=te;if(Oe){const Ie=Oe._f;Ie&&(!Ie.disabled&&Mt(i,W,rI(te,Ie)),Re=rp(Ie.ref)&&dr(te)?"":te,Q2(Ie.ref)?[...Ie.ref.options].forEach(Ve=>Ve.selected=Re.includes(Ve.value)):Ie.refs?$u(Ie.ref)?Ie.refs.forEach(Ve=>{(!Ve.defaultChecked||!Ve.disabled)&&(Array.isArray(Re)?Ve.checked=!!Re.find(rt=>rt===Ve.value):Ve.checked=Re===Ve.value||!!Re)}):Ie.refs.forEach(Ve=>Ve.checked=Ve.value===Re):h1(Ie.ref)?Ie.ref.value="":(Ie.ref.value=Re,Ie.ref.type||m.state.next({name:W,values:Jt(i)})))}(re.shouldDirty||re.shouldTouch)&&k(W,Re,re.shouldTouch,re.shouldDirty,!0),re.shouldValidate&&Y(W)},j=(W,te,re)=>{for(const Oe in te){if(!te.hasOwnProperty(Oe))return;const Re=te[Oe],Ie=W+"."+Oe,Ve=je(r,Ie);(a.array.has(W)||wn(Re)||Ve&&!Ve._f)&&!ta(Re)?j(Ie,Re,re):V(Ie,Re,re)}},F=(W,te,re={})=>{const Oe=je(r,W),Re=a.array.has(W),Ie=Jt(te);Mt(i,W,Ie),Re?(m.array.next({name:W,values:Jt(i)}),(f.isDirty||f.dirtyFields||p.isDirty||p.dirtyFields)&&re.shouldDirty&&m.state.next({name:W,dirtyFields:yc(o,i),isDirty:I(W,Ie)})):Oe&&!Oe._f&&!dr(Ie)?j(W,Ie,re):V(W,Ie,re),ex(W,a)&&m.state.next({...n}),m.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,Oe=!0;const Re=je(r,re),Ie=tt=>{Oe=Number.isNaN(tt)||ta(tt)&&isNaN(tt.getTime())||as(tt,je(i,re,tt))},Ve=gl(e.mode),rt=gl(e.reValidateMode);if(Re){let tt,kt;const vn=te.type?ZT(Re._f):G2(W),ct=W.type===tp.BLUR||W.type===tp.FOCUS_OUT,An=!Xq(Re._f)&&!e.resolver&&!je(n.errors,re)&&!Re._f.deps||e9(ct,je(n.touchedFields,re),n.isSubmitted,rt,Ve),Nt=ex(re,a,ct);Mt(i,re,vn),ct?(Re._f.onBlur&&Re._f.onBlur(W),l&&l(0)):Re._f.onChange&&Re._f.onChange(W);const pe=k(re,vn,ct),He=!cr(pe)||Nt;if(!ct&&m.state.next({name:re,type:W.type,values:Jt(i)}),An)return(f.isValid||p.isValid)&&(e.mode==="onBlur"?ct&&y():ct||y()),He&&m.state.next({name:re,...Nt?{}:pe});if(!ct&&Nt&&m.state.next({...n}),e.resolver){const{errors:Me}=await A([re]);if(Ie(vn),Oe){const We=e_(n.errors,r,re),Je=e_(Me,r,We.name||re);tt=Je.error,re=Je.name,kt=cr(Me)}}else x([re],!0),tt=(await tx(Re,a.disabled,i,g,e.shouldUseNativeValidation))[re],x([re]),Ie(vn),Oe&&(tt?kt=!1:(f.isValid||p.isValid)&&(kt=await N(r,!0)));Oe&&(Re._f.deps&&Y(Re._f.deps),M(re,kt,tt,pe))}},K=(W,te)=>{if(je(n.errors,te)&&W.focus)return W.focus(),1},Y=async(W,te={})=>{let re,Oe;const Re=kr(W);if(e.resolver){const Ie=await R(Zt(W)?W:Re);re=cr(Ie),Oe=W?!Re.some(Ve=>je(Ie,Ve)):re}else W?(Oe=(await Promise.all(Re.map(async Ie=>{const Ve=je(r,Ie);return await N(Ve&&Ve._f?{[Ie]:Ve}:Ve)}))).every(Boolean),!(!Oe&&!n.isValid)&&y()):Oe=re=await N(r);return m.state.next({...!Ko(W)||(f.isValid||p.isValid)&&re!==n.isValid?{}:{name:W},...e.resolver||!W?{isValid:re}:{},errors:n.errors}),te.shouldFocus&&!Oe&&Sl(r,K,W?Re:a.mount),Oe},G=W=>{const te={...s.mount?i:o};return Zt(W)?te:Ko(W)?je(te,W):W.map(re=>je(te,re))},Z=(W,te)=>({invalid:!!je((te||n).errors,W),isDirty:!!je((te||n).dirtyFields,W),error:je((te||n).errors,W),isValidating:!!je(n.validatingFields,W),isTouched:!!je((te||n).touchedFields,W)}),me=W=>{W&&kr(W).forEach(te=>Cn(n.errors,te)),m.state.next({errors:W?n.errors:{}})},he=(W,te,re)=>{const Oe=(je(r,W,{_f:{}})._f||{}).ref,Re=je(n.errors,W)||{},{ref:Ie,message:Ve,type:rt,...tt}=Re;Mt(n.errors,W,{...tt,...te,ref:Oe}),m.state.next({name:W,errors:n.errors,isValid:!1}),re&&re.shouldFocus&&Oe&&Oe.focus&&Oe.focus()},ge=(W,te)=>To(W)?m.state.subscribe({next:re=>W(L(void 0,te),re)}):L(W,te,!0),oe=W=>m.state.subscribe({next:te=>{Qq(W.name,te.name,W.exact)&&Zq(te,W.formState||f,Te,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?kr(W):a.mount)a.mount.delete(re),a.array.delete(re),te.keepValue||(Cn(r,re),Cn(i,re)),!te.keepError&&Cn(n.errors,re),!te.keepDirty&&Cn(n.dirtyFields,re),!te.keepTouched&&Cn(n.touchedFields,re),!te.keepIsValidating&&Cn(n.validatingFields,re),!e.shouldUnregister&&!te.keepDefaultValue&&Cn(o,re);m.state.next({values:Jt(i)}),m.state.next({...n,...te.keepDirty?{isDirty:I()}:{}}),!te.keepIsValid&&y()},X=({disabled:W,name:te})=>{($r(W)&&s.mount||W||a.disabled.has(te))&&(W?a.disabled.add(te):a.disabled.delete(te))},Q=(W,te={})=>{let re=je(r,W);const Oe=$r(te.disabled)||$r(e.disabled);return Mt(r,W,{...re||{},_f:{...re&&re._f?re._f:{ref:{name:W}},name:W,mount:!0,...te}}),a.mount.add(W),re?X({disabled:$r(te.disabled)?te.disabled:e.disabled,name:W}):w(W,!0,te.value),{...Oe?{disabled:te.disabled||e.disabled}:{},...e.progressive?{required:!!te.required,min:bc(te.min),max:bc(te.max),minLength:bc(te.minLength),maxLength:bc(te.maxLength),pattern:bc(te.pattern)}:{},name:W,onChange:U,onBlur:U,ref:Re=>{if(Re){Q(W,te),re=je(r,W);const Ie=Zt(Re.value)&&Re.querySelectorAll&&Re.querySelectorAll("input,select,textarea")[0]||Re,Ve=Uq(Ie),rt=re._f.refs||[];if(Ve?rt.find(tt=>tt===Ie):Ie===re._f.ref)return;Mt(r,W,{_f:{...re._f,...Ve?{refs:[...rt.filter(Hg),Ie,...Array.isArray(je(o,W))?[{}]:[]],ref:{type:Ie.type,name:W}}:{ref:Ie}}}),w(W,!1,void 0,Ie)}else re=je(r,W,{}),re._f&&(re._f.mount=!1),(e.shouldUnregister||te.shouldUnregister)&&!(Y2(a.array,W)&&s.action)&&a.unMount.add(W)}}},ae=()=>e.shouldFocusError&&Sl(r,K,a.mount),ve=W=>{$r(W)&&(m.state.next({disabled:W}),Sl(r,(te,re)=>{const Oe=je(r,re);Oe&&(te.disabled=Oe._f.disabled||W,Array.isArray(Oe._f.refs)&&Oe._f.refs.forEach(Re=>{Re.disabled=Oe._f.disabled||W}))},0,!1))},ne=(W,te)=>async re=>{let Oe;re&&(re.preventDefault&&re.preventDefault(),re.persist&&re.persist());let Re=Jt(i);if(m.state.next({isSubmitting:!0}),e.resolver){const{errors:Ie,values:Ve}=await A();n.errors=Ie,Re=Jt(Ve)}else await N(r);if(a.disabled.size)for(const Ie of a.disabled)Cn(Re,Ie);if(Cn(n.errors,"root"),cr(n.errors)){m.state.next({errors:{}});try{await W(Re,re)}catch(Ie){Oe=Ie}}else te&&await te({...n.errors},re),ae(),setTimeout(ae);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:cr(n.errors)&&!Oe,submitCount:n.submitCount+1,errors:n.errors}),Oe)throw Oe},ce=(W,te={})=>{je(r,W)&&(Zt(te.defaultValue)?F(W,Jt(je(o,W))):(F(W,te.defaultValue),Mt(o,W,Jt(te.defaultValue))),te.keepTouched||Cn(n.touchedFields,W),te.keepDirty||(Cn(n.dirtyFields,W),n.isDirty=te.defaultValue?I(W,Jt(je(o,W))):I()),te.keepError||(Cn(n.errors,W),f.isValid&&y()),m.state.next({...n}))},fe=(W,te={})=>{const re=W?Jt(W):o,Oe=Jt(re),Re=cr(W),Ie=Re?o:Oe;if(te.keepDefaultValues||(o=re),!te.keepValues){if(te.keepDirtyValues){const Ve=new Set([...a.mount,...Object.keys(yc(o,i))]);for(const rt of Array.from(Ve))je(n.dirtyFields,rt)?Mt(Ie,rt,je(i,rt)):F(rt,je(Ie,rt))}else{if(d1&&Zt(W))for(const Ve of a.mount){const rt=je(r,Ve);if(rt&&rt._f){const tt=Array.isArray(rt._f.refs)?rt._f.refs[0]:rt._f.ref;if(rp(tt)){const kt=tt.closest("form");if(kt){kt.reset();break}}}}if(te.keepFieldsRef)for(const Ve of a.mount)F(Ve,je(Ie,Ve));else r={}}i=e.shouldUnregister?te.keepDefaultValues?Jt(o):{}:Jt(Ie),m.array.next({values:{...Ie}}),m.state.next({values:{...Ie}})}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,m.state.next({submitCount:te.keepSubmitCount?n.submitCount:0,isDirty:Re?!1:te.keepDirty?n.isDirty:!!(te.keepDefaultValues&&!as(W,o)),isSubmitted:te.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Re?{}:te.keepDirtyValues?te.keepDefaultValues&&i?yc(o,i):n.dirtyFields:te.keepDefaultValues&&W?yc(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(To(W)?W(i):W,te),_e=(W,te={})=>{const re=je(r,W),Oe=re&&re._f;if(Oe){const Re=Oe.refs?Oe.refs[0]:Oe.ref;Re.focus&&(Re.focus(),te.shouldSelect&&To(Re.select)&&Re.select())}},Te=W=>{n={...n,...W}},Be={control:{register:Q,unregister:de,getFieldState:Z,handleSubmit:ne,setError:he,_subscribe:oe,_runSchema:A,_focusError:ae,_getWatch:L,_getDirty:I,_setValid:y,_setFieldArray:C,_setDisabledField:X,_setErrors:T,_getFieldArray:B,_reset:fe,_resetDefaultValues:()=>To(e.defaultValues)&&e.defaultValues().then(W=>{xe(W,e.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:O,_disableForm:ve,_subjects:m,_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:ge,setValue:F,getValues:G,reset:xe,resetField:ce,clearErrors:me,unregister:de,setError:he,setFocus:_e,getFieldState:Z};return{...Be,formControl:Be}}var Zi=()=>{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)})},Wg=(t,e,n={})=>n.shouldFocus||Zt(n.shouldFocus)?n.focusName||`${t}.${Zt(n.focusIndex)?e:n.focusIndex}.`:"",qg=(t,e)=>[...t,...kr(e)],Ug=t=>Array.isArray(t)?t.map(()=>{}):void 0;function Kg(t,e,n){return[...t.slice(0,e),...kr(n),...t.slice(e)]}var Gg=(t,e,n)=>Array.isArray(t)?(Zt(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],Yg=(t,e)=>[...kr(e),...kr(t)];function o9(t,e){let n=0;const r=[...t];for(const o of e)r.splice(o-n,1),n++;return hh(r).length?r:[]}var Jg=(t,e)=>Zt(e)?[]:o9(t,kr(e).sort((n,r)=>n-r)),Xg=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]},n_=(t,e,n)=>(t[e]=n,t);function i9(t){const e=ln(),{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(Zi)),f=q.useRef(a),p=q.useRef(r),m=q.useRef(!1);p.current=r,f.current=a,n._names.array.add(r),s&&n.register(r,s),mh(()=>n._subjects.array.subscribe({next:({values:M,name:A})=>{if(A===p.current||!A){const R=je(M,p.current);Array.isArray(R)&&(l(R),u.current=R.map(Zi))}}}).unsubscribe,[n]);const g=q.useCallback(M=>{m.current=!0,n._setFieldArray(r,M)},[n,r]),b=(M,A)=>{const R=kr(Jt(M)),N=qg(n._getFieldArray(r),R);n._names.focus=Wg(r,N.length-1,A),u.current=qg(u.current,R.map(Zi)),g(N),l(N),n._setFieldArray(r,N,qg,{argA:Ug(M)})},y=(M,A)=>{const R=kr(Jt(M)),N=Yg(n._getFieldArray(r),R);n._names.focus=Wg(r,0,A),u.current=Yg(u.current,R.map(Zi)),g(N),l(N),n._setFieldArray(r,N,Yg,{argA:Ug(M)})},x=M=>{const A=Jg(n._getFieldArray(r),M);u.current=Jg(u.current,M),g(A),l(A),!Array.isArray(je(n._fields,r))&&Mt(n._fields,r,void 0),n._setFieldArray(r,A,Jg,{argA:M})},C=(M,A,R)=>{const N=kr(Jt(A)),O=Kg(n._getFieldArray(r),M,N);n._names.focus=Wg(r,M,R),u.current=Kg(u.current,M,N.map(Zi)),g(O),l(O),n._setFieldArray(r,O,Kg,{argA:M,argB:Ug(A)})},_=(M,A)=>{const R=n._getFieldArray(r);Xg(R,M,A),Xg(u.current,M,A),g(R),l(R),n._setFieldArray(r,R,Xg,{argA:M,argB:A},!1)},T=(M,A)=>{const R=n._getFieldArray(r);Gg(R,M,A),Gg(u.current,M,A),g(R),l(R),n._setFieldArray(r,R,Gg,{argA:M,argB:A},!1)},w=(M,A)=>{const R=Jt(A),N=n_(n._getFieldArray(r),M,R);u.current=[...N].map((O,I)=>!O||I===M?Zi():u.current[I]),g(N),l([...N]),n._setFieldArray(r,N,n_,{argA:M,argB:R},!0,!1)},k=M=>{const A=kr(Jt(M));u.current=A.map(Zi),g([...A]),l([...A]),n._setFieldArray(r,[...A],R=>R,{},!0,!1)};return q.useEffect(()=>{if(n._state.action=!1,ex(r,n._names)&&n._subjects.state.next({...n._formState}),m.current&&(!gl(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!gl(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([r]).then(M=>{const A=je(M.errors,r),R=je(n._formState.errors,r);(R?!A&&R.type||A&&(R.type!==A.type||R.message!==A.message):A&&A.type)&&(A?Mt(n._formState.errors,r,A):Cn(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const M=je(n._fields,r);M&&M._f&&!(gl(n._options.reValidateMode).isOnSubmit&&gl(n._options.mode).isOnSubmit)&&tx(M,n._names.disabled,n._formValues,n._options.criteriaMode===ao.all,n._options.shouldUseNativeValidation,!0).then(A=>!cr(A)&&n._subjects.state.next({errors:iI(n._formState.errors,A,r)}))}n._subjects.state.next({name:r,values:Jt(n._formValues)}),n._names.focus&&Sl(n._fields,(M,A)=>{if(n._names.focus&&A.startsWith(n._names.focus)&&M.focus)return M.focus(),1}),n._names.focus="",n._setValid(),m.current=!1},[a,r,n]),q.useEffect(()=>(!je(n._formValues,r)&&n._setFieldArray(r),()=>{const M=(A,R)=>{const N=je(n._fields,A);N&&N._f&&(N._f.mount=R)};n._options.shouldUnregister||i?n.unregister(r):M(r,!1)}),[r,n,o,i]),{swap:q.useCallback(_,[g,r,n]),move:q.useCallback(T,[g,r,n]),prepend:q.useCallback(y,[g,r,n]),append:q.useCallback(b,[g,r,n]),remove:q.useCallback(x,[g,r,n]),insert:q.useCallback(C,[g,r,n]),update:q.useCallback(w,[g,r,n]),replace:q.useCallback(k,[g,r,n]),fields:q.useMemo(()=>a.map((M,A)=>({...M,[o]:u.current[A]||Zi()})),[a,o])}}function s9(t={}){const e=q.useRef(void 0),n=q.useRef(void 0),[r,o]=q.useState({isDirty:!1,isValidating:!1,isLoading:To(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:To(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!To(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:s,...a}=r9(t);e.current={...a,formState:r}}const i=e.current.control;return i._options=t,mh(()=>{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&&!as(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=J2(r,i),e.current}const a9=["w","xs","sm","md","lg","xl","alignment","justify","noMP","noGrid","gridClassName","gridStyle"],r_=t=>t>47&&t<58,o_=t=>t>64&&t<123&&(t<91||t>96),l9=(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 T=0;T<t.length&&T<e.length;T++){for(;i<e.length&&e[i]!=="X"&&e[i]!=="9";)a++,s++,i++;(r_(t.charCodeAt(T))&&e[i]==="9"||o_(t.charCodeAt(T))&&e[i]==="X")&&(a>0&&(l=a,a=0),o+=t[T],i++)}const p=r_(t.charCodeAt(u-1))?"number":o_(t.charCodeAt(u-1))?"letter":"something else",m=p!=="number"&&e[u-1]==="9",g=p!=="letter"&&e[u-1]==="X";(m||g||p==="something else")&&(f=!0);let y="",x=0;Math.abs(n.length-t.length)<=1&&(s=0);let C=u+s;for(let T=0;T<o.length;T++){for(;x<e.length&&e[x]!=="X"&&e[x]!=="9";)y+=e[x],x++;y+=o[T],x++}t.length<n.length?window.requestAnimationFrame(()=>{r.selectionStart=C,r.selectionEnd=C}):e[C-1]!=="X"&&e[C-1]!=="9"?window.requestAnimationFrame(()=>{r.selectionStart=C+l,r.selectionEnd=C+l}):(f&&(C-=1),window.requestAnimationFrame(()=>{r.selectionStart=C,r.selectionEnd=C}));const _=e.slice(x);return _.indexOf("X")===-1&&_.indexOf("9")===-1&&(y+=_),y}return window.requestAnimationFrame(()=>{r.selectionStart=u-1,r.selectionEnd=u-1}),n};function fr(t,e){const r=Object.keys(t).filter(i=>e.includes(i)),o={...t};for(const i of a9)delete o[i];for(const i of r)delete o[i];return o}const Yn=t=>t.split(/(?=[A-Z])|[.\-_\s]+/).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).filter(Boolean).join(" ");function c9(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 Fu(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:Eo.Link,to:t.path}:t.externalLink?{href:t.externalLink}:{}}function Li(t,e){return process.env.NODE_ENV==="production"?()=>null:function(...r){return t(...r)||e(...r)}}var ds=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var tf={exports:{}},$t={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-is.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var i_;function u9(){if(i_)return $t;i_=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"),m=Symbol.for("react.view_transition"),g=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 m: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 $t.ContextConsumer=i,$t.ContextProvider=s,$t.Element=t,$t.ForwardRef=a,$t.Fragment=n,$t.Lazy=p,$t.Memo=f,$t.Portal=e,$t.Profiler=o,$t.StrictMode=r,$t.Suspense=l,$t.SuspenseList=u,$t.isContextConsumer=function(y){return b(y)===i},$t.isContextProvider=function(y){return b(y)===s},$t.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},$t.isForwardRef=function(y){return b(y)===a},$t.isFragment=function(y){return b(y)===n},$t.isLazy=function(y){return b(y)===p},$t.isMemo=function(y){return b(y)===f},$t.isPortal=function(y){return b(y)===e},$t.isProfiler=function(y){return b(y)===o},$t.isStrictMode=function(y){return b(y)===r},$t.isSuspense=function(y){return b(y)===l},$t.isSuspenseList=function(y){return b(y)===u},$t.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===g||y.getModuleId!==void 0)},$t.typeOf=b,$t}var Ft={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-is.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var s_;function d9(){return s_||(s_=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 g:return y;default:switch(y=y&&y.$$typeof,y){case a:case l:case m: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"),m=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");Ft.ContextConsumer=s,Ft.ContextProvider=a,Ft.Element=e,Ft.ForwardRef=l,Ft.Fragment=r,Ft.Lazy=m,Ft.Memo=p,Ft.Portal=n,Ft.Profiler=i,Ft.StrictMode=o,Ft.Suspense=u,Ft.SuspenseList=f,Ft.isContextConsumer=function(y){return t(y)===s},Ft.isContextProvider=function(y){return t(y)===a},Ft.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},Ft.isForwardRef=function(y){return t(y)===l},Ft.isFragment=function(y){return t(y)===r},Ft.isLazy=function(y){return t(y)===m},Ft.isMemo=function(y){return t(y)===p},Ft.isPortal=function(y){return t(y)===n},Ft.isProfiler=function(y){return t(y)===i},Ft.isStrictMode=function(y){return t(y)===o},Ft.isSuspense=function(y){return t(y)===u},Ft.isSuspenseList=function(y){return t(y)===f},Ft.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===m||y.$$typeof===p||y.$$typeof===a||y.$$typeof===s||y.$$typeof===l||y.$$typeof===b||y.getModuleId!==void 0)},Ft.typeOf=t}()),Ft}var a_;function f9(){return a_||(a_=1,process.env.NODE_ENV==="production"?tf.exports=u9():tf.exports=d9()),tf.exports}var Ai=f9();function Uo(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 sI(t){if(D.isValidElement(t)||Ai.isValidElementType(t)||!Uo(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=sI(t[n])}),e}function Fn(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return Uo(t)&&Uo(e)&&Object.keys(e).forEach(o=>{D.isValidElement(e[o])||Ai.isValidElementType(e[o])?r[o]=e[o]:Uo(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&Uo(t[o])?r[o]=Fn(t[o],e[o],n):n.clone?r[o]=Uo(e[o])?sI(e[o]):e[o]:r[o]=e[o]}),r}var nf={exports:{}},rf={exports:{}},It={};/** @license React v16.13.1
|
|
18
|
+
* react-is.production.min.js
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the MIT license found in the
|
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/var l_;function p9(){if(l_)return It;l_=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,m=t?Symbol.for("react.suspense_list"):60120,g=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,C=t?Symbol.for("react.responder"):60118,_=t?Symbol.for("react.scope"):60119;function T(k){if(typeof k=="object"&&k!==null){var M=k.$$typeof;switch(M){case e:switch(k=k.type,k){case l:case u:case r:case i:case o:case p:return k;default:switch(k=k&&k.$$typeof,k){case a:case f:case b:case g:case s:return k;default:return M}}case n:return M}}}function w(k){return T(k)===u}return It.AsyncMode=l,It.ConcurrentMode=u,It.ContextConsumer=a,It.ContextProvider=s,It.Element=e,It.ForwardRef=f,It.Fragment=r,It.Lazy=b,It.Memo=g,It.Portal=n,It.Profiler=i,It.StrictMode=o,It.Suspense=p,It.isAsyncMode=function(k){return w(k)||T(k)===l},It.isConcurrentMode=w,It.isContextConsumer=function(k){return T(k)===a},It.isContextProvider=function(k){return T(k)===s},It.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===e},It.isForwardRef=function(k){return T(k)===f},It.isFragment=function(k){return T(k)===r},It.isLazy=function(k){return T(k)===b},It.isMemo=function(k){return T(k)===g},It.isPortal=function(k){return T(k)===n},It.isProfiler=function(k){return T(k)===i},It.isStrictMode=function(k){return T(k)===o},It.isSuspense=function(k){return T(k)===p},It.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===r||k===u||k===i||k===o||k===p||k===m||typeof k=="object"&&k!==null&&(k.$$typeof===b||k.$$typeof===g||k.$$typeof===s||k.$$typeof===a||k.$$typeof===f||k.$$typeof===x||k.$$typeof===C||k.$$typeof===_||k.$$typeof===y)},It.typeOf=T,It}var Dt={};/** @license React v16.13.1
|
|
25
|
+
* react-is.development.js
|
|
26
|
+
*
|
|
27
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the MIT license found in the
|
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/var c_;function h9(){return c_||(c_=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,m=t?Symbol.for("react.suspense_list"):60120,g=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,C=t?Symbol.for("react.responder"):60118,_=t?Symbol.for("react.scope"):60119;function T(ne){return typeof ne=="string"||typeof ne=="function"||ne===r||ne===u||ne===i||ne===o||ne===p||ne===m||typeof ne=="object"&&ne!==null&&(ne.$$typeof===b||ne.$$typeof===g||ne.$$typeof===s||ne.$$typeof===a||ne.$$typeof===f||ne.$$typeof===x||ne.$$typeof===C||ne.$$typeof===_||ne.$$typeof===y)}function w(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 g:case s:return xe;default:return ce}}case n:return ce}}}var k=l,M=u,A=a,R=s,N=e,O=f,I=r,L=b,B=g,V=n,j=i,F=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)||w(ne)===l}function G(ne){return w(ne)===u}function Z(ne){return w(ne)===a}function me(ne){return w(ne)===s}function he(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===e}function ge(ne){return w(ne)===f}function oe(ne){return w(ne)===r}function ye(ne){return w(ne)===b}function de(ne){return w(ne)===g}function X(ne){return w(ne)===n}function Q(ne){return w(ne)===i}function ae(ne){return w(ne)===o}function ve(ne){return w(ne)===p}Dt.AsyncMode=k,Dt.ConcurrentMode=M,Dt.ContextConsumer=A,Dt.ContextProvider=R,Dt.Element=N,Dt.ForwardRef=O,Dt.Fragment=I,Dt.Lazy=L,Dt.Memo=B,Dt.Portal=V,Dt.Profiler=j,Dt.StrictMode=F,Dt.Suspense=U,Dt.isAsyncMode=Y,Dt.isConcurrentMode=G,Dt.isContextConsumer=Z,Dt.isContextProvider=me,Dt.isElement=he,Dt.isForwardRef=ge,Dt.isFragment=oe,Dt.isLazy=ye,Dt.isMemo=de,Dt.isPortal=X,Dt.isProfiler=Q,Dt.isStrictMode=ae,Dt.isSuspense=ve,Dt.isValidElementType=T,Dt.typeOf=w}()),Dt}var u_;function aI(){return u_||(u_=1,process.env.NODE_ENV==="production"?rf.exports=p9():rf.exports=h9()),rf.exports}/*
|
|
32
|
+
object-assign
|
|
33
|
+
(c) Sindre Sorhus
|
|
34
|
+
@license MIT
|
|
35
|
+
*/var Zg,d_;function m9(){if(d_)return Zg;d_=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 Zg=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 m=0;m<u.length;m++)n.call(a,u[m])&&(l[u[m]]=a[u[m]])}}return l},Zg}var Qg,f_;function g1(){if(f_)return Qg;f_=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qg=t,Qg}var ey,p_;function lI(){return p_||(p_=1,ey=Function.call.bind(Object.prototype.hasOwnProperty)),ey}var ty,h_;function g9(){if(h_)return ty;h_=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=g1(),n={},r=lI();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 m=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 m.name="Invariant Violation",m}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 g=u?u():"";t("Failed "+a+" type: "+p.message+(g??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ty=o,ty}var ny,m_;function y9(){if(m_)return ny;m_=1;var t=aI(),e=m9(),n=g1(),r=lI(),o=g9(),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 ny=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 m="<<anonymous>>",g={array:C("array"),bigint:C("bigint"),bool:C("boolean"),func:C("function"),number:C("number"),object:C("object"),string:C("string"),symbol:C("symbol"),any:_(),arrayOf:T,element:w(),elementType:k(),instanceOf:M,node:O(),objectOf:R,oneOf:A,oneOfType:N,shape:L,exact:B};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={},me=0;function he(oe,ye,de,X,Q,ae,ve){if(X=X||m,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]&&me<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,me++)}}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 ge=he.bind(null,!1);return ge.isRequired=he.bind(null,!0),ge}function C(G){function Z(me,he,ge,oe,ye,de){var X=me[he],Q=F(X);if(Q!==G){var ae=U(X);return new y("Invalid "+oe+" `"+ye+"` of type "+("`"+ae+"` supplied to `"+ge+"`, expected ")+("`"+G+"`."),{expectedType:G})}return null}return x(Z)}function _(){return x(s)}function T(G){function Z(me,he,ge,oe,ye){if(typeof G!="function")return new y("Property `"+ye+"` of component `"+ge+"` has invalid PropType notation inside arrayOf.");var de=me[he];if(!Array.isArray(de)){var X=F(de);return new y("Invalid "+oe+" `"+ye+"` of type "+("`"+X+"` supplied to `"+ge+"`, expected an array."))}for(var Q=0;Q<de.length;Q++){var ae=G(de,Q,ge,oe,ye+"["+Q+"]",n);if(ae instanceof Error)return ae}return null}return x(Z)}function w(){function G(Z,me,he,ge,oe){var ye=Z[me];if(!a(ye)){var de=F(ye);return new y("Invalid "+ge+" `"+oe+"` of type "+("`"+de+"` supplied to `"+he+"`, expected a single ReactElement."))}return null}return x(G)}function k(){function G(Z,me,he,ge,oe){var ye=Z[me];if(!t.isValidElementType(ye)){var de=F(ye);return new y("Invalid "+ge+" `"+oe+"` of type "+("`"+de+"` supplied to `"+he+"`, expected a single ReactElement type."))}return null}return x(G)}function M(G){function Z(me,he,ge,oe,ye){if(!(me[he]instanceof G)){var de=G.name||m,X=Y(me[he]);return new y("Invalid "+oe+" `"+ye+"` of type "+("`"+X+"` supplied to `"+ge+"`, 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(me,he,ge,oe,ye){for(var de=me[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 `"+ge+"`, expected one of "+Q+"."))}return x(Z)}function R(G){function Z(me,he,ge,oe,ye){if(typeof G!="function")return new y("Property `"+ye+"` of component `"+ge+"` has invalid PropType notation inside objectOf.");var de=me[he],X=F(de);if(X!=="object")return new y("Invalid "+oe+" `"+ye+"` of type "+("`"+X+"` supplied to `"+ge+"`, expected an object."));for(var Q in de)if(r(de,Q)){var ae=G(de,Q,ge,oe,ye+"."+Q,n);if(ae instanceof Error)return ae}return null}return x(Z)}function N(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 me=G[Z];if(typeof me!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+K(me)+" at index "+Z+"."),s}function he(ge,oe,ye,de,X){for(var Q=[],ae=0;ae<G.length;ae++){var ve=G[ae],ne=ve(ge,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,me,he,ge,oe){return V(Z[me])?null:new y("Invalid "+ge+" `"+oe+"` supplied to "+("`"+he+"`, expected a ReactNode."))}return x(G)}function I(G,Z,me,he,ge){return new y((G||"React class")+": "+Z+" type `"+me+"."+he+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ge+"`.")}function L(G){function Z(me,he,ge,oe,ye){var de=me[he],X=F(de);if(X!=="object")return new y("Invalid "+oe+" `"+ye+"` of type `"+X+"` "+("supplied to `"+ge+"`, expected `object`."));for(var Q in G){var ae=G[Q];if(typeof ae!="function")return I(ge,oe,ye,Q,U(ae));var ve=ae(de,Q,ge,oe,ye+"."+Q,n);if(ve)return ve}return null}return x(Z)}function B(G){function Z(me,he,ge,oe,ye){var de=me[he],X=F(de);if(X!=="object")return new y("Invalid "+oe+" `"+ye+"` of type `"+X+"` "+("supplied to `"+ge+"`, expected `object`."));var Q=e({},me[he],G);for(var ae in Q){var ve=G[ae];if(r(G,ae)&&typeof ve!="function")return I(ge,oe,ye,ae,U(ve));if(!ve)return new y("Invalid "+oe+" `"+ye+"` key `"+ae+"` supplied to `"+ge+"`.\nBad object: "+JSON.stringify(me[he],null," ")+`
|
|
36
|
+
Valid keys: `+JSON.stringify(Object.keys(G),null," "));var ne=ve(de,ae,ge,oe,ye+"."+ae,n);if(ne)return ne}return null}return x(Z)}function V(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(V);if(G===null||a(G))return!0;var Z=p(G);if(Z){var me=Z.call(G),he;if(Z!==G.entries){for(;!(he=me.next()).done;)if(!V(he.value))return!1}else for(;!(he=me.next()).done;){var ge=he.value;if(ge&&!V(ge[1]))return!1}}else return!1;return!0;default:return!1}}function j(G,Z){return G==="symbol"?!0:Z?Z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Z instanceof Symbol:!1}function F(G){var Z=typeof G;return Array.isArray(G)?"array":G instanceof RegExp?"object":j(Z,G)?"symbol":Z}function U(G){if(typeof G>"u"||G===null)return""+G;var Z=F(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?m:G.constructor.name}return g.checkPropTypes=o,g.resetWarningCache=o.resetWarningCache,g.PropTypes=g,g},ny}var ry,g_;function b9(){if(g_)return ry;g_=1;var t=g1();function e(){}function n(){}return n.resetWarningCache=e,ry=function(){function r(s,a,l,u,f,p){if(p!==t){var m=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 m.name="Invariant Violation",m}}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},ry}var y_;function v9(){if(y_)return nf.exports;if(y_=1,process.env.NODE_ENV!=="production"){var t=aI(),e=!0;nf.exports=y9()(t.isElement,e)}else nf.exports=b9()();return nf.exports}var x9=v9();const c=yr(x9);function S9(t){const{prototype:e={}}=t;return!!e.isReactComponent}function cI(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"&&!S9(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 Bu=Li(c.element,cI);Bu.isRequired=Li(c.element.isRequired,cI);function C9(t){const{prototype:e={}}=t;return!!e.isReactComponent}function w9(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"&&!C9(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 gh=Li(c.elementType,w9),T9="exact-prop: ";function uI(t){return process.env.NODE_ENV==="production"?t:{...t,[T9]: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 Jo(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 dI(t,e=""){return t.displayName||t.name||e}function b_(t,e,n){const r=dI(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function _9(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return dI(t,"Component");if(typeof t=="object")switch(t.$$typeof){case Ai.ForwardRef:return b_(t,t.render,"ForwardRef");case Ai.Memo:return b_(t,t.type,"memo");default:return}}}function Ri(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 On=c.oneOfType([c.func,c.object]);function Le(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Jo(7));return t.charAt(0).toUpperCase()+t.slice(1)}function v_(...t){return t.reduce((e,n)=>n==null?e:function(...o){e.apply(this,o),n.apply(this,o)},()=>{})}function fI(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 Cl(t,e){var n,r,o;return D.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 tr(t){return t&&t.ownerDocument||document}function Ii(t){return tr(t).defaultView||window}function E9(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,m=n==null?void 0:n[p];if(m){const g=m(i,s,a,l,u,...f);if(g)return g}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 x_(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const zn=typeof window<"u"?D.useLayoutEffect:D.useEffect;let S_=0;function k9(t){const[e,n]=D.useState(t),r=t||e;return D.useEffect(()=>{e==null&&(S_+=1,n(`mui-${S_}`))},[e]),r}const O9={...D},C_=O9.useId;function ni(t){if(C_!==void 0){const e=C_();return t??e}return k9(t)}function M9(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 Di({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=D.useRef(t!==void 0),[i,s]=D.useState(e),a=o?t:i;if(process.env.NODE_ENV!=="production"){D.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(`
|
|
37
|
+
`))},[r,n,t]);const{current:u}=D.useRef(e);D.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(`
|
|
38
|
+
`))},[JSON.stringify(e)])}const l=D.useCallback(u=>{o||s(u)},[]);return[a,l]}function qe(t){const e=D.useRef(t);return zn(()=>{e.current=t}),D.useRef((...n)=>(0,e.current)(...n)).current}function Pt(...t){const e=D.useRef(void 0),n=D.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 D.useMemo(()=>t.every(r=>r==null)?null:r=>{e.current&&(e.current(),e.current=void 0),r!=null&&(e.current=n(r))},t)}const w_={};function pI(t,e){const n=D.useRef(w_);return n.current===w_&&(n.current=t(e)),n}const A9=[];function R9(t){D.useEffect(t,A9)}class y1{constructor(){gc(this,"currentId",null);gc(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});gc(this,"disposeEffect",()=>this.clear)}static create(){return new y1}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function hI(){const t=pI(y1.create).current;return R9(t.disposeEffect),t}function T_(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(`
|
|
39
|
+
`))}return!1}function mI(t=window){const e=t.document.documentElement.clientWidth;return t.innerWidth-e}const I9={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function D9(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 gI(t,e,n,r){const o=t[e];if(o==null||!Number.isInteger(o)){const i=D9(o);return new RangeError(`Invalid ${r} \`${e}\` of type \`${i}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function yI(t,e,...n){return t[e]===void 0?null:gI(t,e,...n)}function nx(){return null}yI.isRequired=gI;nx.isRequired=nx;const bI=process.env.NODE_ENV==="production"?nx:yI;function fu(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]=fu(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 __=t=>t,P9=()=>{let t=__;return{configure(e){t=e},generate(e){return t(e)},reset(){t=__}}},N9=P9(),L9={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=L9[e];return r?`${n}-${r}`:`${N9.generate(t)}-${e}`}function et(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=Qe(t,o,n)}),r}function j9(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function $9(t){return typeof t=="string"}function vI(t,e,n){return t===void 0||$9(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function xI(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=xI(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=xI(t))&&(r&&(r+=" "),r+=e);return r}function SI(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 E_(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 CI(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const g=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 g.length>0&&(y.className=g),Object.keys(b).length>0&&(y.style=b),{props:y,internalRef:void 0}}const s=SI({...o,...r}),a=E_(r),l=E_(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},m={...u,...n,...l,...a};return f.length>0&&(m.className=f),Object.keys(p).length>0&&(m.style=p),{props:m,internalRef:u.ref}}function yh(t,e,n){return typeof t=="function"?t(e,n):t}function At(t){var p;const{elementType:e,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=t,s=o?{}:yh(n,r),{props:a,internalRef:l}=CI({...i,externalSlotProps:s}),u=Pt(l,s==null?void 0:s.ref,(p=t.additionalProps)==null?void 0:p.ref);return vI(e,{...a,ref:u},r)}function Vu(t){var e;return parseInt(D.version,10)>=19?((e=t==null?void 0:t.props)==null?void 0:e.ref)||null:(t==null?void 0:t.ref)||null}function qc(t,e){return e?Fn(t,e,{clone:!1}):t}const Os=process.env.NODE_ENV!=="production"?c.oneOfType([c.number,c.string,c.object,c.array]):{};function k_(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 F9(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function B9(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>\`.
|
|
40
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Jo(18,`(${e})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return t.containerQueries(o).up(i)}function V9(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 bh={xs:0,sm:600,md:900,lg:1200,xl:1536},O_={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${bh[t]}px)`},z9={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:bh[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function ko(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||O_;return e.reduce((s,a,l)=>(s[i.up(i.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const i=r.breakpoints||O_;return Object.keys(e).reduce((s,a)=>{if(F9(i.keys,a)){const l=B9(r.containerQueries?r:z9,a);l&&(s[l]=n(e[a],a))}else if(Object.keys(i.values||bh).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 wI(t={}){var n;return((n=t.keys)==null?void 0:n.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function rx(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function H9(t,...e){const n=wI(t),r=[n,...e].reduce((o,i)=>Fn(o,i),{});return rx(Object.keys(n),r)}function W9(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 oy({values:t,breakpoints:e,base:n}){const r=n||W9(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 vh(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 sp(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=vh(t,n)||r,e&&(o=e(o,r,t)),o}function Tn(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=vh(l,r)||{};return ko(s,a,p=>{let m=sp(u,o,p);return p===m&&typeof p=="string"&&(m=sp(u,o,`${e}${p==="default"?"":Le(p)}`,p)),n===!1?m:{[n]:m}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:Os}:{},i.filterProps=[e],i}function q9(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const U9={m:"margin",p:"padding"},K9={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},M_={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},G9=q9(t=>{if(t.length>2)if(M_[t])t=M_[t];else return[t];const[e,n]=t.split(""),r=U9[e],o=K9[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),xh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Sh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Y9=[...xh,...Sh];function zu(t,e,n,r){const o=vh(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(`
|
|
41
|
+
`)):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(`
|
|
42
|
+
`)));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(`
|
|
43
|
+
`)),()=>{})}function Ch(t){return zu(t,"spacing",8,"spacing")}function ga(t,e){return typeof e=="string"||e==null?e:t(e)}function J9(t,e){return n=>t.reduce((r,o)=>(r[o]=ga(e,n),r),{})}function X9(t,e,n,r){if(!e.includes(n))return null;const o=G9(n),i=J9(o,r),s=t[n];return ko(t,s,i)}function TI(t,e){const n=Ch(t.theme);return Object.keys(t).map(r=>X9(t,e,r,n)).reduce(qc,{})}function fn(t){return TI(t,xh)}fn.propTypes=process.env.NODE_ENV!=="production"?xh.reduce((t,e)=>(t[e]=Os,t),{}):{};fn.filterProps=xh;function pn(t){return TI(t,Sh)}pn.propTypes=process.env.NODE_ENV!=="production"?Sh.reduce((t,e)=>(t[e]=Os,t),{}):{};pn.filterProps=Sh;process.env.NODE_ENV!=="production"&&Y9.reduce((t,e)=>(t[e]=Os,t),{});function wh(...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]?qc(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 io(t){return typeof t!="number"?t:`${t}px solid`}function mo(t,e){return Tn({prop:t,themeKey:"borders",transform:e})}const Z9=mo("border",io),Q9=mo("borderTop",io),eU=mo("borderRight",io),tU=mo("borderBottom",io),nU=mo("borderLeft",io),rU=mo("borderColor"),oU=mo("borderTopColor"),iU=mo("borderRightColor"),sU=mo("borderBottomColor"),aU=mo("borderLeftColor"),lU=mo("outline",io),cU=mo("outlineColor"),Th=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=zu(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:ga(e,r)});return ko(t,t.borderRadius,n)}return null};Th.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Os}:{};Th.filterProps=["borderRadius"];wh(Z9,Q9,eU,tU,nU,rU,oU,iU,sU,aU,Th,lU,cU);const _h=t=>{if(t.gap!==void 0&&t.gap!==null){const e=zu(t.theme,"spacing",8,"gap"),n=r=>({gap:ga(e,r)});return ko(t,t.gap,n)}return null};_h.propTypes=process.env.NODE_ENV!=="production"?{gap:Os}:{};_h.filterProps=["gap"];const Eh=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=zu(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:ga(e,r)});return ko(t,t.columnGap,n)}return null};Eh.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Os}:{};Eh.filterProps=["columnGap"];const kh=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=zu(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:ga(e,r)});return ko(t,t.rowGap,n)}return null};kh.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Os}:{};kh.filterProps=["rowGap"];const uU=Tn({prop:"gridColumn"}),dU=Tn({prop:"gridRow"}),fU=Tn({prop:"gridAutoFlow"}),pU=Tn({prop:"gridAutoColumns"}),hU=Tn({prop:"gridAutoRows"}),mU=Tn({prop:"gridTemplateColumns"}),gU=Tn({prop:"gridTemplateRows"}),yU=Tn({prop:"gridTemplateAreas"}),bU=Tn({prop:"gridArea"});wh(_h,Eh,kh,uU,dU,fU,pU,hU,mU,gU,yU,bU);function wl(t,e){return e==="grey"?e:t}const vU=Tn({prop:"color",themeKey:"palette",transform:wl}),xU=Tn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:wl}),SU=Tn({prop:"backgroundColor",themeKey:"palette",transform:wl});wh(vU,xU,SU);function Fr(t){return t<=1&&t!==0?`${t*100}%`:t}const CU=Tn({prop:"width",transform:Fr}),b1=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])||bh[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:Fr(n)}};return ko(t,t.maxWidth,e)}return null};b1.filterProps=["maxWidth"];const wU=Tn({prop:"minWidth",transform:Fr}),TU=Tn({prop:"height",transform:Fr}),_U=Tn({prop:"maxHeight",transform:Fr}),EU=Tn({prop:"minHeight",transform:Fr});Tn({prop:"size",cssProperty:"width",transform:Fr});Tn({prop:"size",cssProperty:"height",transform:Fr});const kU=Tn({prop:"boxSizing"});wh(CU,b1,wU,TU,_U,EU,kU);const Hu={border:{themeKey:"borders",transform:io},borderTop:{themeKey:"borders",transform:io},borderRight:{themeKey:"borders",transform:io},borderBottom:{themeKey:"borders",transform:io},borderLeft:{themeKey:"borders",transform:io},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:io},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Th},color:{themeKey:"palette",transform:wl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:wl},backgroundColor:{themeKey:"palette",transform:wl},p:{style:pn},pt:{style:pn},pr:{style:pn},pb:{style:pn},pl:{style:pn},px:{style:pn},py:{style:pn},padding:{style:pn},paddingTop:{style:pn},paddingRight:{style:pn},paddingBottom:{style:pn},paddingLeft:{style:pn},paddingX:{style:pn},paddingY:{style:pn},paddingInline:{style:pn},paddingInlineStart:{style:pn},paddingInlineEnd:{style:pn},paddingBlock:{style:pn},paddingBlockStart:{style:pn},paddingBlockEnd:{style:pn},m:{style:fn},mt:{style:fn},mr:{style:fn},mb:{style:fn},ml:{style:fn},mx:{style:fn},my:{style:fn},margin:{style:fn},marginTop:{style:fn},marginRight:{style:fn},marginBottom:{style:fn},marginLeft:{style:fn},marginX:{style:fn},marginY:{style:fn},marginInline:{style:fn},marginInlineStart:{style:fn},marginInlineEnd:{style:fn},marginBlock:{style:fn},marginBlockStart:{style:fn},marginBlockEnd:{style:fn},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:_h},rowGap:{style:kh},columnGap:{style:Eh},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Fr},maxWidth:{style:b1},minWidth:{transform:Fr},height:{transform:Fr},maxHeight:{transform:Fr},minHeight:{transform:Fr},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 OU(...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 MU(t,e){return typeof t=="function"?t(e):t}function AU(){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 m=vh(o,u)||{};return p?p(s):ko(s,r,b=>{let y=sp(m,f,b);return b===y&&typeof b=="string"&&(y=sp(m,f,`${n}${b==="default"?"":Le(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??Hu;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=wI(o.breakpoints),p=Object.keys(f);let m=f;return Object.keys(u).forEach(g=>{const b=MU(u[g],o);if(b!=null)if(typeof b=="object")if(s[g])m=qc(m,t(g,b,o,s));else{const y=ko({theme:o},b,x=>({[g]:x}));OU(y,b)?m[g]=e({sx:b,theme:o,nested:!0}):m=qc(m,y)}else m=qc(m,t(g,b,o,s))}),!i&&o.modularCssLayers?{"@layer sx":k_(o,rx(p,m))}:k_(o,rx(p,m))}return Array.isArray(r)?r.map(a):a(r)}return e}const Dl=AU();Dl.filterProps=["sx"];const RU=t=>{var r;const e={systemProps:{},otherProps:{}},n=((r=t==null?void 0:t.theme)==null?void 0:r.unstable_sxConfig)??Hu;return Object.keys(t).forEach(o=>{n[o]?e.systemProps[o]=t[o]:e.otherProps[o]=t[o]}),e};function v1(t){const{sx:e,...n}=t,{systemProps:r,otherProps:o}=RU(n);let i;return Array.isArray(e)?i=[r,...e]:typeof e=="function"?i=(...s)=>{const a=e(...s);return Uo(a)?{...r,...a}:r}:i={...r,...e},{...o,sx:i}}function IU(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 DU={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 PU(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var NU=/[A-Z]|^ms/g,LU=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_I=function(e){return e.charCodeAt(1)===45},A_=function(e){return e!=null&&typeof e!="boolean"},iy=PU(function(t){return _I(t)?t:t.replace(NU,"-$&").toLowerCase()}),R_=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(LU,function(r,o,i){return fs={name:o,styles:i,next:fs},o})}return DU[e]!==1&&!_I(e)&&typeof n=="number"&&n!==0?n+"px":n};function ap(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 fs={name:o.name,styles:o.styles,next:fs},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)fs={name:s.name,styles:s.styles,next:fs},s=s.next;var a=i.styles+";";return a}return jU(t,e,n)}}var l=n;if(e==null)return l;var u=e[l];return u!==void 0?u:l}function jU(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ap(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]+"}":A_(a)&&(r+=iy(i)+":"+R_(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++)A_(s[l])&&(r+=iy(i)+":"+R_(i,s[l])+";");else{var u=ap(t,e,s);switch(i){case"animation":case"animationName":{r+=iy(i)+":"+u+";";break}default:r+=i+"{"+u+"}"}}}return r}var I_=/label:\s*([^\s;{]+)\s*(;|$)/g,fs;function EI(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="";fs=void 0;var i=t[0];if(i==null||i.raw===void 0)r=!1,o+=ap(n,e,i);else{var s=i;o+=s[0]}for(var a=1;a<t.length;a++)if(o+=ap(n,e,t[a]),r){var l=i;o+=l[a]}I_.lastIndex=0;for(var u="",f;(f=I_.exec(o))!==null;)u+="-"+f[1];var p=IU(o)+u;return{name:p,styles:o,next:fs}}function $U(t){return t==null||Object.keys(t).length===0}function kI(t){const{styles:e,defaultTheme:n={}}=t,r=typeof e=="function"?o=>e($U(o)?n:o):e;return v.jsx(Mo.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(kI.propTypes={defaultTheme:c.object,styles:c.oneOfType([c.array,c.string,c.object,c.func])});/**
|
|
44
|
+
* @mui/styled-engine v6.5.0
|
|
45
|
+
*
|
|
46
|
+
* @license MIT
|
|
47
|
+
* This source code is licensed under the MIT license found in the
|
|
48
|
+
* LICENSE file in the root directory of this source tree.
|
|
49
|
+
*/function FU(t,e){const n=NH(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(`
|
|
50
|
+
`)):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 BU(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const D_=[];function gs(t){return D_[0]=t,EI(D_)}const VU=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 zU(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=t,i=VU(e),s=Object.keys(i);function a(m){return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${n})`}function l(m){return`@media (max-width:${(typeof e[m]=="number"?e[m]:m)-r/100}${n})`}function u(m,g){const b=s.indexOf(g);return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${n}) and (max-width:${(b!==-1&&typeof e[s[b]]=="number"?e[s[b]]:g)-r/100}${n})`}function f(m){return s.indexOf(m)+1<s.length?u(m,s[s.indexOf(m)+1]):a(m)}function p(m){const g=s.indexOf(m);return g===0?a(s[1]):g===s.length-1?l(s[g]):u(m,s[s.indexOf(m)+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 HU={borderRadius:4};function OI(t=8,e=Ch({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 WU(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 Wu(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...s}=t,a=zU(n),l=OI(o);let u=Fn({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...HU,...i}},s);return u=V9(u),u.applyStyles=WU,u=e.reduce((f,p)=>Fn(f,p),u),u.unstable_sxConfig={...Hu,...s==null?void 0:s.unstable_sxConfig},u.unstable_sx=function(p){return Dl({sx:p,theme:this})},u}function qU(t){return Object.keys(t).length===0}function MI(t=null){const e=D.useContext(Mo.ThemeContext);return!e||qU(e)?t:e}const UU=Wu();function Oh(t=UU){return MI(t)}function sy(t){const e=gs(t);return t!==e&&e.styles?(e.styles.match(/^@layer\s+[^{]*$/)||(e.styles=`@layer global{${e.styles}}`),e):t}function AI({styles:t,themeId:e,defaultTheme:n={}}){const r=Oh(n),o=e&&r[e]||r;let i=typeof t=="function"?t(o):t;return o.modularCssLayers&&(Array.isArray(i)?i=i.map(s=>sy(typeof s=="function"?s(o):s)):i=sy(i)),v.jsx(kI,{styles:i})}process.env.NODE_ENV!=="production"&&(AI.propTypes={defaultTheme:c.object,styles:c.oneOfType([c.array,c.func,c.number,c.object,c.string,c.bool]),themeId:c.string});function RI(t){const{variants:e,...n}=t,r={variants:e,style:gs(n),isProcessed:!0};return r.style===n||e&&e.forEach(o=>{typeof o.style!="function"&&(o.style=gs(o.style))}),r}const KU=Wu();function ay(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function na(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function GU(t){return t?(e,n)=>n[t]:null}function YU(t,e,n){t.theme=ZU(t.theme)?n:t.theme[e]||t.theme}function Nf(t,e,n){const r=typeof e=="function"?e(t):e;if(Array.isArray(r))return r.flatMap(o=>Nf(t,o,n));if(Array.isArray(r==null?void 0:r.variants)){let o;if(r.isProcessed)o=n?na(r.style,n):r.style;else{const{variants:i,...s}=r;o=n?na(gs(s),n):s}return II(t,r.variants,[o],n)}return r!=null&&r.isProcessed?n?na(gs(r.style),n):r.style:n?na(gs(r),n):r}function II(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?na(gs(a.style(o)),r):a.style(o))):n.push(r?na(gs(a.style),r):a.style)}return n}function DI(t={}){const{themeId:e,defaultTheme:n=KU,rootShouldForwardProp:r=ay,slotShouldForwardProp:o=ay}=t;function i(a){YU(a,e,n)}return(a,l={})=>{BU(a,M=>M.filter(A=>A!==Dl));const{name:u,slot:f,skipVariantsResolver:p,skipSx:m,overridesResolver:g=GU(PI(f)),...b}=l,y=u&&u.startsWith("Mui")||f?"components":"custom",x=p!==void 0?p:f&&f!=="Root"&&f!=="root"||!1,C=m||!1;let _=ay;f==="Root"||f==="root"?_=r:f?_=o:QU(a)&&(_=void 0);const T=FU(a,{shouldForwardProp:_,label:XU(u,f),...b}),w=M=>{if(M.__emotion_real===M)return M;if(typeof M=="function")return function(R){return Nf(R,M,R.theme.modularCssLayers?y:void 0)};if(Uo(M)){const A=RI(M);return function(N){return A.variants?Nf(N,A,N.theme.modularCssLayers?y:void 0):N.theme.modularCssLayers?na(A.style,y):A.style}}return M},k=(...M)=>{const A=[],R=M.map(w),N=[];if(A.push(i),u&&g&&N.push(function(B){var U,K;const j=(K=(U=B.theme.components)==null?void 0:U[u])==null?void 0:K.styleOverrides;if(!j)return null;const F={};for(const Y in j)F[Y]=Nf(B,j[Y],B.theme.modularCssLayers?"theme":void 0);return g(B,F)}),u&&!x&&N.push(function(B){var F,U;const V=B.theme,j=(U=(F=V==null?void 0:V.components)==null?void 0:F[u])==null?void 0:U.variants;return j?II(B,j,[],B.theme.modularCssLayers?"theme":void 0):null}),C||N.push(Dl),Array.isArray(R[0])){const L=R.shift(),B=new Array(A.length).fill(""),V=new Array(N.length).fill("");let j;j=[...B,...L,...V],j.raw=[...B,...L.raw,...V],A.unshift(j)}const O=[...A,...R,...N],I=T(...O);return a.muiName&&(I.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(I.displayName=JU(u,f,a)),I};return T.withConfig&&(k.withConfig=T.withConfig),k}}function JU(t,e,n){return t?`${t}${Le(e||"")}`:`Styled(${_9(n)})`}function XU(t,e){let n;return process.env.NODE_ENV!=="production"&&t&&(n=`${t}-${PI(e||"Root")}`),n}function ZU(t){for(const e in t)return!1;return!0}function QU(t){return typeof t=="string"&&t.charCodeAt(0)>96}function PI(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}const NI=DI();function LI(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:fu(e.components[n].defaultProps,r)}function x1({props:t,name:e,defaultTheme:n,themeId:r}){let o=Oh(n);return r&&(o=o[r]||o),LI({theme:o,name:e,props:t})}function e8(t,e,n,r,o){const[i,s]=D.useState(()=>o&&n?n(t).matches:r?r(t).matches:e);return zn(()=>{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 t8={...D},jI=t8.useSyncExternalStore;function n8(t,e,n,r,o){const i=D.useCallback(()=>e,[e]),s=D.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]=D.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 jI(l,a,s)}function $I(t={}){const{themeId:e}=t;return function(r,o={}){let i=MI();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}=LI({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(`
|
|
51
|
+
`));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(`
|
|
52
|
+
`));const g=(jI!==void 0?n8:e8)(p,a,l,u,f);return process.env.NODE_ENV!=="production"&&D.useDebugValue({query:p,match:g}),g}}$I();function S1(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}].`),j9(t,e,n)}function r8(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 Cs(t){if(t.type)return t;if(t.charAt(0)==="#")return Cs(r8(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.
|
|
53
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Jo(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.
|
|
54
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Jo(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const o8=t=>{const e=Cs(t);return e.values.slice(0,3).map((n,r)=>e.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Ic=(t,e)=>{try{return o8(t)}catch{return e&&process.env.NODE_ENV!=="production"&&console.warn(e),t}};function Mh(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 FI(t){t=Cs(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])),Mh({type:a,values:l})}function ox(t){t=Cs(t);let e=t.type==="hsl"||t.type==="hsla"?Cs(FI(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 P_(t,e){const n=ox(t),r=ox(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Kt(t,e){return t=Cs(t),e=S1(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Mh(t)}function of(t,e,n){try{return Kt(t,e)}catch{return t}}function pu(t,e){if(t=Cs(t),e=S1(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 Mh(t)}function zt(t,e,n){try{return pu(t,e)}catch{return t}}function hu(t,e){if(t=Cs(t),e=S1(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 Mh(t)}function Ht(t,e,n){try{return hu(t,e)}catch{return t}}function i8(t,e=.15){return ox(t)>.5?pu(t,e):hu(t,e)}function sf(t,e,n){try{return i8(t,e)}catch{return t}}const s8=D.createContext();process.env.NODE_ENV!=="production"&&(c.node,c.bool);const BI=()=>D.useContext(s8)??!1,a8=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(c.node,c.object);function l8(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?fu(o.defaultProps,r):!o.styleOverrides&&!o.variants?fu(o,r):r}function c8({props:t,name:e}){const n=D.useContext(a8);return l8({props:t,name:e,theme:{components:n}})}const N_={theme:void 0};function u8(t){let e,n;return function(o){let i=e;return(i===void 0||o.theme!==n)&&(N_.theme=o.theme,i=RI(t(N_)),e=i,n=o.theme),i}}function d8(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 L_=(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])})},f8=(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)},p8=(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 ly(t,e){const{prefix:n,shouldSkipGeneratingVar:r}=e||{},o={},i={},s={};return f8(t,(a,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const f=`--${n?`${n}-`:""}${a.join("-")}`,p=p8(a,l);Object.assign(o,{[f]:p}),L_(i,a,`var(${f})`,u),L_(s,a,`var(${f}, ${p})`,u)}},a=>a[0]==="vars"),{css:o,vars:i,varsWithDefaults:s}}function h8(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}=ly(l,e);let m=p;const g={},{[a]:b,...y}=i;if(Object.entries(y||{}).forEach(([T,w])=>{const{vars:k,css:M,varsWithDefaults:A}=ly(w,e);m=Fn(m,A),g[T]={css:M,vars:k}}),b){const{css:T,vars:w,varsWithDefaults:k}=ly(b,e);m=Fn(m,k),g[a]={css:T,vars:w}}function x(T,w){var M,A;let k=o;if(o==="class"&&(k=".%s"),o==="data"&&(k="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(k=`[${o}="%s"]`),T){if(k==="media")return t.defaultColorScheme===T?":root":{[`@media (prefers-color-scheme: ${((A=(M=i[T])==null?void 0:M.palette)==null?void 0:A.mode)||T})`]:{":root":w}};if(k)return t.defaultColorScheme===T?`:root, ${k.replace("%s",String(T))}`:k.replace("%s",String(T))}return":root"}return{vars:m,generateThemeVars:()=>{let T={...u};return Object.entries(g).forEach(([,{vars:w}])=>{T=Fn(T,w)}),T},generateStyleSheets:()=>{var R,N;const T=[],w=t.defaultColorScheme||"light";function k(O,I){Object.keys(I).length&&T.push(typeof O=="string"?{[O]:{...I}}:O)}k(n(void 0,{...f}),f);const{[w]:M,...A}=g;if(M){const{css:O}=M,I=(N=(R=i[w])==null?void 0:R.palette)==null?void 0:N.mode,L=!r&&I?{colorScheme:I,...O}:{...O};k(n(w,{...L}),L)}return Object.entries(A).forEach(([O,{css:I}])=>{var V,j;const L=(j=(V=i[O])==null?void 0:V.palette)==null?void 0:j.mode,B=!r&&L?{colorScheme:L,...I}:{...I};k(n(O,{...B}),B)}),T}}}function m8(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 g8=(t,e)=>t.filter(n=>e.includes(n)),Kl=(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:g8(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 lp(t){return`--Grid-${t}Spacing`}function Ah(t){return`--Grid-parent-${t}Spacing`}const j_="--Grid-columns",Tl="--Grid-parent-columns",y8=({theme:t,ownerState:e})=>{const n={};return Kl(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(${Tl}) - (var(${Tl}) - ${o}) * (var(${Ah("column")}) / var(${Tl})))`}),r(n,i)}),n},b8=({theme:t,ownerState:e})=>{const n={};return Kl(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(${Tl}) + var(${Ah("column")}) * ${o} / var(${Tl}))`}),r(n,i)}),n},v8=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={[j_]:12};return Kl(t.breakpoints,e.columns,(r,o)=>{const i=o??12;r(n,{[j_]:i,"> *":{[Tl]:i}})}),n},x8=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return Kl(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,{[lp("row")]:i,"> *":{[Ah("row")]:i}})}),n},S8=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return Kl(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,{[lp("column")]:i,"> *":{[Ah("column")]:i}})}),n},C8=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return Kl(t.breakpoints,e.direction,(r,o)=>{r(n,{flexDirection:o})}),n},w8=({ownerState:t})=>({minWidth:0,boxSizing:"border-box",...t.container&&{display:"flex",flexWrap:"wrap",...t.wrap&&t.wrap!=="wrap"&&{flexWrap:t.wrap},gap:`var(${lp("row")}) var(${lp("column")})`}}),T8=t=>{const e=[];return Object.entries(t).forEach(([n,r])=>{r!==!1&&r!==void 0&&e.push(`grid-${n}-${String(r)}`)}),e},_8=(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[]},E8=t=>t===void 0?[]:typeof t=="object"?Object.entries(t).map(([e,n])=>`direction-${e}-${n}`):[`direction-xs-${String(t)}`],k8=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.`,$_=[];function O8(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=>{$_.includes(r)||($_.push(r),console.warn(`MUI Grid2: ${k8(r)}
|
|
55
|
+
`))})}const M8=Wu(),A8=NI("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>e.root});function R8(t){return x1({props:t,name:"MuiGrid",defaultTheme:M8})}function I8(t={}){const{createStyledComponent:e=A8,useThemeProps:n=R8,useTheme:r=Oh,componentName:o="MuiGrid"}=t,i=(u,f)=>{const{container:p,direction:m,spacing:g,wrap:b,size:y}=u,x={root:["root",p&&"container",b!=="wrap"&&`wrap-xs-${String(b)}`,...E8(m),...T8(y),...p?_8(g,f.breakpoints.keys[0]):[]]};return Ze(x,C=>Qe(o,C),{})};function s(u,f,p=()=>!0){const m={};return u===null||(Array.isArray(u)?u.forEach((g,b)=>{g!==null&&p(g)&&f.keys[b]&&(m[f.keys[b]]=g)}):typeof u=="object"?Object.keys(u).forEach(g=>{const b=u[g];b!=null&&p(b)&&(m[g]=b)}):m[f.keys[0]]=u),m}const a=e(v8,S8,x8,y8,C8,w8,b8),l=D.forwardRef(function(f,p){const m=r(),g=n(f),b=v1(g);O8(b,m.breakpoints);const{className:y,children:x,columns:C=12,container:_=!1,component:T="div",direction:w="row",wrap:k="wrap",size:M={},offset:A={},spacing:R=0,rowSpacing:N=R,columnSpacing:O=R,unstable_level:I=0,...L}=b,B=s(M,m.breakpoints,Z=>Z!==!1),V=s(A,m.breakpoints),j=f.columns??(I?void 0:C),F=f.spacing??(I?void 0:R),U=f.rowSpacing??f.spacing??(I?void 0:N),K=f.columnSpacing??f.spacing??(I?void 0:O),Y={...b,level:I,columns:j,container:_,direction:w,wrap:k,spacing:F,rowSpacing:U,columnSpacing:K,size:B,offset:V},G=i(Y,m);return v.jsx(a,{ref:p,as:T,ownerState:Y,className:ze(G.root,y),...L,children:D.Children.map(x,Z=>{var me;return D.isValidElement(Z)&&Cl(Z,["Grid"])&&_&&Z.props.container?D.cloneElement(Z,{unstable_level:((me=Z.props)==null?void 0:me.unstable_level)??I+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 D8=Wu(),P8=NI("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function N8(t){return x1({props:t,name:"MuiStack",defaultTheme:D8})}function L8(t,e){const n=D.Children.toArray(t).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(D.cloneElement(e,{key:`separator-${i}`})),r),[])}const j8=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],$8=({ownerState:t,theme:e})=>{let n={display:"flex",flexDirection:"column",...ko({theme:e},oy({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r}))};if(t.spacing){const r=Ch(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=oy({values:t.direction,base:o}),s=oy({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,u,f)=>{if(!i[l]){const m=u>0?i[f[u-1]]:"column";i[l]=m}}),n=Fn(n,ko({theme:e},s,(l,u)=>t.useFlexGap?{gap:ga(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${j8(u?i[u]:t.direction)}`]:ga(r,l)}}))}return n=H9(e.breakpoints,n),n};function F8(t={}){const{createStyledComponent:e=P8,useThemeProps:n=N8,componentName:r="MuiStack"}=t,o=()=>Ze({root:["root"]},l=>Qe(r,l),{}),i=e($8),s=D.forwardRef(function(l,u){const f=n(l),p=v1(f),{component:m="div",direction:g="column",spacing:b=0,divider:y,children:x,className:C,useFlexGap:_=!1,...T}=p,w={direction:g,spacing:b,useFlexGap:_},k=o();return v.jsx(i,{as:m,ownerState:w,ref:u,className:ze(k.root,C),...T,children:y?L8(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 mu={black:"#000",white:"#fff"},B8={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"},Xa={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},vc={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Za={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Qa={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},el={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function VI(){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:mu.white,default:mu.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 V8=VI();function zI(){return{text:{primary:mu.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:mu.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_=zI();function B_(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=hu(t.main,o):e==="dark"&&(t.dark=pu(t.main,i)))}function z8(t="light"){return t==="dark"?{main:Za[200],light:Za[50],dark:Za[400]}:{main:Za[700],light:Za[400],dark:Za[800]}}function H8(t="light"){return t==="dark"?{main:Ja[200],light:Ja[50],dark:Ja[400]}:{main:Ja[500],light:Ja[300],dark:Ja[700]}}function W8(t="light"){return t==="dark"?{main:Xa[500],light:Xa[300],dark:Xa[700]}:{main:Xa[700],light:Xa[400],dark:Xa[800]}}function q8(t="light"){return t==="dark"?{main:Qa[400],light:Qa[300],dark:Qa[700]}:{main:Qa[700],light:Qa[500],dark:Qa[900]}}function U8(t="light"){return t==="dark"?{main:el[400],light:el[300],dark:el[700]}:{main:el[800],light:el[500],dark:el[900]}}function K8(t="light"){return t==="dark"?{main:vc[400],light:vc[300],dark:vc[700]}:{main:"#ed6c02",light:vc[500],dark:vc[900]}}function C1(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=t,i=t.primary||z8(e),s=t.secondary||H8(e),a=t.error||W8(e),l=t.info||q8(e),u=t.success||U8(e),f=t.warning||K8(e);function p(y){const x=P_(y,F_.text.primary)>=n?F_.text.primary:V8.text.primary;if(process.env.NODE_ENV!=="production"){const C=P_(y,x);C<3&&console.error([`MUI: The contrast ratio of ${C}: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(`
|
|
56
|
+
`))}return x}const m=({color:y,name:x,mainShade:C=500,lightShade:_=300,darkShade:T=700})=>{if(y={...y},!y.main&&y[C]&&(y.main=y[C]),!y.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
|
|
57
|
+
The color object needs to have a \`main\` property or a \`${C}\` property.`:Jo(11,x?` (${x})`:"",C));if(typeof y.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
|
|
58
|
+
\`color.main\` should be a string, but \`${JSON.stringify(y.main)}\` was provided instead.
|
|
59
|
+
|
|
60
|
+
Did you intend to use one of the following approaches?
|
|
61
|
+
|
|
62
|
+
import { green } from "@mui/material/colors";
|
|
63
|
+
|
|
64
|
+
const theme1 = createTheme({ palette: {
|
|
65
|
+
primary: green,
|
|
66
|
+
} });
|
|
67
|
+
|
|
68
|
+
const theme2 = createTheme({ palette: {
|
|
69
|
+
primary: { main: green[500] },
|
|
70
|
+
} });`:Jo(12,x?` (${x})`:"",JSON.stringify(y.main)));return B_(y,"light",_,r),B_(y,"dark",T,r),y.contrastText||(y.contrastText=p(y.main)),y};let g;return e==="light"?g=VI():e==="dark"&&(g=zI()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${e}\` is not supported.`)),Fn({common:{...mu},mode:e,primary:m({color:i,name:"primary"}),secondary:m({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:a,name:"error"}),warning:m({color:f,name:"warning"}),info:m({color:l,name:"info"}),success:m({color:u,name:"success"}),grey:B8,contrastThreshold:n,getContrastText:p,augmentColor:m,tonalOffset:r,...g},o)}function G8(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 Y8(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function J8(t){return Math.round(t*1e5)/1e5}const V_={textTransform:"uppercase"},z_='"Roboto", "Helvetica", "Arial", sans-serif';function X8(t,e){const{fontFamily:n=z_,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 m=r/14,g=f||(x=>`${x/l*m}rem`),b=(x,C,_,T,w)=>({fontFamily:n,fontWeight:x,fontSize:g(C),lineHeight:_,...n===z_?{letterSpacing:`${J8(T/C)}em`}:{},...w,...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,V_),caption:b(i,12,1.66,.4),overline:b(i,12,2.66,1,V_),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Fn({htmlFontSize:l,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:s,fontWeightBold:a,...y},p,{clone:!1})}const Z8=.2,Q8=.14,e7=.12;function rn(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Z8})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${Q8})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${e7})`].join(",")}const t7=["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)],n7={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)"},r7={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function H_(t){return`${Math.round(t)}ms`}function o7(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function i7(t){const e={...n7,...t.easing},n={...r7,...t.duration};return{getAutoHeightDuration:o7,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=m=>typeof m=="string",p=m=>!Number.isNaN(parseFloat(m));!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(`
|
|
71
|
+
`)),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:H_(s)} ${a} ${typeof l=="string"?l:H_(l)}`).join(",")},...t,easing:e,duration:n}}const s7={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function a7(t){return Uo(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function HI(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];!a7(a)||s.startsWith("unstable_")?delete r[s]:Uo(a)&&(r[s]={...a},n(r[s]))}}return n(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
72
|
+
|
|
73
|
+
const theme = ${JSON.stringify(e,null,2)};
|
|
74
|
+
|
|
75
|
+
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
76
|
+
theme.transitions = createTransitions(theme.transitions || {});
|
|
77
|
+
|
|
78
|
+
export default theme;`}function ix(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.":Jo(20));const f=C1(i),p=Wu(t);let m=Fn(p,{mixins:Y8(p.breakpoints,r),palette:f,shadows:t7.slice(),typography:X8(f,a),transitions:i7(s),zIndex:{...s7}});if(m=Fn(m,u),m=e.reduce((g,b)=>Fn(g,b),m),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(y,x)=>{let C;for(C in y){const _=y[C];if(g.includes(C)&&Object.keys(_).length>0){if(process.env.NODE_ENV!=="production"){const T=Qe("",C);console.error([`MUI: The \`${x}\` component increases the CSS specificity of the \`${C}\` internal state.`,"You can not override it like this: ",JSON.stringify(y,null,2),"",`Instead, you need to use the '&.${T}' syntax:`,JSON.stringify({root:{[`&.${T}`]:_}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
79
|
+
`))}y[C]={}}}};Object.keys(m.components).forEach(y=>{const x=m.components[y].styleOverrides;x&&y.startsWith("Mui")&&b(x,y)})}return m.unstable_sxConfig={...Hu,...u==null?void 0:u.unstable_sxConfig},m.unstable_sx=function(b){return Dl({sx:b,theme:this})},m.toRuntimeSource=HI,m}function sx(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 l7=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=sx(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function WI(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function qI(t){return t==="dark"?l7:[]}function c7(t){const{palette:e={mode:"light"},opacity:n,overlays:r,...o}=t,i=C1(e);return{palette:i,opacity:{...WI(i.mode),...n},overlays:r||qI(i.mode),...o}}function u7(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 d7=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],f7=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 d7(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 p7(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function Ce(t,e,n){!t[e]&&n&&(t[e]=n)}function Dc(t){return typeof t!="string"||!t.startsWith("hsl")?t:FI(t)}function mi(t,e){`${e}Channel`in t||(t[`${e}Channel`]=Ic(Dc(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().
|
|
80
|
+
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 h7(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const $o=t=>{try{return t()}catch{}},m7=(t="mui")=>d8(t);function cy(t,e,n,r){if(!e)return;e=e===!0?{}:e;const o=r==="dark"?"dark":"light";if(!n){t[r]=c7({...e,palette:{mode:o,...e==null?void 0:e.palette}});return}const{palette:i,...s}=ix({...n,palette:{mode:o,...e==null?void 0:e.palette}});return t[r]={...e,palette:i,opacity:{...WI(o),...e==null?void 0:e.opacity},overlays:(e==null?void 0:e.overlays)||qI(o)},s}function g7(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:s=u7,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),m=m7(i),{[p]:g,light:b,dark:y,...x}=n,C={...x};let _=g;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(_=!0),!_)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Jo(21,p));const T=cy(C,_,u,p);b&&!C.light&&cy(C,b,void 0,"light"),y&&!C.dark&&cy(C,y,void 0,"dark");let w={defaultColorScheme:p,...T,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:l,getCssVar:m,colorSchemes:C,font:{...G8(T.typography),...T.font},spacing:h7(u.spacing)};Object.keys(w.colorSchemes).forEach(N=>{const O=w.colorSchemes[N].palette,I=L=>{const B=L.split("-"),V=B[1],j=B[2];return m(L,O[V][j])};if(O.mode==="light"&&(Ce(O.common,"background","#fff"),Ce(O.common,"onBackground","#000")),O.mode==="dark"&&(Ce(O.common,"background","#000"),Ce(O.common,"onBackground","#fff")),p7(O,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),O.mode==="light"){Ce(O.Alert,"errorColor",zt(O.error.light,.6)),Ce(O.Alert,"infoColor",zt(O.info.light,.6)),Ce(O.Alert,"successColor",zt(O.success.light,.6)),Ce(O.Alert,"warningColor",zt(O.warning.light,.6)),Ce(O.Alert,"errorFilledBg",I("palette-error-main")),Ce(O.Alert,"infoFilledBg",I("palette-info-main")),Ce(O.Alert,"successFilledBg",I("palette-success-main")),Ce(O.Alert,"warningFilledBg",I("palette-warning-main")),Ce(O.Alert,"errorFilledColor",$o(()=>O.getContrastText(O.error.main))),Ce(O.Alert,"infoFilledColor",$o(()=>O.getContrastText(O.info.main))),Ce(O.Alert,"successFilledColor",$o(()=>O.getContrastText(O.success.main))),Ce(O.Alert,"warningFilledColor",$o(()=>O.getContrastText(O.warning.main))),Ce(O.Alert,"errorStandardBg",Ht(O.error.light,.9)),Ce(O.Alert,"infoStandardBg",Ht(O.info.light,.9)),Ce(O.Alert,"successStandardBg",Ht(O.success.light,.9)),Ce(O.Alert,"warningStandardBg",Ht(O.warning.light,.9)),Ce(O.Alert,"errorIconColor",I("palette-error-main")),Ce(O.Alert,"infoIconColor",I("palette-info-main")),Ce(O.Alert,"successIconColor",I("palette-success-main")),Ce(O.Alert,"warningIconColor",I("palette-warning-main")),Ce(O.AppBar,"defaultBg",I("palette-grey-100")),Ce(O.Avatar,"defaultBg",I("palette-grey-400")),Ce(O.Button,"inheritContainedBg",I("palette-grey-300")),Ce(O.Button,"inheritContainedHoverBg",I("palette-grey-A100")),Ce(O.Chip,"defaultBorder",I("palette-grey-400")),Ce(O.Chip,"defaultAvatarColor",I("palette-grey-700")),Ce(O.Chip,"defaultIconColor",I("palette-grey-700")),Ce(O.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Ce(O.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Ce(O.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Ce(O.LinearProgress,"primaryBg",Ht(O.primary.main,.62)),Ce(O.LinearProgress,"secondaryBg",Ht(O.secondary.main,.62)),Ce(O.LinearProgress,"errorBg",Ht(O.error.main,.62)),Ce(O.LinearProgress,"infoBg",Ht(O.info.main,.62)),Ce(O.LinearProgress,"successBg",Ht(O.success.main,.62)),Ce(O.LinearProgress,"warningBg",Ht(O.warning.main,.62)),Ce(O.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.11)`),Ce(O.Slider,"primaryTrack",Ht(O.primary.main,.62)),Ce(O.Slider,"secondaryTrack",Ht(O.secondary.main,.62)),Ce(O.Slider,"errorTrack",Ht(O.error.main,.62)),Ce(O.Slider,"infoTrack",Ht(O.info.main,.62)),Ce(O.Slider,"successTrack",Ht(O.success.main,.62)),Ce(O.Slider,"warningTrack",Ht(O.warning.main,.62));const L=sf(O.background.default,.8);Ce(O.SnackbarContent,"bg",L),Ce(O.SnackbarContent,"color",$o(()=>O.getContrastText(L))),Ce(O.SpeedDialAction,"fabHoverBg",sf(O.background.paper,.15)),Ce(O.StepConnector,"border",I("palette-grey-400")),Ce(O.StepContent,"border",I("palette-grey-400")),Ce(O.Switch,"defaultColor",I("palette-common-white")),Ce(O.Switch,"defaultDisabledColor",I("palette-grey-100")),Ce(O.Switch,"primaryDisabledColor",Ht(O.primary.main,.62)),Ce(O.Switch,"secondaryDisabledColor",Ht(O.secondary.main,.62)),Ce(O.Switch,"errorDisabledColor",Ht(O.error.main,.62)),Ce(O.Switch,"infoDisabledColor",Ht(O.info.main,.62)),Ce(O.Switch,"successDisabledColor",Ht(O.success.main,.62)),Ce(O.Switch,"warningDisabledColor",Ht(O.warning.main,.62)),Ce(O.TableCell,"border",Ht(of(O.divider,1),.88)),Ce(O.Tooltip,"bg",of(O.grey[700],.92))}if(O.mode==="dark"){Ce(O.Alert,"errorColor",Ht(O.error.light,.6)),Ce(O.Alert,"infoColor",Ht(O.info.light,.6)),Ce(O.Alert,"successColor",Ht(O.success.light,.6)),Ce(O.Alert,"warningColor",Ht(O.warning.light,.6)),Ce(O.Alert,"errorFilledBg",I("palette-error-dark")),Ce(O.Alert,"infoFilledBg",I("palette-info-dark")),Ce(O.Alert,"successFilledBg",I("palette-success-dark")),Ce(O.Alert,"warningFilledBg",I("palette-warning-dark")),Ce(O.Alert,"errorFilledColor",$o(()=>O.getContrastText(O.error.dark))),Ce(O.Alert,"infoFilledColor",$o(()=>O.getContrastText(O.info.dark))),Ce(O.Alert,"successFilledColor",$o(()=>O.getContrastText(O.success.dark))),Ce(O.Alert,"warningFilledColor",$o(()=>O.getContrastText(O.warning.dark))),Ce(O.Alert,"errorStandardBg",zt(O.error.light,.9)),Ce(O.Alert,"infoStandardBg",zt(O.info.light,.9)),Ce(O.Alert,"successStandardBg",zt(O.success.light,.9)),Ce(O.Alert,"warningStandardBg",zt(O.warning.light,.9)),Ce(O.Alert,"errorIconColor",I("palette-error-main")),Ce(O.Alert,"infoIconColor",I("palette-info-main")),Ce(O.Alert,"successIconColor",I("palette-success-main")),Ce(O.Alert,"warningIconColor",I("palette-warning-main")),Ce(O.AppBar,"defaultBg",I("palette-grey-900")),Ce(O.AppBar,"darkBg",I("palette-background-paper")),Ce(O.AppBar,"darkColor",I("palette-text-primary")),Ce(O.Avatar,"defaultBg",I("palette-grey-600")),Ce(O.Button,"inheritContainedBg",I("palette-grey-800")),Ce(O.Button,"inheritContainedHoverBg",I("palette-grey-700")),Ce(O.Chip,"defaultBorder",I("palette-grey-700")),Ce(O.Chip,"defaultAvatarColor",I("palette-grey-300")),Ce(O.Chip,"defaultIconColor",I("palette-grey-300")),Ce(O.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Ce(O.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Ce(O.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Ce(O.LinearProgress,"primaryBg",zt(O.primary.main,.5)),Ce(O.LinearProgress,"secondaryBg",zt(O.secondary.main,.5)),Ce(O.LinearProgress,"errorBg",zt(O.error.main,.5)),Ce(O.LinearProgress,"infoBg",zt(O.info.main,.5)),Ce(O.LinearProgress,"successBg",zt(O.success.main,.5)),Ce(O.LinearProgress,"warningBg",zt(O.warning.main,.5)),Ce(O.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.13)`),Ce(O.Slider,"primaryTrack",zt(O.primary.main,.5)),Ce(O.Slider,"secondaryTrack",zt(O.secondary.main,.5)),Ce(O.Slider,"errorTrack",zt(O.error.main,.5)),Ce(O.Slider,"infoTrack",zt(O.info.main,.5)),Ce(O.Slider,"successTrack",zt(O.success.main,.5)),Ce(O.Slider,"warningTrack",zt(O.warning.main,.5));const L=sf(O.background.default,.98);Ce(O.SnackbarContent,"bg",L),Ce(O.SnackbarContent,"color",$o(()=>O.getContrastText(L))),Ce(O.SpeedDialAction,"fabHoverBg",sf(O.background.paper,.15)),Ce(O.StepConnector,"border",I("palette-grey-600")),Ce(O.StepContent,"border",I("palette-grey-600")),Ce(O.Switch,"defaultColor",I("palette-grey-300")),Ce(O.Switch,"defaultDisabledColor",I("palette-grey-600")),Ce(O.Switch,"primaryDisabledColor",zt(O.primary.main,.55)),Ce(O.Switch,"secondaryDisabledColor",zt(O.secondary.main,.55)),Ce(O.Switch,"errorDisabledColor",zt(O.error.main,.55)),Ce(O.Switch,"infoDisabledColor",zt(O.info.main,.55)),Ce(O.Switch,"successDisabledColor",zt(O.success.main,.55)),Ce(O.Switch,"warningDisabledColor",zt(O.warning.main,.55)),Ce(O.TableCell,"border",zt(of(O.divider,1),.68)),Ce(O.Tooltip,"bg",of(O.grey[700],.92))}mi(O.background,"default"),mi(O.background,"paper"),mi(O.common,"background"),mi(O.common,"onBackground"),mi(O,"divider"),Object.keys(O).forEach(L=>{const B=O[L];L!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&Ce(O[L],"mainChannel",Ic(Dc(B.main))),B.light&&Ce(O[L],"lightChannel",Ic(Dc(B.light))),B.dark&&Ce(O[L],"darkChannel",Ic(Dc(B.dark))),B.contrastText&&Ce(O[L],"contrastTextChannel",Ic(Dc(B.contrastText))),L==="text"&&(mi(O[L],"primary"),mi(O[L],"secondary")),L==="action"&&(B.active&&mi(O[L],"active"),B.selected&&mi(O[L],"selected")))})}),w=e.reduce((N,O)=>Fn(N,O),w);const k={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:f7(w)},{vars:M,generateThemeVars:A,generateStyleSheets:R}=h8(w,k);return w.vars=M,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([N,O])=>{w[N]=O}),w.generateThemeVars=A,w.generateStyleSheets=R,w.generateSpacing=function(){return OI(u.spacing,Ch(this))},w.getColorSchemeSelector=m8(a),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=s,w.unstable_sxConfig={...Hu,...u==null?void 0:u.unstable_sxConfig},w.unstable_sx=function(O){return Dl({sx:O,theme:this})},w.toRuntimeSource=HI,w}function W_(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:C1({...n===!0?{}:n.palette,mode:e})})}function y7(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 ix(t,...e);let f=n;"palette"in t||u[a]&&(u[a]!==!0?f=u[a].palette:a==="dark"&&(f={mode:"dark"}));const p=ix({...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},W_(p,"dark",u.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:p.palette},W_(p,"light",u.light)),p}return!n&&!("light"in u)&&a==="light"&&(u.light=!0),g7({...s,colorSchemes:u,defaultColorScheme:a,...typeof r!="boolean"&&r},...e)}const Rh=y7(),qu="$$material";function ji(){const t=Oh(Rh);return process.env.NODE_ENV!=="production"&&D.useDebugValue(t),t[qu]||t}function UI(t){return v.jsx(AI,{...t,defaultTheme:Rh,themeId:qu})}process.env.NODE_ENV!=="production"&&(UI.propTypes={styles:c.oneOfType([c.array,c.func,c.number,c.object,c.string,c.bool])});function KI(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const Ao=t=>KI(t)&&t!=="classes",Se=DI({themeId:qu,defaultTheme:Rh,rootShouldForwardProp:Ao});function b7(t){return function(n){return v.jsx(UI,{styles:typeof t=="function"?r=>t({theme:r,...n}):t})}}function v7(){return v1}const Bt=u8;process.env.NODE_ENV!=="production"&&(c.node,c.object.isRequired);function Et(t){return c8(t)}function x7(t){return Qe("MuiSvgIcon",t)}et("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const S7=t=>{const{color:e,fontSize:n,classes:r}=t,o={root:["root",e!=="inherit"&&`color${Le(e)}`,`fontSize${Le(n)}`]};return Ze(o,x7,r)},C7=Se("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${Le(n.color)}`],e[`fontSize${Le(n.fontSize)}`]]}})(Bt(({theme:t})=>{var e,n,r,o,i,s,a,l,u,f,p,m,g,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,C;return{props:{color:y},style:{color:(C=(x=(t.vars??t).palette)==null?void 0:x[y])==null?void 0:C.main}}}),{props:{color:"action"},style:{color:(m=(p=(t.vars??t).palette)==null?void 0:p.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(b=(g=(t.vars??t).palette)==null?void 0:g.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),cp=D.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:m="0 0 24 24",...g}=r,b=D.isValidElement(o)&&o.type==="svg",y={...r,color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:b},x={};f||(x.viewBox=m);const C=S7(y);return v.jsxs(C7,{as:a,className:ze(C.root,i),focusable:"false",color:u,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:n,...x,...g,...b&&o.props,ownerState:y,children:[b?o.props.children:o,p?v.jsx("title",{children:p}):null]})});process.env.NODE_ENV!=="production"&&(cp.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});cp.muiName="SvgIcon";function Ke(t,e){function n(r,o){return v.jsx(cp,{"data-testid":`${e}Icon`,ref:o,...r,children:t})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${e}Icon`),n.muiName=cp.muiName,D.memo(D.forwardRef(n))}function w7(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 GI=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"),pr=t=>{var i;const{name:e,id:n,className:r}=t,{formState:{errors:o}}=ln();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(GI,{fontSize:"inherit"})}),`${(i=o[e])==null?void 0:i.message}`]})},YI=t=>{const{name:e,label:n=Yn(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:m,clearOnSelect:g=!1,onInputChange:b,getOptionLabel:y=I=>typeof I=="string"?I:String(I),isOptionEqualToValue:x=(I,L)=>JSON.stringify(I)===JSON.stringify(L),useFieldAsValue:C,..._}=t,{setValue:T,getValues:w,formState:{errors:k},control:M}=ln(),[A,R]=D.useState(""),N={...fr(_,["useFieldAsValue"]),getOptionLabel:y,options:r,filterSelectedOptions:o,isOptionEqualToValue:x,renderInput:I=>v.jsx($.TextField,{...I,variant:i,label:s?void 0:n,error:!!k[e],required:p}),onChange:(I,L,B,V)=>{g?(R(""),T(e,null,{shouldValidate:!0})):C?T(e,L?L[C]:null,{shouldValidate:!0}):T(e,L,{shouldValidate:!0}),m&&m(I,L,B,V)},onInputChange:(I,L,B)=>{R(L),b&&b(I,L,B)},fullWidth:!0,inputValue:A,value:C?r.find(I=>I[C]===w(e))||null:w(e),slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}},O=()=>{if(!w(e))return"";if(C){const I=r.find(L=>L[C]===w(e));return I?y(I):""}return y(w(e))};return v.jsx(nr,{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,{...N}),v.jsx(pr,{name:e,id:`${e}-err`})]})]})})};var Pc={exports:{}};/**
|
|
81
|
+
* @license
|
|
82
|
+
* Lodash <https://lodash.com/>
|
|
83
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
84
|
+
* Released under MIT license <https://lodash.com/license>
|
|
85
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
86
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
87
|
+
*/var T7=Pc.exports,q_;function _7(){return q_||(q_=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,m=2,g=4,b=1,y=2,x=1,C=2,_=4,T=8,w=16,k=32,M=64,A=128,R=256,N=512,O=30,I="...",L=800,B=16,V=1,j=2,F=3,U=1/0,K=9007199254740991,Y=17976931348623157e292,G=NaN,Z=4294967295,me=Z-1,he=Z>>>1,ge=[["ary",A],["bind",x],["bindKey",C],["curry",T],["curryRight",w],["flip",N],["partial",k],["partialRight",M],["rearg",R]],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]",_e="[object Null]",Te="[object Object]",Pe="[object Promise]",Be="[object Proxy]",W="[object RegExp]",te="[object Set]",re="[object String]",Oe="[object Symbol]",Re="[object Undefined]",Ie="[object WeakMap]",Ve="[object WeakSet]",rt="[object ArrayBuffer]",tt="[object DataView]",kt="[object Float32Array]",vn="[object Float64Array]",ct="[object Int8Array]",An="[object Int16Array]",Nt="[object Int32Array]",pe="[object Uint8Array]",He="[object Uint8ClampedArray]",Me="[object Uint16Array]",We="[object Uint32Array]",Je=/\b__p \+= '';/g,lt=/\b(__p \+=) '' \+/g,jt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ir=/&(?:amp|lt|gt|quot|#39);/g,br=/[&<>"']/g,oi=RegExp(ir.source),Ql=RegExp(br.source),Da=/<%-([\s\S]+?)%>/g,zi=/<%([\s\S]+?)%>/g,fd=/<%=([\s\S]+?)%>/g,ec=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pa=/^\w*$/,cF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rm=/[\\^$.*+?()[\]{}|]/g,uF=RegExp(Rm.source),Im=/^\s+/,dF=/\s/,fF=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pF=/\{\n\/\* \[wrapped with (.+)\] \*/,hF=/,? & /,mF=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gF=/[()=,{}\[\]\/\s]/,yF=/\\(\\)?/g,bF=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,CC=/\w*$/,vF=/^[-+]0x[0-9a-f]+$/i,xF=/^0b[01]+$/i,SF=/^\[object .+?Constructor\]$/,CF=/^0o[0-7]+$/i,wF=/^(?:0|[1-9]\d*)$/,TF=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,pd=/($^)/,_F=/['\n\r\u2028\u2029\\]/g,hd="\\ud800-\\udfff",EF="\\u0300-\\u036f",kF="\\ufe20-\\ufe2f",OF="\\u20d0-\\u20ff",wC=EF+kF+OF,TC="\\u2700-\\u27bf",_C="a-z\\xdf-\\xf6\\xf8-\\xff",MF="\\xac\\xb1\\xd7\\xf7",AF="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",RF="\\u2000-\\u206f",IF=" \\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",EC="A-Z\\xc0-\\xd6\\xd8-\\xde",kC="\\ufe0e\\ufe0f",OC=MF+AF+RF+IF,Dm="['’]",DF="["+hd+"]",MC="["+OC+"]",md="["+wC+"]",AC="\\d+",PF="["+TC+"]",RC="["+_C+"]",IC="[^"+hd+OC+AC+TC+_C+EC+"]",Pm="\\ud83c[\\udffb-\\udfff]",NF="(?:"+md+"|"+Pm+")",DC="[^"+hd+"]",Nm="(?:\\ud83c[\\udde6-\\uddff]){2}",Lm="[\\ud800-\\udbff][\\udc00-\\udfff]",Na="["+EC+"]",PC="\\u200d",NC="(?:"+RC+"|"+IC+")",LF="(?:"+Na+"|"+IC+")",LC="(?:"+Dm+"(?:d|ll|m|re|s|t|ve))?",jC="(?:"+Dm+"(?:D|LL|M|RE|S|T|VE))?",$C=NF+"?",FC="["+kC+"]?",jF="(?:"+PC+"(?:"+[DC,Nm,Lm].join("|")+")"+FC+$C+")*",$F="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",FF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",BC=FC+$C+jF,BF="(?:"+[PF,Nm,Lm].join("|")+")"+BC,VF="(?:"+[DC+md+"?",md,Nm,Lm,DF].join("|")+")",zF=RegExp(Dm,"g"),HF=RegExp(md,"g"),jm=RegExp(Pm+"(?="+Pm+")|"+VF+BC,"g"),WF=RegExp([Na+"?"+RC+"+"+LC+"(?="+[MC,Na,"$"].join("|")+")",LF+"+"+jC+"(?="+[MC,Na+NC,"$"].join("|")+")",Na+"?"+NC+"+"+LC,Na+"+"+jC,FF,$F,AC,BF].join("|"),"g"),qF=RegExp("["+PC+hd+wC+kC+"]"),UF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,KF=["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"],GF=-1,Yt={};Yt[kt]=Yt[vn]=Yt[ct]=Yt[An]=Yt[Nt]=Yt[pe]=Yt[He]=Yt[Me]=Yt[We]=!0,Yt[oe]=Yt[ye]=Yt[rt]=Yt[X]=Yt[tt]=Yt[Q]=Yt[ve]=Yt[ne]=Yt[fe]=Yt[xe]=Yt[Te]=Yt[W]=Yt[te]=Yt[re]=Yt[Ie]=!1;var Ut={};Ut[oe]=Ut[ye]=Ut[rt]=Ut[tt]=Ut[X]=Ut[Q]=Ut[kt]=Ut[vn]=Ut[ct]=Ut[An]=Ut[Nt]=Ut[fe]=Ut[xe]=Ut[Te]=Ut[W]=Ut[te]=Ut[re]=Ut[Oe]=Ut[pe]=Ut[He]=Ut[Me]=Ut[We]=!0,Ut[ve]=Ut[ne]=Ut[Ie]=!1;var YF={À:"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"},JF={"&":"&","<":"<",">":">",'"':""","'":"'"},XF={"&":"&","<":"<",">":">",""":'"',"'":"'"},ZF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},QF=parseFloat,eB=parseInt,VC=typeof ds=="object"&&ds&&ds.Object===Object&&ds,tB=typeof self=="object"&&self&&self.Object===Object&&self,Hn=VC||tB||Function("return this")(),$m=e&&!e.nodeType&&e,Ps=$m&&!0&&t&&!t.nodeType&&t,zC=Ps&&Ps.exports===$m,Fm=zC&&VC.process,Ur=function(){try{var se=Ps&&Ps.require&&Ps.require("util").types;return se||Fm&&Fm.binding&&Fm.binding("util")}catch{}}(),HC=Ur&&Ur.isArrayBuffer,WC=Ur&&Ur.isDate,qC=Ur&&Ur.isMap,UC=Ur&&Ur.isRegExp,KC=Ur&&Ur.isSet,GC=Ur&&Ur.isTypedArray;function Ir(se,we,be){switch(be.length){case 0:return se.call(we);case 1:return se.call(we,be[0]);case 2:return se.call(we,be[0],be[1]);case 3:return se.call(we,be[0],be[1],be[2])}return se.apply(we,be)}function nB(se,we,be,Ue){for(var ut=-1,Ot=se==null?0:se.length;++ut<Ot;){var Rn=se[ut];we(Ue,Rn,be(Rn),se)}return Ue}function Kr(se,we){for(var be=-1,Ue=se==null?0:se.length;++be<Ue&&we(se[be],be,se)!==!1;);return se}function rB(se,we){for(var be=se==null?0:se.length;be--&&we(se[be],be,se)!==!1;);return se}function YC(se,we){for(var be=-1,Ue=se==null?0:se.length;++be<Ue;)if(!we(se[be],be,se))return!1;return!0}function Hi(se,we){for(var be=-1,Ue=se==null?0:se.length,ut=0,Ot=[];++be<Ue;){var Rn=se[be];we(Rn,be,se)&&(Ot[ut++]=Rn)}return Ot}function gd(se,we){var be=se==null?0:se.length;return!!be&&La(se,we,0)>-1}function Bm(se,we,be){for(var Ue=-1,ut=se==null?0:se.length;++Ue<ut;)if(be(we,se[Ue]))return!0;return!1}function nn(se,we){for(var be=-1,Ue=se==null?0:se.length,ut=Array(Ue);++be<Ue;)ut[be]=we(se[be],be,se);return ut}function Wi(se,we){for(var be=-1,Ue=we.length,ut=se.length;++be<Ue;)se[ut+be]=we[be];return se}function Vm(se,we,be,Ue){var ut=-1,Ot=se==null?0:se.length;for(Ue&&Ot&&(be=se[++ut]);++ut<Ot;)be=we(be,se[ut],ut,se);return be}function oB(se,we,be,Ue){var ut=se==null?0:se.length;for(Ue&&ut&&(be=se[--ut]);ut--;)be=we(be,se[ut],ut,se);return be}function zm(se,we){for(var be=-1,Ue=se==null?0:se.length;++be<Ue;)if(we(se[be],be,se))return!0;return!1}var iB=Hm("length");function sB(se){return se.split("")}function aB(se){return se.match(mF)||[]}function JC(se,we,be){var Ue;return be(se,function(ut,Ot,Rn){if(we(ut,Ot,Rn))return Ue=Ot,!1}),Ue}function yd(se,we,be,Ue){for(var ut=se.length,Ot=be+(Ue?1:-1);Ue?Ot--:++Ot<ut;)if(we(se[Ot],Ot,se))return Ot;return-1}function La(se,we,be){return we===we?vB(se,we,be):yd(se,XC,be)}function lB(se,we,be,Ue){for(var ut=be-1,Ot=se.length;++ut<Ot;)if(Ue(se[ut],we))return ut;return-1}function XC(se){return se!==se}function ZC(se,we){var be=se==null?0:se.length;return be?qm(se,we)/be:G}function Hm(se){return function(we){return we==null?n:we[se]}}function Wm(se){return function(we){return se==null?n:se[we]}}function QC(se,we,be,Ue,ut){return ut(se,function(Ot,Rn,Vt){be=Ue?(Ue=!1,Ot):we(be,Ot,Rn,Vt)}),be}function cB(se,we){var be=se.length;for(se.sort(we);be--;)se[be]=se[be].value;return se}function qm(se,we){for(var be,Ue=-1,ut=se.length;++Ue<ut;){var Ot=we(se[Ue]);Ot!==n&&(be=be===n?Ot:be+Ot)}return be}function Um(se,we){for(var be=-1,Ue=Array(se);++be<se;)Ue[be]=we(be);return Ue}function uB(se,we){return nn(we,function(be){return[be,se[be]]})}function ew(se){return se&&se.slice(0,ow(se)+1).replace(Im,"")}function Dr(se){return function(we){return se(we)}}function Km(se,we){return nn(we,function(be){return se[be]})}function tc(se,we){return se.has(we)}function tw(se,we){for(var be=-1,Ue=se.length;++be<Ue&&La(we,se[be],0)>-1;);return be}function nw(se,we){for(var be=se.length;be--&&La(we,se[be],0)>-1;);return be}function dB(se,we){for(var be=se.length,Ue=0;be--;)se[be]===we&&++Ue;return Ue}var fB=Wm(YF),pB=Wm(JF);function hB(se){return"\\"+ZF[se]}function mB(se,we){return se==null?n:se[we]}function ja(se){return qF.test(se)}function gB(se){return UF.test(se)}function yB(se){for(var we,be=[];!(we=se.next()).done;)be.push(we.value);return be}function Gm(se){var we=-1,be=Array(se.size);return se.forEach(function(Ue,ut){be[++we]=[ut,Ue]}),be}function rw(se,we){return function(be){return se(we(be))}}function qi(se,we){for(var be=-1,Ue=se.length,ut=0,Ot=[];++be<Ue;){var Rn=se[be];(Rn===we||Rn===f)&&(se[be]=f,Ot[ut++]=be)}return Ot}function bd(se){var we=-1,be=Array(se.size);return se.forEach(function(Ue){be[++we]=Ue}),be}function bB(se){var we=-1,be=Array(se.size);return se.forEach(function(Ue){be[++we]=[Ue,Ue]}),be}function vB(se,we,be){for(var Ue=be-1,ut=se.length;++Ue<ut;)if(se[Ue]===we)return Ue;return-1}function xB(se,we,be){for(var Ue=be+1;Ue--;)if(se[Ue]===we)return Ue;return Ue}function $a(se){return ja(se)?CB(se):iB(se)}function bo(se){return ja(se)?wB(se):sB(se)}function ow(se){for(var we=se.length;we--&&dF.test(se.charAt(we)););return we}var SB=Wm(XF);function CB(se){for(var we=jm.lastIndex=0;jm.test(se);)++we;return we}function wB(se){return se.match(jm)||[]}function TB(se){return se.match(WF)||[]}var _B=function se(we){we=we==null?Hn:Fa.defaults(Hn.Object(),we,Fa.pick(Hn,KF));var be=we.Array,Ue=we.Date,ut=we.Error,Ot=we.Function,Rn=we.Math,Vt=we.Object,Ym=we.RegExp,EB=we.String,Gr=we.TypeError,vd=be.prototype,kB=Ot.prototype,Ba=Vt.prototype,xd=we["__core-js_shared__"],Sd=kB.toString,Lt=Ba.hasOwnProperty,OB=0,iw=function(){var d=/[^.]+$/.exec(xd&&xd.keys&&xd.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),Cd=Ba.toString,MB=Sd.call(Vt),AB=Hn._,RB=Ym("^"+Sd.call(Lt).replace(Rm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wd=zC?we.Buffer:n,Ui=we.Symbol,Td=we.Uint8Array,sw=wd?wd.allocUnsafe:n,_d=rw(Vt.getPrototypeOf,Vt),aw=Vt.create,lw=Ba.propertyIsEnumerable,Ed=vd.splice,cw=Ui?Ui.isConcatSpreadable:n,nc=Ui?Ui.iterator:n,Ns=Ui?Ui.toStringTag:n,kd=function(){try{var d=Bs(Vt,"defineProperty");return d({},"",{}),d}catch{}}(),IB=we.clearTimeout!==Hn.clearTimeout&&we.clearTimeout,DB=Ue&&Ue.now!==Hn.Date.now&&Ue.now,PB=we.setTimeout!==Hn.setTimeout&&we.setTimeout,Od=Rn.ceil,Md=Rn.floor,Jm=Vt.getOwnPropertySymbols,NB=wd?wd.isBuffer:n,uw=we.isFinite,LB=vd.join,jB=rw(Vt.keys,Vt),In=Rn.max,Jn=Rn.min,$B=Ue.now,FB=we.parseInt,dw=Rn.random,BB=vd.reverse,Xm=Bs(we,"DataView"),rc=Bs(we,"Map"),Zm=Bs(we,"Promise"),Va=Bs(we,"Set"),oc=Bs(we,"WeakMap"),ic=Bs(Vt,"create"),Ad=oc&&new oc,za={},VB=Vs(Xm),zB=Vs(rc),HB=Vs(Zm),WB=Vs(Va),qB=Vs(oc),Rd=Ui?Ui.prototype:n,sc=Rd?Rd.valueOf:n,fw=Rd?Rd.toString:n;function z(d){if(un(d)&&!ft(d)&&!(d instanceof xt)){if(d instanceof Yr)return d;if(Lt.call(d,"__wrapped__"))return pT(d)}return new Yr(d)}var Ha=function(){function d(){}return function(h){if(!sn(h))return{};if(aw)return aw(h);d.prototype=h;var S=new d;return d.prototype=n,S}}();function Id(){}function Yr(d,h){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=n}z.templateSettings={escape:Da,evaluate:zi,interpolate:fd,variable:"",imports:{_:z}},z.prototype=Id.prototype,z.prototype.constructor=z,Yr.prototype=Ha(Id.prototype),Yr.prototype.constructor=Yr;function xt(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Z,this.__views__=[]}function UB(){var d=new xt(this.__wrapped__);return d.__actions__=vr(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=vr(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=vr(this.__views__),d}function KB(){if(this.__filtered__){var d=new xt(this);d.__dir__=-1,d.__filtered__=!0}else d=this.clone(),d.__dir__*=-1;return d}function GB(){var d=this.__wrapped__.value(),h=this.__dir__,S=ft(d),E=h<0,P=S?d.length:0,H=sV(0,P,this.__views__),J=H.start,ee=H.end,le=ee-J,Ee=E?ee:J-1,ke=this.__iteratees__,De=ke.length,Fe=0,Ye=Jn(le,this.__takeCount__);if(!S||!E&&P==le&&Ye==le)return Lw(d,this.__actions__);var it=[];e:for(;le--&&Fe<Ye;){Ee+=h;for(var ht=-1,st=d[Ee];++ht<De;){var bt=ke[ht],Ct=bt.iteratee,Lr=bt.type,lr=Ct(st);if(Lr==j)st=lr;else if(!lr){if(Lr==V)continue e;break e}}it[Fe++]=st}return it}xt.prototype=Ha(Id.prototype),xt.prototype.constructor=xt;function Ls(d){var h=-1,S=d==null?0:d.length;for(this.clear();++h<S;){var E=d[h];this.set(E[0],E[1])}}function YB(){this.__data__=ic?ic(null):{},this.size=0}function JB(d){var h=this.has(d)&&delete this.__data__[d];return this.size-=h?1:0,h}function XB(d){var h=this.__data__;if(ic){var S=h[d];return S===l?n:S}return Lt.call(h,d)?h[d]:n}function ZB(d){var h=this.__data__;return ic?h[d]!==n:Lt.call(h,d)}function QB(d,h){var S=this.__data__;return this.size+=this.has(d)?0:1,S[d]=ic&&h===n?l:h,this}Ls.prototype.clear=YB,Ls.prototype.delete=JB,Ls.prototype.get=XB,Ls.prototype.has=ZB,Ls.prototype.set=QB;function ii(d){var h=-1,S=d==null?0:d.length;for(this.clear();++h<S;){var E=d[h];this.set(E[0],E[1])}}function e5(){this.__data__=[],this.size=0}function t5(d){var h=this.__data__,S=Dd(h,d);if(S<0)return!1;var E=h.length-1;return S==E?h.pop():Ed.call(h,S,1),--this.size,!0}function n5(d){var h=this.__data__,S=Dd(h,d);return S<0?n:h[S][1]}function r5(d){return Dd(this.__data__,d)>-1}function o5(d,h){var S=this.__data__,E=Dd(S,d);return E<0?(++this.size,S.push([d,h])):S[E][1]=h,this}ii.prototype.clear=e5,ii.prototype.delete=t5,ii.prototype.get=n5,ii.prototype.has=r5,ii.prototype.set=o5;function si(d){var h=-1,S=d==null?0:d.length;for(this.clear();++h<S;){var E=d[h];this.set(E[0],E[1])}}function i5(){this.size=0,this.__data__={hash:new Ls,map:new(rc||ii),string:new Ls}}function s5(d){var h=qd(this,d).delete(d);return this.size-=h?1:0,h}function a5(d){return qd(this,d).get(d)}function l5(d){return qd(this,d).has(d)}function c5(d,h){var S=qd(this,d),E=S.size;return S.set(d,h),this.size+=S.size==E?0:1,this}si.prototype.clear=i5,si.prototype.delete=s5,si.prototype.get=a5,si.prototype.has=l5,si.prototype.set=c5;function js(d){var h=-1,S=d==null?0:d.length;for(this.__data__=new si;++h<S;)this.add(d[h])}function u5(d){return this.__data__.set(d,l),this}function d5(d){return this.__data__.has(d)}js.prototype.add=js.prototype.push=u5,js.prototype.has=d5;function vo(d){var h=this.__data__=new ii(d);this.size=h.size}function f5(){this.__data__=new ii,this.size=0}function p5(d){var h=this.__data__,S=h.delete(d);return this.size=h.size,S}function h5(d){return this.__data__.get(d)}function m5(d){return this.__data__.has(d)}function g5(d,h){var S=this.__data__;if(S instanceof ii){var E=S.__data__;if(!rc||E.length<o-1)return E.push([d,h]),this.size=++S.size,this;S=this.__data__=new si(E)}return S.set(d,h),this.size=S.size,this}vo.prototype.clear=f5,vo.prototype.delete=p5,vo.prototype.get=h5,vo.prototype.has=m5,vo.prototype.set=g5;function pw(d,h){var S=ft(d),E=!S&&zs(d),P=!S&&!E&&Xi(d),H=!S&&!E&&!P&&Ka(d),J=S||E||P||H,ee=J?Um(d.length,EB):[],le=ee.length;for(var Ee in d)(h||Lt.call(d,Ee))&&!(J&&(Ee=="length"||P&&(Ee=="offset"||Ee=="parent")||H&&(Ee=="buffer"||Ee=="byteLength"||Ee=="byteOffset")||ui(Ee,le)))&&ee.push(Ee);return ee}function hw(d){var h=d.length;return h?d[cg(0,h-1)]:n}function y5(d,h){return Ud(vr(d),$s(h,0,d.length))}function b5(d){return Ud(vr(d))}function Qm(d,h,S){(S!==n&&!xo(d[h],S)||S===n&&!(h in d))&&ai(d,h,S)}function ac(d,h,S){var E=d[h];(!(Lt.call(d,h)&&xo(E,S))||S===n&&!(h in d))&&ai(d,h,S)}function Dd(d,h){for(var S=d.length;S--;)if(xo(d[S][0],h))return S;return-1}function v5(d,h,S,E){return Ki(d,function(P,H,J){h(E,P,S(P),J)}),E}function mw(d,h){return d&&Lo(h,Nn(h),d)}function x5(d,h){return d&&Lo(h,Sr(h),d)}function ai(d,h,S){h=="__proto__"&&kd?kd(d,h,{configurable:!0,enumerable:!0,value:S,writable:!0}):d[h]=S}function eg(d,h){for(var S=-1,E=h.length,P=be(E),H=d==null;++S<E;)P[S]=H?n:Pg(d,h[S]);return P}function $s(d,h,S){return d===d&&(S!==n&&(d=d<=S?d:S),h!==n&&(d=d>=h?d:h)),d}function Jr(d,h,S,E,P,H){var J,ee=h&p,le=h&m,Ee=h&g;if(S&&(J=P?S(d,E,P,H):S(d)),J!==n)return J;if(!sn(d))return d;var ke=ft(d);if(ke){if(J=lV(d),!ee)return vr(d,J)}else{var De=Xn(d),Fe=De==ne||De==ce;if(Xi(d))return Fw(d,ee);if(De==Te||De==oe||Fe&&!P){if(J=le||Fe?{}:oT(d),!ee)return le?X5(d,x5(J,d)):J5(d,mw(J,d))}else{if(!Ut[De])return P?d:{};J=cV(d,De,ee)}}H||(H=new vo);var Ye=H.get(d);if(Ye)return Ye;H.set(d,J),DT(d)?d.forEach(function(st){J.add(Jr(st,h,S,st,d,H))}):RT(d)&&d.forEach(function(st,bt){J.set(bt,Jr(st,h,S,bt,d,H))});var it=Ee?le?xg:vg:le?Sr:Nn,ht=ke?n:it(d);return Kr(ht||d,function(st,bt){ht&&(bt=st,st=d[bt]),ac(J,bt,Jr(st,h,S,bt,d,H))}),J}function S5(d){var h=Nn(d);return function(S){return gw(S,d,h)}}function gw(d,h,S){var E=S.length;if(d==null)return!E;for(d=Vt(d);E--;){var P=S[E],H=h[P],J=d[P];if(J===n&&!(P in d)||!H(J))return!1}return!0}function yw(d,h,S){if(typeof d!="function")throw new Gr(s);return hc(function(){d.apply(n,S)},h)}function lc(d,h,S,E){var P=-1,H=gd,J=!0,ee=d.length,le=[],Ee=h.length;if(!ee)return le;S&&(h=nn(h,Dr(S))),E?(H=Bm,J=!1):h.length>=o&&(H=tc,J=!1,h=new js(h));e:for(;++P<ee;){var ke=d[P],De=S==null?ke:S(ke);if(ke=E||ke!==0?ke:0,J&&De===De){for(var Fe=Ee;Fe--;)if(h[Fe]===De)continue e;le.push(ke)}else H(h,De,E)||le.push(ke)}return le}var Ki=Ww(No),bw=Ww(ng,!0);function C5(d,h){var S=!0;return Ki(d,function(E,P,H){return S=!!h(E,P,H),S}),S}function Pd(d,h,S){for(var E=-1,P=d.length;++E<P;){var H=d[E],J=h(H);if(J!=null&&(ee===n?J===J&&!Nr(J):S(J,ee)))var ee=J,le=H}return le}function w5(d,h,S,E){var P=d.length;for(S=pt(S),S<0&&(S=-S>P?0:P+S),E=E===n||E>P?P:pt(E),E<0&&(E+=P),E=S>E?0:NT(E);S<E;)d[S++]=h;return d}function vw(d,h){var S=[];return Ki(d,function(E,P,H){h(E,P,H)&&S.push(E)}),S}function Wn(d,h,S,E,P){var H=-1,J=d.length;for(S||(S=dV),P||(P=[]);++H<J;){var ee=d[H];h>0&&S(ee)?h>1?Wn(ee,h-1,S,E,P):Wi(P,ee):E||(P[P.length]=ee)}return P}var tg=qw(),xw=qw(!0);function No(d,h){return d&&tg(d,h,Nn)}function ng(d,h){return d&&xw(d,h,Nn)}function Nd(d,h){return Hi(h,function(S){return di(d[S])})}function Fs(d,h){h=Yi(h,d);for(var S=0,E=h.length;d!=null&&S<E;)d=d[jo(h[S++])];return S&&S==E?d:n}function Sw(d,h,S){var E=h(d);return ft(d)?E:Wi(E,S(d))}function sr(d){return d==null?d===n?Re:_e:Ns&&Ns in Vt(d)?iV(d):bV(d)}function rg(d,h){return d>h}function T5(d,h){return d!=null&&Lt.call(d,h)}function _5(d,h){return d!=null&&h in Vt(d)}function E5(d,h,S){return d>=Jn(h,S)&&d<In(h,S)}function og(d,h,S){for(var E=S?Bm:gd,P=d[0].length,H=d.length,J=H,ee=be(H),le=1/0,Ee=[];J--;){var ke=d[J];J&&h&&(ke=nn(ke,Dr(h))),le=Jn(ke.length,le),ee[J]=!S&&(h||P>=120&&ke.length>=120)?new js(J&&ke):n}ke=d[0];var De=-1,Fe=ee[0];e:for(;++De<P&&Ee.length<le;){var Ye=ke[De],it=h?h(Ye):Ye;if(Ye=S||Ye!==0?Ye:0,!(Fe?tc(Fe,it):E(Ee,it,S))){for(J=H;--J;){var ht=ee[J];if(!(ht?tc(ht,it):E(d[J],it,S)))continue e}Fe&&Fe.push(it),Ee.push(Ye)}}return Ee}function k5(d,h,S,E){return No(d,function(P,H,J){h(E,S(P),H,J)}),E}function cc(d,h,S){h=Yi(h,d),d=lT(d,h);var E=d==null?d:d[jo(Zr(h))];return E==null?n:Ir(E,d,S)}function Cw(d){return un(d)&&sr(d)==oe}function O5(d){return un(d)&&sr(d)==rt}function M5(d){return un(d)&&sr(d)==Q}function uc(d,h,S,E,P){return d===h?!0:d==null||h==null||!un(d)&&!un(h)?d!==d&&h!==h:A5(d,h,S,E,uc,P)}function A5(d,h,S,E,P,H){var J=ft(d),ee=ft(h),le=J?ye:Xn(d),Ee=ee?ye:Xn(h);le=le==oe?Te:le,Ee=Ee==oe?Te:Ee;var ke=le==Te,De=Ee==Te,Fe=le==Ee;if(Fe&&Xi(d)){if(!Xi(h))return!1;J=!0,ke=!1}if(Fe&&!ke)return H||(H=new vo),J||Ka(d)?tT(d,h,S,E,P,H):rV(d,h,le,S,E,P,H);if(!(S&b)){var Ye=ke&&Lt.call(d,"__wrapped__"),it=De&&Lt.call(h,"__wrapped__");if(Ye||it){var ht=Ye?d.value():d,st=it?h.value():h;return H||(H=new vo),P(ht,st,S,E,H)}}return Fe?(H||(H=new vo),oV(d,h,S,E,P,H)):!1}function R5(d){return un(d)&&Xn(d)==fe}function ig(d,h,S,E){var P=S.length,H=P,J=!E;if(d==null)return!H;for(d=Vt(d);P--;){var ee=S[P];if(J&&ee[2]?ee[1]!==d[ee[0]]:!(ee[0]in d))return!1}for(;++P<H;){ee=S[P];var le=ee[0],Ee=d[le],ke=ee[1];if(J&&ee[2]){if(Ee===n&&!(le in d))return!1}else{var De=new vo;if(E)var Fe=E(Ee,ke,le,d,h,De);if(!(Fe===n?uc(ke,Ee,b|y,E,De):Fe))return!1}}return!0}function ww(d){if(!sn(d)||pV(d))return!1;var h=di(d)?RB:SF;return h.test(Vs(d))}function I5(d){return un(d)&&sr(d)==W}function D5(d){return un(d)&&Xn(d)==te}function P5(d){return un(d)&&Zd(d.length)&&!!Yt[sr(d)]}function Tw(d){return typeof d=="function"?d:d==null?Cr:typeof d=="object"?ft(d)?kw(d[0],d[1]):Ew(d):UT(d)}function sg(d){if(!pc(d))return jB(d);var h=[];for(var S in Vt(d))Lt.call(d,S)&&S!="constructor"&&h.push(S);return h}function N5(d){if(!sn(d))return yV(d);var h=pc(d),S=[];for(var E in d)E=="constructor"&&(h||!Lt.call(d,E))||S.push(E);return S}function ag(d,h){return d<h}function _w(d,h){var S=-1,E=xr(d)?be(d.length):[];return Ki(d,function(P,H,J){E[++S]=h(P,H,J)}),E}function Ew(d){var h=Cg(d);return h.length==1&&h[0][2]?sT(h[0][0],h[0][1]):function(S){return S===d||ig(S,d,h)}}function kw(d,h){return Tg(d)&&iT(h)?sT(jo(d),h):function(S){var E=Pg(S,d);return E===n&&E===h?Ng(S,d):uc(h,E,b|y)}}function Ld(d,h,S,E,P){d!==h&&tg(h,function(H,J){if(P||(P=new vo),sn(H))L5(d,h,J,S,Ld,E,P);else{var ee=E?E(Eg(d,J),H,J+"",d,h,P):n;ee===n&&(ee=H),Qm(d,J,ee)}},Sr)}function L5(d,h,S,E,P,H,J){var ee=Eg(d,S),le=Eg(h,S),Ee=J.get(le);if(Ee){Qm(d,S,Ee);return}var ke=H?H(ee,le,S+"",d,h,J):n,De=ke===n;if(De){var Fe=ft(le),Ye=!Fe&&Xi(le),it=!Fe&&!Ye&&Ka(le);ke=le,Fe||Ye||it?ft(ee)?ke=ee:xn(ee)?ke=vr(ee):Ye?(De=!1,ke=Fw(le,!0)):it?(De=!1,ke=Bw(le,!0)):ke=[]:mc(le)||zs(le)?(ke=ee,zs(ee)?ke=LT(ee):(!sn(ee)||di(ee))&&(ke=oT(le))):De=!1}De&&(J.set(le,ke),P(ke,le,E,H,J),J.delete(le)),Qm(d,S,ke)}function Ow(d,h){var S=d.length;if(S)return h+=h<0?S:0,ui(h,S)?d[h]:n}function Mw(d,h,S){h.length?h=nn(h,function(H){return ft(H)?function(J){return Fs(J,H.length===1?H[0]:H)}:H}):h=[Cr];var E=-1;h=nn(h,Dr(ot()));var P=_w(d,function(H,J,ee){var le=nn(h,function(Ee){return Ee(H)});return{criteria:le,index:++E,value:H}});return cB(P,function(H,J){return Y5(H,J,S)})}function j5(d,h){return Aw(d,h,function(S,E){return Ng(d,E)})}function Aw(d,h,S){for(var E=-1,P=h.length,H={};++E<P;){var J=h[E],ee=Fs(d,J);S(ee,J)&&dc(H,Yi(J,d),ee)}return H}function $5(d){return function(h){return Fs(h,d)}}function lg(d,h,S,E){var P=E?lB:La,H=-1,J=h.length,ee=d;for(d===h&&(h=vr(h)),S&&(ee=nn(d,Dr(S)));++H<J;)for(var le=0,Ee=h[H],ke=S?S(Ee):Ee;(le=P(ee,ke,le,E))>-1;)ee!==d&&Ed.call(ee,le,1),Ed.call(d,le,1);return d}function Rw(d,h){for(var S=d?h.length:0,E=S-1;S--;){var P=h[S];if(S==E||P!==H){var H=P;ui(P)?Ed.call(d,P,1):fg(d,P)}}return d}function cg(d,h){return d+Md(dw()*(h-d+1))}function F5(d,h,S,E){for(var P=-1,H=In(Od((h-d)/(S||1)),0),J=be(H);H--;)J[E?H:++P]=d,d+=S;return J}function ug(d,h){var S="";if(!d||h<1||h>K)return S;do h%2&&(S+=d),h=Md(h/2),h&&(d+=d);while(h);return S}function yt(d,h){return kg(aT(d,h,Cr),d+"")}function B5(d){return hw(Ga(d))}function V5(d,h){var S=Ga(d);return Ud(S,$s(h,0,S.length))}function dc(d,h,S,E){if(!sn(d))return d;h=Yi(h,d);for(var P=-1,H=h.length,J=H-1,ee=d;ee!=null&&++P<H;){var le=jo(h[P]),Ee=S;if(le==="__proto__"||le==="constructor"||le==="prototype")return d;if(P!=J){var ke=ee[le];Ee=E?E(ke,le,ee):n,Ee===n&&(Ee=sn(ke)?ke:ui(h[P+1])?[]:{})}ac(ee,le,Ee),ee=ee[le]}return d}var Iw=Ad?function(d,h){return Ad.set(d,h),d}:Cr,z5=kd?function(d,h){return kd(d,"toString",{configurable:!0,enumerable:!1,value:jg(h),writable:!0})}:Cr;function H5(d){return Ud(Ga(d))}function Xr(d,h,S){var E=-1,P=d.length;h<0&&(h=-h>P?0:P+h),S=S>P?P:S,S<0&&(S+=P),P=h>S?0:S-h>>>0,h>>>=0;for(var H=be(P);++E<P;)H[E]=d[E+h];return H}function W5(d,h){var S;return Ki(d,function(E,P,H){return S=h(E,P,H),!S}),!!S}function jd(d,h,S){var E=0,P=d==null?E:d.length;if(typeof h=="number"&&h===h&&P<=he){for(;E<P;){var H=E+P>>>1,J=d[H];J!==null&&!Nr(J)&&(S?J<=h:J<h)?E=H+1:P=H}return P}return dg(d,h,Cr,S)}function dg(d,h,S,E){var P=0,H=d==null?0:d.length;if(H===0)return 0;h=S(h);for(var J=h!==h,ee=h===null,le=Nr(h),Ee=h===n;P<H;){var ke=Md((P+H)/2),De=S(d[ke]),Fe=De!==n,Ye=De===null,it=De===De,ht=Nr(De);if(J)var st=E||it;else Ee?st=it&&(E||Fe):ee?st=it&&Fe&&(E||!Ye):le?st=it&&Fe&&!Ye&&(E||!ht):Ye||ht?st=!1:st=E?De<=h:De<h;st?P=ke+1:H=ke}return Jn(H,me)}function Dw(d,h){for(var S=-1,E=d.length,P=0,H=[];++S<E;){var J=d[S],ee=h?h(J):J;if(!S||!xo(ee,le)){var le=ee;H[P++]=J===0?0:J}}return H}function Pw(d){return typeof d=="number"?d:Nr(d)?G:+d}function Pr(d){if(typeof d=="string")return d;if(ft(d))return nn(d,Pr)+"";if(Nr(d))return fw?fw.call(d):"";var h=d+"";return h=="0"&&1/d==-U?"-0":h}function Gi(d,h,S){var E=-1,P=gd,H=d.length,J=!0,ee=[],le=ee;if(S)J=!1,P=Bm;else if(H>=o){var Ee=h?null:tV(d);if(Ee)return bd(Ee);J=!1,P=tc,le=new js}else le=h?[]:ee;e:for(;++E<H;){var ke=d[E],De=h?h(ke):ke;if(ke=S||ke!==0?ke:0,J&&De===De){for(var Fe=le.length;Fe--;)if(le[Fe]===De)continue e;h&&le.push(De),ee.push(ke)}else P(le,De,S)||(le!==ee&&le.push(De),ee.push(ke))}return ee}function fg(d,h){return h=Yi(h,d),d=lT(d,h),d==null||delete d[jo(Zr(h))]}function Nw(d,h,S,E){return dc(d,h,S(Fs(d,h)),E)}function $d(d,h,S,E){for(var P=d.length,H=E?P:-1;(E?H--:++H<P)&&h(d[H],H,d););return S?Xr(d,E?0:H,E?H+1:P):Xr(d,E?H+1:0,E?P:H)}function Lw(d,h){var S=d;return S instanceof xt&&(S=S.value()),Vm(h,function(E,P){return P.func.apply(P.thisArg,Wi([E],P.args))},S)}function pg(d,h,S){var E=d.length;if(E<2)return E?Gi(d[0]):[];for(var P=-1,H=be(E);++P<E;)for(var J=d[P],ee=-1;++ee<E;)ee!=P&&(H[P]=lc(H[P]||J,d[ee],h,S));return Gi(Wn(H,1),h,S)}function jw(d,h,S){for(var E=-1,P=d.length,H=h.length,J={};++E<P;){var ee=E<H?h[E]:n;S(J,d[E],ee)}return J}function hg(d){return xn(d)?d:[]}function mg(d){return typeof d=="function"?d:Cr}function Yi(d,h){return ft(d)?d:Tg(d,h)?[d]:fT(Rt(d))}var q5=yt;function Ji(d,h,S){var E=d.length;return S=S===n?E:S,!h&&S>=E?d:Xr(d,h,S)}var $w=IB||function(d){return Hn.clearTimeout(d)};function Fw(d,h){if(h)return d.slice();var S=d.length,E=sw?sw(S):new d.constructor(S);return d.copy(E),E}function gg(d){var h=new d.constructor(d.byteLength);return new Td(h).set(new Td(d)),h}function U5(d,h){var S=h?gg(d.buffer):d.buffer;return new d.constructor(S,d.byteOffset,d.byteLength)}function K5(d){var h=new d.constructor(d.source,CC.exec(d));return h.lastIndex=d.lastIndex,h}function G5(d){return sc?Vt(sc.call(d)):{}}function Bw(d,h){var S=h?gg(d.buffer):d.buffer;return new d.constructor(S,d.byteOffset,d.length)}function Vw(d,h){if(d!==h){var S=d!==n,E=d===null,P=d===d,H=Nr(d),J=h!==n,ee=h===null,le=h===h,Ee=Nr(h);if(!ee&&!Ee&&!H&&d>h||H&&J&&le&&!ee&&!Ee||E&&J&&le||!S&&le||!P)return 1;if(!E&&!H&&!Ee&&d<h||Ee&&S&&P&&!E&&!H||ee&&S&&P||!J&&P||!le)return-1}return 0}function Y5(d,h,S){for(var E=-1,P=d.criteria,H=h.criteria,J=P.length,ee=S.length;++E<J;){var le=Vw(P[E],H[E]);if(le){if(E>=ee)return le;var Ee=S[E];return le*(Ee=="desc"?-1:1)}}return d.index-h.index}function zw(d,h,S,E){for(var P=-1,H=d.length,J=S.length,ee=-1,le=h.length,Ee=In(H-J,0),ke=be(le+Ee),De=!E;++ee<le;)ke[ee]=h[ee];for(;++P<J;)(De||P<H)&&(ke[S[P]]=d[P]);for(;Ee--;)ke[ee++]=d[P++];return ke}function Hw(d,h,S,E){for(var P=-1,H=d.length,J=-1,ee=S.length,le=-1,Ee=h.length,ke=In(H-ee,0),De=be(ke+Ee),Fe=!E;++P<ke;)De[P]=d[P];for(var Ye=P;++le<Ee;)De[Ye+le]=h[le];for(;++J<ee;)(Fe||P<H)&&(De[Ye+S[J]]=d[P++]);return De}function vr(d,h){var S=-1,E=d.length;for(h||(h=be(E));++S<E;)h[S]=d[S];return h}function Lo(d,h,S,E){var P=!S;S||(S={});for(var H=-1,J=h.length;++H<J;){var ee=h[H],le=E?E(S[ee],d[ee],ee,S,d):n;le===n&&(le=d[ee]),P?ai(S,ee,le):ac(S,ee,le)}return S}function J5(d,h){return Lo(d,wg(d),h)}function X5(d,h){return Lo(d,nT(d),h)}function Fd(d,h){return function(S,E){var P=ft(S)?nB:v5,H=h?h():{};return P(S,d,ot(E,2),H)}}function Wa(d){return yt(function(h,S){var E=-1,P=S.length,H=P>1?S[P-1]:n,J=P>2?S[2]:n;for(H=d.length>3&&typeof H=="function"?(P--,H):n,J&&ar(S[0],S[1],J)&&(H=P<3?n:H,P=1),h=Vt(h);++E<P;){var ee=S[E];ee&&d(h,ee,E,H)}return h})}function Ww(d,h){return function(S,E){if(S==null)return S;if(!xr(S))return d(S,E);for(var P=S.length,H=h?P:-1,J=Vt(S);(h?H--:++H<P)&&E(J[H],H,J)!==!1;);return S}}function qw(d){return function(h,S,E){for(var P=-1,H=Vt(h),J=E(h),ee=J.length;ee--;){var le=J[d?ee:++P];if(S(H[le],le,H)===!1)break}return h}}function Z5(d,h,S){var E=h&x,P=fc(d);function H(){var J=this&&this!==Hn&&this instanceof H?P:d;return J.apply(E?S:this,arguments)}return H}function Uw(d){return function(h){h=Rt(h);var S=ja(h)?bo(h):n,E=S?S[0]:h.charAt(0),P=S?Ji(S,1).join(""):h.slice(1);return E[d]()+P}}function qa(d){return function(h){return Vm(WT(HT(h).replace(zF,"")),d,"")}}function fc(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=Ha(d.prototype),E=d.apply(S,h);return sn(E)?E:S}}function Q5(d,h,S){var E=fc(d);function P(){for(var H=arguments.length,J=be(H),ee=H,le=Ua(P);ee--;)J[ee]=arguments[ee];var Ee=H<3&&J[0]!==le&&J[H-1]!==le?[]:qi(J,le);if(H-=Ee.length,H<S)return Xw(d,h,Bd,P.placeholder,n,J,Ee,n,n,S-H);var ke=this&&this!==Hn&&this instanceof P?E:d;return Ir(ke,this,J)}return P}function Kw(d){return function(h,S,E){var P=Vt(h);if(!xr(h)){var H=ot(S,3);h=Nn(h),S=function(ee){return H(P[ee],ee,P)}}var J=d(h,S,E);return J>-1?P[H?h[J]:J]:n}}function Gw(d){return ci(function(h){var S=h.length,E=S,P=Yr.prototype.thru;for(d&&h.reverse();E--;){var H=h[E];if(typeof H!="function")throw new Gr(s);if(P&&!J&&Wd(H)=="wrapper")var J=new Yr([],!0)}for(E=J?E:S;++E<S;){H=h[E];var ee=Wd(H),le=ee=="wrapper"?Sg(H):n;le&&_g(le[0])&&le[1]==(A|T|k|R)&&!le[4].length&&le[9]==1?J=J[Wd(le[0])].apply(J,le[3]):J=H.length==1&&_g(H)?J[ee]():J.thru(H)}return function(){var Ee=arguments,ke=Ee[0];if(J&&Ee.length==1&&ft(ke))return J.plant(ke).value();for(var De=0,Fe=S?h[De].apply(this,Ee):ke;++De<S;)Fe=h[De].call(this,Fe);return Fe}})}function Bd(d,h,S,E,P,H,J,ee,le,Ee){var ke=h&A,De=h&x,Fe=h&C,Ye=h&(T|w),it=h&N,ht=Fe?n:fc(d);function st(){for(var bt=arguments.length,Ct=be(bt),Lr=bt;Lr--;)Ct[Lr]=arguments[Lr];if(Ye)var lr=Ua(st),jr=dB(Ct,lr);if(E&&(Ct=zw(Ct,E,P,Ye)),H&&(Ct=Hw(Ct,H,J,Ye)),bt-=jr,Ye&&bt<Ee){var Sn=qi(Ct,lr);return Xw(d,h,Bd,st.placeholder,S,Ct,Sn,ee,le,Ee-bt)}var So=De?S:this,pi=Fe?So[d]:d;return bt=Ct.length,ee?Ct=vV(Ct,ee):it&&bt>1&&Ct.reverse(),ke&&le<bt&&(Ct.length=le),this&&this!==Hn&&this instanceof st&&(pi=ht||fc(pi)),pi.apply(So,Ct)}return st}function Yw(d,h){return function(S,E){return k5(S,d,h(E),{})}}function Vd(d,h){return function(S,E){var P;if(S===n&&E===n)return h;if(S!==n&&(P=S),E!==n){if(P===n)return E;typeof S=="string"||typeof E=="string"?(S=Pr(S),E=Pr(E)):(S=Pw(S),E=Pw(E)),P=d(S,E)}return P}}function yg(d){return ci(function(h){return h=nn(h,Dr(ot())),yt(function(S){var E=this;return d(h,function(P){return Ir(P,E,S)})})})}function zd(d,h){h=h===n?" ":Pr(h);var S=h.length;if(S<2)return S?ug(h,d):h;var E=ug(h,Od(d/$a(h)));return ja(h)?Ji(bo(E),0,d).join(""):E.slice(0,d)}function eV(d,h,S,E){var P=h&x,H=fc(d);function J(){for(var ee=-1,le=arguments.length,Ee=-1,ke=E.length,De=be(ke+le),Fe=this&&this!==Hn&&this instanceof J?H:d;++Ee<ke;)De[Ee]=E[Ee];for(;le--;)De[Ee++]=arguments[++ee];return Ir(Fe,P?S:this,De)}return J}function Jw(d){return function(h,S,E){return E&&typeof E!="number"&&ar(h,S,E)&&(S=E=n),h=fi(h),S===n?(S=h,h=0):S=fi(S),E=E===n?h<S?1:-1:fi(E),F5(h,S,E,d)}}function Hd(d){return function(h,S){return typeof h=="string"&&typeof S=="string"||(h=Qr(h),S=Qr(S)),d(h,S)}}function Xw(d,h,S,E,P,H,J,ee,le,Ee){var ke=h&T,De=ke?J:n,Fe=ke?n:J,Ye=ke?H:n,it=ke?n:H;h|=ke?k:M,h&=~(ke?M:k),h&_||(h&=-4);var ht=[d,h,P,Ye,De,it,Fe,ee,le,Ee],st=S.apply(n,ht);return _g(d)&&cT(st,ht),st.placeholder=E,uT(st,d,h)}function bg(d){var h=Rn[d];return function(S,E){if(S=Qr(S),E=E==null?0:Jn(pt(E),292),E&&uw(S)){var P=(Rt(S)+"e").split("e"),H=h(P[0]+"e"+(+P[1]+E));return P=(Rt(H)+"e").split("e"),+(P[0]+"e"+(+P[1]-E))}return h(S)}}var tV=Va&&1/bd(new Va([,-0]))[1]==U?function(d){return new Va(d)}:Bg;function Zw(d){return function(h){var S=Xn(h);return S==fe?Gm(h):S==te?bB(h):uB(h,d(h))}}function li(d,h,S,E,P,H,J,ee){var le=h&C;if(!le&&typeof d!="function")throw new Gr(s);var Ee=E?E.length:0;if(Ee||(h&=-97,E=P=n),J=J===n?J:In(pt(J),0),ee=ee===n?ee:pt(ee),Ee-=P?P.length:0,h&M){var ke=E,De=P;E=P=n}var Fe=le?n:Sg(d),Ye=[d,h,S,E,P,ke,De,H,J,ee];if(Fe&&gV(Ye,Fe),d=Ye[0],h=Ye[1],S=Ye[2],E=Ye[3],P=Ye[4],ee=Ye[9]=Ye[9]===n?le?0:d.length:In(Ye[9]-Ee,0),!ee&&h&(T|w)&&(h&=-25),!h||h==x)var it=Z5(d,h,S);else h==T||h==w?it=Q5(d,h,ee):(h==k||h==(x|k))&&!P.length?it=eV(d,h,S,E):it=Bd.apply(n,Ye);var ht=Fe?Iw:cT;return uT(ht(it,Ye),d,h)}function Qw(d,h,S,E){return d===n||xo(d,Ba[S])&&!Lt.call(E,S)?h:d}function eT(d,h,S,E,P,H){return sn(d)&&sn(h)&&(H.set(h,d),Ld(d,h,n,eT,H),H.delete(h)),d}function nV(d){return mc(d)?n:d}function tT(d,h,S,E,P,H){var J=S&b,ee=d.length,le=h.length;if(ee!=le&&!(J&&le>ee))return!1;var Ee=H.get(d),ke=H.get(h);if(Ee&&ke)return Ee==h&&ke==d;var De=-1,Fe=!0,Ye=S&y?new js:n;for(H.set(d,h),H.set(h,d);++De<ee;){var it=d[De],ht=h[De];if(E)var st=J?E(ht,it,De,h,d,H):E(it,ht,De,d,h,H);if(st!==n){if(st)continue;Fe=!1;break}if(Ye){if(!zm(h,function(bt,Ct){if(!tc(Ye,Ct)&&(it===bt||P(it,bt,S,E,H)))return Ye.push(Ct)})){Fe=!1;break}}else if(!(it===ht||P(it,ht,S,E,H))){Fe=!1;break}}return H.delete(d),H.delete(h),Fe}function rV(d,h,S,E,P,H,J){switch(S){case tt:if(d.byteLength!=h.byteLength||d.byteOffset!=h.byteOffset)return!1;d=d.buffer,h=h.buffer;case rt:return!(d.byteLength!=h.byteLength||!H(new Td(d),new Td(h)));case X:case Q:case xe:return xo(+d,+h);case ve:return d.name==h.name&&d.message==h.message;case W:case re:return d==h+"";case fe:var ee=Gm;case te:var le=E&b;if(ee||(ee=bd),d.size!=h.size&&!le)return!1;var Ee=J.get(d);if(Ee)return Ee==h;E|=y,J.set(d,h);var ke=tT(ee(d),ee(h),E,P,H,J);return J.delete(d),ke;case Oe:if(sc)return sc.call(d)==sc.call(h)}return!1}function oV(d,h,S,E,P,H){var J=S&b,ee=vg(d),le=ee.length,Ee=vg(h),ke=Ee.length;if(le!=ke&&!J)return!1;for(var De=le;De--;){var Fe=ee[De];if(!(J?Fe in h:Lt.call(h,Fe)))return!1}var Ye=H.get(d),it=H.get(h);if(Ye&&it)return Ye==h&&it==d;var ht=!0;H.set(d,h),H.set(h,d);for(var st=J;++De<le;){Fe=ee[De];var bt=d[Fe],Ct=h[Fe];if(E)var Lr=J?E(Ct,bt,Fe,h,d,H):E(bt,Ct,Fe,d,h,H);if(!(Lr===n?bt===Ct||P(bt,Ct,S,E,H):Lr)){ht=!1;break}st||(st=Fe=="constructor")}if(ht&&!st){var lr=d.constructor,jr=h.constructor;lr!=jr&&"constructor"in d&&"constructor"in h&&!(typeof lr=="function"&&lr instanceof lr&&typeof jr=="function"&&jr instanceof jr)&&(ht=!1)}return H.delete(d),H.delete(h),ht}function ci(d){return kg(aT(d,n,gT),d+"")}function vg(d){return Sw(d,Nn,wg)}function xg(d){return Sw(d,Sr,nT)}var Sg=Ad?function(d){return Ad.get(d)}:Bg;function Wd(d){for(var h=d.name+"",S=za[h],E=Lt.call(za,h)?S.length:0;E--;){var P=S[E],H=P.func;if(H==null||H==d)return P.name}return h}function Ua(d){var h=Lt.call(z,"placeholder")?z:d;return h.placeholder}function ot(){var d=z.iteratee||$g;return d=d===$g?Tw:d,arguments.length?d(arguments[0],arguments[1]):d}function qd(d,h){var S=d.__data__;return fV(h)?S[typeof h=="string"?"string":"hash"]:S.map}function Cg(d){for(var h=Nn(d),S=h.length;S--;){var E=h[S],P=d[E];h[S]=[E,P,iT(P)]}return h}function Bs(d,h){var S=mB(d,h);return ww(S)?S:n}function iV(d){var h=Lt.call(d,Ns),S=d[Ns];try{d[Ns]=n;var E=!0}catch{}var P=Cd.call(d);return E&&(h?d[Ns]=S:delete d[Ns]),P}var wg=Jm?function(d){return d==null?[]:(d=Vt(d),Hi(Jm(d),function(h){return lw.call(d,h)}))}:Vg,nT=Jm?function(d){for(var h=[];d;)Wi(h,wg(d)),d=_d(d);return h}:Vg,Xn=sr;(Xm&&Xn(new Xm(new ArrayBuffer(1)))!=tt||rc&&Xn(new rc)!=fe||Zm&&Xn(Zm.resolve())!=Pe||Va&&Xn(new Va)!=te||oc&&Xn(new oc)!=Ie)&&(Xn=function(d){var h=sr(d),S=h==Te?d.constructor:n,E=S?Vs(S):"";if(E)switch(E){case VB:return tt;case zB:return fe;case HB:return Pe;case WB:return te;case qB:return Ie}return h});function sV(d,h,S){for(var E=-1,P=S.length;++E<P;){var H=S[E],J=H.size;switch(H.type){case"drop":d+=J;break;case"dropRight":h-=J;break;case"take":h=Jn(h,d+J);break;case"takeRight":d=In(d,h-J);break}}return{start:d,end:h}}function aV(d){var h=d.match(pF);return h?h[1].split(hF):[]}function rT(d,h,S){h=Yi(h,d);for(var E=-1,P=h.length,H=!1;++E<P;){var J=jo(h[E]);if(!(H=d!=null&&S(d,J)))break;d=d[J]}return H||++E!=P?H:(P=d==null?0:d.length,!!P&&Zd(P)&&ui(J,P)&&(ft(d)||zs(d)))}function lV(d){var h=d.length,S=new d.constructor(h);return h&&typeof d[0]=="string"&&Lt.call(d,"index")&&(S.index=d.index,S.input=d.input),S}function oT(d){return typeof d.constructor=="function"&&!pc(d)?Ha(_d(d)):{}}function cV(d,h,S){var E=d.constructor;switch(h){case rt:return gg(d);case X:case Q:return new E(+d);case tt:return U5(d,S);case kt:case vn:case ct:case An:case Nt:case pe:case He:case Me:case We:return Bw(d,S);case fe:return new E;case xe:case re:return new E(d);case W:return K5(d);case te:return new E;case Oe:return G5(d)}}function uV(d,h){var S=h.length;if(!S)return d;var E=S-1;return h[E]=(S>1?"& ":"")+h[E],h=h.join(S>2?", ":" "),d.replace(fF,`{
|
|
88
|
+
/* [wrapped with `+h+`] */
|
|
89
|
+
`)}function dV(d){return ft(d)||zs(d)||!!(cw&&d&&d[cw])}function ui(d,h){var S=typeof d;return h=h??K,!!h&&(S=="number"||S!="symbol"&&wF.test(d))&&d>-1&&d%1==0&&d<h}function ar(d,h,S){if(!sn(S))return!1;var E=typeof h;return(E=="number"?xr(S)&&ui(h,S.length):E=="string"&&h in S)?xo(S[h],d):!1}function Tg(d,h){if(ft(d))return!1;var S=typeof d;return S=="number"||S=="symbol"||S=="boolean"||d==null||Nr(d)?!0:Pa.test(d)||!ec.test(d)||h!=null&&d in Vt(h)}function fV(d){var h=typeof d;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?d!=="__proto__":d===null}function _g(d){var h=Wd(d),S=z[h];if(typeof S!="function"||!(h in xt.prototype))return!1;if(d===S)return!0;var E=Sg(S);return!!E&&d===E[0]}function pV(d){return!!iw&&iw in d}var hV=xd?di:zg;function pc(d){var h=d&&d.constructor,S=typeof h=="function"&&h.prototype||Ba;return d===S}function iT(d){return d===d&&!sn(d)}function sT(d,h){return function(S){return S==null?!1:S[d]===h&&(h!==n||d in Vt(S))}}function mV(d){var h=Jd(d,function(E){return S.size===u&&S.clear(),E}),S=h.cache;return h}function gV(d,h){var S=d[1],E=h[1],P=S|E,H=P<(x|C|A),J=E==A&&S==T||E==A&&S==R&&d[7].length<=h[8]||E==(A|R)&&h[7].length<=h[8]&&S==T;if(!(H||J))return d;E&x&&(d[2]=h[2],P|=S&x?0:_);var ee=h[3];if(ee){var le=d[3];d[3]=le?zw(le,ee,h[4]):ee,d[4]=le?qi(d[3],f):h[4]}return ee=h[5],ee&&(le=d[5],d[5]=le?Hw(le,ee,h[6]):ee,d[6]=le?qi(d[5],f):h[6]),ee=h[7],ee&&(d[7]=ee),E&A&&(d[8]=d[8]==null?h[8]:Jn(d[8],h[8])),d[9]==null&&(d[9]=h[9]),d[0]=h[0],d[1]=P,d}function yV(d){var h=[];if(d!=null)for(var S in Vt(d))h.push(S);return h}function bV(d){return Cd.call(d)}function aT(d,h,S){return h=In(h===n?d.length-1:h,0),function(){for(var E=arguments,P=-1,H=In(E.length-h,0),J=be(H);++P<H;)J[P]=E[h+P];P=-1;for(var ee=be(h+1);++P<h;)ee[P]=E[P];return ee[h]=S(J),Ir(d,this,ee)}}function lT(d,h){return h.length<2?d:Fs(d,Xr(h,0,-1))}function vV(d,h){for(var S=d.length,E=Jn(h.length,S),P=vr(d);E--;){var H=h[E];d[E]=ui(H,S)?P[H]:n}return d}function Eg(d,h){if(!(h==="constructor"&&typeof d[h]=="function")&&h!="__proto__")return d[h]}var cT=dT(Iw),hc=PB||function(d,h){return Hn.setTimeout(d,h)},kg=dT(z5);function uT(d,h,S){var E=h+"";return kg(d,uV(E,xV(aV(E),S)))}function dT(d){var h=0,S=0;return function(){var E=$B(),P=B-(E-S);if(S=E,P>0){if(++h>=L)return arguments[0]}else h=0;return d.apply(n,arguments)}}function Ud(d,h){var S=-1,E=d.length,P=E-1;for(h=h===n?E:h;++S<h;){var H=cg(S,P),J=d[H];d[H]=d[S],d[S]=J}return d.length=h,d}var fT=mV(function(d){var h=[];return d.charCodeAt(0)===46&&h.push(""),d.replace(cF,function(S,E,P,H){h.push(P?H.replace(yF,"$1"):E||S)}),h});function jo(d){if(typeof d=="string"||Nr(d))return d;var h=d+"";return h=="0"&&1/d==-U?"-0":h}function Vs(d){if(d!=null){try{return Sd.call(d)}catch{}try{return d+""}catch{}}return""}function xV(d,h){return Kr(ge,function(S){var E="_."+S[0];h&S[1]&&!gd(d,E)&&d.push(E)}),d.sort()}function pT(d){if(d instanceof xt)return d.clone();var h=new Yr(d.__wrapped__,d.__chain__);return h.__actions__=vr(d.__actions__),h.__index__=d.__index__,h.__values__=d.__values__,h}function SV(d,h,S){(S?ar(d,h,S):h===n)?h=1:h=In(pt(h),0);var E=d==null?0:d.length;if(!E||h<1)return[];for(var P=0,H=0,J=be(Od(E/h));P<E;)J[H++]=Xr(d,P,P+=h);return J}function CV(d){for(var h=-1,S=d==null?0:d.length,E=0,P=[];++h<S;){var H=d[h];H&&(P[E++]=H)}return P}function wV(){var d=arguments.length;if(!d)return[];for(var h=be(d-1),S=arguments[0],E=d;E--;)h[E-1]=arguments[E];return Wi(ft(S)?vr(S):[S],Wn(h,1))}var TV=yt(function(d,h){return xn(d)?lc(d,Wn(h,1,xn,!0)):[]}),_V=yt(function(d,h){var S=Zr(h);return xn(S)&&(S=n),xn(d)?lc(d,Wn(h,1,xn,!0),ot(S,2)):[]}),EV=yt(function(d,h){var S=Zr(h);return xn(S)&&(S=n),xn(d)?lc(d,Wn(h,1,xn,!0),n,S):[]});function kV(d,h,S){var E=d==null?0:d.length;return E?(h=S||h===n?1:pt(h),Xr(d,h<0?0:h,E)):[]}function OV(d,h,S){var E=d==null?0:d.length;return E?(h=S||h===n?1:pt(h),h=E-h,Xr(d,0,h<0?0:h)):[]}function MV(d,h){return d&&d.length?$d(d,ot(h,3),!0,!0):[]}function AV(d,h){return d&&d.length?$d(d,ot(h,3),!0):[]}function RV(d,h,S,E){var P=d==null?0:d.length;return P?(S&&typeof S!="number"&&ar(d,h,S)&&(S=0,E=P),w5(d,h,S,E)):[]}function hT(d,h,S){var E=d==null?0:d.length;if(!E)return-1;var P=S==null?0:pt(S);return P<0&&(P=In(E+P,0)),yd(d,ot(h,3),P)}function mT(d,h,S){var E=d==null?0:d.length;if(!E)return-1;var P=E-1;return S!==n&&(P=pt(S),P=S<0?In(E+P,0):Jn(P,E-1)),yd(d,ot(h,3),P,!0)}function gT(d){var h=d==null?0:d.length;return h?Wn(d,1):[]}function IV(d){var h=d==null?0:d.length;return h?Wn(d,U):[]}function DV(d,h){var S=d==null?0:d.length;return S?(h=h===n?1:pt(h),Wn(d,h)):[]}function PV(d){for(var h=-1,S=d==null?0:d.length,E={};++h<S;){var P=d[h];E[P[0]]=P[1]}return E}function yT(d){return d&&d.length?d[0]:n}function NV(d,h,S){var E=d==null?0:d.length;if(!E)return-1;var P=S==null?0:pt(S);return P<0&&(P=In(E+P,0)),La(d,h,P)}function LV(d){var h=d==null?0:d.length;return h?Xr(d,0,-1):[]}var jV=yt(function(d){var h=nn(d,hg);return h.length&&h[0]===d[0]?og(h):[]}),$V=yt(function(d){var h=Zr(d),S=nn(d,hg);return h===Zr(S)?h=n:S.pop(),S.length&&S[0]===d[0]?og(S,ot(h,2)):[]}),FV=yt(function(d){var h=Zr(d),S=nn(d,hg);return h=typeof h=="function"?h:n,h&&S.pop(),S.length&&S[0]===d[0]?og(S,n,h):[]});function BV(d,h){return d==null?"":LB.call(d,h)}function Zr(d){var h=d==null?0:d.length;return h?d[h-1]:n}function VV(d,h,S){var E=d==null?0:d.length;if(!E)return-1;var P=E;return S!==n&&(P=pt(S),P=P<0?In(E+P,0):Jn(P,E-1)),h===h?xB(d,h,P):yd(d,XC,P,!0)}function zV(d,h){return d&&d.length?Ow(d,pt(h)):n}var HV=yt(bT);function bT(d,h){return d&&d.length&&h&&h.length?lg(d,h):d}function WV(d,h,S){return d&&d.length&&h&&h.length?lg(d,h,ot(S,2)):d}function qV(d,h,S){return d&&d.length&&h&&h.length?lg(d,h,n,S):d}var UV=ci(function(d,h){var S=d==null?0:d.length,E=eg(d,h);return Rw(d,nn(h,function(P){return ui(P,S)?+P:P}).sort(Vw)),E});function KV(d,h){var S=[];if(!(d&&d.length))return S;var E=-1,P=[],H=d.length;for(h=ot(h,3);++E<H;){var J=d[E];h(J,E,d)&&(S.push(J),P.push(E))}return Rw(d,P),S}function Og(d){return d==null?d:BB.call(d)}function GV(d,h,S){var E=d==null?0:d.length;return E?(S&&typeof S!="number"&&ar(d,h,S)?(h=0,S=E):(h=h==null?0:pt(h),S=S===n?E:pt(S)),Xr(d,h,S)):[]}function YV(d,h){return jd(d,h)}function JV(d,h,S){return dg(d,h,ot(S,2))}function XV(d,h){var S=d==null?0:d.length;if(S){var E=jd(d,h);if(E<S&&xo(d[E],h))return E}return-1}function ZV(d,h){return jd(d,h,!0)}function QV(d,h,S){return dg(d,h,ot(S,2),!0)}function e3(d,h){var S=d==null?0:d.length;if(S){var E=jd(d,h,!0)-1;if(xo(d[E],h))return E}return-1}function t3(d){return d&&d.length?Dw(d):[]}function n3(d,h){return d&&d.length?Dw(d,ot(h,2)):[]}function r3(d){var h=d==null?0:d.length;return h?Xr(d,1,h):[]}function o3(d,h,S){return d&&d.length?(h=S||h===n?1:pt(h),Xr(d,0,h<0?0:h)):[]}function i3(d,h,S){var E=d==null?0:d.length;return E?(h=S||h===n?1:pt(h),h=E-h,Xr(d,h<0?0:h,E)):[]}function s3(d,h){return d&&d.length?$d(d,ot(h,3),!1,!0):[]}function a3(d,h){return d&&d.length?$d(d,ot(h,3)):[]}var l3=yt(function(d){return Gi(Wn(d,1,xn,!0))}),c3=yt(function(d){var h=Zr(d);return xn(h)&&(h=n),Gi(Wn(d,1,xn,!0),ot(h,2))}),u3=yt(function(d){var h=Zr(d);return h=typeof h=="function"?h:n,Gi(Wn(d,1,xn,!0),n,h)});function d3(d){return d&&d.length?Gi(d):[]}function f3(d,h){return d&&d.length?Gi(d,ot(h,2)):[]}function p3(d,h){return h=typeof h=="function"?h:n,d&&d.length?Gi(d,n,h):[]}function Mg(d){if(!(d&&d.length))return[];var h=0;return d=Hi(d,function(S){if(xn(S))return h=In(S.length,h),!0}),Um(h,function(S){return nn(d,Hm(S))})}function vT(d,h){if(!(d&&d.length))return[];var S=Mg(d);return h==null?S:nn(S,function(E){return Ir(h,n,E)})}var h3=yt(function(d,h){return xn(d)?lc(d,h):[]}),m3=yt(function(d){return pg(Hi(d,xn))}),g3=yt(function(d){var h=Zr(d);return xn(h)&&(h=n),pg(Hi(d,xn),ot(h,2))}),y3=yt(function(d){var h=Zr(d);return h=typeof h=="function"?h:n,pg(Hi(d,xn),n,h)}),b3=yt(Mg);function v3(d,h){return jw(d||[],h||[],ac)}function x3(d,h){return jw(d||[],h||[],dc)}var S3=yt(function(d){var h=d.length,S=h>1?d[h-1]:n;return S=typeof S=="function"?(d.pop(),S):n,vT(d,S)});function xT(d){var h=z(d);return h.__chain__=!0,h}function C3(d,h){return h(d),d}function Kd(d,h){return h(d)}var w3=ci(function(d){var h=d.length,S=h?d[0]:0,E=this.__wrapped__,P=function(H){return eg(H,d)};return h>1||this.__actions__.length||!(E instanceof xt)||!ui(S)?this.thru(P):(E=E.slice(S,+S+(h?1:0)),E.__actions__.push({func:Kd,args:[P],thisArg:n}),new Yr(E,this.__chain__).thru(function(H){return h&&!H.length&&H.push(n),H}))});function T3(){return xT(this)}function _3(){return new Yr(this.value(),this.__chain__)}function E3(){this.__values__===n&&(this.__values__=PT(this.value()));var d=this.__index__>=this.__values__.length,h=d?n:this.__values__[this.__index__++];return{done:d,value:h}}function k3(){return this}function O3(d){for(var h,S=this;S instanceof Id;){var E=pT(S);E.__index__=0,E.__values__=n,h?P.__wrapped__=E:h=E;var P=E;S=S.__wrapped__}return P.__wrapped__=d,h}function M3(){var d=this.__wrapped__;if(d instanceof xt){var h=d;return this.__actions__.length&&(h=new xt(this)),h=h.reverse(),h.__actions__.push({func:Kd,args:[Og],thisArg:n}),new Yr(h,this.__chain__)}return this.thru(Og)}function A3(){return Lw(this.__wrapped__,this.__actions__)}var R3=Fd(function(d,h,S){Lt.call(d,S)?++d[S]:ai(d,S,1)});function I3(d,h,S){var E=ft(d)?YC:C5;return S&&ar(d,h,S)&&(h=n),E(d,ot(h,3))}function D3(d,h){var S=ft(d)?Hi:vw;return S(d,ot(h,3))}var P3=Kw(hT),N3=Kw(mT);function L3(d,h){return Wn(Gd(d,h),1)}function j3(d,h){return Wn(Gd(d,h),U)}function $3(d,h,S){return S=S===n?1:pt(S),Wn(Gd(d,h),S)}function ST(d,h){var S=ft(d)?Kr:Ki;return S(d,ot(h,3))}function CT(d,h){var S=ft(d)?rB:bw;return S(d,ot(h,3))}var F3=Fd(function(d,h,S){Lt.call(d,S)?d[S].push(h):ai(d,S,[h])});function B3(d,h,S,E){d=xr(d)?d:Ga(d),S=S&&!E?pt(S):0;var P=d.length;return S<0&&(S=In(P+S,0)),Qd(d)?S<=P&&d.indexOf(h,S)>-1:!!P&&La(d,h,S)>-1}var V3=yt(function(d,h,S){var E=-1,P=typeof h=="function",H=xr(d)?be(d.length):[];return Ki(d,function(J){H[++E]=P?Ir(h,J,S):cc(J,h,S)}),H}),z3=Fd(function(d,h,S){ai(d,S,h)});function Gd(d,h){var S=ft(d)?nn:_w;return S(d,ot(h,3))}function H3(d,h,S,E){return d==null?[]:(ft(h)||(h=h==null?[]:[h]),S=E?n:S,ft(S)||(S=S==null?[]:[S]),Mw(d,h,S))}var W3=Fd(function(d,h,S){d[S?0:1].push(h)},function(){return[[],[]]});function q3(d,h,S){var E=ft(d)?Vm:QC,P=arguments.length<3;return E(d,ot(h,4),S,P,Ki)}function U3(d,h,S){var E=ft(d)?oB:QC,P=arguments.length<3;return E(d,ot(h,4),S,P,bw)}function K3(d,h){var S=ft(d)?Hi:vw;return S(d,Xd(ot(h,3)))}function G3(d){var h=ft(d)?hw:B5;return h(d)}function Y3(d,h,S){(S?ar(d,h,S):h===n)?h=1:h=pt(h);var E=ft(d)?y5:V5;return E(d,h)}function J3(d){var h=ft(d)?b5:H5;return h(d)}function X3(d){if(d==null)return 0;if(xr(d))return Qd(d)?$a(d):d.length;var h=Xn(d);return h==fe||h==te?d.size:sg(d).length}function Z3(d,h,S){var E=ft(d)?zm:W5;return S&&ar(d,h,S)&&(h=n),E(d,ot(h,3))}var Q3=yt(function(d,h){if(d==null)return[];var S=h.length;return S>1&&ar(d,h[0],h[1])?h=[]:S>2&&ar(h[0],h[1],h[2])&&(h=[h[0]]),Mw(d,Wn(h,1),[])}),Yd=DB||function(){return Hn.Date.now()};function ez(d,h){if(typeof h!="function")throw new Gr(s);return d=pt(d),function(){if(--d<1)return h.apply(this,arguments)}}function wT(d,h,S){return h=S?n:h,h=d&&h==null?d.length:h,li(d,A,n,n,n,n,h)}function TT(d,h){var S;if(typeof h!="function")throw new Gr(s);return d=pt(d),function(){return--d>0&&(S=h.apply(this,arguments)),d<=1&&(h=n),S}}var Ag=yt(function(d,h,S){var E=x;if(S.length){var P=qi(S,Ua(Ag));E|=k}return li(d,E,h,S,P)}),_T=yt(function(d,h,S){var E=x|C;if(S.length){var P=qi(S,Ua(_T));E|=k}return li(h,E,d,S,P)});function ET(d,h,S){h=S?n:h;var E=li(d,T,n,n,n,n,n,h);return E.placeholder=ET.placeholder,E}function kT(d,h,S){h=S?n:h;var E=li(d,w,n,n,n,n,n,h);return E.placeholder=kT.placeholder,E}function OT(d,h,S){var E,P,H,J,ee,le,Ee=0,ke=!1,De=!1,Fe=!0;if(typeof d!="function")throw new Gr(s);h=Qr(h)||0,sn(S)&&(ke=!!S.leading,De="maxWait"in S,H=De?In(Qr(S.maxWait)||0,h):H,Fe="trailing"in S?!!S.trailing:Fe);function Ye(Sn){var So=E,pi=P;return E=P=n,Ee=Sn,J=d.apply(pi,So),J}function it(Sn){return Ee=Sn,ee=hc(bt,h),ke?Ye(Sn):J}function ht(Sn){var So=Sn-le,pi=Sn-Ee,KT=h-So;return De?Jn(KT,H-pi):KT}function st(Sn){var So=Sn-le,pi=Sn-Ee;return le===n||So>=h||So<0||De&&pi>=H}function bt(){var Sn=Yd();if(st(Sn))return Ct(Sn);ee=hc(bt,ht(Sn))}function Ct(Sn){return ee=n,Fe&&E?Ye(Sn):(E=P=n,J)}function Lr(){ee!==n&&$w(ee),Ee=0,E=le=P=ee=n}function lr(){return ee===n?J:Ct(Yd())}function jr(){var Sn=Yd(),So=st(Sn);if(E=arguments,P=this,le=Sn,So){if(ee===n)return it(le);if(De)return $w(ee),ee=hc(bt,h),Ye(le)}return ee===n&&(ee=hc(bt,h)),J}return jr.cancel=Lr,jr.flush=lr,jr}var tz=yt(function(d,h){return yw(d,1,h)}),nz=yt(function(d,h,S){return yw(d,Qr(h)||0,S)});function rz(d){return li(d,N)}function Jd(d,h){if(typeof d!="function"||h!=null&&typeof h!="function")throw new Gr(s);var S=function(){var E=arguments,P=h?h.apply(this,E):E[0],H=S.cache;if(H.has(P))return H.get(P);var J=d.apply(this,E);return S.cache=H.set(P,J)||H,J};return S.cache=new(Jd.Cache||si),S}Jd.Cache=si;function Xd(d){if(typeof d!="function")throw new Gr(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 oz(d){return TT(2,d)}var iz=q5(function(d,h){h=h.length==1&&ft(h[0])?nn(h[0],Dr(ot())):nn(Wn(h,1),Dr(ot()));var S=h.length;return yt(function(E){for(var P=-1,H=Jn(E.length,S);++P<H;)E[P]=h[P].call(this,E[P]);return Ir(d,this,E)})}),Rg=yt(function(d,h){var S=qi(h,Ua(Rg));return li(d,k,n,h,S)}),MT=yt(function(d,h){var S=qi(h,Ua(MT));return li(d,M,n,h,S)}),sz=ci(function(d,h){return li(d,R,n,n,n,h)});function az(d,h){if(typeof d!="function")throw new Gr(s);return h=h===n?h:pt(h),yt(d,h)}function lz(d,h){if(typeof d!="function")throw new Gr(s);return h=h==null?0:In(pt(h),0),yt(function(S){var E=S[h],P=Ji(S,0,h);return E&&Wi(P,E),Ir(d,this,P)})}function cz(d,h,S){var E=!0,P=!0;if(typeof d!="function")throw new Gr(s);return sn(S)&&(E="leading"in S?!!S.leading:E,P="trailing"in S?!!S.trailing:P),OT(d,h,{leading:E,maxWait:h,trailing:P})}function uz(d){return wT(d,1)}function dz(d,h){return Rg(mg(h),d)}function fz(){if(!arguments.length)return[];var d=arguments[0];return ft(d)?d:[d]}function pz(d){return Jr(d,g)}function hz(d,h){return h=typeof h=="function"?h:n,Jr(d,g,h)}function mz(d){return Jr(d,p|g)}function gz(d,h){return h=typeof h=="function"?h:n,Jr(d,p|g,h)}function yz(d,h){return h==null||gw(d,h,Nn(h))}function xo(d,h){return d===h||d!==d&&h!==h}var bz=Hd(rg),vz=Hd(function(d,h){return d>=h}),zs=Cw(function(){return arguments}())?Cw:function(d){return un(d)&&Lt.call(d,"callee")&&!lw.call(d,"callee")},ft=be.isArray,xz=HC?Dr(HC):O5;function xr(d){return d!=null&&Zd(d.length)&&!di(d)}function xn(d){return un(d)&&xr(d)}function Sz(d){return d===!0||d===!1||un(d)&&sr(d)==X}var Xi=NB||zg,Cz=WC?Dr(WC):M5;function wz(d){return un(d)&&d.nodeType===1&&!mc(d)}function Tz(d){if(d==null)return!0;if(xr(d)&&(ft(d)||typeof d=="string"||typeof d.splice=="function"||Xi(d)||Ka(d)||zs(d)))return!d.length;var h=Xn(d);if(h==fe||h==te)return!d.size;if(pc(d))return!sg(d).length;for(var S in d)if(Lt.call(d,S))return!1;return!0}function _z(d,h){return uc(d,h)}function Ez(d,h,S){S=typeof S=="function"?S:n;var E=S?S(d,h):n;return E===n?uc(d,h,n,S):!!E}function Ig(d){if(!un(d))return!1;var h=sr(d);return h==ve||h==ae||typeof d.message=="string"&&typeof d.name=="string"&&!mc(d)}function kz(d){return typeof d=="number"&&uw(d)}function di(d){if(!sn(d))return!1;var h=sr(d);return h==ne||h==ce||h==de||h==Be}function AT(d){return typeof d=="number"&&d==pt(d)}function Zd(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=K}function sn(d){var h=typeof d;return d!=null&&(h=="object"||h=="function")}function un(d){return d!=null&&typeof d=="object"}var RT=qC?Dr(qC):R5;function Oz(d,h){return d===h||ig(d,h,Cg(h))}function Mz(d,h,S){return S=typeof S=="function"?S:n,ig(d,h,Cg(h),S)}function Az(d){return IT(d)&&d!=+d}function Rz(d){if(hV(d))throw new ut(i);return ww(d)}function Iz(d){return d===null}function Dz(d){return d==null}function IT(d){return typeof d=="number"||un(d)&&sr(d)==xe}function mc(d){if(!un(d)||sr(d)!=Te)return!1;var h=_d(d);if(h===null)return!0;var S=Lt.call(h,"constructor")&&h.constructor;return typeof S=="function"&&S instanceof S&&Sd.call(S)==MB}var Dg=UC?Dr(UC):I5;function Pz(d){return AT(d)&&d>=-K&&d<=K}var DT=KC?Dr(KC):D5;function Qd(d){return typeof d=="string"||!ft(d)&&un(d)&&sr(d)==re}function Nr(d){return typeof d=="symbol"||un(d)&&sr(d)==Oe}var Ka=GC?Dr(GC):P5;function Nz(d){return d===n}function Lz(d){return un(d)&&Xn(d)==Ie}function jz(d){return un(d)&&sr(d)==Ve}var $z=Hd(ag),Fz=Hd(function(d,h){return d<=h});function PT(d){if(!d)return[];if(xr(d))return Qd(d)?bo(d):vr(d);if(nc&&d[nc])return yB(d[nc]());var h=Xn(d),S=h==fe?Gm:h==te?bd:Ga;return S(d)}function fi(d){if(!d)return d===0?d:0;if(d=Qr(d),d===U||d===-U){var h=d<0?-1:1;return h*Y}return d===d?d:0}function pt(d){var h=fi(d),S=h%1;return h===h?S?h-S:h:0}function NT(d){return d?$s(pt(d),0,Z):0}function Qr(d){if(typeof d=="number")return d;if(Nr(d))return G;if(sn(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=sn(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=ew(d);var S=xF.test(d);return S||CF.test(d)?eB(d.slice(2),S?2:8):vF.test(d)?G:+d}function LT(d){return Lo(d,Sr(d))}function Bz(d){return d?$s(pt(d),-K,K):d===0?d:0}function Rt(d){return d==null?"":Pr(d)}var Vz=Wa(function(d,h){if(pc(h)||xr(h)){Lo(h,Nn(h),d);return}for(var S in h)Lt.call(h,S)&&ac(d,S,h[S])}),jT=Wa(function(d,h){Lo(h,Sr(h),d)}),ef=Wa(function(d,h,S,E){Lo(h,Sr(h),d,E)}),zz=Wa(function(d,h,S,E){Lo(h,Nn(h),d,E)}),Hz=ci(eg);function Wz(d,h){var S=Ha(d);return h==null?S:mw(S,h)}var qz=yt(function(d,h){d=Vt(d);var S=-1,E=h.length,P=E>2?h[2]:n;for(P&&ar(h[0],h[1],P)&&(E=1);++S<E;)for(var H=h[S],J=Sr(H),ee=-1,le=J.length;++ee<le;){var Ee=J[ee],ke=d[Ee];(ke===n||xo(ke,Ba[Ee])&&!Lt.call(d,Ee))&&(d[Ee]=H[Ee])}return d}),Uz=yt(function(d){return d.push(n,eT),Ir($T,n,d)});function Kz(d,h){return JC(d,ot(h,3),No)}function Gz(d,h){return JC(d,ot(h,3),ng)}function Yz(d,h){return d==null?d:tg(d,ot(h,3),Sr)}function Jz(d,h){return d==null?d:xw(d,ot(h,3),Sr)}function Xz(d,h){return d&&No(d,ot(h,3))}function Zz(d,h){return d&&ng(d,ot(h,3))}function Qz(d){return d==null?[]:Nd(d,Nn(d))}function e4(d){return d==null?[]:Nd(d,Sr(d))}function Pg(d,h,S){var E=d==null?n:Fs(d,h);return E===n?S:E}function t4(d,h){return d!=null&&rT(d,h,T5)}function Ng(d,h){return d!=null&&rT(d,h,_5)}var n4=Yw(function(d,h,S){h!=null&&typeof h.toString!="function"&&(h=Cd.call(h)),d[h]=S},jg(Cr)),r4=Yw(function(d,h,S){h!=null&&typeof h.toString!="function"&&(h=Cd.call(h)),Lt.call(d,h)?d[h].push(S):d[h]=[S]},ot),o4=yt(cc);function Nn(d){return xr(d)?pw(d):sg(d)}function Sr(d){return xr(d)?pw(d,!0):N5(d)}function i4(d,h){var S={};return h=ot(h,3),No(d,function(E,P,H){ai(S,h(E,P,H),E)}),S}function s4(d,h){var S={};return h=ot(h,3),No(d,function(E,P,H){ai(S,P,h(E,P,H))}),S}var a4=Wa(function(d,h,S){Ld(d,h,S)}),$T=Wa(function(d,h,S,E){Ld(d,h,S,E)}),l4=ci(function(d,h){var S={};if(d==null)return S;var E=!1;h=nn(h,function(H){return H=Yi(H,d),E||(E=H.length>1),H}),Lo(d,xg(d),S),E&&(S=Jr(S,p|m|g,nV));for(var P=h.length;P--;)fg(S,h[P]);return S});function c4(d,h){return FT(d,Xd(ot(h)))}var u4=ci(function(d,h){return d==null?{}:j5(d,h)});function FT(d,h){if(d==null)return{};var S=nn(xg(d),function(E){return[E]});return h=ot(h),Aw(d,S,function(E,P){return h(E,P[0])})}function d4(d,h,S){h=Yi(h,d);var E=-1,P=h.length;for(P||(P=1,d=n);++E<P;){var H=d==null?n:d[jo(h[E])];H===n&&(E=P,H=S),d=di(H)?H.call(d):H}return d}function f4(d,h,S){return d==null?d:dc(d,h,S)}function p4(d,h,S,E){return E=typeof E=="function"?E:n,d==null?d:dc(d,h,S,E)}var BT=Zw(Nn),VT=Zw(Sr);function h4(d,h,S){var E=ft(d),P=E||Xi(d)||Ka(d);if(h=ot(h,4),S==null){var H=d&&d.constructor;P?S=E?new H:[]:sn(d)?S=di(H)?Ha(_d(d)):{}:S={}}return(P?Kr:No)(d,function(J,ee,le){return h(S,J,ee,le)}),S}function m4(d,h){return d==null?!0:fg(d,h)}function g4(d,h,S){return d==null?d:Nw(d,h,mg(S))}function y4(d,h,S,E){return E=typeof E=="function"?E:n,d==null?d:Nw(d,h,mg(S),E)}function Ga(d){return d==null?[]:Km(d,Nn(d))}function b4(d){return d==null?[]:Km(d,Sr(d))}function v4(d,h,S){return S===n&&(S=h,h=n),S!==n&&(S=Qr(S),S=S===S?S:0),h!==n&&(h=Qr(h),h=h===h?h:0),$s(Qr(d),h,S)}function x4(d,h,S){return h=fi(h),S===n?(S=h,h=0):S=fi(S),d=Qr(d),E5(d,h,S)}function S4(d,h,S){if(S&&typeof S!="boolean"&&ar(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=fi(d),h===n?(h=d,d=0):h=fi(h)),d>h){var E=d;d=h,h=E}if(S||d%1||h%1){var P=dw();return Jn(d+P*(h-d+QF("1e-"+((P+"").length-1))),h)}return cg(d,h)}var C4=qa(function(d,h,S){return h=h.toLowerCase(),d+(S?zT(h):h)});function zT(d){return Lg(Rt(d).toLowerCase())}function HT(d){return d=Rt(d),d&&d.replace(TF,fB).replace(HF,"")}function w4(d,h,S){d=Rt(d),h=Pr(h);var E=d.length;S=S===n?E:$s(pt(S),0,E);var P=S;return S-=h.length,S>=0&&d.slice(S,P)==h}function T4(d){return d=Rt(d),d&&Ql.test(d)?d.replace(br,pB):d}function _4(d){return d=Rt(d),d&&uF.test(d)?d.replace(Rm,"\\$&"):d}var E4=qa(function(d,h,S){return d+(S?"-":"")+h.toLowerCase()}),k4=qa(function(d,h,S){return d+(S?" ":"")+h.toLowerCase()}),O4=Uw("toLowerCase");function M4(d,h,S){d=Rt(d),h=pt(h);var E=h?$a(d):0;if(!h||E>=h)return d;var P=(h-E)/2;return zd(Md(P),S)+d+zd(Od(P),S)}function A4(d,h,S){d=Rt(d),h=pt(h);var E=h?$a(d):0;return h&&E<h?d+zd(h-E,S):d}function R4(d,h,S){d=Rt(d),h=pt(h);var E=h?$a(d):0;return h&&E<h?zd(h-E,S)+d:d}function I4(d,h,S){return S||h==null?h=0:h&&(h=+h),FB(Rt(d).replace(Im,""),h||0)}function D4(d,h,S){return(S?ar(d,h,S):h===n)?h=1:h=pt(h),ug(Rt(d),h)}function P4(){var d=arguments,h=Rt(d[0]);return d.length<3?h:h.replace(d[1],d[2])}var N4=qa(function(d,h,S){return d+(S?"_":"")+h.toLowerCase()});function L4(d,h,S){return S&&typeof S!="number"&&ar(d,h,S)&&(h=S=n),S=S===n?Z:S>>>0,S?(d=Rt(d),d&&(typeof h=="string"||h!=null&&!Dg(h))&&(h=Pr(h),!h&&ja(d))?Ji(bo(d),0,S):d.split(h,S)):[]}var j4=qa(function(d,h,S){return d+(S?" ":"")+Lg(h)});function $4(d,h,S){return d=Rt(d),S=S==null?0:$s(pt(S),0,d.length),h=Pr(h),d.slice(S,S+h.length)==h}function F4(d,h,S){var E=z.templateSettings;S&&ar(d,h,S)&&(h=n),d=Rt(d),h=ef({},h,E,Qw);var P=ef({},h.imports,E.imports,Qw),H=Nn(P),J=Km(P,H),ee,le,Ee=0,ke=h.interpolate||pd,De="__p += '",Fe=Ym((h.escape||pd).source+"|"+ke.source+"|"+(ke===fd?bF:pd).source+"|"+(h.evaluate||pd).source+"|$","g"),Ye="//# sourceURL="+(Lt.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++GF+"]")+`
|
|
90
|
+
`;d.replace(Fe,function(st,bt,Ct,Lr,lr,jr){return Ct||(Ct=Lr),De+=d.slice(Ee,jr).replace(_F,hB),bt&&(ee=!0,De+=`' +
|
|
91
|
+
__e(`+bt+`) +
|
|
92
|
+
'`),lr&&(le=!0,De+=`';
|
|
93
|
+
`+lr+`;
|
|
94
|
+
__p += '`),Ct&&(De+=`' +
|
|
95
|
+
((__t = (`+Ct+`)) == null ? '' : __t) +
|
|
96
|
+
'`),Ee=jr+st.length,st}),De+=`';
|
|
97
|
+
`;var it=Lt.call(h,"variable")&&h.variable;if(!it)De=`with (obj) {
|
|
98
|
+
`+De+`
|
|
99
|
+
}
|
|
100
|
+
`;else if(gF.test(it))throw new ut(a);De=(le?De.replace(Je,""):De).replace(lt,"$1").replace(jt,"$1;"),De="function("+(it||"obj")+`) {
|
|
101
|
+
`+(it?"":`obj || (obj = {});
|
|
102
|
+
`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(le?`, __j = Array.prototype.join;
|
|
103
|
+
function print() { __p += __j.call(arguments, '') }
|
|
104
|
+
`:`;
|
|
105
|
+
`)+De+`return __p
|
|
106
|
+
}`;var ht=qT(function(){return Ot(H,Ye+"return "+De).apply(n,J)});if(ht.source=De,Ig(ht))throw ht;return ht}function B4(d){return Rt(d).toLowerCase()}function V4(d){return Rt(d).toUpperCase()}function z4(d,h,S){if(d=Rt(d),d&&(S||h===n))return ew(d);if(!d||!(h=Pr(h)))return d;var E=bo(d),P=bo(h),H=tw(E,P),J=nw(E,P)+1;return Ji(E,H,J).join("")}function H4(d,h,S){if(d=Rt(d),d&&(S||h===n))return d.slice(0,ow(d)+1);if(!d||!(h=Pr(h)))return d;var E=bo(d),P=nw(E,bo(h))+1;return Ji(E,0,P).join("")}function W4(d,h,S){if(d=Rt(d),d&&(S||h===n))return d.replace(Im,"");if(!d||!(h=Pr(h)))return d;var E=bo(d),P=tw(E,bo(h));return Ji(E,P).join("")}function q4(d,h){var S=O,E=I;if(sn(h)){var P="separator"in h?h.separator:P;S="length"in h?pt(h.length):S,E="omission"in h?Pr(h.omission):E}d=Rt(d);var H=d.length;if(ja(d)){var J=bo(d);H=J.length}if(S>=H)return d;var ee=S-$a(E);if(ee<1)return E;var le=J?Ji(J,0,ee).join(""):d.slice(0,ee);if(P===n)return le+E;if(J&&(ee+=le.length-ee),Dg(P)){if(d.slice(ee).search(P)){var Ee,ke=le;for(P.global||(P=Ym(P.source,Rt(CC.exec(P))+"g")),P.lastIndex=0;Ee=P.exec(ke);)var De=Ee.index;le=le.slice(0,De===n?ee:De)}}else if(d.indexOf(Pr(P),ee)!=ee){var Fe=le.lastIndexOf(P);Fe>-1&&(le=le.slice(0,Fe))}return le+E}function U4(d){return d=Rt(d),d&&oi.test(d)?d.replace(ir,SB):d}var K4=qa(function(d,h,S){return d+(S?" ":"")+h.toUpperCase()}),Lg=Uw("toUpperCase");function WT(d,h,S){return d=Rt(d),h=S?n:h,h===n?gB(d)?TB(d):aB(d):d.match(h)||[]}var qT=yt(function(d,h){try{return Ir(d,n,h)}catch(S){return Ig(S)?S:new ut(S)}}),G4=ci(function(d,h){return Kr(h,function(S){S=jo(S),ai(d,S,Ag(d[S],d))}),d});function Y4(d){var h=d==null?0:d.length,S=ot();return d=h?nn(d,function(E){if(typeof E[1]!="function")throw new Gr(s);return[S(E[0]),E[1]]}):[],yt(function(E){for(var P=-1;++P<h;){var H=d[P];if(Ir(H[0],this,E))return Ir(H[1],this,E)}})}function J4(d){return S5(Jr(d,p))}function jg(d){return function(){return d}}function X4(d,h){return d==null||d!==d?h:d}var Z4=Gw(),Q4=Gw(!0);function Cr(d){return d}function $g(d){return Tw(typeof d=="function"?d:Jr(d,p))}function eH(d){return Ew(Jr(d,p))}function tH(d,h){return kw(d,Jr(h,p))}var nH=yt(function(d,h){return function(S){return cc(S,d,h)}}),rH=yt(function(d,h){return function(S){return cc(d,S,h)}});function Fg(d,h,S){var E=Nn(h),P=Nd(h,E);S==null&&!(sn(h)&&(P.length||!E.length))&&(S=h,h=d,d=this,P=Nd(h,Nn(h)));var H=!(sn(S)&&"chain"in S)||!!S.chain,J=di(d);return Kr(P,function(ee){var le=h[ee];d[ee]=le,J&&(d.prototype[ee]=function(){var Ee=this.__chain__;if(H||Ee){var ke=d(this.__wrapped__),De=ke.__actions__=vr(this.__actions__);return De.push({func:le,args:arguments,thisArg:d}),ke.__chain__=Ee,ke}return le.apply(d,Wi([this.value()],arguments))})}),d}function oH(){return Hn._===this&&(Hn._=AB),this}function Bg(){}function iH(d){return d=pt(d),yt(function(h){return Ow(h,d)})}var sH=yg(nn),aH=yg(YC),lH=yg(zm);function UT(d){return Tg(d)?Hm(jo(d)):$5(d)}function cH(d){return function(h){return d==null?n:Fs(d,h)}}var uH=Jw(),dH=Jw(!0);function Vg(){return[]}function zg(){return!1}function fH(){return{}}function pH(){return""}function hH(){return!0}function mH(d,h){if(d=pt(d),d<1||d>K)return[];var S=Z,E=Jn(d,Z);h=ot(h),d-=Z;for(var P=Um(E,h);++S<d;)h(S);return P}function gH(d){return ft(d)?nn(d,jo):Nr(d)?[d]:vr(fT(Rt(d)))}function yH(d){var h=++OB;return Rt(d)+h}var bH=Vd(function(d,h){return d+h},0),vH=bg("ceil"),xH=Vd(function(d,h){return d/h},1),SH=bg("floor");function CH(d){return d&&d.length?Pd(d,Cr,rg):n}function wH(d,h){return d&&d.length?Pd(d,ot(h,2),rg):n}function TH(d){return ZC(d,Cr)}function _H(d,h){return ZC(d,ot(h,2))}function EH(d){return d&&d.length?Pd(d,Cr,ag):n}function kH(d,h){return d&&d.length?Pd(d,ot(h,2),ag):n}var OH=Vd(function(d,h){return d*h},1),MH=bg("round"),AH=Vd(function(d,h){return d-h},0);function RH(d){return d&&d.length?qm(d,Cr):0}function IH(d,h){return d&&d.length?qm(d,ot(h,2)):0}return z.after=ez,z.ary=wT,z.assign=Vz,z.assignIn=jT,z.assignInWith=ef,z.assignWith=zz,z.at=Hz,z.before=TT,z.bind=Ag,z.bindAll=G4,z.bindKey=_T,z.castArray=fz,z.chain=xT,z.chunk=SV,z.compact=CV,z.concat=wV,z.cond=Y4,z.conforms=J4,z.constant=jg,z.countBy=R3,z.create=Wz,z.curry=ET,z.curryRight=kT,z.debounce=OT,z.defaults=qz,z.defaultsDeep=Uz,z.defer=tz,z.delay=nz,z.difference=TV,z.differenceBy=_V,z.differenceWith=EV,z.drop=kV,z.dropRight=OV,z.dropRightWhile=MV,z.dropWhile=AV,z.fill=RV,z.filter=D3,z.flatMap=L3,z.flatMapDeep=j3,z.flatMapDepth=$3,z.flatten=gT,z.flattenDeep=IV,z.flattenDepth=DV,z.flip=rz,z.flow=Z4,z.flowRight=Q4,z.fromPairs=PV,z.functions=Qz,z.functionsIn=e4,z.groupBy=F3,z.initial=LV,z.intersection=jV,z.intersectionBy=$V,z.intersectionWith=FV,z.invert=n4,z.invertBy=r4,z.invokeMap=V3,z.iteratee=$g,z.keyBy=z3,z.keys=Nn,z.keysIn=Sr,z.map=Gd,z.mapKeys=i4,z.mapValues=s4,z.matches=eH,z.matchesProperty=tH,z.memoize=Jd,z.merge=a4,z.mergeWith=$T,z.method=nH,z.methodOf=rH,z.mixin=Fg,z.negate=Xd,z.nthArg=iH,z.omit=l4,z.omitBy=c4,z.once=oz,z.orderBy=H3,z.over=sH,z.overArgs=iz,z.overEvery=aH,z.overSome=lH,z.partial=Rg,z.partialRight=MT,z.partition=W3,z.pick=u4,z.pickBy=FT,z.property=UT,z.propertyOf=cH,z.pull=HV,z.pullAll=bT,z.pullAllBy=WV,z.pullAllWith=qV,z.pullAt=UV,z.range=uH,z.rangeRight=dH,z.rearg=sz,z.reject=K3,z.remove=KV,z.rest=az,z.reverse=Og,z.sampleSize=Y3,z.set=f4,z.setWith=p4,z.shuffle=J3,z.slice=GV,z.sortBy=Q3,z.sortedUniq=t3,z.sortedUniqBy=n3,z.split=L4,z.spread=lz,z.tail=r3,z.take=o3,z.takeRight=i3,z.takeRightWhile=s3,z.takeWhile=a3,z.tap=C3,z.throttle=cz,z.thru=Kd,z.toArray=PT,z.toPairs=BT,z.toPairsIn=VT,z.toPath=gH,z.toPlainObject=LT,z.transform=h4,z.unary=uz,z.union=l3,z.unionBy=c3,z.unionWith=u3,z.uniq=d3,z.uniqBy=f3,z.uniqWith=p3,z.unset=m4,z.unzip=Mg,z.unzipWith=vT,z.update=g4,z.updateWith=y4,z.values=Ga,z.valuesIn=b4,z.without=h3,z.words=WT,z.wrap=dz,z.xor=m3,z.xorBy=g3,z.xorWith=y3,z.zip=b3,z.zipObject=v3,z.zipObjectDeep=x3,z.zipWith=S3,z.entries=BT,z.entriesIn=VT,z.extend=jT,z.extendWith=ef,Fg(z,z),z.add=bH,z.attempt=qT,z.camelCase=C4,z.capitalize=zT,z.ceil=vH,z.clamp=v4,z.clone=pz,z.cloneDeep=mz,z.cloneDeepWith=gz,z.cloneWith=hz,z.conformsTo=yz,z.deburr=HT,z.defaultTo=X4,z.divide=xH,z.endsWith=w4,z.eq=xo,z.escape=T4,z.escapeRegExp=_4,z.every=I3,z.find=P3,z.findIndex=hT,z.findKey=Kz,z.findLast=N3,z.findLastIndex=mT,z.findLastKey=Gz,z.floor=SH,z.forEach=ST,z.forEachRight=CT,z.forIn=Yz,z.forInRight=Jz,z.forOwn=Xz,z.forOwnRight=Zz,z.get=Pg,z.gt=bz,z.gte=vz,z.has=t4,z.hasIn=Ng,z.head=yT,z.identity=Cr,z.includes=B3,z.indexOf=NV,z.inRange=x4,z.invoke=o4,z.isArguments=zs,z.isArray=ft,z.isArrayBuffer=xz,z.isArrayLike=xr,z.isArrayLikeObject=xn,z.isBoolean=Sz,z.isBuffer=Xi,z.isDate=Cz,z.isElement=wz,z.isEmpty=Tz,z.isEqual=_z,z.isEqualWith=Ez,z.isError=Ig,z.isFinite=kz,z.isFunction=di,z.isInteger=AT,z.isLength=Zd,z.isMap=RT,z.isMatch=Oz,z.isMatchWith=Mz,z.isNaN=Az,z.isNative=Rz,z.isNil=Dz,z.isNull=Iz,z.isNumber=IT,z.isObject=sn,z.isObjectLike=un,z.isPlainObject=mc,z.isRegExp=Dg,z.isSafeInteger=Pz,z.isSet=DT,z.isString=Qd,z.isSymbol=Nr,z.isTypedArray=Ka,z.isUndefined=Nz,z.isWeakMap=Lz,z.isWeakSet=jz,z.join=BV,z.kebabCase=E4,z.last=Zr,z.lastIndexOf=VV,z.lowerCase=k4,z.lowerFirst=O4,z.lt=$z,z.lte=Fz,z.max=CH,z.maxBy=wH,z.mean=TH,z.meanBy=_H,z.min=EH,z.minBy=kH,z.stubArray=Vg,z.stubFalse=zg,z.stubObject=fH,z.stubString=pH,z.stubTrue=hH,z.multiply=OH,z.nth=zV,z.noConflict=oH,z.noop=Bg,z.now=Yd,z.pad=M4,z.padEnd=A4,z.padStart=R4,z.parseInt=I4,z.random=S4,z.reduce=q3,z.reduceRight=U3,z.repeat=D4,z.replace=P4,z.result=d4,z.round=MH,z.runInContext=se,z.sample=G3,z.size=X3,z.snakeCase=N4,z.some=Z3,z.sortedIndex=YV,z.sortedIndexBy=JV,z.sortedIndexOf=XV,z.sortedLastIndex=ZV,z.sortedLastIndexBy=QV,z.sortedLastIndexOf=e3,z.startCase=j4,z.startsWith=$4,z.subtract=AH,z.sum=RH,z.sumBy=IH,z.template=F4,z.times=mH,z.toFinite=fi,z.toInteger=pt,z.toLength=NT,z.toLower=B4,z.toNumber=Qr,z.toSafeInteger=Bz,z.toString=Rt,z.toUpper=V4,z.trim=z4,z.trimEnd=H4,z.trimStart=W4,z.truncate=q4,z.unescape=U4,z.uniqueId=yH,z.upperCase=K4,z.upperFirst=Lg,z.each=ST,z.eachRight=CT,z.first=yT,Fg(z,function(){var d={};return No(z,function(h,S){Lt.call(z.prototype,S)||(d[S]=h)}),d}(),{chain:!1}),z.VERSION=r,Kr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){z[d].placeholder=z}),Kr(["drop","take"],function(d,h){xt.prototype[d]=function(S){S=S===n?1:In(pt(S),0);var E=this.__filtered__&&!h?new xt(this):this.clone();return E.__filtered__?E.__takeCount__=Jn(S,E.__takeCount__):E.__views__.push({size:Jn(S,Z),type:d+(E.__dir__<0?"Right":"")}),E},xt.prototype[d+"Right"]=function(S){return this.reverse()[d](S).reverse()}}),Kr(["filter","map","takeWhile"],function(d,h){var S=h+1,E=S==V||S==F;xt.prototype[d]=function(P){var H=this.clone();return H.__iteratees__.push({iteratee:ot(P,3),type:S}),H.__filtered__=H.__filtered__||E,H}}),Kr(["head","last"],function(d,h){var S="take"+(h?"Right":"");xt.prototype[d]=function(){return this[S](1).value()[0]}}),Kr(["initial","tail"],function(d,h){var S="drop"+(h?"":"Right");xt.prototype[d]=function(){return this.__filtered__?new xt(this):this[S](1)}}),xt.prototype.compact=function(){return this.filter(Cr)},xt.prototype.find=function(d){return this.filter(d).head()},xt.prototype.findLast=function(d){return this.reverse().find(d)},xt.prototype.invokeMap=yt(function(d,h){return typeof d=="function"?new xt(this):this.map(function(S){return cc(S,d,h)})}),xt.prototype.reject=function(d){return this.filter(Xd(ot(d)))},xt.prototype.slice=function(d,h){d=pt(d);var S=this;return S.__filtered__&&(d>0||h<0)?new xt(S):(d<0?S=S.takeRight(-d):d&&(S=S.drop(d)),h!==n&&(h=pt(h),S=h<0?S.dropRight(-h):S.take(h-d)),S)},xt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},xt.prototype.toArray=function(){return this.take(Z)},No(xt.prototype,function(d,h){var S=/^(?:filter|find|map|reject)|While$/.test(h),E=/^(?:head|last)$/.test(h),P=z[E?"take"+(h=="last"?"Right":""):h],H=E||/^find/.test(h);P&&(z.prototype[h]=function(){var J=this.__wrapped__,ee=E?[1]:arguments,le=J instanceof xt,Ee=ee[0],ke=le||ft(J),De=function(bt){var Ct=P.apply(z,Wi([bt],ee));return E&&Fe?Ct[0]:Ct};ke&&S&&typeof Ee=="function"&&Ee.length!=1&&(le=ke=!1);var Fe=this.__chain__,Ye=!!this.__actions__.length,it=H&&!Fe,ht=le&&!Ye;if(!H&&ke){J=ht?J:new xt(this);var st=d.apply(J,ee);return st.__actions__.push({func:Kd,args:[De],thisArg:n}),new Yr(st,Fe)}return it&&ht?d.apply(this,ee):(st=this.thru(De),it?E?st.value()[0]:st.value():st)})}),Kr(["pop","push","shift","sort","splice","unshift"],function(d){var h=vd[d],S=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",E=/^(?:pop|shift)$/.test(d);z.prototype[d]=function(){var P=arguments;if(E&&!this.__chain__){var H=this.value();return h.apply(ft(H)?H:[],P)}return this[S](function(J){return h.apply(ft(J)?J:[],P)})}}),No(xt.prototype,function(d,h){var S=z[h];if(S){var E=S.name+"";Lt.call(za,E)||(za[E]=[]),za[E].push({name:h,func:S})}}),za[Bd(n,C).name]=[{name:"wrapper",func:n}],xt.prototype.clone=UB,xt.prototype.reverse=KB,xt.prototype.value=GB,z.prototype.at=w3,z.prototype.chain=T3,z.prototype.commit=_3,z.prototype.next=E3,z.prototype.plant=O3,z.prototype.reverse=M3,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=A3,z.prototype.first=z.prototype.head,nc&&(z.prototype[nc]=k3),z},Fa=_B();Ps?((Ps.exports=Fa)._=Fa,$m._=Fa):Hn._=Fa}).call(T7)}(Pc,Pc.exports)),Pc.exports}var ax=_7();const E7=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,...m}=t,{setValue:g,getValues:b}=ln(),[y,x]=q.useState(""),[C,_]=q.useState([]),[T,w]=q.useState(!1),k=ax.debounce(async(M,A)=>{try{w(!0);const R=await o(M.input);A(R)}catch(R){throw R}finally{w(!1)}},400);return q.useEffect(()=>{if(y===""){_(b(e)?[b(e)]:[]);return}y.length>=s&&k({input:y},M=>{let A=[];M?(A=M,b(e)&&(A=[b(e),...M.filter(R=>JSON.stringify(R)!==JSON.stringify(b(e)))])):b(e)&&(A=[b(e)]),_(A)})},[b(e),y]),v.jsx(YI,{name:e,loading:T,filterOptions:u,noOptionsText:y.length<s?a:l,options:C,autoComplete:p,includeInputInList:f,onChange:(M,A,R,N)=>{_(A?[A,...C]:C),g(e,A,{shouldValidate:!0}),r&&r(M,A,R,N)},onInputChange:(M,A,R)=>{x(A),n&&n(M,A,R)},...m})},k7=t=>{const{name:e,label:n=Yn(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:m,getOptionLabel:g=A=>typeof A=="string"?A:String(A),isOptionEqualToValue:b=(A,R)=>JSON.stringify(A)===JSON.stringify(R),useFieldAsValue:y,...x}=t,{setValue:C,getValues:_,formState:{errors:T},control:w}=ln(),k={...fr(x,["useFieldAsValue"]),getOptionLabel:g,options:r,filterSelectedOptions:o,isOptionEqualToValue:b,renderInput:A=>v.jsx($.TextField,{...A,variant:i,label:s?void 0:n,error:!!T[e],required:p}),onChange:(A,R,N,O)=>{y?C(e,R.map(I=>I[y]),{shouldValidate:!0}):C(e,R,{shouldValidate:!0}),m&&m(A,R,N,O)},fullWidth:!0,value:y?r.filter(A=>_(e).includes(A[y]))||[]:_(e),slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}},M=()=>_(e).length===0?"":(y?r.filter(R=>_(e).includes(R[y]))||[]:_(e)).map(R=>g(R)).join(", ");return v.jsx(nr,{name:e,control:w,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,{...k,multiple:!0}),v.jsx(pr,{name:e,id:`${e}-err`})]})]})})},O7=t=>{const{name:e,label:n=Yn(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:m,getValues:g}=ln(),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(nr,{name:e,control:p,render:({})=>g(e)&&v.jsx($.Typography,{...l,children:b})}):v.jsx(nr,{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:(C,_)=>{m(e,C.target.checked),u&&u(C,_)},checked:x.value})}),v.jsx(pr,{name:e,id:`${e}-err`})]})})},M7=t=>{const{name:e,checkboxes:n=[],label:r=Yn(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:m="Up to {max} max",minSubtitle:g="Please select {min} or more",margin:b="dense",staticLabelProps:y={fontSize:".9em",color:"#808080"}}=t,{control:x,setValue:C,getValues:_,resetField:T,formState:{errors:w}}=ln();(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 k=()=>t.labelPlacement=="start"?"right":t.labelPlacement=="top"||t.labelPlacement=="bottom"?"center":"left",M=R=>typeof R=="string"?R:!R.textField&&!R.sublabel?R.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:R.label}),R.sublabel&&v.jsx($.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:R.sublabel})]}),R.textField&&v.jsx($.TextField,{label:"",size:"small",margin:"none",sx:{"& .MuiInputBase-input":{height:14}},...R.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:m.replace("{max}",`${f}`)});if(u>0)return v.jsx($.Typography,{variant:"subtitle2",children:g.replace("{min}",`${u}`)})};return v.jsx(nr,{name:e,control:x,render:({field:R})=>v.jsx($.FormControl,{margin:b,fullWidth:!0,children:l?v.jsxs($.Box,{children:[v.jsx($.Typography,{...y,children:r}),_(e).join(", ")]}):v.jsxs($.FormControl,{onChange:N=>{const O=N.target.value,I=N.target.checked,L=n.find(B=>typeof B=="string"?B===O:B.label===O);I?C(e,[..._(e),O]):(L&&typeof L=="object"&&L.textField&&L.textField.name&&T(e),C(e,R.value.filter(B=>B!=O)))},fullWidth:!0,margin:b,error:!!w[e],children:[v.jsx($.FormLabel,{focused:t.focused,htmlFor:e,required:s,disabled:t.disableLabel,children:r}),A(),n.map(N=>{const O=typeof N=="string"?N:N.label,I=i==="top"&&(o==="start"||o==="end");return v.jsx($.FormControlLabel,{sx:{alignItems:I?"flex-start":"center"},value:O,control:v.jsx($.Checkbox,{}),label:v.jsx("div",{"data-testid":typeof N=="string"?N:N.label,style:{marginTop:I?"10px":0},children:M(N)}),labelPlacement:o,checked:_(e).includes(O),disabled:a||!_(e).includes(O)&&_(e).length===f,style:{textAlign:k()}},`checkbox-group-${O}`)}),v.jsx(pr,{name:e,id:`${e}-err`})]})})})},U_=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"),JI=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}}=ln(),m=t.fileType?Array.isArray(t.fileType)?t.fileType:[t.fileType]:[],g=t.subtitle??(m.length>0?`Allowed file extensions: ${m.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)]:[],R=ax.partition(M,N=>A.find(O=>_(N,O)));if(M=R[1],i&&R[0].length>0&&i(R[0]),m.length>0){const N=ax.partition(M,O=>m.find(I=>O.name.endsWith(I)));M=N[0],s&&N[1].length>0&&s(N[1])}n?u(e,[...C(),...M]):!Array.isArray(f(e))&&M.length>0&&u(e,M[0])}},C=()=>f(e)?Array.isArray(f(e))?f(e):[f(e)]:[],_=(M,A)=>M.lastModified===A.lastModified&&M.name===A.name&&M.type===A.type&&M.size===A.size,T=()=>C().map(M=>M.name).join(", ");return r?v.jsx($.Typography,{"data-testid":"fileupload-readonly",...a,children:T()}):o==="drag-and-drop"?v.jsx(nr,{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(U_,{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:m==null?void 0:m.toString()})]})]}),g&&v.jsx($.Typography,{variant:"caption",children:g}),v.jsx(pr,{name:e,id:`${e}-err`})]})}):v.jsx(nr,{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(U_,{}),children:["Upload a file",v.jsx("input",{"data-testid":"file-input",id:e,hidden:!0,type:"file",onChange:b,accept:m==null?void 0:m.toString()})]})}),v.jsx(pr,{name:e,id:`${e}-err`})]})})},A7=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"),R7=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"),I7=t=>{const{name:e}=t,{control:n,setValue:r,getValues:o}=ln();return v.jsx(nr,{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(A7,{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(R7,{})})]})},`${i.name}-${i.type}-${i.size}-${i.lastModified}`))})})};var uy,K_;function $i(){if(K_)return uy;K_=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return uy=t,uy}var dy,G_;function XI(){if(G_)return dy;G_=1;var t=typeof ds=="object"&&ds&&ds.Object===Object&&ds;return dy=t,dy}var fy,Y_;function Ro(){if(Y_)return fy;Y_=1;var t=XI(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return fy=n,fy}var py,J_;function D7(){if(J_)return py;J_=1;var t=Ro(),e=function(){return t.Date.now()};return py=e,py}var hy,X_;function P7(){if(X_)return hy;X_=1;var t=/\s/;function e(n){for(var r=n.length;r--&&t.test(n.charAt(r)););return r}return hy=e,hy}var my,Z_;function N7(){if(Z_)return my;Z_=1;var t=P7(),e=/^\s+/;function n(r){return r&&r.slice(0,t(r)+1).replace(e,"")}return my=n,my}var gy,Q_;function Uu(){if(Q_)return gy;Q_=1;var t=Ro(),e=t.Symbol;return gy=e,gy}var yy,eE;function L7(){if(eE)return yy;eE=1;var t=Uu(),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 yy=i,yy}var by,tE;function j7(){if(tE)return by;tE=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return by=n,by}var vy,nE;function _a(){if(nE)return vy;nE=1;var t=Uu(),e=L7(),n=j7(),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 vy=s,vy}var xy,rE;function Ms(){if(rE)return xy;rE=1;function t(e){return e!=null&&typeof e=="object"}return xy=t,xy}var Sy,oE;function Ih(){if(oE)return Sy;oE=1;var t=_a(),e=Ms(),n="[object Symbol]";function r(o){return typeof o=="symbol"||e(o)&&t(o)==n}return Sy=r,Sy}var Cy,iE;function ZI(){if(iE)return Cy;iE=1;var t=N7(),e=$i(),n=Ih(),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 Cy=l,Cy}var wy,sE;function QI(){if(sE)return wy;sE=1;var t=$i(),e=D7(),n=ZI(),r="Expected a function",o=Math.max,i=Math.min;function s(a,l,u){var f,p,m,g,b,y,x=0,C=!1,_=!1,T=!0;if(typeof a!="function")throw new TypeError(r);l=n(l)||0,t(u)&&(C=!!u.leading,_="maxWait"in u,m=_?o(n(u.maxWait)||0,l):m,T="trailing"in u?!!u.trailing:T);function w(B){var V=f,j=p;return f=p=void 0,x=B,g=a.apply(j,V),g}function k(B){return x=B,b=setTimeout(R,l),C?w(B):g}function M(B){var V=B-y,j=B-x,F=l-V;return _?i(F,m-j):F}function A(B){var V=B-y,j=B-x;return y===void 0||V>=l||V<0||_&&j>=m}function R(){var B=e();if(A(B))return N(B);b=setTimeout(R,M(B))}function N(B){return b=void 0,T&&f?w(B):(f=p=void 0,g)}function O(){b!==void 0&&clearTimeout(b),x=0,f=y=p=b=void 0}function I(){return b===void 0?g:N(e())}function L(){var B=e(),V=A(B);if(f=arguments,p=this,y=B,V){if(b===void 0)return k(y);if(_)return clearTimeout(b),b=setTimeout(R,l),w(y)}return b===void 0&&(b=setTimeout(R,l)),g}return L.cancel=O,L.flush=I,L}return wy=s,wy}var Ty,aE;function $7(){if(aE)return Ty;aE=1;var t=QI(),e=$i(),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 Ty=r,Ty}var F7=$7();const eD=yr(F7),B7=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 Lf={exports:{}},V7=Lf.exports,lE;function z7(){return lE||(lE=1,function(t,e){(function(n,r){t.exports=r()})(V7,()=>{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})}(Lf)),Lf.exports}var H7=z7();const W7=yr(H7),q7=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=W7(i,a.map(u=>[u.offset,u.offset+u.length]));return v.jsx("li",{...fr({...e},["key"]),"data-testid":`loc-${n.place_id}`,children:v.jsxs($.Box,{display:"flex",flexDirection:"row",alignItems:"center",children:[r?D.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 U7(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},K7=t=>{const{name:e,label:n=Yn(e),resultIcon:r=v.jsx(B7,{}),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,[m,g]=D.useState(null),[b,y]=D.useState(""),[x,C]=D.useState([]),_=D.useRef(!1),[,T,w]=Il.useField(e),{setValue:k}=w,{error:M}=T;typeof window<"u"&&!_.current&&(document.querySelector("#google-maps")||U7(`https://maps.googleapis.com/maps/api/js?key=${o}&libraries=places`,document.querySelector("head"),"google-maps"),_.current=!0);const A=D.useMemo(()=>eD((j,F)=>{xc.current&&xc.current.getPlacePredictions(j,F)},200),[]);D.useEffect(()=>{let j=!0;if(!xc.current&&window.google&&(xc.current=new window.google.maps.places.AutocompleteService),!xc.current)return;if(b===""){C(m?[m]:[]);return}return A({input:b,types:s?[s]:[]},K=>{if(j){let Y=[];m&&(Y=[m]),K&&(Y=[...Y,...K]);const G=Y.filter((Z,me,he)=>me===he.findIndex(ge=>ge.place_id===Z.place_id));C(G)}}),()=>{j=!1}},[m,b,A,s]);const R=D.useCallback(j=>{const U=(j?[j,...x]:x).filter((K,Y,G)=>Y===G.findIndex(Z=>Z.place_id===K.place_id));C(U),g(j),k(j?j.description:"")},[x,C,g,k]),N=j=>{y(j)},O=["name","apiKey","resultIcon","highlightMatches","variant","staticLabel","staticLabelProps","margin"],I=j=>v.jsx($.TextField,{margin:p,variant:a,...j,...fr({...t},O),label:l?void 0:n,hiddenLabel:l,error:!!M}),L=j=>typeof j=="string"?j:j.description,B=(j,F)=>v.jsx(q7,{listItemProps:j,option:F,resultIcon:r,highlightMatches:i},F.place_id);D.useEffect(()=>{const j=F=>{F.key==="Enter"&&x.length>0&&R(x[0])};return window.addEventListener("keydown",j),()=>{window.removeEventListener("keydown",j)}},[x,R]);const V=v.jsx($.Autocomplete,{id:`${e}-loc`,"data-testid":"location-autocomplete",getOptionLabel:L,filterOptions:j=>j,options:x,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:m,onChange:(j,F)=>R(F),onInputChange:(j,F)=>N(F),disabled:t.disabled,renderOption:B,renderInput:I});return v.jsxs($.FormControl,{margin:p,fullWidth:!0,children:[(l||f)&&v.jsx($.Typography,{...u,children:n}),f?v.jsx($.Typography,{children:m==null?void 0:m.description}):v.jsxs($.Box,{children:[V,v.jsx(pr,{name:e,id:`${e}-err`})]})]})},tD=t=>{const{name:e,radios:n=[],label:r=Yn(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:m,setValue:g,getValues:b,formState:{errors:y}}=ln(),x=["radioProps","labelPlacement"],C=["disableRedLabelOnError","disableLabel","sameButtonColor","labelPlacement","focused","margin","fullWidth","labelAlignment"],_=()=>t.labelPlacement=="start"?"right":t.labelPlacement=="top"||t.labelPlacement=="bottom"?"center":"left",T=n.map((A,R)=>{const N=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:N?"flex-start":"center"},value:R.toString(),control:v.jsx($.Radio,{id:`${A.value}-rb`,color:t.sameButtonColor?t.sameButtonColor:A.color??"default",...fr({...A},x)}),label:v.jsx("div",{style:{marginTop:N?"10px":0},children:O}),labelPlacement:o,disabled:A.disabled||a,style:{textAlign:_()}},`rb-${R}-${r}`)}),w=()=>{const A=n.find(R=>R.value===b(e));return v.jsxs($.Box,{children:[v.jsx($.Typography,{...p,children:r}),k(A)]})},k=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=>{g(e,A.target.value),f&&f(A.target.value)};return v.jsx(nr,{name:e,control:m,render:({})=>v.jsx($.FormControl,{focused:t.focused,margin:u,fullWidth:t.fullWidth,error:!!y,children:l?w():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)??"",...fr({...t},C),onChange:M,children:T}),v.jsx(pr,{name:e,id:`${e}-err`})]})})})},G7=t=>{const{name:e,label:n=Yn(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}=ln(),p=["label"];return s?(()=>{let g;const b=f(e);return Array.isArray(b)?g=s==="percent"?`${100*(b[0]??0)/o}% - ${100*(b[1]??0)/o}%`:`${b[0]??0} - ${b[1]??0}`:g=s==="percent"?`${100*(b??0)/o}%`:`${b??0}`,v.jsx(nr,{name:e,control:l,render:({})=>v.jsxs($.Box,{children:[v.jsx($.Typography,{...a,children:n}),v.jsx($.Typography,{children:g})]})})})():v.jsx(nr,{name:e,control:l,render:({})=>v.jsxs($.FormControl,{fullWidth:!0,children:[v.jsx($.Typography,{gutterBottom:!0,color:"textSecondary",children:n}),v.jsx($.Slider,{...fr({...t},p),id:t.name,value:f(e)??0,onChange:(g,b)=>{u(e,b)},min:r,max:o,step:i})]})})},Y7=t=>{const{name:e,options:n=[],label:r=Yn(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:m,formState:{errors:g},control:b}=ln(),y=D.useCallback(()=>{let N="";for(let O=0;O<n.length;O++)JSON.stringify(n[O].value)===JSON.stringify(m(e))&&(N=O.toString());return N},[n,m(e)]),x=D.useCallback(()=>{const N=[],O=m(e).toString().split(",");for(const I of O)for(let L=0;L<n.length;L++)n[L].value===I&&N.push(L);return N},[n,m(e)]);D.useEffect(()=>{T(t.multiple?x():y())},[n,t.multiple,m(e),x,y]);const C=(N,O)=>t.multiple?!!m(e).toString().split(",").find(I=>I===JSON.stringify(N.value)):O===n.findIndex(I=>m(e)===I.value),[_,T]=D.useState(t.multiple?x:y),w=n.map((N,O)=>{const I=o&&C(N,O)?o:void 0;return v.jsxs($.MenuItem,{id:`select-${e}-option-${N.value}`,value:O,disabled:N.disabled,children:[o&&v.jsx($.ListItemIcon,{children:I}),N.label]},O.toString())}),k=N=>{if(t.multiple){const O=[];N.target.value.forEach(I=>{n[I].value&&O.push(n[I].value)}),p(e,O.join(","),{shouldValidate:!0})}else p(e,n[N.target.value].value,{shouldValidate:!0});T(N.target.value)},M=["name","options",i?"label":"","required","selectedOptionIcon","variant","staticLabel","staticLabelProps"],A=()=>c9(n,m(e),t.multiple),R=t.renderValue??A;return v.jsx(nr,{name:e,control:b,render:()=>v.jsxs($.FormControl,{fullWidth:!0,variant:a,error:!!g[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,...fr({...t},M),name:e,value:_,fullWidth:!0,onChange:N=>k(N),displayEmpty:i,renderValue:R,children:w}),v.jsx(pr,{name:e,id:`${e}-err`})]})]})})},J7=t=>{const{name:e,label:n=Yn(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:m,getValues:g}=ln();g(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(g(e))})]}):v.jsx(nr,{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,{...fr({...t},b),id:e,...x,onChange:C=>{if(typeof u=="string"&&typeof f=="string"){const _=C.target.checked?u:f;m(e,_),s&&s(_)}else m(e,C.target.checked),s&&s(C.target.checked)},checked:g(e)===u})}),v.jsx(pr,{name:e,id:`${e}-err`})]})})},Uc=({noTrimOnBlur:t,...e})=>{const{name:n,label:r=Yn(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:m="dense"}=e,{control:g,setValue:b,getValues:y,formState:{errors:x}}=ln();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 C=T=>{if(i){const w=l9(T.target.value,o,y(n),T.target);b(n,w)}else b(n,T.target.value);e.onChange&&e.onChange(T)},_=["autoFormat","format","staticLabel","staticLabelProps","endIcon","startIcon"];return v.jsx(nr,{name:n,control:g,render:({field:T})=>v.jsxs($.FormControl,{margin:m,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,{...T,variant:"outlined",fullWidth:!0,...y,id:`${n}-tf`,error:!!x[n],placeholder:s,...fr({...e},_),onChange:C,label:a?void 0:r,slotProps:{input:{endAdornment:p,startAdornment:f}},onBlur:w=>{t||b(n,w.target.value.trim()),e.onBlur&&e.onBlur(w)}}),v.jsx(pr,{name:n,id:`${n}-err`})]})]})})},X7=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"),Z7=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"),Q7=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"),eK=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"),tK=Ke(v.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),nK=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"),rK=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"),oK=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"),iK=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"),nD=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"),sK=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"),aK=Ke(v.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenter"),lK=Ke(v.jsx("path",{d:"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z"}),"FormatAlignJustify"),cK=Ke(v.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeft"),uK=Ke(v.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRight"),dK=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"),fK=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"),pK=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"),hK=Ke(v.jsx("path",{d:"M11 17h10v-2H11zm-8-5 4 4V8zm0 9h18v-2H3zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z"}),"FormatIndentDecrease"),mK=Ke(v.jsx("path",{d:"M3 21h18v-2H3zM3 8v8l4-4zm8 9h10v-2H11zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z"}),"FormatIndentIncrease"),gK=Ke(v.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),yK=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"),bK=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"),vK=Ke(v.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"}),"FormatQuote"),xK=Ke(v.jsx("path",{d:"M9 4v3h5v12h3V7h5V4zm-6 8h3v7h3v-7h3V9H3z"}),"FormatSize"),SK=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"),CK=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"),wK=Ke(v.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRule"),TK=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"),_K=Ke(v.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),rD=Ke(v.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),oD=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"),w1=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"),EK=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"),kK=Ke(v.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),OK=Ke(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),cE=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"),MK=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"),AK=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"),RK=Ke(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),IK=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"),DK=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"),PK=Ke(v.jsx("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort"),NK=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"),LK=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"),jK=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"),$K=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"),FK=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(DK,{})})}),endAdornment:o&&v.jsx($.IconButton,{style:{marginRight:-10},"aria-label":"clear search","data-testid":"clear-search",onClick:u,children:v.jsx(oK,{})})}}})};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 Qt({props:t,name:e}){return x1({props:t,name:e,defaultTheme:Rh,themeId:qu})}const BK=["localeText"],up=D.createContext(null);process.env.NODE_ENV!=="production"&&(up.displayName="MuiPickersAdapterContext");const T1=function(e){const{localeText:n}=e,r=dt(e,BK),{utils:o,localeText:i}=D.useContext(up)??{utils:void 0,localeText:void 0},s=Qt({props:r,name:"MuiLocalizationProvider"}),{children:a,dateAdapter:l,dateFormats:u,dateLibInstance:f,adapterLocale:p,localeText:m}=s,g=D.useMemo(()=>ie({},m,i,n),[m,i,n]),b=D.useMemo(()=>{if(!l)return o||null;const C=new l({locale:p,formats:u,instance:f});if(!C.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(`
|
|
107
|
+
`));return C},[l,p,u,f,o]),y=D.useMemo(()=>b?{minDate:b.date("1900-01-01T00:00:00.000"),maxDate:b.date("2099-12-31T00:00:00.000")}:null,[b]),x=D.useMemo(()=>({utils:b,defaultDates:y,localeText:g}),[y,b,g]);return v.jsx(up.Provider,{value:x,children:a})};process.env.NODE_ENV!=="production"&&(T1.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 jf={exports:{}},VK=jf.exports,uE;function zK(){return uE||(uE=1,function(t,e){(function(n,r){t.exports=r()})(VK,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",l="hour",u="day",f="week",p="month",m="quarter",g="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+)?$/,C=/\[([^\]]+)]|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,_={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(V){var j=["th","st","nd","rd"],F=V%100;return"["+V+(j[(F-20)%10]||j[F]||j[0])+"]"}},T=function(V,j,F){var U=String(V);return!U||U.length>=j?V:""+Array(j+1-U.length).join(F)+V},w={s:T,z:function(V){var j=-V.utcOffset(),F=Math.abs(j),U=Math.floor(F/60),K=F%60;return(j<=0?"+":"-")+T(U,2,"0")+":"+T(K,2,"0")},m:function V(j,F){if(j.date()<F.date())return-V(F,j);var U=12*(F.year()-j.year())+(F.month()-j.month()),K=j.clone().add(U,p),Y=F-K<0,G=j.clone().add(U+(Y?-1:1),p);return+(-(U+(F-K)/(Y?K-G:G-K))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:p,y:g,w:f,d:u,D:b,h:l,m:a,s,ms:i,Q:m}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},k="en",M={};M[k]=_;var A="$isDayjsObject",R=function(V){return V instanceof L||!(!V||!V[A])},N=function V(j,F,U){var K;if(!j)return k;if(typeof j=="string"){var Y=j.toLowerCase();M[Y]&&(K=Y),F&&(M[Y]=F,K=Y);var G=j.split("-");if(!K&&G.length>1)return V(G[0])}else{var Z=j.name;M[Z]=j,K=Z}return!U&&K&&(k=K),K||!U&&k},O=function(V,j){if(R(V))return V.clone();var F=typeof j=="object"?j:{};return F.date=V,F.args=arguments,new L(F)},I=w;I.l=N,I.i=R,I.w=function(V,j){return O(V,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var L=function(){function V(F){this.$L=N(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[A]=!0}var j=V.prototype;return j.parse=function(F){this.$d=function(U){var K=U.date,Y=U.utc;if(K===null)return new Date(NaN);if(I.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,me=(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,me)):new Date(G[1],Z,G[3]||1,G[4]||0,G[5]||0,G[6]||0,me)}}return new Date(K)}(F),this.init()},j.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},j.$utils=function(){return I},j.isValid=function(){return this.$d.toString()!==y},j.isSame=function(F,U){var K=O(F);return this.startOf(U)<=K&&K<=this.endOf(U)},j.isAfter=function(F,U){return O(F)<this.startOf(U)},j.isBefore=function(F,U){return this.endOf(U)<O(F)},j.$g=function(F,U,K){return I.u(F)?this[U]:this.set(K,F)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(F,U){var K=this,Y=!!I.u(U)||U,G=I.p(F),Z=function(Q,ae){var ve=I.w(K.$u?Date.UTC(K.$y,ae,Q):new Date(K.$y,ae,Q),K);return Y?ve:ve.endOf(u)},me=function(Q,ae){return I.w(K.toDate()[Q].apply(K.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(ae)),K)},he=this.$W,ge=this.$M,oe=this.$D,ye="set"+(this.$u?"UTC":"");switch(G){case g:return Y?Z(1,0):Z(31,11);case p:return Y?Z(1,ge):Z(0,ge+1);case f:var de=this.$locale().weekStart||0,X=(he<de?he+7:he)-de;return Z(Y?oe-X:oe+(6-X),ge);case u:case b:return me(ye+"Hours",0);case l:return me(ye+"Minutes",1);case a:return me(ye+"Seconds",2);case s:return me(ye+"Milliseconds",3);default:return this.clone()}},j.endOf=function(F){return this.startOf(F,!1)},j.$set=function(F,U){var K,Y=I.p(F),G="set"+(this.$u?"UTC":""),Z=(K={},K[u]=G+"Date",K[b]=G+"Date",K[p]=G+"Month",K[g]=G+"FullYear",K[l]=G+"Hours",K[a]=G+"Minutes",K[s]=G+"Seconds",K[i]=G+"Milliseconds",K)[Y],me=Y===u?this.$D+(U-this.$W):U;if(Y===p||Y===g){var he=this.clone().set(b,1);he.$d[Z](me),he.init(),this.$d=he.set(b,Math.min(this.$D,he.daysInMonth())).$d}else Z&&this.$d[Z](me);return this.init(),this},j.set=function(F,U){return this.clone().$set(F,U)},j.get=function(F){return this[I.p(F)]()},j.add=function(F,U){var K,Y=this;F=Number(F);var G=I.p(U),Z=function(ge){var oe=O(Y);return I.w(oe.date(oe.date()+Math.round(ge*F)),Y)};if(G===p)return this.set(p,this.$M+F);if(G===g)return this.set(g,this.$y+F);if(G===u)return Z(1);if(G===f)return Z(7);var me=(K={},K[a]=r,K[l]=o,K[s]=n,K)[G]||1,he=this.$d.getTime()+F*me;return I.w(he,this)},j.subtract=function(F,U){return this.add(-1*F,U)},j.format=function(F){var U=this,K=this.$locale();if(!this.isValid())return K.invalidDate||y;var Y=F||"YYYY-MM-DDTHH:mm:ssZ",G=I.z(this),Z=this.$H,me=this.$m,he=this.$M,ge=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 I.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(C,function(ae,ve){return ve||function(ne){switch(ne){case"YY":return String(U.$y).slice(-2);case"YYYY":return I.s(U.$y,4,"0");case"M":return he+1;case"MM":return I.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 I.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return de(K.weekdaysMin,U.$W,ge,2);case"ddd":return de(K.weekdaysShort,U.$W,ge,3);case"dddd":return ge[U.$W];case"H":return String(Z);case"HH":return I.s(Z,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return Q(Z,me,!0);case"A":return Q(Z,me,!1);case"m":return String(me);case"mm":return I.s(me,2,"0");case"s":return String(U.$s);case"ss":return I.s(U.$s,2,"0");case"SSS":return I.s(U.$ms,3,"0");case"Z":return G}return null}(ae)||G.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(F,U,K){var Y,G=this,Z=I.p(U),me=O(F),he=(me.utcOffset()-this.utcOffset())*r,ge=this-me,oe=function(){return I.m(G,me)};switch(Z){case g:Y=oe()/12;break;case p:Y=oe();break;case m:Y=oe()/3;break;case f:Y=(ge-he)/6048e5;break;case u:Y=(ge-he)/864e5;break;case l:Y=ge/o;break;case a:Y=ge/r;break;case s:Y=ge/n;break;default:Y=ge}return K?Y:I.a(Y)},j.daysInMonth=function(){return this.endOf(p).$D},j.$locale=function(){return M[this.$L]},j.locale=function(F,U){if(!F)return this.$L;var K=this.clone(),Y=N(F,U,!0);return Y&&(K.$L=Y),K},j.clone=function(){return I.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},V}(),B=L.prototype;return O.prototype=B,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",u],["$M",p],["$y",g],["$D",b]].forEach(function(V){B[V[1]]=function(j){return this.$g(j,V[0],V[1])}}),O.extend=function(V,j){return V.$i||(V(j,L,O),V.$i=!0),O},O.locale=N,O.isDayjs=R,O.unix=function(V){return O(1e3*V)},O.en=M[k],O.Ls=M,O.p={},O})}(jf)),jf.exports}var HK=zK();const En=yr(HK);var $f={exports:{}},WK=$f.exports,dE;function qK(){return dE||(dE=1,function(t,e){(function(n,r){t.exports=r()})(WK,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 m=s(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),g=this.diff(m,n,!0);return g<0?s(this).startOf("week").week():Math.ceil(g)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})}($f)),$f.exports}var UK=qK();const KK=yr(UK);var Ff={exports:{}},GK=Ff.exports,fE;function YK(){return fE||(fE=1,function(t,e){(function(n,r){t.exports=r()})(GK,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(C){this[x]=+C}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(x){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var _=C.match(/([+-]|\d\d)/g),T=60*_[1]+(+_[2]||0);return T===0?0:_[0]==="+"?-T:T}(x)}],m=function(x){var C=l[x];return C&&(C.indexOf?C:C.s.concat(C.f))},g=function(x,C){var _,T=l.meridiem;if(T){for(var w=1;w<=24;w+=1)if(x.indexOf(T(w,0,C))>-1){_=w>12;break}}else _=x===(C?"pm":"PM");return _},b={A:[a,function(x){this.afternoon=g(x,!1)}],a:[a,function(x){this.afternoon=g(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 C=l.ordinal,_=x.match(/\d+/);if(this.day=_[0],C)for(var T=1;T<=31;T+=1)C(T).replace(/\[|\]/g,"")===x&&(this.day=T)}],w:[s,f("week")],ww:[i,f("week")],M:[s,f("month")],MM:[i,f("month")],MMM:[a,function(x){var C=m("months"),_=(m("monthsShort")||C.map(function(T){return T.slice(0,3)})).indexOf(x)+1;if(_<1)throw new Error;this.month=_%12||_}],MMMM:[a,function(x){var C=m("months").indexOf(x)+1;if(C<1)throw new Error;this.month=C%12||C}],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 C,_;C=x,_=l&&l.formats;for(var T=(x=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,I,L){var B=L&&L.toUpperCase();return I||_[L]||n[L]||_[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,j,F){return j||F.slice(1)})})).match(r),w=T.length,k=0;k<w;k+=1){var M=T[k],A=b[M],R=A&&A[0],N=A&&A[1];T[k]=N?{regex:R,parser:N}:M.replace(/^\[|\]$/g,"")}return function(O){for(var I={},L=0,B=0;L<w;L+=1){var V=T[L];if(typeof V=="string")B+=V.length;else{var j=V.regex,F=V.parser,U=O.slice(B),K=j.exec(U)[0];F.call(I,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}}(I),I}}return function(x,C,_){_.p.customParseFormat=!0,x&&x.parseTwoDigitYear&&(u=x.parseTwoDigitYear);var T=C.prototype,w=T.parse;T.parse=function(k){var M=k.date,A=k.utc,R=k.args;this.$u=A;var N=R[1];if(typeof N=="string"){var O=R[2]===!0,I=R[3]===!0,L=O||I,B=R[2];I&&(B=R[2]),l=this.$locale(),!O&&B&&(l=_.Ls[B]),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),me=Z.year,he=Z.month,ge=Z.day,oe=Z.hours,ye=Z.minutes,de=Z.seconds,X=Z.milliseconds,Q=Z.zone,ae=Z.week,ve=new Date,ne=ge||(me||he?1:ve.getDate()),ce=me||ve.getFullYear(),fe=0;me&&!he||(fe=he>0?he-1:ve.getMonth());var xe,_e=oe||0,Te=ye||0,Pe=de||0,Be=X||0;return Q?new Date(Date.UTC(ce,fe,ne,_e,Te,Pe,Be+60*Q.offset*1e3)):Y?new Date(Date.UTC(ce,fe,ne,_e,Te,Pe,Be)):(xe=new Date(ce,fe,ne,_e,Te,Pe,Be),ae&&(xe=G(xe).week(ae).toDate()),xe)}catch{return new Date("")}}(M,N,A,_),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),L&&M!=this.format(N)&&(this.$d=new Date("")),l={}}else if(N instanceof Array)for(var V=N.length,j=1;j<=V;j+=1){R[1]=N[j-1];var F=_.apply(this,R);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}j===V&&(this.$d=new Date(""))}else w.call(this,k)}}})}(Ff)),Ff.exports}var JK=YK();const XK=yr(JK);var Bf={exports:{}},ZK=Bf.exports,pE;function QK(){return pE||(pE=1,function(t,e){(function(n,r){t.exports=r()})(ZK,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,m){return p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(g,b,y){var x=y&&y.toUpperCase();return b||m[y]||n[y]||m[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C,_,T){return _||T.slice(1)})})}(l,u===void 0?{}:u);return a.call(this,f)}}})}(Bf)),Bf.exports}var eG=QK();const tG=yr(eG);var Vf={exports:{}},nG=Vf.exports,hE;function rG(){return hE||(hE=1,function(t,e){(function(n,r){t.exports=r()})(nG,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]==="(",m=l[1]===")";return(p?this.isAfter(u,a):!this.isBefore(u,a))&&(m?this.isBefore(f,a):!this.isAfter(f,a))||(p?this.isBefore(u,a):!this.isAfter(u,a))&&(m?this.isAfter(f,a):!this.isBefore(f,a))}}})}(Vf)),Vf.exports}var oG=rG();const iG=yr(oG);var zf={exports:{}},sG=zf.exports,mE;function aG(){return mE||(mE=1,function(t,e){(function(n,r){t.exports=r()})(sG,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)}}})}(zf)),zf.exports}var lG=aG();const cG=yr(lG),gE=new Set;function iD(t,e="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(t)?t.join(`
|
|
108
|
+
`):t;gE.has(n)||(gE.add(n),e==="error"?console.error(n):console.warn(n))}En.extend(tG);En.extend(KK);En.extend(iG);En.extend(cG);const uG={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"},dG={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"},_y=["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(`
|
|
109
|
+
`),yE=["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(`
|
|
110
|
+
`),fG=(t,e)=>e?(...n)=>t(...n).locale(e):t;class pG{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=uG,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale()?r:r.locale(o)},this.hasUTCPlugin=()=>typeof En.utc<"u",this.hasTimezonePlugin=()=>typeof En.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 En.tz.guess();default:return r}},this.createSystemDate=r=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const o=En.tz.guess();return o!=="UTC"?En.tz(r,o):En(r)}return En(r)},this.createUTCDate=r=>{if(!this.hasUTCPlugin())throw new Error(_y);return En.utc(r)},this.createTZDate=(r,o)=>{if(!this.hasUTCPlugin())throw new Error(_y);if(!this.hasTimezonePlugin())throw new Error(yE);const i=r!==void 0&&!r.endsWith("Z");return En(r).tz(this.cleanTimezone(o),i)},this.getLocaleFormats=()=>{const r=En.Ls,o=this.locale||"en";let i=r[o];return i===void 0&&(process.env.NODE_ENV!=="production"&&iD(["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=()=>En(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(_y);return r.utc()}if(o==="system")return r.local();if(!this.hasTimezonePlugin()){if(o==="default")return r;throw new Error(yE)}return En.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=fG(En,e),this.locale=e,this.formats=ie({},dG,n),En.extend(XK)}getDayOfWeek(e){return e.day()+1}}function af(t){return parseInt(t,10)||0}const hG={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function mG(t){for(const e in t)return!1;return!0}function bE(t){return mG(t)||t.outerHeightStyle===0&&!t.overflowing}const sD=D.forwardRef(function(e,n){const{onChange:r,maxRows:o,minRows:i=1,style:s,value:a,...l}=e,{current:u}=D.useRef(a!=null),f=D.useRef(null),p=Pt(n,f),m=D.useRef(null),g=D.useRef(null),b=D.useCallback(()=>{const T=f.current,w=g.current;if(!T||!w)return;const M=Ii(T).getComputedStyle(T);if(M.width==="0px")return{outerHeightStyle:0,overflowing:!1};w.style.width=M.width,w.value=T.value||e.placeholder||"x",w.value.slice(-1)===`
|
|
111
|
+
`&&(w.value+=" ");const A=M.boxSizing,R=af(M.paddingBottom)+af(M.paddingTop),N=af(M.borderBottomWidth)+af(M.borderTopWidth),O=w.scrollHeight;w.value="x";const I=w.scrollHeight;let L=O;i&&(L=Math.max(Number(i)*I,L)),o&&(L=Math.min(Number(o)*I,L)),L=Math.max(L,I);const B=L+(A==="border-box"?R+N:0),V=Math.abs(L-O)<=1;return{outerHeightStyle:B,overflowing:V}},[o,i,e.placeholder]),y=qe(()=>{const T=f.current,w=b();if(!T||!w||bE(w))return!1;const k=w.outerHeightStyle;return m.current!=null&&m.current!==k}),x=D.useCallback(()=>{const T=f.current,w=b();if(!T||!w||bE(w))return;const k=w.outerHeightStyle;m.current!==k&&(m.current=k,T.style.height=`${k}px`),T.style.overflow=w.overflowing?"hidden":""},[b]),C=D.useRef(-1);zn(()=>{const T=fI(x),w=f==null?void 0:f.current;if(!w)return;const k=Ii(w);k.addEventListener("resize",T);let M;return typeof ResizeObserver<"u"&&(M=new ResizeObserver(()=>{y()&&(M.unobserve(w),cancelAnimationFrame(C.current),x(),C.current=requestAnimationFrame(()=>{M.observe(w)}))}),M.observe(w)),()=>{T.clear(),cancelAnimationFrame(C.current),k.removeEventListener("resize",T),M&&M.disconnect()}},[b,x,y]),zn(()=>{x()});const _=T=>{u||x(),r&&r(T)};return v.jsxs(D.Fragment,{children:[v.jsx("textarea",{value:a,onChange:_,ref:p,rows:i,style:s,...l}),v.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:g,tabIndex:-1,style:{...hG.shadow,...s,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(sD.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 gu(t){return typeof t=="string"}function Gl({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 Ku=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ku.displayName="FormControlContext");function Io(){return D.useContext(Ku)}function vE(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function dp(t,e=!1){return t&&(vE(t.value)&&t.value!==""||e&&vE(t.defaultValue)&&t.defaultValue!=="")}function gG(t){return t.startAdornment}function yG(t){return Qe("MuiInputBase",t)}const Pl=et("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var xE;const Dh=(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${Le(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},Ph=(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]},bG=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:m,startAdornment:g,type:b}=t,y={root:["root",`color${Le(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",m&&m!=="medium"&&`size${Le(m)}`,f&&"multiline",g&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",p&&"readOnly"],input:["input",r&&"disabled",b==="search"&&"inputTypeSearch",f&&"inputMultiline",m==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",g&&"inputAdornedStart",i&&"inputAdornedEnd",p&&"readOnly"]};return Ze(y,yG,e)},Nh=Se("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Dh})(Bt(({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",[`&.${Pl.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%"}}]}))),Lh=Se("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Ph})(Bt(({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] + .${Pl.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},[`&.${Pl.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"}}]}})),SE=b7({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),jh=D.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:m,disableInjectingGlobalStyles:g,endAdornment:b,error:y,fullWidth:x=!1,id:C,inputComponent:_="input",inputProps:T={},inputRef:w,margin:k,maxRows:M,minRows:A,multiline:R=!1,name:N,onBlur:O,onChange:I,onClick:L,onFocus:B,onKeyDown:V,onKeyUp:j,placeholder:F,readOnly:U,renderSuffix:K,rows:Y,size:G,slotProps:Z={},slots:me={},startAdornment:he,type:ge="text",value:oe,...ye}=r,de=T.value!=null?T.value:oe,{current:X}=D.useRef(de!=null),Q=D.useRef(),ae=D.useCallback(ct=>{process.env.NODE_ENV!=="production"&&ct&&ct.nodeName!=="INPUT"&&!ct.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(`
|
|
112
|
+
`))},[]),ve=Pt(Q,w,T.ref,ae),[ne,ce]=D.useState(!1),fe=Io();process.env.NODE_ENV!=="production"&&D.useEffect(()=>{if(fe)return fe.registerEffect()},[fe]);const xe=Gl({props:r,muiFormControl:fe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});xe.focused=fe?fe.focused:ne,D.useEffect(()=>{!fe&&m&&ne&&(ce(!1),O&&O())},[fe,m,ne,O]);const _e=fe&&fe.onFilled,Te=fe&&fe.onEmpty,Pe=D.useCallback(ct=>{dp(ct)?_e&&_e():Te&&Te()},[_e,Te]);zn(()=>{X&&Pe({value:de})},[de,Pe,X]);const Be=ct=>{B&&B(ct),T.onFocus&&T.onFocus(ct),fe&&fe.onFocus?fe.onFocus(ct):ce(!0)},W=ct=>{O&&O(ct),T.onBlur&&T.onBlur(ct),fe&&fe.onBlur?fe.onBlur(ct):ce(!1)},te=(ct,...An)=>{if(!X){const Nt=ct.target||Q.current;if(Nt==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.":Jo(1));Pe({value:Nt.value})}T.onChange&&T.onChange(ct,...An),I&&I(ct,...An)};D.useEffect(()=>{Pe(Q.current)},[]);const re=ct=>{Q.current&&ct.currentTarget===ct.target&&Q.current.focus(),L&&L(ct)};let Oe=_,Re=T;R&&Oe==="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."),Re={type:void 0,minRows:Y,maxRows:Y,...Re}):Re={type:void 0,maxRows:M,minRows:A,...Re},Oe=sD);const Ie=ct=>{Pe(ct.animationName==="mui-auto-fill-cancel"?Q.current:{value:"x"})};D.useEffect(()=>{fe&&fe.setAdornedStart(!!he)},[fe,he]);const Ve={...r,color:xe.color||"primary",disabled:xe.disabled,endAdornment:b,error:xe.error,focused:xe.focused,formControl:fe,fullWidth:x,hiddenLabel:xe.hiddenLabel,multiline:R,size:xe.size,startAdornment:he,type:ge},rt=bG(Ve),tt=me.root||u.Root||Nh,kt=Z.root||f.root||{},vn=me.input||u.Input||Lh;return Re={...Re,...Z.input??f.input},v.jsxs(D.Fragment,{children:[!g&&typeof SE=="function"&&(xE||(xE=v.jsx(SE,{}))),v.jsxs(tt,{...kt,ref:n,onClick:re,...ye,...!gu(tt)&&{ownerState:{...Ve,...kt.ownerState}},className:ze(rt.root,kt.className,a,U&&"MuiInputBase-readOnly"),children:[he,v.jsx(Ku.Provider,{value:null,children:v.jsx(vn,{"aria-invalid":xe.error,"aria-describedby":o,autoComplete:i,autoFocus:s,defaultValue:p,disabled:xe.disabled,id:C,onAnimationStart:Ie,name:N,placeholder:F,readOnly:U,required:xe.required,rows:Y,value:de,onKeyDown:V,onKeyUp:j,type:ge,...Re,...!gu(vn)&&{as:Oe,ownerState:{...Ve,...Re.ownerState}},ref:ve,className:ze(rt.input,Re.className,U&&"MuiInputBase-readOnly"),onBlur:W,onChange:te,onFocus:Be})}),b,K?K({...xe,startAdornment:he}):null]})]})});process.env.NODE_ENV!=="production"&&(jh.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:gh,inputProps:c.object,inputRef:On,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 vG(t){return typeof t.main=="string"}function xG(t,e=[]){if(!vG(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&&xG(e,t)}function SG(t){return Qe("MuiInput",t)}const Sc={...Pl,...et("MuiInput",["root","underline","input"])},CG=t=>{const{classes:e,disableUnderline:n}=t,o=Ze({root:["root",!n&&"underline"],input:["input"]},SG,e);return{...e,...o}},wG=Se(Nh,{shouldForwardProp:t=>Ao(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Dh(t,e),!n.disableUnderline&&e.underline]}})(Bt(({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"},[`&.${Sc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Sc.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(.${Sc.disabled}, .${Sc.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Sc.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}`}}}))]}})),TG=Se(Lh,{name:"MuiInput",slot:"Input",overridesResolver:Ph})({}),$h=D.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:m="text",...g}=r,b=CG(r),x={root:{ownerState:{disableUnderline:o}}},C=f??s?Fn(f??s,x):x,_=p.root??i.Root??wG,T=p.input??i.Input??TG;return v.jsx(jh,{slots:{root:_,input:T},slotProps:C,fullWidth:a,inputComponent:l,multiline:u,ref:n,type:m,...g,classes:b})});process.env.NODE_ENV!=="production"&&($h.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:On,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});$h.muiName="Input";function _G(t){return Qe("MuiFilledInput",t)}const Hs={...Pl,...et("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},EG=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${Le(i)}`,s&&"hiddenLabel",a&&"multiline"],input:["input"]},u=Ze(l,_G,e);return{...e,...u}},kG=Se(Nh,{shouldForwardProp:t=>Ao(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Dh(t,e),!n.disableUnderline&&e.underline]}})(Bt(({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}},[`&.${Hs.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r},[`&.${Hs.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"},[`&.${Hs.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Hs.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(.${Hs.disabled}, .${Hs.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Hs.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}}]}})),OG=Se(Lh,{name:"MuiFilledInput",slot:"Input",overridesResolver:Ph})(Bt(({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}}]}))),Fh=D.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:m={},type:g="text",...b}=r,y={...r,disableUnderline:o,fullWidth:a,inputComponent:u,multiline:f,type:g},x=EG(r),C={root:{ownerState:y},input:{ownerState:y}},_=p??s?Fn(C,p??s):C,T=m.root??i.Root??kG,w=m.input??i.Input??OG;return v.jsx(jh,{slots:{root:T,input:w},slotProps:_,fullWidth:a,inputComponent:u,multiline:f,ref:n,type:g,...b,classes:x})});process.env.NODE_ENV!=="production"&&(Fh.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:On,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});Fh.muiName="Input";var CE;const MG=Se("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Ao})({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%"}),AG=Se("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Ao})(Bt(({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 aD(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(MG,{"aria-hidden":!0,className:r,ownerState:l,...s,children:v.jsx(AG,{ownerState:l,children:a?v.jsx("span",{children:o}):CE||(CE=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}process.env.NODE_ENV!=="production"&&(aD.propTypes={children:c.node,classes:c.object,className:c.string,label:c.node,notched:c.bool.isRequired,style:c.object});function RG(t){return Qe("MuiOutlinedInput",t)}const Fo={...Pl,...et("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},...m}=i,g=f[t]||r,b=yh(p[t],o),{props:{component:y,...x},internalRef:C}=CI({className:n,...l,externalForwardedProps:t==="root"?m:void 0,externalSlotProps:b}),_=Pt(C,b==null?void 0:b.ref,e.ref),T=t==="root"?y||u:y,w=vI(g,{...t==="root"&&!u&&!f[t]&&s,...t!=="root"&&!f[t]&&s,...x,...T&&!a&&{as:T},...T&&a&&{component:T},ref:_},o);return[g,w]}const IG=t=>{const{classes:e}=t,r=Ze({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},RG,e);return{...e,...r}},DG=Se(Nh,{shouldForwardProp:t=>Ao(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Dh})(Bt(({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 .${Fo.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Fo.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}},[`&.${Fo.focused} .${Fo.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(t.palette).filter(Qn()).map(([n])=>({props:{color:n},style:{[`&.${Fo.focused} .${Fo.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}})),{props:{},style:{[`&.${Fo.error} .${Fo.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Fo.disabled} .${Fo.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"}}]}})),PG=Se(aD,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(Bt(({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}})),NG=Se(Lh,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Ph})(Bt(({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}}]}))),Bh=D.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:m="text",...g}=r,b=IG(r),y=Io(),x=Gl({props:r,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),C={...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:m},_=f.root??o.Root??DG,T=f.input??o.Input??NG,[w,k]=Wt("notchedOutline",{elementType:PG,className:b.notchedOutline,shouldForwardComponentProp:!0,ownerState:C,externalForwardedProps:{slots:f,slotProps:p},additionalProps:{label:a!=null&&a!==""&&x.required?v.jsxs(D.Fragment,{children:[a," ","*"]}):a}});return v.jsx(jh,{slots:{root:_,input:T},slotProps:p,renderSuffix:M=>v.jsx(w,{...k,notched:typeof u<"u"?u:!!(M.startAdornment||M.filled||M.focused)}),fullWidth:i,inputComponent:s,multiline:l,ref:n,type:m,...g,classes:{...b,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(Bh.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:On,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});Bh.muiName="Input";function LG(t){return Qe("MuiFormLabel",t)}const Kc=et("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),jG=t=>{const{classes:e,color:n,focused:r,disabled:o,error:i,filled:s,required:a}=t,l={root:["root",`color${Le(n)}`,o&&"disabled",i&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",i&&"error"]};return Ze(l,LG,e)},$G=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]}})(Bt(({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:{[`&.${Kc.focused}`]:{color:(t.vars||t).palette[e].main}}})),{props:{},style:{[`&.${Kc.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Kc.error}`]:{color:(t.vars||t).palette.error.main}}}]}))),FG=Se("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(Bt(({theme:t})=>({[`&.${Kc.error}`]:{color:(t.vars||t).palette.error.main}}))),lD=D.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:m,...g}=r,b=Io(),y=Gl({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},C=jG(x);return v.jsxs($G,{as:a,ownerState:x,className:ze(C.root,i),ref:n,...g,children:[o,y.required&&v.jsxs(FG,{ownerState:x,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]})});process.env.NODE_ENV!=="production"&&(lD.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 BG(t){return Qe("MuiInputLabel",t)}et("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const VG=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${Le(r)}`,s],asterisk:[a&&"asterisk"]},u=Ze(l,BG,e);return{...e,...u}},zG=Se(lD,{shouldForwardProp:t=>Ao(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Kc.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]]}})(Bt(({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)"}}]}))),_1=D.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=Io();let p=s;typeof p>"u"&&f&&(p=f.filled||f.focused||f.adornedStart);const m=Gl({props:r,muiFormControl:f,states:["size","variant","required","focused"]}),g={...r,disableAnimation:o,formControl:f,shrink:p,size:m.size,variant:m.variant,required:m.required,focused:m.focused},b=VG(g);return v.jsx(zG,{"data-shrink":p,ref:n,className:ze(b.root,l),...u,ownerState:g,classes:b})});process.env.NODE_ENV!=="production"&&(_1.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 HG(t){return Qe("MuiFormControl",t)}et("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const WG=t=>{const{classes:e,margin:n,fullWidth:r}=t,o={root:["root",n!=="none"&&`margin${Le(n)}`,r&&"fullWidth"]};return Ze(o,HG,e)},qG=Se("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`margin${Le(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%"}}]}),E1=D.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:m=!1,margin:g="none",required:b=!1,size:y="medium",variant:x="outlined",...C}=r,_={...r,color:s,component:a,disabled:l,error:u,fullWidth:p,hiddenLabel:m,margin:g,required:b,size:y,variant:x},T=WG(_),[w,k]=D.useState(()=>{let F=!1;return o&&D.Children.forEach(o,U=>{if(!Cl(U,["Input","Select"]))return;const K=Cl(U,["Select"])?U.props.input:U;K&&gG(K.props)&&(F=!0)}),F}),[M,A]=D.useState(()=>{let F=!1;return o&&D.Children.forEach(o,U=>{Cl(U,["Input","Select"])&&(dp(U.props,!0)||dp(U.props.inputProps,!0))&&(F=!0)}),F}),[R,N]=D.useState(!1);l&&R&&N(!1);const O=f!==void 0&&!l?f:R;let I;const L=D.useRef(!1);process.env.NODE_ENV!=="production"&&(I=()=>(L.current&&console.error(["MUI: There are multiple `InputBase` components inside a FormControl.","This creates visual inconsistencies, only use one `InputBase`."].join(`
|
|
113
|
+
`)),L.current=!0,()=>{L.current=!1}));const B=D.useCallback(()=>{A(!0)},[]),V=D.useCallback(()=>{A(!1)},[]),j=D.useMemo(()=>({adornedStart:w,setAdornedStart:k,color:s,disabled:l,error:u,filled:M,focused:O,fullWidth:p,hiddenLabel:m,size:y,onBlur:()=>{N(!1)},onFocus:()=>{N(!0)},onEmpty:V,onFilled:B,registerEffect:I,required:b,variant:x}),[w,s,l,u,M,O,p,m,I,V,B,b,y,x]);return v.jsx(Ku.Provider,{value:j,children:v.jsx(qG,{as:a,ownerState:_,className:ze(T.root,i),ref:n,...C,children:o})})});process.env.NODE_ENV!=="production"&&(E1.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 UG(t){return Qe("MuiFormHelperText",t)}const wE=et("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var TE;const KG=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${Le(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Ze(u,UG,e)},GG=Se("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${Le(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(Bt(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${wE.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${wE.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}}]}))),k1=D.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:m,variant:g,...b}=r,y=Io(),x=Gl({props:r,muiFormControl:y,states:["variant","size","disabled","error","filled","focused","required"]}),C={...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 C.ownerState;const _=KG(C);return v.jsx(GG,{as:s,className:ze(_.root,i),ref:n,...b,ownerState:C,children:o===" "?TE||(TE=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):o})});process.env.NODE_ENV!=="production"&&(k1.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 _l=D.createContext({});process.env.NODE_ENV!=="production"&&(_l.displayName="ListContext");function YG(t){return Qe("MuiList",t)}et("MuiList",["root","padding","dense","subheader"]);const JG=t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t;return Ze({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},YG,e)},XG=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}}]}),O1=D.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=D.useMemo(()=>({dense:a}),[a]),m={...r,component:s,dense:a,disablePadding:l},g=JG(m);return v.jsx(_l.Provider,{value:p,children:v.jsxs(XG,{as:s,className:ze(g.root,i),ref:n,ownerState:m,...f,children:[u,o]})})});process.env.NODE_ENV!=="production"&&(O1.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 Ey(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function _E(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function cD(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 Cc(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")||!cD(a,i)||l)a=o(t,a,n);else return a.focus(),!0}return!1}const uD=D.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",...m}=e,g=D.useRef(null),b=D.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});zn(()=>{o&&g.current.focus()},[o]),D.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(T,{direction:w})=>{const k=!g.current.style.width;if(T.clientHeight<g.current.clientHeight&&k){const M=`${mI(Ii(T))}px`;g.current.style[w==="rtl"?"paddingLeft":"paddingRight"]=M,g.current.style.width=`calc(100% + ${M})`}return g.current}}),[]);const y=T=>{const w=g.current,k=T.key;if(T.ctrlKey||T.metaKey||T.altKey){f&&f(T);return}const A=tr(w).activeElement;if(k==="ArrowDown")T.preventDefault(),Cc(w,A,u,l,Ey);else if(k==="ArrowUp")T.preventDefault(),Cc(w,A,u,l,_E);else if(k==="Home")T.preventDefault(),Cc(w,null,u,l,Ey);else if(k==="End")T.preventDefault(),Cc(w,null,u,l,_E);else if(k.length===1){const R=b.current,N=k.toLowerCase(),O=performance.now();R.keys.length>0&&(O-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&N!==R.keys[0]&&(R.repeating=!1)),R.lastTime=O,R.keys.push(N);const I=A&&!R.repeating&&cD(A,R);R.previousKeyMatched&&(I||Cc(w,A,!1,l,Ey,R))?T.preventDefault():R.previousKeyMatched=!1}f&&f(T)},x=Pt(g,n);let C=-1;D.Children.forEach(s,(T,w)=>{if(!D.isValidElement(T)){C===w&&(C+=1,C>=s.length&&(C=-1));return}process.env.NODE_ENV!=="production"&&Ai.isFragment(T)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
114
|
+
`)),T.props.disabled||(p==="selectedMenu"&&T.props.selected||C===-1)&&(C=w),C===w&&(T.props.disabled||T.props.muiSkipListHighlight||T.type.muiSkipListHighlight)&&(C+=1,C>=s.length&&(C=-1))});const _=D.Children.map(s,(T,w)=>{if(w===C){const k={};return i&&(k.autoFocus=!0),T.props.tabIndex===void 0&&p==="selectedMenu"&&(k.tabIndex=0),D.cloneElement(T,k)}return T});return v.jsx(O1,{role:"menu",ref:x,className:a,onKeyDown:y,tabIndex:o?0:-1,...m,children:_})});process.env.NODE_ENV!=="production"&&(uD.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 lx(t,e){return lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},lx(t,e)}function M1(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,lx(t,e)}function ZG(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function QG(t,e){t.classList?t.classList.add(e):ZG(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function EE(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function eY(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=EE(t.className,e):t.setAttribute("class",EE(t.className&&t.className.baseVal||"",e))}const kE={disabled:!1};var tY=process.env.NODE_ENV!=="production"?c.oneOfType([c.number,c.shape({enter:c.number,exit:c.number,appear:c.number}).isRequired]):null,nY=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 fp=q.createContext(null);var dD=function(e){return e.scrollTop},Nc="unmounted",Ys="exited",Js="entering",ul="entered",cx="exiting",go=function(t){M1(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=Ys,i.appearStatus=Js):l=ul:r.unmountOnExit||r.mountOnEnter?l=Nc:l=Ys,i.state={status:l},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===Nc?{status:Ys}: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!==Js&&s!==ul&&(i=Js):(s===Js||s===ul)&&(i=cx)}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===Js){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:ea.findDOMNode(this);s&&dD(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ys&&this.setState({status:Nc})},n.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[ea.findDOMNode(this),a],u=l[0],f=l[1],p=this.getTimeouts(),m=a?p.appear:p.enter;if(!o&&!s||kE.disabled){this.safeSetState({status:ul},function(){i.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:Js},function(){i.props.onEntering(u,f),i.onTransitionEnd(m,function(){i.safeSetState({status:ul},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:ea.findDOMNode(this);if(!i||kE.disabled){this.safeSetState({status:Ys},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:cx},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Ys},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:ea.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===Nc)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(fp.Provider,{value:null},typeof s=="function"?s(o,a):q.cloneElement(q.Children.only(s),a))},e}(q.Component);go.contextType=fp;go.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=tY;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 tl(){}go.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:tl,onEntering:tl,onEntered:tl,onExit:tl,onExiting:tl,onExited:tl};go.UNMOUNTED=Nc;go.EXITED=Ys;go.ENTERING=Js;go.ENTERED=ul;go.EXITING=cx;var rY=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return QG(e,r)})},ky=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return eY(e,r)})},A1=function(t){M1(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],m=p?"appear":"enter";r.addClass(f,m,"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],m=p?"appear":"enter";r.removeClasses(f,m),r.addClass(f,m,"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],m=u?p+"-active":l[a+"Active"],g=u?p+"-done":l[a+"Done"];return{baseClassName:p,activeClassName:m,doneClassName:g}},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&&dD(o),a&&(this.appliedClasses[i][s]=a,rY(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&&ky(o,a),l&&ky(o,l),u&&ky(o,u)},n.render=function(){var o=this.props;o.classNames;var i=dt(o,["classNames"]);return q.createElement(go,ie({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(q.Component);A1.defaultProps={classNames:""};A1.propTypes=process.env.NODE_ENV!=="production"?ie({},go.propTypes,{classNames:nY,onEnter:c.func,onEntering:c.func,onEntered:c.func,onExit:c.func,onExiting:c.func,onExited:c.func}):{};function oY(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function R1(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 iY(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 ra(t,e,n){return n[e]!=null?n[e]:t.props[e]}function sY(t,e){return R1(t.children,function(n){return q.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:ra(n,"appear",t),enter:ra(n,"enter",t),exit:ra(n,"exit",t)})})}function aY(t,e,n){var r=R1(t.children),o=iY(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:ra(s,"exit",t),enter:ra(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:ra(s,"exit",t),enter:ra(s,"enter",t)}))}}),o}var lY=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},cY={component:"div",childFactory:function(e){return e}},Gu=function(t){M1(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=i.handleExited.bind(oY(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?sY(o,a):aY(o,s,a),firstRender:!1}},n.handleExited=function(o,i){var s=R1(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=lY(this.state.children).map(s);return delete a.appear,delete a.enter,delete a.exit,i===null?q.createElement(fp.Provider,{value:l},u):q.createElement(fp.Provider,{value:l},q.createElement(i,a,u))},e}(q.Component);Gu.propTypes=process.env.NODE_ENV!=="production"?{component:c.any,children:c.node,appear:c.bool,enter:c.bool,exit:c.bool,childFactory:c.func}:{};Gu.defaultProps=cY;const fD=t=>t.scrollTop;function pp(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 ux(t){return`scale(${t}, ${t**2})`}const uY={entering:{opacity:1,transform:ux(1)},entered:{opacity:1,transform:"none"}},Oy=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),yu=D.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:m,onExiting:g,style:b,timeout:y="auto",TransitionComponent:x=go,...C}=e,_=hI(),T=D.useRef(),w=ji(),k=D.useRef(null),M=Pt(k,Vu(i),n),A=j=>F=>{if(j){const U=k.current;F===void 0?j(U):j(U,F)}},R=A(f),N=A((j,F)=>{fD(j);const{duration:U,delay:K,easing:Y}=pp({style:b,timeout:y,easing:s},{mode:"enter"});let G;y==="auto"?(G=w.transitions.getAutoHeightDuration(j.clientHeight),T.current=G):G=U,j.style.transition=[w.transitions.create("opacity",{duration:G,delay:K}),w.transitions.create("transform",{duration:Oy?G:G*.666,delay:K,easing:Y})].join(","),l&&l(j,F)}),O=A(u),I=A(g),L=A(j=>{const{duration:F,delay:U,easing:K}=pp({style:b,timeout:y,easing:s},{mode:"exit"});let Y;y==="auto"?(Y=w.transitions.getAutoHeightDuration(j.clientHeight),T.current=Y):Y=F,j.style.transition=[w.transitions.create("opacity",{duration:Y,delay:U}),w.transitions.create("transform",{duration:Oy?Y:Y*.666,delay:Oy?U:U||Y*.333,easing:K})].join(","),j.style.opacity=0,j.style.transform=ux(.75),p&&p(j)}),B=A(m),V=j=>{y==="auto"&&_.start(T.current||0,j),r&&r(k.current,j)};return v.jsx(x,{appear:o,in:a,nodeRef:k,onEnter:N,onEntered:O,onEntering:R,onExit:L,onExited:B,onExiting:I,addEndListener:V,timeout:y==="auto"?null:y,...C,children:(j,{ownerState:F,...U})=>D.cloneElement(i,{style:{opacity:0,transform:ux(.75),visibility:j==="exited"&&!a?"hidden":void 0,...uY[j],...b,...i.props.style},ref:M,...U})})});process.env.NODE_ENV!=="production"&&(yu.propTypes={addEndListener:c.func,appear:c.bool,children:Bu.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})])});yu&&(yu.muiSupportAuto=!0);function dY(t){const e=tr(t);return e.body===t?Ii(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Gc(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function OE(t){return parseInt(Ii(t).getComputedStyle(t).paddingRight,10)||0}function fY(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 ME(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,s=>{const a=!i.includes(s),l=!fY(s);a&&l&&Gc(s,o)})}function My(t,e){let n=-1;return t.some((r,o)=>e(r)?(n=o,!0):!1),n}function pY(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(dY(r)){const s=mI(Ii(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${OE(r)+s}px`;const a=tr(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${OE(l)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=tr(r).body;else{const s=r.parentElement,a=Ii(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 hY(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class mY{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&&Gc(e.modalRef,!1);const o=hY(n);ME(n,e.mount,e.modalRef,o,!0);const i=My(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=My(this.containers,i=>i.modals.includes(e)),o=this.containers[r];o.restore||(o.restore=pY(o,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const o=My(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&&Gc(e.modalRef,n),ME(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&&Gc(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const gY=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function yY(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 bY(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 vY(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||bY(t))}function xY(t){const e=[],n=[];return Array.from(t.querySelectorAll(gY)).forEach((r,o)=>{const i=yY(r);i===-1||!vY(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 SY(){return!0}function bu(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=xY,isEnabled:s=SY,open:a}=t,l=D.useRef(!1),u=D.useRef(null),f=D.useRef(null),p=D.useRef(null),m=D.useRef(null),g=D.useRef(!1),b=D.useRef(null),y=Pt(Vu(e),b),x=D.useRef(null);D.useEffect(()=>{!a||!b.current||(g.current=!n)},[n,a]),D.useEffect(()=>{if(!a||!b.current)return;const T=tr(b.current);return b.current.contains(T.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(`
|
|
115
|
+
`)),b.current.setAttribute("tabIndex","-1")),g.current&&b.current.focus()),()=>{o||(p.current&&p.current.focus&&(l.current=!0,p.current.focus()),p.current=null)}},[a]),D.useEffect(()=>{if(!a||!b.current)return;const T=tr(b.current),w=A=>{x.current=A,!(r||!s()||A.key!=="Tab")&&T.activeElement===b.current&&A.shiftKey&&(l.current=!0,f.current&&f.current.focus())},k=()=>{var N,O;const A=b.current;if(A===null)return;if(!T.hasFocus()||!s()||l.current){l.current=!1;return}if(A.contains(T.activeElement)||r&&T.activeElement!==u.current&&T.activeElement!==f.current)return;if(T.activeElement!==m.current)m.current=null;else if(m.current!==null)return;if(!g.current)return;let R=[];if((T.activeElement===u.current||T.activeElement===f.current)&&(R=i(b.current)),R.length>0){const I=!!((N=x.current)!=null&&N.shiftKey&&((O=x.current)==null?void 0:O.key)==="Tab"),L=R[0],B=R[R.length-1];typeof L!="string"&&typeof B!="string"&&(I?B.focus():L.focus())}else A.focus()};T.addEventListener("focusin",k),T.addEventListener("keydown",w,!0);const M=setInterval(()=>{T.activeElement&&T.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(M),T.removeEventListener("focusin",k),T.removeEventListener("keydown",w,!0)}},[n,r,o,s,a,i]);const C=T=>{p.current===null&&(p.current=T.relatedTarget),g.current=!0,m.current=T.target;const w=e.props.onFocus;w&&w(T)},_=T=>{p.current===null&&(p.current=T.relatedTarget),g.current=!0};return v.jsxs(D.Fragment,{children:[v.jsx("div",{tabIndex:a?0:-1,onFocus:_,ref:u,"data-testid":"sentinelStart"}),D.cloneElement(e,{ref:y,onFocus:C}),v.jsx("div",{tabIndex:a?0:-1,onFocus:_,ref:f,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(bu.propTypes={children:Bu,disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableRestoreFocus:c.bool,getTabbable:c.func,isEnabled:c.func,open:c.bool.isRequired});process.env.NODE_ENV!=="production"&&(bu.propTypes=uI(bu.propTypes));function CY(t){return typeof t=="function"?t():t}const vu=D.forwardRef(function(e,n){const{children:r,container:o,disablePortal:i=!1}=e,[s,a]=D.useState(null),l=Pt(D.isValidElement(r)?Vu(r):null,n);if(zn(()=>{i||a(CY(o)||document.body)},[o,i]),zn(()=>{if(s&&!i)return x_(n,s),()=>{x_(n,null)}},[n,s,i]),i){if(D.isValidElement(r)){const u={ref:l};return D.cloneElement(r,u)}return r}return s&&LH.createPortal(r,s)});process.env.NODE_ENV!=="production"&&(vu.propTypes={children:c.node,container:c.oneOfType([Ri,c.func]),disablePortal:c.bool});process.env.NODE_ENV!=="production"&&(vu.propTypes=uI(vu.propTypes));const wY={entering:{opacity:1},entered:{opacity:1}},ws=D.forwardRef(function(e,n){const r=ji(),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:m,onExit:g,onExited:b,onExiting:y,style:x,timeout:C=o,TransitionComponent:_=go,...T}=e,w=D.useRef(null),k=Pt(w,Vu(a),n),M=V=>j=>{if(V){const F=w.current;j===void 0?V(F):V(F,j)}},A=M(m),R=M((V,j)=>{fD(V);const F=pp({style:x,timeout:C,easing:l},{mode:"enter"});V.style.webkitTransition=r.transitions.create("opacity",F),V.style.transition=r.transitions.create("opacity",F),f&&f(V,j)}),N=M(p),O=M(y),I=M(V=>{const j=pp({style:x,timeout:C,easing:l},{mode:"exit"});V.style.webkitTransition=r.transitions.create("opacity",j),V.style.transition=r.transitions.create("opacity",j),g&&g(V)}),L=M(b),B=V=>{i&&i(w.current,V)};return v.jsx(_,{appear:s,in:u,nodeRef:w,onEnter:R,onEntered:N,onEntering:A,onExit:I,onExited:L,onExiting:O,addEndListener:B,timeout:C,...T,children:(V,{ownerState:j,...F})=>D.cloneElement(a,{style:{opacity:0,visibility:V==="exited"&&!u?"hidden":void 0,...wY[V],...x,...a.props.style},ref:k,...F})})});process.env.NODE_ENV!=="production"&&(ws.propTypes={addEndListener:c.func,appear:c.bool,children:Bu.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 TY(t){return Qe("MuiBackdrop",t)}et("MuiBackdrop",["root","invisible"]);const _Y=t=>{const{classes:e,invisible:n}=t;return Ze({root:["root",n&&"invisible"]},TY,e)},EY=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"}}]}),I1=D.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:m={},TransitionComponent:g,transitionDuration:b,...y}=r,x={...r,component:s,invisible:a},C=_Y(x),_={transition:g,root:u.Root,...m},T={...f,...p},w={slots:_,slotProps:T},[k,M]=Wt("root",{elementType:EY,externalForwardedProps:w,className:ze(C.root,i),ownerState:x}),[A,R]=Wt("transition",{elementType:ws,externalForwardedProps:w,ownerState:x});return v.jsx(A,{in:l,timeout:b,...y,...R,children:v.jsx(k,{"aria-hidden":!0,...M,classes:C,ref:n,children:o})})});process.env.NODE_ENV!=="production"&&(I1.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 kY(t){return typeof t=="function"?t():t}function OY(t){return t?t.props.hasOwnProperty("in"):!1}const AE=()=>{},lf=new mY;function MY(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=D.useRef({}),m=D.useRef(null),g=D.useRef(null),b=Pt(g,f),[y,x]=D.useState(!u),C=OY(a);let _=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(_=!1);const T=()=>tr(m.current),w=()=>(p.current.modalRef=g.current,p.current.mount=m.current,p.current),k=()=>{lf.mount(w(),{disableScrollLock:r}),g.current&&(g.current.scrollTop=0)},M=qe(()=>{const j=kY(e)||T().body;lf.add(w(),j),g.current&&k()}),A=()=>lf.isTopModal(w()),R=qe(j=>{m.current=j,j&&(u&&A()?k():g.current&&Gc(g.current,_))}),N=D.useCallback(()=>{lf.remove(w(),_)},[_]);D.useEffect(()=>()=>{N()},[N]),D.useEffect(()=>{u?M():(!C||!o)&&N()},[u,N,C,o,M]);const O=j=>F=>{var U;(U=j.onKeyDown)==null||U.call(j,F),!(F.key!=="Escape"||F.which===229||!A())&&(n||(F.stopPropagation(),l&&l(F,"escapeKeyDown")))},I=j=>F=>{var U;(U=j.onClick)==null||U.call(j,F),F.target===F.currentTarget&&l&&l(F,"backdropClick")};return{getRootProps:(j={})=>{const F=SI(t);delete F.onTransitionEnter,delete F.onTransitionExited;const U={...F,...j};return{role:"presentation",...U,onKeyDown:O(U),ref:b}},getBackdropProps:(j={})=>{const F=j;return{"aria-hidden":!0,...F,onClick:I(F),open:u}},getTransitionProps:()=>{const j=()=>{x(!1),i&&i()},F=()=>{x(!0),s&&s(),o&&N()};return{onEnter:v_(j,(a==null?void 0:a.props.onEnter)??AE),onExited:v_(F,(a==null?void 0:a.props.onExited)??AE)}},rootRef:b,portalRef:R,isTopModal:A,exited:y,hasTransition:C}}function AY(t){return Qe("MuiModal",t)}et("MuiModal",["root","hidden","backdrop"]);const RY=t=>{const{open:e,exited:n,classes:r}=t;return Ze({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},AY,r)},IY=Se("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(Bt(({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"}}]}))),DY=Se(I1,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),D1=D.forwardRef(function(e,n){const r=Et({name:"MuiModal",props:e}),{BackdropComponent:o=DY,BackdropProps:i,classes:s,className:a,closeAfterTransition:l=!1,children:u,container:f,component:p,components:m={},componentsProps:g={},disableAutoFocus:b=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:x=!1,disablePortal:C=!1,disableRestoreFocus:_=!1,disableScrollLock:T=!1,hideBackdrop:w=!1,keepMounted:k=!1,onBackdropClick:M,onClose:A,onTransitionEnter:R,onTransitionExited:N,open:O,slotProps:I={},slots:L={},theme:B,...V}=r,j={...r,closeAfterTransition:l,disableAutoFocus:b,disableEnforceFocus:y,disableEscapeKeyDown:x,disablePortal:C,disableRestoreFocus:_,disableScrollLock:T,hideBackdrop:w,keepMounted:k},{getRootProps:F,getBackdropProps:U,getTransitionProps:K,portalRef:Y,isTopModal:G,exited:Z,hasTransition:me}=MY({...j,rootRef:n}),he={...j,exited:Z},ge=RY(he),oe={};if(u.props.tabIndex===void 0&&(oe.tabIndex="-1"),me){const{onEnter:ve,onExited:ne}=K();oe.onEnter=ve,oe.onExited=ne}const ye={slots:{root:m.Root,backdrop:m.Backdrop,...L},slotProps:{...g,...I}},[de,X]=Wt("root",{ref:n,elementType:IY,externalForwardedProps:{...ye,...V,component:p},getSlotProps:F,ownerState:he,className:ze(a,ge==null?void 0:ge.root,!he.open&&he.exited&&(ge==null?void 0:ge.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,ge==null?void 0:ge.backdrop),ownerState:he});return!k&&!O&&(!me||Z)?null:v.jsx(vu,{ref:Y,container:f,disablePortal:C,children:v.jsxs(de,{...X,children:[!w&&o?v.jsx(Q,{...ae}):null,v.jsx(bu,{disableEnforceFocus:y,disableAutoFocus:b,disableRestoreFocus:_,isEnabled:G,open:O,children:D.cloneElement(u,oe)})]})})});process.env.NODE_ENV!=="production"&&(D1.propTypes={BackdropComponent:c.elementType,BackdropProps:c.object,children:Bu.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([Ri,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 PY(t){return Qe("MuiPaper",t)}et("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 NY=t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Ze(i,PY,o)},LY=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}`]]}})(Bt(({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)"}}]}))),Ea=D.forwardRef(function(e,n){var g;const r=Et({props:e,name:"MuiPaper"}),o=ji(),{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},m=NY(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(`
|
|
116
|
+
`)),v.jsx(LY,{as:s,ownerState:p,className:ze(m.root,i),ref:n,...f,style:{...u==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[a],...o.vars&&{"--Paper-overlay":(g=o.vars.overlays)==null?void 0:g[a]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Kt("#fff",sx(a))}, ${Kt("#fff",sx(a))})`}},...f.style}})});process.env.NODE_ENV!=="production"&&(Ea.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,elevation:Li(bI,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 jY(t){return Qe("MuiPopover",t)}et("MuiPopover",["root","paper"]);function RE(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function IE(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function DE(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function Lc(t){return typeof t=="function"?t():t}const $Y=t=>{const{classes:e}=t;return Ze({root:["root"],paper:["paper"]},jY,e)},FY=Se(D1,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),pD=Se(Ea,{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}),hD=D.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:m=8,marginThreshold:g=16,open:b,PaperProps:y={},slots:x={},slotProps:C={},transformOrigin:_={vertical:"top",horizontal:"left"},TransitionComponent:T,transitionDuration:w="auto",TransitionProps:k={},disableScrollLock:M=!1,...A}=r,R=D.useRef(),N={...r,anchorOrigin:s,anchorReference:l,elevation:m,marginThreshold:g,transformOrigin:_,TransitionComponent:T,transitionDuration:w,TransitionProps:k},O=$Y(N),I=D.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=Lc(i),ve=ae&&ae.nodeType===1?ae:tr(R.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(`
|
|
117
|
+
`))}return{top:ne.top+RE(ne,s.vertical),left:ne.left+IE(ne,s.horizontal)}},[i,s.horizontal,s.vertical,a,l]),L=D.useCallback(ae=>({vertical:RE(ae,_.vertical),horizontal:IE(ae,_.horizontal)}),[_.horizontal,_.vertical]),B=D.useCallback(ae=>{const ve={width:ae.offsetWidth,height:ae.offsetHeight},ne=L(ve);if(l==="none")return{top:null,left:null,transformOrigin:DE(ne)};const ce=I();let fe=ce.top-ne.vertical,xe=ce.left-ne.horizontal;const _e=fe+ve.height,Te=xe+ve.width,Pe=Ii(Lc(i)),Be=Pe.innerHeight-g,W=Pe.innerWidth-g;if(g!==null&&fe<g){const te=fe-g;fe-=te,ne.vertical+=te}else if(g!==null&&_e>Be){const te=_e-Be;fe-=te,ne.vertical+=te}if(process.env.NODE_ENV!=="production"&&ve.height>Be&&ve.height&&Be&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${ve.height-Be}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
|
|
118
|
+
`)),g!==null&&xe<g){const te=xe-g;xe-=te,ne.horizontal+=te}else if(Te>W){const te=Te-W;xe-=te,ne.horizontal+=te}return{top:`${Math.round(fe)}px`,left:`${Math.round(xe)}px`,transformOrigin:DE(ne)}},[i,l,I,L,g]),[V,j]=D.useState(b),F=D.useCallback(()=>{const ae=R.current;if(!ae)return;const ve=B(ae);ve.top!==null&&ae.style.setProperty("top",ve.top),ve.left!==null&&(ae.style.left=ve.left),ae.style.transformOrigin=ve.transformOrigin,j(!0)},[B]);D.useEffect(()=>(M&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F)),[i,M,F]);const U=()=>{F()},K=()=>{j(!1)};D.useEffect(()=>{b&&F()}),D.useImperativeHandle(o,()=>b?{updatePosition:()=>{F()}}:null,[b,F]),D.useEffect(()=>{if(!b)return;const ae=fI(()=>{F()}),ve=Ii(Lc(i));return ve.addEventListener("resize",ae),()=>{ae.clear(),ve.removeEventListener("resize",ae)}},[i,b,F]);let Y=w;const G={slots:{transition:T,...x},slotProps:{transition:k,paper:y,...C}},[Z,me]=Wt("transition",{elementType:yu,externalForwardedProps:G,ownerState:N,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}});w==="auto"&&!Z.muiSupportAuto&&(Y=void 0);const he=p||(i?tr(Lc(i)).body:void 0),[ge,{slots:oe,slotProps:ye,...de}]=Wt("root",{ref:n,elementType:FY,externalForwardedProps:{...G,...A},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:x.backdrop},slotProps:{backdrop:w7(typeof C.backdrop=="function"?C.backdrop(N):C.backdrop,{invisible:!0})},container:he,open:b},ownerState:N,className:ze(O.root,f)}),[X,Q]=Wt("paper",{ref:R,className:O.paper,elementType:pD,externalForwardedProps:G,shouldForwardComponentProp:!0,additionalProps:{elevation:m,style:V?void 0:{opacity:0}},ownerState:N});return v.jsx(ge,{...de,...!gu(ge)&&{slots:oe,slotProps:ye,disableScrollLock:M},children:v.jsx(Z,{...me,timeout:Y,children:v.jsx(X,{...Q,children:u})})})});process.env.NODE_ENV!=="production"&&(hD.propTypes={action:On,anchorEl:Li(c.oneOfType([Ri,c.func]),t=>{if(t.open&&(!t.anchorReference||t.anchorReference==="anchorEl")){const e=Lc(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(`
|
|
119
|
+
`))}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(`
|
|
120
|
+
`))}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([Ri,c.func]),disableScrollLock:c.bool,elevation:bI,marginThreshold:c.number,onClose:c.func,open:c.bool.isRequired,PaperProps:c.shape({component:gh}),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 BY(t){return Qe("MuiMenu",t)}et("MuiMenu",["root","paper","list"]);const VY={vertical:"top",horizontal:"right"},zY={vertical:"top",horizontal:"left"},HY=t=>{const{classes:e}=t;return Ze({root:["root"],paper:["paper"],list:["list"]},BY,e)},WY=Se(hD,{shouldForwardProp:t=>Ao(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),qY=Se(pD,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),UY=Se(uD,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),mD=D.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:m,transitionDuration:g="auto",TransitionProps:{onEntering:b,...y}={},variant:x="selectedMenu",slots:C={},slotProps:_={},...T}=r,w=BI(),k={...r,autoFocus:o,disableAutoFocusItem:a,MenuListProps:l,onEntering:b,PaperProps:p,transitionDuration:g,TransitionProps:y,variant:x},M=HY(k),A=o&&!a&&f,R=D.useRef(null),N=(Y,G)=>{R.current&&R.current.adjustStyleForScrollbar(Y,{direction:w?"rtl":"ltr"}),b&&b(Y,G)},O=Y=>{Y.key==="Tab"&&(Y.preventDefault(),u&&u(Y,"tabKeyDown"))};let I=-1;D.Children.map(i,(Y,G)=>{D.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(`
|
|
121
|
+
`)),Y.props.disabled||(x==="selectedMenu"&&Y.props.selected||I===-1)&&(I=G))});const L={slots:C,slotProps:{list:l,transition:y,paper:p,..._}},B=At({elementType:C.root,externalSlotProps:_.root,ownerState:k,className:[M.root,s]}),[V,j]=Wt("paper",{className:M.paper,elementType:qY,externalForwardedProps:L,shouldForwardComponentProp:!0,ownerState:k}),[F,U]=Wt("list",{className:ze(M.list,l.className),elementType:UY,shouldForwardComponentProp:!0,externalForwardedProps:L,getSlotProps:Y=>({...Y,onKeyDown:G=>{var Z;O(G),(Z=Y.onKeyDown)==null||Z.call(Y,G)}}),ownerState:k}),K=typeof L.slotProps.transition=="function"?L.slotProps.transition(k):L.slotProps.transition;return v.jsx(WY,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?VY:zY,slots:{root:C.root,paper:V,backdrop:C.backdrop,...C.transition&&{transition:C.transition}},slotProps:{root:B,paper:j,backdrop:typeof _.backdrop=="function"?_.backdrop(k):_.backdrop,transition:{...K,onEntering:(...Y)=>{var G;N(...Y),(G=K==null?void 0:K.onEntering)==null||G.call(K,...Y)}}},open:f,ref:n,transitionDuration:g,ownerState:k,...T,classes:m,children:v.jsx(F,{actions:R,autoFocus:o&&(I===-1||a),autoFocusItem:A,variant:x,...U,children:i})})});process.env.NODE_ENV!=="production"&&(mD.propTypes={anchorEl:c.oneOfType([Ri,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 KY(t){return Qe("MuiNativeSelect",t)}const P1=et("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),GY=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${Le(n)}`,i&&"iconOpen",r&&"disabled"]};return Ze(a,KY,e)},gD=Se("select",{name:"MuiNativeSelect"})(({theme:t})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${P1.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}}}]})),YY=Se(gD,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ao,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${P1.multiple}`]:e.multiple}]}})({}),yD=Se("svg",{name:"MuiNativeSelect"})(({theme:t})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${P1.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}}]})),JY=Se(yD,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Le(n.variant)}`],n.open&&e.iconOpen]}})({}),bD=D.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=GY(f);return v.jsxs(D.Fragment,{children:[v.jsx(YY,{ownerState:f,className:ze(p.select,r),disabled:o,ref:a||n,...u}),e.multiple?null:v.jsx(JY,{as:s,ownerState:f,className:p.icon})]})});process.env.NODE_ENV!=="production"&&(bD.propTypes={children:c.node,classes:c.object,className:c.string,disabled:c.bool,error:c.bool,IconComponent:c.elementType.isRequired,inputRef:On,multiple:c.bool,name:c.string,onChange:c.func,value:c.any,variant:c.oneOf(["standard","outlined","filled"])});function vD(t){return Qe("MuiSelect",t)}const wc=et("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var PE;const XY=Se(gD,{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${wc.select}`]:e.select},{[`&.${wc.select}`]:e[n.variant]},{[`&.${wc.error}`]:e.error},{[`&.${wc.multiple}`]:e.multiple}]}})({[`&.${wc.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),ZY=Se(yD,{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Le(n.variant)}`],n.open&&e.iconOpen]}})({}),QY=Se("input",{shouldForwardProp:t=>KI(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 NE(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function eJ(t){return t==null||typeof t=="string"&&!t.trim()}const tJ=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${Le(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Ze(a,vD,e)},xD=D.forwardRef(function(e,n){var He;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:s,children:a,className:l,defaultOpen:u,defaultValue:f,disabled:p,displayEmpty:m,error:g=!1,IconComponent:b,inputRef:y,labelId:x,MenuProps:C={},multiple:_,name:T,onBlur:w,onChange:k,onClose:M,onFocus:A,onOpen:R,open:N,readOnly:O,renderValue:I,required:L,SelectDisplayProps:B={},tabIndex:V,type:j,value:F,variant:U="standard",...K}=e,[Y,G]=Di({controlled:F,default:f,name:"Select"}),[Z,me]=Di({controlled:N,default:u,name:"Select"}),he=D.useRef(null),ge=D.useRef(null),[oe,ye]=D.useState(null),{current:de}=D.useRef(N!=null),[X,Q]=D.useState(),ae=Pt(n,y),ve=D.useCallback(Me=>{ge.current=Me,Me&&ye(Me)},[]),ne=oe==null?void 0:oe.parentNode;D.useImperativeHandle(ae,()=>({focus:()=>{ge.current.focus()},node:he.current,value:Y}),[Y]),D.useEffect(()=>{u&&Z&&oe&&!de&&(Q(s?null:ne.clientWidth),ge.current.focus())},[oe,s]),D.useEffect(()=>{i&&ge.current.focus()},[i]),D.useEffect(()=>{if(!x)return;const Me=tr(ge.current).getElementById(x);if(Me){const We=()=>{getSelection().isCollapsed&&ge.current.focus()};return Me.addEventListener("click",We),()=>{Me.removeEventListener("click",We)}}},[x]);const ce=(Me,We)=>{Me?R&&R(We):M&&M(We),de||(Q(s?null:ne.clientWidth),me(Me))},fe=Me=>{Me.button===0&&(Me.preventDefault(),ge.current.focus(),ce(!0,Me))},xe=Me=>{ce(!1,Me)},_e=D.Children.toArray(a),Te=Me=>{const We=_e.find(Je=>Je.props.value===Me.target.value);We!==void 0&&(G(We.props.value),k&&k(Me,We))},Pe=Me=>We=>{let Je;if(We.currentTarget.hasAttribute("tabindex")){if(_){Je=Array.isArray(Y)?Y.slice():[];const lt=Y.indexOf(Me.props.value);lt===-1?Je.push(Me.props.value):Je.splice(lt,1)}else Je=Me.props.value;if(Me.props.onClick&&Me.props.onClick(We),Y!==Je&&(G(Je),k)){const lt=We.nativeEvent||We,jt=new lt.constructor(lt.type,lt);Object.defineProperty(jt,"target",{writable:!0,value:{value:Je,name:T}}),k(jt,Me)}_||ce(!1,We)}},Be=Me=>{O||[" ","ArrowUp","ArrowDown","Enter"].includes(Me.key)&&(Me.preventDefault(),ce(!0,Me))},W=oe!==null&&Z,te=Me=>{!W&&w&&(Object.defineProperty(Me,"target",{writable:!0,value:{value:Y,name:T}}),w(Me))};delete K["aria-invalid"];let re,Oe;const Re=[];let Ie=!1,Ve=!1;(dp({value:Y})||m)&&(I?re=I(Y):Ie=!0);const rt=_e.map(Me=>{if(!D.isValidElement(Me))return null;process.env.NODE_ENV!=="production"&&Ai.isFragment(Me)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
122
|
+
`));let We;if(_){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`.":Jo(2));We=Y.some(Je=>NE(Je,Me.props.value)),We&&Ie&&Re.push(Me.props.children)}else We=NE(Y,Me.props.value),We&&Ie&&(Oe=Me.props.children);return We&&(Ve=!0),D.cloneElement(Me,{"aria-selected":We?"true":"false",onClick:Pe(Me),onKeyUp:Je=>{Je.key===" "&&Je.preventDefault(),Me.props.onKeyUp&&Me.props.onKeyUp(Je)},role:"option",selected:We,value:void 0,"data-value":Me.props.value})});process.env.NODE_ENV!=="production"&&D.useEffect(()=>{if(!Ve&&!_&&Y!==""){const Me=_e.map(We=>We.props.value);console.warn([`MUI: You have provided an out-of-range value \`${Y}\` for the select ${T?`(name="${T}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${Me.filter(We=>We!=null).map(We=>`\`${We}\``).join(", ")||'""'}.`].join(`
|
|
123
|
+
`))}},[Ve,_e,_,T,Y]),Ie&&(_?Re.length===0?re=null:re=Re.reduce((Me,We,Je)=>(Me.push(We),Je<Re.length-1&&Me.push(", "),Me),[]):re=Oe);let tt=X;!s&&de&&oe&&(tt=ne.clientWidth);let kt;typeof V<"u"?kt=V:kt=p?null:0;const vn=B.id||(T?`mui-component-select-${T}`:void 0),ct={...e,variant:U,value:Y,open:W,error:g},An=tJ(ct),Nt={...C.PaperProps,...(He=C.slotProps)==null?void 0:He.paper},pe=ni();return v.jsxs(D.Fragment,{children:[v.jsx(XY,{as:"div",ref:ve,tabIndex:kt,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,vn].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":L?"true":void 0,"aria-invalid":g?"true":void 0,onKeyDown:Be,onMouseDown:p||O?null:fe,onBlur:te,onFocus:A,...B,ownerState:ct,className:ze(B.className,An.select,l),id:vn,children:eJ(re)?PE||(PE=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):re}),v.jsx(QY,{"aria-invalid":g,value:Array.isArray(Y)?Y.join(","):Y,name:T,ref:he,"aria-hidden":!0,onChange:Te,tabIndex:-1,disabled:p,className:An.nativeInput,autoFocus:i,required:L,...K,ownerState:ct}),v.jsx(ZY,{as:b,className:An.icon,ownerState:ct}),v.jsx(mD,{id:`menu-${T||""}`,anchorEl:ne,open:W,onClose:xe,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...C,slotProps:{...C.slotProps,list:{"aria-labelledby":x,role:"listbox","aria-multiselectable":_?"true":void 0,disableListWrap:!0,id:pe,...C.MenuListProps},paper:{...Nt,style:{minWidth:tt,...Nt!=null?Nt.style:null}}},children:rt})]})});process.env.NODE_ENV!=="production"&&(xD.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:On,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 nJ=Ke(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),rJ=t=>{const{classes:e}=t,r=Ze({root:["root"]},vD,e);return{...e,...r}},N1={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Ao(t)&&t!=="variant",slot:"Root"},oJ=Se($h,N1)(""),iJ=Se(Bh,N1)(""),sJ=Se(Fh,N1)(""),L1=D.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=nJ,id:p,input:m,inputProps:g,label:b,labelId:y,MenuProps:x,multiple:C=!1,native:_=!1,onClose:T,onOpen:w,open:k,renderValue:M,SelectDisplayProps:A,variant:R="outlined",...N}=r,O=_?bD:xD,I=Io(),L=Gl({props:r,muiFormControl:I,states:["variant","error"]}),B=L.variant||R,V={...r,variant:B,classes:s},j=rJ(V),{root:F,...U}=j,K=m||{standard:v.jsx(oJ,{ownerState:V}),outlined:v.jsx(iJ,{label:b,ownerState:V}),filled:v.jsx(sJ,{ownerState:V})}[B],Y=Pt(n,Vu(K));return v.jsx(D.Fragment,{children:D.cloneElement(K,{inputComponent:O,inputProps:{children:i,error:L.error,IconComponent:f,variant:B,type:void 0,multiple:C,..._?{id:p}:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:y,MenuProps:x,onClose:T,onOpen:w,open:k,renderValue:M,SelectDisplayProps:{id:p,...A}},...g,classes:g?Fn(U,g.classes):U,...m?m.props.inputProps:{}},...(C&&_||u)&&B==="outlined"?{notched:!0}:{},ref:Y,className:ze(K.props.className,a,j.root),...!m&&{variant:B},...N})})});process.env.NODE_ENV!=="production"&&(L1.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"])});L1.muiName="Select";function aJ(t){return Qe("MuiTextField",t)}et("MuiTextField",["root"]);const lJ={standard:$h,filled:Fh,outlined:Bh},cJ=t=>{const{classes:e}=t;return Ze({root:["root"]},aJ,e)},uJ=Se(E1,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),SD=D.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:m,fullWidth:g=!1,helperText:b,id:y,InputLabelProps:x,inputProps:C,InputProps:_,inputRef:T,label:w,maxRows:k,minRows:M,multiline:A=!1,name:R,onBlur:N,onChange:O,onFocus:I,placeholder:L,required:B=!1,rows:V,select:j=!1,SelectProps:F,slots:U={},slotProps:K={},type:Y,value:G,variant:Z="outlined",...me}=r,he={...r,autoFocus:i,color:l,disabled:f,error:p,fullWidth:g,multiline:A,required:B,select:j,variant:Z},ge=cJ(he);process.env.NODE_ENV!=="production"&&j&&!s&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const oe=ni(y),ye=b&&oe?`${oe}-helper-text`:void 0,de=w&&oe?`${oe}-label`:void 0,X=lJ[Z],Q={slots:U,slotProps:{input:_,inputLabel:x,htmlInput:C,formHelperText:m,select:F,...K}},ae={},ve=Q.slotProps.inputLabel;Z==="outlined"&&(ve&&typeof ve.shrink<"u"&&(ae.notched=ve.shrink),ae.label=w),j&&((!F||!F.native)&&(ae.id=void 0),ae["aria-describedby"]=void 0);const[ne,ce]=Wt("root",{elementType:uJ,shouldForwardComponentProp:!0,externalForwardedProps:{...Q,...me},ownerState:he,className:ze(ge.root,a),ref:n,additionalProps:{disabled:f,error:p,fullWidth:g,required:B,color:l,variant:Z}}),[fe,xe]=Wt("input",{elementType:X,externalForwardedProps:Q,additionalProps:ae,ownerState:he}),[_e,Te]=Wt("inputLabel",{elementType:_1,externalForwardedProps:Q,ownerState:he}),[Pe,Be]=Wt("htmlInput",{elementType:"input",externalForwardedProps:Q,ownerState:he}),[W,te]=Wt("formHelperText",{elementType:k1,externalForwardedProps:Q,ownerState:he}),[re,Oe]=Wt("select",{elementType:L1,externalForwardedProps:Q,ownerState:he}),Re=v.jsx(fe,{"aria-describedby":ye,autoComplete:o,autoFocus:i,defaultValue:u,fullWidth:g,multiline:A,name:R,rows:V,maxRows:k,minRows:M,type:Y,value:G,id:oe,inputRef:T,onBlur:N,onChange:O,onFocus:I,placeholder:L,inputProps:Be,slots:{input:U.htmlInput?Pe:void 0},...xe});return v.jsxs(ne,{...ce,children:[w!=null&&w!==""&&v.jsx(_e,{htmlFor:oe,id:de,...Te,children:w}),j?v.jsx(re,{"aria-describedby":ye,id:oe,labelId:de,value:G,input:Re,...Oe,children:s}):Re,b&&v.jsx(W,{id:ye,...te,children:b})]})});process.env.NODE_ENV!=="production"&&(SD.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:On,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 Tc=(t,e)=>t.length!==e.length?!1:e.every(n=>t.includes(n)),dJ=({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}},hp=(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},Yc=({date:t,disableFuture:e,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:s,timezone:a})=>{const l=hp(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,fo=(t,e,n)=>e==null||!t.isValid(e)?n:e,pJ=(t,e,n)=>!t.isValid(e)&&e!=null&&!t.isValid(n)&&n!=null?!0:t.isEqual(e,n),j1=(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},CD=(t,e,n)=>n==="date"?t.startOfDay(t.date(void 0,e)):t.date(void 0,e),hJ=["year","month","day"],LE=t=>hJ.includes(t),$1=(t,{format:e,views:n},r)=>{if(e!=null)return e;const o=t.formats;return Tc(n,["year"])?o.year:Tc(n,["month"])?o.month:Tc(n,["day"])?o.dayOfMonth:Tc(n,["month","year"])?`${o.month} ${o.year}`:Tc(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(t.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},mJ=(t,e)=>{const n=t.startOfWeek(e);return[0,1,2,3,4,5,6].map(r=>t.addDays(n,r))},gJ=["hours","minutes","seconds"],yJ=t=>gJ.includes(t),jE=(t,e)=>e.getHours(t)*3600+e.getMinutes(t)*60+e.getSeconds(t),bJ=(t,e)=>(n,r)=>t?e.isAfter(n,r):jE(n,e)>jE(r,e),Wo={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},vJ=t=>Math.max(...t.map(e=>Wo[e.type]??1)),_c=(t,e,n)=>{if(e===Wo.year)return t.startOfYear(n);if(e===Wo.month)return t.startOfMonth(n);if(e===Wo.day)return t.startOfDay(n);let r=n;return e<Wo.minutes&&(r=t.setMinutes(r,0)),e<Wo.seconds&&(r=t.setSeconds(r,0)),e<Wo.milliseconds&&(r=t.setMilliseconds(r,0)),r},xJ=({props:t,utils:e,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():_c(e,n,CD(e,r));t.minDate!=null&&e.isAfterDay(t.minDate,i)&&(i=_c(e,n,t.minDate)),t.maxDate!=null&&e.isBeforeDay(t.maxDate,i)&&(i=_c(e,n,t.maxDate));const s=bJ(t.disableIgnoringDatePartForTimeValidation??!1,e);return t.minTime!=null&&s(t.minTime,i)&&(i=_c(e,n,t.disableIgnoringDatePartForTimeValidation?t.minTime:hp(e,i,t.minTime))),t.maxTime!=null&&s(i,t.maxTime)&&(i=_c(e,n,t.disableIgnoringDatePartForTimeValidation?t.maxTime:hp(e,i,t.maxTime))),i},F1=(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(`
|
|
124
|
+
`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},SJ=t=>{switch(t){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},Vh=(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))},wD=(t,e,n,r)=>{switch(n){case"month":return j1(t,t.date(void 0,e)).map(o=>t.formatByString(o,r));case"weekDay":return Vh(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[]}},$E="s",CJ=["0","1","2","3","4","5","6","7","8","9"],wJ=t=>{const e=t.date(void 0);return t.formatByString(t.setSeconds(e,0),$E)==="0"?CJ:Array.from({length:10}).map((r,o)=>t.formatByString(t.setSeconds(e,o),$E))},ya=(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("")},B1=(t,e)=>e[0]==="0"?t:t.split("").map(n=>e[Number(n)]).join(""),FE=(t,e)=>{const n=ya(t,e);return n!==" "&&!Number.isNaN(Number(n))},TD=(t,e)=>{let n=t;for(n=Number(n).toString();n.length<e;)n=`0${n}`;return n},_D=(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.'
|
|
125
|
+
This type of format is only supported for 'day' sections`].join(`
|
|
126
|
+
`));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=TD(i,o.maxLength)),B1(i,r)},TJ=(t,e,n,r,o,i,s,a)=>{const l=SJ(r),u=r==="Home",f=r==="End",p=n.value===""||u||f,m=()=>{const b=o[n.type]({currentDate:s,format:n.format,contentType:n.contentType}),y=_=>_D(t,_,b,i,n),x=n.type==="minutes"&&(a!=null&&a.minutesStep)?a.minutesStep:1;let C;if(p){if(n.type==="year"&&!f&&!u)return t.formatByString(t.date(void 0,e),n.format);l>0||u?C=b.minimum:C=b.maximum}else C=parseInt(ya(n.value,i),10)+l*x;return C%x!==0&&((l<0||u)&&(C+=x-(x+C)%x),(l>0||f)&&(C-=C%x)),C>b.maximum?y(b.minimum+(C-b.maximum-1)%(b.maximum-b.minimum+1)):C<b.minimum?y(b.maximum-(b.minimum-C-1)%(b.maximum-b.minimum+1)):y(C)},g=()=>{const b=wD(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 C=((b.indexOf(n.value)+l)%b.length+b.length)%b.length;return b[C]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?m():g()},V1=(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(ya(r,n)).toString()),["input-rtl","input-ltr"].includes(e)&&t.contentType==="digit"&&!o&&r.length===1&&(r=`${r}`),e==="input-rtl"&&(r=`${r}`),r},BE=(t,e,n,r)=>{if(process.env.NODE_ENV!=="production"&&F1(t,n).type==="weekDay")throw new Error("changeSectionValueFormat doesn't support week day formats");return t.formatByString(t.parse(e,n),r)},_J=(t,e)=>t.formatByString(t.date(void 0,"system"),e).length===4,ED=(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")}},EJ=(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(V1(u,"non-input",n)))}const s=o.join(" "),a=i.join(" ");return t.parse(a,s)},kJ=t=>t.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),OJ=(t,e,n)=>{const o=t.map(i=>{const s=V1(i,n?"input-rtl":"input-ltr",e);return`${i.startSeparator}${s}${i.endSeparator}`}).join("");return n?`${o}`:o},MJ=(t,e,n)=>{const r=t.date(void 0,n),o=t.endOfYear(r),i=t.endOfDay(r),{maxDaysInMonth:s,longestMonth:a}=j1(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:_J(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=Vh(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 ya(t.formatByString(t.endOfDay(r),l),e)!==u.toString()?{minimum:1,maximum:Number(ya(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 VE=!1;const zE=(t,e)=>{if(process.env.NODE_ENV!=="production"&&!VE){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('", "')}"]\`.`),VE=!0)}},AJ=(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=Vh(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}},HE={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},WE=(t,e,n,r,o)=>[...n].sort((i,s)=>HE[i.type]-HE[s.type]).reduce((i,s)=>!o||s.modified?AJ(t,s,e,i):i,r),RJ=()=>navigator.userAgent.toLowerCase().includes("android"),IJ=(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],m=f===t.length-1?null:r[f+1];n[u]={leftIndex:p,rightIndex:m}}),{neighbors:n,startIndex:r[0],endIndex:r[t.length-1]}},dx=(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},DJ=(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}},PJ=(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}},NJ=["value","referenceDate"],Xo={emptyValue:null,getTodayValue:CD,getInitialReferenceValue:t=>{let{value:e,referenceDate:n}=t,r=dt(t,NJ);return e!=null&&r.utils.isValid(e)?e:n??xJ(r)},cleanValue:fJ,areValuesEqual:pJ,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)},LJ={updateReferenceValue:(t,e,n)=>e==null||!t.isValid(e)?n:e,getSectionsFromValue:(t,e,n,r)=>!t.isValid(e)&&!!n?n:r(e),getV7HiddenInputValueFromSections:kJ,getV6InputValueFromSections:OJ,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)},jJ=D.createContext();process.env.NODE_ENV!=="production"&&(c.node,c.bool);const Fi=()=>D.useContext(jJ)??!1,Yu=({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=fo(r.utils,t.minDate,r.defaultDates.minDate),p=fo(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}};Yu.valueManager=Xo;const kD=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],$J=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],FJ=["minDateTime","maxDateTime"],BJ=[...kD,...$J,...FJ],OD=t=>BJ.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{}),VJ=t=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:ie({},t)}}}}),MD=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)}},AD={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"},zJ=AD;VJ(AD);const ka=()=>{const t=D.useContext(up);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(`
|
|
127
|
+
`));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(`
|
|
128
|
+
`));const e=D.useMemo(()=>ie({},zJ,t.localeText),[t.localeText]);return D.useMemo(()=>ie({},t,{localeText:e}),[t,e])},en=()=>ka().utils,Ju=()=>ka().defaultDates,zh=t=>{const e=en(),n=D.useRef(void 0);return n.current===void 0&&(n.current=e.date(void 0,t)),n.current};function RD(t){const{props:e,validator:n,value:r,timezone:o,onError:i}=t,s=ka(),a=D.useRef(n.valueManager.defaultErrorState),l=n({adapter:s,value:r,timezone:o,props:e}),u=n.valueManager.hasError(l);D.useEffect(()=>{i&&!n.valueManager.isSameError(l,a.current)&&i(l,r),a.current=l},[n,i,l,r]);const f=qe(p=>n({adapter:s,value:p,timezone:o,props:e}));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:f}}const Bi=()=>ka().localeText,HJ=({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},WJ=({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},qJ=(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}},UJ=({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=F1(t,s),u=ED(t,l.contentType,l.type,s),f=n?u:l.contentType==="digit",p=e!=null&&t.isValid(e);let m=p?t.formatByString(e,s):"",g=null;if(f)if(u)g=m===""?t.formatByString(i,s).length:m.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${s} should have a 'maxDigitNumber' property on it's adapter`);g=l.maxLength,p&&(m=B1(TD(ya(m,o),g),o))}return ie({},l,{format:s,maxLength:g,value:m,placeholder:qJ(t,r,l,s),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:f,startSeparator:a,endSeparator:"",modified:!1})},KJ=t=>{var g;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 m=0;for(;m<n.length;){const b=p(m),y=b!=null,x=(g=l.exec(n.slice(m)))==null?void 0:g[1];if(!y&&x!=null&&u.test(x)){let C=x;for(;C.length>0;){const _=f.exec(C)[1];C=C.slice(_.length),i.push(UJ(ie({},t,{now:o,token:_,startSeparator:s}))),s=""}m+=x.length}else{const C=n[m];y&&(b==null?void 0:b.start)===m||(b==null?void 0:b.end)===m||(i.length===0?s+=C:i[i.length-1].endSeparator+=C),m+=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},GJ=({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}),qE=t=>{let e=HJ(t);t.isRtl&&t.enableAccessibleFieldDOMStructure&&(e=e.split(" ").reverse().join(" "));const n=WJ(ie({},t,{expandedFormat:e})),r=KJ(ie({},t,{expandedFormat:e,escapedParts:n}));return GJ(ie({},t,{sections:r}))},z1=({timezone:t,value:e,defaultValue:n,referenceDate:r,onChange:o,valueManager:i})=>{const s=en(),a=D.useRef(n),l=e??a.current??i.emptyValue,u=D.useMemo(()=>i.getTimezone(s,l),[s,i,l]),f=qe(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 m=D.useMemo(()=>i.setTimezone(s,p,l),[i,s,p,l]),g=qe((b,...y)=>{const x=f(b);o==null||o(x,...y)});return{value:m,handleValueChange:g,timezone:p}},H1=({name:t,timezone:e,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:s})=>{const[a,l]=Di({name:t,state:"value",controlled:n,default:r??s.emptyValue}),u=qe((f,...p)=>{l(f),i==null||i(f,...p)});return z1({timezone:e,value:a,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:s})},YJ=t=>{const e=en(),n=Bi(),r=ka(),o=Fi(),{valueManager:i,fieldValueManager:s,valueType:a,validator:l,internalProps:u,internalProps:{value:f,defaultValue:p,referenceDate:m,onChange:g,format:b,formatDensity:y="dense",selectedSections:x,onSelectedSectionsChange:C,shouldRespectLeadingZeros:_=!1,timezone:T,enableAccessibleFieldDOMStructure:w=!1}}=t,{timezone:k,value:M,handleValueChange:A}=z1({timezone:T,value:f,defaultValue:p,referenceDate:m,onChange:g,valueManager:i}),R=D.useMemo(()=>wJ(e),[e]),N=D.useMemo(()=>MJ(e,R,k),[e,R,k]),O=D.useCallback((oe,ye=null)=>s.getSectionsFromValue(e,oe,ye,de=>qE({utils:e,localeText:n,localizedDigits:R,format:b,date:de,formatDensity:y,shouldRespectLeadingZeros:_,enableAccessibleFieldDOMStructure:w,isRtl:o})),[s,b,n,R,o,_,e,y,w]),[I,L]=D.useState(()=>{const oe=O(M);zE(oe,a);const ye={sections:oe,value:M,referenceValue:i.emptyValue,tempValueStrAndroid:null},de=vJ(oe),X=i.getInitialReferenceValue({referenceDate:m,value:M,utils:e,props:u,granularity:de,timezone:k});return ie({},ye,{referenceValue:X})}),[B,V]=Di({controlled:x,default:null,name:"useField",state:"selectedSections"}),j=oe=>{V(oe),C==null||C(oe)},F=D.useMemo(()=>dx(B,I.sections),[B,I.sections]),U=F==="all"?0:F,K=({value:oe,referenceValue:ye,sections:de})=>{if(L(Q=>ie({},Q,{sections:de,value:oe,referenceValue:ye,tempValueStrAndroid:null})),i.areValuesEqual(e,I.value,oe))return;const X={validationError:l({adapter:r,value:oe,timezone:k,props:u})};A(oe,X)},Y=(oe,ye)=>{const de=[...I.sections];return de[oe]=ie({},de[oe],{value:ye,modified:!0}),de},G=()=>{K({value:i.emptyValue,referenceValue:I.referenceValue,sections:O(i.emptyValue)})},Z=()=>{if(U==null)return;const oe=I.sections[U],ye=s.getActiveDateManager(e,I,oe),X=ye.getSections(I.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}))},me=oe=>{const ye=(Q,ae)=>{const ve=e.parse(Q,b);if(ve==null||!e.isValid(ve))return null;const ne=qE({utils:e,localeText:n,localizedDigits:R,format:b,date:ve,formatDensity:y,shouldRespectLeadingZeros:_,enableAccessibleFieldDOMStructure:w,isRtl:o});return WE(e,ve,ne,ae,!1)},de=s.parseValueStr(oe,I.referenceValue,ye),X=s.updateReferenceValue(e,de,I.referenceValue);K({value:de,referenceValue:X,sections:O(de,I.sections)})},he=({activeSection:oe,newSectionValue:ye,shouldGoToNextSection:de})=>{de&&U<I.sections.length-1&&j(U+1);const X=s.getActiveDateManager(e,I,oe),Q=Y(U,ye),ae=X.getSections(Q),ve=EJ(e,ae,R);let ne,ce;if(ve!=null&&e.isValid(ve)){const fe=WE(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})):L(fe=>ie({},fe,ne,{sections:Q,tempValueStrAndroid:null}))},ge=oe=>L(ye=>ie({},ye,{tempValueStrAndroid:oe}));return D.useEffect(()=>{const oe=O(I.value);zE(oe,a),L(ye=>ie({},ye,{sections:oe}))},[b,e.locale,o]),D.useEffect(()=>{let oe;i.areValuesEqual(e,I.value,M)?oe=i.getTimezone(e,I.value)!==i.getTimezone(e,M):oe=!0,oe&&L(ye=>ie({},ye,{value:M,referenceValue:s.updateReferenceValue(e,M,ye.referenceValue),sections:O(M)}))},[M]),{state:I,activeSectionIndex:U,parsedSelectedSections:F,setSelectedSections:j,clearValue:G,clearActiveSection:Z,updateSectionValue:he,updateValueFromValueStr:me,setTempAndroidValueStr:ge,getSectionsFromValue:O,sectionsValueBoundaries:N,localizedDigits:R,timezone:k}},JJ=5e3,nl=t=>t.saveQuery!=null,XJ=({sections:t,updateSectionValue:e,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const s=en(),[a,l]=D.useState(null),u=qe(()=>l(null));D.useEffect(()=>{var b;a!=null&&((b=t[a.sectionIndex])==null?void 0:b.type)!==a.sectionType&&u()},[t,a,u]),D.useEffect(()=>{if(a!=null){const b=setTimeout(()=>u(),JJ);return()=>{clearTimeout(b)}}return()=>{}},[a,u]);const f=({keyPressed:b,sectionIndex:y},x,C)=>{const _=b.toLowerCase(),T=t[y];if(a!=null&&(!C||C(a.value))&&a.sectionIndex===y){const k=`${a.value}${_}`,M=x(k,T);if(!nl(M))return l({sectionIndex:y,value:k,sectionType:T.type}),M}const w=x(_,T);return nl(w)&&!w.saveQuery?(u(),null):(l({sectionIndex:y,value:_,sectionType:T.type}),nl(w)?null:w)},p=b=>{const y=(_,T,w)=>{const k=T.filter(M=>M.toLowerCase().startsWith(w));return k.length===0?{saveQuery:!1}:{sectionValue:k[0],shouldGoToNextSection:k.length===1}},x=(_,T,w,k)=>{const M=A=>wD(s,i,T.type,A);if(T.contentType==="letter")return y(T.format,M(T.format),_);if(w&&k!=null&&F1(s,w).contentType==="letter"){const A=M(w),R=y(w,A,_);return nl(R)?{saveQuery:!1}:ie({},R,{sectionValue:k(R.sectionValue,A)})}return{saveQuery:!1}};return f(b,(_,T)=>{switch(T.type){case"month":{const w=k=>BE(s,k,s.formats.month,T.format);return x(_,T,s.formats.month,w)}case"weekDay":{const w=(k,M)=>M.indexOf(k).toString();return x(_,T,s.formats.weekday,w)}case"meridiem":return x(_,T);default:return{saveQuery:!1}}})},m=b=>{const y=(C,_)=>{const T=ya(C,r),w=Number(T),k=n[_.type]({currentDate:null,format:_.format,contentType:_.contentType});if(w>k.maximum)return{saveQuery:!1};if(w<k.minimum)return{saveQuery:!0};const M=w*10>k.maximum||T.length===k.maximum.toString().length;return{sectionValue:_D(s,w,k,r,_),shouldGoToNextSection:M}};return f(b,(C,_)=>{if(_.contentType==="digit"||_.contentType==="digit-with-letter")return y(C,_);if(_.type==="month"){ED(s,"digit","month","MM");const T=y(C,{type:_.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(nl(T))return T;const w=BE(s,T.sectionValue,"MM",_.format);return ie({},T,{sectionValue:w})}if(_.type==="weekDay"){const T=y(C,_);if(nl(T))return T;const w=Vh(s,_.format)[Number(T.sectionValue)-1];return ie({},T,{sectionValue:w})}return{saveQuery:!1}},C=>FE(C,r))};return{applyCharacterEditing:qe(b=>{const y=t[b.sectionIndex],C=FE(b.keyPressed,r)?m(ie({},b,{keyPressed:B1(b.keyPressed,r)})):p(b);if(C==null){o(null);return}e({activeSection:y,newSectionValue:C.sectionValue,shouldGoToNextSection:C.shouldGoToNextSection})}),resetCharacterQuery:u}};function ZJ(t,e){return Array.isArray(e)?e.every(n=>t.indexOf(n)!==-1):t.indexOf(e)!==-1}const QJ=(t,e)=>n=>{(n.key==="Enter"||n.key===" ")&&(t(n),n.preventDefault(),n.stopPropagation())},Tr=(t=document)=>{const e=t.activeElement;return e?e.shadowRoot?Tr(e.shadowRoot):e:null},eX="@media (pointer: fine)",tX=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:m,resetCharacterQuery:g,setSelectedSections:b,parsedSelectedSections:y,state:x,clearActiveSection:C,clearValue:_,updateSectionValue:T,updateValueFromValueStr:w,sectionOrder:k,areAllSectionsEmpty:M,sectionsValueBoundaries:A}=t,R=D.useRef(null),N=Pt(r,R),O=Bi(),I=en(),L=ni(),[B,V]=D.useState(!1),j=D.useMemo(()=>({syncSelectionToDOM:()=>{if(!R.current)return;const ce=document.getSelection();if(!ce)return;if(y==null){ce.rangeCount>0&&R.current.getRoot().contains(ce.getRangeAt(0).startContainer)&&ce.removeAllRanges(),B&&R.current.getRoot().blur();return}if(!R.current.getRoot().contains(Tr(document)))return;const fe=new window.Range;let xe;y==="all"?xe=R.current.getRoot():x.sections[y].type==="empty"?xe=R.current.getSectionContainer(y):xe=R.current.getSectionContent(y),fe.selectNodeContents(xe),xe.focus(),ce.removeAllRanges(),ce.addRange(fe)},getActiveSectionIndexFromDOM:()=>{const ce=Tr(document);return!ce||!R.current||!R.current.getRoot().contains(ce)?null:R.current.getSectionIndexFromDOMElement(ce)},focusField:(ce=0)=>{if(!R.current||j.getActiveSectionIndexFromDOM()!=null)return;const fe=dx(ce,x.sections);V(!0),R.current.getSectionContent(fe).focus()},setSelectedSections:ce=>{if(!R.current)return;const fe=dx(ce,x.sections);V((fe==="all"?0:fe)!==null),b(ce)},isFieldFocused:()=>{const ce=Tr(document);return!!R.current&&R.current.getRoot().contains(ce)}}),[y,b,x.sections,B]),F=qe(ce=>{if(!R.current)return;const fe=x.sections[ce];R.current.getSectionContent(ce).innerHTML=fe.value||fe.placeholder,j.syncSelectionToDOM()}),U=qe((ce,...fe)=>{ce.isDefaultPrevented()||!R.current||(V(!0),i==null||i(ce,...fe),y==="all"?setTimeout(()=>{const xe=document.getSelection().getRangeAt(0).startOffset;if(xe===0){b(k.startIndex);return}let _e=0,Te=0;for(;Te<xe&&_e<x.sections.length;){const Pe=x.sections[_e];_e+=1,Te+=`${Pe.startSeparator}${Pe.value||Pe.placeholder}${Pe.endSeparator}`.length}b(_e-1)}):B?R.current.getRoot().contains(ce.target)||b(k.startIndex):(V(!0),b(k.startIndex)))}),K=qe(ce=>{if(a==null||a(ce),!R.current||y!=="all")return;const xe=ce.target.textContent??"";R.current.getRoot().innerHTML=x.sections.map(_e=>`${_e.startSeparator}${_e.value||_e.placeholder}${_e.endSeparator}`).join(""),j.syncSelectionToDOM(),xe.length===0||xe.charCodeAt(0)===10?(g(),_(),b("all")):xe.length>1?w(xe):(y==="all"&&b(0),m({keyPressed:xe,sectionIndex:0}))}),Y=qe(ce=>{if(l==null||l(ce),n||y!=="all"){ce.preventDefault();return}const fe=ce.clipboardData.getData("text");ce.preventDefault(),g(),w(fe)}),G=qe((...ce)=>{if(s==null||s(...ce),B||!R.current)return;V(!0),R.current.getSectionIndexFromDOMElement(Tr(document))!=null||b(k.startIndex)}),Z=qe((...ce)=>{o==null||o(...ce),setTimeout(()=>{if(!R.current)return;const fe=Tr(document);!R.current.getRoot().contains(fe)&&(V(!1),b(null))})}),me=qe(ce=>fe=>{fe.isDefaultPrevented()||b(ce)}),he=qe(ce=>{ce.preventDefault()}),ge=qe(ce=>()=>{b(ce)}),oe=qe(ce=>{if(ce.preventDefault(),n||e||typeof y!="number")return;const fe=x.sections[y],xe=ce.clipboardData.getData("text"),_e=/^[a-zA-Z]+$/.test(xe),Te=/^[0-9]+$/.test(xe),Pe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(xe);fe.contentType==="letter"&&_e||fe.contentType==="digit"&&Te||fe.contentType==="digit-with-letter"&&Pe?(g(),T({activeSection:fe,newSectionValue:xe,shouldGoToNextSection:!0})):!_e&&!Te&&(g(),w(xe))}),ye=qe(ce=>{ce.preventDefault(),ce.dataTransfer.dropEffect="none"}),de=qe(ce=>{if(!R.current)return;const fe=ce.target,xe=fe.textContent??"",_e=R.current.getSectionIndexFromDOMElement(fe),Te=x.sections[_e];if(n||!R.current){F(_e);return}if(xe.length===0){if(Te.value===""){F(_e);return}const Pe=ce.nativeEvent.inputType;if(Pe==="insertParagraph"||Pe==="insertLineBreak"){F(_e);return}g(),C();return}m({keyPressed:xe,sectionIndex:_e}),F(_e)});zn(()=>{if(!(!B||!R.current)){if(y==="all")R.current.getRoot().focus();else if(typeof y=="number"){const ce=R.current.getSectionContent(y);ce&&ce.focus()}}},[y,B]);const X=D.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=D.useMemo(()=>x.sections.map((ce,fe)=>{const xe=!Q&&!e&&!n;return{container:{"data-sectionindex":fe,onClick:me(fe)},content:{tabIndex:Q||fe>0?-1:0,contentEditable:!Q&&!e&&!n,role:"spinbutton",id:`${L}-${ce.type}`,"aria-labelledby":`${L}-${ce.type}`,"aria-readonly":n,"aria-valuenow":PJ(ce,I),"aria-valuemin":X[ce.type].minimum,"aria-valuemax":X[ce.type].maximum,"aria-valuetext":ce.value?DJ(ce,I):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(D.version,10)>=17?"enterKeyHint":"enterkeyhint"]:xe?"next":void 0,children:ce.value||ce.placeholder,onInput:de,onPaste:oe,onFocus:ge(fe),onDragOver:ye,onMouseUp:he,inputMode:ce.contentType==="letter"?"text":"numeric"},before:{children:ce.startSeparator},after:{children:ce.endSeparator}}}),[x.sections,ge,oe,ye,de,me,he,e,n,Q,O,I,X,L]),ve=qe(ce=>{w(ce.target.value)}),ne=D.useMemo(()=>M?"":p.getV7HiddenInputValueFromSections(x.sections),[M,x.sections,p]);return D.useEffect(()=>{if(R.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(`
|
|
129
|
+
`));f&&R.current&&R.current.getSectionContent(k.startIndex).focus()},[]),{interactions:j,returnedValue:{autoFocus:f,readOnly:n,focused:u??B,sectionListRef:N,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}}},yl=t=>t.replace(/[\u2066\u2067\u2068\u2069]/g,""),nX=(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=V1(a,n?"input-rtl":"input-ltr",e),u=`${a.startSeparator}${l}${a.endSeparator}`,f=yl(u).length,p=u.length,m=yl(l),g=o+(m===""?0:l.indexOf(m[0]))+a.startSeparator.length,b=g+m.length;i.push(ie({},a,{start:r,end:r+f,startInInput:g,endInInput:b})),r+=f,o+=p}return i},rX=t=>{const e=Fi(),n=D.useRef(void 0),r=D.useRef(void 0),{forwardedProps:{onFocus:o,onClick:i,onPaste:s,onBlur:a,inputRef:l,placeholder:u},internalProps:{readOnly:f=!1,disabled:p=!1},parsedSelectedSections:m,activeSectionIndex:g,state:b,fieldValueManager:y,valueManager:x,applyCharacterEditing:C,resetCharacterQuery:_,updateSectionValue:T,updateValueFromValueStr:w,clearActiveSection:k,clearValue:M,setTempAndroidValueStr:A,setSelectedSections:R,getSectionsFromValue:N,areAllSectionsEmpty:O,localizedDigits:I}=t,L=D.useRef(null),B=Pt(l,L),V=D.useMemo(()=>nX(b.sections,I,e),[b.sections,I,e]),j=D.useMemo(()=>({syncSelectionToDOM:()=>{if(!L.current)return;if(m==null){L.current.scrollLeft&&(L.current.scrollLeft=0);return}if(L.current!==Tr(document))return;const de=L.current.scrollTop;if(m==="all")L.current.select();else{const X=V[m],Q=X.type==="empty"?X.startInInput-X.startSeparator.length:X.startInInput,ae=X.type==="empty"?X.endInInput+X.endSeparator.length:X.endInInput;(Q!==L.current.selectionStart||ae!==L.current.selectionEnd)&&L.current===Tr(document)&&L.current.setSelectionRange(Q,ae),clearTimeout(r.current),r.current=setTimeout(()=>{L.current&&L.current===Tr(document)&&L.current.selectionStart===L.current.selectionEnd&&(L.current.selectionStart!==Q||L.current.selectionEnd!==ae)&&j.syncSelectionToDOM()})}L.current.scrollTop=de},getActiveSectionIndexFromDOM:()=>{const de=L.current.selectionStart??0,X=L.current.selectionEnd??0;if(de===0&&X===0)return null;const Q=de<=V[0].startInInput?1:V.findIndex(ae=>ae.startInInput-ae.startSeparator.length>de);return Q===-1?V.length-1:Q-1},focusField:(de=0)=>{var X;Tr(document)!==L.current&&((X=L.current)==null||X.focus(),R(de))},setSelectedSections:de=>R(de),isFieldFocused:()=>L.current===Tr(document)}),[L,m,V,R]),F=()=>{const de=L.current.selectionStart??0;let X;de<=V[0].startInInput||de>=V[V.length-1].endInInput?X=1:X=V.findIndex(ae=>ae.startInInput-ae.startSeparator.length>de);const Q=X===-1?V.length-1:X-1;R(Q)},U=qe((...de)=>{o==null||o(...de);const X=L.current;clearTimeout(n.current),n.current=setTimeout(()=>{!X||X!==L.current||g==null&&(X.value.length&&Number(X.selectionEnd)-Number(X.selectionStart)===X.value.length?R("all"):F())})}),K=qe((de,...X)=>{de.isDefaultPrevented()||(i==null||i(de,...X),F())}),Y=qe(de=>{if(s==null||s(de),de.preventDefault(),f||p)return;const X=de.clipboardData.getData("text");if(typeof m=="number"){const Q=b.sections[m],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}_(),w(X)}),G=qe((...de)=>{a==null||a(...de),R(null)}),Z=qe(de=>{if(f)return;const X=de.target.value;if(X===""){_(),M();return}const Q=de.nativeEvent.data,ae=Q&&Q.length>1,ve=ae?Q:X,ne=yl(ve);if(m==="all"&&R(g),g==null||ae){w(ae?Q:ne);return}let ce;if(m==="all"&&ne.length===1)ce=ne;else{const fe=yl(y.getV6InputValueFromSections(V,I,e));let xe=-1,_e=-1;for(let W=0;W<fe.length;W+=1)xe===-1&&fe[W]!==ne[W]&&(xe=W),_e===-1&&fe[fe.length-W-1]!==ne[ne.length-W-1]&&(_e=W);const Te=V[g];if(xe<Te.start||fe.length-_e-1>Te.end)return;const Be=ne.length-fe.length+Te.end-yl(Te.endSeparator||"").length;ce=ne.slice(Te.start+yl(Te.startSeparator||"").length,Be)}if(ce.length===0){RJ()&&A(ve),_(),k();return}C({keyPressed:ce,sectionIndex:g})}),me=D.useMemo(()=>u!==void 0?u:y.getV6InputValueFromSections(N(x.emptyValue),I,e),[u,y,N,x.emptyValue,I,e]),he=D.useMemo(()=>b.tempValueStrAndroid??y.getV6InputValueFromSections(b.sections,I,e),[b.sections,y,b.tempValueStrAndroid,I,e]);D.useEffect(()=>(L.current&&L.current===Tr(document)&&R("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const ge=D.useMemo(()=>g==null||b.sections[g].contentType==="letter"?"text":"numeric",[g,b.sections]),ye=!(L.current&&L.current===Tr(document))&&O;return{interactions:j,returnedValue:{readOnly:f,onBlur:G,onClick:K,onFocus:U,onPaste:Y,inputRef:B,enableAccessibleFieldDOMStructure:!1,placeholder:me,inputMode:ge,autoComplete:"off",value:ye?"":he,onChange:Z}}},oX=t=>{const e=en(),{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:m,valueManager:g,validator:b}=t,y=Fi(),x=YJ(t),{state:C,activeSectionIndex:_,parsedSelectedSections:T,setSelectedSections:w,clearValue:k,clearActiveSection:M,updateSectionValue:A,setTempAndroidValueStr:R,sectionsValueBoundaries:N,localizedDigits:O,timezone:I}=x,L=XJ({sections:C.sections,updateSectionValue:A,sectionsValueBoundaries:N,localizedDigits:O,setTempAndroidValueStr:R,timezone:I}),{resetCharacterQuery:B}=L,V=g.areValuesEqual(e,C.value,g.emptyValue),j=i?tX:rX,F=D.useMemo(()=>IJ(C.sections,y&&!i),[C.sections,y,i]),{returnedValue:U,interactions:K}=j(ie({},t,x,L,{areAllSectionsEmpty:V,sectionOrder:F})),Y=qe(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(),w("all");break}case oe.key==="ArrowRight":{if(oe.preventDefault(),T==null)w(F.startIndex);else if(T==="all")w(F.endIndex);else{const ye=F.neighbors[T].rightIndex;ye!==null&&w(ye)}break}case oe.key==="ArrowLeft":{if(oe.preventDefault(),T==null)w(F.endIndex);else if(T==="all")w(F.startIndex);else{const ye=F.neighbors[T].leftIndex;ye!==null&&w(ye)}break}case oe.key==="Delete":{if(oe.preventDefault(),a)break;T==null||T==="all"?k():M(),B();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(oe.key):{if(oe.preventDefault(),a||_==null)break;T==="all"&&w(_);const ye=C.sections[_],de=m.getActiveDateManager(e,C,ye),X=TJ(e,I,ye,oe.key,N,O,de.date,{minutesStep:o});A({activeSection:ye,newSectionValue:X,shouldGoToNextSection:!1});break}}});zn(()=>{K.syncSelectionToDOM()});const{hasValidationError:G}=RD({props:n,validator:b,timezone:I,value:C.value,onError:n.onError}),Z=D.useMemo(()=>u!==void 0?u:G,[G,u]);D.useEffect(()=>{!Z&&_==null&&B()},[C.referenceValue,_,Z]),D.useEffect(()=>{C.tempValueStrAndroid!=null&&_!=null&&(B(),M())},[C.sections]),D.useImperativeHandle(r,()=>({getSections:()=>C.sections,getActiveSectionIndex:K.getActiveSectionIndexFromDOM,setSelectedSections:K.setSelectedSections,focusField:K.focusField,isFieldFocused:K.isFieldFocused}));const me=qe((oe,...ye)=>{oe.preventDefault(),p==null||p(oe,...ye),k(),K.isFieldFocused()?w(F.startIndex):K.focusField(0)}),he={onKeyDown:Y,onClear:me,error:Z,clearable:!!(f&&!V&&!a&&!s)},ge={disabled:s,readOnly:a};return ie({},t.forwardedProps,he,ge,U)};class mp{constructor(){gc(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 mp}static use(){const e=pI(mp.create).current,[n,r]=D.useState(!1);return e.shouldMount=n,e.setShouldMount=r,D.useEffect(e.mountEffect,[n]),e}mount(){return this.mounted||(this.mounted=sX(),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 iX(){return mp.use()}function sX(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function ID(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:l,timeout:u}=t,[f,p]=D.useState(!1),m=ze(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={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),D.useEffect(()=>{if(!a&&l!=null){const y=setTimeout(l,u);return()=>{clearTimeout(y)}}},[l,a,u]),v.jsx("span",{className:m,style:g,children:v.jsx("span",{className:b})})}process.env.NODE_ENV!=="production"&&(ID.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 ro=et("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),fx=550,aX=80,lX=Mo.keyframes`
|
|
130
|
+
0% {
|
|
131
|
+
transform: scale(0);
|
|
132
|
+
opacity: 0.1;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
100% {
|
|
136
|
+
transform: scale(1);
|
|
137
|
+
opacity: 0.3;
|
|
138
|
+
}
|
|
139
|
+
`,cX=Mo.keyframes`
|
|
140
|
+
0% {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
100% {
|
|
145
|
+
opacity: 0;
|
|
146
|
+
}
|
|
147
|
+
`,uX=Mo.keyframes`
|
|
148
|
+
0% {
|
|
149
|
+
transform: scale(1);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
50% {
|
|
153
|
+
transform: scale(0.92);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
100% {
|
|
157
|
+
transform: scale(1);
|
|
158
|
+
}
|
|
159
|
+
`,dX=Se("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),fX=Se(ID,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
160
|
+
opacity: 0;
|
|
161
|
+
position: absolute;
|
|
162
|
+
|
|
163
|
+
&.${ro.rippleVisible} {
|
|
164
|
+
opacity: 0.3;
|
|
165
|
+
transform: scale(1);
|
|
166
|
+
animation-name: ${lX};
|
|
167
|
+
animation-duration: ${fx}ms;
|
|
168
|
+
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&.${ro.ripplePulsate} {
|
|
172
|
+
animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
& .${ro.child} {
|
|
176
|
+
opacity: 1;
|
|
177
|
+
display: block;
|
|
178
|
+
width: 100%;
|
|
179
|
+
height: 100%;
|
|
180
|
+
border-radius: 50%;
|
|
181
|
+
background-color: currentColor;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
& .${ro.childLeaving} {
|
|
185
|
+
opacity: 0;
|
|
186
|
+
animation-name: ${cX};
|
|
187
|
+
animation-duration: ${fx}ms;
|
|
188
|
+
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
& .${ro.childPulsate} {
|
|
192
|
+
position: absolute;
|
|
193
|
+
/* @noflip */
|
|
194
|
+
left: 0px;
|
|
195
|
+
top: 0;
|
|
196
|
+
animation-name: ${uX};
|
|
197
|
+
animation-duration: 2500ms;
|
|
198
|
+
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
|
|
199
|
+
animation-iteration-count: infinite;
|
|
200
|
+
animation-delay: 200ms;
|
|
201
|
+
}
|
|
202
|
+
`,DD=D.forwardRef(function(e,n){const r=Et({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s,...a}=r,[l,u]=D.useState([]),f=D.useRef(0),p=D.useRef(null);D.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);const m=D.useRef(!1),g=hI(),b=D.useRef(null),y=D.useRef(null),x=D.useCallback(w=>{const{pulsate:k,rippleX:M,rippleY:A,rippleSize:R,cb:N}=w;u(O=>[...O,v.jsx(fX,{classes:{ripple:ze(i.ripple,ro.ripple),rippleVisible:ze(i.rippleVisible,ro.rippleVisible),ripplePulsate:ze(i.ripplePulsate,ro.ripplePulsate),child:ze(i.child,ro.child),childLeaving:ze(i.childLeaving,ro.childLeaving),childPulsate:ze(i.childPulsate,ro.childPulsate)},timeout:fx,pulsate:k,rippleX:M,rippleY:A,rippleSize:R},f.current)]),f.current+=1,p.current=N},[i]),C=D.useCallback((w={},k={},M=()=>{})=>{const{pulsate:A=!1,center:R=o||k.pulsate,fakeElement:N=!1}=k;if((w==null?void 0:w.type)==="mousedown"&&m.current){m.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(m.current=!0);const O=N?null:y.current,I=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let L,B,V;if(R||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)L=Math.round(I.width/2),B=Math.round(I.height/2);else{const{clientX:j,clientY:F}=w.touches&&w.touches.length>0?w.touches[0]:w;L=Math.round(j-I.left),B=Math.round(F-I.top)}if(R)V=Math.sqrt((2*I.width**2+I.height**2)/3),V%2===0&&(V+=1);else{const j=Math.max(Math.abs((O?O.clientWidth:0)-L),L)*2+2,F=Math.max(Math.abs((O?O.clientHeight:0)-B),B)*2+2;V=Math.sqrt(j**2+F**2)}w!=null&&w.touches?b.current===null&&(b.current=()=>{x({pulsate:A,rippleX:L,rippleY:B,rippleSize:V,cb:M})},g.start(aX,()=>{b.current&&(b.current(),b.current=null)})):x({pulsate:A,rippleX:L,rippleY:B,rippleSize:V,cb:M})},[o,x,g]),_=D.useCallback(()=>{C({},{pulsate:!0})},[C]),T=D.useCallback((w,k)=>{if(g.clear(),(w==null?void 0:w.type)==="touchend"&&b.current){b.current(),b.current=null,g.start(0,()=>{T(w,k)});return}b.current=null,u(M=>M.length>0?M.slice(1):M),p.current=k},[g]);return D.useImperativeHandle(n,()=>({pulsate:_,start:C,stop:T}),[_,C,T]),v.jsx(dX,{className:ze(ro.root,i.root,s),ref:y,...a,children:v.jsx(Gu,{component:null,exit:!0,children:l})})});process.env.NODE_ENV!=="production"&&(DD.propTypes={center:c.bool,classes:c.object,className:c.string});function pX(t){return Qe("MuiButtonBase",t)}const hX=et("MuiButtonBase",["root","disabled","focusVisible"]),mX=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,s=Ze({root:["root",e&&"disabled",n&&"focusVisible"]},pX,o);return n&&r&&(s.root+=` ${r}`),s},gX=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"},[`&.${hX.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Nl=D.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:m=!1,focusVisibleClassName:g,LinkComponent:b="a",onBlur:y,onClick:x,onContextMenu:C,onDragLeave:_,onFocus:T,onFocusVisible:w,onKeyDown:k,onKeyUp:M,onMouseDown:A,onMouseLeave:R,onMouseUp:N,onTouchEnd:O,onTouchMove:I,onTouchStart:L,tabIndex:B=0,TouchRippleProps:V,touchRippleRef:j,type:F,...U}=r,K=D.useRef(null),Y=iX(),G=Pt(Y.ref,j),[Z,me]=D.useState(!1);u&&Z&&me(!1),D.useImperativeHandle(o,()=>({focusVisible:()=>{me(!0),K.current.focus()}}),[]);const he=Y.shouldMount&&!f&&!u;D.useEffect(()=>{Z&&m&&!f&&Y.pulsate()},[f,m,Z,Y]);const ge=gi(Y,"start",A,p),oe=gi(Y,"stop",C,p),ye=gi(Y,"stop",_,p),de=gi(Y,"stop",N,p),X=gi(Y,"stop",re=>{Z&&re.preventDefault(),R&&R(re)},p),Q=gi(Y,"start",L,p),ae=gi(Y,"stop",O,p),ve=gi(Y,"stop",I,p),ne=gi(Y,"stop",re=>{T_(re.target)||me(!1),y&&y(re)},!1),ce=qe(re=>{K.current||(K.current=re.currentTarget),T_(re.target)&&(me(!0),w&&w(re)),T&&T(re)}),fe=()=>{const re=K.current;return l&&l!=="button"&&!(re.tagName==="A"&&re.href)},xe=qe(re=>{m&&!re.repeat&&Z&&re.key===" "&&Y.stop(re,()=>{Y.start(re)}),re.target===re.currentTarget&&fe()&&re.key===" "&&re.preventDefault(),k&&k(re),re.target===re.currentTarget&&fe()&&re.key==="Enter"&&!u&&(re.preventDefault(),x&&x(re))}),_e=qe(re=>{m&&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 Te=l;Te==="button"&&(U.href||U.to)&&(Te=b);const Pe={};Te==="button"?(Pe.type=F===void 0?"button":F,Pe.disabled=u):(!U.href&&!U.to&&(Pe.role="button"),u&&(Pe["aria-disabled"]=u));const Be=Pt(n,K),W={...r,centerRipple:i,component:l,disabled:u,disableRipple:f,disableTouchRipple:p,focusRipple:m,tabIndex:B,focusVisible:Z},te=mX(W);return v.jsxs(gX,{as:Te,className:ze(te.root,a),ownerState:W,onBlur:ne,onClick:x,onContextMenu:oe,onFocus:ce,onKeyDown:xe,onKeyUp:_e,onMouseDown:ge,onMouseLeave:X,onMouseUp:de,onDragLeave:ye,onTouchEnd:ae,onTouchMove:ve,onTouchStart:Q,ref:Be,tabIndex:u?-1:B,type:F,...Pe,...U,children:[s,he?v.jsx(DD,{ref:G,center:i,...V}):null]})});function gi(t,e,n,r=!1){return qe(o=>(n&&n(o),r||t[e](o),!0))}process.env.NODE_ENV!=="production"&&(Nl.propTypes={action:On,centerRipple:c.bool,children:c.node,classes:c.object,className:c.string,component:gh,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 yX(t){return Qe("MuiCircularProgress",t)}et("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Qi=44,px=Mo.keyframes`
|
|
203
|
+
0% {
|
|
204
|
+
transform: rotate(0deg);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
100% {
|
|
208
|
+
transform: rotate(360deg);
|
|
209
|
+
}
|
|
210
|
+
`,hx=Mo.keyframes`
|
|
211
|
+
0% {
|
|
212
|
+
stroke-dasharray: 1px, 200px;
|
|
213
|
+
stroke-dashoffset: 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
50% {
|
|
217
|
+
stroke-dasharray: 100px, 200px;
|
|
218
|
+
stroke-dashoffset: -15px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
100% {
|
|
222
|
+
stroke-dasharray: 1px, 200px;
|
|
223
|
+
stroke-dashoffset: -126px;
|
|
224
|
+
}
|
|
225
|
+
`,bX=typeof px!="string"?Mo.css`
|
|
226
|
+
animation: ${px} 1.4s linear infinite;
|
|
227
|
+
`:null,vX=typeof hx!="string"?Mo.css`
|
|
228
|
+
animation: ${hx} 1.4s ease-in-out infinite;
|
|
229
|
+
`:null,xX=t=>{const{classes:e,variant:n,color:r,disableShrink:o}=t,i={root:["root",n,`color${Le(r)}`],svg:["svg"],circle:["circle",`circle${Le(n)}`,o&&"circleDisableShrink"]};return Ze(i,yX,e)},SX=Se("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${Le(n.color)}`]]}})(Bt(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:bX||{animation:`${px} 1.4s linear infinite`}},...Object.entries(t.palette).filter(Qn()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),CX=Se("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),wX=Se("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${Le(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(Bt(({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:vX||{animation:`${hx} 1.4s ease-in-out infinite`}}]}))),W1=D.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",...m}=r,g={...r,color:i,disableShrink:s,size:a,thickness:u,value:f,variant:p},b=xX(g),y={},x={},C={};if(p==="determinate"){const _=2*Math.PI*((Qi-u)/2);y.strokeDasharray=_.toFixed(3),C["aria-valuenow"]=Math.round(f),y.strokeDashoffset=`${((100-f)/100*_).toFixed(3)}px`,x.transform="rotate(-90deg)"}return v.jsx(SX,{className:ze(b.root,o),style:{width:a,height:a,...x,...l},ownerState:g,ref:n,role:"progressbar",...C,...m,children:v.jsx(CX,{className:b.svg,ownerState:g,viewBox:`${Qi/2} ${Qi/2} ${Qi} ${Qi}`,children:v.jsx(wX,{className:b.circle,style:y,ownerState:g,cx:Qi,cy:Qi,r:(Qi-u)/2,fill:"none",strokeWidth:u})})})});process.env.NODE_ENV!=="production"&&(W1.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:Li(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 TX(t){return Qe("MuiIconButton",t)}const UE=et("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),_X=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${Le(r)}`,o&&`edge${Le(o)}`,`size${Le(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ze(a,TX,e)},EX=Se(Nl,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.loading&&e.loading,n.color!=="default"&&e[`color${Le(n.color)}`],n.edge&&e[`edge${Le(n.edge)}`],e[`size${Le(n.size)}`]]}})(Bt(({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}}]})),Bt(({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)}}],[`&.${UE.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${UE.loading}`]:{color:"transparent"}}))),kX=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"}}]})),Yl=D.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:m=null,loadingIndicator:g,...b}=r,y=ni(p),x=g??v.jsx(W1,{"aria-labelledby":y,color:"inherit",size:16}),C={...r,edge:o,color:a,disabled:l,disableFocusRipple:u,loading:m,loadingIndicator:x,size:f},_=_X(C);return v.jsxs(EX,{id:m?y:p,className:ze(_.root,s),centerRipple:!0,focusRipple:!u,disabled:l||m,ref:n,...b,ownerState:C,children:[typeof m=="boolean"&&v.jsx("span",{className:_.loadingWrapper,style:{display:"contents"},children:v.jsx(kX,{className:_.loadingIndicator,ownerState:C,children:m&&x})}),i]})});process.env.NODE_ENV!=="production"&&(Yl.propTypes={children:Li(c.node,t=>D.Children.toArray(t.children).some(n=>D.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(`
|
|
230
|
+
`)):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 OX(t){return Qe("MuiTypography",t)}et("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const MX={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},AX=v7(),RX=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=t,a={root:["root",i,t.align!=="inherit"&&`align${Le(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Ze(a,OX,s)},IX=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${Le(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(Bt(({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${Le(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}}]}})),KE={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Vi=D.forwardRef(function(e,n){const{color:r,...o}=Et({props:e,name:"MuiTypography"}),i=!MX[r],s=AX({...o,...i&&{color:r}}),{align:a="inherit",className:l,component:u,gutterBottom:f=!1,noWrap:p=!1,paragraph:m=!1,variant:g="body1",variantMapping:b=KE,...y}=s,x={...s,align:a,color:r,className:l,component:u,gutterBottom:f,noWrap:p,paragraph:m,variant:g,variantMapping:b},C=u||(m?"p":b[g]||KE[g])||"span",_=RX(x);return v.jsx(IX,{as:C,ref:n,className:ze(_.root,l),...y,ownerState:x,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...y.style}})});process.env.NODE_ENV!=="production"&&(Vi.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 DX(t){return Qe("MuiInputAdornment",t)}const GE=et("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var YE;const PX=(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${Le(n.position)}`],n.disablePointerEvents===!0&&e.disablePointerEvents,e[n.variant]]},NX=t=>{const{classes:e,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:s}=t,a={root:["root",n&&"disablePointerEvents",o&&`position${Le(o)}`,s,r&&"hiddenLabel",i&&`size${Le(i)}`]};return Ze(a,DX,e)},LX=Se("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:PX})(Bt(({theme:t})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${GE.positionStart}&:not(.${GE.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),q1=D.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,m=Io()||{};let g=f;f&&m.variant&&process.env.NODE_ENV!=="production"&&f===m.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),m&&!g&&(g=m.variant);const b={...r,hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:a,position:u,variant:g},y=NX(b);return v.jsx(Ku.Provider,{value:null,children:v.jsx(LX,{as:s,ownerState:b,className:ze(y.root,i),ref:n,...p,children:typeof o=="string"&&!l?v.jsx(Vi,{color:"textSecondary",children:o}):v.jsxs(D.Fragment,{children:[u==="start"?YE||(YE=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,o]})})})});process.env.NODE_ENV!=="production"&&(q1.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 jX=Ke(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),$X=Ke(v.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),FX=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"),BX=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(D.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(D.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 VX=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"),zX=["clearable","onClear","InputProps","sx","slots","slotProps"],HX=["ownerState"],WX=t=>{const e=Bi(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:s,slotProps:a}=t,l=dt(t,zX),u=(s==null?void 0:s.clearButton)??Yl,f=At({elementType:u,externalSlotProps:a==null?void 0:a.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:e.fieldClearLabel}}),p=dt(f,HX),m=(s==null?void 0:s.clearIcon)??VX,g=At({elementType:m,externalSlotProps:a==null?void 0:a.clearIcon,ownerState:{}});return ie({},l,{InputProps:ie({},o,{endAdornment:v.jsxs(D.Fragment,{children:[n&&v.jsx(q1,{position:"end",sx:{marginRight:o!=null&&o.endAdornment?-1:-1.5},children:v.jsx(u,ie({},p,{onClick:r,children:v.jsx(m,ie({fontSize:"small"},g))}))}),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]]})},qX=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],UX=(t,e)=>D.useMemo(()=>{const n=ie({},t),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return qX.forEach(o),kD.forEach(o),{forwardedProps:n,internalProps:r}},[t,e]),KX=D.createContext(null);function PD(t){const{contextValue:e,localeText:n,children:r}=t;return v.jsx(KX.Provider,{value:e,children:v.jsx(T1,{localeText:n,children:r})})}const GX=t=>{const e=en(),n=Ju();return ie({},t,{disablePast:t.disablePast??!1,disableFuture:t.disableFuture??!1,format:t.format??e.formats.keyboardDate,minDate:fo(e,t.minDate,n.minDate),maxDate:fo(e,t.maxDate,n.maxDate)})},YX=t=>{const e=GX(t),{forwardedProps:n,internalProps:r}=UX(e,"date");return oX({forwardedProps:n,internalProps:r,valueManager:Xo,fieldValueManager:LJ,validator:Yu,valueType:"date"})};function JX(t){return Qe("MuiPickersTextField",t)}et("MuiPickersTextField",["root","focused","disabled","error","required"]);function XX(t){return Qe("MuiPickersInputBase",t)}const El=et("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function ZX(t){return Qe("MuiPickersSectionList",t)}const Ec=et("MuiPickersSectionList",["root","section","sectionContent"]),QX=["slots","slotProps","elements","sectionListRef"],ND=Se("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(t,e)=>e.root})({direction:"ltr /*! @noflip */",outline:"none"}),LD=Se("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(t,e)=>e.section})({}),jD=Se("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(t,e)=>e.sectionSeparator})({whiteSpace:"pre"}),$D=Se("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(t,e)=>e.sectionContent})({outline:"none"}),eZ=t=>{const{classes:e}=t;return Ze({root:["root"],section:["section"],sectionContent:["sectionContent"]},ZX,e)};function FD(t){const{slots:e,slotProps:n,element:r,classes:o}=t,i=(e==null?void 0:e.section)??LD,s=At({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),a=(e==null?void 0:e.sectionContent)??$D,l=At({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)??jD,f=At({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),p=At({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"&&(FD.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 BD=D.forwardRef(function(e,n){const r=Qt({props:e,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:s,sectionListRef:a}=r,l=dt(r,QX),u=eZ(r),f=D.useRef(null),p=Pt(n,f),m=y=>{if(!f.current)throw new Error(`MUI X: Cannot call sectionListRef.${y} before the mount of the component.`);return f.current};D.useImperativeHandle(a,()=>({getRoot(){return m("getRoot")},getSectionContainer(y){return m("getSectionContainer").querySelector(`.${Ec.section}[data-sectionindex="${y}"]`)},getSectionContent(y){return m("getSectionContent").querySelector(`.${Ec.section}[data-sectionindex="${y}"] .${Ec.sectionContent}`)},getSectionIndexFromDOMElement(y){const x=m("getSectionIndexFromDOMElement");if(y==null||!x.contains(y))return null;let C=null;return y.classList.contains(Ec.section)?C=y:y.classList.contains(Ec.sectionContent)&&(C=y.parentElement),C==null?null:Number(C.dataset.sectionindex)}}));const g=(o==null?void 0:o.root)??ND,b=At({elementType:g,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:p,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return v.jsx(g,ie({},b,{children:b.contentEditable?s.map(({content:y,before:x,after:C})=>`${x.children}${y.children}${C.children}`).join(""):v.jsx(D.Fragment,{children:s.map((y,x)=>v.jsx(FD,{slots:o,slotProps:i,element:y,classes:u},x))})}))});process.env.NODE_ENV!=="production"&&(BD.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 tZ=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],nZ=t=>Math.round(t*1e5)/1e5,Hh=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:`${nZ(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),U1=Se(ND,{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}}]})),rZ=Se(LD,{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"})),oZ=Se($D,{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"})),iZ=Se(jD,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(t,e)=>e.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),sZ=Se("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(t,e)=>e.hiddenInput})(ie({},I9)),aZ=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${Le(a)}`,l==="small"&&"inputSizeSmall",!!f&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Ze(p,XX,o)},Wh=D.forwardRef(function(e,n){const r=Qt({props:e,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:s,onChange:a,id:l,endAdornment:u,startAdornment:f,renderSuffix:p,slots:m,slotProps:g,contentEditable:b,tabIndex:y,onInput:x,onPaste:C,onKeyDown:_,name:T,readOnly:w,inputProps:k,inputRef:M,sectionListRef:A}=r,R=dt(r,tZ),N=D.useRef(null),O=Pt(n,N),I=Pt(k==null?void 0:k.ref,M),L=Fi(),B=Io();if(!B)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const V=G=>{var Z;if(B.disabled){G.stopPropagation();return}(Z=B.onFocus)==null||Z.call(B,G)};D.useEffect(()=>{B&&B.setAdornedStart(!!f)},[B,f]),D.useEffect(()=>{B&&(i?B.onEmpty():B.onFilled())},[B,i]);const j=ie({},r,B,{isRtl:L}),F=aZ(j),U=(m==null?void 0:m.root)||Hh,K=At({elementType:U,externalSlotProps:g==null?void 0:g.root,externalForwardedProps:R,additionalProps:{"aria-invalid":B.error,ref:O},className:F.root,ownerState:j}),Y=(m==null?void 0:m.input)||U1;return v.jsxs(U,ie({},K,{children:[f,v.jsx(BD,{sectionListRef:A,elements:o,contentEditable:b,tabIndex:y,className:F.sectionsContainer,onFocus:V,onBlur:B.onBlur,onInput:x,onPaste:C,onKeyDown:_,slots:{root:Y,section:rZ,sectionContent:oZ,sectionSeparator:iZ},slotProps:{root:{ownerState:j},sectionContent:{className:El.sectionContent},sectionSeparator:({position:G})=>({className:G==="before"?El.sectionBefore:El.sectionAfter})}}),u,p?p(ie({},B)):null,v.jsx(sZ,ie({name:T,className:F.input,value:s,onChange:a,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:w,required:B.required,disabled:B.disabled},k,{ref:I}))]}))});process.env.NODE_ENV!=="production"&&(Wh.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:On,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 lZ(t){return Qe("MuiPickersOutlinedInput",t)}const Co=ie({},El,et("MuiPickersOutlinedInput",["root","notchedOutline","input"])),cZ=["children","className","label","notched","shrink"],uZ=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}}),JE=Se("span")(({theme:t})=>({fontFamily:t.typography.fontFamily,fontSize:"inherit"})),dZ=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 fZ(t){const{className:e,label:n}=t,r=dt(t,cZ),o=n!=null&&n!=="",i=ie({},t,{withLabel:o});return v.jsx(uZ,ie({"aria-hidden":!0,className:e},r,{ownerState:i,children:v.jsx(dZ,{ownerState:i,children:o?v.jsx(JE,{children:n}):v.jsx(JE,{className:"notranslate",children:""})})}))}const pZ=["label","autoFocus","ownerState","notched"],hZ=Se(Hh,{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 .${Co.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Co.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}},[`&.${Co.focused} .${Co.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Co.disabled}`]:{[`& .${Co.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled},"*":{color:(t.vars||t).palette.action.disabled}},[`&.${Co.error} .${Co.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:{[`&.${Co.focused}:not(.${Co.error}) .${Co.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}}))}}),mZ=Se(U1,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),gZ=t=>{const{classes:e}=t,r=Ze({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},lZ,e);return ie({},e,r)},K1=D.forwardRef(function(e,n){const r=Qt({props:e,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:s}=r,a=dt(r,pZ),l=Io(),u=ie({},r,i,l,{color:(l==null?void 0:l.color)||"primary"}),f=gZ(u);return v.jsx(Wh,ie({slots:{root:hZ,input:mZ},renderSuffix:p=>v.jsx(fZ,{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(D.Fragment,{children:[o," ","*"]}):o,ownerState:u})},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(K1.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:On,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});K1.muiName="Input";function gp(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 dl(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 VD(t){if(D.isValidElement(t)||Ai.isValidElementType(t)||!dl(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=VD(t[n])}),e}function yp(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return dl(t)&&dl(e)&&Object.keys(e).forEach(o=>{D.isValidElement(e[o])||Ai.isValidElementType(e[o])?r[o]=e[o]:dl(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&dl(t[o])?r[o]=yp(t[o],e[o],n):n.clone?r[o]=dl(e[o])?VD(e[o]):e[o]:r[o]=e[o]}),r}const yZ=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 bZ(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=t,i=yZ(e),s=Object.keys(i);function a(m){return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${n})`}function l(m){return`@media (max-width:${(typeof e[m]=="number"?e[m]:m)-r/100}${n})`}function u(m,g){const b=s.indexOf(g);return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${n}) and (max-width:${(b!==-1&&typeof e[s[b]]=="number"?e[s[b]]:g)-r/100}${n})`}function f(m){return s.indexOf(m)+1<s.length?u(m,s[s.indexOf(m)+1]):a(m)}function p(m){const g=s.indexOf(m);return g===0?a(s[1]):g===s.length-1?l(s[g]):u(m,s[s.indexOf(m)+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 XE(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 vZ(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function xZ(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>\`.
|
|
231
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:gp(18,`(${e})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return t.containerQueries(o).up(i)}function SZ(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 CZ={borderRadius:4},As=process.env.NODE_ENV!=="production"?c.oneOfType([c.number,c.string,c.object,c.array]):{};function Jc(t,e){return e?yp(t,e,{clone:!1}):t}const qh={xs:0,sm:600,md:900,lg:1200,xl:1536},ZE={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${qh[t]}px)`},wZ={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:qh[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function Pi(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||ZE;return e.reduce((s,a,l)=>(s[i.up(i.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const i=r.breakpoints||ZE;return Object.keys(e).reduce((s,a)=>{if(vZ(i.keys,a)){const l=xZ(r.containerQueries?r:wZ,a);l&&(s[l]=n(e[a],a))}else if(Object.keys(i.values||qh).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 TZ(t={}){var n;return((n=t.keys)==null?void 0:n.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function QE(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function zD(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":gp(7));return t.charAt(0).toUpperCase()+t.slice(1)}function Uh(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 bp(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=Uh(t,n)||r,e&&(o=e(o,r,t)),o}function _n(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=Uh(l,r)||{};return Pi(s,a,p=>{let m=bp(u,o,p);return p===m&&typeof p=="string"&&(m=bp(u,o,`${e}${p==="default"?"":zD(p)}`,p)),n===!1?m:{[n]:m}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:As}:{},i.filterProps=[e],i}function _Z(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const EZ={m:"margin",p:"padding"},kZ={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ek={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},OZ=_Z(t=>{if(t.length>2)if(ek[t])t=ek[t];else return[t];const[e,n]=t.split(""),r=EZ[e],o=kZ[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Kh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Gh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],MZ=[...Kh,...Gh];function Xu(t,e,n,r){const o=Uh(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(`
|
|
232
|
+
`)):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(`
|
|
233
|
+
`)));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(`
|
|
234
|
+
`)),()=>{})}function HD(t){return Xu(t,"spacing",8,"spacing")}function Zu(t,e){return typeof e=="string"||e==null?e:t(e)}function AZ(t,e){return n=>t.reduce((r,o)=>(r[o]=Zu(e,n),r),{})}function RZ(t,e,n,r){if(!e.includes(n))return null;const o=OZ(n),i=AZ(o,r),s=t[n];return Pi(t,s,i)}function WD(t,e){const n=HD(t.theme);return Object.keys(t).map(r=>RZ(t,e,r,n)).reduce(Jc,{})}function hn(t){return WD(t,Kh)}hn.propTypes=process.env.NODE_ENV!=="production"?Kh.reduce((t,e)=>(t[e]=As,t),{}):{};hn.filterProps=Kh;function mn(t){return WD(t,Gh)}mn.propTypes=process.env.NODE_ENV!=="production"?Gh.reduce((t,e)=>(t[e]=As,t),{}):{};mn.filterProps=Gh;process.env.NODE_ENV!=="production"&&MZ.reduce((t,e)=>(t[e]=As,t),{});function IZ(t=8,e=HD({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 Yh(...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]?Jc(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 so(t){return typeof t!="number"?t:`${t}px solid`}function yo(t,e){return _n({prop:t,themeKey:"borders",transform:e})}const DZ=yo("border",so),PZ=yo("borderTop",so),NZ=yo("borderRight",so),LZ=yo("borderBottom",so),jZ=yo("borderLeft",so),$Z=yo("borderColor"),FZ=yo("borderTopColor"),BZ=yo("borderRightColor"),VZ=yo("borderBottomColor"),zZ=yo("borderLeftColor"),HZ=yo("outline",so),WZ=yo("outlineColor"),Jh=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Xu(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Zu(e,r)});return Pi(t,t.borderRadius,n)}return null};Jh.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:As}:{};Jh.filterProps=["borderRadius"];Yh(DZ,PZ,NZ,LZ,jZ,$Z,FZ,BZ,VZ,zZ,Jh,HZ,WZ);const Xh=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Xu(t.theme,"spacing",8,"gap"),n=r=>({gap:Zu(e,r)});return Pi(t,t.gap,n)}return null};Xh.propTypes=process.env.NODE_ENV!=="production"?{gap:As}:{};Xh.filterProps=["gap"];const Zh=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Xu(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Zu(e,r)});return Pi(t,t.columnGap,n)}return null};Zh.propTypes=process.env.NODE_ENV!=="production"?{columnGap:As}:{};Zh.filterProps=["columnGap"];const Qh=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Xu(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Zu(e,r)});return Pi(t,t.rowGap,n)}return null};Qh.propTypes=process.env.NODE_ENV!=="production"?{rowGap:As}:{};Qh.filterProps=["rowGap"];const qZ=_n({prop:"gridColumn"}),UZ=_n({prop:"gridRow"}),KZ=_n({prop:"gridAutoFlow"}),GZ=_n({prop:"gridAutoColumns"}),YZ=_n({prop:"gridAutoRows"}),JZ=_n({prop:"gridTemplateColumns"}),XZ=_n({prop:"gridTemplateRows"}),ZZ=_n({prop:"gridTemplateAreas"}),QZ=_n({prop:"gridArea"});Yh(Xh,Zh,Qh,qZ,UZ,KZ,GZ,YZ,JZ,XZ,ZZ,QZ);function kl(t,e){return e==="grey"?e:t}const eQ=_n({prop:"color",themeKey:"palette",transform:kl}),tQ=_n({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:kl}),nQ=_n({prop:"backgroundColor",themeKey:"palette",transform:kl});Yh(eQ,tQ,nQ);function Br(t){return t<=1&&t!==0?`${t*100}%`:t}const rQ=_n({prop:"width",transform:Br}),G1=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])||qh[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:Br(n)}};return Pi(t,t.maxWidth,e)}return null};G1.filterProps=["maxWidth"];const oQ=_n({prop:"minWidth",transform:Br}),iQ=_n({prop:"height",transform:Br}),sQ=_n({prop:"maxHeight",transform:Br}),aQ=_n({prop:"minHeight",transform:Br});_n({prop:"size",cssProperty:"width",transform:Br});_n({prop:"size",cssProperty:"height",transform:Br});const lQ=_n({prop:"boxSizing"});Yh(rQ,G1,oQ,iQ,sQ,aQ,lQ);const qD={border:{themeKey:"borders",transform:so},borderTop:{themeKey:"borders",transform:so},borderRight:{themeKey:"borders",transform:so},borderBottom:{themeKey:"borders",transform:so},borderLeft:{themeKey:"borders",transform:so},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:so},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Jh},color:{themeKey:"palette",transform:kl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:kl},backgroundColor:{themeKey:"palette",transform:kl},p:{style:mn},pt:{style:mn},pr:{style:mn},pb:{style:mn},pl:{style:mn},px:{style:mn},py:{style:mn},padding:{style:mn},paddingTop:{style:mn},paddingRight:{style:mn},paddingBottom:{style:mn},paddingLeft:{style:mn},paddingX:{style:mn},paddingY:{style:mn},paddingInline:{style:mn},paddingInlineStart:{style:mn},paddingInlineEnd:{style:mn},paddingBlock:{style:mn},paddingBlockStart:{style:mn},paddingBlockEnd:{style:mn},m:{style:hn},mt:{style:hn},mr:{style:hn},mb:{style:hn},ml:{style:hn},mx:{style:hn},my:{style:hn},margin:{style:hn},marginTop:{style:hn},marginRight:{style:hn},marginBottom:{style:hn},marginLeft:{style:hn},marginX:{style:hn},marginY:{style:hn},marginInline:{style:hn},marginInlineStart:{style:hn},marginInlineEnd:{style:hn},marginBlock:{style:hn},marginBlockStart:{style:hn},marginBlockEnd:{style:hn},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:Xh},rowGap:{style:Qh},columnGap:{style:Zh},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Br},maxWidth:{style:G1},minWidth:{transform:Br},height:{transform:Br},maxHeight:{transform:Br},minHeight:{transform:Br},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 cQ(...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 uQ(t,e){return typeof t=="function"?t(e):t}function dQ(){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 m=Uh(o,u)||{};return p?p(s):Pi(s,r,b=>{let y=bp(m,f,b);return b===y&&typeof b=="string"&&(y=bp(m,f,`${n}${b==="default"?"":zD(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??qD;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=TZ(o.breakpoints),p=Object.keys(f);let m=f;return Object.keys(u).forEach(g=>{const b=uQ(u[g],o);if(b!=null)if(typeof b=="object")if(s[g])m=Jc(m,t(g,b,o,s));else{const y=Pi({theme:o},b,x=>({[g]:x}));cQ(y,b)?m[g]=e({sx:b,theme:o,nested:!0}):m=Jc(m,y)}else m=Jc(m,t(g,b,o,s))}),!i&&o.modularCssLayers?{"@layer sx":XE(o,QE(p,m))}:XE(o,QE(p,m))}return Array.isArray(r)?r.map(a):a(r)}return e}const UD=dQ();UD.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 pQ(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...s}=t,a=bZ(n),l=IZ(o);let u=yp({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...CZ,...i}},s);return u=SZ(u),u.applyStyles=fQ,u=e.reduce((f,p)=>yp(f,p),u),u.unstable_sxConfig={...qD,...s==null?void 0:s.unstable_sxConfig},u.unstable_sx=function(p){return UD({sx:p,theme:this})},u}pQ();function hQ(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function mQ(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function gQ(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}].`),mQ(t,e,n)}function yQ(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 KD(t){if(t.type)return t;if(t.charAt(0)==="#")return KD(yQ(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.
|
|
235
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:gp(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.
|
|
236
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:gp(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function bQ(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 vQ(t,e){if(t=KD(t),e=gQ(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 bQ(t)}function xQ(t){return Qe("MuiPickersFilledInput",t)}const Ws=ie({},El,et("MuiPickersFilledInput",["root","underline","input"])),SQ=["label","autoFocus","disableUnderline","ownerState"],CQ=Se(Hh,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>hQ(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}},[`&.${Ws.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r},[`&.${Ws.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"},[`&.${Ws.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ws.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(.${Ws.disabled}, .${Ws.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Ws.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:s})=>!!s,style:{paddingLeft:12}},{props:({endAdornment:s})=>!!s,style:{paddingRight:12}}]}}),wQ=Se(U1,{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}}]}),TQ=t=>{const{classes:e,disableUnderline:n}=t,o=Ze({root:["root",!n&&"underline"],input:["input"]},xQ,e);return ie({},e,o)},Y1=D.forwardRef(function(e,n){const r=Qt({props:e,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:s}=r,a=dt(r,SQ),l=Io(),u=ie({},r,s,l,{color:(l==null?void 0:l.color)||"primary"}),f=TQ(u);return v.jsx(Wh,ie({slots:{root:CQ,input:wQ},slotProps:{root:{disableUnderline:i}}},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(Y1.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:On,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});Y1.muiName="Input";function _Q(t){return Qe("MuiPickersFilledInput",t)}const kc=ie({},El,et("MuiPickersInput",["root","input"])),EQ=["label","autoFocus","disableUnderline","ownerState"],kQ=Se(Hh,{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"},[`&.${kc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${kc.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(.${kc.disabled}, .${kc.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${kc.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),OQ=t=>{const{classes:e,disableUnderline:n}=t,o=Ze({root:["root",!n&&"underline"],input:["input"]},_Q,e);return ie({},e,o)},J1=D.forwardRef(function(e,n){const r=Qt({props:e,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:s}=r,a=dt(r,EQ),l=Io(),u=ie({},r,s,l,{disableUnderline:i,color:(l==null?void 0:l.color)||"primary"}),f=OQ(u);return v.jsx(Wh,ie({slots:{root:kQ}},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(J1.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:On,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});J1.muiName="Input";const MQ=["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"],AQ={standard:J1,filled:Y1,outlined:K1},RQ=Se(E1,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({maxWidth:"100%"}),IQ=t=>{const{focused:e,disabled:n,classes:r,required:o}=t;return Ze({root:["root",e&&!n&&"focused",n&&"disabled",o&&"required"]},JX,r)},GD=D.forwardRef(function(e,n){const r=Qt({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:m,inputProps:g,inputRef:b,sectionListRef:y,elements:x,areAllSectionsEmpty:C,onClick:_,onKeyDown:T,onKeyUp:w,onPaste:k,onInput:M,endAdornment:A,startAdornment:R,tabIndex:N,contentEditable:O,focused:I,value:L,onChange:B,fullWidth:V,id:j,name:F,helperText:U,FormHelperTextProps:K,label:Y,InputLabelProps:G}=r,Z=dt(r,MQ),me=D.useRef(null),he=Pt(n,me),ge=ni(j),oe=U&&ge?`${ge}-helper-text`:void 0,ye=Y&&ge?`${ge}-label`:void 0,de=ie({},r,{color:a,disabled:l,error:u,focused:I,required:p,variant:f}),X=IQ(de),Q=AQ[f];return v.jsxs(RQ,ie({className:ze(X.root,s),ref:he,focused:I,onFocus:o,onBlur:i,disabled:l,variant:f,error:u,color:a,fullWidth:V,required:p,ownerState:de},Z,{children:[v.jsx(_1,ie({htmlFor:ge,id:ye},G,{children:Y})),v.jsx(Q,ie({elements:x,areAllSectionsEmpty:C,onClick:_,onKeyDown:T,onKeyUp:w,onInput:M,onPaste:k,endAdornment:A,startAdornment:R,tabIndex:N,contentEditable:O,value:L,onChange:B,id:ge,fullWidth:V,inputProps:g,inputRef:b,sectionListRef:y,label:Y,name:F,role:"group","aria-labelledby":ye,"aria-describedby":oe,"aria-live":oe?"polite":void 0},m)),U&&v.jsx(k1,ie({id:oe},K,{children:U}))]}))});process.env.NODE_ENV!=="production"&&(GD.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:On,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 DQ=["enableAccessibleFieldDOMStructure"],PQ=["InputProps","readOnly"],NQ=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],LQ=t=>{let{enableAccessibleFieldDOMStructure:e}=t,n=dt(t,DQ);if(e){const{InputProps:p,readOnly:m}=n,g=dt(n,PQ);return ie({},g,{InputProps:ie({},p??{},{readOnly:m})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:s,InputProps:a,inputProps:l,inputRef:u}=n,f=dt(n,NQ);return ie({},f,{InputProps:ie({},a??{},{readOnly:s}),inputProps:ie({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})},jQ=["slots","slotProps","InputProps","inputProps"],em=D.forwardRef(function(e,n){const r=Qt({props:e,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:s,inputProps:a}=r,l=dt(r,jQ),u=r,f=(o==null?void 0:o.textField)??(e.enableAccessibleFieldDOMStructure?GD:SD),p=At({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 m=YX(p),g=LQ(m),b=WX(ie({},g,{slots:o,slotProps:i}));return v.jsx(f,ie({},b))});process.env.NODE_ENV!=="production"&&(em.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:On,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 Hf={exports:{}},$Q=Hf.exports,tk;function FQ(){return tk||(tk=1,function(t,e){(function(n,r){t.exports=r()})($Q,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 C=this.$utils().u;if(C(y))return this.$u?0:C(this.$offset)?p.call(this):this.$offset;if(typeof y=="string"&&(y=function(k){k===void 0&&(k="");var M=k.match(r);if(!M)return null;var A=(""+M[0]).match(o)||["-",0,0],R=A[0],N=60*+A[1]+ +A[2];return N===0?0:R==="+"?N:-N}(y),y===null))return this;var _=Math.abs(y)<=16?60*y:y,T=this;if(x)return T.$offset=_,T.$u=y===0,T;if(y!==0){var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(T=this.local().add(_+w,n)).$offset=_,T.$x.$localOffset=w}else T=this.utc();return T};var m=l.format;l.format=function(y){var x=y||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.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 g=l.toDate;l.toDate=function(y){return y==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var b=l.diff;l.diff=function(y,x,C){if(y&&this.$u===y.$u)return b.call(this,y,x,C);var _=this.local(),T=a(y).local();return b.call(_,T,x,C)}}})}(Hf)),Hf.exports}var BQ=FQ();const VQ=yr(BQ);En.extend(VQ);const YD=$I({themeId:qu});function zQ(t){return Qe("MuiPickersToolbar",t)}et("MuiPickersToolbar",["root","content"]);const HQ=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],WQ=t=>{const{classes:e}=t;return Ze({root:["root"],content:["content"]},zQ,e)},qQ=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"}}]})),UQ=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"}}]}),KQ=D.forwardRef(function(e,n){const r=Qt({props:e,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:s,hidden:a,titleId:l}=r,u=dt(r,HQ),f=r,p=WQ(f);return a?null:v.jsxs(qQ,ie({ref:n,className:ze(p.root,i),ownerState:f},u,{children:[v.jsx(Vi,{color:"text.secondary",variant:"overline",id:l,children:s}),v.jsx(UQ,{className:p.content,ownerState:f,children:o})]}))});function GQ(t){return Qe("MuiDatePickerToolbar",t)}et("MuiDatePickerToolbar",["root","title"]);const YQ=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],JQ=t=>{const{classes:e}=t;return Ze({root:["root"],title:["title"]},GQ,e)},XQ=Se(KQ,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),ZQ=Se(Vi,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(t,e)=>e.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),JD=D.forwardRef(function(e,n){const r=Qt({props:e,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:s,toolbarPlaceholder:a="––",views:l,className:u}=r,f=dt(r,YQ),p=en(),m=Bi(),g=JQ(r),b=D.useMemo(()=>{if(!o)return a;const x=$1(p,{format:s,views:l},!0);return p.formatByString(o,x)},[o,s,a,p,l]),y=r;return v.jsx(XQ,ie({ref:n,toolbarTitle:m.datePickerToolbarTitle,isLandscape:i,className:ze(g.root,u)},f,{children:v.jsx(ZQ,{variant:"h4",align:i?"left":"center",ownerState:y,className:g.title,children:b})}))});process.env.NODE_ENV!=="production"&&(JD.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 XD(t,e){const n=en(),r=Ju(),o=Qt({props:t,name:e}),i=D.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},dJ({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:fo(n,o.minDate,r.minDate),maxDate:fo(n,o.maxDate,r.maxDate),slots:ie({toolbar:JD},o.slots)})}var Or="top",po="bottom",ho="right",Mr="left",X1="auto",Qu=[Or,po,ho,Mr],Ll="start",xu="end",QQ="clippingParents",ZD="viewport",Oc="popper",eee="reference",nk=Qu.reduce(function(t,e){return t.concat([e+"-"+Ll,e+"-"+xu])},[]),QD=[].concat(Qu,[X1]).reduce(function(t,e){return t.concat([e,e+"-"+Ll,e+"-"+xu])},[]),tee="beforeRead",nee="read",ree="afterRead",oee="beforeMain",iee="main",see="afterMain",aee="beforeWrite",lee="write",cee="afterWrite",uee=[tee,nee,ree,oee,iee,see,aee,lee,cee];function Zo(t){return t?(t.nodeName||"").toLowerCase():null}function qr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ba(t){var e=qr(t).Element;return t instanceof e||t instanceof Element}function co(t){var e=qr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Z1(t){if(typeof ShadowRoot>"u")return!1;var e=qr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function dee(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];!co(i)||!Zo(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 fee(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},{});!co(o)||!Zo(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const eP={name:"applyStyles",enabled:!0,phase:"write",fn:dee,effect:fee,requires:["computeStyles"]};function Yo(t){return t.split("-")[0]}var ca=Math.max,vp=Math.min,jl=Math.round;function mx(){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 tP(){return!/^((?!chrome|android).)*safari/i.test(mx())}function $l(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&co(t)&&(o=t.offsetWidth>0&&jl(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&jl(r.height)/t.offsetHeight||1);var s=ba(t)?qr(t):window,a=s.visualViewport,l=!tP()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/o,f=(r.top+(l&&a?a.offsetTop:0))/i,p=r.width/o,m=r.height/i;return{width:p,height:m,top:f,right:u+p,bottom:f+m,left:u,x:u,y:f}}function Q1(t){var e=$l(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 nP(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Z1(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ni(t){return qr(t).getComputedStyle(t)}function pee(t){return["table","td","th"].indexOf(Zo(t))>=0}function Rs(t){return((ba(t)?t.ownerDocument:t.document)||window.document).documentElement}function tm(t){return Zo(t)==="html"?t:t.assignedSlot||t.parentNode||(Z1(t)?t.host:null)||Rs(t)}function rk(t){return!co(t)||Ni(t).position==="fixed"?null:t.offsetParent}function hee(t){var e=/firefox/i.test(mx()),n=/Trident/i.test(mx());if(n&&co(t)){var r=Ni(t);if(r.position==="fixed")return null}var o=tm(t);for(Z1(o)&&(o=o.host);co(o)&&["html","body"].indexOf(Zo(o))<0;){var i=Ni(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 ed(t){for(var e=qr(t),n=rk(t);n&&pee(n)&&Ni(n).position==="static";)n=rk(n);return n&&(Zo(n)==="html"||Zo(n)==="body"&&Ni(n).position==="static")?e:n||hee(t)||e}function eS(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Xc(t,e,n){return ca(t,vp(e,n))}function mee(t,e,n){var r=Xc(t,e,n);return r>n?n:r}function rP(){return{top:0,right:0,bottom:0,left:0}}function oP(t){return Object.assign({},rP(),t)}function iP(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var gee=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,oP(typeof e!="number"?e:iP(e,Qu))};function yee(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Yo(n.placement),l=eS(a),u=[Mr,ho].indexOf(a)>=0,f=u?"height":"width";if(!(!i||!s)){var p=gee(o.padding,n),m=Q1(i),g=l==="y"?Or:Mr,b=l==="y"?po:ho,y=n.rects.reference[f]+n.rects.reference[l]-s[l]-n.rects.popper[f],x=s[l]-n.rects.reference[l],C=ed(i),_=C?l==="y"?C.clientHeight||0:C.clientWidth||0:0,T=y/2-x/2,w=p[g],k=_-m[f]-p[b],M=_/2-m[f]/2+T,A=Xc(w,M,k),R=l;n.modifiersData[r]=(e={},e[R]=A,e.centerOffset=A-M,e)}}function bee(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)||nP(e.elements.popper,o)&&(e.elements.arrow=o))}const vee={name:"arrow",enabled:!0,phase:"main",fn:yee,effect:bee,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fl(t){return t.split("-")[1]}var xee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function See(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:jl(n*o)/o||0,y:jl(r*o)/o||0}}function ok(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,m=s.x,g=m===void 0?0:m,b=s.y,y=b===void 0?0:b,x=typeof f=="function"?f({x:g,y}):{x:g,y};g=x.x,y=x.y;var C=s.hasOwnProperty("x"),_=s.hasOwnProperty("y"),T=Mr,w=Or,k=window;if(u){var M=ed(n),A="clientHeight",R="clientWidth";if(M===qr(n)&&(M=Rs(n),Ni(M).position!=="static"&&a==="absolute"&&(A="scrollHeight",R="scrollWidth")),M=M,o===Or||(o===Mr||o===ho)&&i===xu){w=po;var N=p&&M===k&&k.visualViewport?k.visualViewport.height:M[A];y-=N-r.height,y*=l?1:-1}if(o===Mr||(o===Or||o===po)&&i===xu){T=ho;var O=p&&M===k&&k.visualViewport?k.visualViewport.width:M[R];g-=O-r.width,g*=l?1:-1}}var I=Object.assign({position:a},u&&xee),L=f===!0?See({x:g,y},qr(n)):{x:g,y};if(g=L.x,y=L.y,l){var B;return Object.assign({},I,(B={},B[w]=_?"0":"",B[T]=C?"0":"",B.transform=(k.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",B))}return Object.assign({},I,(e={},e[w]=_?y+"px":"",e[T]=C?g+"px":"",e.transform="",e))}function Cee(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:Yo(e.placement),variation:Fl(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,ok(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,ok(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 wee={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Cee,data:{}};var cf={passive:!0};function Tee(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=qr(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(f){f.addEventListener("scroll",n.update,cf)}),a&&l.addEventListener("resize",n.update,cf),function(){i&&u.forEach(function(f){f.removeEventListener("scroll",n.update,cf)}),a&&l.removeEventListener("resize",n.update,cf)}}const _ee={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Tee,data:{}};var Eee={left:"right",right:"left",bottom:"top",top:"bottom"};function Wf(t){return t.replace(/left|right|bottom|top/g,function(e){return Eee[e]})}var kee={start:"end",end:"start"};function ik(t){return t.replace(/start|end/g,function(e){return kee[e]})}function tS(t){var e=qr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function nS(t){return $l(Rs(t)).left+tS(t).scrollLeft}function Oee(t,e){var n=qr(t),r=Rs(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var u=tP();(u||!u&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+nS(t),y:l}}function Mee(t){var e,n=Rs(t),r=tS(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=ca(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=ca(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+nS(t),l=-r.scrollTop;return Ni(o||n).direction==="rtl"&&(a+=ca(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function rS(t){var e=Ni(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function sP(t){return["html","body","#document"].indexOf(Zo(t))>=0?t.ownerDocument.body:co(t)&&rS(t)?t:sP(tm(t))}function Zc(t,e){var n;e===void 0&&(e=[]);var r=sP(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=qr(r),s=o?[i].concat(i.visualViewport||[],rS(r)?r:[]):r,a=e.concat(s);return o?a:a.concat(Zc(tm(s)))}function gx(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Aee(t,e){var n=$l(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 sk(t,e,n){return e===ZD?gx(Oee(t,n)):ba(e)?Aee(e,n):gx(Mee(Rs(t)))}function Ree(t){var e=Zc(tm(t)),n=["absolute","fixed"].indexOf(Ni(t).position)>=0,r=n&&co(t)?ed(t):t;return ba(r)?e.filter(function(o){return ba(o)&&nP(o,r)&&Zo(o)!=="body"}):[]}function Iee(t,e,n,r){var o=e==="clippingParents"?Ree(t):[].concat(e),i=[].concat(o,[n]),s=i[0],a=i.reduce(function(l,u){var f=sk(t,u,r);return l.top=ca(f.top,l.top),l.right=vp(f.right,l.right),l.bottom=vp(f.bottom,l.bottom),l.left=ca(f.left,l.left),l},sk(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 aP(t){var e=t.reference,n=t.element,r=t.placement,o=r?Yo(r):null,i=r?Fl(r):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(o){case Or:l={x:s,y:e.y-n.height};break;case po:l={x:s,y:e.y+e.height};break;case ho:l={x:e.x+e.width,y:a};break;case Mr:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=o?eS(o):null;if(u!=null){var f=u==="y"?"height":"width";switch(i){case Ll:l[u]=l[u]-(e[f]/2-n[f]/2);break;case xu:l[u]=l[u]+(e[f]/2-n[f]/2);break}}return l}function Su(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?QQ:a,u=n.rootBoundary,f=u===void 0?ZD:u,p=n.elementContext,m=p===void 0?Oc:p,g=n.altBoundary,b=g===void 0?!1:g,y=n.padding,x=y===void 0?0:y,C=oP(typeof x!="number"?x:iP(x,Qu)),_=m===Oc?eee:Oc,T=t.rects.popper,w=t.elements[b?_:m],k=Iee(ba(w)?w:w.contextElement||Rs(t.elements.popper),l,f,s),M=$l(t.elements.reference),A=aP({reference:M,element:T,placement:o}),R=gx(Object.assign({},T,A)),N=m===Oc?R:M,O={top:k.top-N.top+C.top,bottom:N.bottom-k.bottom+C.bottom,left:k.left-N.left+C.left,right:N.right-k.right+C.right},I=t.modifiersData.offset;if(m===Oc&&I){var L=I[o];Object.keys(O).forEach(function(B){var V=[ho,po].indexOf(B)>=0?1:-1,j=[Or,po].indexOf(B)>=0?"y":"x";O[B]+=L[j]*V})}return O}function Dee(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?QD:l,f=Fl(r),p=f?a?nk:nk.filter(function(b){return Fl(b)===f}):Qu,m=p.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=p);var g=m.reduce(function(b,y){return b[y]=Su(t,{placement:y,boundary:o,rootBoundary:i,padding:s})[Yo(y)],b},{});return Object.keys(g).sort(function(b,y){return g[b]-g[y]})}function Pee(t){if(Yo(t)===X1)return[];var e=Wf(t);return[ik(t),e,ik(e)]}function Nee(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,m=n.altBoundary,g=n.flipVariations,b=g===void 0?!0:g,y=n.allowedAutoPlacements,x=e.options.placement,C=Yo(x),_=C===x,T=l||(_||!b?[Wf(x)]:Pee(x)),w=[x].concat(T).reduce(function(ge,oe){return ge.concat(Yo(oe)===X1?Dee(e,{placement:oe,boundary:f,rootBoundary:p,padding:u,flipVariations:b,allowedAutoPlacements:y}):oe)},[]),k=e.rects.reference,M=e.rects.popper,A=new Map,R=!0,N=w[0],O=0;O<w.length;O++){var I=w[O],L=Yo(I),B=Fl(I)===Ll,V=[Or,po].indexOf(L)>=0,j=V?"width":"height",F=Su(e,{placement:I,boundary:f,rootBoundary:p,altBoundary:m,padding:u}),U=V?B?ho:Mr:B?po:Or;k[j]>M[j]&&(U=Wf(U));var K=Wf(U),Y=[];if(i&&Y.push(F[L]<=0),a&&Y.push(F[U]<=0,F[K]<=0),Y.every(function(ge){return ge})){N=I,R=!1;break}A.set(I,Y)}if(R)for(var G=b?3:1,Z=function(oe){var ye=w.find(function(de){var X=A.get(de);if(X)return X.slice(0,oe).every(function(Q){return Q})});if(ye)return N=ye,"break"},me=G;me>0;me--){var he=Z(me);if(he==="break")break}e.placement!==N&&(e.modifiersData[r]._skip=!0,e.placement=N,e.reset=!0)}}const Lee={name:"flip",enabled:!0,phase:"main",fn:Nee,requiresIfExists:["offset"],data:{_skip:!1}};function ak(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 lk(t){return[Or,ho,po,Mr].some(function(e){return t[e]>=0})}function jee(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=Su(e,{elementContext:"reference"}),a=Su(e,{altBoundary:!0}),l=ak(s,r),u=ak(a,o,i),f=lk(l),p=lk(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 $ee={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:jee};function Fee(t,e,n){var r=Yo(t),o=[Mr,Or].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,[Mr,ho].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function Bee(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=QD.reduce(function(f,p){return f[p]=Fee(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 Vee={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Bee};function zee(t){var e=t.state,n=t.name;e.modifiersData[n]=aP({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const Hee={name:"popperOffsets",enabled:!0,phase:"read",fn:zee,data:{}};function Wee(t){return t==="x"?"y":"x"}function qee(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,m=n.tether,g=m===void 0?!0:m,b=n.tetherOffset,y=b===void 0?0:b,x=Su(e,{boundary:l,rootBoundary:u,padding:p,altBoundary:f}),C=Yo(e.placement),_=Fl(e.placement),T=!_,w=eS(C),k=Wee(w),M=e.modifiersData.popperOffsets,A=e.rects.reference,R=e.rects.popper,N=typeof y=="function"?y(Object.assign({},e.rects,{placement:e.placement})):y,O=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(M){if(i){var B,V=w==="y"?Or:Mr,j=w==="y"?po:ho,F=w==="y"?"height":"width",U=M[w],K=U+x[V],Y=U-x[j],G=g?-R[F]/2:0,Z=_===Ll?A[F]:R[F],me=_===Ll?-R[F]:-A[F],he=e.elements.arrow,ge=g&&he?Q1(he):{width:0,height:0},oe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:rP(),ye=oe[V],de=oe[j],X=Xc(0,A[F],ge[F]),Q=T?A[F]/2-G-X-ye-O.mainAxis:Z-X-ye-O.mainAxis,ae=T?-A[F]/2+G+X+de+O.mainAxis:me+X+de+O.mainAxis,ve=e.elements.arrow&&ed(e.elements.arrow),ne=ve?w==="y"?ve.clientTop||0:ve.clientLeft||0:0,ce=(B=I==null?void 0:I[w])!=null?B:0,fe=U+Q-ce-ne,xe=U+ae-ce,_e=Xc(g?vp(K,fe):K,U,g?ca(Y,xe):Y);M[w]=_e,L[w]=_e-U}if(a){var Te,Pe=w==="x"?Or:Mr,Be=w==="x"?po:ho,W=M[k],te=k==="y"?"height":"width",re=W+x[Pe],Oe=W-x[Be],Re=[Or,Mr].indexOf(C)!==-1,Ie=(Te=I==null?void 0:I[k])!=null?Te:0,Ve=Re?re:W-A[te]-R[te]-Ie+O.altAxis,rt=Re?W+A[te]+R[te]-Ie-O.altAxis:Oe,tt=g&&Re?mee(Ve,W,rt):Xc(g?Ve:re,W,g?rt:Oe);M[k]=tt,L[k]=tt-W}e.modifiersData[r]=L}}const Uee={name:"preventOverflow",enabled:!0,phase:"main",fn:qee,requiresIfExists:["offset"]};function Kee(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Gee(t){return t===qr(t)||!co(t)?tS(t):Kee(t)}function Yee(t){var e=t.getBoundingClientRect(),n=jl(e.width)/t.offsetWidth||1,r=jl(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Jee(t,e,n){n===void 0&&(n=!1);var r=co(e),o=co(e)&&Yee(e),i=Rs(e),s=$l(t,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Zo(e)!=="body"||rS(i))&&(a=Gee(e)),co(e)?(l=$l(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=nS(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Xee(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 Zee(t){var e=Xee(t);return uee.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function Qee(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function ete(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 ck={placement:"bottom",modifiers:[],strategy:"absolute"};function uk(){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 tte(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?ck:o;return function(a,l,u){u===void 0&&(u=i);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},ck,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},p=[],m=!1,g={state:f,setOptions:function(C){var _=typeof C=="function"?C(f.options):C;y(),f.options=Object.assign({},i,f.options,_),f.scrollParents={reference:ba(a)?Zc(a):a.contextElement?Zc(a.contextElement):[],popper:Zc(l)};var T=Zee(ete([].concat(r,f.options.modifiers)));return f.orderedModifiers=T.filter(function(w){return w.enabled}),b(),g.update()},forceUpdate:function(){if(!m){var C=f.elements,_=C.reference,T=C.popper;if(uk(_,T)){f.rects={reference:Jee(_,ed(T),f.options.strategy==="fixed"),popper:Q1(T)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(O){return f.modifiersData[O.name]=Object.assign({},O.data)});for(var w=0;w<f.orderedModifiers.length;w++){if(f.reset===!0){f.reset=!1,w=-1;continue}var k=f.orderedModifiers[w],M=k.fn,A=k.options,R=A===void 0?{}:A,N=k.name;typeof M=="function"&&(f=M({state:f,options:R,name:N,instance:g})||f)}}}},update:Qee(function(){return new Promise(function(x){g.forceUpdate(),x(f)})}),destroy:function(){y(),m=!0}};if(!uk(a,l))return g;g.setOptions(u).then(function(x){!m&&u.onFirstUpdate&&u.onFirstUpdate(x)});function b(){f.orderedModifiers.forEach(function(x){var C=x.name,_=x.options,T=_===void 0?{}:_,w=x.effect;if(typeof w=="function"){var k=w({state:f,name:C,instance:g,options:T}),M=function(){};p.push(k||M)}})}function y(){p.forEach(function(x){return x()}),p=[]}return g}}var nte=[_ee,Hee,wee,eP,Vee,Lee,Uee,vee,$ee],lP=tte({defaultModifiers:nte});function rte(t){return Qe("MuiPopper",t)}et("MuiPopper",["root"]);function ote(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 xp(t){return typeof t=="function"?t():t}function nm(t){return t.nodeType!==void 0}function ite(t){return!nm(t)}const ste=t=>{const{classes:e}=t;return Ze({root:["root"]},rte,e)},ate={},lte=D.forwardRef(function(e,n){const{anchorEl:r,children:o,direction:i,disablePortal:s,modifiers:a,open:l,placement:u,popperOptions:f,popperRef:p,slotProps:m={},slots:g={},TransitionProps:b,ownerState:y,...x}=e,C=D.useRef(null),_=Pt(C,n),T=D.useRef(null),w=Pt(T,p),k=D.useRef(w);zn(()=>{k.current=w},[w]),D.useImperativeHandle(p,()=>T.current,[]);const M=ote(u,i),[A,R]=D.useState(M),[N,O]=D.useState(xp(r));D.useEffect(()=>{T.current&&T.current.forceUpdate()}),D.useEffect(()=>{r&&O(xp(r))},[r]),zn(()=>{if(!N||!l)return;const j=K=>{R(K.placement)};if(process.env.NODE_ENV!=="production"&&N&&nm(N)&&N.nodeType===1){const K=N.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(`
|
|
237
|
+
`))}let F=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:K})=>{j(K)}}];a!=null&&(F=F.concat(a)),f&&f.modifiers!=null&&(F=F.concat(f.modifiers));const U=lP(N,C.current,{placement:M,...f,modifiers:F});return k.current(U),()=>{U.destroy(),k.current(null)}},[N,s,a,l,f,M]);const I={placement:A};b!==null&&(I.TransitionProps=b);const L=ste(e),B=g.root??"div",V=At({elementType:B,externalSlotProps:m.root,externalForwardedProps:x,additionalProps:{role:"tooltip",ref:_},ownerState:e,className:L.root});return v.jsx(B,{...V,children:typeof o=="function"?o(I):o})}),cP=D.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:m=ate,popperRef:g,style:b,transition:y=!1,slotProps:x={},slots:C={},..._}=e,[T,w]=D.useState(!0),k=()=>{w(!1)},M=()=>{w(!0)};if(!l&&!f&&(!y||T))return null;let A;if(i)A=i;else if(r){const O=xp(r);A=O&&nm(O)?tr(O).body:tr(null).body}const R=!f&&l&&(!y||T)?"none":void 0,N=y?{in:f,onEnter:k,onExited:M}:void 0;return v.jsx(vu,{disablePortal:a,container:A,children:v.jsx(lte,{anchorEl:r,direction:s,disablePortal:a,modifiers:u,ref:n,open:y?!T:f,placement:p,popperOptions:m,popperRef:g,slotProps:x,slots:C,..._,style:{position:"fixed",top:0,left:0,display:R,...b},TransitionProps:N,children:o})})});process.env.NODE_ENV!=="production"&&(cP.propTypes={anchorEl:Li(c.oneOfType([Ri,c.object,c.func]),t=>{if(t.open){const e=xp(t.anchorEl);if(e&&nm(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(`
|
|
238
|
+
`))}else if(!e||typeof e.getBoundingClientRect!="function"||ite(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(`
|
|
239
|
+
`))}return null}),children:c.oneOfType([c.node,c.func]),container:c.oneOfType([Ri,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:On,slotProps:c.shape({root:c.oneOfType([c.func,c.object])}),slots:c.shape({root:c.elementType}),transition:c.bool});const cte=Se(cP,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),uP=D.forwardRef(function(e,n){const r=BI(),o=Et({props:e,name:"MuiPopper"}),{anchorEl:i,component:s,components:a,componentsProps:l,container:u,disablePortal:f,keepMounted:p,modifiers:m,open:g,placement:b,popperOptions:y,popperRef:x,transition:C,slots:_,slotProps:T,...w}=o,k=(_==null?void 0:_.root)??(a==null?void 0:a.Root),M={anchorEl:i,container:u,disablePortal:f,keepMounted:p,modifiers:m,open:g,placement:b,popperOptions:y,popperRef:x,transition:C,...w};return v.jsx(cte,{as:s,direction:r?"rtl":"ltr",slots:{root:k},slotProps:T??l,...M,ref:n})});process.env.NODE_ENV!=="production"&&(uP.propTypes={anchorEl:c.oneOfType([Ri,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([Ri,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:On,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 ute(t){return Qe("MuiPickersPopper",t)}et("MuiPickersPopper",["root","paper"]);const dte="@media (prefers-reduced-motion: reduce)",Ol=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),dk=Ol&&Ol[1]?parseInt(Ol[1],10):null,fk=Ol&&Ol[2]?parseInt(Ol[2],10):null,fte=dk&&dk<10||fk&&fk<13||!1,dP=()=>YD(dte,{defaultMatches:!1})||fte,pte=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],hte=t=>{const{classes:e}=t;return Ze({root:["root"],paper:["paper"]},ute,e)},mte=Se(uP,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({zIndex:t.zIndex.modal})),gte=Se(Ea,{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 yte(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function bte(t,e){const n=D.useRef(!1),r=D.useRef(!1),o=D.useRef(null),i=D.useRef(!1);D.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=qe(l=>{if(!i.current)return;const u=r.current;r.current=!1;const f=tr(o.current);if(!o.current||"clientX"in l&&yte(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 D.useEffect(()=>{if(t){const l=tr(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]),D.useEffect(()=>{if(t){const l=tr(o.current);return l.addEventListener("click",s),()=>{l.removeEventListener("click",s),r.current=!1}}},[t,s]),[o,a,a]}const vte=D.forwardRef((t,e)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:s,paperClasses:a,onPaperClick:l,onPaperTouchStart:u}=t,f=dt(t,pte),p=ie({},o,{placement:r}),m=At({elementType:n,externalSlotProps:s,additionalProps:{tabIndex:-1,elevation:8,ref:e},className:a,ownerState:p});return v.jsx(n,ie({},f,m,{onClick:g=>{var b;l(g),(b=m.onClick)==null||b.call(m,g)},onTouchStart:g=>{var b;u(g),(b=m.onTouchStart)==null||b.call(m,g)},ownerState:p,children:i}))});function xte(t){const e=Qt({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:m,reduceAnimations:g}=e;D.useEffect(()=>{function j(F){l&&F.key==="Escape"&&a()}return document.addEventListener("keydown",j),()=>{document.removeEventListener("keydown",j)}},[a,l]);const b=D.useRef(null);D.useEffect(()=>{u==="tooltip"||i&&!i()||(l?b.current=Tr(document):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[l,u,i]);const[y,x,C]=bte(l,s??a),_=D.useRef(null),T=Pt(_,o),w=Pt(T,y),k=e,M=hte(k),A=dP(),R=g??A,N=j=>{j.key==="Escape"&&(j.stopPropagation(),a())},O=(p==null?void 0:p.desktopTransition)??R?ws:yu,I=(p==null?void 0:p.desktopTrapFocus)??bu,L=(p==null?void 0:p.desktopPaper)??gte,B=(p==null?void 0:p.popper)??mte,V=At({elementType:B,externalSlotProps:m==null?void 0:m.popper,additionalProps:{transition:!0,role:u,open:l,anchorEl:n,placement:f,onKeyDown:N},className:M.root,ownerState:e});return v.jsx(B,ie({},V,{children:({TransitionProps:j,placement:F})=>v.jsx(I,ie({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},m==null?void 0:m.desktopTrapFocus,{children:v.jsx(O,ie({},j,m==null?void 0:m.desktopTransition,{children:v.jsx(vte,{PaperComponent:L,ownerState:k,popperPlacement:F,ref:w,onPaperClick:x,onPaperTouchStart:C,paperClasses:M.paper,paperSlotProps:m==null?void 0:m.desktopPaper,children:r})}))}))}))}const Ste=({open:t,onOpen:e,onClose:n})=>{const r=D.useRef(typeof t=="boolean").current,[o,i]=D.useState(!1);D.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=D.useCallback(a=>{r||i(a),a&&e&&e(),!a&&n&&n()},[r,e,n]);return{isOpen:o,setIsOpen:s}},Cte=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},wte=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},Tte=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},_te=({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:m}=D.useRef(l),{current:g}=D.useRef(a!==void 0),[b,y]=D.useState(f);process.env.NODE_ENV!=="production"&&(D.useEffect(()=>{g!==(a!==void 0)&&console.error([`MUI X: A component is changing the ${g?"":"un"}controlled value of a picker to be ${g?"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(`
|
|
240
|
+
`))},[a]),D.useEffect(()=>{!g&&m!==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(`
|
|
241
|
+
`))},[JSON.stringify(m)]));const x=en(),C=ka(),{isOpen:_,setIsOpen:T}=Ste(t),{timezone:w,value:k,handleValueChange:M}=z1({timezone:f,value:a,defaultValue:m,referenceDate:p,onChange:s,valueManager:e}),[A,R]=D.useState(()=>{let Q;return k!==void 0?Q=k:m!==void 0?Q=m:Q=e.emptyValue,{draft:Q,lastPublishedValue:Q,lastCommittedValue:Q,lastControlledValue:a,hasBeenModifiedSinceMount:!1}}),N=e.getTimezone(x,A.draft);b!==f&&(y(f),f&&N&&f!==N&&R(Q=>ie({},Q,{draft:e.setTimezone(x,f,Q.draft)})));const{getValidationErrorForNewValue:O}=RD({props:t,validator:o,timezone:w,value:A.draft,onError:t.onError}),I=qe(Q=>{const ae={action:Q,dateState:A,hasChanged:_e=>!e.areValuesEqual(x,Q.value,_e),isControlled:g,closeOnSelect:u},ve=Cte(ae),ne=wte(ae),ce=Tte(ae);R(_e=>ie({},_e,{draft:Q.value,lastPublishedValue:ve?Q.value:_e.lastPublishedValue,lastCommittedValue:ne?Q.value:_e.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&&T(!1)});if(A.lastControlledValue!==a){const Q=e.areValuesEqual(x,A.draft,k);R(ae=>ie({},ae,{lastControlledValue:a},Q?{}:{lastCommittedValue:k,lastPublishedValue:k,draft:k,hasBeenModifiedSinceMount:!0}))}const L=qe(()=>{I({value:e.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),B=qe(()=>{I({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),V=qe(()=>{I({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),j=qe(()=>{I({value:A.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),F=qe(()=>{I({value:e.getTodayValue(x,w,n),name:"setValueFromAction",pickerAction:"today"})}),U=qe(Q=>{Q.preventDefault(),T(!0)}),K=qe(Q=>{Q==null||Q.preventDefault(),T(!1)}),Y=qe((Q,ae="partial")=>I({name:"setValueFromView",value:Q,selectionState:ae})),G=qe((Q,ae,ve)=>I({name:"setValueFromShortcut",value:Q,changeImportance:ae,shortcut:ve})),Z=qe((Q,ae)=>I({name:"setValueFromField",value:Q,context:ae})),me={onClear:L,onAccept:B,onDismiss:V,onCancel:j,onSetToday:F,onOpen:U,onClose:K},he={value:A.draft,onChange:Z},ge=D.useMemo(()=>e.cleanValue(x,A.draft),[x,e,A.draft]),oe={value:ge,onChange:Y,onClose:K,open:_},de=ie({},me,{value:ge,onChange:Y,onSelectShortcut:G,isValid:Q=>{const ae=o({adapter:C,value:Q,timezone:w,props:t});return!e.hasError(ae)}}),X=D.useMemo(()=>({onOpen:U,onClose:K,open:_}),[_,K,U]);return{open:_,fieldProps:he,viewProps:oe,layoutProps:de,actions:me,contextValue:X}};let Ay=!1;function fP({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=D.useRef(n),u=D.useRef(o),f=D.useRef(o.includes(n)?n:o[0]),[p,m]=Di({name:"useViews",state:"view",controlled:r,default:f.current}),g=D.useRef(i?p:null),[b,y]=Di({name:"useViews",state:"focusedView",controlled:s,default:g.current});D.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(A=>!o.includes(A)))&&(m(o.includes(n)?n:o[0]),u.current=o,l.current=n)},[n,m,p,o]);const x=o.indexOf(p),C=o[x-1]??null,_=o[x+1]??null,T=qe((A,R)=>{y(R?A:N=>A===N?null:N),a==null||a(A,R)}),w=qe(A=>{T(A,!0),A!==p&&(m(A),e&&e(A))}),k=qe(()=>{_&&w(_)}),M=qe((A,R,N)=>{const O=R==="finish",I=N?o.indexOf(N)<o.length-1:!!_;if(t(A,O&&I?"partial":R,N),N&&N!==p){const B=o[o.indexOf(N)+1];B&&w(B)}else O&&k()});return{view:p,setView:w,focusedView:b,setFocusedView:T,nextView:_,previousView:C,defaultView:o.includes(n)?n:o[0],goToNextView:k,setValueAndGoToNextView:M}}const Ete=["className","sx"],kte=({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:m,viewRenderers:g,timezone:b}=t,y=dt(t,Ete),{view:x,setView:C,defaultView:_,focusedView:T,setFocusedView:w,setValueAndGoToNextView:k}=fP({view:u,views:f,openTo:p,onChange:s,onViewChange:m,autoFocus:r}),{hasUIView:M,viewModeLookup:A}=D.useMemo(()=>f.reduce((V,j)=>{let F;return g[j]!=null?F="UI":F="field",V.viewModeLookup[j]=F,F==="UI"&&(V.hasUIView=!0),V},{hasUIView:!1,viewModeLookup:{}}),[g,f]),R=D.useMemo(()=>f.reduce((V,j)=>g[j]!=null&&yJ(j)?V+1:V,0),[g,f]),N=A[x],O=qe(()=>N==="UI"),[I,L]=D.useState(N==="UI"?x:null);return I!==x&&A[x]==="UI"&&L(x),zn(()=>{N==="field"&&a&&(l(),setTimeout(()=>{var V,j;(V=i==null?void 0:i.current)==null||V.setSelectedSections(x),(j=i==null?void 0:i.current)==null||j.focusField(x)}))},[x]),zn(()=>{if(!a)return;let V=x;N==="field"&&I!=null&&(V=I),V!==_&&A[V]==="UI"&&A[_]==="UI"&&(V=_),V!==x&&C(V),w(V,!0)},[a]),{hasUIView:M,shouldRestoreFocus:O,layoutProps:{views:f,view:I,onViewChange:C},renderCurrentView:()=>{if(I==null)return null;const V=g[I];if(V==null)return null;const j=ie({},y,n,e,{views:f,timezone:b,onChange:k,view:I,onViewChange:C,focusedView:T,onFocusedViewChange:w,showViewSwitcher:R>1,timeViewsCount:R});return o?o(g,I,j):V(j)}}};function pk(){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 Ote=(t,e)=>{const[n,r]=D.useState(pk);return zn(()=>{const i=()=>{r(pk())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),ZJ(t,["hours","minutes","seconds"])?!1:(e||n)==="landscape"},Mte=({props:t,propsFromPickerValue:e,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=t,i=Ote(n.views,o),s=Fi();return{layoutProps:ie({},n,e,{isLandscape:i,isRtl:s,wrapperVariant:r,disabled:t.disabled,readOnly:t.readOnly})}};function Ate(t){const{props:e,pickerValueResponse:n}=t;return D.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 pP=({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&&iD(["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=_te({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:i}),f=kte({props:t,additionalViewProps:o,autoFocusView:s,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:a}),p=Mte({props:t,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:f.layoutProps}),m=Ate({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:m}};function hP(t){return Qe("MuiPickersLayout",t)}const qs=et("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]);function Rte(t){return Qe("MuiButton",t)}const Us=et("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"]),mP=D.createContext({});process.env.NODE_ENV!=="production"&&(mP.displayName="ButtonGroupContext");const gP=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(gP.displayName="ButtonGroupButtonContext");const Ite=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}${Le(e)}`,`size${Le(o)}`,`${i}Size${Le(o)}`,`color${Le(e)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${Le(a)}`],startIcon:["icon","startIcon",`iconSize${Le(o)}`],endIcon:["icon","endIcon",`iconSize${Le(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},f=Ze(u,Rte,l);return{...l,...f}},yP=[{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}}}],Dte=Se(Nl,{shouldForwardProp:t=>Ao(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${Le(n.color)}`],e[`size${Le(n.size)}`],e[`${n.variant}Size${Le(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,n.loading&&e.loading]}})(Bt(({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"},[`&.${Us.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]},[`&.${Us.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${Us.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)",[`&.${Us.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"},[`&.${Us.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Us.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}),[`&.${Us.loading}`]:{color:"transparent"}}}]}})),Pte=Se("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,n.loading&&e.startIconLoadingStart,e[`iconSize${Le(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}},...yP]})),Nte=Se("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,n.loading&&e.endIconLoadingEnd,e[`iconSize${Le(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}},...yP]})),Lte=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}}]})),hk=Se("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(t,e)=>e.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),jc=D.forwardRef(function(e,n){const r=D.useContext(mP),o=D.useContext(gP),i=fu(r,e),s=Et({props:i,name:"MuiButton"}),{children:a,color:l="primary",component:u="button",className:f,disabled:p=!1,disableElevation:m=!1,disableFocusRipple:g=!1,endIcon:b,focusVisibleClassName:y,fullWidth:x=!1,id:C,loading:_=null,loadingIndicator:T,loadingPosition:w="center",size:k="medium",startIcon:M,type:A,variant:R="text",...N}=s,O=ni(C),I=T??v.jsx(W1,{"aria-labelledby":O,color:"inherit",size:16}),L={...s,color:l,component:u,disabled:p,disableElevation:m,disableFocusRipple:g,fullWidth:x,loading:_,loadingIndicator:I,loadingPosition:w,size:k,type:A,variant:R},B=Ite(L),V=(M||_&&w==="start")&&v.jsx(Pte,{className:B.startIcon,ownerState:L,children:M||v.jsx(hk,{className:B.loadingIconPlaceholder,ownerState:L})}),j=(b||_&&w==="end")&&v.jsx(Nte,{className:B.endIcon,ownerState:L,children:b||v.jsx(hk,{className:B.loadingIconPlaceholder,ownerState:L})}),F=o||"",U=typeof _=="boolean"?v.jsx("span",{className:B.loadingWrapper,style:{display:"contents"},children:_&&v.jsx(Lte,{className:B.loadingIndicator,ownerState:L,children:I})}):null;return v.jsxs(Dte,{ownerState:L,className:ze(r.className,B.root,f,F),component:u,disabled:p||_,focusRipple:!g,focusVisibleClassName:ze(B.focusVisible,y),ref:n,type:A,id:_?O:C,...N,classes:B,children:[V,w!=="end"&&U,a,w==="end"&&U,j]})});process.env.NODE_ENV!=="production"&&(jc.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 jte(t){return Qe("MuiDialogActions",t)}et("MuiDialogActions",["root","spacing"]);const $te=t=>{const{classes:e,disableSpacing:n}=t;return Ze({root:["root",!n&&"spacing"]},jte,e)},Fte=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}}}]}),bP=D.forwardRef(function(e,n){const r=Et({props:e,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...s}=r,a={...r,disableSpacing:i},l=$te(a);return v.jsx(Fte,{className:ze(l.root,o),ownerState:a,ref:n,...s})});process.env.NODE_ENV!=="production"&&(bP.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 Bte=["onAccept","onClear","onCancel","onSetToday","actions"];function vP(t){const{onAccept:e,onClear:n,onCancel:r,onSetToday:o,actions:i}=t,s=dt(t,Bte),a=Bi();if(i==null||i.length===0)return null;const l=i==null?void 0:i.map(u=>{switch(u){case"clear":return v.jsx(jc,{onClick:n,children:a.clearButtonLabel},u);case"cancel":return v.jsx(jc,{onClick:r,children:a.cancelButtonLabel},u);case"accept":return v.jsx(jc,{onClick:e,children:a.okButtonLabel},u);case"today":return v.jsx(jc,{onClick:o,children:a.todayButtonLabel},u);default:return null}});return v.jsx(bP,ie({},s,{children:l}))}process.env.NODE_ENV!=="production"&&(vP.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 Vte(t){return Qe("MuiListItem",t)}et("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const zte=et("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Hte(t){return Qe("MuiListItemSecondaryAction",t)}et("MuiListItemSecondaryAction",["root","disableGutters"]);const Wte=t=>{const{disableGutters:e,classes:n}=t;return Ze({root:["root",e&&"disableGutters"]},Hte,n)},qte=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}}]}),oS=D.forwardRef(function(e,n){const r=Et({props:e,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,s=D.useContext(_l),a={...r,disableGutters:s.disableGutters},l=Wte(a);return v.jsx(qte,{className:ze(l.root,o),ownerState:a,ref:n,...i})});process.env.NODE_ENV!=="production"&&(oS.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])});oS.muiName="ListItemSecondaryAction";const Ute=(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]},Kte=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"]},Vte,n)},Gte=Se("div",{name:"MuiListItem",slot:"Root",overridesResolver:Ute})(Bt(({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:{[`& > .${zte.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}}]}))),Yte=Se("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),xP=D.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,...m}={},dense:g=!1,disableGutters:b=!1,disablePadding:y=!1,divider:x=!1,secondaryAction:C,slotProps:_={},slots:T={},...w}=r,k=D.useContext(_l),M=D.useMemo(()=>({dense:g||k.dense||!1,alignItems:o,disableGutters:b}),[o,k.dense,g,b]),A=D.useRef(null),R=D.Children.toArray(i),N=R.length&&Cl(R[R.length-1],["ListItemSecondaryAction"]),O={...r,alignItems:o,dense:M.dense,disableGutters:b,disablePadding:y,divider:x,hasSecondaryAction:N},I=Kte(O),L=Pt(A,n),B=T.root||l.Root||Gte,V=_.root||u.root||{},j={className:ze(I.root,V.className,s),...w};let F=a||"li";return N?(F=!j.component&&!a?"div":F,f==="li"&&(F==="li"?F="div":j.component==="li"&&(j.component="div")),v.jsx(_l.Provider,{value:M,children:v.jsxs(Yte,{as:f,className:ze(I.container,p),ref:L,ownerState:O,...m,children:[v.jsx(B,{...V,...!gu(B)&&{as:F,ownerState:{...O,...V.ownerState}},...j,children:R}),R.pop()]})})):v.jsx(_l.Provider,{value:M,children:v.jsxs(B,{...V,as:F,ref:L,...!gu(B)&&{ownerState:{...O,...V.ownerState}},...j,children:[R,C&&v.jsx(oS,{children:C})]})})});process.env.NODE_ENV!=="production"&&(xP.propTypes={alignItems:c.oneOf(["center","flex-start"]),children:Li(c.node,t=>{const e=D.Children.toArray(t.children);let n=-1;for(let r=e.length-1;r>=0;r-=1){const o=e[r];if(Cl(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:gh,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 Jte=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 Xte(t){return Qe("MuiChip",t)}const vt=et("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"]),Zte=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${Le(r)}`,`color${Le(o)}`,a&&"clickable",a&&`clickableColor${Le(o)}`,s&&"deletable",s&&`deletableColor${Le(o)}`,`${l}${Le(o)}`],label:["label",`label${Le(r)}`],avatar:["avatar",`avatar${Le(r)}`,`avatarColor${Le(o)}`],icon:["icon",`icon${Le(r)}`,`iconColor${Le(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Le(r)}`,`deleteIconColor${Le(o)}`,`deleteIcon${Le(l)}Color${Le(o)}`]};return Ze(u,Xte,e)},Qte=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${Le(a)}`]},{[`& .${vt.avatar}`]:e[`avatarColor${Le(r)}`]},{[`& .${vt.icon}`]:e.icon},{[`& .${vt.icon}`]:e[`icon${Le(a)}`]},{[`& .${vt.icon}`]:e[`iconColor${Le(o)}`]},{[`& .${vt.deleteIcon}`]:e.deleteIcon},{[`& .${vt.deleteIcon}`]:e[`deleteIcon${Le(a)}`]},{[`& .${vt.deleteIcon}`]:e[`deleteIconColor${Le(r)}`]},{[`& .${vt.deleteIcon}`]:e[`deleteIcon${Le(l)}Color${Le(r)}`]},e.root,e[`size${Le(a)}`],e[`color${Le(r)}`],i&&e.clickable,i&&r!=="default"&&e[`clickableColor${Le(r)})`],s&&e.deletable,s&&r!=="default"&&e[`deletableColor${Le(r)}`],e[l],e[`${l}${Le(r)}`]]}})(Bt(({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}}}}))]}})),ene=Se("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:r}=n;return[e.label,e[`label${Le(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 mk(t){return t.key==="Backspace"||t.key==="Delete"}const SP=D.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:m,onClick:g,onDelete:b,onKeyDown:y,onKeyUp:x,size:C="medium",variant:_="filled",tabIndex:T,skipFocusWhenDisabled:w=!1,...k}=r,M=D.useRef(null),A=Pt(M,n),R=Y=>{Y.stopPropagation(),b&&b(Y)},N=Y=>{Y.currentTarget===Y.target&&mk(Y)&&Y.preventDefault(),y&&y(Y)},O=Y=>{Y.currentTarget===Y.target&&b&&mk(Y)&&b(Y),x&&x(Y)},I=s!==!1&&g?!0:s,L=I||b?Nl:l||"div",B={...r,component:L,disabled:f,size:C,color:a,iconColor:D.isValidElement(p)&&p.props.color||a,onDelete:!!b,clickable:I,variant:_},V=Zte(B),j=L===Nl?{component:l||"div",focusVisibleClassName:V.focusVisible,...b&&{disableRipple:!0}}:{};let F=null;b&&(F=u&&D.isValidElement(u)?D.cloneElement(u,{className:ze(u.props.className,V.deleteIcon),onClick:R}):v.jsx(Jte,{className:ze(V.deleteIcon),onClick:R}));let U=null;o&&D.isValidElement(o)&&(U=D.cloneElement(o,{className:ze(V.avatar,o.props.className)}));let K=null;return p&&D.isValidElement(p)&&(K=D.cloneElement(p,{className:ze(V.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(Qte,{as:L,className:ze(V.root,i),disabled:I&&f?!0:void 0,onClick:g,onKeyDown:N,onKeyUp:O,ref:A,tabIndex:w&&f?-1:T,ownerState:B,...j,...k,children:[U||K,v.jsx(ene,{className:ze(V.label),ownerState:B,children:m}),F]})});process.env.NODE_ENV!=="production"&&(SP.propTypes={avatar:c.element,children:M9,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 Cu=36,rm=2,om=320,tne=280,iS=336,nne=["items","changeImportance","isLandscape","onChange","isValid"],rne=["getValue"];function CP(t){const{items:e,changeImportance:n="accept",onChange:r,isValid:o}=t,i=dt(t,nne);if(e==null||e.length===0)return null;const s=e.map(a=>{let{getValue:l}=a,u=dt(a,rne);const f=l({isValid:o});return ie({},u,{label:u.label,onClick:()=>{r(f,n,u)},disabled:!o(f)})});return v.jsx(O1,ie({dense:!0,sx:[{maxHeight:iS,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:s.map(a=>v.jsx(xP,{children:v.jsx(SP,ie({},a))},a.id??a.label))}))}process.env.NODE_ENV!=="production"&&(CP.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 one(t){return t.view!==null}const ine=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"]},hP,e)},sne=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:m,isLandscape:g,disabled:b,readOnly:y,children:x,slots:C,slotProps:_}=t,T=ine(t),w=(C==null?void 0:C.actionBar)??vP,k=At({elementType:w,externalSlotProps:_==null?void 0:_.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:e==="desktop"?[]:["cancel","accept"]},className:T.actionBar,ownerState:ie({},t,{wrapperVariant:e})}),M=v.jsx(w,ie({},k)),A=C==null?void 0:C.toolbar,R=At({elementType:A,externalSlotProps:_==null?void 0:_.toolbar,additionalProps:{isLandscape:g,onChange:f,value:u,view:s,onViewChange:l,views:a,disabled:b,readOnly:y},className:T.toolbar,ownerState:ie({},t,{wrapperVariant:e})}),N=one(R)&&A?v.jsx(A,ie({},R)):null,O=x,I=C==null?void 0:C.tabs,L=s&&I?v.jsx(I,ie({view:s,onViewChange:l,className:T.tabs},_==null?void 0:_.tabs)):null,B=(C==null?void 0:C.shortcuts)??CP,V=At({elementType:B,externalSlotProps:_==null?void 0:_.shortcuts,additionalProps:{isValid:m,isLandscape:g,onChange:p},className:T.shortcuts,ownerState:{isValid:m,isLandscape:g,onChange:p,wrapperVariant:e}}),j=s&&B?v.jsx(B,ie({},V)):null;return{toolbar:N,content:O,tabs:L,actionBar:M,shortcuts:j}},ane=t=>{const{isLandscape:e,classes:n}=t;return Ze({root:["root",e&&"landscape"],contentWrapper:["contentWrapper"]},hP,n)},lne=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",[`& .${qs.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${qs.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${qs.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${qs.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${qs.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${qs.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${qs.shortcuts}`]:{gridColumn:3}}}]}),cne=Se("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(t,e)=>e.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),sS=D.forwardRef(function(e,n){const r=Qt({props:e,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:s,actionBar:a,shortcuts:l}=sne(r),{sx:u,className:f,isLandscape:p,wrapperVariant:m}=r,g=ane(r);return v.jsxs(lne,{ref:n,sx:u,className:ze(g.root,f),ownerState:r,children:[p?l:o,p?o:l,v.jsx(cne,{className:g.contentWrapper,children:m==="desktop"?v.jsxs(D.Fragment,{children:[i,s]}):v.jsxs(D.Fragment,{children:[s,i]})}),a]})});process.env.NODE_ENV!=="production"&&(sS.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 une=["props","getOpenDialogAriaText"],dne=["ownerState"],fne=["ownerState"],pne=t=>{var xe;let{props:e,getOpenDialogAriaText:n}=t,r=dt(t,une);const{slots:o,slotProps:i,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:m,timezone:g,name:b,label:y,inputRef:x,readOnly:C,disabled:_,autoFocus:T,localeText:w,reduceAnimations:k}=e,M=D.useRef(null),A=D.useRef(null),R=ni(),N=((xe=i==null?void 0:i.toolbar)==null?void 0:xe.hidden)??!1,{open:O,actions:I,hasUIView:L,layoutProps:B,renderCurrentView:V,shouldRestoreFocus:j,fieldProps:F,contextValue:U,ownerState:K}=pP(ie({},r,{props:e,fieldRef:A,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),Y=o.inputAdornment??q1,G=At({elementType:Y,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:e}),Z=dt(G,dne),me=o.openPickerButton??Yl,he=At({elementType:me,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:_||C,onClick:O?I.onClose:I.onOpen,"aria-label":n(F.value),edge:Z.position},ownerState:e}),ge=dt(he,fne),oe=o.openPickerIcon,ye=At({elementType:oe,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:K}),de=o.field,X=At({elementType:de,externalSlotProps:i==null?void 0:i.field,additionalProps:ie({},F,N&&{id:R},{readOnly:C,disabled:_,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:m,timezone:g,label:y,name:b,autoFocus:T&&!e.open,focused:O?!0:void 0},x?{inputRef:x}:{}),ownerState:e});L&&(X.InputProps=ie({},X.InputProps,{ref:M},!e.disableOpenPicker&&{[`${Z.position}Adornment`]:v.jsx(Y,ie({},Z,{children:v.jsx(me,ie({},ge,{children:v.jsx(oe,ie({},ye))}))}))}));const Q=ie({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},X.slots),ae=o.layout??sS;let ve=R;N&&(y?ve=`${R}-label`:ve=void 0);const ne=ie({},i,{toolbar:ie({},i==null?void 0:i.toolbar,{titleId:R}),popper:ie({"aria-labelledby":ve},i==null?void 0:i.popper)}),ce=Pt(A,X.unstableFieldRef);return{renderPicker:()=>v.jsxs(PD,{contextValue:U,localeText:w,children:[v.jsx(de,ie({},X,{slots:Q,slotProps:ne,unstableFieldRef:ce})),v.jsx(xte,ie({role:"dialog",placement:"bottom-start",anchorEl:M.current},I,{open:O,slots:o,slotProps:ne,shouldRestoreFocus:j,reduceAnimations:k,children:v.jsx(ae,ie({},B,ne==null?void 0:ne.layout,{slots:o,slotProps:ne,children:V()}))}))]})}},wP=({shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s,timezone:a})=>{const l=ka();return D.useCallback(u=>Yu({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])},hne=(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")}},mne=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,m=en(),g=D.useRef(hne(!!u,i,m)).current,b=D.useMemo(()=>Xo.getInitialReferenceValue({value:e,utils:m,timezone:p,props:t,referenceDate:n,granularity:Wo.day}),[n,p]),[y,x]=D.useReducer(g,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:m.startOfMonth(b),slideDirection:"left"});D.useEffect(()=>{x({type:"changeMonthTimezone",newTimezone:m.getTimezone(b)})},[b,m]);const C=D.useCallback(M=>{x(ie({type:"changeMonth"},M)),l&&l(M.newMonth)},[l]),_=D.useCallback(M=>{const A=M;m.isSameMonth(A,y.currentMonth)||C({newMonth:m.startOfMonth(A),direction:m.isAfterDay(A,y.currentMonth)?"left":"right"})},[y.currentMonth,C,m]),T=wP({shouldDisableDate:f,minDate:a,maxDate:s,disableFuture:r,disablePast:o,timezone:p}),w=D.useCallback(()=>{x({type:"finishMonthSwitchingAnimation"})},[]),k=qe((M,A)=>{T(M)||x({type:"changeFocusedDay",focusedDay:M,withoutMonthSwitchingAnimation:A})});return{referenceDate:b,calendarState:y,changeMonth:_,changeFocusedDay:k,isDateDisabled:T,onMonthSwitchingAnimationEnd:w,handleChangeMonth:C}},gne=t=>Qe("MuiPickersFadeTransitionGroup",t);et("MuiPickersFadeTransitionGroup",["root"]);const yne=t=>{const{classes:e}=t;return Ze({root:["root"]},gne,e)},bne=Se(Gu,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"block",position:"relative"});function TP(t){const e=Qt({props:t,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=yne(e),a=ji();return o?n:v.jsx(bne,{className:ze(s.root,r),children:v.jsx(ws,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:a.transitions.duration.enteringScreen,enter:a.transitions.duration.enteringScreen,exit:0},children:n},i)})}function vne(t){return Qe("MuiPickersDay",t)}const Ks=et("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),xne=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],Sne=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"]},vne,l)},_P=({theme:t})=>ie({},t.typography.caption,{width:Cu,height:Cu,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),[`&.${Ks.selected}`]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${Ks.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}},[`&.${Ks.disabled}:not(.${Ks.selected})`]:{color:(t.vars||t).palette.text.disabled},[`&.${Ks.disabled}&.${Ks.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${rm}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(t.vars||t).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${Ks.selected})`]:{border:`1px solid ${(t.vars||t).palette.text.secondary}`}}}]}),EP=(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]},Cne=Se(Nl,{name:"MuiPickersDay",slot:"Root",overridesResolver:EP})(_P),wne=Se("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:EP})(({theme:t})=>ie({},_P({theme:t}),{opacity:0,pointerEvents:"none"})),Mc=()=>{},kP=D.forwardRef(function(e,n){const r=Qt({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:m,onFocus:g=Mc,onBlur:b=Mc,onKeyDown:y=Mc,onMouseDown:x=Mc,onMouseEnter:C=Mc,outsideCurrentMonth:_,selected:T=!1,showDaysOutsideCurrentMonth:w=!1,children:k,today:M=!1}=r,A=dt(r,xne),R=ie({},r,{autoFocus:o,disabled:a,disableHighlightToday:l,disableMargin:u,selected:T,showDaysOutsideCurrentMonth:w,today:M}),N=Sne(R),O=en(),I=D.useRef(null),L=Pt(I,n);zn(()=>{o&&!a&&!f&&!_&&I.current.focus()},[o,a,f,_]);const B=j=>{x(j),_&&j.preventDefault()},V=j=>{a||m(s),_&&j.currentTarget.focus(),p&&p(j)};return _&&!w?v.jsx(wne,{className:ze(N.root,N.hiddenDaySpacingFiller,i),ownerState:R,role:A.role}):v.jsx(Cne,ie({className:ze(N.root,i),ref:L,centerRipple:!0,disabled:a,tabIndex:T?0:-1,onKeyDown:j=>y(j,s),onFocus:j=>g(j,s),onBlur:j=>b(j,s),onMouseEnter:j=>C(j,s),onClick:V,onMouseDown:B},A,{ownerState:R,children:k||O.format(s,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(kP.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 Tne=D.memo(kP),_ne=t=>Qe("MuiPickersSlideTransition",t),eo=et("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Ene=["children","className","reduceAnimations","slideDirection","transKey","classes"],kne=t=>{const{classes:e,slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Ze(r,_ne,e)},One=Se(Gu,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`.${eo["slideEnter-left"]}`]:e["slideEnter-left"]},{[`.${eo["slideEnter-right"]}`]:e["slideEnter-right"]},{[`.${eo.slideEnterActive}`]:e.slideEnterActive},{[`.${eo.slideExit}`]:e.slideExit},{[`.${eo["slideExitActiveLeft-left"]}`]:e["slideExitActiveLeft-left"]},{[`.${eo["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},[`& .${eo["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${eo["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${eo.slideEnterActive}`]:{transform:"translate(0%)",transition:e},[`& .${eo.slideExit}`]:{transform:"translate(0%)"},[`& .${eo["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:e,zIndex:0},[`& .${eo["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:e,zIndex:0}}});function Mne(t){const e=Qt({props:t,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=dt(e,Ene),a=kne(e),l=ji();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(One,{className:ze(a.root,r),childFactory:f=>D.cloneElement(f,{classNames:u}),role:"presentation",children:v.jsx(A1,ie({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},s,{children:n}),i)})}const Ane=t=>Qe("MuiDayCalendar",t);et("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const Rne=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Ine=["ownerState"],Dne=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"]},Ane,e)},OP=(Cu+rm*2)*6,Pne=Se("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Nne=Se("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(t,e)=>e.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Lne=Se(Vi,{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})),jne=Se(Vi,{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})),$ne=Se(Vi,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(t,e)=>e.weekNumber})(({theme:t})=>ie({},t.typography.caption,{width:Cu,height:Cu,padding:0,margin:`0 ${rm}px`,color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),Fne=Se("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(t,e)=>e.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:OP}),Bne=Se(Mne,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(t,e)=>e.slideTransition})({minHeight:OP}),Vne=Se("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(t,e)=>e.monthContainer})({overflow:"hidden"}),zne=Se("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(t,e)=>e.weekContainer})({margin:`${rm}px 0`,display:"flex",justifyContent:"center"});function Hne(t){let{parentProps:e,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:s,isViewFocused:a}=t,l=dt(t,Rne);const{disabled:u,disableHighlightToday:f,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:m,slots:g,slotProps:b,timezone:y}=e,x=en(),C=zh(y),_=r!==null&&x.isSameDay(n,r),T=o.some(L=>x.isSameDay(L,n)),w=x.isSameDay(n,C),k=(g==null?void 0:g.day)??Tne,M=At({elementType:k,externalSlotProps:b==null?void 0:b.day,additionalProps:ie({disableHighlightToday:f,showDaysOutsideCurrentMonth:m,role:"gridcell",isAnimating:p,"data-timestamp":x.toJsDate(n).valueOf()},l),ownerState:ie({},e,{day:n,selected:T})}),A=dt(M,Ine),R=D.useMemo(()=>u||i(n),[u,i,n]),N=D.useMemo(()=>x.getMonth(n)!==s,[x,n,s]),O=D.useMemo(()=>{const L=x.startOfMonth(x.setMonth(n,s));return m?x.isSameDay(n,x.startOfWeek(L)):x.isSameDay(n,L)},[s,n,m,x]),I=D.useMemo(()=>{const L=x.endOfMonth(x.setMonth(n,s));return m?x.isSameDay(n,x.endOfWeek(L)):x.isSameDay(n,L)},[s,n,m,x]);return v.jsx(k,ie({},A,{day:n,disabled:R,autoFocus:a&&_,today:w,outsideCurrentMonth:N,isFirstVisibleCell:O,isLastVisibleCell:I,selected:T,tabIndex:_?0:-1,"aria-selected":T,"aria-current":w?"date":void 0}))}function Wne(t){const e=Qt({props:t,name:"MuiDayCalendar"}),n=en(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:s,focusedDay:a,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:f,readOnly:p,reduceAnimations:m,renderLoading:g=()=>v.jsx("span",{children:"..."}),slideDirection:b,TransitionProps:y,disablePast:x,disableFuture:C,minDate:_,maxDate:T,shouldDisableDate:w,shouldDisableMonth:k,shouldDisableYear:M,dayOfWeekFormatter:A=_e=>n.format(_e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:R,onFocusedViewChange:N,gridLabelId:O,displayWeekNumber:I,fixedWeekNumber:L,autoFocus:B,timezone:V}=e,j=zh(V),F=Dne(e),U=Fi(),K=wP({shouldDisableDate:w,shouldDisableMonth:k,shouldDisableYear:M,minDate:_,maxDate:T,disablePast:x,disableFuture:C,timezone:V}),Y=Bi(),[G,Z]=Di({name:"DayCalendar",state:"hasFocus",controlled:R,default:B??!1}),[me,he]=D.useState(()=>a||j),ge=qe(_e=>{p||u(_e)}),oe=_e=>{K(_e)||(r(_e),he(_e),N==null||N(!0),Z(!0))},ye=qe((_e,Te)=>{switch(_e.key){case"ArrowUp":oe(n.addDays(Te,-7)),_e.preventDefault();break;case"ArrowDown":oe(n.addDays(Te,7)),_e.preventDefault();break;case"ArrowLeft":{const Pe=n.addDays(Te,U?1:-1),Be=n.addMonths(Te,U?1:-1),W=Yc({utils:n,date:Pe,minDate:U?Pe:n.startOfMonth(Be),maxDate:U?n.endOfMonth(Be):Pe,isDateDisabled:K,timezone:V});oe(W||Pe),_e.preventDefault();break}case"ArrowRight":{const Pe=n.addDays(Te,U?-1:1),Be=n.addMonths(Te,U?-1:1),W=Yc({utils:n,date:Pe,minDate:U?n.startOfMonth(Be):Pe,maxDate:U?Pe:n.endOfMonth(Be),isDateDisabled:K,timezone:V});oe(W||Pe),_e.preventDefault();break}case"Home":oe(n.startOfWeek(Te)),_e.preventDefault();break;case"End":oe(n.endOfWeek(Te)),_e.preventDefault();break;case"PageUp":oe(n.addMonths(Te,1)),_e.preventDefault();break;case"PageDown":oe(n.addMonths(Te,-1)),_e.preventDefault();break}}),de=qe((_e,Te)=>oe(Te)),X=qe((_e,Te)=>{G&&n.isSameDay(me,Te)&&(N==null||N(!1))}),Q=n.getMonth(i),ae=n.getYear(i),ve=D.useMemo(()=>s.filter(_e=>!!_e).map(_e=>n.startOfDay(_e)),[n,s]),ne=`${ae}-${Q}`,ce=D.useMemo(()=>D.createRef(),[ne]),fe=D.useMemo(()=>{const _e=n.startOfMonth(i),Te=n.endOfMonth(i);return K(me)||n.isAfterDay(me,Te)||n.isBeforeDay(me,_e)?Yc({utils:n,date:me,minDate:_e,maxDate:Te,disablePast:x,disableFuture:C,isDateDisabled:K,timezone:V}):me},[i,C,x,me,K,n,V]),xe=D.useMemo(()=>{const _e=n.getWeekArray(i);let Te=n.addMonths(i,1);for(;L&&_e.length<L;){const Pe=n.getWeekArray(Te),Be=n.isSameDay(_e[_e.length-1][0],Pe[0][0]);Pe.slice(Be?1:0).forEach(W=>{_e.length<L&&_e.push(W)}),Te=n.addMonths(Te,1)}return _e},[i,L,n]);return v.jsxs(Pne,{role:"grid","aria-labelledby":O,className:F.root,children:[v.jsxs(Nne,{role:"row",className:F.header,children:[I&&v.jsx(jne,{variant:"caption",role:"columnheader","aria-label":Y.calendarWeekNumberHeaderLabel,className:F.weekNumberLabel,children:Y.calendarWeekNumberHeaderText}),mJ(n,j).map((_e,Te)=>v.jsx(Lne,{variant:"caption",role:"columnheader","aria-label":n.format(_e,"weekday"),className:F.weekDayLabel,children:A(_e)},Te.toString()))]}),l?v.jsx(Fne,{className:F.loadingContainer,children:g()}):v.jsx(Bne,ie({transKey:ne,onExited:f,reduceAnimations:m,slideDirection:b,className:ze(o,F.slideTransition)},y,{nodeRef:ce,children:v.jsx(Vne,{ref:ce,role:"rowgroup",className:F.monthContainer,children:xe.map((_e,Te)=>v.jsxs(zne,{role:"row",className:F.weekContainer,"aria-rowindex":Te+1,children:[I&&v.jsx($ne,{className:F.weekNumber,role:"rowheader","aria-label":Y.calendarWeekNumberAriaLabelText(n.getWeekNumber(_e[0])),children:Y.calendarWeekNumberText(n.getWeekNumber(_e[0]))}),_e.map((Pe,Be)=>v.jsx(Hne,{parentProps:e,day:Pe,selectedDays:ve,focusableDay:fe,onKeyDown:ye,onFocus:de,onBlur:X,onDaySelect:ge,isDateDisabled:K,currentMonthNumber:Q,isViewFocused:G,"aria-colindex":Be+1},Pe.toString()))]},`week-${_e[0]}`))})}))]})}function qne(t){return Qe("MuiPickersMonth",t)}const uf=et("MuiPickersMonth",["root","monthButton","disabled","selected"]),Une=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],Kne=t=>{const{disabled:e,selected:n,classes:r}=t;return Ze({root:["root"],monthButton:["monthButton",e&&"disabled",n&&"selected"]},qne,r)},Gne=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%"}}]}),Yne=Se("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(t,e)=>[e.monthButton,{[`&.${uf.disabled}`]:e.disabled},{[`&.${uf.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"},[`&.${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}}})),Jne=D.memo(function(e){const n=Qt({props:e,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:l,tabIndex:u,onClick:f,onKeyDown:p,onFocus:m,onBlur:g,"aria-current":b,"aria-label":y,slots:x,slotProps:C}=n,_=dt(n,Une),T=D.useRef(null),w=Kne(n);zn(()=>{var A;r&&((A=T.current)==null||A.focus())},[r]);const k=(x==null?void 0:x.monthButton)??Yne,M=At({elementType:k,externalSlotProps:C==null?void 0:C.monthButton,additionalProps:{children:i,disabled:s,tabIndex:u,ref:T,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=>m(A,l),onBlur:A=>g(A,l)},ownerState:n,className:w.monthButton});return v.jsx(Gne,ie({className:ze(w.root,o),ownerState:n},_,{children:v.jsx(k,ie({},M))}))});function Xne(t){return Qe("MuiMonthCalendar",t)}et("MuiMonthCalendar",["root"]);const Zne=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],Qne=t=>{const{classes:e}=t;return Ze({root:["root"]},Xne,e)};function ere(t,e){const n=en(),r=Ju(),o=Qt({props:t,name:e});return ie({disableFuture:!1,disablePast:!1},o,{minDate:fo(n,o.minDate,r.minDate),maxDate:fo(n,o.maxDate,r.maxDate)})}const tre=Se("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:om,boxSizing:"border-box"}),MP=D.forwardRef(function(e,n){const r=ere(e,"MuiMonthCalendar"),{className:o,value:i,defaultValue:s,referenceDate:a,disabled:l,disableFuture:u,disablePast:f,maxDate:p,minDate:m,onChange:g,shouldDisableMonth:b,readOnly:y,autoFocus:x=!1,onMonthFocus:C,hasFocus:_,onFocusedViewChange:T,monthsPerRow:w=3,timezone:k,gridLabelId:M,slots:A,slotProps:R}=r,N=dt(r,Zne),{value:O,handleValueChange:I,timezone:L}=H1({name:"MonthCalendar",timezone:k,value:i,defaultValue:s,referenceDate:a,onChange:g,valueManager:Xo}),B=zh(L),V=Fi(),j=en(),F=D.useMemo(()=>Xo.getInitialReferenceValue({value:O,utils:j,props:r,timezone:L,referenceDate:a,granularity:Wo.month}),[]),U=r,K=Qne(U),Y=D.useMemo(()=>j.getMonth(B),[j,B]),G=D.useMemo(()=>O!=null?j.getMonth(O):null,[O,j]),[Z,me]=D.useState(()=>G||j.getMonth(F)),[he,ge]=Di({name:"MonthCalendar",state:"hasFocus",controlled:_,default:x??!1}),oe=qe(ne=>{ge(ne),T&&T(ne)}),ye=D.useCallback(ne=>{const ce=j.startOfMonth(f&&j.isAfter(B,m)?B:m),fe=j.startOfMonth(u&&j.isBefore(B,p)?B:p),xe=j.startOfMonth(ne);return j.isBefore(xe,ce)||j.isAfter(xe,fe)?!0:b?b(xe):!1},[u,f,p,m,B,b,j]),de=qe((ne,ce)=>{if(y)return;const fe=j.setMonth(O??F,ce);I(fe)}),X=qe(ne=>{ye(j.setMonth(O??F,ne))||(me(ne),oe(!0),C&&C(ne))});D.useEffect(()=>{me(ne=>G!==null&&ne!==G?G:ne)},[G]);const Q=qe((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+(V?1:-1))%12),ne.preventDefault();break;case"ArrowRight":X((12+ce+(V?-1:1))%12),ne.preventDefault();break}}),ae=qe((ne,ce)=>{X(ce)}),ve=qe((ne,ce)=>{Z===ce&&oe(!1)});return v.jsx(tre,ie({ref:n,className:ze(K.root,o),ownerState:U,role:"radiogroup","aria-labelledby":M},N,{children:j1(j,O??F).map(ne=>{const ce=j.getMonth(ne),fe=j.format(ne,"monthShort"),xe=j.format(ne,"month"),_e=ce===G,Te=l||ye(ne);return v.jsx(Jne,{selected:_e,value:ce,onClick:de,onKeyDown:Q,autoFocus:he&&ce===Z,disabled:Te,tabIndex:ce===Z&&!Te?0:-1,onFocus:ae,onBlur:ve,"aria-current":Y===ce?"date":void 0,"aria-label":xe,monthsPerRow:w,slots:A,slotProps:R,children:fe},fe)})}))});process.env.NODE_ENV!=="production"&&(MP.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 nre(t){return Qe("MuiPickersYear",t)}const df=et("MuiPickersYear",["root","yearButton","selected","disabled"]),rre=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],ore=t=>{const{disabled:e,selected:n,classes:r}=t;return Ze({root:["root"],yearButton:["yearButton",e&&"disabled",n&&"selected"]},nre,r)},ire=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%"}}]}),sre=Se("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(t,e)=>[e.yearButton,{[`&.${df.disabled}`]:e.disabled},{[`&.${df.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"},[`&.${df.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${df.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),are=D.memo(function(e){const n=Qt({props:e,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:l,tabIndex:u,onClick:f,onKeyDown:p,onFocus:m,onBlur:g,"aria-current":b,slots:y,slotProps:x}=n,C=dt(n,rre),_=D.useRef(null),T=ore(n);zn(()=>{var M;r&&((M=_.current)==null||M.focus())},[r]);const w=(y==null?void 0:y.yearButton)??sre,k=At({elementType:w,externalSlotProps:x==null?void 0:x.yearButton,additionalProps:{children:i,disabled:s,tabIndex:u,ref:_,type:"button",role:"radio","aria-current":b,"aria-checked":a,onClick:M=>f(M,l),onKeyDown:M=>p(M,l),onFocus:M=>m(M,l),onBlur:M=>g(M,l)},ownerState:n,className:T.yearButton});return v.jsx(ire,ie({className:ze(T.root,o),ownerState:n},C,{children:v.jsx(w,ie({},k))}))});function lre(t){return Qe("MuiYearCalendar",t)}et("MuiYearCalendar",["root"]);const cre=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],ure=t=>{const{classes:e}=t;return Ze({root:["root"]},lre,e)};function dre(t,e){const n=en(),r=Ju(),o=Qt({props:t,name:e});return ie({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:fo(n,o.minDate,r.minDate),maxDate:fo(n,o.maxDate,r.maxDate)})}const fre=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:om,maxHeight:tne,boxSizing:"border-box",position:"relative"}),AP=D.forwardRef(function(e,n){const r=dre(e,"MuiYearCalendar"),{autoFocus:o,className:i,value:s,defaultValue:a,referenceDate:l,disabled:u,disableFuture:f,disablePast:p,maxDate:m,minDate:g,onChange:b,readOnly:y,shouldDisableYear:x,onYearFocus:C,hasFocus:_,onFocusedViewChange:T,yearsOrder:w="asc",yearsPerRow:k,timezone:M,gridLabelId:A,slots:R,slotProps:N}=r,O=dt(r,cre),{value:I,handleValueChange:L,timezone:B}=H1({name:"YearCalendar",timezone:M,value:s,defaultValue:a,referenceDate:l,onChange:b,valueManager:Xo}),V=zh(B),j=Fi(),F=en(),U=D.useMemo(()=>Xo.getInitialReferenceValue({value:I,utils:F,props:r,timezone:B,referenceDate:l,granularity:Wo.year}),[]),K=r,Y=ure(K),G=D.useMemo(()=>F.getYear(V),[F,V]),Z=D.useMemo(()=>I!=null?F.getYear(I):null,[I,F]),[me,he]=D.useState(()=>Z||F.getYear(U)),[ge,oe]=Di({name:"YearCalendar",state:"hasFocus",controlled:_,default:o??!1}),ye=qe(Pe=>{oe(Pe),T&&T(Pe)}),de=D.useCallback(Pe=>{if(p&&F.isBeforeYear(Pe,V)||f&&F.isAfterYear(Pe,V)||g&&F.isBeforeYear(Pe,g)||m&&F.isAfterYear(Pe,m))return!0;if(!x)return!1;const Be=F.startOfYear(Pe);return x(Be)},[f,p,m,g,V,x,F]),X=qe((Pe,Be)=>{if(y)return;const W=F.setYear(I??U,Be);L(W)}),Q=qe(Pe=>{de(F.setYear(I??U,Pe))||(he(Pe),ye(!0),C==null||C(Pe))});D.useEffect(()=>{he(Pe=>Z!==null&&Pe!==Z?Z:Pe)},[Z]);const ae=w!=="desc"?k*1:k*-1,ve=j&&w==="asc"||!j&&w==="desc"?-1:1,ne=qe((Pe,Be)=>{switch(Pe.key){case"ArrowUp":Q(Be-ae),Pe.preventDefault();break;case"ArrowDown":Q(Be+ae),Pe.preventDefault();break;case"ArrowLeft":Q(Be-ve),Pe.preventDefault();break;case"ArrowRight":Q(Be+ve),Pe.preventDefault();break}}),ce=qe((Pe,Be)=>{Q(Be)}),fe=qe((Pe,Be)=>{me===Be&&ye(!1)}),xe=D.useRef(null),_e=Pt(n,xe);D.useEffect(()=>{if(o||xe.current===null)return;const Pe=xe.current.querySelector('[tabindex="0"]');if(!Pe)return;const Be=Pe.offsetHeight,W=Pe.offsetTop,te=xe.current.clientHeight,re=xe.current.scrollTop,Oe=W+Be;Be>te||W<re||(xe.current.scrollTop=Oe-te/2-Be/2)},[o]);const Te=F.getYearRange([g,m]);return w==="desc"&&Te.reverse(),v.jsx(fre,ie({ref:_e,className:ze(Y.root,i),ownerState:K,role:"radiogroup","aria-labelledby":A},O,{children:Te.map(Pe=>{const Be=F.getYear(Pe),W=Be===Z,te=u||de(Pe);return v.jsx(are,{selected:W,value:Be,onClick:X,onKeyDown:ne,autoFocus:ge&&Be===me,disabled:te,tabIndex:Be===me&&!te?0:-1,onFocus:ce,onBlur:fe,"aria-current":G===Be?"date":void 0,yearsPerRow:k,slots:R,slotProps:N,children:F.format(Pe,"year")},F.format(Pe,"year"))})}))});process.env.NODE_ENV!=="production"&&(AP.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 pre=t=>Qe("MuiPickersCalendarHeader",t),hre=et("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function mre(t){return Qe("MuiPickersArrowSwitcher",t)}et("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const gre=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],yre=["ownerState"],bre=["ownerState"],vre=Se("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex"}),xre=Se("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})(({theme:t})=>({width:t.spacing(3)})),gk=Se(Yl,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(t,e)=>e.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),Sre=t=>{const{classes:e}=t;return Ze({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},mre,e)},Cre=D.forwardRef(function(e,n){const r=Fi(),o=Qt({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:s,slots:a,slotProps:l,isNextDisabled:u,isNextHidden:f,onGoToNext:p,nextLabel:m,isPreviousDisabled:g,isPreviousHidden:b,onGoToPrevious:y,previousLabel:x,labelId:C}=o,_=dt(o,gre),T=o,w=Sre(T),k={isDisabled:u,isHidden:f,goTo:p,label:m},M={isDisabled:g,isHidden:b,goTo:y,label:x},A=(a==null?void 0:a.previousIconButton)??gk,R=At({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({},T,{hidden:M.isHidden}),className:ze(w.button,w.previousIconButton)}),N=(a==null?void 0:a.nextIconButton)??gk,O=At({elementType:N,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"start",onClick:k.goTo},ownerState:ie({},T,{hidden:k.isHidden}),className:ze(w.button,w.nextIconButton)}),I=(a==null?void 0:a.leftArrowIcon)??$X,L=At({elementType:I,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:T,className:w.leftArrowIcon}),B=dt(L,yre),V=(a==null?void 0:a.rightArrowIcon)??FX,j=At({elementType:V,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:T,className:w.rightArrowIcon}),F=dt(j,bre);return v.jsxs(vre,ie({ref:n,className:ze(w.root,s),ownerState:T},_,{children:[v.jsx(A,ie({},R,{children:r?v.jsx(V,ie({},F)):v.jsx(I,ie({},B))})),i?v.jsx(Vi,{variant:"subtitle1",component:"span",id:C,children:i}):v.jsx(xre,{className:w.spacer,ownerState:T}),v.jsx(N,ie({},O,{children:r?v.jsx(I,ie({},B)):v.jsx(V,ie({},F))}))]}))});function wre(t,{disableFuture:e,maxDate:n,timezone:r}){const o=en();return D.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 Tre(t,{disablePast:e,minDate:n,timezone:r}){const o=en();return D.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 _re=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],Ere=["ownerState"],kre=t=>{const{classes:e}=t;return Ze({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},pre,e)},Ore=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}),Mre=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})),Are=Se("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(t,e)=>e.label})({marginRight:6}),Rre=Se(Yl,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(t,e)=>e.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${hre.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),Ire=Se(jX,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(t,e)=>e.switchViewIcon})(({theme:t})=>({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"})),RP=D.forwardRef(function(e,n){const r=Bi(),o=en(),i=Qt({props:e,name:"MuiPickersCalendarHeader"}),{slots:s,slotProps:a,currentMonth:l,disabled:u,disableFuture:f,disablePast:p,maxDate:m,minDate:g,onMonthChange:b,onViewChange:y,view:x,reduceAnimations:C,views:_,labelId:T,className:w,timezone:k,format:M=`${o.formats.month} ${o.formats.year}`}=i,A=dt(i,_re),R=i,N=kre(i),O=(s==null?void 0:s.switchViewButton)??Rre,I=At({elementType:O,externalSlotProps:a==null?void 0:a.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(x)},ownerState:R,className:N.switchViewButton}),L=(s==null?void 0:s.switchViewIcon)??Ire,B=At({elementType:L,externalSlotProps:a==null?void 0:a.switchViewIcon,ownerState:R,className:N.switchViewIcon}),V=dt(B,Ere),j=()=>b(o.addMonths(l,1),"left"),F=()=>b(o.addMonths(l,-1),"right"),U=wre(l,{disableFuture:f,maxDate:m,timezone:k}),K=Tre(l,{disablePast:p,minDate:g,timezone:k}),Y=()=>{if(!(_.length===1||!y||u))if(_.length===2)y(_.find(Z=>Z!==x)||_[0]);else{const Z=_.indexOf(x)!==0?0:1;y(_[Z])}};if(_.length===1&&_[0]==="year")return null;const G=o.formatByString(l,M);return v.jsxs(Ore,ie({},A,{ownerState:R,className:ze(N.root,w),ref:n,children:[v.jsxs(Mre,{role:"presentation",onClick:Y,ownerState:R,"aria-live":"polite",className:N.labelContainer,children:[v.jsx(TP,{reduceAnimations:C,transKey:G,children:v.jsx(Are,{id:T,ownerState:R,className:N.label,children:G})}),_.length>1&&!u&&v.jsx(O,ie({},I,{children:v.jsx(L,ie({},V))}))]}),v.jsx(ws,{in:x==="day",appear:!C,enter:!C,children:v.jsx(Cre,{slots:s,slotProps:a,onGoToPrevious:F,isPreviousDisabled:K,previousLabel:r.previousMonth,onGoToNext:j,isNextDisabled:U,nextLabel:r.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(RP.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 Dre=Se("div")({overflow:"hidden",width:om,maxHeight:iS,display:"flex",flexDirection:"column",margin:"0 auto"}),Pre=t=>Qe("MuiDateCalendar",t);et("MuiDateCalendar",["root","viewTransitionContainer"]);const Nre=["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"],Lre=t=>{const{classes:e}=t;return Ze({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Pre,e)};function jre(t,e){const n=en(),r=Ju(),o=dP(),i=Qt({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:fo(n,i.minDate,r.minDate),maxDate:fo(n,i.maxDate,r.maxDate)})}const $re=Se(Dre,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"column",height:iS}),Fre=Se(TP,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(t,e)=>e.viewTransitionContainer})({}),IP=D.forwardRef(function(e,n){const r=en(),o=ni(),i=jre(e,"MuiDateCalendar"),{autoFocus:s,onViewChange:a,value:l,defaultValue:u,referenceDate:f,disableFuture:p,disablePast:m,onChange:g,onYearChange:b,onMonthChange:y,reduceAnimations:x,shouldDisableDate:C,shouldDisableMonth:_,shouldDisableYear:T,view:w,views:k,openTo:M,className:A,disabled:R,readOnly:N,minDate:O,maxDate:I,disableHighlightToday:L,focusedView:B,onFocusedViewChange:V,showDaysOutsideCurrentMonth:j,fixedWeekNumber:F,dayOfWeekFormatter:U,slots:K,slotProps:Y,loading:G,renderLoading:Z,displayWeekNumber:me,yearsOrder:he,yearsPerRow:ge,monthsPerRow:oe,timezone:ye}=i,de=dt(i,Nre),{value:X,handleValueChange:Q,timezone:ae}=H1({name:"DateCalendar",timezone:ye,value:l,defaultValue:u,referenceDate:f,onChange:g,valueManager:Xo}),{view:ve,setView:ne,focusedView:ce,setFocusedView:fe,goToNextView:xe,setValueAndGoToNextView:_e}=fP({view:w,views:k,openTo:M,onChange:Q,onViewChange:a,autoFocus:s,focusedView:B,onFocusedViewChange:V}),{referenceDate:Te,calendarState:Pe,changeFocusedDay:Be,changeMonth:W,handleChangeMonth:te,isDateDisabled:re,onMonthSwitchingAnimationEnd:Oe}=mne({value:X,referenceDate:f,reduceAnimations:x,onMonthChange:y,minDate:O,maxDate:I,shouldDisableDate:C,disablePast:m,disableFuture:p,timezone:ae}),Re=R&&X||O,Ie=R&&X||I,Ve=`${o}-grid-label`,rt=ce!==null,tt=(K==null?void 0:K.calendarHeader)??RP,kt=At({elementType:tt,externalSlotProps:Y==null?void 0:Y.calendarHeader,additionalProps:{views:k,view:ve,currentMonth:Pe.currentMonth,onViewChange:ne,onMonthChange:(lt,jt)=>te({newMonth:lt,direction:jt}),minDate:Re,maxDate:Ie,disabled:R,disablePast:m,disableFuture:p,reduceAnimations:x,timezone:ae,labelId:Ve},ownerState:i}),vn=qe(lt=>{const jt=r.startOfMonth(lt),ir=r.endOfMonth(lt),br=re(lt)?Yc({utils:r,date:lt,minDate:r.isBefore(O,jt)?jt:O,maxDate:r.isAfter(I,ir)?ir:I,disablePast:m,disableFuture:p,isDateDisabled:re,timezone:ae}):lt;br?(_e(br,"finish"),y==null||y(jt)):(xe(),W(jt)),Be(br,!0)}),ct=qe(lt=>{const jt=r.startOfYear(lt),ir=r.endOfYear(lt),br=re(lt)?Yc({utils:r,date:lt,minDate:r.isBefore(O,jt)?jt:O,maxDate:r.isAfter(I,ir)?ir:I,disablePast:m,disableFuture:p,isDateDisabled:re,timezone:ae}):lt;br?(_e(br,"finish"),b==null||b(br)):(xe(),W(jt)),Be(br,!0)}),An=qe(lt=>Q(lt&&hp(r,lt,X??Te),"finish",ve));D.useEffect(()=>{X!=null&&r.isValid(X)&&W(X)},[X]);const Nt=i,pe=Lre(Nt),He={disablePast:m,disableFuture:p,maxDate:I,minDate:O},Me={disableHighlightToday:L,readOnly:N,disabled:R,timezone:ae,gridLabelId:Ve,slots:K,slotProps:Y},We=D.useRef(ve);D.useEffect(()=>{We.current!==ve&&(ce===We.current&&fe(ve,!0),We.current=ve)},[ce,fe,ve]);const Je=D.useMemo(()=>[X],[X]);return v.jsxs($re,ie({ref:n,className:ze(pe.root,A),ownerState:Nt},de,{children:[v.jsx(tt,ie({},kt,{slots:K,slotProps:Y})),v.jsx(Fre,{reduceAnimations:x,className:pe.viewTransitionContainer,transKey:ve,ownerState:Nt,children:v.jsxs("div",{children:[ve==="year"&&v.jsx(AP,ie({},He,Me,{value:X,onChange:ct,shouldDisableYear:T,hasFocus:rt,onFocusedViewChange:lt=>fe("year",lt),yearsOrder:he,yearsPerRow:ge,referenceDate:Te})),ve==="month"&&v.jsx(MP,ie({},He,Me,{hasFocus:rt,className:A,value:X,onChange:vn,shouldDisableMonth:_,onFocusedViewChange:lt=>fe("month",lt),monthsPerRow:oe,referenceDate:Te})),ve==="day"&&v.jsx(Wne,ie({},Pe,He,Me,{onMonthSwitchingAnimationEnd:Oe,onFocusedDayChange:Be,reduceAnimations:x,selectedDays:Je,onSelectedDaysChange:An,shouldDisableDate:C,shouldDisableMonth:_,shouldDisableYear:T,hasFocus:rt,onFocusedViewChange:lt=>fe("day",lt),showDaysOutsideCurrentMonth:j,fixedWeekNumber:F,dayOfWeekFormatter:U,displayWeekNumber:me,loading:G,renderLoading:Z}))]})})]}))});process.env.NODE_ENV!=="production"&&(IP.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 Ml=({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:m,minDate:g,maxDate:b,shouldDisableDate:y,shouldDisableMonth:x,shouldDisableYear:C,reduceAnimations:_,onMonthChange:T,monthsPerRow:w,onYearChange:k,yearsOrder:M,yearsPerRow:A,slots:R,slotProps:N,loading:O,renderLoading:I,disableHighlightToday:L,readOnly:B,disabled:V,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:F,sx:U,autoFocus:K,fixedWeekNumber:Y,displayWeekNumber:G,timezone:Z})=>v.jsx(IP,{view:t,onViewChange:e,views:n.filter(LE),focusedView:r&&LE(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:l,className:u,classes:f,disableFuture:p,disablePast:m,minDate:g,maxDate:b,shouldDisableDate:y,shouldDisableMonth:x,shouldDisableYear:C,reduceAnimations:_,onMonthChange:T,monthsPerRow:w,onYearChange:k,yearsOrder:M,yearsPerRow:A,slots:R,slotProps:N,loading:O,renderLoading:I,disableHighlightToday:L,readOnly:B,disabled:V,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:F,sx:U,autoFocus:K,fixedWeekNumber:Y,displayWeekNumber:G,timezone:Z}),DP=D.forwardRef(function(e,n){var u,f;const r=Bi(),o=en(),i=XD(e,"MuiDesktopDatePicker"),s=ie({day:Ml,month:Ml,year:Ml},i.viewRenderers),a=ie({},i,{viewRenderers:s,format:$1(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:ie({openPickerIcon:BX,field:em},i.slots),slotProps:ie({},i.slotProps,{field:p=>{var m;return ie({},yh((m=i.slotProps)==null?void 0:m.field,p),OD(i),{ref:n})},toolbar:ie({hidden:!0},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:l}=pne({props:a,valueManager:Xo,valueType:"date",getOpenDialogAriaText:MD({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=a.localeText)==null?void 0:f.openDatePickerDialogue}),validator:Yu});return l()});DP.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:On,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 Bre(t){return Qe("MuiDialogContent",t)}et("MuiDialogContent",["root","dividers"]);const Vre=et("MuiDialogTitle",["root"]),zre=t=>{const{classes:e,dividers:n}=t;return Ze({root:["root",n&&"dividers"]},Bre,e)},Hre=Se("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(Bt(({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:{[`.${Vre.root} + &`]:{paddingTop:0}}}]}))),PP=D.forwardRef(function(e,n){const r=Et({props:e,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...s}=r,a={...r,dividers:i},l=zre(a);return v.jsx(Hre,{className:ze(l.root,o),ownerState:a,ref:n,...s})});process.env.NODE_ENV!=="production"&&(PP.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 Wre(t){return Qe("MuiDialog",t)}const Qc=et("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),NP=D.createContext({});process.env.NODE_ENV!=="production"&&(NP.displayName="DialogContext");const qre=Se(I1,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),Ure=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=t,s={root:["root"],container:["container",`scroll${Le(n)}`],paper:["paper",`paperScroll${Le(n)}`,`paperWidth${Le(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Ze(s,Wre,e)},Kre=Se(D1,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),Gre=Se("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${Le(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"}}}]}),Yre=Se(Ea,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${Le(n.scroll)}`],e[`paperWidth${Le(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(Bt(({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)`,[`&.${Qc.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}`,[`&.${Qc.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,[`&.${Qc.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),LP=D.forwardRef(function(e,n){const r=Et({props:e,name:"MuiDialog"}),o=ji(),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:m,disableEscapeKeyDown:g=!1,fullScreen:b=!1,fullWidth:y=!1,maxWidth:x="sm",onBackdropClick:C,onClick:_,onClose:T,open:w,PaperComponent:k=Ea,PaperProps:M={},scroll:A="paper",slots:R={},slotProps:N={},TransitionComponent:O=ws,transitionDuration:I=i,TransitionProps:L,...B}=r,V={...r,disableEscapeKeyDown:g,fullScreen:b,fullWidth:y,maxWidth:x,scroll:A},j=Ure(V),F=D.useRef(),U=fe=>{F.current=fe.target===fe.currentTarget},K=fe=>{_&&_(fe),F.current&&(F.current=null,C&&C(fe),T&&T(fe,"backdropClick"))},Y=ni(a),G=D.useMemo(()=>({titleId:Y}),[Y]),Z={transition:O,...R},me={transition:L,paper:M,backdrop:f,...N},he={slots:Z,slotProps:me},[ge,oe]=Wt("root",{elementType:Kre,shouldForwardComponentProp:!0,externalForwardedProps:he,ownerState:V,className:ze(j.root,m),ref:n}),[ye,de]=Wt("backdrop",{elementType:qre,shouldForwardComponentProp:!0,externalForwardedProps:he,ownerState:V}),[X,Q]=Wt("paper",{elementType:Yre,shouldForwardComponentProp:!0,externalForwardedProps:he,ownerState:V,className:ze(j.paper,M.className)}),[ae,ve]=Wt("container",{elementType:Gre,externalForwardedProps:he,ownerState:V,className:ze(j.container)}),[ne,ce]=Wt("transition",{elementType:ws,externalForwardedProps:he,ownerState:V,additionalProps:{appear:!0,in:w,timeout:I,role:"presentation"}});return v.jsx(ge,{closeAfterTransition:!0,slots:{backdrop:ye},slotProps:{backdrop:{transitionDuration:I,as:u,...de}},disableEscapeKeyDown:g,onClose:T,open:w,onClick:K,...oe,...B,children:v.jsx(ne,{...ce,children:v.jsx(ae,{onMouseDown:U,...ve,children:v.jsx(X,{as:k,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":Y,"aria-modal":l,...Q,children:v.jsx(NP.Provider,{value:G,children:p})})})})})});process.env.NODE_ENV!=="production"&&(LP.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 Jre=Se(LP)({[`& .${Qc.container}`]:{outline:0},[`& .${Qc.paper}`]:{outline:0,minWidth:om}}),Xre=Se(PP)({"&:first-of-type":{padding:0}});function Zre(t){const{children:e,onDismiss:n,open:r,slots:o,slotProps:i}=t,s=(o==null?void 0:o.dialog)??Jre,a=(o==null?void 0:o.mobileTransition)??ws;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(Xre,{children:e})}))}const Qre=["props","getOpenDialogAriaText"],eoe=t=>{var Z;let{props:e,getOpenDialogAriaText:n}=t,r=dt(t,Qre);const{slots:o,slotProps:i,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:m,timezone:g,name:b,label:y,inputRef:x,readOnly:C,disabled:_,localeText:T}=e,w=D.useRef(null),k=ni(),M=((Z=i==null?void 0:i.toolbar)==null?void 0:Z.hidden)??!1,{open:A,actions:R,layoutProps:N,renderCurrentView:O,fieldProps:I,contextValue:L}=pP(ie({},r,{props:e,fieldRef:w,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),B=o.field,V=At({elementType:B,externalSlotProps:i==null?void 0:i.field,additionalProps:ie({},I,M&&{id:k},!(_||C)&&{onClick:R.onOpen,onKeyDown:QJ(R.onOpen)},{readOnly:C??!0,disabled:_,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:m,timezone:g,label:y,name:b},x?{inputRef:x}:{}),ownerState:e});V.inputProps=ie({},V.inputProps,{"aria-label":n(I.value)});const j=ie({textField:o.textField},V.slots),F=o.layout??sS;let U=k;M&&(y?U=`${k}-label`:U=void 0);const K=ie({},i,{toolbar:ie({},i==null?void 0:i.toolbar,{titleId:k}),mobilePaper:ie({"aria-labelledby":U},i==null?void 0:i.mobilePaper)}),Y=Pt(w,V.unstableFieldRef);return{renderPicker:()=>v.jsxs(PD,{contextValue:L,localeText:T,children:[v.jsx(B,ie({},V,{slots:j,slotProps:K,unstableFieldRef:Y})),v.jsx(Zre,ie({},R,{open:A,slots:o,slotProps:K,children:v.jsx(F,ie({},N,K==null?void 0:K.layout,{slots:o,slotProps:K,children:O()}))}))]})}},jP=D.forwardRef(function(e,n){var u,f;const r=Bi(),o=en(),i=XD(e,"MuiMobileDatePicker"),s=ie({day:Ml,month:Ml,year:Ml},i.viewRenderers),a=ie({},i,{viewRenderers:s,format:$1(o,i,!1),slots:ie({field:em},i.slots),slotProps:ie({},i.slotProps,{field:p=>{var m;return ie({},yh((m=i.slotProps)==null?void 0:m.field,p),OD(i),{ref:n})},toolbar:ie({hidden:!1},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:l}=eoe({props:a,valueManager:Xo,valueType:"date",getOpenDialogAriaText:MD({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=a.localeText)==null?void 0:f.openDatePickerDialogue}),validator:Yu});return l()});jP.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:On,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 toe=["desktopModeMediaQuery"],$P=D.forwardRef(function(e,n){const r=Qt({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=eX}=r,i=dt(r,toe);return YD(o,{defaultMatches:!0})?v.jsx(DP,ie({ref:n},i)):v.jsx(jP,ie({ref:n},i))});process.env.NODE_ENV!=="production"&&($P.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:On,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 noe={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"},Sp=t=>{const{name:e,label:n=Yn(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:m,getValues:g,setError:b,clearErrors:y,formState:{errors:x}}=ln(),[C,_]=D.useState(null),T={...noe,...s},w=["staticLabel","staticLabelProps","label","errorMessages","isDatePicker","dateFieldProps","datePickerProps","useIso","onChange"];D.useEffect(()=>{C?b(e,{type:"manual",message:T[C]??C}):y(e)},[C]);const k=A=>{if(A!=null)return A==null||A==""?null:En.utc(A)},M={label:u?void 0:n,onChange:(A,R)=>{let N="";try{const O=A==null?void 0:A.utc();N=(O==null?void 0:O.toISOString())??""}catch{}m(e,N,{shouldValidate:!0}),t.onChange&&t.onChange(N,R)},format:i,onError:_,value:k(g(e)),...fr({...t},w)};return v.jsx(nr,{name:e,control:p,render:({field:A})=>{var R;return v.jsxs($.FormControl,{fullWidth:!0,margin:l,children:[(u||o)&&v.jsx($.Typography,{...f,children:n}),o?v.jsx($.Typography,{children:(R=k(g(e)))==null?void 0:R.format(i)}):v.jsxs($.Box,{children:[v.jsx(T1,{dateAdapter:pG,children:v.jsx($.Box,{children:a?v.jsx($P,{...A,...M,slotProps:{textField:{fullWidth:!0,error:!!x[e],required:!!r}}}):v.jsx(em,{id:`${e}-df`,...A,...M,fullWidth:!0,slotProps:{textField:{error:!!x[e]}}})})}),v.jsx(pr,{name:e,id:`${e}-err`})]})]})}})},roe=t=>{const{nameTo:e,nameFrom:n,labelTo:r=Yn(e),labelFrom:o=Yn(n),fromFieldProps:i,toFieldProps:s,staticLabels:a=!1}=t,l=["nameTo","nameFrom","toFieldProps","fromFieldProps","labelTo","labelFrom"],u=$.useMediaQuery($.useTheme().breakpoints.down("sm")),{trigger:f}=ln(),p=np({name:n}),m=np({name:e});return D.useEffect(()=>{p!==void 0&&f(e),m!==void 0&&f(n)},[p,m]),v.jsxs("div",{style:{display:"flex",flexDirection:u?"column":"row",justifyContent:"space-between",gap:"10px"},children:[v.jsx(Sp,{name:n,staticLabel:a,label:o,...fr({...t,...i},l)}),v.jsx(Sp,{name:e,staticLabel:a,label:r,...fr({...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 FP(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=FP(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function BP(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=BP(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class Ae{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 Ae(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 Ae(r,o)}cutByIndex(e,n){return e==n?Ae.empty:e==0&&n==this.content.length?this:new Ae(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 Ae(o,i)}addToStart(e){return new Ae([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Ae(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 FP(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return BP(this,e,n,r)}findIndex(e){if(e==0)return ff(0,e);if(e==this.size)return ff(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?ff(n+1,i):ff(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 Ae.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ae(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Ae.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 Ae(n||e,r)}static from(e){if(!e)return Ae.empty;if(e instanceof Ae)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Ae([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ae.empty=new Ae([],0);const Ry={index:0,offset:0};function ff(t,e){return Ry.index=t,Ry.offset=e,Ry}function Cp(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(!Cp(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Cp(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let qt=class yx{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&&Cp(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 yx.none;if(e instanceof yx)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};qt.none=[];class wp extends Error{}class $e{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=zP(this.content,e+this.openStart,n);return r&&new $e(r,this.openStart,this.openEnd)}removeBetween(e,n){return new $e(VP(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 $e.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 $e(Ae.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 $e(e,r,o)}}$e.empty=new $e(Ae.empty,0,0);function VP(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(VP(i.content,e-o-1,n-o-1)))}function zP(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=zP(s.content,e-i-1,n);return a&&t.replaceChild(o,s.copy(a))}function ooe(t,e,n){if(n.openStart>t.depth)throw new wp("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new wp("Inconsistent open depths");return HP(t,e,n,0)}function HP(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=HP(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 da(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=ioe(n,t);return da(i,qP(t,s,a,e,r))}else return da(i,Tp(t,e,r))}function WP(t,e){if(!e.type.compatibleContent(t.type))throw new wp("Cannot join "+e.type.name+" onto "+t.type.name)}function bx(t,e,n){let r=t.node(n);return WP(r,e.node(n)),r}function ua(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 eu(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&&(ua(t.nodeAfter,r),i++));for(let a=i;a<s;a++)ua(o.child(a),r);e&&e.depth==n&&e.textOffset&&ua(e.nodeBefore,r)}function da(t,e){return t.type.checkContent(e),t.copy(e)}function qP(t,e,n,r,o){let i=t.depth>o&&bx(t,e,o+1),s=r.depth>o&&bx(n,r,o+1),a=[];return eu(null,t,o,a),i&&s&&e.index(o)==n.index(o)?(WP(i,s),ua(da(i,qP(t,e,n,r,o+1)),a)):(i&&ua(da(i,Tp(t,e,o+1)),a),eu(e,n,o,a),s&&ua(da(s,Tp(n,r,o+1)),a)),eu(r,null,o,a),new Ae(a)}function Tp(t,e,n){let r=[];if(eu(null,t,n,r),t.depth>n){let o=bx(t,e,n+1);ua(da(o,Tp(t,e,n+1)),r)}return eu(e,null,n,r),new Ae(r)}function ioe(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(Ae.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class wu{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 _p(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 wu(n,r,i)}static resolveCached(e,n){let r=yk.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 yk.set(e,r=new soe);let o=r.elts[r.i]=wu.resolve(e,n);return r.i=(r.i+1)%aoe,o}}class soe{constructor(){this.elts=[],this.i=0}}const aoe=12,yk=new WeakMap;class _p{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 loe=Object.create(null);let ki=class vx{constructor(e,n,r,o=qt.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||Ae.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&&Cp(this.attrs,n||e.defaultAttrs||loe)&&qt.sameSet(this.marks,r||qt.none)}copy(e=null){return e==this.content?this:new vx(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new vx(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 $e.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 $e(u,o.depth-s,i.depth-s)}replace(e,n,r){return ooe(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 wu.resolveCached(this,e)}resolveNoCache(e){return wu.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()+")"),UP(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=Ae.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=Ae.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};ki.prototype.text=void 0;class Ep extends ki{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):UP(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 Ep(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ep(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 UP(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class va{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new coe(e,n);if(r.next==null)return va.empty;let o=KP(r);r.next&&r.err("Unexpected trailing text");let i=goe(moe(o));return yoe(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 Ae.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 m=i(p,a.concat(f));if(m)return m}}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(`
|
|
242
|
+
`)}}va.empty=new va(!0);class coe{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 KP(t){let e=[];do e.push(uoe(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function uoe(t){let e=[];do e.push(doe(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function doe(t){let e=hoe(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=foe(t,e);else break;return e}function bk(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function foe(t,e){let n=bk(t),r=n;return t.eat(",")&&(t.next!="}"?r=bk(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function poe(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 hoe(t){if(t.eat("(")){let e=KP(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=poe(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 moe(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 GP(t,e){return e-t}function vk(t,e){let n=[];return r(e),n.sort(GP);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 goe(t){let e=Object.create(null);return n(vk(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]);vk(t,l).forEach(f=>{u||o.push([a,u=[]]),u.indexOf(f)==-1&&u.push(f)})})});let i=e[r.join(",")]=new va(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let a=o[s][1].sort(GP);i.next.push({type:o[s][0],next:e[a.join(",")]||n(a)})}return i}}function yoe(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 YP(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 JP(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 XP(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 ZP(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new voe(t,r,e[r]);return n}let xk=class QP{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=ZP(e,r.attrs),this.defaultAttrs=YP(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==va.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:JP(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ki(this,this.computeAttrs(e),Ae.from(n),qt.setFrom(r))}createChecked(e=null,n,r){return n=Ae.from(n),this.checkContent(n),new ki(this,this.computeAttrs(e),n,qt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=Ae.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(Ae.empty,!0);return i?new ki(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){XP(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 QP(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 boe(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 voe{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?boe(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class im{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=ZP(e,o.attrs),this.excluded=null;let i=YP(this.attrs);this.instance=i?new qt(this,i):null}create(e=null){return!e&&this.instance?this.instance:new qt(this,JP(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new im(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){XP(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let eN=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=xk.compile(this.spec.nodes,this),this.marks=im.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]=va.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?Sk(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==""?[]:Sk(this,s.split(" "))}this.nodeFromJSON=o=>ki.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 xk){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 Ep(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 Sk(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 xoe(t){return t.tag!=null}function Soe(t){return t.style!=null}class ys{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(xoe(o))this.tags.push(o);else if(Soe(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 wk(this,n,!1);return r.addAll(e,qt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new wk(this,n,!0);return r.addAll(e,qt.none,n.from,n.to),$e.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(Toe(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=Tk(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=Tk(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new ys(e,ys.schemaRules(e)))}}const tN={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},Coe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},nN={ol:!0,ul:!0},Tu=1,xx=2,tu=4;function Ck(t,e,n){return e!=null?(e?Tu:0)|(e==="full"?xx:0):t&&t.whitespace=="pre"?Tu|xx:n&~tu}class pf{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&tu?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Ae.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&Tu)){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=Ae.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Ae.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&&!tN.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class wk{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=Ck(null,n.preserveWhitespace,0)|(r?tu:0);o?i=new pf(o.type,o.attrs,qt.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new pf(null,null,qt.none,!0,null,s):i=new pf(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&xx?"full":this.localPreserveWS||(o.options&Tu)>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,`
|
|
243
|
+
`);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;nN.hasOwnProperty(s)&&this.parser.normalizeLists&&woe(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:Coe.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(tN.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(`
|
|
244
|
+
`),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):_k(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=Ck(e,i,s.options);s.options&tu&&s.content.length==0&&(a|=tu);let l=qt.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):_k(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new pf(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|=Tu)}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 woe(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&nN.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Toe(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Tk(t){let e={};for(let n in t)e[n]=t[n];return e}function _k(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 Oa{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Iy(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}=qf(Iy(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&&qf(Iy(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return qf(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Oa(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Ek(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Ek(e.marks)}}function Ek(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Iy(t){return t.document||window.document}const kk=new WeakMap;function _oe(t){let e=kk.get(t);return e===void 0&&kk.set(t,e=Eoe(t)),e}function Eoe(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 qf(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=_oe(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 m=p.indexOf(" ");m>0?l.setAttributeNS(p.slice(0,m),p.slice(m+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 m=e[p];if(m===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:g,contentDOM:b}=qf(t,m,n,r);if(l.appendChild(g),b){if(a)throw new RangeError("Multiple content holes");a=b}}}return{dom:l,contentDOM:a}}const rN=65535,oN=Math.pow(2,16);function koe(t,e){return t+e*oN}function Ok(t){return t&rN}function Ooe(t){return(t-(t&rN))/oN}const iN=1,sN=2,Uf=4,aN=8;class Sx{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&aN)>0}get deletedBefore(){return(this.delInfo&(iN|Uf))>0}get deletedAfter(){return(this.delInfo&(sN|Uf))>0}get deletedAcross(){return(this.delInfo&Uf)>0}}class Vr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Vr.empty)return Vr.empty}recover(e){let n=0,r=Ok(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+Ooe(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 m=u?e==l?-1:e==p?1:n:n,g=l+o+(m<0?0:f);if(r)return g;let b=e==(n<0?l:p)?null:koe(a/3,e-l),y=e==l?sN:e==p?iN:Uf;return(n<0?e!=l:e!=p)&&(y|=aN),new Sx(g,y,b)}o+=f-u}return r?e+o:new Sx(e+o,0,null)}touches(e,n){let r=0,o=Ok(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 Vr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Vr.empty:new Vr(e<0?[0,-e,0]:[0,0,e])}}Vr.empty=new Vr([]);class _u{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 _u(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 _u;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 Sx(e,o,null)}}const Dy=Object.create(null);class or{getMap(){return Vr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Dy[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 Dy)throw new RangeError("Duplicate use of step JSON ID "+e);return Dy[e]=n,n.prototype.jsonID=e,n}}class kn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new kn(e,null)}static fail(e){return new kn(null,e)}static fromReplace(e,n,r,o){try{return kn.ok(e.replace(n,r,o))}catch(i){if(i instanceof wp)return kn.fail(i.message);throw i}}}function aS(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(aS(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return Ae.fromArray(r)}class ps extends or{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 $e(aS(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 kn.fromReplace(e,this.from,this.to,i)}invert(){return new Go(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 ps(n.pos,r.pos,this.mark)}merge(e){return e instanceof ps&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ps(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 ps(n.from,n.to,e.markFromJSON(n.mark))}}or.jsonID("addMark",ps);class Go extends or{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 $e(aS(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return kn.fromReplace(e,this.from,this.to,r)}invert(){return new ps(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 Go(n.pos,r.pos,this.mark)}merge(e){return e instanceof Go&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Go(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 Go(n.from,n.to,e.markFromJSON(n.mark))}}or.jsonID("removeMark",Go);class hs extends or{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return kn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return kn.fromReplace(e,this.pos,this.pos+1,new $e(Ae.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 hs(this.pos,n.marks[o]);return new hs(this.pos,this.mark)}}return new xa(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new hs(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 hs(n.pos,e.markFromJSON(n.mark))}}or.jsonID("addNodeMark",hs);class xa extends or{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return kn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return kn.fromReplace(e,this.pos,this.pos+1,new $e(Ae.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new hs(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new xa(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 xa(n.pos,e.markFromJSON(n.mark))}}or.jsonID("removeNodeMark",xa);class jn extends or{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&Cx(e,this.from,this.to)?kn.fail("Structure replace would overwrite content"):kn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Vr([this.from,this.to-this.from,this.slice.size])}invert(e){return new jn(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 jn(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof jn)||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?$e.empty:new $e(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new jn(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?$e.empty:new $e(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new jn(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 jn(n.from,n.to,$e.fromJSON(e,n.slice),!!n.structure)}}or.jsonID("replace",jn);class Bn extends or{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&&(Cx(e,this.from,this.gapFrom)||Cx(e,this.gapTo,this.to)))return kn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return kn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?kn.fromReplace(e,this.from,this.to,r):kn.fail("Content does not fit in gap")}getMap(){return new Vr([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,$e.fromJSON(e,n.slice),n.insert,!!n.structure)}}or.jsonID("replaceAround",Bn);function Cx(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 Moe(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 m=Math.max(u,e),g=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==m&&s.mark.eq(p[y])?s.to=g:o.push(s=new Go(m,g,p[y])));a&&a.to==m?a.to=g:i.push(a=new ps(m,g,r))}}),o.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function Aoe(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 im){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],m;for(let g=0;g<o.length;g++){let b=o[g];b.step==i-1&&p.eq(o[g].style)&&(m=b)}m?(m.to=u,m.step=i):o.push({style:p,from:Math.max(a,e),to:u,step:i})}}}),o.forEach(s=>t.step(new Go(s.from,s.to,s.style)))}function lS(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 jn(a,f,$e.empty));else{r=p;for(let m=0;m<u.marks.length;m++)n.allowsMarkType(u.marks[m].type)||t.step(new Go(a,f,u.marks[m]));if(o&&u.isText&&n.whitespace!="pre"){let m,g=/\r?\n|\r/g,b;for(;m=g.exec(u.text);)b||(b=new $e(Ae.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new jn(a+m.index,a+m.index+m[0].length,b))}}a=f}if(!r.validEnd){let l=r.fillBefore(Ae.empty,!0);t.replace(a,a,new $e(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function Roe(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Jl(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||!Roe(o,i,s))break}return null}function Ioe(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=Ae.empty,p=0;for(let b=i,y=!1;b>n;b--)y||r.index(b)>0?(y=!0,f=Ae.from(r.node(b).copy(f)),p++):l--;let m=Ae.empty,g=0;for(let b=i,y=!1;b>n;b--)y||o.after(b+1)<o.end(b)?(y=!0,m=Ae.from(o.node(b).copy(m)),g++):u++;t.step(new Bn(l,u,s,a,new $e(f.append(m),p,g),f.size-p,!0))}function cS(t,e,n=null,r=t){let o=Doe(t,e),i=o&&Poe(r,e);return i?o.map(Mk).concat({type:e,attrs:n}).concat(i.map(Mk)):null}function Mk(t){return{type:t,attrs:null}}function Doe(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 Poe(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 Noe(t,e,n){let r=Ae.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=Ae.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 $e(r,0,0),n.length,!0))}function Loe(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)&&joe(t.doc,t.mapping.slice(i).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let g=r.whitespace=="pre",b=!!r.contentMatch.matchType(r.schema.linebreakReplacement);g&&!b?u=!1:!g&&b&&(u=!0)}u===!1&&cN(t,s,a,i),lS(t,t.mapping.slice(i).map(a,1),r,void 0,u===null);let f=t.mapping.slice(i),p=f.map(a,1),m=f.map(a+s.nodeSize,1);return t.step(new Bn(p,m,p+1,m-1,new $e(Ae.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&lN(t,s,a,i),!1}})}function lN(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 cN(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(`
|
|
245
|
+
`))}})}function joe(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function $oe(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 $e(Ae.from(s),0,0),1,!0))}function Oi(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),m=o.index(u);if(p.type.spec.isolating)return!1;let g=p.content.cutByIndex(m,p.childCount),b=r&&r[f+1];b&&(g=g.replaceChild(0,b.type.create(b.attrs)));let y=r&&r[f]||p;if(!p.canReplace(m+1,p.childCount)||!y.type.validContent(g))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 Foe(t,e,n=1,r){let o=t.doc.resolve(e),i=Ae.empty,s=Ae.empty;for(let a=o.depth,l=o.depth-n,u=n-1;a>l;a--,u--){i=Ae.from(o.node(a).copy(i));let f=r&&r[u];s=Ae.from(f?f.type.create(f.attrs,s):o.node(a).copy(s))}t.step(new jn(e,e,new $e(i.append(s),n,n),!0))}function Is(t,e){let n=t.resolve(e),r=n.index();return uN(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Boe(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 uN(t,e){return!!(t&&e&&!t.isLeaf&&Boe(t,e))}function sm(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&&uN(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 Voe(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);cN(t,f.node(),f.before(),a)}s.inlineContent&&lS(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 jn(u,l.map(e+n,-1),$e.empty,!0)),r===!0){let f=t.doc.resolve(u);lN(t,f.node(),f.before(),t.steps.length)}return t}function zoe(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 dN(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 am(t,e,n=e,r=$e.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return fN(o,i,r)?new jn(e,n,r):new Hoe(o,i,r).fit()}function fN(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Hoe{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Ae.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=Ae.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 $e(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 jn(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=Py(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(Ae.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=Py(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new $e(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=Py(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new $e($c(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new $e($c(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:m}=this.frontier[n];if(o){for(let y=0;y<o.childCount;y++)f.push(o.child(y));p=p.matchFragment(o)}let g=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(pN(y.mark(m.allowedMarks(y.marks)),u==1?l:0,u==a.childCount?g:-1)))}let b=u==a.childCount;b||(g=-1),this.placed=Fc(this.placed,n,Ae.from(f)),this.frontier[n].match=p,b&&g<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let y=0,x=a;y<g;y++){let C=x.lastChild;this.frontier.push({type:C.type,match:C.contentMatchAt(C.childCount)}),x=C.content}this.unplaced=b?e==0?$e.empty:new $e($c(s.content,e-1,1),e-1,g<0?s.openEnd:e-1):new $e($c(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||!Ny(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=Ny(e,n,o,r,i);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],f=Ny(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=Fc(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=Fc(this.placed,this.depth,Ae.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Ae.empty,!0);n.childCount&&(this.placed=Fc(this.placed,this.frontier.length,n))}}function $c(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy($c(t.firstChild.content,e-1,n)))}function Fc(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Fc(t.lastChild.content,e-1,n)))}function Py(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function pN(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,pN(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(Ae.empty,!0)))),t.copy(r)}function Ny(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&&!Woe(n,i.content,s)?a:null}function Woe(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function qoe(t){return t.spec.defining||t.spec.definingForContent}function Uoe(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(fN(o,i,r))return t.step(new jn(e,n,r));let s=mN(o,t.doc.resolve(n));s[s.length-1]==0&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let m=o.depth,g=o.pos-1;m>0;m--,g--){let b=o.node(m).type.spec;if(b.defining||b.definingAsContext||b.isolating)break;s.indexOf(m)>-1?a=m:o.before(m)==g&&s.splice(1,0,-m)}let l=s.indexOf(a),u=[],f=r.openStart;for(let m=r.content,g=0;;g++){let b=m.firstChild;if(u.push(b),g==r.openStart)break;m=b.content}for(let m=f-1;m>=0;m--){let g=u[m],b=qoe(g.type);if(b&&!g.sameMarkup(o.node(Math.abs(a)-1)))f=m;else if(b||!g.type.isTextblock)break}for(let m=r.openStart;m>=0;m--){let g=(m+f+1)%(r.openStart+1),b=u[g];if(b)for(let y=0;y<s.length;y++){let x=s[(y+l)%s.length],C=!0;x<0&&(C=!1,x=-x);let _=o.node(x-1),T=o.index(x-1);if(_.canReplaceWith(T,T,b.type,b.marks))return t.replace(o.before(x),C?i.after(x):n,new $e(hN(r.content,0,r.openStart,g),g,r.openEnd))}}let p=t.steps.length;for(let m=s.length-1;m>=0&&(t.replace(e,n,r),!(t.steps.length>p));m--){let g=s[m];g<0||(e=o.before(g),n=i.after(g))}}function hN(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(hN(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(Ae.empty,!0))}return t}function Koe(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=zoe(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new $e(Ae.from(r),0,0))}function Goe(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=mN(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 mN(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 Al extends or{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 kn.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 kn.fromReplace(e,this.pos,this.pos+1,new $e(Ae.from(o),0,n.isLeaf?0:1))}getMap(){return Vr.empty}invert(e){return new Al(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 Al(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 Al(n.pos,n.attr,n.value)}}or.jsonID("attr",Al);class Eu extends or{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 kn.ok(r)}getMap(){return Vr.empty}invert(e){return new Eu(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 Eu(n.attr,n.value)}}or.jsonID("docAttr",Eu);let Bl=class extends Error{};Bl=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Bl.prototype=Object.create(Error.prototype);Bl.prototype.constructor=Bl;Bl.prototype.name="TransformError";class uS{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new _u}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Bl(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=$e.empty){let o=am(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new $e(Ae.from(r),0,0))}delete(e,n){return this.replace(e,n,$e.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return Uoe(this,e,n,r),this}replaceRangeWith(e,n,r){return Koe(this,e,n,r),this}deleteRange(e,n){return Goe(this,e,n),this}lift(e,n){return Ioe(this,e,n),this}join(e,n=1){return Voe(this,e,n),this}wrap(e,n){return Noe(this,e,n),this}setBlockType(e,n=e,r,o=null){return Loe(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return $oe(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new Al(e,n,r)),this}setDocAttribute(e,n){return this.step(new Eu(e,n)),this}addNodeMark(e,n){return this.step(new hs(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 xa(e,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new xa(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 Foe(this,e,n,r),this}addMark(e,n,r){return Moe(this,e,n,r),this}removeMark(e,n,r){return Aoe(this,e,n,r),this}clearIncompatible(e,n,r){return lS(this,e,n,r),this}}const Ly=Object.create(null);class at{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new gN(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=$e.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?$e.empty:n),a==0&&Ik(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),Ik(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new nt(e):fl(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?fl(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):fl(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 Wr(e.node(0))}static atStart(e){return fl(e,e,0,0,1)||new Wr(e)}static atEnd(e){return fl(e,e,e.content.size,e.childCount,-1)||new Wr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Ly[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 Ly)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ly[e]=n,n.prototype.jsonID=e,n}getBookmark(){return nt.between(this.$anchor,this.$head).getBookmark()}}at.prototype.visible=!0;class gN{constructor(e,n){this.$from=e,this.$to=n}}let Ak=!1;function Rk(t){!Ak&&!t.parent.inlineContent&&(Ak=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class nt extends at{constructor(e,n=e){Rk(e),Rk(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 at.near(r);let o=e.resolve(n.map(this.anchor));return new nt(o.parent.inlineContent?o:r,r)}replace(e,n=$e.empty){if(super.replace(e,n),n==$e.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof nt&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new lm(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 nt(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=at.findFrom(n,r,!0)||at.findFrom(n,-r,!0);if(i)n=i.$head;else return at.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(at.findFrom(e,-r,!0)||at.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new nt(e,n)}}at.jsonID("text",nt);class lm{constructor(e,n){this.anchor=e,this.head=n}map(e){return new lm(e.map(this.anchor),e.map(this.head))}resolve(e){return nt.between(e.resolve(this.anchor),e.resolve(this.head))}}class Xe extends at{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?at.near(i):new Xe(i)}content(){return new $e(Ae.from(this.node),0,0)}eq(e){return e instanceof Xe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new dS(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Xe(e.resolve(n.anchor))}static create(e,n){return new Xe(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Xe.prototype.visible=!1;at.jsonID("node",Xe);class dS{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new lm(r,r):new dS(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Xe.isSelectable(r)?new Xe(n):at.near(n)}}class Wr extends at{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=$e.empty){if(n==$e.empty){e.delete(0,e.doc.content.size);let r=at.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Wr(e)}map(e){return new Wr(e)}eq(e){return e instanceof Wr}getBookmark(){return Yoe}}at.jsonID("all",Wr);const Yoe={map(){return this},resolve(t){return new Wr(t)}};function fl(t,e,n,r,o,i=!1){if(e.inlineContent)return nt.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&&Xe.isSelectable(a))return Xe.create(t,n-(o<0?a.nodeSize:0))}else{let l=fl(t,a,n+o,o<0?a.childCount:0,o,i);if(l)return l}n+=a.nodeSize*o}return null}function Ik(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof jn||o instanceof Bn))return;let i=t.mapping.maps[r],s;i.forEach((a,l,u,f)=>{s==null&&(s=f)}),t.setSelection(at.near(t.doc.resolve(s),n))}const Dk=1,hf=2,Pk=4;class Joe extends uS{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|Dk)&~hf,this.storedMarks=null,this}get selectionSet(){return(this.updated&Dk)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=hf,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&hf)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~hf,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(at.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|=Pk,this}get scrolledIntoView(){return(this.updated&Pk)>0}}function Nk(t,e){return!e||!t?t:t.bind(e)}class Bc{constructor(e,n,r){this.name=e,this.init=Nk(n.init,r),this.apply=Nk(n.apply,r)}}const Xoe=[new Bc("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Bc("selection",{init(t,e){return t.selection||at.atStart(e.doc)},apply(t){return t.selection}}),new Bc("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Bc("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class jy{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Xoe.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 Bc(r.key,r.spec.state,r))})}}class bl{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 bl(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 Joe(this)}static create(e){let n=new jy(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new bl(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 jy(this.schema,e.plugins),r=n.fields,o=new bl(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 jy(e.schema,e.plugins),i=new bl(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=ki.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=at.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 yN(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=yN(o,e,{})),n[r]=o}return n}class cn{constructor(e){this.spec=e,this.props={},e.props&&yN(e.props,this,this.props),this.key=e.key?e.key.key:bN("plugin")}getState(e){return e[this.key]}}const $y=Object.create(null);function bN(t){return t in $y?t+"$"+ ++$y[t]:($y[t]=0,t+"$")}class Mn{constructor(e="key"){this.key=bN(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},Vl=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let wx=null;const wi=function(t,e,n){let r=wx||(wx=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},Zoe=function(){wx=null},Sa=function(t,e,n,r){return n&&(Lk(t,e,n,r,-1)||Lk(t,e,n,r,1))},Qoe=/^(img|br|input|textarea|hr)$/i;function Lk(t,e,n,r,o){for(var i;;){if(t==n&&e==r)return!0;if(e==(o<0?0:lo(t))){let s=t.parentNode;if(!s||s.nodeType!=1||td(t)||Qoe.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?lo(t):0}else return!1}}function lo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function eie(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=lo(t)}else if(t.parentNode&&!td(t))e=Un(t),t=t.parentNode;else return null}}function tie(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&&!td(t))e=Un(t)+1,t=t.parentNode;else return null}}function nie(t,e,n){for(let r=e==0,o=e==lo(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==lo(t)}}function td(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 cm=function(t){return t.focusNode&&Sa(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Zs(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function rie(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function oie(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(lo(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(lo(r.startContainer),r.startOffset)}}}const Qo=typeof navigator<"u"?navigator:null,jk=typeof document<"u"?document:null,Ds=Qo&&Qo.userAgent||"",Tx=/Edge\/(\d+)/.exec(Ds),vN=/MSIE \d/.exec(Ds),_x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ds),Ar=!!(vN||_x||Tx),bs=vN?document.documentMode:_x?+_x[1]:Tx?+Tx[1]:0,Oo=!Ar&&/gecko\/(\d+)/i.test(Ds);Oo&&+(/Firefox\/(\d+)/.exec(Ds)||[0,0])[1];const Ex=!Ar&&/Chrome\/(\d+)/.exec(Ds),er=!!Ex,xN=Ex?+Ex[1]:0,hr=!Ar&&!!Qo&&/Apple Computer/.test(Qo.vendor),zl=hr&&(/Mobile\/\w+/.test(Ds)||!!Qo&&Qo.maxTouchPoints>2),oo=zl||(Qo?/Mac/.test(Qo.platform):!1),iie=Qo?/Win/.test(Qo.platform):!1,_i=/Android \d/.test(Ds),nd=!!jk&&"webkitFontSmoothing"in jk.documentElement.style,sie=nd?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function aie(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 yi(t,e){return typeof t=="number"?t:t[e]}function lie(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 $k(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=Vl(s);continue}let a=s,l=a==i.body,u=l?aie(i):lie(a),f=0,p=0;if(e.top<u.top+yi(r,"top")?p=-(u.top-e.top+yi(o,"top")):e.bottom>u.bottom-yi(r,"bottom")&&(p=e.bottom-e.top>u.bottom-u.top?e.top+yi(o,"top")-u.top:e.bottom-u.bottom+yi(o,"bottom")),e.left<u.left+yi(r,"left")?f=-(u.left-e.left+yi(o,"left")):e.right>u.right-yi(r,"right")&&(f=e.right-u.right+yi(o,"right")),f||p)if(l)i.defaultView.scrollBy(f,p);else{let g=a.scrollLeft,b=a.scrollTop;p&&(a.scrollTop+=p),f&&(a.scrollLeft+=f);let y=a.scrollLeft-g,x=a.scrollTop-b;e={left:e.left-y,top:e.top-x,right:e.right-y,bottom:e.bottom-x}}let m=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(m))break;s=m=="absolute"?s.offsetParent:Vl(s)}}function cie(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:SN(t.dom)}}function SN(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Vl(r));return e}function uie({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;CN(n,r==0?0:r-e)}function CN(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 rl=null;function die(t){if(t.setActive)return t.setActive();if(rl)return t.focus(rl);let e=SN(t);t.focus(rl==null?{get preventScroll(){return rl={preventScroll:!0},!0}}:void 0),rl||(rl=!1,CN(e,0))}function wN(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 m;if(f.nodeType==1)m=f.getClientRects();else if(f.nodeType==3)m=wi(f).getClientRects();else continue;for(let g=0;g<m.length;g++){let b=m[g];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?fie(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:wN(n,o)}function fie(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=ts(r,1);if(i.top!=i.bottom&&fS(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function fS(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function pie(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function hie(t,e,n){let{node:r,offset:o}=wN(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 mie(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 TN(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(fS(e,u))return TN(s,e,u)}}if((i=(i+1)%r)==o)break}return t}function gie(t,e){let n=t.dom.ownerDocument,r,o=0,i=oie(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(!fS(e,u)||(s=TN(t.dom,e,u),!s))return null}if(hr)for(let u=s;r&&u;u=Vl(u))u.draggable&&(r=void 0);if(s=pie(s,e),r){if(Oo&&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;nd&&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=mie(t,r,o,e))}a==null&&(a=hie(t,s,e));let l=t.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Fk(t){return t.top<t.bottom||t.left<t.right}function ts(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(Fk(r))return r}return Array.prototype.find.call(n,Fk)||t.getBoundingClientRect()}const yie=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function _N(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=nd||Oo;if(r.nodeType==3)if(s&&(yie.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=ts(wi(r,o,o),n);if(Oo&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let u=ts(wi(r,o-1,o-1),-1);if(u.top==l.top){let f=ts(wi(r,o,o+1),-1);if(f.top!=l.top)return Ac(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++,Ac(ts(wi(r,l,u),f),f<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==lo(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return Fy(l.getBoundingClientRect(),!1)}if(i==null&&o<lo(r)){let l=r.childNodes[o];if(l.nodeType==1)return Fy(l.getBoundingClientRect(),!0)}return Fy(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==lo(r))){let l=r.childNodes[o-1],u=l.nodeType==3?wi(l,lo(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Ac(ts(u,1),!1)}if(i==null&&o<lo(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 Ac(ts(u,-1),!0)}return Ac(ts(r.nodeType==3?wi(r):r,-n),n>=0)}function Ac(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 Fy(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 EN(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 bie(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return EN(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=_N(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 vie=/[\u0590-\u08ac]/;function xie(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?!vie.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:EN(t,e,()=>{let{focusNode:l,focusOffset:u,anchorNode:f,anchorOffset:p}=t.domSelectionRange(),m=a.caretBidiLevel;a.modify("move",n,"character");let g=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:b,focusOffset:y}=t.domSelectionRange(),x=b&&!g.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 m!=null&&(a.caretBidiLevel=m),x}):r.pos==r.start()||r.pos==r.end()}let Bk=null,Vk=null,zk=!1;function Sie(t,e,n){return Bk==e&&Vk==n?zk:(Bk=e,Vk=n,zk=n=="up"||n=="down"?bie(t,e,n):xie(t,e,n))}const uo=0,Hk=1,oa=2,ei=3;class rd{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=uo,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 ON){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 kN&&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 m=this.children[p-1];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(1)){o=Un(m.dom)+1;break}e-=m.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 g=0,b=0;g<this.children.length;g++){let y=this.children[g],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((Oo||hr)&&e==n){let{node:g,offset:b}=a;if(g.nodeType==3){if(p=!!(b&&g.nodeValue[b-1]==`
|
|
246
|
+
`),p&&b==g.nodeValue.length)for(let y=g,x;y;y=y.parentNode){if(x=y.nextSibling){x.nodeName=="BR"&&(a=l={node:x.parentNode,offset:Un(x)+1});break}let C=y.pmViewDesc;if(C&&C.node&&C.node.isBlock)break}}else{let y=g.childNodes[b-1];p=y&&(y.nodeName=="BR"||y.contentEditable=="false")}}if(Oo&&f.focusNode&&f.focusNode!=l.node&&f.focusNode.nodeType==1){let g=f.focusNode.childNodes[f.focusOffset];g&&g.contentEditable=="false"&&(o=!0)}if(!(o||p&&hr)&&Sa(a.node,a.offset,f.anchorNode,f.anchorOffset)&&Sa(l.node,l.offset,f.focusNode,f.focusOffset))return;let m=!1;if((u.extend||e==n)&&!p){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),m=!0}catch{}}if(!m){if(e>n){let b=a;a=l,l=b}let g=document.createRange();g.setEnd(l.node,l.offset),g.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(g)}}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?oa:Hk,e==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=ei:i.markDirty(e-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?oa:ei}r=s}this.dirty=oa}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?oa:Hk;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class kN extends rd{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==uo&&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 Cie extends rd{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 Ca extends rd{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=Oa.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Ca(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&ei||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ei&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=uo){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=uo}}slice(e,n,r){let o=Ca.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=Ox(i,n,s,r)),e>0&&(i=Ox(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 vs extends rd{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}=Oa.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 m=f;return f=RN(f,r,n),u?l=new wie(e,n,r,o,f,p||null,m,u,i,s+1):n.isText?new um(e,n,r,o,f,m,i):new vs(e,n,r,o,f,p||null,m,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=()=>Ae.empty)}return e}matchesNode(e,n,r){return this.dirty==uo&&e.eq(this.node)&&kp(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 _ie(this,s&&s.node,e);Oie(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,m)=>{l.syncToMarks(u.marks,r,e);let g;l.findNodeMatch(u,f,p,m)||a&&e.state.selection.from>o&&e.state.selection.to<o+u.nodeSize&&(g=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(u,f,p,g,e)||l.updateNextNode(u,f,p,e,m,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==oa)&&(s&&this.protectLocalComposition(e,s),MN(this.contentDOM,this.children,e),zl&&Mie(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof nt)||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=Aie(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 Cie(this,i,n,o);e.input.compositionNodes.push(s),this.children=Ox(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==ei||!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=uo}updateOuterDeco(e){if(kp(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=AN(this.dom,this.nodeDOM,kx(this.outerDeco,this.node,n),kx(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 Wk(t,e,n,r,o){RN(r,e,t);let i=new vs(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class um extends vs{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==ei||this.dirty!=uo&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=uo||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=uo,!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 um(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=ei)}get domAtom(){return!1}isText(e){return this.node.text==e}}class ON extends rd{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==uo&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class wie extends vs{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==ei)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 MN(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=qk(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(a,r);if(s instanceof Ca){let l=r?r.previousSibling:t.lastChild;MN(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=qk(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const nu=function(t){t&&(this.nodeName=t)};nu.prototype=Object.create(null);const ia=[new nu];function kx(t,e,n){if(t.length==0)return ia;let r=n?ia[0]:new nu,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new nu(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&o.length==1&&o.push(r=new nu(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 AN(t,e,n,r){if(n==ia&&r==ia)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=ia[0]),o=l}Tie(o,a||ia[0],s)}return o}function Tie(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 RN(t,e,n){return AN(t,t,ia,kx(e,n,t.nodeType!=1))}function kp(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 qk(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class _ie{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Eie(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=uo,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=Ca.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==ei&&s.dom==s.contentDOM&&(s.dirty=oa),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 vs){let u=this.preMatch.matched.get(l);if(u!=null&&u!=i)return!1;let f=l.dom,p,m=this.isLocked(f)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=ei&&kp(n,l.outerDeco));if(!m&&l.update(e,n,r,o))return this.destroyBetween(this.index,a),l.dom!=f&&(this.changed=!0),this.index++,!0;if(!m&&(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=oa,p.updateChildren(o,s+1),p.dirty=uo),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)||!kp(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let a=vs.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=vs.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 kN(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 Ca;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof um)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((hr||er)&&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 ON(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 Eie(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 Ca)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 kie(t,e){return t.type.side-e.type.side}function Oie(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(kie);for(let x=0;x<p.length;x++)n(p[x],u,!!l)}else n(f,u,!!l);let m,g;if(l)g=-1,m=l,l=null;else if(u<t.childCount)g=u,m=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+m.nodeSize;if(m.isText){let x=b;s<o.length&&o[s].from<x&&(x=o[s].from);for(let C=0;C<a.length;C++)a[C].to<x&&(x=a[C].to);x<b&&(l=m.cut(x-i),m=m.cut(0,x-i),b=x,g=-1)}else for(;s<o.length&&o[s].to<b;)s++;let y=m.isInline&&!m.isLeaf?a.filter(x=>!x.inline):a.slice();r(m,y,e.forChild(i,m),g),i=b}}function Mie(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 Aie(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 Ox(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 pS(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(cm(n)){for(l=s;o&&!o.node;)o=o.parent;let p=o.node;if(o&&p.isAtom&&Xe.isSelectable(p)&&o.parent&&!(p.isInline&&nie(n.focusNode,n.focusOffset,o.dom))){let m=o.posBefore;u=new Xe(s==m?a:r.resolve(m))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let p=s,m=s;for(let g=0;g<n.rangeCount;g++){let b=n.getRangeAt(g);p=Math.min(p,t.docView.posFromDOM(b.startContainer,b.startOffset,1)),m=Math.max(m,t.docView.posFromDOM(b.endContainer,b.endOffset,-1))}if(p<0)return null;[l,s]=m==t.state.selection.anchor?[m,p]:[p,m],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=hS(t,f,a,p)}return u}function IN(t){return t.editable?t.hasFocus():PN(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Mi(t,e=!1){let n=t.state.selection;if(DN(t,n),!!IN(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&er){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Sa(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)Iie(t);else{let{anchor:r,head:o}=n,i,s;Uk&&!(n instanceof nt)&&(n.$from.parent.inlineContent||(i=Kk(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Kk(t,n.to))),t.docView.setSelection(r,o,t,e),Uk&&(i&&Gk(i),s&&Gk(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Rie(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Uk=hr||er&&xN<63;function Kk(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(hr&&o&&o.contentEditable=="false")return By(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return By(o);if(i)return By(i)}}function By(t){return t.contentEditable="true",hr&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Gk(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function Rie(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(()=>{(!IN(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function Iie(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&&Ar&&bs<=11&&(r.disabled=!0,r.disabled=!1)}function DN(t,e){if(e instanceof Xe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Yk(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Yk(t)}function Yk(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function hS(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||nt.between(e,n,r)}function Jk(t){return t.editable&&!t.hasFocus()?!1:PN(t)}function PN(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 Die(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Sa(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Mx(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&&at.findFrom(i,e)}function ns(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Xk(t,e,n){let r=t.state.selection;if(r instanceof nt)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 ns(t,new nt(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=Mx(t.state,e);return o&&o instanceof Xe?ns(t,o):!1}else if(!(oo&&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?Xe.isSelectable(i)?ns(t,new Xe(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):nd?ns(t,new nt(t.state.doc.resolve(e<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Xe&&r.node.isInline)return ns(t,new nt(e>0?r.$to:r.$from));{let o=Mx(t.state,e);return o?ns(t,o):!1}}}function Op(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function ru(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function ol(t,e){return e<0?Pie(t):Nie(t)}function Pie(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(Oo&&n.nodeType==1&&r<Op(n)&&ru(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(ru(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(NN(n))break;{let a=n.previousSibling;for(;a&&ru(a,-1);)o=n.parentNode,i=Un(a),a=a.previousSibling;if(a)n=a,r=Op(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?Ax(t,n,r):o&&Ax(t,o,i)}function Nie(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=Op(n),i,s;for(;;)if(r<o){if(n.nodeType!=1)break;let a=n.childNodes[r];if(ru(a,1))i=n,s=++r;else break}else{if(NN(n))break;{let a=n.nextSibling;for(;a&&ru(a,1);)i=a.parentNode,s=Un(a)+1,a=a.nextSibling;if(a)n=a,r=0,o=Op(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&Ax(t,i,s)}function NN(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Lie(t,e){for(;t&&e==t.childNodes.length&&!td(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 jie(t,e){for(;t&&!e&&!td(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 Ax(t,e,n){if(e.nodeType!=3){let i,s;(s=Lie(e,n))?(e=s,n=0):(i=jie(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(cm(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&&Mi(t)},50)}function Zk(t,e){let n=t.state.doc.resolve(e);if(!(er||iie)&&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 Qk(t,e,n){let r=t.state.selection;if(r instanceof nt&&!r.empty||n.indexOf("s")>-1||oo&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=Mx(t.state,e);if(s&&s instanceof Xe)return ns(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,a=r instanceof Wr?at.near(s,e):at.findFrom(s,e);return a?ns(t,a):!1}return!1}function eO(t,e){if(!(t.state.selection instanceof nt))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 tO(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function $ie(t){if(!hr||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;tO(t,r,"true"),setTimeout(()=>tO(t,r,"false"),20)}return!1}function Fie(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function Bie(t,e){let n=e.keyCode,r=Fie(e);if(n==8||oo&&n==72&&r=="c")return eO(t,-1)||ol(t,-1);if(n==46&&!e.shiftKey||oo&&n==68&&r=="c")return eO(t,1)||ol(t,1);if(n==13||n==27)return!0;if(n==37||oo&&n==66&&r=="c"){let o=n==37?Zk(t,t.state.selection.from)=="ltr"?-1:1:-1;return Xk(t,o,r)||ol(t,o)}else if(n==39||oo&&n==70&&r=="c"){let o=n==39?Zk(t,t.state.selection.from)=="ltr"?1:-1:1;return Xk(t,o,r)||ol(t,o)}else{if(n==38||oo&&n==80&&r=="c")return Qk(t,-1,r)||ol(t,-1);if(n==40||oo&&n==78&&r=="c")return $ie(t)||Qk(t,1,r)||ol(t,1);if(r==(oo?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function mS(t,e){t.someProp("transformCopied",g=>{e=g(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 g=r.firstChild;n.push(g.type.name,g.attrs!=g.type.defaultAttrs?g.attrs:null),r=g.content}let s=t.someProp("clipboardSerializer")||Oa.fromSchema(t.state.schema),a=VN(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u=l.firstChild,f,p=0;for(;u&&u.nodeType==1&&(f=BN[u.nodeName.toLowerCase()]);){for(let g=f.length-1;g>=0;g--){let b=a.createElement(f[g]);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 m=t.someProp("clipboardTextSerializer",g=>g(e,t))||e.content.textBetween(0,e.content.size,`
|
|
247
|
+
|
|
248
|
+
`);return{dom:l,text:m,slice:e}}function LN(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",m=>{e=m(e,i||r,t)}),i)return e?new $e(Ae.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
249
|
+
`))),0,0):$e.empty;let p=t.someProp("clipboardTextParser",m=>m(e,o,r,t));if(p)a=p;else{let m=o.marks(),{schema:g}=t.state,b=Oa.fromSchema(g);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(y=>{let x=s.appendChild(document.createElement("p"));y&&x.appendChild(b.serializeNode(g.text(y,m)))})}}else t.someProp("transformPastedHTML",p=>{n=p(n,t)}),s=Wie(n),nd&&qie(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 m=s.firstChild;for(;m&&m.nodeType!=1;)m=m.nextSibling;if(!m)break;s=m}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||ys.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||f),context:o,ruleFromNode(m){return m.nodeName=="BR"&&!m.nextSibling&&m.parentNode&&!Vie.test(m.parentNode.nodeName)?{ignore:!0}:null}})),f)a=Uie(nO(a,+f[1],+f[2]),f[4]);else if(a=$e.maxOpen(zie(a.content,o),!0),a.openStart||a.openEnd){let p=0,m=0;for(let g=a.content.firstChild;p<a.openStart&&!g.type.spec.isolating;p++,g=g.firstChild);for(let g=a.content.lastChild;m<a.openEnd&&!g.type.spec.isolating;m++,g=g.lastChild);a=nO(a,p,m)}return t.someProp("transformPasted",p=>{a=p(a,t)}),a}const Vie=/^(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 zie(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&&$N(l,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=FN(s[s.length-1],i.length));let f=jN(a,l);s.push(f),o=o.matchType(f.type),i=l}}),s)return Ae.from(s)}return t}function jN(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Ae.from(t));return t}function $N(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=$N(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(Ae.from(jN(n,t,o+1))))}}function FN(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,FN(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Ae.empty,!0);return t.copy(n.append(r))}function Rx(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=Rx(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(Ae.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function nO(t,e,n){return e<t.openStart&&(t=new $e(Rx(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new $e(Rx(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const BN={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 rO=null;function VN(){return rO||(rO=document.implementation.createHTMLDocument("title"))}let Vy=null;function Hie(t){let e=window.trustedTypes;return e?(Vy||(Vy=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Vy.createHTML(t)):t}function Wie(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=VN().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&BN[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=Hie(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function qie(t){let e=t.querySelectorAll(er?"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 Uie(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=Ae.from(l.create(r[a+1],o)),i++,s++}return new $e(o,i,s)}const mr={},gr={},Kie={touchstart:!0,touchmove:!0};class Gie{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 Yie(t){for(let e in mr){let n=mr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Xie(t,r)&&!gS(t,r)&&(t.editable||!(r.type in gr))&&n(t,r)},Kie[e]?{passive:!0}:void 0)}hr&&t.dom.addEventListener("input",()=>null),Ix(t)}function ms(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Jie(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 Ix(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>gS(t,r))})}function gS(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function Xie(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 Zie(t,e){!gS(t,e)&&mr[e.type]&&(t.editable||!(e.type in gr))&&mr[e.type](t,e)}gr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!HN(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(_i&&er&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),zl&&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,Zs(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||Bie(t,n)?n.preventDefault():ms(t,"key")};gr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};gr.keypress=(t,e)=>{let n=e;if(HN(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||oo&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof nt)||!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 dm(t){return{left:t.clientX,top:t.clientY}}function Qie(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function yS(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 Rl(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 ese(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Xe.isSelectable(r)?(Rl(t,new Xe(n)),!0):!1}function tse(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof Xe&&(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(Xe.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?(Rl(t,Xe.create(t.state.doc,o)),!0):!1}function nse(t,e,n,r,o){return yS(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?tse(t,n):ese(t,n))}function rse(t,e,n,r){return yS(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function ose(t,e,n,r){return yS(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||ise(t,n,r)}function ise(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Rl(t,nt.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)Rl(t,nt.create(r,a+1,a+1+s.content.size));else if(Xe.isSelectable(s))Rl(t,Xe.create(r,a));else continue;return!0}}function bS(t){return Mp(t)}const zN=oo?"metaKey":"ctrlKey";mr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=bS(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&Qie(n,t.input.lastClick)&&!n[zN]&&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(dm(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new sse(t,s,n,!!r)):(i=="doubleClick"?rse:ose)(t,s.pos,s.inside,n)?n.preventDefault():ms(t,"pointer"))};class sse{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[zN],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 Xe&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Oo&&!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)),ms(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(()=>Mi(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(dm(e))),this.updateAllowDefault(e),this.allowDefault||!n?ms(this.view,"pointer"):nse(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||hr&&this.mightDrag&&!this.mightDrag.node.isAtom||er&&!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)?(Rl(this.view,at.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):ms(this.view,"pointer")}move(e){this.updateAllowDefault(e),ms(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)}}mr.touchstart=t=>{t.input.lastTouch=Date.now(),bS(t),ms(t,"pointer")};mr.touchmove=t=>{t.input.lastTouch=Date.now(),ms(t,"pointer")};mr.contextmenu=t=>bS(t);function HN(t,e){return t.composing?!0:hr&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const ase=_i?5e3:-1;gr.compositionstart=gr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof nt&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Mp(t,!0),t.markCursor=null;else if(Mp(t,!e.selection.empty),Oo&&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}WN(t,ase)};gr.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++,WN(t,20))};function WN(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Mp(t),e))}function qN(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=cse());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function lse(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=eie(e.focusNode,e.focusOffset),r=tie(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 cse(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Mp(t,e=!1){if(!(_i&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),qN(t),e||t.docView&&t.docView.dirty){let n=pS(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 use(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 ku=Ar&&bs<15||zl&&sie<604;mr.copy=gr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=ku?null:n.clipboardData,s=r.content(),{dom:a,text:l}=mS(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):use(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function dse(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function fse(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?Ou(t,r.value,null,o,e):Ou(t,r.textContent,r.innerHTML,o,e)},50)}function Ou(t,e,n,r,o){let i=LN(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,o,i||$e.empty)))return!0;if(!i)return!1;let s=dse(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 UN(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," "):""}gr.paste=(t,e)=>{let n=e;if(t.composing&&!_i)return;let r=ku?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Ou(t,UN(r),r.getData("text/html"),o,n)?n.preventDefault():fse(t,n)};class KN{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const pse=oo?"altKey":"ctrlKey";function GN(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[pse]}mr.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(dm(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Xe?o.to-1:o.to))){if(r&&r.mightDrag)s=Xe.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=Xe.create(t.state.doc,p.posBefore))}}let a=(s||t.state.selection).content(),{dom:l,text:u,slice:f}=mS(t,a);(!n.dataTransfer.files.length||!er||xN>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ku?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ku||n.dataTransfer.setData("text/plain",u),t.dragging=new KN(f,GN(t,n),s)};mr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};gr.dragover=gr.dragenter=(t,e)=>e.preventDefault();gr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(dm(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=LN(t,UN(n.dataTransfer),ku?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&GN(t,n));if(t.someProp("handleDrop",b=>b(t,n,s||$e.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let l=s?dN(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,m=u.doc;if(p?u.replaceRangeWith(f,f,s.content.firstChild):u.replaceRange(f,f,s),u.doc.eq(m))return;let g=u.doc.resolve(f);if(p&&Xe.isSelectable(s.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Xe(g));else{let b=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((y,x,C,_)=>b=_),u.setSelection(hS(t,g,u.doc.resolve(b)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))};mr.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())&&Mi(t)},20))};mr.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)};mr.beforeinput=(t,e)=>{if(er&&_i&&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,Zs(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 gr)mr[t]=gr[t];function Mu(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 Ap{constructor(e,n){this.toDOM=e,this.spec=n||fa,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 Gn(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Ap&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Mu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class xs{constructor(e,n){this.attrs=e,this.spec=n||fa}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 Gn(i,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof xs&&Mu(this.attrs,e.attrs)&&Mu(this.spec,e.spec)}static is(e){return e.type instanceof xs}destroy(){}}class vS{constructor(e,n){this.attrs=e,this.spec=n||fa}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 Gn(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 vS&&Mu(this.attrs,e.attrs)&&Mu(this.spec,e.spec)}destroy(){}}class Gn{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Gn(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 Gn(e,e,new Ap(n,r))}static inline(e,n,r,o){return new Gn(e,n,new xs(r,o))}static node(e,n,r,o){return new Gn(e,n,new vS(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof xs}get widget(){return this.type instanceof Ap}}const pl=[],fa={};class on{constructor(e,n){this.local=e.length?e:pl,this.children=n.length?n:pl}static create(e,n){return n.length?Rp(n,e,0,fa):Zn}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==Zn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||fa)}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?hse(this.children,s||[],e,n,r,o,i):s?new on(s.sort(pa),pl):Zn}add(e,n){return n.length?this==Zn?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=JN(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,Rp(f,a,u+1,fa)),i+=3}});let s=YN(i?XN(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(pa):this.local,o||this.children)}remove(e){return e.length==0||this==Zn?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!=Zn?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):Zn}forChild(e,n){if(this==Zn)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 xs){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(pa),pl);return r?new ls([a,r]):a}return r||Zn}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 xS(this.localsInner(e))}localsInner(e){if(this==Zn)return pl;if(e.inlineContent||!this.local.some(xs.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof xs||n.push(this.local[r]);return n}forEachSet(e){e(this)}}on.empty=new on([],[]);on.removeOverlap=xS;const Zn=on.empty;class ls{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,fa));return ls.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!=Zn&&(i instanceof ls?r=r.concat(i.members):r.push(i))}return ls.from(r)}eq(e){if(!(e instanceof ls)||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?xS(r?n:n.sort(pa)):pl}static from(e){switch(e.length){case 0:return Zn;case 1:return e[0];default:return new ls(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 hse(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((m,g,b,y)=>{let x=y-b-(g-m);for(let C=0;C<a.length;C+=3){let _=a[C+1];if(_<0||m>_+f-p)continue;let T=a[C]+f-p;g>=T?a[C+1]=m<=T?-2:-1:m>=f&&x&&(a[C]+=x,a[C+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 m=n.map(t[u+1]+i,-1),g=m-o,{index:b,offset:y}=r.content.findIndex(p),x=r.maybeChild(b);if(x&&y==p&&y+x.nodeSize==g){let C=a[u+2].mapInner(n,x,f+1,t[u]+i+1,s);C!=Zn?(a[u]=p,a[u+1]=g,a[u+2]=C):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=mse(a,t,e,n,o,i,s),f=Rp(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,m=0;p<f.children.length;p+=3){let g=f.children[p];for(;m<a.length&&a[m]<g;)m+=3;a.splice(m,0,f.children[p],f.children[p+1],f.children[p+2])}}return new on(e.sort(pa),a)}function YN(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 Gn(o.from+e,o.to+e,o.type))}return n}function mse(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 JN(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 XN(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Rp(t,e,n,r){let o=[],i=!1;e.forEach((a,l)=>{let u=JN(t,a,l+n);if(u){i=!0;let f=Rp(u,a,n+l+1,r);f!=Zn&&o.push(l,l+a.nodeSize,f)}});let s=YN(i?XN(t):t,-n).sort(pa);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):Zn}function pa(t,e){return t.from-e.from||t.to-e.to}function xS(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),oO(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),oO(e,o,r.copy(i.from,r.to)));break}}}return e}function oO(t,e,n){for(;e<t.length&&pa(n,t[e])>0;)e++;t.splice(e,0,n)}function zy(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Zn&&e.push(r)}),t.cursorWrapper&&e.push(on.create(t.state.doc,[t.cursorWrapper.deco])),ls.from(e)}const gse={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},yse=Ar&&bs<=11;class bse{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 vse{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new bse,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]);Ar&&bs<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),yse&&(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,gse)),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(Jk(this.view)){if(this.suppressingSelectionUpdates)return Mi(this.view);if(Ar&&bs<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Sa(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=Vl(i))n.add(i);for(let i=e.anchorNode;i;i=Vl(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)&&Jk(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(Oo&&l.length){let f=l.filter(p=>p.nodeName=="BR");if(f.length==2){let[p,m]=f;p.parentNode&&p.parentNode.parentNode==m.parentNode?m.remove():p.remove()}else{let{focusNode:p}=this.currentSelection;for(let m of f){let g=m.parentNode;g&&g.nodeName=="LI"&&(!p||Cse(e,p)!=g)&&m.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&&cm(r)&&(u=pS(e))&&u.eq(at.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Mi(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),xse(e)),this.handleDOMChange(i,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Mi(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(Ar&&bs<=11&&e.addedNodes.length)for(let f=0;f<e.addedNodes.length;f++){let{previousSibling:p,nextSibling:m}=e.addedNodes[f];(!p||Array.prototype.indexOf.call(e.addedNodes,p)<0)&&(o=p),(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(i=m)}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 iO=new WeakMap,sO=!1;function xse(t){if(!iO.has(t)&&(iO.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Oo,sO)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."),sO=!0}}function aO(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return Sa(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function Sse(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return aO(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?aO(t,n):null}function Cse(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 wse(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}],cm(l)||u.push({node:l.focusNode,offset:l.focusOffset})),er&&t.input.lastKeyCode===8)for(let x=i;x>o;x--){let C=r.childNodes[x-1],_=C.pmViewDesc;if(C.nodeName=="BR"&&!_){i=x;break}if(!_||_.size)break}let p=t.state.doc,m=t.someProp("domParser")||ys.fromSchema(t.state.schema),g=p.resolve(s),b=null,y=m.parse(r,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:o,to:i,preserveWhitespace:g.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:Tse,context:g});if(u&&u[0].pos!=null){let x=u[0].pos,C=u[1]&&u[1].pos;C==null&&(C=x),b={anchor:x+s,head:C+s}}return{doc:y,sel:b,from:s,to:a}}function Tse(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(hr&&/^(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||hr&&/^(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 _se=/^(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 Ese(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let R=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,N=pS(t,R);if(N&&!t.state.selection.eq(N)){if(er&&_i&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",I=>I(t,Zs(13,"Enter"))))return;let O=t.state.tr.setSelection(N);R=="pointer"?O.setMeta("pointer",!0):R=="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=wse(t,e,n),f=t.state.doc,p=f.slice(u.from,u.to),m,g;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(m=t.state.selection.to,g="end"):(m=t.state.selection.from,g="start"),t.input.lastKeyCode=null;let b=Mse(p.content,u.doc.content,u.from,m,g);if(b&&t.input.domChangeCount++,(zl&&t.input.lastIOSEnter>Date.now()-225||_i)&&o.some(R=>R.nodeType==1&&!_se.test(R.nodeName))&&(!b||b.endA>=b.endB)&&t.someProp("handleKeyDown",R=>R(t,Zs(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!b)if(r&&l instanceof nt&&!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 R=lO(t,t.state.doc,u.sel);if(R&&!R.eq(t.state.selection)){let N=t.state.tr.setSelection(R);i&&N.setMeta("composition",i),t.dispatch(N)}}return}t.state.selection.from<t.state.selection.to&&b.start==b.endB&&t.state.selection instanceof nt&&(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)),Ar&&bs<=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),C=f.resolve(b.start),_=y.sameParent(x)&&y.parent.inlineContent&&C.end()>=b.endA,T;if((zl&&t.input.lastIOSEnter>Date.now()-225&&(!_||o.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!_&&y.pos<u.doc.content.size&&(!y.sameParent(x)||!y.parent.inlineContent)&&!/\S/.test(u.doc.textBetween(y.pos,x.pos,"",""))&&(T=at.findFrom(u.doc.resolve(y.pos+1),1,!0))&&T.head>y.pos)&&t.someProp("handleKeyDown",R=>R(t,Zs(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>b.start&&Ose(f,b.start,b.endA,y,x)&&t.someProp("handleKeyDown",R=>R(t,Zs(8,"Backspace")))){_i&&er&&t.domObserver.suppressSelectionUpdates();return}er&&b.endB==b.start&&(t.input.lastChromeDelete=Date.now()),_i&&!_&&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(R){return R(t,Zs(13,"Enter"))})},20));let w=b.start,k=b.endA,M=R=>{let N=R||t.state.tr.replace(w,k,u.doc.slice(b.start-u.from,b.endB-u.from));if(u.sel){let O=lO(t,N.doc,u.sel);O&&!(er&&t.composing&&O.empty&&(b.start!=b.endB||t.input.lastChromeDelete<Date.now()-100)&&(O.head==w||O.head==N.mapping.map(k)-1)||Ar&&O.empty&&O.head==w)&&N.setSelection(O)}return i&&N.setMeta("composition",i),N.scrollIntoView()},A;if(_){if(y.pos==x.pos){Ar&&bs<=11&&y.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Mi(t),20));let R=M(t.state.tr.delete(w,k)),N=f.resolve(b.start).marksAcross(f.resolve(b.endA));N&&R.ensureMarks(N),t.dispatch(R)}else if(b.endA==b.endB&&(A=kse(y.parent.content.cut(y.parentOffset,x.parentOffset),C.parent.content.cut(C.parentOffset,b.endA-C.start())))){let R=M(t.state.tr);A.type=="add"?R.addMark(w,k,A.mark):R.removeMark(w,k,A.mark),t.dispatch(R)}else if(y.parent.child(y.index()).isText&&y.index()==x.index()-(x.textOffset?0:1)){let R=y.parent.textBetween(y.parentOffset,x.parentOffset),N=()=>M(t.state.tr.insertText(R,w,k));t.someProp("handleTextInput",O=>O(t,w,k,R,N))||t.dispatch(N())}}else t.dispatch(M())}function lO(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:hS(t,e.resolve(n.anchor),e.resolve(n.head))}function kse(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(Ae.from(u).eq(t))return{mark:a,type:s}}function Ose(t,e,n,r,o){if(n-e<=o.pos-r.pos||Hy(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(Hy(i,!0,!0));return!s.parent.isTextblock||s.pos>n||Hy(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Hy(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 Mse(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&&cO(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&&cO(t.textBetween(i-1,i+1))&&(i+=l?1:-1),s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}function cO(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 ZN{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 Gie,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(hO),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=fO(this),dO(this),this.nodeViews=pO(this),this.docView=Wk(this.state.doc,uO(this),zy(this),this.dom,this),this.domObserver=new vse(this,(r,o,i,s)=>Ese(this,r,o,i,s)),this.domObserver.start(),Yie(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&&Ix(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(hO),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&&(qN(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 g=pO(this);Rse(g,this.nodeViews)&&(this.nodeViews=g,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Ix(this),this.editable=fO(this),dO(this);let l=zy(this),u=uO(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 m=f=="preserve"&&s&&this.dom.style.overflowAnchor==null&&cie(this);if(s){this.domObserver.stop();let g=p&&(Ar||er)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&Ase(o.selection,e.selection);if(p){let b=er?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=lse(this)),(i||!this.docView.update(e.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=Wk(e.doc,u,l,this.dom,this)),b&&!this.trackWrites&&(g=!0)}g||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Die(this))?Mi(this,g):(DN(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():m&&uie(m)}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 Xe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&$k(this,n.getBoundingClientRect(),e)}else $k(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 KN(e.slice,e.move,o<0?void 0:Xe.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(Ar){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&&die(this.dom),Mi(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 gie(this,e)}coordsAtPos(e,n=1){return _N(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 Sie(this,n||this.state,e)}pasteHTML(e,n){return Ou(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Ou(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return mS(this,e)}destroy(){this.docView&&(Jie(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],zy(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Zoe())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Zie(this,e)}domSelectionRange(){let e=this.domSelection();return e?hr&&this.root.nodeType===11&&rie(this.dom.ownerDocument)==this.dom&&Sse(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}ZN.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function uO(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"),[Gn.node(0,t.state.doc.content.size,e)]}function dO(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:Gn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function fO(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Ase(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 pO(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 Rse(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 hO(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")}var Ts={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:"'"},Ip={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ise=typeof navigator<"u"&&/Mac/.test(navigator.platform),Dse=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Kn=0;Kn<10;Kn++)Ts[48+Kn]=Ts[96+Kn]=String(Kn);for(var Kn=1;Kn<=24;Kn++)Ts[Kn+111]="F"+Kn;for(var Kn=65;Kn<=90;Kn++)Ts[Kn]=String.fromCharCode(Kn+32),Ip[Kn]=String.fromCharCode(Kn);for(var Wy in Ts)Ip.hasOwnProperty(Wy)||(Ip[Wy]=Ts[Wy]);function Pse(t){var e=Ise&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Dse&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ip:Ts)[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 Nse=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Lse=typeof navigator<"u"&&/Win/.test(navigator.platform);function jse(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))Nse?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 $se(t){let e=Object.create(null);for(let n in t)e[jse(n)]=t[n];return e}function qy(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 Fse(t){return new cn({props:{handleKeyDown:SS(t)}})}function SS(t){let e=$se(t);return function(n,r){let o=Pse(r),i,s=e[qy(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[qy(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(Lse&&r.ctrlKey&&r.altKey)&&(i=Ts[r.keyCode])&&i!=o){let a=e[qy(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const CS=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function QN(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const eL=(t,e,n)=>{let r=QN(t,n);if(!r)return!1;let o=wS(r);if(!o){let s=r.blockRange(),a=s&&Jl(s);return a==null?!1:(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(cL(t,o,e,-1))return!0;if(r.parent.content.size==0&&(Hl(i,"end")||Xe.isSelectable(i)))for(let s=r.depth;;s--){let a=am(t.doc,r.before(s),r.after(s),$e.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(Hl(i,"end")?at.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):Xe.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},Bse=(t,e,n)=>{let r=QN(t,n);if(!r)return!1;let o=wS(r);return o?tL(t,o,e):!1},Vse=(t,e,n)=>{let r=rL(t,n);if(!r)return!1;let o=TS(r);return o?tL(t,o,e):!1};function tL(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=am(t.doc,i,l,$e.empty);if(!u||u.from!=i||u instanceof jn&&u.slice.size>=l-i)return!1;if(n){let f=t.tr.step(u);f.setSelection(nt.create(f.doc,i)),n(f.scrollIntoView())}return!0}function Hl(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 nL=(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=wS(r)}let s=i&&i.nodeBefore;return!s||!Xe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Xe.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function wS(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 rL(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const oL=(t,e,n)=>{let r=rL(t,n);if(!r)return!1;let o=TS(r);if(!o)return!1;let i=o.nodeAfter;if(cL(t,o,e,1))return!0;if(r.parent.content.size==0&&(Hl(i,"start")||Xe.isSelectable(i))){let s=am(t.doc,r.before(),r.after(),$e.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(Hl(i,"start")?at.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):Xe.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},iL=(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=TS(r)}let s=i&&i.nodeAfter;return!s||!Xe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Xe.create(t.doc,i.pos)).scrollIntoView()),!0)};function TS(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 zse=(t,e)=>{let n=t.selection,r=n instanceof Xe,o;if(r){if(n.node.isTextblock||!Is(t.doc,n.from))return!1;o=n.from}else if(o=sm(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(Xe.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},Hse=(t,e)=>{let n=t.selection,r;if(n instanceof Xe){if(n.node.isTextblock||!Is(t.doc,n.to))return!1;r=n.to}else if(r=sm(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},Wse=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&Jl(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},sL=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
250
|
+
`).scrollIntoView()),!0)};function _S(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 qse=(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=_S(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(at.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},aL=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof Wr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=_S(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(nt.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},lL=(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(Oi(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Jl(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function Use(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof Xe&&e.selection.node.isBlock)return!r.parentOffset||!Oi(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 g=r.depth;;g--)if(r.node(g).isBlock){l=r.end(g)==r.pos+(r.depth-g),u=r.start(g)==r.pos-(r.depth-g),a=_S(r.node(g-1).contentMatchAt(r.indexAfter(g-1))),i.unshift(l&&a?{type:a}:null),s=g;break}else{if(g==1)return!1;i.unshift(null)}let f=e.tr;(e.selection instanceof nt||e.selection instanceof Wr)&&f.deleteSelection();let p=f.mapping.map(r.pos),m=Oi(f.doc,p,i.length,i);if(m||(i[0]=a?{type:a}:null,m=Oi(f.doc,p,i.length,i)),!m)return!1;if(f.split(p,i.length,i),!l&&u&&r.node(s).type!=a){let g=f.mapping.map(r.before(s)),b=f.doc.resolve(g);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 Kse=Use(),Gse=(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(Xe.create(t.doc,o))),!0)};function Yse(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 cL(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,a,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&Yse(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 g=e.pos+i.nodeSize,b=Ae.empty;for(let C=s.length-1;C>=0;C--)b=Ae.from(s[C].create(null,b));b=Ae.from(o.copy(b));let y=t.tr.step(new Bn(e.pos-1,g,e.pos,g,new $e(b,1,0),s.length,!0)),x=y.doc.resolve(g+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:at.findFrom(e,1),p=f&&f.$from.blockRange(f.$to),m=p&&Jl(p);if(m!=null&&m>=e.depth)return n&&n(t.tr.lift(p,m).scrollIntoView()),!0;if(u&&Hl(i,"start",!0)&&Hl(o,"end")){let g=o,b=[];for(;b.push(g),!g.isTextblock;)g=g.lastChild;let y=i,x=1;for(;!y.isTextblock;y=y.firstChild)x++;if(g.canReplace(g.childCount,g.childCount,y.content)){if(n){let C=Ae.empty;for(let T=b.length-1;T>=0;T--)C=Ae.from(b[T].copy(C));let _=t.tr.step(new Bn(e.pos-b.length,e.pos+i.nodeSize,e.pos+x,e.pos+i.nodeSize-x,new $e(C,b.length,0),0,!0));n(_.scrollIntoView())}return!0}}return!1}function uL(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(nt.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const Jse=uL(-1),Xse=uL(1);function Zse(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&cS(s,t,e);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function mO(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 ES(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}ES(CS,eL,nL);ES(CS,oL,iL);ES(sL,aL,lL,Kse);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function Qse(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 eae(a,s,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function eae(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 _p(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new _p(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let a=cS(i,n,r,e);return a?(t&&tae(t,e,a,o,n),!0):!1}function tae(t,e,n,r,o){let i=Ae.empty;for(let f=n.length-1;f>=0;f--)i=Ae.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 $e(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,m=!0;f<p;f++,m=!1)!m&&Oi(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=u.child(f).nodeSize;return t}function nae(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?rae(e,n,t,i):oae(e,n,i):!0:!1}}function rae(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 $e(Ae.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new _p(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const a=Jl(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 oae(t,e,n){let r=t.tr,o=n.parent;for(let g=n.end,b=n.endIndex-1,y=n.startIndex;b>y;b--)g-=o.child(b).nodeSize,r.delete(g-1,g+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?Ae.empty:Ae.from(o))))return!1;let p=i.pos,m=p+s.nodeSize;return r.step(new Bn(p-(a?1:0),m+(l?1:0),p+1,m-1,new $e((a?Ae.empty:Ae.from(o.copy(Ae.empty))).append(l?Ae.empty:Ae.from(o.copy(Ae.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function iae(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=Ae.from(u?t.create():null),p=new $e(Ae.from(t.create(null,Ae.from(a.type.create(null,f)))),u?3:1,0),m=i.start,g=i.end;n(e.tr.step(new Bn(m-(u?3:1),g,m,g,p,1,!0)).scrollIntoView())}return!0}}function fm(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 pm{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(m=>m===!0)),p={...Object.fromEntries(Object.entries(r).map(([m,g])=>[m,(...y)=>{const x=this.buildProps(u,n),C=g(...y)(x);return a.push(C),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:fm({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 sae{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 Ge(t,e,n){return t.config[e]===void 0&&t.parent?Ge(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Ge(t.parent,e,n):null}):t.config[e]}function hm(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 dL(t){const e=[],{nodeExtensions:n,markExtensions:r}=hm(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=Ge(s,"addGlobalAttributes",a);if(!l)return;l().forEach(f=>{f.types.forEach(p=>{Object.entries(f.attributes).forEach(([m,g])=>{e.push({type:p,name:m,attribute:{...i,...g}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=Ge(s,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([f,p])=>{const m={...i,...p};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,e.push({type:s.name,name:f,attribute:m})})}),e}function Pn(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 Tt(...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,m]=f.split(":").map(g=>g.trim());u.set(p,m)}),a.forEach(f=>{const[p,m]=f.split(":").map(g=>g.trim());u.set(p,m)}),r[o]=Array.from(u.entries()).map(([f,p])=>`${f}: ${p}`).join("; ")}else r[o]=i}),r},{})}function Dp(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)=>Tt(n,r),{})}function fL(t){return typeof t=="function"}function gt(t,e=void 0,...n){return fL(t)?e?t.bind(e)(...n):t(...n):t}function aae(t={}){return Object.keys(t).length===0&&t.constructor===Object}function lae(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function gO(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):lae(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function yO(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&aae(n)?!1:n!=null))}function cae(t,e){var n;const r=dL(t),{nodeExtensions:o,markExtensions:i}=hm(t),s=(n=o.find(u=>Ge(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(u=>{const f=r.filter(C=>C.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:e},m=t.reduce((C,_)=>{const T=Ge(_,"extendNodeSchema",p);return{...C,...T?T(u):{}}},{}),g=yO({...m,content:gt(Ge(u,"content",p)),marks:gt(Ge(u,"marks",p)),group:gt(Ge(u,"group",p)),inline:gt(Ge(u,"inline",p)),atom:gt(Ge(u,"atom",p)),selectable:gt(Ge(u,"selectable",p)),draggable:gt(Ge(u,"draggable",p)),code:gt(Ge(u,"code",p)),whitespace:gt(Ge(u,"whitespace",p)),linebreakReplacement:gt(Ge(u,"linebreakReplacement",p)),defining:gt(Ge(u,"defining",p)),isolating:gt(Ge(u,"isolating",p)),attrs:Object.fromEntries(f.map(C=>{var _;return[C.name,{default:(_=C==null?void 0:C.attribute)===null||_===void 0?void 0:_.default}]}))}),b=gt(Ge(u,"parseHTML",p));b&&(g.parseDOM=b.map(C=>gO(C,f)));const y=Ge(u,"renderHTML",p);y&&(g.toDOM=C=>y({node:C,HTMLAttributes:Dp(C,f)}));const x=Ge(u,"renderText",p);return x&&(g.toText=x),[u.name,g]})),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},m=t.reduce((x,C)=>{const _=Ge(C,"extendMarkSchema",p);return{...x,..._?_(u):{}}},{}),g=yO({...m,inclusive:gt(Ge(u,"inclusive",p)),excludes:gt(Ge(u,"excludes",p)),group:gt(Ge(u,"group",p)),spanning:gt(Ge(u,"spanning",p)),code:gt(Ge(u,"code",p)),attrs:Object.fromEntries(f.map(x=>{var C;return[x.name,{default:(C=x==null?void 0:x.attribute)===null||C===void 0?void 0:C.default}]}))}),b=gt(Ge(u,"parseHTML",p));b&&(g.parseDOM=b.map(x=>gO(x,f)));const y=Ge(u,"renderHTML",p);return y&&(g.toDOM=x=>y({mark:x,HTMLAttributes:Dp(x,f)})),[u.name,g]}));return new eN({topNode:s,nodes:a,marks:l})}function Uy(t,e){return e.nodes[t]||e.marks[t]||null}function bO(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function kS(t,e){const n=Oa.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}const uae=(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 OS(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class od{constructor(e){this.find=e.find,this.handler=e.handler}}const dae=(t,e)=>{if(OS(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 mf(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(m=>m.type.spec.code))return!1;let f=!1;const p=uae(u)+i;return s.forEach(m=>{if(f)return;const g=dae(p,m.find);if(!g)return;const b=l.state.tr,y=fm({state:l.state,transaction:b}),x={from:r-(g[0].length-i.length),to:o},{commands:C,chain:_,can:T}=new pm({editor:n,state:y});m.handler({state:y,range:x,match:g,commands:C,chain:_,can:T})===null||!b.steps.length||(b.setMeta(a,{transform:b,from:r,to:o,text:i}),l.dispatch(b),f=!0)}),f}function fae(t){const{editor:e,rules:n}=t,r=new cn({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=kS(Ae.from(f),s.schema);const{from:p}=l,m=p+f.length;mf({editor:e,from:p,to:m,text:f,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,a){return mf({editor:e,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&mf({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?mf({editor:e,from:s.pos,to:s.pos,text:`
|
|
251
|
+
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function pae(t){return Object.prototype.toString.call(t).slice(8,-1)}function gf(t){return pae(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function mm(t,e){const n={...t};return gf(t)&&gf(e)&&Object.keys(e).forEach(r=>{gf(e[r])&&gf(t[r])?n[r]=mm(t[r],e[r]):n[r]=e[r]}),n}class Rr{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(Ge(this,"addOptions",{name:this.name}))),this.storage=gt(Ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Rr(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>mm(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Rr(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(Ge(n,"addOptions",{name:n.name})),n.storage=gt(Ge(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 hae(t){return typeof t=="number"}class mae{constructor(e){this.find=e.find,this.handler=e.handler}}const gae=(t,e,n)=>{if(OS(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 yae(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:u,can:f}=new pm({editor:e,state:n}),p=[];return n.doc.nodesBetween(r,o,(g,b)=>{if(!g.isTextblock||g.type.spec.code)return;const y=Math.max(r,b),x=Math.min(o,b+g.content.size),C=g.textBetween(y-b,x-b,void 0,"");gae(C,i.find,s).forEach(T=>{if(T.index===void 0)return;const w=y+T.index+1,k=w+T[0].length,M={from:n.tr.mapping.map(w),to:n.tr.mapping.map(k)},A=i.handler({state:n,range:M,match:T,commands:l,chain:u,can:f,pasteEvent:s,dropEvent:a});p.push(A)})}),p.every(g=>g!==null)}let yf=null;const bae=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 vae(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:m,rule:g,pasteEvt:b})=>{const y=f.tr,x=fm({state:f,transaction:y});if(!(!yae({editor:e,state:x,from:Math.max(p-1,0),to:m.b-1,rule:g,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 cn({view(p){const m=b=>{var y;r=!((y=p.dom.parentElement)===null||y===void 0)&&y.contains(b.target)?p.dom.parentElement:null,r&&(yf=e)},g=()=>{yf&&(yf=null)};return window.addEventListener("dragstart",m),window.addEventListener("dragend",g),{destroy(){window.removeEventListener("dragstart",m),window.removeEventListener("dragend",g)}}},props:{handleDOMEvents:{drop:(p,m)=>{if(i=r===p.dom.parentElement,a=m,!i){const g=yf;g!=null&&g.isEditable&&setTimeout(()=>{const b=g.state.selection;b&&g.commands.deleteRange({from:b.from,to:b.to})},10)}return!1},paste:(p,m)=>{var g;const b=(g=m.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return s=m,o=!!(b!=null&&b.includes("data-pm-slice")),!1}}},appendTransaction:(p,m,g)=>{const b=p[0],y=b.getMeta("uiEvent")==="paste"&&!o,x=b.getMeta("uiEvent")==="drop"&&!i,C=b.getMeta("applyPasteRules"),_=!!C;if(!y&&!x&&!_)return;if(_){let{text:k}=C;typeof k=="string"?k=k:k=kS(Ae.from(k),g.schema);const{from:M}=C,A=M+k.length,R=bae(k);return l({rule:f,state:g,from:M,to:{b:A},pasteEvt:R})}const T=m.doc.content.findDiffStart(g.doc.content),w=m.doc.content.findDiffEnd(g.doc.content);if(!(!hae(T)||!w||T===w.b))return l({rule:f,state:g,from:T,to:w,pasteEvt:s})}}))}function xae(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}class vl{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=vl.resolve(e),this.schema=cae(this.extensions,n),this.setupExtensions()}static resolve(e){const n=vl.sort(vl.flatten(e)),r=xae(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=Ge(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=Ge(r,"priority")||100,s=Ge(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:Uy(n.name,this.schema)},o=Ge(n,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,n=vl.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:Uy(s.name,this.schema)},l=[],u=Ge(s,"addKeyboardShortcuts",a);let f={};if(s.type==="mark"&&Ge(s,"exitable",a)&&(f.ArrowRight=()=>Rr.handleExit({editor:e,mark:s})),u){const y=Object.fromEntries(Object.entries(u()).map(([x,C])=>[x,()=>C({editor:e})]));f={...f,...y}}const p=Fse(f);l.push(p);const m=Ge(s,"addInputRules",a);bO(s,e.options.enableInputRules)&&m&&r.push(...m());const g=Ge(s,"addPasteRules",a);bO(s,e.options.enablePasteRules)&&g&&o.push(...g());const b=Ge(s,"addProseMirrorPlugins",a);if(b){const y=b();l.push(...y)}return l}).flat();return[fae({editor:e,rules:r}),...vae({editor:e,rules:o}),...i]}get attributes(){return dL(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=hm(this.extensions);return Object.fromEntries(n.filter(r=>!!Ge(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:Pn(r.name,this.schema)},s=Ge(r,"addNodeView",i);if(!s)return[];const a=(l,u,f,p,m)=>{const g=Dp(l,o);return s()({node:l,view:u,getPos:f,decorations:p,innerDecorations:m,editor:e,extension:r,HTMLAttributes:g})};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:Uy(e.name,this.schema)};e.type==="mark"&&(!((n=gt(Ge(e,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const o=Ge(e,"onBeforeCreate",r),i=Ge(e,"onCreate",r),s=Ge(e,"onUpdate",r),a=Ge(e,"onSelectionUpdate",r),l=Ge(e,"onTransaction",r),u=Ge(e,"onFocus",r),f=Ge(e,"onBlur",r),p=Ge(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 bn{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(Ge(this,"addOptions",{name:this.name}))),this.storage=gt(Ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new bn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>mm(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new bn({...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(Ge(n,"addOptions",{name:n.name})),n.storage=gt(Ge(n,"addStorage",{name:n.name,options:n.options})),n}}function pL(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
|
|
252
|
+
|
|
253
|
+
`,textSerializers:s={}}=n||{};let a="";return t.nodesBetween(r,o,(l,u,f,p)=>{var m;l.isBlock&&u>r&&(a+=i);const g=s==null?void 0:s[l.type.name];if(g)return f&&(a+=g({node:l,pos:u,parent:f,index:p,range:e})),!1;l.isText&&(a+=(m=l==null?void 0:l.text)===null||m===void 0?void 0:m.slice(Math.max(r,u)-u,o-u))}),a}function MS(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const Sae=bn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new cn({key:new Mn("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=MS(n);return pL(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),Cae=()=>({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),wae=(t=!1)=>({commands:e})=>e.setContent("",t),Tae=()=>({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)),m=u.resolve(f.map(l+a.nodeSize)),g=p.blockRange(m);if(!g)return;const b=Jl(g);if(a.type.isTextblock){const{defaultType:y}=p.parent.contentMatchAt(p.index());e.setNodeMarkup(g.start,y)}(b||b===0)&&e.lift(g,b)})}),!0},_ae=t=>e=>t(e),Eae=()=>({state:t,dispatch:e})=>aL(t,e),kae=(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 nt(r.doc.resolve(Math.max(s-1,0)))),!0},Oae=()=>({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},Mae=t=>({tr:e,state:n,dispatch:r})=>{const o=Pn(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},Aae=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},Rae=()=>({state:t,dispatch:e})=>CS(t,e),Iae=()=>({commands:t})=>t.keyboardShortcut("Enter"),Dae=()=>({state:t,dispatch:e})=>qse(t,e);function Pp(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:OS(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function hL(t,e,n={}){return t.find(r=>r.type===e&&Pp(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function vO(t,e,n={}){return!!hL(t,e,n)}function id(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),!hL([...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&&vO([...t.parent.child(s-1).marks],e,n);)s-=1,a-=t.parent.child(s).nodeSize;for(;l<t.parent.childCount&&vO([...t.parent.child(l).marks],e,n);)u+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function Do(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 Pae=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=Do(t,r.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:f}=a;if(o){const p=id(l,i,e);if(p&&p.from<=u&&p.to>=f){const m=nt.create(s,p.from,p.to);n.setSelection(m)}}return!0},Nae=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 mL(t){return t instanceof nt}function Ei(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function gL(t,e=null){if(!e)return null;const n=at.atStart(t),r=at.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?nt.create(t,Ei(0,o,i),Ei(t.content.size,o,i)):nt.create(t,Ei(e,o,i),Ei(e,o,i))}function yL(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function gm(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const Lae=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{(gm()||yL())&&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&&!mL(n.state.selection))return s(),!0;const a=gL(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},jae=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),$ae=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),bL=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&&bL(r)}return t};function bf(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return bL(n)}function Au(t,e,n){if(t instanceof ki||t instanceof Ae)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 Ae.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),Au("",e,n)}if(o){if(n.errorOnInvalidContent){let s=!1,a="";const l=new eN({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?ys.fromSchema(l).parseSlice(bf(t),n.parseOptions):ys.fromSchema(l).parse(bf(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const i=ys.fromSchema(e);return n.slice?i.parseSlice(bf(t),n.parseOptions).content:i.parse(bf(t),n.parseOptions)}return Au("",e,n)}function Fae(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof jn||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(at.near(t.doc.resolve(s),n))}const Bae=t=>!("type"in t),Vae=(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{Au(e,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(x){l(x)}try{a=Au(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},m=!0,g=!0;if((Bae(a)?a:[a]).forEach(x=>{x.check(),m=m?x.isText&&x.marks.length===0:!1,g=g?x.isBlock:!1}),f===p&&g){const{parent:x}=r.doc.resolve(f);x.isTextblock&&!x.type.spec.code&&!x.childCount&&(f-=1,p+=1)}let y;if(m){if(Array.isArray(e))y=e.map(x=>x.text||"").join("");else if(e instanceof Ae){let x="";e.forEach(C=>{C.text&&(x+=C.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&&Fae(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},zae=()=>({state:t,dispatch:e})=>zse(t,e),Hae=()=>({state:t,dispatch:e})=>Hse(t,e),Wae=()=>({state:t,dispatch:e})=>eL(t,e),qae=()=>({state:t,dispatch:e})=>oL(t,e),Uae=()=>({state:t,dispatch:e,tr:n})=>{try{const r=sm(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Kae=()=>({state:t,dispatch:e,tr:n})=>{try{const r=sm(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Gae=()=>({state:t,dispatch:e})=>Bse(t,e),Yae=()=>({state:t,dispatch:e})=>Vse(t,e);function vL(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Jae(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))gm()||vL()?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 Xae=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=Jae(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 Ru(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?Pn(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,(p,m)=>{if(p.isText)return;const g=Math.max(r,m),b=Math.min(o,m+p.nodeSize);a.push({node:p,from:g,to:b})});const l=o-r,u=a.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>Pp(p.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((p,m)=>p+m.to-m.from,0)>=l}const Zae=(t,e={})=>({state:n,dispatch:r})=>{const o=Pn(t,n.schema);return Ru(n,o,e)?Wse(n,r):!1},Qae=()=>({state:t,dispatch:e})=>lL(t,e),ele=t=>({state:e,dispatch:n})=>{const r=Pn(t,e.schema);return nae(r)(e,n)},tle=()=>({state:t,dispatch:e})=>sL(t,e);function sd(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function xO(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 nle=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=sd(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(i=Pn(t,r.schema)),a==="mark"&&(s=Do(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,xO(u.attrs,e)),s&&u.marks.length&&u.marks.forEach(p=>{s===p.type&&n.addMark(f,f+u.nodeSize,s.create(xO(p.attrs,e)))})})}),!0):!1},rle=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),ole=()=>({tr:t,dispatch:e})=>{if(e){const n=new Wr(t.doc);t.setSelection(n)}return!0},ile=()=>({state:t,dispatch:e})=>nL(t,e),sle=()=>({state:t,dispatch:e})=>iL(t,e),ale=()=>({state:t,dispatch:e})=>Gse(t,e),lle=()=>({state:t,dispatch:e})=>Xse(t,e),cle=()=>({state:t,dispatch:e})=>Jse(t,e);function Dx(t,e,n={},r={}){return Au(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const ule=(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=Dx(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 xL(t,e){const n=Do(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 dle(t,e){const n=new uS(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function fle(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 ple(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function AS(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 RS(t){return e=>AS(e.$from,t)}function SL(t,e){const n={from:0,to:t.content.size};return pL(t,n,e)}function hle(t,e){const n=Pn(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 IS(t,e){const n=sd(typeof e=="string"?e:e.name,t.schema);return n==="node"?hle(t,e):n==="mark"?xL(t,e):{}}function mle(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 gle(t){const e=mle(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 yle(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),m=e.invert().map(f);r.push({oldRange:{from:p,to:m},newRange:{from:u,to:f}})})}),gle(r)}function DS(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),s=id(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 Kf(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 Px(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?Do(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>Pp(p.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:p,$to:m})=>{const g=p.pos,b=m.pos;t.doc.nodesBetween(g,b,(y,x)=>{if(!y.isText&&!y.marks.length)return;const C=Math.max(g,x),_=Math.min(b,x+y.nodeSize),T=_-C;s+=T,a.push(...y.marks.map(w=>({mark:w,from:C,to:_})))})}),s===0)return!1;const l=a.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>Pp(p.mark.attrs,n,{strict:!1})).reduce((p,m)=>p+m.to-m.from,0),u=a.filter(p=>i?p.mark.type!==i&&p.mark.type.excludes(i):!0).reduce((p,m)=>p+m.to-m.from,0);return(l>0?l+u:l)>=s}function ble(t,e,n={}){if(!e)return Ru(t,null,n)||Px(t,null,n);const r=sd(e,t.schema);return r==="node"?Ru(t,e,n):r==="mark"?Px(t,e,n):!1}function SO(t,e){const{nodeExtensions:n}=hm(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(Ge(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function ym(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&&(ym(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function CL(t){return t instanceof Xe}function wL(t,e,n){const o=t.state.doc.content.size,i=Ei(e,0,o),s=Ei(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),m=Math.max(a.right,l.right),g=m-p,b=f-u,C={top:u,bottom:f,left:p,right:m,width:g,height:b,x:p,y:u};return{...C,toJSON:()=>C}}function vle(t,e,n){var r;const{selection:o}=e;let i=null;if(mL(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,m)=>{if(u)return!1;if(f.isInline){const g=!m||m.type.allowsMarkType(n),b=!!n.isInSet(f.marks)||!f.marks.some(y=>y.type.excludes(n));u=g&&b}return!u}),u})}const xle=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=Do(t,r.schema);if(o)if(s){const u=xL(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,(m,g)=>{const b=Math.max(g,f),y=Math.min(g+m.nodeSize,p);m.marks.find(C=>C.type===l)?m.marks.forEach(C=>{l===C.type&&n.addMark(b,y,l.create({...C.attrs,...e}))}):n.addMark(b,y,l.create(e))})});return vle(r,n,l)},Sle=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),Cle=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=Pn(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})=>mO(i,{...s,...e})(n)?!0:a.clearNodes()).command(({state:a})=>mO(i,{...s,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},wle=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=Ei(t,0,r.content.size),i=Xe.create(r,o);e.setSelection(i)}return!0},Tle=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,s=nt.atStart(r).from,a=nt.atEnd(r).to,l=Ei(o,s,a),u=Ei(i,s,a),f=nt.create(r,l,u);e.setSelection(f)}return!0},_le=t=>({state:e,dispatch:n})=>{const r=Pn(t,e.schema);return iae(r)(e,n)};function CO(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 Ele=({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=Kf(u,a.node().type.name,a.node().attrs);if(i instanceof Xe&&i.node.isBlock)return!a.parentOffset||!Oi(s,a.pos)?!1:(r&&(t&&CO(n,o.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const p=l.parentOffset===l.parent.content.size,m=a.depth===0?void 0:fle(a.node(-1).contentMatchAt(a.indexAfter(-1)));let g=p&&m?[{type:m,attrs:f}]:void 0,b=Oi(e.doc,e.mapping.map(a.pos),1,g);if(!g&&!b&&Oi(e.doc,e.mapping.map(a.pos),1,m?[{type:m}]:void 0)&&(b=!0,g=m?[{type:m,attrs:f}]:void 0),r){if(b&&(i instanceof nt&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,g),m&&!p&&!a.parentOffset&&a.parent.type!==m)){const y=e.mapping.map(a.before()),x=e.doc.resolve(y);a.node(-1).canReplaceWith(x.index(),x.index()+1,m)&&e.setNodeMarkup(e.mapping.map(a.before()),m)}t&&CO(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return b},kle=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const a=Pn(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 m=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 C=Ae.empty;const _=l.index(-1)?1:l.index(-2)?2:3;for(let R=l.depth-_;R>=l.depth-3;R-=1)C=Ae.from(l.node(R).copy(C));const T=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,w={...Kf(m,l.node().type.name,l.node().attrs),...e},k=((s=a.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(w))||void 0;C=C.append(Ae.from(a.createAndFill(null,k)||void 0));const M=l.before(l.depth-(_-1));n.replace(M,l.after(-T),new $e(C,4-_,0));let A=-1;n.doc.nodesBetween(M,n.doc.content.size,(R,N)=>{if(A>-1)return!1;R.isTextblock&&R.content.size===0&&(A=N+1)}),A>-1&&n.setSelection(nt.near(n.doc.resolve(A))),n.scrollIntoView()}return!0}const g=u.pos===l.end()?p.contentMatchAt(0).defaultType:null,b={...Kf(m,p.type.name,p.attrs),...e},y={...Kf(m,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,u.pos);const x=g?[{type:a,attrs:b},{type:g,attrs:y}]:[{type:a,attrs:b}];if(!Oi(n.doc,l.pos,2))return!1;if(o){const{selection:C,storedMarks:_}=r,{splittableMarks:T}=i.extensionManager,w=_||C.$to.parentOffset&&C.$from.marks();if(n.split(l.pos,2,x).scrollIntoView(),!w||!o)return!0;const k=w.filter(M=>T.includes(M.type.name));n.ensureMarks(k)}return!0},Ky=(t,e)=>{const n=RS(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},Gy=(t,e)=>{const n=RS(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},Ole=(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:l,commands:u,can:f})=>{const{extensions:p,splittableMarks:m}=o.extensionManager,g=Pn(t,s.schema),b=Pn(e,s.schema),{selection:y,storedMarks:x}=s,{$from:C,$to:_}=y,T=C.blockRange(_),w=x||y.$to.parentOffset&&y.$from.marks();if(!T)return!1;const k=RS(M=>SO(M.type.name,p))(y);if(T.depth>=1&&k&&T.depth-k.depth<=1){if(k.node.type===g)return u.liftListItem(b);if(SO(k.node.type.name,p)&&g.validContent(k.node.content)&&a)return l().command(()=>(i.setNodeMarkup(k.pos,g),!0)).command(()=>Ky(i,g)).command(()=>Gy(i,g)).run()}return!n||!w||!a?l().command(()=>f().wrapInList(g,r)?!0:u.clearNodes()).wrapInList(g,r).command(()=>Ky(i,g)).command(()=>Gy(i,g)).run():l().command(()=>{const M=f().wrapInList(g,r),A=w.filter(R=>m.includes(R.type.name));return i.ensureMarks(A),M?!0:u.clearNodes()}).wrapInList(g,r).command(()=>Ky(i,g)).command(()=>Gy(i,g)).run()},Mle=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Do(t,r.schema);return Px(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},Ale=(t,e,n={})=>({state:r,commands:o})=>{const i=Pn(t,r.schema),s=Pn(e,r.schema),a=Ru(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})},Rle=(t,e={})=>({state:n,commands:r})=>{const o=Pn(t,n.schema);return Ru(n,o,e)?r.lift(o):r.wrapIn(o,e)},Ile=()=>({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},Dle=()=>({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},Ple=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=Do(t,r.schema),{$from:u,empty:f,ranges:p}=a;if(!o)return!0;if(f&&s){let{from:m,to:g}=a;const b=(i=u.marks().find(x=>x.type===l))===null||i===void 0?void 0:i.attrs,y=id(u,l,b);y&&(m=y.from,g=y.to),n.removeMark(m,g,l)}else p.forEach(m=>{n.removeMark(m.$from.pos,m.$to.pos,l)});return n.removeStoredMark(l),!0},Nle=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=sd(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(i=Pn(t,r.schema)),a==="mark"&&(s=Do(t,r.schema)),o&&n.selection.ranges.forEach(l=>{const u=l.$from.pos,f=l.$to.pos;let p,m,g,b;n.selection.empty?r.doc.nodesBetween(u,f,(y,x)=>{i&&i===y.type&&(g=Math.max(x,u),b=Math.min(x+y.nodeSize,f),p=x,m=y)}):r.doc.nodesBetween(u,f,(y,x)=>{x<u&&i&&i===y.type&&(g=Math.max(x,u),b=Math.min(x+y.nodeSize,f),p=x,m=y),x>=u&&x<=f&&(i&&i===y.type&&n.setNodeMarkup(x,void 0,{...y.attrs,...e}),s&&y.marks.length&&y.marks.forEach(C=>{if(s===C.type){const _=Math.max(x,u),T=Math.min(x+y.nodeSize,f);n.addMark(_,T,s.create({...C.attrs,...e}))}}))}),m&&(p!==void 0&&n.setNodeMarkup(p,void 0,{...m.attrs,...e}),s&&m.marks.length&&m.marks.forEach(y=>{s===y.type&&n.addMark(g,b,s.create({...y.attrs,...e}))}))}),!0):!1},Lle=(t,e={})=>({state:n,dispatch:r})=>{const o=Pn(t,n.schema);return Zse(o,e)(n,r)},jle=(t,e={})=>({state:n,dispatch:r})=>{const o=Pn(t,n.schema);return Qse(o,e)(n,r)};var $le=Object.freeze({__proto__:null,blur:Cae,clearContent:wae,clearNodes:Tae,command:_ae,createParagraphNear:Eae,cut:kae,deleteCurrentNode:Oae,deleteNode:Mae,deleteRange:Aae,deleteSelection:Rae,enter:Iae,exitCode:Dae,extendMarkRange:Pae,first:Nae,focus:Lae,forEach:jae,insertContent:$ae,insertContentAt:Vae,joinBackward:Wae,joinDown:Hae,joinForward:qae,joinItemBackward:Uae,joinItemForward:Kae,joinTextblockBackward:Gae,joinTextblockForward:Yae,joinUp:zae,keyboardShortcut:Xae,lift:Zae,liftEmptyBlock:Qae,liftListItem:ele,newlineInCode:tle,resetAttributes:nle,scrollIntoView:rle,selectAll:ole,selectNodeBackward:ile,selectNodeForward:sle,selectParentNode:ale,selectTextblockEnd:lle,selectTextblockStart:cle,setContent:ule,setMark:xle,setMeta:Sle,setNode:Cle,setNodeSelection:wle,setTextSelection:Tle,sinkListItem:_le,splitBlock:Ele,splitListItem:kle,toggleList:Ole,toggleMark:Mle,toggleNode:Ale,toggleWrap:Rle,undoInputRule:Ile,unsetAllMarks:Dle,unsetMark:Ple,updateAttributes:Nle,wrapIn:Lle,wrapInList:jle});const Fle=bn.create({name:"commands",addCommands(){return{...$le}}}),Ble=bn.create({name:"drop",addProseMirrorPlugins(){return[new cn({key:new Mn("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),Vle=bn.create({name:"editable",addProseMirrorPlugins(){return[new cn({key:new Mn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),zle=new Mn("focusEvents"),Hle=bn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new cn({key:zle,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}}}})]}}),Wle=bn.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:m,parent:g}=p,b=p.parent.isTextblock&&m>0?a.doc.resolve(m-1):p,y=b.parent.type.spec.isolating,x=p.pos-p.parentOffset,C=y&&b.parent.childCount===1?x===p.pos:at.atStart(u).from===m;return!f||!g.type.isTextblock||g.textContent.length||!C||C&&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 gm()||vL()?i:o},addProseMirrorPlugins(){return[new cn({key:new Mn("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=at.atStart(e.doc).from,u=at.atEnd(e.doc).to;if(i||!(s===l&&a===u)||!ym(n.doc))return;const m=n.tr,g=fm({state:n,transaction:m}),{commands:b}=new pm({editor:this.editor,state:g});if(b.clearNodes(),!!m.steps.length)return m}})]}}),qle=bn.create({name:"paste",addProseMirrorPlugins(){return[new cn({key:new Mn("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),Ule=bn.create({name:"tabindex",addProseMirrorPlugins(){return[new cn({key:new Mn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Qs{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 Qs(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 Qs(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 Qs(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 Qs(a,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),e.push(new Qs(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 Kle=`.ProseMirror {
|
|
254
|
+
position: relative;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.ProseMirror {
|
|
258
|
+
word-wrap: break-word;
|
|
259
|
+
white-space: pre-wrap;
|
|
260
|
+
white-space: break-spaces;
|
|
261
|
+
-webkit-font-variant-ligatures: none;
|
|
262
|
+
font-variant-ligatures: none;
|
|
263
|
+
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.ProseMirror [contenteditable="false"] {
|
|
267
|
+
white-space: normal;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
271
|
+
white-space: pre-wrap;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.ProseMirror pre {
|
|
275
|
+
white-space: pre-wrap;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
img.ProseMirror-separator {
|
|
279
|
+
display: inline !important;
|
|
280
|
+
border: none !important;
|
|
281
|
+
margin: 0 !important;
|
|
282
|
+
width: 0 !important;
|
|
283
|
+
height: 0 !important;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.ProseMirror-gapcursor {
|
|
287
|
+
display: none;
|
|
288
|
+
pointer-events: none;
|
|
289
|
+
position: absolute;
|
|
290
|
+
margin: 0;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.ProseMirror-gapcursor:after {
|
|
294
|
+
content: "";
|
|
295
|
+
display: block;
|
|
296
|
+
position: absolute;
|
|
297
|
+
top: -2px;
|
|
298
|
+
width: 20px;
|
|
299
|
+
border-top: 1px solid black;
|
|
300
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@keyframes ProseMirror-cursor-blink {
|
|
304
|
+
to {
|
|
305
|
+
visibility: hidden;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.ProseMirror-hideselection *::selection {
|
|
310
|
+
background: transparent;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
314
|
+
background: transparent;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.ProseMirror-hideselection * {
|
|
318
|
+
caret-color: transparent;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
322
|
+
display: block;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
326
|
+
opacity: 0
|
|
327
|
+
}`;function Gle(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 Yle extends sae{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=Gle(Kle,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=fL(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?[Vle,Sae.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),Fle,Hle,Wle,Ule,Ble,qle].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 vl(o,this)}createCommandManager(){this.commandManager=new pm({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let n;try{n=Dx(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=Dx(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=gL(n,this.options.autofocus);this.view=new ZN(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:bl.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 IS(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,o=typeof e=="string"?n:e;return ble(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return kS(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
|
|
328
|
+
|
|
329
|
+
`,textSerializers:r={}}=e||{};return SL(this.state.doc,{blockSeparator:n,textSerializers:{...MS(this.schema),...r}})}get isEmpty(){return ym(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 Qs(n,this)}get $doc(){return this.$pos(0)}}function wa(t){return new od({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(DS(n.from,n.to,e.doc).filter(g=>g.mark.type.excluded.find(y=>y===t.type&&y!==g.mark.type)).filter(g=>g.to>u).length)return null;f<n.to&&i.delete(f,n.to),u>n.from&&i.delete(n.from+l,u);const m=n.from+l+s.length;i.addMark(n.from+l,m,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function TL(t){return new od({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 Nx(t){return new od({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 Wl(t){return new od({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&&cS(l,t.type,i);if(!u)return null;if(s.wrap(l,u),t.keepMarks&&t.editor){const{selection:p,storedMarks:m}=e,{splittableMarks:g}=t.editor.extensionManager,b=m||p.$to.parentOffset&&p.$from.marks();if(b){const y=b.filter(x=>g.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 an{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(Ge(this,"addOptions",{name:this.name}))),this.storage=gt(Ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new an(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>mm(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new an(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(Ge(n,"addOptions",{name:n.name})),n.storage=gt(Ge(n,"addStorage",{name:n.name,options:n.options})),n}}class Jle{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 m=0,g=0;if(this.dom!==p){const _=this.dom.getBoundingClientRect(),T=p.getBoundingClientRect(),w=(o=e.offsetX)!==null&&o!==void 0?o:(i=e.nativeEvent)===null||i===void 0?void 0:i.offsetX,k=(s=e.offsetY)!==null&&s!==void 0?s:(a=e.nativeEvent)===null||a===void 0?void 0:a.offsetY;m=T.x-_.x+w,g=T.y-_.y+k}const b=this.dom.cloneNode(!0);(l=e.dataTransfer)===null||l===void 0||l.setDragImage(b,m,g);const y=this.getPos();if(typeof y!="number")return;const x=Xe.create(u.state.doc,y),C=u.state.tr.setSelection(x);u.dispatch(C)}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=Xe.isSelectable(this.node),m=e.type==="copy",g=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||m||g||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"&&(gm()||yL())&&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 _s(t){return new mae({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),m=p+a.length;if(DS(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;m<n.to&&s.delete(m,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 Xle(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof Xe){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 Zle(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}const _L=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 Es(t){return Object.keys(t)}function sa(t,e){if(!t)throw new Error(e)}function PS(t,e){return e}const NS=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=NS(o);else{sa(!PS(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 Qle(t,e,n){var r="";return n.split(" ").forEach(function(o){t[o]!==void 0?e.push(t[o]+";"):o&&(r+=o+" ")}),r}var ece=function(e,n,r){var o=e.key+"-"+n.name;e.registered[o]===void 0&&(e.registered[o]=n.styles)},tce=function(e,n,r){ece(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 nce(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 rce(t){return t instanceof Object&&!("styles"in t)&&!("length"in t)&&!("__emotion_styles"in t)}const{createCssAndCx:oce}=(()=>{function t(n,r,o){const i=[],s=Qle(n,i,o);return i.length<2?o:s+r(i)}function e(n){const{cache:r}=n,o=(...s)=>{const a=EI(s,r.registered);tce(r,a);const l=`${r.key}-${a.name}`;e:{const u=s[0];if(!rce(u))break e;wO.saveClassNameCSSObjectMapping(r,l,u)}return l};return{css:o,cx:(...s)=>{const a=NS(s),l=wO.fixClassName(r,a,o);return t(r.registered,o,l)}}}return{createCssAndCx:e}})();function EL(t){const{useCache:e}=t;function n(){const r=e(),{css:o,cx:i}=nce(()=>oce({cache:r}),[r]);return{css:o,cx:i}}return{useCssAndCx:n}}const wO=(()=>{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 NS(e(r.split(" ").map(s=>[s,i==null?void 0:i.get(s)])).map(s=>typeof s=="string"?s:o(s)))}})()}})();function ks(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 LS(t,e,n){if(!(e instanceof Object))return t;const r={};return Es(t).forEach(o=>r[o]=n(t[o],e[o])),Es(e).forEach(o=>{if(o in t)return;const i=e[o];typeof i=="string"&&(r[o]=i)}),r}const kL=({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 m=l[p];m instanceof Object&&(f[p]=r(typeof m=="function"?m({theme:e,ownerState:n==null?void 0:n.ownerState,...n==null?void 0:n.props}):m))}return f},[l,ks(n==null?void 0:n.props),ks(n==null?void 0:n.ownerState),r]);return t=q.useMemo(()=>LS(t,u,o),[t,u,o]),{classes:t}},ice=Mo.__unsafe_useEmotionCache;let sce=0;function OL(t){const{useTheme:e,cache:n}=t,{useCache:r}=ML({cacheProvidedAtInception:n}),{useCssAndCx:o}=EL({useCache:r});function i(a){const{name:l,uniqId:u=`${sce++}`}=a??{},f=typeof l!="object"?l:Object.keys(l)[0];return function(p){const m=typeof p=="function"?p:()=>p;return function(b,y){const x=e();let{css:C,cx:_}=o();const T=r();let w=q.useMemo(()=>{const k={},M=typeof Proxy<"u"&&new Proxy({},{get:(N,O)=>(typeof O=="symbol"&&sa(!1),k[O]=`${T.key}-${u}${f!==void 0?`-${f}`:""}-${O}-ref`)}),A=m(x,b,M||{}),R=_L(Es(A).map(N=>{const O=A[N];return O.label||(O.label=`${f!==void 0?`${f}-`:""}${N}`),[N,`${C(O)}${PS(N,N in k)?` ${k[N]}`:""}`]}));return Es(k).forEach(N=>{N in R||(R[N]=k[N])}),R},[T,C,_,x,ks(b)]);{const k=y==null?void 0:y.props.classes;w=q.useMemo(()=>LS(w,k,_),[w,ks(k),_])}{const k=kL({classes:w,css:C,cx:_,name:f??"makeStyle no name",muiStyleOverridesParams:y,theme:x});k.classes!==void 0&&(w=k.classes),k.css!==void 0&&(C=k.css),k.cx!==void 0&&(_=k.cx)}return{classes:w,theme:x,css:C,cx:_}}}}function s(){const a=e(),{css:l,cx:u}=o();return{theme:a,css:l,cx:u}}return{makeStyles:i,useStyles:s}}const ace=q.createContext(void 0),{createUseCache:ML}=(()=>{function t(){return q.useContext(ace)}function e(n){const{cacheProvidedAtInception:r}=n;function o(){var i;const s=ice(),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(`
|
|
330
|
+
`));return l}return{useCache:o}}return{createUseCache:e}})();function TO(t){return t.charAt(0).toUpperCase()+t.slice(1)}function lce(t){const{useTheme:e,cache:n}=t,{makeStyles:r}=OL({useTheme:e,cache:n});function o(i,s,a){const l=typeof i=="string"?(()=>{const g=i,b=function({children:y,...x}){return q.createElement(g,x,y)};return Object.defineProperty(b,"name",{value:TO(g)}),b})():i,u=(()=>{{const{name:b}=a??{};if(b!==void 0)return typeof b!="object"?b:Object.keys(b)[0]}let g;e:{const b=l.displayName;if(typeof b!="string"||b==="")break e;g=b}e:{if(g!==void 0)break e;const b=l.name;if(typeof b!="string"||b==="")break e;g=b}if(g!==void 0)return g=g.replace(/\$/g,"usd"),g=g.replace(/\(/g,"_").replace(/\)/g,"_"),g=g.replace(/[^a-zA-Z0-9-_]/g,"_"),g})(),f=r({...a,name:u})(typeof s=="function"?(g,b,y)=>EO(s(g,b,y)):EO(s));function p(g){for(const b in g)if(b!=="root")return!0;return!1}const m=q.forwardRef(function(g,b){const{className:y,classes:x,...C}=g,{classes:_,cx:T}=f(g,{props:g}),w=T(_.root,y);return AL.set(_,{..._,root:w}),q.createElement(l,{ref:b,className:p(_)?y:w,...typeof i=="string"?{}:{classes:_},...C})});return u!==void 0&&(m.displayName=`${TO(u)}WithStyles`,Object.defineProperty(m,"name",{value:m.displayName})),m}return o.getClasses=cce,{withStyles:o}}const AL=new WeakMap,_O="getClasses should only be used in conjunction with withStyles";function cce(t){const e=t.classes;if(e===void 0)throw new Error(_O);const n=AL.get(e);if(n===void 0)throw new Error(_O);return n}function EO(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 uce=!(typeof document=="object"&&typeof(document==null?void 0:document.getElementById)=="function")&&!(typeof jest<"u")&&!(typeof mocha<"u")&&!(typeof __vitest_worker__<"u");function RL(t){IL=0,rs.splice(0,rs.length);const{useContext:e,usePlugin:n,cache:r}=t,{useCache:o}=ML({cacheProvidedAtInception:r}),{useCssAndCx:i}=EL({useCache:o});return{tss:Gf({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 IL=0;const rs=[];function Gf(t){const{useContext:e,useCache:n,useCssAndCx:r,usePlugin:o,name:i,doesUseNestedSelectors:s}=t;return{withParams:()=>Gf({...t}),withName:a=>Gf({...t,name:typeof a!="object"?a:Object.keys(a)[0]}),withNestedSelectors:()=>Gf({...t,doesUseNestedSelectors:!0}),create:a=>{const l=`x${IL++}`;if(i!==void 0)for(;;){const f=rs.find(p=>p.name===i);if(f===void 0)break;rs.splice(rs.indexOf(f),1)}const u=typeof a=="function"?a:()=>a;return function(p){var m,g,b;const{classesOverrides:y,...x}=p??{},C=e(),{css:_,cx:T}=r(),w=n(),k=()=>{const R={},N=u({...p,...C,...s?{classes:typeof Proxy>"u"?{}:new Proxy({},{get:(I,L)=>{if(typeof L=="symbol"&&sa(!1),uce&&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(`
|
|
331
|
+
`));e:{if(i===void 0)break e;let B=rs.find(V=>V.name===i&&V.idOfUseStyles===l);B===void 0&&(B={name:i,idOfUseStyles:l,nestedSelectorRuleNames:new Set},rs.push(B)),B.nestedSelectorRuleNames.add(L)}e:{if(i===void 0||!(rs.find(V=>V.name===i&&V.idOfUseStyles!==l&&V.nestedSelectorRuleNames.has(L))!==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 ${L}.
|
|
332
|
+
`,`This may lead to CSS class name collisions, causing nested selectors to target elements outside of the intended scope.
|
|
333
|
+
`,`Solution: Ensure each useStyles using nested selectors has a unique name.
|
|
334
|
+
`,'Use: tss.withName("UniqueName").withNestedSelectors<...>()...'].join(" "))}return R[L]=`${w.key}-${i!==void 0?i:l}-${L}-ref`}})}:{}});let O=_L(Es(N).map(I=>{const L=N[I];return L.label||(L.label=`${i!==void 0?`${i}-`:""}${I}`),[I,`${_(L)}${PS(I,I in R)?` ${R[I]}`:""}`]}));return Es(R).forEach(I=>{I in O||(O[I]=R[I])}),O=LS(O,y,T),O},M=dce({cache:w,cssObjectByRuleNameOrGetCssObjectByRuleName:a,classesOverridesRef:ks(y),paramsAndPluginParamsRef:ks(x),idOfUseStyles:l,context:C,getClasses:k}),A=o({classes:M,css:_,cx:T,idOfUseStyles:l,name:i,...C,...x});return{classes:(m=A.classes)!==null&&m!==void 0?m:M,css:(g=A.css)!==null&&g!==void 0?g:_,cx:(b=A.cx)!==null&&b!==void 0?b:T,...C}}}}}const vf=new WeakMap;function dce(t){const{cache:e,cssObjectByRuleNameOrGetCssObjectByRuleName:n,classesOverridesRef:r,paramsAndPluginParamsRef:o,idOfUseStyles:i,context:s,getClasses:a}=t;e:{const u=vf.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 m=p.get(o);if(m===void 0)break e;const g=m.find(({context:b})=>{if(b===s)return!0;if(Es(b).length!==Es(s).length)return!1;for(const y in b)if(ks(b[y])!==ks(s[y]))return!1;return!0});if(g===void 0)break e;if((g==null?void 0:g.idOfUseStyles)!==i){m.splice(m.indexOf(g),1);break e}return g.result}const l=a();{vf.has(e)||vf.set(e,new WeakMap);const u=vf.get(e);sa(u!==void 0),u.has(n)||u.set(n,new Map);const f=u.get(n);sa(f!==void 0),f.has(r)||(f.size>200&&f.clear(),f.set(r,new Map));const p=f.get(r);if(sa(p!==void 0),!p.has(o)){e:{const g=typeof o=="string"?257:5;if(p.size<g)break e;p.clear()}p.set(o,[])}let m=p.get(o);sa(m!==void 0),m.length>5&&(m=[]),m.push({idOfUseStyles:i,context:s,result:l})}return l}function fce(t){return{...OL(t),...lce(t)}}const{tss:pce}=RL({useContext:()=>({})});pce.create({});const{makeStyles:tn}=fce({useTheme:ji}),{tss:hce}=RL({useContext:function(){return{theme:ji()}},usePlugin:kL});hce.create({});var Yy,kO;function DL(){if(kO)return Yy;kO=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 Yy=t,Yy}var Jy,OO;function mce(){if(OO)return Jy;OO=1;function t(){this.__data__=[],this.size=0}return Jy=t,Jy}var Xy,MO;function PL(){if(MO)return Xy;MO=1;function t(e,n){return e===n||e!==e&&n!==n}return Xy=t,Xy}var Zy,AO;function bm(){if(AO)return Zy;AO=1;var t=PL();function e(n,r){for(var o=n.length;o--;)if(t(n[o][0],r))return o;return-1}return Zy=e,Zy}var Qy,RO;function gce(){if(RO)return Qy;RO=1;var t=bm(),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 Qy=r,Qy}var eb,IO;function yce(){if(IO)return eb;IO=1;var t=bm();function e(n){var r=this.__data__,o=t(r,n);return o<0?void 0:r[o][1]}return eb=e,eb}var tb,DO;function bce(){if(DO)return tb;DO=1;var t=bm();function e(n){return t(this.__data__,n)>-1}return tb=e,tb}var nb,PO;function vce(){if(PO)return nb;PO=1;var t=bm();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 nb=e,nb}var rb,NO;function vm(){if(NO)return rb;NO=1;var t=mce(),e=gce(),n=yce(),r=bce(),o=vce();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,rb=i,rb}var ob,LO;function xce(){if(LO)return ob;LO=1;var t=vm();function e(){this.__data__=new t,this.size=0}return ob=e,ob}var ib,jO;function Sce(){if(jO)return ib;jO=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return ib=t,ib}var sb,$O;function Cce(){if($O)return sb;$O=1;function t(e){return this.__data__.get(e)}return sb=t,sb}var ab,FO;function wce(){if(FO)return ab;FO=1;function t(e){return this.__data__.has(e)}return ab=t,ab}var lb,BO;function NL(){if(BO)return lb;BO=1;var t=_a(),e=$i(),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 lb=s,lb}var cb,VO;function Tce(){if(VO)return cb;VO=1;var t=Ro(),e=t["__core-js_shared__"];return cb=e,cb}var ub,zO;function _ce(){if(zO)return ub;zO=1;var t=Tce(),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 ub=n,ub}var db,HO;function LL(){if(HO)return db;HO=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 db=n,db}var fb,WO;function Ece(){if(WO)return fb;WO=1;var t=NL(),e=_ce(),n=$i(),r=LL(),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(m){if(!n(m)||e(m))return!1;var g=t(m)?f:i;return g.test(r(m))}return fb=p,fb}var pb,qO;function kce(){if(qO)return pb;qO=1;function t(e,n){return e==null?void 0:e[n]}return pb=t,pb}var hb,UO;function Ma(){if(UO)return hb;UO=1;var t=Ece(),e=kce();function n(r,o){var i=e(r,o);return t(i)?i:void 0}return hb=n,hb}var mb,KO;function jS(){if(KO)return mb;KO=1;var t=Ma(),e=Ro(),n=t(e,"Map");return mb=n,mb}var gb,GO;function xm(){if(GO)return gb;GO=1;var t=Ma(),e=t(Object,"create");return gb=e,gb}var yb,YO;function Oce(){if(YO)return yb;YO=1;var t=xm();function e(){this.__data__=t?t(null):{},this.size=0}return yb=e,yb}var bb,JO;function Mce(){if(JO)return bb;JO=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return bb=t,bb}var vb,XO;function Ace(){if(XO)return vb;XO=1;var t=xm(),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 vb=o,vb}var xb,ZO;function Rce(){if(ZO)return xb;ZO=1;var t=xm(),e=Object.prototype,n=e.hasOwnProperty;function r(o){var i=this.__data__;return t?i[o]!==void 0:n.call(i,o)}return xb=r,xb}var Sb,QO;function Ice(){if(QO)return Sb;QO=1;var t=xm(),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 Sb=n,Sb}var Cb,eM;function Dce(){if(eM)return Cb;eM=1;var t=Oce(),e=Mce(),n=Ace(),r=Rce(),o=Ice();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,Cb=i,Cb}var wb,tM;function Pce(){if(tM)return wb;tM=1;var t=Dce(),e=vm(),n=jS();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return wb=r,wb}var Tb,nM;function Nce(){if(nM)return Tb;nM=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return Tb=t,Tb}var _b,rM;function Sm(){if(rM)return _b;rM=1;var t=Nce();function e(n,r){var o=n.__data__;return t(r)?o[typeof r=="string"?"string":"hash"]:o.map}return _b=e,_b}var Eb,oM;function Lce(){if(oM)return Eb;oM=1;var t=Sm();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return Eb=e,Eb}var kb,iM;function jce(){if(iM)return kb;iM=1;var t=Sm();function e(n){return t(this,n).get(n)}return kb=e,kb}var Ob,sM;function $ce(){if(sM)return Ob;sM=1;var t=Sm();function e(n){return t(this,n).has(n)}return Ob=e,Ob}var Mb,aM;function Fce(){if(aM)return Mb;aM=1;var t=Sm();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 Mb=e,Mb}var Ab,lM;function jL(){if(lM)return Ab;lM=1;var t=Pce(),e=Lce(),n=jce(),r=$ce(),o=Fce();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,Ab=i,Ab}var Rb,cM;function Bce(){if(cM)return Rb;cM=1;var t=vm(),e=jS(),n=jL(),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 Rb=o,Rb}var Ib,uM;function Vce(){if(uM)return Ib;uM=1;var t=vm(),e=xce(),n=Sce(),r=Cce(),o=wce(),i=Bce();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,Ib=s,Ib}var Db,dM;function zce(){if(dM)return Db;dM=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 Db=t,Db}var Pb,fM;function $L(){if(fM)return Pb;fM=1;var t=Ma(),e=function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}}();return Pb=e,Pb}var Nb,pM;function FL(){if(pM)return Nb;pM=1;var t=$L();function e(n,r,o){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return Nb=e,Nb}var Lb,hM;function BL(){if(hM)return Lb;hM=1;var t=FL(),e=PL(),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 Lb=o,Lb}var jb,mM;function ad(){if(mM)return jb;mM=1;var t=BL(),e=FL();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 jb=n,jb}var $b,gM;function Hce(){if(gM)return $b;gM=1;function t(e,n){for(var r=-1,o=Array(e);++r<e;)o[r]=n(r);return o}return $b=t,$b}var Fb,yM;function Wce(){if(yM)return Fb;yM=1;var t=_a(),e=Ms(),n="[object Arguments]";function r(o){return e(o)&&t(o)==n}return Fb=r,Fb}var Bb,bM;function VL(){if(bM)return Bb;bM=1;var t=Wce(),e=Ms(),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 Bb=i,Bb}var Vb,vM;function Aa(){if(vM)return Vb;vM=1;var t=Array.isArray;return Vb=t,Vb}var Vc={exports:{}},zb,xM;function qce(){if(xM)return zb;xM=1;function t(){return!1}return zb=t,zb}Vc.exports;var SM;function zL(){return SM||(SM=1,function(t,e){var n=Ro(),r=qce(),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}(Vc,Vc.exports)),Vc.exports}var Hb,CM;function Uce(){if(CM)return Hb;CM=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 Hb=n,Hb}var Wb,wM;function HL(){if(wM)return Wb;wM=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return Wb=e,Wb}var qb,TM;function Kce(){if(TM)return qb;TM=1;var t=_a(),e=HL(),n=Ms(),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]",m="[object RegExp]",g="[object Set]",b="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",C="[object DataView]",_="[object Float32Array]",T="[object Float64Array]",w="[object Int8Array]",k="[object Int16Array]",M="[object Int32Array]",A="[object Uint8Array]",R="[object Uint8ClampedArray]",N="[object Uint16Array]",O="[object Uint32Array]",I={};I[_]=I[T]=I[w]=I[k]=I[M]=I[A]=I[R]=I[N]=I[O]=!0,I[r]=I[o]=I[x]=I[i]=I[C]=I[s]=I[a]=I[l]=I[u]=I[f]=I[p]=I[m]=I[g]=I[b]=I[y]=!1;function L(B){return n(B)&&e(B.length)&&!!I[t(B)]}return qb=L,qb}var Ub,_M;function Cm(){if(_M)return Ub;_M=1;function t(e){return function(n){return e(n)}}return Ub=t,Ub}var zc={exports:{}};zc.exports;var EM;function wm(){return EM||(EM=1,function(t,e){var n=XI(),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}(zc,zc.exports)),zc.exports}var Kb,kM;function Gce(){if(kM)return Kb;kM=1;var t=Kce(),e=Cm(),n=wm(),r=n&&n.isTypedArray,o=r?e(r):t;return Kb=o,Kb}var Gb,OM;function WL(){if(OM)return Gb;OM=1;var t=Hce(),e=VL(),n=Aa(),r=zL(),o=Uce(),i=Gce(),s=Object.prototype,a=s.hasOwnProperty;function l(u,f){var p=n(u),m=!p&&e(u),g=!p&&!m&&r(u),b=!p&&!m&&!g&&i(u),y=p||m||g||b,x=y?t(u.length,String):[],C=x.length;for(var _ in u)(f||a.call(u,_))&&!(y&&(_=="length"||g&&(_=="offset"||_=="parent")||b&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||o(_,C)))&&x.push(_);return x}return Gb=l,Gb}var Yb,MM;function $S(){if(MM)return Yb;MM=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||t;return n===o}return Yb=e,Yb}var Jb,AM;function qL(){if(AM)return Jb;AM=1;function t(e,n){return function(r){return e(n(r))}}return Jb=t,Jb}var Xb,RM;function Yce(){if(RM)return Xb;RM=1;var t=qL(),e=t(Object.keys,Object);return Xb=e,Xb}var Zb,IM;function Jce(){if(IM)return Zb;IM=1;var t=$S(),e=Yce(),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 Zb=o,Zb}var Qb,DM;function UL(){if(DM)return Qb;DM=1;var t=NL(),e=HL();function n(r){return r!=null&&e(r.length)&&!t(r)}return Qb=n,Qb}var ev,PM;function FS(){if(PM)return ev;PM=1;var t=WL(),e=Jce(),n=UL();function r(o){return n(o)?t(o):e(o)}return ev=r,ev}var tv,NM;function Xce(){if(NM)return tv;NM=1;var t=ad(),e=FS();function n(r,o){return r&&t(o,e(o),r)}return tv=n,tv}var nv,LM;function Zce(){if(LM)return nv;LM=1;function t(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}return nv=t,nv}var rv,jM;function Qce(){if(jM)return rv;jM=1;var t=$i(),e=$S(),n=Zce(),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 rv=i,rv}var ov,$M;function BS(){if($M)return ov;$M=1;var t=WL(),e=Qce(),n=UL();function r(o){return n(o)?t(o,!0):e(o)}return ov=r,ov}var iv,FM;function eue(){if(FM)return iv;FM=1;var t=ad(),e=BS();function n(r,o){return r&&t(o,e(o),r)}return iv=n,iv}var Hc={exports:{}};Hc.exports;var BM;function tue(){return BM||(BM=1,function(t,e){var n=Ro(),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,m=a?a(p):new u.constructor(p);return u.copy(m),m}t.exports=l}(Hc,Hc.exports)),Hc.exports}var sv,VM;function nue(){if(VM)return sv;VM=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 sv=t,sv}var av,zM;function rue(){if(zM)return av;zM=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 av=t,av}var lv,HM;function KL(){if(HM)return lv;HM=1;function t(){return[]}return lv=t,lv}var cv,WM;function VS(){if(WM)return cv;WM=1;var t=rue(),e=KL(),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 cv=i,cv}var uv,qM;function oue(){if(qM)return uv;qM=1;var t=ad(),e=VS();function n(r,o){return t(r,e(r),o)}return uv=n,uv}var dv,UM;function zS(){if(UM)return dv;UM=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 dv=t,dv}var fv,KM;function HS(){if(KM)return fv;KM=1;var t=qL(),e=t(Object.getPrototypeOf,Object);return fv=e,fv}var pv,GM;function GL(){if(GM)return pv;GM=1;var t=zS(),e=HS(),n=VS(),r=KL(),o=Object.getOwnPropertySymbols,i=o?function(s){for(var a=[];s;)t(a,n(s)),s=e(s);return a}:r;return pv=i,pv}var hv,YM;function iue(){if(YM)return hv;YM=1;var t=ad(),e=GL();function n(r,o){return t(r,e(r),o)}return hv=n,hv}var mv,JM;function YL(){if(JM)return mv;JM=1;var t=zS(),e=Aa();function n(r,o,i){var s=o(r);return e(r)?s:t(s,i(r))}return mv=n,mv}var gv,XM;function sue(){if(XM)return gv;XM=1;var t=YL(),e=VS(),n=FS();function r(o){return t(o,n,e)}return gv=r,gv}var yv,ZM;function JL(){if(ZM)return yv;ZM=1;var t=YL(),e=GL(),n=BS();function r(o){return t(o,n,e)}return yv=r,yv}var bv,QM;function aue(){if(QM)return bv;QM=1;var t=Ma(),e=Ro(),n=t(e,"DataView");return bv=n,bv}var vv,eA;function lue(){if(eA)return vv;eA=1;var t=Ma(),e=Ro(),n=t(e,"Promise");return vv=n,vv}var xv,tA;function cue(){if(tA)return xv;tA=1;var t=Ma(),e=Ro(),n=t(e,"Set");return xv=n,xv}var Sv,nA;function uue(){if(nA)return Sv;nA=1;var t=Ma(),e=Ro(),n=t(e,"WeakMap");return Sv=n,Sv}var Cv,rA;function WS(){if(rA)return Cv;rA=1;var t=aue(),e=jS(),n=lue(),r=cue(),o=uue(),i=_a(),s=LL(),a="[object Map]",l="[object Object]",u="[object Promise]",f="[object Set]",p="[object WeakMap]",m="[object DataView]",g=s(t),b=s(e),y=s(n),x=s(r),C=s(o),_=i;return(t&&_(new t(new ArrayBuffer(1)))!=m||e&&_(new e)!=a||n&&_(n.resolve())!=u||r&&_(new r)!=f||o&&_(new o)!=p)&&(_=function(T){var w=i(T),k=w==l?T.constructor:void 0,M=k?s(k):"";if(M)switch(M){case g:return m;case b:return a;case y:return u;case x:return f;case C:return p}return w}),Cv=_,Cv}var wv,oA;function due(){if(oA)return wv;oA=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 wv=n,wv}var Tv,iA;function fue(){if(iA)return Tv;iA=1;var t=Ro(),e=t.Uint8Array;return Tv=e,Tv}var _v,sA;function qS(){if(sA)return _v;sA=1;var t=fue();function e(n){var r=new n.constructor(n.byteLength);return new t(r).set(new t(n)),r}return _v=e,_v}var Ev,aA;function pue(){if(aA)return Ev;aA=1;var t=qS();function e(n,r){var o=r?t(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}return Ev=e,Ev}var kv,lA;function hue(){if(lA)return kv;lA=1;var t=/\w*$/;function e(n){var r=new n.constructor(n.source,t.exec(n));return r.lastIndex=n.lastIndex,r}return kv=e,kv}var Ov,cA;function mue(){if(cA)return Ov;cA=1;var t=Uu(),e=t?t.prototype:void 0,n=e?e.valueOf:void 0;function r(o){return n?Object(n.call(o)):{}}return Ov=r,Ov}var Mv,uA;function gue(){if(uA)return Mv;uA=1;var t=qS();function e(n,r){var o=r?t(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return Mv=e,Mv}var Av,dA;function yue(){if(dA)return Av;dA=1;var t=qS(),e=pue(),n=hue(),r=mue(),o=gue(),i="[object Boolean]",s="[object Date]",a="[object Map]",l="[object Number]",u="[object RegExp]",f="[object Set]",p="[object String]",m="[object Symbol]",g="[object ArrayBuffer]",b="[object DataView]",y="[object Float32Array]",x="[object Float64Array]",C="[object Int8Array]",_="[object Int16Array]",T="[object Int32Array]",w="[object Uint8Array]",k="[object Uint8ClampedArray]",M="[object Uint16Array]",A="[object Uint32Array]";function R(N,O,I){var L=N.constructor;switch(O){case g:return t(N);case i:case s:return new L(+N);case b:return e(N,I);case y:case x:case C:case _:case T:case w:case k:case M:case A:return o(N,I);case a:return new L;case l:case p:return new L(N);case u:return n(N);case f:return new L;case m:return r(N)}}return Av=R,Av}var Rv,fA;function bue(){if(fA)return Rv;fA=1;var t=$i(),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 Rv=n,Rv}var Iv,pA;function vue(){if(pA)return Iv;pA=1;var t=bue(),e=HS(),n=$S();function r(o){return typeof o.constructor=="function"&&!n(o)?t(e(o)):{}}return Iv=r,Iv}var Dv,hA;function xue(){if(hA)return Dv;hA=1;var t=WS(),e=Ms(),n="[object Map]";function r(o){return e(o)&&t(o)==n}return Dv=r,Dv}var Pv,mA;function Sue(){if(mA)return Pv;mA=1;var t=xue(),e=Cm(),n=wm(),r=n&&n.isMap,o=r?e(r):t;return Pv=o,Pv}var Nv,gA;function Cue(){if(gA)return Nv;gA=1;var t=WS(),e=Ms(),n="[object Set]";function r(o){return e(o)&&t(o)==n}return Nv=r,Nv}var Lv,yA;function wue(){if(yA)return Lv;yA=1;var t=Cue(),e=Cm(),n=wm(),r=n&&n.isSet,o=r?e(r):t;return Lv=o,Lv}var jv,bA;function Tue(){if(bA)return jv;bA=1;var t=Vce(),e=zce(),n=BL(),r=Xce(),o=eue(),i=tue(),s=nue(),a=oue(),l=iue(),u=sue(),f=JL(),p=WS(),m=due(),g=yue(),b=vue(),y=Aa(),x=zL(),C=Sue(),_=$i(),T=wue(),w=FS(),k=BS(),M=1,A=2,R=4,N="[object Arguments]",O="[object Array]",I="[object Boolean]",L="[object Date]",B="[object Error]",V="[object Function]",j="[object GeneratorFunction]",F="[object Map]",U="[object Number]",K="[object Object]",Y="[object RegExp]",G="[object Set]",Z="[object String]",me="[object Symbol]",he="[object WeakMap]",ge="[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[N]=xe[O]=xe[ge]=xe[oe]=xe[I]=xe[L]=xe[ye]=xe[de]=xe[X]=xe[Q]=xe[ae]=xe[F]=xe[U]=xe[K]=xe[Y]=xe[G]=xe[Z]=xe[me]=xe[ve]=xe[ne]=xe[ce]=xe[fe]=!0,xe[B]=xe[V]=xe[he]=!1;function _e(Te,Pe,Be,W,te,re){var Oe,Re=Pe&M,Ie=Pe&A,Ve=Pe&R;if(Be&&(Oe=te?Be(Te,W,te,re):Be(Te)),Oe!==void 0)return Oe;if(!_(Te))return Te;var rt=y(Te);if(rt){if(Oe=m(Te),!Re)return s(Te,Oe)}else{var tt=p(Te),kt=tt==V||tt==j;if(x(Te))return i(Te,Re);if(tt==K||tt==N||kt&&!te){if(Oe=Ie||kt?{}:b(Te),!Re)return Ie?l(Te,o(Oe,Te)):a(Te,r(Oe,Te))}else{if(!xe[tt])return te?Te:{};Oe=g(Te,tt,Re)}}re||(re=new t);var vn=re.get(Te);if(vn)return vn;re.set(Te,Oe),T(Te)?Te.forEach(function(Nt){Oe.add(_e(Nt,Pe,Be,Nt,Te,re))}):C(Te)&&Te.forEach(function(Nt,pe){Oe.set(pe,_e(Nt,Pe,Be,pe,Te,re))});var ct=Ve?Ie?f:u:Ie?k:w,An=rt?void 0:ct(Te);return e(An||Te,function(Nt,pe){An&&(pe=Nt,Nt=Te[pe]),n(Oe,pe,_e(Nt,Pe,Be,pe,Te,re))}),Oe}return jv=_e,jv}var $v,vA;function _ue(){if(vA)return $v;vA=1;var t=Aa(),e=Ih(),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 $v=o,$v}var Fv,xA;function Eue(){if(xA)return Fv;xA=1;var t=jL(),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,Fv=n,Fv}var Bv,SA;function kue(){if(SA)return Bv;SA=1;var t=Eue(),e=500;function n(r){var o=t(r,function(s){return i.size===e&&i.clear(),s}),i=o.cache;return o}return Bv=n,Bv}var Vv,CA;function Oue(){if(CA)return Vv;CA=1;var t=kue(),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 Vv=r,Vv}var zv,wA;function XL(){if(wA)return zv;wA=1;var t=Uu(),e=DL(),n=Aa(),r=Ih(),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 zv=s,zv}var Hv,TA;function ZL(){if(TA)return Hv;TA=1;var t=XL();function e(n){return n==null?"":t(n)}return Hv=e,Hv}var Wv,_A;function US(){if(_A)return Wv;_A=1;var t=Aa(),e=_ue(),n=Oue(),r=ZL();function o(i,s){return t(i)?i:e(i,s)?[i]:n(r(i))}return Wv=o,Wv}var qv,EA;function Mue(){if(EA)return qv;EA=1;function t(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}return qv=t,qv}var Uv,kA;function QL(){if(kA)return Uv;kA=1;var t=Ih();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Uv=e,Uv}var Kv,OA;function Aue(){if(OA)return Kv;OA=1;var t=US(),e=QL();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 Kv=n,Kv}var Gv,MA;function ej(){if(MA)return Gv;MA=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 Gv=t,Gv}var Yv,AA;function Rue(){if(AA)return Yv;AA=1;var t=Aue(),e=ej();function n(r,o){return o.length<2?r:t(r,e(o,0,-1))}return Yv=n,Yv}var Jv,RA;function Iue(){if(RA)return Jv;RA=1;var t=US(),e=Mue(),n=Rue(),r=QL();function o(i,s){return s=t(s,i),i=n(i,s),i==null||delete i[r(e(s))]}return Jv=o,Jv}var Xv,IA;function Due(){if(IA)return Xv;IA=1;var t=_a(),e=HS(),n=Ms(),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 m=a.call(p,"constructor")&&p.constructor;return typeof m=="function"&&m instanceof m&&s.call(m)==l}return Xv=u,Xv}var Zv,DA;function Pue(){if(DA)return Zv;DA=1;var t=Due();function e(n){return t(n)?void 0:n}return Zv=e,Zv}var Qv,PA;function Nue(){if(PA)return Qv;PA=1;var t=Uu(),e=VL(),n=Aa(),r=t?t.isConcatSpreadable:void 0;function o(i){return n(i)||e(i)||!!(r&&i&&i[r])}return Qv=o,Qv}var e0,NA;function Lue(){if(NA)return e0;NA=1;var t=zS(),e=Nue();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 e0=n,e0}var t0,LA;function jue(){if(LA)return t0;LA=1;var t=Lue();function e(n){var r=n==null?0:n.length;return r?t(n,1):[]}return t0=e,t0}var n0,jA;function $ue(){if(jA)return n0;jA=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 n0=t,n0}var r0,$A;function Fue(){if($A)return r0;$A=1;var t=$ue(),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 r0=n,r0}var o0,FA;function Bue(){if(FA)return o0;FA=1;function t(e){return function(){return e}}return o0=t,o0}var i0,BA;function Vue(){if(BA)return i0;BA=1;function t(e){return e}return i0=t,i0}var s0,VA;function zue(){if(VA)return s0;VA=1;var t=Bue(),e=$L(),n=Vue(),r=e?function(o,i){return e(o,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:n;return s0=r,s0}var a0,zA;function Hue(){if(zA)return a0;zA=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 a0=r,a0}var l0,HA;function Wue(){if(HA)return l0;HA=1;var t=zue(),e=Hue(),n=e(t);return l0=n,l0}var c0,WA;function que(){if(WA)return c0;WA=1;var t=jue(),e=Fue(),n=Wue();function r(o){return n(e(o,void 0,t),o+"")}return c0=r,c0}var u0,qA;function Uue(){if(qA)return u0;qA=1;var t=DL(),e=Tue(),n=Iue(),r=US(),o=ad(),i=Pue(),s=que(),a=JL(),l=1,u=2,f=4,p=s(function(m,g){var b={};if(m==null)return b;var y=!1;g=t(g,function(C){return C=r(C,m),y||(y=C.length>1),C}),o(m,a(m),b),y&&(b=e(b,l|u|f,i));for(var x=g.length;x--;)n(b,g[x]);return b});return u0=p,u0}var Kue=Uue();const il=yr(Kue),Np={TABLE_ELEMENT:1,MENU_BAR:2,NOTCHED_OUTLINE:2};function tj(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=Mo.keyframes`
|
|
335
|
+
0%, 95% {
|
|
336
|
+
opacity: 1;
|
|
337
|
+
}
|
|
338
|
+
100% {
|
|
339
|
+
opacity: 0;
|
|
340
|
+
}
|
|
341
|
+
`;return{...il(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":{...il(t.typography.h4,["lineHeight"]),fontWeight:500},"& h3":{...il(t.typography.h5,["lineHeight"]),fontWeight:500},"& h4":{...il(t.typography.h6,["lineHeight"]),fontWeight:500},"& h5":{...il(t.typography.subtitle1,["lineHeight"]),fontWeight:500},"& h6":{...il(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",...Gue(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:Np.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:Np.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 Gue(t){if(t.palette.mode!=="dark")return{};const e=t.palette.grey[200];return{backgroundColor:e,color:t.palette.getContrastText(e)}}const Yue="MuiTiptap-";function Jue(t,e){return`${Yue}${t}-${e}`}function Ra(t,e){const n={};return e.forEach(r=>{n[r]=Jue(t,r)}),n}const UA=Ra("ControlledBubbleMenu",["root","paper"]),Xue=tn({name:{ControlledBubbleMenu:Tm}})(t=>({root:{zIndex:t.zIndex.tooltip},paper:{backgroundColor:t.palette.background.default}}));function Tm({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:m,...g}){const{classes:b,cx:y}=Xue(void 0,{props:{classes:r}}),x=$.useTheme(),C=q.useCallback(()=>{const{ranges:_}=t.state.selection,T=Math.min(..._.map(k=>k.$from.pos)),w=Math.max(..._.map(k=>k.$to.pos));return{getBoundingClientRect:()=>{if(CL(t.state.selection)){const k=t.view.nodeDOM(T);if(k instanceof HTMLElement)return k.getBoundingClientRect()}return wL(t.view,T,w)}}},[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??C,className:y(UA.root,b.root,n),sx:o,container:a,disablePortal:l,transition:!0,...g,children:({TransitionProps:_})=>v.jsx($.Fade,{..._,timeout:{enter:x.transitions.duration.enteringScreen,exit:0},children:v.jsx($.Paper,{elevation:7,...m,className:y(UA.paper,b.paper,m==null?void 0:m.className),children:i})})})}const nj=q.createContext(void 0);function _t(){const t=q.useContext(nj);if(t===void 0)throw new Error("Tiptap editor not found in component context. Be sure to use <RichTextEditorProvider editor={editor} />!");return t}var ur;(function(t){t[t.HIDDEN=0]="HIDDEN",t[t.VIEW_LINK_DETAILS=1]="VIEW_LINK_DETAILS",t[t.EDIT_LINK=2]="EDIT_LINK"})(ur||(ur={}));const Zue=bn.create({name:"linkBubbleMenuHandler",addStorage(){return{state:ur.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!==ur.VIEW_LINK_DETAILS&&n().extendMarkRange("link").focus().run(),i=ur.VIEW_LINK_DETAILS):i=ur.EDIT_LINK,r&&(this.storage.state=i,this.storage.bubbleMenuOptions=t),!0},editLinkInBubbleMenu:()=>({dispatch:t})=>{const e=this.storage.state,n=ur.EDIT_LINK;return e===n?!1:(t&&(this.storage.state=n),!0)},closeLinkBubbleMenu:()=>({commands:t,dispatch:e})=>this.storage.state===ur.HIDDEN?!1:(t.focus(),e&&(this.storage.state=ur.HIDDEN),!0)}},onSelectionUpdate(){this.storage.state===ur.EDIT_LINK?this.editor.commands.closeLinkBubbleMenu():this.storage.state===ur.VIEW_LINK_DETAILS&&!this.editor.isActive("link")&&this.editor.commands.closeLinkBubbleMenu()},addKeyboardShortcuts(){return{"Mod-Shift-u":()=>(this.editor.commands.openLinkBubbleMenu(),!0)}},addProseMirrorPlugins(){return[new cn({key:new Mn("handleClickLinkForMenu"),props:{handleClick:(t,e,n)=>{const r=IS(t.state,"link");return n.target.closest("a")&&r.href&&this.storage.state===ur.HIDDEN?this.editor.commands.openLinkBubbleMenu():this.editor.commands.closeLinkBubbleMenu(),!1}}})]}});function rj(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])}/*!
|
|
342
|
+
* encodeurl
|
|
343
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
344
|
+
* MIT Licensed
|
|
345
|
+
*/var d0,KA;function Que(){if(KA)return d0;KA=1,d0=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 d0}var ede=Que();const tde=yr(ede);function oj(t){let e=t.trim();return e&&!/^(https?:\/\/|mailto:|tel:|sms:|\/|#)/.test(e)&&(e=`http://${e}`),tde(e)}function nde({editor:t,onCancel:e,onSave:n,labels:r,formatHref:o=oj}){var i,s,a,l,u,f;const p=t.isActive("link")?t.getAttributes("link").href:"",m=id(t.state.selection.$from,Do("link",t.schema)),g=m?t.state.doc.textBetween(m.from,m.to):"",b=t.state.doc.textBetween(t.state.selection.$from.pos,t.state.selection.$to.pos),y=g||b,[x,C]=q.useState(y),[_,T]=q.useState(p),w=q.useRef(null),k=q.useRef(null),M=!p,A=(i=r==null?void 0:r.editLinkAddTitle)!==null&&i!==void 0?i:"Add link",R=(s=r==null?void 0:r.editLinkEditTitle)!==null&&s!==void 0?s:"Edit link",N=M?A:R;q.useEffect(()=>{var B,V;!M||!y?(B=w.current)===null||B===void 0||B.focus({preventScroll:!0}):(V=k.current)===null||V===void 0||V.focus({preventScroll:!0})},[M,y]),rj("Escape",e);function O(){k.current&&T(o(k.current.value))}const[I,L]=q.useState(!1);return v.jsxs("form",{onSubmit:B=>{var V,j,F,U;B.preventDefault(),B.stopPropagation(),L(!0);const K=(j=(V=w.current)===null||V===void 0?void 0:V.value)!==null&&j!==void 0?j:"",Y=(U=(F=k.current)===null||F===void 0?void 0:F.value)!==null&&U!==void 0?U:"";n({text:K,link:Y}),L(!1)},autoComplete:"off",children:[v.jsx($.Typography,{variant:"h6",children:N}),v.jsx($.TextField,{inputRef:w,value:x,disabled:I,onChange:B=>{C(B.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:k,value:_,onChange:B=>{T(B.target.value)},disabled:I,label:(l=r==null?void 0:r.editLinkHrefInputLabel)!==null&&l!==void 0?l:"Link",margin:"dense",size:"small",type:"text",onBlur:O,onKeyDown:B=>{B.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:I,children:(f=r==null?void 0:r.editLinkSaveButtonLabel)!==null&&f!==void 0?f:"Save"})]})]})}var f0,GA;function rde(){if(GA)return f0;GA=1;var t=ej();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 f0=e,f0}var p0,YA;function KS(){if(YA)return p0;YA=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 p0=l,p0}var h0,JA;function ode(){if(JA)return h0;JA=1;var t=_a(),e=Ms(),n="[object RegExp]";function r(o){return e(o)&&t(o)==n}return h0=r,h0}var m0,XA;function ide(){if(XA)return m0;XA=1;var t=ode(),e=Cm(),n=wm(),r=n&&n.isRegExp,o=r?e(r):t;return m0=o,m0}var g0,ZA;function sde(){if(ZA)return g0;ZA=1;function t(e){return function(n){return n==null?void 0:n[e]}}return g0=t,g0}var y0,QA;function ade(){if(QA)return y0;QA=1;var t=sde(),e=t("length");return y0=e,y0}var b0,eR;function lde(){if(eR)return b0;eR=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}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=u+"?",y="["+i+"]?",x="(?:"+g+"(?:"+[f,p,m].join("|")+")"+y+b+")*",C=y+b+x,_="(?:"+[f+a+"?",a,p,m,s].join("|")+")",T=RegExp(l+"(?="+l+")|"+_+C,"g");function w(k){for(var M=T.lastIndex=0;T.test(k);)++M;return M}return b0=w,b0}var v0,tR;function cde(){if(tR)return v0;tR=1;var t=ade(),e=KS(),n=lde();function r(o){return e(o)?n(o):t(o)}return v0=r,v0}var x0,nR;function ude(){if(nR)return x0;nR=1;function t(e){return e.split("")}return x0=t,x0}var S0,rR;function dde(){if(rR)return S0;rR=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}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=u+"?",y="["+i+"]?",x="(?:"+g+"(?:"+[f,p,m].join("|")+")"+y+b+")*",C=y+b+x,_="(?:"+[f+a+"?",a,p,m,s].join("|")+")",T=RegExp(l+"(?="+l+")|"+_+C,"g");function w(k){return k.match(T)||[]}return S0=w,S0}var C0,oR;function fde(){if(oR)return C0;oR=1;var t=ude(),e=KS(),n=dde();function r(o){return e(o)?n(o):t(o)}return C0=r,C0}var w0,iR;function pde(){if(iR)return w0;iR=1;var t=ZI(),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 w0=r,w0}var T0,sR;function hde(){if(sR)return T0;sR=1;var t=pde();function e(n){var r=t(n),o=r%1;return r===r?o?r-o:r:0}return T0=e,T0}var _0,aR;function mde(){if(aR)return _0;aR=1;var t=XL(),e=rde(),n=KS(),r=$i(),o=ide(),i=cde(),s=fde(),a=hde(),l=ZL(),u=30,f="...",p=/\w*$/;function m(g,b){var y=u,x=f;if(r(b)){var C="separator"in b?b.separator:C;y="length"in b?a(b.length):y,x="omission"in b?t(b.omission):x}g=l(g);var _=g.length;if(n(g)){var T=s(g);_=T.length}if(y>=_)return g;var w=y-i(x);if(w<1)return x;var k=T?e(T,0,w).join(""):g.slice(0,w);if(C===void 0)return k+x;if(T&&(w+=k.length-w),o(C)){if(g.slice(w).search(C)){var M,A=k;for(C.global||(C=RegExp(C.source,l(p.exec(C))+"g")),C.lastIndex=0;M=C.exec(A);)var R=M.index;k=k.slice(0,R===void 0?w:R)}}else if(g.indexOf(t(C),w)!=w){var N=k.lastIndexOf(C);N>-1&&(k=k.slice(0,N))}return k+x}return _0=m,_0}var gde=mde();const yde=yr(gde);function bde(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 vde=tn({name:{ViewLinkMenuContent:ij}})({linkPreviewText:{overflowWrap:"anywhere"}});function ij({editor:t,onCancel:e,onEdit:n,onRemove:r,labels:o}){var i,s,a;const{classes:l}=vde(),u=id(t.state.selection.$to,Do("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 rj("Escape",e),v.jsxs(v.Fragment,{children:[v.jsx("div",{className:l.linkPreviewText,children:yde(f,{length:50,omission:"…"})}),v.jsx("div",{className:l.linkPreviewText,children:v.jsx($.Link,{href:p,target:"_blank",rel:"noopener",children:bde(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 xde=tn({name:{LinkBubbleMenu:sj}})(t=>({content:{padding:t.spacing(1.5,2,.5)}}));function sj({labels:t,formatHref:e,...n}){const{classes:r}=xde(),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===ur.VIEW_LINK_DETAILS?a=v.jsx(ij,{editor:o,onCancel:o.commands.closeLinkBubbleMenu,onEdit:o.commands.editLinkInBubbleMenu,onRemove:()=>{o.chain().unsetLink().setTextSelection(o.state.selection.to).focus().run()},labels:t}):s===ur.EDIT_LINK&&(a=v.jsx(nde,{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(Tm,{editor:o,open:s!==ur.HIDDEN,...i.bubbleMenuOptions,...n,children:v.jsx("div",{className:r.content,children:a})})}const E0=Ra("MenuBar",["root","sticky","nonSticky","content"]),Sde=tn({name:{MenuBar:aj}})((t,{stickyOffset:e})=>({root:{borderBottomColor:t.palette.divider,borderBottomStyle:"solid",borderBottomWidth:1},sticky:{position:"sticky",top:e??0,zIndex:Np.MENU_BAR,background:t.palette.background.default},nonSticky:{},content:{}}));function aj({hide:t,disableSticky:e,stickyOffset:n,children:r,className:o,classes:i,unmountOnExit:s=!0,...a}){const{classes:l,cx:u}=Sde({stickyOffset:n},{props:{classes:i}});return v.jsx($.Collapse,{...a,in:!t,unmountOnExit:s,className:u(E0.root,l.root,e?[E0.nonSticky,l.nonSticky]:[E0.sticky,l.sticky],o),children:v.jsx("div",{className:l.content,children:r})})}const Cde=tn({name:{MenuDivider:Ln}})(t=>({root:{height:18,margin:t.spacing(0,.5)}}));function Ln(t){const{classes:e,cx:n}=Cde();return v.jsx($.Divider,{orientation:"vertical",...t,className:n(e.root,t.className)})}var wde="tippy-box",lj="tippy-content",Tde="tippy-backdrop",cj="tippy-arrow",uj="tippy-svg-arrow",Xs={passive:!0,capture:!0},dj=function(){return document.body};function _de(t,e){return{}.hasOwnProperty.call(t,e)}function k0(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function GS(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function fj(t,e){return typeof t=="function"?t.apply(void 0,e):t}function lR(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function Ede(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function kde(t){return t.split(/\s+/).filter(Boolean)}function hl(t){return[].concat(t)}function cR(t,e){t.indexOf(e)===-1&&t.push(e)}function Ode(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function Mde(t){return t.split("-")[0]}function Lp(t){return[].slice.call(t)}function uR(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function ou(){return document.createElement("div")}function Iu(t){return["Element","Fragment"].some(function(e){return GS(t,e)})}function Ade(t){return GS(t,"NodeList")}function Rde(t){return GS(t,"MouseEvent")}function Ide(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function Dde(t){return Iu(t)?[t]:Ade(t)?Lp(t):Array.isArray(t)?t:Lp(document.querySelectorAll(t))}function O0(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function dR(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function Pde(t){var e,n=hl(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function Nde(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=Mde(s.placement),f=s.modifiersData.offset;if(!f)return!0;var p=u==="bottom"?f.top.y:0,m=u==="top"?f.bottom.y:0,g=u==="right"?f.left.x:0,b=u==="left"?f.right.x:0,y=i.top-r+p>l,x=r-i.bottom-m>l,C=i.left-n+g>l,_=n-i.right-b>l;return y||x||C||_})}function M0(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){t[r](o,n)})}function fR(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 qo={isTouch:!1},pR=0;function Lde(){qo.isTouch||(qo.isTouch=!0,window.performance&&document.addEventListener("mousemove",pj))}function pj(){var t=performance.now();t-pR<20&&(qo.isTouch=!1,document.removeEventListener("mousemove",pj)),pR=t}function jde(){var t=document.activeElement;if(Ide(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function $de(){document.addEventListener("touchstart",Lde,Xs),window.addEventListener("blur",jde)}var Fde=typeof window<"u"&&typeof document<"u",Bde=Fde?!!window.msCrypto:!1;function sl(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 hR(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function Vde(t){return hR(`
|
|
346
|
+
%ctippy.js
|
|
347
|
+
|
|
348
|
+
%c`+hR(t)+`
|
|
349
|
+
|
|
350
|
+
%c👷 This is a development-only message. It will be removed in production.
|
|
351
|
+
`)}function hj(t){return[Vde(t),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Du;process.env.NODE_ENV!=="production"&&zde();function zde(){Du=new Set}function Ti(t,e){if(t&&!Du.has(e)){var n;Du.add(e),(n=console).warn.apply(n,hj(e))}}function Lx(t,e){if(t&&!Du.has(e)){var n;Du.add(e),(n=console).error.apply(n,hj(e))}}function Hde(t){var e=!t,n=Object.prototype.toString.call(t)==="[object Object]"&&!t.addEventListener;Lx(e,["tippy() was passed","`"+String(t)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),Lx(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var mj={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wde={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},zr=Object.assign({appendTo:dj,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},mj,Wde),qde=Object.keys(zr),Ude=function(e){process.env.NODE_ENV!=="production"&&yj(e,[]);var n=Object.keys(e);n.forEach(function(r){zr[r]=e[r]})};function gj(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=zr[i])!=null?a:s}return r},{});return Object.assign({},t,n)}function Kde(t,e){var n=e?Object.keys(gj(Object.assign({},zr,{plugins:e}))):qde,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 mR(t,e){var n=Object.assign({},e,{content:fj(e.content,[t])},e.ignoreAttributes?{}:Kde(t,e.plugins));return n.aria=Object.assign({},zr.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 yj(t,e){t===void 0&&(t={}),e===void 0&&(e=[]);var n=Object.keys(t);n.forEach(function(r){var o=Ede(zr,Object.keys(mj)),i=!_de(o,r);i&&(i=e.filter(function(s){return s.name===r}).length===0),Ti(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.",`
|
|
352
|
+
|
|
353
|
+
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
354
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Gde=function(){return"innerHTML"};function jx(t,e){t[Gde()]=e}function gR(t){var e=ou();return t===!0?e.className=cj:(e.className=uj,Iu(t)?e.appendChild(t):jx(e,t)),e}function yR(t,e){Iu(e.content)?(jx(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?jx(t,e.content):t.textContent=e.content)}function $x(t){var e=t.firstElementChild,n=Lp(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(lj)}),arrow:n.find(function(r){return r.classList.contains(cj)||r.classList.contains(uj)}),backdrop:n.find(function(r){return r.classList.contains(Tde)})}}function bj(t){var e=ou(),n=ou();n.className=wde,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ou();r.className=lj,r.setAttribute("data-state","hidden"),yR(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props);function o(i,s){var a=$x(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)&&yR(u,t.props),s.arrow?f?i.arrow!==s.arrow&&(l.removeChild(f),l.appendChild(gR(s.arrow))):l.appendChild(gR(s.arrow)):f&&l.removeChild(f)}return{popper:e,onUpdate:o}}bj.$$tippy=!0;var Yde=1,xf=[],A0=[];function Jde(t,e){var n=mR(t,Object.assign({},zr,gj(uR(e)))),r,o,i,s=!1,a=!1,l=!1,u=!1,f,p,m,g=[],b=lR(fe,n.interactiveDebounce),y,x=Yde++,C=null,_=Ode(n.plugins),T={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},w={id:x,reference:t,popper:ou(),popperInstance:C,props:n,state:T,plugins:_,clearDelayTimeouts:Ve,setProps:rt,setContent:tt,show:kt,hide:vn,hideWithInteractivity:ct,enable:Re,disable:Ie,unmount:An,destroy:Nt};if(!n.render)return process.env.NODE_ENV!=="production"&&Lx(!0,"render() function has not been supplied."),w;var k=n.render(w),M=k.popper,A=k.onUpdate;M.setAttribute("data-tippy-root",""),M.id="tippy-"+w.id,w.popper=M,t._tippy=w,M._tippy=w;var R=_.map(function(pe){return pe.fn(w)}),N=t.hasAttribute("aria-expanded");return ve(),G(),U(),K("onCreate",[w]),n.showOnCreate&&re(),M.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),M.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&V().addEventListener("mousemove",b)}),w;function O(){var pe=w.props.touch;return Array.isArray(pe)?pe:[pe,0]}function I(){return O()[0]==="hold"}function L(){var pe;return!!((pe=w.props.render)!=null&&pe.$$tippy)}function B(){return y||t}function V(){var pe=B().parentNode;return pe?Pde(pe):document}function j(){return $x(M)}function F(pe){return w.state.isMounted&&!w.state.isVisible||qo.isTouch||f&&f.type==="focus"?0:k0(w.props.delay,pe?0:1,zr.delay)}function U(pe){pe===void 0&&(pe=!1),M.style.pointerEvents=w.props.interactive&&!pe?"":"none",M.style.zIndex=""+w.props.zIndex}function K(pe,He,Me){if(Me===void 0&&(Me=!0),R.forEach(function(Je){Je[pe]&&Je[pe].apply(Je,He)}),Me){var We;(We=w.props)[pe].apply(We,He)}}function Y(){var pe=w.props.aria;if(pe.content){var He="aria-"+pe.content,Me=M.id,We=hl(w.props.triggerTarget||t);We.forEach(function(Je){var lt=Je.getAttribute(He);if(w.state.isVisible)Je.setAttribute(He,lt?lt+" "+Me:Me);else{var jt=lt&<.replace(Me,"").trim();jt?Je.setAttribute(He,jt):Je.removeAttribute(He)}})}}function G(){if(!(N||!w.props.aria.expanded)){var pe=hl(w.props.triggerTarget||t);pe.forEach(function(He){w.props.interactive?He.setAttribute("aria-expanded",w.state.isVisible&&He===B()?"true":"false"):He.removeAttribute("aria-expanded")})}}function Z(){V().removeEventListener("mousemove",b),xf=xf.filter(function(pe){return pe!==b})}function me(pe){if(!(qo.isTouch&&(l||pe.type==="mousedown"))){var He=pe.composedPath&&pe.composedPath()[0]||pe.target;if(!(w.props.interactive&&fR(M,He))){if(hl(w.props.triggerTarget||t).some(function(Me){return fR(Me,He)})){if(qo.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else K("onClickOutside",[w,pe]);w.props.hideOnClick===!0&&(w.clearDelayTimeouts(),w.hide(),a=!0,setTimeout(function(){a=!1}),w.state.isMounted||ye())}}}function he(){l=!0}function ge(){l=!1}function oe(){var pe=V();pe.addEventListener("mousedown",me,!0),pe.addEventListener("touchend",me,Xs),pe.addEventListener("touchstart",ge,Xs),pe.addEventListener("touchmove",he,Xs)}function ye(){var pe=V();pe.removeEventListener("mousedown",me,!0),pe.removeEventListener("touchend",me,Xs),pe.removeEventListener("touchstart",ge,Xs),pe.removeEventListener("touchmove",he,Xs)}function de(pe,He){Q(pe,function(){!w.state.isVisible&&M.parentNode&&M.parentNode.contains(M)&&He()})}function X(pe,He){Q(pe,He)}function Q(pe,He){var Me=j().box;function We(Je){Je.target===Me&&(M0(Me,"remove",We),He())}if(pe===0)return He();M0(Me,"remove",p),M0(Me,"add",We),p=We}function ae(pe,He,Me){Me===void 0&&(Me=!1);var We=hl(w.props.triggerTarget||t);We.forEach(function(Je){Je.addEventListener(pe,He,Me),g.push({node:Je,eventType:pe,handler:He,options:Me})})}function ve(){I()&&(ae("touchstart",ce,{passive:!0}),ae("touchend",xe,{passive:!0})),kde(w.props.trigger).forEach(function(pe){if(pe!=="manual")switch(ae(pe,ce),pe){case"mouseenter":ae("mouseleave",xe);break;case"focus":ae(Bde?"focusout":"blur",_e);break;case"focusin":ae("focusout",_e);break}})}function ne(){g.forEach(function(pe){var He=pe.node,Me=pe.eventType,We=pe.handler,Je=pe.options;He.removeEventListener(Me,We,Je)}),g=[]}function ce(pe){var He,Me=!1;if(!(!w.state.isEnabled||Te(pe)||a)){var We=((He=f)==null?void 0:He.type)==="focus";f=pe,y=pe.currentTarget,G(),!w.state.isVisible&&Rde(pe)&&xf.forEach(function(Je){return Je(pe)}),pe.type==="click"&&(w.props.trigger.indexOf("mouseenter")<0||s)&&w.props.hideOnClick!==!1&&w.state.isVisible?Me=!0:re(pe),pe.type==="click"&&(s=!Me),Me&&!We&&Oe(pe)}}function fe(pe){var He=pe.target,Me=B().contains(He)||M.contains(He);if(!(pe.type==="mousemove"&&Me)){var We=te().concat(M).map(function(Je){var lt,jt=Je._tippy,ir=(lt=jt.popperInstance)==null?void 0:lt.state;return ir?{popperRect:Je.getBoundingClientRect(),popperState:ir,props:n}:null}).filter(Boolean);Nde(We,pe)&&(Z(),Oe(pe))}}function xe(pe){var He=Te(pe)||w.props.trigger.indexOf("click")>=0&&s;if(!He){if(w.props.interactive){w.hideWithInteractivity(pe);return}Oe(pe)}}function _e(pe){w.props.trigger.indexOf("focusin")<0&&pe.target!==B()||w.props.interactive&&pe.relatedTarget&&M.contains(pe.relatedTarget)||Oe(pe)}function Te(pe){return qo.isTouch?I()!==pe.type.indexOf("touch")>=0:!1}function Pe(){Be();var pe=w.props,He=pe.popperOptions,Me=pe.placement,We=pe.offset,Je=pe.getReferenceClientRect,lt=pe.moveTransition,jt=L()?$x(M).arrow:null,ir=Je?{getBoundingClientRect:Je,contextElement:Je.contextElement||B()}:t,br={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Da){var zi=Da.state;if(L()){var fd=j(),ec=fd.box;["placement","reference-hidden","escaped"].forEach(function(Pa){Pa==="placement"?ec.setAttribute("data-placement",zi.placement):zi.attributes.popper["data-popper-"+Pa]?ec.setAttribute("data-"+Pa,""):ec.removeAttribute("data-"+Pa)}),zi.attributes.popper={}}}},oi=[{name:"offset",options:{offset:We}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!lt}},br];L()&&jt&&oi.push({name:"arrow",options:{element:jt,padding:3}}),oi.push.apply(oi,(He==null?void 0:He.modifiers)||[]),w.popperInstance=lP(ir,M,Object.assign({},He,{placement:Me,onFirstUpdate:m,modifiers:oi}))}function Be(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function W(){var pe=w.props.appendTo,He,Me=B();w.props.interactive&&pe===dj||pe==="parent"?He=Me.parentNode:He=fj(pe,[Me]),He.contains(M)||He.appendChild(M),w.state.isMounted=!0,Pe(),process.env.NODE_ENV!=="production"&&Ti(w.props.interactive&&pe===zr.appendTo&&Me.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.",`
|
|
355
|
+
|
|
356
|
+
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
357
|
+
|
|
358
|
+
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
|
359
|
+
|
|
360
|
+
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function te(){return Lp(M.querySelectorAll("[data-tippy-root]"))}function re(pe){w.clearDelayTimeouts(),pe&&K("onTrigger",[w,pe]),oe();var He=F(!0),Me=O(),We=Me[0],Je=Me[1];qo.isTouch&&We==="hold"&&Je&&(He=Je),He?r=setTimeout(function(){w.show()},He):w.show()}function Oe(pe){if(w.clearDelayTimeouts(),K("onUntrigger",[w,pe]),!w.state.isVisible){ye();return}if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(pe.type)>=0&&s)){var He=F(!1);He?o=setTimeout(function(){w.state.isVisible&&w.hide()},He):i=requestAnimationFrame(function(){w.hide()})}}function Re(){w.state.isEnabled=!0}function Ie(){w.hide(),w.state.isEnabled=!1}function Ve(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)}function rt(pe){if(process.env.NODE_ENV!=="production"&&Ti(w.state.isDestroyed,sl("setProps")),!w.state.isDestroyed){K("onBeforeUpdate",[w,pe]),ne();var He=w.props,Me=mR(t,Object.assign({},He,uR(pe),{ignoreAttributes:!0}));w.props=Me,ve(),He.interactiveDebounce!==Me.interactiveDebounce&&(Z(),b=lR(fe,Me.interactiveDebounce)),He.triggerTarget&&!Me.triggerTarget?hl(He.triggerTarget).forEach(function(We){We.removeAttribute("aria-expanded")}):Me.triggerTarget&&t.removeAttribute("aria-expanded"),G(),U(),A&&A(He,Me),w.popperInstance&&(Pe(),te().forEach(function(We){requestAnimationFrame(We._tippy.popperInstance.forceUpdate)})),K("onAfterUpdate",[w,pe])}}function tt(pe){w.setProps({content:pe})}function kt(){process.env.NODE_ENV!=="production"&&Ti(w.state.isDestroyed,sl("show"));var pe=w.state.isVisible,He=w.state.isDestroyed,Me=!w.state.isEnabled,We=qo.isTouch&&!w.props.touch,Je=k0(w.props.duration,0,zr.duration);if(!(pe||He||Me||We)&&!B().hasAttribute("disabled")&&(K("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,L()&&(M.style.visibility="visible"),U(),oe(),w.state.isMounted||(M.style.transition="none"),L()){var lt=j(),jt=lt.box,ir=lt.content;O0([jt,ir],0)}m=function(){var oi;if(!(!w.state.isVisible||u)){if(u=!0,M.offsetHeight,M.style.transition=w.props.moveTransition,L()&&w.props.animation){var Ql=j(),Da=Ql.box,zi=Ql.content;O0([Da,zi],Je),dR([Da,zi],"visible")}Y(),G(),cR(A0,w),(oi=w.popperInstance)==null||oi.forceUpdate(),K("onMount",[w]),w.props.animation&&L()&&X(Je,function(){w.state.isShown=!0,K("onShown",[w])})}},W()}}function vn(){process.env.NODE_ENV!=="production"&&Ti(w.state.isDestroyed,sl("hide"));var pe=!w.state.isVisible,He=w.state.isDestroyed,Me=!w.state.isEnabled,We=k0(w.props.duration,1,zr.duration);if(!(pe||He||Me)&&(K("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,u=!1,s=!1,L()&&(M.style.visibility="hidden"),Z(),ye(),U(!0),L()){var Je=j(),lt=Je.box,jt=Je.content;w.props.animation&&(O0([lt,jt],We),dR([lt,jt],"hidden"))}Y(),G(),w.props.animation?L()&&de(We,w.unmount):w.unmount()}}function ct(pe){process.env.NODE_ENV!=="production"&&Ti(w.state.isDestroyed,sl("hideWithInteractivity")),V().addEventListener("mousemove",b),cR(xf,b),b(pe)}function An(){process.env.NODE_ENV!=="production"&&Ti(w.state.isDestroyed,sl("unmount")),w.state.isVisible&&w.hide(),w.state.isMounted&&(Be(),te().forEach(function(pe){pe._tippy.unmount()}),M.parentNode&&M.parentNode.removeChild(M),A0=A0.filter(function(pe){return pe!==w}),w.state.isMounted=!1,K("onHidden",[w]))}function Nt(){process.env.NODE_ENV!=="production"&&Ti(w.state.isDestroyed,sl("destroy")),!w.state.isDestroyed&&(w.clearDelayTimeouts(),w.unmount(),ne(),delete t._tippy,w.state.isDestroyed=!0,K("onDestroy",[w]))}}function ld(t,e){e===void 0&&(e={});var n=zr.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(Hde(t),yj(e,n)),$de();var r=Object.assign({},e,{plugins:n}),o=Dde(t);if(process.env.NODE_ENV!=="production"){var i=Iu(r.content),s=o.length>1;Ti(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.",`
|
|
361
|
+
|
|
362
|
+
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
363
|
+
|
|
364
|
+
`,`1) content: element.innerHTML
|
|
365
|
+
`,"2) content: () => element.cloneNode(true)"].join(" "))}var a=o.reduce(function(l,u){var f=u&&Jde(u,r);return f&&l.push(f),l},[]);return Iu(t)?a[0]:a}ld.defaultProps=zr;ld.setDefaultProps=Ude;ld.currentInput=qo;Object.assign({},eP,{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)}});ld.setDefaultProps({render:bj});function Xde(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fx={exports:{}},R0={};/**
|
|
366
|
+
* @license React
|
|
367
|
+
* use-sync-external-store-shim.production.min.js
|
|
368
|
+
*
|
|
369
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
370
|
+
*
|
|
371
|
+
* This source code is licensed under the MIT license found in the
|
|
372
|
+
* LICENSE file in the root directory of this source tree.
|
|
373
|
+
*/var bR;function Zde(){if(bR)return R0;bR=1;var t=q;function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function a(p,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),y=b[0].inst,x=b[1];return i(function(){y.value=g,y.getSnapshot=m,l(y)&&x({inst:y})},[p,g,m]),o(function(){return l(y)&&x({inst:y}),p(function(){l(y)&&x({inst:y})})},[p]),s(g),g}function l(p){var m=p.getSnapshot;p=p.value;try{var g=m();return!n(p,g)}catch{return!0}}function u(p,m){return m()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return R0.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:f,R0}var I0={};/**
|
|
374
|
+
* @license React
|
|
375
|
+
* use-sync-external-store-shim.development.js
|
|
376
|
+
*
|
|
377
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
378
|
+
*
|
|
379
|
+
* This source code is licensed under the MIT license found in the
|
|
380
|
+
* LICENSE file in the root directory of this source tree.
|
|
381
|
+
*/var vR;function Qde(){return vR||(vR=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(T){{for(var w=arguments.length,k=new Array(w>1?w-1:0),M=1;M<w;M++)k[M-1]=arguments[M];r("error",T,k)}}function r(T,w,k){{var M=e.ReactDebugCurrentFrame,A=M.getStackAddendum();A!==""&&(w+="%s",k=k.concat([A]));var R=k.map(function(N){return String(N)});R.unshift("Warning: "+w),Function.prototype.apply.call(console[T],console,R)}}function o(T,w){return T===w&&(T!==0||1/T===1/w)||T!==T&&w!==w}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 m(T,w,k){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=w();if(!p){var A=w();i(M,A)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}var R=s({inst:{value:M,getSnapshot:w}}),N=R[0].inst,O=R[1];return l(function(){N.value=M,N.getSnapshot=w,g(N)&&O({inst:N})},[T,M,w]),a(function(){g(N)&&O({inst:N});var I=function(){g(N)&&O({inst:N})};return T(I)},[T]),u(M),M}function g(T){var w=T.getSnapshot,k=T.value;try{var M=w();return!i(k,M)}catch{return!0}}function b(T,w,k){return w()}var y=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",x=!y,C=x?b:m,_=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:C;I0.useSyncExternalStore=_,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),I0}process.env.NODE_ENV==="production"?Fx.exports=Zde():Fx.exports=Qde();var _m=Fx.exports;const efe=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},tfe=({contentComponent:t})=>{const e=_m.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return q.createElement(q.Fragment,null,Object.values(e))};function nfe(){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]:ea.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 rfe 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=nfe(),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:efe(n,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&q.createElement(tfe,{contentComponent:e.contentComponent}))}}const ofe=q.forwardRef((t,e)=>{const n=q.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return q.createElement(rfe,{key:n,innerRef:e,...t})}),ife=q.memo(ofe);var sfe=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},afe=Xde(sfe),Bx={exports:{}},D0={};/**
|
|
382
|
+
* @license React
|
|
383
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
384
|
+
*
|
|
385
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
386
|
+
*
|
|
387
|
+
* This source code is licensed under the MIT license found in the
|
|
388
|
+
* LICENSE file in the root directory of this source tree.
|
|
389
|
+
*/var xR;function lfe(){if(xR)return D0;xR=1;var t=q,e=_m;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 D0.useSyncExternalStoreWithSelector=function(u,f,p,m,g){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 C(M){if(!_){if(_=!0,T=M,M=m(M),g!==void 0&&y.hasValue){var A=y.value;if(g(A,M))return w=A}return w=M}if(A=w,r(T,M))return A;var R=m(M);return g!==void 0&&g(A,R)?A:(T=M,w=R)}var _=!1,T,w,k=p===void 0?null:p;return[function(){return C(f())},k===null?void 0:function(){return C(k())}]},[f,p,m,g]);var x=o(u,b[0],b[1]);return s(function(){y.hasValue=!0,y.value=x},[x]),l(x),x},D0}var P0={};/**
|
|
390
|
+
* @license React
|
|
391
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
392
|
+
*
|
|
393
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
394
|
+
*
|
|
395
|
+
* This source code is licensed under the MIT license found in the
|
|
396
|
+
* LICENSE file in the root directory of this source tree.
|
|
397
|
+
*/var SR;function cfe(){return SR||(SR=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=_m;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,m,g,b){var y=i(null),x;y.current===null?(x={hasValue:!1,value:null},y.current=x):x=y.current;var C=a(function(){var k=!1,M,A,R=function(L){if(!k){k=!0,M=L;var B=g(L);if(b!==void 0&&x.hasValue){var V=x.value;if(b(V,B))return A=V,V}return A=B,B}var j=M,F=A;if(r(j,L))return F;var U=g(L);return b!==void 0&&b(F,U)?F:(M=L,A=U,U)},N=m===void 0?null:m,O=function(){return R(p())},I=N===null?void 0:function(){return R(N())};return[O,I]},[p,m,g,b]),_=C[0],T=C[1],w=o(f,_,T);return s(function(){x.hasValue=!0,x.value=w},[w]),l(w),w}P0.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),P0}process.env.NODE_ENV==="production"?Bx.exports=lfe():Bx.exports=cfe();var ufe=Bx.exports;const dfe=typeof window<"u"?q.useLayoutEffect:q.useEffect;class ffe{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 pfe(t){var e;const[n]=q.useState(()=>new ffe(t.editor)),r=ufe.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!==null&&e!==void 0?e:afe);return dfe(()=>n.watch(t.editor),[t.editor,n]),q.useDebugValue(r),r}const CR=process.env.NODE_ENV!=="production",Vx=typeof window>"u",hfe=Vx||!!(typeof window<"u"&&window.next);class YS{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 Vx||hfe?(CR&&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&&Vx&&CR)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 Yle(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?YS.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 vj(t={},e=[]){const n=q.useRef(t);n.current=t;const[r]=q.useState(()=>new YS(n)),o=_m.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return q.useDebugValue(o),q.useEffect(r.onRender(e)),pfe({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1?null:t.immediatelyRender&&i===0?0:i+1}),o}const mfe=q.createContext({editor:null});mfe.Consumer;const xj=q.createContext({onDragStart:void 0}),Sj=()=>q.useContext(xj),gfe=t=>{const e=t.as||"div",{nodeViewContentRef:n}=Sj();return q.createElement(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style}})},JS=q.forwardRef((t,e)=>{const{onDragStart:n}=Sj(),r=t.as||"div";return q.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function wR(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function TR(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.forward_ref)"||t.$$typeof.description==="react.forward_ref"))}function yfe(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.memo)"||t.$$typeof.description==="react.memo"))}function bfe(t){if(wR(t)||TR(t))return!0;if(yfe(t)){const e=t.type;if(e)return wR(e)||TR(e)}return!1}function vfe(){try{if(q.version)return parseInt(q.version.split(".")[0],10)>=19}catch{}return!1}class Cj{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?ea.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;const n=this.component,r=this.props,o=this.editor,i=vfe(),s=bfe(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 xfe extends Jle{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(xj.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 Cj(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=Dp(this.node,n);e=this.options.attrs({node:this.node,HTMLAttributes:r})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function XS(t,e){return n=>n.editor.contentComponent?new xfe(t,n,e):{}}const N0=Ra("RichTextContent",["root","readonly","editable"]),Sfe=tn({name:{RichTextContent:ZS}})((t,{disableDefaultStyles:e=!1})=>({root:e?{}:{"& .ProseMirror":{...tj(t)}},readonly:{},editable:{}}));function ZS({className:t,classes:e={},disableDefaultStyles:n=!1,...r}){const{classes:o,cx:i}=Sfe({disableDefaultStyles:n},{props:{classes:e}}),s=_t(),a=q.useMemo(()=>i(N0.root,t,o.root,s!=null&&s.isEditable?[N0.editable,o.editable]:[N0.readonly,o.readonly]),[t,o,i,s==null?void 0:s.isEditable]);return v.jsx($.Box,{...r,className:a,component:ife,editor:s})}function wj({editor:t,children:e}){return v.jsx(nj.Provider,{value:t,children:e})}const al=Ra("FieldContainer",["root","outlined","standard","focused","disabled","notchedOutline"]),Cfe=tn({name:{FieldContainer:Tj},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:Np.NOTCHED_OUTLINE}}));function Tj({variant:t="outlined",children:e,focused:n,disabled:r,classes:o={},className:i,...s}){const{classes:a,cx:l}=Cfe(void 0,{props:{classes:o}});return v.jsxs($.Box,{...s,className:l(al.root,a.root,t==="outlined"?[al.outlined,a.outlined]:[al.standard,a.standard],n&&[al.focused,a.focused],r&&[al.disabled,a.disabled],i),children:[e,t==="outlined"&&v.jsx("div",{className:l(al.notchedOutline,a.notchedOutline),"aria-hidden":!0})]})}var wfe=QI();const _j=yr(wfe);function Ej({editor:t,wait:e=250}){const[n,r]=q.useState(!!(t!=null&&t.isFocused)),o=q.useMemo(()=>_j(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 QS extends q.Component{constructor(e){var n,r;super(e),this.updateDebounced=_j(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 ll=Ra("RichTextField",["root","standard","outlined","menuBar","menuBarContent","content"]),Tfe=tn({name:{RichTextField:kj},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 kj({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:m,cx:g}=Tfe(void 0,{props:{classes:i}}),b=_t(),y=Ej({editor:b});return v.jsxs(Tj,{...u,variant:t,focused:!r&&y,disabled:r,className:g(ll.root,m.root,t==="outlined"?[ll.outlined,m.outlined]:[ll.standard,m.standard],o),children:[e&&v.jsx(aj,{...a,classes:{...a==null?void 0:a.classes,root:g(ll.menuBar,m.menuBar,(f=a==null?void 0:a.classes)===null||f===void 0?void 0:f.root),content:g(ll.content,m.menuBarContent,(p=a==null?void 0:a.classes)===null||p===void 0?void 0:p.content)},children:n?e:v.jsx(QS,{children:e})}),v.jsx(ZS,{...l,className:g(ll.content,m.content,l==null?void 0:l.className)}),s]})}const Oj=q.forwardRef(function({className:e,renderControls:n,RichTextFieldProps:r={},sx:o,children:i,editorDependencies:s=[],editable:a=!0,...l},u){const f=vj({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(wj,{editor:f,children:[v.jsx(kj,{disabled:!a,controls:n==null?void 0:n(f),className:e,sx:o,...r}),i==null?void 0:i(f)]})});function _fe({RichTextContentProps:t,sx:e,...n}){const r=vj({...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(wj,{editor:r,children:v.jsx(ZS,{sx:e,...t})})}function Efe(t){return t.content?v.jsx(_fe,{...t}):null}const kfe=$.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"),Ofe=$.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"),Mfe=$.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"),Afe=$.createSvgIcon(v.jsx("path",{d:"M 2 20 h 20 v 4 H 2 v -4 z"}),"FormatColorBar"),Rfe=$.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"),Ife=$.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"),Dfe=$.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"),Pfe=$.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"),Nfe=$.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"),Lfe=$.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"),jfe=$.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"),$fe=$.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"),Ffe=$.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"),Bfe=$.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"),Vfe=$.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 L0,j0;function zfe(){return L0===void 0&&(L0=navigator.platform.includes("Mac")),L0}function Hfe(){return zfe()?"⌘":"Ctrl"}function Wfe(){return j0===void 0&&(j0=window&&"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),j0}const qfe=tn({name:{MenuButtonTooltip:wo}})(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 wo({label:t,shortcutKeys:e,placement:n="top",contentWrapperClassName:r,children:o,...i}){const{classes:s}=qfe();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"?Hfe():a},l))})]}):"",placement:n,arrow:!0,...i,children:v.jsx("span",{className:r,children:o})})}const Pu="1.25rem",Ufe=tn({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}=Ufe();return v.jsx("span",{className:s.root,children:v.jsx(wo,{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 Kfe=tn({name:{MenuControlsContainer:Em}})(t=>({root:{display:"flex",rowGap:t.spacing(.3),columnGap:t.spacing(.3),alignItems:"center",flexWrap:"wrap"}}));function Em({children:t,className:e,debounced:n,DebounceProps:r,...o}){const{classes:i,cx:s}=Kfe(),a=v.jsx($.Box,{...o,className:s(i.root,e),children:t});return n?v.jsx(QS,{...r,children:a}):a}function Gfe({className:t,labels:e}){var n,r,o,i,s,a,l,u,f,p,m,g,b;const y=_t();return v.jsxs(Em,{className:t,children:[v.jsx(St,{tooltipLabel:(n=e==null?void 0:e.insertColumnBefore)!==null&&n!==void 0?n:"Insert column before",IconComponent:Dfe,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:Pfe,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:Ofe,onClick:()=>y==null?void 0:y.chain().focus().deleteColumn().run(),disabled:!(y!=null&&y.can().deleteColumn())}),v.jsx(Ln,{}),v.jsx(St,{tooltipLabel:(i=e==null?void 0:e.insertRowAbove)!==null&&i!==void 0?i:"Insert row above",IconComponent:Lfe,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:Nfe,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:Mfe,onClick:()=>y==null?void 0:y.chain().focus().deleteRow().run(),disabled:!(y!=null&&y.can().deleteRow())}),v.jsx(Ln,{}),v.jsx(St,{tooltipLabel:(l=e==null?void 0:e.mergeCells)!==null&&l!==void 0?l:"Merge cells",IconComponent:Ffe,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:Bfe,onClick:()=>y==null?void 0:y.chain().focus().splitCell().run(),disabled:!(y!=null&&y.can().splitCell())}),v.jsx(Ln,{}),v.jsx(St,{tooltipLabel:(f=e==null?void 0:e.toggleHeaderRow)!==null&&f!==void 0?f:"Toggle header row",IconComponent:$fe,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:jfe,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderColumn().run(),disabled:!(y!=null&&y.can().toggleHeaderColumn())}),v.jsx(St,{tooltipLabel:(m=e==null?void 0:e.toggleHeaderCell)!==null&&m!==void 0?m:"Toggle header cell",IconComponent:pK,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderCell().run(),disabled:!(y!=null&&y.can().toggleHeaderCell()),selected:(g=y==null?void 0:y.isActive("tableHeader"))!==null&&g!==void 0?g:!1}),v.jsx(Ln,{}),v.jsx(St,{tooltipLabel:(b=e==null?void 0:e.deleteTable)!==null&&b!==void 0?b:"Delete table",IconComponent:CK,onClick:()=>y==null?void 0:y.chain().focus().deleteTable().run(),disabled:!(y!=null&&y.can().deleteTable())})]})}const Yfe=tn({name:{TableBubbleMenu:Mj}})(t=>({controls:{maxWidth:"90vw",padding:t.spacing(.5,1)}}));function Mj({disableDebounce:t=!1,DebounceProps:e,labels:n,...r}){const o=_t(),{classes:i}=Yfe(),s=Ej({editor:o}),a=q.useMemo(()=>o?{getBoundingClientRect:()=>{const u=o.isActive("table")?AS(o.state.selection.$anchor,g=>g.type.name==="table"):null;if(u){const g=o.view.nodeDOM(u.pos),b=g==null?void 0:g.querySelector("table");if(b)return b.getBoundingClientRect()}const{ranges:f}=o.state.selection,p=Math.min(...f.map(g=>g.$from.pos)),m=Math.max(...f.map(g=>g.$to.pos));return wL(o.view,p,m)}}:null,[o]);if(!(o!=null&&o.isEditable))return null;const l=v.jsx(Gfe,{className:i.controls,labels:n});return v.jsx(Tm,{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(QS,{...e,children:l})})}function Xl(){return(Xl=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 eC(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 zx(t){var e=q.useRef(t),n=q.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var ql=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},iu=function(t){return"touches"in t},Hx=function(t){return t&&t.ownerDocument.defaultView||self},_R=function(t,e,n){var r=t.getBoundingClientRect(),o=iu(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:ql((o.pageX-(r.left+Hx(t).pageXOffset))/r.width),top:ql((o.pageY-(r.top+Hx(t).pageYOffset))/r.height)}},ER=function(t){!iu(t)&&t.preventDefault()},tC=q.memo(function(t){var e=t.onMove,n=t.onKey,r=eC(t,["onMove","onKey"]),o=q.useRef(null),i=zx(e),s=zx(n),a=q.useRef(null),l=q.useRef(!1),u=q.useMemo(function(){var g=function(x){ER(x),(iu(x)?x.touches.length>0:x.buttons>0)&&o.current?i(_R(o.current,x,a.current)):y(!1)},b=function(){return y(!1)};function y(x){var C=l.current,_=Hx(o.current),T=x?_.addEventListener:_.removeEventListener;T(C?"touchmove":"mousemove",g),T(C?"touchend":"mouseup",b)}return[function(x){var C=x.nativeEvent,_=o.current;if(_&&(ER(C),!function(w,k){return k&&!iu(w)}(C,l.current)&&_)){if(iu(C)){l.current=!0;var T=C.changedTouches||[];T.length&&(a.current=T[0].identifier)}_.focus(),i(_R(_,C,a.current)),y(!0)}},function(x){var C=x.which||x.keyCode;C<37||C>40||(x.preventDefault(),s({left:C===39?.05:C===37?-.05:0,top:C===40?.05:C===38?-.05:0}))},y]},[s,i]),f=u[0],p=u[1],m=u[2];return q.useEffect(function(){return m},[m]),q.createElement("div",Xl({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:o,onKeyDown:p,tabIndex:0,role:"slider"}))}),cd=function(t){return t.filter(Boolean).join(" ")},nC=function(t){var e=t.color,n=t.left,r=t.top,o=r===void 0?.5:r,i=cd(["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}}))},$n=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},Aj=function(t){return Zfe(Wx(t))},Wx=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?$n(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?$n(parseInt(t.substring(6,8),16)/255,2):1}},Rj=function(t){return Xfe(Jfe(t))},Ij=function(t){var e=t.s,n=t.v,r=t.a,o=(200-e)*n/100;return{h:$n(t.h),s:$n(o>0&&o<200?e*n/100/(o<=100?o:200-o)*100:0),l:$n(o/2),a:$n(r,2)}},qx=function(t){var e=Ij(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},$0=function(t){var e=Ij(t);return"hsla("+e.h+", "+e.s+"%, "+e.l+"%, "+e.a+")"},Jfe=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:$n(255*[r,a,s,s,l,r][u]),g:$n(255*[l,r,r,a,s,s][u]),b:$n(255*[s,s,l,r,r,a][u]),a:$n(o,2)}},Sf=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Xfe=function(t){var e=t.r,n=t.g,r=t.b,o=t.a,i=o<1?Sf($n(255*o)):"";return"#"+Sf(e)+Sf(n)+Sf(r)+i},Zfe=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:$n(60*(a<0?a+6:a)),s:$n(i?s/i*100:0),v:$n(i/255*100),a:o}},Dj=q.memo(function(t){var e=t.hue,n=t.onChange,r=cd(["react-colorful__hue",t.className]);return q.createElement("div",{className:r},q.createElement(tC,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:ql(e+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":$n(e),"aria-valuemax":"360","aria-valuemin":"0"},q.createElement(nC,{className:"react-colorful__hue-pointer",left:e/360,color:qx({h:e,s:100,v:100,a:1})})))}),Pj=q.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:qx({h:e.h,s:100,v:100,a:1})};return q.createElement("div",{className:"react-colorful__saturation",style:r},q.createElement(tC,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:ql(e.s+100*o.left,0,100),v:ql(e.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+$n(e.s)+"%, Brightness "+$n(e.v)+"%"},q.createElement(nC,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:qx(e)})))}),Nj=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},Lj=function(t,e){return t.toLowerCase()===e.toLowerCase()||Nj(Wx(t),Wx(e))};function jj(t,e,n){var r=zx(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;Nj(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 Qfe=typeof window<"u"?q.useLayoutEffect:q.useEffect,epe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},kR=new Map,$j=function(t){Qfe(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!kR.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}`,kR.set(e,n);var r=epe();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},tpe=function(t){var e=t.className,n=t.colorModel,r=t.color,o=r===void 0?n.defaultColor:r,i=t.onChange,s=eC(t,["className","colorModel","color","onChange"]),a=q.useRef(null);$j(a);var l=jj(n,o,i),u=l[0],f=l[1],p=cd(["react-colorful",e]);return q.createElement("div",Xl({},s,{ref:a,className:p}),q.createElement(Pj,{hsva:u,onChange:f}),q.createElement(Dj,{hue:u.h,onChange:f,className:"react-colorful__last-control"}))},npe={defaultColor:"000",toHsva:Aj,fromHsva:function(t){return Rj({h:t.h,s:t.s,v:t.v,a:1})},equal:Lj},rpe=function(t){return q.createElement(tpe,Xl({},t,{colorModel:npe}))},ope=function(t){var e=t.className,n=t.hsva,r=t.onChange,o={backgroundImage:"linear-gradient(90deg, "+$0(Object.assign({},n,{a:0}))+", "+$0(Object.assign({},n,{a:1}))+")"},i=cd(["react-colorful__alpha",e]),s=$n(100*n.a);return q.createElement("div",{className:i},q.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),q.createElement(tC,{onMove:function(a){r({a:a.left})},onKey:function(a){r({a:ql(n.a+a.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},q.createElement(nC,{className:"react-colorful__alpha-pointer",left:n.a,color:$0(n)})))},ipe=function(t){var e=t.className,n=t.colorModel,r=t.color,o=r===void 0?n.defaultColor:r,i=t.onChange,s=eC(t,["className","colorModel","color","onChange"]),a=q.useRef(null);$j(a);var l=jj(n,o,i),u=l[0],f=l[1],p=cd(["react-colorful",e]);return q.createElement("div",Xl({},s,{ref:a,className:p}),q.createElement(Pj,{hsva:u,onChange:f}),q.createElement(Dj,{hue:u.h,onChange:f}),q.createElement(ope,{hsva:u,onChange:f,className:"react-colorful__last-control"}))},spe={defaultColor:"0001",toHsva:Aj,fromHsva:Rj,equal:Lj},ape=function(t){return q.createElement(ipe,Xl({},t,{colorModel:spe}))};function lpe(t){try{return $.rgbToHex(t)}catch{return null}}const rC=q.forwardRef(({value:t,label:e,padding:n,active:r,...o},i)=>{const{classes:s,cx:a,theme:l}=cpe();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(tK,{fontSize:"small",className:s.activeIcon,style:{color:t?l.palette.getContrastText(t):void 0}})})}),cpe=tn({name:{ColorSwatchButton:rC}})(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(
|
|
398
|
+
${t.palette.grey[400]} 0% 25%, ${t.palette.common.white} 0% 50%)
|
|
399
|
+
50% / 12px 12px`,backgroundClip:"content-box"}}));rC.displayName="ColorSwatchButton";const Cf=Ra("ColorPicker",["gradientPicker","colorTextInput","swatchContainer"]),upe=tn({name:{ColorPicker:Fj}})(t=>({gradientPicker:{"&&":{width:"100%"}},colorTextInput:{marginTop:t.spacing(1)},swatchContainer:{display:"flex",flexWrap:"wrap",gap:5,marginTop:t.spacing(1)}}));function Fj({value:t,onChange:e,swatchColors:n,colorToHex:r=lpe,disableAlpha:o=!1,labels:i={},classes:s={}}){const{classes:a,cx:l}=upe(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(g=>typeof g=="string"?{value:g}:g),m=r(t);return v.jsxs(v.Fragment,{children:[o?v.jsx(rpe,{color:m??"#000000",className:l(Cf.gradientPicker,a.gradientPicker),onChange:g=>{e(g,"gradient")}}):v.jsx(ape,{color:m??"#000000",className:l(Cf.gradientPicker,a.gradientPicker),onChange:g=>{e(g,"gradient")}}),v.jsx($.TextField,{placeholder:u,variant:"outlined",size:"small",defaultValue:t||"",inputRef:f,spellCheck:!1,className:l(Cf.colorTextInput,a.colorTextInput),onChange:g=>{const b=g.target.value,y=r(b);y&&e(y,"text")},fullWidth:!0}),p.length>0&&v.jsx("div",{className:l(Cf.swatchContainer,a.swatchContainer),children:p.map(g=>v.jsx(rC,{value:g.value,label:g.label,onClick:()=>{var b;e((b=g.value)!==null&&b!==void 0?b:"","swatch")},active:g.value==t||!g.value&&!t||!!g.value&&!!m&&r(g.value)===m},g.value))})]})}function dpe({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(Fj,{swatchColors:r,value:f,onChange:m=>{p(m)},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 fpe=tn({name:{ColorPickerPopper:Bj}})(t=>({root:{zIndex:t.zIndex.tooltip,width:235}}));function Bj({value:t,onSave:e,onCancel:n,swatchColors:r,ColorPickerProps:o,labels:i,...s}){const{classes:a,cx:l}=fpe();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(dpe,{value:t||"",onSave:e,onCancel:n,swatchColors:r,ColorPickerProps:o,labels:i})})})})})})}function ppe({...t}){const e=_t();return v.jsx(St,{tooltipLabel:"Insert image",IconComponent:Q7,disabled:!(e!=null&&e.isEditable)||!e.can().setImage({src:"http://example.com"}),...t})}function hpe(t){const e=_t();return v.jsx(St,{tooltipLabel:"Insert table",IconComponent:Vfe,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 mpe(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Blockquote",tooltipShortcutKeys:["mod","Shift","B"],IconComponent:vK,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 gpe(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Bold",tooltipShortcutKeys:["mod","B"],IconComponent:dK,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 ype(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Bulleted list",tooltipShortcutKeys:["mod","Shift","8"],IconComponent:yK,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 bpe(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Code",tooltipShortcutKeys:["mod","E"],IconComponent:iK,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 vpe(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Code block",tooltipShortcutKeys:["mod","Alt","C"],IconComponent:kfe,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 xpe=tn({name:{MenuButtonColorPicker:oC}})(t=>({menuButtonIcon:{fontSize:Pu},colorIndicatorIcon:{position:"absolute"},colorIndicatorIconDisabled:{color:t.palette.action.disabled}}));function oC({value:t,onChange:e,swatchColors:n,labels:r,hideColorIndicator:o=!1,popperId:i,PopperProps:s,ColorPickerProps:a,...l}){const{classes:u,cx:f}=xpe(),[p,m]=q.useState(null),g=()=>{m(null)},{IconComponent:b,children:y,...x}=l;return v.jsxs(v.Fragment,{children:[v.jsx(St,{onClick:C=>{p?g():m(C.currentTarget)},"aria-describedby":i,...x,children:y??v.jsxs(v.Fragment,{children:[b&&v.jsx(b,{className:u.menuButtonIcon}),!o&&t&&v.jsx(Afe,{className:f(u.menuButtonIcon,u.colorIndicatorIcon,l.disabled&&u.colorIndicatorIconDisabled),style:l.disabled?void 0:{color:t}})]})}),v.jsx(Bj,{id:i,open:!!p,anchorEl:p,value:t??"",onSave:C=>{e(C),g()},onCancel:g,swatchColors:n,ColorPickerProps:a,labels:r,...s})]})}function Spe(t){const e=_t(),n=q.useRef(null);return v.jsx(St,{buttonRef:n,tooltipLabel:"Link",tooltipShortcutKeys:["mod","Shift","U"],IconComponent:w1,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 Cpe({defaultMarkColor:t="#ffff00",...e}){const n=_t(),r=n!=null&&n.isActive("highlight")?n.getAttributes("highlight").color||t:"";return v.jsx(oC,{IconComponent:Ife,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 wpe(t){const e=_t();return v.jsx(St,{tooltipLabel:"Insert horizontal line",IconComponent:wK,disabled:!(e!=null&&e.isEditable)||!e.can().setHorizontalRule(),onClick:()=>e==null?void 0:e.chain().focus().setHorizontalRule().run(),...t})}function Tpe(t,e){const n=Do(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 _pe(t,e){const n=Pn(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 km(t,e){const n=sd(typeof e=="string"?e:e.name,t.schema);return n==="node"?_pe(t,e):n==="mark"?Tpe(t,e):[]}function Ux({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 Epe(t){return t.toLowerCase().normalize("NFKD").replace(/[^\w\s-]+/g,"").replace(/[-\s]+/g,"-").replace(/^[\s-_]+|[\s-_]+$/g,"")}function kpe({onUploadFiles:t,inputProps:e,insertImages:n=Ux,...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(ppe,{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 Ope(t){const e=_t();return v.jsx(St,{tooltipLabel:"Indent",tooltipShortcutKeys:["Tab"],IconComponent:mK,disabled:!(e!=null&&e.isEditable)||!e.can().sinkListItem("listItem"),onClick:()=>e==null?void 0:e.chain().focus().sinkListItem("listItem").run(),...t})}function Mpe(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Italic",tooltipShortcutKeys:["mod","I"],IconComponent:gK,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 Ape(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Ordered list",tooltipShortcutKeys:["mod","Shift","7"],IconComponent:bK,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 Rpe(t){const e=_t();return v.jsx(St,{tooltipLabel:"Redo",tooltipShortcutKeys:["mod","Shift","Z"],IconComponent:AK,disabled:!(e!=null&&e.isEditable)||!e.can().redo(),onClick:()=>e==null?void 0:e.chain().focus().redo().run(),...t})}function Ipe(t){const e=_t();return v.jsx(St,{tooltipLabel:"Remove inline formatting",IconComponent:fK,disabled:!(e!=null&&e.isEditable)||!e.can().unsetAllMarks(),onClick:()=>e==null?void 0:e.chain().focus().unsetAllMarks().run(),...t})}function Dpe(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Strikethrough",tooltipShortcutKeys:["mod","Shift","S"],IconComponent:NK,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 Ppe(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Subscript",tooltipShortcutKeys:["mod",","],IconComponent:LK,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 Npe(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Superscript",tooltipShortcutKeys:["mod","."],IconComponent:jK,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 Lpe(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Task checklist",tooltipShortcutKeys:["mod","Shift","9"],IconComponent:nK,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 jpe({IconComponent:t=Rfe,tooltipLabel:e="Text color",defaultTextColor:n="",...r}){const o=_t(),i=o?km(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(oC,{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 $pe(t){var e;const n=_t();return v.jsx(St,{tooltipLabel:"Underline",tooltipShortcutKeys:["mod","U"],IconComponent:SK,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 Fpe(t){const e=_t();return v.jsx(St,{tooltipLabel:"Undo",tooltipShortcutKeys:["mod","Z"],IconComponent:$K,disabled:!(e!=null&&e.isEditable)||!e.can().undo(),onClick:()=>e==null?void 0:e.chain().focus().undo().run(),...t})}function Bpe(t){const e=_t();return v.jsx(St,{tooltipLabel:"Unindent",tooltipShortcutKeys:["Shift","Tab"],IconComponent:hK,disabled:!(e!=null&&e.isEditable)||!e.can().liftListItem("listItem"),onClick:()=>e==null?void 0:e.chain().focus().liftListItem("listItem").run(),...t})}const Vpe=tn({name:{MenuSelect:ud}})(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 ud({tooltipTitle:t,...e}){var n,r,o;const{classes:i,cx:s}=Vpe(),[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(wo,{label:t,contentWrapperClassName:i.rootTooltipWrapper,open:a,children:u}):u}const zpe=tn({name:{MenuSelectFontFamily:Vj}})({selectInput:{width:55}}),F0="MULTIPLE";function Vj({options:t,hideUnsetOption:e=!1,unsetOptionLabel:n="Default",emptyLabel:r="Font",...o}){var i;const{classes:s,cx:a}=zpe(),l=_t(),u=l?km(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 m=new Set(p).size;let g;return m===1?g=p[0]:m>1?g=F0:g="",v.jsxs(ud,{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===F0?r:(x=(y=t.find(C=>C.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:g||"",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:F0}),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 Hpe=tn({name:{MenuSelectFontSize:zj}})({selectInput:{width:17,display:"flex",alignItems:"center"},fontSizeIcon:{fontSize:Pu}}),Wpe=["8px","9px","10px","11px","12px","14px","16px","18px","24px","30px","36px","48px","60px","72px","96px"];function OR(t){return t.replace("px","")}const B0="MULTIPLE";function zj({options:t=Wpe,sizeOptions:e,hideUnsetOption:n=!1,unsetOptionLabel:r="Default",unsetOptionContent:o,emptyLabel:i,emptyValue:s,...a}){var l;const{classes:u,cx:f}=Hpe(),p=_t();i=s??i,r=o??r,t=e??t;const m=(t??[]).map(_=>typeof _=="string"?{value:_}:_),g=p?km(p.state,"textStyle"):[],b=!!(p!=null&&p.isActive("textStyle")),y=g.map(_=>{var T;return(T=_.fontSize)!==null&&T!==void 0?T:""});b||y.push("");const x=new Set(y).size;let C;return x===1?C=y[0]:x>1?C=B0:C="",v.jsxs(ud,{onChange:_=>{const T=_.target.value;T?p==null||p.chain().setFontSize(T).focus().run():p==null||p.chain().unsetFontSize().focus().run()},disabled:!(p!=null&&p.isEditable)||!p.can().setFontSize("12px"),renderValue:_=>!_||_===B0?i??v.jsx(xK,{className:u.fontSizeIcon}):OR(_),displayEmpty:!0,"aria-label":"Font sizes",tooltipTitle:"Font size",...a,value:C||"",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:B0}),m.map(_=>{var T;return v.jsx($.MenuItem,{value:_.value,children:(T=_.label)!==null&&T!==void 0?T:OR(_.value)},_.value)})]})}const qpe=tn({name:{MenuSelectHeading:Hj}})(t=>{const e=tj(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}}}),wt={Paragraph:"Paragraph",Heading1:"Heading 1",Heading2:"Heading 2",Heading3:"Heading 3",Heading4:"Heading 4",Heading5:"Heading 5",Heading6:"Heading 6"},MR={[wt.Heading1]:1,[wt.Heading2]:2,[wt.Heading3]:3,[wt.Heading4]:4,[wt.Heading5]:5,[wt.Heading6]:6},AR={1:wt.Heading1,2:wt.Heading2,3:wt.Heading3,4:wt.Heading4,5:wt.Heading5,6:wt.Heading6};function Hj({labels:t,hideShortcuts:e=!1,...n}){var r,o,i,s,a,l,u,f;const{classes:p,cx:m}=qpe(),g=_t(),b=q.useCallback(A=>{const R=A.target.value;R===wt.Paragraph?g==null||g.chain().setParagraph().focus().run():R in MR&&(g==null||g.chain().setHeading({level:MR[R]}).focus().run())},[g]);let y="",x;if(g!=null&&g.isActive("paragraph"))y=wt.Paragraph;else if(g!=null&&g.isActive("heading")){const R=km(g.state,"heading").map(O=>O.level);x=new Set(R).size===1?R[0]:void 0,x&&x in AR&&(y=AR[x])}const C=y!=="",_=!!(g!=null&&g.can().setParagraph()),T=q.useMemo(()=>{var A;const R=g==null?void 0:g.extensionManager.extensions.find(N=>N.name=="heading");return new Set((A=R==null?void 0:R.options.levels)!==null&&A!==void 0?A:[])},[g]),w=T.values().next(),k=w.done?void 0:w.value,M=k!==void 0&&(x===k||!!(g!=null&&g.can().setHeading({level:k})));return v.jsxs(ud,{onChange:b,disabled:!(g!=null&&g.isEditable)||!C&&!_&&!M,displayEmpty:!0,renderValue:A=>{var R,N;let O;return A===""?O=(N=(R=t==null?void 0:t.emptyValue)!==null&&R!==void 0?R:t==null?void 0:t.empty)!==null&&N!==void 0?N:v.jsx("em",{children:"Change to…"}):A===wt.Paragraph?O=t==null?void 0:t.paragraph:A===wt.Heading1?O=t==null?void 0:t.heading1:A===wt.Heading2?O=t==null?void 0:t.heading2:A===wt.Heading3?O=t==null?void 0:t.heading3:A===wt.Heading4?O=t==null?void 0:t.heading4:A===wt.Heading5?O=t==null?void 0:t.heading5:A===wt.Heading6&&(O=t==null?void 0:t.heading6),O??A},"aria-label":"Text headings",tooltipTitle:"Styles",...n,value:y,inputProps:{...n.inputProps,className:m(p.selectInput,(r=n.inputProps)===null||r===void 0?void 0:r.className)},children:[v.jsx($.MenuItem,{value:wt.Paragraph,disabled:!C&&!_,children:v.jsx(wo,{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:wt.Paragraph})}),T.has(1)&&v.jsx($.MenuItem,{value:wt.Heading1,disabled:!M,children:v.jsx(wo,{label:"",shortcutKeys:e?void 0:["mod","alt","1"],placement:"right",contentWrapperClassName:m(p.menuOption,p.headingOption,p.headingOption1),children:(i=t==null?void 0:t.heading1)!==null&&i!==void 0?i:wt.Heading1})}),T.has(2)&&v.jsx($.MenuItem,{value:wt.Heading2,disabled:!M,children:v.jsx(wo,{label:"",shortcutKeys:e?void 0:["mod","alt","2"],placement:"right",contentWrapperClassName:m(p.menuOption,p.headingOption,p.headingOption2),children:(s=t==null?void 0:t.heading2)!==null&&s!==void 0?s:wt.Heading2})}),T.has(3)&&v.jsx($.MenuItem,{value:wt.Heading3,disabled:!M,children:v.jsx(wo,{label:"",shortcutKeys:e?void 0:["mod","alt","3"],placement:"right",contentWrapperClassName:m(p.menuOption,p.headingOption,p.headingOption3),children:(a=t==null?void 0:t.heading3)!==null&&a!==void 0?a:wt.Heading3})}),T.has(4)&&v.jsx($.MenuItem,{value:wt.Heading4,disabled:!M,children:v.jsx(wo,{label:"",shortcutKeys:e?void 0:["mod","alt","4"],placement:"right",contentWrapperClassName:m(p.menuOption,p.headingOption,p.headingOption4),children:(l=t==null?void 0:t.heading4)!==null&&l!==void 0?l:wt.Heading4})}),T.has(5)&&v.jsx($.MenuItem,{value:wt.Heading5,disabled:!M,children:v.jsx(wo,{label:"",shortcutKeys:e?void 0:["mod","alt","5"],placement:"right",contentWrapperClassName:m(p.menuOption,p.headingOption,p.headingOption5),children:(u=t==null?void 0:t.heading5)!==null&&u!==void 0?u:wt.Heading5})}),T.has(6)&&v.jsx($.MenuItem,{value:wt.Heading6,disabled:!M,children:v.jsx(wo,{label:"",shortcutKeys:e?void 0:["mod","alt","6"],placement:"right",contentWrapperClassName:m(p.menuOption,p.headingOption,p.headingOption6),children:(f=t==null?void 0:t.heading6)!==null&&f!==void 0?f:wt.Heading6})})]})}const Upe=tn({name:{MenuSelectTextAlign:Wj}})(t=>({selectInput:{width:Pu},menuItem:{paddingLeft:0,paddingRight:0},menuOption:{display:"flex",width:"100%",justifyContent:"center"},menuButtonIcon:{fontSize:Pu,color:t.palette.action.active}})),Kpe=[{value:"left",label:"Left",shortcutKeys:["mod","Shift","L"],IconComponent:cK},{value:"center",label:"Center",shortcutKeys:["mod","Shift","E"],IconComponent:aK},{value:"right",label:"Right",shortcutKeys:["mod","Shift","R"],IconComponent:uK},{value:"justify",label:"Justify",shortcutKeys:["mod","Shift","J"],IconComponent:lK}];function Wj({options:t=Kpe,emptyLabel:e="",alignmentOptions:n,...r}){var o,i,s;const{classes:a,cx:l}=Upe(),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]),m=q.useMemo(()=>new Set(p==null?void 0:p.alignments),[p]),g=(i=Array.from(m).find(b=>u==null?void 0:u.isActive({textAlign:b})))!==null&&i!==void 0?i:"";return v.jsx(ud,{onChange:f,disabled:!(u!=null&&u.isEditable)||!Array.from(m).some(b=>u.can().setTextAlign(b)),renderValue:b=>{let y;if(b){const x=t.find(C=>C.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:g,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=>m.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(wo,{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 Gpe=bn.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()}}}),qj=an.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]}`,Tt(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=>Nx({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),Ype=tn({name:{HeadingWithAnchorComponent:Uj},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"}}})),wf=Ra("HeadingWithAnchorComponent",["root","container","link","linkIcon"]);function Uj({editor:t,node:e,extension:n}){const{classes:r,cx:o}=Ype(),a=`h${n.options.levels.includes(e.attrs.level)?e.attrs.level:n.options.levels[0]}`,l=q.useMemo(()=>MS(t.schema),[t.schema]),u=Epe(SL(e,{textSerializers:l}));return v.jsx(JS,{as:a,id:u,...n.options.HTMLAttributes,className:o(wf.root,r.root),style:{textAlign:e.attrs.textAlign},children:v.jsxs("span",{className:o(wf.container,r.container),children:[v.jsx("a",{href:`#${u}`,contentEditable:!1,className:o(wf.link,r.link),children:v.jsx(w1,{className:o(wf.linkIcon,r.linkIcon)})}),v.jsx(gfe,{as:"span"})]})})}const Jpe=qj.extend({addOptions(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),scrollToAnchorOnMount:!0}},onCreate(){this.options.scrollToAnchorOnMount&&setTimeout(()=>{Xpe(this.editor)})},addNodeView(){return XS(Uj)}});function Xpe(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 Zpe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Qpe=an.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",Tt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[TL({find:Zpe,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),ehe=tn({name:{ResizableImageResizer:Kj}})(t=>({root:{position:"absolute",bottom:-3,right:-3,width:12,height:12,background:t.palette.primary.main,cursor:"nwse-resize"}}));function Kj({onResize:t,className:e,mouseDown:n,setMouseDown:r}){const{classes:o,cx:i}=ehe();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 the=15,nhe=tn({name:{ResizableImageComponent:Gj}})(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 Gj(t){var e;const{node:n,selected:r,updateAttributes:o,extension:i}=t,{classes:s,cx:a}=nhe(),{attrs:l}=n,u=q.useRef(null),[f,p]=q.useState(!1),m=r||f,g=q.useMemo(()=>eD(y=>{if(!u.current)return;const x=u.current.getBoundingClientRect(),C=y.clientX-x.x,_=y.clientY-x.y,T=Math.max(C,x.width/x.height*_,the);o({width:Math.round(T)})},50,{trailing:!0}),[o]),b=i.options.ChildComponent;return v.jsx(JS,{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,m&&"ProseMirror-selectednode",m&&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)}}),m&&v.jsx(Kj,{onResize:g,className:s.resizer,mouseDown:f,setMouseDown:p}),b&&v.jsx(b,{...t})]})})}const rhe=Qpe.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",Tt({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 od({find:r.find,handler:o=>{const i=n(o.match);if(this.options.isAllowedImgSrc(i.src))return r.handler(o)}}))},addNodeView(){return XS(Gj)}});var Kx,Gx;if(typeof WeakMap<"u"){let t=new WeakMap;Kx=e=>t.get(e),Gx=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;Kx=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},Gx=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var yn=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 Kx(t)||Gx(t,ohe(t))}};function ohe(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=ihe(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:C,colwidth:_}=y.attrs;for(let T=0;T<C;T++){if(T+u>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:f,n:C-T});break}const w=o+T*e;for(let k=0;k<x;k++){r[w+k]==0?r[w+k]=f:(i||(i=[])).push({type:"collision",row:u,pos:f,n:x-k});const M=_&&_[k];if(M){const A=(w+k)%e*2,R=s[A];R==null||R!=M&&s[A+1]==1?(s[A]=M,s[A+1]=1):R==M&&s[A+1]++}}}o+=x,f+=y.nodeSize}const m=(u+1)*e;let g=0;for(;o<m;)r[o++]==0&&g++;g&&(i||(i=[])).push({type:"missing",row:u,n:g}),f++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const a=new yn(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&&she(a,s,t),a}function ihe(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 she(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=ahe(l)))[u]=p)}a&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}function ahe(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 cs=new Mn("selectingCells");function Zl(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 lhe(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 Po(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 Om(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=Zl(e.$head)||che(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function che(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 Yx(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function uhe(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function iC(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Yj(t,e,n){const r=t.node(-1),o=yn.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 Ta(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 Jj(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 dhe(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 Si extends at{constructor(e,n=e){const r=e.node(-1),o=yn.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 m=i+f+1;return new gN(a.resolve(m),a.resolve(m+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(Yx(r)&&Yx(o)&&iC(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?Si.rowSelection(r,o):i&&this.isColSelection()?Si.colSelection(r,o):new Si(r,o)}return nt.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=yn.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 m=n.map[f];if(i[m])continue;i[m]=!0;const g=n.findCell(m);let b=e.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);const y=o.left-g.left,x=g.right-o.right;if(y>0||x>0){let C=b.attrs;if(y>0&&(C=Ta(C,0,y)),x>0&&(C=Ta(C,C.colspan-x,x)),g.left<o.left){if(b=b.type.createAndFill(C),!b)throw RangeError(`Could not create cell with attrs ${JSON.stringify(C)}`)}else b=b.type.create(C,b.content)}if(g.top<o.top||g.bottom>o.bottom){const C={...b.attrs,rowspan:Math.min(g.bottom,o.bottom)-Math.max(g.top,o.top)};g.top<o.top?b=b.type.createAndFill(C):b=b.type.create(C,b.content)}u.push(b)}s.push(e.child(l).copy(Ae.from(u)))}const a=this.isColSelection()&&this.isRowSelection()?e:s;return new $e(Ae.from(a),1,1)}replace(e,n=$e.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?$e.empty:n)}const i=at.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new $e(Ae.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=yn.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=yn.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 Si(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=yn.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 Si&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=yn.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 Si(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Si(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Si(e.resolve(n),e.resolve(r))}getBookmark(){return new fhe(this.$anchorCell.pos,this.$headCell.pos)}};Gt.prototype.visible=!1;at.jsonID("cell",Gt);var fhe=class Xj{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Xj(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&&iC(n,r)?new Gt(n,r):at.near(r,1)}};function phe(t){if(!(t.selection instanceof Gt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Gn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),on.create(t.doc,e)}function hhe({$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 mhe({$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 ghe(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,s;if(r instanceof Xe&&(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=yn.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 nt&&hhe(r)?i=nt.create(o,r.from):r instanceof nt&&mhe(r)&&(i=nt.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var yhe=new Mn("fix-tables");function Zj(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)?Zj(t.child(a),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function Qj(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=bhe(t,o,i,n))};return e?e.doc!=t.doc&&Zj(e.doc,t.doc,0,r):t.doc.descendants(r),n}function bhe(t,e,n,r){const o=yn.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 m=0;m<p.rowspan;m++)i[u.row+m]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,Ta(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,m=i[l];if(m>0){let g="cell";f.firstChild&&(g=f.firstChild.type.spec.tableRole);const b=[];for(let x=0;x<m;x++){const C=rr(t.schema)[g].createAndFill();C&&b.push(C)}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(yhe,{fixTables:!0})}function ri(t){const e=t.selection,n=Om(t),r=n.node(-1),o=n.start(-1),i=yn.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 e$(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;dhe(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,Jj(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 vhe(t,e){if(!Po(t))return!1;if(e){const n=ri(t);e(e$(t.tr,n,n.left))}return!0}function xhe(t,e){if(!Po(t))return!1;if(e){const n=ri(t);e(e$(t.tr,n,n.right))}return!0}function She(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,Ta(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 Che(t,e){if(!Po(t))return!1;if(e){const n=ri(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;She(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=yn.get(i)}e(r)}return!0}function whe(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 t$(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;whe(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],m=r.nodeAt(p).attrs;t.setNodeMarkup(n+p,null,{...m,rowspan:m.rowspan+1}),u+=m.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,m=p==null?void 0:p.createAndFill();m&&a.push(m)}return t.insert(s,rr(r.type.schema).row.create(null,a)),t}function The(t,e){if(!Po(t))return!1;if(e){const n=ri(t);e(t$(t.tr,n,n.top))}return!0}function _he(t,e){if(!Po(t))return!1;if(e){const n=ri(t);e(t$(t.tr,n,n.bottom))}return!0}function Ehe(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 m=n.nodeAt(p).attrs;t.setNodeMarkup(t.mapping.slice(a).map(p+r),null,{...m,rowspan:m.rowspan-1}),u+=m.colspan-1}else if(o<e.height&&p==e.map[f+e.width]){const m=n.nodeAt(p),g=m.attrs,b=m.type.create({...g,rowspan:m.attrs.rowspan-1},m.content),y=e.positionAt(o+1,u,n);t.insert(t.mapping.slice(a).map(r+y),b),u+=g.colspan-1}}}}function khe(t,e){if(!Po(t))return!1;if(e){const n=ri(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;Ehe(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=yn.get(n.table)}e(r)}return!0}function RR(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function Ohe({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 IR(t,e){const n=t.selection;if(!(n instanceof Gt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=ri(t),{map:o}=r;if(Ohe(o,r))return!1;if(e){const i=t.tr,s={};let a=Ae.empty,l,u;for(let f=r.top;f<r.bottom;f++)for(let p=r.left;p<r.right;p++){const m=o.map[f*o.width+p],g=r.table.nodeAt(m);if(!(s[m]||!g))if(s[m]=!0,l==null)l=m,u=g;else{RR(g)||(a=a.append(g.content));const b=i.mapping.map(m+r.tableStart);i.delete(b,b+g.nodeSize)}}if(l==null||u==null)return!0;if(i.setNodeMarkup(l+r.tableStart,null,{...Jj(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=RR(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 DR(t,e){const n=rr(t.schema);return Mhe(({node:r})=>n[r.type.spec.tableRole])(t,e)}function Mhe(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=lhe(o.$from),!i)return!1;s=(r=Zl(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=ri(e),p=e.tr;for(let g=0;g<f.right-f.left;g++)l.push(u?{...a,colwidth:u&&u[g]?[u[g]]:null}:a);let m;for(let g=f.top;g<f.bottom;g++){let b=f.map.positionAt(g,f.left,f.table);g==f.top&&(b+=i.nodeSize);for(let y=f.left,x=0;y<f.right;y++,x++)y==f.left&&g==f.top||p.insert(m=p.mapping.map(b+f.tableStart,1),t({node:i,row:g,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),m?p.doc.resolve(m):void 0)),n(p)}return!0}}function Ahe(t,e){return function(n,r){if(!Po(n))return!1;const o=Om(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 Rhe(t){return function(e,n){if(!Po(e))return!1;if(n){const r=rr(e.schema),o=ri(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 PR(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 Nu(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?Rhe(t):function(n,r){if(!Po(n))return!1;if(r){const o=rr(n.schema),i=ri(n),s=n.tr,a=PR("row",i,o),l=PR("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,m=t=="column"?l?o.cell:o.header_cell:t=="row"?a?o.cell:o.header_cell:o.cell;i.map.cellsInRect(p).forEach(g=>{const b=g+i.tableStart,y=s.doc.nodeAt(b);y&&s.setNodeMarkup(b,m,y.attrs)}),r(s)}return!0}}Nu("row",{useDeprecatedLogic:!0});Nu("column",{useDeprecatedLogic:!0});var Ihe=Nu("cell",{useDeprecatedLogic:!0});function Dhe(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 NR(t){return function(e,n){if(!Po(e))return!1;const r=Dhe(Om(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(nt.between(o,uhe(o))).scrollIntoView())}return!0}}function Phe(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 Tf(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 $e(o,0,0))}),r.docChanged&&e(r)}return!0}function Nhe(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=Jx(rr(s).row,new $e(u,f,p)).content),a.push(u)}else if(i=="cell"||i=="header_cell")a.push(n||r?Jx(rr(s).row,new $e(e,n,r)).content:e);else return null;return Lhe(s,a)}function Lhe(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(Ae.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(Ae.from(s))}return{height:e.length,width:r,rows:e}}function Jx(t,e){const n=t.createAndFill();return new uS(n).replace(0,n.content.size,e).doc}function jhe({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 m=l.child(p%l.childCount);f+m.attrs.colspan>r&&(m=m.type.createChecked(Ta(m.attrs,m.attrs.colspan,f+m.attrs.colspan-r),m.content)),u.push(m),f+=m.attrs.colspan;for(let g=1;g<m.attrs.rowspan;g++)i[a+g]=(i[a+g]||0)+m.attrs.colspan}s.push(Ae.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(Ae.from(l))}n=i,e=o}return{width:t,height:e,rows:n}}function $he(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,m=0;p<e.height;p++){const g=n.child(p);m+=g.nodeSize;const b=[];let y;g.lastChild==null||g.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(m-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 m=l.row.create(null,Ae.from(p)),g=[];for(let b=e.height;b<i;b++)g.push(m);t.insert(t.mapping.slice(s).map(r+n.nodeSize-2),g)}return!!(u||f)}function LR(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 m=n.nodeAt(p),{top:g,left:b}=e.findCell(p);t.setNodeMarkup(t.mapping.slice(a).map(p+r),null,{...m.attrs,rowspan:s-g}),t.insert(t.mapping.slice(a).map(e.positionAt(s,b,n)),m.type.createAndFill({...m.attrs,rowspan:g+m.attrs.rowspan-s})),u+=m.attrs.colspan-1}}return l}function jR(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 m=n.nodeAt(p),g=e.colCount(p),b=t.mapping.slice(a).map(p+r);t.setNodeMarkup(b,null,Ta(m.attrs,s-g,m.attrs.colspan-(s-g))),t.insert(b+m.nodeSize,m.type.createAndFill(Ta(m.attrs,0,s-g))),u+=m.attrs.rowspan-1}}return l}function $R(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=yn.get(i);const{top:a,left:l}=r,u=l+o.width,f=a+o.height,p=t.tr;let m=0;function g(){if(i=n?p.doc.nodeAt(n-1):p.doc,!i)throw new Error("No table found");s=yn.get(i),m=p.mapping.maps.length}$he(p,s,i,n,u,f,m)&&g(),LR(p,s,i,n,l,u,a,m)&&g(),LR(p,s,i,n,l,u,f,m)&&g(),jR(p,s,i,n,a,f,l,m)&&g(),jR(p,s,i,n,a,f,u,m)&&g();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(m).map(y+n),p.mapping.slice(m).map(x+n),new $e(o.rows[b-a],0,0))}g(),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 Fhe=SS({ArrowLeft:_f("horiz",-1),ArrowRight:_f("horiz",1),ArrowUp:_f("vert",-1),ArrowDown:_f("vert",1),"Shift-ArrowLeft":Ef("horiz",-1),"Shift-ArrowRight":Ef("horiz",1),"Shift-ArrowUp":Ef("vert",-1),"Shift-ArrowDown":Ef("vert",1),Backspace:Tf,"Mod-Backspace":Tf,Delete:Tf,"Mod-Delete":Tf});function Yf(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function _f(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof Gt)return Yf(n,r,at.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const s=n$(o,t,e);if(s==null)return!1;if(t=="horiz")return Yf(n,r,at.near(n.doc.resolve(i.head+e),e));{const a=n.doc.resolve(s),l=Yj(a,t,e);let u;return l?u=at.near(l,1):e<0?u=at.near(n.doc.resolve(a.before(-1)),-1):u=at.near(n.doc.resolve(a.after(-1)),1),Yf(n,r,u)}}}function Ef(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=n$(o,t,e);if(l==null)return!1;s=new Gt(n.doc.resolve(l))}const a=Yj(s.$headCell,t,e);return a?Yf(n,r,new Gt(s.$anchorCell,a)):!1}}function Bhe(t,e){const n=t.state.doc,r=Zl(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Gt(r))),!0):!1}function Vhe(t,e,n){if(!Po(t.state))return!1;let r=Nhe(n);const o=t.state.selection;if(o instanceof Gt){r||(r={width:1,height:1,rows:[Ae.from(Jx(rr(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),a=yn.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=jhe(r,a.right-a.left,a.bottom-a.top),$R(t.state,t.dispatch,s,a,r),!0}else if(r){const i=Om(t.state),s=i.start(-1);return $R(t.state,t.dispatch,s,yn.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function zhe(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=FR(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=Zl(t.state.selection.$anchor))!=null&&((n=V0(t,e))==null?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(l,u){let f=V0(t,u);const p=cs.getState(t.state)==null;if(!f||!iC(l,f))if(p)f=l;else return;const m=new Gt(l,f);if(p||!t.state.selection.eq(m)){const g=t.state.tr.setSelection(m);p&&g.setMeta(cs,l.pos),t.dispatch(g)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",a),cs.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(cs,-1))}function a(l){const u=l,f=cs.getState(t.state);let p;if(f!=null)p=t.state.doc.resolve(f);else if(FR(t,u.target)!=r&&(p=V0(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 n$(t,e,n){if(!(t.state.selection instanceof nt))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 FR(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function V0(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Zl(t.state.doc.resolve(n.pos)):null}var Hhe=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")),Xx(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,Xx(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Xx(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,m=0;p<f.childCount;p++){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let y=0;y<g;y++,m++){const x=o==m?i:b&&b[y],C=x?x+"px":"";if(a+=x||r,x||(l=!1),u)u.style.width!=C&&(u.style.width=C),u=u.nextSibling;else{const _=document.createElement("col");_.style.width=C,e.appendChild(_)}}}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 Hr=new Mn("tableColumnResizing");function r$({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=Hhe,lastColumnResizable:o=!0}={}){const i=new cn({key:Hr,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]=(m,g)=>new r(m,n,g)),new Whe(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=Hr.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{qhe(s,a,t,o)},mouseleave:s=>{Uhe(s)},mousedown:(s,a)=>{Khe(s,a,e,n)}},decorations:s=>{const a=Hr.getState(s);if(a&&a.activeHandle>-1)return Zhe(s,a.activeHandle)},nodeViews:{}}});return i}var Whe=class Jf{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Hr);if(r&&r.setHandle!=null)return new Jf(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Jf(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return Yx(e.doc.resolve(o))||(o=-1),new Jf(o,n.dragging)}return n}};function qhe(t,e,n,r){if(!t.editable)return;const o=Hr.getState(t.state);if(o&&!o.dragging){const i=Yhe(e.target);let s=-1;if(i){const{left:a,right:l}=i.getBoundingClientRect();e.clientX-a<=n?s=BR(t,e,"left",n):l-e.clientX<=n&&(s=BR(t,e,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){const a=t.state.doc.resolve(s),l=a.node(-1),u=yn.get(l),f=a.start(-1);if(u.colCount(a.pos-f)+a.nodeAfter.attrs.colspan-1==u.width-1)return}o$(t,s)}}}function Uhe(t){if(!t.editable)return;const e=Hr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&o$(t,-1)}function Khe(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!=null?o:window,s=Hr.getState(t.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=t.state.doc.nodeAt(s.activeHandle),l=Ghe(t,s.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(Hr,{setDragging:{startX:e.clientX,startWidth:l}}));function u(p){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",f);const m=Hr.getState(t.state);m!=null&&m.dragging&&(Jhe(t,m.activeHandle,VR(m.dragging,p,n)),t.dispatch(t.state.tr.setMeta(Hr,{setDragging:null})))}function f(p){if(!p.which)return u(p);const m=Hr.getState(t.state);if(m&&m.dragging){const g=VR(m.dragging,p,n);zR(t,m.activeHandle,g,r)}}return zR(t,s.activeHandle,l,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",f),e.preventDefault(),!0}function Ghe(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 Yhe(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function BR(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=Zl(t.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;const l=yn.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 VR(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function o$(t,e){t.dispatch(t.state.tr.setMeta(Hr,{setHandle:e}))}function Jhe(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=yn.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],m=o.nodeAt(p).attrs,g=m.colspan==1?0:a-i.colCount(p);if(m.colwidth&&m.colwidth[g]==n)continue;const b=m.colwidth?m.colwidth.slice():Xhe(m.colspan);b[g]=n,l.setNodeMarkup(s+p,null,{...m,colwidth:b})}l.docChanged&&t.dispatch(l)}function zR(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),s=o.start(-1),a=yn.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&&Xx(i,l.firstChild,l,r,a,n)}function Xhe(t){return Array(t).fill(0)}function Zhe(t,e){var n;const r=[],o=t.doc.resolve(e),i=o.node(-1);if(!i)return on.empty;const s=yn.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],m=a+p+i.nodeAt(p).nodeSize-1,g=document.createElement("div");g.className="column-resize-handle",(n=Hr.getState(t))!=null&&n.dragging&&r.push(Gn.node(a+p,a+p+i.nodeAt(p).nodeSize,{class:"column-resize-dragging"})),r.push(Gn.widget(m,g))}}return on.create(t.doc,r)}function i$({allowTableNodeSelection:t=!1}={}){return new cn({key:cs,state:{init(){return null},apply(e,n){const r=e.getMeta(cs);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:phe,handleDOMEvents:{mousedown:zhe},createSelectionBetween(e){return cs.getState(e.state)!=null?e.state.selection:null},handleTripleClick:Bhe,handleKeyDown:Fhe,handlePaste:Vhe},appendTransaction(e,n,r){return ghe(r,Qj(r,n),t)}})}function Zx(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function HR(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,m=0;p<f.childCount;p+=1){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let y=0;y<g;y+=1,m+=1){const x=o===m?i:b&&b[y],C=x?`${x}px`:"";if(a+=x||r,x||(l=!1),u){if(u.style.width!==C){const[_,T]=Zx(r,x);u.style.setProperty(_,T)}u=u.nextSibling}else{const _=document.createElement("col"),[T,w]=Zx(r,x);_.style.setProperty(T,w),e.appendChild(_)}}}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 Qhe{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")),HR(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,HR(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function eme(t,e,n,r){let o=0,i=!0;const s=[],a=t.firstChild;if(!a)return{};for(let p=0,m=0;p<a.childCount;p+=1){const{colspan:g,colwidth:b}=a.child(p).attrs;for(let y=0;y<g;y+=1,m+=1){const x=n===m?r:b&&b[y];o+=x||e,x||(i=!1);const[C,_]=Zx(e,x);s.push(["col",{style:`${C}: ${_}`}])}}const l=i?`${o}px`:"",u=i?"":`${o}px`;return{colgroup:["colgroup",{},...s],tableWidth:l,tableMinWidth:u}}function WR(t,e){return t.createAndFill()}function tme(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 nme(t,e,n,r,o){const i=tme(t),s=[],a=[];for(let u=0;u<n;u+=1){const f=WR(i.cell);if(f&&a.push(f),r){const p=WR(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 rme(t){return t instanceof Gt}const kf=({editor:t})=>{const{selection:e}=t.state;if(!rme(e))return!1;let n=0;const r=AS(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},ome=an.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:Qhe,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}=eme(t,this.options.cellMinWidth);return["table",Tt(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=nme(i.schema,t,e,n);if(o){const a=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(nt.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>vhe(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>xhe(t,e),deleteColumn:()=>({state:t,dispatch:e})=>Che(t,e),addRowBefore:()=>({state:t,dispatch:e})=>The(t,e),addRowAfter:()=>({state:t,dispatch:e})=>_he(t,e),deleteRow:()=>({state:t,dispatch:e})=>khe(t,e),deleteTable:()=>({state:t,dispatch:e})=>Phe(t,e),mergeCells:()=>({state:t,dispatch:e})=>IR(t,e),splitCell:()=>({state:t,dispatch:e})=>DR(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Nu("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Nu("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Ihe(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>IR(t,e)?!0:DR(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>Ahe(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>NR(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>NR(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Qj(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:kf,"Mod-Backspace":kf,Delete:kf,"Mod-Delete":kf}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[r$({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],i$({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:gt(Ge(t,"tableRole",e))}}}),ime=ome.extend({addProseMirrorPlugins(){return[...this.options.resizable?[r$({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],i$({allowTableNodeSelection:this.options.allowTableNodeSelection})]}}),sme=t=>{const{onUploadFiles:e}=t,n=$.useTheme();return v.jsxs(Em,{children:[v.jsx(Vj,{options:[{label:"Monospace",value:"monospace"},{label:"Serif",value:"serif"}]}),v.jsx(Ln,{}),v.jsx(Hj,{}),v.jsx(Ln,{}),v.jsx(zj,{}),v.jsx(Ln,{}),v.jsx(gpe,{}),v.jsx(Mpe,{}),v.jsx($pe,{}),v.jsx(Dpe,{}),v.jsx(Ppe,{}),v.jsx(Npe,{}),v.jsx(Ln,{}),v.jsx(jpe,{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(Cpe,{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(Ln,{}),v.jsx(Spe,{}),v.jsx(Ln,{}),v.jsx(Wj,{}),v.jsx(Ln,{}),v.jsx(Ape,{}),v.jsx(ype,{}),v.jsx(Lpe,{}),Wfe()&&v.jsxs(v.Fragment,{children:[v.jsx(Ope,{}),v.jsx(Bpe,{})]}),v.jsx(Ln,{}),v.jsx(mpe,{}),v.jsx(Ln,{}),v.jsx(bpe,{}),v.jsx(vpe,{}),v.jsx(Ln,{}),v.jsx(kpe,{onUploadFiles:e}),v.jsx(Ln,{}),v.jsx(wpe,{}),v.jsx(hpe,{}),v.jsx(Ln,{}),v.jsx(Ipe,{}),v.jsx(Ln,{}),v.jsx(Fpe,{}),v.jsx(Rpe,{})]})},ame=/^\s*>\s$/,s$=an.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Tt(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[Wl({find:ame,type:this.type})]}}),lme=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,cme=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,ume=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,dme=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,a$=Rr.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",Tt(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[wa({find:lme,type:this.type}),wa({find:ume,type:this.type})]},addPasteRules(){return[_s({find:cme,type:this.type}),_s({find:dme,type:this.type})]}}),fme="listItem",qR="textStyle",UR=/^\s*([-+*])\s$/,l$=an.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",Tt(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(fme,this.editor.getAttributes(qR)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Wl({find:UR,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Wl({find:UR,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(qR),editor:this.editor})),[t]}}),pme=/(^|[^`])`([^`]+)`(?!`)/,hme=/(^|[^`])`([^`]+)`(?!`)/g,c$=Rr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Tt(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[wa({find:pme,type:this.type})]},addPasteRules(){return[_s({find:hme,type:this.type})]}}),mme=/^```([a-z]+)?[\s\n]$/,gme=/^~~~([a-z]+)?[\s\n]$/,u$=an.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",Tt(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(`
|
|
400
|
+
|
|
401
|
+
`);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(at.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[Nx({find:mme,type:this.type,getAttributes:t=>({language:t[1]})}),Nx({find:gme,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new cn({key:new Mn("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,`
|
|
402
|
+
`));return s.replaceSelectionWith(this.type.create({language:i},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(nt.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),yme=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}`)})},bme=Rr.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&yme(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Tt(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}}}}),vme=bn.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()}}}),d$=an.create({name:"doc",topNode:!0,content:"block+"});function xme(t={}){return new cn({view(e){return new Sme(e,t)}})}class Sme{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,m=e.nodeAfter;if(p||m){let g=this.editorView.nodeDOM(this.cursorPos-(p?p.nodeSize:0));if(g){let b=g.getBoundingClientRect(),y=p?b.bottom:b.top;p&&m&&(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),m=this.width/2*s;r={left:p.left-m,right:p.left+m,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(),m=p.width/l.offsetWidth,g=p.height/l.offsetHeight;u=p.left-l.scrollLeft*m,f=p.top-l.scrollTop*g}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=dN(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 f$=bn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[xme(this.options)]}}),Cme=bn.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 gn extends at{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return gn.valid(r)?new gn(r):at.near(r)}content(){return $e.empty}eq(e){return e instanceof gn&&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 gn(e.resolve(n.pos))}getBookmark(){return new sC(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!wme(e)||!Tme(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&&gn.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(gn.valid(l))return l}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Xe.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(gn.valid(a))return a}return null}}}gn.prototype.visible=!1;gn.findFrom=gn.findGapCursorFrom;at.jsonID("gapcursor",gn);class sC{constructor(e){this.pos=e}map(e){return new sC(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return gn.valid(n)?new gn(n):at.near(n)}}function wme(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 Tme(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 _me(){return new cn({props:{decorations:Mme,createSelectionBetween(t,e,n){return e.pos==n.pos&&gn.valid(n)?new gn(n):null},handleClick:kme,handleKeyDown:Eme,handleDOMEvents:{beforeinput:Ome}}})}const Eme=SS({ArrowLeft:Of("horiz",-1),ArrowRight:Of("horiz",1),ArrowUp:Of("vert",-1),ArrowDown:Of("vert",1)});function Of(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 nt){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let u=gn.findGapCursorFrom(a,e,l);return u?(o&&o(r.tr.setSelection(new gn(u))),!0):!1}}function kme(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!gn.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Xe.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new gn(r))),!0)}function Ome(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof gn))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=Ae.empty;for(let s=r.length-1;s>=0;s--)o=Ae.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new $e(o,0,0));return i.setSelection(nt.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function Mme(t){if(!(t.selection instanceof gn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",on.create(t.doc,[Gn.widget(t.selection.head,e,{key:"gapcursor"})])}const p$=bn.create({name:"gapCursor",addProseMirrorPlugins(){return[_me()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=gt(Ge(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),h$=an.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",Tt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
403
|
+
`},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(m=>a.includes(m.type.name));u.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Ame=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Rme=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,Ime=Rr.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",Tt(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[wa({find:Ame,type:this.type})]},addPasteRules(){return[_s({find:Rme,type:this.type})]}});var jp=200,Vn=function(){};Vn.prototype.append=function(e){return e.length?(e=Vn.from(e),!this.length&&e||e.length<jp&&this.leafAppend(e)||this.length<jp&&e.leafPrepend(this)||this.appendInner(e)):this};Vn.prototype.prepend=function(e){return e.length?Vn.from(e).append(this):this};Vn.prototype.appendInner=function(e){return new Dme(this,e)};Vn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Vn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Vn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Vn.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)};Vn.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};Vn.from=function(e){return e instanceof Vn?e:e&&e.length?new m$(e):Vn.empty};var m$=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<=jp)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=jp)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}(Vn);Vn.empty=new m$([]);var Dme=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}(Vn);const Pme=500;class _o{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,m)=>{if(!p.step){o||(o=this.remapping(r,m+1),i=o.maps.length),i--,f.push(p);return}if(o){f.push(new Bo(p.map));let g=p.step.map(o.slice(i)),b;g&&s.maybeStep(g).doc&&(b=s.mapping.maps[s.mapping.maps.length-1],u.push(new Bo(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 _o(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]),m=new Bo(e.mapping.maps[f],p,n),g;(g=l&&l.merge(m))&&(m=g,f?i.pop():a=a.slice(0,a.length-1)),i.push(m),n&&(s++,n=void 0),o||(l=m)}let u=s-r.depth;return u>Lme&&(a=Nme(a,u),s-=u),new _o(a.append(i),s)}remapping(e,n){let r=new _u;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 _o(this.items.append(e.map(n=>new Bo(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(m=>{m.selection&&a--},o);let l=n;this.items.forEach(m=>{let g=i.getMirror(--l);if(g==null)return;s=Math.min(s,g);let b=i.maps[g];if(m.step){let y=e.steps[g].invert(e.docs[g]),x=m.selection&&m.selection.map(i.slice(l+1,g));x&&a++,r.push(new Bo(b,y,x))}else r.push(new Bo(b))},o);let u=[];for(let m=n;m<s;m++)u.push(new Bo(i.maps[m]));let f=this.items.slice(0,o).append(u).append(r),p=new _o(f,a);return p.emptyItemCount()>Pme&&(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 Bo(u.invert(),l,f),m,g=o.length-1;(m=o.length&&o[g].merge(p))?o[g]=m:o.push(p)}}else s.map&&r--},this.items.length,0),new _o(Vn.from(o.reverse()),i)}}_o.empty=new _o(Vn.empty,0);function Nme(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Bo{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 Bo(n.getMap().invert(),n,this.selection)}}}class is{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const Lme=20;function jme(t,e,n,r){let o=n.getMeta(ha),i;if(o)return o.historyState;n.getMeta(Bme)&&(t=new is(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(ha))return s.getMeta(ha).redo?new is(t.done.addTransform(n,void 0,r,Xf(e)),t.undone,KR(n.mapping.maps),t.prevTime,t.prevComposition):new is(t.done,t.undone.addTransform(n,void 0,r,Xf(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||!$me(n,t.prevRanges)),u=s?z0(t.prevRanges,n.mapping):KR(n.mapping.maps);return new is(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Xf(e)),_o.empty,u,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new is(t.done.rebased(n,i),t.undone.rebased(n,i),z0(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new is(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),z0(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function $me(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 KR(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 z0(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 Fme(t,e,n){let r=Xf(e),o=ha.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 is(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(s).setMeta(ha,{redo:n,historyState:l})}let H0=!1,GR=null;function Xf(t){let e=t.plugins;if(GR!=e){H0=!1,GR=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){H0=!0;break}}return H0}const ha=new Mn("history"),Bme=new Mn("closeHistory");function Vme(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new cn({key:ha,state:{init(){return new is(_o.empty,_o.empty,null,0,-1)},apply(e,n,r){return jme(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?y$:r=="historyRedo"?b$:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function g$(t,e){return(n,r)=>{let o=ha.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=Fme(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const y$=g$(!1,!0),b$=g$(!0,!0),v$=bn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>y$(t,e),redo:()=>({state:t,dispatch:e})=>b$(t,e)}},addProseMirrorPlugins(){return[Vme(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()}}}),x$=an.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Tt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!Xle(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}):CL(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(nt.create(s.doc,u.pos+1)):u.nodeAfter.isBlock?s.setSelection(Xe.create(s.doc,u.pos)):s.setSelection(nt.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(nt.create(s.doc,f+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[TL({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),zme=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Hme=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Wme=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,qme=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,S$=Rr.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",Tt(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[wa({find:zme,type:this.type}),wa({find:Wme,type:this.type})]},addPasteRules(){return[_s({find:Hme,type:this.type}),_s({find:qme,type:this.type})]}}),Ume="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Kme="ελ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",Ul=(t,e)=>{for(const n in e)t[n]=e[n];return t},Qx="numeric",e1="ascii",t1="alpha",su="asciinumeric",Wc="alphanumeric",n1="domain",C$="emoji",Gme="scheme",Yme="slashscheme",W0="whitespace";function Jme(t,e){return t in e||(e[t]=[]),e[t]}function aa(t,e,n){e[Qx]&&(e[su]=!0,e[Wc]=!0),e[e1]&&(e[su]=!0,e[t1]=!0),e[su]&&(e[Wc]=!0),e[t1]&&(e[Wc]=!0),e[Wc]&&(e[n1]=!0),e[C$]&&(e[n1]=!0);for(const r in e){const o=Jme(r,n);o.indexOf(t)<0&&o.push(t)}}function Xme(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function _r(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}_r.groups={};_r.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||_r.groups;let o;return e&&e.j?o=e:(o=new _r(e),n&&r&&aa(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||_r.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 _r,Ul(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new _r,i){if(r)if(s.t&&typeof s.t=="string"){const l=Ul(Xme(s.t,r),n);aa(i,l,r)}else n&&aa(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),dn=(t,e,n,r,o)=>t.tr(e,n,r,o),YR=(t,e,n,r,o)=>t.ts(e,n,r,o),Ne=(t,e,n,r,o)=>t.tt(e,n,r,o),Ci="WORD",r1="UWORD",w$="ASCIINUMERICAL",T$="ALPHANUMERICAL",Lu="LOCALHOST",o1="TLD",i1="UTLD",Zf="SCHEME",ml="SLASH_SCHEME",aC="NUM",s1="WS",lC="NL",au="OPENBRACE",lu="CLOSEBRACE",$p="OPENBRACKET",Fp="CLOSEBRACKET",Bp="OPENPAREN",Vp="CLOSEPAREN",zp="OPENANGLEBRACKET",Hp="CLOSEANGLEBRACKET",Wp="FULLWIDTHLEFTPAREN",qp="FULLWIDTHRIGHTPAREN",Up="LEFTCORNERBRACKET",Kp="RIGHTCORNERBRACKET",Gp="LEFTWHITECORNERBRACKET",Yp="RIGHTWHITECORNERBRACKET",Jp="FULLWIDTHLESSTHAN",Xp="FULLWIDTHGREATERTHAN",Zp="AMPERSAND",Qp="APOSTROPHE",eh="ASTERISK",ss="AT",th="BACKSLASH",nh="BACKTICK",rh="CARET",us="COLON",cC="COMMA",oh="DOLLAR",Vo="DOT",ih="EQUALS",uC="EXCLAMATION",no="HYPHEN",cu="PERCENT",sh="PIPE",ah="PLUS",lh="POUND",uu="QUERY",dC="QUOTE",_$="FULLWIDTHMIDDLEDOT",fC="SEMI",zo="SLASH",du="TILDE",ch="UNDERSCORE",E$="EMOJI",uh="SYM";var k$=Object.freeze({__proto__:null,ALPHANUMERICAL:T$,AMPERSAND:Zp,APOSTROPHE:Qp,ASCIINUMERICAL:w$,ASTERISK:eh,AT:ss,BACKSLASH:th,BACKTICK:nh,CARET:rh,CLOSEANGLEBRACKET:Hp,CLOSEBRACE:lu,CLOSEBRACKET:Fp,CLOSEPAREN:Vp,COLON:us,COMMA:cC,DOLLAR:oh,DOT:Vo,EMOJI:E$,EQUALS:ih,EXCLAMATION:uC,FULLWIDTHGREATERTHAN:Xp,FULLWIDTHLEFTPAREN:Wp,FULLWIDTHLESSTHAN:Jp,FULLWIDTHMIDDLEDOT:_$,FULLWIDTHRIGHTPAREN:qp,HYPHEN:no,LEFTCORNERBRACKET:Up,LEFTWHITECORNERBRACKET:Gp,LOCALHOST:Lu,NL:lC,NUM:aC,OPENANGLEBRACKET:zp,OPENBRACE:au,OPENBRACKET:$p,OPENPAREN:Bp,PERCENT:cu,PIPE:sh,PLUS:ah,POUND:lh,QUERY:uu,QUOTE:dC,RIGHTCORNERBRACKET:Kp,RIGHTWHITECORNERBRACKET:Yp,SCHEME:Zf,SEMI:fC,SLASH:zo,SLASH_SCHEME:ml,SYM:uh,TILDE:du,TLD:o1,UNDERSCORE:ch,UTLD:i1,UWORD:r1,WORD:Ci,WS:s1});const bi=/[a-z]/,Rc=new RegExp("\\p{L}","u"),q0=new RegExp("\\p{Emoji}","u"),vi=/\d/,U0=/\s/,JR="\r",K0=`
|
|
404
|
+
`,Zme="️",Qme="",G0="";let Mf=null,Af=null;function ege(t=[]){const e={};_r.groups=e;const n=new _r;Mf==null&&(Mf=XR(Ume)),Af==null&&(Af=XR(Kme)),Ne(n,"'",Qp),Ne(n,"{",au),Ne(n,"}",lu),Ne(n,"[",$p),Ne(n,"]",Fp),Ne(n,"(",Bp),Ne(n,")",Vp),Ne(n,"<",zp),Ne(n,">",Hp),Ne(n,"(",Wp),Ne(n,")",qp),Ne(n,"「",Up),Ne(n,"」",Kp),Ne(n,"『",Gp),Ne(n,"』",Yp),Ne(n,"<",Jp),Ne(n,">",Xp),Ne(n,"&",Zp),Ne(n,"*",eh),Ne(n,"@",ss),Ne(n,"`",nh),Ne(n,"^",rh),Ne(n,":",us),Ne(n,",",cC),Ne(n,"$",oh),Ne(n,".",Vo),Ne(n,"=",ih),Ne(n,"!",uC),Ne(n,"-",no),Ne(n,"%",cu),Ne(n,"|",sh),Ne(n,"+",ah),Ne(n,"#",lh),Ne(n,"?",uu),Ne(n,'"',dC),Ne(n,"/",zo),Ne(n,";",fC),Ne(n,"~",du),Ne(n,"_",ch),Ne(n,"\\",th),Ne(n,"・",_$);const r=dn(n,vi,aC,{[Qx]:!0});dn(r,vi,r);const o=dn(r,bi,w$,{[su]:!0}),i=dn(r,Rc,T$,{[Wc]:!0}),s=dn(n,bi,Ci,{[e1]:!0});dn(s,vi,o),dn(s,bi,s),dn(o,vi,o),dn(o,bi,o);const a=dn(n,Rc,r1,{[t1]:!0});dn(a,bi),dn(a,vi,i),dn(a,Rc,a),dn(i,vi,i),dn(i,bi),dn(i,Rc,i);const l=Ne(n,K0,lC,{[W0]:!0}),u=Ne(n,JR,s1,{[W0]:!0}),f=dn(n,U0,s1,{[W0]:!0});Ne(n,G0,f),Ne(u,K0,l),Ne(u,G0,f),dn(u,U0,f),Ne(f,JR),Ne(f,K0),dn(f,U0,f),Ne(f,G0,f);const p=dn(n,q0,E$,{[C$]:!0});Ne(p,"#"),dn(p,q0,p),Ne(p,Zme,p);const m=Ne(p,Qme);Ne(m,"#"),dn(m,q0,p);const g=[[bi,s],[vi,o]],b=[[bi,null],[Rc,a],[vi,i]];for(let y=0;y<Mf.length;y++)es(n,Mf[y],o1,Ci,g);for(let y=0;y<Af.length;y++)es(n,Af[y],i1,r1,b);aa(o1,{tld:!0,ascii:!0},e),aa(i1,{utld:!0,alpha:!0},e),es(n,"file",Zf,Ci,g),es(n,"mailto",Zf,Ci,g),es(n,"http",ml,Ci,g),es(n,"https",ml,Ci,g),es(n,"ftp",ml,Ci,g),es(n,"ftps",ml,Ci,g),aa(Zf,{scheme:!0,ascii:!0},e),aa(ml,{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[y][1]?{[Gme]:!0}:{[Yme]:!0};x.indexOf("-")>=0?_[n1]=!0:bi.test(x)?vi.test(x)?_[su]=!0:_[e1]=!0:_[Qx]=!0,YR(n,x,x,_)}return YR(n,"localhost",Lu,{ascii:!0}),n.jd=new _r(uh),{start:n,tokens:Ul({groups:e},k$)}}function O$(t,e){const n=tge(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,m=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(p=0,m=0,f=a):p>=0&&(p+=n[s].length,m++),u+=n[s].length,i+=n[s].length,s++;i-=p,s-=m,u-=p,o.push({t:f.t,v:e.slice(i-u,i),s:i-u,e:i})}return o}function tge(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 es(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 _r(r),i.jr=o.slice(),t.j[l]=i),t=i}return i=new _r(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function XR(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 ju={defaultProtocol:"http",events:null,format:ZR,formatHref:ZR,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function pC(t,e=null){let n=Ul({},ju);t&&(n=Ul(n,t instanceof pC?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}pC.prototype={o:ju,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]:ju[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 ZR(t){return t}function M$(t,e){this.t="token",this.v=t,this.tk=e}M$.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=ju.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&&Ul(s,f),{tagName:o,attributes:s,content:i,eventListeners:p}}};function Mm(t,e){class n extends M${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 QR=Mm("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),e2=Mm("text"),nge=Mm("nl"),Rf=Mm("url",{isLink:!0,toHref(t=ju.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Lu&&t[1].t===us}}),to=t=>new _r(t);function rge({groups:t}){const e=t.domain.concat([Zp,eh,ss,th,nh,rh,oh,ih,no,aC,cu,sh,ah,lh,zo,uh,du,ch]),n=[Qp,us,cC,Vo,uC,cu,uu,dC,fC,zp,Hp,au,lu,Fp,$p,Bp,Vp,Wp,qp,Up,Kp,Gp,Yp,Jp,Xp],r=[Zp,Qp,eh,th,nh,rh,oh,ih,no,au,lu,cu,sh,ah,lh,uu,zo,uh,du,ch],o=to(),i=Ne(o,du);mt(i,r,i),mt(i,t.domain,i);const s=to(),a=to(),l=to();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=Ne(s,ss);Ne(i,ss,u),Ne(a,ss,u),Ne(l,ss,u);const f=Ne(i,Vo);mt(f,r,i),mt(f,t.domain,i);const p=to();mt(u,t.domain,p),mt(p,t.domain,p);const m=Ne(p,Vo);mt(m,t.domain,p);const g=to(QR);mt(m,t.tld,g),mt(m,t.utld,g),Ne(u,Lu,g);const b=Ne(p,no);Ne(b,no,b),mt(b,t.domain,p),mt(g,t.domain,p),Ne(g,Vo,m),Ne(g,no,b);const y=Ne(g,us);mt(y,t.numeric,QR);const x=Ne(s,no),C=Ne(s,Vo);Ne(x,no,x),mt(x,t.domain,s),mt(C,r,i),mt(C,t.domain,s);const _=to(Rf);mt(C,t.tld,_),mt(C,t.utld,_),mt(_,t.domain,s),mt(_,r,i),Ne(_,Vo,C),Ne(_,no,x),Ne(_,ss,u);const T=Ne(_,us),w=to(Rf);mt(T,t.numeric,w);const k=to(Rf),M=to();mt(k,e,k),mt(k,n,M),mt(M,e,k),mt(M,n,M),Ne(_,zo,k),Ne(w,zo,k);const A=Ne(a,us),R=Ne(l,us),N=Ne(R,zo),O=Ne(N,zo);mt(a,t.domain,s),Ne(a,Vo,C),Ne(a,no,x),mt(l,t.domain,s),Ne(l,Vo,C),Ne(l,no,x),mt(A,t.domain,k),Ne(A,zo,k),Ne(A,uu,k),mt(O,t.domain,k),mt(O,e,k),Ne(O,zo,k);const I=[[au,lu],[$p,Fp],[Bp,Vp],[zp,Hp],[Wp,qp],[Up,Kp],[Gp,Yp],[Jp,Xp]];for(let L=0;L<I.length;L++){const[B,V]=I[L],j=Ne(k,B);Ne(M,B,j),Ne(j,V,k);const F=to(Rf);mt(j,e,F);const U=to();mt(j,n),mt(F,e,F),mt(F,n,U),mt(U,e,F),mt(U,n,U),Ne(F,V,k),Ne(U,V,k)}return Ne(o,Lu,_),Ne(o,lC,nge),{start:o,tokens:k$}}function oge(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,m=-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()?(m=0,p=a):m>=0&&m++,o++,f++;if(m<0)o-=f,o<r&&(s.push(n[o]),o++);else{s.length>0&&(i.push(Y0(e2,e,s)),s=[]),o-=m,f-=m;const g=p.t,b=n.slice(o-f,o);i.push(Y0(g,e,b))}}return s.length>0&&i.push(Y0(e2,e,s)),i}function Y0(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 ige=typeof console<"u"&&console&&console.warn||(()=>{}),sge="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Xt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function age(){return _r.groups={},Xt.scanner=null,Xt.parser=null,Xt.tokenQueue=[],Xt.pluginQueue=[],Xt.customSchemes=[],Xt.initialized=!1,Xt}function t2(t,e=!1){if(Xt.initialized&&ige(`linkifyjs: already initialized - will not register custom scheme "${t}" ${sge}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
405
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
406
|
+
2. Cannot start or end with "-"
|
|
407
|
+
3. "-" cannot repeat`);Xt.customSchemes.push([t,e])}function lge(){Xt.scanner=ege(Xt.customSchemes);for(let t=0;t<Xt.tokenQueue.length;t++)Xt.tokenQueue[t][1]({scanner:Xt.scanner});Xt.parser=rge(Xt.scanner.tokens);for(let t=0;t<Xt.pluginQueue.length;t++)Xt.pluginQueue[t][1]({scanner:Xt.scanner,parser:Xt.parser});return Xt.initialized=!0,Xt}function hC(t){return Xt.initialized||lge(),oge(Xt.parser.start,t,O$(Xt.scanner.start,t))}hC.scan=O$;function A$(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 pC(n),o=hC(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 mC="[\0- -\u2029 ]",cge=new RegExp(mC),uge=new RegExp(`${mC}$`),dge=new RegExp(mC,"g");function fge(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function pge(t){return new cn({key:new Mn("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=dle(n.doc,[...e]);if(yle(a).forEach(({newRange:u})=>{const f=ple(r.doc,u,g=>g.isTextblock);let p,m;if(f.length>1)p=f[0],m=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ");else if(f.length){const g=r.doc.textBetween(u.from,u.to," "," ");if(!uge.test(g))return;p=f[0],m=r.doc.textBetween(p.pos,u.to,void 0," ")}if(p&&m){const g=m.split(cge).filter(Boolean);if(g.length<=0)return!1;const b=g[g.length-1],y=p.pos+m.lastIndexOf(b);if(!b)return!1;const x=hC(b).map(C=>C.toObject(t.defaultProtocol));if(!fge(x))return!1;x.filter(C=>C.isLink).map(C=>({...C,from:y+C.start+1,to:y+C.end+1})).filter(C=>r.schema.marks.code?!r.doc.rangeHasMark(C.from,C.to,r.schema.marks.code):!0).filter(C=>t.validate(C.value)).filter(C=>t.shouldAutoLink(C.value)).forEach(C=>{DS(C.from,C.to,r.doc).some(_=>_.mark.type===t.type)||s.addMark(C.from,C.to,t.type.create({href:C.href}))})}}),!!s.steps.length)return s}})}function hge(t){return new cn({key:new Mn("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(m=>m.nodeName==="A"))return!1;const l=IS(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 mge(t){return new cn({key:new Mn("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=A$(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 Gs(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(dge,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const gge=Rr.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"){t2(t);return}t2(t.scheme,t.optionalSlashes)})},onDestroy(){age()},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)=>!!Gs(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=>!!Gs(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=>!!Gs(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Tt(this.options.HTMLAttributes,t),0]:["a",Tt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Gs(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=>!!Gs(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[_s({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=A$(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!Gs(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(pge({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Gs(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(hge({type:this.type})),this.options.linkOnPaste&&t.push(mge({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),R$=an.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Tt(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 yge(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:a}=t,l=r&&!o,u=Zle(n),f=new RegExp(`\\s${u}$`),p=s?"^":"",m=o?"":u,g=l?new RegExp(`${p}${u}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${p}(?:^)?${u}[^\\s${m}]*`,"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(g)).pop();if(!x||x.input===void 0||x.index===void 0)return null;const C=x.input.slice(Math.max(0,x.index-1),x.index),_=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(C);if(i!==null&&!_)return null;const T=y+x.index;let w=T+x[0].length;return l&&f.test(b.slice(w-1,w+1))&&(x[0]+=" ",w+=1),T<a.pos&&w>=a.pos?{range:{from:T,to:w},query:x[0].slice(n.length),text:x[0]}:null}const bge=new Mn("suggestion");function vge({pluginKey:t=bge,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:m=()=>[],render:g=()=>({}),allow:b=()=>!0,findSuggestionMatch:y=yge}){let x;const C=g==null?void 0:g(),_=new cn({key:t,view(){return{update:async(T,w)=>{var k,M,A,R,N,O,I;const L=(k=this.key)===null||k===void 0?void 0:k.getState(w),B=(M=this.key)===null||M===void 0?void 0:M.getState(T.state),V=L.active&&B.active&&L.range.from!==B.range.from,j=!L.active&&B.active,F=L.active&&!B.active,U=!j&&!F&&L.query!==B.query,K=j||V&&U,Y=U||V,G=F||V&&U;if(!K&&!Y&&!G)return;const Z=G&&!K?L:B,me=T.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:me,clientRect:me?()=>{var he;const{decorationId:ge}=(he=this.key)===null||he===void 0?void 0:he.getState(e.state),oe=T.dom.querySelector(`[data-decoration-id="${ge}"]`);return(oe==null?void 0:oe.getBoundingClientRect())||null}:null},K&&((A=C==null?void 0:C.onBeforeStart)===null||A===void 0||A.call(C,x)),Y&&((R=C==null?void 0:C.onBeforeUpdate)===null||R===void 0||R.call(C,x)),(Y||K)&&(x.items=await m({editor:e,query:Z.query})),G&&((N=C==null?void 0:C.onExit)===null||N===void 0||N.call(C,x)),Y&&((O=C==null?void 0:C.onUpdate)===null||O===void 0||O.call(C,x)),K&&((I=C==null?void 0:C.onStart)===null||I===void 0||I.call(C,x))},destroy:()=>{var T;x&&((T=C==null?void 0:C.onExit)===null||T===void 0||T.call(C,x))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(T,w,k,M){const{isEditable:A}=e,{composing:R}=e.view,{selection:N}=T,{empty:O,from:I}=N,L={...w};if(L.composing=R,A&&(O||e.view.composing)){(I<w.range.from||I>w.range.to)&&!R&&!w.composing&&(L.active=!1);const B=y({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:N.$from}),V=`id_${Math.floor(Math.random()*4294967295)}`;B&&b({editor:e,state:M,range:B.range,isActive:w.active})?(L.active=!0,L.decorationId=w.decorationId?w.decorationId:V,L.range=B.range,L.query=B.query,L.text=B.text):L.active=!1}else L.active=!1;return L.active||(L.decorationId=null,L.range={from:0,to:0},L.query=null,L.text=null),L}},props:{handleKeyDown(T,w){var k;const{active:M,range:A}=_.getState(T.state);return M&&((k=C==null?void 0:C.onKeyDown)===null||k===void 0?void 0:k.call(C,{view:T,event:w,range:A}))||!1},decorations(T){const{active:w,range:k,decorationId:M,query:A}=_.getState(T);if(!w)return null;const R=!(A!=null&&A.length),N=[l];return R&&N.push(f),on.create(T.doc,[Gn.inline(k.from,k.to,{nodeName:a,class:N.join(" "),"data-decoration-id":M,"data-decoration-content":u})])}}});return _}function xge({editor:t,overrideSuggestionOptions:e,extensionName:n,char:r="@"}){const o=new Mn;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 I$(t){return(t.options.suggestions.length?t.options.suggestions:[t.options.suggestion]).map(e=>xge({editor:t.editor,overrideSuggestionOptions:e,extensionName:t.name,char:e.char}))}function n2(t,e){const n=I$(t),r=n.find(o=>o.char===e);return r||(n.length?n[0]:null)}const Sge=an.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",Tt(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=n2(this,t.attrs.mentionSuggestionChar);if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",Tt({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t,suggestion:n})];const r={...this.options};r.HTMLAttributes=Tt({"data-type":this.name},this.options.HTMLAttributes,e);const o=this.options.renderHTML({options:r,node:t,suggestion:n});return typeof o=="string"?["span",Tt({"data-type":this.name},this.options.HTMLAttributes,e),o]:o},renderText({node:t}){const e={options:this.options,node:t,suggestion:n2(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 ki,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 I$(this).map(vge)}}),Cge="listItem",r2="textStyle",o2=/^(\d+)\.\s$/,D$=an.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",Tt(this.options.HTMLAttributes,n),0]:["ol",Tt(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(Cge,this.editor.getAttributes(r2)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Wl({find:o2,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=Wl({find:o2,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(r2)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),P$=an.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Tt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),N$=bn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new cn({key:new Mn("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&&ym(s);if((l||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];i&&f.push(this.options.emptyEditorClass);const p=Gn.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)}}})]}}),wge=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Tge=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,L$=Rr.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",Tt(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[wa({find:wge,type:this.type})]},addPasteRules(){return[_s({find:Tge,type:this.type})]}}),_ge=Rr.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",Tt(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()}}}),Ege=Rr.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",Tt(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()}}}),kge=an.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",Tt(this.options.HTMLAttributes,t),0]}}),Oge=an.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",Tt(this.options.HTMLAttributes,t),0]}}),Mge=an.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Tt(this.options.HTMLAttributes,t),0]}}),Age=/^\s*(\[([( |x])?\])\s$/,Rge=an.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",Tt(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:m})=>{const g=n();if(typeof g!="number")return!1;const b=m.doc.nodeAt(g);return m.setNodeMarkup(g,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[Wl({find:Age,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),Ige=an.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",Tt(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()}}}),j$=an.create({name:"text",group:"inline"}),Dge=bn.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")}}}),Pge=Rr.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",Tt(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()}}}),$$=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});$$.displayName="SuggestionList";const i2={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0,toJSON(){return{}}},Nge={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 Cj($$,{props:n,editor:n.editor}),e=ld("body",{getReferenceClientRect:()=>{var r;return((r=n.clientRect)==null?void 0:r.call(n))??i2},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))??i2}})},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}}}},Lge=gge.extend({inclusive:!1}),jge=_ge.extend({excludes:"superscript"}),$ge=Ege.extend({excludes:"subscript"});function Fge({placeholder:t}={}){return q.useMemo(()=>[ime.configure({resizable:!0}),Mge,Oge,kge,l$,u$,d$,h$,R$,D$,P$,jge,$ge,j$,a$,s$,c$,S$,Pge,L$,Lge.configure({autolink:!0,linkOnPaste:!0,openOnClick:!1}),Zue,p$,Jpe,Dge.configure({types:["heading","paragraph","image"]}),bme,vme,Cme,Gpe,Ime.configure({multicolor:!0}),x$,rhe,f$,Ige,Rge.configure({nested:!0}),Sge.configure({suggestion:Nge}),N$.configure({placeholder:t}),v$],[t])}function s2(t){return Array.from(t).filter(e=>(e.type||"").toLowerCase().startsWith("image/"))}const Bge=t=>{const e=Fge({placeholder:"Add your own content here..."});if(t.renderContentOnly)return v.jsx(Efe,{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}=ln();q.useEffect(()=>{var y,x,C;(C=(x=(y=f==null?void 0:f.current)==null?void 0:y.editor)==null?void 0:x.commands)==null||C.setContent(u(n))},[u(n)]);const f=q.useRef(null),p=q.useCallback((y,x)=>{var _;const C=(_=f.current)==null?void 0:_.editor;if(C)if(i instanceof Promise)i(y).then(T=>{Ux({images:T,editor:C,position:x})});else{const T=i(y);Ux({images:T,editor:C,position:x})}},[]),m=q.useCallback((y,x,C,_)=>{var w;if(!(x instanceof DragEvent)||!x.dataTransfer)return!1;const T=s2(x.dataTransfer.files);if(T.length>0){const k=(w=y.posAtCoords({left:x.clientX,top:x.clientY}))==null?void 0:w.pos;return p(T,k),x.preventDefault(),!0}return!1},[p]),g=q.useCallback((y,x,C)=>{if(!x.clipboardData)return!1;const _=s2(x.clipboardData.files);return _.length>0?(p(_),!0):!1},[p]),b=v.jsx($.Box,{sx:{"& .ProseMirror":{"& h1, & h2, & h3, & h4, & h5, & h6":{scrollMarginTop:s?0:50}}},children:v.jsx(nr,{name:n,control:a,render:({field:y})=>v.jsx(Oj,{...y,ref:f,extensions:e,content:u(n),editable:!s,editorProps:{handleDrop:m,handlePaste:g},renderControls:s?void 0:()=>v.jsx(sme,{onUploadFiles:i}),onBlur:()=>{var x,C;return l(n,((C=(x=f.current)==null?void 0:x.editor)==null?void 0:C.getHTML())??"",{shouldValidate:!0})},RichTextFieldProps:{variant:"outlined",MenuBarProps:{hide:s}},children:()=>v.jsxs(v.Fragment,{children:[v.jsx(sj,{}),v.jsx(Mj,{})]})})})});return v.jsxs($.Box,{display:"flex",flexDirection:"column",children:[r&&v.jsx($.Typography,{...o,children:r}),b]})},a1=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"})]})},a2=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})})})},F$=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:m=!1,className:g,emptyTableMsg:b="No items to display",errorTableMsg:y,retryCallback:x,isLoading:C=!1,disableMobileCards:_=!1,highlightSelectedRow:T=!1,headerRowStyle:w={},stickyHeader:k,...M}=t,{palette:A}=$.useTheme(),[R,N]=q.useState(void 0),[O,I]=q.useState(void 0);Array.isArray(m)&&m.length!==r.length&&console.error('Table component: Length of "fixedLayout" is not equal to the length of "columns".');const L=X=>{X!==l?f&&f(X,"asc"):f&&f(l,u==="asc"?"desc":"asc")},B=X=>l===X?u:null,V=$.useMediaQuery($.useTheme().breakpoints.down("sm")),j=V&&a?r.filter(X=>!a.includes(X.fieldName)):r,F=(X,Q)=>Q.split(".").reduce((ae,ve)=>{if(ae&&typeof ae=="object")return ae[ve]},X),U=(X,Q)=>{const ae=F(Q,X.fieldName);return X.render?X.render(ae,Q,V):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(TK,{})," ",b]}),Z=v.jsxs($.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:[v.jsx(GI,{})," ",y,x&&v.jsx($.Button,{variant:"text",onClick:x,children:"Retry?"})]}),me=()=>{if(C)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(a1,{})})})});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(C)return v.jsx(a1,{});if(y)return Z;if(o.length===0)return G},ge=X=>{T&&I(X)},oe=X=>{if(i&&(i(X),ge(X)),s){const Q=R===X?void 0:X;N(Q),ge(Q)}},ye=typeof T=="string"?T: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?vQ(Q,.1):ye}}}};return V&&!_?v.jsxs("div",{...e?{id:`mobile-table-${e}`}:{},className:g,"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=>L(X.target.value),fullWidth:!0,children:j.map(X=>{if(Y(X.fieldName))return v.jsx($.MenuItem,{value:X.sortName??X.fieldName,children:X.label??Yn(X.fieldName)},`${X.key??"rowHeader"}-${X.fieldName}`)})}),v.jsx($.IconButton,{onClick:()=>{l&&L(l)},children:v.jsx(PK,{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:j.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??Yn(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(a2,{colSpan:r.length,isExpanded:n(X)===R,obj:X,renderExpand:Q=>s(Q),asMobileCard:!0})]},n(X)))]}):v.jsx($.TableContainer,{component:$.Card,"data-testid":"mui-table",...e?{id:`table-${e}`}:{},className:g,style:k?{maxHeight:k,overflow:"auto"}:{},children:v.jsxs($.Table,{stickyHeader:k!=="undefined",style:{tableLayout:m?"fixed":"auto"},className:"MBv2_Table",sx:w?{"& .MuiTableCell-head":{...w}}:{},...M,children:[v.jsx($.TableHead,{className:"MBv2_Table_Head",children:v.jsx($.TableRow,{className:"MBv2_Table_Head_Row",children:j.map((X,Q)=>{const ae=Y(X.fieldName);return v.jsx($.TableCell,{width:Array.isArray(m)?m[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?()=>L(X.sortName??X.fieldName):void 0,children:[v.jsx("strong",{className:"MBv2_Table_Col_Label",style:{wordBreak:"normal"},children:X.label??Yn(X.fieldName)}),ae&&B(X.fieldName)==="asc"&&v.jsx(rD,{style:{marginLeft:"5px"}}),ae&&B(X.fieldName)==="desc"&&v.jsx(_K,{style:{marginLeft:"5px"}}),ae&&B(X.fieldName)!=="asc"&&B(X.fieldName)!=="desc"&&v.jsx(RK,{style:{marginLeft:"5px"}})]})})},`${X.key??"rowHeader"}-${X.fieldName}`)})})}),v.jsx($.TableBody,{className:"MBv2_Table_Body",children:me()??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:j.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(a2,{colSpan:r.length,isExpanded:n(X)===R,obj:X,renderExpand:Q=>s(Q)})]},n(X)))})]})})},B$=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,m=x=>{n(x)},g=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(F$,{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,C)=>m(C),onRowsPerPageChange:g,sx:{flexGrow:1,marginRight:{xs:0,md:15}}})]})},Vge=t=>{const{editMenuTitle:e,onCancel:n,onNewCitation:r,onNewAttachment:o,onEditCitation:i,onEditAttachment:s,onSelect:a,fetchExistingCitations:l,selectedIds:u,toggleCheckbox:f}=t,[p,m]=q.useState([]),[g,b]=q.useState(!1),[y,x]=q.useState(!0),[C,_]=q.useState({pageNo:0,pageSize:5,totalCount:0}),T=()=>{b(!1),x(!0),l({pageNo:C.pageNo,pageSize:C.pageSize}).then(w=>{m(w.data),_({...C,totalCount:w.totalCount})}).catch(()=>{b(!0),m([])}).finally(()=>x(!1))};return q.useEffect(()=>{T()},[C.pageNo,C.pageSize]),v.jsxs($.Box,{width:"500px","data-testid":"citation-table",children:[v.jsx($.Typography,{variant:"h6",children:e}),v.jsx(B$,{size:"x-small",isLoading:y,columns:[{fieldName:"id",key:"select",label:"",render:(w,k)=>v.jsx($.Checkbox,{"data-testid":`citation-table_checkbox-${w}`,onChange:()=>f(k),checked:u.includes(w)})},{fieldName:"title"},{fieldName:"fileName",key:"CitationOrAttachment",label:"Type",render:w=>w?"Attachment":"Citation"},{fieldName:"id",key:"Action",label:"Action",render:(w,k)=>v.jsx($.IconButton,{color:"primary",onClick:()=>k.fileName?s(k):i(k),"data-testid":`citation-table_edit-btn-${w}`,children:v.jsx(sK,{})})}],data:p,paginationState:C,onPageChange:w=>_({...C,pageNo:w}),onRowsPerPageChange:w=>_({...C,pageSize:w,pageNo:0}),fixedLayout:["60px","auto","auto","120px"],errorTableMsg:g?"Failed to load citations.":void 0,retryCallback:T}),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(w1,{}),children:"Add Citation"}),v.jsx($.Button,{variant:"outlined",size:"small",onClick:o,startIcon:v.jsx(eK,{}),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})`]})]})]})]})},l2=()=>({height:window.innerHeight,width:window.innerWidth}),V$=()=>{const[t,e]=q.useState(l2());return q.useEffect(()=>{const n=()=>{e(l2())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t},gC=t=>{const{name:e="button",color:n="primary",fullWidthOnMobile:r=!0,type:o="button",variant:i="contained"}=t,{width:s}=V$(),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,...fr({...t},a)})},z$=t=>{const{name:e="submit"}=t;return v.jsx(gC,{name:e,type:"submit",...t})},zge=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:""}),[m,g]=q.useState("");q.useEffect(()=>{if(e===void 0){u(!1);return}i(e).then(y=>{p(y),g(y.title),u(!1)}).catch(()=>{u(!1)})},[]);const b=()=>{var x,C,_;const y=(C=(x=a==null?void 0:a.current)==null?void 0:x.values)==null?void 0:C.url;y&&((_=a==null?void 0:a.current)==null||_.setFieldValue("url",oj(y)))};return v.jsxs($.Box,{width:"500px",children:[v.jsx($.Typography,{variant:"h6",marginBottom:"10px",children:n}),v.jsx(Il.Formik,{innerRef:a,enableReinitialize:!0,initialValues:f,onSubmit:async y=>{u(!0),r(y).then(()=>{e!==void 0&&m!==y.title&&(s==null||s(e))}).finally(()=>u(!1))},children:v.jsxs(Il.Form,{autoComplete:"off",children:[v.jsx(Uc,{name:"source",disabled:l,required:!0,margin:"none"}),v.jsx(Uc,{name:"title",disabled:l,required:!0,margin:"none"}),v.jsx(Sp,{name:"accessedAt",disabled:l,required:!0,margin:"none"}),v.jsx(Uc,{name:"url",disabled:l,required:!0,onBlur:b,margin:"none"}),v.jsx(tD,{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(z$,{color:"primary",variant:"contained",size:"small",disabled:l,children:e?"Update Citation":"Add New Citation"})]})]})})]})};var J0,c2;function Hge(){if(c2)return J0;c2=1;function t(C){this._maxSize=C,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(C){return this._values[C]},t.prototype.set=function(C,_){return this._size>=this._maxSize&&this.clear(),C in this._values||this._size++,this._values[C]=_};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);J0={Cache:t,split:p,normalizePath:f,setter:function(C){var _=f(C);return l.get(C)||l.set(C,function(w,k){for(var M=0,A=_.length,R=w;M<A-1;){var N=_[M];if(N==="__proto__"||N==="constructor"||N==="prototype")return w;R=R[_[M++]]}R[_[M]]=k})},getter:function(C,_){var T=f(C);return u.get(C)||u.set(C,function(k){for(var M=0,A=T.length;M<A;)if(k!=null||!_)k=k[T[M++]];else return;return k})},join:function(C){return C.reduce(function(_,T){return _+(g(T)||n.test(T)?"["+T+"]":(_?".":"")+T)},"")},forEach:function(C,_,T){m(Array.isArray(C)?C:p(C),_,T)}};function f(C){return a.get(C)||a.set(C,p(C).map(function(_){return _.replace(i,"$2")}))}function p(C){return C.match(e)||[""]}function m(C,_,T){var w=C.length,k,M,A,R;for(M=0;M<w;M++)k=C[M],k&&(x(k)&&(k='"'+k+'"'),R=g(k),A=!R&&/^\d+$/.test(k),_.call(T,k,R,A,M,C))}function g(C){return typeof C=="string"&&C&&["'",'"'].indexOf(C.charAt(0))!==-1}function b(C){return C.match(r)&&!C.match(n)}function y(C){return o.test(C)}function x(C){return!g(C)&&(b(C)||y(C))}return J0}var ma=Hge(),X0,u2;function Wge(){if(u2)return X0;u2=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,m)=>`${p}${p?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return X0={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(" ")},X0}var Z0=Wge(),If={exports:{}},d2;function qge(){if(d2)return If.exports;d2=1,If.exports=function(o){return t(e(o),o)},If.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(g){if(!p.has(g[0])||!p.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||m(o[u],u,new Set);return a;function m(g,b,y){if(y.has(g)){var x;try{x=", node was:"+JSON.stringify(g)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!p.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!l[b]){l[b]=!0;var C=f.get(g)||new Set;if(C=Array.from(C),b=C.length){y.add(g);do{var _=C[--b];m(_,p.get(_),y)}while(b);y.delete(g)}a[--s]=g}}}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 If.exports}var Uge=qge();const Kge=yr(Uge),Gge=Object.prototype.toString,Yge=Error.prototype.toString,Jge=RegExp.prototype.toString,Xge=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Zge=/^Symbol\((.*)\)(.*)$/;function Qge(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function f2(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const n=typeof t;if(n==="number")return Qge(t);if(n==="string")return e?`"${t}"`:t;if(n==="function")return"[Function "+(t.name||"anonymous")+"]";if(n==="symbol")return Xge.call(t).replace(Zge,"Symbol($1)");const r=Gge.call(t).slice(8,-1);return r==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):r==="Error"||t instanceof Error?"["+Yge.call(t)+"]":r==="RegExp"?Jge.call(t):null}function Ss(t,e){let n=f2(t,e);return n!==null?n:JSON.stringify(t,function(r,o){let i=f2(this[r],e);return i!==null?i:o},2)}function H$(t){return t==null?[]:[].concat(t)}let W$,q$,U$,eye=/\$\{\s*(\w+)\s*\}/g;W$=Symbol.toStringTag;class p2{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[W$]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],H$(e).forEach(i=>{if(Er.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]}}q$=Symbol.hasInstance;U$=Symbol.toStringTag;class Er 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(eye,(o,i)=>Ss(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 p2(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[U$]="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,Er)}static[q$](e){return p2[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Ho={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 \`${Ss(r,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${Ss(n,!0)}\``+o:`${t} must match the configured type. The validated value was: \`${Ss(n,!0)}\``+o}},wr={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"},tye={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"},l1={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},nye={isValue:"${path} field must be ${value}"},Qf={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},rye={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"},oye={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: \`${Ss(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: \`${Ss(n,!0)}\``}return Er.formatError(Ho.notType,t)}};Object.assign(Object.create(null),{mixed:Ho,string:wr,number:tye,date:l1,object:Qf,array:rye,boolean:nye,tuple:oye});const yC=t=>t&&t.__isYupSchema__;class dh{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 dh(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(!yC(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const Df={context:"$",value:"."};class Ia{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]===Df.context,this.isValue=this.key[0]===Df.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Df.context:this.isValue?Df.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&ma.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}}Ia.prototype.__isYupRef=!0;const la=t=>t==null;function cl(t){function e({value:n,path:r="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:f,params:p,message:m,skipAbsent:g}=t;let{parent:b,context:y,abortEarly:x=s.spec.abortEarly,disableStackTrace:C=s.spec.disableStackTrace}=o;function _(I){return Ia.isRef(I)?I.getValue(n,b,y):I}function T(I={}){const L=Object.assign({value:n,originalValue:i,label:s.spec.label,path:I.path||r,spec:s.spec,disableStackTrace:I.disableStackTrace||C},p,I.params);for(const V of Object.keys(L))L[V]=_(L[V]);const B=new Er(Er.formatError(I.message||m,L),n,L.path,I.type||u,L.disableStackTrace);return B.params=L,B}const w=x?a:l;let k={path:r,parent:b,type:u,from:o.from,createError:T,resolve:_,options:o,originalValue:i,schema:s};const M=I=>{Er.isError(I)?w(I):I?l(null):w(T())},A=I=>{Er.isError(I)?w(I):a(I)};if(g&&la(n))return M(!0);let N;try{var O;if(N=f.call(k,n,k),typeof((O=N)==null?void 0:O.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(M,A)}}catch(I){A(I);return}M(N)}return e.OPTIONS=t,e}function iye(t,e,n,r=n){let o,i,s;return e?(ma.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",m=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&&m>=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[m],t=p?t.spec.types[m]: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 fh extends Set{describe(){const e=[];for(const n of this.values())e.push(Ia.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 fh(this.values())}merge(e,n){const r=this.clone();return e.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function xl(t,e=new Map){if(yC(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]=xl(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,xl(o,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const r of t)n.add(xl(r,e))}else if(t instanceof Object){n={},e.set(t,n);for(const[r,o]of Object.entries(t))n[r]=xl(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 fh,this._blacklist=new fh,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ho.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=xl(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&&la(i))return i;let s=Ss(e),a=Ss(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
|
|
408
|
+
|
|
409
|
+
attempted value: ${s}
|
|
410
|
+
`+(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))},m=i.length,g=[];if(!m)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(_){_&&(Array.isArray(_)?g.push(..._):g.push(_)),--m<=0&&p(g)})}}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,m,g)=>this.resolve(f)._validate(u,f,m,g)}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)=>{Er.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new Er(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 Er.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Er(a,e,void 0,void 0,s);i=l}),i}isValid(e,n){return this.validate(e,n).then(()=>!0,r=>{if(Er.isError(r))return!1;throw r})}isValidSync(e,n){try{return this.validateSync(e,n),!0}catch(r){if(Er.isError(r))return!1;throw r}}_getDefault(e){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,e):xl(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=cl({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=cl({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(e=Ho.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Ho.notNull){return this.nullability(!1,e)}required(e=Ho.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=Ho.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=cl(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=H$(e).map(i=>new Ia(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new dh(o,n):dh.fromOptions(o,n)),r}typeError(e){let n=this.clone();return n.internalTests.typeError=cl({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=Ho.oneOf){let r=this.clone();return e.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=cl({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=Ho.notOneOf){let r=this.clone();return e.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=cl({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}=iye(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 sye=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function aye(t){const e=c1(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 c1(t){var e,n;const r=sye.exec(t);return r?{year:xi(r[1]),month:xi(r[2],1)-1,day:xi(r[3],1),hour:xi(r[4]),minute:xi(r[5]),second:xi(r[6]),millisecond:r[7]?xi(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:xi(r[10]),minuteOffset:xi(r[11])}:null}function xi(t,e=0){return Number(t)||e}let lye=/^[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])?)*$/,cye=/^((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,uye=/^(?:[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,dye="^\\d{4}-\\d{2}-\\d{2}",fye="\\d{2}:\\d{2}:\\d{2}",pye="(([+-]\\d{2}(:?\\d{2})?)|Z)",hye=new RegExp(`${dye}T${fye}(\\.\\d+)?${pye}$`),mye=t=>la(t)||t===t.trim(),gye={}.toString();function u1(){return new K$}class K$ 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===gye?e:o})})}required(e){return super.required(e).withMutation(n=>n.test({message:e||Ho.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=wr.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=wr.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=wr.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||wr.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&r||s.search(e)!==-1})}email(e=wr.email){return this.matches(lye,{name:"email",message:e,excludeEmptyString:!0})}url(e=wr.url){return this.matches(cye,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=wr.uuid){return this.matches(uye,{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(hye,{name:"datetime",message:n||wr.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||wr.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const s=c1(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:n||wr.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=c1(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=wr.trim){return this.transform(n=>n!=null?n.trim():n).test({message:e,name:"trim",test:mye})}lowercase(e=wr.lowercase){return this.transform(n=>la(n)?n:n.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>la(n)||n===n.toLowerCase()})}uppercase(e=wr.uppercase){return this.transform(n=>la(n)?n:n.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>la(n)||n===n.toUpperCase()})}}u1.prototype=K$.prototype;let yye=new Date(""),bye=t=>Object.prototype.toString.call(t)==="[object Date]";class bC extends ti{constructor(){super({type:"date",check(e){return bye(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,n,r)=>!r.spec.coerce||r.isType(e)||e===null?e:(e=aye(e),isNaN(e)?bC.INVALID_DATE:new Date(e)))})}prepareParam(e,n){let r;if(Ia.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=l1.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=l1.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)}})}}bC.INVALID_DATE=yye;function vye(t,e=[]){let n=[],r=new Set,o=new Set(e.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=ma.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),Ia.isRef(a)&&a.isSibling?i(a.path,s):yC(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return Kge.array(Array.from(r),n).reverse()}function h2(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 G$(t){return(e,n)=>h2(t,e)-h2(t,n)}const xye=(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 ep(t){if("fields"in t){const e={};for(const[n,r]of Object.entries(t.fields))e[n]=ep(r);return t.setFields(e)}if(t.type==="array"){const e=t.optional();return e.innerType&&(e.innerType=ep(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(ep)}):"optional"in t?t.optional():t}const Sye=(t,e)=>{const n=[...ma.normalizePath(e)];if(n.length===1)return n[0]in t;let r=n.pop(),o=ma.getter(ma.join(n),!0)(t);return!!(o&&r in o)};let m2=t=>Object.prototype.toString.call(t)==="[object Object]";function g2(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter(r=>n.indexOf(r)===-1)}const Cye=G$([]);function vC(t){return new Y$(t)}class Y$ extends ti{constructor(e){super({type:"object",check(n){return m2(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Cye,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 m=i[p],g=p in o;if(m){let b,y=o[p];u.path=(n.path?`${n.path}.`:"")+p,m=m.resolve({value:y,context:n.context,parent:l});let x=m instanceof ti?m.spec:void 0,C=x==null?void 0:x.strict;if(x!=null&&x.strip){f=f||p in o;continue}b=!n.__validating||!C?m.cast(o[p],u):o[p],b!==void 0&&(l[p]=b)}else g&&!s&&(l[p]=o[p]);(g!==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||!m2(u)){o(l,u);return}s=s||u;let f=[];for(let p of this._nodes){let m=this.fields[p];!m||Ia.isRef(m)||f.push(m.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=vye(e,n),r._sortErrors=G$(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 ep(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=ma.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return Sye(i,e)&&(s=Object.assign({},i),r||delete s[e],s[n]=o(i)),s})}json(){return this.transform(xye)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Qf.exact,test(n){if(n==null)return!0;const r=g2(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,n=Qf.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=g2(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=e,r}unknown(e=!0,n=Qf.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(Z0.camelCase)}snakeCase(){return this.transformKeys(Z0.snakeCase)}constantCase(){return this.transformKeys(e=>Z0.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}}vC.prototype=Y$.prototype;const wye=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,m]=q.useState(""),[g,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}),m(y.title),f(!1)}).catch(()=>{f(!1)})},[]),v.jsxs($.Box,{width:"500px",children:[v.jsx($.Typography,{variant:"h6",marginBottom:"10px",children:n}),v.jsx(Il.Formik,{innerRef:l,enableReinitialize:!0,initialValues:g,validationSchema:vC().shape({title:u1().required("Title is required"),fileName:u1().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 C;return q.useEffect(()=>{var _,T;(_=y.file)!=null&&_.name&&x("fileName",(T=y.file)==null?void 0:T.name)},[(C=y.file)==null?void 0:C.name]),v.jsxs(Il.Form,{autoComplete:"off",children:[v.jsx(Uc,{name:"title",disabled:u,required:!0,margin:"none"}),v.jsxs($.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",children:[v.jsx(JI,{name:"file",readOnly:s}),y.fileName&&v.jsx("span",{style:{margin:"6px 0 0 10px"},children:y.fileName}),v.jsx(pr,{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 J$({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),[m,g]=q.useState(a),[b,y]=q.useState(void 0);q.useEffect(()=>l==null?void 0:l(),[f,m]);const x=async T=>{if(f===2){if(T.id===void 0)throw Error("Failed to update citation. Citation is missing id");await n(T).then(()=>p(0))}else f===1&&await e(T).then(w=>{g([...m,w.id]),p(0)})},C=async T=>{if(f===4){if(T.id===void 0)throw Error("Failed to update citation. Citation is missing id");await n(T).then(()=>p(0))}else f===3&&await o(T).then(w=>{g([...m,w.id]),p(0)})};let _=null;return f===0?_=v.jsx(Vge,{fetchExistingCitations:t,editMenuTitle:"Insert Citation/Attachment(s)",onCancel:s,onNewCitation:()=>{y(void 0),p(1)},onNewAttachment:()=>{y(void 0),p(3)},onEditCitation:T=>{y(T.id),p(2)},onEditAttachment:T=>{y(T.id),p(4)},onSelect:i,selectedIds:m,toggleCheckbox:T=>{const w=m.includes(T.id);g(w?m.filter(k=>k!==T.id):[...m,T.id])}}):f===1||f===2?_=v.jsx(zge,{id:b,editMenuTitle:`${f===1?"Add":"Edit"} Citation`,onSave:x,onCancel:()=>p(0),getCitationById:r,onTitleChanged:u}):(f===3||f===4)&&(_=v.jsx(wye,{id:b,editMenuTitle:`${f===3?"Add":"Edit"} Attachment`,onSave:C,onCancel:()=>p(0),getCitationById:r,disableFileUpload:f===4,onTitleChanged:u})),_}const Tye=tn({name:{CitationBubbleMenuTipTap:X$}})(t=>({content:{padding:t.spacing(1.5,2,.5),backgroundColor:"#f9f9f9"}}));function X$({fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onTitleChanged:i,...s}){const{classes:a}=Tye(),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,m=u.selectedNodePos,g=()=>{!l||!m||l.chain().focus().deleteRange({from:m,to:m+1}).run()},b=T=>{l&&l.chain().focus().insertContent({type:"citation",attrs:{ids:T}}).run()},y=T=>{!l||!m||l.chain().focus().command(({tr:w})=>{const k=m,M=w.doc.nodeAt(k);return M?(w.setNodeMarkup(k,void 0,{...M.attrs,ids:T}),!0):!1}).run()},x=T=>{T.length===0?g():p.length===0?b(T):y(T)},C=T=>{x(T),l.commands.closeCitationBubbleMenu()},_=()=>{x(p),l.commands.closeCitationBubbleMenu()};return v.jsx(Tm,{editor:l,open:f,...u.bubbleMenuOptions,...s,children:v.jsx("div",{className:a.content,children:v.jsx(J$,{fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onSelectCitations:C,onCancel:_,initialSelectedIds:p,onContentUpdate:()=>{requestAnimationFrame(()=>{l!=null&&l.view&&l.view.dispatch(l.view.state.tr)})},onTitleChanged:i})})})}const _ye=bn.create({name:"starterKit",addExtensions(){const t=[];return this.options.bold!==!1&&t.push(a$.configure(this.options.bold)),this.options.blockquote!==!1&&t.push(s$.configure(this.options.blockquote)),this.options.bulletList!==!1&&t.push(l$.configure(this.options.bulletList)),this.options.code!==!1&&t.push(c$.configure(this.options.code)),this.options.codeBlock!==!1&&t.push(u$.configure(this.options.codeBlock)),this.options.document!==!1&&t.push(d$.configure(this.options.document)),this.options.dropcursor!==!1&&t.push(f$.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&t.push(p$.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&t.push(h$.configure(this.options.hardBreak)),this.options.heading!==!1&&t.push(qj.configure(this.options.heading)),this.options.history!==!1&&t.push(v$.configure(this.options.history)),this.options.horizontalRule!==!1&&t.push(x$.configure(this.options.horizontalRule)),this.options.italic!==!1&&t.push(S$.configure(this.options.italic)),this.options.listItem!==!1&&t.push(R$.configure(this.options.listItem)),this.options.orderedList!==!1&&t.push(D$.configure(this.options.orderedList)),this.options.paragraph!==!1&&t.push(P$.configure(this.options.paragraph)),this.options.strike!==!1&&t.push(L$.configure(this.options.strike)),this.options.text!==!1&&t.push(j$.configure(this.options.text)),t}}),Eye=bn.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 kye(t){const e=_t(),n=q.useRef(null);return v.jsx(St,{buttonRef:n,tooltipLabel:"Insert Citation",tooltipShortcutKeys:["mod","Shift","C"],IconComponent:cE,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(cE,{fontSize:"small"}),v.jsx($.Typography,{variant:"body2",marginTop:"1px",children:"Insert Citation"})]})})}const Z$=q.createContext({citations:[]});function Oye({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(Z$.Provider,{value:{citations:o},children:t})}const Mye=()=>q.useContext(Z$),Aye=({node:t,HTMLAttributes:e,selected:n})=>{const r=t.attrs.ids||[],{citations:o}=Mye(),[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(JS,{as:"span",...e,children:v.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),a.stopPropagation()},className:n?"selected-citation-link":"citation-link",children:i})})},Rye=an.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",Tt(t)]},addNodeView(){return XS(Aye)},addProseMirrorPlugins(){return[new cn({props:{handleClickOn:(t,e,n,r,o,i)=>n&&n.type.name==="citation"?(this.editor.commands.openCitationBubbleMenu({},r),!0):!1}})]}}),Iye=t=>{const e=[_ye,N$.configure({placeholder:"Start typing here..."}),Eye,Rye],{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:m}=t,[g,b,y]=Il.useField({name:n}),{setValue:x}=y,{value:C}=g;q.useEffect(()=>{var I,L;C!==((L=(I=_==null?void 0:_.current)==null?void 0:I.editor)==null?void 0:L.getHTML())&&setTimeout(()=>{var B,V,j;(j=(V=(B=_==null?void 0:_.current)==null?void 0:B.editor)==null?void 0:V.commands)==null||j.setContent(C),N()},0)},[C]);const _=q.useRef(null),T={normal:{marginTop:"16px",marginBottom:"8px"},dense:{marginTop:"8px",marginBottom:"4px"},none:{margin:0}},w=()=>{var B,V;const I=((V=(B=_.current)==null?void 0:B.editor)==null?void 0:V.getHTML())??"<p></p>",L=!I.replace(/<\/?p>|<br>/g,"").trim();x(L?"<p></p>":I)},[k,M]=q.useState([]),[A,R]=q.useState(void 0),N=I=>{var V,j,F,U;if(!((j=(V=_==null?void 0:_.current)==null?void 0:V.editor)!=null&&j.state.doc))return;const L=[];(U=(F=_==null?void 0:_.current)==null?void 0:F.editor)==null||U.state.doc.descendants(K=>{K.type.name==="citation"&&L.push(K.attrs.ids)});const B=[...new Set(L.flat())].sort();JSON.stringify(B)!==JSON.stringify(k)&&M(B),R(I)},O=v.jsxs($.Box,{sx:{"& .ProseMirror":{"& h1, & h2, & h3, & h4, & h5, & h6":{scrollMarginTop:i?0:50}}},...T[s],children:[v.jsx(Oye,{citationIds:k,getCitationsByIds:m,titleChangedId:A,children:v.jsx(Oj,{ref:_,extensions:e,content:C,editable:!i,renderControls:i?void 0:()=>v.jsx(Em,{children:v.jsx(kye,{})}),onBlur:w,onUpdate:()=>{N()},RichTextFieldProps:{variant:"outlined",MenuBarProps:{hide:i}},children:()=>v.jsx(X$,{fetchExistingCitations:a,onCreateCitation:l,onUpdateCitation:u,getCitationById:f,onStoreAttachment:p,onTitleChanged:I=>N(I)})})}),v.jsx(pr,{name:n,id:`${n}-err`})]});return v.jsxs($.Box,{display:"flex",flexDirection:"column",width:"100%",children:[r&&v.jsx($.Typography,{...o,children:r}),O]})},Dye=t=>{const{label:e="Return to Top",icon:n=rD,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]})})})},Pye=()=>{const{getValues:t,formState:{errors:e,isSubmitSuccessful:n}}=ln(),{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)})]})]})})},Nye=t=>{const{steps:e,orientation:n,inlineLabel:r=n=="vertical",isResponsive:o=!1}=t,{width:i}=V$();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,...fr({...t},l)};return v.jsx($.Stepper,{...u,children:e.map(f=>v.jsx($.Step,{children:v.jsx($.StepLabel,{children:f})},f))})},Lye=t=>{const{name:e,label:n=Yn(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(IK,{}):"Remove",variant:l="card",addButtonSx:u,removeButtonSx:f,allowRemoveAll:p=!1,readOnly:m=!1,emptyListMsg:g="None",showDivider:b=!1,removePosition:y="bottom"}=t,{control:x,getValues:C}=ln(),{fields:_,append:T,remove:w}=i9({control:x,name:e}),k=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}),m&&C(e).length===0?v.jsx($.Typography,{children:g}):v.jsxs("div",{children:[_.map((M,A)=>v.jsx(q.Fragment,{children:v.jsx(jye,{variant:l,content:v.jsxs($.Box,{"data-testid":"form-group-container",sx:typeof y=="string"?k(y):{...y},children:[v.jsxs($.Box,{width:"100%",children:[i(`${e}.${A}`,A),b&&A!==_.length-1&&v.jsx($.Divider,{"data-testid":"divider"})]}),!m&&_.length>(p?0:1)&&v.jsx($.Button,{"data-testid":"repeatable-form-group_remove-btn",sx:f,onClick:()=>w(A),children:a})]})})},M.id)),!m&&v.jsx($.Button,{"data-testid":"repeatable-form-group_add-btn",onClick:()=>T(o),sx:u,children:s})]})]})},jye=({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}},y2=(t,e,n)=>{if(t&&"reportValidity"in t){const r=je(n,e);t.setCustomValidity(r&&r.message||""),t.reportValidity()}},Q$=(t,e)=>{for(const n in e.fields){const r=e.fields[n];r&&r.ref&&"reportValidity"in r.ref?y2(r.ref,n,t):r&&r.refs&&r.refs.forEach(o=>y2(o,n,t))}},$ye=(t,e)=>{e.shouldUseNativeValidation&&Q$(t,e);const n={};for(const r in t){const o=je(e.fields,r),i=Object.assign(t[r]||{},{ref:o&&o.ref});if(Fye(e.names||Object.keys(t),r)){const s=Object.assign({},je(n,r));Mt(s,"root",i),Mt(n,r,s)}else Mt(n,r,i)}return n},Fye=(t,e)=>{const n=b2(e);return t.some(r=>b2(r).match(`^${n}\\.\\d+`))};function b2(t){return t.replace(/\]|\[/g,"")}function Bye(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&&Q$({},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:$ye((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,m=p&&p[f.type];u[f.path]=Z2(f.path,l,u,f.type,m?[].concat(m,f.message):f.message)}return u},{})),i)};var a,l}))}catch(s){return Promise.reject(s)}}}function Vye({initialValues:t,onSubmit:e,children:n,initialErrors:r,validationSchema:o=vC({}),shouldValidateOption:i=!0,shouldDirtyOption:s=!0,validationOnMount:a=!1,enableReinitialize:l=!1}){const{setValue:u,trigger:f,reset:p,...m}=s9({defaultValues:t,resolver:Bye(o),mode:"onChange",errors:r}),{control:g}=m,b=np({control:g}),y=(x,C)=>{u(x,C,{shouldValidate:i,shouldDirty:s})};return q.useEffect(()=>{a&&f(),l&&p(t)},[f,t,p]),v.jsx(Hq,{...m,setValue:y,trigger:f,reset:p,children:v.jsx("form",{onSubmit:m.handleSubmit(e),children:typeof n=="function"?n({values:b,setValue:y,methods:{...m,setValue:y,trigger:f,reset:p}}):n})})}function zye(){const t=ln();if(!t)throw new Error("useMyForm must be used inside an MForm");return t}const xC=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})},m=()=>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(rK,{})})]})}):r,o&&(typeof o=="string"?v.jsx($.DialogContent,{className:"MBv2_Modal_Content",children:v.jsx($.DialogContentText,{className:"MBv2_Modal_Content_Text",children:o})}):o),m()]})},Hye=t=>{const{confirmBtnLabel:e,onConfirm:n,confirmButtonProps:r={color:"primary",variant:"contained"},closeButtonProps:o={},...i}=t;return v.jsx(xC,{actions:[v.jsx($.Button,{className:"MBv2_ConfirmationModal_ConfirmBtn",onClick:n,...r,children:e})],...i})},Wye=t=>{const{closeBtnLabel:e="OK",closeButtonProps:n={color:"primary",variant:"contained"}}=t;return v.jsx(xC,{closeBtnLabel:e,closeButtonProps:n,...t})},qye=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(xC,{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})},Uye=t=>{const{featureMenuOptions:e=[],copyright:n,logo:r,sx:o={},fontColor:i="primary"}=t,{palette:s}=$.useTheme(),a=Eo.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,...Fu(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})]})]})},eF=t=>{const{menuOptionLists:e,anchor:n="left",children:r}=t,{pathname:o}=Eo.useLocation(),i=Eo.useNavigate(),[s,a]=q.useState(!1),l=(m,g)=>v.jsx($.MenuList,{children:m.map(b=>v.jsxs($.MenuItem,{...Fu(b,i,()=>a(!1)),children:[b.icon&&v.jsx($.ListItemIcon,{children:b.icon}),v.jsx($.ListItemText,{primary:b.label})]},`mobile-drawer-group-${g}-item-${b.path}`))}),f=(()=>{if(e){const m=e.filter(g=>g&&g.length>0);return m.length===0?null:m.map((g,b)=>v.jsxs(q.Fragment,{children:[l(g,b),b<m.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(kK,{})}),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})})})]})},tF=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"]})})},nF=t=>{const{label:e,menuOptions:n=[],icon:r}=t,o=Eo.useNavigate(),[i,s]=D.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,{...Fu(f,o),children:[f.icon&&v.jsx($.ListItemIcon,{children:f.icon}),v.jsx($.ListItemText,{primary:f.label})]},f.label))})]})},rF=t=>{const{displayName:e,userMenuOptions:n}=t;return v.jsx(nF,{label:e,menuOptions:n,icon:v.jsx(MK,{})})},Am=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=Eo.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,...Fu(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))})},oF=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(Am,{menuOptions:e,activeTabIdx:n,sx:r})})},iF=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(oD,{}):v.jsx(nD,{})})},Kye=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:m,navBarSx:g}=t,b=Eo.useNavigate(),y=$.useMediaQuery($.useTheme().breakpoints.down("sm")),{palette:x}=$.useTheme(),{pathname:C}=Eo.useLocation(),_=x.mode==="dark",[T,w]=D.useState(void 0);D.useEffect(()=>{const A=o.findIndex(R=>R.path&&C.startsWith(R.path));w(A>=0?A:void 0)},[C,o]);const k=s&&v.jsx(iF,{onToggle:s}),M=s&&(y||!y&&l)?[{icon:_?v.jsx(oD,{}):v.jsx(nD,{}),label:`Switch to ${_?"Light":"Dark"} mode`,onClick:s},...i]:i;return v.jsxs($.AppBar,{ref:n,position:f,sx:m,elevation:4,children:[e&&v.jsx(tF,{...e}),u,v.jsxs($.Toolbar,{sx:{color:"white",display:"flex",justifyContent:"space-between",gap:2},children:[v.jsx($.Button,{disableRipple:!0,component:Eo.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&&k,y&&v.jsx(eF,{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,R)=>v.jsxs($.Box,{display:"flex",alignItems:"center",children:[R>0&&v.jsx($.Typography,{className:"quickLink-divider",color:x.primary.contrastText,children:"|"}),v.jsx($.Button,{variant:"text",sx:{color:"white"},...Fu(A,b),children:v.jsxs($.Box,{display:"flex",gap:"3px",alignItems:"center",children:[A.icon,A.label]})})]},A.label))}),p,l&&v.jsx(rF,{displayName:l,userMenuOptions:M})]})]})]}),!y&&v.jsx(oF,{featureMenuOptions:o,activeTabIdx:T,sx:g})]})},Gye=t=>{const{sx:e,menuOptions:n=[]}=t,{pathname:r}=Eo.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(Am,{orientation:"vertical",menuOptions:n,activeTabIdx:i})})})},Yye=t=>{const{featureMenuOptions:e=[],activeTabIdx:n,sx:r}=t,{palette:o}=$.useTheme();return e.length>0&&v.jsx(Am,{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}})},SC=I8({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:ji});process.env.NODE_ENV!=="production"&&(SC.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"])});if(process.env.NODE_ENV!=="production"){const t=SC,e=E9("Grid2",t);t.propTypes={...t.propTypes,direction:e("container"),spacing:e("container"),wrap:e("container")}}function Jye({size:t={xs:12},spacing:e=2,sm:n,...r}){return n&&(t={xs:12,sm:n}),v.jsx(SC,{size:t,spacing:e,...r,children:r.children})}function Xye(t){const{title:e="Title Goes Here",sx:n={p:2},children:r,...o}=t;return v.jsxs(Ea,{sx:n,...o,children:[v.jsx(Vi,{variant:"h6",sx:{fontWeight:"bold"},gutterBottom:!0,children:e}),r]})}const sF=F8({createStyledComponent:Se("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Et({props:t,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(sF.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 Zye(t){return v.jsx(sF,{className:t.className,...t,spacing:2,children:t.children})}function Qye(t){return Qe("MuiAlert",t)}const v2=et("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),ebe=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"),tbe=Ke(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),nbe=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"),rbe=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"),obe=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"),ibe=t=>{const{variant:e,color:n,severity:r,classes:o}=t,i={root:["root",`color${Le(n||r)}`,`${e}${Le(n||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return Ze(i,Qye,o)},sbe=Se(Ea,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${Le(n.color||n.severity)}`]]}})(Bt(({theme:t})=>{const e=t.palette.mode==="light"?pu:hu,n=t.palette.mode==="light"?hu:pu;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),[`& .${v2.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}`,[`& .${v2.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)}}}))]}})),abe=Se("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),lbe=Se("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),cbe=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}),x2={success:v.jsx(ebe,{fontSize:"inherit"}),warning:v.jsx(tbe,{fontSize:"inherit"}),error:v.jsx(nbe,{fontSize:"inherit"}),info:v.jsx(rbe,{fontSize:"inherit"})},aF=D.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:m=x2,onClose:g,role:b="alert",severity:y="success",slotProps:x={},slots:C={},variant:_="standard",...T}=r,w={...r,color:l,severity:y,variant:_,colorSeverity:l||y},k=ibe(w),M={slots:{closeButton:u.CloseButton,closeIcon:u.CloseIcon,...C},slotProps:{...f,...x}},[A,R]=Wt("root",{ref:n,shouldForwardComponentProp:!0,className:ze(k.root,s),elementType:sbe,externalForwardedProps:{...M,...T},ownerState:w,additionalProps:{role:b,elevation:0}}),[N,O]=Wt("icon",{className:k.icon,elementType:abe,externalForwardedProps:M,ownerState:w}),[I,L]=Wt("message",{className:k.message,elementType:lbe,externalForwardedProps:M,ownerState:w}),[B,V]=Wt("action",{className:k.action,elementType:cbe,externalForwardedProps:M,ownerState:w}),[j,F]=Wt("closeButton",{elementType:Yl,externalForwardedProps:M,ownerState:w}),[U,K]=Wt("closeIcon",{elementType:obe,externalForwardedProps:M,ownerState:w});return v.jsxs(A,{...R,children:[p!==!1?v.jsx(N,{...O,children:p||m[y]||x2[y]}):null,v.jsx(I,{...L,children:i}),o!=null?v.jsx(B,{...V,children:o}):null,o==null&&g?v.jsx(B,{...V,children:v.jsx(j,{size:"small","aria-label":a,title:a,color:"inherit",onClick:g,...F,children:v.jsx(U,{fontSize:"small",...K})})}):null]})});process.env.NODE_ENV!=="production"&&(aF.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 dd=t=>{var g;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 ${(g=l[r])==null?void 0:g.main}`}:i,m=s?{icon:{sx:{mt:"6px"}}}:{};return v.jsxs(aF,{severity:r,variant:f,sx:p,slotProps:m,...u,...a,children:[s&&v.jsx($.Typography,{variant:"h3",children:s}),n]})},ube=t=>v.jsx(dd,{severity:"success",...t}),dbe=t=>v.jsx(dd,{severity:"info",...t}),fbe=t=>v.jsx(dd,{severity:"warning",...t}),pbe=t=>v.jsx(dd,{severity:"error",...t}),lF=t=>{const{crumbInfo:e}=t,n=Eo.useNavigate();return v.jsx($.Breadcrumbs,{"aria-label":"breadcrumb",separator:v.jsx(OK,{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))})},hbe=t=>{const{title:e,message:n,type:r,onClose:o,autoHideDuration:i=8e3,variant:s="leftBorder",elevation:a=6}=t,l=mbe(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(dd,{"data-testid":"message-snackbar-alert",severity:l,iconMapping:{info:S2(r),warning:S2(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})})},mbe=t=>t=="logout"?"info":t=="timeout"?"warning":t,S2=t=>{if(t=="timeout")return v.jsx(X7,{});if(t=="logout")return v.jsx(EK,{})},gbe=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(lF,{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(gC,{className:"MBv2_PageHeader_CreateBtn",onClick:()=>o(),children:[v.jsx(Z7,{style:{marginRight:"0.5rem"}}),n]})]}),s&&v.jsx($.Box,{width:l?"100%":"50%",children:s})]})]})},ybe=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})]})};exports.AlertModal=Wye;exports.Autocomplete=YI;exports.Breadcrumbs=lF;exports.Button=gC;exports.Checkbox=O7;exports.CheckboxGroup=M7;exports.CitationField=Iye;exports.CitationMenu=J$;exports.ConfirmationModal=Hye;exports.DarkModeToggle=iF;exports.DateField=Sp;exports.DateRangeField=roe;exports.DecisionModal=qye;exports.Drawer=eF;exports.DynamicAutocomplete=E7;exports.EnvironmentBanner=tF;exports.Error=pr;exports.ErrorAlert=pbe;exports.FileList=I7;exports.FileUpload=JI;exports.FloatingNavBar=Yye;exports.Footer=Uye;exports.FormDebugger=Pye;exports.Header=Kye;exports.InfoAlert=dbe;exports.LoadingIndicator=a1;exports.Location=K7;exports.MForm=Vye;exports.MGrid=Jye;exports.MPanel=Xye;exports.MStack=Zye;exports.MenuButton=nF;exports.MultiAutocomplete=k7;exports.NavBar=oF;exports.PageHeader=gbe;exports.PaginatedTable=B$;exports.ProfileMenu=rF;exports.RadioGroup=tD;exports.RangeSlider=G7;exports.RepeatableFormGroup=Lye;exports.RichTextField=Bge;exports.ScrollToTop=Dye;exports.SearchField=FK;exports.Select=Y7;exports.Sidebar=Gye;exports.SingleActionCard=ybe;exports.Snackbar=hbe;exports.Stepper=Nye;exports.Submit=z$;exports.SuccessAlert=ube;exports.Switch=J7;exports.Table=F$;exports.Tabs=Am;exports.TextField=Uc;exports.WarningAlert=fbe;exports.commonTheme=Dn;exports.darkTheme=Bq;exports.lightTheme=Fq;exports.useMyForm=zye;
|