@simoncomputing/mui-bueno-v3 0.1.18 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/Form/MForm/MForm2.d.ts +1 -1
- package/dist/components/Form/MForm/MFormProvider2.d.ts +17 -6
- package/dist/index.cjs.js +109 -256
- package/dist/index.es.js +20655 -47053
- package/package.json +1 -1
- package/dist/index.umd.js +0 -409
package/dist/index.umd.js
DELETED
|
@@ -1,409 +0,0 @@
|
|
|
1
|
-
(function(He,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("@mui/material"),require("react/jsx-runtime"),require("react"),require("react-router-dom"),require("@emotion/styled"),require("@emotion/react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","@mui/material","react/jsx-runtime","react","react-router-dom","@emotion/styled","@emotion/react","react-dom"],j):(He=typeof globalThis<"u"?globalThis:He||self,j(He["mui-bueno-v3"]={},He.MaterialUI,He["react/jsx-runtime"],He.React,He.ReactRouterDom,He.EmotionStyled,He.EmotionReact,He.ReactDom))})(this,(function(He,j,v,J,Io,UI,qo,Ws){"use strict";var ile=Object.defineProperty;var sle=(He,j,v)=>j in He?ile(He,j,{enumerable:!0,configurable:!0,writable:!0,value:v}):He[j]=v;var dd=(He,j,v)=>sle(He,typeof j!="symbol"?j+"":j,v);var KA,YA,GA,JA,XA,ZA,QA,e2,t2,n2,r2,o2,i2,s2,a2,l2,c2,u2,d2,f2,p2,h2,m2,g2;var I1=document.createElement("style");I1.textContent=`.sort-icon-asc{-moz-transform:scale(1,-1);-o-transform:scale(1,-1);-webkit-transform:scale(1,-1);transform:scaleY(-1)}.loading-page{width:100%;height:80%;display:flex;flex-direction:column;align-items:center;justify-content:center}.loading-page .text-content{display:flex;flex-direction:column}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(I1);function P1(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=P1(J),qI=P1(Ws),de={breakpoints_xs:"0px",breakpoints_sm:"600px",breakpoints_md:"960px",breakpoints_lg:"1100px",breakpoints_xl:"1536px",light_palette_primary_light:"#4c98d7",light_palette_primary_main:"#005ea2",light_palette_primary_dark:"#1a4480",light_palette_secondary_light:"#9bb672",light_palette_secondary_main:"#607f35",light_palette_secondary_dark:"#3c4a29",light_palette_text_primary:"rgba(0, 0, 0, 0.8705882353)",light_palette_text_secondary:"rgba(0, 0, 0, 0.6)",light_palette_text_disabled:"rgba(0, 0, 0, 0.3803921569)",light_palette_error_light:"#dc5b52",light_palette_error_main:"#d83933",light_palette_error_dark:"#b50909",light_palette_warning_light:"#ffbe2e",light_palette_warning_main:"#e5a000",light_palette_warning_dark:"#c2850c",light_palette_info_light:"#4c98d7",light_palette_info_main:"#005ea2",light_palette_info_dark:"#1a4480",light_palette_success_light:"#9bb672",light_palette_success_main:"#607f35",light_palette_success_dark:"#3c4a29",light_palette_background_default:"#f9f9f9",light_palette_background_paper:"#fff",light_palette_background_appBar:"#252f3e",light_palette_divider_default:"#c9c9c9",dark_palette_primary_light:"#98cbfb",dark_palette_primary_main:"#4c98d7",dark_palette_primary_dark:"#005ea2",dark_palette_secondary_light:"#b8d293",dark_palette_secondary_main:"#9bb672",dark_palette_secondary_dark:"#607f35",dark_palette_text_primary:"#fff",dark_palette_text_secondary:"rgba(255, 255, 255, 0.7019607843)",dark_palette_text_disabled:"rgba(255, 255, 255, 0.5019607843)",dark_palette_error_light:"#f1928b",dark_palette_error_main:"#dc5b52",dark_palette_error_dark:"#d83933",dark_palette_warning_light:"#ffe396",dark_palette_warning_main:"#ffbe2e",dark_palette_warning_dark:"#e5a000",dark_palette_info_light:"#98cbfb",dark_palette_info_main:"#4c98d7",dark_palette_info_dark:"#005ea2",dark_palette_success_light:"#b8d293",dark_palette_success_main:"#9bb672",dark_palette_success_dark:"#607f35",dark_palette_background_default:"#121212",dark_palette_background_paper:"#1b1b1b",dark_palette_background_appBar:"#252f3e",dark_palette_divider_default:"#2e2e2e",common_palette_grey_50:"#f0f0f0",common_palette_grey_100:"#e6e6e6",common_palette_grey_200:"#c9c9c9",common_palette_grey_300:"#adadad",common_palette_grey_400:"#919191",common_palette_grey_500:"#757575",common_palette_grey_600:"#5c5c5c",common_palette_grey_700:"#454545",common_palette_grey_800:"#2e2e2e",common_palette_grey_900:"#1b1b1b",common_palette_grey_A100:"#e6e6e6",common_palette_grey_A200:"#c9c9c9",common_palette_grey_A400:"#919191",common_palette_grey_A700:"#454545",common_palette_common_white:"#fff",common_palette_common_black:"#000",shadows_1:"2px 2px 5px 0px rgba(0, 0, 0, 0.05)",shadows_2:"2px 2px 7px 0px rgba(0, 0, 0, 0.075)",shadows_3:"2px 3px 7px 0px rgba(0, 0, 0, 0.075), 0px 1px 10px 0px rgba(0, 0, 0, 0.05)",shadows_4:"2px 4px 8px 0px rgba(0, 0, 0, 0.075), 0px 1px 12px 0px rgba(0, 0, 0, 0.075)",shadows_5:"2px 5px 8px 0px rgba(0, 0, 0, 0.075), 0px 2px 14px 0px rgba(0, 0, 0, 0.1)",shadows_6:"2px 6px 10px 0px rgba(0, 0, 0, 0.1), 0px 2px 18px 0px rgba(0, 0, 0, 0.1)",shadows_7:"2px 7px 10px 1px rgba(0, 0, 0, 0.1), 0px 2px 16px 1px rgba(0, 0, 0, 0.12)",shadows_8:"2px 8px 10px 1px rgba(0, 0, 0, 0.1), 0px 3px 14px 2px rgba(0, 0, 0, 0.12)",shadows_9:"2px 9px 12px 1px rgba(0, 0, 0, 0.1), 0px 3px 16px 2px rgba(0, 0, 0, 0.12)",shadows_10:"2px 10px 14px 1px rgba(0, 0, 0, 0.12), 0px 4px 18px 3px rgba(0, 0, 0, 0.12)",shadows_11:"2px 11px 15px 1px rgba(0, 0, 0, 0.12), 0px 4px 20px 3px rgba(0, 0, 0, 0.12)",shadows_12:"2px 12px 17px 2px rgba(0, 0, 0, 0.12), 0px 5px 22px 4px rgba(0, 0, 0, 0.12)",shadows_13:"2px 13px 19px 2px rgba(0, 0, 0, 0.12), 0px 5px 24px 4px rgba(0, 0, 0, 0.12)",shadows_14:"2px 14px 21px 2px rgba(0, 0, 0, 0.12), 0px 5px 26px 4px rgba(0, 0, 0, 0.12)",shadows_15:"2px 15px 22px 2px rgba(0, 0, 0, 0.12), 0px 6px 28px 5px rgba(0, 0, 0, 0.12)",shadows_16:"2px 16px 24px 2px rgba(0, 0, 0, 0.12), 0px 6px 30px 5px rgba(0, 0, 0, 0.12)",shadows_17:"2px 17px 26px 2px rgba(0, 0, 0, 0.14), 0px 6px 32px 5px rgba(0, 0, 0, 0.12)",shadows_18:"2px 18px 28px 2px rgba(0, 0, 0, 0.14), 0px 7px 34px 6px rgba(0, 0, 0, 0.12)",shadows_19:"2px 19px 29px 2px rgba(0, 0, 0, 0.14), 0px 7px 36px 6px rgba(0, 0, 0, 0.12)",shadows_20:"2px 20px 31px 3px rgba(0, 0, 0, 0.14), 0px 8px 38px 7px rgba(0, 0, 0, 0.12)",shadows_21:"2px 21px 33px 3px rgba(0, 0, 0, 0.14), 0px 8px 40px 7px rgba(0, 0, 0, 0.12)",shadows_22:"2px 22px 35px 3px rgba(0, 0, 0, 0.14), 0px 8px 42px 7px rgba(0, 0, 0, 0.12)",shadows_23:"2px 23px 36px 3px rgba(0, 0, 0, 0.14), 0px 9px 44px 8px rgba(0, 0, 0, 0.12)",shadows_24:"2px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12)",shape_borderRadius:"3px",shape_borderWidth:"1px",shape_buttonBorderWidth:"2px",typography_fontFamily_default:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h1_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h1_fontWeight:"700",typography_h1_fontSize:"2rem",typography_h1_lineHeight:"normal",typography_h1_letterSpacing:"normal",typography_h2_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h2_fontWeight:"700",typography_h2_fontSize:"1.75rem",typography_h2_lineHeight:"normal",typography_h2_letterSpacing:"normal",typography_h3_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h3_fontWeight:"700",typography_h3_fontSize:"1.5rem",typography_h3_lineHeight:"normal",typography_h3_letterSpacing:"normal",typography_h4_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h4_fontWeight:"700",typography_h4_fontSize:"1.35rem",typography_h4_lineHeight:"normal",typography_h4_letterSpacing:"normal",typography_h5_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h5_fontWeight:"700",typography_h5_fontSize:"1.25rem",typography_h5_lineHeight:"normal",typography_h5_letterSpacing:"normal",typography_h6_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_h6_fontWeight:"700",typography_h6_fontSize:"1.1rem",typography_h6_lineHeight:"normal",typography_h6_letterSpacing:"normal",typography_subtitle1_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_subtitle1_fontWeight:"600",typography_subtitle1_fontSize:"1.25rem",typography_subtitle1_lineHeight:"normal",typography_subtitle1_letterSpacing:"normal",typography_subtitle2_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_subtitle2_fontWeight:"600",typography_subtitle2_fontSize:"1.125rem",typography_subtitle2_lineHeight:"normal",typography_subtitle2_letterSpacing:"normal",typography_body1_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_body1_fontWeight:"400",typography_body1_fontSize:"1.125rem",typography_body1_lineHeight:"normal",typography_body1_letterSpacing:"normal",typography_body2_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_body2_fontWeight:"400",typography_body2_fontSize:"1rem",typography_body2_lineHeight:"normal",typography_body2_letterSpacing:"normal",typography_button_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_button_fontWeight:"600",typography_button_fontSize:"1rem",typography_button_lineHeight:"normal",typography_button_letterSpacing:"normal",typography_caption_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_caption_fontWeight:"400",typography_caption_fontSize:"0.75rem",typography_caption_lineHeight:"normal",typography_caption_letterSpacing:"normal",typography_overline_fontFamily:'"source-sans-pro", "helvetica", "arial", sans-serif',typography_overline_fontWeight:"400",typography_overline_fontSize:"0.75rem",typography_overline_lineHeight:"normal",typography_overline_letterSpacing:"normal"},Ln={breakpoints:{values:{xs:parseInt(de.breakpoints_xs),sm:parseInt(de.breakpoints_sm),md:parseInt(de.breakpoints_md),lg:parseInt(de.breakpoints_lg),xl:parseInt(de.breakpoints_xl)}},shadows:["none",de.shadows_1,de.shadows_2,de.shadows_3,de.shadows_4,de.shadows_5,de.shadows_6,de.shadows_7,de.shadows_8,de.shadows_9,de.shadows_10,de.shadows_11,de.shadows_12,de.shadows_13,de.shadows_14,de.shadows_15,de.shadows_16,de.shadows_17,de.shadows_18,de.shadows_19,de.shadows_20,de.shadows_21,de.shadows_22,de.shadows_23,de.shadows_24],shape:{borderRadius:parseInt(de.shape_borderRadius)},typography:{fontFamily:de.typography_fontFamily_default,h1:{fontFamily:de.typography_h1_fontFamily,fontWeight:parseInt(de.typography_h1_fontWeight),fontSize:de.typography_h1_fontSize,lineHeight:de.typography_h1_lineHeight,letterSpacing:de.typography_h1_letterSpacing},h2:{fontFamily:de.typography_h2_fontFamily,fontWeight:parseInt(de.typography_h2_fontWeight),fontSize:de.typography_h2_fontSize,lineHeight:de.typography_h2_lineHeight,letterSpacing:de.typography_h2_letterSpacing},h3:{fontFamily:de.typography_h3_fontFamily,fontWeight:parseInt(de.typography_h3_fontWeight),fontSize:de.typography_h3_fontSize,lineHeight:de.typography_h3_lineHeight,letterSpacing:de.typography_h3_letterSpacing},h4:{fontFamily:de.typography_h4_fontFamily,fontWeight:parseInt(de.typography_h4_fontWeight),fontSize:de.typography_h4_fontSize,lineHeight:de.typography_h4_lineHeight,letterSpacing:de.typography_h4_letterSpacing},h5:{fontFamily:de.typography_h5_fontFamily,fontWeight:parseInt(de.typography_h5_fontWeight),fontSize:de.typography_h5_fontSize,lineHeight:de.typography_h5_lineHeight,letterSpacing:de.typography_h5_letterSpacing},h6:{fontFamily:de.typography_h6_fontFamily,fontWeight:parseInt(de.typography_h6_fontWeight),fontSize:de.typography_h6_fontSize,lineHeight:de.typography_h6_lineHeight,letterSpacing:de.typography_h6_letterSpacing},subtitle1:{fontFamily:de.typography_subtitle1_fontFamily,fontWeight:parseInt(de.typography_subtitle1_fontWeight),fontSize:de.typography_subtitle1_fontSize,lineHeight:de.typography_subtitle1_lineHeight,letterSpacing:de.typography_subtitle1_letterSpacing},subtitle2:{fontFamily:de.typography_subtitle2_fontFamily,fontWeight:parseInt(de.typography_subtitle2_fontWeight),fontSize:de.typography_subtitle2_fontSize,lineHeight:de.typography_subtitle2_lineHeight,letterSpacing:de.typography_subtitle2_letterSpacing},body1:{fontFamily:de.typography_body1_fontFamily,fontWeight:parseInt(de.typography_body1_fontWeight),fontSize:de.typography_body1_fontSize,lineHeight:de.typography_body1_lineHeight,letterSpacing:de.typography_body1_letterSpacing},body2:{fontFamily:de.typography_body2_fontFamily,fontWeight:parseInt(de.typography_body2_fontWeight),fontSize:de.typography_body2_fontSize,lineHeight:de.typography_body2_lineHeight,letterSpacing:de.typography_body2_letterSpacing},button:{fontFamily:de.typography_button_fontFamily,fontWeight:parseInt(de.typography_button_fontWeight),fontSize:de.typography_button_fontSize,lineHeight:de.typography_button_lineHeight,letterSpacing:de.typography_button_letterSpacing,textTransform:"none"},caption:{fontFamily:de.typography_caption_fontFamily,fontWeight:parseInt(de.typography_caption_fontWeight),fontSize:de.typography_caption_fontSize,lineHeight:de.typography_caption_lineHeight,letterSpacing:de.typography_caption_letterSpacing},overline:{fontFamily:de.typography_overline_fontFamily,fontWeight:parseInt(de.typography_overline_fontWeight),fontSize:de.typography_overline_fontSize,lineHeight:de.typography_overline_lineHeight,letterSpacing:de.typography_overline_letterSpacing}},palette:{grey:{50:de.common_palette_grey_50,100:de.common_palette_grey_100,200:de.common_palette_grey_200,300:de.common_palette_grey_300,400:de.common_palette_grey_400,500:de.common_palette_grey_500,600:de.common_palette_grey_600,700:de.common_palette_grey_700,800:de.common_palette_grey_800,900:de.common_palette_grey_900,A100:de.common_palette_grey_A100,A200:de.common_palette_grey_A200,A400:de.common_palette_grey_A400,A700:de.common_palette_grey_A700},common:{black:de.common_palette_common_black,white:de.common_palette_common_white},white:de.common_palette_common_white},components:{MuiCard:{defaultProps:{elevation:0},styleOverrides:{root:{borderStyle:"solid",borderWidth:de.shape_borderWidth}}},MuiAppBar:{styleOverrides:{root:{backgroundImage:"none"}}},MuiButton:{styleOverrides:{outlined:{borderWidth:de.shape_buttonBorderWidth,":hover":{borderWidth:de.shape_buttonBorderWidth}}}},MuiTable:{styleOverrides:{root:({ownerState:t})=>({...t.size==="x-small"&&{"& .MuiTableCell-root":{padding:"0px 16px"}}})}}}},KI=j.createTheme({...Ln,palette:{...Ln.palette,mode:"light",primary:{light:de.light_palette_primary_light,main:de.light_palette_primary_main,dark:de.light_palette_primary_dark},secondary:{light:de.light_palette_secondary_light,main:de.light_palette_secondary_main,dark:de.light_palette_secondary_dark},text:{primary:de.light_palette_text_primary,secondary:de.light_palette_text_secondary,disabled:de.light_palette_text_disabled},background:{default:de.light_palette_background_default,paper:de.light_palette_background_paper},error:{light:de.light_palette_error_light,main:de.light_palette_error_main,dark:de.light_palette_error_dark},success:{light:de.light_palette_success_light,main:de.light_palette_success_main,dark:de.light_palette_success_dark},info:{light:de.light_palette_info_light,main:de.light_palette_info_main,dark:de.light_palette_info_dark},warning:{light:de.light_palette_warning_light,main:de.light_palette_warning_main,dark:de.light_palette_warning_dark}},components:{...Ln.components,MuiAppBar:{...(KA=Ln.components)==null?void 0:KA.MuiAppBar,styleOverrides:{...(GA=(YA=Ln.components)==null?void 0:YA.MuiAppBar)==null?void 0:GA.styleOverrides,root:{...(ZA=(XA=(JA=Ln.components)==null?void 0:JA.MuiAppBar)==null?void 0:XA.styleOverrides)==null?void 0:ZA.root,backgroundColor:de.light_palette_background_appBar}}},MuiCard:{...(QA=Ln.components)==null?void 0:QA.MuiCard,styleOverrides:{...(t2=(e2=Ln.components)==null?void 0:e2.MuiCard)==null?void 0:t2.styleOverrides,root:{...(o2=(r2=(n2=Ln.components)==null?void 0:n2.MuiCard)==null?void 0:r2.styleOverrides)==null?void 0:o2.root,borderColor:de.light_palette_divider_default}}}}}),YI=j.createTheme({...Ln,palette:{...Ln.palette,mode:"dark",primary:{light:de.dark_palette_primary_light,main:de.dark_palette_primary_main,dark:de.dark_palette_primary_dark},secondary:{light:de.dark_palette_secondary_light,main:de.dark_palette_secondary_main,dark:de.dark_palette_secondary_dark},text:{primary:de.dark_palette_text_primary,secondary:de.dark_palette_text_secondary,disabled:de.dark_palette_text_disabled},background:{default:de.dark_palette_background_default,paper:de.dark_palette_background_paper},error:{light:de.dark_palette_error_light,main:de.dark_palette_error_main,dark:de.dark_palette_error_dark},success:{light:de.dark_palette_success_light,main:de.dark_palette_success_main,dark:de.dark_palette_success_dark},info:{light:de.dark_palette_info_light,main:de.dark_palette_info_main,dark:de.dark_palette_info_dark},warning:{light:de.dark_palette_warning_light,main:de.dark_palette_warning_main,dark:de.dark_palette_warning_dark}},components:{...Ln.components,MuiAppBar:{...(i2=Ln.components)==null?void 0:i2.MuiAppBar,styleOverrides:{...(a2=(s2=Ln.components)==null?void 0:s2.MuiAppBar)==null?void 0:a2.styleOverrides,root:{...(u2=(c2=(l2=Ln.components)==null?void 0:l2.MuiAppBar)==null?void 0:c2.styleOverrides)==null?void 0:u2.root,backgroundColor:de.dark_palette_background_appBar,backgroundImage:"none"}}},MuiCard:{...(d2=Ln.components)==null?void 0:d2.MuiCard,styleOverrides:{...(p2=(f2=Ln.components)==null?void 0:f2.MuiCard)==null?void 0:p2.styleOverrides,root:{...(g2=(m2=(h2=Ln.components)==null?void 0:h2.MuiCard)==null?void 0:m2.styleOverrides)==null?void 0:g2.root,borderColor:de.dark_palette_divider_default}}}}});var dc=t=>t.type==="checkbox",js=t=>t instanceof Date,Tr=t=>t==null;const N1=t=>typeof t=="object";var An=t=>!Tr(t)&&!Array.isArray(t)&&N1(t)&&!js(t),$1=t=>An(t)&&t.target?dc(t.target)?t.target.checked:t.target.value:t,GI=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,L1=(t,e)=>t.has(GI(e)),JI=t=>{const e=t.constructor&&t.constructor.prototype;return An(e)&&e.hasOwnProperty("isPrototypeOf")},Om=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function tn(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(Om&&(t instanceof Blob||e))return t;const n=Array.isArray(t);if(!n&&!(An(t)&&JI(t)))return t;const r=n?[]:Object.create(Object.getPrototypeOf(t));for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=tn(t[o]));return r}var fd=t=>/^\w*$/.test(t),Xt=t=>t===void 0,pd=t=>Array.isArray(t)?t.filter(Boolean):[],Mm=t=>pd(t.replace(/["|']|\]/g,"").split(/\.|\[/)),Re=(t,e,n)=>{if(!e||!An(t))return n;const r=(fd(e)?[e]:Mm(e)).reduce((o,i)=>Tr(o)?o:o[i],t);return Xt(r)||r===t?Xt(t[e])?n:t[e]:r},Lr=t=>typeof t=="boolean",mr=t=>typeof t=="function",Nt=(t,e,n)=>{let r=-1;const o=fd(e)?[e]:Mm(e),i=o.length,s=i-1;for(;++r<i;){const a=o[r];let c=n;if(r!==s){const u=t[a];c=An(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;t[a]=c,t=t[a]}};const hd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Qr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},gi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Am=J.createContext(null);Am.displayName="HookFormContext";const dn=()=>J.useContext(Am),F1=t=>{const{children:e,...n}=t;return J.createElement(Am.Provider,{value:n},e)};var R1=(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]!==Qr.all&&(e._proxyFormState[s]=!r||Qr.all),n&&(n[s]=!0),t[s]}});return o};const md=typeof window<"u"?J.useLayoutEffect:J.useEffect;function XI(t){const e=dn(),{control:n=e.control,disabled:r,name:o,exact:i}=t||{},[s,a]=J.useState(n._formState),c=J.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return md(()=>n._subscribe({name:o,formState:c.current,exact:i,callback:u=>{!r&&a({...n._formState,...u})}}),[o,r,i]),J.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),J.useMemo(()=>R1(s,n,c.current,!1),[s,n])}var Fr=t=>typeof t=="string",Dm=(t,e,n,r,o)=>Fr(t)?(r&&e.watch.add(t),Re(n,t,o)):Array.isArray(t)?t.map(i=>(r&&e.watch.add(i),Re(n,i))):(r&&(e.watchAll=!0),n),Im=t=>Tr(t)||!N1(t);function Po(t,e,n=new WeakSet){if(Im(t)||Im(e))return Object.is(t,e);if(js(t)&&js(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(js(s)&&js(a)||An(s)&&An(a)||Array.isArray(s)&&Array.isArray(a)?!Po(s,a,n):!Object.is(s,a))return!1}}return!0}function fc(t){const e=dn(),{control:n=e.control,name:r,defaultValue:o,disabled:i,exact:s,compute:a}=t||{},c=J.useRef(o),u=J.useRef(a),f=J.useRef(void 0),p=J.useRef(n),m=J.useRef(r);u.current=a;const[y,b]=J.useState(()=>{const C=n._getWatch(r,c.current);return u.current?u.current(C):C}),g=J.useCallback(C=>{const k=Dm(r,n._names,C||n._formValues,!1,c.current);return u.current?u.current(k):k},[n._formValues,n._names,r]),x=J.useCallback(C=>{if(!i){const k=Dm(r,n._names,C||n._formValues,!1,c.current);if(u.current){const M=u.current(k);Po(M,f.current)||(b(M),f.current=M)}else b(k)}},[n._formValues,n._names,i,r]);md(()=>((p.current!==n||!Po(m.current,r))&&(p.current=n,m.current=r,x()),n._subscribe({name:r,formState:{values:!0},exact:s,callback:C=>{x(C.values)}})),[n,s,r,x]),J.useEffect(()=>n._removeUnmounted());const w=p.current!==n,E=m.current,T=J.useMemo(()=>{if(i)return null;const C=!w&&!Po(E,r);return w||C?g():null},[i,w,r,E,g]);return T!==null?T:y}function ZI(t){const e=dn(),{name:n,disabled:r,control:o=e.control,shouldUnregister:i,defaultValue:s,exact:a=!0}=t,c=L1(o._names.array,n),u=J.useMemo(()=>Re(o._formValues,n,Re(o._defaultValues,n,s)),[o,n,s]),f=fc({control:o,name:n,defaultValue:u,exact:a}),p=XI({control:o,name:n,exact:a}),m=J.useRef(t),y=J.useRef(void 0),b=J.useRef(o.register(n,{...t.rules,value:f,...Lr(t.disabled)?{disabled:t.disabled}:{}}));m.current=t;const g=J.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Re(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Re(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Re(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Re(p.validatingFields,n)},error:{enumerable:!0,get:()=>Re(p.errors,n)}}),[p,n]),x=J.useCallback(C=>b.current.onChange({target:{value:$1(C),name:n},type:hd.CHANGE}),[n]),w=J.useCallback(()=>b.current.onBlur({target:{value:Re(o._formValues,n),name:n},type:hd.BLUR}),[n,o._formValues]),E=J.useCallback(C=>{const k=Re(o._fields,n);k&&k._f&&C&&(k._f.ref={focus:()=>mr(C.focus)&&C.focus(),select:()=>mr(C.select)&&C.select(),setCustomValidity:M=>mr(C.setCustomValidity)&&C.setCustomValidity(M),reportValidity:()=>mr(C.reportValidity)&&C.reportValidity()})},[o._fields,n]),T=J.useMemo(()=>({name:n,value:f,...Lr(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:x,onBlur:w,ref:E}),[n,r,p.disabled,x,w,E,f]);return J.useEffect(()=>{const C=o._options.shouldUnregister||i,k=y.current;k&&k!==n&&!c&&o.unregister(k),o.register(n,{...m.current.rules,...Lr(m.current.disabled)?{disabled:m.current.disabled}:{}});const M=(A,I)=>{const L=Re(o._fields,A);L&&L._f&&(L._f.mount=I)};if(M(n,!0),C){const A=tn(Re(o._options.defaultValues,n,m.current.defaultValue));Nt(o._defaultValues,n,A),Xt(Re(o._formValues,n))&&Nt(o._formValues,n,A)}return!c&&o.register(n),y.current=n,()=>{(c?C&&!o._state.action:C)?o.unregister(n):M(n,!1)}},[n,o,c,i]),J.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),J.useMemo(()=>({field:T,formState:p,fieldState:g}),[T,p,g])}const ir=t=>t.render(ZI(t));var B1=(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],V1=()=>{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=[]}}};function z1(t,e){const n={};for(const r in t)if(t.hasOwnProperty(r)){const o=t[r],i=e[r];if(o&&An(o)&&i){const s=z1(o,i);An(s)&&(n[r]=s)}else t[r]&&(n[r]=i)}return n}var sr=t=>An(t)&&!Object.keys(t).length,Pm=t=>t.type==="file",gd=t=>{if(!Om)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},H1=t=>t.type==="select-multiple",Nm=t=>t.type==="radio",QI=t=>Nm(t)||dc(t),$m=t=>gd(t)&&t.isConnected;function eP(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=Xt(t)?r++:t[e[r++]];return t}function tP(t){for(const e in t)if(t.hasOwnProperty(e)&&!Xt(t[e]))return!1;return!0}function kn(t,e){const n=Array.isArray(e)?e:fd(e)?[e]:Mm(e),r=n.length===1?t:eP(t,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(An(r)&&sr(r)||Array.isArray(r)&&tP(r))&&kn(t,n.slice(0,-1)),t}var nP=t=>{for(const e in t)if(mr(t[e]))return!0;return!1};function W1(t){return Array.isArray(t)||An(t)&&!nP(t)}function Lm(t,e={}){for(const n in t){const r=t[n];W1(r)?(e[n]=Array.isArray(r)?[]:{},Lm(r,e[n])):Xt(r)||(e[n]=!0)}return e}function ja(t,e,n){n||(n=Lm(e));for(const r in t){const o=t[r];if(W1(o))Xt(e)||Im(n[r])?n[r]=Lm(o,Array.isArray(o)?[]:{}):ja(o,Tr(e)?{}:e[r],n[r]);else{const i=e[r];n[r]=!Po(o,i)}}return n}const j1={value:!1,isValid:!1},U1={value:!0,isValid:!0};var q1=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Xt(t[0].attributes.value)?Xt(t[0].value)||t[0].value===""?U1:{value:t[0].value,isValid:!0}:U1:j1}return j1},K1=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>Xt(t)?t:e?t===""?NaN:t&&+t:n&&Fr(t)?new Date(t):r?r(t):t;const Y1={isValid:!1,value:null};var G1=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,Y1):Y1;function J1(t){const e=t.ref;return Pm(e)?e.files:Nm(e)?G1(t.refs).value:H1(e)?[...e.selectedOptions].map(({value:n})=>n):dc(e)?q1(t.refs).value:K1(Xt(e.value)?t.ref.value:e.value,t)}var rP=(t,e,n,r)=>{const o={};for(const i of t){const s=Re(e,i);s&&Nt(o,i,s._f)}return{criteriaMode:n,names:[...t],fields:o,shouldUseNativeValidation:r}},yd=t=>t instanceof RegExp,pc=t=>Xt(t)?t:yd(t)?t.source:An(t)?yd(t.value)?t.value.source:t.value:t,Ua=t=>({isOnSubmit:!t||t===Qr.onSubmit,isOnBlur:t===Qr.onBlur,isOnChange:t===Qr.onChange,isOnAll:t===Qr.all,isOnTouch:t===Qr.onTouched});const X1="AsyncFunction";var oP=t=>!!t&&!!t.validate&&!!(mr(t.validate)&&t.validate.constructor.name===X1||An(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===X1)),iP=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),Fm=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const qa=(t,e,n,r)=>{for(const o of n||Object.keys(t)){const i=Re(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(qa(a,e))break}else if(An(a)&&qa(a,e))break}}};function Z1(t,e,n){const r=Re(t,n);if(r||fd(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=Re(e,i),a=Re(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 sP=(t,e,n,r)=>{n(t);const{name:o,...i}=t;return sr(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(s=>e[s]===(!r||Qr.all))},aP=(t,e,n)=>!t||!e||t===e||kr(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r))),lP=(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,cP=(t,e)=>!pd(Re(t,e)).length&&kn(t,e),Q1=(t,e,n)=>{const r=kr(Re(t,n));return Nt(r,"root",e[n]),Nt(t,n,r),t};function ex(t,e,n="validate"){if(Fr(t)||Array.isArray(t)&&t.every(Fr)||Lr(t)&&!t)return{type:n,message:Fr(t)?t:"",ref:e}}var Ka=t=>An(t)&&!yd(t)?t:{value:t,message:""},Rm=async(t,e,n,r,o,i)=>{const{ref:s,refs:a,required:c,maxLength:u,minLength:f,min:p,max:m,pattern:y,validate:b,name:g,valueAsNumber:x,mount:w}=t._f,E=Re(n,g);if(!w||e.has(g))return{};const T=a?a[0]:s,C=$=>{o&&T.reportValidity&&(T.setCustomValidity(Lr($)?"":$||""),T.reportValidity())},k={},M=Nm(s),A=dc(s),I=M||A,L=(x||Pm(s))&&Xt(s.value)&&Xt(E)||gd(s)&&s.value===""||E===""||Array.isArray(E)&&!E.length,O=B1.bind(null,g,r,k),N=($,V,z,F=gi.maxLength,B=gi.minLength)=>{const W=$?V:z;k[g]={type:$?F:B,message:W,ref:s,...O($?F:B,W)}};if(i?!Array.isArray(E)||!E.length:c&&(!I&&(L||Tr(E))||Lr(E)&&!E||A&&!q1(a).isValid||M&&!G1(a).isValid)){const{value:$,message:V}=Fr(c)?{value:!!c,message:c}:Ka(c);if($&&(k[g]={type:gi.required,message:V,ref:T,...O(gi.required,V)},!r))return C(V),k}if(!L&&(!Tr(p)||!Tr(m))){let $,V;const z=Ka(m),F=Ka(p);if(!Tr(E)&&!isNaN(E)){const B=s.valueAsNumber||E&&+E;Tr(z.value)||($=B>z.value),Tr(F.value)||(V=B<F.value)}else{const B=s.valueAsDate||new Date(E),W=K=>new Date(new Date().toDateString()+" "+K),Y=s.type=="time",X=s.type=="week";Fr(z.value)&&E&&($=Y?W(E)>W(z.value):X?E>z.value:B>new Date(z.value)),Fr(F.value)&&E&&(V=Y?W(E)<W(F.value):X?E<F.value:B<new Date(F.value))}if(($||V)&&(N(!!$,z.message,F.message,gi.max,gi.min),!r))return C(k[g].message),k}if((u||f)&&!L&&(Fr(E)||i&&Array.isArray(E))){const $=Ka(u),V=Ka(f),z=!Tr($.value)&&E.length>+$.value,F=!Tr(V.value)&&E.length<+V.value;if((z||F)&&(N(z,$.message,V.message),!r))return C(k[g].message),k}if(y&&!L&&Fr(E)){const{value:$,message:V}=Ka(y);if(yd($)&&!E.match($)&&(k[g]={type:gi.pattern,message:V,ref:s,...O(gi.pattern,V)},!r))return C(V),k}if(b){if(mr(b)){const $=await b(E,n),V=ex($,T);if(V&&(k[g]={...V,...O(gi.validate,V.message)},!r))return C(V.message),k}else if(An(b)){let $={};for(const V in b){if(!sr($)&&!r)break;const z=ex(await b[V](E,n),T,V);z&&($={...z,...O(V,z.message)},C(z.message),r&&(k[g]=$))}if(!sr($)&&(k[g]={ref:T,...$},!r))return k}}return C(!0),k};const uP={mode:Qr.onSubmit,reValidateMode:Qr.onChange,shouldFocusError:!0};function dP(t={}){let e={...uP,...t},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:mr(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},o=An(e.defaultValues)||An(e.values)?tn(e.defaultValues||e.values)||{}:{},i=e.shouldUnregister?{}:tn(o),s={action:!1,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...f};let m={...p};const y={array:V1(),state:V1()},b=e.criteriaMode===Qr.all,g=U=>Z=>{clearTimeout(u),u=setTimeout(U,Z)},x=async U=>{if(!s.keepIsValid&&!e.disabled&&(p.isValid||m.isValid||U)){let Z;e.resolver?(Z=sr((await I()).errors),w()):Z=await O(r,!0),Z!==n.isValid&&y.state.next({isValid:Z})}},w=(U,Z)=>{!e.disabled&&(p.isValidating||p.validatingFields||m.isValidating||m.validatingFields)&&((U||Array.from(a.mount)).forEach(he=>{he&&(Z?Nt(n.validatingFields,he,Z):kn(n.validatingFields,he))}),y.state.next({validatingFields:n.validatingFields,isValidating:!sr(n.validatingFields)}))},E=(U,Z=[],he,Ne,Pe=!0,Ae=!0)=>{if(Ne&&he&&!e.disabled){if(s.action=!0,Ae&&Array.isArray(Re(r,U))){const ze=he(Re(r,U),Ne.argA,Ne.argB);Pe&&Nt(r,U,ze)}if(Ae&&Array.isArray(Re(n.errors,U))){const ze=he(Re(n.errors,U),Ne.argA,Ne.argB);Pe&&Nt(n.errors,U,ze),cP(n.errors,U)}if((p.touchedFields||m.touchedFields)&&Ae&&Array.isArray(Re(n.touchedFields,U))){const ze=he(Re(n.touchedFields,U),Ne.argA,Ne.argB);Pe&&Nt(n.touchedFields,U,ze)}(p.dirtyFields||m.dirtyFields)&&(n.dirtyFields=ja(o,i)),y.state.next({name:U,isDirty:$(U,Z),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Nt(i,U,Z)},T=(U,Z)=>{Nt(n.errors,U,Z),y.state.next({errors:n.errors})},C=U=>{n.errors=U,y.state.next({errors:n.errors,isValid:!1})},k=(U,Z,he,Ne)=>{const Pe=Re(r,U);if(Pe){const Ae=Re(i,U,Xt(he)?Re(o,U):he);Xt(Ae)||Ne&&Ne.defaultChecked||Z?Nt(i,U,Z?Ae:J1(Pe._f)):F(U,Ae),s.mount&&!s.action&&x()}},M=(U,Z,he,Ne,Pe)=>{let Ae=!1,ze=!1;const st={name:U};if(!e.disabled){if(!he||Ne){(p.isDirty||m.isDirty)&&(ze=n.isDirty,n.isDirty=st.isDirty=$(),Ae=ze!==st.isDirty);const pt=Po(Re(o,U),Z);ze=!!Re(n.dirtyFields,U),pt?kn(n.dirtyFields,U):Nt(n.dirtyFields,U,!0),st.dirtyFields=n.dirtyFields,Ae=Ae||(p.dirtyFields||m.dirtyFields)&&ze!==!pt}if(he){const pt=Re(n.touchedFields,U);pt||(Nt(n.touchedFields,U,he),st.touchedFields=n.touchedFields,Ae=Ae||(p.touchedFields||m.touchedFields)&&pt!==he)}Ae&&Pe&&y.state.next(st)}return Ae?st:{}},A=(U,Z,he,Ne)=>{const Pe=Re(n.errors,U),Ae=(p.isValid||m.isValid)&&Lr(Z)&&n.isValid!==Z;if(e.delayError&&he?(c=g(()=>T(U,he)),c(e.delayError)):(clearTimeout(u),c=null,he?Nt(n.errors,U,he):kn(n.errors,U)),(he?!Po(Pe,he):Pe)||!sr(Ne)||Ae){const ze={...Ne,...Ae&&Lr(Z)?{isValid:Z}:{},errors:n.errors,name:U};n={...n,...ze},y.state.next(ze)}},I=async U=>(w(U,!0),await e.resolver(i,e.context,rP(U||a.mount,r,e.criteriaMode,e.shouldUseNativeValidation))),L=async U=>{const{errors:Z}=await I(U);if(w(U),U)for(const he of U){const Ne=Re(Z,he);Ne?Nt(n.errors,he,Ne):kn(n.errors,he)}else n.errors=Z;return Z},O=async(U,Z,he={valid:!0})=>{for(const Ne in U){const Pe=U[Ne];if(Pe){const{_f:Ae,...ze}=Pe;if(Ae){const st=a.array.has(Ae.name),pt=Pe._f&&oP(Pe._f);pt&&p.validatingFields&&w([Ae.name],!0);const Vt=await Rm(Pe,a.disabled,i,b,e.shouldUseNativeValidation&&!Z,st);if(pt&&p.validatingFields&&w([Ae.name]),Vt[Ae.name]&&(he.valid=!1,Z))break;!Z&&(Re(Vt,Ae.name)?st?Q1(n.errors,Vt,Ae.name):Nt(n.errors,Ae.name,Vt[Ae.name]):kn(n.errors,Ae.name))}!sr(ze)&&await O(ze,Z,he)}}return he.valid},N=()=>{for(const U of a.unMount){const Z=Re(r,U);Z&&(Z._f.refs?Z._f.refs.every(he=>!$m(he)):!$m(Z._f.ref))&&q(U)}a.unMount=new Set},$=(U,Z)=>!e.disabled&&(U&&Z&&Nt(i,U,Z),!Po(Q(),o)),V=(U,Z,he)=>Dm(U,a,{...s.mount?i:Xt(Z)?o:Fr(U)?{[U]:Z}:Z},he,Z),z=U=>pd(Re(s.mount?i:o,U,e.shouldUnregister?Re(o,U,[]):[])),F=(U,Z,he={})=>{const Ne=Re(r,U);let Pe=Z;if(Ne){const Ae=Ne._f;Ae&&(!Ae.disabled&&Nt(i,U,K1(Z,Ae)),Pe=gd(Ae.ref)&&Tr(Z)?"":Z,H1(Ae.ref)?[...Ae.ref.options].forEach(ze=>ze.selected=Pe.includes(ze.value)):Ae.refs?dc(Ae.ref)?Ae.refs.forEach(ze=>{(!ze.defaultChecked||!ze.disabled)&&(Array.isArray(Pe)?ze.checked=!!Pe.find(st=>st===ze.value):ze.checked=Pe===ze.value||!!Pe)}):Ae.refs.forEach(ze=>ze.checked=ze.value===Pe):Pm(Ae.ref)?Ae.ref.value="":(Ae.ref.value=Pe,Ae.ref.type||y.state.next({name:U,values:tn(i)})))}(he.shouldDirty||he.shouldTouch)&&M(U,Pe,he.shouldTouch,he.shouldDirty,!0),he.shouldValidate&&K(U)},B=(U,Z,he)=>{for(const Ne in Z){if(!Z.hasOwnProperty(Ne))return;const Pe=Z[Ne],Ae=U+"."+Ne,ze=Re(r,Ae);(a.array.has(U)||An(Pe)||ze&&!ze._f)&&!js(Pe)?B(Ae,Pe,he):F(Ae,Pe,he)}},W=(U,Z,he={})=>{const Ne=Re(r,U),Pe=a.array.has(U),Ae=tn(Z);Nt(i,U,Ae),Pe?(y.array.next({name:U,values:tn(i)}),(p.isDirty||p.dirtyFields||m.isDirty||m.dirtyFields)&&he.shouldDirty&&y.state.next({name:U,dirtyFields:ja(o,i),isDirty:$(U,Ae)})):Ne&&!Ne._f&&!Tr(Ae)?B(U,Ae,he):F(U,Ae,he),Fm(U,a)&&y.state.next({...n,name:U}),y.state.next({name:s.mount?U:void 0,values:tn(i)})},Y=async U=>{s.mount=!0;const Z=U.target;let he=Z.name,Ne=!0;const Pe=Re(r,he),Ae=pt=>{Ne=Number.isNaN(pt)||js(pt)&&isNaN(pt.getTime())||Po(pt,Re(i,he,pt))},ze=Ua(e.mode),st=Ua(e.reValidateMode);if(Pe){let pt,Vt;const rt=Z.type?J1(Pe._f):$1(U),Wt=U.type===hd.BLUR||U.type===hd.FOCUS_OUT,Qt=!iP(Pe._f)&&!e.resolver&&!Re(n.errors,he)&&!Pe._f.deps||lP(Wt,Re(n.touchedFields,he),n.isSubmitted,st,ze),ge=Fm(he,a,Wt);Nt(i,he,rt),Wt?(!Z||!Z.readOnly)&&(Pe._f.onBlur&&Pe._f.onBlur(U),c&&c(0)):Pe._f.onChange&&Pe._f.onChange(U);const We=M(he,rt,Wt),_e=!sr(We)||ge;if(!Wt&&y.state.next({name:he,type:U.type,values:tn(i)}),Qt)return(p.isValid||m.isValid)&&(e.mode==="onBlur"?Wt&&x():Wt||x()),_e&&y.state.next({name:he,...ge?{}:We});if(!Wt&&ge&&y.state.next({...n}),e.resolver){const{errors:je}=await I([he]);if(w([he]),Ae(rt),Ne){const et=Z1(n.errors,r,he),it=Z1(je,r,et.name||he);pt=it.error,he=it.name,Vt=sr(je)}}else w([he],!0),pt=(await Rm(Pe,a.disabled,i,b,e.shouldUseNativeValidation))[he],w([he]),Ae(rt),Ne&&(pt?Vt=!1:(p.isValid||m.isValid)&&(Vt=await O(r,!0)));Ne&&(Pe._f.deps&&(!Array.isArray(Pe._f.deps)||Pe._f.deps.length>0)&&K(Pe._f.deps),A(he,Vt,pt,We))}},X=(U,Z)=>{if(Re(n.errors,Z)&&U.focus)return U.focus(),1},K=async(U,Z={})=>{let he,Ne;const Pe=kr(U);if(e.resolver){const Ae=await L(Xt(U)?U:Pe);he=sr(Ae),Ne=U?!Pe.some(ze=>Re(Ae,ze)):he}else U?(Ne=(await Promise.all(Pe.map(async Ae=>{const ze=Re(r,Ae);return await O(ze&&ze._f?{[Ae]:ze}:ze)}))).every(Boolean),!(!Ne&&!n.isValid)&&x()):Ne=he=await O(r);return y.state.next({...!Fr(U)||(p.isValid||m.isValid)&&he!==n.isValid?{}:{name:U},...e.resolver||!U?{isValid:he}:{},errors:n.errors}),Z.shouldFocus&&!Ne&&qa(r,X,U?Pe:a.mount),Ne},Q=(U,Z)=>{let he={...s.mount?i:o};return Z&&(he=z1(Z.dirtyFields?n.dirtyFields:n.touchedFields,he)),Xt(U)?he:Fr(U)?Re(he,U):U.map(Ne=>Re(he,Ne))},ve=(U,Z)=>({invalid:!!Re((Z||n).errors,U),isDirty:!!Re((Z||n).dirtyFields,U),error:Re((Z||n).errors,U),isValidating:!!Re(n.validatingFields,U),isTouched:!!Re((Z||n).touchedFields,U)}),xe=U=>{U&&kr(U).forEach(Z=>kn(n.errors,Z)),y.state.next({errors:U?n.errors:{}})},ye=(U,Z,he)=>{const Ne=(Re(r,U,{_f:{}})._f||{}).ref,Pe=Re(n.errors,U)||{},{ref:Ae,message:ze,type:st,...pt}=Pe;Nt(n.errors,U,{...pt,...Z,ref:Ne}),y.state.next({name:U,errors:n.errors,isValid:!1}),he&&he.shouldFocus&&Ne&&Ne.focus&&Ne.focus()},oe=(U,Z)=>mr(U)?y.state.subscribe({next:he=>"values"in he&&U(V(void 0,Z),he)}):V(U,Z,!0),ce=U=>y.state.subscribe({next:Z=>{aP(U.name,Z.name,U.exact)&&sP(Z,U.formState||p,Ie,U.reRenderRoot)&&U.callback({values:{...i},...n,...Z,defaultValues:o})}}).unsubscribe,fe=U=>(s.mount=!0,m={...m,...U.formState},ce({...U,formState:{...f,...U.formState}})),q=(U,Z={})=>{for(const he of U?kr(U):a.mount)a.mount.delete(he),a.array.delete(he),Z.keepValue||(kn(r,he),kn(i,he)),!Z.keepError&&kn(n.errors,he),!Z.keepDirty&&kn(n.dirtyFields,he),!Z.keepTouched&&kn(n.touchedFields,he),!Z.keepIsValidating&&kn(n.validatingFields,he),!e.shouldUnregister&&!Z.keepDefaultValue&&kn(o,he);y.state.next({values:tn(i)}),y.state.next({...n,...Z.keepDirty?{isDirty:$()}:{}}),!Z.keepIsValid&&x()},ee=({disabled:U,name:Z})=>{(Lr(U)&&s.mount||U||a.disabled.has(Z))&&(U?a.disabled.add(Z):a.disabled.delete(Z))},se=(U,Z={})=>{let he=Re(r,U);const Ne=Lr(Z.disabled)||Lr(e.disabled);return Nt(r,U,{...he||{},_f:{...he&&he._f?he._f:{ref:{name:U}},name:U,mount:!0,...Z}}),a.mount.add(U),he?ee({disabled:Lr(Z.disabled)?Z.disabled:e.disabled,name:U}):k(U,!0,Z.value),{...Ne?{disabled:Z.disabled||e.disabled}:{},...e.progressive?{required:!!Z.required,min:pc(Z.min),max:pc(Z.max),minLength:pc(Z.minLength),maxLength:pc(Z.maxLength),pattern:pc(Z.pattern)}:{},name:U,onChange:Y,onBlur:Y,ref:Pe=>{if(Pe){se(U,Z),he=Re(r,U);const Ae=Xt(Pe.value)&&Pe.querySelectorAll&&Pe.querySelectorAll("input,select,textarea")[0]||Pe,ze=QI(Ae),st=he._f.refs||[];if(ze?st.find(pt=>pt===Ae):Ae===he._f.ref)return;Nt(r,U,{_f:{...he._f,...ze?{refs:[...st.filter($m),Ae,...Array.isArray(Re(o,U))?[{}]:[]],ref:{type:Ae.type,name:U}}:{ref:Ae}}}),k(U,!1,void 0,Ae)}else he=Re(r,U,{}),he._f&&(he._f.mount=!1),(e.shouldUnregister||Z.shouldUnregister)&&!(L1(a.array,U)&&s.action)&&a.unMount.add(U)}}},be=()=>e.shouldFocusError&&qa(r,X,a.mount),ne=U=>{Lr(U)&&(y.state.next({disabled:U}),qa(r,(Z,he)=>{const Ne=Re(r,he);Ne&&(Z.disabled=Ne._f.disabled||U,Array.isArray(Ne._f.refs)&&Ne._f.refs.forEach(Pe=>{Pe.disabled=Ne._f.disabled||U}))},0,!1))},le=(U,Z)=>async he=>{let Ne;he&&(he.preventDefault&&he.preventDefault(),he.persist&&he.persist());let Pe=tn(i);if(y.state.next({isSubmitting:!0}),e.resolver){const{errors:Ae,values:ze}=await I();w(),n.errors=Ae,Pe=tn(ze)}else await O(r);if(a.disabled.size)for(const Ae of a.disabled)kn(Pe,Ae);if(kn(n.errors,"root"),sr(n.errors)){y.state.next({errors:{}});try{await U(Pe,he)}catch(Ae){Ne=Ae}}else Z&&await Z({...n.errors},he),be(),setTimeout(be);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:sr(n.errors)&&!Ne,submitCount:n.submitCount+1,errors:n.errors}),Ne)throw Ne},pe=(U,Z={})=>{Re(r,U)&&(Xt(Z.defaultValue)?W(U,tn(Re(o,U))):(W(U,Z.defaultValue),Nt(o,U,tn(Z.defaultValue))),Z.keepTouched||kn(n.touchedFields,U),Z.keepDirty||(kn(n.dirtyFields,U),n.isDirty=Z.defaultValue?$(U,tn(Re(o,U))):$()),Z.keepError||(kn(n.errors,U),p.isValid&&x()),y.state.next({...n}))},Oe=(U,Z={})=>{const he=U?tn(U):o,Ne=tn(he),Pe=sr(U),Ae=Pe?o:Ne;if(Z.keepDefaultValues||(o=he),!Z.keepValues){if(Z.keepDirtyValues){const ze=new Set([...a.mount,...Object.keys(ja(o,i))]);for(const st of Array.from(ze))Re(n.dirtyFields,st)?Nt(Ae,st,Re(i,st)):W(st,Re(Ae,st))}else{if(Om&&Xt(U))for(const ze of a.mount){const st=Re(r,ze);if(st&&st._f){const pt=Array.isArray(st._f.refs)?st._f.refs[0]:st._f.ref;if(gd(pt)){const Vt=pt.closest("form");if(Vt){Vt.reset();break}}}}if(Z.keepFieldsRef)for(const ze of a.mount)W(ze,Re(Ae,ze));else r={}}i=e.shouldUnregister?Z.keepDefaultValues?tn(o):{}:tn(Ae),y.array.next({values:{...Ae}}),y.state.next({values:{...Ae}})}a={mount:Z.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!p.isValid||!!Z.keepIsValid||!!Z.keepDirtyValues||!e.shouldUnregister&&!sr(Ae),s.watch=!!e.shouldUnregister,s.keepIsValid=!!Z.keepIsValid,s.action=!1,Z.keepErrors||(n.errors={}),y.state.next({submitCount:Z.keepSubmitCount?n.submitCount:0,isDirty:Pe?!1:Z.keepDirty?n.isDirty:!!(Z.keepDefaultValues&&!Po(U,o)),isSubmitted:Z.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Pe?{}:Z.keepDirtyValues?Z.keepDefaultValues&&i?ja(o,i):n.dirtyFields:Z.keepDefaultValues&&U?ja(o,U):Z.keepDirty?n.dirtyFields:{},touchedFields:Z.keepTouched?n.touchedFields:{},errors:Z.keepErrors?n.errors:{},isSubmitSuccessful:Z.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},ke=(U,Z)=>Oe(mr(U)?U(i):U,{...e.resetOptions,...Z}),Fe=(U,Z={})=>{const he=Re(r,U),Ne=he&&he._f;if(Ne){const Pe=Ne.refs?Ne.refs[0]:Ne.ref;Pe.focus&&setTimeout(()=>{Pe.focus(),Z.shouldSelect&&mr(Pe.select)&&Pe.select()})}},Ie=U=>{n={...n,...U}},Xe={control:{register:se,unregister:q,getFieldState:ve,handleSubmit:le,setError:ye,_subscribe:ce,_runSchema:I,_updateIsValidating:w,_focusError:be,_getWatch:V,_getDirty:$,_setValid:x,_setFieldArray:E,_setDisabledField:ee,_setErrors:C,_getFieldArray:z,_reset:Oe,_resetDefaultValues:()=>mr(e.defaultValues)&&e.defaultValues().then(U=>{ke(U,e.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:N,_disableForm:ne,_subjects:y,_proxyFormState:p,get _fields(){return r},get _formValues(){return i},get _state(){return s},set _state(U){s=U},get _defaultValues(){return o},get _names(){return a},set _names(U){a=U},get _formState(){return n},get _options(){return e},set _options(U){e={...e,...U}}},subscribe:fe,trigger:K,register:se,handleSubmit:le,watch:oe,setValue:W,getValues:Q,reset:ke,resetField:pe,clearErrors:xe,unregister:q,setError:ye,setFocus:Fe,getFieldState:ve};return{...Xe,formControl:Xe}}var ns=()=>{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)})},Bm=(t,e,n={})=>n.shouldFocus||Xt(n.shouldFocus)?n.focusName||`${t}.${Xt(n.focusIndex)?e:n.focusIndex}.`:"",Vm=(t,e)=>[...t,...kr(e)],zm=t=>Array.isArray(t)?t.map(()=>{}):void 0;function Hm(t,e,n){return[...t.slice(0,e),...kr(n),...t.slice(e)]}var Wm=(t,e,n)=>Array.isArray(t)?(Xt(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],jm=(t,e)=>[...kr(e),...kr(t)];function fP(t,e){let n=0;const r=[...t];for(const o of e)r.splice(o-n,1),n++;return pd(r).length?r:[]}var Um=(t,e)=>Xt(e)?[]:fP(t,kr(e).sort((n,r)=>n-r)),qm=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]},tx=(t,e,n)=>(t[e]=n,t);function pP(t){const e=dn(),{control:n=e.control,name:r,keyName:o="id",shouldUnregister:i,rules:s}=t,[a,c]=J.useState(n._getFieldArray(r)),u=J.useRef(n._getFieldArray(r).map(ns)),f=J.useRef(!1);n._names.array.add(r),J.useMemo(()=>s&&a.length>=0&&n.register(r,s),[n,r,a.length,s]),md(()=>n._subjects.array.subscribe({next:({values:C,name:k})=>{if(k===r||!k){const M=Re(C,r);Array.isArray(M)&&(c(M),u.current=M.map(ns))}}}).unsubscribe,[n,r]);const p=J.useCallback(C=>{f.current=!0,n._setFieldArray(r,C)},[n,r]),m=(C,k)=>{const M=kr(tn(C)),A=Vm(n._getFieldArray(r),M);n._names.focus=Bm(r,A.length-1,k),u.current=Vm(u.current,M.map(ns)),p(A),c(A),n._setFieldArray(r,A,Vm,{argA:zm(C)})},y=(C,k)=>{const M=kr(tn(C)),A=jm(n._getFieldArray(r),M);n._names.focus=Bm(r,0,k),u.current=jm(u.current,M.map(ns)),p(A),c(A),n._setFieldArray(r,A,jm,{argA:zm(C)})},b=C=>{const k=Um(n._getFieldArray(r),C);u.current=Um(u.current,C),p(k),c(k),!Array.isArray(Re(n._fields,r))&&Nt(n._fields,r,void 0),n._setFieldArray(r,k,Um,{argA:C})},g=(C,k,M)=>{const A=kr(tn(k)),I=Hm(n._getFieldArray(r),C,A);n._names.focus=Bm(r,C,M),u.current=Hm(u.current,C,A.map(ns)),p(I),c(I),n._setFieldArray(r,I,Hm,{argA:C,argB:zm(k)})},x=(C,k)=>{const M=n._getFieldArray(r);qm(M,C,k),qm(u.current,C,k),p(M),c(M),n._setFieldArray(r,M,qm,{argA:C,argB:k},!1)},w=(C,k)=>{const M=n._getFieldArray(r);Wm(M,C,k),Wm(u.current,C,k),p(M),c(M),n._setFieldArray(r,M,Wm,{argA:C,argB:k},!1)},E=(C,k)=>{const M=tn(k),A=tx(n._getFieldArray(r),C,M);u.current=[...A].map((I,L)=>!I||L===C?ns():u.current[L]),p(A),c([...A]),n._setFieldArray(r,A,tx,{argA:C,argB:M},!0,!1)},T=C=>{const k=kr(tn(C));u.current=k.map(ns),p([...k]),c([...k]),n._setFieldArray(r,[...k],M=>M,{},!0,!1)};return J.useEffect(()=>{if(n._state.action=!1,Fm(r,n._names)&&n._subjects.state.next({...n._formState}),f.current&&(!Ua(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!Ua(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([r]).then(C=>{n._updateIsValidating([r]);const k=Re(C.errors,r),M=Re(n._formState.errors,r);(M?!k&&M.type||k&&(M.type!==k.type||M.message!==k.message):k&&k.type)&&(k?Nt(n._formState.errors,r,k):kn(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const C=Re(n._fields,r);C&&C._f&&!(Ua(n._options.reValidateMode).isOnSubmit&&Ua(n._options.mode).isOnSubmit)&&Rm(C,n._names.disabled,n._formValues,n._options.criteriaMode===Qr.all,n._options.shouldUseNativeValidation,!0).then(k=>!sr(k)&&n._subjects.state.next({errors:Q1(n._formState.errors,k,r)}))}n._subjects.state.next({name:r,values:tn(n._formValues)}),n._names.focus&&qa(n._fields,(C,k)=>{if(n._names.focus&&k.startsWith(n._names.focus)&&C.focus)return C.focus(),1}),n._names.focus="",n._setValid(),f.current=!1},[a,r,n]),J.useEffect(()=>(!Re(n._formValues,r)&&n._setFieldArray(r),()=>{const C=(k,M)=>{const A=Re(n._fields,k);A&&A._f&&(A._f.mount=M)};n._options.shouldUnregister||i?n.unregister(r):C(r,!1)}),[r,n,o,i]),{swap:J.useCallback(x,[p,r,n]),move:J.useCallback(w,[p,r,n]),prepend:J.useCallback(y,[p,r,n]),append:J.useCallback(m,[p,r,n]),remove:J.useCallback(b,[p,r,n]),insert:J.useCallback(g,[p,r,n]),update:J.useCallback(E,[p,r,n]),replace:J.useCallback(T,[p,r,n]),fields:J.useMemo(()=>a.map((C,k)=>({...C,[o]:u.current[k]||ns()})),[a,o])}}function nx(t={}){const e=J.useRef(void 0),n=J.useRef(void 0),[r,o]=J.useState({isDirty:!1,isValidating:!1,isLoading:mr(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:mr(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!mr(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:s,...a}=dP(t);e.current={...a,formState:r}}const i=e.current.control;return i._options=t,md(()=>{const s=i._subscribe({formState:i._proxyFormState,callback:()=>o({...i._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),i._formState.isReady=!0,s},[i]),J.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),J.useEffect(()=>{t.mode&&(i._options.mode=t.mode),t.reValidateMode&&(i._options.reValidateMode=t.reValidateMode)},[i,t.mode,t.reValidateMode]),J.useEffect(()=>{t.errors&&(i._setErrors(t.errors),i._focusError())},[i,t.errors]),J.useEffect(()=>{t.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,t.shouldUnregister]),J.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==r.isDirty&&i._subjects.state.next({isDirty:s})}},[i,r.isDirty]),J.useEffect(()=>{var s;t.values&&!Po(t.values,n.current)?(i._reset(t.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((s=i._options.resetOptions)===null||s===void 0)&&s.keepIsValid||i._setValid(),n.current=t.values,o(a=>({...a}))):i._resetDefaultValues()},[i,t.values]),J.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=R1(r,i),e.current}const hP=["w","xs","sm","md","lg","xl","alignment","justify","noMP","noGrid","gridClassName","gridStyle"],rx=t=>t>47&&t<58,ox=t=>t>64&&t<123&&(t<91||t>96),mP=(t,e,n,r)=>{let o="",i=0,s=0,a=0,c=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++;(rx(t.charCodeAt(T))&&e[i]==="9"||ox(t.charCodeAt(T))&&e[i]==="X")&&(a>0&&(c=a,a=0),o+=t[T],i++)}const p=rx(t.charCodeAt(u-1))?"number":ox(t.charCodeAt(u-1))?"letter":"something else",m=p!=="number"&&e[u-1]==="9",y=p!=="letter"&&e[u-1]==="X";(m||y||p==="something else")&&(f=!0);let g="",x=0;Math.abs(n.length-t.length)<=1&&(s=0);let w=u+s;for(let T=0;T<o.length;T++){for(;x<e.length&&e[x]!=="X"&&e[x]!=="9";)g+=e[x],x++;g+=o[T],x++}t.length<n.length?window.requestAnimationFrame(()=>{r.selectionStart=w,r.selectionEnd=w}):e[w-1]!=="X"&&e[w-1]!=="9"?window.requestAnimationFrame(()=>{r.selectionStart=w+c,r.selectionEnd=w+c}):(f&&(w-=1),window.requestAnimationFrame(()=>{r.selectionStart=w,r.selectionEnd=w}));const E=e.slice(x);return E.indexOf("X")===-1&&E.indexOf("9")===-1&&(g+=E),g}return window.requestAnimationFrame(()=>{r.selectionStart=u-1,r.selectionEnd=u-1}),n};function eo(t,e){const r=Object.keys(t).filter(i=>e.includes(i)),o={...t};for(const i of hP)delete o[i];for(const i of r)delete o[i];return o}const ar=t=>t.split(/(?=[A-Z])|[.\-_\s]+/).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).filter(Boolean).join(" ");function gP(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(c=>{s.includes(String(c.value).toString())&&(i+=c.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 hc(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:Io.Link,to:t.path}:t.externalLink?{href:t.externalLink}:{}}function yi(t,e){return process.env.NODE_ENV==="production"?()=>null:function(...r){return t(...r)||e(...r)}}var bd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vd={exports:{}},Ut={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-is.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var ix;function yP(){if(ix)return Ut;ix=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"),c=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"),y=Symbol.for("react.client.reference");function b(g){if(typeof g=="object"&&g!==null){var x=g.$$typeof;switch(x){case t:switch(g=g.type,g){case n:case o:case r:case c:case u:case m:return g;default:switch(g=g&&g.$$typeof,g){case s:case a:case p:case f:return g;case i:return g;default:return x}}case e:return x}}}return Ut.ContextConsumer=i,Ut.ContextProvider=s,Ut.Element=t,Ut.ForwardRef=a,Ut.Fragment=n,Ut.Lazy=p,Ut.Memo=f,Ut.Portal=e,Ut.Profiler=o,Ut.StrictMode=r,Ut.Suspense=c,Ut.SuspenseList=u,Ut.isContextConsumer=function(g){return b(g)===i},Ut.isContextProvider=function(g){return b(g)===s},Ut.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},Ut.isForwardRef=function(g){return b(g)===a},Ut.isFragment=function(g){return b(g)===n},Ut.isLazy=function(g){return b(g)===p},Ut.isMemo=function(g){return b(g)===f},Ut.isPortal=function(g){return b(g)===e},Ut.isProfiler=function(g){return b(g)===o},Ut.isStrictMode=function(g){return b(g)===r},Ut.isSuspense=function(g){return b(g)===c},Ut.isSuspenseList=function(g){return b(g)===u},Ut.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===o||g===r||g===c||g===u||typeof g=="object"&&g!==null&&(g.$$typeof===p||g.$$typeof===f||g.$$typeof===s||g.$$typeof===i||g.$$typeof===a||g.$$typeof===y||g.getModuleId!==void 0)},Ut.typeOf=b,Ut}var qt={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-is.development.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var sx;function bP(){return sx||(sx=1,process.env.NODE_ENV!=="production"&&(function(){function t(g){if(typeof g=="object"&&g!==null){var x=g.$$typeof;switch(x){case e:switch(g=g.type,g){case r:case i:case o:case u:case f:case y:return g;default:switch(g=g&&g.$$typeof,g){case a:case c:case m:case p:return g;case s:return g;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"),c=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"),y=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");qt.ContextConsumer=s,qt.ContextProvider=a,qt.Element=e,qt.ForwardRef=c,qt.Fragment=r,qt.Lazy=m,qt.Memo=p,qt.Portal=n,qt.Profiler=i,qt.StrictMode=o,qt.Suspense=u,qt.SuspenseList=f,qt.isContextConsumer=function(g){return t(g)===s},qt.isContextProvider=function(g){return t(g)===a},qt.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},qt.isForwardRef=function(g){return t(g)===c},qt.isFragment=function(g){return t(g)===r},qt.isLazy=function(g){return t(g)===m},qt.isMemo=function(g){return t(g)===p},qt.isPortal=function(g){return t(g)===n},qt.isProfiler=function(g){return t(g)===i},qt.isStrictMode=function(g){return t(g)===o},qt.isSuspense=function(g){return t(g)===u},qt.isSuspenseList=function(g){return t(g)===f},qt.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===i||g===o||g===u||g===f||typeof g=="object"&&g!==null&&(g.$$typeof===m||g.$$typeof===p||g.$$typeof===a||g.$$typeof===s||g.$$typeof===c||g.$$typeof===b||g.getModuleId!==void 0)},qt.typeOf=t})()),qt}var ax;function vP(){return ax||(ax=1,process.env.NODE_ENV==="production"?vd.exports=yP():vd.exports=bP()),vd.exports}var bi=vP();function Ko(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 lx(t){if(D.isValidElement(t)||bi.isValidElementType(t)||!Ko(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=lx(t[n])}),e}function Hn(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return Ko(t)&&Ko(e)&&Object.keys(e).forEach(o=>{D.isValidElement(e[o])||bi.isValidElementType(e[o])?r[o]=e[o]:Ko(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&Ko(t[o])?r[o]=Hn(t[o],e[o],n):n.clone?r[o]=Ko(e[o])?lx(e[o]):e[o]:r[o]=e[o]}),r}var xd={exports:{}},Sd={exports:{}},Rt={};/** @license React v16.13.1
|
|
19
|
-
* react-is.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var cx;function xP(){if(cx)return Rt;cx=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,c=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,y=t?Symbol.for("react.memo"):60115,b=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,E=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 c: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 y:case s:return k;default:return M}}case n:return M}}}function C(k){return T(k)===u}return Rt.AsyncMode=c,Rt.ConcurrentMode=u,Rt.ContextConsumer=a,Rt.ContextProvider=s,Rt.Element=e,Rt.ForwardRef=f,Rt.Fragment=r,Rt.Lazy=b,Rt.Memo=y,Rt.Portal=n,Rt.Profiler=i,Rt.StrictMode=o,Rt.Suspense=p,Rt.isAsyncMode=function(k){return C(k)||T(k)===c},Rt.isConcurrentMode=C,Rt.isContextConsumer=function(k){return T(k)===a},Rt.isContextProvider=function(k){return T(k)===s},Rt.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===e},Rt.isForwardRef=function(k){return T(k)===f},Rt.isFragment=function(k){return T(k)===r},Rt.isLazy=function(k){return T(k)===b},Rt.isMemo=function(k){return T(k)===y},Rt.isPortal=function(k){return T(k)===n},Rt.isProfiler=function(k){return T(k)===i},Rt.isStrictMode=function(k){return T(k)===o},Rt.isSuspense=function(k){return T(k)===p},Rt.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===y||k.$$typeof===s||k.$$typeof===a||k.$$typeof===f||k.$$typeof===x||k.$$typeof===w||k.$$typeof===E||k.$$typeof===g)},Rt.typeOf=T,Rt}var Bt={};/** @license React v16.13.1
|
|
26
|
-
* react-is.development.js
|
|
27
|
-
*
|
|
28
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license found in the
|
|
31
|
-
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/var ux;function SP(){return ux||(ux=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,c=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,y=t?Symbol.for("react.memo"):60115,b=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,E=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===y||ne.$$typeof===s||ne.$$typeof===a||ne.$$typeof===f||ne.$$typeof===x||ne.$$typeof===w||ne.$$typeof===E||ne.$$typeof===g)}function C(ne){if(typeof ne=="object"&&ne!==null){var le=ne.$$typeof;switch(le){case e:var pe=ne.type;switch(pe){case c:case u:case r:case i:case o:case p:return pe;default:var Oe=pe&&pe.$$typeof;switch(Oe){case a:case f:case b:case y:case s:return Oe;default:return le}}case n:return le}}}var k=c,M=u,A=a,I=s,L=e,O=f,N=r,$=b,V=y,z=n,F=i,B=o,W=p,Y=!1;function X(ne){return Y||(Y=!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.")),K(ne)||C(ne)===c}function K(ne){return C(ne)===u}function Q(ne){return C(ne)===a}function ve(ne){return C(ne)===s}function xe(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===e}function ye(ne){return C(ne)===f}function oe(ne){return C(ne)===r}function ce(ne){return C(ne)===b}function fe(ne){return C(ne)===y}function q(ne){return C(ne)===n}function ee(ne){return C(ne)===i}function se(ne){return C(ne)===o}function be(ne){return C(ne)===p}Bt.AsyncMode=k,Bt.ConcurrentMode=M,Bt.ContextConsumer=A,Bt.ContextProvider=I,Bt.Element=L,Bt.ForwardRef=O,Bt.Fragment=N,Bt.Lazy=$,Bt.Memo=V,Bt.Portal=z,Bt.Profiler=F,Bt.StrictMode=B,Bt.Suspense=W,Bt.isAsyncMode=X,Bt.isConcurrentMode=K,Bt.isContextConsumer=Q,Bt.isContextProvider=ve,Bt.isElement=xe,Bt.isForwardRef=ye,Bt.isFragment=oe,Bt.isLazy=ce,Bt.isMemo=fe,Bt.isPortal=q,Bt.isProfiler=ee,Bt.isStrictMode=se,Bt.isSuspense=be,Bt.isValidElementType=T,Bt.typeOf=C})()),Bt}var dx;function fx(){return dx||(dx=1,process.env.NODE_ENV==="production"?Sd.exports=xP():Sd.exports=SP()),Sd.exports}/*
|
|
33
|
-
object-assign
|
|
34
|
-
(c) Sindre Sorhus
|
|
35
|
-
@license MIT
|
|
36
|
-
*/var Km,px;function wP(){if(px)return Km;px=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 c=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(c.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 Km=o()?Object.assign:function(i,s){for(var a,c=r(i),u,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var p in a)e.call(a,p)&&(c[p]=a[p]);if(t){u=t(a);for(var m=0;m<u.length;m++)n.call(a,u[m])&&(c[u[m]]=a[u[m]])}}return c},Km}var Ym,hx;function Gm(){if(hx)return Ym;hx=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ym=t,Ym}var Jm,mx;function gx(){return mx||(mx=1,Jm=Function.call.bind(Object.prototype.hasOwnProperty)),Jm}var Xm,yx;function CP(){if(yx)return Xm;yx=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Gm(),n={},r=gx();t=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,c,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((c||"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,c,a,null,e)}catch(b){p=b}if(p&&!(p instanceof Error)&&t((c||"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 y=u?u():"";t("Failed "+a+" type: "+p.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Xm=o,Xm}var Zm,bx;function TP(){if(bx)return Zm;bx=1;var t=fx(),e=wP(),n=Gm(),r=gx(),o=CP(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Zm=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function p(K){var Q=K&&(u&&K[u]||K[f]);if(typeof Q=="function")return Q}var m="<<anonymous>>",y={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:E(),arrayOf:T,element:C(),elementType:k(),instanceOf:M,node:O(),objectOf:I,oneOf:A,oneOfType:L,shape:$,exact:V};function b(K,Q){return K===Q?K!==0||1/K===1/Q:K!==K&&Q!==Q}function g(K,Q){this.message=K,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}g.prototype=Error.prototype;function x(K){if(process.env.NODE_ENV!=="production")var Q={},ve=0;function xe(oe,ce,fe,q,ee,se,be){if(q=q||m,se=se||fe,be!==n){if(c){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 le=q+":"+fe;!Q[le]&&ve<3&&(i("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+q+"`. 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."),Q[le]=!0,ve++)}}return ce[fe]==null?oe?ce[fe]===null?new g("The "+ee+" `"+se+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new g("The "+ee+" `"+se+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:K(ce,fe,q,ee,se)}var ye=xe.bind(null,!1);return ye.isRequired=xe.bind(null,!0),ye}function w(K){function Q(ve,xe,ye,oe,ce,fe){var q=ve[xe],ee=B(q);if(ee!==K){var se=W(q);return new g("Invalid "+oe+" `"+ce+"` of type "+("`"+se+"` supplied to `"+ye+"`, expected ")+("`"+K+"`."),{expectedType:K})}return null}return x(Q)}function E(){return x(s)}function T(K){function Q(ve,xe,ye,oe,ce){if(typeof K!="function")return new g("Property `"+ce+"` of component `"+ye+"` has invalid PropType notation inside arrayOf.");var fe=ve[xe];if(!Array.isArray(fe)){var q=B(fe);return new g("Invalid "+oe+" `"+ce+"` of type "+("`"+q+"` supplied to `"+ye+"`, expected an array."))}for(var ee=0;ee<fe.length;ee++){var se=K(fe,ee,ye,oe,ce+"["+ee+"]",n);if(se instanceof Error)return se}return null}return x(Q)}function C(){function K(Q,ve,xe,ye,oe){var ce=Q[ve];if(!a(ce)){var fe=B(ce);return new g("Invalid "+ye+" `"+oe+"` of type "+("`"+fe+"` supplied to `"+xe+"`, expected a single ReactElement."))}return null}return x(K)}function k(){function K(Q,ve,xe,ye,oe){var ce=Q[ve];if(!t.isValidElementType(ce)){var fe=B(ce);return new g("Invalid "+ye+" `"+oe+"` of type "+("`"+fe+"` supplied to `"+xe+"`, expected a single ReactElement type."))}return null}return x(K)}function M(K){function Q(ve,xe,ye,oe,ce){if(!(ve[xe]instanceof K)){var fe=K.name||m,q=X(ve[xe]);return new g("Invalid "+oe+" `"+ce+"` of type "+("`"+q+"` supplied to `"+ye+"`, expected ")+("instance of `"+fe+"`."))}return null}return x(Q)}function A(K){if(!Array.isArray(K))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 Q(ve,xe,ye,oe,ce){for(var fe=ve[xe],q=0;q<K.length;q++)if(b(fe,K[q]))return null;var ee=JSON.stringify(K,function(be,ne){var le=W(ne);return le==="symbol"?String(ne):ne});return new g("Invalid "+oe+" `"+ce+"` of value `"+String(fe)+"` "+("supplied to `"+ye+"`, expected one of "+ee+"."))}return x(Q)}function I(K){function Q(ve,xe,ye,oe,ce){if(typeof K!="function")return new g("Property `"+ce+"` of component `"+ye+"` has invalid PropType notation inside objectOf.");var fe=ve[xe],q=B(fe);if(q!=="object")return new g("Invalid "+oe+" `"+ce+"` of type "+("`"+q+"` supplied to `"+ye+"`, expected an object."));for(var ee in fe)if(r(fe,ee)){var se=K(fe,ee,ye,oe,ce+"."+ee,n);if(se instanceof Error)return se}return null}return x(Q)}function L(K){if(!Array.isArray(K))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var Q=0;Q<K.length;Q++){var ve=K[Q];if(typeof ve!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(ve)+" at index "+Q+"."),s}function xe(ye,oe,ce,fe,q){for(var ee=[],se=0;se<K.length;se++){var be=K[se],ne=be(ye,oe,ce,fe,q,n);if(ne==null)return null;ne.data&&r(ne.data,"expectedType")&&ee.push(ne.data.expectedType)}var le=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new g("Invalid "+fe+" `"+q+"` supplied to "+("`"+ce+"`"+le+"."))}return x(xe)}function O(){function K(Q,ve,xe,ye,oe){return z(Q[ve])?null:new g("Invalid "+ye+" `"+oe+"` supplied to "+("`"+xe+"`, expected a ReactNode."))}return x(K)}function N(K,Q,ve,xe,ye){return new g((K||"React class")+": "+Q+" type `"+ve+"."+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ye+"`.")}function $(K){function Q(ve,xe,ye,oe,ce){var fe=ve[xe],q=B(fe);if(q!=="object")return new g("Invalid "+oe+" `"+ce+"` of type `"+q+"` "+("supplied to `"+ye+"`, expected `object`."));for(var ee in K){var se=K[ee];if(typeof se!="function")return N(ye,oe,ce,ee,W(se));var be=se(fe,ee,ye,oe,ce+"."+ee,n);if(be)return be}return null}return x(Q)}function V(K){function Q(ve,xe,ye,oe,ce){var fe=ve[xe],q=B(fe);if(q!=="object")return new g("Invalid "+oe+" `"+ce+"` of type `"+q+"` "+("supplied to `"+ye+"`, expected `object`."));var ee=e({},ve[xe],K);for(var se in ee){var be=K[se];if(r(K,se)&&typeof be!="function")return N(ye,oe,ce,se,W(be));if(!be)return new g("Invalid "+oe+" `"+ce+"` key `"+se+"` supplied to `"+ye+"`.\nBad object: "+JSON.stringify(ve[xe],null," ")+`
|
|
37
|
-
Valid keys: `+JSON.stringify(Object.keys(K),null," "));var ne=be(fe,se,ye,oe,ce+"."+se,n);if(ne)return ne}return null}return x(Q)}function z(K){switch(typeof K){case"number":case"string":case"undefined":return!0;case"boolean":return!K;case"object":if(Array.isArray(K))return K.every(z);if(K===null||a(K))return!0;var Q=p(K);if(Q){var ve=Q.call(K),xe;if(Q!==K.entries){for(;!(xe=ve.next()).done;)if(!z(xe.value))return!1}else for(;!(xe=ve.next()).done;){var ye=xe.value;if(ye&&!z(ye[1]))return!1}}else return!1;return!0;default:return!1}}function F(K,Q){return K==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function B(K){var Q=typeof K;return Array.isArray(K)?"array":K instanceof RegExp?"object":F(Q,K)?"symbol":Q}function W(K){if(typeof K>"u"||K===null)return""+K;var Q=B(K);if(Q==="object"){if(K instanceof Date)return"date";if(K instanceof RegExp)return"regexp"}return Q}function Y(K){var Q=W(K);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function X(K){return!K.constructor||!K.constructor.name?m:K.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},Zm}var Qm,vx;function kP(){if(vx)return Qm;vx=1;var t=Gm();function e(){}function n(){}return n.resetWarningCache=e,Qm=function(){function r(s,a,c,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},Qm}var xx;function EP(){if(xx)return xd.exports;if(xx=1,process.env.NODE_ENV!=="production"){var t=fx(),e=!0;xd.exports=TP()(t.isElement,e)}else xd.exports=kP()();return xd.exports}var _P=EP();const l=Rr(_P);function OP(t){const{prototype:e={}}=t;return!!e.isReactComponent}function Sx(t,e,n,r,o){const i=t[e],s=o||e;if(i==null||typeof window>"u")return null;let a;const c=i.type;return typeof c=="function"&&!OP(c)&&(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 Us=yi(l.element,Sx);Us.isRequired=yi(l.element.isRequired,Sx);function MP(t){const{prototype:e={}}=t;return!!e.isReactComponent}function AP(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"&&!MP(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 Ya=yi(l.elementType,AP),DP="exact-prop: ";function eg(t){return process.env.NODE_ENV==="production"?t:{...t,[DP]: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 Yo(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 wx(t,e=""){return t.displayName||t.name||e}function Cx(t,e,n){const r=wx(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function IP(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return wx(t,"Component");if(typeof t=="object")switch(t.$$typeof){case bi.ForwardRef:return Cx(t,t.render,"ForwardRef");case bi.Memo:return Cx(t,t.type,"memo");default:return}}}function vi(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 Dn=l.oneOfType([l.func,l.object]);function $e(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Yo(7));return t.charAt(0).toUpperCase()+t.slice(1)}function Tx(...t){return t.reduce((e,n)=>n==null?e:function(...o){e.apply(this,o),n.apply(this,o)},()=>{})}function kx(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 Ga(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 Fn(t){return t&&t.ownerDocument||document}function xi(t){return Fn(t).defaultView||window}function PP(t,e){if(process.env.NODE_ENV==="production")return()=>null;const n=e?{...e.propTypes}:null;return o=>(i,s,a,c,u,...f)=>{const p=u||s,m=n==null?void 0:n[p];if(m){const y=m(i,s,a,c,u,...f);if(y)return y}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 Ex(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Rn=typeof window<"u"?D.useLayoutEffect:D.useEffect;let _x=0;function NP(t){const[e,n]=D.useState(t),r=t||e;return D.useEffect(()=>{e==null&&(_x+=1,n(`mui-${_x}`))},[e]),r}const Ox={...D}.useId;function No(t){if(Ox!==void 0){const e=Ox();return t??e}return NP(t)}function $P(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 Go({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(`
|
|
38
|
-
`))},[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(`
|
|
39
|
-
`))},[JSON.stringify(e)])}const c=D.useCallback(u=>{o||s(u)},[]);return[a,c]}function qe(t){const e=D.useRef(t);return Rn(()=>{e.current=t}),D.useRef((...n)=>(0,e.current)(...n)).current}function At(...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 Mx={};function Ax(t,e){const n=D.useRef(Mx);return n.current===Mx&&(n.current=t(e)),n}const LP=[];function FP(t){D.useEffect(t,LP)}class wd{constructor(){dd(this,"currentId",null);dd(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});dd(this,"disposeEffect",()=>this.clear)}static create(){return new wd}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function qs(){const t=Ax(wd.create).current;return FP(t.disposeEffect),t}function Ja(t){try{return t.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
40
|
-
`))}return!1}function Dx(t=window){const e=t.document.documentElement.clientWidth;return t.innerWidth-e}const RP={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function BP(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 Ix(t,e,n,r){const o=t[e];if(o==null||!Number.isInteger(o)){const i=BP(o);return new RangeError(`Invalid ${r} \`${e}\` of type \`${i}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function Px(t,e,...n){return t[e]===void 0?null:Ix(t,e,...n)}function tg(){return null}Px.isRequired=Ix,tg.isRequired=tg;const Nx=process.env.NODE_ENV==="production"?tg:Px;function Xa(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 c=a;n[o][c]=Xa(i[c],s[c])}}}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 c=0;c<i.length;c+=1){const u=i[c];u&&(s+=(a===!0?"":" ")+e(u),a=!1,n&&n[u]&&(s+=" "+n[u]))}r[o]=s}return r}const $x=t=>t,Lx=(()=>{let t=$x;return{configure(e){t=e},generate(e){return t(e)},reset(){t=$x}}})(),VP={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=VP[e];return r?`${n}-${r}`:`${Lx.generate(t)}-${e}`}function Ge(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=Qe(t,o,n)}),r}function zP(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function HP(t){return typeof t=="string"}function Fx(t,e,n){return t===void 0||HP(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function Rx(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=Rx(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function me(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Rx(t))&&(r&&(r+=" "),r+=e);return r}function Bx(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 Vx(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 zx(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const y=me(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},g={...n,...o,...r};return y.length>0&&(g.className=y),Object.keys(b).length>0&&(g.style=b),{props:g,internalRef:void 0}}const s=Bx({...o,...r}),a=Vx(r),c=Vx(o),u=e(s),f=me(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,...c,...a};return f.length>0&&(m.className=f),Object.keys(p).length>0&&(m.style=p),{props:m,internalRef:u.ref}}function Cd(t,e,n){return typeof t=="function"?t(e,n):t}function $t(t){var p;const{elementType:e,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=t,s=o?{}:Cd(n,r),{props:a,internalRef:c}=zx({...i,externalSlotProps:s}),u=At(c,s==null?void 0:s.ref,(p=t.additionalProps)==null?void 0:p.ref);return Fx(e,{...a,ref:u},r)}function Ks(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 mc(t,e){return e?Hn(t,e,{clone:!1}):t}const rs=process.env.NODE_ENV!=="production"?l.oneOfType([l.number,l.string,l.object,l.array]):{};function Hx(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 WP(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function jP(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${e})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
41
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Yo(18,`(${e})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return t.containerQueries(o).up(i)}function UP(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 c=e(t.breakpoints.not(...a),s);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},o=i=>(n(r,i),r);return n(o),{...t,containerQueries:o}}const Td={xs:0,sm:600,md:900,lg:1200,xl:1536},Wx={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${Td[t]}px)`},qP={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:Td[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function $o(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||Wx;return e.reduce((s,a,c)=>(s[i.up(i.keys[c])]=n(e[c]),s),{})}if(typeof e=="object"){const i=r.breakpoints||Wx;return Object.keys(e).reduce((s,a)=>{if(WP(i.keys,a)){const c=jP(r.containerQueries?r:qP,a);c&&(s[c]=n(e[a],a))}else if(Object.keys(i.values||Td).includes(a)){const c=i.up(a);s[c]=n(e[a],a)}else{const c=a;s[c]=e[c]}return s},{})}return n(e)}function jx(t={}){var n;return((n=t.keys)==null?void 0:n.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function ng(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function KP(t,...e){const n=jx(t),r=[n,...e].reduce((o,i)=>Hn(o,i),{});return ng(Object.keys(n),r)}function YP(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 rg({values:t,breakpoints:e,base:n}){const r=n||YP(t,e),o=Object.keys(r);if(o.length===0)return t;let i;return o.reduce((s,a,c)=>(Array.isArray(t)?(s[a]=t[c]!=null?t[c]:t[i],i=c):typeof t=="object"?(s[a]=t[a]!=null?t[a]:t[i],i=a):s[a]=t,s),{})}function is(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 kd(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=is(t,n)||r,e&&(o=e(o,r,t)),o}function En(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],c=s.theme,u=is(c,r)||{};return $o(s,a,p=>{let m=kd(u,o,p);return p===m&&typeof p=="string"&&(m=kd(u,o,`${e}${p==="default"?"":$e(p)}`,p)),n===!1?m:{[n]:m}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:rs}:{},i.filterProps=[e],i}function GP(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const JP={m:"margin",p:"padding"},XP={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ux={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ZP=GP(t=>{if(t.length>2)if(Ux[t])t=Ux[t];else return[t];const[e,n]=t.split(""),r=JP[e],o=XP[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Ed=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],_d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],QP=[...Ed,..._d];function gc(t,e,n,r){const o=is(t,e,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),typeof o=="string"?`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const s=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
|
|
42
|
-
`)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
|
|
43
|
-
`)));const a=o[s];return i>=0?a:typeof a=="number"?-a:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
44
|
-
`)),()=>{})}function Od(t){return gc(t,"spacing",8,"spacing")}function Ys(t,e){return typeof e=="string"||e==null?e:t(e)}function eN(t,e){return n=>t.reduce((r,o)=>(r[o]=Ys(e,n),r),{})}function tN(t,e,n,r){if(!e.includes(n))return null;const o=ZP(n),i=eN(o,r),s=t[n];return $o(t,s,i)}function qx(t,e){const n=Od(t.theme);return Object.keys(t).map(r=>tN(t,e,r,n)).reduce(mc,{})}function hn(t){return qx(t,Ed)}hn.propTypes=process.env.NODE_ENV!=="production"?Ed.reduce((t,e)=>(t[e]=rs,t),{}):{},hn.filterProps=Ed;function mn(t){return qx(t,_d)}mn.propTypes=process.env.NODE_ENV!=="production"?_d.reduce((t,e)=>(t[e]=rs,t),{}):{},mn.filterProps=_d,process.env.NODE_ENV!=="production"&&QP.reduce((t,e)=>(t[e]=rs,t),{});function Md(...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]?mc(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 to(t){return typeof t!="number"?t:`${t}px solid`}function no(t,e){return En({prop:t,themeKey:"borders",transform:e})}const nN=no("border",to),rN=no("borderTop",to),oN=no("borderRight",to),iN=no("borderBottom",to),sN=no("borderLeft",to),aN=no("borderColor"),lN=no("borderTopColor"),cN=no("borderRightColor"),uN=no("borderBottomColor"),dN=no("borderLeftColor"),fN=no("outline",to),pN=no("outlineColor"),Ad=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=gc(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Ys(e,r)});return $o(t,t.borderRadius,n)}return null};Ad.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:rs}:{},Ad.filterProps=["borderRadius"],Md(nN,rN,oN,iN,sN,aN,lN,cN,uN,dN,Ad,fN,pN);const Dd=t=>{if(t.gap!==void 0&&t.gap!==null){const e=gc(t.theme,"spacing",8,"gap"),n=r=>({gap:Ys(e,r)});return $o(t,t.gap,n)}return null};Dd.propTypes=process.env.NODE_ENV!=="production"?{gap:rs}:{},Dd.filterProps=["gap"];const Id=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=gc(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Ys(e,r)});return $o(t,t.columnGap,n)}return null};Id.propTypes=process.env.NODE_ENV!=="production"?{columnGap:rs}:{},Id.filterProps=["columnGap"];const Pd=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=gc(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Ys(e,r)});return $o(t,t.rowGap,n)}return null};Pd.propTypes=process.env.NODE_ENV!=="production"?{rowGap:rs}:{},Pd.filterProps=["rowGap"];const hN=En({prop:"gridColumn"}),mN=En({prop:"gridRow"}),gN=En({prop:"gridAutoFlow"}),yN=En({prop:"gridAutoColumns"}),bN=En({prop:"gridAutoRows"}),vN=En({prop:"gridTemplateColumns"}),xN=En({prop:"gridTemplateRows"}),SN=En({prop:"gridTemplateAreas"}),wN=En({prop:"gridArea"});Md(Dd,Id,Pd,hN,mN,gN,yN,bN,vN,xN,SN,wN);function Za(t,e){return e==="grey"?e:t}const CN=En({prop:"color",themeKey:"palette",transform:Za}),TN=En({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Za}),kN=En({prop:"backgroundColor",themeKey:"palette",transform:Za});Md(CN,TN,kN);function Br(t){return t<=1&&t!==0?`${t*100}%`:t}const EN=En({prop:"width",transform:Br}),og=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var o,i,s,a,c;const r=((s=(i=(o=t.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:s[n])||Td[n];return r?((c=(a=t.theme)==null?void 0:a.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${t.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Br(n)}};return $o(t,t.maxWidth,e)}return null};og.filterProps=["maxWidth"];const _N=En({prop:"minWidth",transform:Br}),ON=En({prop:"height",transform:Br}),MN=En({prop:"maxHeight",transform:Br}),AN=En({prop:"minHeight",transform:Br});En({prop:"size",cssProperty:"width",transform:Br}),En({prop:"size",cssProperty:"height",transform:Br});const DN=En({prop:"boxSizing"});Md(EN,og,_N,ON,MN,AN,DN);const yc={border:{themeKey:"borders",transform:to},borderTop:{themeKey:"borders",transform:to},borderRight:{themeKey:"borders",transform:to},borderBottom:{themeKey:"borders",transform:to},borderLeft:{themeKey:"borders",transform:to},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:to},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ad},color:{themeKey:"palette",transform:Za},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Za},backgroundColor:{themeKey:"palette",transform:Za},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:Dd},rowGap:{style:Pd},columnGap:{style:Id},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:og},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 IN(...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 PN(t,e){return typeof t=="function"?t(e):t}function NN(){function t(n,r,o,i){const s={[n]:r,theme:o},a=i[n];if(!a)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:p}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const m=is(o,u)||{};return p?p(s):$o(s,r,b=>{let g=kd(m,f,b);return b===g&&typeof b=="string"&&(g=kd(m,f,`${n}${b==="default"?"":$e(b)}`,b)),c===!1?g:{[c]:g}})}function e(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const s=o.unstable_sxConfig??yc;function a(c){let u=c;if(typeof c=="function")u=c(o);else if(typeof c!="object")return c;if(!u)return null;const f=jx(o.breakpoints),p=Object.keys(f);let m=f;return Object.keys(u).forEach(y=>{const b=PN(u[y],o);if(b!=null)if(typeof b=="object")if(s[y])m=mc(m,t(y,b,o,s));else{const g=$o({theme:o},b,x=>({[y]:x}));IN(g,b)?m[y]=e({sx:b,theme:o,nested:!0}):m=mc(m,g)}else m=mc(m,t(y,b,o,s))}),!i&&o.modularCssLayers?{"@layer sx":Hx(o,ng(p,m))}:Hx(o,ng(p,m))}return Array.isArray(r)?r.map(a):a(r)}return e}const Gs=NN();Gs.filterProps=["sx"];const $N=t=>{var r;const e={systemProps:{},otherProps:{}},n=((r=t==null?void 0:t.theme)==null?void 0:r.unstable_sxConfig)??yc;return Object.keys(t).forEach(o=>{n[o]?e.systemProps[o]=t[o]:e.otherProps[o]=t[o]}),e};function Nd(t){const{sx:e,...n}=t,{systemProps:r,otherProps:o}=$N(n);let i;return Array.isArray(e)?i=[r,...e]:typeof e=="function"?i=(...s)=>{const a=e(...s);return Ko(a)?{...r,...a}:r}:i={...r,...e},{...o,sx:i}}function LN(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 FN={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 RN(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var BN=/[A-Z]|^ms/g,VN=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Kx=function(e){return e.charCodeAt(1)===45},Yx=function(e){return e!=null&&typeof e!="boolean"},ig=RN(function(t){return Kx(t)?t:t.replace(BN,"-$&").toLowerCase()}),Gx=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(VN,function(r,o,i){return ss={name:o,styles:i,next:ss},o})}return FN[e]!==1&&!Kx(e)&&typeof n=="number"&&n!==0?n+"px":n};function $d(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 ss={name:o.name,styles:o.styles,next:ss},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)ss={name:s.name,styles:s.styles,next:ss},s=s.next;var a=i.styles+";";return a}return zN(t,e,n)}}var c=n;return c}function zN(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=$d(t,e,n[o])+";";else for(var i in n){var s=n[i];if(typeof s!="object"){var a=s;Yx(a)&&(r+=ig(i)+":"+Gx(i,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&e==null)for(var c=0;c<s.length;c++)Yx(s[c])&&(r+=ig(i)+":"+Gx(i,s[c])+";");else{var u=$d(t,e,s);switch(i){case"animation":case"animationName":{r+=ig(i)+":"+u+";";break}default:r+=i+"{"+u+"}"}}}return r}var Jx=/label:\s*([^\s;{]+)\s*(;|$)/g,ss;function HN(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="";ss=void 0;var i=t[0];if(i==null||i.raw===void 0)r=!1,o+=$d(n,e,i);else{var s=i;o+=s[0]}for(var a=1;a<t.length;a++)if(o+=$d(n,e,t[a]),r){var c=i;o+=c[a]}Jx.lastIndex=0;for(var u="",f;(f=Jx.exec(o))!==null;)u+="-"+f[1];var p=LN(o)+u;return{name:p,styles:o,next:ss}}function WN(t){return t==null||Object.keys(t).length===0}function Xx(t){const{styles:e,defaultTheme:n={}}=t,r=typeof e=="function"?o=>e(WN(o)?n:o):e;return v.jsx(qo.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(Xx.propTypes={defaultTheme:l.object,styles:l.oneOfType([l.array,l.string,l.object,l.func])});/**
|
|
45
|
-
* @mui/styled-engine v6.5.0
|
|
46
|
-
*
|
|
47
|
-
* @license MIT
|
|
48
|
-
* This source code is licensed under the MIT license found in the
|
|
49
|
-
* LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/function Zx(t,e){const n=UI(t,e);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof t=="string"?`"${t}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
51
|
-
`)):r.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function jN(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const Qx=[];function as(t){return Qx[0]=t,HN(Qx)}const UN=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 qN(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=t,i=UN(e),s=Object.keys(i);function a(m){return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${n})`}function c(m){return`@media (max-width:${(typeof e[m]=="number"?e[m]:m)-r/100}${n})`}function u(m,y){const b=s.indexOf(y);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]]:y)-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 y=s.indexOf(m);return y===0?a(s[1]):y===s.length-1?c(s[y]):u(m,s[s.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:s,values:i,up:a,down:c,between:u,only:f,not:p,unit:n,...o}}const KN={borderRadius:4};function eS(t=8,e=Od({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 YN(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 bc(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...s}=t,a=qN(n),c=eS(o);let u=Hn({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...KN,...i}},s);return u=UP(u),u.applyStyles=YN,u=e.reduce((f,p)=>Hn(f,p),u),u.unstable_sxConfig={...yc,...s==null?void 0:s.unstable_sxConfig},u.unstable_sx=function(p){return Gs({sx:p,theme:this})},u}function GN(t){return Object.keys(t).length===0}function tS(t=null){const e=D.useContext(qo.ThemeContext);return!e||GN(e)?t:e}const JN=bc();function vc(t=JN){return tS(t)}function sg(t){const e=as(t);return t!==e&&e.styles?(e.styles.match(/^@layer\s+[^{]*$/)||(e.styles=`@layer global{${e.styles}}`),e):t}function nS({styles:t,themeId:e,defaultTheme:n={}}){const r=vc(n),o=e&&r[e]||r;let i=typeof t=="function"?t(o):t;return o.modularCssLayers&&(Array.isArray(i)?i=i.map(s=>sg(typeof s=="function"?s(o):s)):i=sg(i)),v.jsx(Xx,{styles:i})}process.env.NODE_ENV!=="production"&&(nS.propTypes={defaultTheme:l.object,styles:l.oneOfType([l.array,l.func,l.number,l.object,l.string,l.bool]),themeId:l.string});function XN(t={}){const{themeId:e,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=t,i=Zx("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(Gs);return D.forwardRef(function(c,u){const f=vc(n),{className:p,component:m="div",...y}=Nd(c);return v.jsx(i,{as:m,ref:u,className:me(p,o?o(r):r),theme:e&&f[e]||f,...y})})}function rS(t){const{variants:e,...n}=t,r={variants:e,style:as(n),isProcessed:!0};return r.style===n||e&&e.forEach(o=>{typeof o.style!="function"&&(o.style=as(o.style))}),r}const ZN=bc();function ag(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function Js(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function QN(t){return t?(e,n)=>n[t]:null}function e$(t,e,n){t.theme=r$(t.theme)?n:t.theme[e]||t.theme}function Ld(t,e,n){const r=typeof e=="function"?e(t):e;if(Array.isArray(r))return r.flatMap(o=>Ld(t,o,n));if(Array.isArray(r==null?void 0:r.variants)){let o;if(r.isProcessed)o=n?Js(r.style,n):r.style;else{const{variants:i,...s}=r;o=n?Js(as(s),n):s}return oS(t,r.variants,[o],n)}return r!=null&&r.isProcessed?n?Js(as(r.style),n):r.style:n?Js(as(r),n):r}function oS(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 c in a.props)if(t[c]!==a.props[c]&&((i=t.ownerState)==null?void 0:i[c])!==a.props[c])continue e;typeof a.style=="function"?(o??(o={...t,...t.ownerState,ownerState:t.ownerState}),n.push(r?Js(as(a.style(o)),r):a.style(o))):n.push(r?Js(as(a.style),r):a.style)}return n}function iS(t={}){const{themeId:e,defaultTheme:n=ZN,rootShouldForwardProp:r=ag,slotShouldForwardProp:o=ag}=t;function i(a){e$(a,e,n)}return(a,c={})=>{jN(a,M=>M.filter(A=>A!==Gs));const{name:u,slot:f,skipVariantsResolver:p,skipSx:m,overridesResolver:y=QN(sS(f)),...b}=c,g=u&&u.startsWith("Mui")||f?"components":"custom",x=p!==void 0?p:f&&f!=="Root"&&f!=="root"||!1,w=m||!1;let E=ag;f==="Root"||f==="root"?E=r:f?E=o:o$(a)&&(E=void 0);const T=Zx(a,{shouldForwardProp:E,label:n$(u,f),...b}),C=M=>{if(M.__emotion_real===M)return M;if(typeof M=="function")return function(I){return Ld(I,M,I.theme.modularCssLayers?g:void 0)};if(Ko(M)){const A=rS(M);return function(L){return A.variants?Ld(L,A,L.theme.modularCssLayers?g:void 0):L.theme.modularCssLayers?Js(A.style,g):A.style}}return M},k=(...M)=>{const A=[],I=M.map(C),L=[];if(A.push(i),u&&y&&L.push(function(V){var W,Y;const F=(Y=(W=V.theme.components)==null?void 0:W[u])==null?void 0:Y.styleOverrides;if(!F)return null;const B={};for(const X in F)B[X]=Ld(V,F[X],V.theme.modularCssLayers?"theme":void 0);return y(V,B)}),u&&!x&&L.push(function(V){var B,W;const z=V.theme,F=(W=(B=z==null?void 0:z.components)==null?void 0:B[u])==null?void 0:W.variants;return F?oS(V,F,[],V.theme.modularCssLayers?"theme":void 0):null}),w||L.push(Gs),Array.isArray(I[0])){const $=I.shift(),V=new Array(A.length).fill(""),z=new Array(L.length).fill("");let F;F=[...V,...$,...z],F.raw=[...V,...$.raw,...z],A.unshift(F)}const O=[...A,...I,...L],N=T(...O);return a.muiName&&(N.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(N.displayName=t$(u,f,a)),N};return T.withConfig&&(k.withConfig=T.withConfig),k}}function t$(t,e,n){return t?`${t}${$e(e||"")}`:`Styled(${IP(n)})`}function n$(t,e){let n;return process.env.NODE_ENV!=="production"&&t&&(n=`${t}-${sS(e||"Root")}`),n}function r$(t){for(const e in t)return!1;return!0}function o$(t){return typeof t=="string"&&t.charCodeAt(0)>96}function sS(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}const aS=iS();function lS(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:Xa(e.components[n].defaultProps,r)}function lg({props:t,name:e,defaultTheme:n,themeId:r}){let o=vc(n);return r&&(o=o[r]||o),lS({theme:o,name:e,props:t})}function i$(t,e,n,r,o){const[i,s]=D.useState(()=>o&&n?n(t).matches:r?r(t).matches:e);return Rn(()=>{if(!n)return;const a=n(t),c=()=>{s(a.matches)};return c(),a.addEventListener("change",c),()=>{a.removeEventListener("change",c)}},[t,n]),i}const cS={...D}.useSyncExternalStore;function s$(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,c]=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 cS(c,a,s)}function uS(t={}){const{themeId:e}=t;return function(r,o={}){let i=tS();i&&e&&(i=i[e]||i);const s=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:a=!1,matchMedia:c=s?window.matchMedia:null,ssrMatchMedia:u=null,noSsr:f=!1}=lS({name:"MuiUseMediaQuery",props:o,theme:i});process.env.NODE_ENV!=="production"&&typeof r=="function"&&i===null&&console.error(["MUI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join(`
|
|
52
|
-
`));let p=typeof r=="function"?r(i):r;p=p.replace(/^@media( ?)/m,""),p.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
|
|
53
|
-
`));const y=(cS!==void 0?s$:i$)(p,a,c,u,f);return process.env.NODE_ENV!=="production"&&D.useDebugValue({query:p,match:y}),y}}uS();function cg(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}].`),zP(t,e,n)}function a$(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 l$(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function Si(t){if(t.type)return t;if(t.charAt(0)==="#")return Si(a$(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
|
|
54
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Yo(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
|
|
55
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Yo(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const c$=t=>{const e=Si(t);return e.values.slice(0,3).map((n,r)=>e.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},xc=(t,e)=>{try{return c$(t)}catch{return e&&process.env.NODE_ENV!=="production"&&console.warn(e),t}};function Fd(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 u$(t){if(t.startsWith("#"))return t;const{values:e}=Si(t);return`#${e.map((n,r)=>l$(r===3?Math.round(255*n):n)).join("")}`}function dS(t){t=Si(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 c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",c.push(e[3])),Fd({type:a,values:c})}function ug(t){t=Si(t);let e=t.type==="hsl"||t.type==="hsla"?Si(dS(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 fS(t,e){const n=ug(t),r=ug(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function ft(t,e){return t=Si(t),e=cg(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Fd(t)}function Rd(t,e,n){try{return ft(t,e)}catch{return t}}function Xs(t,e){if(t=Si(t),e=cg(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 Fd(t)}function Kt(t,e,n){try{return Xs(t,e)}catch{return t}}function Qa(t,e){if(t=Si(t),e=cg(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 Fd(t)}function Yt(t,e,n){try{return Qa(t,e)}catch{return t}}function d$(t,e=.15){return ug(t)>.5?Xs(t,e):Qa(t,e)}function Bd(t,e,n){try{return d$(t,e)}catch{return t}}const f$=D.createContext();process.env.NODE_ENV!=="production"&&(l.node,l.bool);const dg=()=>D.useContext(f$)??!1,p$=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(l.node,l.object);function h$(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?Xa(o.defaultProps,r):!o.styleOverrides&&!o.variants?Xa(o,r):r}function m$({props:t,name:e}){const n=D.useContext(p$);return h$({props:t,name:e,theme:{components:n}})}const pS={theme:void 0};function g$(t){let e,n;return function(o){let i=e;return(i===void 0||o.theme!==n)&&(pS.theme=o.theme,i=rS(t(pS)),e=i,n=o.theme),i}}function y$(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 hS=(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])})},b$=(t,e,n)=>{function r(o,i=[],s=[]){Object.entries(o).forEach(([a,c])=>{(!n||n&&!n([...i,a]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...i,a],Array.isArray(c)?[...s,a]:s):e([...i,a],c,s))})}r(t)},v$=(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 fg(t,e){const{prefix:n,shouldSkipGeneratingVar:r}=e||{},o={},i={},s={};return b$(t,(a,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(a,c))){const f=`--${n?`${n}-`:""}${a.join("-")}`,p=v$(a,c);Object.assign(o,{[f]:p}),hS(i,a,`var(${f})`,u),hS(s,a,`var(${f}, ${p})`,u)}},a=>a[0]==="vars"),{css:o,vars:i,varsWithDefaults:s}}function x$(t,e={}){const{getSelector:n=x,disableCssColorScheme:r,colorSchemeSelector:o}=e,{colorSchemes:i={},components:s,defaultColorScheme:a="light",...c}=t,{vars:u,css:f,varsWithDefaults:p}=fg(c,e);let m=p;const y={},{[a]:b,...g}=i;if(Object.entries(g||{}).forEach(([T,C])=>{const{vars:k,css:M,varsWithDefaults:A}=fg(C,e);m=Hn(m,A),y[T]={css:M,vars:k}}),b){const{css:T,vars:C,varsWithDefaults:k}=fg(b,e);m=Hn(m,k),y[a]={css:T,vars:C}}function x(T,C){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":C}};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(y).forEach(([,{vars:C}])=>{T=Hn(T,C)}),T},generateStyleSheets:()=>{var I,L;const T=[],C=t.defaultColorScheme||"light";function k(O,N){Object.keys(N).length&&T.push(typeof O=="string"?{[O]:{...N}}:O)}k(n(void 0,{...f}),f);const{[C]:M,...A}=y;if(M){const{css:O}=M,N=(L=(I=i[C])==null?void 0:I.palette)==null?void 0:L.mode,$=!r&&N?{colorScheme:N,...O}:{...O};k(n(C,{...$}),$)}return Object.entries(A).forEach(([O,{css:N}])=>{var z,F;const $=(F=(z=i[O])==null?void 0:z.palette)==null?void 0:F.mode,V=!r&&$?{colorScheme:$,...N}:{...N};k(n(O,{...V}),V)}),T}}}function S$(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 w$=(t,e)=>t.filter(n=>e.includes(n)),el=(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:w$(t.keys,Object.keys(e))).forEach(i=>{if(t.keys.includes(i)){const s=e[i];s!==void 0&&n((a,c)=>{r===i?Object.assign(a,c):a[t.up(i)]=c},s)}}):(typeof e=="number"||typeof e=="string")&&n((o,i)=>{Object.assign(o,i)},e)};function Vd(t){return`--Grid-${t}Spacing`}function zd(t){return`--Grid-parent-${t}Spacing`}const mS="--Grid-columns",tl="--Grid-parent-columns",C$=({theme:t,ownerState:e})=>{const n={};return el(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(${zd("column")}) / var(${tl})))`}),r(n,i)}),n},T$=({theme:t,ownerState:e})=>{const n={};return el(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(${zd("column")}) * ${o} / var(${tl}))`}),r(n,i)}),n},k$=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={[mS]:12};return el(t.breakpoints,e.columns,(r,o)=>{const i=o??12;r(n,{[mS]:i,"> *":{[tl]:i}})}),n},E$=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return el(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,{[Vd("row")]:i,"> *":{[zd("row")]:i}})}),n},_$=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return el(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,{[Vd("column")]:i,"> *":{[zd("column")]:i}})}),n},O$=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return el(t.breakpoints,e.direction,(r,o)=>{r(n,{flexDirection:o})}),n},M$=({ownerState:t})=>({minWidth:0,boxSizing:"border-box",...t.container&&{display:"flex",flexWrap:"wrap",...t.wrap&&t.wrap!=="wrap"&&{flexWrap:t.wrap},gap:`var(${Vd("row")}) var(${Vd("column")})`}}),A$=t=>{const e=[];return Object.entries(t).forEach(([n,r])=>{r!==!1&&r!==void 0&&e.push(`grid-${n}-${String(r)}`)}),e},D$=(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[]},I$=t=>t===void 0?[]:typeof t=="object"?Object.entries(t).map(([e,n])=>`direction-${e}-${n}`):[`direction-xs-${String(t)}`],P$=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.`,gS=[];function N$(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=>{gS.includes(r)||(gS.push(r),console.warn(`MUI Grid2: ${P$(r)}
|
|
56
|
-
`))})}const $$=bc(),L$=aS("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>e.root});function F$(t){return lg({props:t,name:"MuiGrid",defaultTheme:$$})}function R$(t={}){const{createStyledComponent:e=L$,useThemeProps:n=F$,useTheme:r=vc,componentName:o="MuiGrid"}=t,i=(u,f)=>{const{container:p,direction:m,spacing:y,wrap:b,size:g}=u,x={root:["root",p&&"container",b!=="wrap"&&`wrap-xs-${String(b)}`,...I$(m),...A$(g),...p?D$(y,f.breakpoints.keys[0]):[]]};return Ze(x,w=>Qe(o,w),{})};function s(u,f,p=()=>!0){const m={};return u===null||(Array.isArray(u)?u.forEach((y,b)=>{y!==null&&p(y)&&f.keys[b]&&(m[f.keys[b]]=y)}):typeof u=="object"?Object.keys(u).forEach(y=>{const b=u[y];b!=null&&p(b)&&(m[y]=b)}):m[f.keys[0]]=u),m}const a=e(k$,_$,E$,C$,O$,M$,T$),c=D.forwardRef(function(f,p){const m=r(),y=n(f),b=Nd(y);N$(b,m.breakpoints);const{className:g,children:x,columns:w=12,container:E=!1,component:T="div",direction:C="row",wrap:k="wrap",size:M={},offset:A={},spacing:I=0,rowSpacing:L=I,columnSpacing:O=I,unstable_level:N=0,...$}=b,V=s(M,m.breakpoints,Q=>Q!==!1),z=s(A,m.breakpoints),F=f.columns??(N?void 0:w),B=f.spacing??(N?void 0:I),W=f.rowSpacing??f.spacing??(N?void 0:L),Y=f.columnSpacing??f.spacing??(N?void 0:O),X={...b,level:N,columns:F,container:E,direction:C,wrap:k,spacing:B,rowSpacing:W,columnSpacing:Y,size:V,offset:z},K=i(X,m);return v.jsx(a,{ref:p,as:T,ownerState:X,className:me(K.root,g),...$,children:D.Children.map(x,Q=>{var ve;return D.isValidElement(Q)&&Ga(Q,["Grid"])&&E&&Q.props.container?D.cloneElement(Q,{unstable_level:((ve=Q.props)==null?void 0:ve.unstable_level)??N+1}):Q})})});return process.env.NODE_ENV!=="production"&&(c.propTypes={children:l.node,className:l.string,columns:l.oneOfType([l.arrayOf(l.number),l.number,l.object]),columnSpacing:l.oneOfType([l.arrayOf(l.oneOfType([l.number,l.string])),l.number,l.object,l.string]),component:l.elementType,container:l.bool,direction:l.oneOfType([l.oneOf(["column-reverse","column","row-reverse","row"]),l.arrayOf(l.oneOf(["column-reverse","column","row-reverse","row"])),l.object]),offset:l.oneOfType([l.string,l.number,l.arrayOf(l.oneOfType([l.string,l.number])),l.object]),rowSpacing:l.oneOfType([l.arrayOf(l.oneOfType([l.number,l.string])),l.number,l.object,l.string]),size:l.oneOfType([l.string,l.bool,l.number,l.arrayOf(l.oneOfType([l.string,l.bool,l.number])),l.object]),spacing:l.oneOfType([l.arrayOf(l.oneOfType([l.number,l.string])),l.number,l.object,l.string]),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),wrap:l.oneOf(["nowrap","wrap-reverse","wrap"])}),c.muiName="Grid",c}const B$=bc(),V$=aS("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function z$(t){return lg({props:t,name:"MuiStack",defaultTheme:B$})}function H$(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 W$=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],j$=({ownerState:t,theme:e})=>{let n={display:"flex",flexDirection:"column",...$o({theme:e},rg({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r}))};if(t.spacing){const r=Od(e),o=Object.keys(e.breakpoints.values).reduce((c,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(c[u]=!0),c),{}),i=rg({values:t.direction,base:o}),s=rg({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((c,u,f)=>{if(!i[c]){const m=u>0?i[f[u-1]]:"column";i[c]=m}}),n=Hn(n,$o({theme:e},s,(c,u)=>t.useFlexGap?{gap:Ys(r,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${W$(u?i[u]:t.direction)}`]:Ys(r,c)}}))}return n=KP(e.breakpoints,n),n};function U$(t={}){const{createStyledComponent:e=V$,useThemeProps:n=z$,componentName:r="MuiStack"}=t,o=()=>Ze({root:["root"]},c=>Qe(r,c),{}),i=e(j$),s=D.forwardRef(function(c,u){const f=n(c),p=Nd(f),{component:m="div",direction:y="column",spacing:b=0,divider:g,children:x,className:w,useFlexGap:E=!1,...T}=p,C={direction:y,spacing:b,useFlexGap:E},k=o();return v.jsx(i,{as:m,ownerState:C,ref:u,className:me(k.root,w),...T,children:g?H$(x,g):x})});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:l.node,direction:l.oneOfType([l.oneOf(["column-reverse","column","row-reverse","row"]),l.arrayOf(l.oneOf(["column-reverse","column","row-reverse","row"])),l.object]),divider:l.node,spacing:l.oneOfType([l.arrayOf(l.oneOfType([l.number,l.string])),l.number,l.object,l.string]),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])}),s}const Sc={black:"#000",white:"#fff"},q$={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"},nl={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},rl={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},wc={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ol={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},il={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},sl={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function yS(){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:Sc.white,default:Sc.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 K$=yS();function bS(){return{text:{primary:Sc.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:Sc.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 vS=bS();function xS(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=Qa(t.main,o):e==="dark"&&(t.dark=Xs(t.main,i)))}function Y$(t="light"){return t==="dark"?{main:ol[200],light:ol[50],dark:ol[400]}:{main:ol[700],light:ol[400],dark:ol[800]}}function G$(t="light"){return t==="dark"?{main:nl[200],light:nl[50],dark:nl[400]}:{main:nl[500],light:nl[300],dark:nl[700]}}function J$(t="light"){return t==="dark"?{main:rl[500],light:rl[300],dark:rl[700]}:{main:rl[700],light:rl[400],dark:rl[800]}}function X$(t="light"){return t==="dark"?{main:il[400],light:il[300],dark:il[700]}:{main:il[700],light:il[500],dark:il[900]}}function Z$(t="light"){return t==="dark"?{main:sl[400],light:sl[300],dark:sl[700]}:{main:sl[800],light:sl[500],dark:sl[900]}}function Q$(t="light"){return t==="dark"?{main:wc[400],light:wc[300],dark:wc[700]}:{main:"#ed6c02",light:wc[500],dark:wc[900]}}function pg(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=t,i=t.primary||Y$(e),s=t.secondary||G$(e),a=t.error||J$(e),c=t.info||X$(e),u=t.success||Z$(e),f=t.warning||Q$(e);function p(g){const x=fS(g,vS.text.primary)>=n?vS.text.primary:K$.text.primary;if(process.env.NODE_ENV!=="production"){const w=fS(g,x);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${x} on ${g}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
57
|
-
`))}return x}const m=({color:g,name:x,mainShade:w=500,lightShade:E=300,darkShade:T=700})=>{if(g={...g},!g.main&&g[w]&&(g.main=g[w]),!g.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
|
|
58
|
-
The color object needs to have a \`main\` property or a \`${w}\` property.`:Yo(11,x?` (${x})`:"",w));if(typeof g.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
|
|
59
|
-
\`color.main\` should be a string, but \`${JSON.stringify(g.main)}\` was provided instead.
|
|
60
|
-
|
|
61
|
-
Did you intend to use one of the following approaches?
|
|
62
|
-
|
|
63
|
-
import { green } from "@mui/material/colors";
|
|
64
|
-
|
|
65
|
-
const theme1 = createTheme({ palette: {
|
|
66
|
-
primary: green,
|
|
67
|
-
} });
|
|
68
|
-
|
|
69
|
-
const theme2 = createTheme({ palette: {
|
|
70
|
-
primary: { main: green[500] },
|
|
71
|
-
} });`:Yo(12,x?` (${x})`:"",JSON.stringify(g.main)));return xS(g,"light",E,r),xS(g,"dark",T,r),g.contrastText||(g.contrastText=p(g.main)),g};let y;return e==="light"?y=yS():e==="dark"&&(y=bS()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${e}\` is not supported.`)),Hn({common:{...Sc},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:c,name:"info"}),success:m({color:u,name:"success"}),grey:q$,contrastThreshold:n,getContrastText:p,augmentColor:m,tonalOffset:r,...y},o)}function eL(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 tL(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function nL(t){return Math.round(t*1e5)/1e5}const SS={textTransform:"uppercase"},wS='"Roboto", "Helvetica", "Arial", sans-serif';function rL(t,e){const{fontFamily:n=wS,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:s=500,fontWeightBold:a=700,htmlFontSize:c=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 c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const m=r/14,y=f||(x=>`${x/c*m}rem`),b=(x,w,E,T,C)=>({fontFamily:n,fontWeight:x,fontSize:y(w),lineHeight:E,...n===wS?{letterSpacing:`${nL(T/w)}em`}:{},...C,...u}),g={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,SS),caption:b(i,12,1.66,.4),overline:b(i,12,2.66,1,SS),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Hn({htmlFontSize:c,pxToRem:y,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:s,fontWeightBold:a,...g},p,{clone:!1})}const oL=.2,iL=.14,sL=.12;function an(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${oL})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${iL})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${sL})`].join(",")}const aL=["none",an(0,2,1,-1,0,1,1,0,0,1,3,0),an(0,3,1,-2,0,2,2,0,0,1,5,0),an(0,3,3,-2,0,3,4,0,0,1,8,0),an(0,2,4,-1,0,4,5,0,0,1,10,0),an(0,3,5,-1,0,5,8,0,0,1,14,0),an(0,3,5,-1,0,6,10,0,0,1,18,0),an(0,4,5,-2,0,7,10,1,0,2,16,1),an(0,5,5,-3,0,8,10,1,0,3,14,2),an(0,5,6,-3,0,9,12,1,0,3,16,2),an(0,6,6,-3,0,10,14,1,0,4,18,3),an(0,6,7,-4,0,11,15,1,0,4,20,3),an(0,7,8,-4,0,12,17,2,0,5,22,4),an(0,7,8,-4,0,13,19,2,0,5,24,4),an(0,7,9,-4,0,14,21,2,0,5,26,4),an(0,8,9,-5,0,15,22,2,0,6,28,5),an(0,8,10,-5,0,16,24,2,0,6,30,5),an(0,8,11,-5,0,17,26,2,0,6,32,5),an(0,9,11,-5,0,18,28,2,0,7,34,6),an(0,9,12,-6,0,19,29,2,0,7,36,6),an(0,10,13,-6,0,20,31,3,0,8,38,7),an(0,10,13,-6,0,21,33,3,0,8,40,7),an(0,10,14,-6,0,22,35,3,0,8,42,7),an(0,11,14,-7,0,23,36,3,0,9,44,8),an(0,11,15,-7,0,24,38,3,0,9,46,8)],lL={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)"},CS={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function TS(t){return`${Math.round(t)}ms`}function cL(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function uL(t){const e={...lL,...t.easing},n={...CS,...t.duration};return{getAutoHeightDuration:cL,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:c=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(c)&&!f(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
72
|
-
`)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(f=>`${f} ${typeof s=="string"?s:TS(s)} ${a} ${typeof c=="string"?c:TS(c)}`).join(",")},...t,easing:e,duration:n}}const dL={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function fL(t){return Ko(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function kS(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];!fL(a)||s.startsWith("unstable_")?delete r[s]:Ko(a)&&(r[s]={...a},n(r[s]))}}return n(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
73
|
-
|
|
74
|
-
const theme = ${JSON.stringify(e,null,2)};
|
|
75
|
-
|
|
76
|
-
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
77
|
-
theme.transitions = createTransitions(theme.transitions || {});
|
|
78
|
-
|
|
79
|
-
export default theme;`}function hg(t={},...e){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:s={},typography:a={},shape:c,...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.":Yo(20));const f=pg(i),p=bc(t);let m=Hn(p,{mixins:tL(p.breakpoints,r),palette:f,shadows:aL.slice(),typography:rL(f,a),transitions:uL(s),zIndex:{...dL}});if(m=Hn(m,u),m=e.reduce((y,b)=>Hn(y,b),m),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(g,x)=>{let w;for(w in g){const E=g[w];if(y.includes(w)&&Object.keys(E).length>0){if(process.env.NODE_ENV!=="production"){const T=Qe("",w);console.error([`MUI: The \`${x}\` component increases the CSS specificity of the \`${w}\` internal state.`,"You can not override it like this: ",JSON.stringify(g,null,2),"",`Instead, you need to use the '&.${T}' syntax:`,JSON.stringify({root:{[`&.${T}`]:E}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
80
|
-
`))}g[w]={}}}};Object.keys(m.components).forEach(g=>{const x=m.components[g].styleOverrides;x&&g.startsWith("Mui")&&b(x,g)})}return m.unstable_sxConfig={...yc,...u==null?void 0:u.unstable_sxConfig},m.unstable_sx=function(b){return Gs({sx:b,theme:this})},m.toRuntimeSource=kS,m}function mg(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 pL=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=mg(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function ES(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function _S(t){return t==="dark"?pL:[]}function hL(t){const{palette:e={mode:"light"},opacity:n,overlays:r,...o}=t,i=pg(e);return{palette:i,opacity:{...ES(i.mode),...n},overlays:r||_S(i.mode),...o}}function mL(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 gL=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],yL=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 gL(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 bL(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function we(t,e,n){!t[e]&&n&&(t[e]=n)}function Cc(t){return typeof t!="string"||!t.startsWith("hsl")?t:dS(t)}function wi(t,e){`${e}Channel`in t||(t[`${e}Channel`]=xc(Cc(t[e]),`MUI: Can't create \`palette.${e}Channel\` because \`palette.${e}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
81
|
-
To suppress this warning, you need to explicitly provide the \`palette.${e}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function vL(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const Jo=t=>{try{return t()}catch{}},xL=(t="mui")=>y$(t);function gg(t,e,n,r){if(!e)return;e=e===!0?{}:e;const o=r==="dark"?"dark":"light";if(!n){t[r]=hL({...e,palette:{mode:o,...e==null?void 0:e.palette}});return}const{palette:i,...s}=hg({...n,palette:{mode:o,...e==null?void 0:e.palette}});return t[r]={...e,palette:i,opacity:{...ES(o),...e==null?void 0:e.opacity},overlays:(e==null?void 0:e.overlays)||_S(o)},s}function SL(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:s=mL,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=t,f=Object.keys(n)[0],p=r||(n.light&&f!=="light"?"light":f),m=xL(i),{[p]:y,light:b,dark:g,...x}=n,w={...x};let E=y;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(E=!0),!E)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Yo(21,p));const T=gg(w,E,u,p);b&&!w.light&&gg(w,b,void 0,"light"),g&&!w.dark&&gg(w,g,void 0,"dark");let C={defaultColorScheme:p,...T,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:c,getCssVar:m,colorSchemes:w,font:{...eL(T.typography),...T.font},spacing:vL(u.spacing)};Object.keys(C.colorSchemes).forEach(L=>{const O=C.colorSchemes[L].palette,N=$=>{const V=$.split("-"),z=V[1],F=V[2];return m($,O[z][F])};if(O.mode==="light"&&(we(O.common,"background","#fff"),we(O.common,"onBackground","#000")),O.mode==="dark"&&(we(O.common,"background","#000"),we(O.common,"onBackground","#fff")),bL(O,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),O.mode==="light"){we(O.Alert,"errorColor",Kt(O.error.light,.6)),we(O.Alert,"infoColor",Kt(O.info.light,.6)),we(O.Alert,"successColor",Kt(O.success.light,.6)),we(O.Alert,"warningColor",Kt(O.warning.light,.6)),we(O.Alert,"errorFilledBg",N("palette-error-main")),we(O.Alert,"infoFilledBg",N("palette-info-main")),we(O.Alert,"successFilledBg",N("palette-success-main")),we(O.Alert,"warningFilledBg",N("palette-warning-main")),we(O.Alert,"errorFilledColor",Jo(()=>O.getContrastText(O.error.main))),we(O.Alert,"infoFilledColor",Jo(()=>O.getContrastText(O.info.main))),we(O.Alert,"successFilledColor",Jo(()=>O.getContrastText(O.success.main))),we(O.Alert,"warningFilledColor",Jo(()=>O.getContrastText(O.warning.main))),we(O.Alert,"errorStandardBg",Yt(O.error.light,.9)),we(O.Alert,"infoStandardBg",Yt(O.info.light,.9)),we(O.Alert,"successStandardBg",Yt(O.success.light,.9)),we(O.Alert,"warningStandardBg",Yt(O.warning.light,.9)),we(O.Alert,"errorIconColor",N("palette-error-main")),we(O.Alert,"infoIconColor",N("palette-info-main")),we(O.Alert,"successIconColor",N("palette-success-main")),we(O.Alert,"warningIconColor",N("palette-warning-main")),we(O.AppBar,"defaultBg",N("palette-grey-100")),we(O.Avatar,"defaultBg",N("palette-grey-400")),we(O.Button,"inheritContainedBg",N("palette-grey-300")),we(O.Button,"inheritContainedHoverBg",N("palette-grey-A100")),we(O.Chip,"defaultBorder",N("palette-grey-400")),we(O.Chip,"defaultAvatarColor",N("palette-grey-700")),we(O.Chip,"defaultIconColor",N("palette-grey-700")),we(O.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),we(O.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),we(O.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),we(O.LinearProgress,"primaryBg",Yt(O.primary.main,.62)),we(O.LinearProgress,"secondaryBg",Yt(O.secondary.main,.62)),we(O.LinearProgress,"errorBg",Yt(O.error.main,.62)),we(O.LinearProgress,"infoBg",Yt(O.info.main,.62)),we(O.LinearProgress,"successBg",Yt(O.success.main,.62)),we(O.LinearProgress,"warningBg",Yt(O.warning.main,.62)),we(O.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.11)`),we(O.Slider,"primaryTrack",Yt(O.primary.main,.62)),we(O.Slider,"secondaryTrack",Yt(O.secondary.main,.62)),we(O.Slider,"errorTrack",Yt(O.error.main,.62)),we(O.Slider,"infoTrack",Yt(O.info.main,.62)),we(O.Slider,"successTrack",Yt(O.success.main,.62)),we(O.Slider,"warningTrack",Yt(O.warning.main,.62));const $=Bd(O.background.default,.8);we(O.SnackbarContent,"bg",$),we(O.SnackbarContent,"color",Jo(()=>O.getContrastText($))),we(O.SpeedDialAction,"fabHoverBg",Bd(O.background.paper,.15)),we(O.StepConnector,"border",N("palette-grey-400")),we(O.StepContent,"border",N("palette-grey-400")),we(O.Switch,"defaultColor",N("palette-common-white")),we(O.Switch,"defaultDisabledColor",N("palette-grey-100")),we(O.Switch,"primaryDisabledColor",Yt(O.primary.main,.62)),we(O.Switch,"secondaryDisabledColor",Yt(O.secondary.main,.62)),we(O.Switch,"errorDisabledColor",Yt(O.error.main,.62)),we(O.Switch,"infoDisabledColor",Yt(O.info.main,.62)),we(O.Switch,"successDisabledColor",Yt(O.success.main,.62)),we(O.Switch,"warningDisabledColor",Yt(O.warning.main,.62)),we(O.TableCell,"border",Yt(Rd(O.divider,1),.88)),we(O.Tooltip,"bg",Rd(O.grey[700],.92))}if(O.mode==="dark"){we(O.Alert,"errorColor",Yt(O.error.light,.6)),we(O.Alert,"infoColor",Yt(O.info.light,.6)),we(O.Alert,"successColor",Yt(O.success.light,.6)),we(O.Alert,"warningColor",Yt(O.warning.light,.6)),we(O.Alert,"errorFilledBg",N("palette-error-dark")),we(O.Alert,"infoFilledBg",N("palette-info-dark")),we(O.Alert,"successFilledBg",N("palette-success-dark")),we(O.Alert,"warningFilledBg",N("palette-warning-dark")),we(O.Alert,"errorFilledColor",Jo(()=>O.getContrastText(O.error.dark))),we(O.Alert,"infoFilledColor",Jo(()=>O.getContrastText(O.info.dark))),we(O.Alert,"successFilledColor",Jo(()=>O.getContrastText(O.success.dark))),we(O.Alert,"warningFilledColor",Jo(()=>O.getContrastText(O.warning.dark))),we(O.Alert,"errorStandardBg",Kt(O.error.light,.9)),we(O.Alert,"infoStandardBg",Kt(O.info.light,.9)),we(O.Alert,"successStandardBg",Kt(O.success.light,.9)),we(O.Alert,"warningStandardBg",Kt(O.warning.light,.9)),we(O.Alert,"errorIconColor",N("palette-error-main")),we(O.Alert,"infoIconColor",N("palette-info-main")),we(O.Alert,"successIconColor",N("palette-success-main")),we(O.Alert,"warningIconColor",N("palette-warning-main")),we(O.AppBar,"defaultBg",N("palette-grey-900")),we(O.AppBar,"darkBg",N("palette-background-paper")),we(O.AppBar,"darkColor",N("palette-text-primary")),we(O.Avatar,"defaultBg",N("palette-grey-600")),we(O.Button,"inheritContainedBg",N("palette-grey-800")),we(O.Button,"inheritContainedHoverBg",N("palette-grey-700")),we(O.Chip,"defaultBorder",N("palette-grey-700")),we(O.Chip,"defaultAvatarColor",N("palette-grey-300")),we(O.Chip,"defaultIconColor",N("palette-grey-300")),we(O.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),we(O.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),we(O.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),we(O.LinearProgress,"primaryBg",Kt(O.primary.main,.5)),we(O.LinearProgress,"secondaryBg",Kt(O.secondary.main,.5)),we(O.LinearProgress,"errorBg",Kt(O.error.main,.5)),we(O.LinearProgress,"infoBg",Kt(O.info.main,.5)),we(O.LinearProgress,"successBg",Kt(O.success.main,.5)),we(O.LinearProgress,"warningBg",Kt(O.warning.main,.5)),we(O.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.13)`),we(O.Slider,"primaryTrack",Kt(O.primary.main,.5)),we(O.Slider,"secondaryTrack",Kt(O.secondary.main,.5)),we(O.Slider,"errorTrack",Kt(O.error.main,.5)),we(O.Slider,"infoTrack",Kt(O.info.main,.5)),we(O.Slider,"successTrack",Kt(O.success.main,.5)),we(O.Slider,"warningTrack",Kt(O.warning.main,.5));const $=Bd(O.background.default,.98);we(O.SnackbarContent,"bg",$),we(O.SnackbarContent,"color",Jo(()=>O.getContrastText($))),we(O.SpeedDialAction,"fabHoverBg",Bd(O.background.paper,.15)),we(O.StepConnector,"border",N("palette-grey-600")),we(O.StepContent,"border",N("palette-grey-600")),we(O.Switch,"defaultColor",N("palette-grey-300")),we(O.Switch,"defaultDisabledColor",N("palette-grey-600")),we(O.Switch,"primaryDisabledColor",Kt(O.primary.main,.55)),we(O.Switch,"secondaryDisabledColor",Kt(O.secondary.main,.55)),we(O.Switch,"errorDisabledColor",Kt(O.error.main,.55)),we(O.Switch,"infoDisabledColor",Kt(O.info.main,.55)),we(O.Switch,"successDisabledColor",Kt(O.success.main,.55)),we(O.Switch,"warningDisabledColor",Kt(O.warning.main,.55)),we(O.TableCell,"border",Kt(Rd(O.divider,1),.68)),we(O.Tooltip,"bg",Rd(O.grey[700],.92))}wi(O.background,"default"),wi(O.background,"paper"),wi(O.common,"background"),wi(O.common,"onBackground"),wi(O,"divider"),Object.keys(O).forEach($=>{const V=O[$];$!=="tonalOffset"&&V&&typeof V=="object"&&(V.main&&we(O[$],"mainChannel",xc(Cc(V.main))),V.light&&we(O[$],"lightChannel",xc(Cc(V.light))),V.dark&&we(O[$],"darkChannel",xc(Cc(V.dark))),V.contrastText&&we(O[$],"contrastTextChannel",xc(Cc(V.contrastText))),$==="text"&&(wi(O[$],"primary"),wi(O[$],"secondary")),$==="action"&&(V.active&&wi(O[$],"active"),V.selected&&wi(O[$],"selected")))})}),C=e.reduce((L,O)=>Hn(L,O),C);const k={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:yL(C)},{vars:M,generateThemeVars:A,generateStyleSheets:I}=x$(C,k);return C.vars=M,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([L,O])=>{C[L]=O}),C.generateThemeVars=A,C.generateStyleSheets=I,C.generateSpacing=function(){return eS(u.spacing,Od(this))},C.getColorSchemeSelector=S$(a),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...yc,...u==null?void 0:u.unstable_sxConfig},C.unstable_sx=function(O){return Gs({sx:O,theme:this})},C.toRuntimeSource=kS,C}function OS(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:pg({...n===!0?{}:n.palette,mode:e})})}function MS(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",c=o==null?void 0:o[a],u={...o,...n?{[a]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in t))return hg(t,...e);let f=n;"palette"in t||u[a]&&(u[a]!==!0?f=u[a].palette:a==="dark"&&(f={mode:"dark"}));const p=hg({...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},OS(p,"dark",u.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:p.palette},OS(p,"light",u.light)),p}return!n&&!("light"in u)&&a==="light"&&(u.light=!0),SL({...s,colorSchemes:u,defaultColorScheme:a,...typeof r!="boolean"&&r},...e)}const Hd=MS(),al="$$material";function ro(){const t=vc(Hd);return process.env.NODE_ENV!=="production"&&D.useDebugValue(t),t[al]||t}function AS(t){return v.jsx(nS,{...t,defaultTheme:Hd,themeId:al})}process.env.NODE_ENV!=="production"&&(AS.propTypes={styles:l.oneOfType([l.array,l.func,l.number,l.object,l.string,l.bool])});function DS(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const oo=t=>DS(t)&&t!=="classes",re=iS({themeId:al,defaultTheme:Hd,rootShouldForwardProp:oo});function wL(t){return function(n){return v.jsx(AS,{styles:typeof t=="function"?r=>t({theme:r,...n}):t})}}function CL(){return Nd}const Tt=g$;process.env.NODE_ENV!=="production"&&(l.node,l.object.isRequired);function vt(t){return m$(t)}function TL(t){return Qe("MuiSvgIcon",t)}const IS=Ge("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]),kL=t=>{const{color:e,fontSize:n,classes:r}=t,o={root:["root",e!=="inherit"&&`color${$e(e)}`,`fontSize${$e(n)}`]};return Ze(o,TL,r)},EL=re("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${$e(n.color)}`],e[`fontSize${$e(n.fontSize)}`]]}})(Tt(({theme:t})=>{var e,n,r,o,i,s,a,c,u,f,p,m,y,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:g=>!g.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:((c=(a=t.typography)==null?void 0:a.pxToRem)==null?void 0:c.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(([,g])=>g&&g.main).map(([g])=>{var x,w;return{props:{color:g},style:{color:(w=(x=(t.vars??t).palette)==null?void 0:x[g])==null?void 0:w.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=(y=(t.vars??t).palette)==null?void 0:y.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Wd=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiSvgIcon"}),{children:o,className:i,color:s="inherit",component:a="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:p,viewBox:m="0 0 24 24",...y}=r,b=D.isValidElement(o)&&o.type==="svg",g={...r,color:s,component:a,fontSize:c,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:b},x={};f||(x.viewBox=m);const w=kL(g);return v.jsxs(EL,{as:a,className:me(w.root,i),focusable:"false",color:u,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:n,...x,...y,...b&&o.props,ownerState:g,children:[b?o.props.children:o,p?v.jsx("title",{children:p}):null]})});process.env.NODE_ENV!=="production"&&(Wd.propTypes={children:l.node,classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),l.string]),component:l.elementType,fontSize:l.oneOfType([l.oneOf(["inherit","large","medium","small"]),l.string]),htmlColor:l.string,inheritViewBox:l.bool,shapeRendering:l.string,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),titleAccess:l.string,viewBox:l.string}),Wd.muiName="SvgIcon";function Be(t,e){function n(r,o){return v.jsx(Wd,{"data-testid":`${e}Icon`,ref:o,...r,children:t})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${e}Icon`),n.muiName=Wd.muiName,D.memo(D.forwardRef(n))}function _L(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=me(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=me(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 PS=Be(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"),io=t=>{var i;const{name:e,id:n,className:r}=t,{formState:{errors:o}}=dn();return v.jsxs(j.Typography,{id:n,variant:"caption",display:"block",color:"error",style:{visibility:o[e]?"visible":"hidden"},className:r,fontSize:".9rem",children:[v.jsx(j.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",position:"relative",top:"3px",mr:.5},children:v.jsx(PS,{fontSize:"inherit"})}),`${(i=o[e])==null?void 0:i.message}`]})},NS=t=>{const{name:e,label:n=ar(e),options:r=[],filterSelectedOptions:o=!0,variant:i="outlined",staticLabel:s=!1,staticLabelProps:a={fontSize:".9em",color:"#808080"},readOnly:c,margin:u="dense",fullWidth:f=!0,required:p,onChange:m,clearOnSelect:y=!1,onInputChange:b,getOptionLabel:g=I=>typeof I=="string"?I:String(I),isOptionEqualToValue:x=(I,L)=>JSON.stringify(I)===JSON.stringify(L),useFieldAsValue:w,...E}=t,{formState:{errors:T},control:C}=dn(),[k,M]=D.useState(""),A=I=>{if(!I)return"";if(w){const L=r.find(O=>O[w]===I);return L?g(L):""}return g(I)};return v.jsx(ir,{name:e,control:C,render:({field:I})=>{const L=w?r.find(N=>N[w]===I.value)||null:I.value??null,O={...eo(E,["useFieldAsValue"]),getOptionLabel:g,options:r,filterSelectedOptions:o,isOptionEqualToValue:x,renderInput:N=>v.jsx(j.TextField,{...N,variant:i,label:s?void 0:n,error:!!T[e],required:p}),onChange:(N,$,V,z)=>{y?(M(""),I.onChange(null)):w?I.onChange($?$[w]:null):I.onChange($),m&&m(N,$,V,z)},onInputChange:(N,$,V)=>{M($),b&&b(N,$,V)},fullWidth:!0,inputValue:k,value:L,slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}};return v.jsxs(j.FormControl,{margin:u,fullWidth:f,required:p,children:[(s||c)&&v.jsx(j.Typography,{...a,children:n}),c?v.jsx(j.Typography,{children:A(I.value)}):v.jsxs(j.Box,{children:[v.jsx(j.Autocomplete,{...O}),v.jsx(io,{name:e,id:`${e}-err`})]})]})}})};var Tc={exports:{}};/**
|
|
82
|
-
* @license
|
|
83
|
-
* Lodash <https://lodash.com/>
|
|
84
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
85
|
-
* Released under MIT license <https://lodash.com/license>
|
|
86
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
87
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
88
|
-
*/var OL=Tc.exports,$S;function ML(){return $S||($S=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`",c="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",p=1,m=2,y=4,b=1,g=2,x=1,w=2,E=4,T=8,C=16,k=32,M=64,A=128,I=256,L=512,O=30,N="...",$=800,V=16,z=1,F=2,B=3,W=1/0,Y=9007199254740991,X=17976931348623157e292,K=NaN,Q=4294967295,ve=Q-1,xe=Q>>>1,ye=[["ary",A],["bind",x],["bindKey",w],["curry",T],["curryRight",C],["flip",L],["partial",k],["partialRight",M],["rearg",I]],oe="[object Arguments]",ce="[object Array]",fe="[object AsyncFunction]",q="[object Boolean]",ee="[object Date]",se="[object DOMException]",be="[object Error]",ne="[object Function]",le="[object GeneratorFunction]",pe="[object Map]",Oe="[object Number]",ke="[object Null]",Fe="[object Object]",Ie="[object Promise]",Ke="[object Proxy]",Xe="[object RegExp]",U="[object Set]",Z="[object String]",he="[object Symbol]",Ne="[object Undefined]",Pe="[object WeakMap]",Ae="[object WeakSet]",ze="[object ArrayBuffer]",st="[object DataView]",pt="[object Float32Array]",Vt="[object Float64Array]",rt="[object Int8Array]",Wt="[object Int16Array]",Qt="[object Int32Array]",ge="[object Uint8Array]",We="[object Uint8ClampedArray]",_e="[object Uint16Array]",je="[object Uint32Array]",et=/\b__p \+= '';/g,it=/\b(__p \+=) '' \+/g,zt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tr=/&(?:amp|lt|gt|quot|#39);/g,fr=/[&<>"']/g,zo=RegExp(tr.source),Na=RegExp(fr.source),Ps=/<%-([\s\S]+?)%>/g,fi=/<%([\s\S]+?)%>/g,ht=/<%=([\s\S]+?)%>/g,nr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ui=/^\w*$/,$ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bv=/[\\^$.*+?()[\]{}|]/g,Lee=RegExp(bv.source),vv=/^\s+/,Fee=/\s/,Ree=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bee=/\{\n\/\* \[wrapped with (.+)\] \*/,Vee=/,? & /,zee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Hee=/[()=,{}\[\]\/\s]/,Wee=/\\(\\)?/g,jee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,y2=/\w*$/,Uee=/^[-+]0x[0-9a-f]+$/i,qee=/^0b[01]+$/i,Kee=/^\[object .+?Constructor\]$/,Yee=/^0o[0-7]+$/i,Gee=/^(?:0|[1-9]\d*)$/,Jee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Bh=/($^)/,Xee=/['\n\r\u2028\u2029\\]/g,Vh="\\ud800-\\udfff",Zee="\\u0300-\\u036f",Qee="\\ufe20-\\ufe2f",ete="\\u20d0-\\u20ff",b2=Zee+Qee+ete,v2="\\u2700-\\u27bf",x2="a-z\\xdf-\\xf6\\xf8-\\xff",tte="\\xac\\xb1\\xd7\\xf7",nte="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rte="\\u2000-\\u206f",ote=" \\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",S2="A-Z\\xc0-\\xd6\\xd8-\\xde",w2="\\ufe0e\\ufe0f",C2=tte+nte+rte+ote,xv="['’]",ite="["+Vh+"]",T2="["+C2+"]",zh="["+b2+"]",k2="\\d+",ste="["+v2+"]",E2="["+x2+"]",_2="[^"+Vh+C2+k2+v2+x2+S2+"]",Sv="\\ud83c[\\udffb-\\udfff]",ate="(?:"+zh+"|"+Sv+")",O2="[^"+Vh+"]",wv="(?:\\ud83c[\\udde6-\\uddff]){2}",Cv="[\\ud800-\\udbff][\\udc00-\\udfff]",Xl="["+S2+"]",M2="\\u200d",A2="(?:"+E2+"|"+_2+")",lte="(?:"+Xl+"|"+_2+")",D2="(?:"+xv+"(?:d|ll|m|re|s|t|ve))?",I2="(?:"+xv+"(?:D|LL|M|RE|S|T|VE))?",P2=ate+"?",N2="["+w2+"]?",cte="(?:"+M2+"(?:"+[O2,wv,Cv].join("|")+")"+N2+P2+")*",ute="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",dte="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$2=N2+P2+cte,fte="(?:"+[ste,wv,Cv].join("|")+")"+$2,pte="(?:"+[O2+zh+"?",zh,wv,Cv,ite].join("|")+")",hte=RegExp(xv,"g"),mte=RegExp(zh,"g"),Tv=RegExp(Sv+"(?="+Sv+")|"+pte+$2,"g"),gte=RegExp([Xl+"?"+E2+"+"+D2+"(?="+[T2,Xl,"$"].join("|")+")",lte+"+"+I2+"(?="+[T2,Xl+A2,"$"].join("|")+")",Xl+"?"+A2+"+"+D2,Xl+"+"+I2,dte,ute,k2,fte].join("|"),"g"),yte=RegExp("["+M2+Vh+b2+w2+"]"),bte=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vte=["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"],xte=-1,sn={};sn[pt]=sn[Vt]=sn[rt]=sn[Wt]=sn[Qt]=sn[ge]=sn[We]=sn[_e]=sn[je]=!0,sn[oe]=sn[ce]=sn[ze]=sn[q]=sn[st]=sn[ee]=sn[be]=sn[ne]=sn[pe]=sn[Oe]=sn[Fe]=sn[Xe]=sn[U]=sn[Z]=sn[Pe]=!1;var en={};en[oe]=en[ce]=en[ze]=en[st]=en[q]=en[ee]=en[pt]=en[Vt]=en[rt]=en[Wt]=en[Qt]=en[pe]=en[Oe]=en[Fe]=en[Xe]=en[U]=en[Z]=en[he]=en[ge]=en[We]=en[_e]=en[je]=!0,en[be]=en[ne]=en[Pe]=!1;var Ste={À:"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"},wte={"&":"&","<":"<",">":">",'"':""","'":"'"},Cte={"&":"&","<":"<",">":">",""":'"',"'":"'"},Tte={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kte=parseFloat,Ete=parseInt,L2=typeof bd=="object"&&bd&&bd.Object===Object&&bd,_te=typeof self=="object"&&self&&self.Object===Object&&self,rr=L2||_te||Function("return this")(),kv=e&&!e.nodeType&&e,$a=kv&&!0&&t&&!t.nodeType&&t,F2=$a&&$a.exports===kv,Ev=F2&&L2.process,To=(function(){try{var ae=$a&&$a.require&&$a.require("util").types;return ae||Ev&&Ev.binding&&Ev.binding("util")}catch{}})(),R2=To&&To.isArrayBuffer,B2=To&&To.isDate,V2=To&&To.isMap,z2=To&&To.isRegExp,H2=To&&To.isSet,W2=To&&To.isTypedArray;function Kr(ae,Ce,Se){switch(Se.length){case 0:return ae.call(Ce);case 1:return ae.call(Ce,Se[0]);case 2:return ae.call(Ce,Se[0],Se[1]);case 3:return ae.call(Ce,Se[0],Se[1],Se[2])}return ae.apply(Ce,Se)}function Ote(ae,Ce,Se,Ye){for(var gt=-1,Ft=ae==null?0:ae.length;++gt<Ft;){var Vn=ae[gt];Ce(Ye,Vn,Se(Vn),ae)}return Ye}function ko(ae,Ce){for(var Se=-1,Ye=ae==null?0:ae.length;++Se<Ye&&Ce(ae[Se],Se,ae)!==!1;);return ae}function Mte(ae,Ce){for(var Se=ae==null?0:ae.length;Se--&&Ce(ae[Se],Se,ae)!==!1;);return ae}function j2(ae,Ce){for(var Se=-1,Ye=ae==null?0:ae.length;++Se<Ye;)if(!Ce(ae[Se],Se,ae))return!1;return!0}function Ns(ae,Ce){for(var Se=-1,Ye=ae==null?0:ae.length,gt=0,Ft=[];++Se<Ye;){var Vn=ae[Se];Ce(Vn,Se,ae)&&(Ft[gt++]=Vn)}return Ft}function Hh(ae,Ce){var Se=ae==null?0:ae.length;return!!Se&&Zl(ae,Ce,0)>-1}function _v(ae,Ce,Se){for(var Ye=-1,gt=ae==null?0:ae.length;++Ye<gt;)if(Se(Ce,ae[Ye]))return!0;return!1}function un(ae,Ce){for(var Se=-1,Ye=ae==null?0:ae.length,gt=Array(Ye);++Se<Ye;)gt[Se]=Ce(ae[Se],Se,ae);return gt}function $s(ae,Ce){for(var Se=-1,Ye=Ce.length,gt=ae.length;++Se<Ye;)ae[gt+Se]=Ce[Se];return ae}function Ov(ae,Ce,Se,Ye){var gt=-1,Ft=ae==null?0:ae.length;for(Ye&&Ft&&(Se=ae[++gt]);++gt<Ft;)Se=Ce(Se,ae[gt],gt,ae);return Se}function Ate(ae,Ce,Se,Ye){var gt=ae==null?0:ae.length;for(Ye&>&&(Se=ae[--gt]);gt--;)Se=Ce(Se,ae[gt],gt,ae);return Se}function Mv(ae,Ce){for(var Se=-1,Ye=ae==null?0:ae.length;++Se<Ye;)if(Ce(ae[Se],Se,ae))return!0;return!1}var Dte=Av("length");function Ite(ae){return ae.split("")}function Pte(ae){return ae.match(zee)||[]}function U2(ae,Ce,Se){var Ye;return Se(ae,function(gt,Ft,Vn){if(Ce(gt,Ft,Vn))return Ye=Ft,!1}),Ye}function Wh(ae,Ce,Se,Ye){for(var gt=ae.length,Ft=Se+(Ye?1:-1);Ye?Ft--:++Ft<gt;)if(Ce(ae[Ft],Ft,ae))return Ft;return-1}function Zl(ae,Ce,Se){return Ce===Ce?Ute(ae,Ce,Se):Wh(ae,q2,Se)}function Nte(ae,Ce,Se,Ye){for(var gt=Se-1,Ft=ae.length;++gt<Ft;)if(Ye(ae[gt],Ce))return gt;return-1}function q2(ae){return ae!==ae}function K2(ae,Ce){var Se=ae==null?0:ae.length;return Se?Iv(ae,Ce)/Se:K}function Av(ae){return function(Ce){return Ce==null?n:Ce[ae]}}function Dv(ae){return function(Ce){return ae==null?n:ae[Ce]}}function Y2(ae,Ce,Se,Ye,gt){return gt(ae,function(Ft,Vn,Jt){Se=Ye?(Ye=!1,Ft):Ce(Se,Ft,Vn,Jt)}),Se}function $te(ae,Ce){var Se=ae.length;for(ae.sort(Ce);Se--;)ae[Se]=ae[Se].value;return ae}function Iv(ae,Ce){for(var Se,Ye=-1,gt=ae.length;++Ye<gt;){var Ft=Ce(ae[Ye]);Ft!==n&&(Se=Se===n?Ft:Se+Ft)}return Se}function Pv(ae,Ce){for(var Se=-1,Ye=Array(ae);++Se<ae;)Ye[Se]=Ce(Se);return Ye}function Lte(ae,Ce){return un(Ce,function(Se){return[Se,ae[Se]]})}function G2(ae){return ae&&ae.slice(0,Q2(ae)+1).replace(vv,"")}function Yr(ae){return function(Ce){return ae(Ce)}}function Nv(ae,Ce){return un(Ce,function(Se){return ae[Se]})}function Ju(ae,Ce){return ae.has(Ce)}function J2(ae,Ce){for(var Se=-1,Ye=ae.length;++Se<Ye&&Zl(Ce,ae[Se],0)>-1;);return Se}function X2(ae,Ce){for(var Se=ae.length;Se--&&Zl(Ce,ae[Se],0)>-1;);return Se}function Fte(ae,Ce){for(var Se=ae.length,Ye=0;Se--;)ae[Se]===Ce&&++Ye;return Ye}var Rte=Dv(Ste),Bte=Dv(wte);function Vte(ae){return"\\"+Tte[ae]}function zte(ae,Ce){return ae==null?n:ae[Ce]}function Ql(ae){return yte.test(ae)}function Hte(ae){return bte.test(ae)}function Wte(ae){for(var Ce,Se=[];!(Ce=ae.next()).done;)Se.push(Ce.value);return Se}function $v(ae){var Ce=-1,Se=Array(ae.size);return ae.forEach(function(Ye,gt){Se[++Ce]=[gt,Ye]}),Se}function Z2(ae,Ce){return function(Se){return ae(Ce(Se))}}function Ls(ae,Ce){for(var Se=-1,Ye=ae.length,gt=0,Ft=[];++Se<Ye;){var Vn=ae[Se];(Vn===Ce||Vn===f)&&(ae[Se]=f,Ft[gt++]=Se)}return Ft}function jh(ae){var Ce=-1,Se=Array(ae.size);return ae.forEach(function(Ye){Se[++Ce]=Ye}),Se}function jte(ae){var Ce=-1,Se=Array(ae.size);return ae.forEach(function(Ye){Se[++Ce]=[Ye,Ye]}),Se}function Ute(ae,Ce,Se){for(var Ye=Se-1,gt=ae.length;++Ye<gt;)if(ae[Ye]===Ce)return Ye;return-1}function qte(ae,Ce,Se){for(var Ye=Se+1;Ye--;)if(ae[Ye]===Ce)return Ye;return Ye}function ec(ae){return Ql(ae)?Yte(ae):Dte(ae)}function Ho(ae){return Ql(ae)?Gte(ae):Ite(ae)}function Q2(ae){for(var Ce=ae.length;Ce--&&Fee.test(ae.charAt(Ce)););return Ce}var Kte=Dv(Cte);function Yte(ae){for(var Ce=Tv.lastIndex=0;Tv.test(ae);)++Ce;return Ce}function Gte(ae){return ae.match(Tv)||[]}function Jte(ae){return ae.match(gte)||[]}var Xte=(function ae(Ce){Ce=Ce==null?rr:tc.defaults(rr.Object(),Ce,tc.pick(rr,vte));var Se=Ce.Array,Ye=Ce.Date,gt=Ce.Error,Ft=Ce.Function,Vn=Ce.Math,Jt=Ce.Object,Lv=Ce.RegExp,Zte=Ce.String,Eo=Ce.TypeError,Uh=Se.prototype,Qte=Ft.prototype,nc=Jt.prototype,qh=Ce["__core-js_shared__"],Kh=Qte.toString,jt=nc.hasOwnProperty,ene=0,eD=(function(){var d=/[^.]+$/.exec(qh&&qh.keys&&qh.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""})(),Yh=nc.toString,tne=Kh.call(Jt),nne=rr._,rne=Lv("^"+Kh.call(jt).replace(bv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gh=F2?Ce.Buffer:n,Fs=Ce.Symbol,Jh=Ce.Uint8Array,tD=Gh?Gh.allocUnsafe:n,Xh=Z2(Jt.getPrototypeOf,Jt),nD=Jt.create,rD=nc.propertyIsEnumerable,Zh=Uh.splice,oD=Fs?Fs.isConcatSpreadable:n,Xu=Fs?Fs.iterator:n,La=Fs?Fs.toStringTag:n,Qh=(function(){try{var d=za(Jt,"defineProperty");return d({},"",{}),d}catch{}})(),one=Ce.clearTimeout!==rr.clearTimeout&&Ce.clearTimeout,ine=Ye&&Ye.now!==rr.Date.now&&Ye.now,sne=Ce.setTimeout!==rr.setTimeout&&Ce.setTimeout,em=Vn.ceil,tm=Vn.floor,Fv=Jt.getOwnPropertySymbols,ane=Gh?Gh.isBuffer:n,iD=Ce.isFinite,lne=Uh.join,cne=Z2(Jt.keys,Jt),zn=Vn.max,pr=Vn.min,une=Ye.now,dne=Ce.parseInt,sD=Vn.random,fne=Uh.reverse,Rv=za(Ce,"DataView"),Zu=za(Ce,"Map"),Bv=za(Ce,"Promise"),rc=za(Ce,"Set"),Qu=za(Ce,"WeakMap"),ed=za(Jt,"create"),nm=Qu&&new Qu,oc={},pne=Ha(Rv),hne=Ha(Zu),mne=Ha(Bv),gne=Ha(rc),yne=Ha(Qu),rm=Fs?Fs.prototype:n,td=rm?rm.valueOf:n,aD=rm?rm.toString:n;function R(d){if(Tn(d)&&!yt(d)&&!(d instanceof _t)){if(d instanceof _o)return d;if(jt.call(d,"__wrapped__"))return lI(d)}return new _o(d)}var ic=(function(){function d(){}return function(h){if(!pn(h))return{};if(nD)return nD(h);d.prototype=h;var S=new d;return d.prototype=n,S}})();function om(){}function _o(d,h){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=n}R.templateSettings={escape:Ps,evaluate:fi,interpolate:ht,variable:"",imports:{_:R}},R.prototype=om.prototype,R.prototype.constructor=R,_o.prototype=ic(om.prototype),_o.prototype.constructor=_o;function _t(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Q,this.__views__=[]}function bne(){var d=new _t(this.__wrapped__);return d.__actions__=Ir(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=Ir(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=Ir(this.__views__),d}function vne(){if(this.__filtered__){var d=new _t(this);d.__dir__=-1,d.__filtered__=!0}else d=this.clone(),d.__dir__*=-1;return d}function xne(){var d=this.__wrapped__.value(),h=this.__dir__,S=yt(d),_=h<0,P=S?d.length:0,H=Ire(0,P,this.__views__),G=H.start,te=H.end,ue=te-G,Te=_?te:G-1,Ee=this.__iteratees__,De=Ee.length,Ue=0,tt=pr(ue,this.__takeCount__);if(!S||!_&&P==ue&&tt==ue)return DD(d,this.__actions__);var lt=[];e:for(;ue--&&Ue<tt;){Te+=h;for(var wt=-1,ct=d[Te];++wt<De;){var Et=Ee[wt],Mt=Et.iteratee,Xr=Et.type,Cr=Mt(ct);if(Xr==F)ct=Cr;else if(!Cr){if(Xr==z)continue e;break e}}lt[Ue++]=ct}return lt}_t.prototype=ic(om.prototype),_t.prototype.constructor=_t;function Fa(d){var h=-1,S=d==null?0:d.length;for(this.clear();++h<S;){var _=d[h];this.set(_[0],_[1])}}function Sne(){this.__data__=ed?ed(null):{},this.size=0}function wne(d){var h=this.has(d)&&delete this.__data__[d];return this.size-=h?1:0,h}function Cne(d){var h=this.__data__;if(ed){var S=h[d];return S===c?n:S}return jt.call(h,d)?h[d]:n}function Tne(d){var h=this.__data__;return ed?h[d]!==n:jt.call(h,d)}function kne(d,h){var S=this.__data__;return this.size+=this.has(d)?0:1,S[d]=ed&&h===n?c:h,this}Fa.prototype.clear=Sne,Fa.prototype.delete=wne,Fa.prototype.get=Cne,Fa.prototype.has=Tne,Fa.prototype.set=kne;function qi(d){var h=-1,S=d==null?0:d.length;for(this.clear();++h<S;){var _=d[h];this.set(_[0],_[1])}}function Ene(){this.__data__=[],this.size=0}function _ne(d){var h=this.__data__,S=im(h,d);if(S<0)return!1;var _=h.length-1;return S==_?h.pop():Zh.call(h,S,1),--this.size,!0}function One(d){var h=this.__data__,S=im(h,d);return S<0?n:h[S][1]}function Mne(d){return im(this.__data__,d)>-1}function Ane(d,h){var S=this.__data__,_=im(S,d);return _<0?(++this.size,S.push([d,h])):S[_][1]=h,this}qi.prototype.clear=Ene,qi.prototype.delete=_ne,qi.prototype.get=One,qi.prototype.has=Mne,qi.prototype.set=Ane;function Ki(d){var h=-1,S=d==null?0:d.length;for(this.clear();++h<S;){var _=d[h];this.set(_[0],_[1])}}function Dne(){this.size=0,this.__data__={hash:new Fa,map:new(Zu||qi),string:new Fa}}function Ine(d){var h=ym(this,d).delete(d);return this.size-=h?1:0,h}function Pne(d){return ym(this,d).get(d)}function Nne(d){return ym(this,d).has(d)}function $ne(d,h){var S=ym(this,d),_=S.size;return S.set(d,h),this.size+=S.size==_?0:1,this}Ki.prototype.clear=Dne,Ki.prototype.delete=Ine,Ki.prototype.get=Pne,Ki.prototype.has=Nne,Ki.prototype.set=$ne;function Ra(d){var h=-1,S=d==null?0:d.length;for(this.__data__=new Ki;++h<S;)this.add(d[h])}function Lne(d){return this.__data__.set(d,c),this}function Fne(d){return this.__data__.has(d)}Ra.prototype.add=Ra.prototype.push=Lne,Ra.prototype.has=Fne;function Wo(d){var h=this.__data__=new qi(d);this.size=h.size}function Rne(){this.__data__=new qi,this.size=0}function Bne(d){var h=this.__data__,S=h.delete(d);return this.size=h.size,S}function Vne(d){return this.__data__.get(d)}function zne(d){return this.__data__.has(d)}function Hne(d,h){var S=this.__data__;if(S instanceof qi){var _=S.__data__;if(!Zu||_.length<o-1)return _.push([d,h]),this.size=++S.size,this;S=this.__data__=new Ki(_)}return S.set(d,h),this.size=S.size,this}Wo.prototype.clear=Rne,Wo.prototype.delete=Bne,Wo.prototype.get=Vne,Wo.prototype.has=zne,Wo.prototype.set=Hne;function lD(d,h){var S=yt(d),_=!S&&Wa(d),P=!S&&!_&&Hs(d),H=!S&&!_&&!P&&cc(d),G=S||_||P||H,te=G?Pv(d.length,Zte):[],ue=te.length;for(var Te in d)(h||jt.call(d,Te))&&!(G&&(Te=="length"||P&&(Te=="offset"||Te=="parent")||H&&(Te=="buffer"||Te=="byteLength"||Te=="byteOffset")||Xi(Te,ue)))&&te.push(Te);return te}function cD(d){var h=d.length;return h?d[Jv(0,h-1)]:n}function Wne(d,h){return bm(Ir(d),Ba(h,0,d.length))}function jne(d){return bm(Ir(d))}function Vv(d,h,S){(S!==n&&!jo(d[h],S)||S===n&&!(h in d))&&Yi(d,h,S)}function nd(d,h,S){var _=d[h];(!(jt.call(d,h)&&jo(_,S))||S===n&&!(h in d))&&Yi(d,h,S)}function im(d,h){for(var S=d.length;S--;)if(jo(d[S][0],h))return S;return-1}function Une(d,h,S,_){return Rs(d,function(P,H,G){h(_,P,S(P),G)}),_}function uD(d,h){return d&&hi(h,Gn(h),d)}function qne(d,h){return d&&hi(h,Nr(h),d)}function Yi(d,h,S){h=="__proto__"&&Qh?Qh(d,h,{configurable:!0,enumerable:!0,value:S,writable:!0}):d[h]=S}function zv(d,h){for(var S=-1,_=h.length,P=Se(_),H=d==null;++S<_;)P[S]=H?n:S1(d,h[S]);return P}function Ba(d,h,S){return d===d&&(S!==n&&(d=d<=S?d:S),h!==n&&(d=d>=h?d:h)),d}function Oo(d,h,S,_,P,H){var G,te=h&p,ue=h&m,Te=h&y;if(S&&(G=P?S(d,_,P,H):S(d)),G!==n)return G;if(!pn(d))return d;var Ee=yt(d);if(Ee){if(G=Nre(d),!te)return Ir(d,G)}else{var De=hr(d),Ue=De==ne||De==le;if(Hs(d))return ND(d,te);if(De==Fe||De==oe||Ue&&!P){if(G=ue||Ue?{}:QD(d),!te)return ue?Cre(d,qne(G,d)):wre(d,uD(G,d))}else{if(!en[De])return P?d:{};G=$re(d,De,te)}}H||(H=new Wo);var tt=H.get(d);if(tt)return tt;H.set(d,G),OI(d)?d.forEach(function(ct){G.add(Oo(ct,h,S,ct,d,H))}):EI(d)&&d.forEach(function(ct,Et){G.set(Et,Oo(ct,h,S,Et,d,H))});var lt=Te?ue?a1:s1:ue?Nr:Gn,wt=Ee?n:lt(d);return ko(wt||d,function(ct,Et){wt&&(Et=ct,ct=d[Et]),nd(G,Et,Oo(ct,h,S,Et,d,H))}),G}function Kne(d){var h=Gn(d);return function(S){return dD(S,d,h)}}function dD(d,h,S){var _=S.length;if(d==null)return!_;for(d=Jt(d);_--;){var P=S[_],H=h[P],G=d[P];if(G===n&&!(P in d)||!H(G))return!1}return!0}function fD(d,h,S){if(typeof d!="function")throw new Eo(s);return cd(function(){d.apply(n,S)},h)}function rd(d,h,S,_){var P=-1,H=Hh,G=!0,te=d.length,ue=[],Te=h.length;if(!te)return ue;S&&(h=un(h,Yr(S))),_?(H=_v,G=!1):h.length>=o&&(H=Ju,G=!1,h=new Ra(h));e:for(;++P<te;){var Ee=d[P],De=S==null?Ee:S(Ee);if(Ee=_||Ee!==0?Ee:0,G&&De===De){for(var Ue=Te;Ue--;)if(h[Ue]===De)continue e;ue.push(Ee)}else H(h,De,_)||ue.push(Ee)}return ue}var Rs=BD(pi),pD=BD(Wv,!0);function Yne(d,h){var S=!0;return Rs(d,function(_,P,H){return S=!!h(_,P,H),S}),S}function sm(d,h,S){for(var _=-1,P=d.length;++_<P;){var H=d[_],G=h(H);if(G!=null&&(te===n?G===G&&!Jr(G):S(G,te)))var te=G,ue=H}return ue}function Gne(d,h,S,_){var P=d.length;for(S=bt(S),S<0&&(S=-S>P?0:P+S),_=_===n||_>P?P:bt(_),_<0&&(_+=P),_=S>_?0:AI(_);S<_;)d[S++]=h;return d}function hD(d,h){var S=[];return Rs(d,function(_,P,H){h(_,P,H)&&S.push(_)}),S}function or(d,h,S,_,P){var H=-1,G=d.length;for(S||(S=Fre),P||(P=[]);++H<G;){var te=d[H];h>0&&S(te)?h>1?or(te,h-1,S,_,P):$s(P,te):_||(P[P.length]=te)}return P}var Hv=VD(),mD=VD(!0);function pi(d,h){return d&&Hv(d,h,Gn)}function Wv(d,h){return d&&mD(d,h,Gn)}function am(d,h){return Ns(h,function(S){return Zi(d[S])})}function Va(d,h){h=Vs(h,d);for(var S=0,_=h.length;d!=null&&S<_;)d=d[mi(h[S++])];return S&&S==_?d:n}function gD(d,h,S){var _=h(d);return yt(d)?_:$s(_,S(d))}function Sr(d){return d==null?d===n?Ne:ke:La&&La in Jt(d)?Dre(d):jre(d)}function jv(d,h){return d>h}function Jne(d,h){return d!=null&&jt.call(d,h)}function Xne(d,h){return d!=null&&h in Jt(d)}function Zne(d,h,S){return d>=pr(h,S)&&d<zn(h,S)}function Uv(d,h,S){for(var _=S?_v:Hh,P=d[0].length,H=d.length,G=H,te=Se(H),ue=1/0,Te=[];G--;){var Ee=d[G];G&&h&&(Ee=un(Ee,Yr(h))),ue=pr(Ee.length,ue),te[G]=!S&&(h||P>=120&&Ee.length>=120)?new Ra(G&&Ee):n}Ee=d[0];var De=-1,Ue=te[0];e:for(;++De<P&&Te.length<ue;){var tt=Ee[De],lt=h?h(tt):tt;if(tt=S||tt!==0?tt:0,!(Ue?Ju(Ue,lt):_(Te,lt,S))){for(G=H;--G;){var wt=te[G];if(!(wt?Ju(wt,lt):_(d[G],lt,S)))continue e}Ue&&Ue.push(lt),Te.push(tt)}}return Te}function Qne(d,h,S,_){return pi(d,function(P,H,G){h(_,S(P),H,G)}),_}function od(d,h,S){h=Vs(h,d),d=rI(d,h);var _=d==null?d:d[mi(Ao(h))];return _==null?n:Kr(_,d,S)}function yD(d){return Tn(d)&&Sr(d)==oe}function ere(d){return Tn(d)&&Sr(d)==ze}function tre(d){return Tn(d)&&Sr(d)==ee}function id(d,h,S,_,P){return d===h?!0:d==null||h==null||!Tn(d)&&!Tn(h)?d!==d&&h!==h:nre(d,h,S,_,id,P)}function nre(d,h,S,_,P,H){var G=yt(d),te=yt(h),ue=G?ce:hr(d),Te=te?ce:hr(h);ue=ue==oe?Fe:ue,Te=Te==oe?Fe:Te;var Ee=ue==Fe,De=Te==Fe,Ue=ue==Te;if(Ue&&Hs(d)){if(!Hs(h))return!1;G=!0,Ee=!1}if(Ue&&!Ee)return H||(H=new Wo),G||cc(d)?JD(d,h,S,_,P,H):Mre(d,h,ue,S,_,P,H);if(!(S&b)){var tt=Ee&&jt.call(d,"__wrapped__"),lt=De&&jt.call(h,"__wrapped__");if(tt||lt){var wt=tt?d.value():d,ct=lt?h.value():h;return H||(H=new Wo),P(wt,ct,S,_,H)}}return Ue?(H||(H=new Wo),Are(d,h,S,_,P,H)):!1}function rre(d){return Tn(d)&&hr(d)==pe}function qv(d,h,S,_){var P=S.length,H=P,G=!_;if(d==null)return!H;for(d=Jt(d);P--;){var te=S[P];if(G&&te[2]?te[1]!==d[te[0]]:!(te[0]in d))return!1}for(;++P<H;){te=S[P];var ue=te[0],Te=d[ue],Ee=te[1];if(G&&te[2]){if(Te===n&&!(ue in d))return!1}else{var De=new Wo;if(_)var Ue=_(Te,Ee,ue,d,h,De);if(!(Ue===n?id(Ee,Te,b|g,_,De):Ue))return!1}}return!0}function bD(d){if(!pn(d)||Bre(d))return!1;var h=Zi(d)?rne:Kee;return h.test(Ha(d))}function ore(d){return Tn(d)&&Sr(d)==Xe}function ire(d){return Tn(d)&&hr(d)==U}function sre(d){return Tn(d)&&Tm(d.length)&&!!sn[Sr(d)]}function vD(d){return typeof d=="function"?d:d==null?$r:typeof d=="object"?yt(d)?wD(d[0],d[1]):SD(d):zI(d)}function Kv(d){if(!ld(d))return cne(d);var h=[];for(var S in Jt(d))jt.call(d,S)&&S!="constructor"&&h.push(S);return h}function are(d){if(!pn(d))return Wre(d);var h=ld(d),S=[];for(var _ in d)_=="constructor"&&(h||!jt.call(d,_))||S.push(_);return S}function Yv(d,h){return d<h}function xD(d,h){var S=-1,_=Pr(d)?Se(d.length):[];return Rs(d,function(P,H,G){_[++S]=h(P,H,G)}),_}function SD(d){var h=c1(d);return h.length==1&&h[0][2]?tI(h[0][0],h[0][1]):function(S){return S===d||qv(S,d,h)}}function wD(d,h){return d1(d)&&eI(h)?tI(mi(d),h):function(S){var _=S1(S,d);return _===n&&_===h?w1(S,d):id(h,_,b|g)}}function lm(d,h,S,_,P){d!==h&&Hv(h,function(H,G){if(P||(P=new Wo),pn(H))lre(d,h,G,S,lm,_,P);else{var te=_?_(p1(d,G),H,G+"",d,h,P):n;te===n&&(te=H),Vv(d,G,te)}},Nr)}function lre(d,h,S,_,P,H,G){var te=p1(d,S),ue=p1(h,S),Te=G.get(ue);if(Te){Vv(d,S,Te);return}var Ee=H?H(te,ue,S+"",d,h,G):n,De=Ee===n;if(De){var Ue=yt(ue),tt=!Ue&&Hs(ue),lt=!Ue&&!tt&&cc(ue);Ee=ue,Ue||tt||lt?yt(te)?Ee=te:On(te)?Ee=Ir(te):tt?(De=!1,Ee=ND(ue,!0)):lt?(De=!1,Ee=$D(ue,!0)):Ee=[]:ud(ue)||Wa(ue)?(Ee=te,Wa(te)?Ee=DI(te):(!pn(te)||Zi(te))&&(Ee=QD(ue))):De=!1}De&&(G.set(ue,Ee),P(Ee,ue,_,H,G),G.delete(ue)),Vv(d,S,Ee)}function CD(d,h){var S=d.length;if(S)return h+=h<0?S:0,Xi(h,S)?d[h]:n}function TD(d,h,S){h.length?h=un(h,function(H){return yt(H)?function(G){return Va(G,H.length===1?H[0]:H)}:H}):h=[$r];var _=-1;h=un(h,Yr(at()));var P=xD(d,function(H,G,te){var ue=un(h,function(Te){return Te(H)});return{criteria:ue,index:++_,value:H}});return $te(P,function(H,G){return Sre(H,G,S)})}function cre(d,h){return kD(d,h,function(S,_){return w1(d,_)})}function kD(d,h,S){for(var _=-1,P=h.length,H={};++_<P;){var G=h[_],te=Va(d,G);S(te,G)&&sd(H,Vs(G,d),te)}return H}function ure(d){return function(h){return Va(h,d)}}function Gv(d,h,S,_){var P=_?Nte:Zl,H=-1,G=h.length,te=d;for(d===h&&(h=Ir(h)),S&&(te=un(d,Yr(S)));++H<G;)for(var ue=0,Te=h[H],Ee=S?S(Te):Te;(ue=P(te,Ee,ue,_))>-1;)te!==d&&Zh.call(te,ue,1),Zh.call(d,ue,1);return d}function ED(d,h){for(var S=d?h.length:0,_=S-1;S--;){var P=h[S];if(S==_||P!==H){var H=P;Xi(P)?Zh.call(d,P,1):Qv(d,P)}}return d}function Jv(d,h){return d+tm(sD()*(h-d+1))}function dre(d,h,S,_){for(var P=-1,H=zn(em((h-d)/(S||1)),0),G=Se(H);H--;)G[_?H:++P]=d,d+=S;return G}function Xv(d,h){var S="";if(!d||h<1||h>Y)return S;do h%2&&(S+=d),h=tm(h/2),h&&(d+=d);while(h);return S}function Ct(d,h){return h1(nI(d,h,$r),d+"")}function fre(d){return cD(uc(d))}function pre(d,h){var S=uc(d);return bm(S,Ba(h,0,S.length))}function sd(d,h,S,_){if(!pn(d))return d;h=Vs(h,d);for(var P=-1,H=h.length,G=H-1,te=d;te!=null&&++P<H;){var ue=mi(h[P]),Te=S;if(ue==="__proto__"||ue==="constructor"||ue==="prototype")return d;if(P!=G){var Ee=te[ue];Te=_?_(Ee,ue,te):n,Te===n&&(Te=pn(Ee)?Ee:Xi(h[P+1])?[]:{})}nd(te,ue,Te),te=te[ue]}return d}var _D=nm?function(d,h){return nm.set(d,h),d}:$r,hre=Qh?function(d,h){return Qh(d,"toString",{configurable:!0,enumerable:!1,value:T1(h),writable:!0})}:$r;function mre(d){return bm(uc(d))}function Mo(d,h,S){var _=-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=Se(P);++_<P;)H[_]=d[_+h];return H}function gre(d,h){var S;return Rs(d,function(_,P,H){return S=h(_,P,H),!S}),!!S}function cm(d,h,S){var _=0,P=d==null?_:d.length;if(typeof h=="number"&&h===h&&P<=xe){for(;_<P;){var H=_+P>>>1,G=d[H];G!==null&&!Jr(G)&&(S?G<=h:G<h)?_=H+1:P=H}return P}return Zv(d,h,$r,S)}function Zv(d,h,S,_){var P=0,H=d==null?0:d.length;if(H===0)return 0;h=S(h);for(var G=h!==h,te=h===null,ue=Jr(h),Te=h===n;P<H;){var Ee=tm((P+H)/2),De=S(d[Ee]),Ue=De!==n,tt=De===null,lt=De===De,wt=Jr(De);if(G)var ct=_||lt;else Te?ct=lt&&(_||Ue):te?ct=lt&&Ue&&(_||!tt):ue?ct=lt&&Ue&&!tt&&(_||!wt):tt||wt?ct=!1:ct=_?De<=h:De<h;ct?P=Ee+1:H=Ee}return pr(H,ve)}function OD(d,h){for(var S=-1,_=d.length,P=0,H=[];++S<_;){var G=d[S],te=h?h(G):G;if(!S||!jo(te,ue)){var ue=te;H[P++]=G===0?0:G}}return H}function MD(d){return typeof d=="number"?d:Jr(d)?K:+d}function Gr(d){if(typeof d=="string")return d;if(yt(d))return un(d,Gr)+"";if(Jr(d))return aD?aD.call(d):"";var h=d+"";return h=="0"&&1/d==-W?"-0":h}function Bs(d,h,S){var _=-1,P=Hh,H=d.length,G=!0,te=[],ue=te;if(S)G=!1,P=_v;else if(H>=o){var Te=h?null:_re(d);if(Te)return jh(Te);G=!1,P=Ju,ue=new Ra}else ue=h?[]:te;e:for(;++_<H;){var Ee=d[_],De=h?h(Ee):Ee;if(Ee=S||Ee!==0?Ee:0,G&&De===De){for(var Ue=ue.length;Ue--;)if(ue[Ue]===De)continue e;h&&ue.push(De),te.push(Ee)}else P(ue,De,S)||(ue!==te&&ue.push(De),te.push(Ee))}return te}function Qv(d,h){return h=Vs(h,d),d=rI(d,h),d==null||delete d[mi(Ao(h))]}function AD(d,h,S,_){return sd(d,h,S(Va(d,h)),_)}function um(d,h,S,_){for(var P=d.length,H=_?P:-1;(_?H--:++H<P)&&h(d[H],H,d););return S?Mo(d,_?0:H,_?H+1:P):Mo(d,_?H+1:0,_?P:H)}function DD(d,h){var S=d;return S instanceof _t&&(S=S.value()),Ov(h,function(_,P){return P.func.apply(P.thisArg,$s([_],P.args))},S)}function e1(d,h,S){var _=d.length;if(_<2)return _?Bs(d[0]):[];for(var P=-1,H=Se(_);++P<_;)for(var G=d[P],te=-1;++te<_;)te!=P&&(H[P]=rd(H[P]||G,d[te],h,S));return Bs(or(H,1),h,S)}function ID(d,h,S){for(var _=-1,P=d.length,H=h.length,G={};++_<P;){var te=_<H?h[_]:n;S(G,d[_],te)}return G}function t1(d){return On(d)?d:[]}function n1(d){return typeof d=="function"?d:$r}function Vs(d,h){return yt(d)?d:d1(d,h)?[d]:aI(Ht(d))}var yre=Ct;function zs(d,h,S){var _=d.length;return S=S===n?_:S,!h&&S>=_?d:Mo(d,h,S)}var PD=one||function(d){return rr.clearTimeout(d)};function ND(d,h){if(h)return d.slice();var S=d.length,_=tD?tD(S):new d.constructor(S);return d.copy(_),_}function r1(d){var h=new d.constructor(d.byteLength);return new Jh(h).set(new Jh(d)),h}function bre(d,h){var S=h?r1(d.buffer):d.buffer;return new d.constructor(S,d.byteOffset,d.byteLength)}function vre(d){var h=new d.constructor(d.source,y2.exec(d));return h.lastIndex=d.lastIndex,h}function xre(d){return td?Jt(td.call(d)):{}}function $D(d,h){var S=h?r1(d.buffer):d.buffer;return new d.constructor(S,d.byteOffset,d.length)}function LD(d,h){if(d!==h){var S=d!==n,_=d===null,P=d===d,H=Jr(d),G=h!==n,te=h===null,ue=h===h,Te=Jr(h);if(!te&&!Te&&!H&&d>h||H&&G&&ue&&!te&&!Te||_&&G&&ue||!S&&ue||!P)return 1;if(!_&&!H&&!Te&&d<h||Te&&S&&P&&!_&&!H||te&&S&&P||!G&&P||!ue)return-1}return 0}function Sre(d,h,S){for(var _=-1,P=d.criteria,H=h.criteria,G=P.length,te=S.length;++_<G;){var ue=LD(P[_],H[_]);if(ue){if(_>=te)return ue;var Te=S[_];return ue*(Te=="desc"?-1:1)}}return d.index-h.index}function FD(d,h,S,_){for(var P=-1,H=d.length,G=S.length,te=-1,ue=h.length,Te=zn(H-G,0),Ee=Se(ue+Te),De=!_;++te<ue;)Ee[te]=h[te];for(;++P<G;)(De||P<H)&&(Ee[S[P]]=d[P]);for(;Te--;)Ee[te++]=d[P++];return Ee}function RD(d,h,S,_){for(var P=-1,H=d.length,G=-1,te=S.length,ue=-1,Te=h.length,Ee=zn(H-te,0),De=Se(Ee+Te),Ue=!_;++P<Ee;)De[P]=d[P];for(var tt=P;++ue<Te;)De[tt+ue]=h[ue];for(;++G<te;)(Ue||P<H)&&(De[tt+S[G]]=d[P++]);return De}function Ir(d,h){var S=-1,_=d.length;for(h||(h=Se(_));++S<_;)h[S]=d[S];return h}function hi(d,h,S,_){var P=!S;S||(S={});for(var H=-1,G=h.length;++H<G;){var te=h[H],ue=_?_(S[te],d[te],te,S,d):n;ue===n&&(ue=d[te]),P?Yi(S,te,ue):nd(S,te,ue)}return S}function wre(d,h){return hi(d,u1(d),h)}function Cre(d,h){return hi(d,XD(d),h)}function dm(d,h){return function(S,_){var P=yt(S)?Ote:Une,H=h?h():{};return P(S,d,at(_,2),H)}}function sc(d){return Ct(function(h,S){var _=-1,P=S.length,H=P>1?S[P-1]:n,G=P>2?S[2]:n;for(H=d.length>3&&typeof H=="function"?(P--,H):n,G&&wr(S[0],S[1],G)&&(H=P<3?n:H,P=1),h=Jt(h);++_<P;){var te=S[_];te&&d(h,te,_,H)}return h})}function BD(d,h){return function(S,_){if(S==null)return S;if(!Pr(S))return d(S,_);for(var P=S.length,H=h?P:-1,G=Jt(S);(h?H--:++H<P)&&_(G[H],H,G)!==!1;);return S}}function VD(d){return function(h,S,_){for(var P=-1,H=Jt(h),G=_(h),te=G.length;te--;){var ue=G[d?te:++P];if(S(H[ue],ue,H)===!1)break}return h}}function Tre(d,h,S){var _=h&x,P=ad(d);function H(){var G=this&&this!==rr&&this instanceof H?P:d;return G.apply(_?S:this,arguments)}return H}function zD(d){return function(h){h=Ht(h);var S=Ql(h)?Ho(h):n,_=S?S[0]:h.charAt(0),P=S?zs(S,1).join(""):h.slice(1);return _[d]()+P}}function ac(d){return function(h){return Ov(BI(RI(h).replace(hte,"")),d,"")}}function ad(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=ic(d.prototype),_=d.apply(S,h);return pn(_)?_:S}}function kre(d,h,S){var _=ad(d);function P(){for(var H=arguments.length,G=Se(H),te=H,ue=lc(P);te--;)G[te]=arguments[te];var Te=H<3&&G[0]!==ue&&G[H-1]!==ue?[]:Ls(G,ue);if(H-=Te.length,H<S)return qD(d,h,fm,P.placeholder,n,G,Te,n,n,S-H);var Ee=this&&this!==rr&&this instanceof P?_:d;return Kr(Ee,this,G)}return P}function HD(d){return function(h,S,_){var P=Jt(h);if(!Pr(h)){var H=at(S,3);h=Gn(h),S=function(te){return H(P[te],te,P)}}var G=d(h,S,_);return G>-1?P[H?h[G]:G]:n}}function WD(d){return Ji(function(h){var S=h.length,_=S,P=_o.prototype.thru;for(d&&h.reverse();_--;){var H=h[_];if(typeof H!="function")throw new Eo(s);if(P&&!G&&gm(H)=="wrapper")var G=new _o([],!0)}for(_=G?_:S;++_<S;){H=h[_];var te=gm(H),ue=te=="wrapper"?l1(H):n;ue&&f1(ue[0])&&ue[1]==(A|T|k|I)&&!ue[4].length&&ue[9]==1?G=G[gm(ue[0])].apply(G,ue[3]):G=H.length==1&&f1(H)?G[te]():G.thru(H)}return function(){var Te=arguments,Ee=Te[0];if(G&&Te.length==1&&yt(Ee))return G.plant(Ee).value();for(var De=0,Ue=S?h[De].apply(this,Te):Ee;++De<S;)Ue=h[De].call(this,Ue);return Ue}})}function fm(d,h,S,_,P,H,G,te,ue,Te){var Ee=h&A,De=h&x,Ue=h&w,tt=h&(T|C),lt=h&L,wt=Ue?n:ad(d);function ct(){for(var Et=arguments.length,Mt=Se(Et),Xr=Et;Xr--;)Mt[Xr]=arguments[Xr];if(tt)var Cr=lc(ct),Zr=Fte(Mt,Cr);if(_&&(Mt=FD(Mt,_,P,tt)),H&&(Mt=RD(Mt,H,G,tt)),Et-=Zr,tt&&Et<Te){var Mn=Ls(Mt,Cr);return qD(d,h,fm,ct.placeholder,S,Mt,Mn,te,ue,Te-Et)}var Uo=De?S:this,es=Ue?Uo[d]:d;return Et=Mt.length,te?Mt=Ure(Mt,te):lt&&Et>1&&Mt.reverse(),Ee&&ue<Et&&(Mt.length=ue),this&&this!==rr&&this instanceof ct&&(es=wt||ad(es)),es.apply(Uo,Mt)}return ct}function jD(d,h){return function(S,_){return Qne(S,d,h(_),{})}}function pm(d,h){return function(S,_){var P;if(S===n&&_===n)return h;if(S!==n&&(P=S),_!==n){if(P===n)return _;typeof S=="string"||typeof _=="string"?(S=Gr(S),_=Gr(_)):(S=MD(S),_=MD(_)),P=d(S,_)}return P}}function o1(d){return Ji(function(h){return h=un(h,Yr(at())),Ct(function(S){var _=this;return d(h,function(P){return Kr(P,_,S)})})})}function hm(d,h){h=h===n?" ":Gr(h);var S=h.length;if(S<2)return S?Xv(h,d):h;var _=Xv(h,em(d/ec(h)));return Ql(h)?zs(Ho(_),0,d).join(""):_.slice(0,d)}function Ere(d,h,S,_){var P=h&x,H=ad(d);function G(){for(var te=-1,ue=arguments.length,Te=-1,Ee=_.length,De=Se(Ee+ue),Ue=this&&this!==rr&&this instanceof G?H:d;++Te<Ee;)De[Te]=_[Te];for(;ue--;)De[Te++]=arguments[++te];return Kr(Ue,P?S:this,De)}return G}function UD(d){return function(h,S,_){return _&&typeof _!="number"&&wr(h,S,_)&&(S=_=n),h=Qi(h),S===n?(S=h,h=0):S=Qi(S),_=_===n?h<S?1:-1:Qi(_),dre(h,S,_,d)}}function mm(d){return function(h,S){return typeof h=="string"&&typeof S=="string"||(h=Do(h),S=Do(S)),d(h,S)}}function qD(d,h,S,_,P,H,G,te,ue,Te){var Ee=h&T,De=Ee?G:n,Ue=Ee?n:G,tt=Ee?H:n,lt=Ee?n:H;h|=Ee?k:M,h&=~(Ee?M:k),h&E||(h&=-4);var wt=[d,h,P,tt,De,lt,Ue,te,ue,Te],ct=S.apply(n,wt);return f1(d)&&oI(ct,wt),ct.placeholder=_,iI(ct,d,h)}function i1(d){var h=Vn[d];return function(S,_){if(S=Do(S),_=_==null?0:pr(bt(_),292),_&&iD(S)){var P=(Ht(S)+"e").split("e"),H=h(P[0]+"e"+(+P[1]+_));return P=(Ht(H)+"e").split("e"),+(P[0]+"e"+(+P[1]-_))}return h(S)}}var _re=rc&&1/jh(new rc([,-0]))[1]==W?function(d){return new rc(d)}:_1;function KD(d){return function(h){var S=hr(h);return S==pe?$v(h):S==U?jte(h):Lte(h,d(h))}}function Gi(d,h,S,_,P,H,G,te){var ue=h&w;if(!ue&&typeof d!="function")throw new Eo(s);var Te=_?_.length:0;if(Te||(h&=-97,_=P=n),G=G===n?G:zn(bt(G),0),te=te===n?te:bt(te),Te-=P?P.length:0,h&M){var Ee=_,De=P;_=P=n}var Ue=ue?n:l1(d),tt=[d,h,S,_,P,Ee,De,H,G,te];if(Ue&&Hre(tt,Ue),d=tt[0],h=tt[1],S=tt[2],_=tt[3],P=tt[4],te=tt[9]=tt[9]===n?ue?0:d.length:zn(tt[9]-Te,0),!te&&h&(T|C)&&(h&=-25),!h||h==x)var lt=Tre(d,h,S);else h==T||h==C?lt=kre(d,h,te):(h==k||h==(x|k))&&!P.length?lt=Ere(d,h,S,_):lt=fm.apply(n,tt);var wt=Ue?_D:oI;return iI(wt(lt,tt),d,h)}function YD(d,h,S,_){return d===n||jo(d,nc[S])&&!jt.call(_,S)?h:d}function GD(d,h,S,_,P,H){return pn(d)&&pn(h)&&(H.set(h,d),lm(d,h,n,GD,H),H.delete(h)),d}function Ore(d){return ud(d)?n:d}function JD(d,h,S,_,P,H){var G=S&b,te=d.length,ue=h.length;if(te!=ue&&!(G&&ue>te))return!1;var Te=H.get(d),Ee=H.get(h);if(Te&&Ee)return Te==h&&Ee==d;var De=-1,Ue=!0,tt=S&g?new Ra:n;for(H.set(d,h),H.set(h,d);++De<te;){var lt=d[De],wt=h[De];if(_)var ct=G?_(wt,lt,De,h,d,H):_(lt,wt,De,d,h,H);if(ct!==n){if(ct)continue;Ue=!1;break}if(tt){if(!Mv(h,function(Et,Mt){if(!Ju(tt,Mt)&&(lt===Et||P(lt,Et,S,_,H)))return tt.push(Mt)})){Ue=!1;break}}else if(!(lt===wt||P(lt,wt,S,_,H))){Ue=!1;break}}return H.delete(d),H.delete(h),Ue}function Mre(d,h,S,_,P,H,G){switch(S){case st:if(d.byteLength!=h.byteLength||d.byteOffset!=h.byteOffset)return!1;d=d.buffer,h=h.buffer;case ze:return!(d.byteLength!=h.byteLength||!H(new Jh(d),new Jh(h)));case q:case ee:case Oe:return jo(+d,+h);case be:return d.name==h.name&&d.message==h.message;case Xe:case Z:return d==h+"";case pe:var te=$v;case U:var ue=_&b;if(te||(te=jh),d.size!=h.size&&!ue)return!1;var Te=G.get(d);if(Te)return Te==h;_|=g,G.set(d,h);var Ee=JD(te(d),te(h),_,P,H,G);return G.delete(d),Ee;case he:if(td)return td.call(d)==td.call(h)}return!1}function Are(d,h,S,_,P,H){var G=S&b,te=s1(d),ue=te.length,Te=s1(h),Ee=Te.length;if(ue!=Ee&&!G)return!1;for(var De=ue;De--;){var Ue=te[De];if(!(G?Ue in h:jt.call(h,Ue)))return!1}var tt=H.get(d),lt=H.get(h);if(tt&<)return tt==h&<==d;var wt=!0;H.set(d,h),H.set(h,d);for(var ct=G;++De<ue;){Ue=te[De];var Et=d[Ue],Mt=h[Ue];if(_)var Xr=G?_(Mt,Et,Ue,h,d,H):_(Et,Mt,Ue,d,h,H);if(!(Xr===n?Et===Mt||P(Et,Mt,S,_,H):Xr)){wt=!1;break}ct||(ct=Ue=="constructor")}if(wt&&!ct){var Cr=d.constructor,Zr=h.constructor;Cr!=Zr&&"constructor"in d&&"constructor"in h&&!(typeof Cr=="function"&&Cr instanceof Cr&&typeof Zr=="function"&&Zr instanceof Zr)&&(wt=!1)}return H.delete(d),H.delete(h),wt}function Ji(d){return h1(nI(d,n,dI),d+"")}function s1(d){return gD(d,Gn,u1)}function a1(d){return gD(d,Nr,XD)}var l1=nm?function(d){return nm.get(d)}:_1;function gm(d){for(var h=d.name+"",S=oc[h],_=jt.call(oc,h)?S.length:0;_--;){var P=S[_],H=P.func;if(H==null||H==d)return P.name}return h}function lc(d){var h=jt.call(R,"placeholder")?R:d;return h.placeholder}function at(){var d=R.iteratee||k1;return d=d===k1?vD:d,arguments.length?d(arguments[0],arguments[1]):d}function ym(d,h){var S=d.__data__;return Rre(h)?S[typeof h=="string"?"string":"hash"]:S.map}function c1(d){for(var h=Gn(d),S=h.length;S--;){var _=h[S],P=d[_];h[S]=[_,P,eI(P)]}return h}function za(d,h){var S=zte(d,h);return bD(S)?S:n}function Dre(d){var h=jt.call(d,La),S=d[La];try{d[La]=n;var _=!0}catch{}var P=Yh.call(d);return _&&(h?d[La]=S:delete d[La]),P}var u1=Fv?function(d){return d==null?[]:(d=Jt(d),Ns(Fv(d),function(h){return rD.call(d,h)}))}:O1,XD=Fv?function(d){for(var h=[];d;)$s(h,u1(d)),d=Xh(d);return h}:O1,hr=Sr;(Rv&&hr(new Rv(new ArrayBuffer(1)))!=st||Zu&&hr(new Zu)!=pe||Bv&&hr(Bv.resolve())!=Ie||rc&&hr(new rc)!=U||Qu&&hr(new Qu)!=Pe)&&(hr=function(d){var h=Sr(d),S=h==Fe?d.constructor:n,_=S?Ha(S):"";if(_)switch(_){case pne:return st;case hne:return pe;case mne:return Ie;case gne:return U;case yne:return Pe}return h});function Ire(d,h,S){for(var _=-1,P=S.length;++_<P;){var H=S[_],G=H.size;switch(H.type){case"drop":d+=G;break;case"dropRight":h-=G;break;case"take":h=pr(h,d+G);break;case"takeRight":d=zn(d,h-G);break}}return{start:d,end:h}}function Pre(d){var h=d.match(Bee);return h?h[1].split(Vee):[]}function ZD(d,h,S){h=Vs(h,d);for(var _=-1,P=h.length,H=!1;++_<P;){var G=mi(h[_]);if(!(H=d!=null&&S(d,G)))break;d=d[G]}return H||++_!=P?H:(P=d==null?0:d.length,!!P&&Tm(P)&&Xi(G,P)&&(yt(d)||Wa(d)))}function Nre(d){var h=d.length,S=new d.constructor(h);return h&&typeof d[0]=="string"&&jt.call(d,"index")&&(S.index=d.index,S.input=d.input),S}function QD(d){return typeof d.constructor=="function"&&!ld(d)?ic(Xh(d)):{}}function $re(d,h,S){var _=d.constructor;switch(h){case ze:return r1(d);case q:case ee:return new _(+d);case st:return bre(d,S);case pt:case Vt:case rt:case Wt:case Qt:case ge:case We:case _e:case je:return $D(d,S);case pe:return new _;case Oe:case Z:return new _(d);case Xe:return vre(d);case U:return new _;case he:return xre(d)}}function Lre(d,h){var S=h.length;if(!S)return d;var _=S-1;return h[_]=(S>1?"& ":"")+h[_],h=h.join(S>2?", ":" "),d.replace(Ree,`{
|
|
89
|
-
/* [wrapped with `+h+`] */
|
|
90
|
-
`)}function Fre(d){return yt(d)||Wa(d)||!!(oD&&d&&d[oD])}function Xi(d,h){var S=typeof d;return h=h??Y,!!h&&(S=="number"||S!="symbol"&&Gee.test(d))&&d>-1&&d%1==0&&d<h}function wr(d,h,S){if(!pn(S))return!1;var _=typeof h;return(_=="number"?Pr(S)&&Xi(h,S.length):_=="string"&&h in S)?jo(S[h],d):!1}function d1(d,h){if(yt(d))return!1;var S=typeof d;return S=="number"||S=="symbol"||S=="boolean"||d==null||Jr(d)?!0:Ui.test(d)||!nr.test(d)||h!=null&&d in Jt(h)}function Rre(d){var h=typeof d;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?d!=="__proto__":d===null}function f1(d){var h=gm(d),S=R[h];if(typeof S!="function"||!(h in _t.prototype))return!1;if(d===S)return!0;var _=l1(S);return!!_&&d===_[0]}function Bre(d){return!!eD&&eD in d}var Vre=qh?Zi:M1;function ld(d){var h=d&&d.constructor,S=typeof h=="function"&&h.prototype||nc;return d===S}function eI(d){return d===d&&!pn(d)}function tI(d,h){return function(S){return S==null?!1:S[d]===h&&(h!==n||d in Jt(S))}}function zre(d){var h=wm(d,function(_){return S.size===u&&S.clear(),_}),S=h.cache;return h}function Hre(d,h){var S=d[1],_=h[1],P=S|_,H=P<(x|w|A),G=_==A&&S==T||_==A&&S==I&&d[7].length<=h[8]||_==(A|I)&&h[7].length<=h[8]&&S==T;if(!(H||G))return d;_&x&&(d[2]=h[2],P|=S&x?0:E);var te=h[3];if(te){var ue=d[3];d[3]=ue?FD(ue,te,h[4]):te,d[4]=ue?Ls(d[3],f):h[4]}return te=h[5],te&&(ue=d[5],d[5]=ue?RD(ue,te,h[6]):te,d[6]=ue?Ls(d[5],f):h[6]),te=h[7],te&&(d[7]=te),_&A&&(d[8]=d[8]==null?h[8]:pr(d[8],h[8])),d[9]==null&&(d[9]=h[9]),d[0]=h[0],d[1]=P,d}function Wre(d){var h=[];if(d!=null)for(var S in Jt(d))h.push(S);return h}function jre(d){return Yh.call(d)}function nI(d,h,S){return h=zn(h===n?d.length-1:h,0),function(){for(var _=arguments,P=-1,H=zn(_.length-h,0),G=Se(H);++P<H;)G[P]=_[h+P];P=-1;for(var te=Se(h+1);++P<h;)te[P]=_[P];return te[h]=S(G),Kr(d,this,te)}}function rI(d,h){return h.length<2?d:Va(d,Mo(h,0,-1))}function Ure(d,h){for(var S=d.length,_=pr(h.length,S),P=Ir(d);_--;){var H=h[_];d[_]=Xi(H,S)?P[H]:n}return d}function p1(d,h){if(!(h==="constructor"&&typeof d[h]=="function")&&h!="__proto__")return d[h]}var oI=sI(_D),cd=sne||function(d,h){return rr.setTimeout(d,h)},h1=sI(hre);function iI(d,h,S){var _=h+"";return h1(d,Lre(_,qre(Pre(_),S)))}function sI(d){var h=0,S=0;return function(){var _=une(),P=V-(_-S);if(S=_,P>0){if(++h>=$)return arguments[0]}else h=0;return d.apply(n,arguments)}}function bm(d,h){var S=-1,_=d.length,P=_-1;for(h=h===n?_:h;++S<h;){var H=Jv(S,P),G=d[H];d[H]=d[S],d[S]=G}return d.length=h,d}var aI=zre(function(d){var h=[];return d.charCodeAt(0)===46&&h.push(""),d.replace($ee,function(S,_,P,H){h.push(P?H.replace(Wee,"$1"):_||S)}),h});function mi(d){if(typeof d=="string"||Jr(d))return d;var h=d+"";return h=="0"&&1/d==-W?"-0":h}function Ha(d){if(d!=null){try{return Kh.call(d)}catch{}try{return d+""}catch{}}return""}function qre(d,h){return ko(ye,function(S){var _="_."+S[0];h&S[1]&&!Hh(d,_)&&d.push(_)}),d.sort()}function lI(d){if(d instanceof _t)return d.clone();var h=new _o(d.__wrapped__,d.__chain__);return h.__actions__=Ir(d.__actions__),h.__index__=d.__index__,h.__values__=d.__values__,h}function Kre(d,h,S){(S?wr(d,h,S):h===n)?h=1:h=zn(bt(h),0);var _=d==null?0:d.length;if(!_||h<1)return[];for(var P=0,H=0,G=Se(em(_/h));P<_;)G[H++]=Mo(d,P,P+=h);return G}function Yre(d){for(var h=-1,S=d==null?0:d.length,_=0,P=[];++h<S;){var H=d[h];H&&(P[_++]=H)}return P}function Gre(){var d=arguments.length;if(!d)return[];for(var h=Se(d-1),S=arguments[0],_=d;_--;)h[_-1]=arguments[_];return $s(yt(S)?Ir(S):[S],or(h,1))}var Jre=Ct(function(d,h){return On(d)?rd(d,or(h,1,On,!0)):[]}),Xre=Ct(function(d,h){var S=Ao(h);return On(S)&&(S=n),On(d)?rd(d,or(h,1,On,!0),at(S,2)):[]}),Zre=Ct(function(d,h){var S=Ao(h);return On(S)&&(S=n),On(d)?rd(d,or(h,1,On,!0),n,S):[]});function Qre(d,h,S){var _=d==null?0:d.length;return _?(h=S||h===n?1:bt(h),Mo(d,h<0?0:h,_)):[]}function eoe(d,h,S){var _=d==null?0:d.length;return _?(h=S||h===n?1:bt(h),h=_-h,Mo(d,0,h<0?0:h)):[]}function toe(d,h){return d&&d.length?um(d,at(h,3),!0,!0):[]}function noe(d,h){return d&&d.length?um(d,at(h,3),!0):[]}function roe(d,h,S,_){var P=d==null?0:d.length;return P?(S&&typeof S!="number"&&wr(d,h,S)&&(S=0,_=P),Gne(d,h,S,_)):[]}function cI(d,h,S){var _=d==null?0:d.length;if(!_)return-1;var P=S==null?0:bt(S);return P<0&&(P=zn(_+P,0)),Wh(d,at(h,3),P)}function uI(d,h,S){var _=d==null?0:d.length;if(!_)return-1;var P=_-1;return S!==n&&(P=bt(S),P=S<0?zn(_+P,0):pr(P,_-1)),Wh(d,at(h,3),P,!0)}function dI(d){var h=d==null?0:d.length;return h?or(d,1):[]}function ooe(d){var h=d==null?0:d.length;return h?or(d,W):[]}function ioe(d,h){var S=d==null?0:d.length;return S?(h=h===n?1:bt(h),or(d,h)):[]}function soe(d){for(var h=-1,S=d==null?0:d.length,_={};++h<S;){var P=d[h];_[P[0]]=P[1]}return _}function fI(d){return d&&d.length?d[0]:n}function aoe(d,h,S){var _=d==null?0:d.length;if(!_)return-1;var P=S==null?0:bt(S);return P<0&&(P=zn(_+P,0)),Zl(d,h,P)}function loe(d){var h=d==null?0:d.length;return h?Mo(d,0,-1):[]}var coe=Ct(function(d){var h=un(d,t1);return h.length&&h[0]===d[0]?Uv(h):[]}),uoe=Ct(function(d){var h=Ao(d),S=un(d,t1);return h===Ao(S)?h=n:S.pop(),S.length&&S[0]===d[0]?Uv(S,at(h,2)):[]}),doe=Ct(function(d){var h=Ao(d),S=un(d,t1);return h=typeof h=="function"?h:n,h&&S.pop(),S.length&&S[0]===d[0]?Uv(S,n,h):[]});function foe(d,h){return d==null?"":lne.call(d,h)}function Ao(d){var h=d==null?0:d.length;return h?d[h-1]:n}function poe(d,h,S){var _=d==null?0:d.length;if(!_)return-1;var P=_;return S!==n&&(P=bt(S),P=P<0?zn(_+P,0):pr(P,_-1)),h===h?qte(d,h,P):Wh(d,q2,P,!0)}function hoe(d,h){return d&&d.length?CD(d,bt(h)):n}var moe=Ct(pI);function pI(d,h){return d&&d.length&&h&&h.length?Gv(d,h):d}function goe(d,h,S){return d&&d.length&&h&&h.length?Gv(d,h,at(S,2)):d}function yoe(d,h,S){return d&&d.length&&h&&h.length?Gv(d,h,n,S):d}var boe=Ji(function(d,h){var S=d==null?0:d.length,_=zv(d,h);return ED(d,un(h,function(P){return Xi(P,S)?+P:P}).sort(LD)),_});function voe(d,h){var S=[];if(!(d&&d.length))return S;var _=-1,P=[],H=d.length;for(h=at(h,3);++_<H;){var G=d[_];h(G,_,d)&&(S.push(G),P.push(_))}return ED(d,P),S}function m1(d){return d==null?d:fne.call(d)}function xoe(d,h,S){var _=d==null?0:d.length;return _?(S&&typeof S!="number"&&wr(d,h,S)?(h=0,S=_):(h=h==null?0:bt(h),S=S===n?_:bt(S)),Mo(d,h,S)):[]}function Soe(d,h){return cm(d,h)}function woe(d,h,S){return Zv(d,h,at(S,2))}function Coe(d,h){var S=d==null?0:d.length;if(S){var _=cm(d,h);if(_<S&&jo(d[_],h))return _}return-1}function Toe(d,h){return cm(d,h,!0)}function koe(d,h,S){return Zv(d,h,at(S,2),!0)}function Eoe(d,h){var S=d==null?0:d.length;if(S){var _=cm(d,h,!0)-1;if(jo(d[_],h))return _}return-1}function _oe(d){return d&&d.length?OD(d):[]}function Ooe(d,h){return d&&d.length?OD(d,at(h,2)):[]}function Moe(d){var h=d==null?0:d.length;return h?Mo(d,1,h):[]}function Aoe(d,h,S){return d&&d.length?(h=S||h===n?1:bt(h),Mo(d,0,h<0?0:h)):[]}function Doe(d,h,S){var _=d==null?0:d.length;return _?(h=S||h===n?1:bt(h),h=_-h,Mo(d,h<0?0:h,_)):[]}function Ioe(d,h){return d&&d.length?um(d,at(h,3),!1,!0):[]}function Poe(d,h){return d&&d.length?um(d,at(h,3)):[]}var Noe=Ct(function(d){return Bs(or(d,1,On,!0))}),$oe=Ct(function(d){var h=Ao(d);return On(h)&&(h=n),Bs(or(d,1,On,!0),at(h,2))}),Loe=Ct(function(d){var h=Ao(d);return h=typeof h=="function"?h:n,Bs(or(d,1,On,!0),n,h)});function Foe(d){return d&&d.length?Bs(d):[]}function Roe(d,h){return d&&d.length?Bs(d,at(h,2)):[]}function Boe(d,h){return h=typeof h=="function"?h:n,d&&d.length?Bs(d,n,h):[]}function g1(d){if(!(d&&d.length))return[];var h=0;return d=Ns(d,function(S){if(On(S))return h=zn(S.length,h),!0}),Pv(h,function(S){return un(d,Av(S))})}function hI(d,h){if(!(d&&d.length))return[];var S=g1(d);return h==null?S:un(S,function(_){return Kr(h,n,_)})}var Voe=Ct(function(d,h){return On(d)?rd(d,h):[]}),zoe=Ct(function(d){return e1(Ns(d,On))}),Hoe=Ct(function(d){var h=Ao(d);return On(h)&&(h=n),e1(Ns(d,On),at(h,2))}),Woe=Ct(function(d){var h=Ao(d);return h=typeof h=="function"?h:n,e1(Ns(d,On),n,h)}),joe=Ct(g1);function Uoe(d,h){return ID(d||[],h||[],nd)}function qoe(d,h){return ID(d||[],h||[],sd)}var Koe=Ct(function(d){var h=d.length,S=h>1?d[h-1]:n;return S=typeof S=="function"?(d.pop(),S):n,hI(d,S)});function mI(d){var h=R(d);return h.__chain__=!0,h}function Yoe(d,h){return h(d),d}function vm(d,h){return h(d)}var Goe=Ji(function(d){var h=d.length,S=h?d[0]:0,_=this.__wrapped__,P=function(H){return zv(H,d)};return h>1||this.__actions__.length||!(_ instanceof _t)||!Xi(S)?this.thru(P):(_=_.slice(S,+S+(h?1:0)),_.__actions__.push({func:vm,args:[P],thisArg:n}),new _o(_,this.__chain__).thru(function(H){return h&&!H.length&&H.push(n),H}))});function Joe(){return mI(this)}function Xoe(){return new _o(this.value(),this.__chain__)}function Zoe(){this.__values__===n&&(this.__values__=MI(this.value()));var d=this.__index__>=this.__values__.length,h=d?n:this.__values__[this.__index__++];return{done:d,value:h}}function Qoe(){return this}function eie(d){for(var h,S=this;S instanceof om;){var _=lI(S);_.__index__=0,_.__values__=n,h?P.__wrapped__=_:h=_;var P=_;S=S.__wrapped__}return P.__wrapped__=d,h}function tie(){var d=this.__wrapped__;if(d instanceof _t){var h=d;return this.__actions__.length&&(h=new _t(this)),h=h.reverse(),h.__actions__.push({func:vm,args:[m1],thisArg:n}),new _o(h,this.__chain__)}return this.thru(m1)}function nie(){return DD(this.__wrapped__,this.__actions__)}var rie=dm(function(d,h,S){jt.call(d,S)?++d[S]:Yi(d,S,1)});function oie(d,h,S){var _=yt(d)?j2:Yne;return S&&wr(d,h,S)&&(h=n),_(d,at(h,3))}function iie(d,h){var S=yt(d)?Ns:hD;return S(d,at(h,3))}var sie=HD(cI),aie=HD(uI);function lie(d,h){return or(xm(d,h),1)}function cie(d,h){return or(xm(d,h),W)}function uie(d,h,S){return S=S===n?1:bt(S),or(xm(d,h),S)}function gI(d,h){var S=yt(d)?ko:Rs;return S(d,at(h,3))}function yI(d,h){var S=yt(d)?Mte:pD;return S(d,at(h,3))}var die=dm(function(d,h,S){jt.call(d,S)?d[S].push(h):Yi(d,S,[h])});function fie(d,h,S,_){d=Pr(d)?d:uc(d),S=S&&!_?bt(S):0;var P=d.length;return S<0&&(S=zn(P+S,0)),km(d)?S<=P&&d.indexOf(h,S)>-1:!!P&&Zl(d,h,S)>-1}var pie=Ct(function(d,h,S){var _=-1,P=typeof h=="function",H=Pr(d)?Se(d.length):[];return Rs(d,function(G){H[++_]=P?Kr(h,G,S):od(G,h,S)}),H}),hie=dm(function(d,h,S){Yi(d,S,h)});function xm(d,h){var S=yt(d)?un:xD;return S(d,at(h,3))}function mie(d,h,S,_){return d==null?[]:(yt(h)||(h=h==null?[]:[h]),S=_?n:S,yt(S)||(S=S==null?[]:[S]),TD(d,h,S))}var gie=dm(function(d,h,S){d[S?0:1].push(h)},function(){return[[],[]]});function yie(d,h,S){var _=yt(d)?Ov:Y2,P=arguments.length<3;return _(d,at(h,4),S,P,Rs)}function bie(d,h,S){var _=yt(d)?Ate:Y2,P=arguments.length<3;return _(d,at(h,4),S,P,pD)}function vie(d,h){var S=yt(d)?Ns:hD;return S(d,Cm(at(h,3)))}function xie(d){var h=yt(d)?cD:fre;return h(d)}function Sie(d,h,S){(S?wr(d,h,S):h===n)?h=1:h=bt(h);var _=yt(d)?Wne:pre;return _(d,h)}function wie(d){var h=yt(d)?jne:mre;return h(d)}function Cie(d){if(d==null)return 0;if(Pr(d))return km(d)?ec(d):d.length;var h=hr(d);return h==pe||h==U?d.size:Kv(d).length}function Tie(d,h,S){var _=yt(d)?Mv:gre;return S&&wr(d,h,S)&&(h=n),_(d,at(h,3))}var kie=Ct(function(d,h){if(d==null)return[];var S=h.length;return S>1&&wr(d,h[0],h[1])?h=[]:S>2&&wr(h[0],h[1],h[2])&&(h=[h[0]]),TD(d,or(h,1),[])}),Sm=ine||function(){return rr.Date.now()};function Eie(d,h){if(typeof h!="function")throw new Eo(s);return d=bt(d),function(){if(--d<1)return h.apply(this,arguments)}}function bI(d,h,S){return h=S?n:h,h=d&&h==null?d.length:h,Gi(d,A,n,n,n,n,h)}function vI(d,h){var S;if(typeof h!="function")throw new Eo(s);return d=bt(d),function(){return--d>0&&(S=h.apply(this,arguments)),d<=1&&(h=n),S}}var y1=Ct(function(d,h,S){var _=x;if(S.length){var P=Ls(S,lc(y1));_|=k}return Gi(d,_,h,S,P)}),xI=Ct(function(d,h,S){var _=x|w;if(S.length){var P=Ls(S,lc(xI));_|=k}return Gi(h,_,d,S,P)});function SI(d,h,S){h=S?n:h;var _=Gi(d,T,n,n,n,n,n,h);return _.placeholder=SI.placeholder,_}function wI(d,h,S){h=S?n:h;var _=Gi(d,C,n,n,n,n,n,h);return _.placeholder=wI.placeholder,_}function CI(d,h,S){var _,P,H,G,te,ue,Te=0,Ee=!1,De=!1,Ue=!0;if(typeof d!="function")throw new Eo(s);h=Do(h)||0,pn(S)&&(Ee=!!S.leading,De="maxWait"in S,H=De?zn(Do(S.maxWait)||0,h):H,Ue="trailing"in S?!!S.trailing:Ue);function tt(Mn){var Uo=_,es=P;return _=P=n,Te=Mn,G=d.apply(es,Uo),G}function lt(Mn){return Te=Mn,te=cd(Et,h),Ee?tt(Mn):G}function wt(Mn){var Uo=Mn-ue,es=Mn-Te,HI=h-Uo;return De?pr(HI,H-es):HI}function ct(Mn){var Uo=Mn-ue,es=Mn-Te;return ue===n||Uo>=h||Uo<0||De&&es>=H}function Et(){var Mn=Sm();if(ct(Mn))return Mt(Mn);te=cd(Et,wt(Mn))}function Mt(Mn){return te=n,Ue&&_?tt(Mn):(_=P=n,G)}function Xr(){te!==n&&PD(te),Te=0,_=ue=P=te=n}function Cr(){return te===n?G:Mt(Sm())}function Zr(){var Mn=Sm(),Uo=ct(Mn);if(_=arguments,P=this,ue=Mn,Uo){if(te===n)return lt(ue);if(De)return PD(te),te=cd(Et,h),tt(ue)}return te===n&&(te=cd(Et,h)),G}return Zr.cancel=Xr,Zr.flush=Cr,Zr}var _ie=Ct(function(d,h){return fD(d,1,h)}),Oie=Ct(function(d,h,S){return fD(d,Do(h)||0,S)});function Mie(d){return Gi(d,L)}function wm(d,h){if(typeof d!="function"||h!=null&&typeof h!="function")throw new Eo(s);var S=function(){var _=arguments,P=h?h.apply(this,_):_[0],H=S.cache;if(H.has(P))return H.get(P);var G=d.apply(this,_);return S.cache=H.set(P,G)||H,G};return S.cache=new(wm.Cache||Ki),S}wm.Cache=Ki;function Cm(d){if(typeof d!="function")throw new Eo(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 Aie(d){return vI(2,d)}var Die=yre(function(d,h){h=h.length==1&&yt(h[0])?un(h[0],Yr(at())):un(or(h,1),Yr(at()));var S=h.length;return Ct(function(_){for(var P=-1,H=pr(_.length,S);++P<H;)_[P]=h[P].call(this,_[P]);return Kr(d,this,_)})}),b1=Ct(function(d,h){var S=Ls(h,lc(b1));return Gi(d,k,n,h,S)}),TI=Ct(function(d,h){var S=Ls(h,lc(TI));return Gi(d,M,n,h,S)}),Iie=Ji(function(d,h){return Gi(d,I,n,n,n,h)});function Pie(d,h){if(typeof d!="function")throw new Eo(s);return h=h===n?h:bt(h),Ct(d,h)}function Nie(d,h){if(typeof d!="function")throw new Eo(s);return h=h==null?0:zn(bt(h),0),Ct(function(S){var _=S[h],P=zs(S,0,h);return _&&$s(P,_),Kr(d,this,P)})}function $ie(d,h,S){var _=!0,P=!0;if(typeof d!="function")throw new Eo(s);return pn(S)&&(_="leading"in S?!!S.leading:_,P="trailing"in S?!!S.trailing:P),CI(d,h,{leading:_,maxWait:h,trailing:P})}function Lie(d){return bI(d,1)}function Fie(d,h){return b1(n1(h),d)}function Rie(){if(!arguments.length)return[];var d=arguments[0];return yt(d)?d:[d]}function Bie(d){return Oo(d,y)}function Vie(d,h){return h=typeof h=="function"?h:n,Oo(d,y,h)}function zie(d){return Oo(d,p|y)}function Hie(d,h){return h=typeof h=="function"?h:n,Oo(d,p|y,h)}function Wie(d,h){return h==null||dD(d,h,Gn(h))}function jo(d,h){return d===h||d!==d&&h!==h}var jie=mm(jv),Uie=mm(function(d,h){return d>=h}),Wa=yD((function(){return arguments})())?yD:function(d){return Tn(d)&&jt.call(d,"callee")&&!rD.call(d,"callee")},yt=Se.isArray,qie=R2?Yr(R2):ere;function Pr(d){return d!=null&&Tm(d.length)&&!Zi(d)}function On(d){return Tn(d)&&Pr(d)}function Kie(d){return d===!0||d===!1||Tn(d)&&Sr(d)==q}var Hs=ane||M1,Yie=B2?Yr(B2):tre;function Gie(d){return Tn(d)&&d.nodeType===1&&!ud(d)}function Jie(d){if(d==null)return!0;if(Pr(d)&&(yt(d)||typeof d=="string"||typeof d.splice=="function"||Hs(d)||cc(d)||Wa(d)))return!d.length;var h=hr(d);if(h==pe||h==U)return!d.size;if(ld(d))return!Kv(d).length;for(var S in d)if(jt.call(d,S))return!1;return!0}function Xie(d,h){return id(d,h)}function Zie(d,h,S){S=typeof S=="function"?S:n;var _=S?S(d,h):n;return _===n?id(d,h,n,S):!!_}function v1(d){if(!Tn(d))return!1;var h=Sr(d);return h==be||h==se||typeof d.message=="string"&&typeof d.name=="string"&&!ud(d)}function Qie(d){return typeof d=="number"&&iD(d)}function Zi(d){if(!pn(d))return!1;var h=Sr(d);return h==ne||h==le||h==fe||h==Ke}function kI(d){return typeof d=="number"&&d==bt(d)}function Tm(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=Y}function pn(d){var h=typeof d;return d!=null&&(h=="object"||h=="function")}function Tn(d){return d!=null&&typeof d=="object"}var EI=V2?Yr(V2):rre;function ese(d,h){return d===h||qv(d,h,c1(h))}function tse(d,h,S){return S=typeof S=="function"?S:n,qv(d,h,c1(h),S)}function nse(d){return _I(d)&&d!=+d}function rse(d){if(Vre(d))throw new gt(i);return bD(d)}function ose(d){return d===null}function ise(d){return d==null}function _I(d){return typeof d=="number"||Tn(d)&&Sr(d)==Oe}function ud(d){if(!Tn(d)||Sr(d)!=Fe)return!1;var h=Xh(d);if(h===null)return!0;var S=jt.call(h,"constructor")&&h.constructor;return typeof S=="function"&&S instanceof S&&Kh.call(S)==tne}var x1=z2?Yr(z2):ore;function sse(d){return kI(d)&&d>=-Y&&d<=Y}var OI=H2?Yr(H2):ire;function km(d){return typeof d=="string"||!yt(d)&&Tn(d)&&Sr(d)==Z}function Jr(d){return typeof d=="symbol"||Tn(d)&&Sr(d)==he}var cc=W2?Yr(W2):sre;function ase(d){return d===n}function lse(d){return Tn(d)&&hr(d)==Pe}function cse(d){return Tn(d)&&Sr(d)==Ae}var use=mm(Yv),dse=mm(function(d,h){return d<=h});function MI(d){if(!d)return[];if(Pr(d))return km(d)?Ho(d):Ir(d);if(Xu&&d[Xu])return Wte(d[Xu]());var h=hr(d),S=h==pe?$v:h==U?jh:uc;return S(d)}function Qi(d){if(!d)return d===0?d:0;if(d=Do(d),d===W||d===-W){var h=d<0?-1:1;return h*X}return d===d?d:0}function bt(d){var h=Qi(d),S=h%1;return h===h?S?h-S:h:0}function AI(d){return d?Ba(bt(d),0,Q):0}function Do(d){if(typeof d=="number")return d;if(Jr(d))return K;if(pn(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=pn(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=G2(d);var S=qee.test(d);return S||Yee.test(d)?Ete(d.slice(2),S?2:8):Uee.test(d)?K:+d}function DI(d){return hi(d,Nr(d))}function fse(d){return d?Ba(bt(d),-Y,Y):d===0?d:0}function Ht(d){return d==null?"":Gr(d)}var pse=sc(function(d,h){if(ld(h)||Pr(h)){hi(h,Gn(h),d);return}for(var S in h)jt.call(h,S)&&nd(d,S,h[S])}),II=sc(function(d,h){hi(h,Nr(h),d)}),Em=sc(function(d,h,S,_){hi(h,Nr(h),d,_)}),hse=sc(function(d,h,S,_){hi(h,Gn(h),d,_)}),mse=Ji(zv);function gse(d,h){var S=ic(d);return h==null?S:uD(S,h)}var yse=Ct(function(d,h){d=Jt(d);var S=-1,_=h.length,P=_>2?h[2]:n;for(P&&wr(h[0],h[1],P)&&(_=1);++S<_;)for(var H=h[S],G=Nr(H),te=-1,ue=G.length;++te<ue;){var Te=G[te],Ee=d[Te];(Ee===n||jo(Ee,nc[Te])&&!jt.call(d,Te))&&(d[Te]=H[Te])}return d}),bse=Ct(function(d){return d.push(n,GD),Kr(PI,n,d)});function vse(d,h){return U2(d,at(h,3),pi)}function xse(d,h){return U2(d,at(h,3),Wv)}function Sse(d,h){return d==null?d:Hv(d,at(h,3),Nr)}function wse(d,h){return d==null?d:mD(d,at(h,3),Nr)}function Cse(d,h){return d&&pi(d,at(h,3))}function Tse(d,h){return d&&Wv(d,at(h,3))}function kse(d){return d==null?[]:am(d,Gn(d))}function Ese(d){return d==null?[]:am(d,Nr(d))}function S1(d,h,S){var _=d==null?n:Va(d,h);return _===n?S:_}function _se(d,h){return d!=null&&ZD(d,h,Jne)}function w1(d,h){return d!=null&&ZD(d,h,Xne)}var Ose=jD(function(d,h,S){h!=null&&typeof h.toString!="function"&&(h=Yh.call(h)),d[h]=S},T1($r)),Mse=jD(function(d,h,S){h!=null&&typeof h.toString!="function"&&(h=Yh.call(h)),jt.call(d,h)?d[h].push(S):d[h]=[S]},at),Ase=Ct(od);function Gn(d){return Pr(d)?lD(d):Kv(d)}function Nr(d){return Pr(d)?lD(d,!0):are(d)}function Dse(d,h){var S={};return h=at(h,3),pi(d,function(_,P,H){Yi(S,h(_,P,H),_)}),S}function Ise(d,h){var S={};return h=at(h,3),pi(d,function(_,P,H){Yi(S,P,h(_,P,H))}),S}var Pse=sc(function(d,h,S){lm(d,h,S)}),PI=sc(function(d,h,S,_){lm(d,h,S,_)}),Nse=Ji(function(d,h){var S={};if(d==null)return S;var _=!1;h=un(h,function(H){return H=Vs(H,d),_||(_=H.length>1),H}),hi(d,a1(d),S),_&&(S=Oo(S,p|m|y,Ore));for(var P=h.length;P--;)Qv(S,h[P]);return S});function $se(d,h){return NI(d,Cm(at(h)))}var Lse=Ji(function(d,h){return d==null?{}:cre(d,h)});function NI(d,h){if(d==null)return{};var S=un(a1(d),function(_){return[_]});return h=at(h),kD(d,S,function(_,P){return h(_,P[0])})}function Fse(d,h,S){h=Vs(h,d);var _=-1,P=h.length;for(P||(P=1,d=n);++_<P;){var H=d==null?n:d[mi(h[_])];H===n&&(_=P,H=S),d=Zi(H)?H.call(d):H}return d}function Rse(d,h,S){return d==null?d:sd(d,h,S)}function Bse(d,h,S,_){return _=typeof _=="function"?_:n,d==null?d:sd(d,h,S,_)}var $I=KD(Gn),LI=KD(Nr);function Vse(d,h,S){var _=yt(d),P=_||Hs(d)||cc(d);if(h=at(h,4),S==null){var H=d&&d.constructor;P?S=_?new H:[]:pn(d)?S=Zi(H)?ic(Xh(d)):{}:S={}}return(P?ko:pi)(d,function(G,te,ue){return h(S,G,te,ue)}),S}function zse(d,h){return d==null?!0:Qv(d,h)}function Hse(d,h,S){return d==null?d:AD(d,h,n1(S))}function Wse(d,h,S,_){return _=typeof _=="function"?_:n,d==null?d:AD(d,h,n1(S),_)}function uc(d){return d==null?[]:Nv(d,Gn(d))}function jse(d){return d==null?[]:Nv(d,Nr(d))}function Use(d,h,S){return S===n&&(S=h,h=n),S!==n&&(S=Do(S),S=S===S?S:0),h!==n&&(h=Do(h),h=h===h?h:0),Ba(Do(d),h,S)}function qse(d,h,S){return h=Qi(h),S===n?(S=h,h=0):S=Qi(S),d=Do(d),Zne(d,h,S)}function Kse(d,h,S){if(S&&typeof S!="boolean"&&wr(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=Qi(d),h===n?(h=d,d=0):h=Qi(h)),d>h){var _=d;d=h,h=_}if(S||d%1||h%1){var P=sD();return pr(d+P*(h-d+kte("1e-"+((P+"").length-1))),h)}return Jv(d,h)}var Yse=ac(function(d,h,S){return h=h.toLowerCase(),d+(S?FI(h):h)});function FI(d){return C1(Ht(d).toLowerCase())}function RI(d){return d=Ht(d),d&&d.replace(Jee,Rte).replace(mte,"")}function Gse(d,h,S){d=Ht(d),h=Gr(h);var _=d.length;S=S===n?_:Ba(bt(S),0,_);var P=S;return S-=h.length,S>=0&&d.slice(S,P)==h}function Jse(d){return d=Ht(d),d&&Na.test(d)?d.replace(fr,Bte):d}function Xse(d){return d=Ht(d),d&&Lee.test(d)?d.replace(bv,"\\$&"):d}var Zse=ac(function(d,h,S){return d+(S?"-":"")+h.toLowerCase()}),Qse=ac(function(d,h,S){return d+(S?" ":"")+h.toLowerCase()}),eae=zD("toLowerCase");function tae(d,h,S){d=Ht(d),h=bt(h);var _=h?ec(d):0;if(!h||_>=h)return d;var P=(h-_)/2;return hm(tm(P),S)+d+hm(em(P),S)}function nae(d,h,S){d=Ht(d),h=bt(h);var _=h?ec(d):0;return h&&_<h?d+hm(h-_,S):d}function rae(d,h,S){d=Ht(d),h=bt(h);var _=h?ec(d):0;return h&&_<h?hm(h-_,S)+d:d}function oae(d,h,S){return S||h==null?h=0:h&&(h=+h),dne(Ht(d).replace(vv,""),h||0)}function iae(d,h,S){return(S?wr(d,h,S):h===n)?h=1:h=bt(h),Xv(Ht(d),h)}function sae(){var d=arguments,h=Ht(d[0]);return d.length<3?h:h.replace(d[1],d[2])}var aae=ac(function(d,h,S){return d+(S?"_":"")+h.toLowerCase()});function lae(d,h,S){return S&&typeof S!="number"&&wr(d,h,S)&&(h=S=n),S=S===n?Q:S>>>0,S?(d=Ht(d),d&&(typeof h=="string"||h!=null&&!x1(h))&&(h=Gr(h),!h&&Ql(d))?zs(Ho(d),0,S):d.split(h,S)):[]}var cae=ac(function(d,h,S){return d+(S?" ":"")+C1(h)});function uae(d,h,S){return d=Ht(d),S=S==null?0:Ba(bt(S),0,d.length),h=Gr(h),d.slice(S,S+h.length)==h}function dae(d,h,S){var _=R.templateSettings;S&&wr(d,h,S)&&(h=n),d=Ht(d),h=Em({},h,_,YD);var P=Em({},h.imports,_.imports,YD),H=Gn(P),G=Nv(P,H),te,ue,Te=0,Ee=h.interpolate||Bh,De="__p += '",Ue=Lv((h.escape||Bh).source+"|"+Ee.source+"|"+(Ee===ht?jee:Bh).source+"|"+(h.evaluate||Bh).source+"|$","g"),tt="//# sourceURL="+(jt.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xte+"]")+`
|
|
91
|
-
`;d.replace(Ue,function(ct,Et,Mt,Xr,Cr,Zr){return Mt||(Mt=Xr),De+=d.slice(Te,Zr).replace(Xee,Vte),Et&&(te=!0,De+=`' +
|
|
92
|
-
__e(`+Et+`) +
|
|
93
|
-
'`),Cr&&(ue=!0,De+=`';
|
|
94
|
-
`+Cr+`;
|
|
95
|
-
__p += '`),Mt&&(De+=`' +
|
|
96
|
-
((__t = (`+Mt+`)) == null ? '' : __t) +
|
|
97
|
-
'`),Te=Zr+ct.length,ct}),De+=`';
|
|
98
|
-
`;var lt=jt.call(h,"variable")&&h.variable;if(!lt)De=`with (obj) {
|
|
99
|
-
`+De+`
|
|
100
|
-
}
|
|
101
|
-
`;else if(Hee.test(lt))throw new gt(a);De=(ue?De.replace(et,""):De).replace(it,"$1").replace(zt,"$1;"),De="function("+(lt||"obj")+`) {
|
|
102
|
-
`+(lt?"":`obj || (obj = {});
|
|
103
|
-
`)+"var __t, __p = ''"+(te?", __e = _.escape":"")+(ue?`, __j = Array.prototype.join;
|
|
104
|
-
function print() { __p += __j.call(arguments, '') }
|
|
105
|
-
`:`;
|
|
106
|
-
`)+De+`return __p
|
|
107
|
-
}`;var wt=VI(function(){return Ft(H,tt+"return "+De).apply(n,G)});if(wt.source=De,v1(wt))throw wt;return wt}function fae(d){return Ht(d).toLowerCase()}function pae(d){return Ht(d).toUpperCase()}function hae(d,h,S){if(d=Ht(d),d&&(S||h===n))return G2(d);if(!d||!(h=Gr(h)))return d;var _=Ho(d),P=Ho(h),H=J2(_,P),G=X2(_,P)+1;return zs(_,H,G).join("")}function mae(d,h,S){if(d=Ht(d),d&&(S||h===n))return d.slice(0,Q2(d)+1);if(!d||!(h=Gr(h)))return d;var _=Ho(d),P=X2(_,Ho(h))+1;return zs(_,0,P).join("")}function gae(d,h,S){if(d=Ht(d),d&&(S||h===n))return d.replace(vv,"");if(!d||!(h=Gr(h)))return d;var _=Ho(d),P=J2(_,Ho(h));return zs(_,P).join("")}function yae(d,h){var S=O,_=N;if(pn(h)){var P="separator"in h?h.separator:P;S="length"in h?bt(h.length):S,_="omission"in h?Gr(h.omission):_}d=Ht(d);var H=d.length;if(Ql(d)){var G=Ho(d);H=G.length}if(S>=H)return d;var te=S-ec(_);if(te<1)return _;var ue=G?zs(G,0,te).join(""):d.slice(0,te);if(P===n)return ue+_;if(G&&(te+=ue.length-te),x1(P)){if(d.slice(te).search(P)){var Te,Ee=ue;for(P.global||(P=Lv(P.source,Ht(y2.exec(P))+"g")),P.lastIndex=0;Te=P.exec(Ee);)var De=Te.index;ue=ue.slice(0,De===n?te:De)}}else if(d.indexOf(Gr(P),te)!=te){var Ue=ue.lastIndexOf(P);Ue>-1&&(ue=ue.slice(0,Ue))}return ue+_}function bae(d){return d=Ht(d),d&&zo.test(d)?d.replace(tr,Kte):d}var vae=ac(function(d,h,S){return d+(S?" ":"")+h.toUpperCase()}),C1=zD("toUpperCase");function BI(d,h,S){return d=Ht(d),h=S?n:h,h===n?Hte(d)?Jte(d):Pte(d):d.match(h)||[]}var VI=Ct(function(d,h){try{return Kr(d,n,h)}catch(S){return v1(S)?S:new gt(S)}}),xae=Ji(function(d,h){return ko(h,function(S){S=mi(S),Yi(d,S,y1(d[S],d))}),d});function Sae(d){var h=d==null?0:d.length,S=at();return d=h?un(d,function(_){if(typeof _[1]!="function")throw new Eo(s);return[S(_[0]),_[1]]}):[],Ct(function(_){for(var P=-1;++P<h;){var H=d[P];if(Kr(H[0],this,_))return Kr(H[1],this,_)}})}function wae(d){return Kne(Oo(d,p))}function T1(d){return function(){return d}}function Cae(d,h){return d==null||d!==d?h:d}var Tae=WD(),kae=WD(!0);function $r(d){return d}function k1(d){return vD(typeof d=="function"?d:Oo(d,p))}function Eae(d){return SD(Oo(d,p))}function _ae(d,h){return wD(d,Oo(h,p))}var Oae=Ct(function(d,h){return function(S){return od(S,d,h)}}),Mae=Ct(function(d,h){return function(S){return od(d,S,h)}});function E1(d,h,S){var _=Gn(h),P=am(h,_);S==null&&!(pn(h)&&(P.length||!_.length))&&(S=h,h=d,d=this,P=am(h,Gn(h)));var H=!(pn(S)&&"chain"in S)||!!S.chain,G=Zi(d);return ko(P,function(te){var ue=h[te];d[te]=ue,G&&(d.prototype[te]=function(){var Te=this.__chain__;if(H||Te){var Ee=d(this.__wrapped__),De=Ee.__actions__=Ir(this.__actions__);return De.push({func:ue,args:arguments,thisArg:d}),Ee.__chain__=Te,Ee}return ue.apply(d,$s([this.value()],arguments))})}),d}function Aae(){return rr._===this&&(rr._=nne),this}function _1(){}function Dae(d){return d=bt(d),Ct(function(h){return CD(h,d)})}var Iae=o1(un),Pae=o1(j2),Nae=o1(Mv);function zI(d){return d1(d)?Av(mi(d)):ure(d)}function $ae(d){return function(h){return d==null?n:Va(d,h)}}var Lae=UD(),Fae=UD(!0);function O1(){return[]}function M1(){return!1}function Rae(){return{}}function Bae(){return""}function Vae(){return!0}function zae(d,h){if(d=bt(d),d<1||d>Y)return[];var S=Q,_=pr(d,Q);h=at(h),d-=Q;for(var P=Pv(_,h);++S<d;)h(S);return P}function Hae(d){return yt(d)?un(d,mi):Jr(d)?[d]:Ir(aI(Ht(d)))}function Wae(d){var h=++ene;return Ht(d)+h}var jae=pm(function(d,h){return d+h},0),Uae=i1("ceil"),qae=pm(function(d,h){return d/h},1),Kae=i1("floor");function Yae(d){return d&&d.length?sm(d,$r,jv):n}function Gae(d,h){return d&&d.length?sm(d,at(h,2),jv):n}function Jae(d){return K2(d,$r)}function Xae(d,h){return K2(d,at(h,2))}function Zae(d){return d&&d.length?sm(d,$r,Yv):n}function Qae(d,h){return d&&d.length?sm(d,at(h,2),Yv):n}var ele=pm(function(d,h){return d*h},1),tle=i1("round"),nle=pm(function(d,h){return d-h},0);function rle(d){return d&&d.length?Iv(d,$r):0}function ole(d,h){return d&&d.length?Iv(d,at(h,2)):0}return R.after=Eie,R.ary=bI,R.assign=pse,R.assignIn=II,R.assignInWith=Em,R.assignWith=hse,R.at=mse,R.before=vI,R.bind=y1,R.bindAll=xae,R.bindKey=xI,R.castArray=Rie,R.chain=mI,R.chunk=Kre,R.compact=Yre,R.concat=Gre,R.cond=Sae,R.conforms=wae,R.constant=T1,R.countBy=rie,R.create=gse,R.curry=SI,R.curryRight=wI,R.debounce=CI,R.defaults=yse,R.defaultsDeep=bse,R.defer=_ie,R.delay=Oie,R.difference=Jre,R.differenceBy=Xre,R.differenceWith=Zre,R.drop=Qre,R.dropRight=eoe,R.dropRightWhile=toe,R.dropWhile=noe,R.fill=roe,R.filter=iie,R.flatMap=lie,R.flatMapDeep=cie,R.flatMapDepth=uie,R.flatten=dI,R.flattenDeep=ooe,R.flattenDepth=ioe,R.flip=Mie,R.flow=Tae,R.flowRight=kae,R.fromPairs=soe,R.functions=kse,R.functionsIn=Ese,R.groupBy=die,R.initial=loe,R.intersection=coe,R.intersectionBy=uoe,R.intersectionWith=doe,R.invert=Ose,R.invertBy=Mse,R.invokeMap=pie,R.iteratee=k1,R.keyBy=hie,R.keys=Gn,R.keysIn=Nr,R.map=xm,R.mapKeys=Dse,R.mapValues=Ise,R.matches=Eae,R.matchesProperty=_ae,R.memoize=wm,R.merge=Pse,R.mergeWith=PI,R.method=Oae,R.methodOf=Mae,R.mixin=E1,R.negate=Cm,R.nthArg=Dae,R.omit=Nse,R.omitBy=$se,R.once=Aie,R.orderBy=mie,R.over=Iae,R.overArgs=Die,R.overEvery=Pae,R.overSome=Nae,R.partial=b1,R.partialRight=TI,R.partition=gie,R.pick=Lse,R.pickBy=NI,R.property=zI,R.propertyOf=$ae,R.pull=moe,R.pullAll=pI,R.pullAllBy=goe,R.pullAllWith=yoe,R.pullAt=boe,R.range=Lae,R.rangeRight=Fae,R.rearg=Iie,R.reject=vie,R.remove=voe,R.rest=Pie,R.reverse=m1,R.sampleSize=Sie,R.set=Rse,R.setWith=Bse,R.shuffle=wie,R.slice=xoe,R.sortBy=kie,R.sortedUniq=_oe,R.sortedUniqBy=Ooe,R.split=lae,R.spread=Nie,R.tail=Moe,R.take=Aoe,R.takeRight=Doe,R.takeRightWhile=Ioe,R.takeWhile=Poe,R.tap=Yoe,R.throttle=$ie,R.thru=vm,R.toArray=MI,R.toPairs=$I,R.toPairsIn=LI,R.toPath=Hae,R.toPlainObject=DI,R.transform=Vse,R.unary=Lie,R.union=Noe,R.unionBy=$oe,R.unionWith=Loe,R.uniq=Foe,R.uniqBy=Roe,R.uniqWith=Boe,R.unset=zse,R.unzip=g1,R.unzipWith=hI,R.update=Hse,R.updateWith=Wse,R.values=uc,R.valuesIn=jse,R.without=Voe,R.words=BI,R.wrap=Fie,R.xor=zoe,R.xorBy=Hoe,R.xorWith=Woe,R.zip=joe,R.zipObject=Uoe,R.zipObjectDeep=qoe,R.zipWith=Koe,R.entries=$I,R.entriesIn=LI,R.extend=II,R.extendWith=Em,E1(R,R),R.add=jae,R.attempt=VI,R.camelCase=Yse,R.capitalize=FI,R.ceil=Uae,R.clamp=Use,R.clone=Bie,R.cloneDeep=zie,R.cloneDeepWith=Hie,R.cloneWith=Vie,R.conformsTo=Wie,R.deburr=RI,R.defaultTo=Cae,R.divide=qae,R.endsWith=Gse,R.eq=jo,R.escape=Jse,R.escapeRegExp=Xse,R.every=oie,R.find=sie,R.findIndex=cI,R.findKey=vse,R.findLast=aie,R.findLastIndex=uI,R.findLastKey=xse,R.floor=Kae,R.forEach=gI,R.forEachRight=yI,R.forIn=Sse,R.forInRight=wse,R.forOwn=Cse,R.forOwnRight=Tse,R.get=S1,R.gt=jie,R.gte=Uie,R.has=_se,R.hasIn=w1,R.head=fI,R.identity=$r,R.includes=fie,R.indexOf=aoe,R.inRange=qse,R.invoke=Ase,R.isArguments=Wa,R.isArray=yt,R.isArrayBuffer=qie,R.isArrayLike=Pr,R.isArrayLikeObject=On,R.isBoolean=Kie,R.isBuffer=Hs,R.isDate=Yie,R.isElement=Gie,R.isEmpty=Jie,R.isEqual=Xie,R.isEqualWith=Zie,R.isError=v1,R.isFinite=Qie,R.isFunction=Zi,R.isInteger=kI,R.isLength=Tm,R.isMap=EI,R.isMatch=ese,R.isMatchWith=tse,R.isNaN=nse,R.isNative=rse,R.isNil=ise,R.isNull=ose,R.isNumber=_I,R.isObject=pn,R.isObjectLike=Tn,R.isPlainObject=ud,R.isRegExp=x1,R.isSafeInteger=sse,R.isSet=OI,R.isString=km,R.isSymbol=Jr,R.isTypedArray=cc,R.isUndefined=ase,R.isWeakMap=lse,R.isWeakSet=cse,R.join=foe,R.kebabCase=Zse,R.last=Ao,R.lastIndexOf=poe,R.lowerCase=Qse,R.lowerFirst=eae,R.lt=use,R.lte=dse,R.max=Yae,R.maxBy=Gae,R.mean=Jae,R.meanBy=Xae,R.min=Zae,R.minBy=Qae,R.stubArray=O1,R.stubFalse=M1,R.stubObject=Rae,R.stubString=Bae,R.stubTrue=Vae,R.multiply=ele,R.nth=hoe,R.noConflict=Aae,R.noop=_1,R.now=Sm,R.pad=tae,R.padEnd=nae,R.padStart=rae,R.parseInt=oae,R.random=Kse,R.reduce=yie,R.reduceRight=bie,R.repeat=iae,R.replace=sae,R.result=Fse,R.round=tle,R.runInContext=ae,R.sample=xie,R.size=Cie,R.snakeCase=aae,R.some=Tie,R.sortedIndex=Soe,R.sortedIndexBy=woe,R.sortedIndexOf=Coe,R.sortedLastIndex=Toe,R.sortedLastIndexBy=koe,R.sortedLastIndexOf=Eoe,R.startCase=cae,R.startsWith=uae,R.subtract=nle,R.sum=rle,R.sumBy=ole,R.template=dae,R.times=zae,R.toFinite=Qi,R.toInteger=bt,R.toLength=AI,R.toLower=fae,R.toNumber=Do,R.toSafeInteger=fse,R.toString=Ht,R.toUpper=pae,R.trim=hae,R.trimEnd=mae,R.trimStart=gae,R.truncate=yae,R.unescape=bae,R.uniqueId=Wae,R.upperCase=vae,R.upperFirst=C1,R.each=gI,R.eachRight=yI,R.first=fI,E1(R,(function(){var d={};return pi(R,function(h,S){jt.call(R.prototype,S)||(d[S]=h)}),d})(),{chain:!1}),R.VERSION=r,ko(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){R[d].placeholder=R}),ko(["drop","take"],function(d,h){_t.prototype[d]=function(S){S=S===n?1:zn(bt(S),0);var _=this.__filtered__&&!h?new _t(this):this.clone();return _.__filtered__?_.__takeCount__=pr(S,_.__takeCount__):_.__views__.push({size:pr(S,Q),type:d+(_.__dir__<0?"Right":"")}),_},_t.prototype[d+"Right"]=function(S){return this.reverse()[d](S).reverse()}}),ko(["filter","map","takeWhile"],function(d,h){var S=h+1,_=S==z||S==B;_t.prototype[d]=function(P){var H=this.clone();return H.__iteratees__.push({iteratee:at(P,3),type:S}),H.__filtered__=H.__filtered__||_,H}}),ko(["head","last"],function(d,h){var S="take"+(h?"Right":"");_t.prototype[d]=function(){return this[S](1).value()[0]}}),ko(["initial","tail"],function(d,h){var S="drop"+(h?"":"Right");_t.prototype[d]=function(){return this.__filtered__?new _t(this):this[S](1)}}),_t.prototype.compact=function(){return this.filter($r)},_t.prototype.find=function(d){return this.filter(d).head()},_t.prototype.findLast=function(d){return this.reverse().find(d)},_t.prototype.invokeMap=Ct(function(d,h){return typeof d=="function"?new _t(this):this.map(function(S){return od(S,d,h)})}),_t.prototype.reject=function(d){return this.filter(Cm(at(d)))},_t.prototype.slice=function(d,h){d=bt(d);var S=this;return S.__filtered__&&(d>0||h<0)?new _t(S):(d<0?S=S.takeRight(-d):d&&(S=S.drop(d)),h!==n&&(h=bt(h),S=h<0?S.dropRight(-h):S.take(h-d)),S)},_t.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},_t.prototype.toArray=function(){return this.take(Q)},pi(_t.prototype,function(d,h){var S=/^(?:filter|find|map|reject)|While$/.test(h),_=/^(?:head|last)$/.test(h),P=R[_?"take"+(h=="last"?"Right":""):h],H=_||/^find/.test(h);P&&(R.prototype[h]=function(){var G=this.__wrapped__,te=_?[1]:arguments,ue=G instanceof _t,Te=te[0],Ee=ue||yt(G),De=function(Et){var Mt=P.apply(R,$s([Et],te));return _&&Ue?Mt[0]:Mt};Ee&&S&&typeof Te=="function"&&Te.length!=1&&(ue=Ee=!1);var Ue=this.__chain__,tt=!!this.__actions__.length,lt=H&&!Ue,wt=ue&&!tt;if(!H&&Ee){G=wt?G:new _t(this);var ct=d.apply(G,te);return ct.__actions__.push({func:vm,args:[De],thisArg:n}),new _o(ct,Ue)}return lt&&wt?d.apply(this,te):(ct=this.thru(De),lt?_?ct.value()[0]:ct.value():ct)})}),ko(["pop","push","shift","sort","splice","unshift"],function(d){var h=Uh[d],S=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",_=/^(?:pop|shift)$/.test(d);R.prototype[d]=function(){var P=arguments;if(_&&!this.__chain__){var H=this.value();return h.apply(yt(H)?H:[],P)}return this[S](function(G){return h.apply(yt(G)?G:[],P)})}}),pi(_t.prototype,function(d,h){var S=R[h];if(S){var _=S.name+"";jt.call(oc,_)||(oc[_]=[]),oc[_].push({name:h,func:S})}}),oc[fm(n,w).name]=[{name:"wrapper",func:n}],_t.prototype.clone=bne,_t.prototype.reverse=vne,_t.prototype.value=xne,R.prototype.at=Goe,R.prototype.chain=Joe,R.prototype.commit=Xoe,R.prototype.next=Zoe,R.prototype.plant=eie,R.prototype.reverse=tie,R.prototype.toJSON=R.prototype.valueOf=R.prototype.value=nie,R.prototype.first=R.prototype.head,Xu&&(R.prototype[Xu]=Qoe),R}),tc=Xte();$a?(($a.exports=tc)._=tc,kv._=tc):rr._=tc}).call(OL)})(Tc,Tc.exports)),Tc.exports}var yg=ML();const AL=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:c,filterOptions:u=M=>M,includeInputInList:f=!0,autoComplete:p=!0,...m}=t,{control:y}=dn(),b=fc({control:y,name:e}),[g,x]=J.useState(""),[w,E]=J.useState([]),[T,C]=J.useState(!1),k=yg.debounce(async(M,A)=>{try{C(!0);const I=await o(M.input);A(I)}catch(I){i(I),A(void 0)}finally{C(!1)}},400);return J.useEffect(()=>{if(g===""){E(b?[b]:[]);return}g.length>=s&&k({input:g},M=>{let A=[];M?(A=M,b&&(A=[b,...M.filter(I=>JSON.stringify(I)!==JSON.stringify(b))])):b&&(A=[b]),E(A)})},[b,g,s]),v.jsx(NS,{name:e,loading:T,filterOptions:u,noOptionsText:g.length<s?a:c,options:w,autoComplete:p,includeInputInList:f,onChange:(M,A,I,L)=>{E(A?[A,...w]:w),r&&r(M,A,I,L)},onInputChange:(M,A,I)=>{x(A),n&&n(M,A,I)},...m})},DL=t=>{const{name:e,label:n=ar(e),options:r=[],filterSelectedOptions:o=!0,variant:i="outlined",staticLabel:s=!1,staticLabelProps:a={fontSize:".9em",color:"#808080"},readOnly:c,margin:u="dense",fullWidth:f=!0,required:p,onChange:m,getOptionLabel:y=A=>typeof A=="string"?A:String(A),isOptionEqualToValue:b=(A,I)=>JSON.stringify(A)===JSON.stringify(I),useFieldAsValue:g,...x}=t,{setValue:w,getValues:E,formState:{errors:T},control:C}=dn(),k={...eo(x,["useFieldAsValue"]),getOptionLabel:y,options:r,filterSelectedOptions:o,isOptionEqualToValue:b,renderInput:A=>v.jsx(j.TextField,{...A,variant:i,label:s?void 0:n,error:!!T[e],required:p}),onChange:(A,I,L,O)=>{g?w(e,I.map(N=>N[g]),{shouldValidate:!0}):w(e,I,{shouldValidate:!0}),m&&m(A,I,L,O)},fullWidth:!0,value:g?r.filter(A=>E(e).includes(A[g]))||[]:E(e),slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}},M=()=>E(e).length===0?"":(g?r.filter(I=>E(e).includes(I[g]))||[]:E(e)).map(I=>y(I)).join(", ");return v.jsx(ir,{name:e,control:C,render:()=>v.jsxs(j.FormControl,{margin:u,fullWidth:f,required:p,children:[(s||c)&&v.jsx(j.Typography,{...a,children:n}),c?v.jsx(j.Typography,{children:M()}):v.jsxs(j.Box,{children:[v.jsx(j.Autocomplete,{...k,multiple:!0}),v.jsx(io,{name:e,id:`${e}-err`})]})]})})},IL=t=>{const{name:e,label:n=ar(e),sublabel:r,required:o=!1,labelPlacement:i="end",labelAlignment:s=i==="end"||i==="start"?"top":"center",readOnly:a=!1,staticLabelProps:c={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:y}=dn(),b=r?v.jsxs("div",{children:[v.jsx("p",{style:{margin:0},children:n}),v.jsx(j.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:r})]}):n,g=s==="top"&&(i==="start"||i==="end");return a?v.jsx(ir,{name:e,control:p,render:({})=>y(e)&&v.jsx(j.Typography,{...c,children:b})}):v.jsx(ir,{name:e,control:p,render:({field:x})=>v.jsxs(j.Box,{children:[v.jsx(j.FormControlLabel,{sx:{alignItems:g?"flex-start":"center"},label:v.jsx("span",{"data-testid":n,style:{display:"inline-block",marginTop:g?"10px":0},children:b}),required:o,labelPlacement:i,control:v.jsx(j.Checkbox,{"data-testid":"checkbox",...f,...x,onChange:(w,E)=>{m(e,w.target.checked),u&&u(w,E)},checked:x.value})}),v.jsx(io,{name:e,id:`${e}-err`})]})})},PL=t=>{const{name:e,checkboxes:n=[],label:r=ar(e),labelPlacement:o="end",labelAlignment:i=o==="end"||o==="start"?"top":"center",required:s=!1,disabled:a=!1,readOnly:c=!1,min:u=0,max:f=n.length,minMaxSubtitle:p="Please select between {min} and {max} options",maxSubtitle:m="Up to {max} max",minSubtitle:y="Please select {min} or more",margin:b="dense",staticLabelProps:g={fontSize:".9em",color:"#808080"}}=t,{control:x,setValue:w,getValues:E,resetField:T,formState:{errors:C}}=dn();(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=I=>typeof I=="string"?I:!I.textField&&!I.sublabel?I.label:v.jsxs(j.Box,{display:"flex",flexDirection:"row",justifyContent:"center",gap:"0.5rem",alignItems:"baseline",children:[v.jsxs(j.Box,{display:"flex",flexDirection:"column",justifyContent:"center",children:[v.jsx("p",{style:{margin:0},children:I.label}),I.sublabel&&v.jsx(j.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:I.sublabel})]}),I.textField&&v.jsx(j.TextField,{label:"",size:"small",margin:"none",sx:{"& .MuiInputBase-input":{height:14}},...I.textField})]}),A=()=>{if(f<n.length&&u>0)return v.jsx(j.Typography,{variant:"subtitle2",children:p.replace("{min}",`${u}`).replace("{max}",`${f}`)});if(f<n.length)return v.jsx(j.Typography,{variant:"subtitle2",children:m.replace("{max}",`${f}`)});if(u>0)return v.jsx(j.Typography,{variant:"subtitle2",children:y.replace("{min}",`${u}`)})};return v.jsx(ir,{name:e,control:x,render:({field:I})=>v.jsx(j.FormControl,{margin:b,fullWidth:!0,children:c?v.jsxs(j.Box,{children:[v.jsx(j.Typography,{...g,children:r}),E(e).join(", ")]}):v.jsxs(j.FormControl,{onChange:L=>{const O=L.target.value,N=L.target.checked,$=n.find(V=>typeof V=="string"?V===O:V.label===O);N?w(e,[...E(e),O]):($&&typeof $=="object"&&$.textField&&$.textField.name&&T(e),w(e,I.value.filter(V=>V!=O)))},fullWidth:!0,margin:b,error:!!C[e],children:[v.jsx(j.FormLabel,{focused:t.focused,htmlFor:e,required:s,disabled:t.disableLabel,children:r}),A(),n.map(L=>{const O=typeof L=="string"?L:L.label,N=i==="top"&&(o==="start"||o==="end");return v.jsx(j.FormControlLabel,{sx:{alignItems:N?"flex-start":"center"},value:O,control:v.jsx(j.Checkbox,{}),label:v.jsx("div",{"data-testid":typeof L=="string"?L:L.label,style:{marginTop:N?"10px":0},children:M(L)}),labelPlacement:o,checked:E(e).includes(O),disabled:a||!E(e).includes(O)&&E(e).length===f,style:{textAlign:k()}},`checkbox-group-${O}`)}),v.jsx(io,{name:e,id:`${e}-err`})]})})})},LS=Be(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"),NL=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:c,setValue:u,getValues:f,formState:{errors:p}}=dn(),m=t.fileType?Array.isArray(t.fileType)?t.fileType:[t.fileType]:[],y=t.subtitle??(m.length>0?`Allowed file extensions: ${m.join(", ")}`:""),b=M=>{x(Array.from(M.target.files??[]))},g=M=>{M.preventDefault(),x(Array.from(M.dataTransfer.files))},x=M=>{if(M&&M.length>0){const A=f(e)?Array.isArray(f(e))?f(e):[f(e)]:[],I=yg.partition(M,L=>A.find(O=>E(L,O)));if(M=I[1],i&&I[0].length>0&&i(I[0]),m.length>0){const L=yg.partition(M,O=>m.find(N=>O.name.endsWith(N)));M=L[0],s&&L[1].length>0&&s(L[1])}n?u(e,[...w(),...M]):!Array.isArray(f(e))&&M.length>0&&u(e,M[0])}},w=()=>f(e)?Array.isArray(f(e))?f(e):[f(e)]:[],E=(M,A)=>M.lastModified===A.lastModified&&M.name===A.name&&M.type===A.type&&M.size===A.size,T=()=>w().map(M=>M.name).join(", ");return r?v.jsx(j.Typography,{"data-testid":"fileupload-readonly",...a,children:T()}):o==="drag-and-drop"?v.jsx(ir,{name:e,control:c,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:g,onDragOver:M=>M.preventDefault(),"data-testid":"dropzone",children:[v.jsx(LS,{color:"primary",sx:{fontSize:"40px"}}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"baseline"},children:[v.jsx(j.Typography,{children:"Drag and drop or"}),v.jsxs(j.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()})]})]}),y&&v.jsx(j.Typography,{variant:"caption",children:y}),v.jsx(io,{name:e,id:`${e}-err`})]})}):v.jsx(ir,{name:e,control:c,render:()=>v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("div",{style:{display:"flex",alignItems:"center",marginBottom:"4px"},children:v.jsxs(j.Button,{component:"label",role:void 0,variant:"contained",tabIndex:-1,startIcon:v.jsx(LS,{}),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(io,{name:e,id:`${e}-err`})]})})},$L=Be(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"),LL=Be(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"),FL=t=>{const{name:e}=t,{control:n,setValue:r,getValues:o}=dn();return v.jsx(ir,{name:e,control:n,render:()=>v.jsx("div",{style:{width:"100%"},children:o(e).map(i=>v.jsx(j.Card,{sx:{margin:"10px 0px"},children:v.jsxs(j.CardContent,{style:{display:"flex",alignItems:"center",padding:"8px 12px"},children:[v.jsx($L,{sx:{color:"gray",fontSize:"20px"}}),v.jsx(j.Typography,{sx:{padding:"8px",overflowWrap:"anywhere"},children:i.name}),v.jsx(j.IconButton,{"aria-label":"remove file",onClick:()=>r(e,o(e).filter(s=>s!==i)),edge:"end",style:{marginLeft:"auto",order:"2"},children:v.jsx(LL,{})})]})},`${i.name}-${i.type}-${i.size}-${i.lastModified}`))})})},RL=t=>{const{name:e,radios:n=[],label:r=ar(e),labelPlacement:o="end",labelAlignment:i=o==="end"||o==="start"?"top":"center",required:s=!1,disabled:a=!1,readOnly:c=!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:y,getValues:b,formState:{errors:g}}=dn(),x=["radioProps","labelPlacement"],w=["disableRedLabelOnError","disableLabel","sameButtonColor","labelPlacement","focused","margin","fullWidth","labelAlignment"],E=()=>t.labelPlacement=="start"?"right":t.labelPlacement=="top"||t.labelPlacement=="bottom"?"center":"left",T=n.map((A,I)=>{const L=i==="top"&&(o==="start"||o==="end"),O=A.sublabel?v.jsxs("div",{children:[v.jsx("p",{style:{margin:0},children:A.label}),v.jsx(j.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:A.sublabel})]}):A.label;return v.jsx(j.FormControlLabel,{sx:{alignItems:L?"flex-start":"center"},value:I.toString(),control:v.jsx(j.Radio,{id:`${A.value}-rb`,color:t.sameButtonColor?t.sameButtonColor:A.color??"default",...eo({...A},x)}),label:v.jsx("div",{style:{marginTop:L?"10px":0},children:O}),labelPlacement:o,disabled:A.disabled||a,style:{textAlign:E()}},`rb-${I}-${r}`)}),C=()=>{const A=n.find(I=>I.value===b(e));return v.jsxs(j.Box,{children:[v.jsx(j.Typography,{...p,children:r}),k(A)]})},k=A=>v.jsxs(j.Box,{children:[v.jsx(j.Typography,{children:A==null?void 0:A.label}),(A==null?void 0:A.sublabel)&&v.jsx(j.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:A.sublabel})]}),M=A=>{y(e,A.target.value),f&&f(A.target.value)};return v.jsx(ir,{name:e,control:m,render:({})=>v.jsx(j.FormControl,{focused:t.focused,margin:u,fullWidth:t.fullWidth,error:!!g,children:c?C():v.jsxs(v.Fragment,{children:[v.jsx(j.FormLabel,{htmlFor:e,required:s,disabled:t.disableLabel,children:r}),v.jsx(j.RadioGroup,{id:e,value:b(e)??"",...eo({...t},w),onChange:M,children:T}),v.jsx(io,{name:e,id:`${e}-err`})]})})})},BL=t=>{const{name:e,label:n=ar(e),min:r=0,max:o=100,step:i=1,readOnly:s,staticLabelProps:a={fontSize:".9em",color:"#808080"}}=t,{control:c,setValue:u,getValues:f}=dn(),p=["label"];return s?(()=>{let y;const b=f(e);return Array.isArray(b)?y=s==="percent"?`${100*(b[0]??0)/o}% - ${100*(b[1]??0)/o}%`:`${b[0]??0} - ${b[1]??0}`:y=s==="percent"?`${100*(b??0)/o}%`:`${b??0}`,v.jsx(ir,{name:e,control:c,render:({})=>v.jsxs(j.Box,{children:[v.jsx(j.Typography,{...a,children:n}),v.jsx(j.Typography,{children:y})]})})})():v.jsx(ir,{name:e,control:c,render:({})=>v.jsxs(j.FormControl,{fullWidth:!0,children:[v.jsx(j.Typography,{gutterBottom:!0,color:"textSecondary",children:n}),v.jsx(j.Slider,{...eo({...t},p),id:t.name,value:f(e)??0,onChange:(y,b)=>{u(e,b)},min:r,max:o,step:i})]})})},VL=t=>{const{name:e,options:n=[],label:r=ar(e),selectedOptionIcon:o=void 0,staticLabel:i=!1,staticLabelProps:s={fontSize:".9em",color:"#808080"},variant:a="outlined",readOnly:c=!1,margin:u="dense",required:f}=t,{setValue:p,getValues:m,formState:{errors:y},control:b}=dn(),g=D.useCallback(()=>{let L="";for(let O=0;O<n.length;O++)JSON.stringify(n[O].value)===JSON.stringify(m(e))&&(L=O.toString());return L},[n,m(e)]),x=D.useCallback(()=>{const L=[],O=m(e).toString().split(",");for(const N of O)for(let $=0;$<n.length;$++)n[$].value===N&&L.push($);return L},[n,m(e)]);D.useEffect(()=>{T(t.multiple?x():g())},[n,t.multiple,m(e),x,g]);const w=(L,O)=>t.multiple?!!m(e).toString().split(",").find(N=>N===JSON.stringify(L.value)):O===n.findIndex(N=>m(e)===N.value),[E,T]=D.useState(t.multiple?x:g),C=n.map((L,O)=>{const N=o&&w(L,O)?o:void 0;return v.jsxs(j.MenuItem,{id:`select-${e}-option-${L.value}`,value:O,disabled:L.disabled,children:[o&&v.jsx(j.ListItemIcon,{children:N}),L.label]},O.toString())}),k=L=>{if(t.multiple){const O=[];L.target.value.forEach(N=>{n[N].value&&O.push(n[N].value)}),p(e,O.join(","),{shouldValidate:!0})}else p(e,n[L.target.value].value,{shouldValidate:!0});T(L.target.value)},M=["name","options",i?"label":"","required","selectedOptionIcon","variant","staticLabel","staticLabelProps"],A=()=>gP(n,m(e),t.multiple),I=t.renderValue??A;return v.jsx(ir,{name:e,control:b,render:()=>v.jsxs(j.FormControl,{fullWidth:!0,variant:a,error:!!y[e],margin:u,required:f,children:[i||c?v.jsx(j.Typography,{...s,children:r}):v.jsx(j.InputLabel,{id:`${e}-select-label`,children:r}),c?v.jsx(j.Typography,{children:A()}):v.jsxs(j.Box,{children:[v.jsx(j.Select,{id:`${e}-sel`,labelId:`${e}-select-label`,label:i?void 0:r,...eo({...t},M),name:e,value:E,fullWidth:!0,onChange:L=>k(L),displayEmpty:i,renderValue:I,children:C}),v.jsx(io,{name:e,id:`${e}-err`})]})]})})},zL=t=>{const{name:e,label:n=ar(e),labelPlacement:r="end",readOnly:o,staticLabelProps:i={fontSize:".9em",color:"#808080"},onChange:s,color:a="primary",chipColor:c,activeValue:u=!0,inactiveValue:f=!1}=t,{control:p,setValue:m,getValues:y}=dn();y(e)===void 0&&console.error(`Please set an initial value for ${e}`);const b=["labelPlacement","chipColor","activeValue","inactiveValue"],g=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(j.Box,{children:[v.jsx(j.Typography,{...i,children:n}),v.jsx(j.Typography,{children:g(y(e))})]}):v.jsx(ir,{name:e,control:p,render:({field:x})=>v.jsxs(j.Box,{bgcolor:c??"inherit",sx:c?{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"32px",padding:"2px 0px 2px 12px"}:{},children:[v.jsx(j.FormControlLabel,{label:n,sx:{"& .MuiFormControlLabel-label":{color:a}},labelPlacement:r,control:v.jsx(j.Switch,{...eo({...t},b),id:e,...x,onChange:w=>{if(typeof u=="string"&&typeof f=="string"){const E=w.target.checked?u:f;m(e,E),s&&s(E)}else m(e,w.target.checked),s&&s(w.target.checked)},checked:y(e)===u})}),v.jsx(io,{name:e,id:`${e}-err`})]})})},HL=({name:t,format:e="",autoFormat:n,staticLabel:r=!1,staticLabelProps:o={fontSize:".9em",color:"#808080"},readOnly:i=!1,startIcon:s,endIcon:a,margin:c="dense",noTrimOnBlur:u,label:f,placeholder:p,onChange:m,onBlur:y,...b})=>{const g=f??ar(t),x=p??g,w=n??!!e,{control:E}=dn();return!e&&w&&console.error("Can't auto format when there is no format"),v.jsx(ir,{name:t,control:E,render:({field:T,fieldState:C})=>{const k=T.value??"",M=L=>{const O=L.target.value,N=w?mP(O,e,String(k??""),L.target):O;T.onChange(N),m==null||m(L)},A=L=>{if(!u){const O=L.target.value.trim();O!==L.target.value&&T.onChange(O)}T.onBlur(),y==null||y(L)},I=r||i;return v.jsxs(j.FormControl,{margin:c,fullWidth:!0,children:[I&&v.jsx(j.Typography,{...o,children:g}),i?v.jsx(j.Typography,{children:String(k)}):v.jsxs(j.Box,{children:[v.jsx(j.TextField,{...b,...T,id:`${t}-tf`,variant:"outlined",fullWidth:!0,value:k,error:!!C.error,placeholder:x,label:r?void 0:g,onChange:M,onBlur:A,slotProps:{input:{startAdornment:s,endAdornment:a}}}),v.jsx(io,{name:t,id:`${t}-err`})]})]})}})},WL=Be([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"),jL=Be(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"),UL=Be(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"),qL=Be(v.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),KL=Be(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"),YL=Be(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"),GL=Be(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"),JL=Be(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"),FS=Be(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"),XL=Be(v.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenter"),ZL=Be(v.jsx("path",{d:"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z"}),"FormatAlignJustify"),QL=Be(v.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeft"),eF=Be(v.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRight"),tF=Be(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"),nF=Be(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"),rF=Be(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"),oF=Be(v.jsx("path",{d:"M11 17h10v-2H11zm-8-5 4 4V8zm0 9h18v-2H3zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z"}),"FormatIndentDecrease"),iF=Be(v.jsx("path",{d:"M3 21h18v-2H3zM3 8v8l4-4zm8 9h10v-2H11zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z"}),"FormatIndentIncrease"),sF=Be(v.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),aF=Be(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"),lF=Be(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"),cF=Be(v.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"}),"FormatQuote"),uF=Be(v.jsx("path",{d:"M9 4v3h5v12h3V7h5V4zm-6 8h3v7h3v-7h3V9H3z"}),"FormatSize"),dF=Be(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"),fF=Be(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"),pF=Be(v.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRule"),hF=Be(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"),mF=Be(v.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),RS=Be(v.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),BS=Be(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"),VS=Be(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"),gF=Be(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"),yF=Be(v.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),bF=Be(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),vF=Be(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"),xF=Be(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"),SF=Be(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),wF=Be(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"),CF=Be(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"),TF=Be(v.jsx("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort"),kF=Be(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"),EF=Be(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"),_F=Be(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"),OF=Be(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"),MF=t=>{const{onSearch:e,initialValue:n="",lazySearch:r=!1}=t,[o,i]=J.useState(n),s=f=>{i(f.target.value),r||e(f.target.value)},a=f=>{f.key==="Enter"&&c()},c=()=>{e(o)},u=()=>{i(""),e("")};return v.jsx(j.TextField,{type:"text",placeholder:"Search...",value:o,onChange:s,onKeyDown:a,className:"search-bar",size:"small",fullWidth:!0,slotProps:{input:{startAdornment:v.jsx(j.InputAdornment,{position:"start",children:v.jsx(j.IconButton,{"data-testid":"search-button",style:{marginLeft:-10},onClick:c,children:v.jsx(CF,{})})}),endAdornment:o&&v.jsx(j.IconButton,{style:{marginRight:-10},"aria-label":"clear search","data-testid":"clear-search",onClick:u,children:v.jsx(GL,{})})}}})};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 mt(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 ut({props:t,name:e}){return lg({props:t,name:e,defaultTheme:Hd,themeId:al})}const AF=["localeText"],jd=D.createContext(null);process.env.NODE_ENV!=="production"&&(jd.displayName="MuiPickersAdapterContext");const bg=function(e){const{localeText:n}=e,r=mt(e,AF),{utils:o,localeText:i}=D.useContext(jd)??{utils:void 0,localeText:void 0},s=ut({props:r,name:"MuiLocalizationProvider"}),{children:a,dateAdapter:c,dateFormats:u,dateLibInstance:f,adapterLocale:p,localeText:m}=s,y=D.useMemo(()=>ie({},m,i,n),[m,i,n]),b=D.useMemo(()=>{if(!c)return o||null;const w=new c({locale:p,formats:u,instance:f});if(!w.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
|
|
108
|
-
`));return w},[c,p,u,f,o]),g=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:g,localeText:y}),[g,b,y]);return v.jsx(jd.Provider,{value:x,children:a})};process.env.NODE_ENV!=="production"&&(bg.propTypes={adapterLocale:l.any,children:l.node,dateAdapter:l.func,dateFormats:l.shape({dayOfMonth:l.string,dayOfMonthFull:l.string,fullDate:l.string,fullTime:l.string,fullTime12h:l.string,fullTime24h:l.string,hours12h:l.string,hours24h:l.string,keyboardDate:l.string,keyboardDateTime:l.string,keyboardDateTime12h:l.string,keyboardDateTime24h:l.string,meridiem:l.string,minutes:l.string,month:l.string,monthShort:l.string,normalDate:l.string,normalDateWithWeekday:l.string,seconds:l.string,shortDate:l.string,weekday:l.string,weekdayShort:l.string,year:l.string}),dateLibInstance:l.any,localeText:l.object});var Ud={exports:{}},DF=Ud.exports,zS;function IF(){return zS||(zS=1,(function(t,e){(function(n,r){t.exports=r()})(DF,(function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",c="hour",u="day",f="week",p="month",m="quarter",y="year",b="date",g="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var F=["th","st","nd","rd"],B=z%100;return"["+z+(F[(B-20)%10]||F[B]||F[0])+"]"}},T=function(z,F,B){var W=String(z);return!W||W.length>=F?z:""+Array(F+1-W.length).join(B)+z},C={s:T,z:function(z){var F=-z.utcOffset(),B=Math.abs(F),W=Math.floor(B/60),Y=B%60;return(F<=0?"+":"-")+T(W,2,"0")+":"+T(Y,2,"0")},m:function z(F,B){if(F.date()<B.date())return-z(B,F);var W=12*(B.year()-F.year())+(B.month()-F.month()),Y=F.clone().add(W,p),X=B-Y<0,K=F.clone().add(W+(X?-1:1),p);return+(-(W+(B-Y)/(X?Y-K:K-Y))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:p,y,w:f,d:u,D:b,h:c,m:a,s,ms:i,Q:m}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},k="en",M={};M[k]=E;var A="$isDayjsObject",I=function(z){return z instanceof $||!(!z||!z[A])},L=function z(F,B,W){var Y;if(!F)return k;if(typeof F=="string"){var X=F.toLowerCase();M[X]&&(Y=X),B&&(M[X]=B,Y=X);var K=F.split("-");if(!Y&&K.length>1)return z(K[0])}else{var Q=F.name;M[Q]=F,Y=Q}return!W&&Y&&(k=Y),Y||!W&&k},O=function(z,F){if(I(z))return z.clone();var B=typeof F=="object"?F:{};return B.date=z,B.args=arguments,new $(B)},N=C;N.l=L,N.i=I,N.w=function(z,F){return O(z,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var $=(function(){function z(B){this.$L=L(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[A]=!0}var F=z.prototype;return F.parse=function(B){this.$d=(function(W){var Y=W.date,X=W.utc;if(Y===null)return new Date(NaN);if(N.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var K=Y.match(x);if(K){var Q=K[2]-1||0,ve=(K[7]||"0").substring(0,3);return X?new Date(Date.UTC(K[1],Q,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ve)):new Date(K[1],Q,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ve)}}return new Date(Y)})(B),this.init()},F.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},F.$utils=function(){return N},F.isValid=function(){return this.$d.toString()!==g},F.isSame=function(B,W){var Y=O(B);return this.startOf(W)<=Y&&Y<=this.endOf(W)},F.isAfter=function(B,W){return O(B)<this.startOf(W)},F.isBefore=function(B,W){return this.endOf(W)<O(B)},F.$g=function(B,W,Y){return N.u(B)?this[W]:this.set(Y,B)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(B,W){var Y=this,X=!!N.u(W)||W,K=N.p(B),Q=function(ee,se){var be=N.w(Y.$u?Date.UTC(Y.$y,se,ee):new Date(Y.$y,se,ee),Y);return X?be:be.endOf(u)},ve=function(ee,se){return N.w(Y.toDate()[ee].apply(Y.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(se)),Y)},xe=this.$W,ye=this.$M,oe=this.$D,ce="set"+(this.$u?"UTC":"");switch(K){case y:return X?Q(1,0):Q(31,11);case p:return X?Q(1,ye):Q(0,ye+1);case f:var fe=this.$locale().weekStart||0,q=(xe<fe?xe+7:xe)-fe;return Q(X?oe-q:oe+(6-q),ye);case u:case b:return ve(ce+"Hours",0);case c:return ve(ce+"Minutes",1);case a:return ve(ce+"Seconds",2);case s:return ve(ce+"Milliseconds",3);default:return this.clone()}},F.endOf=function(B){return this.startOf(B,!1)},F.$set=function(B,W){var Y,X=N.p(B),K="set"+(this.$u?"UTC":""),Q=(Y={},Y[u]=K+"Date",Y[b]=K+"Date",Y[p]=K+"Month",Y[y]=K+"FullYear",Y[c]=K+"Hours",Y[a]=K+"Minutes",Y[s]=K+"Seconds",Y[i]=K+"Milliseconds",Y)[X],ve=X===u?this.$D+(W-this.$W):W;if(X===p||X===y){var xe=this.clone().set(b,1);xe.$d[Q](ve),xe.init(),this.$d=xe.set(b,Math.min(this.$D,xe.daysInMonth())).$d}else Q&&this.$d[Q](ve);return this.init(),this},F.set=function(B,W){return this.clone().$set(B,W)},F.get=function(B){return this[N.p(B)]()},F.add=function(B,W){var Y,X=this;B=Number(B);var K=N.p(W),Q=function(ye){var oe=O(X);return N.w(oe.date(oe.date()+Math.round(ye*B)),X)};if(K===p)return this.set(p,this.$M+B);if(K===y)return this.set(y,this.$y+B);if(K===u)return Q(1);if(K===f)return Q(7);var ve=(Y={},Y[a]=r,Y[c]=o,Y[s]=n,Y)[K]||1,xe=this.$d.getTime()+B*ve;return N.w(xe,this)},F.subtract=function(B,W){return this.add(-1*B,W)},F.format=function(B){var W=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||g;var X=B||"YYYY-MM-DDTHH:mm:ssZ",K=N.z(this),Q=this.$H,ve=this.$m,xe=this.$M,ye=Y.weekdays,oe=Y.months,ce=Y.meridiem,fe=function(se,be,ne,le){return se&&(se[be]||se(W,X))||ne[be].slice(0,le)},q=function(se){return N.s(Q%12||12,se,"0")},ee=ce||function(se,be,ne){var le=se<12?"AM":"PM";return ne?le.toLowerCase():le};return X.replace(w,(function(se,be){return be||(function(ne){switch(ne){case"YY":return String(W.$y).slice(-2);case"YYYY":return N.s(W.$y,4,"0");case"M":return xe+1;case"MM":return N.s(xe+1,2,"0");case"MMM":return fe(Y.monthsShort,xe,oe,3);case"MMMM":return fe(oe,xe);case"D":return W.$D;case"DD":return N.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return fe(Y.weekdaysMin,W.$W,ye,2);case"ddd":return fe(Y.weekdaysShort,W.$W,ye,3);case"dddd":return ye[W.$W];case"H":return String(Q);case"HH":return N.s(Q,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return ee(Q,ve,!0);case"A":return ee(Q,ve,!1);case"m":return String(ve);case"mm":return N.s(ve,2,"0");case"s":return String(W.$s);case"ss":return N.s(W.$s,2,"0");case"SSS":return N.s(W.$ms,3,"0");case"Z":return K}return null})(se)||K.replace(":","")}))},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(B,W,Y){var X,K=this,Q=N.p(W),ve=O(B),xe=(ve.utcOffset()-this.utcOffset())*r,ye=this-ve,oe=function(){return N.m(K,ve)};switch(Q){case y:X=oe()/12;break;case p:X=oe();break;case m:X=oe()/3;break;case f:X=(ye-xe)/6048e5;break;case u:X=(ye-xe)/864e5;break;case c:X=ye/o;break;case a:X=ye/r;break;case s:X=ye/n;break;default:X=ye}return Y?X:N.a(X)},F.daysInMonth=function(){return this.endOf(p).$D},F.$locale=function(){return M[this.$L]},F.locale=function(B,W){if(!B)return this.$L;var Y=this.clone(),X=L(B,W,!0);return X&&(Y.$L=X),Y},F.clone=function(){return N.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},z})(),V=$.prototype;return O.prototype=V,[["$ms",i],["$s",s],["$m",a],["$H",c],["$W",u],["$M",p],["$y",y],["$D",b]].forEach((function(z){V[z[1]]=function(F){return this.$g(F,z[0],z[1])}})),O.extend=function(z,F){return z.$i||(z(F,$,O),z.$i=!0),O},O.locale=L,O.isDayjs=I,O.unix=function(z){return O(1e3*z)},O.en=M[k],O.Ls=M,O.p={},O}))})(Ud)),Ud.exports}var PF=IF();const In=Rr(PF);var qd={exports:{}},NF=qd.exports,HS;function $F(){return HS||(HS=1,(function(t,e){(function(n,r){t.exports=r()})(NF,(function(){var n="week",r="year";return function(o,i,s){var a=i.prototype;a.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-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"),y=this.diff(m,n,!0);return y<0?s(this).startOf("week").week():Math.ceil(y)},a.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}}))})(qd)),qd.exports}var LF=$F();const FF=Rr(LF);var Kd={exports:{}},RF=Kd.exports,WS;function BF(){return WS||(WS=1,(function(t,e){(function(n,r){t.exports=r()})(RF,(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]+/,c={},u=function(x){return(x=+x)+(x>68?1900:2e3)},f=function(x){return function(w){this[x]=+w}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(x){(this.zone||(this.zone={})).offset=(function(w){if(!w||w==="Z")return 0;var E=w.match(/([+-]|\d\d)/g),T=60*E[1]+(+E[2]||0);return T===0?0:E[0]==="+"?-T:T})(x)}],m=function(x){var w=c[x];return w&&(w.indexOf?w:w.s.concat(w.f))},y=function(x,w){var E,T=c.meridiem;if(T){for(var C=1;C<=24;C+=1)if(x.indexOf(T(C,0,w))>-1){E=C>12;break}}else E=x===(w?"pm":"PM");return E},b={A:[a,function(x){this.afternoon=y(x,!1)}],a:[a,function(x){this.afternoon=y(x,!0)}],Q:[o,function(x){this.month=3*(x-1)+1}],S:[o,function(x){this.milliseconds=100*+x}],SS:[i,function(x){this.milliseconds=10*+x}],SSS:[/\d{3}/,function(x){this.milliseconds=+x}],s:[s,f("seconds")],ss:[s,f("seconds")],m:[s,f("minutes")],mm:[s,f("minutes")],H:[s,f("hours")],h:[s,f("hours")],HH:[s,f("hours")],hh:[s,f("hours")],D:[s,f("day")],DD:[i,f("day")],Do:[a,function(x){var w=c.ordinal,E=x.match(/\d+/);if(this.day=E[0],w)for(var T=1;T<=31;T+=1)w(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 w=m("months"),E=(m("monthsShort")||w.map((function(T){return T.slice(0,3)}))).indexOf(x)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[a,function(x){var w=m("months").indexOf(x)+1;if(w<1)throw new Error;this.month=w%12||w}],Y:[/[+-]?\d+/,f("year")],YY:[i,function(x){this.year=u(x)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function g(x){var w,E;w=x,E=c&&c.formats;for(var T=(x=w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(O,N,$){var V=$&&$.toUpperCase();return N||E[$]||n[$]||E[V].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(z,F,B){return F||B.slice(1)}))}))).match(r),C=T.length,k=0;k<C;k+=1){var M=T[k],A=b[M],I=A&&A[0],L=A&&A[1];T[k]=L?{regex:I,parser:L}:M.replace(/^\[|\]$/g,"")}return function(O){for(var N={},$=0,V=0;$<C;$+=1){var z=T[$];if(typeof z=="string")V+=z.length;else{var F=z.regex,B=z.parser,W=O.slice(V),Y=F.exec(W)[0];B.call(N,Y),O=O.replace(Y,"")}}return(function(X){var K=X.afternoon;if(K!==void 0){var Q=X.hours;K?Q<12&&(X.hours+=12):Q===12&&(X.hours=0),delete X.afternoon}})(N),N}}return function(x,w,E){E.p.customParseFormat=!0,x&&x.parseTwoDigitYear&&(u=x.parseTwoDigitYear);var T=w.prototype,C=T.parse;T.parse=function(k){var M=k.date,A=k.utc,I=k.args;this.$u=A;var L=I[1];if(typeof L=="string"){var O=I[2]===!0,N=I[3]===!0,$=O||N,V=I[2];N&&(V=I[2]),c=this.$locale(),!O&&V&&(c=E.Ls[V]),this.$d=(function(W,Y,X,K){try{if(["x","X"].indexOf(Y)>-1)return new Date((Y==="X"?1e3:1)*W);var Q=g(Y)(W),ve=Q.year,xe=Q.month,ye=Q.day,oe=Q.hours,ce=Q.minutes,fe=Q.seconds,q=Q.milliseconds,ee=Q.zone,se=Q.week,be=new Date,ne=ye||(ve||xe?1:be.getDate()),le=ve||be.getFullYear(),pe=0;ve&&!xe||(pe=xe>0?xe-1:be.getMonth());var Oe,ke=oe||0,Fe=ce||0,Ie=fe||0,Ke=q||0;return ee?new Date(Date.UTC(le,pe,ne,ke,Fe,Ie,Ke+60*ee.offset*1e3)):X?new Date(Date.UTC(le,pe,ne,ke,Fe,Ie,Ke)):(Oe=new Date(le,pe,ne,ke,Fe,Ie,Ke),se&&(Oe=K(Oe).week(se).toDate()),Oe)}catch{return new Date("")}})(M,L,A,E),this.init(),V&&V!==!0&&(this.$L=this.locale(V).$L),$&&M!=this.format(L)&&(this.$d=new Date("")),c={}}else if(L instanceof Array)for(var z=L.length,F=1;F<=z;F+=1){I[1]=L[F-1];var B=E.apply(this,I);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}F===z&&(this.$d=new Date(""))}else C.call(this,k)}}}))})(Kd)),Kd.exports}var VF=BF();const zF=Rr(VF);var Yd={exports:{}},HF=Yd.exports,jS;function WF(){return jS||(jS=1,(function(t,e){(function(n,r){t.exports=r()})(HF,(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(c){c===void 0&&(c="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(y,b,g){var x=g&&g.toUpperCase();return b||m[g]||n[g]||m[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(w,E,T){return E||T.slice(1)}))}))})(c,u===void 0?{}:u);return a.call(this,f)}}}))})(Yd)),Yd.exports}var jF=WF();const UF=Rr(jF);var Gd={exports:{}},qF=Gd.exports,US;function KF(){return US||(US=1,(function(t,e){(function(n,r){t.exports=r()})(qF,(function(){return function(n,r,o){r.prototype.isBetween=function(i,s,a,c){var u=o(i),f=o(s),p=(c=c||"()")[0]==="(",m=c[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))}}}))})(Gd)),Gd.exports}var YF=KF();const GF=Rr(YF);var Jd={exports:{}},JF=Jd.exports,qS;function XF(){return qS||(qS=1,(function(t,e){(function(n,r){t.exports=r()})(JF,(function(){return function(n,r){var o=r.prototype,i=o.format;o.format=function(s){var a=this,c=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 c.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return c.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)}}}))})(Jd)),Jd.exports}var ZF=XF();const QF=Rr(ZF),KS=new Set;function YS(t,e="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(t)?t.join(`
|
|
109
|
-
`):t;KS.has(n)||(KS.add(n),e==="error"?console.error(n):console.warn(n))}In.extend(UF),In.extend(FF),In.extend(GF),In.extend(QF);const eR={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"},tR={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"},vg=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
|
|
110
|
-
`),GS=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
|
|
111
|
-
`),nR=(t,e)=>e?(...n)=>t(...n).locale(e):t;class rR{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=eR,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale()?r:r.locale(o)},this.hasUTCPlugin=()=>typeof In.utc<"u",this.hasTimezonePlugin=()=>typeof In.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 In.tz.guess();default:return r}},this.createSystemDate=r=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const o=In.tz.guess();return o!=="UTC"?In.tz(r,o):In(r)}return In(r)},this.createUTCDate=r=>{if(!this.hasUTCPlugin())throw new Error(vg);return In.utc(r)},this.createTZDate=(r,o)=>{if(!this.hasUTCPlugin())throw new Error(vg);if(!this.hasTimezonePlugin())throw new Error(GS);const i=r!==void 0&&!r.endsWith("Z");return In(r).tz(this.cleanTimezone(o),i)},this.getLocaleFormats=()=>{const r=In.Ls,o=this.locale||"en";let i=r[o];return i===void 0&&(process.env.NODE_ENV!=="production"&&YS(["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=()=>In(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(vg);return r.utc()}if(o==="system")return r.local();if(!this.hasTimezonePlugin()){if(o==="default")return r;throw new Error(GS)}return In.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,c,u)=>c||u.slice(1));return r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(s,a,c)=>{const u=c&&c.toUpperCase();return a||o[c]||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 c=[];for(;a<i;){const u=Math.floor(s/7);c[u]=c[u]||[],c[u].push(a),a=this.addDays(a,1),s+=1}return c},this.getWeekNumber=r=>r.week(),this.getYearRange=([r,o])=>{const i=this.startOfYear(r),s=this.endOfYear(o),a=[];let c=i;for(;this.isBefore(c,s);)a.push(c),c=this.addYears(c,1);return a},this.dayjs=nR(In,e),this.locale=e,this.formats=ie({},tR,n),In.extend(zF)}getDayOfWeek(e){return e.day()+1}}function Xd(t){return parseInt(t,10)||0}const oR={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function iR(t){for(const e in t)return!1;return!0}function JS(t){return iR(t)||t.outerHeightStyle===0&&!t.overflowing}const XS=D.forwardRef(function(e,n){const{onChange:r,maxRows:o,minRows:i=1,style:s,value:a,...c}=e,{current:u}=D.useRef(a!=null),f=D.useRef(null),p=At(n,f),m=D.useRef(null),y=D.useRef(null),b=D.useCallback(()=>{const T=f.current,C=y.current;if(!T||!C)return;const M=xi(T).getComputedStyle(T);if(M.width==="0px")return{outerHeightStyle:0,overflowing:!1};C.style.width=M.width,C.value=T.value||e.placeholder||"x",C.value.slice(-1)===`
|
|
112
|
-
`&&(C.value+=" ");const A=M.boxSizing,I=Xd(M.paddingBottom)+Xd(M.paddingTop),L=Xd(M.borderBottomWidth)+Xd(M.borderTopWidth),O=C.scrollHeight;C.value="x";const N=C.scrollHeight;let $=O;i&&($=Math.max(Number(i)*N,$)),o&&($=Math.min(Number(o)*N,$)),$=Math.max($,N);const V=$+(A==="border-box"?I+L:0),z=Math.abs($-O)<=1;return{outerHeightStyle:V,overflowing:z}},[o,i,e.placeholder]),g=qe(()=>{const T=f.current,C=b();if(!T||!C||JS(C))return!1;const k=C.outerHeightStyle;return m.current!=null&&m.current!==k}),x=D.useCallback(()=>{const T=f.current,C=b();if(!T||!C||JS(C))return;const k=C.outerHeightStyle;m.current!==k&&(m.current=k,T.style.height=`${k}px`),T.style.overflow=C.overflowing?"hidden":""},[b]),w=D.useRef(-1);Rn(()=>{const T=kx(x),C=f==null?void 0:f.current;if(!C)return;const k=xi(C);k.addEventListener("resize",T);let M;return typeof ResizeObserver<"u"&&(M=new ResizeObserver(()=>{g()&&(M.unobserve(C),cancelAnimationFrame(w.current),x(),w.current=requestAnimationFrame(()=>{M.observe(C)}))}),M.observe(C)),()=>{T.clear(),cancelAnimationFrame(w.current),k.removeEventListener("resize",T),M&&M.disconnect()}},[b,x,g]),Rn(()=>{x()});const E=T=>{u||x(),r&&r(T)};return v.jsxs(D.Fragment,{children:[v.jsx("textarea",{value:a,onChange:E,ref:p,rows:i,style:s,...c}),v.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:y,tabIndex:-1,style:{...oR.shadow,...s,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(XS.propTypes={className:l.string,maxRows:l.oneOfType([l.number,l.string]),minRows:l.oneOfType([l.number,l.string]),onChange:l.func,placeholder:l.string,style:l.object,value:l.oneOfType([l.arrayOf(l.string),l.number,l.string])});function kc(t){return typeof t=="string"}function ll({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 Ec=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ec.displayName="FormControlContext");function Lo(){return D.useContext(Ec)}function ZS(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function Zd(t,e=!1){return t&&(ZS(t.value)&&t.value!==""||e&&ZS(t.defaultValue)&&t.defaultValue!=="")}function sR(t){return t.startAdornment}function aR(t){return Qe("MuiInputBase",t)}const cl=Ge("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var QS;const Qd=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${$e(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},ef=(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]},lR=t=>{const{classes:e,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:a,fullWidth:c,hiddenLabel:u,multiline:f,readOnly:p,size:m,startAdornment:y,type:b}=t,g={root:["root",`color${$e(n)}`,r&&"disabled",o&&"error",c&&"fullWidth",s&&"focused",a&&"formControl",m&&m!=="medium"&&`size${$e(m)}`,f&&"multiline",y&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",p&&"readOnly"],input:["input",r&&"disabled",b==="search"&&"inputTypeSearch",f&&"inputMultiline",m==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",y&&"inputAdornedStart",i&&"inputAdornedEnd",p&&"readOnly"]};return Ze(g,aR,e)},tf=re("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Qd})(Tt(({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",[`&.${cl.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%"}}]}))),nf=re("input",{name:"MuiInputBase",slot:"Input",overridesResolver:ef})(Tt(({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] + .${cl.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},[`&.${cl.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"}}]}})),ew=wL({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),rf=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:s,className:a,color:c,components:u={},componentsProps:f={},defaultValue:p,disabled:m,disableInjectingGlobalStyles:y,endAdornment:b,error:g,fullWidth:x=!1,id:w,inputComponent:E="input",inputProps:T={},inputRef:C,margin:k,maxRows:M,minRows:A,multiline:I=!1,name:L,onBlur:O,onChange:N,onClick:$,onFocus:V,onKeyDown:z,onKeyUp:F,placeholder:B,readOnly:W,renderSuffix:Y,rows:X,size:K,slotProps:Q={},slots:ve={},startAdornment:xe,type:ye="text",value:oe,...ce}=r,fe=T.value!=null?T.value:oe,{current:q}=D.useRef(fe!=null),ee=D.useRef(),se=D.useCallback(rt=>{process.env.NODE_ENV!=="production"&&rt&&rt.nodeName!=="INPUT"&&!rt.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
113
|
-
`))},[]),be=At(ee,C,T.ref,se),[ne,le]=D.useState(!1),pe=Lo();process.env.NODE_ENV!=="production"&&D.useEffect(()=>{if(pe)return pe.registerEffect()},[pe]);const Oe=ll({props:r,muiFormControl:pe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Oe.focused=pe?pe.focused:ne,D.useEffect(()=>{!pe&&m&&ne&&(le(!1),O&&O())},[pe,m,ne,O]);const ke=pe&&pe.onFilled,Fe=pe&&pe.onEmpty,Ie=D.useCallback(rt=>{Zd(rt)?ke&&ke():Fe&&Fe()},[ke,Fe]);Rn(()=>{q&&Ie({value:fe})},[fe,Ie,q]);const Ke=rt=>{V&&V(rt),T.onFocus&&T.onFocus(rt),pe&&pe.onFocus?pe.onFocus(rt):le(!0)},Xe=rt=>{O&&O(rt),T.onBlur&&T.onBlur(rt),pe&&pe.onBlur?pe.onBlur(rt):le(!1)},U=(rt,...Wt)=>{if(!q){const Qt=rt.target||ee.current;if(Qt==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.":Yo(1));Ie({value:Qt.value})}T.onChange&&T.onChange(rt,...Wt),N&&N(rt,...Wt)};D.useEffect(()=>{Ie(ee.current)},[]);const Z=rt=>{ee.current&&rt.currentTarget===rt.target&&ee.current.focus(),$&&$(rt)};let he=E,Ne=T;I&&he==="input"&&(X?(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."),Ne={type:void 0,minRows:X,maxRows:X,...Ne}):Ne={type:void 0,maxRows:M,minRows:A,...Ne},he=XS);const Pe=rt=>{Ie(rt.animationName==="mui-auto-fill-cancel"?ee.current:{value:"x"})};D.useEffect(()=>{pe&&pe.setAdornedStart(!!xe)},[pe,xe]);const Ae={...r,color:Oe.color||"primary",disabled:Oe.disabled,endAdornment:b,error:Oe.error,focused:Oe.focused,formControl:pe,fullWidth:x,hiddenLabel:Oe.hiddenLabel,multiline:I,size:Oe.size,startAdornment:xe,type:ye},ze=lR(Ae),st=ve.root||u.Root||tf,pt=Q.root||f.root||{},Vt=ve.input||u.Input||nf;return Ne={...Ne,...Q.input??f.input},v.jsxs(D.Fragment,{children:[!y&&typeof ew=="function"&&(QS||(QS=v.jsx(ew,{}))),v.jsxs(st,{...pt,ref:n,onClick:Z,...ce,...!kc(st)&&{ownerState:{...Ae,...pt.ownerState}},className:me(ze.root,pt.className,a,W&&"MuiInputBase-readOnly"),children:[xe,v.jsx(Ec.Provider,{value:null,children:v.jsx(Vt,{"aria-invalid":Oe.error,"aria-describedby":o,autoComplete:i,autoFocus:s,defaultValue:p,disabled:Oe.disabled,id:w,onAnimationStart:Pe,name:L,placeholder:B,readOnly:W,required:Oe.required,rows:X,value:fe,onKeyDown:z,onKeyUp:F,type:ye,...Ne,...!kc(Vt)&&{as:he,ownerState:{...Ae,...Ne.ownerState}},ref:be,className:me(ze.input,Ne.className,W&&"MuiInputBase-readOnly"),onBlur:Xe,onChange:U,onFocus:Ke})}),b,Y?Y({...Oe,startAdornment:xe}):null]})]})});process.env.NODE_ENV!=="production"&&(rf.propTypes={"aria-describedby":l.string,autoComplete:l.string,autoFocus:l.bool,classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["primary","secondary","error","info","success","warning"]),l.string]),components:l.shape({Input:l.elementType,Root:l.elementType}),componentsProps:l.shape({input:l.object,root:l.object}),defaultValue:l.any,disabled:l.bool,disableInjectingGlobalStyles:l.bool,endAdornment:l.node,error:l.bool,fullWidth:l.bool,id:l.string,inputComponent:Ya,inputProps:l.object,inputRef:Dn,margin:l.oneOf(["dense","none"]),maxRows:l.oneOfType([l.number,l.string]),minRows:l.oneOfType([l.number,l.string]),multiline:l.bool,name:l.string,onBlur:l.func,onChange:l.func,onClick:l.func,onFocus:l.func,onInvalid:l.func,onKeyDown:l.func,onKeyUp:l.func,placeholder:l.string,readOnly:l.bool,renderSuffix:l.func,required:l.bool,rows:l.oneOfType([l.number,l.string]),size:l.oneOfType([l.oneOf(["medium","small"]),l.string]),slotProps:l.shape({input:l.object,root:l.object}),slots:l.shape({input:l.elementType,root:l.elementType}),startAdornment:l.node,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),type:l.string,value:l.any});function cR(t){return typeof t.main=="string"}function uR(t,e=[]){if(!cR(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function Wn(t=[]){return([,e])=>e&&uR(e,t)}function dR(t){return Qe("MuiInput",t)}const _c={...cl,...Ge("MuiInput",["root","underline","input"])},fR=t=>{const{classes:e,disableUnderline:n}=t,o=Ze({root:["root",!n&&"underline"],input:["input"]},dR,e);return{...e,...o}},pR=re(tf,{shouldForwardProp:t=>oo(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Qd(t,e),!n.disableUnderline&&e.underline]}})(Tt(({theme:t})=>{let n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${_c.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${_c.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${_c.disabled}, .${_c.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${_c.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Wn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}}))]}})),hR=re(nf,{name:"MuiInput",slot:"Input",overridesResolver:ef})({}),of=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:s,fullWidth:a=!1,inputComponent:c="input",multiline:u=!1,slotProps:f,slots:p={},type:m="text",...y}=r,b=fR(r),x={root:{ownerState:{disableUnderline:o}}},w=f??s?Hn(f??s,x):x,E=p.root??i.Root??pR,T=p.input??i.Input??hR;return v.jsx(rf,{slots:{root:E,input:T},slotProps:w,fullWidth:a,inputComponent:c,multiline:u,ref:n,type:m,...y,classes:b})});process.env.NODE_ENV!=="production"&&(of.propTypes={autoComplete:l.string,autoFocus:l.bool,classes:l.object,color:l.oneOfType([l.oneOf(["primary","secondary"]),l.string]),components:l.shape({Input:l.elementType,Root:l.elementType}),componentsProps:l.shape({input:l.object,root:l.object}),defaultValue:l.any,disabled:l.bool,disableUnderline:l.bool,endAdornment:l.node,error:l.bool,fullWidth:l.bool,id:l.string,inputComponent:l.elementType,inputProps:l.object,inputRef:Dn,margin:l.oneOf(["dense","none"]),maxRows:l.oneOfType([l.number,l.string]),minRows:l.oneOfType([l.number,l.string]),multiline:l.bool,name:l.string,onChange:l.func,placeholder:l.string,readOnly:l.bool,required:l.bool,rows:l.oneOfType([l.number,l.string]),slotProps:l.shape({input:l.object,root:l.object}),slots:l.shape({input:l.elementType,root:l.elementType}),startAdornment:l.node,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),type:l.string,value:l.any}),of.muiName="Input";function mR(t){return Qe("MuiFilledInput",t)}const Zs={...cl,...Ge("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},gR=t=>{const{classes:e,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:s,multiline:a}=t,c={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${$e(i)}`,s&&"hiddenLabel",a&&"multiline"],input:["input"]},u=Ze(c,mR,e);return{...e,...u}},yR=re(tf,{shouldForwardProp:t=>oo(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Qd(t,e),!n.disableUnderline&&e.underline]}})(Tt(({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}},[`&.${Zs.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r},[`&.${Zs.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"},[`&.${Zs.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Zs.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(.${Zs.disabled}, .${Zs.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Zs.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Wn()).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}}]}})),bR=re(nf,{name:"MuiFilledInput",slot:"Input",overridesResolver:ef})(Tt(({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}}]}))),sf=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:s,fullWidth:a=!1,hiddenLabel:c,inputComponent:u="input",multiline:f=!1,slotProps:p,slots:m={},type:y="text",...b}=r,g={...r,disableUnderline:o,fullWidth:a,inputComponent:u,multiline:f,type:y},x=gR(r),w={root:{ownerState:g},input:{ownerState:g}},E=p??s?Hn(w,p??s):w,T=m.root??i.Root??yR,C=m.input??i.Input??bR;return v.jsx(rf,{slots:{root:T,input:C},slotProps:E,fullWidth:a,inputComponent:u,multiline:f,ref:n,type:y,...b,classes:x})});process.env.NODE_ENV!=="production"&&(sf.propTypes={autoComplete:l.string,autoFocus:l.bool,classes:l.object,color:l.oneOfType([l.oneOf(["primary","secondary"]),l.string]),components:l.shape({Input:l.elementType,Root:l.elementType}),componentsProps:l.shape({input:l.object,root:l.object}),defaultValue:l.any,disabled:l.bool,disableUnderline:l.bool,endAdornment:l.node,error:l.bool,fullWidth:l.bool,hiddenLabel:l.bool,id:l.string,inputComponent:l.elementType,inputProps:l.object,inputRef:Dn,margin:l.oneOf(["dense","none"]),maxRows:l.oneOfType([l.number,l.string]),minRows:l.oneOfType([l.number,l.string]),multiline:l.bool,name:l.string,onChange:l.func,placeholder:l.string,readOnly:l.bool,required:l.bool,rows:l.oneOfType([l.number,l.string]),slotProps:l.shape({input:l.object,root:l.object}),slots:l.shape({input:l.elementType,root:l.elementType}),startAdornment:l.node,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),type:l.string,value:l.any}),sf.muiName="Input";var tw;const vR=re("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:oo})({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%"}),xR=re("legend",{name:"MuiNotchedOutlined",shouldForwardProp:oo})(Tt(({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 nw(t){const{children:e,classes:n,className:r,label:o,notched:i,...s}=t,a=o!=null&&o!=="",c={...t,notched:i,withLabel:a};return v.jsx(vR,{"aria-hidden":!0,className:r,ownerState:c,...s,children:v.jsx(xR,{ownerState:c,children:a?v.jsx("span",{children:o}):tw||(tw=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}process.env.NODE_ENV!=="production"&&(nw.propTypes={children:l.node,classes:l.object,className:l.string,label:l.node,notched:l.bool.isRequired,style:l.object});function SR(t){return Qe("MuiOutlinedInput",t)}const so={...cl,...Ge("MuiOutlinedInput",["root","notchedOutline","input"])};function Lt(t,e){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:s,shouldForwardComponentProp:a=!1,...c}=e,{component:u,slots:f={[t]:void 0},slotProps:p={[t]:void 0},...m}=i,y=f[t]||r,b=Cd(p[t],o),{props:{component:g,...x},internalRef:w}=zx({className:n,...c,externalForwardedProps:t==="root"?m:void 0,externalSlotProps:b}),E=At(w,b==null?void 0:b.ref,e.ref),T=t==="root"?g||u:g,C=Fx(y,{...t==="root"&&!u&&!f[t]&&s,...t!=="root"&&!f[t]&&s,...x,...T&&!a&&{as:T},...T&&a&&{component:T},ref:E},o);return[y,C]}const wR=t=>{const{classes:e}=t,r=Ze({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},SR,e);return{...e,...r}},CR=re(tf,{shouldForwardProp:t=>oo(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Qd})(Tt(({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 .${so.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${so.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}},[`&.${so.focused} .${so.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(t.palette).filter(Wn()).map(([n])=>({props:{color:n},style:{[`&.${so.focused} .${so.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}})),{props:{},style:{[`&.${so.error} .${so.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${so.disabled} .${so.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"}}]}})),TR=re(nw,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(Tt(({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}})),kR=re(nf,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:ef})(Tt(({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}}]}))),af=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiOutlinedInput"}),{components:o={},fullWidth:i=!1,inputComponent:s="input",label:a,multiline:c=!1,notched:u,slots:f={},slotProps:p={},type:m="text",...y}=r,b=wR(r),g=Lo(),x=ll({props:r,muiFormControl:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...r,color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:g,fullWidth:i,hiddenLabel:x.hiddenLabel,multiline:c,size:x.size,type:m},E=f.root??o.Root??CR,T=f.input??o.Input??kR,[C,k]=Lt("notchedOutline",{elementType:TR,className:b.notchedOutline,shouldForwardComponentProp:!0,ownerState:w,externalForwardedProps:{slots:f,slotProps:p},additionalProps:{label:a!=null&&a!==""&&x.required?v.jsxs(D.Fragment,{children:[a," ","*"]}):a}});return v.jsx(rf,{slots:{root:E,input:T},slotProps:p,renderSuffix:M=>v.jsx(C,{...k,notched:typeof u<"u"?u:!!(M.startAdornment||M.filled||M.focused)}),fullWidth:i,inputComponent:s,multiline:c,ref:n,type:m,...y,classes:{...b,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(af.propTypes={autoComplete:l.string,autoFocus:l.bool,classes:l.object,color:l.oneOfType([l.oneOf(["primary","secondary"]),l.string]),components:l.shape({Input:l.elementType,Root:l.elementType}),defaultValue:l.any,disabled:l.bool,endAdornment:l.node,error:l.bool,fullWidth:l.bool,id:l.string,inputComponent:l.elementType,inputProps:l.object,inputRef:Dn,label:l.node,margin:l.oneOf(["dense","none"]),maxRows:l.oneOfType([l.number,l.string]),minRows:l.oneOfType([l.number,l.string]),multiline:l.bool,name:l.string,notched:l.bool,onChange:l.func,placeholder:l.string,readOnly:l.bool,required:l.bool,rows:l.oneOfType([l.number,l.string]),slotProps:l.shape({input:l.object,notchedOutline:l.oneOfType([l.func,l.object]),root:l.object}),slots:l.shape({input:l.elementType,notchedOutline:l.elementType,root:l.elementType}),startAdornment:l.node,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),type:l.string,value:l.any}),af.muiName="Input";function ER(t){return Qe("MuiFormLabel",t)}const Oc=Ge("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),_R=t=>{const{classes:e,color:n,focused:r,disabled:o,error:i,filled:s,required:a}=t,c={root:["root",`color${$e(n)}`,o&&"disabled",i&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",i&&"error"]};return Ze(c,ER,e)},OR=re("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color==="secondary"&&e.colorSecondary,n.filled&&e.filled]}})(Tt(({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(Wn()).map(([e])=>({props:{color:e},style:{[`&.${Oc.focused}`]:{color:(t.vars||t).palette[e].main}}})),{props:{},style:{[`&.${Oc.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Oc.error}`]:{color:(t.vars||t).palette.error.main}}}]}))),MR=re("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(Tt(({theme:t})=>({[`&.${Oc.error}`]:{color:(t.vars||t).palette.error.main}}))),rw=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiFormLabel"}),{children:o,className:i,color:s,component:a="label",disabled:c,error:u,filled:f,focused:p,required:m,...y}=r,b=Lo(),g=ll({props:r,muiFormControl:b,states:["color","required","focused","disabled","error","filled"]}),x={...r,color:g.color||"primary",component:a,disabled:g.disabled,error:g.error,filled:g.filled,focused:g.focused,required:g.required},w=_R(x);return v.jsxs(OR,{as:a,ownerState:x,className:me(w.root,i),ref:n,...y,children:[o,g.required&&v.jsxs(MR,{ownerState:x,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})});process.env.NODE_ENV!=="production"&&(rw.propTypes={children:l.node,classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["error","info","primary","secondary","success","warning"]),l.string]),component:l.elementType,disabled:l.bool,error:l.bool,filled:l.bool,focused:l.bool,required:l.bool,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])});function AR(t){return Qe("MuiInputLabel",t)}Ge("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const DR=t=>{const{classes:e,formControl:n,size:r,shrink:o,disableAnimation:i,variant:s,required:a}=t,c={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${$e(r)}`,s],asterisk:[a&&"asterisk"]},u=Ze(c,AR,e);return{...e,...u}},IR=re(rw,{shouldForwardProp:t=>oo(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Oc.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]]}})(Tt(({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)"}}]}))),xg=D.forwardRef(function(e,n){const r=vt({name:"MuiInputLabel",props:e}),{disableAnimation:o=!1,margin:i,shrink:s,variant:a,className:c,...u}=r,f=Lo();let p=s;typeof p>"u"&&f&&(p=f.filled||f.focused||f.adornedStart);const m=ll({props:r,muiFormControl:f,states:["size","variant","required","focused"]}),y={...r,disableAnimation:o,formControl:f,shrink:p,size:m.size,variant:m.variant,required:m.required,focused:m.focused},b=DR(y);return v.jsx(IR,{"data-shrink":p,ref:n,className:me(b.root,c),...u,ownerState:y,classes:b})});process.env.NODE_ENV!=="production"&&(xg.propTypes={children:l.node,classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["error","info","primary","secondary","success","warning"]),l.string]),disableAnimation:l.bool,disabled:l.bool,error:l.bool,focused:l.bool,margin:l.oneOf(["dense"]),required:l.bool,shrink:l.bool,size:l.oneOfType([l.oneOf(["normal","small"]),l.string]),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),variant:l.oneOf(["filled","outlined","standard"])});function PR(t){return Qe("MuiFormControl",t)}Ge("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const NR=t=>{const{classes:e,margin:n,fullWidth:r}=t,o={root:["root",n!=="none"&&`margin${$e(n)}`,r&&"fullWidth"]};return Ze(o,PR,e)},$R=re("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`margin${$e(n.margin)}`],n.fullWidth&&e.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Sg=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiFormControl"}),{children:o,className:i,color:s="primary",component:a="div",disabled:c=!1,error:u=!1,focused:f,fullWidth:p=!1,hiddenLabel:m=!1,margin:y="none",required:b=!1,size:g="medium",variant:x="outlined",...w}=r,E={...r,color:s,component:a,disabled:c,error:u,fullWidth:p,hiddenLabel:m,margin:y,required:b,size:g,variant:x},T=NR(E),[C,k]=D.useState(()=>{let B=!1;return o&&D.Children.forEach(o,W=>{if(!Ga(W,["Input","Select"]))return;const Y=Ga(W,["Select"])?W.props.input:W;Y&&sR(Y.props)&&(B=!0)}),B}),[M,A]=D.useState(()=>{let B=!1;return o&&D.Children.forEach(o,W=>{Ga(W,["Input","Select"])&&(Zd(W.props,!0)||Zd(W.props.inputProps,!0))&&(B=!0)}),B}),[I,L]=D.useState(!1);c&&I&&L(!1);const O=f!==void 0&&!c?f:I;let N;const $=D.useRef(!1);process.env.NODE_ENV!=="production"&&(N=()=>($.current&&console.error(["MUI: There are multiple `InputBase` components inside a FormControl.","This creates visual inconsistencies, only use one `InputBase`."].join(`
|
|
114
|
-
`)),$.current=!0,()=>{$.current=!1}));const V=D.useCallback(()=>{A(!0)},[]),z=D.useCallback(()=>{A(!1)},[]),F=D.useMemo(()=>({adornedStart:C,setAdornedStart:k,color:s,disabled:c,error:u,filled:M,focused:O,fullWidth:p,hiddenLabel:m,size:g,onBlur:()=>{L(!1)},onFocus:()=>{L(!0)},onEmpty:z,onFilled:V,registerEffect:N,required:b,variant:x}),[C,s,c,u,M,O,p,m,N,z,V,b,g,x]);return v.jsx(Ec.Provider,{value:F,children:v.jsx($R,{as:a,ownerState:E,className:me(T.root,i),ref:n,...w,children:o})})});process.env.NODE_ENV!=="production"&&(Sg.propTypes={children:l.node,classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["primary","secondary","error","info","success","warning"]),l.string]),component:l.elementType,disabled:l.bool,error:l.bool,focused:l.bool,fullWidth:l.bool,hiddenLabel:l.bool,margin:l.oneOf(["dense","none","normal"]),required:l.bool,size:l.oneOfType([l.oneOf(["medium","small"]),l.string]),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),variant:l.oneOf(["filled","outlined","standard"])});function LR(t){return Qe("MuiFormHelperText",t)}const ow=Ge("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var iw;const FR=t=>{const{classes:e,contained:n,size:r,disabled:o,error:i,filled:s,focused:a,required:c}=t,u={root:["root",o&&"disabled",i&&"error",r&&`size${$e(r)}`,n&&"contained",a&&"focused",s&&"filled",c&&"required"]};return Ze(u,LR,e)},RR=re("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${$e(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(Tt(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${ow.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${ow.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}}]}))),wg=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiFormHelperText"}),{children:o,className:i,component:s="p",disabled:a,error:c,filled:u,focused:f,margin:p,required:m,variant:y,...b}=r,g=Lo(),x=ll({props:r,muiFormControl:g,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:s,contained:x.variant==="filled"||x.variant==="outlined",variant:x.variant,size:x.size,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required};delete w.ownerState;const E=FR(w);return v.jsx(RR,{as:s,className:me(E.root,i),ref:n,...b,ownerState:w,children:o===" "?iw||(iw=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):o})});process.env.NODE_ENV!=="production"&&(wg.propTypes={children:l.node,classes:l.object,className:l.string,component:l.elementType,disabled:l.bool,error:l.bool,filled:l.bool,focused:l.bool,margin:l.oneOf(["dense"]),required:l.bool,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),variant:l.oneOfType([l.oneOf(["filled","outlined","standard"]),l.string])});const ls=D.createContext({});process.env.NODE_ENV!=="production"&&(ls.displayName="ListContext");function BR(t){return Qe("MuiList",t)}Ge("MuiList",["root","padding","dense","subheader"]);const VR=t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t;return Ze({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},BR,e)},zR=re("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}}]}),Cg=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:a=!1,disablePadding:c=!1,subheader:u,...f}=r,p=D.useMemo(()=>({dense:a}),[a]),m={...r,component:s,dense:a,disablePadding:c},y=VR(m);return v.jsx(ls.Provider,{value:p,children:v.jsxs(zR,{as:s,className:me(y.root,i),ref:n,ownerState:m,...f,children:[u,o]})})});process.env.NODE_ENV!=="production"&&(Cg.propTypes={children:l.node,classes:l.object,className:l.string,component:l.elementType,dense:l.bool,disablePadding:l.bool,subheader:l.node,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])});function Tg(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function sw(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function aw(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 Mc(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 c=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!aw(a,i)||c)a=o(t,a,n);else return a.focus(),!0}return!1}const lw=D.forwardRef(function(e,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:a,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:f,variant:p="selectedMenu",...m}=e,y=D.useRef(null),b=D.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Rn(()=>{o&&y.current.focus()},[o]),D.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(T,{direction:C})=>{const k=!y.current.style.width;if(T.clientHeight<y.current.clientHeight&&k){const M=`${Dx(xi(T))}px`;y.current.style[C==="rtl"?"paddingLeft":"paddingRight"]=M,y.current.style.width=`calc(100% + ${M})`}return y.current}}),[]);const g=T=>{const C=y.current,k=T.key;if(T.ctrlKey||T.metaKey||T.altKey){f&&f(T);return}const A=Fn(C).activeElement;if(k==="ArrowDown")T.preventDefault(),Mc(C,A,u,c,Tg);else if(k==="ArrowUp")T.preventDefault(),Mc(C,A,u,c,sw);else if(k==="Home")T.preventDefault(),Mc(C,null,u,c,Tg);else if(k==="End")T.preventDefault(),Mc(C,null,u,c,sw);else if(k.length===1){const I=b.current,L=k.toLowerCase(),O=performance.now();I.keys.length>0&&(O-I.lastTime>500?(I.keys=[],I.repeating=!0,I.previousKeyMatched=!0):I.repeating&&L!==I.keys[0]&&(I.repeating=!1)),I.lastTime=O,I.keys.push(L);const N=A&&!I.repeating&&aw(A,I);I.previousKeyMatched&&(N||Mc(C,A,!1,c,Tg,I))?T.preventDefault():I.previousKeyMatched=!1}f&&f(T)},x=At(y,n);let w=-1;D.Children.forEach(s,(T,C)=>{if(!D.isValidElement(T)){w===C&&(w+=1,w>=s.length&&(w=-1));return}process.env.NODE_ENV!=="production"&&bi.isFragment(T)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
115
|
-
`)),T.props.disabled||(p==="selectedMenu"&&T.props.selected||w===-1)&&(w=C),w===C&&(T.props.disabled||T.props.muiSkipListHighlight||T.type.muiSkipListHighlight)&&(w+=1,w>=s.length&&(w=-1))});const E=D.Children.map(s,(T,C)=>{if(C===w){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(Cg,{role:"menu",ref:x,className:a,onKeyDown:g,tabIndex:o?0:-1,...m,children:E})});process.env.NODE_ENV!=="production"&&(lw.propTypes={autoFocus:l.bool,autoFocusItem:l.bool,children:l.node,className:l.string,disabledItemsFocusable:l.bool,disableListWrap:l.bool,onKeyDown:l.func,variant:l.oneOf(["menu","selectedMenu"])});function kg(t,e){return kg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},kg(t,e)}function Eg(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,kg(t,e)}function HR(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function WR(t,e){t.classList?t.classList.add(e):HR(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function cw(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function jR(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=cw(t.className,e):t.setAttribute("class",cw(t.className&&t.className.baseVal||"",e))}const uw={disabled:!1};var UR=process.env.NODE_ENV!=="production"?l.oneOfType([l.number,l.shape({enter:l.number,exit:l.number,appear:l.number}).isRequired]):null,qR=process.env.NODE_ENV!=="production"?l.oneOfType([l.string,l.shape({enter:l.string,exit:l.string,active:l.string}),l.shape({enter:l.string,enterDone:l.string,enterActive:l.string,exit:l.string,exitDone:l.string,exitActive:l.string})]):null;const lf=J.createContext(null);var dw=function(e){return e.scrollTop},Ac="unmounted",Qs="exited",ea="entering",ul="entered",_g="exiting",Vr=(function(t){Eg(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,c;return i.appearStatus=null,r.in?a?(c=Qs,i.appearStatus=ea):c=ul:r.unmountOnExit||r.mountOnEnter?c=Ac:c=Qs,i.state={status:c},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===Ac?{status:Qs}: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!==ea&&s!==ul&&(i=ea):(s===ea||s===ul)&&(i=_g)}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===ea){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Ws.findDOMNode(this);s&&dw(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qs&&this.setState({status:Ac})},n.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,c=this.props.nodeRef?[a]:[Ws.findDOMNode(this),a],u=c[0],f=c[1],p=this.getTimeouts(),m=a?p.appear:p.enter;if(!o&&!s||uw.disabled){this.safeSetState({status:ul},function(){i.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:ea},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:Ws.findDOMNode(this);if(!i||uw.disabled){this.safeSetState({status:Qs},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:_g},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Qs},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:Ws.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=c[0],f=c[1];this.props.addEndListener(u,f)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Ac)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=mt(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return J.createElement(lf.Provider,{value:null},typeof s=="function"?s(o,a):J.cloneElement(J.Children.only(s),a))},e})(J.Component);Vr.contextType=lf,Vr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:l.shape({current:typeof Element>"u"?l.any:function(t,e,n,r,o,i){var s=t[e];return l.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(t,e,n,r,o,i)}}),children:l.oneOfType([l.func.isRequired,l.element.isRequired]).isRequired,in:l.bool,mountOnEnter:l.bool,unmountOnExit:l.bool,appear:l.bool,enter:l.bool,exit:l.bool,timeout:function(e){var n=UR;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:l.func,onEnter:l.func,onEntering:l.func,onEntered:l.func,onExit:l.func,onExiting:l.func,onExited:l.func}:{};function dl(){}Vr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:dl,onEntering:dl,onEntered:dl,onExit:dl,onExiting:dl,onExited:dl},Vr.UNMOUNTED=Ac,Vr.EXITED=Qs,Vr.ENTERING=ea,Vr.ENTERED=ul,Vr.EXITING=_g;var KR=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return WR(e,r)})},Og=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return jR(e,r)})},Mg=(function(t){Eg(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,c){var u=r.resolveArguments(a,c),f=u[0],p=u[1];r.removeClasses(f,"exit"),r.addClass(f,p?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,c)},r.onEntering=function(a,c){var u=r.resolveArguments(a,c),f=u[0],p=u[1],m=p?"appear":"enter";r.addClass(f,m,"active"),r.props.onEntering&&r.props.onEntering(a,c)},r.onEntered=function(a,c){var u=r.resolveArguments(a,c),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,c)},r.onExit=function(a){var c=r.resolveArguments(a),u=c[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 c=r.resolveArguments(a),u=c[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var c=r.resolveArguments(a),u=c[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,c){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,c]},r.getClassNames=function(a){var c=r.props.classNames,u=typeof c=="string",f=u&&c?c+"-":"",p=u?""+f+a:c[a],m=u?p+"-active":c[a+"Active"],y=u?p+"-done":c[a+"Done"];return{baseClassName:p,activeClassName:m,doneClassName:y}},r}var n=e.prototype;return n.addClass=function(o,i,s){var a=this.getClassNames(i)[s+"ClassName"],c=this.getClassNames("enter"),u=c.doneClassName;i==="appear"&&s==="done"&&u&&(a+=" "+u),s==="active"&&o&&dw(o),a&&(this.appliedClasses[i][s]=a,KR(o,a))},n.removeClasses=function(o,i){var s=this.appliedClasses[i],a=s.base,c=s.active,u=s.done;this.appliedClasses[i]={},a&&Og(o,a),c&&Og(o,c),u&&Og(o,u)},n.render=function(){var o=this.props;o.classNames;var i=mt(o,["classNames"]);return J.createElement(Vr,ie({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e})(J.Component);Mg.defaultProps={classNames:""},Mg.propTypes=process.env.NODE_ENV!=="production"?ie({},Vr.propTypes,{classNames:qR,onEnter:l.func,onEntering:l.func,onEntered:l.func,onExit:l.func,onExiting:l.func,onExited:l.func}):{};function YR(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ag(t,e){var n=function(i){return e&&J.isValidElement(i)?e(i):i},r=Object.create(null);return t&&J.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function GR(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 c in e){if(r[c])for(s=0;s<r[c].length;s++){var u=r[c][s];a[r[c][s]]=n(u)}a[c]=n(c)}for(s=0;s<o.length;s++)a[o[s]]=n(o[s]);return a}function ta(t,e,n){return n[e]!=null?n[e]:t.props[e]}function JR(t,e){return Ag(t.children,function(n){return J.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:ta(n,"appear",t),enter:ta(n,"enter",t),exit:ta(n,"exit",t)})})}function XR(t,e,n){var r=Ag(t.children),o=GR(e,r);return Object.keys(o).forEach(function(i){var s=o[i];if(J.isValidElement(s)){var a=i in e,c=i in r,u=e[i],f=J.isValidElement(u)&&!u.props.in;c&&(!a||f)?o[i]=J.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:ta(s,"exit",t),enter:ta(s,"enter",t)}):!c&&a&&!f?o[i]=J.cloneElement(s,{in:!1}):c&&a&&J.isValidElement(u)&&(o[i]=J.cloneElement(s,{onExited:n.bind(null,s),in:u.props.in,exit:ta(s,"exit",t),enter:ta(s,"enter",t)}))}}),o}var ZR=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},QR={component:"div",childFactory:function(e){return e}},Dc=(function(t){Eg(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=i.handleExited.bind(YR(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,c=i.firstRender;return{children:c?JR(o,a):XR(o,s,a),firstRender:!1}},n.handleExited=function(o,i){var s=Ag(this.props.children);o.key in s||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(a){var c=ie({},a.children);return delete c[o.key],{children:c}}))},n.render=function(){var o=this.props,i=o.component,s=o.childFactory,a=mt(o,["component","childFactory"]),c=this.state.contextValue,u=ZR(this.state.children).map(s);return delete a.appear,delete a.enter,delete a.exit,i===null?J.createElement(lf.Provider,{value:c},u):J.createElement(lf.Provider,{value:c},J.createElement(i,a,u))},e})(J.Component);Dc.propTypes=process.env.NODE_ENV!=="production"?{component:l.any,children:l.node,appear:l.bool,enter:l.bool,exit:l.bool,childFactory:l.func}:{},Dc.defaultProps=QR;const fw=t=>t.scrollTop;function fl(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 Dg(t){return`scale(${t}, ${t**2})`}const eB={entering:{opacity:1,transform:Dg(1)},entered:{opacity:1,transform:"none"}},Ig=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),pl=D.forwardRef(function(e,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:a,onEnter:c,onEntered:u,onEntering:f,onExit:p,onExited:m,onExiting:y,style:b,timeout:g="auto",TransitionComponent:x=Vr,...w}=e,E=qs(),T=D.useRef(),C=ro(),k=D.useRef(null),M=At(k,Ks(i),n),A=F=>B=>{if(F){const W=k.current;B===void 0?F(W):F(W,B)}},I=A(f),L=A((F,B)=>{fw(F);const{duration:W,delay:Y,easing:X}=fl({style:b,timeout:g,easing:s},{mode:"enter"});let K;g==="auto"?(K=C.transitions.getAutoHeightDuration(F.clientHeight),T.current=K):K=W,F.style.transition=[C.transitions.create("opacity",{duration:K,delay:Y}),C.transitions.create("transform",{duration:Ig?K:K*.666,delay:Y,easing:X})].join(","),c&&c(F,B)}),O=A(u),N=A(y),$=A(F=>{const{duration:B,delay:W,easing:Y}=fl({style:b,timeout:g,easing:s},{mode:"exit"});let X;g==="auto"?(X=C.transitions.getAutoHeightDuration(F.clientHeight),T.current=X):X=B,F.style.transition=[C.transitions.create("opacity",{duration:X,delay:W}),C.transitions.create("transform",{duration:Ig?X:X*.666,delay:Ig?W:W||X*.333,easing:Y})].join(","),F.style.opacity=0,F.style.transform=Dg(.75),p&&p(F)}),V=A(m),z=F=>{g==="auto"&&E.start(T.current||0,F),r&&r(k.current,F)};return v.jsx(x,{appear:o,in:a,nodeRef:k,onEnter:L,onEntered:O,onEntering:I,onExit:$,onExited:V,onExiting:N,addEndListener:z,timeout:g==="auto"?null:g,...w,children:(F,{ownerState:B,...W})=>D.cloneElement(i,{style:{opacity:0,transform:Dg(.75),visibility:F==="exited"&&!a?"hidden":void 0,...eB[F],...b,...i.props.style},ref:M,...W})})});process.env.NODE_ENV!=="production"&&(pl.propTypes={addEndListener:l.func,appear:l.bool,children:Us.isRequired,easing:l.oneOfType([l.shape({enter:l.string,exit:l.string}),l.string]),in:l.bool,onEnter:l.func,onEntered:l.func,onEntering:l.func,onExit:l.func,onExited:l.func,onExiting:l.func,style:l.object,timeout:l.oneOfType([l.oneOf(["auto"]),l.number,l.shape({appear:l.number,enter:l.number,exit:l.number})])}),pl&&(pl.muiSupportAuto=!0);function tB(t){const e=Fn(t);return e.body===t?xi(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Ic(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function pw(t){return parseInt(xi(t).getComputedStyle(t).paddingRight,10)||0}function nB(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 hw(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,s=>{const a=!i.includes(s),c=!nB(s);a&&c&&Ic(s,o)})}function Pg(t,e){let n=-1;return t.some((r,o)=>e(r)?(n=o,!0):!1),n}function rB(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(tB(r)){const s=Dx(xi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${pw(r)+s}px`;const a=Fn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${pw(c)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Fn(r).body;else{const s=r.parentElement,a=xi(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 oB(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class iB{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&&Ic(e.modalRef,!1);const o=oB(n);hw(n,e.mount,e.modalRef,o,!0);const i=Pg(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=Pg(this.containers,i=>i.modals.includes(e)),o=this.containers[r];o.restore||(o.restore=rB(o,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const o=Pg(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&&Ic(e.modalRef,n),hw(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&&Ic(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const sB=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function aB(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 lB(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 cB(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||lB(t))}function uB(t){const e=[],n=[];return Array.from(t.querySelectorAll(sB)).forEach((r,o)=>{const i=aB(r);i===-1||!cB(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 dB(){return!0}function Pc(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=uB,isEnabled:s=dB,open:a}=t,c=D.useRef(!1),u=D.useRef(null),f=D.useRef(null),p=D.useRef(null),m=D.useRef(null),y=D.useRef(!1),b=D.useRef(null),g=At(Ks(e),b),x=D.useRef(null);D.useEffect(()=>{!a||!b.current||(y.current=!n)},[n,a]),D.useEffect(()=>{if(!a||!b.current)return;const T=Fn(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(`
|
|
116
|
-
`)),b.current.setAttribute("tabIndex","-1")),y.current&&b.current.focus()),()=>{o||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}},[a]),D.useEffect(()=>{if(!a||!b.current)return;const T=Fn(b.current),C=A=>{x.current=A,!(r||!s()||A.key!=="Tab")&&T.activeElement===b.current&&A.shiftKey&&(c.current=!0,f.current&&f.current.focus())},k=()=>{var L,O;const A=b.current;if(A===null)return;if(!T.hasFocus()||!s()||c.current){c.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(!y.current)return;let I=[];if((T.activeElement===u.current||T.activeElement===f.current)&&(I=i(b.current)),I.length>0){const N=!!((L=x.current)!=null&&L.shiftKey&&((O=x.current)==null?void 0:O.key)==="Tab"),$=I[0],V=I[I.length-1];typeof $!="string"&&typeof V!="string"&&(N?V.focus():$.focus())}else A.focus()};T.addEventListener("focusin",k),T.addEventListener("keydown",C,!0);const M=setInterval(()=>{T.activeElement&&T.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(M),T.removeEventListener("focusin",k),T.removeEventListener("keydown",C,!0)}},[n,r,o,s,a,i]);const w=T=>{p.current===null&&(p.current=T.relatedTarget),y.current=!0,m.current=T.target;const C=e.props.onFocus;C&&C(T)},E=T=>{p.current===null&&(p.current=T.relatedTarget),y.current=!0};return v.jsxs(D.Fragment,{children:[v.jsx("div",{tabIndex:a?0:-1,onFocus:E,ref:u,"data-testid":"sentinelStart"}),D.cloneElement(e,{ref:g,onFocus:w}),v.jsx("div",{tabIndex:a?0:-1,onFocus:E,ref:f,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Pc.propTypes={children:Us,disableAutoFocus:l.bool,disableEnforceFocus:l.bool,disableRestoreFocus:l.bool,getTabbable:l.func,isEnabled:l.func,open:l.bool.isRequired}),process.env.NODE_ENV!=="production"&&(Pc.propTypes=eg(Pc.propTypes));function fB(t){return typeof t=="function"?t():t}const Nc=D.forwardRef(function(e,n){const{children:r,container:o,disablePortal:i=!1}=e,[s,a]=D.useState(null),c=At(D.isValidElement(r)?Ks(r):null,n);if(Rn(()=>{i||a(fB(o)||document.body)},[o,i]),Rn(()=>{if(s&&!i)return Ex(n,s),()=>{Ex(n,null)}},[n,s,i]),i){if(D.isValidElement(r)){const u={ref:c};return D.cloneElement(r,u)}return r}return s&&qI.createPortal(r,s)});process.env.NODE_ENV!=="production"&&(Nc.propTypes={children:l.node,container:l.oneOfType([vi,l.func]),disablePortal:l.bool}),process.env.NODE_ENV!=="production"&&(Nc.propTypes=eg(Nc.propTypes));const pB={entering:{opacity:1},entered:{opacity:1}},Xo=D.forwardRef(function(e,n){const r=ro(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:a,easing:c,in:u,onEnter:f,onEntered:p,onEntering:m,onExit:y,onExited:b,onExiting:g,style:x,timeout:w=o,TransitionComponent:E=Vr,...T}=e,C=D.useRef(null),k=At(C,Ks(a),n),M=z=>F=>{if(z){const B=C.current;F===void 0?z(B):z(B,F)}},A=M(m),I=M((z,F)=>{fw(z);const B=fl({style:x,timeout:w,easing:c},{mode:"enter"});z.style.webkitTransition=r.transitions.create("opacity",B),z.style.transition=r.transitions.create("opacity",B),f&&f(z,F)}),L=M(p),O=M(g),N=M(z=>{const F=fl({style:x,timeout:w,easing:c},{mode:"exit"});z.style.webkitTransition=r.transitions.create("opacity",F),z.style.transition=r.transitions.create("opacity",F),y&&y(z)}),$=M(b),V=z=>{i&&i(C.current,z)};return v.jsx(E,{appear:s,in:u,nodeRef:C,onEnter:I,onEntered:L,onEntering:A,onExit:N,onExited:$,onExiting:O,addEndListener:V,timeout:w,...T,children:(z,{ownerState:F,...B})=>D.cloneElement(a,{style:{opacity:0,visibility:z==="exited"&&!u?"hidden":void 0,...pB[z],...x,...a.props.style},ref:k,...B})})});process.env.NODE_ENV!=="production"&&(Xo.propTypes={addEndListener:l.func,appear:l.bool,children:Us.isRequired,easing:l.oneOfType([l.shape({enter:l.string,exit:l.string}),l.string]),in:l.bool,onEnter:l.func,onEntered:l.func,onEntering:l.func,onExit:l.func,onExited:l.func,onExiting:l.func,style:l.object,timeout:l.oneOfType([l.number,l.shape({appear:l.number,enter:l.number,exit:l.number})])});function hB(t){return Qe("MuiBackdrop",t)}Ge("MuiBackdrop",["root","invisible"]);const mB=t=>{const{classes:e,invisible:n}=t;return Ze({root:["root",n&&"invisible"]},hB,e)},gB=re("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"}}]}),Ng=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiBackdrop"}),{children:o,className:i,component:s="div",invisible:a=!1,open:c,components:u={},componentsProps:f={},slotProps:p={},slots:m={},TransitionComponent:y,transitionDuration:b,...g}=r,x={...r,component:s,invisible:a},w=mB(x),E={transition:y,root:u.Root,...m},T={...f,...p},C={slots:E,slotProps:T},[k,M]=Lt("root",{elementType:gB,externalForwardedProps:C,className:me(w.root,i),ownerState:x}),[A,I]=Lt("transition",{elementType:Xo,externalForwardedProps:C,ownerState:x});return v.jsx(A,{in:c,timeout:b,...g,...I,children:v.jsx(k,{"aria-hidden":!0,...M,classes:w,ref:n,children:o})})});process.env.NODE_ENV!=="production"&&(Ng.propTypes={children:l.node,classes:l.object,className:l.string,component:l.elementType,components:l.shape({Root:l.elementType}),componentsProps:l.shape({root:l.object}),invisible:l.bool,open:l.bool.isRequired,slotProps:l.shape({root:l.oneOfType([l.func,l.object]),transition:l.oneOfType([l.func,l.object])}),slots:l.shape({root:l.elementType,transition:l.elementType}),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),TransitionComponent:l.elementType,transitionDuration:l.oneOfType([l.number,l.shape({appear:l.number,enter:l.number,exit:l.number})])});function yB(t){return typeof t=="function"?t():t}function bB(t){return t?t.props.hasOwnProperty("in"):!1}const mw=()=>{},cf=new iB;function vB(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:s,children:a,onClose:c,open:u,rootRef:f}=t,p=D.useRef({}),m=D.useRef(null),y=D.useRef(null),b=At(y,f),[g,x]=D.useState(!u),w=bB(a);let E=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(E=!1);const T=()=>Fn(m.current),C=()=>(p.current.modalRef=y.current,p.current.mount=m.current,p.current),k=()=>{cf.mount(C(),{disableScrollLock:r}),y.current&&(y.current.scrollTop=0)},M=qe(()=>{const F=yB(e)||T().body;cf.add(C(),F),y.current&&k()}),A=()=>cf.isTopModal(C()),I=qe(F=>{m.current=F,F&&(u&&A()?k():y.current&&Ic(y.current,E))}),L=D.useCallback(()=>{cf.remove(C(),E)},[E]);D.useEffect(()=>()=>{L()},[L]),D.useEffect(()=>{u?M():(!w||!o)&&L()},[u,L,w,o,M]);const O=F=>B=>{var W;(W=F.onKeyDown)==null||W.call(F,B),!(B.key!=="Escape"||B.which===229||!A())&&(n||(B.stopPropagation(),c&&c(B,"escapeKeyDown")))},N=F=>B=>{var W;(W=F.onClick)==null||W.call(F,B),B.target===B.currentTarget&&c&&c(B,"backdropClick")};return{getRootProps:(F={})=>{const B=Bx(t);delete B.onTransitionEnter,delete B.onTransitionExited;const W={...B,...F};return{role:"presentation",...W,onKeyDown:O(W),ref:b}},getBackdropProps:(F={})=>{const B=F;return{"aria-hidden":!0,...B,onClick:N(B),open:u}},getTransitionProps:()=>{const F=()=>{x(!1),i&&i()},B=()=>{x(!0),s&&s(),o&&L()};return{onEnter:Tx(F,(a==null?void 0:a.props.onEnter)??mw),onExited:Tx(B,(a==null?void 0:a.props.onExited)??mw)}},rootRef:b,portalRef:I,isTopModal:A,exited:g,hasTransition:w}}function xB(t){return Qe("MuiModal",t)}Ge("MuiModal",["root","hidden","backdrop"]);const SB=t=>{const{open:e,exited:n,classes:r}=t;return Ze({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},xB,r)},wB=re("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(Tt(({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"}}]}))),CB=re(Ng,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),$g=D.forwardRef(function(e,n){const r=vt({name:"MuiModal",props:e}),{BackdropComponent:o=CB,BackdropProps:i,classes:s,className:a,closeAfterTransition:c=!1,children:u,container:f,component:p,components:m={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:E=!1,disableScrollLock:T=!1,hideBackdrop:C=!1,keepMounted:k=!1,onBackdropClick:M,onClose:A,onTransitionEnter:I,onTransitionExited:L,open:O,slotProps:N={},slots:$={},theme:V,...z}=r,F={...r,closeAfterTransition:c,disableAutoFocus:b,disableEnforceFocus:g,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:E,disableScrollLock:T,hideBackdrop:C,keepMounted:k},{getRootProps:B,getBackdropProps:W,getTransitionProps:Y,portalRef:X,isTopModal:K,exited:Q,hasTransition:ve}=vB({...F,rootRef:n}),xe={...F,exited:Q},ye=SB(xe),oe={};if(u.props.tabIndex===void 0&&(oe.tabIndex="-1"),ve){const{onEnter:be,onExited:ne}=Y();oe.onEnter=be,oe.onExited=ne}const ce={slots:{root:m.Root,backdrop:m.Backdrop,...$},slotProps:{...y,...N}},[fe,q]=Lt("root",{ref:n,elementType:wB,externalForwardedProps:{...ce,...z,component:p},getSlotProps:B,ownerState:xe,className:me(a,ye==null?void 0:ye.root,!xe.open&&xe.exited&&(ye==null?void 0:ye.hidden))}),[ee,se]=Lt("backdrop",{ref:i==null?void 0:i.ref,elementType:o,externalForwardedProps:ce,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:be=>W({...be,onClick:ne=>{M&&M(ne),be!=null&&be.onClick&&be.onClick(ne)}}),className:me(i==null?void 0:i.className,ye==null?void 0:ye.backdrop),ownerState:xe});return!k&&!O&&(!ve||Q)?null:v.jsx(Nc,{ref:X,container:f,disablePortal:w,children:v.jsxs(fe,{...q,children:[!C&&o?v.jsx(ee,{...se}):null,v.jsx(Pc,{disableEnforceFocus:g,disableAutoFocus:b,disableRestoreFocus:E,isEnabled:K,open:O,children:D.cloneElement(u,oe)})]})})});process.env.NODE_ENV!=="production"&&($g.propTypes={BackdropComponent:l.elementType,BackdropProps:l.object,children:Us.isRequired,classes:l.object,className:l.string,closeAfterTransition:l.bool,component:l.elementType,components:l.shape({Backdrop:l.elementType,Root:l.elementType}),componentsProps:l.shape({backdrop:l.oneOfType([l.func,l.object]),root:l.oneOfType([l.func,l.object])}),container:l.oneOfType([vi,l.func]),disableAutoFocus:l.bool,disableEnforceFocus:l.bool,disableEscapeKeyDown:l.bool,disablePortal:l.bool,disableRestoreFocus:l.bool,disableScrollLock:l.bool,hideBackdrop:l.bool,keepMounted:l.bool,onBackdropClick:l.func,onClose:l.func,onTransitionEnter:l.func,onTransitionExited:l.func,open:l.bool.isRequired,slotProps:l.shape({backdrop:l.oneOfType([l.func,l.object]),root:l.oneOfType([l.func,l.object])}),slots:l.shape({backdrop:l.elementType,root:l.elementType}),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])});function TB(t){return Qe("MuiPaper",t)}Ge("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 kB=t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Ze(i,TB,o)},EB=re("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}`]]}})(Tt(({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)"}}]}))),Ci=D.forwardRef(function(e,n){var y;const r=vt({props:e,name:"MuiPaper"}),o=ro(),{className:i,component:s="div",elevation:a=1,square:c=!1,variant:u="elevation",...f}=r,p={...r,component:s,elevation:a,square:c,variant:u},m=kB(p);return process.env.NODE_ENV!=="production"&&o.shadows[a]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${a}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${a}]\` is defined.`].join(`
|
|
117
|
-
`)),v.jsx(EB,{as:s,ownerState:p,className:me(m.root,i),ref:n,...f,style:{...u==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[a],...o.vars&&{"--Paper-overlay":(y=o.vars.overlays)==null?void 0:y[a]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${ft("#fff",mg(a))}, ${ft("#fff",mg(a))})`}},...f.style}})});process.env.NODE_ENV!=="production"&&(Ci.propTypes={children:l.node,classes:l.object,className:l.string,component:l.elementType,elevation:yi(Nx,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:l.bool,style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),variant:l.oneOfType([l.oneOf(["elevation","outlined"]),l.string])});function _B(t){return Qe("MuiPopover",t)}Ge("MuiPopover",["root","paper"]);function gw(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function yw(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function bw(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function $c(t){return typeof t=="function"?t():t}const OB=t=>{const{classes:e}=t;return Ze({root:["root"],paper:["paper"]},_B,e)},MB=re($g,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),vw=re(Ci,{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}),xw=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:c="anchorEl",children:u,className:f,container:p,elevation:m=8,marginThreshold:y=16,open:b,PaperProps:g={},slots:x={},slotProps:w={},transformOrigin:E={vertical:"top",horizontal:"left"},TransitionComponent:T,transitionDuration:C="auto",TransitionProps:k={},disableScrollLock:M=!1,...A}=r,I=D.useRef(),L={...r,anchorOrigin:s,anchorReference:c,elevation:m,marginThreshold:y,transformOrigin:E,TransitionComponent:T,transitionDuration:C,TransitionProps:k},O=OB(L),N=D.useCallback(()=>{if(c==="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 se=$c(i),be=se&&se.nodeType===1?se:Fn(I.current).body,ne=be.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const le=be.getBoundingClientRect();process.env.NODE_ENV!=="test"&&le.top===0&&le.left===0&&le.right===0&&le.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
118
|
-
`))}return{top:ne.top+gw(ne,s.vertical),left:ne.left+yw(ne,s.horizontal)}},[i,s.horizontal,s.vertical,a,c]),$=D.useCallback(se=>({vertical:gw(se,E.vertical),horizontal:yw(se,E.horizontal)}),[E.horizontal,E.vertical]),V=D.useCallback(se=>{const be={width:se.offsetWidth,height:se.offsetHeight},ne=$(be);if(c==="none")return{top:null,left:null,transformOrigin:bw(ne)};const le=N();let pe=le.top-ne.vertical,Oe=le.left-ne.horizontal;const ke=pe+be.height,Fe=Oe+be.width,Ie=xi($c(i)),Ke=Ie.innerHeight-y,Xe=Ie.innerWidth-y;if(y!==null&&pe<y){const U=pe-y;pe-=U,ne.vertical+=U}else if(y!==null&&ke>Ke){const U=ke-Ke;pe-=U,ne.vertical+=U}if(process.env.NODE_ENV!=="production"&&be.height>Ke&&be.height&&Ke&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${be.height-Ke}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
|
|
119
|
-
`)),y!==null&&Oe<y){const U=Oe-y;Oe-=U,ne.horizontal+=U}else if(Fe>Xe){const U=Fe-Xe;Oe-=U,ne.horizontal+=U}return{top:`${Math.round(pe)}px`,left:`${Math.round(Oe)}px`,transformOrigin:bw(ne)}},[i,c,N,$,y]),[z,F]=D.useState(b),B=D.useCallback(()=>{const se=I.current;if(!se)return;const be=V(se);be.top!==null&&se.style.setProperty("top",be.top),be.left!==null&&(se.style.left=be.left),se.style.transformOrigin=be.transformOrigin,F(!0)},[V]);D.useEffect(()=>(M&&window.addEventListener("scroll",B),()=>window.removeEventListener("scroll",B)),[i,M,B]);const W=()=>{B()},Y=()=>{F(!1)};D.useEffect(()=>{b&&B()}),D.useImperativeHandle(o,()=>b?{updatePosition:()=>{B()}}:null,[b,B]),D.useEffect(()=>{if(!b)return;const se=kx(()=>{B()}),be=xi($c(i));return be.addEventListener("resize",se),()=>{se.clear(),be.removeEventListener("resize",se)}},[i,b,B]);let X=C;const K={slots:{transition:T,...x},slotProps:{transition:k,paper:g,...w}},[Q,ve]=Lt("transition",{elementType:pl,externalForwardedProps:K,ownerState:L,getSlotProps:se=>({...se,onEntering:(be,ne)=>{var le;(le=se.onEntering)==null||le.call(se,be,ne),W()},onExited:be=>{var ne;(ne=se.onExited)==null||ne.call(se,be),Y()}}),additionalProps:{appear:!0,in:b}});C==="auto"&&!Q.muiSupportAuto&&(X=void 0);const xe=p||(i?Fn($c(i)).body:void 0),[ye,{slots:oe,slotProps:ce,...fe}]=Lt("root",{ref:n,elementType:MB,externalForwardedProps:{...K,...A},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:x.backdrop},slotProps:{backdrop:_L(typeof w.backdrop=="function"?w.backdrop(L):w.backdrop,{invisible:!0})},container:xe,open:b},ownerState:L,className:me(O.root,f)}),[q,ee]=Lt("paper",{ref:I,className:O.paper,elementType:vw,externalForwardedProps:K,shouldForwardComponentProp:!0,additionalProps:{elevation:m,style:z?void 0:{opacity:0}},ownerState:L});return v.jsx(ye,{...fe,...!kc(ye)&&{slots:oe,slotProps:ce,disableScrollLock:M},children:v.jsx(Q,{...ve,timeout:X,children:v.jsx(q,{...ee,children:u})})})});process.env.NODE_ENV!=="production"&&(xw.propTypes={action:Dn,anchorEl:yi(l.oneOfType([vi,l.func]),t=>{if(t.open&&(!t.anchorReference||t.anchorReference==="anchorEl")){const e=$c(t.anchorEl);if(e&&e.nodeType===1){const n=e.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
120
|
-
`))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${e}\` instead.`].join(`
|
|
121
|
-
`))}return null}),anchorOrigin:l.shape({horizontal:l.oneOfType([l.oneOf(["center","left","right"]),l.number]).isRequired,vertical:l.oneOfType([l.oneOf(["bottom","center","top"]),l.number]).isRequired}),anchorPosition:l.shape({left:l.number.isRequired,top:l.number.isRequired}),anchorReference:l.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:l.elementType,BackdropProps:l.object,children:l.node,classes:l.object,className:l.string,container:l.oneOfType([vi,l.func]),disableScrollLock:l.bool,elevation:Nx,marginThreshold:l.number,onClose:l.func,open:l.bool.isRequired,PaperProps:l.shape({component:Ya}),slotProps:l.shape({backdrop:l.oneOfType([l.func,l.object]),paper:l.oneOfType([l.func,l.object]),root:l.oneOfType([l.func,l.object]),transition:l.oneOfType([l.func,l.object])}),slots:l.shape({backdrop:l.elementType,paper:l.elementType,root:l.elementType,transition:l.elementType}),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),transformOrigin:l.shape({horizontal:l.oneOfType([l.oneOf(["center","left","right"]),l.number]).isRequired,vertical:l.oneOfType([l.oneOf(["bottom","center","top"]),l.number]).isRequired}),TransitionComponent:l.elementType,transitionDuration:l.oneOfType([l.oneOf(["auto"]),l.number,l.shape({appear:l.number,enter:l.number,exit:l.number})]),TransitionProps:l.object});function AB(t){return Qe("MuiMenu",t)}Ge("MuiMenu",["root","paper","list"]);const DB={vertical:"top",horizontal:"right"},IB={vertical:"top",horizontal:"left"},PB=t=>{const{classes:e}=t;return Ze({root:["root"],paper:["paper"],list:["list"]},AB,e)},NB=re(xw,{shouldForwardProp:t=>oo(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),$B=re(vw,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),LB=re(lw,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),Sw=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:s,disableAutoFocusItem:a=!1,MenuListProps:c={},onClose:u,open:f,PaperProps:p={},PopoverClasses:m,transitionDuration:y="auto",TransitionProps:{onEntering:b,...g}={},variant:x="selectedMenu",slots:w={},slotProps:E={},...T}=r,C=dg(),k={...r,autoFocus:o,disableAutoFocusItem:a,MenuListProps:c,onEntering:b,PaperProps:p,transitionDuration:y,TransitionProps:g,variant:x},M=PB(k),A=o&&!a&&f,I=D.useRef(null),L=(X,K)=>{I.current&&I.current.adjustStyleForScrollbar(X,{direction:C?"rtl":"ltr"}),b&&b(X,K)},O=X=>{X.key==="Tab"&&(X.preventDefault(),u&&u(X,"tabKeyDown"))};let N=-1;D.Children.map(i,(X,K)=>{D.isValidElement(X)&&(process.env.NODE_ENV!=="production"&&bi.isFragment(X)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
122
|
-
`)),X.props.disabled||(x==="selectedMenu"&&X.props.selected||N===-1)&&(N=K))});const $={slots:w,slotProps:{list:c,transition:g,paper:p,...E}},V=$t({elementType:w.root,externalSlotProps:E.root,ownerState:k,className:[M.root,s]}),[z,F]=Lt("paper",{className:M.paper,elementType:$B,externalForwardedProps:$,shouldForwardComponentProp:!0,ownerState:k}),[B,W]=Lt("list",{className:me(M.list,c.className),elementType:LB,shouldForwardComponentProp:!0,externalForwardedProps:$,getSlotProps:X=>({...X,onKeyDown:K=>{var Q;O(K),(Q=X.onKeyDown)==null||Q.call(X,K)}}),ownerState:k}),Y=typeof $.slotProps.transition=="function"?$.slotProps.transition(k):$.slotProps.transition;return v.jsx(NB,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:C?"right":"left"},transformOrigin:C?DB:IB,slots:{root:w.root,paper:z,backdrop:w.backdrop,...w.transition&&{transition:w.transition}},slotProps:{root:V,paper:F,backdrop:typeof E.backdrop=="function"?E.backdrop(k):E.backdrop,transition:{...Y,onEntering:(...X)=>{var K;L(...X),(K=Y==null?void 0:Y.onEntering)==null||K.call(Y,...X)}}},open:f,ref:n,transitionDuration:y,ownerState:k,...T,classes:m,children:v.jsx(B,{actions:I,autoFocus:o&&(N===-1||a),autoFocusItem:A,variant:x,...W,children:i})})});process.env.NODE_ENV!=="production"&&(Sw.propTypes={anchorEl:l.oneOfType([vi,l.func]),autoFocus:l.bool,children:l.node,classes:l.object,className:l.string,disableAutoFocusItem:l.bool,MenuListProps:l.object,onClose:l.func,open:l.bool.isRequired,PaperProps:l.object,PopoverClasses:l.object,slotProps:l.shape({backdrop:l.oneOfType([l.func,l.object]),list:l.oneOfType([l.func,l.object]),paper:l.oneOfType([l.func,l.object]),root:l.oneOfType([l.func,l.object]),transition:l.oneOfType([l.func,l.object])}),slots:l.shape({backdrop:l.elementType,list:l.elementType,paper:l.elementType,root:l.elementType,transition:l.elementType}),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),transitionDuration:l.oneOfType([l.oneOf(["auto"]),l.number,l.shape({appear:l.number,enter:l.number,exit:l.number})]),TransitionProps:l.object,variant:l.oneOf(["menu","selectedMenu"])});function FB(t){return Qe("MuiNativeSelect",t)}const Lg=Ge("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),RB=t=>{const{classes:e,variant:n,disabled:r,multiple:o,open:i,error:s}=t,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${$e(n)}`,i&&"iconOpen",r&&"disabled"]};return Ze(a,FB,e)},ww=re("select",{name:"MuiNativeSelect"})(({theme:t})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Lg.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}}}]})),BB=re(ww,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:oo,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${Lg.multiple}`]:e.multiple}]}})({}),Cw=re("svg",{name:"MuiNativeSelect"})(({theme:t})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Lg.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}}]})),VB=re(Cw,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${$e(n.variant)}`],n.open&&e.iconOpen]}})({}),Tw=D.forwardRef(function(e,n){const{className:r,disabled:o,error:i,IconComponent:s,inputRef:a,variant:c="standard",...u}=e,f={...e,disabled:o,variant:c,error:i},p=RB(f);return v.jsxs(D.Fragment,{children:[v.jsx(BB,{ownerState:f,className:me(p.select,r),disabled:o,ref:a||n,...u}),e.multiple?null:v.jsx(VB,{as:s,ownerState:f,className:p.icon})]})});process.env.NODE_ENV!=="production"&&(Tw.propTypes={children:l.node,classes:l.object,className:l.string,disabled:l.bool,error:l.bool,IconComponent:l.elementType.isRequired,inputRef:Dn,multiple:l.bool,name:l.string,onChange:l.func,value:l.any,variant:l.oneOf(["standard","outlined","filled"])});function kw(t){return Qe("MuiSelect",t)}const Ti=Ge("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Ew;const zB=re(ww,{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${Ti.select}`]:e.select},{[`&.${Ti.select}`]:e[n.variant]},{[`&.${Ti.error}`]:e.error},{[`&.${Ti.multiple}`]:e.multiple}]}})({[`&.${Ti.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),HB=re(Cw,{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${$e(n.variant)}`],n.open&&e.iconOpen]}})({}),WB=re("input",{shouldForwardProp:t=>DS(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 _w(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function jB(t){return t==null||typeof t=="string"&&!t.trim()}const UB=t=>{const{classes:e,variant:n,disabled:r,multiple:o,open:i,error:s}=t,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${$e(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Ze(a,kw,e)},Ow=D.forwardRef(function(e,n){var We;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:s,children:a,className:c,defaultOpen:u,defaultValue:f,disabled:p,displayEmpty:m,error:y=!1,IconComponent:b,inputRef:g,labelId:x,MenuProps:w={},multiple:E,name:T,onBlur:C,onChange:k,onClose:M,onFocus:A,onOpen:I,open:L,readOnly:O,renderValue:N,required:$,SelectDisplayProps:V={},tabIndex:z,type:F,value:B,variant:W="standard",...Y}=e,[X,K]=Go({controlled:B,default:f,name:"Select"}),[Q,ve]=Go({controlled:L,default:u,name:"Select"}),xe=D.useRef(null),ye=D.useRef(null),[oe,ce]=D.useState(null),{current:fe}=D.useRef(L!=null),[q,ee]=D.useState(),se=At(n,g),be=D.useCallback(_e=>{ye.current=_e,_e&&ce(_e)},[]),ne=oe==null?void 0:oe.parentNode;D.useImperativeHandle(se,()=>({focus:()=>{ye.current.focus()},node:xe.current,value:X}),[X]),D.useEffect(()=>{u&&Q&&oe&&!fe&&(ee(s?null:ne.clientWidth),ye.current.focus())},[oe,s]),D.useEffect(()=>{i&&ye.current.focus()},[i]),D.useEffect(()=>{if(!x)return;const _e=Fn(ye.current).getElementById(x);if(_e){const je=()=>{getSelection().isCollapsed&&ye.current.focus()};return _e.addEventListener("click",je),()=>{_e.removeEventListener("click",je)}}},[x]);const le=(_e,je)=>{_e?I&&I(je):M&&M(je),fe||(ee(s?null:ne.clientWidth),ve(_e))},pe=_e=>{_e.button===0&&(_e.preventDefault(),ye.current.focus(),le(!0,_e))},Oe=_e=>{le(!1,_e)},ke=D.Children.toArray(a),Fe=_e=>{const je=ke.find(et=>et.props.value===_e.target.value);je!==void 0&&(K(je.props.value),k&&k(_e,je))},Ie=_e=>je=>{let et;if(je.currentTarget.hasAttribute("tabindex")){if(E){et=Array.isArray(X)?X.slice():[];const it=X.indexOf(_e.props.value);it===-1?et.push(_e.props.value):et.splice(it,1)}else et=_e.props.value;if(_e.props.onClick&&_e.props.onClick(je),X!==et&&(K(et),k)){const it=je.nativeEvent||je,zt=new it.constructor(it.type,it);Object.defineProperty(zt,"target",{writable:!0,value:{value:et,name:T}}),k(zt,_e)}E||le(!1,je)}},Ke=_e=>{O||[" ","ArrowUp","ArrowDown","Enter"].includes(_e.key)&&(_e.preventDefault(),le(!0,_e))},Xe=oe!==null&&Q,U=_e=>{!Xe&&C&&(Object.defineProperty(_e,"target",{writable:!0,value:{value:X,name:T}}),C(_e))};delete Y["aria-invalid"];let Z,he;const Ne=[];let Pe=!1,Ae=!1;(Zd({value:X})||m)&&(N?Z=N(X):Pe=!0);const ze=ke.map(_e=>{if(!D.isValidElement(_e))return null;process.env.NODE_ENV!=="production"&&bi.isFragment(_e)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
123
|
-
`));let je;if(E){if(!Array.isArray(X))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":Yo(2));je=X.some(et=>_w(et,_e.props.value)),je&&Pe&&Ne.push(_e.props.children)}else je=_w(X,_e.props.value),je&&Pe&&(he=_e.props.children);return je&&(Ae=!0),D.cloneElement(_e,{"aria-selected":je?"true":"false",onClick:Ie(_e),onKeyUp:et=>{et.key===" "&&et.preventDefault(),_e.props.onKeyUp&&_e.props.onKeyUp(et)},role:"option",selected:je,value:void 0,"data-value":_e.props.value})});process.env.NODE_ENV!=="production"&&D.useEffect(()=>{if(!Ae&&!E&&X!==""){const _e=ke.map(je=>je.props.value);console.warn([`MUI: You have provided an out-of-range value \`${X}\` for the select ${T?`(name="${T}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${_e.filter(je=>je!=null).map(je=>`\`${je}\``).join(", ")||'""'}.`].join(`
|
|
124
|
-
`))}},[Ae,ke,E,T,X]),Pe&&(E?Ne.length===0?Z=null:Z=Ne.reduce((_e,je,et)=>(_e.push(je),et<Ne.length-1&&_e.push(", "),_e),[]):Z=he);let st=q;!s&&fe&&oe&&(st=ne.clientWidth);let pt;typeof z<"u"?pt=z:pt=p?null:0;const Vt=V.id||(T?`mui-component-select-${T}`:void 0),rt={...e,variant:W,value:X,open:Xe,error:y},Wt=UB(rt),Qt={...w.PaperProps,...(We=w.slotProps)==null?void 0:We.paper},ge=No();return v.jsxs(D.Fragment,{children:[v.jsx(zB,{as:"div",ref:be,tabIndex:pt,role:"combobox","aria-controls":Xe?ge:void 0,"aria-disabled":p?"true":void 0,"aria-expanded":Xe?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[x,Vt].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":$?"true":void 0,"aria-invalid":y?"true":void 0,onKeyDown:Ke,onMouseDown:p||O?null:pe,onBlur:U,onFocus:A,...V,ownerState:rt,className:me(V.className,Wt.select,c),id:Vt,children:jB(Z)?Ew||(Ew=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):Z}),v.jsx(WB,{"aria-invalid":y,value:Array.isArray(X)?X.join(","):X,name:T,ref:xe,"aria-hidden":!0,onChange:Fe,tabIndex:-1,disabled:p,className:Wt.nativeInput,autoFocus:i,required:$,...Y,ownerState:rt}),v.jsx(HB,{as:b,className:Wt.icon,ownerState:rt}),v.jsx(Sw,{id:`menu-${T||""}`,anchorEl:ne,open:Xe,onClose:Oe,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...w,slotProps:{...w.slotProps,list:{"aria-labelledby":x,role:"listbox","aria-multiselectable":E?"true":void 0,disableListWrap:!0,id:ge,...w.MenuListProps},paper:{...Qt,style:{minWidth:st,...Qt!=null?Qt.style:null}}},children:ze})]})});process.env.NODE_ENV!=="production"&&(Ow.propTypes={"aria-describedby":l.string,"aria-label":l.string,autoFocus:l.bool,autoWidth:l.bool,children:l.node,classes:l.object,className:l.string,defaultOpen:l.bool,defaultValue:l.any,disabled:l.bool,displayEmpty:l.bool,error:l.bool,IconComponent:l.elementType.isRequired,inputRef:Dn,labelId:l.string,MenuProps:l.object,multiple:l.bool,name:l.string,onBlur:l.func,onChange:l.func,onClose:l.func,onFocus:l.func,onOpen:l.func,open:l.bool,readOnly:l.bool,renderValue:l.func,required:l.bool,SelectDisplayProps:l.object,tabIndex:l.oneOfType([l.number,l.string]),type:l.any,value:l.any,variant:l.oneOf(["standard","outlined","filled"])});const qB=Be(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),KB=t=>{const{classes:e}=t,r=Ze({root:["root"]},kw,e);return{...e,...r}},Fg={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>oo(t)&&t!=="variant",slot:"Root"},YB=re(of,Fg)(""),GB=re(af,Fg)(""),JB=re(sf,Fg)(""),uf=D.forwardRef(function(e,n){const r=vt({name:"MuiSelect",props:e}),{autoWidth:o=!1,children:i,classes:s={},className:a,defaultOpen:c=!1,displayEmpty:u=!1,IconComponent:f=qB,id:p,input:m,inputProps:y,label:b,labelId:g,MenuProps:x,multiple:w=!1,native:E=!1,onClose:T,onOpen:C,open:k,renderValue:M,SelectDisplayProps:A,variant:I="outlined",...L}=r,O=E?Tw:Ow,N=Lo(),$=ll({props:r,muiFormControl:N,states:["variant","error"]}),V=$.variant||I,z={...r,variant:V,classes:s},F=KB(z),{root:B,...W}=F,Y=m||{standard:v.jsx(YB,{ownerState:z}),outlined:v.jsx(GB,{label:b,ownerState:z}),filled:v.jsx(JB,{ownerState:z})}[V],X=At(n,Ks(Y));return v.jsx(D.Fragment,{children:D.cloneElement(Y,{inputComponent:O,inputProps:{children:i,error:$.error,IconComponent:f,variant:V,type:void 0,multiple:w,...E?{id:p}:{autoWidth:o,defaultOpen:c,displayEmpty:u,labelId:g,MenuProps:x,onClose:T,onOpen:C,open:k,renderValue:M,SelectDisplayProps:{id:p,...A}},...y,classes:y?Hn(W,y.classes):W,...m?m.props.inputProps:{}},...(w&&E||u)&&V==="outlined"?{notched:!0}:{},ref:X,className:me(Y.props.className,a,F.root),...!m&&{variant:V},...L})})});process.env.NODE_ENV!=="production"&&(uf.propTypes={autoWidth:l.bool,children:l.node,classes:l.object,className:l.string,defaultOpen:l.bool,defaultValue:l.any,displayEmpty:l.bool,IconComponent:l.elementType,id:l.string,input:l.element,inputProps:l.object,label:l.node,labelId:l.string,MenuProps:l.object,multiple:l.bool,native:l.bool,onChange:l.func,onClose:l.func,onOpen:l.func,open:l.bool,renderValue:l.func,SelectDisplayProps:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),value:l.oneOfType([l.oneOf([""]),l.any]),variant:l.oneOf(["filled","outlined","standard"])}),uf.muiName="Select";function XB(t){return Qe("MuiTextField",t)}Ge("MuiTextField",["root"]);const ZB={standard:of,filled:sf,outlined:af},QB=t=>{const{classes:e}=t;return Ze({root:["root"]},XB,e)},e5=re(Sg,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Lc=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:s,className:a,color:c="primary",defaultValue:u,disabled:f=!1,error:p=!1,FormHelperTextProps:m,fullWidth:y=!1,helperText:b,id:g,InputLabelProps:x,inputProps:w,InputProps:E,inputRef:T,label:C,maxRows:k,minRows:M,multiline:A=!1,name:I,onBlur:L,onChange:O,onFocus:N,placeholder:$,required:V=!1,rows:z,select:F=!1,SelectProps:B,slots:W={},slotProps:Y={},type:X,value:K,variant:Q="outlined",...ve}=r,xe={...r,autoFocus:i,color:c,disabled:f,error:p,fullWidth:y,multiline:A,required:V,select:F,variant:Q},ye=QB(xe);process.env.NODE_ENV!=="production"&&F&&!s&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const oe=No(g),ce=b&&oe?`${oe}-helper-text`:void 0,fe=C&&oe?`${oe}-label`:void 0,q=ZB[Q],ee={slots:W,slotProps:{input:E,inputLabel:x,htmlInput:w,formHelperText:m,select:B,...Y}},se={},be=ee.slotProps.inputLabel;Q==="outlined"&&(be&&typeof be.shrink<"u"&&(se.notched=be.shrink),se.label=C),F&&((!B||!B.native)&&(se.id=void 0),se["aria-describedby"]=void 0);const[ne,le]=Lt("root",{elementType:e5,shouldForwardComponentProp:!0,externalForwardedProps:{...ee,...ve},ownerState:xe,className:me(ye.root,a),ref:n,additionalProps:{disabled:f,error:p,fullWidth:y,required:V,color:c,variant:Q}}),[pe,Oe]=Lt("input",{elementType:q,externalForwardedProps:ee,additionalProps:se,ownerState:xe}),[ke,Fe]=Lt("inputLabel",{elementType:xg,externalForwardedProps:ee,ownerState:xe}),[Ie,Ke]=Lt("htmlInput",{elementType:"input",externalForwardedProps:ee,ownerState:xe}),[Xe,U]=Lt("formHelperText",{elementType:wg,externalForwardedProps:ee,ownerState:xe}),[Z,he]=Lt("select",{elementType:uf,externalForwardedProps:ee,ownerState:xe}),Ne=v.jsx(pe,{"aria-describedby":ce,autoComplete:o,autoFocus:i,defaultValue:u,fullWidth:y,multiline:A,name:I,rows:z,maxRows:k,minRows:M,type:X,value:K,id:oe,inputRef:T,onBlur:L,onChange:O,onFocus:N,placeholder:$,inputProps:Ke,slots:{input:W.htmlInput?Ie:void 0},...Oe});return v.jsxs(ne,{...le,children:[C!=null&&C!==""&&v.jsx(ke,{htmlFor:oe,id:fe,...Fe,children:C}),F?v.jsx(Z,{"aria-describedby":ce,id:oe,labelId:fe,value:K,input:Ne,...he,children:s}):Ne,b&&v.jsx(Xe,{id:ce,...U,children:b})]})});process.env.NODE_ENV!=="production"&&(Lc.propTypes={autoComplete:l.string,autoFocus:l.bool,children:l.node,classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["primary","secondary","error","info","success","warning"]),l.string]),defaultValue:l.any,disabled:l.bool,error:l.bool,FormHelperTextProps:l.object,fullWidth:l.bool,helperText:l.node,id:l.string,InputLabelProps:l.object,inputProps:l.object,InputProps:l.object,inputRef:Dn,label:l.node,margin:l.oneOf(["dense","none","normal"]),maxRows:l.oneOfType([l.number,l.string]),minRows:l.oneOfType([l.number,l.string]),multiline:l.bool,name:l.string,onBlur:l.func,onChange:l.func,onFocus:l.func,placeholder:l.string,required:l.bool,rows:l.oneOfType([l.number,l.string]),select:l.bool,SelectProps:l.object,size:l.oneOfType([l.oneOf(["medium","small"]),l.string]),slotProps:l.shape({formHelperText:l.oneOfType([l.func,l.object]),htmlInput:l.oneOfType([l.func,l.object]),input:l.oneOfType([l.func,l.object]),inputLabel:l.oneOfType([l.func,l.object]),select:l.oneOfType([l.func,l.object])}),slots:l.shape({formHelperText:l.elementType,htmlInput:l.elementType,input:l.elementType,inputLabel:l.elementType,root:l.elementType,select:l.elementType}),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),type:l.string,value:l.any,variant:l.oneOf(["filled","outlined","standard"])});const Fc=(t,e)=>t.length!==e.length?!1:e.every(n=>t.includes(n)),t5=({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}},df=(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},Rc=({date:t,disableFuture:e,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:s,timezone:a})=>{const c=df(s,s.date(void 0,a),t);n&&s.isBefore(o,c)&&(o=c),e&&s.isAfter(r,c)&&(r=c);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},n5=(t,e)=>e==null||!t.isValid(e)?null:e,ao=(t,e,n)=>e==null||!t.isValid(e)?n:e,r5=(t,e,n)=>!t.isValid(e)&&e!=null&&!t.isValid(n)&&n!=null?!0:t.isEqual(e,n),Rg=(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},Mw=(t,e,n)=>n==="date"?t.startOfDay(t.date(void 0,e)):t.date(void 0,e),o5=["year","month","day"],Aw=t=>o5.includes(t),Bg=(t,{format:e,views:n},r)=>{if(e!=null)return e;const o=t.formats;return Fc(n,["year"])?o.year:Fc(n,["month"])?o.month:Fc(n,["day"])?o.dayOfMonth:Fc(n,["month","year"])?`${o.month} ${o.year}`:Fc(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(t.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},i5=(t,e)=>{const n=t.startOfWeek(e);return[0,1,2,3,4,5,6].map(r=>t.addDays(n,r))},s5=["hours","minutes","seconds"],a5=t=>s5.includes(t),Dw=(t,e)=>e.getHours(t)*3600+e.getMinutes(t)*60+e.getSeconds(t),l5=(t,e)=>(n,r)=>t?e.isAfter(n,r):Dw(n,e)>Dw(r,e),Zo={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},c5=t=>Math.max(...t.map(e=>Zo[e.type]??1)),Bc=(t,e,n)=>{if(e===Zo.year)return t.startOfYear(n);if(e===Zo.month)return t.startOfMonth(n);if(e===Zo.day)return t.startOfDay(n);let r=n;return e<Zo.minutes&&(r=t.setMinutes(r,0)),e<Zo.seconds&&(r=t.setSeconds(r,0)),e<Zo.milliseconds&&(r=t.setMilliseconds(r,0)),r},u5=({props:t,utils:e,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():Bc(e,n,Mw(e,r));t.minDate!=null&&e.isAfterDay(t.minDate,i)&&(i=Bc(e,n,t.minDate)),t.maxDate!=null&&e.isBeforeDay(t.maxDate,i)&&(i=Bc(e,n,t.maxDate));const s=l5(t.disableIgnoringDatePartForTimeValidation??!1,e);return t.minTime!=null&&s(t.minTime,i)&&(i=Bc(e,n,t.disableIgnoringDatePartForTimeValidation?t.minTime:df(e,i,t.minTime))),t.maxTime!=null&&s(i,t.maxTime)&&(i=Bc(e,n,t.disableIgnoringDatePartForTimeValidation?t.maxTime:df(e,i,t.maxTime))),i},Vg=(t,e)=>{const n=t.formatTokenMap[e];if(n==null)throw new Error([`MUI X: The token "${e}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
|
|
125
|
-
`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},d5=t=>{switch(t){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},ff=(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))},Iw=(t,e,n,r)=>{switch(n){case"month":return Rg(t,t.date(void 0,e)).map(o=>t.formatByString(o,r));case"weekDay":return ff(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[]}},Pw="s",f5=["0","1","2","3","4","5","6","7","8","9"],p5=t=>{const e=t.date(void 0);return t.formatByString(t.setSeconds(e,0),Pw)==="0"?f5:Array.from({length:10}).map((r,o)=>t.formatByString(t.setSeconds(e,o),Pw))},na=(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("")},zg=(t,e)=>e[0]==="0"?t:t.split("").map(n=>e[Number(n)]).join(""),Nw=(t,e)=>{const n=na(t,e);return n!==" "&&!Number.isNaN(Number(n))},$w=(t,e)=>{let n=t;for(n=Number(n).toString();n.length<e;)n=`0${n}`;return n},Lw=(t,e,n,r,o)=>{if(process.env.NODE_ENV!=="production"&&o.type!=="day"&&o.contentType==="digit-with-letter")throw new Error([`MUI X: The token "${o.format}" is a digit format with letter in it.'
|
|
126
|
-
This type of format is only supported for 'day' sections`].join(`
|
|
127
|
-
`));if(o.type==="day"&&o.contentType==="digit-with-letter"){const s=t.setDate(n.longestMonth,e);return t.formatByString(s,o.format)}let i=e.toString();return o.hasLeadingZerosInInput&&(i=$w(i,o.maxLength)),zg(i,r)},h5=(t,e,n,r,o,i,s,a)=>{const c=d5(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}),g=E=>Lw(t,E,b,i,n),x=n.type==="minutes"&&(a!=null&&a.minutesStep)?a.minutesStep:1;let w;if(p){if(n.type==="year"&&!f&&!u)return t.formatByString(t.date(void 0,e),n.format);c>0||u?w=b.minimum:w=b.maximum}else w=parseInt(na(n.value,i),10)+c*x;return w%x!==0&&((c<0||u)&&(w+=x-(x+w)%x),(c>0||f)&&(w-=w%x)),w>b.maximum?g(b.minimum+(w-b.maximum-1)%(b.maximum-b.minimum+1)):w<b.minimum?g(b.maximum-(b.minimum-w-1)%(b.maximum-b.minimum+1)):g(w)},y=()=>{const b=Iw(t,e,n.type,n.format);if(b.length===0)return n.value;if(p)return c>0||u?b[0]:b[b.length-1];const w=((b.indexOf(n.value)+c)%b.length+b.length)%b.length;return b[w]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?m():y()},Hg=(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(na(r,n)).toString()),["input-rtl","input-ltr"].includes(e)&&t.contentType==="digit"&&!o&&r.length===1&&(r=`${r}`),e==="input-rtl"&&(r=`${r}`),r},Fw=(t,e,n,r)=>{if(process.env.NODE_ENV!=="production"&&Vg(t,n).type==="weekDay")throw new Error("changeSectionValueFormat doesn't support week day formats");return t.formatByString(t.parse(e,n),r)},m5=(t,e)=>t.formatByString(t.date(void 0,"system"),e).length===4,Rw=(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")}},g5=(t,e,n)=>{const r=e.some(c=>c.type==="day"),o=[],i=[];for(let c=0;c<e.length;c+=1){const u=e[c];r&&u.type==="weekDay"||(o.push(u.format),i.push(Hg(u,"non-input",n)))}const s=o.join(" "),a=i.join(" ");return t.parse(a,s)},y5=t=>t.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),b5=(t,e,n)=>{const o=t.map(i=>{const s=Hg(i,n?"input-rtl":"input-ltr",e);return`${i.startSeparator}${s}${i.endSeparator}`}).join("");return n?`${o}`:o},v5=(t,e,n)=>{const r=t.date(void 0,n),o=t.endOfYear(r),i=t.endOfDay(r),{maxDaysInMonth:s,longestMonth:a}=Rg(t,r).reduce((c,u)=>{const f=t.getDaysInMonth(u);return f>c.maxDaysInMonth?{maxDaysInMonth:f,longestMonth:u}:c},{maxDaysInMonth:0,longestMonth:null});return{year:({format:c})=>({minimum:0,maximum:m5(t,c)?9999:99}),month:()=>({minimum:1,maximum:t.getMonth(o)+1}),day:({currentDate:c})=>({minimum:1,maximum:c!=null&&t.isValid(c)?t.getDaysInMonth(c):s,longestMonth:a}),weekDay:({format:c,contentType:u})=>{if(u==="digit"){const f=ff(t,c).map(Number);return{minimum:Math.min(...f),maximum:Math.max(...f)}}return{minimum:1,maximum:7}},hours:({format:c})=>{const u=t.getHours(i);return na(t.formatByString(t.endOfDay(r),c),e)!==u.toString()?{minimum:1,maximum:Number(na(t.formatByString(t.startOfDay(r),c),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 Bw=!1;const Vw=(t,e)=>{if(process.env.NODE_ENV!=="production"&&!Bw){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('", "')}"]\`.`),Bw=!0)}},x5=(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=ff(t,e.format),i=t.formatByString(n,e.format),s=o.indexOf(i),c=o.indexOf(e.value)-s;return t.addDays(n,c)}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}},zw={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},Hw=(t,e,n,r,o)=>[...n].sort((i,s)=>zw[i.type]-zw[s.type]).reduce((i,s)=>!o||s.modified?x5(t,s,e,i):i,r),S5=()=>navigator.userAgent.toLowerCase().includes("android"),w5=(t,e)=>{const n={};if(!e)return t.forEach((c,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((c,u)=>{var f;return u>=i&&((f=c.endSeparator)==null?void 0:f.includes(" "))&&c.endSeparator!==" / "}),s===-1&&(s=t.length-1);for(let c=s;c>=i;c-=1)o[c]=a,r[a]=c,a-=1;i=s+1}return t.forEach((c,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]}},Wg=(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},C5=(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}},T5=(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}},k5=["value","referenceDate"],Qo={emptyValue:null,getTodayValue:Mw,getInitialReferenceValue:t=>{let{value:e,referenceDate:n}=t,r=mt(t,k5);return e!=null&&r.utils.isValid(e)?e:n??u5(r)},cleanValue:n5,areValuesEqual:r5,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)},E5={updateReferenceValue:(t,e,n)=>e==null||!t.isValid(e)?n:e,getSectionsFromValue:(t,e,n,r)=>!t.isValid(e)&&!!n?n:r(e),getV7HiddenInputValueFromSections:y5,getV6InputValueFromSections:b5,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)},_5=D.createContext();process.env.NODE_ENV!=="production"&&(l.node,l.bool);const ki=()=>D.useContext(_5)??!1,Vc=({props:t,value:e,timezone:n,adapter:r})=>{if(e===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:s,disablePast:a,disableFuture:c}=t,u=r.utils.date(void 0,n),f=ao(r.utils,t.minDate,r.defaultDates.minDate),p=ao(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!!(c&&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}};Vc.valueManager=Qo;const Ww=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],O5=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],M5=["minDateTime","maxDateTime"],A5=[...Ww,...O5,...M5],jw=t=>A5.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{}),D5=t=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:ie({},t)}}}}),Uw=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)}},qw={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"},I5=qw;D5(qw);const ra=()=>{const t=D.useContext(jd);if(t===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
|
|
128
|
-
`));if(t.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
|
|
129
|
-
`));const e=D.useMemo(()=>ie({},I5,t.localeText),[t.localeText]);return D.useMemo(()=>ie({},t,{localeText:e}),[t,e])},nn=()=>ra().utils,zc=()=>ra().defaultDates,pf=t=>{const e=nn(),n=D.useRef(void 0);return n.current===void 0&&(n.current=e.date(void 0,t)),n.current};function Kw(t){const{props:e,validator:n,value:r,timezone:o,onError:i}=t,s=ra(),a=D.useRef(n.valueManager.defaultErrorState),c=n({adapter:s,value:r,timezone:o,props:e}),u=n.valueManager.hasError(c);D.useEffect(()=>{i&&!n.valueManager.isSameError(c,a.current)&&i(c,r),a.current=c},[n,i,c,r]);const f=qe(p=>n({adapter:s,value:p,timezone:o,props:e}));return{validationError:c,hasValidationError:u,getValidationErrorForNewValue:f}}const Ei=()=>ra().localeText,P5=({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},N5=({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},$5=(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}},L5=({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 c=Vg(t,s),u=Rw(t,c.contentType,c.type,s),f=n?u:c.contentType==="digit",p=e!=null&&t.isValid(e);let m=p?t.formatByString(e,s):"",y=null;if(f)if(u)y=m===""?t.formatByString(i,s).length:m.length;else{if(c.maxLength==null)throw new Error(`MUI X: The token ${s} should have a 'maxDigitNumber' property on it's adapter`);y=c.maxLength,p&&(m=zg($w(na(m,o),y),o))}return ie({},c,{format:s,maxLength:y,value:m,placeholder:$5(t,r,c,s),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:f,startSeparator:a,endSeparator:"",modified:!1})},F5=t=>{var y;const{utils:e,expandedFormat:n,escapedParts:r}=t,o=e.date(void 0),i=[];let s="";const a=Object.keys(e.formatTokenMap).sort((b,g)=>g.length-b.length),c=/^([a-zA-Z]+)/,u=new RegExp(`^(${a.join("|")})*$`),f=new RegExp(`^(${a.join("|")})`),p=b=>r.find(g=>g.start<=b&&g.end>=b);let m=0;for(;m<n.length;){const b=p(m),g=b!=null,x=(y=c.exec(n.slice(m)))==null?void 0:y[1];if(!g&&x!=null&&u.test(x)){let w=x;for(;w.length>0;){const E=f.exec(w)[1];w=w.slice(E.length),i.push(L5(ie({},t,{now:o,token:E,startSeparator:s}))),s=""}m+=x.length}else{const w=n[m];g&&(b==null?void 0:b.start)===m||(b==null?void 0:b.end)===m||(i.length===0?s+=w:i[i.length-1].endSeparator+=w),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},R5=({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}),Yw=t=>{let e=P5(t);t.isRtl&&t.enableAccessibleFieldDOMStructure&&(e=e.split(" ").reverse().join(" "));const n=N5(ie({},t,{expandedFormat:e})),r=F5(ie({},t,{expandedFormat:e,escapedParts:n}));return R5(ie({},t,{sections:r}))},jg=({timezone:t,value:e,defaultValue:n,referenceDate:r,onChange:o,valueManager:i})=>{const s=nn(),a=D.useRef(n),c=e??a.current??i.emptyValue,u=D.useMemo(()=>i.getTimezone(s,c),[s,i,c]),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,c),[i,s,p,c]),y=qe((b,...g)=>{const x=f(b);o==null||o(x,...g)});return{value:m,handleValueChange:y,timezone:p}},Ug=({name:t,timezone:e,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:s})=>{const[a,c]=Go({name:t,state:"value",controlled:n,default:r??s.emptyValue}),u=qe((f,...p)=>{c(f),i==null||i(f,...p)});return jg({timezone:e,value:a,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:s})},B5=t=>{const e=nn(),n=Ei(),r=ra(),o=ki(),{valueManager:i,fieldValueManager:s,valueType:a,validator:c,internalProps:u,internalProps:{value:f,defaultValue:p,referenceDate:m,onChange:y,format:b,formatDensity:g="dense",selectedSections:x,onSelectedSectionsChange:w,shouldRespectLeadingZeros:E=!1,timezone:T,enableAccessibleFieldDOMStructure:C=!1}}=t,{timezone:k,value:M,handleValueChange:A}=jg({timezone:T,value:f,defaultValue:p,referenceDate:m,onChange:y,valueManager:i}),I=D.useMemo(()=>p5(e),[e]),L=D.useMemo(()=>v5(e,I,k),[e,I,k]),O=D.useCallback((oe,ce=null)=>s.getSectionsFromValue(e,oe,ce,fe=>Yw({utils:e,localeText:n,localizedDigits:I,format:b,date:fe,formatDensity:g,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:C,isRtl:o})),[s,b,n,I,o,E,e,g,C]),[N,$]=D.useState(()=>{const oe=O(M);Vw(oe,a);const ce={sections:oe,value:M,referenceValue:i.emptyValue,tempValueStrAndroid:null},fe=c5(oe),q=i.getInitialReferenceValue({referenceDate:m,value:M,utils:e,props:u,granularity:fe,timezone:k});return ie({},ce,{referenceValue:q})}),[V,z]=Go({controlled:x,default:null,name:"useField",state:"selectedSections"}),F=oe=>{z(oe),w==null||w(oe)},B=D.useMemo(()=>Wg(V,N.sections),[V,N.sections]),W=B==="all"?0:B,Y=({value:oe,referenceValue:ce,sections:fe})=>{if($(ee=>ie({},ee,{sections:fe,value:oe,referenceValue:ce,tempValueStrAndroid:null})),i.areValuesEqual(e,N.value,oe))return;const q={validationError:c({adapter:r,value:oe,timezone:k,props:u})};A(oe,q)},X=(oe,ce)=>{const fe=[...N.sections];return fe[oe]=ie({},fe[oe],{value:ce,modified:!0}),fe},K=()=>{Y({value:i.emptyValue,referenceValue:N.referenceValue,sections:O(i.emptyValue)})},Q=()=>{if(W==null)return;const oe=N.sections[W],ce=s.getActiveDateManager(e,N,oe),q=ce.getSections(N.sections).filter(ne=>ne.value!=="").length===(oe.value===""?0:1),ee=X(W,""),se=q?null:e.getInvalidDate(),be=ce.getNewValuesFromNewActiveDate(se);Y(ie({},be,{sections:ee}))},ve=oe=>{const ce=(ee,se)=>{const be=e.parse(ee,b);if(be==null||!e.isValid(be))return null;const ne=Yw({utils:e,localeText:n,localizedDigits:I,format:b,date:be,formatDensity:g,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:C,isRtl:o});return Hw(e,be,ne,se,!1)},fe=s.parseValueStr(oe,N.referenceValue,ce),q=s.updateReferenceValue(e,fe,N.referenceValue);Y({value:fe,referenceValue:q,sections:O(fe,N.sections)})},xe=({activeSection:oe,newSectionValue:ce,shouldGoToNextSection:fe})=>{fe&&W<N.sections.length-1&&F(W+1);const q=s.getActiveDateManager(e,N,oe),ee=X(W,ce),se=q.getSections(ee),be=g5(e,se,I);let ne,le;if(be!=null&&e.isValid(be)){const pe=Hw(e,be,se,q.referenceDate,!0);ne=q.getNewValuesFromNewActiveDate(pe),le=!0}else ne=q.getNewValuesFromNewActiveDate(be),le=(be!=null&&!e.isValid(be))!=(q.date!=null&&!e.isValid(q.date));return le?Y(ie({},ne,{sections:ee})):$(pe=>ie({},pe,ne,{sections:ee,tempValueStrAndroid:null}))},ye=oe=>$(ce=>ie({},ce,{tempValueStrAndroid:oe}));return D.useEffect(()=>{const oe=O(N.value);Vw(oe,a),$(ce=>ie({},ce,{sections:oe}))},[b,e.locale,o]),D.useEffect(()=>{let oe;i.areValuesEqual(e,N.value,M)?oe=i.getTimezone(e,N.value)!==i.getTimezone(e,M):oe=!0,oe&&$(ce=>ie({},ce,{value:M,referenceValue:s.updateReferenceValue(e,M,ce.referenceValue),sections:O(M)}))},[M]),{state:N,activeSectionIndex:W,parsedSelectedSections:B,setSelectedSections:F,clearValue:K,clearActiveSection:Q,updateSectionValue:xe,updateValueFromValueStr:ve,setTempAndroidValueStr:ye,getSectionsFromValue:O,sectionsValueBoundaries:L,localizedDigits:I,timezone:k}},V5=5e3,hl=t=>t.saveQuery!=null,z5=({sections:t,updateSectionValue:e,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const s=nn(),[a,c]=D.useState(null),u=qe(()=>c(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(),V5);return()=>{clearTimeout(b)}}return()=>{}},[a,u]);const f=({keyPressed:b,sectionIndex:g},x,w)=>{const E=b.toLowerCase(),T=t[g];if(a!=null&&(!w||w(a.value))&&a.sectionIndex===g){const k=`${a.value}${E}`,M=x(k,T);if(!hl(M))return c({sectionIndex:g,value:k,sectionType:T.type}),M}const C=x(E,T);return hl(C)&&!C.saveQuery?(u(),null):(c({sectionIndex:g,value:E,sectionType:T.type}),hl(C)?null:C)},p=b=>{const g=(E,T,C)=>{const k=T.filter(M=>M.toLowerCase().startsWith(C));return k.length===0?{saveQuery:!1}:{sectionValue:k[0],shouldGoToNextSection:k.length===1}},x=(E,T,C,k)=>{const M=A=>Iw(s,i,T.type,A);if(T.contentType==="letter")return g(T.format,M(T.format),E);if(C&&k!=null&&Vg(s,C).contentType==="letter"){const A=M(C),I=g(C,A,E);return hl(I)?{saveQuery:!1}:ie({},I,{sectionValue:k(I.sectionValue,A)})}return{saveQuery:!1}};return f(b,(E,T)=>{switch(T.type){case"month":{const C=k=>Fw(s,k,s.formats.month,T.format);return x(E,T,s.formats.month,C)}case"weekDay":{const C=(k,M)=>M.indexOf(k).toString();return x(E,T,s.formats.weekday,C)}case"meridiem":return x(E,T);default:return{saveQuery:!1}}})},m=b=>{const g=(w,E)=>{const T=na(w,r),C=Number(T),k=n[E.type]({currentDate:null,format:E.format,contentType:E.contentType});if(C>k.maximum)return{saveQuery:!1};if(C<k.minimum)return{saveQuery:!0};const M=C*10>k.maximum||T.length===k.maximum.toString().length;return{sectionValue:Lw(s,C,k,r,E),shouldGoToNextSection:M}};return f(b,(w,E)=>{if(E.contentType==="digit"||E.contentType==="digit-with-letter")return g(w,E);if(E.type==="month"){Rw(s,"digit","month","MM");const T=g(w,{type:E.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(hl(T))return T;const C=Fw(s,T.sectionValue,"MM",E.format);return ie({},T,{sectionValue:C})}if(E.type==="weekDay"){const T=g(w,E);if(hl(T))return T;const C=ff(s,E.format)[Number(T.sectionValue)-1];return ie({},T,{sectionValue:C})}return{saveQuery:!1}},w=>Nw(w,r))};return{applyCharacterEditing:qe(b=>{const g=t[b.sectionIndex],w=Nw(b.keyPressed,r)?m(ie({},b,{keyPressed:zg(b.keyPressed,r)})):p(b);if(w==null){o(null);return}e({activeSection:g,newSectionValue:w.sectionValue,shouldGoToNextSection:w.shouldGoToNextSection})}),resetCharacterQuery:u}};function H5(t,e){return Array.isArray(e)?e.every(n=>t.indexOf(n)!==-1):t.indexOf(e)!==-1}const W5=(t,e)=>n=>{(n.key==="Enter"||n.key===" ")&&(t(n),n.preventDefault(),n.stopPropagation())},Er=(t=document)=>{const e=t.activeElement;return e?e.shadowRoot?Er(e.shadowRoot):e:null},j5="@media (pointer: fine)",U5=t=>{const{internalProps:{disabled:e,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:s,onInput:a,onPaste:c,focused:u,autoFocus:f=!1},fieldValueManager:p,applyCharacterEditing:m,resetCharacterQuery:y,setSelectedSections:b,parsedSelectedSections:g,state:x,clearActiveSection:w,clearValue:E,updateSectionValue:T,updateValueFromValueStr:C,sectionOrder:k,areAllSectionsEmpty:M,sectionsValueBoundaries:A}=t,I=D.useRef(null),L=At(r,I),O=Ei(),N=nn(),$=No(),[V,z]=D.useState(!1),F=D.useMemo(()=>({syncSelectionToDOM:()=>{if(!I.current)return;const le=document.getSelection();if(!le)return;if(g==null){le.rangeCount>0&&I.current.getRoot().contains(le.getRangeAt(0).startContainer)&&le.removeAllRanges(),V&&I.current.getRoot().blur();return}if(!I.current.getRoot().contains(Er(document)))return;const pe=new window.Range;let Oe;g==="all"?Oe=I.current.getRoot():x.sections[g].type==="empty"?Oe=I.current.getSectionContainer(g):Oe=I.current.getSectionContent(g),pe.selectNodeContents(Oe),Oe.focus(),le.removeAllRanges(),le.addRange(pe)},getActiveSectionIndexFromDOM:()=>{const le=Er(document);return!le||!I.current||!I.current.getRoot().contains(le)?null:I.current.getSectionIndexFromDOMElement(le)},focusField:(le=0)=>{if(!I.current||F.getActiveSectionIndexFromDOM()!=null)return;const pe=Wg(le,x.sections);z(!0),I.current.getSectionContent(pe).focus()},setSelectedSections:le=>{if(!I.current)return;const pe=Wg(le,x.sections);z((pe==="all"?0:pe)!==null),b(le)},isFieldFocused:()=>{const le=Er(document);return!!I.current&&I.current.getRoot().contains(le)}}),[g,b,x.sections,V]),B=qe(le=>{if(!I.current)return;const pe=x.sections[le];I.current.getSectionContent(le).innerHTML=pe.value||pe.placeholder,F.syncSelectionToDOM()}),W=qe((le,...pe)=>{le.isDefaultPrevented()||!I.current||(z(!0),i==null||i(le,...pe),g==="all"?setTimeout(()=>{const Oe=document.getSelection().getRangeAt(0).startOffset;if(Oe===0){b(k.startIndex);return}let ke=0,Fe=0;for(;Fe<Oe&&ke<x.sections.length;){const Ie=x.sections[ke];ke+=1,Fe+=`${Ie.startSeparator}${Ie.value||Ie.placeholder}${Ie.endSeparator}`.length}b(ke-1)}):V?I.current.getRoot().contains(le.target)||b(k.startIndex):(z(!0),b(k.startIndex)))}),Y=qe(le=>{if(a==null||a(le),!I.current||g!=="all")return;const Oe=le.target.textContent??"";I.current.getRoot().innerHTML=x.sections.map(ke=>`${ke.startSeparator}${ke.value||ke.placeholder}${ke.endSeparator}`).join(""),F.syncSelectionToDOM(),Oe.length===0||Oe.charCodeAt(0)===10?(y(),E(),b("all")):Oe.length>1?C(Oe):(g==="all"&&b(0),m({keyPressed:Oe,sectionIndex:0}))}),X=qe(le=>{if(c==null||c(le),n||g!=="all"){le.preventDefault();return}const pe=le.clipboardData.getData("text");le.preventDefault(),y(),C(pe)}),K=qe((...le)=>{if(s==null||s(...le),V||!I.current)return;z(!0),I.current.getSectionIndexFromDOMElement(Er(document))!=null||b(k.startIndex)}),Q=qe((...le)=>{o==null||o(...le),setTimeout(()=>{if(!I.current)return;const pe=Er(document);!I.current.getRoot().contains(pe)&&(z(!1),b(null))})}),ve=qe(le=>pe=>{pe.isDefaultPrevented()||b(le)}),xe=qe(le=>{le.preventDefault()}),ye=qe(le=>()=>{b(le)}),oe=qe(le=>{if(le.preventDefault(),n||e||typeof g!="number")return;const pe=x.sections[g],Oe=le.clipboardData.getData("text"),ke=/^[a-zA-Z]+$/.test(Oe),Fe=/^[0-9]+$/.test(Oe),Ie=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Oe);pe.contentType==="letter"&&ke||pe.contentType==="digit"&&Fe||pe.contentType==="digit-with-letter"&&Ie?(y(),T({activeSection:pe,newSectionValue:Oe,shouldGoToNextSection:!0})):!ke&&!Fe&&(y(),C(Oe))}),ce=qe(le=>{le.preventDefault(),le.dataTransfer.dropEffect="none"}),fe=qe(le=>{if(!I.current)return;const pe=le.target,Oe=pe.textContent??"",ke=I.current.getSectionIndexFromDOMElement(pe),Fe=x.sections[ke];if(n||!I.current){B(ke);return}if(Oe.length===0){if(Fe.value===""){B(ke);return}const Ie=le.nativeEvent.inputType;if(Ie==="insertParagraph"||Ie==="insertLineBreak"){B(ke);return}y(),w();return}m({keyPressed:Oe,sectionIndex:ke}),B(ke)});Rn(()=>{if(!(!V||!I.current)){if(g==="all")I.current.getRoot().focus();else if(typeof g=="number"){const le=I.current.getSectionContent(g);le&&le.focus()}}},[g,V]);const q=D.useMemo(()=>x.sections.reduce((le,pe)=>(le[pe.type]=A[pe.type]({currentDate:null,contentType:pe.contentType,format:pe.format}),le),{}),[A,x.sections]),ee=g==="all",se=D.useMemo(()=>x.sections.map((le,pe)=>{const Oe=!ee&&!e&&!n;return{container:{"data-sectionindex":pe,onClick:ve(pe)},content:{tabIndex:ee||pe>0?-1:0,contentEditable:!ee&&!e&&!n,role:"spinbutton",id:`${$}-${le.type}`,"aria-labelledby":`${$}-${le.type}`,"aria-readonly":n,"aria-valuenow":T5(le,N),"aria-valuemin":q[le.type].minimum,"aria-valuemax":q[le.type].maximum,"aria-valuetext":le.value?C5(le,N):O.empty,"aria-label":O[le.type],"aria-disabled":e,spellCheck:Oe?!1:void 0,autoCapitalize:Oe?"off":void 0,autoCorrect:Oe?"off":void 0,[parseInt(D.version,10)>=17?"enterKeyHint":"enterkeyhint"]:Oe?"next":void 0,children:le.value||le.placeholder,onInput:fe,onPaste:oe,onFocus:ye(pe),onDragOver:ce,onMouseUp:xe,inputMode:le.contentType==="letter"?"text":"numeric"},before:{children:le.startSeparator},after:{children:le.endSeparator}}}),[x.sections,ye,oe,ce,fe,ve,xe,e,n,ee,O,N,q,$]),be=qe(le=>{C(le.target.value)}),ne=D.useMemo(()=>M?"":p.getV7HiddenInputValueFromSections(x.sections),[M,x.sections,p]);return D.useEffect(()=>{if(I.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","<DatePicker slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
|
|
130
|
-
`));f&&I.current&&I.current.getSectionContent(k.startIndex).focus()},[]),{interactions:F,returnedValue:{autoFocus:f,readOnly:n,focused:u??V,sectionListRef:L,onBlur:Q,onClick:W,onFocus:K,onInput:Y,onPaste:X,enableAccessibleFieldDOMStructure:!0,elements:se,tabIndex:g===0?-1:0,contentEditable:ee,value:ne,onChange:be,areAllSectionsEmpty:M}}},ml=t=>t.replace(/[\u2066\u2067\u2068\u2069]/g,""),q5=(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],c=Hg(a,n?"input-rtl":"input-ltr",e),u=`${a.startSeparator}${c}${a.endSeparator}`,f=ml(u).length,p=u.length,m=ml(c),y=o+(m===""?0:c.indexOf(m[0]))+a.startSeparator.length,b=y+m.length;i.push(ie({},a,{start:r,end:r+f,startInInput:y,endInInput:b})),r+=f,o+=p}return i},K5=t=>{const e=ki(),n=D.useRef(void 0),r=D.useRef(void 0),{forwardedProps:{onFocus:o,onClick:i,onPaste:s,onBlur:a,inputRef:c,placeholder:u},internalProps:{readOnly:f=!1,disabled:p=!1},parsedSelectedSections:m,activeSectionIndex:y,state:b,fieldValueManager:g,valueManager:x,applyCharacterEditing:w,resetCharacterQuery:E,updateSectionValue:T,updateValueFromValueStr:C,clearActiveSection:k,clearValue:M,setTempAndroidValueStr:A,setSelectedSections:I,getSectionsFromValue:L,areAllSectionsEmpty:O,localizedDigits:N}=t,$=D.useRef(null),V=At(c,$),z=D.useMemo(()=>q5(b.sections,N,e),[b.sections,N,e]),F=D.useMemo(()=>({syncSelectionToDOM:()=>{if(!$.current)return;if(m==null){$.current.scrollLeft&&($.current.scrollLeft=0);return}if($.current!==Er(document))return;const fe=$.current.scrollTop;if(m==="all")$.current.select();else{const q=z[m],ee=q.type==="empty"?q.startInInput-q.startSeparator.length:q.startInInput,se=q.type==="empty"?q.endInInput+q.endSeparator.length:q.endInInput;(ee!==$.current.selectionStart||se!==$.current.selectionEnd)&&$.current===Er(document)&&$.current.setSelectionRange(ee,se),clearTimeout(r.current),r.current=setTimeout(()=>{$.current&&$.current===Er(document)&&$.current.selectionStart===$.current.selectionEnd&&($.current.selectionStart!==ee||$.current.selectionEnd!==se)&&F.syncSelectionToDOM()})}$.current.scrollTop=fe},getActiveSectionIndexFromDOM:()=>{const fe=$.current.selectionStart??0,q=$.current.selectionEnd??0;if(fe===0&&q===0)return null;const ee=fe<=z[0].startInInput?1:z.findIndex(se=>se.startInInput-se.startSeparator.length>fe);return ee===-1?z.length-1:ee-1},focusField:(fe=0)=>{var q;Er(document)!==$.current&&((q=$.current)==null||q.focus(),I(fe))},setSelectedSections:fe=>I(fe),isFieldFocused:()=>$.current===Er(document)}),[$,m,z,I]),B=()=>{const fe=$.current.selectionStart??0;let q;fe<=z[0].startInInput||fe>=z[z.length-1].endInInput?q=1:q=z.findIndex(se=>se.startInInput-se.startSeparator.length>fe);const ee=q===-1?z.length-1:q-1;I(ee)},W=qe((...fe)=>{o==null||o(...fe);const q=$.current;clearTimeout(n.current),n.current=setTimeout(()=>{!q||q!==$.current||y==null&&(q.value.length&&Number(q.selectionEnd)-Number(q.selectionStart)===q.value.length?I("all"):B())})}),Y=qe((fe,...q)=>{fe.isDefaultPrevented()||(i==null||i(fe,...q),B())}),X=qe(fe=>{if(s==null||s(fe),fe.preventDefault(),f||p)return;const q=fe.clipboardData.getData("text");if(typeof m=="number"){const ee=b.sections[m],se=/^[a-zA-Z]+$/.test(q),be=/^[0-9]+$/.test(q),ne=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(q);if(ee.contentType==="letter"&&se||ee.contentType==="digit"&&be||ee.contentType==="digit-with-letter"&&ne){E(),T({activeSection:ee,newSectionValue:q,shouldGoToNextSection:!0});return}if(se||be)return}E(),C(q)}),K=qe((...fe)=>{a==null||a(...fe),I(null)}),Q=qe(fe=>{if(f)return;const q=fe.target.value;if(q===""){E(),M();return}const ee=fe.nativeEvent.data,se=ee&&ee.length>1,be=se?ee:q,ne=ml(be);if(m==="all"&&I(y),y==null||se){C(se?ee:ne);return}let le;if(m==="all"&&ne.length===1)le=ne;else{const pe=ml(g.getV6InputValueFromSections(z,N,e));let Oe=-1,ke=-1;for(let Xe=0;Xe<pe.length;Xe+=1)Oe===-1&&pe[Xe]!==ne[Xe]&&(Oe=Xe),ke===-1&&pe[pe.length-Xe-1]!==ne[ne.length-Xe-1]&&(ke=Xe);const Fe=z[y];if(Oe<Fe.start||pe.length-ke-1>Fe.end)return;const Ke=ne.length-pe.length+Fe.end-ml(Fe.endSeparator||"").length;le=ne.slice(Fe.start+ml(Fe.startSeparator||"").length,Ke)}if(le.length===0){S5()&&A(be),E(),k();return}w({keyPressed:le,sectionIndex:y})}),ve=D.useMemo(()=>u!==void 0?u:g.getV6InputValueFromSections(L(x.emptyValue),N,e),[u,g,L,x.emptyValue,N,e]),xe=D.useMemo(()=>b.tempValueStrAndroid??g.getV6InputValueFromSections(b.sections,N,e),[b.sections,g,b.tempValueStrAndroid,N,e]);D.useEffect(()=>($.current&&$.current===Er(document)&&I("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const ye=D.useMemo(()=>y==null||b.sections[y].contentType==="letter"?"text":"numeric",[y,b.sections]),ce=!($.current&&$.current===Er(document))&&O;return{interactions:F,returnedValue:{readOnly:f,onBlur:K,onClick:Y,onFocus:W,onPaste:X,inputRef:V,enableAccessibleFieldDOMStructure:!1,placeholder:ve,inputMode:ye,autoComplete:"off",value:ce?"":xe,onChange:Q}}},Y5=t=>{const e=nn(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:s=!1,readOnly:a=!1},forwardedProps:{onKeyDown:c,error:u,clearable:f,onClear:p},fieldValueManager:m,valueManager:y,validator:b}=t,g=ki(),x=B5(t),{state:w,activeSectionIndex:E,parsedSelectedSections:T,setSelectedSections:C,clearValue:k,clearActiveSection:M,updateSectionValue:A,setTempAndroidValueStr:I,sectionsValueBoundaries:L,localizedDigits:O,timezone:N}=x,$=z5({sections:w.sections,updateSectionValue:A,sectionsValueBoundaries:L,localizedDigits:O,setTempAndroidValueStr:I,timezone:N}),{resetCharacterQuery:V}=$,z=y.areValuesEqual(e,w.value,y.emptyValue),F=i?U5:K5,B=D.useMemo(()=>w5(w.sections,g&&!i),[w.sections,g,i]),{returnedValue:W,interactions:Y}=F(ie({},t,x,$,{areAllSectionsEmpty:z,sectionOrder:B})),X=qe(oe=>{if(c==null||c(oe),!s)switch(!0){case((oe.ctrlKey||oe.metaKey)&&String.fromCharCode(oe.keyCode)==="A"&&!oe.shiftKey&&!oe.altKey):{oe.preventDefault(),C("all");break}case oe.key==="ArrowRight":{if(oe.preventDefault(),T==null)C(B.startIndex);else if(T==="all")C(B.endIndex);else{const ce=B.neighbors[T].rightIndex;ce!==null&&C(ce)}break}case oe.key==="ArrowLeft":{if(oe.preventDefault(),T==null)C(B.endIndex);else if(T==="all")C(B.startIndex);else{const ce=B.neighbors[T].leftIndex;ce!==null&&C(ce)}break}case oe.key==="Delete":{if(oe.preventDefault(),a)break;T==null||T==="all"?k():M(),V();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(oe.key):{if(oe.preventDefault(),a||E==null)break;T==="all"&&C(E);const ce=w.sections[E],fe=m.getActiveDateManager(e,w,ce),q=h5(e,N,ce,oe.key,L,O,fe.date,{minutesStep:o});A({activeSection:ce,newSectionValue:q,shouldGoToNextSection:!1});break}}});Rn(()=>{Y.syncSelectionToDOM()});const{hasValidationError:K}=Kw({props:n,validator:b,timezone:N,value:w.value,onError:n.onError}),Q=D.useMemo(()=>u!==void 0?u:K,[K,u]);D.useEffect(()=>{!Q&&E==null&&V()},[w.referenceValue,E,Q]),D.useEffect(()=>{w.tempValueStrAndroid!=null&&E!=null&&(V(),M())},[w.sections]),D.useImperativeHandle(r,()=>({getSections:()=>w.sections,getActiveSectionIndex:Y.getActiveSectionIndexFromDOM,setSelectedSections:Y.setSelectedSections,focusField:Y.focusField,isFieldFocused:Y.isFieldFocused}));const ve=qe((oe,...ce)=>{oe.preventDefault(),p==null||p(oe,...ce),k(),Y.isFieldFocused()?C(B.startIndex):Y.focusField(0)}),xe={onKeyDown:X,onClear:ve,error:Q,clearable:!!(f&&!z&&!a&&!s)},ye={disabled:s,readOnly:a};return ie({},t.forwardedProps,xe,ye,W)};class hf{constructor(){dd(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 hf}static use(){const e=Ax(hf.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=J5(),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 G5(){return hf.use()}function J5(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function Gw(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:c,timeout:u}=t,[f,p]=D.useState(!1),m=me(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),y={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},b=me(n.child,f&&n.childLeaving,r&&n.childPulsate);return!a&&!f&&p(!0),D.useEffect(()=>{if(!a&&c!=null){const g=setTimeout(c,u);return()=>{clearTimeout(g)}}},[c,a,u]),v.jsx("span",{className:m,style:y,children:v.jsx("span",{className:b})})}process.env.NODE_ENV!=="production"&&(Gw.propTypes={classes:l.object.isRequired,className:l.string,in:l.bool,onExited:l.func,pulsate:l.bool,rippleSize:l.number,rippleX:l.number,rippleY:l.number,timeout:l.number.isRequired});const lo=Ge("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),qg=550,X5=80,Z5=qo.keyframes`
|
|
131
|
-
0% {
|
|
132
|
-
transform: scale(0);
|
|
133
|
-
opacity: 0.1;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
100% {
|
|
137
|
-
transform: scale(1);
|
|
138
|
-
opacity: 0.3;
|
|
139
|
-
}
|
|
140
|
-
`,Q5=qo.keyframes`
|
|
141
|
-
0% {
|
|
142
|
-
opacity: 1;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
100% {
|
|
146
|
-
opacity: 0;
|
|
147
|
-
}
|
|
148
|
-
`,eV=qo.keyframes`
|
|
149
|
-
0% {
|
|
150
|
-
transform: scale(1);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
50% {
|
|
154
|
-
transform: scale(0.92);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
100% {
|
|
158
|
-
transform: scale(1);
|
|
159
|
-
}
|
|
160
|
-
`,tV=re("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),nV=re(Gw,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
161
|
-
opacity: 0;
|
|
162
|
-
position: absolute;
|
|
163
|
-
|
|
164
|
-
&.${lo.rippleVisible} {
|
|
165
|
-
opacity: 0.3;
|
|
166
|
-
transform: scale(1);
|
|
167
|
-
animation-name: ${Z5};
|
|
168
|
-
animation-duration: ${qg}ms;
|
|
169
|
-
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
&.${lo.ripplePulsate} {
|
|
173
|
-
animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
& .${lo.child} {
|
|
177
|
-
opacity: 1;
|
|
178
|
-
display: block;
|
|
179
|
-
width: 100%;
|
|
180
|
-
height: 100%;
|
|
181
|
-
border-radius: 50%;
|
|
182
|
-
background-color: currentColor;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
& .${lo.childLeaving} {
|
|
186
|
-
opacity: 0;
|
|
187
|
-
animation-name: ${Q5};
|
|
188
|
-
animation-duration: ${qg}ms;
|
|
189
|
-
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
& .${lo.childPulsate} {
|
|
193
|
-
position: absolute;
|
|
194
|
-
/* @noflip */
|
|
195
|
-
left: 0px;
|
|
196
|
-
top: 0;
|
|
197
|
-
animation-name: ${eV};
|
|
198
|
-
animation-duration: 2500ms;
|
|
199
|
-
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
|
|
200
|
-
animation-iteration-count: infinite;
|
|
201
|
-
animation-delay: 200ms;
|
|
202
|
-
}
|
|
203
|
-
`,Jw=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s,...a}=r,[c,u]=D.useState([]),f=D.useRef(0),p=D.useRef(null);D.useEffect(()=>{p.current&&(p.current(),p.current=null)},[c]);const m=D.useRef(!1),y=qs(),b=D.useRef(null),g=D.useRef(null),x=D.useCallback(C=>{const{pulsate:k,rippleX:M,rippleY:A,rippleSize:I,cb:L}=C;u(O=>[...O,v.jsx(nV,{classes:{ripple:me(i.ripple,lo.ripple),rippleVisible:me(i.rippleVisible,lo.rippleVisible),ripplePulsate:me(i.ripplePulsate,lo.ripplePulsate),child:me(i.child,lo.child),childLeaving:me(i.childLeaving,lo.childLeaving),childPulsate:me(i.childPulsate,lo.childPulsate)},timeout:qg,pulsate:k,rippleX:M,rippleY:A,rippleSize:I},f.current)]),f.current+=1,p.current=L},[i]),w=D.useCallback((C={},k={},M=()=>{})=>{const{pulsate:A=!1,center:I=o||k.pulsate,fakeElement:L=!1}=k;if((C==null?void 0:C.type)==="mousedown"&&m.current){m.current=!1;return}(C==null?void 0:C.type)==="touchstart"&&(m.current=!0);const O=L?null:g.current,N=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let $,V,z;if(I||C===void 0||C.clientX===0&&C.clientY===0||!C.clientX&&!C.touches)$=Math.round(N.width/2),V=Math.round(N.height/2);else{const{clientX:F,clientY:B}=C.touches&&C.touches.length>0?C.touches[0]:C;$=Math.round(F-N.left),V=Math.round(B-N.top)}if(I)z=Math.sqrt((2*N.width**2+N.height**2)/3),z%2===0&&(z+=1);else{const F=Math.max(Math.abs((O?O.clientWidth:0)-$),$)*2+2,B=Math.max(Math.abs((O?O.clientHeight:0)-V),V)*2+2;z=Math.sqrt(F**2+B**2)}C!=null&&C.touches?b.current===null&&(b.current=()=>{x({pulsate:A,rippleX:$,rippleY:V,rippleSize:z,cb:M})},y.start(X5,()=>{b.current&&(b.current(),b.current=null)})):x({pulsate:A,rippleX:$,rippleY:V,rippleSize:z,cb:M})},[o,x,y]),E=D.useCallback(()=>{w({},{pulsate:!0})},[w]),T=D.useCallback((C,k)=>{if(y.clear(),(C==null?void 0:C.type)==="touchend"&&b.current){b.current(),b.current=null,y.start(0,()=>{T(C,k)});return}b.current=null,u(M=>M.length>0?M.slice(1):M),p.current=k},[y]);return D.useImperativeHandle(n,()=>({pulsate:E,start:w,stop:T}),[E,w,T]),v.jsx(tV,{className:me(lo.root,i.root,s),ref:g,...a,children:v.jsx(Dc,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(Jw.propTypes={center:l.bool,classes:l.object,className:l.string});function rV(t){return Qe("MuiButtonBase",t)}const oV=Ge("MuiButtonBase",["root","disabled","focusVisible"]),iV=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,s=Ze({root:["root",e&&"disabled",n&&"focusVisible"]},rV,o);return n&&r&&(s.root+=` ${r}`),s},sV=re("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"},[`&.${oV.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),cs=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:c="button",disabled:u=!1,disableRipple:f=!1,disableTouchRipple:p=!1,focusRipple:m=!1,focusVisibleClassName:y,LinkComponent:b="a",onBlur:g,onClick:x,onContextMenu:w,onDragLeave:E,onFocus:T,onFocusVisible:C,onKeyDown:k,onKeyUp:M,onMouseDown:A,onMouseLeave:I,onMouseUp:L,onTouchEnd:O,onTouchMove:N,onTouchStart:$,tabIndex:V=0,TouchRippleProps:z,touchRippleRef:F,type:B,...W}=r,Y=D.useRef(null),X=G5(),K=At(X.ref,F),[Q,ve]=D.useState(!1);u&&Q&&ve(!1),D.useImperativeHandle(o,()=>({focusVisible:()=>{ve(!0),Y.current.focus()}}),[]);const xe=X.shouldMount&&!f&&!u;D.useEffect(()=>{Q&&m&&!f&&X.pulsate()},[f,m,Q,X]);const ye=_i(X,"start",A,p),oe=_i(X,"stop",w,p),ce=_i(X,"stop",E,p),fe=_i(X,"stop",L,p),q=_i(X,"stop",Z=>{Q&&Z.preventDefault(),I&&I(Z)},p),ee=_i(X,"start",$,p),se=_i(X,"stop",O,p),be=_i(X,"stop",N,p),ne=_i(X,"stop",Z=>{Ja(Z.target)||ve(!1),g&&g(Z)},!1),le=qe(Z=>{Y.current||(Y.current=Z.currentTarget),Ja(Z.target)&&(ve(!0),C&&C(Z)),T&&T(Z)}),pe=()=>{const Z=Y.current;return c&&c!=="button"&&!(Z.tagName==="A"&&Z.href)},Oe=qe(Z=>{m&&!Z.repeat&&Q&&Z.key===" "&&X.stop(Z,()=>{X.start(Z)}),Z.target===Z.currentTarget&&pe()&&Z.key===" "&&Z.preventDefault(),k&&k(Z),Z.target===Z.currentTarget&&pe()&&Z.key==="Enter"&&!u&&(Z.preventDefault(),x&&x(Z))}),ke=qe(Z=>{m&&Z.key===" "&&Q&&!Z.defaultPrevented&&X.stop(Z,()=>{X.pulsate(Z)}),M&&M(Z),x&&Z.target===Z.currentTarget&&pe()&&Z.key===" "&&!Z.defaultPrevented&&x(Z)});let Fe=c;Fe==="button"&&(W.href||W.to)&&(Fe=b);const Ie={};Fe==="button"?(Ie.type=B===void 0?"button":B,Ie.disabled=u):(!W.href&&!W.to&&(Ie.role="button"),u&&(Ie["aria-disabled"]=u));const Ke=At(n,Y),Xe={...r,centerRipple:i,component:c,disabled:u,disableRipple:f,disableTouchRipple:p,focusRipple:m,tabIndex:V,focusVisible:Q},U=iV(Xe);return v.jsxs(sV,{as:Fe,className:me(U.root,a),ownerState:Xe,onBlur:ne,onClick:x,onContextMenu:oe,onFocus:le,onKeyDown:Oe,onKeyUp:ke,onMouseDown:ye,onMouseLeave:q,onMouseUp:fe,onDragLeave:ce,onTouchEnd:se,onTouchMove:be,onTouchStart:ee,ref:Ke,tabIndex:u?-1:V,type:B,...Ie,...W,children:[s,xe?v.jsx(Jw,{ref:K,center:i,...z}):null]})});function _i(t,e,n,r=!1){return qe(o=>(n&&n(o),r||t[e](o),!0))}process.env.NODE_ENV!=="production"&&(cs.propTypes={action:Dn,centerRipple:l.bool,children:l.node,classes:l.object,className:l.string,component:Ya,disabled:l.bool,disableRipple:l.bool,disableTouchRipple:l.bool,focusRipple:l.bool,focusVisibleClassName:l.string,href:l.any,LinkComponent:l.elementType,onBlur:l.func,onClick:l.func,onContextMenu:l.func,onDragLeave:l.func,onFocus:l.func,onFocusVisible:l.func,onKeyDown:l.func,onKeyUp:l.func,onMouseDown:l.func,onMouseLeave:l.func,onMouseUp:l.func,onTouchEnd:l.func,onTouchMove:l.func,onTouchStart:l.func,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),tabIndex:l.number,TouchRippleProps:l.object,touchRippleRef:l.oneOfType([l.func,l.shape({current:l.shape({pulsate:l.func.isRequired,start:l.func.isRequired,stop:l.func.isRequired})})]),type:l.oneOfType([l.oneOf(["button","reset","submit"]),l.string])});function aV(t){return Qe("MuiCircularProgress",t)}Ge("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const us=44,Kg=qo.keyframes`
|
|
204
|
-
0% {
|
|
205
|
-
transform: rotate(0deg);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
100% {
|
|
209
|
-
transform: rotate(360deg);
|
|
210
|
-
}
|
|
211
|
-
`,Yg=qo.keyframes`
|
|
212
|
-
0% {
|
|
213
|
-
stroke-dasharray: 1px, 200px;
|
|
214
|
-
stroke-dashoffset: 0;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
50% {
|
|
218
|
-
stroke-dasharray: 100px, 200px;
|
|
219
|
-
stroke-dashoffset: -15px;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
100% {
|
|
223
|
-
stroke-dasharray: 1px, 200px;
|
|
224
|
-
stroke-dashoffset: -126px;
|
|
225
|
-
}
|
|
226
|
-
`,lV=typeof Kg!="string"?qo.css`
|
|
227
|
-
animation: ${Kg} 1.4s linear infinite;
|
|
228
|
-
`:null,cV=typeof Yg!="string"?qo.css`
|
|
229
|
-
animation: ${Yg} 1.4s ease-in-out infinite;
|
|
230
|
-
`:null,uV=t=>{const{classes:e,variant:n,color:r,disableShrink:o}=t,i={root:["root",n,`color${$e(r)}`],svg:["svg"],circle:["circle",`circle${$e(n)}`,o&&"circleDisableShrink"]};return Ze(i,aV,e)},dV=re("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${$e(n.color)}`]]}})(Tt(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:lV||{animation:`${Kg} 1.4s linear infinite`}},...Object.entries(t.palette).filter(Wn()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),fV=re("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),pV=re("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${$e(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(Tt(({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:cV||{animation:`${Yg} 1.4s ease-in-out infinite`}}]}))),Gg=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:s=!1,size:a=40,style:c,thickness:u=3.6,value:f=0,variant:p="indeterminate",...m}=r,y={...r,color:i,disableShrink:s,size:a,thickness:u,value:f,variant:p},b=uV(y),g={},x={},w={};if(p==="determinate"){const E=2*Math.PI*((us-u)/2);g.strokeDasharray=E.toFixed(3),w["aria-valuenow"]=Math.round(f),g.strokeDashoffset=`${((100-f)/100*E).toFixed(3)}px`,x.transform="rotate(-90deg)"}return v.jsx(dV,{className:me(b.root,o),style:{width:a,height:a,...x,...c},ownerState:y,ref:n,role:"progressbar",...w,...m,children:v.jsx(fV,{className:b.svg,ownerState:y,viewBox:`${us/2} ${us/2} ${us} ${us}`,children:v.jsx(pV,{className:b.circle,style:g,ownerState:y,cx:us,cy:us,r:(us-u)/2,fill:"none",strokeWidth:u})})})});process.env.NODE_ENV!=="production"&&(Gg.propTypes={classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["inherit","primary","secondary","error","info","success","warning"]),l.string]),disableShrink:yi(l.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:l.oneOfType([l.number,l.string]),style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),thickness:l.number,value:l.number,variant:l.oneOf(["determinate","indeterminate"])});function hV(t){return Qe("MuiIconButton",t)}const Xw=Ge("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),mV=t=>{const{classes:e,disabled:n,color:r,edge:o,size:i,loading:s}=t,a={root:["root",s&&"loading",n&&"disabled",r!=="default"&&`color${$e(r)}`,o&&`edge${$e(o)}`,`size${$e(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ze(a,hV,e)},gV=re(cs,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.loading&&e.loading,n.color!=="default"&&e[`color${$e(n.color)}`],n.edge&&e[`edge${$e(n.edge)}`],e[`size${$e(n.size)}`]]}})(Tt(({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})`:ft(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}}]})),Tt(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(Wn()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(Wn()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.vars?`rgba(${(t.vars||t).palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:ft((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)}}],[`&.${Xw.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${Xw.loading}`]:{color:"transparent"}}))),yV=re("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"}}]})),gl=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:c=!1,disableFocusRipple:u=!1,size:f="medium",id:p,loading:m=null,loadingIndicator:y,...b}=r,g=No(p),x=y??v.jsx(Gg,{"aria-labelledby":g,color:"inherit",size:16}),w={...r,edge:o,color:a,disabled:c,disableFocusRipple:u,loading:m,loadingIndicator:x,size:f},E=mV(w);return v.jsxs(gV,{id:m?g:p,className:me(E.root,s),centerRipple:!0,focusRipple:!u,disabled:c||m,ref:n,...b,ownerState:w,children:[typeof m=="boolean"&&v.jsx("span",{className:E.loadingWrapper,style:{display:"contents"},children:v.jsx(yV,{className:E.loadingIndicator,ownerState:w,children:m&&x})}),i]})});process.env.NODE_ENV!=="production"&&(gl.propTypes={children:yi(l.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(`
|
|
231
|
-
`)):null),classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),l.string]),disabled:l.bool,disableFocusRipple:l.bool,disableRipple:l.bool,edge:l.oneOf(["end","start",!1]),id:l.string,loading:l.bool,loadingIndicator:l.node,size:l.oneOfType([l.oneOf(["small","medium","large"]),l.string]),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])});function bV(t){return Qe("MuiTypography",t)}Ge("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const vV={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},xV=CL(),SV=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=t,a={root:["root",i,t.align!=="inherit"&&`align${$e(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Ze(a,bV,s)},wV=re("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${$e(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(Tt(({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(Wn()).map(([n])=>({props:{color:n},style:{color:(t.vars||t).palette[n].main}})),...Object.entries(((e=t.palette)==null?void 0:e.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${$e(n)}`},style:{color:(t.vars||t).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),Zw={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},co=D.forwardRef(function(e,n){const{color:r,...o}=vt({props:e,name:"MuiTypography"}),i=!vV[r],s=xV({...o,...i&&{color:r}}),{align:a="inherit",className:c,component:u,gutterBottom:f=!1,noWrap:p=!1,paragraph:m=!1,variant:y="body1",variantMapping:b=Zw,...g}=s,x={...s,align:a,color:r,className:c,component:u,gutterBottom:f,noWrap:p,paragraph:m,variant:y,variantMapping:b},w=u||(m?"p":b[y]||Zw[y])||"span",E=SV(x);return v.jsx(wV,{as:w,ref:n,className:me(E.root,c),...g,ownerState:x,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...g.style}})});process.env.NODE_ENV!=="production"&&(co.propTypes={align:l.oneOf(["center","inherit","justify","left","right"]),children:l.node,classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),l.string]),component:l.elementType,gutterBottom:l.bool,noWrap:l.bool,paragraph:l.bool,style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),variant:l.oneOfType([l.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),l.string]),variantMapping:l.object});function CV(t){return Qe("MuiInputAdornment",t)}const Qw=Ge("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var eC;const TV=(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${$e(n.position)}`],n.disablePointerEvents===!0&&e.disablePointerEvents,e[n.variant]]},kV=t=>{const{classes:e,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:s}=t,a={root:["root",n&&"disablePointerEvents",o&&`position${$e(o)}`,s,r&&"hiddenLabel",i&&`size${$e(i)}`]};return Ze(a,CV,e)},EV=re("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:TV})(Tt(({theme:t})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${Qw.positionStart}&:not(.${Qw.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Jg=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiInputAdornment"}),{children:o,className:i,component:s="div",disablePointerEvents:a=!1,disableTypography:c=!1,position:u,variant:f,...p}=r,m=Lo()||{};let y=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&&!y&&(y=m.variant);const b={...r,hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:a,position:u,variant:y},g=kV(b);return v.jsx(Ec.Provider,{value:null,children:v.jsx(EV,{as:s,ownerState:b,className:me(g.root,i),ref:n,...p,children:typeof o=="string"&&!c?v.jsx(co,{color:"textSecondary",children:o}):v.jsxs(D.Fragment,{children:[u==="start"?eC||(eC=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,o]})})})});process.env.NODE_ENV!=="production"&&(Jg.propTypes={children:l.node,classes:l.object,className:l.string,component:l.elementType,disablePointerEvents:l.bool,disableTypography:l.bool,position:l.oneOf(["end","start"]).isRequired,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),variant:l.oneOf(["filled","outlined","standard"])});const _V=Be(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),OV=Be(v.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),MV=Be(v.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),AV=Be(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");Be(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"),Be(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"),Be(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 DV=Be(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"),IV=["clearable","onClear","InputProps","sx","slots","slotProps"],PV=["ownerState"],NV=t=>{const e=Ei(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:s,slotProps:a}=t,c=mt(t,IV),u=(s==null?void 0:s.clearButton)??gl,f=$t({elementType:u,externalSlotProps:a==null?void 0:a.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:e.fieldClearLabel}}),p=mt(f,PV),m=(s==null?void 0:s.clearIcon)??DV,y=$t({elementType:m,externalSlotProps:a==null?void 0:a.clearIcon,ownerState:{}});return ie({},c,{InputProps:ie({},o,{endAdornment:v.jsxs(D.Fragment,{children:[n&&v.jsx(Jg,{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"},y))}))}),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]]})},$V=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],LV=(t,e)=>D.useMemo(()=>{const n=ie({},t),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return $V.forEach(o),Ww.forEach(o),{forwardedProps:n,internalProps:r}},[t,e]),FV=D.createContext(null);function tC(t){const{contextValue:e,localeText:n,children:r}=t;return v.jsx(FV.Provider,{value:e,children:v.jsx(bg,{localeText:n,children:r})})}const RV=t=>{const e=nn(),n=zc();return ie({},t,{disablePast:t.disablePast??!1,disableFuture:t.disableFuture??!1,format:t.format??e.formats.keyboardDate,minDate:ao(e,t.minDate,n.minDate),maxDate:ao(e,t.maxDate,n.maxDate)})},BV=t=>{const e=RV(t),{forwardedProps:n,internalProps:r}=LV(e,"date");return Y5({forwardedProps:n,internalProps:r,valueManager:Qo,fieldValueManager:E5,validator:Vc,valueType:"date"})};function VV(t){return Qe("MuiPickersTextField",t)}Ge("MuiPickersTextField",["root","focused","disabled","error","required"]);function zV(t){return Qe("MuiPickersInputBase",t)}const yl=Ge("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function HV(t){return Qe("MuiPickersSectionList",t)}const Hc=Ge("MuiPickersSectionList",["root","section","sectionContent"]),WV=["slots","slotProps","elements","sectionListRef"],nC=re("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(t,e)=>e.root})({direction:"ltr /*! @noflip */",outline:"none"}),rC=re("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(t,e)=>e.section})({}),oC=re("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(t,e)=>e.sectionSeparator})({whiteSpace:"pre"}),iC=re("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(t,e)=>e.sectionContent})({outline:"none"}),jV=t=>{const{classes:e}=t;return Ze({root:["root"],section:["section"],sectionContent:["sectionContent"]},HV,e)};function sC(t){const{slots:e,slotProps:n,element:r,classes:o}=t,i=(e==null?void 0:e.section)??rC,s=$t({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),a=(e==null?void 0:e.sectionContent)??iC,c=$t({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)??oC,f=$t({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),p=$t({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({},c)),v.jsx(u,ie({},p))]}))}process.env.NODE_ENV!=="production"&&(sC.propTypes={classes:l.object.isRequired,element:l.shape({after:l.object.isRequired,before:l.object.isRequired,container:l.object.isRequired,content:l.object.isRequired}).isRequired,slotProps:l.object,slots:l.object});const aC=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:s,sectionListRef:a}=r,c=mt(r,WV),u=jV(r),f=D.useRef(null),p=At(n,f),m=g=>{if(!f.current)throw new Error(`MUI X: Cannot call sectionListRef.${g} before the mount of the component.`);return f.current};D.useImperativeHandle(a,()=>({getRoot(){return m("getRoot")},getSectionContainer(g){return m("getSectionContainer").querySelector(`.${Hc.section}[data-sectionindex="${g}"]`)},getSectionContent(g){return m("getSectionContent").querySelector(`.${Hc.section}[data-sectionindex="${g}"] .${Hc.sectionContent}`)},getSectionIndexFromDOMElement(g){const x=m("getSectionIndexFromDOMElement");if(g==null||!x.contains(g))return null;let w=null;return g.classList.contains(Hc.section)?w=g:g.classList.contains(Hc.sectionContent)&&(w=g.parentElement),w==null?null:Number(w.dataset.sectionindex)}}));const y=(o==null?void 0:o.root)??nC,b=$t({elementType:y,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:c,additionalProps:{ref:p,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return v.jsx(y,ie({},b,{children:b.contentEditable?s.map(({content:g,before:x,after:w})=>`${x.children}${g.children}${w.children}`).join(""):v.jsx(D.Fragment,{children:s.map((g,x)=>v.jsx(sC,{slots:o,slotProps:i,element:g,classes:u},x))})}))});process.env.NODE_ENV!=="production"&&(aC.propTypes={classes:l.object,contentEditable:l.bool.isRequired,elements:l.arrayOf(l.shape({after:l.object.isRequired,before:l.object.isRequired,container:l.object.isRequired,content:l.object.isRequired})).isRequired,sectionListRef:l.oneOfType([l.func,l.shape({current:l.shape({getRoot:l.func.isRequired,getSectionContainer:l.func.isRequired,getSectionContent:l.func.isRequired,getSectionIndexFromDOMElement:l.func.isRequired})})]),slotProps:l.object,slots:l.object});const UV=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],qV=t=>Math.round(t*1e5)/1e5,mf=re("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:`${qV(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),Xg=re(nC,{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}}]})),KV=re(rC,{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"})),YV=re(iC,{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"})),GV=re(oC,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(t,e)=>e.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),JV=re("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(t,e)=>e.hiddenInput})(ie({},RP)),XV=t=>{const{focused:e,disabled:n,error:r,classes:o,fullWidth:i,readOnly:s,color:a,size:c,endAdornment:u,startAdornment:f}=t,p={root:["root",e&&!n&&"focused",n&&"disabled",s&&"readOnly",r&&"error",i&&"fullWidth",`color${$e(a)}`,c==="small"&&"inputSizeSmall",!!f&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Ze(p,zV,o)},gf=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:s,onChange:a,id:c,endAdornment:u,startAdornment:f,renderSuffix:p,slots:m,slotProps:y,contentEditable:b,tabIndex:g,onInput:x,onPaste:w,onKeyDown:E,name:T,readOnly:C,inputProps:k,inputRef:M,sectionListRef:A}=r,I=mt(r,UV),L=D.useRef(null),O=At(n,L),N=At(k==null?void 0:k.ref,M),$=ki(),V=Lo();if(!V)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const z=K=>{var Q;if(V.disabled){K.stopPropagation();return}(Q=V.onFocus)==null||Q.call(V,K)};D.useEffect(()=>{V&&V.setAdornedStart(!!f)},[V,f]),D.useEffect(()=>{V&&(i?V.onEmpty():V.onFilled())},[V,i]);const F=ie({},r,V,{isRtl:$}),B=XV(F),W=(m==null?void 0:m.root)||mf,Y=$t({elementType:W,externalSlotProps:y==null?void 0:y.root,externalForwardedProps:I,additionalProps:{"aria-invalid":V.error,ref:O},className:B.root,ownerState:F}),X=(m==null?void 0:m.input)||Xg;return v.jsxs(W,ie({},Y,{children:[f,v.jsx(aC,{sectionListRef:A,elements:o,contentEditable:b,tabIndex:g,className:B.sectionsContainer,onFocus:z,onBlur:V.onBlur,onInput:x,onPaste:w,onKeyDown:E,slots:{root:X,section:KV,sectionContent:YV,sectionSeparator:GV},slotProps:{root:{ownerState:F},sectionContent:{className:yl.sectionContent},sectionSeparator:({position:K})=>({className:K==="before"?yl.sectionBefore:yl.sectionAfter})}}),u,p?p(ie({},V)):null,v.jsx(JV,ie({name:T,className:B.input,value:s,onChange:a,id:c,"aria-hidden":"true",tabIndex:-1,readOnly:C,required:V.required,disabled:V.disabled},k,{ref:N}))]}))});process.env.NODE_ENV!=="production"&&(gf.propTypes={areAllSectionsEmpty:l.bool.isRequired,className:l.string,component:l.elementType,contentEditable:l.bool.isRequired,elements:l.arrayOf(l.shape({after:l.object.isRequired,before:l.object.isRequired,container:l.object.isRequired,content:l.object.isRequired})).isRequired,endAdornment:l.node,fullWidth:l.bool,id:l.string,inputProps:l.object,inputRef:Dn,label:l.node,margin:l.oneOf(["dense","none","normal"]),name:l.string,onChange:l.func.isRequired,onClick:l.func.isRequired,onInput:l.func.isRequired,onKeyDown:l.func.isRequired,onPaste:l.func.isRequired,ownerState:l.any,readOnly:l.bool,renderSuffix:l.func,sectionListRef:l.oneOfType([l.func,l.shape({current:l.shape({getRoot:l.func.isRequired,getSectionContainer:l.func.isRequired,getSectionContent:l.func.isRequired,getSectionIndexFromDOMElement:l.func.isRequired})})]),slotProps:l.object,slots:l.object,startAdornment:l.node,style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),value:l.string.isRequired});function ZV(t){return Qe("MuiPickersOutlinedInput",t)}const Fo=ie({},yl,Ge("MuiPickersOutlinedInput",["root","notchedOutline","input"])),QV=["children","className","label","notched","shrink"],e3=re("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}}),lC=re("span")(({theme:t})=>({fontFamily:t.typography.fontFamily,fontSize:"inherit"})),t3=re("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 n3(t){const{className:e,label:n}=t,r=mt(t,QV),o=n!=null&&n!=="",i=ie({},t,{withLabel:o});return v.jsx(e3,ie({"aria-hidden":!0,className:e},r,{ownerState:i,children:v.jsx(t3,{ownerState:i,children:o?v.jsx(lC,{children:n}):v.jsx(lC,{className:"notranslate",children:""})})}))}const r3=["label","autoFocus","ownerState","notched"],o3=re(mf,{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 .${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}`]:{borderStyle:"solid",borderWidth:2},[`&.${Fo.disabled}`]:{[`& .${Fo.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled},"*":{color:(t.vars||t).palette.action.disabled}},[`&.${Fo.error} .${Fo.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:{[`&.${Fo.focused}:not(.${Fo.error}) .${Fo.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}}))}}),i3=re(Xg,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),s3=t=>{const{classes:e}=t,r=Ze({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},ZV,e);return ie({},e,r)},Zg=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:s}=r,a=mt(r,r3),c=Lo(),u=ie({},r,i,c,{color:(c==null?void 0:c.color)||"primary"}),f=s3(u);return v.jsx(gf,ie({slots:{root:o3,input:i3},renderSuffix:p=>v.jsx(n3,{shrink:!!(s||p.adornedStart||p.focused||p.filled),notched:!!(s||p.adornedStart||p.focused||p.filled),className:f.notchedOutline,label:o!=null&&o!==""&&(c!=null&&c.required)?v.jsxs(D.Fragment,{children:[o," ","*"]}):o,ownerState:u})},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(Zg.propTypes={areAllSectionsEmpty:l.bool.isRequired,className:l.string,component:l.elementType,contentEditable:l.bool.isRequired,elements:l.arrayOf(l.shape({after:l.object.isRequired,before:l.object.isRequired,container:l.object.isRequired,content:l.object.isRequired})).isRequired,endAdornment:l.node,fullWidth:l.bool,id:l.string,inputProps:l.object,inputRef:Dn,label:l.node,margin:l.oneOf(["dense","none","normal"]),name:l.string,notched:l.bool,onChange:l.func.isRequired,onClick:l.func.isRequired,onInput:l.func.isRequired,onKeyDown:l.func.isRequired,onPaste:l.func.isRequired,ownerState:l.any,readOnly:l.bool,renderSuffix:l.func,sectionListRef:l.oneOfType([l.func,l.shape({current:l.shape({getRoot:l.func.isRequired,getSectionContainer:l.func.isRequired,getSectionContent:l.func.isRequired,getSectionIndexFromDOMElement:l.func.isRequired})})]),slotProps:l.object,slots:l.object,startAdornment:l.node,style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),value:l.string.isRequired}),Zg.muiName="Input";function yf(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 bl(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 cC(t){if(D.isValidElement(t)||bi.isValidElementType(t)||!bl(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=cC(t[n])}),e}function bf(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return bl(t)&&bl(e)&&Object.keys(e).forEach(o=>{D.isValidElement(e[o])||bi.isValidElementType(e[o])?r[o]=e[o]:bl(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&bl(t[o])?r[o]=bf(t[o],e[o],n):n.clone?r[o]=bl(e[o])?cC(e[o]):e[o]:r[o]=e[o]}),r}const a3=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 l3(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=t,i=a3(e),s=Object.keys(i);function a(m){return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${n})`}function c(m){return`@media (max-width:${(typeof e[m]=="number"?e[m]:m)-r/100}${n})`}function u(m,y){const b=s.indexOf(y);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]]:y)-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 y=s.indexOf(m);return y===0?a(s[1]):y===s.length-1?c(s[y]):u(m,s[s.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:s,values:i,up:a,down:c,between:u,only:f,not:p,unit:n,...o}}function uC(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 c3(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function u3(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${e})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
232
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:yf(18,`(${e})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return t.containerQueries(o).up(i)}function d3(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 c=e(t.breakpoints.not(...a),s);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},o=i=>(n(r,i),r);return n(o),{...t,containerQueries:o}}const f3={borderRadius:4},ds=process.env.NODE_ENV!=="production"?l.oneOfType([l.number,l.string,l.object,l.array]):{};function Wc(t,e){return e?bf(t,e,{clone:!1}):t}const vf={xs:0,sm:600,md:900,lg:1200,xl:1536},dC={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${vf[t]}px)`},p3={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:vf[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function Oi(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||dC;return e.reduce((s,a,c)=>(s[i.up(i.keys[c])]=n(e[c]),s),{})}if(typeof e=="object"){const i=r.breakpoints||dC;return Object.keys(e).reduce((s,a)=>{if(c3(i.keys,a)){const c=u3(r.containerQueries?r:p3,a);c&&(s[c]=n(e[a],a))}else if(Object.keys(i.values||vf).includes(a)){const c=i.up(a);s[c]=n(e[a],a)}else{const c=a;s[c]=e[c]}return s},{})}return n(e)}function h3(t={}){var n;return((n=t.keys)==null?void 0:n.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function fC(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function pC(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":yf(7));return t.charAt(0).toUpperCase()+t.slice(1)}function xf(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 Sf(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=xf(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],c=s.theme,u=xf(c,r)||{};return Oi(s,a,p=>{let m=Sf(u,o,p);return p===m&&typeof p=="string"&&(m=Sf(u,o,`${e}${p==="default"?"":pC(p)}`,p)),n===!1?m:{[n]:m}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:ds}:{},i.filterProps=[e],i}function m3(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const g3={m:"margin",p:"padding"},y3={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},hC={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},b3=m3(t=>{if(t.length>2)if(hC[t])t=hC[t];else return[t];const[e,n]=t.split(""),r=g3[e],o=y3[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),wf=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Cf=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],v3=[...wf,...Cf];function jc(t,e,n,r){const o=xf(t,e,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const s=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
|
|
233
|
-
`)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
|
|
234
|
-
`)));const a=o[s];return i>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
235
|
-
`)),()=>{})}function mC(t){return jc(t,"spacing",8,"spacing")}function Uc(t,e){return typeof e=="string"||e==null?e:t(e)}function x3(t,e){return n=>t.reduce((r,o)=>(r[o]=Uc(e,n),r),{})}function S3(t,e,n,r){if(!e.includes(n))return null;const o=b3(n),i=x3(o,r),s=t[n];return Oi(t,s,i)}function gC(t,e){const n=mC(t.theme);return Object.keys(t).map(r=>S3(t,e,r,n)).reduce(Wc,{})}function gn(t){return gC(t,wf)}gn.propTypes=process.env.NODE_ENV!=="production"?wf.reduce((t,e)=>(t[e]=ds,t),{}):{},gn.filterProps=wf;function yn(t){return gC(t,Cf)}yn.propTypes=process.env.NODE_ENV!=="production"?Cf.reduce((t,e)=>(t[e]=ds,t),{}):{},yn.filterProps=Cf,process.env.NODE_ENV!=="production"&&v3.reduce((t,e)=>(t[e]=ds,t),{});function w3(t=8,e=mC({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 Tf(...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]?Wc(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 uo(t){return typeof t!="number"?t:`${t}px solid`}function fo(t,e){return _n({prop:t,themeKey:"borders",transform:e})}const C3=fo("border",uo),T3=fo("borderTop",uo),k3=fo("borderRight",uo),E3=fo("borderBottom",uo),_3=fo("borderLeft",uo),O3=fo("borderColor"),M3=fo("borderTopColor"),A3=fo("borderRightColor"),D3=fo("borderBottomColor"),I3=fo("borderLeftColor"),P3=fo("outline",uo),N3=fo("outlineColor"),kf=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=jc(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Uc(e,r)});return Oi(t,t.borderRadius,n)}return null};kf.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:ds}:{},kf.filterProps=["borderRadius"],Tf(C3,T3,k3,E3,_3,O3,M3,A3,D3,I3,kf,P3,N3);const Ef=t=>{if(t.gap!==void 0&&t.gap!==null){const e=jc(t.theme,"spacing",8,"gap"),n=r=>({gap:Uc(e,r)});return Oi(t,t.gap,n)}return null};Ef.propTypes=process.env.NODE_ENV!=="production"?{gap:ds}:{},Ef.filterProps=["gap"];const _f=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=jc(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Uc(e,r)});return Oi(t,t.columnGap,n)}return null};_f.propTypes=process.env.NODE_ENV!=="production"?{columnGap:ds}:{},_f.filterProps=["columnGap"];const Of=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=jc(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Uc(e,r)});return Oi(t,t.rowGap,n)}return null};Of.propTypes=process.env.NODE_ENV!=="production"?{rowGap:ds}:{},Of.filterProps=["rowGap"];const $3=_n({prop:"gridColumn"}),L3=_n({prop:"gridRow"}),F3=_n({prop:"gridAutoFlow"}),R3=_n({prop:"gridAutoColumns"}),B3=_n({prop:"gridAutoRows"}),V3=_n({prop:"gridTemplateColumns"}),z3=_n({prop:"gridTemplateRows"}),H3=_n({prop:"gridTemplateAreas"}),W3=_n({prop:"gridArea"});Tf(Ef,_f,Of,$3,L3,F3,R3,B3,V3,z3,H3,W3);function vl(t,e){return e==="grey"?e:t}const j3=_n({prop:"color",themeKey:"palette",transform:vl}),U3=_n({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:vl}),q3=_n({prop:"backgroundColor",themeKey:"palette",transform:vl});Tf(j3,U3,q3);function zr(t){return t<=1&&t!==0?`${t*100}%`:t}const K3=_n({prop:"width",transform:zr}),Qg=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var o,i,s,a,c;const r=((s=(i=(o=t.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:s[n])||vf[n];return r?((c=(a=t.theme)==null?void 0:a.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${t.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:zr(n)}};return Oi(t,t.maxWidth,e)}return null};Qg.filterProps=["maxWidth"];const Y3=_n({prop:"minWidth",transform:zr}),G3=_n({prop:"height",transform:zr}),J3=_n({prop:"maxHeight",transform:zr}),X3=_n({prop:"minHeight",transform:zr});_n({prop:"size",cssProperty:"width",transform:zr}),_n({prop:"size",cssProperty:"height",transform:zr});const Z3=_n({prop:"boxSizing"});Tf(K3,Qg,Y3,G3,J3,X3,Z3);const yC={border:{themeKey:"borders",transform:uo},borderTop:{themeKey:"borders",transform:uo},borderRight:{themeKey:"borders",transform:uo},borderBottom:{themeKey:"borders",transform:uo},borderLeft:{themeKey:"borders",transform:uo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:uo},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:kf},color:{themeKey:"palette",transform:vl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:vl},backgroundColor:{themeKey:"palette",transform:vl},p:{style:yn},pt:{style:yn},pr:{style:yn},pb:{style:yn},pl:{style:yn},px:{style:yn},py:{style:yn},padding:{style:yn},paddingTop:{style:yn},paddingRight:{style:yn},paddingBottom:{style:yn},paddingLeft:{style:yn},paddingX:{style:yn},paddingY:{style:yn},paddingInline:{style:yn},paddingInlineStart:{style:yn},paddingInlineEnd:{style:yn},paddingBlock:{style:yn},paddingBlockStart:{style:yn},paddingBlockEnd:{style:yn},m:{style:gn},mt:{style:gn},mr:{style:gn},mb:{style:gn},ml:{style:gn},mx:{style:gn},my:{style:gn},margin:{style:gn},marginTop:{style:gn},marginRight:{style:gn},marginBottom:{style:gn},marginLeft:{style:gn},marginX:{style:gn},marginY:{style:gn},marginInline:{style:gn},marginInlineStart:{style:gn},marginInlineEnd:{style:gn},marginBlock:{style:gn},marginBlockStart:{style:gn},marginBlockEnd:{style:gn},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:Ef},rowGap:{style:Of},columnGap:{style:_f},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:zr},maxWidth:{style:Qg},minWidth:{transform:zr},height:{transform:zr},maxHeight:{transform:zr},minHeight:{transform:zr},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 Q3(...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 ez(t,e){return typeof t=="function"?t(e):t}function tz(){function t(n,r,o,i){const s={[n]:r,theme:o},a=i[n];if(!a)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:p}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const m=xf(o,u)||{};return p?p(s):Oi(s,r,b=>{let g=Sf(m,f,b);return b===g&&typeof b=="string"&&(g=Sf(m,f,`${n}${b==="default"?"":pC(b)}`,b)),c===!1?g:{[c]:g}})}function e(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const s=o.unstable_sxConfig??yC;function a(c){let u=c;if(typeof c=="function")u=c(o);else if(typeof c!="object")return c;if(!u)return null;const f=h3(o.breakpoints),p=Object.keys(f);let m=f;return Object.keys(u).forEach(y=>{const b=ez(u[y],o);if(b!=null)if(typeof b=="object")if(s[y])m=Wc(m,t(y,b,o,s));else{const g=Oi({theme:o},b,x=>({[y]:x}));Q3(g,b)?m[y]=e({sx:b,theme:o,nested:!0}):m=Wc(m,g)}else m=Wc(m,t(y,b,o,s))}),!i&&o.modularCssLayers?{"@layer sx":uC(o,fC(p,m))}:uC(o,fC(p,m))}return Array.isArray(r)?r.map(a):a(r)}return e}const bC=tz();bC.filterProps=["sx"];function nz(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 rz(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...s}=t,a=l3(n),c=w3(o);let u=bf({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...f3,...i}},s);return u=d3(u),u.applyStyles=nz,u=e.reduce((f,p)=>bf(f,p),u),u.unstable_sxConfig={...yC,...s==null?void 0:s.unstable_sxConfig},u.unstable_sx=function(p){return bC({sx:p,theme:this})},u}rz();function oz(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function iz(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function sz(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}].`),iz(t,e,n)}function az(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 vC(t){if(t.type)return t;if(t.charAt(0)==="#")return vC(az(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
|
|
236
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:yf(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
|
|
237
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:yf(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function lz(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 cz(t,e){if(t=vC(t),e=sz(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 lz(t)}function uz(t){return Qe("MuiPickersFilledInput",t)}const oa=ie({},yl,Ge("MuiPickersFilledInput",["root","underline","input"])),dz=["label","autoFocus","disableUnderline","ownerState"],fz=re(mf,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>oz(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}},[`&.${oa.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r},[`&.${oa.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"},[`&.${oa.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${oa.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(.${oa.disabled}, .${oa.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${oa.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:s})=>!!s,style:{paddingLeft:12}},{props:({endAdornment:s})=>!!s,style:{paddingRight:12}}]}}),pz=re(Xg,{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}}]}),hz=t=>{const{classes:e,disableUnderline:n}=t,o=Ze({root:["root",!n&&"underline"],input:["input"]},uz,e);return ie({},e,o)},ey=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:s}=r,a=mt(r,dz),c=Lo(),u=ie({},r,s,c,{color:(c==null?void 0:c.color)||"primary"}),f=hz(u);return v.jsx(gf,ie({slots:{root:fz,input:pz},slotProps:{root:{disableUnderline:i}}},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(ey.propTypes={areAllSectionsEmpty:l.bool.isRequired,className:l.string,component:l.elementType,contentEditable:l.bool.isRequired,disableUnderline:l.bool,elements:l.arrayOf(l.shape({after:l.object.isRequired,before:l.object.isRequired,container:l.object.isRequired,content:l.object.isRequired})).isRequired,endAdornment:l.node,fullWidth:l.bool,hiddenLabel:l.bool,id:l.string,inputProps:l.object,inputRef:Dn,label:l.node,margin:l.oneOf(["dense","none","normal"]),name:l.string,onChange:l.func.isRequired,onClick:l.func.isRequired,onInput:l.func.isRequired,onKeyDown:l.func.isRequired,onPaste:l.func.isRequired,ownerState:l.any,readOnly:l.bool,renderSuffix:l.func,sectionListRef:l.oneOfType([l.func,l.shape({current:l.shape({getRoot:l.func.isRequired,getSectionContainer:l.func.isRequired,getSectionContent:l.func.isRequired,getSectionIndexFromDOMElement:l.func.isRequired})})]),slotProps:l.object,slots:l.object,startAdornment:l.node,style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),value:l.string.isRequired}),ey.muiName="Input";function mz(t){return Qe("MuiPickersFilledInput",t)}const qc=ie({},yl,Ge("MuiPickersInput",["root","input"])),gz=["label","autoFocus","disableUnderline","ownerState"],yz=re(mf,{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"},[`&.${qc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${qc.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(.${qc.disabled}, .${qc.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${qc.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),bz=t=>{const{classes:e,disableUnderline:n}=t,o=Ze({root:["root",!n&&"underline"],input:["input"]},mz,e);return ie({},e,o)},ty=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:s}=r,a=mt(r,gz),c=Lo(),u=ie({},r,s,c,{disableUnderline:i,color:(c==null?void 0:c.color)||"primary"}),f=bz(u);return v.jsx(gf,ie({slots:{root:yz}},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(ty.propTypes={areAllSectionsEmpty:l.bool.isRequired,className:l.string,component:l.elementType,contentEditable:l.bool.isRequired,disableUnderline:l.bool,elements:l.arrayOf(l.shape({after:l.object.isRequired,before:l.object.isRequired,container:l.object.isRequired,content:l.object.isRequired})).isRequired,endAdornment:l.node,fullWidth:l.bool,id:l.string,inputProps:l.object,inputRef:Dn,label:l.node,margin:l.oneOf(["dense","none","normal"]),name:l.string,onChange:l.func.isRequired,onClick:l.func.isRequired,onInput:l.func.isRequired,onKeyDown:l.func.isRequired,onPaste:l.func.isRequired,ownerState:l.any,readOnly:l.bool,renderSuffix:l.func,sectionListRef:l.oneOfType([l.func,l.shape({current:l.shape({getRoot:l.func.isRequired,getSectionContainer:l.func.isRequired,getSectionContent:l.func.isRequired,getSectionIndexFromDOMElement:l.func.isRequired})})]),slotProps:l.object,slots:l.object,startAdornment:l.node,style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),value:l.string.isRequired}),ty.muiName="Input";const vz=["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"],xz={standard:ty,filled:ey,outlined:Zg},Sz=re(Sg,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({maxWidth:"100%"}),wz=t=>{const{focused:e,disabled:n,classes:r,required:o}=t;return Ze({root:["root",e&&!n&&"focused",n&&"disabled",o&&"required"]},VV,r)},xC=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:s,color:a="primary",disabled:c=!1,error:u=!1,variant:f="outlined",required:p=!1,InputProps:m,inputProps:y,inputRef:b,sectionListRef:g,elements:x,areAllSectionsEmpty:w,onClick:E,onKeyDown:T,onKeyUp:C,onPaste:k,onInput:M,endAdornment:A,startAdornment:I,tabIndex:L,contentEditable:O,focused:N,value:$,onChange:V,fullWidth:z,id:F,name:B,helperText:W,FormHelperTextProps:Y,label:X,InputLabelProps:K}=r,Q=mt(r,vz),ve=D.useRef(null),xe=At(n,ve),ye=No(F),oe=W&&ye?`${ye}-helper-text`:void 0,ce=X&&ye?`${ye}-label`:void 0,fe=ie({},r,{color:a,disabled:c,error:u,focused:N,required:p,variant:f}),q=wz(fe),ee=xz[f];return v.jsxs(Sz,ie({className:me(q.root,s),ref:xe,focused:N,onFocus:o,onBlur:i,disabled:c,variant:f,error:u,color:a,fullWidth:z,required:p,ownerState:fe},Q,{children:[v.jsx(xg,ie({htmlFor:ye,id:ce},K,{children:X})),v.jsx(ee,ie({elements:x,areAllSectionsEmpty:w,onClick:E,onKeyDown:T,onKeyUp:C,onInput:M,onPaste:k,endAdornment:A,startAdornment:I,tabIndex:L,contentEditable:O,value:$,onChange:V,id:ye,fullWidth:z,inputProps:y,inputRef:b,sectionListRef:g,label:X,name:B,role:"group","aria-labelledby":ce,"aria-describedby":oe,"aria-live":oe?"polite":void 0},m)),W&&v.jsx(wg,ie({id:oe},Y,{children:W}))]}))});process.env.NODE_ENV!=="production"&&(xC.propTypes={areAllSectionsEmpty:l.bool.isRequired,className:l.string,color:l.oneOf(["error","info","primary","secondary","success","warning"]),component:l.elementType,contentEditable:l.bool.isRequired,disabled:l.bool.isRequired,elements:l.arrayOf(l.shape({after:l.object.isRequired,before:l.object.isRequired,container:l.object.isRequired,content:l.object.isRequired})).isRequired,endAdornment:l.node,error:l.bool.isRequired,focused:l.bool,FormHelperTextProps:l.object,fullWidth:l.bool,helperText:l.node,hiddenLabel:l.bool,id:l.string,InputLabelProps:l.object,inputProps:l.object,InputProps:l.object,inputRef:Dn,label:l.node,margin:l.oneOf(["dense","none","normal"]),name:l.string,onBlur:l.func.isRequired,onChange:l.func.isRequired,onClick:l.func.isRequired,onFocus:l.func.isRequired,onInput:l.func.isRequired,onKeyDown:l.func.isRequired,onPaste:l.func.isRequired,readOnly:l.bool,required:l.bool,sectionListRef:l.oneOfType([l.func,l.shape({current:l.shape({getRoot:l.func.isRequired,getSectionContainer:l.func.isRequired,getSectionContent:l.func.isRequired,getSectionIndexFromDOMElement:l.func.isRequired})})]),size:l.oneOf(["medium","small"]),startAdornment:l.node,style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),value:l.string.isRequired,variant:l.oneOf(["filled","outlined","standard"])});const Cz=["enableAccessibleFieldDOMStructure"],Tz=["InputProps","readOnly"],kz=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],Ez=t=>{let{enableAccessibleFieldDOMStructure:e}=t,n=mt(t,Cz);if(e){const{InputProps:p,readOnly:m}=n,y=mt(n,Tz);return ie({},y,{InputProps:ie({},p??{},{readOnly:m})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:s,InputProps:a,inputProps:c,inputRef:u}=n,f=mt(n,kz);return ie({},f,{InputProps:ie({},a??{},{readOnly:s}),inputProps:ie({},c??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})},_z=["slots","slotProps","InputProps","inputProps"],Mf=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:s,inputProps:a}=r,c=mt(r,_z),u=r,f=(o==null?void 0:o.textField)??(e.enableAccessibleFieldDOMStructure?xC:Lc),p=$t({elementType:f,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:c,additionalProps:{ref:n},ownerState:u});p.inputProps=ie({},a,p.inputProps),p.InputProps=ie({},s,p.InputProps);const m=BV(p),y=Ez(m),b=NV(ie({},y,{slots:o,slotProps:i}));return v.jsx(f,ie({},b))});process.env.NODE_ENV!=="production"&&(Mf.propTypes={autoFocus:l.bool,className:l.string,clearable:l.bool,color:l.oneOf(["error","info","primary","secondary","success","warning"]),component:l.elementType,defaultValue:l.object,disabled:l.bool,disableFuture:l.bool,disablePast:l.bool,enableAccessibleFieldDOMStructure:l.bool,focused:l.bool,format:l.string,formatDensity:l.oneOf(["dense","spacious"]),FormHelperTextProps:l.object,fullWidth:l.bool,helperText:l.node,hiddenLabel:l.bool,id:l.string,InputLabelProps:l.object,inputProps:l.object,InputProps:l.object,inputRef:Dn,label:l.node,margin:l.oneOf(["dense","none","normal"]),maxDate:l.object,minDate:l.object,name:l.string,onBlur:l.func,onChange:l.func,onClear:l.func,onError:l.func,onFocus:l.func,onSelectedSectionsChange:l.func,readOnly:l.bool,referenceDate:l.object,required:l.bool,selectedSections:l.oneOfType([l.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),l.number]),shouldDisableDate:l.func,shouldDisableMonth:l.func,shouldDisableYear:l.func,shouldRespectLeadingZeros:l.bool,size:l.oneOf(["medium","small"]),slotProps:l.object,slots:l.object,style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),timezone:l.string,unstableFieldRef:l.oneOfType([l.func,l.object]),value:l.object,variant:l.oneOf(["filled","outlined","standard"])});var Af={exports:{}},Oz=Af.exports,SC;function Mz(){return SC||(SC=1,(function(t,e){(function(n,r){t.exports=r()})(Oz,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(i,s,a){var c=s.prototype;a.utc=function(g){var x={date:g,utc:!0,args:arguments};return new s(x)},c.utc=function(g){var x=a(this.toDate(),{locale:this.$L,utc:!0});return g?x.add(this.utcOffset(),n):x},c.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var u=c.parse;c.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),u.call(this,g)};var f=c.init;c.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else f.call(this)};var p=c.utcOffset;c.utcOffset=function(g,x){var w=this.$utils().u;if(w(g))return this.$u?0:w(this.$offset)?p.call(this):this.$offset;if(typeof g=="string"&&(g=(function(k){k===void 0&&(k="");var M=k.match(r);if(!M)return null;var A=(""+M[0]).match(o)||["-",0,0],I=A[0],L=60*+A[1]+ +A[2];return L===0?0:I==="+"?L:-L})(g),g===null))return this;var E=Math.abs(g)<=16?60*g:g;if(E===0)return this.utc(x);var T=this.clone();if(x)return T.$offset=E,T.$u=!1,T;var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(T=this.local().add(E+C,n)).$offset=E,T.$x.$localOffset=C,T};var m=c.format;c.format=function(g){var x=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,x)},c.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var y=c.toDate;c.toDate=function(g){return g==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():y.call(this)};var b=c.diff;c.diff=function(g,x,w){if(g&&this.$u===g.$u)return b.call(this,g,x,w);var E=this.local(),T=a(g).local();return b.call(E,T,x,w)}}}))})(Af)),Af.exports}var Az=Mz();const Dz=Rr(Az);In.extend(Dz);const wC=uS({themeId:al});function Iz(t){return Qe("MuiPickersToolbar",t)}Ge("MuiPickersToolbar",["root","content"]);const Pz=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],Nz=t=>{const{classes:e}=t;return Ze({root:["root"],content:["content"]},Iz,e)},$z=re("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"}}]})),Lz=re("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"}}]}),Fz=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:s,hidden:a,titleId:c}=r,u=mt(r,Pz),f=r,p=Nz(f);return a?null:v.jsxs($z,ie({ref:n,className:me(p.root,i),ownerState:f},u,{children:[v.jsx(co,{color:"text.secondary",variant:"overline",id:c,children:s}),v.jsx(Lz,{className:p.content,ownerState:f,children:o})]}))});function Rz(t){return Qe("MuiDatePickerToolbar",t)}Ge("MuiDatePickerToolbar",["root","title"]);const Bz=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],Vz=t=>{const{classes:e}=t;return Ze({root:["root"],title:["title"]},Rz,e)},zz=re(Fz,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Hz=re(co,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(t,e)=>e.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),CC=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:s,toolbarPlaceholder:a="––",views:c,className:u}=r,f=mt(r,Bz),p=nn(),m=Ei(),y=Vz(r),b=D.useMemo(()=>{if(!o)return a;const x=Bg(p,{format:s,views:c},!0);return p.formatByString(o,x)},[o,s,a,p,c]),g=r;return v.jsx(zz,ie({ref:n,toolbarTitle:m.datePickerToolbarTitle,isLandscape:i,className:me(y.root,u)},f,{children:v.jsx(Hz,{variant:"h4",align:i?"left":"center",ownerState:g,className:y.title,children:b})}))});process.env.NODE_ENV!=="production"&&(CC.propTypes={classes:l.object,className:l.string,disabled:l.bool,hidden:l.bool,isLandscape:l.bool.isRequired,onChange:l.func.isRequired,onViewChange:l.func.isRequired,readOnly:l.bool,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),titleId:l.string,toolbarFormat:l.string,toolbarPlaceholder:l.node,value:l.object,view:l.oneOf(["day","month","year"]).isRequired,views:l.arrayOf(l.oneOf(["day","month","year"]).isRequired).isRequired});function TC(t,e){const n=nn(),r=zc(),o=ut({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},t5({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:ao(n,o.minDate,r.minDate),maxDate:ao(n,o.maxDate,r.maxDate),slots:ie({toolbar:CC},o.slots)})}var _r="top",po="bottom",ho="right",Or="left",ny="auto",Kc=[_r,po,ho,Or],xl="start",Yc="end",Wz="clippingParents",kC="viewport",Gc="popper",jz="reference",EC=Kc.reduce(function(t,e){return t.concat([e+"-"+xl,e+"-"+Yc])},[]),_C=[].concat(Kc,[ny]).reduce(function(t,e){return t.concat([e,e+"-"+xl,e+"-"+Yc])},[]),Uz="beforeRead",qz="read",Kz="afterRead",Yz="beforeMain",Gz="main",Jz="afterMain",Xz="beforeWrite",Zz="write",Qz="afterWrite",e4=[Uz,qz,Kz,Yz,Gz,Jz,Xz,Zz,Qz];function ei(t){return t?(t.nodeName||"").toLowerCase():null}function Hr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ia(t){var e=Hr(t).Element;return t instanceof e||t instanceof Element}function mo(t){var e=Hr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function ry(t){if(typeof ShadowRoot>"u")return!1;var e=Hr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function t4(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];!mo(i)||!ei(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 n4(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(c,u){return c[u]="",c},{});!mo(o)||!ei(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(c){o.removeAttribute(c)}))})}}const OC={name:"applyStyles",enabled:!0,phase:"write",fn:t4,effect:n4,requires:["computeStyles"]};function ti(t){return t.split("-")[0]}var sa=Math.max,Df=Math.min,Sl=Math.round;function oy(){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 MC(){return!/^((?!chrome|android).)*safari/i.test(oy())}function wl(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&mo(t)&&(o=t.offsetWidth>0&&Sl(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Sl(r.height)/t.offsetHeight||1);var s=ia(t)?Hr(t):window,a=s.visualViewport,c=!MC()&&n,u=(r.left+(c&&a?a.offsetLeft:0))/o,f=(r.top+(c&&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 iy(t){var e=wl(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 AC(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&ry(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Mi(t){return Hr(t).getComputedStyle(t)}function r4(t){return["table","td","th"].indexOf(ei(t))>=0}function fs(t){return((ia(t)?t.ownerDocument:t.document)||window.document).documentElement}function If(t){return ei(t)==="html"?t:t.assignedSlot||t.parentNode||(ry(t)?t.host:null)||fs(t)}function DC(t){return!mo(t)||Mi(t).position==="fixed"?null:t.offsetParent}function o4(t){var e=/firefox/i.test(oy()),n=/Trident/i.test(oy());if(n&&mo(t)){var r=Mi(t);if(r.position==="fixed")return null}var o=If(t);for(ry(o)&&(o=o.host);mo(o)&&["html","body"].indexOf(ei(o))<0;){var i=Mi(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 Jc(t){for(var e=Hr(t),n=DC(t);n&&r4(n)&&Mi(n).position==="static";)n=DC(n);return n&&(ei(n)==="html"||ei(n)==="body"&&Mi(n).position==="static")?e:n||o4(t)||e}function sy(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Xc(t,e,n){return sa(t,Df(e,n))}function i4(t,e,n){var r=Xc(t,e,n);return r>n?n:r}function IC(){return{top:0,right:0,bottom:0,left:0}}function PC(t){return Object.assign({},IC(),t)}function NC(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var s4=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,PC(typeof e!="number"?e:NC(e,Kc))};function a4(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=ti(n.placement),c=sy(a),u=[Or,ho].indexOf(a)>=0,f=u?"height":"width";if(!(!i||!s)){var p=s4(o.padding,n),m=iy(i),y=c==="y"?_r:Or,b=c==="y"?po:ho,g=n.rects.reference[f]+n.rects.reference[c]-s[c]-n.rects.popper[f],x=s[c]-n.rects.reference[c],w=Jc(i),E=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,T=g/2-x/2,C=p[y],k=E-m[f]-p[b],M=E/2-m[f]/2+T,A=Xc(C,M,k),I=c;n.modifiersData[r]=(e={},e[I]=A,e.centerOffset=A-M,e)}}function l4(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)||AC(e.elements.popper,o)&&(e.elements.arrow=o))}const c4={name:"arrow",enabled:!0,phase:"main",fn:a4,effect:l4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Cl(t){return t.split("-")[1]}var u4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function d4(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:Sl(n*o)/o||0,y:Sl(r*o)/o||0}}function $C(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,a=t.position,c=t.gpuAcceleration,u=t.adaptive,f=t.roundOffsets,p=t.isFixed,m=s.x,y=m===void 0?0:m,b=s.y,g=b===void 0?0:b,x=typeof f=="function"?f({x:y,y:g}):{x:y,y:g};y=x.x,g=x.y;var w=s.hasOwnProperty("x"),E=s.hasOwnProperty("y"),T=Or,C=_r,k=window;if(u){var M=Jc(n),A="clientHeight",I="clientWidth";if(M===Hr(n)&&(M=fs(n),Mi(M).position!=="static"&&a==="absolute"&&(A="scrollHeight",I="scrollWidth")),M=M,o===_r||(o===Or||o===ho)&&i===Yc){C=po;var L=p&&M===k&&k.visualViewport?k.visualViewport.height:M[A];g-=L-r.height,g*=c?1:-1}if(o===Or||(o===_r||o===po)&&i===Yc){T=ho;var O=p&&M===k&&k.visualViewport?k.visualViewport.width:M[I];y-=O-r.width,y*=c?1:-1}}var N=Object.assign({position:a},u&&u4),$=f===!0?d4({x:y,y:g},Hr(n)):{x:y,y:g};if(y=$.x,g=$.y,c){var V;return Object.assign({},N,(V={},V[C]=E?"0":"",V[T]=w?"0":"",V.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+g+"px)":"translate3d("+y+"px, "+g+"px, 0)",V))}return Object.assign({},N,(e={},e[C]=E?g+"px":"",e[T]=w?y+"px":"",e.transform="",e))}function f4(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,c=a===void 0?!0:a,u={placement:ti(e.placement),variation:Cl(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,$C(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,$C(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const p4={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:f4,data:{}};var Pf={passive:!0};function h4(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,c=Hr(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(f){f.addEventListener("scroll",n.update,Pf)}),a&&c.addEventListener("resize",n.update,Pf),function(){i&&u.forEach(function(f){f.removeEventListener("scroll",n.update,Pf)}),a&&c.removeEventListener("resize",n.update,Pf)}}const m4={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:h4,data:{}};var g4={left:"right",right:"left",bottom:"top",top:"bottom"};function Nf(t){return t.replace(/left|right|bottom|top/g,function(e){return g4[e]})}var y4={start:"end",end:"start"};function LC(t){return t.replace(/start|end/g,function(e){return y4[e]})}function ay(t){var e=Hr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function ly(t){return wl(fs(t)).left+ay(t).scrollLeft}function b4(t,e){var n=Hr(t),r=fs(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;var u=MC();(u||!u&&e==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a+ly(t),y:c}}function v4(t){var e,n=fs(t),r=ay(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=sa(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=sa(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+ly(t),c=-r.scrollTop;return Mi(o||n).direction==="rtl"&&(a+=sa(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:c}}function cy(t){var e=Mi(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function FC(t){return["html","body","#document"].indexOf(ei(t))>=0?t.ownerDocument.body:mo(t)&&cy(t)?t:FC(If(t))}function Zc(t,e){var n;e===void 0&&(e=[]);var r=FC(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=Hr(r),s=o?[i].concat(i.visualViewport||[],cy(r)?r:[]):r,a=e.concat(s);return o?a:a.concat(Zc(If(s)))}function uy(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function x4(t,e){var n=wl(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 RC(t,e,n){return e===kC?uy(b4(t,n)):ia(e)?x4(e,n):uy(v4(fs(t)))}function S4(t){var e=Zc(If(t)),n=["absolute","fixed"].indexOf(Mi(t).position)>=0,r=n&&mo(t)?Jc(t):t;return ia(r)?e.filter(function(o){return ia(o)&&AC(o,r)&&ei(o)!=="body"}):[]}function w4(t,e,n,r){var o=e==="clippingParents"?S4(t):[].concat(e),i=[].concat(o,[n]),s=i[0],a=i.reduce(function(c,u){var f=RC(t,u,r);return c.top=sa(f.top,c.top),c.right=Df(f.right,c.right),c.bottom=Df(f.bottom,c.bottom),c.left=sa(f.left,c.left),c},RC(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 BC(t){var e=t.reference,n=t.element,r=t.placement,o=r?ti(r):null,i=r?Cl(r):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,c;switch(o){case _r:c={x:s,y:e.y-n.height};break;case po:c={x:s,y:e.y+e.height};break;case ho:c={x:e.x+e.width,y:a};break;case Or:c={x:e.x-n.width,y:a};break;default:c={x:e.x,y:e.y}}var u=o?sy(o):null;if(u!=null){var f=u==="y"?"height":"width";switch(i){case xl:c[u]=c[u]-(e[f]/2-n[f]/2);break;case Yc:c[u]=c[u]+(e[f]/2-n[f]/2);break}}return c}function Qc(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,c=a===void 0?Wz:a,u=n.rootBoundary,f=u===void 0?kC:u,p=n.elementContext,m=p===void 0?Gc:p,y=n.altBoundary,b=y===void 0?!1:y,g=n.padding,x=g===void 0?0:g,w=PC(typeof x!="number"?x:NC(x,Kc)),E=m===Gc?jz:Gc,T=t.rects.popper,C=t.elements[b?E:m],k=w4(ia(C)?C:C.contextElement||fs(t.elements.popper),c,f,s),M=wl(t.elements.reference),A=BC({reference:M,element:T,placement:o}),I=uy(Object.assign({},T,A)),L=m===Gc?I:M,O={top:k.top-L.top+w.top,bottom:L.bottom-k.bottom+w.bottom,left:k.left-L.left+w.left,right:L.right-k.right+w.right},N=t.modifiersData.offset;if(m===Gc&&N){var $=N[o];Object.keys(O).forEach(function(V){var z=[ho,po].indexOf(V)>=0?1:-1,F=[_r,po].indexOf(V)>=0?"y":"x";O[V]+=$[F]*z})}return O}function C4(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?_C:c,f=Cl(r),p=f?a?EC:EC.filter(function(b){return Cl(b)===f}):Kc,m=p.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=p);var y=m.reduce(function(b,g){return b[g]=Qc(t,{placement:g,boundary:o,rootBoundary:i,padding:s})[ti(g)],b},{});return Object.keys(y).sort(function(b,g){return y[b]-y[g]})}function T4(t){if(ti(t)===ny)return[];var e=Nf(t);return[LC(t),e,LC(e)]}function k4(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,c=n.fallbackPlacements,u=n.padding,f=n.boundary,p=n.rootBoundary,m=n.altBoundary,y=n.flipVariations,b=y===void 0?!0:y,g=n.allowedAutoPlacements,x=e.options.placement,w=ti(x),E=w===x,T=c||(E||!b?[Nf(x)]:T4(x)),C=[x].concat(T).reduce(function(ye,oe){return ye.concat(ti(oe)===ny?C4(e,{placement:oe,boundary:f,rootBoundary:p,padding:u,flipVariations:b,allowedAutoPlacements:g}):oe)},[]),k=e.rects.reference,M=e.rects.popper,A=new Map,I=!0,L=C[0],O=0;O<C.length;O++){var N=C[O],$=ti(N),V=Cl(N)===xl,z=[_r,po].indexOf($)>=0,F=z?"width":"height",B=Qc(e,{placement:N,boundary:f,rootBoundary:p,altBoundary:m,padding:u}),W=z?V?ho:Or:V?po:_r;k[F]>M[F]&&(W=Nf(W));var Y=Nf(W),X=[];if(i&&X.push(B[$]<=0),a&&X.push(B[W]<=0,B[Y]<=0),X.every(function(ye){return ye})){L=N,I=!1;break}A.set(N,X)}if(I)for(var K=b?3:1,Q=function(oe){var ce=C.find(function(fe){var q=A.get(fe);if(q)return q.slice(0,oe).every(function(ee){return ee})});if(ce)return L=ce,"break"},ve=K;ve>0;ve--){var xe=Q(ve);if(xe==="break")break}e.placement!==L&&(e.modifiersData[r]._skip=!0,e.placement=L,e.reset=!0)}}const E4={name:"flip",enabled:!0,phase:"main",fn:k4,requiresIfExists:["offset"],data:{_skip:!1}};function VC(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 zC(t){return[_r,ho,po,Or].some(function(e){return t[e]>=0})}function _4(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=Qc(e,{elementContext:"reference"}),a=Qc(e,{altBoundary:!0}),c=VC(s,r),u=VC(a,o,i),f=zC(c),p=zC(u);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}const O4={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:_4};function M4(t,e,n){var r=ti(t),o=[Or,_r].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,[Or,ho].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function A4(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=_C.reduce(function(f,p){return f[p]=M4(p,e.rects,i),f},{}),a=s[e.placement],c=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}const D4={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:A4};function I4(t){var e=t.state,n=t.name;e.modifiersData[n]=BC({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const P4={name:"popperOffsets",enabled:!0,phase:"read",fn:I4,data:{}};function N4(t){return t==="x"?"y":"x"}function $4(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,c=n.boundary,u=n.rootBoundary,f=n.altBoundary,p=n.padding,m=n.tether,y=m===void 0?!0:m,b=n.tetherOffset,g=b===void 0?0:b,x=Qc(e,{boundary:c,rootBoundary:u,padding:p,altBoundary:f}),w=ti(e.placement),E=Cl(e.placement),T=!E,C=sy(w),k=N4(C),M=e.modifiersData.popperOffsets,A=e.rects.reference,I=e.rects.popper,L=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,O=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),N=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,$={x:0,y:0};if(M){if(i){var V,z=C==="y"?_r:Or,F=C==="y"?po:ho,B=C==="y"?"height":"width",W=M[C],Y=W+x[z],X=W-x[F],K=y?-I[B]/2:0,Q=E===xl?A[B]:I[B],ve=E===xl?-I[B]:-A[B],xe=e.elements.arrow,ye=y&&xe?iy(xe):{width:0,height:0},oe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:IC(),ce=oe[z],fe=oe[F],q=Xc(0,A[B],ye[B]),ee=T?A[B]/2-K-q-ce-O.mainAxis:Q-q-ce-O.mainAxis,se=T?-A[B]/2+K+q+fe+O.mainAxis:ve+q+fe+O.mainAxis,be=e.elements.arrow&&Jc(e.elements.arrow),ne=be?C==="y"?be.clientTop||0:be.clientLeft||0:0,le=(V=N==null?void 0:N[C])!=null?V:0,pe=W+ee-le-ne,Oe=W+se-le,ke=Xc(y?Df(Y,pe):Y,W,y?sa(X,Oe):X);M[C]=ke,$[C]=ke-W}if(a){var Fe,Ie=C==="x"?_r:Or,Ke=C==="x"?po:ho,Xe=M[k],U=k==="y"?"height":"width",Z=Xe+x[Ie],he=Xe-x[Ke],Ne=[_r,Or].indexOf(w)!==-1,Pe=(Fe=N==null?void 0:N[k])!=null?Fe:0,Ae=Ne?Z:Xe-A[U]-I[U]-Pe+O.altAxis,ze=Ne?Xe+A[U]+I[U]-Pe-O.altAxis:he,st=y&&Ne?i4(Ae,Xe,ze):Xc(y?Ae:Z,Xe,y?ze:he);M[k]=st,$[k]=st-Xe}e.modifiersData[r]=$}}const L4={name:"preventOverflow",enabled:!0,phase:"main",fn:$4,requiresIfExists:["offset"]};function F4(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function R4(t){return t===Hr(t)||!mo(t)?ay(t):F4(t)}function B4(t){var e=t.getBoundingClientRect(),n=Sl(e.width)/t.offsetWidth||1,r=Sl(e.height)/t.offsetHeight||1;return n!==1||r!==1}function V4(t,e,n){n===void 0&&(n=!1);var r=mo(e),o=mo(e)&&B4(e),i=fs(e),s=wl(t,o,n),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((ei(e)!=="body"||cy(i))&&(a=R4(e)),mo(e)?(c=wl(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):i&&(c.x=ly(i))),{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function z4(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 c=e.get(a);c&&o(c)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function H4(t){var e=z4(t);return e4.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function W4(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function j4(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 HC={placement:"bottom",modifiers:[],strategy:"absolute"};function WC(){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 U4(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?HC:o;return function(a,c,u){u===void 0&&(u=i);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},HC,i),modifiersData:{},elements:{reference:a,popper:c},attributes:{},styles:{}},p=[],m=!1,y={state:f,setOptions:function(w){var E=typeof w=="function"?w(f.options):w;g(),f.options=Object.assign({},i,f.options,E),f.scrollParents={reference:ia(a)?Zc(a):a.contextElement?Zc(a.contextElement):[],popper:Zc(c)};var T=H4(j4([].concat(r,f.options.modifiers)));return f.orderedModifiers=T.filter(function(C){return C.enabled}),b(),y.update()},forceUpdate:function(){if(!m){var w=f.elements,E=w.reference,T=w.popper;if(WC(E,T)){f.rects={reference:V4(E,Jc(T),f.options.strategy==="fixed"),popper:iy(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 C=0;C<f.orderedModifiers.length;C++){if(f.reset===!0){f.reset=!1,C=-1;continue}var k=f.orderedModifiers[C],M=k.fn,A=k.options,I=A===void 0?{}:A,L=k.name;typeof M=="function"&&(f=M({state:f,options:I,name:L,instance:y})||f)}}}},update:W4(function(){return new Promise(function(x){y.forceUpdate(),x(f)})}),destroy:function(){g(),m=!0}};if(!WC(a,c))return y;y.setOptions(u).then(function(x){!m&&u.onFirstUpdate&&u.onFirstUpdate(x)});function b(){f.orderedModifiers.forEach(function(x){var w=x.name,E=x.options,T=E===void 0?{}:E,C=x.effect;if(typeof C=="function"){var k=C({state:f,name:w,instance:y,options:T}),M=function(){};p.push(k||M)}})}function g(){p.forEach(function(x){return x()}),p=[]}return y}}var q4=[m4,P4,p4,OC,D4,E4,L4,c4,O4],jC=U4({defaultModifiers:q4});function K4(t){return Qe("MuiPopper",t)}Ge("MuiPopper",["root"]);function Y4(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 $f(t){return typeof t=="function"?t():t}function Lf(t){return t.nodeType!==void 0}function G4(t){return!Lf(t)}const J4=t=>{const{classes:e}=t;return Ze({root:["root"]},K4,e)},X4={},Z4=D.forwardRef(function(e,n){const{anchorEl:r,children:o,direction:i,disablePortal:s,modifiers:a,open:c,placement:u,popperOptions:f,popperRef:p,slotProps:m={},slots:y={},TransitionProps:b,ownerState:g,...x}=e,w=D.useRef(null),E=At(w,n),T=D.useRef(null),C=At(T,p),k=D.useRef(C);Rn(()=>{k.current=C},[C]),D.useImperativeHandle(p,()=>T.current,[]);const M=Y4(u,i),[A,I]=D.useState(M),[L,O]=D.useState($f(r));D.useEffect(()=>{T.current&&T.current.forceUpdate()}),D.useEffect(()=>{r&&O($f(r))},[r]),Rn(()=>{if(!L||!c)return;const F=Y=>{I(Y.placement)};if(process.env.NODE_ENV!=="production"&&L&&Lf(L)&&L.nodeType===1){const Y=L.getBoundingClientRect();process.env.NODE_ENV!=="test"&&Y.top===0&&Y.left===0&&Y.right===0&&Y.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
238
|
-
`))}let B=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:Y})=>{F(Y)}}];a!=null&&(B=B.concat(a)),f&&f.modifiers!=null&&(B=B.concat(f.modifiers));const W=jC(L,w.current,{placement:M,...f,modifiers:B});return k.current(W),()=>{W.destroy(),k.current(null)}},[L,s,a,c,f,M]);const N={placement:A};b!==null&&(N.TransitionProps=b);const $=J4(e),V=y.root??"div",z=$t({elementType:V,externalSlotProps:m.root,externalForwardedProps:x,additionalProps:{role:"tooltip",ref:E},ownerState:e,className:$.root});return v.jsx(V,{...z,children:typeof o=="function"?o(N):o})}),UC=D.forwardRef(function(e,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:a=!1,keepMounted:c=!1,modifiers:u,open:f,placement:p="bottom",popperOptions:m=X4,popperRef:y,style:b,transition:g=!1,slotProps:x={},slots:w={},...E}=e,[T,C]=D.useState(!0),k=()=>{C(!1)},M=()=>{C(!0)};if(!c&&!f&&(!g||T))return null;let A;if(i)A=i;else if(r){const O=$f(r);A=O&&Lf(O)?Fn(O).body:Fn(null).body}const I=!f&&c&&(!g||T)?"none":void 0,L=g?{in:f,onEnter:k,onExited:M}:void 0;return v.jsx(Nc,{disablePortal:a,container:A,children:v.jsx(Z4,{anchorEl:r,direction:s,disablePortal:a,modifiers:u,ref:n,open:g?!T:f,placement:p,popperOptions:m,popperRef:y,slotProps:x,slots:w,...E,style:{position:"fixed",top:0,left:0,display:I,...b},TransitionProps:L,children:o})})});process.env.NODE_ENV!=="production"&&(UC.propTypes={anchorEl:yi(l.oneOfType([vi,l.object,l.func]),t=>{if(t.open){const e=$f(t.anchorEl);if(e&&Lf(e)&&e.nodeType===1){const n=e.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
239
|
-
`))}else if(!e||typeof e.getBoundingClientRect!="function"||G4(e)&&e.contextElement!=null&&e.contextElement.nodeType!==1)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
|
|
240
|
-
`))}return null}),children:l.oneOfType([l.node,l.func]),container:l.oneOfType([vi,l.func]),direction:l.oneOf(["ltr","rtl"]),disablePortal:l.bool,keepMounted:l.bool,modifiers:l.arrayOf(l.shape({data:l.object,effect:l.func,enabled:l.bool,fn:l.func,name:l.any,options:l.object,phase:l.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:l.arrayOf(l.string),requiresIfExists:l.arrayOf(l.string)})),open:l.bool.isRequired,placement:l.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:l.shape({modifiers:l.array,onFirstUpdate:l.func,placement:l.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:l.oneOf(["absolute","fixed"])}),popperRef:Dn,slotProps:l.shape({root:l.oneOfType([l.func,l.object])}),slots:l.shape({root:l.elementType}),transition:l.bool});const Q4=re(UC,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Tl=D.forwardRef(function(e,n){const r=dg(),o=vt({props:e,name:"MuiPopper"}),{anchorEl:i,component:s,components:a,componentsProps:c,container:u,disablePortal:f,keepMounted:p,modifiers:m,open:y,placement:b,popperOptions:g,popperRef:x,transition:w,slots:E,slotProps:T,...C}=o,k=(E==null?void 0:E.root)??(a==null?void 0:a.Root),M={anchorEl:i,container:u,disablePortal:f,keepMounted:p,modifiers:m,open:y,placement:b,popperOptions:g,popperRef:x,transition:w,...C};return v.jsx(Q4,{as:s,direction:r?"rtl":"ltr",slots:{root:k},slotProps:T??c,...M,ref:n})});process.env.NODE_ENV!=="production"&&(Tl.propTypes={anchorEl:l.oneOfType([vi,l.object,l.func]),children:l.oneOfType([l.node,l.func]),component:l.elementType,components:l.shape({Root:l.elementType}),componentsProps:l.shape({root:l.oneOfType([l.func,l.object])}),container:l.oneOfType([vi,l.func]),disablePortal:l.bool,keepMounted:l.bool,modifiers:l.arrayOf(l.shape({data:l.object,effect:l.func,enabled:l.bool,fn:l.func,name:l.any,options:l.object,phase:l.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:l.arrayOf(l.string),requiresIfExists:l.arrayOf(l.string)})),open:l.bool.isRequired,placement:l.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:l.shape({modifiers:l.array,onFirstUpdate:l.func,placement:l.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:l.oneOf(["absolute","fixed"])}),popperRef:Dn,slotProps:l.shape({root:l.oneOfType([l.func,l.object])}),slots:l.shape({root:l.elementType}),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),transition:l.bool});function eH(t){return Qe("MuiPickersPopper",t)}Ge("MuiPickersPopper",["root","paper"]);const tH="@media (prefers-reduced-motion: reduce)",kl=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),qC=kl&&kl[1]?parseInt(kl[1],10):null,KC=kl&&kl[2]?parseInt(kl[2],10):null,nH=qC&&qC<10||KC&&KC<13||!1,YC=()=>wC(tH,{defaultMatches:!1})||nH,rH=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],oH=t=>{const{classes:e}=t;return Ze({root:["root"],paper:["paper"]},eH,e)},iH=re(Tl,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({zIndex:t.zIndex.modal})),sH=re(Ci,{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 aH(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function lH(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 c(){i.current=!0}return document.addEventListener("mousedown",c,!0),document.addEventListener("touchstart",c,!0),()=>{document.removeEventListener("mousedown",c,!0),document.removeEventListener("touchstart",c,!0),i.current=!1}},[t]);const s=qe(c=>{if(!i.current)return;const u=r.current;r.current=!1;const f=Fn(o.current);if(!o.current||"clientX"in c&&aH(c,f))return;if(n.current){n.current=!1;return}let p;c.composedPath?p=c.composedPath().indexOf(o.current)>-1:p=!f.documentElement.contains(c.target)||o.current.contains(c.target),!p&&!u&&e(c)}),a=()=>{r.current=!0};return D.useEffect(()=>{if(t){const c=Fn(o.current),u=()=>{n.current=!0};return c.addEventListener("touchstart",s),c.addEventListener("touchmove",u),()=>{c.removeEventListener("touchstart",s),c.removeEventListener("touchmove",u)}}},[t,s]),D.useEffect(()=>{if(t){const c=Fn(o.current);return c.addEventListener("click",s),()=>{c.removeEventListener("click",s),r.current=!1}}},[t,s]),[o,a,a]}const cH=D.forwardRef((t,e)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:s,paperClasses:a,onPaperClick:c,onPaperTouchStart:u}=t,f=mt(t,rH),p=ie({},o,{placement:r}),m=$t({elementType:n,externalSlotProps:s,additionalProps:{tabIndex:-1,elevation:8,ref:e},className:a,ownerState:p});return v.jsx(n,ie({},f,m,{onClick:y=>{var b;c(y),(b=m.onClick)==null||b.call(m,y)},onTouchStart:y=>{var b;u(y),(b=m.onTouchStart)==null||b.call(m,y)},ownerState:p,children:i}))});function uH(t){const e=ut({props:t,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:s,onDismiss:a,open:c,role:u,placement:f,slots:p,slotProps:m,reduceAnimations:y}=e;D.useEffect(()=>{function F(B){c&&B.key==="Escape"&&a()}return document.addEventListener("keydown",F),()=>{document.removeEventListener("keydown",F)}},[a,c]);const b=D.useRef(null);D.useEffect(()=>{u==="tooltip"||i&&!i()||(c?b.current=Er(document):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[c,u,i]);const[g,x,w]=lH(c,s??a),E=D.useRef(null),T=At(E,o),C=At(T,g),k=e,M=oH(k),A=YC(),I=y??A,L=F=>{F.key==="Escape"&&(F.stopPropagation(),a())},O=(p==null?void 0:p.desktopTransition)??I?Xo:pl,N=(p==null?void 0:p.desktopTrapFocus)??Pc,$=(p==null?void 0:p.desktopPaper)??sH,V=(p==null?void 0:p.popper)??iH,z=$t({elementType:V,externalSlotProps:m==null?void 0:m.popper,additionalProps:{transition:!0,role:u,open:c,anchorEl:n,placement:f,onKeyDown:L},className:M.root,ownerState:e});return v.jsx(V,ie({},z,{children:({TransitionProps:F,placement:B})=>v.jsx(N,ie({open:c,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},m==null?void 0:m.desktopTrapFocus,{children:v.jsx(O,ie({},F,m==null?void 0:m.desktopTransition,{children:v.jsx(cH,{PaperComponent:$,ownerState:k,popperPlacement:B,ref:C,onPaperClick:x,onPaperTouchStart:w,paperClasses:M.paper,paperSlotProps:m==null?void 0:m.desktopPaper,children:r})}))}))}))}const dH=({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}},fH=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},pH=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},hH=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},mH=({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:s,value:a,defaultValue:c,closeOnSelect:u=r==="desktop",timezone:f,referenceDate:p}=t,{current:m}=D.useRef(c),{current:y}=D.useRef(a!==void 0),[b,g]=D.useState(f);process.env.NODE_ENV!=="production"&&(D.useEffect(()=>{y!==(a!==void 0)&&console.error([`MUI X: A component is changing the ${y?"":"un"}controlled value of a picker to be ${y?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).","Decide between using a controlled or uncontrolled valuefor the lifetime of the component.","The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
241
|
-
`))},[a]),D.useEffect(()=>{!y&&m!==c&&console.error(["MUI X: A component is changing the defaultValue of an uncontrolled picker after being initialized. To suppress this warning opt to use a controlled value."].join(`
|
|
242
|
-
`))},[JSON.stringify(m)]));const x=nn(),w=ra(),{isOpen:E,setIsOpen:T}=dH(t),{timezone:C,value:k,handleValueChange:M}=jg({timezone:f,value:a,defaultValue:m,referenceDate:p,onChange:s,valueManager:e}),[A,I]=D.useState(()=>{let ee;return k!==void 0?ee=k:m!==void 0?ee=m:ee=e.emptyValue,{draft:ee,lastPublishedValue:ee,lastCommittedValue:ee,lastControlledValue:a,hasBeenModifiedSinceMount:!1}}),L=e.getTimezone(x,A.draft);b!==f&&(g(f),f&&L&&f!==L&&I(ee=>ie({},ee,{draft:e.setTimezone(x,f,ee.draft)})));const{getValidationErrorForNewValue:O}=Kw({props:t,validator:o,timezone:C,value:A.draft,onError:t.onError}),N=qe(ee=>{const se={action:ee,dateState:A,hasChanged:ke=>!e.areValuesEqual(x,ee.value,ke),isControlled:y,closeOnSelect:u},be=fH(se),ne=pH(se),le=hH(se);I(ke=>ie({},ke,{draft:ee.value,lastPublishedValue:be?ee.value:ke.lastPublishedValue,lastCommittedValue:ne?ee.value:ke.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let pe=null;const Oe=()=>(pe||(pe={validationError:ee.name==="setValueFromField"?ee.context.validationError:O(ee.value)},ee.name==="setValueFromShortcut"&&(pe.shortcut=ee.shortcut)),pe);be&&M(ee.value,Oe()),ne&&i&&i(ee.value,Oe()),le&&T(!1)});if(A.lastControlledValue!==a){const ee=e.areValuesEqual(x,A.draft,k);I(se=>ie({},se,{lastControlledValue:a},ee?{}:{lastCommittedValue:k,lastPublishedValue:k,draft:k,hasBeenModifiedSinceMount:!0}))}const $=qe(()=>{N({value:e.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),V=qe(()=>{N({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),z=qe(()=>{N({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),F=qe(()=>{N({value:A.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),B=qe(()=>{N({value:e.getTodayValue(x,C,n),name:"setValueFromAction",pickerAction:"today"})}),W=qe(ee=>{ee.preventDefault(),T(!0)}),Y=qe(ee=>{ee==null||ee.preventDefault(),T(!1)}),X=qe((ee,se="partial")=>N({name:"setValueFromView",value:ee,selectionState:se})),K=qe((ee,se,be)=>N({name:"setValueFromShortcut",value:ee,changeImportance:se,shortcut:be})),Q=qe((ee,se)=>N({name:"setValueFromField",value:ee,context:se})),ve={onClear:$,onAccept:V,onDismiss:z,onCancel:F,onSetToday:B,onOpen:W,onClose:Y},xe={value:A.draft,onChange:Q},ye=D.useMemo(()=>e.cleanValue(x,A.draft),[x,e,A.draft]),oe={value:ye,onChange:X,onClose:Y,open:E},fe=ie({},ve,{value:ye,onChange:X,onSelectShortcut:K,isValid:ee=>{const se=o({adapter:w,value:ee,timezone:C,props:t});return!e.hasError(se)}}),q=D.useMemo(()=>({onOpen:W,onClose:Y,open:E}),[E,Y,W]);return{open:E,fieldProps:xe,viewProps:oe,layoutProps:fe,actions:ve,contextValue:q}};let dy=!1;function GC({onChange:t,onViewChange:e,openTo:n,view:r,views:o,autoFocus:i,focusedView:s,onFocusedViewChange:a}){process.env.NODE_ENV!=="production"&&(dy||(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('", "')}"]\`.`),dy=!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('", "')}"]\`.`),dy=!0)));const c=D.useRef(n),u=D.useRef(o),f=D.useRef(o.includes(n)?n:o[0]),[p,m]=Go({name:"useViews",state:"view",controlled:r,default:f.current}),y=D.useRef(i?p:null),[b,g]=Go({name:"useViews",state:"focusedView",controlled:s,default:y.current});D.useEffect(()=>{(c.current&&c.current!==n||u.current&&u.current.some(A=>!o.includes(A)))&&(m(o.includes(n)?n:o[0]),u.current=o,c.current=n)},[n,m,p,o]);const x=o.indexOf(p),w=o[x-1]??null,E=o[x+1]??null,T=qe((A,I)=>{g(I?A:L=>A===L?null:L),a==null||a(A,I)}),C=qe(A=>{T(A,!0),A!==p&&(m(A),e&&e(A))}),k=qe(()=>{E&&C(E)}),M=qe((A,I,L)=>{const O=I==="finish",N=L?o.indexOf(L)<o.length-1:!!E;if(t(A,O&&N?"partial":I,L),L&&L!==p){const V=o[o.indexOf(L)+1];V&&C(V)}else O&&k()});return{view:p,setView:C,focusedView:b,setFocusedView:T,nextView:E,previousView:w,defaultView:o.includes(n)?n:o[0],goToNextView:k,setValueAndGoToNextView:M}}const gH=["className","sx"],yH=({props:t,propsFromPickerValue:e,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:s,open:a,onClose:c}=e,{view:u,views:f,openTo:p,onViewChange:m,viewRenderers:y,timezone:b}=t,g=mt(t,gH),{view:x,setView:w,defaultView:E,focusedView:T,setFocusedView:C,setValueAndGoToNextView:k}=GC({view:u,views:f,openTo:p,onChange:s,onViewChange:m,autoFocus:r}),{hasUIView:M,viewModeLookup:A}=D.useMemo(()=>f.reduce((z,F)=>{let B;return y[F]!=null?B="UI":B="field",z.viewModeLookup[F]=B,B==="UI"&&(z.hasUIView=!0),z},{hasUIView:!1,viewModeLookup:{}}),[y,f]),I=D.useMemo(()=>f.reduce((z,F)=>y[F]!=null&&a5(F)?z+1:z,0),[y,f]),L=A[x],O=qe(()=>L==="UI"),[N,$]=D.useState(L==="UI"?x:null);return N!==x&&A[x]==="UI"&&$(x),Rn(()=>{L==="field"&&a&&(c(),setTimeout(()=>{var z,F;(z=i==null?void 0:i.current)==null||z.setSelectedSections(x),(F=i==null?void 0:i.current)==null||F.focusField(x)}))},[x]),Rn(()=>{if(!a)return;let z=x;L==="field"&&N!=null&&(z=N),z!==E&&A[z]==="UI"&&A[E]==="UI"&&(z=E),z!==x&&w(z),C(z,!0)},[a]),{hasUIView:M,shouldRestoreFocus:O,layoutProps:{views:f,view:N,onViewChange:w},renderCurrentView:()=>{if(N==null)return null;const z=y[N];if(z==null)return null;const F=ie({},g,n,e,{views:f,timezone:b,onChange:k,view:N,onViewChange:w,focusedView:T,onFocusedViewChange:C,showViewSwitcher:I>1,timeViewsCount:I});return o?o(y,N,F):z(F)}}};function JC(){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 bH=(t,e)=>{const[n,r]=D.useState(JC);return Rn(()=>{const i=()=>{r(JC())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),H5(t,["hours","minutes","seconds"])?!1:(e||n)==="landscape"},vH=({props:t,propsFromPickerValue:e,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=t,i=bH(n.views,o),s=ki();return{layoutProps:ie({},n,e,{isLandscape:i,isRtl:s,wrapperVariant:r,disabled:t.disabled,readOnly:t.readOnly})}};function xH(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 XC=({props:t,valueManager:e,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:s,rendererInterceptor:a,fieldRef:c})=>{process.env.NODE_ENV!=="production"&&t.renderInput!=null&&YS(["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=mH({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:i}),f=yH({props:t,additionalViewProps:o,autoFocusView:s,fieldRef:c,propsFromPickerValue:u.viewProps,rendererInterceptor:a}),p=vH({props:t,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:f.layoutProps}),m=xH({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 ZC(t){return Qe("MuiPickersLayout",t)}const aa=Ge("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]);function SH(t){return Qe("MuiButton",t)}const la=Ge("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"]),QC=D.createContext({});process.env.NODE_ENV!=="production"&&(QC.displayName="ButtonGroupContext");const eT=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(eT.displayName="ButtonGroupButtonContext");const wH=t=>{const{color:e,disableElevation:n,fullWidth:r,size:o,variant:i,loading:s,loadingPosition:a,classes:c}=t,u={root:["root",s&&"loading",i,`${i}${$e(e)}`,`size${$e(o)}`,`${i}Size${$e(o)}`,`color${$e(e)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${$e(a)}`],startIcon:["icon","startIcon",`iconSize${$e(o)}`],endIcon:["icon","endIcon",`iconSize${$e(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},f=Ze(u,SH,c);return{...c,...f}},tT=[{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}}}],CH=re(cs,{shouldForwardProp:t=>oo(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${$e(n.color)}`],e[`size${$e(n.size)}`],e[`${n.variant}Size${$e(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,n.loading&&e.loading]}})(Tt(({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"},[`&.${la.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]},[`&.${la.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${la.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)",[`&.${la.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(Wn()).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)`:ft(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})`:ft(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})`:ft(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})`:ft(t.palette.text.primary,t.palette.action.hoverOpacity),"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:ft(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"},[`&.${la.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${la.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}),[`&.${la.loading}`]:{color:"transparent"}}}]}})),TH=re("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,n.loading&&e.startIconLoadingStart,e[`iconSize${$e(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...tT]})),kH=re("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,n.loading&&e.endIconLoadingEnd,e[`iconSize${$e(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...tT]})),EH=re("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}}]})),nT=re("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(t,e)=>e.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),go=D.forwardRef(function(e,n){const r=D.useContext(QC),o=D.useContext(eT),i=Xa(r,e),s=vt({props:i,name:"MuiButton"}),{children:a,color:c="primary",component:u="button",className:f,disabled:p=!1,disableElevation:m=!1,disableFocusRipple:y=!1,endIcon:b,focusVisibleClassName:g,fullWidth:x=!1,id:w,loading:E=null,loadingIndicator:T,loadingPosition:C="center",size:k="medium",startIcon:M,type:A,variant:I="text",...L}=s,O=No(w),N=T??v.jsx(Gg,{"aria-labelledby":O,color:"inherit",size:16}),$={...s,color:c,component:u,disabled:p,disableElevation:m,disableFocusRipple:y,fullWidth:x,loading:E,loadingIndicator:N,loadingPosition:C,size:k,type:A,variant:I},V=wH($),z=(M||E&&C==="start")&&v.jsx(TH,{className:V.startIcon,ownerState:$,children:M||v.jsx(nT,{className:V.loadingIconPlaceholder,ownerState:$})}),F=(b||E&&C==="end")&&v.jsx(kH,{className:V.endIcon,ownerState:$,children:b||v.jsx(nT,{className:V.loadingIconPlaceholder,ownerState:$})}),B=o||"",W=typeof E=="boolean"?v.jsx("span",{className:V.loadingWrapper,style:{display:"contents"},children:E&&v.jsx(EH,{className:V.loadingIndicator,ownerState:$,children:N})}):null;return v.jsxs(CH,{ownerState:$,className:me(r.className,V.root,f,B),component:u,disabled:p||E,focusRipple:!y,focusVisibleClassName:me(V.focusVisible,g),ref:n,type:A,id:E?O:w,...L,classes:V,children:[z,C!=="end"&&W,a,C==="end"&&W,F]})});process.env.NODE_ENV!=="production"&&(go.propTypes={children:l.node,classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["inherit","primary","secondary","success","error","info","warning"]),l.string]),component:l.elementType,disabled:l.bool,disableElevation:l.bool,disableFocusRipple:l.bool,disableRipple:l.bool,endIcon:l.node,focusVisibleClassName:l.string,fullWidth:l.bool,href:l.string,id:l.string,loading:l.bool,loadingIndicator:l.node,loadingPosition:l.oneOf(["center","end","start"]),size:l.oneOfType([l.oneOf(["small","medium","large"]),l.string]),startIcon:l.node,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),type:l.oneOfType([l.oneOf(["button","reset","submit"]),l.string]),variant:l.oneOfType([l.oneOf(["contained","outlined","text"]),l.string])});function _H(t){return Qe("MuiDialogActions",t)}Ge("MuiDialogActions",["root","spacing"]);const OH=t=>{const{classes:e,disableSpacing:n}=t;return Ze({root:["root",!n&&"spacing"]},_H,e)},MH=re("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}}}]}),Ff=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...s}=r,a={...r,disableSpacing:i},c=OH(a);return v.jsx(MH,{className:me(c.root,o),ownerState:a,ref:n,...s})});process.env.NODE_ENV!=="production"&&(Ff.propTypes={children:l.node,classes:l.object,className:l.string,disableSpacing:l.bool,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])});const AH=["onAccept","onClear","onCancel","onSetToday","actions"];function rT(t){const{onAccept:e,onClear:n,onCancel:r,onSetToday:o,actions:i}=t,s=mt(t,AH),a=Ei();if(i==null||i.length===0)return null;const c=i==null?void 0:i.map(u=>{switch(u){case"clear":return v.jsx(go,{onClick:n,children:a.clearButtonLabel},u);case"cancel":return v.jsx(go,{onClick:r,children:a.cancelButtonLabel},u);case"accept":return v.jsx(go,{onClick:e,children:a.okButtonLabel},u);case"today":return v.jsx(go,{onClick:o,children:a.todayButtonLabel},u);default:return null}});return v.jsx(Ff,ie({},s,{children:c}))}process.env.NODE_ENV!=="production"&&(rT.propTypes={actions:l.arrayOf(l.oneOf(["accept","cancel","clear","today"]).isRequired),disableSpacing:l.bool,onAccept:l.func.isRequired,onCancel:l.func.isRequired,onClear:l.func.isRequired,onSetToday:l.func.isRequired,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])});function DH(t){return Qe("MuiListItem",t)}Ge("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const IH=Ge("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function PH(t){return Qe("MuiListItemSecondaryAction",t)}Ge("MuiListItemSecondaryAction",["root","disableGutters"]);const NH=t=>{const{disableGutters:e,classes:n}=t;return Ze({root:["root",e&&"disableGutters"]},PH,n)},$H=re("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}}]}),fy=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,s=D.useContext(ls),a={...r,disableGutters:s.disableGutters},c=NH(a);return v.jsx($H,{className:me(c.root,o),ownerState:a,ref:n,...i})});process.env.NODE_ENV!=="production"&&(fy.propTypes={children:l.node,classes:l.object,className:l.string,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])}),fy.muiName="ListItemSecondaryAction";const LH=(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]},FH=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"]},DH,n)},RH=re("div",{name:"MuiListItem",slot:"Root",overridesResolver:LH})(Tt(({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:{[`& > .${IH.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}}]}))),BH=re("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),oT=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiListItem"}),{alignItems:o="center",children:i,className:s,component:a,components:c={},componentsProps:u={},ContainerComponent:f="li",ContainerProps:{className:p,...m}={},dense:y=!1,disableGutters:b=!1,disablePadding:g=!1,divider:x=!1,secondaryAction:w,slotProps:E={},slots:T={},...C}=r,k=D.useContext(ls),M=D.useMemo(()=>({dense:y||k.dense||!1,alignItems:o,disableGutters:b}),[o,k.dense,y,b]),A=D.useRef(null),I=D.Children.toArray(i),L=I.length&&Ga(I[I.length-1],["ListItemSecondaryAction"]),O={...r,alignItems:o,dense:M.dense,disableGutters:b,disablePadding:g,divider:x,hasSecondaryAction:L},N=FH(O),$=At(A,n),V=T.root||c.Root||RH,z=E.root||u.root||{},F={className:me(N.root,z.className,s),...C};let B=a||"li";return L?(B=!F.component&&!a?"div":B,f==="li"&&(B==="li"?B="div":F.component==="li"&&(F.component="div")),v.jsx(ls.Provider,{value:M,children:v.jsxs(BH,{as:f,className:me(N.container,p),ref:$,ownerState:O,...m,children:[v.jsx(V,{...z,...!kc(V)&&{as:B,ownerState:{...O,...z.ownerState}},...F,children:I}),I.pop()]})})):v.jsx(ls.Provider,{value:M,children:v.jsxs(V,{...z,as:B,ref:$,...!kc(V)&&{ownerState:{...O,...z.ownerState}},...F,children:[I,w&&v.jsx(fy,{children:w})]})})});process.env.NODE_ENV!=="production"&&(oT.propTypes={alignItems:l.oneOf(["center","flex-start"]),children:yi(l.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(Ga(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:l.object,className:l.string,component:l.elementType,components:l.shape({Root:l.elementType}),componentsProps:l.shape({root:l.object}),ContainerComponent:Ya,ContainerProps:l.object,dense:l.bool,disableGutters:l.bool,disablePadding:l.bool,divider:l.bool,secondaryAction:l.node,slotProps:l.shape({root:l.object}),slots:l.shape({root:l.elementType}),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])});const VH=Be(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 zH(t){return Qe("MuiChip",t)}const kt=Ge("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"]),HH=t=>{const{classes:e,disabled:n,size:r,color:o,iconColor:i,onDelete:s,clickable:a,variant:c}=t,u={root:["root",c,n&&"disabled",`size${$e(r)}`,`color${$e(o)}`,a&&"clickable",a&&`clickableColor${$e(o)}`,s&&"deletable",s&&`deletableColor${$e(o)}`,`${c}${$e(o)}`],label:["label",`label${$e(r)}`],avatar:["avatar",`avatar${$e(r)}`,`avatarColor${$e(o)}`],icon:["icon",`icon${$e(r)}`,`iconColor${$e(i)}`],deleteIcon:["deleteIcon",`deleteIcon${$e(r)}`,`deleteIconColor${$e(o)}`,`deleteIcon${$e(c)}Color${$e(o)}`]};return Ze(u,zH,e)},WH=re("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{color:r,iconColor:o,clickable:i,onDelete:s,size:a,variant:c}=n;return[{[`& .${kt.avatar}`]:e.avatar},{[`& .${kt.avatar}`]:e[`avatar${$e(a)}`]},{[`& .${kt.avatar}`]:e[`avatarColor${$e(r)}`]},{[`& .${kt.icon}`]:e.icon},{[`& .${kt.icon}`]:e[`icon${$e(a)}`]},{[`& .${kt.icon}`]:e[`iconColor${$e(o)}`]},{[`& .${kt.deleteIcon}`]:e.deleteIcon},{[`& .${kt.deleteIcon}`]:e[`deleteIcon${$e(a)}`]},{[`& .${kt.deleteIcon}`]:e[`deleteIconColor${$e(r)}`]},{[`& .${kt.deleteIcon}`]:e[`deleteIcon${$e(c)}Color${$e(r)}`]},e.root,e[`size${$e(a)}`],e[`color${$e(r)}`],i&&e.clickable,i&&r!=="default"&&e[`clickableColor${$e(r)})`],s&&e.deletable,s&&r!=="default"&&e[`deletableColor${$e(r)}`],e[c],e[`${c}${$e(r)}`]]}})(Tt(({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",[`&.${kt.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${kt.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:e,fontSize:t.typography.pxToRem(12)},[`& .${kt.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${kt.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${kt.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${kt.icon}`]:{marginLeft:5,marginRight:-6},[`& .${kt.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:ft(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)`:ft(t.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${kt.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${kt.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(t.palette).filter(Wn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(t.vars||t).palette[n].main,color:(t.vars||t).palette[n].contrastText,[`& .${kt.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n].contrastTextChannel} / 0.7)`:ft(t.palette[n].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${kt.icon}`]:{color:t.vars?t.vars.palette.Chip.defaultIconColor:e}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${kt.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${kt.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:ft(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}},...Object.entries(t.palette).filter(Wn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${kt.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}))`:ft(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${kt.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:ft(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}}},...Object.entries(t.palette).filter(Wn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${kt.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]}`,[`&.${kt.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${kt.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${kt.avatar}`]:{marginLeft:4},[`& .${kt.avatarSmall}`]:{marginLeft:2},[`& .${kt.icon}`]:{marginLeft:4},[`& .${kt.iconSmall}`]:{marginLeft:2},[`& .${kt.deleteIcon}`]:{marginRight:5},[`& .${kt.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(t.palette).filter(Wn()).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)`:ft(t.palette[n].main,.7)}`,[`&.${kt.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:ft(t.palette[n].main,t.palette.action.hoverOpacity)},[`&.${kt.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.focusOpacity})`:ft(t.palette[n].main,t.palette.action.focusOpacity)},[`& .${kt.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.7)`:ft(t.palette[n].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].main}}}}))]}})),jH=re("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:r}=n;return[e.label,e[`label${$e(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function iT(t){return t.key==="Backspace"||t.key==="Delete"}const sT=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiChip"}),{avatar:o,className:i,clickable:s,color:a="default",component:c,deleteIcon:u,disabled:f=!1,icon:p,label:m,onClick:y,onDelete:b,onKeyDown:g,onKeyUp:x,size:w="medium",variant:E="filled",tabIndex:T,skipFocusWhenDisabled:C=!1,...k}=r,M=D.useRef(null),A=At(M,n),I=X=>{X.stopPropagation(),b&&b(X)},L=X=>{X.currentTarget===X.target&&iT(X)&&X.preventDefault(),g&&g(X)},O=X=>{X.currentTarget===X.target&&b&&iT(X)&&b(X),x&&x(X)},N=s!==!1&&y?!0:s,$=N||b?cs:c||"div",V={...r,component:$,disabled:f,size:w,color:a,iconColor:D.isValidElement(p)&&p.props.color||a,onDelete:!!b,clickable:N,variant:E},z=HH(V),F=$===cs?{component:c||"div",focusVisibleClassName:z.focusVisible,...b&&{disableRipple:!0}}:{};let B=null;b&&(B=u&&D.isValidElement(u)?D.cloneElement(u,{className:me(u.props.className,z.deleteIcon),onClick:I}):v.jsx(VH,{className:me(z.deleteIcon),onClick:I}));let W=null;o&&D.isValidElement(o)&&(W=D.cloneElement(o,{className:me(z.avatar,o.props.className)}));let Y=null;return p&&D.isValidElement(p)&&(Y=D.cloneElement(p,{className:me(z.icon,p.props.className)})),process.env.NODE_ENV!=="production"&&W&&Y&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."),v.jsxs(WH,{as:$,className:me(z.root,i),disabled:N&&f?!0:void 0,onClick:y,onKeyDown:L,onKeyUp:O,ref:A,tabIndex:C&&f?-1:T,ownerState:V,...F,...k,children:[W||Y,v.jsx(jH,{className:me(z.label),ownerState:V,children:m}),B]})});process.env.NODE_ENV!=="production"&&(sT.propTypes={avatar:l.element,children:$P,classes:l.object,className:l.string,clickable:l.bool,color:l.oneOfType([l.oneOf(["default","primary","secondary","error","info","success","warning"]),l.string]),component:l.elementType,deleteIcon:l.element,disabled:l.bool,icon:l.element,label:l.node,onClick:l.func,onDelete:l.func,onKeyDown:l.func,onKeyUp:l.func,size:l.oneOfType([l.oneOf(["medium","small"]),l.string]),skipFocusWhenDisabled:l.bool,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),tabIndex:l.number,variant:l.oneOfType([l.oneOf(["filled","outlined"]),l.string])});const eu=36,Rf=2,Bf=320,UH=280,py=336,qH=["items","changeImportance","isLandscape","onChange","isValid"],KH=["getValue"];function aT(t){const{items:e,changeImportance:n="accept",onChange:r,isValid:o}=t,i=mt(t,qH);if(e==null||e.length===0)return null;const s=e.map(a=>{let{getValue:c}=a,u=mt(a,KH);const f=c({isValid:o});return ie({},u,{label:u.label,onClick:()=>{r(f,n,u)},disabled:!o(f)})});return v.jsx(Cg,ie({dense:!0,sx:[{maxHeight:py,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:s.map(a=>v.jsx(oT,{children:v.jsx(sT,ie({},a))},a.id??a.label))}))}process.env.NODE_ENV!=="production"&&(aT.propTypes={changeImportance:l.oneOf(["accept","set"]),className:l.string,component:l.elementType,dense:l.bool,disablePadding:l.bool,isLandscape:l.bool.isRequired,isValid:l.func.isRequired,items:l.arrayOf(l.shape({getValue:l.func.isRequired,id:l.string,label:l.string.isRequired})),onChange:l.func.isRequired,style:l.object,subheader:l.node,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])});function YH(t){return t.view!==null}const GH=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"]},ZC,e)},JH=t=>{const{wrapperVariant:e,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:s,views:a,onViewChange:c,value:u,onChange:f,onSelectShortcut:p,isValid:m,isLandscape:y,disabled:b,readOnly:g,children:x,slots:w,slotProps:E}=t,T=GH(t),C=(w==null?void 0:w.actionBar)??rT,k=$t({elementType:C,externalSlotProps:E==null?void 0:E.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(C,ie({},k)),A=w==null?void 0:w.toolbar,I=$t({elementType:A,externalSlotProps:E==null?void 0:E.toolbar,additionalProps:{isLandscape:y,onChange:f,value:u,view:s,onViewChange:c,views:a,disabled:b,readOnly:g},className:T.toolbar,ownerState:ie({},t,{wrapperVariant:e})}),L=YH(I)&&A?v.jsx(A,ie({},I)):null,O=x,N=w==null?void 0:w.tabs,$=s&&N?v.jsx(N,ie({view:s,onViewChange:c,className:T.tabs},E==null?void 0:E.tabs)):null,V=(w==null?void 0:w.shortcuts)??aT,z=$t({elementType:V,externalSlotProps:E==null?void 0:E.shortcuts,additionalProps:{isValid:m,isLandscape:y,onChange:p},className:T.shortcuts,ownerState:{isValid:m,isLandscape:y,onChange:p,wrapperVariant:e}}),F=s&&V?v.jsx(V,ie({},z)):null;return{toolbar:L,content:O,tabs:$,actionBar:M,shortcuts:F}},XH=t=>{const{isLandscape:e,classes:n}=t;return Ze({root:["root",e&&"landscape"],contentWrapper:["contentWrapper"]},ZC,n)},ZH=re("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${aa.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${aa.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${aa.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${aa.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${aa.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${aa.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${aa.shortcuts}`]:{gridColumn:3}}}]}),QH=re("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(t,e)=>e.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),hy=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:s,actionBar:a,shortcuts:c}=JH(r),{sx:u,className:f,isLandscape:p,wrapperVariant:m}=r,y=XH(r);return v.jsxs(ZH,{ref:n,sx:u,className:me(y.root,f),ownerState:r,children:[p?c:o,p?o:c,v.jsx(QH,{className:y.contentWrapper,children:m==="desktop"?v.jsxs(D.Fragment,{children:[i,s]}):v.jsxs(D.Fragment,{children:[s,i]})}),a]})});process.env.NODE_ENV!=="production"&&(hy.propTypes={children:l.node,classes:l.object,className:l.string,disabled:l.bool,isLandscape:l.bool.isRequired,isRtl:l.bool.isRequired,isValid:l.func.isRequired,onAccept:l.func.isRequired,onCancel:l.func.isRequired,onChange:l.func.isRequired,onClear:l.func.isRequired,onClose:l.func.isRequired,onDismiss:l.func.isRequired,onOpen:l.func.isRequired,onSelectShortcut:l.func.isRequired,onSetToday:l.func.isRequired,onViewChange:l.func.isRequired,orientation:l.oneOf(["landscape","portrait"]),readOnly:l.bool,slotProps:l.object,slots:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),value:l.any,view:l.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),views:l.arrayOf(l.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]).isRequired).isRequired,wrapperVariant:l.oneOf(["desktop","mobile"])});const eW=["props","getOpenDialogAriaText"],tW=["ownerState"],nW=["ownerState"],rW=t=>{var Oe;let{props:e,getOpenDialogAriaText:n}=t,r=mt(t,eW);const{slots:o,slotProps:i,className:s,sx:a,format:c,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:m,timezone:y,name:b,label:g,inputRef:x,readOnly:w,disabled:E,autoFocus:T,localeText:C,reduceAnimations:k}=e,M=D.useRef(null),A=D.useRef(null),I=No(),L=((Oe=i==null?void 0:i.toolbar)==null?void 0:Oe.hidden)??!1,{open:O,actions:N,hasUIView:$,layoutProps:V,renderCurrentView:z,shouldRestoreFocus:F,fieldProps:B,contextValue:W,ownerState:Y}=XC(ie({},r,{props:e,fieldRef:A,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),X=o.inputAdornment??Jg,K=$t({elementType:X,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:e}),Q=mt(K,tW),ve=o.openPickerButton??gl,xe=$t({elementType:ve,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:E||w,onClick:O?N.onClose:N.onOpen,"aria-label":n(B.value),edge:Q.position},ownerState:e}),ye=mt(xe,nW),oe=o.openPickerIcon,ce=$t({elementType:oe,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:Y}),fe=o.field,q=$t({elementType:fe,externalSlotProps:i==null?void 0:i.field,additionalProps:ie({},B,L&&{id:I},{readOnly:w,disabled:E,className:s,sx:a,format:c,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:m,timezone:y,label:g,name:b,autoFocus:T&&!e.open,focused:O?!0:void 0},x?{inputRef:x}:{}),ownerState:e});$&&(q.InputProps=ie({},q.InputProps,{ref:M},!e.disableOpenPicker&&{[`${Q.position}Adornment`]:v.jsx(X,ie({},Q,{children:v.jsx(ve,ie({},ye,{children:v.jsx(oe,ie({},ce))}))}))}));const ee=ie({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},q.slots),se=o.layout??hy;let be=I;L&&(g?be=`${I}-label`:be=void 0);const ne=ie({},i,{toolbar:ie({},i==null?void 0:i.toolbar,{titleId:I}),popper:ie({"aria-labelledby":be},i==null?void 0:i.popper)}),le=At(A,q.unstableFieldRef);return{renderPicker:()=>v.jsxs(tC,{contextValue:W,localeText:C,children:[v.jsx(fe,ie({},q,{slots:ee,slotProps:ne,unstableFieldRef:le})),v.jsx(uH,ie({role:"dialog",placement:"bottom-start",anchorEl:M.current},N,{open:O,slots:o,slotProps:ne,shouldRestoreFocus:F,reduceAnimations:k,children:v.jsx(se,ie({},V,ne==null?void 0:ne.layout,{slots:o,slotProps:ne,children:z()}))}))]})}},lT=({shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s,timezone:a})=>{const c=ra();return D.useCallback(u=>Vc({adapter:c,value:u,timezone:a,props:{shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s}})!==null,[c,t,e,n,r,o,i,s,a])},oW=(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")}},iW=t=>{const{value:e,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:s,minDate:a,onMonthChange:c,reduceAnimations:u,shouldDisableDate:f,timezone:p}=t,m=nn(),y=D.useRef(oW(!!u,i,m)).current,b=D.useMemo(()=>Qo.getInitialReferenceValue({value:e,utils:m,timezone:p,props:t,referenceDate:n,granularity:Zo.day}),[n,p]),[g,x]=D.useReducer(y,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:m.startOfMonth(b),slideDirection:"left"});D.useEffect(()=>{x({type:"changeMonthTimezone",newTimezone:m.getTimezone(b)})},[b,m]);const w=D.useCallback(M=>{x(ie({type:"changeMonth"},M)),c&&c(M.newMonth)},[c]),E=D.useCallback(M=>{const A=M;m.isSameMonth(A,g.currentMonth)||w({newMonth:m.startOfMonth(A),direction:m.isAfterDay(A,g.currentMonth)?"left":"right"})},[g.currentMonth,w,m]),T=lT({shouldDisableDate:f,minDate:a,maxDate:s,disableFuture:r,disablePast:o,timezone:p}),C=D.useCallback(()=>{x({type:"finishMonthSwitchingAnimation"})},[]),k=qe((M,A)=>{T(M)||x({type:"changeFocusedDay",focusedDay:M,withoutMonthSwitchingAnimation:A})});return{referenceDate:b,calendarState:g,changeMonth:E,changeFocusedDay:k,isDateDisabled:T,onMonthSwitchingAnimationEnd:C,handleChangeMonth:w}},sW=t=>Qe("MuiPickersFadeTransitionGroup",t);Ge("MuiPickersFadeTransitionGroup",["root"]);const aW=t=>{const{classes:e}=t;return Ze({root:["root"]},sW,e)},lW=re(Dc,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"block",position:"relative"});function cT(t){const e=ut({props:t,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=aW(e),a=ro();return o?n:v.jsx(lW,{className:me(s.root,r),children:v.jsx(Xo,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:a.transitions.duration.enteringScreen,enter:a.transitions.duration.enteringScreen,exit:0},children:n},i)})}function cW(t){return Qe("MuiPickersDay",t)}const ca=Ge("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),uW=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],dW=t=>{const{selected:e,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:s,showDaysOutsideCurrentMonth:a,classes:c}=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"]},cW,c)},uT=({theme:t})=>ie({},t.typography.caption,{width:eu,height:eu,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})`:ft(t.palette.primary.main,t.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:ft(t.palette.primary.main,t.palette.action.focusOpacity),[`&.${ca.selected}`]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${ca.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}},[`&.${ca.disabled}:not(.${ca.selected})`]:{color:(t.vars||t).palette.text.disabled},[`&.${ca.disabled}&.${ca.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Rf}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(t.vars||t).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${ca.selected})`]:{border:`1px solid ${(t.vars||t).palette.text.secondary}`}}}]}),dT=(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]},fW=re(cs,{name:"MuiPickersDay",slot:"Root",overridesResolver:dT})(uT),pW=re("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:dT})(({theme:t})=>ie({},uT({theme:t}),{opacity:0,pointerEvents:"none"})),tu=()=>{},fT=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:s,disabled:a=!1,disableHighlightToday:c=!1,disableMargin:u=!1,isAnimating:f,onClick:p,onDaySelect:m,onFocus:y=tu,onBlur:b=tu,onKeyDown:g=tu,onMouseDown:x=tu,onMouseEnter:w=tu,outsideCurrentMonth:E,selected:T=!1,showDaysOutsideCurrentMonth:C=!1,children:k,today:M=!1}=r,A=mt(r,uW),I=ie({},r,{autoFocus:o,disabled:a,disableHighlightToday:c,disableMargin:u,selected:T,showDaysOutsideCurrentMonth:C,today:M}),L=dW(I),O=nn(),N=D.useRef(null),$=At(N,n);Rn(()=>{o&&!a&&!f&&!E&&N.current.focus()},[o,a,f,E]);const V=F=>{x(F),E&&F.preventDefault()},z=F=>{a||m(s),E&&F.currentTarget.focus(),p&&p(F)};return E&&!C?v.jsx(pW,{className:me(L.root,L.hiddenDaySpacingFiller,i),ownerState:I,role:A.role}):v.jsx(fW,ie({className:me(L.root,i),ref:$,centerRipple:!0,disabled:a,tabIndex:T?0:-1,onKeyDown:F=>g(F,s),onFocus:F=>y(F,s),onBlur:F=>b(F,s),onMouseEnter:F=>w(F,s),onClick:z,onMouseDown:V},A,{ownerState:I,children:k||O.format(s,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(fT.propTypes={action:l.oneOfType([l.func,l.shape({current:l.shape({focusVisible:l.func.isRequired})})]),centerRipple:l.bool,classes:l.object,className:l.string,component:l.elementType,day:l.object.isRequired,disabled:l.bool,disableHighlightToday:l.bool,disableMargin:l.bool,disableRipple:l.bool,disableTouchRipple:l.bool,focusRipple:l.bool,focusVisibleClassName:l.string,isAnimating:l.bool,isFirstVisibleCell:l.bool.isRequired,isLastVisibleCell:l.bool.isRequired,onBlur:l.func,onDaySelect:l.func.isRequired,onFocus:l.func,onFocusVisible:l.func,onKeyDown:l.func,onMouseEnter:l.func,outsideCurrentMonth:l.bool.isRequired,selected:l.bool,showDaysOutsideCurrentMonth:l.bool,style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),tabIndex:l.number,today:l.bool,TouchRippleProps:l.object,touchRippleRef:l.oneOfType([l.func,l.shape({current:l.shape({pulsate:l.func.isRequired,start:l.func.isRequired,stop:l.func.isRequired})})])});const hW=D.memo(fT),mW=t=>Qe("MuiPickersSlideTransition",t),yo=Ge("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),gW=["children","className","reduceAnimations","slideDirection","transKey","classes"],yW=t=>{const{classes:e,slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Ze(r,mW,e)},bW=re(Dc,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`.${yo["slideEnter-left"]}`]:e["slideEnter-left"]},{[`.${yo["slideEnter-right"]}`]:e["slideEnter-right"]},{[`.${yo.slideEnterActive}`]:e.slideEnterActive},{[`.${yo.slideExit}`]:e.slideExit},{[`.${yo["slideExitActiveLeft-left"]}`]:e["slideExitActiveLeft-left"]},{[`.${yo["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},[`& .${yo["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${yo["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${yo.slideEnterActive}`]:{transform:"translate(0%)",transition:e},[`& .${yo.slideExit}`]:{transform:"translate(0%)"},[`& .${yo["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:e,zIndex:0},[`& .${yo["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:e,zIndex:0}}});function vW(t){const e=ut({props:t,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=mt(e,gW),a=yW(e),c=ro();if(o)return v.jsx("div",{className:me(a.root,r),children:n});const u={exit:a.exit,enterActive:a.enterActive,enter:a.enter,exitActive:a.exitActive};return v.jsx(bW,{className:me(a.root,r),childFactory:f=>D.cloneElement(f,{classNames:u}),role:"presentation",children:v.jsx(Mg,ie({mountOnEnter:!0,unmountOnExit:!0,timeout:c.transitions.duration.complex,classNames:u},s,{children:n}),i)})}const xW=t=>Qe("MuiDayCalendar",t);Ge("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const SW=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],wW=["ownerState"],CW=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"]},xW,e)},pT=(eu+Rf*2)*6,TW=re("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),kW=re("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(t,e)=>e.header})({display:"flex",justifyContent:"center",alignItems:"center"}),EW=re(co,{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})),_W=re(co,{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})),OW=re(co,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(t,e)=>e.weekNumber})(({theme:t})=>ie({},t.typography.caption,{width:eu,height:eu,padding:0,margin:`0 ${Rf}px`,color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),MW=re("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(t,e)=>e.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:pT}),AW=re(vW,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(t,e)=>e.slideTransition})({minHeight:pT}),DW=re("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(t,e)=>e.monthContainer})({overflow:"hidden"}),IW=re("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(t,e)=>e.weekContainer})({margin:`${Rf}px 0`,display:"flex",justifyContent:"center"});function PW(t){let{parentProps:e,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:s,isViewFocused:a}=t,c=mt(t,SW);const{disabled:u,disableHighlightToday:f,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:m,slots:y,slotProps:b,timezone:g}=e,x=nn(),w=pf(g),E=r!==null&&x.isSameDay(n,r),T=o.some($=>x.isSameDay($,n)),C=x.isSameDay(n,w),k=(y==null?void 0:y.day)??hW,M=$t({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()},c),ownerState:ie({},e,{day:n,selected:T})}),A=mt(M,wW),I=D.useMemo(()=>u||i(n),[u,i,n]),L=D.useMemo(()=>x.getMonth(n)!==s,[x,n,s]),O=D.useMemo(()=>{const $=x.startOfMonth(x.setMonth(n,s));return m?x.isSameDay(n,x.startOfWeek($)):x.isSameDay(n,$)},[s,n,m,x]),N=D.useMemo(()=>{const $=x.endOfMonth(x.setMonth(n,s));return m?x.isSameDay(n,x.endOfWeek($)):x.isSameDay(n,$)},[s,n,m,x]);return v.jsx(k,ie({},A,{day:n,disabled:I,autoFocus:a&&E,today:C,outsideCurrentMonth:L,isFirstVisibleCell:O,isLastVisibleCell:N,selected:T,tabIndex:E?0:-1,"aria-selected":T,"aria-current":C?"date":void 0}))}function NW(t){const e=ut({props:t,name:"MuiDayCalendar"}),n=nn(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:s,focusedDay:a,loading:c,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:f,readOnly:p,reduceAnimations:m,renderLoading:y=()=>v.jsx("span",{children:"..."}),slideDirection:b,TransitionProps:g,disablePast:x,disableFuture:w,minDate:E,maxDate:T,shouldDisableDate:C,shouldDisableMonth:k,shouldDisableYear:M,dayOfWeekFormatter:A=ke=>n.format(ke,"weekdayShort").charAt(0).toUpperCase(),hasFocus:I,onFocusedViewChange:L,gridLabelId:O,displayWeekNumber:N,fixedWeekNumber:$,autoFocus:V,timezone:z}=e,F=pf(z),B=CW(e),W=ki(),Y=lT({shouldDisableDate:C,shouldDisableMonth:k,shouldDisableYear:M,minDate:E,maxDate:T,disablePast:x,disableFuture:w,timezone:z}),X=Ei(),[K,Q]=Go({name:"DayCalendar",state:"hasFocus",controlled:I,default:V??!1}),[ve,xe]=D.useState(()=>a||F),ye=qe(ke=>{p||u(ke)}),oe=ke=>{Y(ke)||(r(ke),xe(ke),L==null||L(!0),Q(!0))},ce=qe((ke,Fe)=>{switch(ke.key){case"ArrowUp":oe(n.addDays(Fe,-7)),ke.preventDefault();break;case"ArrowDown":oe(n.addDays(Fe,7)),ke.preventDefault();break;case"ArrowLeft":{const Ie=n.addDays(Fe,W?1:-1),Ke=n.addMonths(Fe,W?1:-1),Xe=Rc({utils:n,date:Ie,minDate:W?Ie:n.startOfMonth(Ke),maxDate:W?n.endOfMonth(Ke):Ie,isDateDisabled:Y,timezone:z});oe(Xe||Ie),ke.preventDefault();break}case"ArrowRight":{const Ie=n.addDays(Fe,W?-1:1),Ke=n.addMonths(Fe,W?-1:1),Xe=Rc({utils:n,date:Ie,minDate:W?n.startOfMonth(Ke):Ie,maxDate:W?Ie:n.endOfMonth(Ke),isDateDisabled:Y,timezone:z});oe(Xe||Ie),ke.preventDefault();break}case"Home":oe(n.startOfWeek(Fe)),ke.preventDefault();break;case"End":oe(n.endOfWeek(Fe)),ke.preventDefault();break;case"PageUp":oe(n.addMonths(Fe,1)),ke.preventDefault();break;case"PageDown":oe(n.addMonths(Fe,-1)),ke.preventDefault();break}}),fe=qe((ke,Fe)=>oe(Fe)),q=qe((ke,Fe)=>{K&&n.isSameDay(ve,Fe)&&(L==null||L(!1))}),ee=n.getMonth(i),se=n.getYear(i),be=D.useMemo(()=>s.filter(ke=>!!ke).map(ke=>n.startOfDay(ke)),[n,s]),ne=`${se}-${ee}`,le=D.useMemo(()=>D.createRef(),[ne]),pe=D.useMemo(()=>{const ke=n.startOfMonth(i),Fe=n.endOfMonth(i);return Y(ve)||n.isAfterDay(ve,Fe)||n.isBeforeDay(ve,ke)?Rc({utils:n,date:ve,minDate:ke,maxDate:Fe,disablePast:x,disableFuture:w,isDateDisabled:Y,timezone:z}):ve},[i,w,x,ve,Y,n,z]),Oe=D.useMemo(()=>{const ke=n.getWeekArray(i);let Fe=n.addMonths(i,1);for(;$&&ke.length<$;){const Ie=n.getWeekArray(Fe),Ke=n.isSameDay(ke[ke.length-1][0],Ie[0][0]);Ie.slice(Ke?1:0).forEach(Xe=>{ke.length<$&&ke.push(Xe)}),Fe=n.addMonths(Fe,1)}return ke},[i,$,n]);return v.jsxs(TW,{role:"grid","aria-labelledby":O,className:B.root,children:[v.jsxs(kW,{role:"row",className:B.header,children:[N&&v.jsx(_W,{variant:"caption",role:"columnheader","aria-label":X.calendarWeekNumberHeaderLabel,className:B.weekNumberLabel,children:X.calendarWeekNumberHeaderText}),i5(n,F).map((ke,Fe)=>v.jsx(EW,{variant:"caption",role:"columnheader","aria-label":n.format(ke,"weekday"),className:B.weekDayLabel,children:A(ke)},Fe.toString()))]}),c?v.jsx(MW,{className:B.loadingContainer,children:y()}):v.jsx(AW,ie({transKey:ne,onExited:f,reduceAnimations:m,slideDirection:b,className:me(o,B.slideTransition)},g,{nodeRef:le,children:v.jsx(DW,{ref:le,role:"rowgroup",className:B.monthContainer,children:Oe.map((ke,Fe)=>v.jsxs(IW,{role:"row",className:B.weekContainer,"aria-rowindex":Fe+1,children:[N&&v.jsx(OW,{className:B.weekNumber,role:"rowheader","aria-label":X.calendarWeekNumberAriaLabelText(n.getWeekNumber(ke[0])),children:X.calendarWeekNumberText(n.getWeekNumber(ke[0]))}),ke.map((Ie,Ke)=>v.jsx(PW,{parentProps:e,day:Ie,selectedDays:be,focusableDay:pe,onKeyDown:ce,onFocus:fe,onBlur:q,onDaySelect:ye,isDateDisabled:Y,currentMonthNumber:ee,isViewFocused:K,"aria-colindex":Ke+1},Ie.toString()))]},`week-${ke[0]}`))})}))]})}function $W(t){return Qe("MuiPickersMonth",t)}const Vf=Ge("MuiPickersMonth",["root","monthButton","disabled","selected"]),LW=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],FW=t=>{const{disabled:e,selected:n,classes:r}=t;return Ze({root:["root"],monthButton:["monthButton",e&&"disabled",n&&"selected"]},$W,r)},RW=re("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%"}}]}),BW=re("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(t,e)=>[e.monthButton,{[`&.${Vf.disabled}`]:e.disabled},{[`&.${Vf.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})`:ft(t.palette.action.active,t.palette.action.hoverOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:ft(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Vf.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${Vf.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),VW=D.memo(function(e){const n=ut({props:e,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:c,tabIndex:u,onClick:f,onKeyDown:p,onFocus:m,onBlur:y,"aria-current":b,"aria-label":g,slots:x,slotProps:w}=n,E=mt(n,LW),T=D.useRef(null),C=FW(n);Rn(()=>{var A;r&&((A=T.current)==null||A.focus())},[r]);const k=(x==null?void 0:x.monthButton)??BW,M=$t({elementType:k,externalSlotProps:w==null?void 0:w.monthButton,additionalProps:{children:i,disabled:s,tabIndex:u,ref:T,type:"button",role:"radio","aria-current":b,"aria-checked":a,"aria-label":g,onClick:A=>f(A,c),onKeyDown:A=>p(A,c),onFocus:A=>m(A,c),onBlur:A=>y(A,c)},ownerState:n,className:C.monthButton});return v.jsx(RW,ie({className:me(C.root,o),ownerState:n},E,{children:v.jsx(k,ie({},M))}))});function zW(t){return Qe("MuiMonthCalendar",t)}Ge("MuiMonthCalendar",["root"]);const HW=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],WW=t=>{const{classes:e}=t;return Ze({root:["root"]},zW,e)};function jW(t,e){const n=nn(),r=zc(),o=ut({props:t,name:e});return ie({disableFuture:!1,disablePast:!1},o,{minDate:ao(n,o.minDate,r.minDate),maxDate:ao(n,o.maxDate,r.maxDate)})}const UW=re("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Bf,boxSizing:"border-box"}),hT=D.forwardRef(function(e,n){const r=jW(e,"MuiMonthCalendar"),{className:o,value:i,defaultValue:s,referenceDate:a,disabled:c,disableFuture:u,disablePast:f,maxDate:p,minDate:m,onChange:y,shouldDisableMonth:b,readOnly:g,autoFocus:x=!1,onMonthFocus:w,hasFocus:E,onFocusedViewChange:T,monthsPerRow:C=3,timezone:k,gridLabelId:M,slots:A,slotProps:I}=r,L=mt(r,HW),{value:O,handleValueChange:N,timezone:$}=Ug({name:"MonthCalendar",timezone:k,value:i,defaultValue:s,referenceDate:a,onChange:y,valueManager:Qo}),V=pf($),z=ki(),F=nn(),B=D.useMemo(()=>Qo.getInitialReferenceValue({value:O,utils:F,props:r,timezone:$,referenceDate:a,granularity:Zo.month}),[]),W=r,Y=WW(W),X=D.useMemo(()=>F.getMonth(V),[F,V]),K=D.useMemo(()=>O!=null?F.getMonth(O):null,[O,F]),[Q,ve]=D.useState(()=>K||F.getMonth(B)),[xe,ye]=Go({name:"MonthCalendar",state:"hasFocus",controlled:E,default:x??!1}),oe=qe(ne=>{ye(ne),T&&T(ne)}),ce=D.useCallback(ne=>{const le=F.startOfMonth(f&&F.isAfter(V,m)?V:m),pe=F.startOfMonth(u&&F.isBefore(V,p)?V:p),Oe=F.startOfMonth(ne);return F.isBefore(Oe,le)||F.isAfter(Oe,pe)?!0:b?b(Oe):!1},[u,f,p,m,V,b,F]),fe=qe((ne,le)=>{if(g)return;const pe=F.setMonth(O??B,le);N(pe)}),q=qe(ne=>{ce(F.setMonth(O??B,ne))||(ve(ne),oe(!0),w&&w(ne))});D.useEffect(()=>{ve(ne=>K!==null&&ne!==K?K:ne)},[K]);const ee=qe((ne,le)=>{switch(ne.key){case"ArrowUp":q((12+le-3)%12),ne.preventDefault();break;case"ArrowDown":q((12+le+3)%12),ne.preventDefault();break;case"ArrowLeft":q((12+le+(z?1:-1))%12),ne.preventDefault();break;case"ArrowRight":q((12+le+(z?-1:1))%12),ne.preventDefault();break}}),se=qe((ne,le)=>{q(le)}),be=qe((ne,le)=>{Q===le&&oe(!1)});return v.jsx(UW,ie({ref:n,className:me(Y.root,o),ownerState:W,role:"radiogroup","aria-labelledby":M},L,{children:Rg(F,O??B).map(ne=>{const le=F.getMonth(ne),pe=F.format(ne,"monthShort"),Oe=F.format(ne,"month"),ke=le===K,Fe=c||ce(ne);return v.jsx(VW,{selected:ke,value:le,onClick:fe,onKeyDown:ee,autoFocus:xe&&le===Q,disabled:Fe,tabIndex:le===Q&&!Fe?0:-1,onFocus:se,onBlur:be,"aria-current":X===le?"date":void 0,"aria-label":Oe,monthsPerRow:C,slots:A,slotProps:I,children:pe},pe)})}))});process.env.NODE_ENV!=="production"&&(hT.propTypes={autoFocus:l.bool,classes:l.object,className:l.string,defaultValue:l.object,disabled:l.bool,disableFuture:l.bool,disableHighlightToday:l.bool,disablePast:l.bool,gridLabelId:l.string,hasFocus:l.bool,maxDate:l.object,minDate:l.object,monthsPerRow:l.oneOf([3,4]),onChange:l.func,onFocusedViewChange:l.func,onMonthFocus:l.func,readOnly:l.bool,referenceDate:l.object,shouldDisableMonth:l.func,slotProps:l.object,slots:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),timezone:l.string,value:l.object});function qW(t){return Qe("MuiPickersYear",t)}const zf=Ge("MuiPickersYear",["root","yearButton","selected","disabled"]),KW=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],YW=t=>{const{disabled:e,selected:n,classes:r}=t;return Ze({root:["root"],yearButton:["yearButton",e&&"disabled",n&&"selected"]},qW,r)},GW=re("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%"}}]}),JW=re("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(t,e)=>[e.yearButton,{[`&.${zf.disabled}`]:e.disabled},{[`&.${zf.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})`:ft(t.palette.action.active,t.palette.action.focusOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:ft(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${zf.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${zf.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),XW=D.memo(function(e){const n=ut({props:e,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:c,tabIndex:u,onClick:f,onKeyDown:p,onFocus:m,onBlur:y,"aria-current":b,slots:g,slotProps:x}=n,w=mt(n,KW),E=D.useRef(null),T=YW(n);Rn(()=>{var M;r&&((M=E.current)==null||M.focus())},[r]);const C=(g==null?void 0:g.yearButton)??JW,k=$t({elementType:C,externalSlotProps:x==null?void 0:x.yearButton,additionalProps:{children:i,disabled:s,tabIndex:u,ref:E,type:"button",role:"radio","aria-current":b,"aria-checked":a,onClick:M=>f(M,c),onKeyDown:M=>p(M,c),onFocus:M=>m(M,c),onBlur:M=>y(M,c)},ownerState:n,className:T.yearButton});return v.jsx(GW,ie({className:me(T.root,o),ownerState:n},w,{children:v.jsx(C,ie({},k))}))});function ZW(t){return Qe("MuiYearCalendar",t)}Ge("MuiYearCalendar",["root"]);const QW=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],ej=t=>{const{classes:e}=t;return Ze({root:["root"]},ZW,e)};function tj(t,e){const n=nn(),r=zc(),o=ut({props:t,name:e});return ie({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:ao(n,o.minDate,r.minDate),maxDate:ao(n,o.maxDate,r.maxDate)})}const nj=re("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Bf,maxHeight:UH,boxSizing:"border-box",position:"relative"}),mT=D.forwardRef(function(e,n){const r=tj(e,"MuiYearCalendar"),{autoFocus:o,className:i,value:s,defaultValue:a,referenceDate:c,disabled:u,disableFuture:f,disablePast:p,maxDate:m,minDate:y,onChange:b,readOnly:g,shouldDisableYear:x,onYearFocus:w,hasFocus:E,onFocusedViewChange:T,yearsOrder:C="asc",yearsPerRow:k,timezone:M,gridLabelId:A,slots:I,slotProps:L}=r,O=mt(r,QW),{value:N,handleValueChange:$,timezone:V}=Ug({name:"YearCalendar",timezone:M,value:s,defaultValue:a,referenceDate:c,onChange:b,valueManager:Qo}),z=pf(V),F=ki(),B=nn(),W=D.useMemo(()=>Qo.getInitialReferenceValue({value:N,utils:B,props:r,timezone:V,referenceDate:c,granularity:Zo.year}),[]),Y=r,X=ej(Y),K=D.useMemo(()=>B.getYear(z),[B,z]),Q=D.useMemo(()=>N!=null?B.getYear(N):null,[N,B]),[ve,xe]=D.useState(()=>Q||B.getYear(W)),[ye,oe]=Go({name:"YearCalendar",state:"hasFocus",controlled:E,default:o??!1}),ce=qe(Ie=>{oe(Ie),T&&T(Ie)}),fe=D.useCallback(Ie=>{if(p&&B.isBeforeYear(Ie,z)||f&&B.isAfterYear(Ie,z)||y&&B.isBeforeYear(Ie,y)||m&&B.isAfterYear(Ie,m))return!0;if(!x)return!1;const Ke=B.startOfYear(Ie);return x(Ke)},[f,p,m,y,z,x,B]),q=qe((Ie,Ke)=>{if(g)return;const Xe=B.setYear(N??W,Ke);$(Xe)}),ee=qe(Ie=>{fe(B.setYear(N??W,Ie))||(xe(Ie),ce(!0),w==null||w(Ie))});D.useEffect(()=>{xe(Ie=>Q!==null&&Ie!==Q?Q:Ie)},[Q]);const se=C!=="desc"?k*1:k*-1,be=F&&C==="asc"||!F&&C==="desc"?-1:1,ne=qe((Ie,Ke)=>{switch(Ie.key){case"ArrowUp":ee(Ke-se),Ie.preventDefault();break;case"ArrowDown":ee(Ke+se),Ie.preventDefault();break;case"ArrowLeft":ee(Ke-be),Ie.preventDefault();break;case"ArrowRight":ee(Ke+be),Ie.preventDefault();break}}),le=qe((Ie,Ke)=>{ee(Ke)}),pe=qe((Ie,Ke)=>{ve===Ke&&ce(!1)}),Oe=D.useRef(null),ke=At(n,Oe);D.useEffect(()=>{if(o||Oe.current===null)return;const Ie=Oe.current.querySelector('[tabindex="0"]');if(!Ie)return;const Ke=Ie.offsetHeight,Xe=Ie.offsetTop,U=Oe.current.clientHeight,Z=Oe.current.scrollTop,he=Xe+Ke;Ke>U||Xe<Z||(Oe.current.scrollTop=he-U/2-Ke/2)},[o]);const Fe=B.getYearRange([y,m]);return C==="desc"&&Fe.reverse(),v.jsx(nj,ie({ref:ke,className:me(X.root,i),ownerState:Y,role:"radiogroup","aria-labelledby":A},O,{children:Fe.map(Ie=>{const Ke=B.getYear(Ie),Xe=Ke===Q,U=u||fe(Ie);return v.jsx(XW,{selected:Xe,value:Ke,onClick:q,onKeyDown:ne,autoFocus:ye&&Ke===ve,disabled:U,tabIndex:Ke===ve&&!U?0:-1,onFocus:le,onBlur:pe,"aria-current":K===Ke?"date":void 0,yearsPerRow:k,slots:I,slotProps:L,children:B.format(Ie,"year")},B.format(Ie,"year"))})}))});process.env.NODE_ENV!=="production"&&(mT.propTypes={autoFocus:l.bool,classes:l.object,className:l.string,defaultValue:l.object,disabled:l.bool,disableFuture:l.bool,disableHighlightToday:l.bool,disablePast:l.bool,gridLabelId:l.string,hasFocus:l.bool,maxDate:l.object,minDate:l.object,onChange:l.func,onFocusedViewChange:l.func,onYearFocus:l.func,readOnly:l.bool,referenceDate:l.object,shouldDisableYear:l.func,slotProps:l.object,slots:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),timezone:l.string,value:l.object,yearsOrder:l.oneOf(["asc","desc"]),yearsPerRow:l.oneOf([3,4])});const rj=t=>Qe("MuiPickersCalendarHeader",t),oj=Ge("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function ij(t){return Qe("MuiPickersArrowSwitcher",t)}Ge("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const sj=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],aj=["ownerState"],lj=["ownerState"],cj=re("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex"}),uj=re("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})(({theme:t})=>({width:t.spacing(3)})),gT=re(gl,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(t,e)=>e.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),dj=t=>{const{classes:e}=t;return Ze({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},ij,e)},fj=D.forwardRef(function(e,n){const r=ki(),o=ut({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:s,slots:a,slotProps:c,isNextDisabled:u,isNextHidden:f,onGoToNext:p,nextLabel:m,isPreviousDisabled:y,isPreviousHidden:b,onGoToPrevious:g,previousLabel:x,labelId:w}=o,E=mt(o,sj),T=o,C=dj(T),k={isDisabled:u,isHidden:f,goTo:p,label:m},M={isDisabled:y,isHidden:b,goTo:g,label:x},A=(a==null?void 0:a.previousIconButton)??gT,I=$t({elementType:A,externalSlotProps:c==null?void 0:c.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:me(C.button,C.previousIconButton)}),L=(a==null?void 0:a.nextIconButton)??gT,O=$t({elementType:L,externalSlotProps:c==null?void 0:c.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:me(C.button,C.nextIconButton)}),N=(a==null?void 0:a.leftArrowIcon)??OV,$=$t({elementType:N,externalSlotProps:c==null?void 0:c.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:T,className:C.leftArrowIcon}),V=mt($,aj),z=(a==null?void 0:a.rightArrowIcon)??MV,F=$t({elementType:z,externalSlotProps:c==null?void 0:c.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:T,className:C.rightArrowIcon}),B=mt(F,lj);return v.jsxs(cj,ie({ref:n,className:me(C.root,s),ownerState:T},E,{children:[v.jsx(A,ie({},I,{children:r?v.jsx(z,ie({},B)):v.jsx(N,ie({},V))})),i?v.jsx(co,{variant:"subtitle1",component:"span",id:w,children:i}):v.jsx(uj,{className:C.spacer,ownerState:T}),v.jsx(L,ie({},O,{children:r?v.jsx(N,ie({},V)):v.jsx(z,ie({},B))}))]}))});function pj(t,{disableFuture:e,maxDate:n,timezone:r}){const o=nn();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 hj(t,{disablePast:e,minDate:n,timezone:r}){const o=nn();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 mj=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],gj=["ownerState"],yj=t=>{const{classes:e}=t;return Ze({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},rj,e)},bj=re("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}),vj=re("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})),xj=re("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(t,e)=>e.label})({marginRight:6}),Sj=re(gl,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(t,e)=>e.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${oj.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),wj=re(_V,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(t,e)=>e.switchViewIcon})(({theme:t})=>({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"})),yT=D.forwardRef(function(e,n){const r=Ei(),o=nn(),i=ut({props:e,name:"MuiPickersCalendarHeader"}),{slots:s,slotProps:a,currentMonth:c,disabled:u,disableFuture:f,disablePast:p,maxDate:m,minDate:y,onMonthChange:b,onViewChange:g,view:x,reduceAnimations:w,views:E,labelId:T,className:C,timezone:k,format:M=`${o.formats.month} ${o.formats.year}`}=i,A=mt(i,mj),I=i,L=yj(i),O=(s==null?void 0:s.switchViewButton)??Sj,N=$t({elementType:O,externalSlotProps:a==null?void 0:a.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(x)},ownerState:I,className:L.switchViewButton}),$=(s==null?void 0:s.switchViewIcon)??wj,V=$t({elementType:$,externalSlotProps:a==null?void 0:a.switchViewIcon,ownerState:I,className:L.switchViewIcon}),z=mt(V,gj),F=()=>b(o.addMonths(c,1),"left"),B=()=>b(o.addMonths(c,-1),"right"),W=pj(c,{disableFuture:f,maxDate:m,timezone:k}),Y=hj(c,{disablePast:p,minDate:y,timezone:k}),X=()=>{if(!(E.length===1||!g||u))if(E.length===2)g(E.find(Q=>Q!==x)||E[0]);else{const Q=E.indexOf(x)!==0?0:1;g(E[Q])}};if(E.length===1&&E[0]==="year")return null;const K=o.formatByString(c,M);return v.jsxs(bj,ie({},A,{ownerState:I,className:me(L.root,C),ref:n,children:[v.jsxs(vj,{role:"presentation",onClick:X,ownerState:I,"aria-live":"polite",className:L.labelContainer,children:[v.jsx(cT,{reduceAnimations:w,transKey:K,children:v.jsx(xj,{id:T,ownerState:I,className:L.label,children:K})}),E.length>1&&!u&&v.jsx(O,ie({},N,{children:v.jsx($,ie({},z))}))]}),v.jsx(Xo,{in:x==="day",appear:!w,enter:!w,children:v.jsx(fj,{slots:s,slotProps:a,onGoToPrevious:B,isPreviousDisabled:Y,previousLabel:r.previousMonth,onGoToNext:F,isNextDisabled:W,nextLabel:r.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(yT.propTypes={classes:l.object,className:l.string,currentMonth:l.object.isRequired,disabled:l.bool,disableFuture:l.bool,disablePast:l.bool,format:l.string,labelId:l.string,maxDate:l.object.isRequired,minDate:l.object.isRequired,onMonthChange:l.func.isRequired,onViewChange:l.func,reduceAnimations:l.bool.isRequired,slotProps:l.object,slots:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),timezone:l.string.isRequired,view:l.oneOf(["day","month","year"]).isRequired,views:l.arrayOf(l.oneOf(["day","month","year"]).isRequired).isRequired});const Cj=re("div")({overflow:"hidden",width:Bf,maxHeight:py,display:"flex",flexDirection:"column",margin:"0 auto"}),Tj=t=>Qe("MuiDateCalendar",t);Ge("MuiDateCalendar",["root","viewTransitionContainer"]);const kj=["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"],Ej=t=>{const{classes:e}=t;return Ze({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Tj,e)};function _j(t,e){const n=nn(),r=zc(),o=YC(),i=ut({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:ao(n,i.minDate,r.minDate),maxDate:ao(n,i.maxDate,r.maxDate)})}const Oj=re(Cj,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"column",height:py}),Mj=re(cT,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(t,e)=>e.viewTransitionContainer})({}),bT=D.forwardRef(function(e,n){const r=nn(),o=No(),i=_j(e,"MuiDateCalendar"),{autoFocus:s,onViewChange:a,value:c,defaultValue:u,referenceDate:f,disableFuture:p,disablePast:m,onChange:y,onYearChange:b,onMonthChange:g,reduceAnimations:x,shouldDisableDate:w,shouldDisableMonth:E,shouldDisableYear:T,view:C,views:k,openTo:M,className:A,disabled:I,readOnly:L,minDate:O,maxDate:N,disableHighlightToday:$,focusedView:V,onFocusedViewChange:z,showDaysOutsideCurrentMonth:F,fixedWeekNumber:B,dayOfWeekFormatter:W,slots:Y,slotProps:X,loading:K,renderLoading:Q,displayWeekNumber:ve,yearsOrder:xe,yearsPerRow:ye,monthsPerRow:oe,timezone:ce}=i,fe=mt(i,kj),{value:q,handleValueChange:ee,timezone:se}=Ug({name:"DateCalendar",timezone:ce,value:c,defaultValue:u,referenceDate:f,onChange:y,valueManager:Qo}),{view:be,setView:ne,focusedView:le,setFocusedView:pe,goToNextView:Oe,setValueAndGoToNextView:ke}=GC({view:C,views:k,openTo:M,onChange:ee,onViewChange:a,autoFocus:s,focusedView:V,onFocusedViewChange:z}),{referenceDate:Fe,calendarState:Ie,changeFocusedDay:Ke,changeMonth:Xe,handleChangeMonth:U,isDateDisabled:Z,onMonthSwitchingAnimationEnd:he}=iW({value:q,referenceDate:f,reduceAnimations:x,onMonthChange:g,minDate:O,maxDate:N,shouldDisableDate:w,disablePast:m,disableFuture:p,timezone:se}),Ne=I&&q||O,Pe=I&&q||N,Ae=`${o}-grid-label`,ze=le!==null,st=(Y==null?void 0:Y.calendarHeader)??yT,pt=$t({elementType:st,externalSlotProps:X==null?void 0:X.calendarHeader,additionalProps:{views:k,view:be,currentMonth:Ie.currentMonth,onViewChange:ne,onMonthChange:(it,zt)=>U({newMonth:it,direction:zt}),minDate:Ne,maxDate:Pe,disabled:I,disablePast:m,disableFuture:p,reduceAnimations:x,timezone:se,labelId:Ae},ownerState:i}),Vt=qe(it=>{const zt=r.startOfMonth(it),tr=r.endOfMonth(it),fr=Z(it)?Rc({utils:r,date:it,minDate:r.isBefore(O,zt)?zt:O,maxDate:r.isAfter(N,tr)?tr:N,disablePast:m,disableFuture:p,isDateDisabled:Z,timezone:se}):it;fr?(ke(fr,"finish"),g==null||g(zt)):(Oe(),Xe(zt)),Ke(fr,!0)}),rt=qe(it=>{const zt=r.startOfYear(it),tr=r.endOfYear(it),fr=Z(it)?Rc({utils:r,date:it,minDate:r.isBefore(O,zt)?zt:O,maxDate:r.isAfter(N,tr)?tr:N,disablePast:m,disableFuture:p,isDateDisabled:Z,timezone:se}):it;fr?(ke(fr,"finish"),b==null||b(fr)):(Oe(),Xe(zt)),Ke(fr,!0)}),Wt=qe(it=>ee(it&&df(r,it,q??Fe),"finish",be));D.useEffect(()=>{q!=null&&r.isValid(q)&&Xe(q)},[q]);const Qt=i,ge=Ej(Qt),We={disablePast:m,disableFuture:p,maxDate:N,minDate:O},_e={disableHighlightToday:$,readOnly:L,disabled:I,timezone:se,gridLabelId:Ae,slots:Y,slotProps:X},je=D.useRef(be);D.useEffect(()=>{je.current!==be&&(le===je.current&&pe(be,!0),je.current=be)},[le,pe,be]);const et=D.useMemo(()=>[q],[q]);return v.jsxs(Oj,ie({ref:n,className:me(ge.root,A),ownerState:Qt},fe,{children:[v.jsx(st,ie({},pt,{slots:Y,slotProps:X})),v.jsx(Mj,{reduceAnimations:x,className:ge.viewTransitionContainer,transKey:be,ownerState:Qt,children:v.jsxs("div",{children:[be==="year"&&v.jsx(mT,ie({},We,_e,{value:q,onChange:rt,shouldDisableYear:T,hasFocus:ze,onFocusedViewChange:it=>pe("year",it),yearsOrder:xe,yearsPerRow:ye,referenceDate:Fe})),be==="month"&&v.jsx(hT,ie({},We,_e,{hasFocus:ze,className:A,value:q,onChange:Vt,shouldDisableMonth:E,onFocusedViewChange:it=>pe("month",it),monthsPerRow:oe,referenceDate:Fe})),be==="day"&&v.jsx(NW,ie({},Ie,We,_e,{onMonthSwitchingAnimationEnd:he,onFocusedDayChange:Ke,reduceAnimations:x,selectedDays:et,onSelectedDaysChange:Wt,shouldDisableDate:w,shouldDisableMonth:E,shouldDisableYear:T,hasFocus:ze,onFocusedViewChange:it=>pe("day",it),showDaysOutsideCurrentMonth:F,fixedWeekNumber:B,dayOfWeekFormatter:W,displayWeekNumber:ve,loading:K,renderLoading:Q}))]})})]}))});process.env.NODE_ENV!=="production"&&(bT.propTypes={autoFocus:l.bool,classes:l.object,className:l.string,dayOfWeekFormatter:l.func,defaultValue:l.object,disabled:l.bool,disableFuture:l.bool,disableHighlightToday:l.bool,disablePast:l.bool,displayWeekNumber:l.bool,fixedWeekNumber:l.number,focusedView:l.oneOf(["day","month","year"]),loading:l.bool,maxDate:l.object,minDate:l.object,monthsPerRow:l.oneOf([3,4]),onChange:l.func,onFocusedViewChange:l.func,onMonthChange:l.func,onViewChange:l.func,onYearChange:l.func,openTo:l.oneOf(["day","month","year"]),readOnly:l.bool,reduceAnimations:l.bool,referenceDate:l.object,renderLoading:l.func,shouldDisableDate:l.func,shouldDisableMonth:l.func,shouldDisableYear:l.func,showDaysOutsideCurrentMonth:l.bool,slotProps:l.object,slots:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),timezone:l.string,value:l.object,view:l.oneOf(["day","month","year"]),views:l.arrayOf(l.oneOf(["day","month","year"]).isRequired),yearsOrder:l.oneOf(["asc","desc"]),yearsPerRow:l.oneOf([3,4])});const El=({view:t,onViewChange:e,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:c,className:u,classes:f,disableFuture:p,disablePast:m,minDate:y,maxDate:b,shouldDisableDate:g,shouldDisableMonth:x,shouldDisableYear:w,reduceAnimations:E,onMonthChange:T,monthsPerRow:C,onYearChange:k,yearsOrder:M,yearsPerRow:A,slots:I,slotProps:L,loading:O,renderLoading:N,disableHighlightToday:$,readOnly:V,disabled:z,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:B,sx:W,autoFocus:Y,fixedWeekNumber:X,displayWeekNumber:K,timezone:Q})=>v.jsx(bT,{view:t,onViewChange:e,views:n.filter(Aw),focusedView:r&&Aw(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:c,className:u,classes:f,disableFuture:p,disablePast:m,minDate:y,maxDate:b,shouldDisableDate:g,shouldDisableMonth:x,shouldDisableYear:w,reduceAnimations:E,onMonthChange:T,monthsPerRow:C,onYearChange:k,yearsOrder:M,yearsPerRow:A,slots:I,slotProps:L,loading:O,renderLoading:N,disableHighlightToday:$,readOnly:V,disabled:z,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:B,sx:W,autoFocus:Y,fixedWeekNumber:X,displayWeekNumber:K,timezone:Q}),vT=D.forwardRef(function(e,n){var u,f;const r=Ei(),o=nn(),i=TC(e,"MuiDesktopDatePicker"),s=ie({day:El,month:El,year:El},i.viewRenderers),a=ie({},i,{viewRenderers:s,format:Bg(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:ie({openPickerIcon:AV,field:Mf},i.slots),slotProps:ie({},i.slotProps,{field:p=>{var m;return ie({},Cd((m=i.slotProps)==null?void 0:m.field,p),jw(i),{ref:n})},toolbar:ie({hidden:!0},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:c}=rW({props:a,valueManager:Qo,valueType:"date",getOpenDialogAriaText:Uw({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=a.localeText)==null?void 0:f.openDatePickerDialogue}),validator:Vc});return c()});vT.propTypes={autoFocus:l.bool,className:l.string,closeOnSelect:l.bool,dayOfWeekFormatter:l.func,defaultValue:l.object,disabled:l.bool,disableFuture:l.bool,disableHighlightToday:l.bool,disableOpenPicker:l.bool,disablePast:l.bool,displayWeekNumber:l.bool,enableAccessibleFieldDOMStructure:l.any,fixedWeekNumber:l.number,format:l.string,formatDensity:l.oneOf(["dense","spacious"]),inputRef:Dn,label:l.node,loading:l.bool,localeText:l.object,maxDate:l.object,minDate:l.object,monthsPerRow:l.oneOf([3,4]),name:l.string,onAccept:l.func,onChange:l.func,onClose:l.func,onError:l.func,onMonthChange:l.func,onOpen:l.func,onSelectedSectionsChange:l.func,onViewChange:l.func,onYearChange:l.func,open:l.bool,openTo:l.oneOf(["day","month","year"]),orientation:l.oneOf(["landscape","portrait"]),readOnly:l.bool,reduceAnimations:l.bool,referenceDate:l.object,renderLoading:l.func,selectedSections:l.oneOfType([l.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),l.number]),shouldDisableDate:l.func,shouldDisableMonth:l.func,shouldDisableYear:l.func,showDaysOutsideCurrentMonth:l.bool,slotProps:l.object,slots:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),timezone:l.string,value:l.object,view:l.oneOf(["day","month","year"]),viewRenderers:l.shape({day:l.func,month:l.func,year:l.func}),views:l.arrayOf(l.oneOf(["day","month","year"]).isRequired),yearsOrder:l.oneOf(["asc","desc"]),yearsPerRow:l.oneOf([3,4])};function Aj(t){return Qe("MuiDialogContent",t)}Ge("MuiDialogContent",["root","dividers"]);const Dj=Ge("MuiDialogTitle",["root"]),Ij=t=>{const{classes:e,dividers:n}=t;return Ze({root:["root",n&&"dividers"]},Aj,e)},Pj=re("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(Tt(({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:{[`.${Dj.root} + &`]:{paddingTop:0}}}]}))),xT=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...s}=r,a={...r,dividers:i},c=Ij(a);return v.jsx(Pj,{className:me(c.root,o),ownerState:a,ref:n,...s})});process.env.NODE_ENV!=="production"&&(xT.propTypes={children:l.node,classes:l.object,className:l.string,dividers:l.bool,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])});function Nj(t){return Qe("MuiDialog",t)}const nu=Ge("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),ST=D.createContext({});process.env.NODE_ENV!=="production"&&(ST.displayName="DialogContext");const $j=re(Ng,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),Lj=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=t,s={root:["root"],container:["container",`scroll${$e(n)}`],paper:["paper",`paperScroll${$e(n)}`,`paperWidth${$e(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Ze(s,Nj,e)},Fj=re($g,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),Rj=re("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${$e(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),Bj=re(Ci,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${$e(n.scroll)}`],e[`paperWidth${$e(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(Tt(({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)`,[`&.${nu.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}`,[`&.${nu.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,[`&.${nu.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),wT=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiDialog"}),o=ro(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,"aria-modal":c=!0,BackdropComponent:u,BackdropProps:f,children:p,className:m,disableEscapeKeyDown:y=!1,fullScreen:b=!1,fullWidth:g=!1,maxWidth:x="sm",onBackdropClick:w,onClick:E,onClose:T,open:C,PaperComponent:k=Ci,PaperProps:M={},scroll:A="paper",slots:I={},slotProps:L={},TransitionComponent:O=Xo,transitionDuration:N=i,TransitionProps:$,...V}=r,z={...r,disableEscapeKeyDown:y,fullScreen:b,fullWidth:g,maxWidth:x,scroll:A},F=Lj(z),B=D.useRef(),W=pe=>{B.current=pe.target===pe.currentTarget},Y=pe=>{E&&E(pe),B.current&&(B.current=null,w&&w(pe),T&&T(pe,"backdropClick"))},X=No(a),K=D.useMemo(()=>({titleId:X}),[X]),Q={transition:O,...I},ve={transition:$,paper:M,backdrop:f,...L},xe={slots:Q,slotProps:ve},[ye,oe]=Lt("root",{elementType:Fj,shouldForwardComponentProp:!0,externalForwardedProps:xe,ownerState:z,className:me(F.root,m),ref:n}),[ce,fe]=Lt("backdrop",{elementType:$j,shouldForwardComponentProp:!0,externalForwardedProps:xe,ownerState:z}),[q,ee]=Lt("paper",{elementType:Bj,shouldForwardComponentProp:!0,externalForwardedProps:xe,ownerState:z,className:me(F.paper,M.className)}),[se,be]=Lt("container",{elementType:Rj,externalForwardedProps:xe,ownerState:z,className:me(F.container)}),[ne,le]=Lt("transition",{elementType:Xo,externalForwardedProps:xe,ownerState:z,additionalProps:{appear:!0,in:C,timeout:N,role:"presentation"}});return v.jsx(ye,{closeAfterTransition:!0,slots:{backdrop:ce},slotProps:{backdrop:{transitionDuration:N,as:u,...fe}},disableEscapeKeyDown:y,onClose:T,open:C,onClick:Y,...oe,...V,children:v.jsx(ne,{...le,children:v.jsx(se,{onMouseDown:W,...be,children:v.jsx(q,{as:k,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":X,"aria-modal":c,...ee,children:v.jsx(ST.Provider,{value:K,children:p})})})})})});process.env.NODE_ENV!=="production"&&(wT.propTypes={"aria-describedby":l.string,"aria-labelledby":l.string,"aria-modal":l.oneOfType([l.oneOf(["false","true"]),l.bool]),BackdropComponent:l.elementType,BackdropProps:l.object,children:l.node,classes:l.object,className:l.string,disableEscapeKeyDown:l.bool,fullScreen:l.bool,fullWidth:l.bool,maxWidth:l.oneOfType([l.oneOf(["xs","sm","md","lg","xl",!1]),l.string]),onBackdropClick:l.func,onClick:l.func,onClose:l.func,open:l.bool.isRequired,PaperComponent:l.elementType,PaperProps:l.object,scroll:l.oneOf(["body","paper"]),slotProps:l.shape({backdrop:l.oneOfType([l.func,l.object]),container:l.oneOfType([l.func,l.object]),paper:l.oneOfType([l.func,l.object]),root:l.oneOfType([l.func,l.object]),transition:l.oneOfType([l.func,l.object])}),slots:l.shape({backdrop:l.elementType,container:l.elementType,paper:l.elementType,root:l.elementType,transition:l.elementType}),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),TransitionComponent:l.elementType,transitionDuration:l.oneOfType([l.number,l.shape({appear:l.number,enter:l.number,exit:l.number})]),TransitionProps:l.object});const Vj=re(wT)({[`& .${nu.container}`]:{outline:0},[`& .${nu.paper}`]:{outline:0,minWidth:Bf}}),zj=re(xT)({"&:first-of-type":{padding:0}});function Hj(t){const{children:e,onDismiss:n,open:r,slots:o,slotProps:i}=t,s=(o==null?void 0:o.dialog)??Vj,a=(o==null?void 0:o.mobileTransition)??Xo;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(zj,{children:e})}))}const Wj=["props","getOpenDialogAriaText"],jj=t=>{var Q;let{props:e,getOpenDialogAriaText:n}=t,r=mt(t,Wj);const{slots:o,slotProps:i,className:s,sx:a,format:c,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:m,timezone:y,name:b,label:g,inputRef:x,readOnly:w,disabled:E,localeText:T}=e,C=D.useRef(null),k=No(),M=((Q=i==null?void 0:i.toolbar)==null?void 0:Q.hidden)??!1,{open:A,actions:I,layoutProps:L,renderCurrentView:O,fieldProps:N,contextValue:$}=XC(ie({},r,{props:e,fieldRef:C,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),V=o.field,z=$t({elementType:V,externalSlotProps:i==null?void 0:i.field,additionalProps:ie({},N,M&&{id:k},!(E||w)&&{onClick:I.onOpen,onKeyDown:W5(I.onOpen)},{readOnly:w??!0,disabled:E,className:s,sx:a,format:c,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:m,timezone:y,label:g,name:b},x?{inputRef:x}:{}),ownerState:e});z.inputProps=ie({},z.inputProps,{"aria-label":n(N.value)});const F=ie({textField:o.textField},z.slots),B=o.layout??hy;let W=k;M&&(g?W=`${k}-label`:W=void 0);const Y=ie({},i,{toolbar:ie({},i==null?void 0:i.toolbar,{titleId:k}),mobilePaper:ie({"aria-labelledby":W},i==null?void 0:i.mobilePaper)}),X=At(C,z.unstableFieldRef);return{renderPicker:()=>v.jsxs(tC,{contextValue:$,localeText:T,children:[v.jsx(V,ie({},z,{slots:F,slotProps:Y,unstableFieldRef:X})),v.jsx(Hj,ie({},I,{open:A,slots:o,slotProps:Y,children:v.jsx(B,ie({},L,Y==null?void 0:Y.layout,{slots:o,slotProps:Y,children:O()}))}))]})}},CT=D.forwardRef(function(e,n){var u,f;const r=Ei(),o=nn(),i=TC(e,"MuiMobileDatePicker"),s=ie({day:El,month:El,year:El},i.viewRenderers),a=ie({},i,{viewRenderers:s,format:Bg(o,i,!1),slots:ie({field:Mf},i.slots),slotProps:ie({},i.slotProps,{field:p=>{var m;return ie({},Cd((m=i.slotProps)==null?void 0:m.field,p),jw(i),{ref:n})},toolbar:ie({hidden:!1},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:c}=jj({props:a,valueManager:Qo,valueType:"date",getOpenDialogAriaText:Uw({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=a.localeText)==null?void 0:f.openDatePickerDialogue}),validator:Vc});return c()});CT.propTypes={autoFocus:l.bool,className:l.string,closeOnSelect:l.bool,dayOfWeekFormatter:l.func,defaultValue:l.object,disabled:l.bool,disableFuture:l.bool,disableHighlightToday:l.bool,disableOpenPicker:l.bool,disablePast:l.bool,displayWeekNumber:l.bool,enableAccessibleFieldDOMStructure:l.any,fixedWeekNumber:l.number,format:l.string,formatDensity:l.oneOf(["dense","spacious"]),inputRef:Dn,label:l.node,loading:l.bool,localeText:l.object,maxDate:l.object,minDate:l.object,monthsPerRow:l.oneOf([3,4]),name:l.string,onAccept:l.func,onChange:l.func,onClose:l.func,onError:l.func,onMonthChange:l.func,onOpen:l.func,onSelectedSectionsChange:l.func,onViewChange:l.func,onYearChange:l.func,open:l.bool,openTo:l.oneOf(["day","month","year"]),orientation:l.oneOf(["landscape","portrait"]),readOnly:l.bool,reduceAnimations:l.bool,referenceDate:l.object,renderLoading:l.func,selectedSections:l.oneOfType([l.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),l.number]),shouldDisableDate:l.func,shouldDisableMonth:l.func,shouldDisableYear:l.func,showDaysOutsideCurrentMonth:l.bool,slotProps:l.object,slots:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),timezone:l.string,value:l.object,view:l.oneOf(["day","month","year"]),viewRenderers:l.shape({day:l.func,month:l.func,year:l.func}),views:l.arrayOf(l.oneOf(["day","month","year"]).isRequired),yearsOrder:l.oneOf(["asc","desc"]),yearsPerRow:l.oneOf([3,4])};const Uj=["desktopModeMediaQuery"],TT=D.forwardRef(function(e,n){const r=ut({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=j5}=r,i=mt(r,Uj);return wC(o,{defaultMatches:!0})?v.jsx(vT,ie({ref:n},i)):v.jsx(CT,ie({ref:n},i))});process.env.NODE_ENV!=="production"&&(TT.propTypes={autoFocus:l.bool,className:l.string,closeOnSelect:l.bool,dayOfWeekFormatter:l.func,defaultValue:l.object,desktopModeMediaQuery:l.string,disabled:l.bool,disableFuture:l.bool,disableHighlightToday:l.bool,disableOpenPicker:l.bool,disablePast:l.bool,displayWeekNumber:l.bool,enableAccessibleFieldDOMStructure:l.any,fixedWeekNumber:l.number,format:l.string,formatDensity:l.oneOf(["dense","spacious"]),inputRef:Dn,label:l.node,loading:l.bool,localeText:l.object,maxDate:l.object,minDate:l.object,monthsPerRow:l.oneOf([3,4]),name:l.string,onAccept:l.func,onChange:l.func,onClose:l.func,onError:l.func,onMonthChange:l.func,onOpen:l.func,onSelectedSectionsChange:l.func,onViewChange:l.func,onYearChange:l.func,open:l.bool,openTo:l.oneOf(["day","month","year"]),orientation:l.oneOf(["landscape","portrait"]),readOnly:l.bool,reduceAnimations:l.bool,referenceDate:l.object,renderLoading:l.func,selectedSections:l.oneOfType([l.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),l.number]),shouldDisableDate:l.func,shouldDisableMonth:l.func,shouldDisableYear:l.func,showDaysOutsideCurrentMonth:l.bool,slotProps:l.object,slots:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),timezone:l.string,value:l.object,view:l.oneOf(["day","month","year"]),viewRenderers:l.shape({day:l.func,month:l.func,year:l.func}),views:l.arrayOf(l.oneOf(["day","month","year"]).isRequired),yearsOrder:l.oneOf(["asc","desc"]),yearsPerRow:l.oneOf([3,4])});const qj={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"},my=t=>{const{name:e,label:n=ar(e),required:r=!1,readOnly:o=!1,format:i="MM/DD/YYYY",errorMessages:s,isDatePicker:a=!1,margin:c="dense",staticLabel:u=!1,staticLabelProps:f={fontSize:".9em",color:"#808080"}}=t,{control:p,setError:m,clearErrors:y,formState:{errors:b}}=dn(),[g,x]=D.useState(null),w=D.useMemo(()=>({...qj,...s}),[s]),E=["staticLabel","staticLabelProps","label","errorMessages","isDatePicker","dateFieldProps","datePickerProps","useIso","onChange"];D.useEffect(()=>{g?m(e,{type:"manual",message:w[g]??String(g)}):y(e)},[g,e,m,y,w]);const T=C=>{if(C!=null)return C==null||C==""?null:In.utc(C)};return v.jsx(ir,{name:e,control:p,render:({field:C})=>{const k=T(C.value),M={label:u?void 0:n,onChange:(A,I)=>{let L="";try{const O=A==null?void 0:A.utc();L=(O==null?void 0:O.toISOString())??""}catch{}C.onChange(L),t.onChange&&t.onChange(L,I)},format:i,onError:x,value:k,...eo({...t},E)};return v.jsxs(j.FormControl,{fullWidth:!0,margin:c,children:[(u||o)&&v.jsx(j.Typography,{...f,children:n}),o?v.jsx(j.Typography,{children:k==null?void 0:k.format(i)}):v.jsxs(j.Box,{children:[v.jsx(bg,{dateAdapter:rR,children:v.jsx(j.Box,{children:a?v.jsx(TT,{...C,...M,slotProps:{textField:{fullWidth:!0,error:!!b[e],required:!!r}}}):v.jsx(Mf,{id:`${e}-df`,...C,...M,fullWidth:!0,slotProps:{textField:{error:!!b[e]}}})})}),v.jsx(io,{name:e,id:`${e}-err`})]})]})}})},Kj=t=>{const{nameTo:e,nameFrom:n,labelTo:r=ar(e),labelFrom:o=ar(n),fromFieldProps:i,toFieldProps:s,staticLabels:a=!1}=t,c=["nameTo","nameFrom","toFieldProps","fromFieldProps","labelTo","labelFrom"],u=j.useMediaQuery(j.useTheme().breakpoints.down("sm")),{trigger:f}=dn(),p=fc({name:n}),m=fc({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(my,{name:n,staticLabel:a,label:o,...eo({...t,...i},c)}),v.jsx(my,{name:e,staticLabel:a,label:r,...eo({...t,...s},c)})]})},kT=J.createContext(void 0);function Pt(){const t=J.useContext(kT);if(t===void 0)throw new Error("Tiptap editor not found in component context. Be sure to use <RichTextEditorProvider editor={editor} />!");return t}function Jn(t){this.content=t}Jn.prototype={constructor:Jn,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 Jn(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 Jn(n)},addToStart:function(t,e){return new Jn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Jn(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 Jn(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=Jn.from(t),t.size?new Jn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Jn.from(t),t.size?new Jn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Jn.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}},Jn.from=function(t){if(t instanceof Jn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Jn(e)};function ET(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=ET(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function _T(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),c=s.nodeSize;if(s==a){n-=c,r-=c;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=_T(s.content,a.content,n-1,r-1);if(u)return u}n-=c,r-=c}}class Me{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 c=this.content[s],u=a+c.nodeSize;if(u>e&&r(c,o+a,i||null,s)!==!1&&c.content.size){let f=a+1;c.nodesBetween(Math.max(0,e-f),Math.min(c.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,c)=>{let u=a.isText?a.text.slice(Math.max(e,c)-c,n-c):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 Me(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],c=s+a.nodeSize;c>e&&((s<e||c>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=c}return new Me(r,o)}cutByIndex(e,n){return e==n?Me.empty:e==0&&n==this.content.length?this:new Me(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 Me(o,i)}addToStart(e){return new Me([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Me(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 ET(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return _T(this,e,n,r)}findIndex(e){if(e==0)return Hf(0,e);if(e==this.size)return Hf(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?Hf(n+1,i):Hf(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 Me.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Me(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Me.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 Me(n||e,r)}static from(e){if(!e)return Me.empty;if(e instanceof Me)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Me([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Me.empty=new Me([],0);const gy={index:0,offset:0};function Hf(t,e){return gy.index=t,gy.offset=e,gy}function Wf(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(!Wf(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Wf(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let Gt=class A1{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&&Wf(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 A1.none;if(e instanceof A1)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};Gt.none=[];class jf extends Error{}class Ve{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=MT(this.content,e+this.openStart,n);return r&&new Ve(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Ve(OT(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 Ve.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 Ve(Me.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 Ve(e,r,o)}}Ve.empty=new Ve(Me.empty,0,0);function OT(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(OT(i.content,e-o-1,n-o-1)))}function MT(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=MT(s.content,e-i-1,n,s);return a&&t.replaceChild(o,s.copy(a))}function Yj(t,e,n){if(n.openStart>t.depth)throw new jf("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new jf("Inconsistent open depths");return AT(t,e,n,0)}function AT(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=AT(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}=Gj(n,t);return da(i,IT(t,s,a,e,r))}else return da(i,Uf(t,e,r))}function DT(t,e){if(!e.type.compatibleContent(t.type))throw new jf("Cannot join "+e.type.name+" onto "+t.type.name)}function yy(t,e,n){let r=t.node(n);return DT(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 ru(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 IT(t,e,n,r,o){let i=t.depth>o&&yy(t,e,o+1),s=r.depth>o&&yy(n,r,o+1),a=[];return ru(null,t,o,a),i&&s&&e.index(o)==n.index(o)?(DT(i,s),ua(da(i,IT(t,e,n,r,o+1)),a)):(i&&ua(da(i,Uf(t,e,o+1)),a),ru(e,n,o,a),s&&ua(da(s,Uf(n,r,o+1)),a)),ru(r,null,o,a),new Me(a)}function Uf(t,e,n){let r=[];if(ru(null,t,n,r),t.depth>n){let o=yy(t,e,n+1);ua(da(o,Uf(t,e,n+1)),r)}return ru(e,null,n,r),new Me(r)}function Gj(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(Me.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class ou{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 Gt.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 qf(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:c}=s.content.findIndex(i),u=i-c;if(r.push(s,a,o+c),!u||(s=s.child(a),s.isText))break;i=u-1,o+=c+1}return new ou(n,r,i)}static resolveCached(e,n){let r=PT.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 PT.set(e,r=new Jj);let o=r.elts[r.i]=ou.resolve(e,n);return r.i=(r.i+1)%Xj,o}}class Jj{constructor(){this.elts=[],this.i=0}}const Xj=12,PT=new WeakMap;class qf{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 Zj=Object.create(null);let Ai=class D1{constructor(e,n,r,o=Gt.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||Me.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&&Wf(this.attrs,n||e.defaultAttrs||Zj)&&Gt.sameSet(this.marks,r||Gt.none)}copy(e=null){return e==this.content?this:new D1(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new D1(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 Ve.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 Ve(u,o.depth-s,i.depth-s)}replace(e,n,r){return Yj(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 ou.resolveCached(this,e)}resolveNoCache(e){return ou.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()+")"),NT(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=Me.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 c=o;c<i;c++)if(!this.type.allowsMarks(r.child(c).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=Gt.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(!Gt.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=Me.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};Ai.prototype.text=void 0;class Kf extends Ai{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):NT(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 Kf(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Kf(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 NT(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class fa{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Qj(e,n);if(r.next==null)return fa.empty;let o=$T(r);r.next&&r.err("Unexpected trailing text");let i=s6(i6(o));return a6(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 c=s.matchFragment(e,r);if(c&&(!n||c.validEnd))return Me.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:c}=i.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!o.type||c.validEnd)&&(r.push({match:a.contentMatch,type:a,via:o}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
243
|
-
`)}}fa.empty=new fa(!0);class Qj{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 $T(t){let e=[];do e.push(e6(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function e6(t){let e=[];do e.push(t6(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function t6(t){let e=o6(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=n6(t,e);else break;return e}function LT(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function n6(t,e){let n=LT(t),r=n;return t.eat(",")&&(t.next!="}"?r=LT(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function r6(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 o6(t){if(t.eat("(")){let e=$T(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=r6(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 i6(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,a,c){let u={term:c,to:a};return e[s].push(u),u}function o(s,a){s.forEach(c=>c.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((c,u)=>c.concat(i(u,a)),[]);if(s.type=="seq")for(let c=0;;c++){let u=i(s.exprs[c],a);if(c==s.exprs.length-1)return u;o(u,a=n())}else if(s.type=="star"){let c=n();return r(a,c),o(i(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=n();return o(i(s.expr,a),c),o(i(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let c=a;for(let u=0;u<s.min;u++){let f=n();o(i(s.expr,c),f),c=f}if(s.max==-1)o(i(s.expr,c),c);else for(let u=s.min;u<s.max;u++){let f=n();r(c,f),o(i(s.expr,c),f),c=f}return[r(c)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function FT(t,e){return e-t}function RT(t,e){let n=[];return r(e),n.sort(FT);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:c}=i[s];!a&&n.indexOf(c)==-1&&r(c)}}}function s6(t){let e=Object.create(null);return n(RT(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:a,to:c})=>{if(!a)return;let u;for(let f=0;f<o.length;f++)o[f][0]==a&&(u=o[f][1]);RT(t,c).forEach(f=>{u||o.push([a,u=[]]),u.indexOf(f)==-1&&u.push(f)})})});let i=e[r.join(",")]=new fa(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let a=o[s][1].sort(FT);i.next.push({type:o[s][0],next:e[a.join(",")]||n(a)})}return i}}function a6(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:c,next:u}=o.next[a];s.push(c.name),i&&!(c.isText||c.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 BT(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 VT(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 zT(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 HT(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new c6(t,r,e[r]);return n}let WT=class WI{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=HT(e,r.attrs),this.defaultAttrs=BT(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==fa.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:VT(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ai(this,this.computeAttrs(e),Me.from(n),Gt.setFrom(r))}createChecked(e=null,n,r){return n=Me.from(n),this.checkContent(n),new Ai(this,this.computeAttrs(e),n,Gt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=Me.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(Me.empty,!0);return i?new Ai(this,e,n.append(i),Gt.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){zT(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:Gt.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new WI(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 l6(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 c6{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?l6(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Yf{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=HT(e,o.attrs),this.excluded=null;let i=BT(this.attrs);this.instance=i?new Gt(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Gt(this,VT(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new Yf(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){zT(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let jT=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=Jn.from(e.nodes),n.marks=Jn.from(e.marks||{}),this.nodes=WT.compile(this.spec.nodes,this),this.marks=Yf.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]=fa.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?UT(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==""?[]:UT(this,s.split(" "))}this.nodeFromJSON=o=>Ai.fromJSON(this,o),this.markFromJSON=o=>Gt.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 WT){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 Kf(r,r.defaultAttrs,e,Gt.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 UT(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 c=t.marks[a];(o=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function u6(t){return t.tag!=null}function d6(t){return t.style!=null}class ps{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(u6(o))this.tags.push(o);else if(d6(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 GT(this,n,!1);return r.addAll(e,Gt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new GT(this,n,!0);return r.addAll(e,Gt.none,n.from,n.to),Ve.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(h6(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 c=s.getAttrs(n);if(c===!1)continue;s.attrs=c||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=JT(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=JT(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new ps(e,ps.schemaRules(e)))}}const qT={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},f6={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},KT={ol:!0,ul:!0},iu=1,by=2,su=4;function YT(t,e,n){return e!=null?(e?iu:0)|(e==="full"?by:0):t&&t.whitespace=="pre"?iu|by:n&~su}class Gf{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=Gt.none,this.match=i||(s&su?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Me.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&iu)){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=Me.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Me.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&&!qT.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class GT{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=YT(null,n.preserveWhitespace,0)|(r?su:0);o?i=new Gf(o.type,o.attrs,Gt.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new Gf(null,null,Gt.none,!0,null,s):i=new Gf(e.schema.topNodeType,null,Gt.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&by?"full":this.localPreserveWS||(o.options&iu)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
244
|
-
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let c=0;c<a.length;c++)c&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[c]&&this.insertNode(s.text(a[c]),n,!/\S/.test(a[c]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=o.content[o.content.length-1],c=e.previousSibling;(!a||c&&c.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.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;KT.hasOwnProperty(s)&&this.parser.normalizeLists&&p6(e);let c=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(c?c.ignore:f6.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!c||c.skip||c.closeParent){c&&c.closeParent?this.open=Math.max(0,this.open-1):c&&c.skip.nodeType&&(e=c.skip);let u,f=this.needsBlock;if(qT.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=c&&c.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,c,u,c.consuming===!1?a:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
245
|
-
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let a=void 0;;){let c=this.parser.matchStyle(i,s,this,a);if(!c)break;if(c.ignore)return null;if(c.clearMark?n=n.filter(u=>!c.clearMark(u)):n=n.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)a=c;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 c=this.enter(s,n.attrs||null,r,n.preserveWhitespace);c&&(i=!0,r=c)}else{let c=this.parser.schema.marks[n.mark];r=r.concat(c.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(c=>this.insertNode(c,r,!1));else{let c=e;typeof n.contentElement=="string"?c=e.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(e):n.contentElement&&(c=n.contentElement),this.findAround(e,c,!0),this.addAll(c,r),this.findAround(e,c,!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 c=this.nodes[s],u=c.findWrapping(e);if(u&&(!o||o.length>u.length+a)&&(o=u,i=c,!u.length))break;if(c.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=Gt.none;for(let a of o.concat(e.marks))(i.type?i.type.allowsMarkType(a.type):XT(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=YT(e,i,s.options);s.options&su&&s.content.length==0&&(a|=su);let c=Gt.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):XT(u.type,e))?(c=u.addToSet(c),!1):!0),this.nodes.push(new Gf(e,n,c,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|=iu)}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,c)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;c>=i;c--)if(s(a-1,c))return!0;return!1}else{let f=c>0||c==0&&o?this.nodes[c].type:r&&c>=i?r.node(c-i).type:null;if(!f||f.name!=u&&!f.isInGroup(u))return!1;c--}}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 p6(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&KT.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function h6(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function JT(t){let e={};for(let n in t)e[n]=t[n];return e}function XT(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 c=0;c<a.edgeCount;c++){let{type:u,next:f}=a.edge(c);if(u==e||i.indexOf(f)<0&&s(f))return!0}};if(s(o.contentMatch))return!0}}class pa{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=vy(n).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let a=0,c=0;for(;a<i.length&&c<s.marks.length;){let u=s.marks[c];if(!this.marks[u.type.name]){c++;continue}if(!u.eq(i[a][0])||u.type.spec.spanning===!1)break;a++,c++}for(;a<i.length;)o=i.pop()[1];for(;c<s.marks.length;){let u=s.marks[c++],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}=Jf(vy(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&&Jf(vy(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return Jf(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new pa(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=ZT(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return ZT(e.marks)}}function ZT(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function vy(t){return t.document||window.document}const QT=new WeakMap;function m6(t){let e=QT.get(t);return e===void 0&&QT.set(t,e=g6(t)),e}function g6(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 Jf(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=m6(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,c=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?c.setAttributeNS(p.slice(0,m),p.slice(m+1),u[p]):p=="style"&&c.style?c.style.cssText=u[p]:c.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:c,contentDOM:c}}else{let{dom:y,contentDOM:b}=Jf(t,m,n,r);if(c.appendChild(y),b){if(a)throw new RangeError("Multiple content holes");a=b}}}return{dom:c,contentDOM:a}}const ek=65535,tk=Math.pow(2,16);function y6(t,e){return t+e*tk}function nk(t){return t&ek}function b6(t){return(t-(t&ek))/tk}const rk=1,ok=2,Xf=4,ik=8;class xy{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&ik)>0}get deletedBefore(){return(this.delInfo&(rk|Xf))>0}get deletedAfter(){return(this.delInfo&(ok|Xf))>0}get deletedAcross(){return(this.delInfo&Xf)>0}}class Wr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Wr.empty)return Wr.empty}recover(e){let n=0,r=nk(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+b6(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 c=this.ranges[a]-(this.inverted?o:0);if(c>e)break;let u=this.ranges[a+i],f=this.ranges[a+s],p=c+u;if(e<=p){let m=u?e==c?-1:e==p?1:n:n,y=c+o+(m<0?0:f);if(r)return y;let b=e==(n<0?c:p)?null:y6(a/3,e-c),g=e==c?ok:e==p?rk:Xf;return(n<0?e!=c:e!=p)&&(g|=ik),new xy(y,g,b)}o+=f-u}return r?e+o:new xy(e+o,0,null)}touches(e,n){let r=0,o=nk(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let c=this.ranges[a]-(this.inverted?r:0);if(c>e)break;let u=this.ranges[a+i],f=c+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),c=s+(this.inverted?0:i),u=this.ranges[o+n],f=this.ranges[o+r];e(a,a+u,c,c+f),i+=f-u}}invert(){return new Wr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Wr.empty:new Wr(e<0?[0,-e,0]:[0,0,e])}}Wr.empty=new Wr([]);class au{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 au(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 au;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 c=this.getMirror(i);if(c!=null&&c>i&&c<this.to){i=c,e=this._maps[c].recover(a.recover);continue}}o|=a.delInfo,e=a.pos}return r?e:new xy(e,o,null)}}const Sy=Object.create(null);class lr{getMap(){return Wr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Sy[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 Sy)throw new RangeError("Duplicate use of step JSON ID "+e);return Sy[e]=n,n.prototype.jsonID=e,n}}class Pn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Pn(e,null)}static fail(e){return new Pn(null,e)}static fromReplace(e,n,r,o){try{return Pn.ok(e.replace(n,r,o))}catch(i){if(i instanceof jf)return Pn.fail(i.message);throw i}}}function wy(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(wy(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return Me.fromArray(r)}class hs extends lr{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 Ve(wy(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 Pn.fromReplace(e,this.from,this.to,i)}invert(){return new ni(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 hs(n.pos,r.pos,this.mark)}merge(e){return e instanceof hs&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new hs(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 hs(n.from,n.to,e.markFromJSON(n.mark))}}lr.jsonID("addMark",hs);class ni extends lr{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 Ve(wy(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return Pn.fromReplace(e,this.from,this.to,r)}invert(){return new hs(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 ni(n.pos,r.pos,this.mark)}merge(e){return e instanceof ni&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ni(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 ni(n.from,n.to,e.markFromJSON(n.mark))}}lr.jsonID("removeMark",ni);class ms extends lr{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Pn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Pn.fromReplace(e,this.pos,this.pos+1,new Ve(Me.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 ms(this.pos,n.marks[o]);return new ms(this.pos,this.mark)}}return new ha(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ms(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 ms(n.pos,e.markFromJSON(n.mark))}}lr.jsonID("addNodeMark",ms);class ha extends lr{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Pn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Pn.fromReplace(e,this.pos,this.pos+1,new Ve(Me.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new ms(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ha(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 ha(n.pos,e.markFromJSON(n.mark))}}lr.jsonID("removeNodeMark",ha);class jn extends lr{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&Cy(e,this.from,this.to)?Pn.fail("Structure replace would overwrite content"):Pn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Wr([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?Ve.empty:new Ve(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?Ve.empty:new Ve(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,Ve.fromJSON(e,n.slice),!!n.structure)}}lr.jsonID("replace",jn);class Un extends lr{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&&(Cy(e,this.from,this.gapFrom)||Cy(e,this.gapTo,this.to)))return Pn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Pn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Pn.fromReplace(e,this.from,this.to,r):Pn.fail("Content does not fit in gap")}getMap(){return new Wr([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 Un(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 Un(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 Un(n.from,n.to,n.gapFrom,n.gapTo,Ve.fromJSON(e,n.slice),n.insert,!!n.structure)}}lr.jsonID("replaceAround",Un);function Cy(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 v6(t,e,n,r){let o=[],i=[],s,a;t.doc.nodesBetween(e,n,(c,u,f)=>{if(!c.isInline)return;let p=c.marks;if(!r.isInSet(p)&&f.type.allowsMarkType(r.type)){let m=Math.max(u,e),y=Math.min(u+c.nodeSize,n),b=r.addToSet(p);for(let g=0;g<p.length;g++)p[g].isInSet(b)||(s&&s.to==m&&s.mark.eq(p[g])?s.to=y:o.push(s=new ni(m,y,p[g])));a&&a.to==m?a.to=y:i.push(a=new hs(m,y,r))}}),o.forEach(c=>t.step(c)),i.forEach(c=>t.step(c))}function x6(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,a)=>{if(!s.isInline)return;i++;let c=null;if(r instanceof Yf){let u=s.marks,f;for(;f=r.isInSet(u);)(c||(c=[])).push(f),u=f.removeFromSet(u)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let u=Math.min(a+s.nodeSize,n);for(let f=0;f<c.length;f++){let p=c[f],m;for(let y=0;y<o.length;y++){let b=o[y];b.step==i-1&&p.eq(o[y].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 ni(s.from,s.to,s.style)))}function Ty(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],a=e+1;for(let c=0;c<i.childCount;c++){let u=i.child(c),f=a+u.nodeSize,p=r.matchType(u.type);if(!p)s.push(new jn(a,f,Ve.empty));else{r=p;for(let m=0;m<u.marks.length;m++)n.allowsMarkType(u.marks[m].type)||t.step(new ni(a,f,u.marks[m]));if(o&&u.isText&&n.whitespace!="pre"){let m,y=/\r?\n|\r/g,b;for(;m=y.exec(u.text);)b||(b=new Ve(Me.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 c=r.fillBefore(Me.empty,!0);t.replace(a,a,new Ve(c,0,0))}for(let c=s.length-1;c>=0;c--)t.step(s[c])}function S6(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function _l(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,o=0,i=0;;--r){let s=t.$from.node(r),a=t.$from.index(r)+o,c=t.$to.indexAfter(r)-i;if(r<t.depth&&s.canReplace(a,c,n))return r;if(r==0||s.type.spec.isolating||!S6(s,a,c))break;a&&(o=1),c<s.childCount&&(i=1)}return null}function w6(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),a=o.after(i+1),c=s,u=a,f=Me.empty,p=0;for(let b=i,g=!1;b>n;b--)g||r.index(b)>0?(g=!0,f=Me.from(r.node(b).copy(f)),p++):c--;let m=Me.empty,y=0;for(let b=i,g=!1;b>n;b--)g||o.after(b+1)<o.end(b)?(g=!0,m=Me.from(o.node(b).copy(m)),y++):u++;t.step(new Un(c,u,s,a,new Ve(f.append(m),p,y),f.size-p,!0))}function ky(t,e,n=null,r=t){let o=C6(t,e),i=o&&T6(r,e);return i?o.map(sk).concat({type:e,attrs:n}).concat(i.map(sk)):null}function sk(t){return{type:t,attrs:null}}function C6(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 T6(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 c=(s.length?s[s.length-1]:e).contentMatch;for(let u=r;c&&u<o;u++)c=c.matchType(n.child(u).type);return!c||!c.validEnd?null:s}function k6(t,e,n){let r=Me.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=Me.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new Un(o,i,o,i,new Ve(r,0,0),n.length,!0))}function E6(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 c=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,c)&&_6(t.doc,t.mapping.slice(i).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let y=r.whitespace=="pre",b=!!r.contentMatch.matchType(r.schema.linebreakReplacement);y&&!b?u=!1:!y&&b&&(u=!0)}u===!1&&lk(t,s,a,i),Ty(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 Un(p,m,p+1,m-1,new Ve(Me.from(r.create(c,null,s.marks)),0,0),1,!0)),u===!0&&ak(t,s,a,i),!1}})}function ak(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 c=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function lk(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
246
|
-
`))}})}function _6(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function O6(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 Un(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new Ve(Me.from(s),0,0),1,!0))}function Di(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 y=p.content.cutByIndex(m,p.childCount),b=r&&r[f+1];b&&(y=y.replaceChild(0,b.type.create(b.attrs)));let g=r&&r[f]||p;if(!p.canReplace(m+1,p.childCount)||!g.type.validContent(y))return!1}let a=o.indexAfter(i),c=r&&r[0];return o.node(i).canReplaceWith(a,a,c?c.type:o.node(i+1).type)}function M6(t,e,n=1,r){let o=t.doc.resolve(e),i=Me.empty,s=Me.empty;for(let a=o.depth,c=o.depth-n,u=n-1;a>c;a--,u--){i=Me.from(o.node(a).copy(i));let f=r&&r[u];s=Me.from(f?f.type.create(f.attrs,s):o.node(a).copy(s))}t.step(new jn(e,e,new Ve(i.append(s),n,n),!0))}function gs(t,e){let n=t.resolve(e),r=n.index();return ck(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function A6(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 ck(t,e){return!!(t&&e&&!t.isLeaf&&A6(t,e))}function Zf(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&&ck(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 D6(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);lk(t,f.node(),f.before(),a)}s.inlineContent&&Ty(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let c=t.mapping.slice(a),u=c.map(e-n);if(t.step(new jn(u,c.map(e+n,-1),Ve.empty,!0)),r===!0){let f=t.doc.resolve(u);ak(t,f.node(),f.before(),t.steps.length)}return t}function I6(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 uk(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,c=r.index(s)+(a>0?1:0),u=r.node(s),f=!1;if(i==1)f=u.canReplace(c,c,o);else{let p=u.contentMatchAt(c).findWrapping(o.firstChild.type);f=p&&u.canReplaceWith(c,c,p[0])}if(f)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Qf(t,e,n=e,r=Ve.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return dk(o,i,r)?new jn(e,n,r):new P6(o,i,r).fit()}function dk(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class P6{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Me.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=Me.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 c=new Ve(i,s,a);return e>-1?new Un(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new jn(r.pos,o.pos,c):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=Ey(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:c,match:u}=this.frontier[a],f,p=null;if(n==1&&(s?u.matchType(s.type)||(p=u.fillBefore(Me.from(s),!1)):i&&c.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=Ey(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Ve(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=Ey(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new Ve(lu(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Ve(lu(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 g=0;g<i.length;g++)this.openFrontierNode(i[g]);let s=this.unplaced,a=r?r.content:s.content,c=s.openStart-e,u=0,f=[],{match:p,type:m}=this.frontier[n];if(o){for(let g=0;g<o.childCount;g++)f.push(o.child(g));p=p.matchFragment(o)}let y=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let g=a.child(u),x=p.matchType(g.type);if(!x)break;u++,(u>1||c==0||g.content.size)&&(p=x,f.push(fk(g.mark(m.allowedMarks(g.marks)),u==1?c:0,u==a.childCount?y:-1)))}let b=u==a.childCount;b||(y=-1),this.placed=cu(this.placed,n,Me.from(f)),this.frontier[n].match=p,b&&y<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,x=a;g<y;g++){let w=x.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),x=w.content}this.unplaced=b?e==0?Ve.empty:new Ve(lu(s.content,e-1,1),e-1,y<0?s.openEnd:e-1):new Ve(lu(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||!_y(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=_y(e,n,o,r,i);if(s){for(let a=n-1;a>=0;a--){let{match:c,type:u}=this.frontier[a],f=_y(e,a,u,c,!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=cu(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=cu(this.placed,this.depth,Me.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Me.empty,!0);n.childCount&&(this.placed=cu(this.placed,this.frontier.length,n))}}function lu(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(lu(t.firstChild.content,e-1,n)))}function cu(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(cu(t.lastChild.content,e-1,n)))}function Ey(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function fk(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,fk(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(Me.empty,!0)))),t.copy(r)}function _y(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&&!N6(n,i.content,s)?a:null}function N6(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function $6(t){return t.spec.defining||t.spec.definingForContent}function L6(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(dk(o,i,r))return t.step(new jn(e,n,r));let s=hk(o,i);s[s.length-1]==0&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let m=o.depth,y=o.pos-1;m>0;m--,y--){let b=o.node(m).type.spec;if(b.defining||b.definingAsContext||b.isolating)break;s.indexOf(m)>-1?a=m:o.before(m)==y&&s.splice(1,0,-m)}let c=s.indexOf(a),u=[],f=r.openStart;for(let m=r.content,y=0;;y++){let b=m.firstChild;if(u.push(b),y==r.openStart)break;m=b.content}for(let m=f-1;m>=0;m--){let y=u[m],b=$6(y.type);if(b&&!y.sameMarkup(o.node(Math.abs(a)-1)))f=m;else if(b||!y.type.isTextblock)break}for(let m=r.openStart;m>=0;m--){let y=(m+f+1)%(r.openStart+1),b=u[y];if(b)for(let g=0;g<s.length;g++){let x=s[(g+c)%s.length],w=!0;x<0&&(w=!1,x=-x);let E=o.node(x-1),T=o.index(x-1);if(E.canReplaceWith(T,T,b.type,b.marks))return t.replace(o.before(x),w?i.after(x):n,new Ve(pk(r.content,0,r.openStart,y),y,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 y=s[m];y<0||(e=o.before(y),n=i.after(y))}}function pk(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(pk(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(Me.empty,!0))}return t}function F6(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=I6(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new Ve(Me.from(r),0,0))}function R6(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=hk(r,o);for(let s=0;s<i.length;s++){let a=i[s],c=s==i.length-1;if(c&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),o.end(a));if(a>0&&(c||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 hk(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 Ol extends lr{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 Pn.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 Pn.fromReplace(e,this.pos,this.pos+1,new Ve(Me.from(o),0,n.isLeaf?0:1))}getMap(){return Wr.empty}invert(e){return new Ol(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 Ol(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 Ol(n.pos,n.attr,n.value)}}lr.jsonID("attr",Ol);class uu extends lr{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 Pn.ok(r)}getMap(){return Wr.empty}invert(e){return new uu(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 uu(n.attr,n.value)}}lr.jsonID("docAttr",uu);let Ml=class extends Error{};Ml=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},Ml.prototype=Object.create(Error.prototype),Ml.prototype.constructor=Ml,Ml.prototype.name="TransformError";class Oy{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new au}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Ml(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=Ve.empty){let o=Qf(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new Ve(Me.from(r),0,0))}delete(e,n){return this.replace(e,n,Ve.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return L6(this,e,n,r),this}replaceRangeWith(e,n,r){return F6(this,e,n,r),this}deleteRange(e,n){return R6(this,e,n),this}lift(e,n){return w6(this,e,n),this}join(e,n=1){return D6(this,e,n),this}wrap(e,n){return k6(this,e,n),this}setBlockType(e,n=e,r,o=null){return E6(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return O6(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new Ol(e,n,r)),this}setDocAttribute(e,n){return this.step(new uu(e,n)),this}addNodeMark(e,n){return this.step(new ms(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 Gt)n.isInSet(r.marks)&&this.step(new ha(e,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new ha(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 M6(this,e,n,r),this}addMark(e,n,r){return v6(this,e,n,r),this}removeMark(e,n,r){return x6(this,e,n,r),this}clearIncompatible(e,n,r){return Ty(this,e,n,r),this}}const My=Object.create(null);class dt{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new mk(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=Ve.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:c,$to:u}=s[a],f=e.mapping.slice(i);e.replaceRange(f.map(c.pos),f.map(u.pos),a?Ve.empty:n),a==0&&bk(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],c=e.mapping.slice(r),u=c.map(s.pos),f=c.map(a.pos);i?e.deleteRange(u,f):(e.replaceRangeWith(u,f,n),bk(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new ot(e):Al(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?Al(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Al(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 jr(e.node(0))}static atStart(e){return Al(e,e,0,0,1)||new jr(e)}static atEnd(e){return Al(e,e,e.content.size,e.childCount,-1)||new jr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=My[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 My)throw new RangeError("Duplicate use of selection JSON ID "+e);return My[e]=n,n.prototype.jsonID=e,n}getBookmark(){return ot.between(this.$anchor,this.$head).getBookmark()}}dt.prototype.visible=!0;class mk{constructor(e,n){this.$from=e,this.$to=n}}let gk=!1;function yk(t){!gk&&!t.parent.inlineContent&&(gk=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class ot extends dt{constructor(e,n=e){yk(e),yk(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 dt.near(r);let o=e.resolve(n.map(this.anchor));return new ot(o.parent.inlineContent?o:r,r)}replace(e,n=Ve.empty){if(super.replace(e,n),n==Ve.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof ot&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new ep(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 ot(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=dt.findFrom(n,r,!0)||dt.findFrom(n,-r,!0);if(i)n=i.$head;else return dt.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(dt.findFrom(e,-r,!0)||dt.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new ot(e,n)}}dt.jsonID("text",ot);class ep{constructor(e,n){this.anchor=e,this.head=n}map(e){return new ep(e.map(this.anchor),e.map(this.head))}resolve(e){return ot.between(e.resolve(this.anchor),e.resolve(this.head))}}class nt extends dt{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?dt.near(i):new nt(i)}content(){return new Ve(Me.from(this.node),0,0)}eq(e){return e instanceof nt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Ay(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new nt(e.resolve(n.anchor))}static create(e,n){return new nt(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}nt.prototype.visible=!1,dt.jsonID("node",nt);class Ay{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new ep(r,r):new Ay(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&nt.isSelectable(r)?new nt(n):dt.near(n)}}class jr extends dt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Ve.empty){if(n==Ve.empty){e.delete(0,e.doc.content.size);let r=dt.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new jr(e)}map(e){return new jr(e)}eq(e){return e instanceof jr}getBookmark(){return B6}}dt.jsonID("all",jr);const B6={map(){return this},resolve(t){return new jr(t)}};function Al(t,e,n,r,o,i=!1){if(e.inlineContent)return ot.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&&nt.isSelectable(a))return nt.create(t,n-(o<0?a.nodeSize:0))}else{let c=Al(t,a,n+o,o<0?a.childCount:0,o,i);if(c)return c}n+=a.nodeSize*o}return null}function bk(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof jn||o instanceof Un))return;let i=t.mapping.maps[r],s;i.forEach((a,c,u,f)=>{s==null&&(s=f)}),t.setSelection(dt.near(t.doc.resolve(s),n))}const vk=1,tp=2,xk=4;class V6 extends Oy{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|vk)&~tp,this.storedMarks=null,this}get selectionSet(){return(this.updated&vk)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=tp,this}ensureMarks(e){return Gt.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&tp)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~tp,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)||Gt.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),!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.selection.to==n+e.length&&this.setSelection(dt.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|=xk,this}get scrolledIntoView(){return(this.updated&xk)>0}}function Sk(t,e){return!e||!t?t:t.bind(e)}class du{constructor(e,n,r){this.name=e,this.init=Sk(n.init,r),this.apply=Sk(n.apply,r)}}const z6=[new du("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new du("selection",{init(t,e){return t.selection||dt.atStart(e.doc)},apply(t){return t.selection}}),new du("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new du("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Dy{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=z6.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 du(r.key,r.spec.state,r))})}}class Dl{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 c=o?o[s].n:0,u=o?o[s].state:this,f=c<n.length&&a.spec.appendTransaction.call(a,c?n.slice(c):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 Dl(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 V6(this)}static create(e){let n=new Dy(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Dl(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 Dy(this.schema,e.plugins),r=n.fields,o=new Dl(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 Dy(e.schema,e.plugins),i=new Dl(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Ai.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=dt.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 c=r[a],u=c.spec.state;if(c.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[s.name]=u.fromJSON.call(c,e,n[a],i);return}}i[s.name]=s.init(e,i)}}),i}}function wk(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=wk(o,e,{})),n[r]=o}return n}class bn{constructor(e){this.spec=e,this.props={},e.props&&wk(e.props,this,this.props),this.key=e.key?e.key.key:Ck("plugin")}getState(e){return e[this.key]}}const Iy=Object.create(null);function Ck(t){return t in Iy?t+"$"+ ++Iy[t]:(Iy[t]=0,t+"$")}class Nn{constructor(e="key"){this.key=Ck(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Xn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Il=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Py=null;const Ii=function(t,e,n){let r=Py||(Py=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},H6=function(){Py=null},ma=function(t,e,n,r){return n&&(Tk(t,e,n,r,-1)||Tk(t,e,n,r,1))},W6=/^(img|br|input|textarea|hr)$/i;function Tk(t,e,n,r,o){for(var i;;){if(t==n&&e==r)return!0;if(e==(o<0?0:bo(t))){let s=t.parentNode;if(!s||s.nodeType!=1||fu(t)||W6.test(t.nodeName)||t.contentEditable=="false")return!1;e=Xn(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?bo(t):0}else return!1}}function bo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function j6(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=bo(t)}else if(t.parentNode&&!fu(t))e=Xn(t),t=t.parentNode;else return null}}function U6(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&&!fu(t))e=Xn(t)+1,t=t.parentNode;else return null}}function q6(t,e,n){for(let r=e==0,o=e==bo(t);r||o;){if(t==n)return!0;let i=Xn(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==bo(t)}}function fu(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 np=function(t){return t.focusNode&&ma(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ga(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function K6(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Y6(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(bo(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(bo(r.startContainer),r.startOffset)}}}const ri=typeof navigator<"u"?navigator:null,kk=typeof document<"u"?document:null,ys=ri&&ri.userAgent||"",Ny=/Edge\/(\d+)/.exec(ys),Ek=/MSIE \d/.exec(ys),$y=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ys),Mr=!!(Ek||$y||Ny),bs=Ek?document.documentMode:$y?+$y[1]:Ny?+Ny[1]:0,vo=!Mr&&/gecko\/(\d+)/i.test(ys);vo&&+(/Firefox\/(\d+)/.exec(ys)||[0,0])[1];const Ly=!Mr&&/Chrome\/(\d+)/.exec(ys),qn=!!Ly,_k=Ly?+Ly[1]:0,cr=!Mr&&!!ri&&/Apple Computer/.test(ri.vendor),Pl=cr&&(/Mobile\/\w+/.test(ys)||!!ri&&ri.maxTouchPoints>2),xo=Pl||(ri?/Mac/.test(ri.platform):!1),Ok=ri?/Win/.test(ri.platform):!1,Pi=/Android \d/.test(ys),pu=!!kk&&"webkitFontSmoothing"in kk.documentElement.style,G6=pu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function J6(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 Ni(t,e){return typeof t=="number"?t:t[e]}function X6(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 Mk(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=Il(s);continue}let a=s,c=a==i.body,u=c?J6(i):X6(a),f=0,p=0;if(e.top<u.top+Ni(r,"top")?p=-(u.top-e.top+Ni(o,"top")):e.bottom>u.bottom-Ni(r,"bottom")&&(p=e.bottom-e.top>u.bottom-u.top?e.top+Ni(o,"top")-u.top:e.bottom-u.bottom+Ni(o,"bottom")),e.left<u.left+Ni(r,"left")?f=-(u.left-e.left+Ni(o,"left")):e.right>u.right-Ni(r,"right")&&(f=e.right-u.right+Ni(o,"right")),f||p)if(c)i.defaultView.scrollBy(f,p);else{let y=a.scrollLeft,b=a.scrollTop;p&&(a.scrollTop+=p),f&&(a.scrollLeft+=f);let g=a.scrollLeft-y,x=a.scrollTop-b;e={left:e.left-g,top:e.top-x,right:e.right-g,bottom:e.bottom-x}}let m=c?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(m))break;s=m=="absolute"?s.offsetParent:Il(s)}}function Z6(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 c=a.getBoundingClientRect();if(c.top>=n-20){r=a,o=c.top;break}}return{refDOM:r,refTop:o,stack:Ak(t.dom)}}function Ak(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Il(r));return e}function Q6({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;Dk(n,r==0?0:r-e)}function Dk(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 Nl=null;function e9(t){if(t.setActive)return t.setActive();if(Nl)return t.focus(Nl);let e=Ak(t);t.focus(Nl==null?{get preventScroll(){return Nl={preventScroll:!0},!0}}:void 0),Nl||(Nl=!1,Dk(e,0))}function Ik(t,e){let n,r=2e8,o,i=0,s=e.top,a=e.top,c,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=Ii(f).getClientRects();else continue;for(let y=0;y<m.length;y++){let b=m[y];if(b.top<=s&&b.bottom>=a){s=Math.max(b.bottom,s),a=Math.min(b.top,a);let g=b.left>e.left?b.left-e.left:b.right<e.left?e.left-b.right:0;if(g<r){n=f,r=g,o=g&&n.nodeType==3?{left:b.right<e.left?b.right:b.left,top:e.top}:e,f.nodeType==1&&g&&(i=p+(e.left>=(b.left+b.right)/2?1:0));continue}}else b.top>e.top&&!c&&b.left<=e.left&&b.right>=e.left&&(c=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&&c&&(n=c,o=u,r=0),n&&n.nodeType==3?t9(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:Ik(n,o)}function t9(t,e){let n=t.nodeValue.length,r=document.createRange(),o;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let s=vs(r,1);if(s.top!=s.bottom&&Fy(e,s)){o={node:t,offset:i+(e.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:t,offset:0}}function Fy(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function n9(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function r9(t,e,n){let{node:r,offset:o}=Ik(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 o9(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let a=t.docView.nearestDesc(i,!0),c;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((c=a.dom.getBoundingClientRect()).width||c.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&c.left>r.left||c.top>r.top?o=a.posBefore:(!s&&c.right<r.left||c.bottom<r.top)&&(o=a.posAfter),s=!0),!a.contentDOM&&o<0&&!a.node.isText))return(a.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?a.posBefore:a.posAfter;i=a.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function Pk(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 c=0;c<a.length;c++){let u=a[c];if(Fy(e,u))return Pk(s,e,u)}}if((i=(i+1)%r)==o)break}return t}function i9(t,e){let n=t.dom.ownerDocument,r,o=0,i=Y6(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(!Fy(e,u)||(s=Pk(t.dom,e,u),!s))return null}if(cr)for(let u=s;r&&u;u=Il(u))u.draggable&&(r=void 0);if(s=n9(s,e),r){if(vo&&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;pu&&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=o9(t,r,o,e))}a==null&&(a=r9(t,s,e));let c=t.docView.nearestDesc(s,!0);return{pos:a,inside:c?c.posAtStart-c.border:-1}}function Nk(t){return t.top<t.bottom||t.left<t.right}function vs(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(Nk(r))return r}return Array.prototype.find.call(n,Nk)||t.getBoundingClientRect()}const s9=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function $k(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=pu||vo;if(r.nodeType==3)if(s&&(s9.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let c=vs(Ii(r,o,o),n);if(vo&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let u=vs(Ii(r,o-1,o-1),-1);if(u.top==c.top){let f=vs(Ii(r,o,o+1),-1);if(f.top!=c.top)return hu(f,f.left<u.left)}}return c}else{let c=o,u=o,f=n<0?1:-1;return n<0&&!o?(u++,f=-1):n>=0&&o==r.nodeValue.length?(c--,f=1):n<0?c--:u++,hu(vs(Ii(r,c,u),f),f<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==bo(r))){let c=r.childNodes[o-1];if(c.nodeType==1)return Ry(c.getBoundingClientRect(),!1)}if(i==null&&o<bo(r)){let c=r.childNodes[o];if(c.nodeType==1)return Ry(c.getBoundingClientRect(),!0)}return Ry(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==bo(r))){let c=r.childNodes[o-1],u=c.nodeType==3?Ii(c,bo(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(u)return hu(vs(u,1),!1)}if(i==null&&o<bo(r)){let c=r.childNodes[o];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let u=c?c.nodeType==3?Ii(c,0,s?0:1):c.nodeType==1?c:null:null;if(u)return hu(vs(u,-1),!0)}return hu(vs(r.nodeType==3?Ii(r):r,-n),n>=0)}function hu(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 Ry(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 Lk(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 a9(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return Lk(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=$k(t,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let c;if(a.nodeType==1)c=a.getClientRects();else if(a.nodeType==3)c=Ii(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<c.length;u++){let f=c[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 l9=/[\u0590-\u08ac]/;function c9(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?!l9.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:Lk(t,e,()=>{let{focusNode:c,focusOffset:u,anchorNode:f,anchorOffset:p}=t.domSelectionRange(),m=a.caretBidiLevel;a.modify("move",n,"character");let y=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:b,focusOffset:g}=t.domSelectionRange(),x=b&&!y.contains(b.nodeType==1?b:b.parentNode)||c==b&&u==g;try{a.collapse(f,p),c&&(c!=f||u!=p)&&a.extend&&a.extend(c,u)}catch{}return m!=null&&(a.caretBidiLevel=m),x}):r.pos==r.start()||r.pos==r.end()}let Fk=null,Rk=null,Bk=!1;function u9(t,e,n){return Fk==e&&Rk==n?Bk:(Fk=e,Rk=n,Bk=n=="up"||n=="down"?a9(t,e,n):c9(t,e,n))}const So=0,Vk=1,ya=2,oi=3;class mu{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=So,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>Xn(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 Wk){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 zk&&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?Xn(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?Xn(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 c=this.children[a],u=s+c.size;if(o==-1&&e<=u){let f=s+c.border;if(e>=f&&n<=u-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.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=Xn(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=Xn(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 y=0,b=0;y<this.children.length;y++){let g=this.children[y],x=b+g.size;if(i>b&&s<x)return g.setSelection(e-b-g.border,n-b-g.border,r,o);b=x}let a=this.domFromPos(e,e?-1:1),c=n==e?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),f=r.domSelectionRange(),p=!1;if((vo||cr)&&e==n){let{node:y,offset:b}=a;if(y.nodeType==3){if(p=!!(b&&y.nodeValue[b-1]==`
|
|
247
|
-
`),p&&b==y.nodeValue.length)for(let g=y,x;g;g=g.parentNode){if(x=g.nextSibling){x.nodeName=="BR"&&(a=c={node:x.parentNode,offset:Xn(x)+1});break}let w=g.pmViewDesc;if(w&&w.node&&w.node.isBlock)break}}else{let g=y.childNodes[b-1];p=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(vo&&f.focusNode&&f.focusNode!=c.node&&f.focusNode.nodeType==1){let y=f.focusNode.childNodes[f.focusOffset];y&&y.contentEditable=="false"&&(o=!0)}if(!(o||p&&cr)&&ma(a.node,a.offset,f.anchorNode,f.anchorOffset)&&ma(c.node,c.offset,f.focusNode,f.focusOffset))return;let m=!1;if((u.extend||e==n)&&!(p&&vo)){u.collapse(a.node,a.offset);try{e!=n&&u.extend(c.node,c.offset),m=!0}catch{}}if(!m){if(e>n){let b=a;a=c,c=b}let y=document.createRange();y.setEnd(c.node,c.offset),y.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(y)}}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,c=s-i.border;if(e>=a&&n<=c){this.dirty=e==r||n==s?ya:Vk,e==a&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=oi:i.markDirty(e-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?ya:oi}r=s}this.dirty=ya}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?ya:Vk;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class zk extends mu{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==So&&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 d9 extends mu{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 ba extends mu{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=pa.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new ba(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&oi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=oi&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=So){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=So}}slice(e,n,r){let o=ba.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=Vy(i,n,s,r)),e>0&&(i=Vy(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 xs extends mu{constructor(e,n,r,o,i,s,a,c,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],c,u=a&&a(n,i,()=>{if(!c)return s;if(c.parent)return c.parent.posBeforeChild(c)},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}=pa.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=qk(f,r,n),u?c=new f9(e,n,r,o,f,p||null,m,u,i,s+1):n.isText?new rp(e,n,r,o,f,m,i):new xs(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=()=>Me.empty)}return e}matchesNode(e,n,r){return this.dirty==So&&e.eq(this.node)&&op(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,c=new h9(this,s&&s.node,e);y9(this.node,this.innerDeco,(u,f,p)=>{u.spec.marks?c.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!p&&c.syncToMarks(f==this.node.childCount?Gt.none:this.node.child(f).marks,r,e),c.placeWidget(u,e,o)},(u,f,p,m)=>{c.syncToMarks(u.marks,r,e);let y;c.findNodeMatch(u,f,p,m)||a&&e.state.selection.from>o&&e.state.selection.to<o+u.nodeSize&&(y=c.findIndexWithChild(i.node))>-1&&c.updateNodeAt(u,f,p,y,e)||c.updateNextNode(u,f,p,e,m,o)||c.addNode(u,f,p,e,o),o+=u.nodeSize}),c.syncToMarks([],r,e),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==ya)&&(s&&this.protectLocalComposition(e,s),jk(this.contentDOM,this.children,e),Pl&&b9(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof ot)||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=v9(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 d9(this,i,n,o);e.input.compositionNodes.push(s),this.children=Vy(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==oi||!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=So}updateOuterDeco(e){if(op(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Uk(this.dom,this.nodeDOM,By(this.outerDeco,this.node,n),By(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.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Hk(t,e,n,r,o){qk(r,e,t);let i=new xs(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class rp extends xs{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==oi||this.dirty!=So&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=So||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=So,!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 rp(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=oi)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Wk extends mu{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==So&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class f9 extends xs{constructor(e,n,r,o,i,s,a,c,u,f){super(e,n,r,o,i,s,a,u,f),this.spec=c}update(e,n,r,o){if(this.dirty==oi)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 jk(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=Kk(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(a,r);if(s instanceof ba){let c=r?r.previousSibling:t.lastChild;jk(s.contentDOM,s.children,n),r=c?c.nextSibling:t.firstChild}}for(;r;)r=Kk(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const gu=function(t){t&&(this.nodeName=t)};gu.prototype=Object.create(null);const va=[new gu];function By(t,e,n){if(t.length==0)return va;let r=n?va[0]:new gu,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new gu(s.nodeName));for(let a in s){let c=s[a];c!=null&&(n&&o.length==1&&o.push(r=new gu(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+c:a=="style"?r.style=(r.style?r.style+";":"")+c:a!="nodeName"&&(r[a]=c))}}}return o}function Uk(t,e,n,r){if(n==va&&r==va)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],a=n[i];if(i){let c;a&&a.nodeName==s.nodeName&&o!=t&&(c=o.parentNode)&&c.nodeName.toLowerCase()==s.nodeName||(c=document.createElement(s.nodeName),c.pmIsDeco=!0,c.appendChild(o),a=va[0]),o=c}p9(o,a||va[0],s)}return o}function p9(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 qk(t,e,n){return Uk(t,t,va,By(e,n,t.nodeType!=1))}function op(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 Kk(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class h9{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=m9(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=So,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 c=this.index;c<Math.min(this.index+3,this.top.children.length);c++){let u=this.top.children[c];if(u.matchesMark(e[i])&&!this.isLocked(u.dom)){a=c;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let c=ba.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,c),this.top=c,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,c=Math.min(this.top.children.length,a+5);a<c;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==oi&&s.dom==s.contentDOM&&(s.dirty=ya),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 c=this.top.children[a];if(c instanceof xs){let u=this.preMatch.matched.get(c);if(u!=null&&u!=i)return!1;let f=c.dom,p,m=this.isLocked(f)&&!(e.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==e.text&&c.dirty!=oi&&op(n,c.outerDeco));if(!m&&c.update(e,n,r,o))return this.destroyBetween(this.index,a),c.dom!=f&&(this.changed=!0),this.index++,!0;if(!m&&(p=this.recreateWrapper(c,e,n,r,o,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=p,p.contentDOM&&(p.dirty=ya,p.updateChildren(o,s+1),p.dirty=So),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)||!op(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let a=xs.create(this.top,n,r,o,i,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let c of a.children)c.parent=a}return e.destroy(),a}addNode(e,n,r,o,i){let s=xs.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 zk(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 ba;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof rp)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((cr||qn)&&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 Wk(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 m9(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 ba)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 c=a.node;if(c){if(c!=t.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function g9(t,e){return t.type.side-e.type.side}function y9(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=[],c=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(g9);for(let x=0;x<p.length;x++)n(p[x],u,!!c)}else n(f,u,!!c);let m,y;if(c)y=-1,m=c,c=null;else if(u<t.childCount)y=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 w=0;w<a.length;w++)a[w].to<x&&(x=a[w].to);x<b&&(c=m.cut(x-i),m=m.cut(0,x-i),b=x,y=-1)}else for(;s<o.length&&o[s].to<b;)s++;let g=m.isInline&&!m.isLeaf?a.filter(x=>!x.inline):a.slice();r(m,g,e.forChild(i,m),y),i=b}}function b9(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 v9(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 c=s.text;for(;o<t.childCount;){let u=t.child(o++);if(i+=u.nodeSize,!u.isText)break;c+=u.text}if(i>=n){if(i>=r&&c.slice(r-e.length-a,r-a)==e)return r-e.length;let u=a<r?c.lastIndexOf(e,r-a-1):-1;if(u>=0&&u+e.length+a>=n)return a+u;if(n==r&&c.length>=r+e.length-a&&c.slice(r-a,r-a+e.length)==e)return r}}return-1}function Vy(t,e,n,r,o){let i=[];for(let s=0,a=0;s<t.length;s++){let c=t[s],u=a,f=a+=c.size;u>=n||f<=e?i.push(c):(u<e&&i.push(c.slice(0,e-u,r)),o&&(i.push(o),o=void 0),f>n&&i.push(c.slice(n-u,c.size,r)))}return i}function zy(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),c,u;if(np(n)){for(c=s;o&&!o.node;)o=o.parent;let p=o.node;if(o&&p.isAtom&&nt.isSelectable(p)&&o.parent&&!(p.isInline&&q6(n.focusNode,n.focusOffset,o.dom))){let m=o.posBefore;u=new nt(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 y=0;y<n.rangeCount;y++){let b=n.getRangeAt(y);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;[c,s]=m==t.state.selection.anchor?[m,p]:[p,m],a=r.resolve(s)}else c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let f=r.resolve(c);if(!u){let p=e=="pointer"||t.state.selection.head<a.pos&&!i?1:-1;u=Wy(t,f,a,p)}return u}function Yk(t){return t.editable?t.hasFocus():tE(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function $i(t,e=!1){let n=t.state.selection;if(Zk(t,n),!!Yk(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&qn){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&ma(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)S9(t);else{let{anchor:r,head:o}=n,i,s;Gk&&!(n instanceof ot)&&(n.$from.parent.inlineContent||(i=Jk(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Jk(t,n.to))),t.docView.setSelection(r,o,t,e),Gk&&(i&&Xk(i),s&&Xk(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&x9(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Gk=cr||qn&&_k<63;function Jk(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(cr&&o&&o.contentEditable=="false")return Hy(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return Hy(o);if(i)return Hy(i)}}function Hy(t){return t.contentEditable="true",cr&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Xk(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function x9(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(()=>{(!Yk(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function S9(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,Xn(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Mr&&bs<=11&&(n.disabled=!0,n.disabled=!1)}function Zk(t,e){if(e instanceof nt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Qk(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Qk(t)}function Qk(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Wy(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||ot.between(e,n,r)}function eE(t){return t.editable&&!t.hasFocus()?!1:tE(t)}function tE(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 w9(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return ma(e.node,e.offset,n.anchorNode,n.anchorOffset)}function jy(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&&dt.findFrom(i,e)}function Ss(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function nE(t,e,n){let r=t.state.selection;if(r instanceof ot)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 Ss(t,new ot(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=jy(t.state,e);return o&&o instanceof nt?Ss(t,o):!1}else if(!(xo&&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?nt.isSelectable(i)?Ss(t,new nt(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):pu?Ss(t,new ot(t.state.doc.resolve(e<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof nt&&r.node.isInline)return Ss(t,new ot(e>0?r.$to:r.$from));{let o=jy(t.state,e);return o?Ss(t,o):!1}}}function ip(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function yu(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function $l(t,e){return e<0?C9(t):T9(t)}function C9(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(vo&&n.nodeType==1&&r<ip(n)&&yu(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(yu(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(rE(n))break;{let a=n.previousSibling;for(;a&&yu(a,-1);)o=n.parentNode,i=Xn(a),a=a.previousSibling;if(a)n=a,r=ip(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?Uy(t,n,r):o&&Uy(t,o,i)}function T9(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=ip(n),i,s;for(;;)if(r<o){if(n.nodeType!=1)break;let a=n.childNodes[r];if(yu(a,1))i=n,s=++r;else break}else{if(rE(n))break;{let a=n.nextSibling;for(;a&&yu(a,1);)i=a.parentNode,s=Xn(a)+1,a=a.nextSibling;if(a)n=a,r=0,o=ip(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&Uy(t,i,s)}function rE(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function k9(t,e){for(;t&&e==t.childNodes.length&&!fu(t);)e=Xn(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 E9(t,e){for(;t&&!e&&!fu(t);)e=Xn(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 Uy(t,e,n){if(e.nodeType!=3){let i,s;(s=k9(e,n))?(e=s,n=0):(i=E9(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(np(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&&$i(t)},50)}function oE(t,e){let n=t.state.doc.resolve(e);if(!(qn||Ok)&&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 iE(t,e,n){let r=t.state.selection;if(r instanceof ot&&!r.empty||n.indexOf("s")>-1||xo&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=jy(t.state,e);if(s&&s instanceof nt)return Ss(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,a=r instanceof jr?dt.near(s,e):dt.findFrom(s,e);return a?Ss(t,a):!1}return!1}function sE(t,e){if(!(t.state.selection instanceof ot))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 aE(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function _9(t){if(!cr||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;aE(t,r,"true"),setTimeout(()=>aE(t,r,"false"),20)}return!1}function O9(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function M9(t,e){let n=e.keyCode,r=O9(e);if(n==8||xo&&n==72&&r=="c")return sE(t,-1)||$l(t,-1);if(n==46&&!e.shiftKey||xo&&n==68&&r=="c")return sE(t,1)||$l(t,1);if(n==13||n==27)return!0;if(n==37||xo&&n==66&&r=="c"){let o=n==37?oE(t,t.state.selection.from)=="ltr"?-1:1:-1;return nE(t,o,r)||$l(t,o)}else if(n==39||xo&&n==70&&r=="c"){let o=n==39?oE(t,t.state.selection.from)=="ltr"?1:-1:1;return nE(t,o,r)||$l(t,o)}else{if(n==38||xo&&n==80&&r=="c")return iE(t,-1,r)||$l(t,-1);if(n==40||xo&&n==78&&r=="c")return _9(t)||iE(t,1,r)||$l(t,1);if(r==(xo?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function qy(t,e){t.someProp("transformCopied",y=>{e=y(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 y=r.firstChild;n.push(y.type.name,y.attrs!=y.type.defaultAttrs?y.attrs:null),r=y.content}let s=t.someProp("clipboardSerializer")||pa.fromSchema(t.state.schema),a=mE(),c=a.createElement("div");c.appendChild(s.serializeFragment(r,{document:a}));let u=c.firstChild,f,p=0;for(;u&&u.nodeType==1&&(f=pE[u.nodeName.toLowerCase()]);){for(let y=f.length-1;y>=0;y--){let b=a.createElement(f[y]);for(;c.firstChild;)b.appendChild(c.firstChild);c.appendChild(b),p++}u=c.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${p?` -${p}`:""} ${JSON.stringify(n)}`);let m=t.someProp("clipboardTextSerializer",y=>y(e,t))||e.content.textBetween(0,e.content.size,`
|
|
248
|
-
|
|
249
|
-
`);return{dom:c,text:m,slice:e}}function lE(t,e,n,r,o){let i=o.parent.type.spec.code,s,a;if(!n&&!e)return null;let c=!!e&&(r||i||!n);if(c){if(t.someProp("transformPastedText",m=>{e=m(e,i||r,t)}),i)return a=new Ve(Me.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
250
|
-
`))),0,0),t.someProp("transformPasted",m=>{a=m(a,t,!0)}),a;let p=t.someProp("clipboardTextParser",m=>m(e,o,r,t));if(p)a=p;else{let m=o.marks(),{schema:y}=t.state,b=pa.fromSchema(y);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let x=s.appendChild(document.createElement("p"));g&&x.appendChild(b.serializeNode(y.text(g,m)))})}}else t.someProp("transformPastedHTML",p=>{n=p(n,t)}),s=P9(n),pu&&N9(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")||ps.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||f),context:o,ruleFromNode(m){return m.nodeName=="BR"&&!m.nextSibling&&m.parentNode&&!A9.test(m.parentNode.nodeName)?{ignore:!0}:null}})),f)a=$9(fE(a,+f[1],+f[2]),f[4]);else if(a=Ve.maxOpen(D9(a.content,o),!0),a.openStart||a.openEnd){let p=0,m=0;for(let y=a.content.firstChild;p<a.openStart&&!y.type.spec.isolating;p++,y=y.firstChild);for(let y=a.content.lastChild;m<a.openEnd&&!y.type.spec.isolating;m++,y=y.lastChild);a=fE(a,p,m)}return t.someProp("transformPasted",p=>{a=p(a,t,c)}),a}const A9=/^(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 D9(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 c=o.findWrapping(a.type),u;if(!c)return s=null;if(u=s.length&&i.length&&uE(c,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=dE(s[s.length-1],i.length));let f=cE(a,c);s.push(f),o=o.matchType(f.type),i=c}}),s)return Me.from(s)}return t}function cE(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Me.from(t));return t}function uE(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=uE(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(Me.from(cE(n,t,o+1))))}}function dE(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,dE(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Me.empty,!0);return t.copy(n.append(r))}function Ky(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=Ky(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(Me.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function fE(t,e,n){return e<t.openStart&&(t=new Ve(Ky(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Ve(Ky(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const pE={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 hE=null;function mE(){return hE||(hE=document.implementation.createHTMLDocument("title"))}let Yy=null;function I9(t){let e=window.trustedTypes;return e?(Yy||(Yy=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Yy.createHTML(t)):t}function P9(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=mE().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&pE[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=I9(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function N9(t){let e=t.querySelectorAll(qn?"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 $9(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 c=n.nodes[r[a]];if(!c||c.hasRequiredAttrs())break;o=Me.from(c.create(r[a+1],o)),i++,s++}return new Ve(o,i,s)}const gr={},yr={},L9={touchstart:!0,touchmove:!0};class F9{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 R9(t){for(let e in gr){let n=gr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{V9(t,r)&&!Jy(t,r)&&(t.editable||!(r.type in yr))&&n(t,r)},L9[e]?{passive:!0}:void 0)}cr&&t.dom.addEventListener("input",()=>null),Gy(t)}function ws(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function B9(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 Gy(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Jy(t,r))})}function Jy(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function V9(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 z9(t,e){!Jy(t,e)&&gr[e.type]&&(t.editable||!(e.type in yr))&&gr[e.type](t,e)}yr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!yE(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Pi&&qn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Pl&&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,ga(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||M9(t,n)?n.preventDefault():ws(t,"key")},yr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},yr.keypress=(t,e)=>{let n=e;if(yE(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||xo&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof ot)||!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 sp(t){return{left:t.clientX,top:t.clientY}}function H9(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Xy(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 Ll(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 W9(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&nt.isSelectable(r)?(Ll(t,new nt(n)),!0):!1}function j9(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof nt&&(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(nt.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?(Ll(t,nt.create(t.state.doc,o)),!0):!1}function U9(t,e,n,r,o){return Xy(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?j9(t,n):W9(t,n))}function q9(t,e,n,r){return Xy(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function K9(t,e,n,r){return Xy(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||Y9(t,n,r)}function Y9(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Ll(t,ot.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)Ll(t,ot.create(r,a+1,a+1+s.content.size));else if(nt.isSelectable(s))Ll(t,nt.create(r,a));else continue;return!0}}function Zy(t){return ap(t)}const gE=xo?"metaKey":"ctrlKey";gr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Zy(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&H9(n,t.input.lastClick)&&!n[gE]&&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(sp(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new G9(t,s,n,!!r)):(i=="doubleClick"?q9:K9)(t,s.pos,s.inside,n)?n.preventDefault():ws(t,"pointer"))};class G9{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[gE],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,c=a?e.docView.nearestDesc(a,!0):null;this.target=c&&c.nodeDOM.nodeType==1?c.nodeDOM:null;let{selection:u}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof nt&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&vo&&!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)),ws(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(()=>$i(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(sp(e))),this.updateAllowDefault(e),this.allowDefault||!n?ws(this.view,"pointer"):U9(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||cr&&this.mightDrag&&!this.mightDrag.node.isAtom||qn&&!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)?(Ll(this.view,dt.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):ws(this.view,"pointer")}move(e){this.updateAllowDefault(e),ws(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)}}gr.touchstart=t=>{t.input.lastTouch=Date.now(),Zy(t),ws(t,"pointer")},gr.touchmove=t=>{t.input.lastTouch=Date.now(),ws(t,"pointer")},gr.contextmenu=t=>Zy(t);function yE(t,e){return t.composing?!0:cr&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const J9=Pi?5e3:-1;yr.compositionstart=yr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof ot&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||qn&&Ok&&X9(t)))t.markCursor=t.state.storedMarks||n.marks(),ap(t,!0),t.markCursor=null;else if(ap(t,!e.selection.empty),vo&&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}bE(t,J9)};function X9(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}yr.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++,bE(t,20))};function bE(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>ap(t),e))}function vE(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Q9());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Z9(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=j6(e.focusNode,e.focusOffset),r=U6(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 Q9(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function ap(t,e=!1){if(!(Pi&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),vE(t),e||t.docView&&t.docView.dirty){let n=zy(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 eU(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 bu=Mr&&bs<15||Pl&&G6<604;gr.copy=yr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=bu?null:n.clipboardData,s=r.content(),{dom:a,text:c}=qy(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",c)):eU(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function tU(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function nU(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?vu(t,r.value,null,o,e):vu(t,r.textContent,r.innerHTML,o,e)},50)}function vu(t,e,n,r,o){let i=lE(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",c=>c(t,o,i||Ve.empty)))return!0;if(!i)return!1;let s=tU(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 xE(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," "):""}yr.paste=(t,e)=>{let n=e;if(t.composing&&!Pi)return;let r=bu?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&vu(t,xE(r),r.getData("text/html"),o,n)?n.preventDefault():nU(t,n)};class SE{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const rU=xo?"altKey":"ctrlKey";function wE(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[rU]}gr.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(sp(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof nt?o.to-1:o.to))){if(r&&r.mightDrag)s=nt.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=nt.create(t.state.doc,p.posBefore))}}let a=(s||t.state.selection).content(),{dom:c,text:u,slice:f}=qy(t,a);(!n.dataTransfer.files.length||!qn||_k>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(bu?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",bu||n.dataTransfer.setData("text/plain",u),t.dragging=new SE(f,wE(t,n),s)},gr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},yr.dragover=yr.dragenter=(t,e)=>e.preventDefault(),yr.drop=(t,e)=>{try{oU(t,e,t.dragging)}finally{t.dragging=null}};function oU(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(sp(e));if(!r)return;let o=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",y=>{i=y(i,t,!1)}):i=lE(t,xE(e.dataTransfer),bu?null:e.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&wE(t,e));if(t.someProp("handleDrop",y=>y(t,e,i||Ve.empty,s))){e.preventDefault();return}if(!i)return;e.preventDefault();let a=i?uk(t.state.doc,o.pos,i):o.pos;a==null&&(a=o.pos);let c=t.state.tr;if(s){let{node:y}=n;y?y.replace(c):c.deleteSelection()}let u=c.mapping.map(a),f=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,p=c.doc;if(f?c.replaceRangeWith(u,u,i.content.firstChild):c.replaceRange(u,u,i),c.doc.eq(p))return;let m=c.doc.resolve(u);if(f&&nt.isSelectable(i.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new nt(m));else{let y=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((b,g,x,w)=>y=w),c.setSelection(Wy(t,m,c.doc.resolve(y)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}gr.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())&&$i(t)},20))},gr.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)},gr.beforeinput=(t,e)=>{if(qn&&Pi&&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,ga(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 yr)gr[t]=yr[t];function xu(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 lp{constructor(e,n){this.toDOM=e,this.spec=n||xa,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 Zn(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof lp&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&xu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Cs{constructor(e,n){this.attrs=e,this.spec=n||xa}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 Zn(i,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Cs&&xu(this.attrs,e.attrs)&&xu(this.spec,e.spec)}static is(e){return e.type instanceof Cs}destroy(){}}class Qy{constructor(e,n){this.attrs=e,this.spec=n||xa}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 Zn(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 Qy&&xu(this.attrs,e.attrs)&&xu(this.spec,e.spec)}destroy(){}}class Zn{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Zn(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 Zn(e,e,new lp(n,r))}static inline(e,n,r,o){return new Zn(e,n,new Cs(r,o))}static node(e,n,r,o){return new Zn(e,n,new Qy(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Cs}get widget(){return this.type instanceof lp}}const Fl=[],xa={};class ln{constructor(e,n){this.local=e.length?e:Fl,this.children=n.length?n:Fl}static create(e,n){return n.length?cp(n,e,0,xa):ur}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==ur||e.maps.length==0?this:this.mapInner(e,n,0,0,r||xa)}mapInner(e,n,r,o,i){let s;for(let a=0;a<this.local.length;a++){let c=this.local[a].map(e,r,o);c&&c.type.valid(n,c)?(s||(s=[])).push(c):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?iU(this.children,s||[],e,n,r,o,i):s?new ln(s.sort(Sa),Fl):ur}add(e,n){return n.length?this==ur?ln.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((a,c)=>{let u=c+r,f;if(f=TE(n,a,u)){for(o||(o=this.children.slice());i<o.length&&o[i]<c;)i+=3;o[i]==c?o[i+2]=o[i+2].addInner(a,f,u+1):o.splice(i,0,c,c+a.nodeSize,cp(f,a,u+1,xa)),i+=3}});let s=CE(i?kE(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new ln(s.length?this.local.concat(s).sort(Sa):this.local,o||this.children)}remove(e){return e.length==0||this==ur?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,c=r[i+1]+n;for(let f=0,p;f<e.length;f++)(p=e[f])&&p.from>a&&p.to<c&&(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!=ur?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 ln(o,r):ur}forChild(e,n){if(this==ur)return this;if(n.isLeaf)return ln.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 c=this.local[a];if(c.from<s&&c.to>i&&c.type instanceof Cs){let u=Math.max(i,c.from)-i,f=Math.min(s,c.to)-i;u<f&&(o||(o=[])).push(c.copy(u,f))}}if(o){let a=new ln(o.sort(Sa),Fl);return r?new Ts([a,r]):a}return r||ur}eq(e){if(this==e)return!0;if(!(e instanceof ln)||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 eb(this.localsInner(e))}localsInner(e){if(this==ur)return Fl;if(e.inlineContent||!this.local.some(Cs.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Cs||n.push(this.local[r]);return n}forEachSet(e){e(this)}}ln.empty=new ln([],[]),ln.removeOverlap=eb;const ur=ln.empty;class Ts{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,xa));return Ts.from(r)}forChild(e,n){if(n.isLeaf)return ln.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=ur&&(i instanceof Ts?r=r.concat(i.members):r.push(i))}return Ts.from(r)}eq(e){if(!(e instanceof Ts)||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?eb(r?n:n.sort(Sa)):Fl}static from(e){switch(e.length){case 0:return ur;case 1:return e[0];default:return new Ts(e.every(n=>n instanceof ln)?e:e.reduce((n,r)=>n.concat(r instanceof ln?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function iU(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,y,b,g)=>{let x=g-b-(y-m);for(let w=0;w<a.length;w+=3){let E=a[w+1];if(E<0||m>E+f-p)continue;let T=a[w]+f-p;y>=T?a[w+1]=m<=T?-2:-1:m>=f&&x&&(a[w]+=x,a[w+1]+=x)}p+=x}),f=n.maps[u].map(f,-1)}let c=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){c=!0,a[u+1]=-1;continue}let f=n.map(t[u]+i),p=f-o;if(p<0||p>=r.content.size){c=!0;continue}let m=n.map(t[u+1]+i,-1),y=m-o,{index:b,offset:g}=r.content.findIndex(p),x=r.maybeChild(b);if(x&&g==p&&g+x.nodeSize==y){let w=a[u+2].mapInner(n,x,f+1,t[u]+i+1,s);w!=ur?(a[u]=p,a[u+1]=y,a[u+2]=w):(a[u+1]=-2,c=!0)}else c=!0}if(c){let u=sU(a,t,e,n,o,i,s),f=cp(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 y=f.children[p];for(;m<a.length&&a[m]<y;)m+=3;a.splice(m,0,f.children[p],f.children[p+1],f.children[p+2])}}return new ln(e.sort(Sa),a)}function CE(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 Zn(o.from+e,o.to+e,o.type))}return n}function sU(t,e,n,r,o,i,s){function a(c,u){for(let f=0;f<c.local.length;f++){let p=c.local[f].map(r,o,u);p?n.push(p):s.onRemove&&s.onRemove(c.local[f].spec)}for(let f=0;f<c.children.length;f+=3)a(c.children[f+2],c.children[f]+u+1)}for(let c=0;c<t.length;c+=3)t[c+1]==-1&&a(t[c+2],e[c]+i+1);return n}function TE(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 kE(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function cp(t,e,n,r){let o=[],i=!1;e.forEach((a,c)=>{let u=TE(t,a,c+n);if(u){i=!0;let f=cp(u,a,n+c+1,r);f!=ur&&o.push(c,c+a.nodeSize,f)}});let s=CE(i?kE(t):t,-n).sort(Sa);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 ln(s,o):ur}function Sa(t,e){return t.from-e.from||t.to-e.to}function eb(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),EE(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),EE(e,o,r.copy(i.from,r.to)));break}}}return e}function EE(t,e,n){for(;e<t.length&&Sa(n,t[e])>0;)e++;t.splice(e,0,n)}function tb(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=ur&&e.push(r)}),t.cursorWrapper&&e.push(ln.create(t.state.doc,[t.cursorWrapper.deco])),Ts.from(e)}const aU={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},lU=Mr&&bs<=11;class cU{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 uU{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new cU,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]);Mr&&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()}),lU&&(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,aU)),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(eE(this.view)){if(this.suppressingSelectionUpdates)return $i(this.view);if(Mr&&bs<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ma(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=Il(i))n.add(i);for(let i=e.anchorNode;i;i=Il(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)&&eE(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,a=!1,c=[];if(e.editable)for(let f=0;f<n.length;f++){let p=this.registerMutation(n[f],c);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(vo&&c.length){let f=c.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 y=m.parentNode;y&&y.nodeName=="LI"&&(!p||pU(e,p)!=y)&&m.remove()}}}else if((qn||cr)&&c.some(f=>f.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let f of c)if(f.nodeName=="BR"&&f.parentNode){let p=f.nextSibling;p&&p.nodeType==1&&p.contentEditable=="false"&&f.parentNode.removeChild(f)}}let u=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&np(r)&&(u=zy(e))&&u.eq(dt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,$i(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),dU(e)),this.handleDOMChange(i,s,a,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||$i(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(Mr&&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?Xn(o)+1:0,a=r.localPosFromDOM(e.target,s,-1),c=i&&i.parentNode==e.target?Xn(i):e.target.childNodes.length,u=r.localPosFromDOM(e.target,c,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 _E=new WeakMap,OE=!1;function dU(t){if(!_E.has(t)&&(_E.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=vo,OE)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."),OE=!0}}function ME(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return ma(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function fU(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return ME(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?ME(t,n):null}function pU(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 hU(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:s,to:a}=t.docView.parseRange(e,n),c=t.domSelectionRange(),u,f=c.anchorNode;if(f&&t.dom.contains(f.nodeType==1?f:f.parentNode)&&(u=[{node:f,offset:c.anchorOffset}],np(c)||u.push({node:c.focusNode,offset:c.focusOffset})),qn&&t.input.lastKeyCode===8)for(let x=i;x>o;x--){let w=r.childNodes[x-1],E=w.pmViewDesc;if(w.nodeName=="BR"&&!E){i=x;break}if(!E||E.size)break}let p=t.state.doc,m=t.someProp("domParser")||ps.fromSchema(t.state.schema),y=p.resolve(s),b=null,g=m.parse(r,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:o,to:i,preserveWhitespace:y.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:mU,context:y});if(u&&u[0].pos!=null){let x=u[0].pos,w=u[1]&&u[1].pos;w==null&&(w=x),b={anchor:x+s,head:w+s}}return{doc:g,sel:b,from:s,to:a}}function mU(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(cr&&/^(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||cr&&/^(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 gU=/^(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 yU(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let A=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,I=zy(t,A);if(I&&!t.state.selection.eq(I)){if(qn&&Pi&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",O=>O(t,ga(13,"Enter"))))return;let L=t.state.tr.setSelection(I);A=="pointer"?L.setMeta("pointer",!0):A=="key"&&L.scrollIntoView(),i&&L.setMeta("composition",i),t.dispatch(L)}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 c=t.state.selection,u=hU(t,e,n),f=t.state.doc,p=f.slice(u.from,u.to),m,y;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(m=t.state.selection.to,y="end"):(m=t.state.selection.from,y="start"),t.input.lastKeyCode=null;let b=xU(p.content,u.doc.content,u.from,m,y);if(b&&t.input.domChangeCount++,(Pl&&t.input.lastIOSEnter>Date.now()-225||Pi)&&o.some(A=>A.nodeType==1&&!gU.test(A.nodeName))&&(!b||b.endA>=b.endB)&&t.someProp("handleKeyDown",A=>A(t,ga(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!b)if(r&&c instanceof ot&&!c.empty&&c.$head.sameParent(c.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))b={start:c.from,endA:c.to,endB:c.to};else{if(u.sel){let A=AE(t,t.state.doc,u.sel);if(A&&!A.eq(t.state.selection)){let I=t.state.tr.setSelection(A);i&&I.setMeta("composition",i),t.dispatch(I)}}return}t.state.selection.from<t.state.selection.to&&b.start==b.endB&&t.state.selection instanceof ot&&(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)),Mr&&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 g=u.doc.resolveNoCache(b.start-u.from),x=u.doc.resolveNoCache(b.endB-u.from),w=f.resolve(b.start),E=g.sameParent(x)&&g.parent.inlineContent&&w.end()>=b.endA;if((Pl&&t.input.lastIOSEnter>Date.now()-225&&(!E||o.some(A=>A.nodeName=="DIV"||A.nodeName=="P"))||!E&&g.pos<u.doc.content.size&&(!g.sameParent(x)||!g.parent.inlineContent)&&g.pos<x.pos&&!/\S/.test(u.doc.textBetween(g.pos,x.pos,"","")))&&t.someProp("handleKeyDown",A=>A(t,ga(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>b.start&&vU(f,b.start,b.endA,g,x)&&t.someProp("handleKeyDown",A=>A(t,ga(8,"Backspace")))){Pi&&qn&&t.domObserver.suppressSelectionUpdates();return}qn&&b.endB==b.start&&(t.input.lastChromeDelete=Date.now()),Pi&&!E&&g.start()!=x.start()&&x.parentOffset==0&&g.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(A){return A(t,ga(13,"Enter"))})},20));let T=b.start,C=b.endA,k=A=>{let I=A||t.state.tr.replace(T,C,u.doc.slice(b.start-u.from,b.endB-u.from));if(u.sel){let L=AE(t,I.doc,u.sel);L&&!(qn&&t.composing&&L.empty&&(b.start!=b.endB||t.input.lastChromeDelete<Date.now()-100)&&(L.head==T||L.head==I.mapping.map(C)-1)||Mr&&L.empty&&L.head==T)&&I.setSelection(L)}return i&&I.setMeta("composition",i),I.scrollIntoView()},M;if(E)if(g.pos==x.pos){Mr&&bs<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>$i(t),20));let A=k(t.state.tr.delete(T,C)),I=f.resolve(b.start).marksAcross(f.resolve(b.endA));I&&A.ensureMarks(I),t.dispatch(A)}else if(b.endA==b.endB&&(M=bU(g.parent.content.cut(g.parentOffset,x.parentOffset),w.parent.content.cut(w.parentOffset,b.endA-w.start())))){let A=k(t.state.tr);M.type=="add"?A.addMark(T,C,M.mark):A.removeMark(T,C,M.mark),t.dispatch(A)}else if(g.parent.child(g.index()).isText&&g.index()==x.index()-(x.textOffset?0:1)){let A=g.parent.textBetween(g.parentOffset,x.parentOffset),I=()=>k(t.state.tr.insertText(A,T,C));t.someProp("handleTextInput",L=>L(t,T,C,A,I))||t.dispatch(I())}else t.dispatch(k());else t.dispatch(k())}function AE(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Wy(t,e.resolve(n.anchor),e.resolve(n.head))}function bU(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,a,c;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",c=f=>f.mark(a.addToSet(f.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",c=f=>f.mark(a.removeFromSet(f.marks));else return null;let u=[];for(let f=0;f<e.childCount;f++)u.push(c(e.child(f)));if(Me.from(u).eq(t))return{mark:a,type:s}}function vU(t,e,n,r,o){if(n-e<=o.pos-r.pos||nb(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(nb(i,!0,!0));return!s.parent.isTextblock||s.pos>n||nb(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function nb(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 xU(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 c=Math.max(0,i-Math.min(s,a));r-=s+c-i}if(s<i&&t.size<e.size){let c=r<=i&&r>=s?i-r:0;i-=c,i&&i<e.size&&DE(e.textBetween(i-1,i+1))&&(i+=c?1:-1),a=i+(a-s),s=i}else if(a<i){let c=r<=i&&r>=a?i-r:0;i-=c,i&&i<t.size&&DE(t.textBetween(i-1,i+1))&&(i+=c?1:-1),s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}function DE(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 IE{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 F9,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(FE),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=$E(this),NE(this),this.nodeViews=LE(this),this.docView=Hk(this.state.doc,PE(this),tb(this),this.dom,this),this.domObserver=new uU(this,(r,o,i,s)=>yU(this,r,o,i,s)),this.domObserver.start(),R9(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&&Gy(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(FE),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&&(vE(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 y=LE(this);wU(y,this.nodeViews)&&(this.nodeViews=y,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Gy(this),this.editable=$E(this),NE(this);let c=tb(this),u=PE(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,c);(p||!e.selection.eq(o.selection))&&(s=!0);let m=f=="preserve"&&s&&this.dom.style.overflowAnchor==null&&Z6(this);if(s){this.domObserver.stop();let y=p&&(Mr||qn)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&SU(o.selection,e.selection);if(p){let b=qn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Z9(this)),(i||!this.docView.update(e.doc,u,c,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=Hk(e.doc,u,c,this.dom,this)),b&&!this.trackWrites&&(y=!0)}y||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&w9(this))?$i(this,y):(Zk(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&&Q6(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 nt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Mk(this,n.getBoundingClientRect(),e)}else Mk(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 SE(e.slice,e.move,o<0?void 0:nt.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(Mr){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&&e9(this.dom),$i(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 i9(this,e)}coordsAtPos(e,n=1){return $k(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 u9(this,n||this.state,e)}pasteHTML(e,n){return vu(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return vu(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return qy(this,e)}destroy(){this.docView&&(B9(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],tb(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,H6())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return z9(this,e)}domSelectionRange(){let e=this.domSelection();return e?cr&&this.root.nodeType===11&&K6(this.dom.ownerDocument)==this.dom&&fU(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}IE.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function PE(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"),[Zn.node(0,t.state.doc.content.size,e)]}function NE(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:Zn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function $E(t){return!t.someProp("editable",e=>e(t.state)===!1)}function SU(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 LE(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 wU(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 FE(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var ks={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:"'"},up={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},CU=typeof navigator<"u"&&/Mac/.test(navigator.platform),TU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Qn=0;Qn<10;Qn++)ks[48+Qn]=ks[96+Qn]=String(Qn);for(var Qn=1;Qn<=24;Qn++)ks[Qn+111]="F"+Qn;for(var Qn=65;Qn<=90;Qn++)ks[Qn]=String.fromCharCode(Qn+32),up[Qn]=String.fromCharCode(Qn);for(var rb in ks)up.hasOwnProperty(rb)||(up[rb]=ks[rb]);function kU(t){var e=CU&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||TU&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?up:ks)[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 EU=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),_U=typeof navigator<"u"&&/Win/.test(navigator.platform);function OU(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 c=e[a];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))EU?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function MU(t){let e=Object.create(null);for(let n in t)e[OU(n)]=t[n];return e}function ob(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 AU(t){return new bn({props:{handleKeyDown:ib(t)}})}function ib(t){let e=MU(t);return function(n,r){let o=kU(r),i,s=e[ob(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[ob(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(_U&&r.ctrlKey&&r.altKey)&&(i=ks[r.keyCode])&&i!=o){let a=e[ob(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const sb=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function RE(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const BE=(t,e,n)=>{let r=RE(t,n);if(!r)return!1;let o=ab(r);if(!o){let s=r.blockRange(),a=s&&_l(s);return a==null?!1:(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(YE(t,o,e,-1))return!0;if(r.parent.content.size==0&&(Rl(i,"end")||nt.isSelectable(i)))for(let s=r.depth;;s--){let a=Qf(t.doc,r.before(s),r.after(s),Ve.empty);if(a&&a.slice.size<a.to-a.from){if(e){let c=t.tr.step(a);c.setSelection(Rl(i,"end")?dt.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):nt.create(c.doc,o.pos-i.nodeSize)),e(c.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},DU=(t,e,n)=>{let r=RE(t,n);if(!r)return!1;let o=ab(r);return o?VE(t,o,e):!1},IU=(t,e,n)=>{let r=HE(t,n);if(!r)return!1;let o=lb(r);return o?VE(t,o,e):!1};function VE(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,c=e.pos+1;for(;!a.isTextblock;c++){if(a.type.spec.isolating)return!1;let f=a.firstChild;if(!f)return!1;a=f}let u=Qf(t.doc,i,c,Ve.empty);if(!u||u.from!=i||u instanceof jn&&u.slice.size>=c-i)return!1;if(n){let f=t.tr.step(u);f.setSelection(ot.create(f.doc,i)),n(f.scrollIntoView())}return!0}function Rl(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 zE=(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=ab(r)}let s=i&&i.nodeBefore;return!s||!nt.isSelectable(s)?!1:(e&&e(t.tr.setSelection(nt.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function ab(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 HE(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const WE=(t,e,n)=>{let r=HE(t,n);if(!r)return!1;let o=lb(r);if(!o)return!1;let i=o.nodeAfter;if(YE(t,o,e,1))return!0;if(r.parent.content.size==0&&(Rl(i,"start")||nt.isSelectable(i))){let s=Qf(t.doc,r.before(),r.after(),Ve.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(Rl(i,"start")?dt.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):nt.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},jE=(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=lb(r)}let s=i&&i.nodeAfter;return!s||!nt.isSelectable(s)?!1:(e&&e(t.tr.setSelection(nt.create(t.doc,i.pos)).scrollIntoView()),!0)};function lb(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 PU=(t,e)=>{let n=t.selection,r=n instanceof nt,o;if(r){if(n.node.isTextblock||!gs(t.doc,n.from))return!1;o=n.from}else if(o=Zf(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(nt.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},NU=(t,e)=>{let n=t.selection,r;if(n instanceof nt){if(n.node.isTextblock||!gs(t.doc,n.to))return!1;r=n.to}else if(r=Zf(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},$U=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&_l(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},UE=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
251
|
-
`).scrollIntoView()),!0)};function cb(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 LU=(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=cb(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let a=n.after(),c=t.tr.replaceWith(a,a,s.createAndFill());c.setSelection(dt.near(c.doc.resolve(a),1)),e(c.scrollIntoView())}return!0},qE=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof jr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=cb(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(ot.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},KE=(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(Di(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&_l(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function FU(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof nt&&e.selection.node.isBlock)return!r.parentOffset||!Di(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,a,c=!1,u=!1;for(let y=r.depth;;y--)if(r.node(y).isBlock){c=r.end(y)==r.pos+(r.depth-y),u=r.start(y)==r.pos-(r.depth-y),a=cb(r.node(y-1).contentMatchAt(r.indexAfter(y-1))),i.unshift(c&&a?{type:a}:null),s=y;break}else{if(y==1)return!1;i.unshift(null)}let f=e.tr;(e.selection instanceof ot||e.selection instanceof jr)&&f.deleteSelection();let p=f.mapping.map(r.pos),m=Di(f.doc,p,i.length,i);if(m||(i[0]=a?{type:a}:null,m=Di(f.doc,p,i.length,i)),!m)return!1;if(f.split(p,i.length,i),!c&&u&&r.node(s).type!=a){let y=f.mapping.map(r.before(s)),b=f.doc.resolve(y);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 RU=FU(),BU=(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(nt.create(t.doc,o))),!0)};function VU(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||gs(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function YE(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,a,c=o.type.spec.isolating||i.type.spec.isolating;if(!c&&VU(t,e,n))return!0;let u=!c&&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 y=e.pos+i.nodeSize,b=Me.empty;for(let w=s.length-1;w>=0;w--)b=Me.from(s[w].create(null,b));b=Me.from(o.copy(b));let g=t.tr.step(new Un(e.pos-1,y,e.pos,y,new Ve(b,1,0),s.length,!0)),x=g.doc.resolve(y+2*s.length);x.nodeAfter&&x.nodeAfter.type==o.type&&gs(g.doc,x.pos)&&g.join(x.pos),n(g.scrollIntoView())}return!0}let f=i.type.spec.isolating||r>0&&c?null:dt.findFrom(e,1),p=f&&f.$from.blockRange(f.$to),m=p&&_l(p);if(m!=null&&m>=e.depth)return n&&n(t.tr.lift(p,m).scrollIntoView()),!0;if(u&&Rl(i,"start",!0)&&Rl(o,"end")){let y=o,b=[];for(;b.push(y),!y.isTextblock;)y=y.lastChild;let g=i,x=1;for(;!g.isTextblock;g=g.firstChild)x++;if(y.canReplace(y.childCount,y.childCount,g.content)){if(n){let w=Me.empty;for(let T=b.length-1;T>=0;T--)w=Me.from(b[T].copy(w));let E=t.tr.step(new Un(e.pos-b.length,e.pos+i.nodeSize,e.pos+x,e.pos+i.nodeSize-x,new Ve(w,b.length,0),0,!0));n(E.scrollIntoView())}return!0}}return!1}function GE(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(ot.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const zU=GE(-1),HU=GE(1);function WU(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&ky(s,t,e);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function JE(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,(c,u)=>{if(o)return!1;if(!(!c.isTextblock||c.hasMarkup(t,e)))if(c.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:c}}=n.selection.ranges[s];i.setBlockType(a,c,t,e)}r(i.scrollIntoView())}return!0}}function ub(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}ub(sb,BE,zE),ub(sb,WE,jE),ub(UE,qE,KE,RU),typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function jU(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 UU(a,s,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function UU(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 c=s.resolve(e.start-2);i=new qf(c,c,e.depth),e.endIndex<e.parent.childCount&&(e=new qf(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let a=ky(i,n,r,e);return a?(t&&qU(t,e,a,o,n),!0):!1}function qU(t,e,n,r,o){let i=Me.empty;for(let f=n.length-1;f>=0;f--)i=Me.from(n[f].type.create(n[f].attrs,i));t.step(new Un(e.start-(r?2:0),e.end,e.start,e.end,new Ve(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,c=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&&Di(t.doc,c,a)&&(t.split(c,a),c+=2*a),c+=u.child(f).nodeSize;return t}function KU(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?YU(e,n,t,i):GU(e,n,i):!0:!1}}function YU(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new Un(i-1,s,i,s,new Ve(Me.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new qf(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const a=_l(r);if(a==null)return!1;o.lift(r,a);let c=o.doc.resolve(o.mapping.map(i,-1)-1);return gs(o.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&o.join(c.pos),e(o.scrollIntoView()),!0}function GU(t,e,n){let r=t.tr,o=n.parent;for(let y=n.end,b=n.endIndex-1,g=n.startIndex;b>g;b--)y-=o.child(b).nodeSize,r.delete(y-1,y+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,c=n.endIndex==o.childCount,u=i.node(-1),f=i.index(-1);if(!u.canReplace(f+(a?0:1),f+1,s.content.append(c?Me.empty:Me.from(o))))return!1;let p=i.pos,m=p+s.nodeSize;return r.step(new Un(p-(a?1:0),m+(c?1:0),p+1,m-1,new Ve((a?Me.empty:Me.from(o.copy(Me.empty))).append(c?Me.empty:Me.from(o.copy(Me.empty))),a?0:1,c?0:1),a?0:1)),e(r.scrollIntoView()),!0}function JU(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,c=a.child(s-1);if(c.type!=t)return!1;if(n){let u=c.lastChild&&c.lastChild.type==a.type,f=Me.from(u?t.create():null),p=new Ve(Me.from(t.create(null,Me.from(a.type.create(null,f)))),u?3:1,0),m=i.start,y=i.end;n(e.tr.step(new Un(m-(u?3:1),y,m,y,p,1,!0)).scrollIntoView())}return!0}}function dp(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 fp{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,c])=>[a,(...f)=>{const p=c(...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=[],c=!!e,u=e||i.tr,f=()=>(!c&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(m=>m===!0)),p={...Object.fromEntries(Object.entries(r).map(([m,y])=>[m,(...g)=>{const x=this.buildProps(u,n),w=y(...g)(x);return a.push(w),p}])),run:f};return p}createCan(e){const{rawCommands:n,state:r}=this,o=!1,i=e||r.tr,s=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([c,u])=>[c,(...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:dp({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(([c,u])=>[c,(...f)=>u(...f)(a)]))}};return a}}class XU{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 Je(t,e,n){return t.config[e]===void 0&&t.parent?Je(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Je(t.parent,e,n):null}):t.config[e]}function pp(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 XE(t){const e=[],{nodeExtensions:n,markExtensions:r}=pp(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},c=Je(s,"addGlobalAttributes",a);if(!c)return;c().forEach(f=>{f.types.forEach(p=>{Object.entries(f.attributes).forEach(([m,y])=>{e.push({type:p,name:m,attribute:{...i,...y}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},c=Je(s,"addAttributes",a);if(!c)return;const u=c();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 Bn(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 Dt(...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(" "):[],c=r[o]?r[o].split(" "):[],u=a.filter(f=>!c.includes(f));r[o]=[...c,...u].join(" ")}else if(o==="style"){const a=i?i.split(";").map(f=>f.trim()).filter(Boolean):[],c=r[o]?r[o].split(";").map(f=>f.trim()).filter(Boolean):[],u=new Map;c.forEach(f=>{const[p,m]=f.split(":").map(y=>y.trim());u.set(p,m)}),a.forEach(f=>{const[p,m]=f.split(":").map(y=>y.trim());u.set(p,m)}),r[o]=Array.from(u.entries()).map(([f,p])=>`${f}: ${p}`).join("; ")}else r[o]=i}),r},{})}function hp(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)=>Dt(n,r),{})}function ZE(t){return typeof t=="function"}function xt(t,e=void 0,...n){return ZE(t)?e?t.bind(e)(...n):t(...n):t}function ZU(t={}){return Object.keys(t).length===0&&t.constructor===Object}function QU(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function QE(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):QU(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function e_(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&ZU(n)?!1:n!=null))}function e8(t,e){var n;const r=XE(t),{nodeExtensions:o,markExtensions:i}=pp(t),s=(n=o.find(u=>Je(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(u=>{const f=r.filter(w=>w.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:e},m=t.reduce((w,E)=>{const T=Je(E,"extendNodeSchema",p);return{...w,...T?T(u):{}}},{}),y=e_({...m,content:xt(Je(u,"content",p)),marks:xt(Je(u,"marks",p)),group:xt(Je(u,"group",p)),inline:xt(Je(u,"inline",p)),atom:xt(Je(u,"atom",p)),selectable:xt(Je(u,"selectable",p)),draggable:xt(Je(u,"draggable",p)),code:xt(Je(u,"code",p)),whitespace:xt(Je(u,"whitespace",p)),linebreakReplacement:xt(Je(u,"linebreakReplacement",p)),defining:xt(Je(u,"defining",p)),isolating:xt(Je(u,"isolating",p)),attrs:Object.fromEntries(f.map(w=>{var E;return[w.name,{default:(E=w==null?void 0:w.attribute)===null||E===void 0?void 0:E.default}]}))}),b=xt(Je(u,"parseHTML",p));b&&(y.parseDOM=b.map(w=>QE(w,f)));const g=Je(u,"renderHTML",p);g&&(y.toDOM=w=>g({node:w,HTMLAttributes:hp(w,f)}));const x=Je(u,"renderText",p);return x&&(y.toText=x),[u.name,y]})),c=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,w)=>{const E=Je(w,"extendMarkSchema",p);return{...x,...E?E(u):{}}},{}),y=e_({...m,inclusive:xt(Je(u,"inclusive",p)),excludes:xt(Je(u,"excludes",p)),group:xt(Je(u,"group",p)),spanning:xt(Je(u,"spanning",p)),code:xt(Je(u,"code",p)),attrs:Object.fromEntries(f.map(x=>{var w;return[x.name,{default:(w=x==null?void 0:x.attribute)===null||w===void 0?void 0:w.default}]}))}),b=xt(Je(u,"parseHTML",p));b&&(y.parseDOM=b.map(x=>QE(x,f)));const g=Je(u,"renderHTML",p);return g&&(y.toDOM=x=>g({mark:x,HTMLAttributes:hp(x,f)})),[u.name,y]}));return new jT({topNode:s,nodes:a,marks:c})}function db(t,e){return e.nodes[t]||e.marks[t]||null}function t_(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function fb(t,e){const n=pa.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}const t8=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,a)=>{var c,u;const f=((u=(c=o.type.spec).toText)===null||u===void 0?void 0:u.call(c,{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 pb(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class Su{constructor(e){this.find=e.find,this.handler=e.handler}}const n8=(t,e)=>{if(pb(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 mp(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=t,{view:c}=n;if(c.composing)return!1;const u=c.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=t8(u)+i;return s.forEach(m=>{if(f)return;const y=n8(p,m.find);if(!y)return;const b=c.state.tr,g=dp({state:c.state,transaction:b}),x={from:r-(y[0].length-i.length),to:o},{commands:w,chain:E,can:T}=new fp({editor:n,state:g});m.handler({state:g,range:x,match:y,commands:w,chain:E,can:T})===null||!b.steps.length||(b.setMeta(a,{transform:b,from:r,to:o,text:i}),c.dispatch(b),f=!0)}),f}function r8(t){const{editor:e,rules:n}=t,r=new bn({state:{init(){return null},apply(o,i,s){const a=o.getMeta(r);if(a)return a;const c=o.getMeta("applyInputRules");return!!c&&setTimeout(()=>{let{text:f}=c;typeof f=="string"?f=f:f=fb(Me.from(f),s.schema);const{from:p}=c,m=p+f.length;mp({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 mp({editor:e,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&mp({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?mp({editor:e,from:s.pos,to:s.pos,text:`
|
|
252
|
-
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function o8(t){return Object.prototype.toString.call(t).slice(8,-1)}function gp(t){return o8(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function yp(t,e){const n={...t};return gp(t)&&gp(e)&&Object.keys(e).forEach(r=>{gp(e[r])&&gp(t[r])?n[r]=yp(t[r],e[r]):n[r]=e[r]}),n}class Ar{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=xt(Je(this,"addOptions",{name:this.name}))),this.storage=xt(Je(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ar(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>yp(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Ar(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=xt(Je(n,"addOptions",{name:n.name})),n.storage=xt(Je(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 c=s.find(u=>(u==null?void 0:u.type.name)===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}function i8(t){return typeof t=="number"}class s8{constructor(e){this.find=e.find,this.handler=e.handler}}const a8=(t,e,n)=>{if(pb(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 l8(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=t,{commands:c,chain:u,can:f}=new fp({editor:e,state:n}),p=[];return n.doc.nodesBetween(r,o,(y,b)=>{if(!y.isTextblock||y.type.spec.code)return;const g=Math.max(r,b),x=Math.min(o,b+y.content.size),w=y.textBetween(g-b,x-b,void 0,"");a8(w,i.find,s).forEach(T=>{if(T.index===void 0)return;const C=g+T.index+1,k=C+T[0].length,M={from:n.tr.mapping.map(C),to:n.tr.mapping.map(k)},A=i.handler({state:n,range:M,match:T,commands:c,chain:u,can:f,pasteEvent:s,dropEvent:a});p.push(A)})}),p.every(y=>y!==null)}let bp=null;const c8=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 u8(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 c=({state:f,from:p,to:m,rule:y,pasteEvt:b})=>{const g=f.tr,x=dp({state:f,transaction:g});if(!(!l8({editor:e,state:x,from:Math.max(p-1,0),to:m.b-1,rule:y,pasteEvent:b,dropEvent:a})||!g.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g}};return n.map(f=>new bn({view(p){const m=b=>{var g;r=!((g=p.dom.parentElement)===null||g===void 0)&&g.contains(b.target)?p.dom.parentElement:null,r&&(bp=e)},y=()=>{bp&&(bp=null)};return window.addEventListener("dragstart",m),window.addEventListener("dragend",y),{destroy(){window.removeEventListener("dragstart",m),window.removeEventListener("dragend",y)}}},props:{handleDOMEvents:{drop:(p,m)=>{if(i=r===p.dom.parentElement,a=m,!i){const y=bp;y!=null&&y.isEditable&&setTimeout(()=>{const b=y.state.selection;b&&y.commands.deleteRange({from:b.from,to:b.to})},10)}return!1},paste:(p,m)=>{var y;const b=(y=m.clipboardData)===null||y===void 0?void 0:y.getData("text/html");return s=m,o=!!(b!=null&&b.includes("data-pm-slice")),!1}}},appendTransaction:(p,m,y)=>{const b=p[0],g=b.getMeta("uiEvent")==="paste"&&!o,x=b.getMeta("uiEvent")==="drop"&&!i,w=b.getMeta("applyPasteRules"),E=!!w;if(!g&&!x&&!E)return;if(E){let{text:k}=w;typeof k=="string"?k=k:k=fb(Me.from(k),y.schema);const{from:M}=w,A=M+k.length,I=c8(k);return c({rule:f,state:y,from:M,to:{b:A},pasteEvt:I})}const T=m.doc.content.findDiffStart(y.doc.content),C=m.doc.content.findDiffEnd(y.doc.content);if(!(!i8(T)||!C||T===C.b))return c({rule:f,state:y,from:T,to:C,pasteEvt:s})}}))}function d8(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}class Bl{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=Bl.resolve(e),this.schema=e8(this.extensions,n),this.setupExtensions()}static resolve(e){const n=Bl.sort(Bl.flatten(e)),r=d8(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=Je(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=Je(r,"priority")||100,s=Je(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:db(n.name,this.schema)},o=Je(n,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,n=Bl.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:db(s.name,this.schema)},c=[],u=Je(s,"addKeyboardShortcuts",a);let f={};if(s.type==="mark"&&Je(s,"exitable",a)&&(f.ArrowRight=()=>Ar.handleExit({editor:e,mark:s})),u){const g=Object.fromEntries(Object.entries(u()).map(([x,w])=>[x,()=>w({editor:e})]));f={...f,...g}}const p=AU(f);c.push(p);const m=Je(s,"addInputRules",a);t_(s,e.options.enableInputRules)&&m&&r.push(...m());const y=Je(s,"addPasteRules",a);t_(s,e.options.enablePasteRules)&&y&&o.push(...y());const b=Je(s,"addProseMirrorPlugins",a);if(b){const g=b();c.push(...g)}return c}).flat();return[r8({editor:e,rules:r}),...u8({editor:e,rules:o}),...i]}get attributes(){return XE(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=pp(this.extensions);return Object.fromEntries(n.filter(r=>!!Je(r,"addNodeView")).map(r=>{const o=this.attributes.filter(c=>c.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:e,type:Bn(r.name,this.schema)},s=Je(r,"addNodeView",i);if(!s)return[];const a=(c,u,f,p,m)=>{const y=hp(c,o);return s()({node:c,view:u,getPos:f,decorations:p,innerDecorations:m,editor:e,extension:r,HTMLAttributes:y})};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:db(e.name,this.schema)};e.type==="mark"&&(!((n=xt(Je(e,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const o=Je(e,"onBeforeCreate",r),i=Je(e,"onCreate",r),s=Je(e,"onUpdate",r),a=Je(e,"onSelectionUpdate",r),c=Je(e,"onTransaction",r),u=Je(e,"onFocus",r),f=Je(e,"onBlur",r),p=Je(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),c&&this.editor.on("transaction",c),u&&this.editor.on("focus",u),f&&this.editor.on("blur",f),p&&this.editor.on("destroy",p)})}}class $n{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=xt(Je(this,"addOptions",{name:this.name}))),this.storage=xt(Je(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new $n(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>yp(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new $n({...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=xt(Je(n,"addOptions",{name:n.name})),n.storage=xt(Je(n,"addStorage",{name:n.name,options:n.options})),n}}function n_(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
|
|
253
|
-
|
|
254
|
-
`,textSerializers:s={}}=n||{};let a="";return t.nodesBetween(r,o,(c,u,f,p)=>{var m;c.isBlock&&u>r&&(a+=i);const y=s==null?void 0:s[c.type.name];if(y)return f&&(a+=y({node:c,pos:u,parent:f,index:p,range:e})),!1;c.isText&&(a+=(m=c==null?void 0:c.text)===null||m===void 0?void 0:m.slice(Math.max(r,u)-u,o-u))}),a}function hb(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const f8=$n.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new bn({key:new Nn("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)),c=hb(n);return n_(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:c})}}})]}}),p8=()=>({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),h8=(t=!1)=>({commands:e})=>e.setContent("",t),m8=()=>({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,c)=>{if(a.type.isText)return;const{doc:u,mapping:f}=e,p=u.resolve(f.map(c)),m=u.resolve(f.map(c+a.nodeSize)),y=p.blockRange(m);if(!y)return;const b=_l(y);if(a.type.isTextblock){const{defaultType:g}=p.parent.contentMatchAt(p.index());e.setNodeMarkup(y.start,g)}(b||b===0)&&e.lift(y,b)})}),!0},g8=t=>e=>t(e),y8=()=>({state:t,dispatch:e})=>qE(t,e),b8=(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 ot(r.doc.resolve(Math.max(s-1,0)))),!0},v8=()=>({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),c=o.after(i);t.delete(a,c).scrollIntoView()}return!0}return!1},x8=t=>({tr:e,state:n,dispatch:r})=>{const o=Bn(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 c=i.before(s),u=i.after(s);e.delete(c,u).scrollIntoView()}return!0}return!1},S8=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},w8=()=>({state:t,dispatch:e})=>sb(t,e),C8=()=>({commands:t})=>t.keyboardShortcut("Enter"),T8=()=>({state:t,dispatch:e})=>LU(t,e);function vp(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:pb(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function r_(t,e,n={}){return t.find(r=>r.type===e&&vp(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function o_(t,e,n={}){return!!r_(t,e,n)}function wu(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),!r_([...o.node.marks],e,n)))return;let s=o.index,a=t.start()+o.offset,c=s+1,u=a+o.node.nodeSize;for(;s>0&&o_([...t.parent.child(s-1).marks],e,n);)s-=1,a-=t.parent.child(s).nodeSize;for(;c<t.parent.childCount&&o_([...t.parent.child(c).marks],e,n);)u+=t.parent.child(c).nodeSize,c+=1;return{from:a,to:u}}function Ro(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 k8=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=Ro(t,r.schema),{doc:s,selection:a}=n,{$from:c,from:u,to:f}=a;if(o){const p=wu(c,i,e);if(p&&p.from<=u&&p.to>=f){const m=ot.create(s,p.from,p.to);n.setSelection(m)}}return!0},E8=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 i_(t){return t instanceof ot}function Li(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function s_(t,e=null){if(!e)return null;const n=dt.atStart(t),r=dt.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?ot.create(t,Li(0,o,i),Li(t.content.size,o,i)):ot.create(t,Li(e,o,i),Li(e,o,i))}function a_(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function xp(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const _8=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{(xp()||a_())&&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&&!i_(n.state.selection))return s(),!0;const a=s_(o.doc,t)||n.state.selection,c=n.state.selection.eq(a);return i&&(c||o.setSelection(a),c&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},O8=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),M8=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),l_=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&&l_(r)}return t};function Sp(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return l_(n)}function Cu(t,e,n){if(t instanceof Ai||t instanceof Me)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 Me.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),Cu("",e,n)}if(o){if(n.errorOnInvalidContent){let s=!1,a="";const c=new jT({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?ps.fromSchema(c).parseSlice(Sp(t),n.parseOptions):ps.fromSchema(c).parse(Sp(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const i=ps.fromSchema(e);return n.slice?i.parseSlice(Sp(t),n.parseOptions).content:i.parse(Sp(t),n.parseOptions)}return Cu("",e,n)}function A8(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof jn||o instanceof Un))return;const i=t.mapping.maps[r];let s=0;i.forEach((a,c,u,f)=>{s===0&&(s=f)}),t.setSelection(dt.near(t.doc.resolve(s),n))}const D8=t=>!("type"in t),I8=(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 c=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{Cu(e,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(x){c(x)}try{a=Cu(e,i.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!==null&&s!==void 0?s:i.options.enableContentCheck})}catch(x){return c(x),!1}let{from:f,to:p}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},m=!0,y=!0;if((D8(a)?a:[a]).forEach(x=>{x.check(),m=m?x.isText&&x.marks.length===0:!1,y=y?x.isBlock:!1}),f===p&&y){const{parent:x}=r.doc.resolve(f);x.isTextblock&&!x.type.spec.code&&!x.childCount&&(f-=1,p+=1)}let g;if(m){if(Array.isArray(e))g=e.map(x=>x.text||"").join("");else if(e instanceof Me){let x="";e.forEach(w=>{w.text&&(x+=w.text)}),g=x}else typeof e=="object"&&e&&e.text?g=e.text:g=e;r.insertText(g,f,p)}else g=a,r.replaceWith(f,p,g);n.updateSelection&&A8(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:f,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:f,text:g})}return!0},P8=()=>({state:t,dispatch:e})=>PU(t,e),N8=()=>({state:t,dispatch:e})=>NU(t,e),$8=()=>({state:t,dispatch:e})=>BE(t,e),L8=()=>({state:t,dispatch:e})=>WE(t,e),F8=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Zf(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},R8=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Zf(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},B8=()=>({state:t,dispatch:e})=>DU(t,e),V8=()=>({state:t,dispatch:e})=>IU(t,e);function c_(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function z8(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 c=e[a];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))xp()||c_()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${c}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}const H8=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=z8(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}),c=e.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return c==null||c.steps.forEach(u=>{const f=u.map(r.mapping);f&&o&&r.maybeStep(f)}),!0};function Tu(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?Bn(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,(p,m)=>{if(p.isText)return;const y=Math.max(r,m),b=Math.min(o,m+p.nodeSize);a.push({node:p,from:y,to:b})});const c=o-r,u=a.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>vp(p.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((p,m)=>p+m.to-m.from,0)>=c}const W8=(t,e={})=>({state:n,dispatch:r})=>{const o=Bn(t,n.schema);return Tu(n,o,e)?$U(n,r):!1},j8=()=>({state:t,dispatch:e})=>KE(t,e),U8=t=>({state:e,dispatch:n})=>{const r=Bn(t,e.schema);return KU(r)(e,n)},q8=()=>({state:t,dispatch:e})=>UE(t,e);function ku(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function u_(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 K8=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=ku(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(i=Bn(t,r.schema)),a==="mark"&&(s=Ro(t,r.schema)),o&&n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,f)=>{i&&i===u.type&&n.setNodeMarkup(f,void 0,u_(u.attrs,e)),s&&u.marks.length&&u.marks.forEach(p=>{s===p.type&&n.addMark(f,f+u.nodeSize,s.create(u_(p.attrs,e)))})})}),!0):!1},Y8=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),G8=()=>({tr:t,dispatch:e})=>{if(e){const n=new jr(t.doc);t.setSelection(n)}return!0},J8=()=>({state:t,dispatch:e})=>zE(t,e),X8=()=>({state:t,dispatch:e})=>jE(t,e),Z8=()=>({state:t,dispatch:e})=>BU(t,e),Q8=()=>({state:t,dispatch:e})=>HU(t,e),e7=()=>({state:t,dispatch:e})=>zU(t,e);function mb(t,e,n={},r={}){return Cu(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const t7=(t,e=!1,n={},r={})=>({editor:o,tr:i,dispatch:s,commands:a})=>{var c,u;const{doc:f}=i;if(n.preserveWhitespace!=="full"){const p=mb(t,o.schema,n,{errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c: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 d_(t,e){const n=Ro(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,c=>{s.push(...c.marks)});const a=s.find(c=>c.type.name===n.name);return a?{...a.attrs}:{}}function n7(t,e){const n=new Oy(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function r7(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 o7(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function gb(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 yb(t){return e=>gb(e.$from,t)}function f_(t,e){const n={from:0,to:t.content.size};return n_(t,n,e)}function i7(t,e){const n=Bn(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 bb(t,e){const n=ku(typeof e=="string"?e:e.name,t.schema);return n==="node"?i7(t,e):n==="mark"?d_(t,e):{}}function s7(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 a7(t){const e=s7(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 l7(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((a,c)=>{s.push({from:a,to:c})});else{const{from:a,to:c}=n[i];if(a===void 0||c===void 0)return;s.push({from:a,to:c})}s.forEach(({from:a,to:c})=>{const u=e.slice(i).map(a,-1),f=e.slice(i).map(c),p=e.invert().map(u,-1),m=e.invert().map(f);r.push({oldRange:{from:p,to:m},newRange:{from:u,to:f}})})}),a7(r)}function vb(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),s=wu(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 wp(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 xb(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?Ro(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>vp(p.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:p,$to:m})=>{const y=p.pos,b=m.pos;t.doc.nodesBetween(y,b,(g,x)=>{if(!g.isText&&!g.marks.length)return;const w=Math.max(y,x),E=Math.min(b,x+g.nodeSize),T=E-w;s+=T,a.push(...g.marks.map(C=>({mark:C,from:w,to:E})))})}),s===0)return!1;const c=a.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>vp(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(c>0?c+u:c)>=s}function c7(t,e,n={}){if(!e)return Tu(t,null,n)||xb(t,null,n);const r=ku(e,t.schema);return r==="node"?Tu(t,e,n):r==="mark"?xb(t,e,n):!1}function p_(t,e){const{nodeExtensions:n}=pp(e),r=n.find(s=>s.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=xt(Je(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Cp(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&&(Cp(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function h_(t){return t instanceof nt}function m_(t,e,n){const o=t.state.doc.content.size,i=Li(e,0,o),s=Li(n,0,o),a=t.coordsAtPos(i),c=t.coordsAtPos(s,-1),u=Math.min(a.top,c.top),f=Math.max(a.bottom,c.bottom),p=Math.min(a.left,c.left),m=Math.max(a.right,c.right),y=m-p,b=f-u,w={top:u,bottom:f,left:p,right:m,width:y,height:b,x:p,y:u};return{...w,toJSON:()=>w}}function u7(t,e,n){var r;const{selection:o}=e;let i=null;if(i_(o)&&(i=o.$cursor),i){const a=(r=t.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(a)||!a.some(c=>c.type.excludes(n))}const{ranges:s}=o;return s.some(({$from:a,$to:c})=>{let u=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,c.pos,(f,p,m)=>{if(u)return!1;if(f.isInline){const y=!m||m.type.allowsMarkType(n),b=!!n.isInSet(f.marks)||!f.marks.some(g=>g.type.excludes(n));u=y&&b}return!u}),u})}const d7=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,c=Ro(t,r.schema);if(o)if(s){const u=d_(r,c);n.addStoredMark(c.create({...u,...e}))}else a.forEach(u=>{const f=u.$from.pos,p=u.$to.pos;r.doc.nodesBetween(f,p,(m,y)=>{const b=Math.max(y,f),g=Math.min(y+m.nodeSize,p);m.marks.find(w=>w.type===c)?m.marks.forEach(w=>{c===w.type&&n.addMark(b,g,c.create({...w.attrs,...e}))}):n.addMark(b,g,c.create(e))})});return u7(r,n,c)},f7=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),p7=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=Bn(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})=>JE(i,{...s,...e})(n)?!0:a.clearNodes()).command(({state:a})=>JE(i,{...s,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},h7=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=Li(t,0,r.content.size),i=nt.create(r,o);e.setSelection(i)}return!0},m7=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,s=ot.atStart(r).from,a=ot.atEnd(r).to,c=Li(o,s,a),u=Li(i,s,a),f=ot.create(r,c,u);e.setSelection(f)}return!0},g7=t=>({state:e,dispatch:n})=>{const r=Bn(t,e.schema);return JU(r)(e,n)};function g_(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 y7=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:a,$to:c}=i,u=o.extensionManager.attributes,f=wp(u,a.node().type.name,a.node().attrs);if(i instanceof nt&&i.node.isBlock)return!a.parentOffset||!Di(s,a.pos)?!1:(r&&(t&&g_(n,o.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const p=c.parentOffset===c.parent.content.size,m=a.depth===0?void 0:r7(a.node(-1).contentMatchAt(a.indexAfter(-1)));let y=p&&m?[{type:m,attrs:f}]:void 0,b=Di(e.doc,e.mapping.map(a.pos),1,y);if(!y&&!b&&Di(e.doc,e.mapping.map(a.pos),1,m?[{type:m}]:void 0)&&(b=!0,y=m?[{type:m,attrs:f}]:void 0),r){if(b&&(i instanceof ot&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,y),m&&!p&&!a.parentOffset&&a.parent.type!==m)){const g=e.mapping.map(a.before()),x=e.doc.resolve(g);a.node(-1).canReplaceWith(x.index(),x.index()+1,m)&&e.setNodeMarkup(e.mapping.map(a.before()),m)}t&&g_(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return b},b7=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const a=Bn(t,r.schema),{$from:c,$to:u}=r.selection,f=r.selection.node;if(f&&f.isBlock||c.depth<2||!c.sameParent(u))return!1;const p=c.node(-1);if(p.type!==a)return!1;const m=i.extensionManager.attributes;if(c.parent.content.size===0&&c.node(-1).childCount===c.indexAfter(-1)){if(c.depth===2||c.node(-3).type!==a||c.index(-2)!==c.node(-2).childCount-1)return!1;if(o){let w=Me.empty;const E=c.index(-1)?1:c.index(-2)?2:3;for(let I=c.depth-E;I>=c.depth-3;I-=1)w=Me.from(c.node(I).copy(w));const T=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,C={...wp(m,c.node().type.name,c.node().attrs),...e},k=((s=a.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(C))||void 0;w=w.append(Me.from(a.createAndFill(null,k)||void 0));const M=c.before(c.depth-(E-1));n.replace(M,c.after(-T),new Ve(w,4-E,0));let A=-1;n.doc.nodesBetween(M,n.doc.content.size,(I,L)=>{if(A>-1)return!1;I.isTextblock&&I.content.size===0&&(A=L+1)}),A>-1&&n.setSelection(ot.near(n.doc.resolve(A))),n.scrollIntoView()}return!0}const y=u.pos===c.end()?p.contentMatchAt(0).defaultType:null,b={...wp(m,p.type.name,p.attrs),...e},g={...wp(m,c.node().type.name,c.node().attrs),...e};n.delete(c.pos,u.pos);const x=y?[{type:a,attrs:b},{type:y,attrs:g}]:[{type:a,attrs:b}];if(!Di(n.doc,c.pos,2))return!1;if(o){const{selection:w,storedMarks:E}=r,{splittableMarks:T}=i.extensionManager,C=E||w.$to.parentOffset&&w.$from.marks();if(n.split(c.pos,2,x).scrollIntoView(),!C||!o)return!0;const k=C.filter(M=>T.includes(M.type.name));n.ensureMarks(k)}return!0},Sb=(t,e)=>{const n=yb(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)&&gs(t.doc,n.pos)&&t.join(n.pos),!0},wb=(t,e)=>{const n=yb(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)&&gs(t.doc,r)&&t.join(r),!0};var v7=Object.freeze({__proto__:null,blur:p8,clearContent:h8,clearNodes:m8,command:g8,createParagraphNear:y8,cut:b8,deleteCurrentNode:v8,deleteNode:x8,deleteRange:S8,deleteSelection:w8,enter:C8,exitCode:T8,extendMarkRange:k8,first:E8,focus:_8,forEach:O8,insertContent:M8,insertContentAt:I8,joinBackward:$8,joinDown:N8,joinForward:L8,joinItemBackward:F8,joinItemForward:R8,joinTextblockBackward:B8,joinTextblockForward:V8,joinUp:P8,keyboardShortcut:H8,lift:W8,liftEmptyBlock:j8,liftListItem:U8,newlineInCode:q8,resetAttributes:K8,scrollIntoView:Y8,selectAll:G8,selectNodeBackward:J8,selectNodeForward:X8,selectParentNode:Z8,selectTextblockEnd:Q8,selectTextblockStart:e7,setContent:t7,setMark:d7,setMeta:f7,setNode:p7,setNodeSelection:h7,setTextSelection:m7,sinkListItem:g7,splitBlock:y7,splitListItem:b7,toggleList:(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:c,commands:u,can:f})=>{const{extensions:p,splittableMarks:m}=o.extensionManager,y=Bn(t,s.schema),b=Bn(e,s.schema),{selection:g,storedMarks:x}=s,{$from:w,$to:E}=g,T=w.blockRange(E),C=x||g.$to.parentOffset&&g.$from.marks();if(!T)return!1;const k=yb(M=>p_(M.type.name,p))(g);if(T.depth>=1&&k&&T.depth-k.depth<=1){if(k.node.type===y)return u.liftListItem(b);if(p_(k.node.type.name,p)&&y.validContent(k.node.content)&&a)return c().command(()=>(i.setNodeMarkup(k.pos,y),!0)).command(()=>Sb(i,y)).command(()=>wb(i,y)).run()}return!n||!C||!a?c().command(()=>f().wrapInList(y,r)?!0:u.clearNodes()).wrapInList(y,r).command(()=>Sb(i,y)).command(()=>wb(i,y)).run():c().command(()=>{const M=f().wrapInList(y,r),A=C.filter(I=>m.includes(I.type.name));return i.ensureMarks(A),M?!0:u.clearNodes()}).wrapInList(y,r).command(()=>Sb(i,y)).command(()=>wb(i,y)).run()},toggleMark:(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Ro(t,r.schema);return xb(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},toggleNode:(t,e,n={})=>({state:r,commands:o})=>{const i=Bn(t,r.schema),s=Bn(e,r.schema),a=Tu(r,i,n);let c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),a?o.setNode(s,c):o.setNode(i,{...c,...n})},toggleWrap:(t,e={})=>({state:n,commands:r})=>{const o=Bn(t,n.schema);return Tu(n,o,e)?r.lift(o):r.wrapIn(o,e)},undoInputRule:()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const s=t.tr,a=i.transform;for(let c=a.steps.length-1;c>=0;c-=1)s.step(a.steps[c].invert(a.docs[c]));if(i.text){const c=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,c))}else s.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},unsetMark:(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,c=Ro(t,r.schema),{$from:u,empty:f,ranges:p}=a;if(!o)return!0;if(f&&s){let{from:m,to:y}=a;const b=(i=u.marks().find(x=>x.type===c))===null||i===void 0?void 0:i.attrs,g=wu(u,c,b);g&&(m=g.from,y=g.to),n.removeMark(m,y,c)}else p.forEach(m=>{n.removeMark(m.$from.pos,m.$to.pos,c)});return n.removeStoredMark(c),!0},updateAttributes:(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=ku(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(i=Bn(t,r.schema)),a==="mark"&&(s=Ro(t,r.schema)),o&&n.selection.ranges.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;let p,m,y,b;n.selection.empty?r.doc.nodesBetween(u,f,(g,x)=>{i&&i===g.type&&(y=Math.max(x,u),b=Math.min(x+g.nodeSize,f),p=x,m=g)}):r.doc.nodesBetween(u,f,(g,x)=>{x<u&&i&&i===g.type&&(y=Math.max(x,u),b=Math.min(x+g.nodeSize,f),p=x,m=g),x>=u&&x<=f&&(i&&i===g.type&&n.setNodeMarkup(x,void 0,{...g.attrs,...e}),s&&g.marks.length&&g.marks.forEach(w=>{if(s===w.type){const E=Math.max(x,u),T=Math.min(x+g.nodeSize,f);n.addMark(E,T,s.create({...w.attrs,...e}))}}))}),m&&(p!==void 0&&n.setNodeMarkup(p,void 0,{...m.attrs,...e}),s&&m.marks.length&&m.marks.forEach(g=>{s===g.type&&n.addMark(y,b,s.create({...g.attrs,...e}))}))}),!0):!1},wrapIn:(t,e={})=>({state:n,dispatch:r})=>{const o=Bn(t,n.schema);return WU(o,e)(n,r)},wrapInList:(t,e={})=>({state:n,dispatch:r})=>{const o=Bn(t,n.schema);return jU(o,e)(n,r)}});const x7=$n.create({name:"commands",addCommands(){return{...v7}}}),S7=$n.create({name:"drop",addProseMirrorPlugins(){return[new bn({key:new Nn("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),w7=$n.create({name:"editable",addProseMirrorPlugins(){return[new bn({key:new Nn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),C7=new Nn("focusEvents"),T7=$n.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new bn({key:C7,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}}}})]}}),k7=$n.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:c,doc:u}=a,{empty:f,$anchor:p}=c,{pos:m,parent:y}=p,b=p.parent.isTextblock&&m>0?a.doc.resolve(m-1):p,g=b.parent.type.spec.isolating,x=p.pos-p.parentOffset,w=g&&b.parent.childCount===1?x===p.pos:dt.atStart(u).from===m;return!f||!y.type.isTextblock||y.textContent.length||!w||w&&p.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return xp()||c_()?i:o},addProseMirrorPlugins(){return[new bn({key:new Nn("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(g=>g.getMeta("composition")))return;const r=t.some(g=>g.docChanged)&&!e.doc.eq(n.doc),o=t.some(g=>g.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:s,to:a}=e.selection,c=dt.atStart(e.doc).from,u=dt.atEnd(e.doc).to;if(i||!(s===c&&a===u)||!Cp(n.doc))return;const m=n.tr,y=dp({state:n,transaction:m}),{commands:b}=new fp({editor:this.editor,state:y});if(b.clearNodes(),!!m.steps.length)return m}})]}}),E7=$n.create({name:"paste",addProseMirrorPlugins(){return[new bn({key:new Nn("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),_7=$n.create({name:"tabindex",addProseMirrorPlugins(){return[new bn({key:new Nn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class wa{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 wa(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 wa(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 wa(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 c=new wa(a,this.editor,o,o?n:null);o&&(c.actualDepth=this.depth+1),e.push(new wa(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 c=s[a];if(i[c]!==n[c])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(c=>n[c]===s.node.attrs[c])&&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 O7=`.ProseMirror {
|
|
255
|
-
position: relative;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.ProseMirror {
|
|
259
|
-
word-wrap: break-word;
|
|
260
|
-
white-space: pre-wrap;
|
|
261
|
-
white-space: break-spaces;
|
|
262
|
-
-webkit-font-variant-ligatures: none;
|
|
263
|
-
font-variant-ligatures: none;
|
|
264
|
-
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.ProseMirror [contenteditable="false"] {
|
|
268
|
-
white-space: normal;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
272
|
-
white-space: pre-wrap;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.ProseMirror pre {
|
|
276
|
-
white-space: pre-wrap;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
img.ProseMirror-separator {
|
|
280
|
-
display: inline !important;
|
|
281
|
-
border: none !important;
|
|
282
|
-
margin: 0 !important;
|
|
283
|
-
width: 0 !important;
|
|
284
|
-
height: 0 !important;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.ProseMirror-gapcursor {
|
|
288
|
-
display: none;
|
|
289
|
-
pointer-events: none;
|
|
290
|
-
position: absolute;
|
|
291
|
-
margin: 0;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.ProseMirror-gapcursor:after {
|
|
295
|
-
content: "";
|
|
296
|
-
display: block;
|
|
297
|
-
position: absolute;
|
|
298
|
-
top: -2px;
|
|
299
|
-
width: 20px;
|
|
300
|
-
border-top: 1px solid black;
|
|
301
|
-
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
@keyframes ProseMirror-cursor-blink {
|
|
305
|
-
to {
|
|
306
|
-
visibility: hidden;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.ProseMirror-hideselection *::selection {
|
|
311
|
-
background: transparent;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.ProseMirror-hideselection *::-moz-selection {
|
|
315
|
-
background: transparent;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.ProseMirror-hideselection * {
|
|
319
|
-
caret-color: transparent;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
323
|
-
display: block;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
327
|
-
opacity: 0
|
|
328
|
-
}`;function M7(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 A7 extends XU{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=M7(O7,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=ZE(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?[w7,f8.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),x7,T7,k7,_7,S7,E7].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 Bl(o,this)}createCommandManager(){this.commandManager=new fp({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let n;try{n=mb(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=mb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=s_(n,this.options.autofocus);this.view=new IE(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:Dl.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 bb(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,o=typeof e=="string"?n:e;return c7(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return fb(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
|
|
329
|
-
|
|
330
|
-
`,textSerializers:r={}}=e||{};return f_(this.state.doc,{blockSeparator:n,textSerializers:{...hb(this.schema),...r}})}get isEmpty(){return Cp(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 wa(n,this)}get $doc(){return this.$pos(0)}}function Ca(t){return new Su({find:t.find,handler:({state:e,range:n,match:r})=>{const o=xt(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 c=a.search(/\S/),u=n.from+a.indexOf(s),f=u+s.length;if(vb(n.from,n.to,e.doc).filter(y=>y.mark.type.excluded.find(g=>g===t.type&&g!==y.mark.type)).filter(y=>y.to>u).length)return null;f<n.to&&i.delete(f,n.to),u>n.from&&i.delete(n.from+c,u);const m=n.from+c+s.length;i.addMark(n.from+c,m,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function y_(t){return new Su({find:t.find,handler:({state:e,range:n,match:r})=>{const o=xt(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from;let a=n.to;const c=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,c)}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 Cb(t){return new Su({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=xt(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 Vl(t){return new Su({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=xt(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),c=s.doc.resolve(n.from).blockRange(),u=c&&ky(c,t.type,i);if(!u)return null;if(s.wrap(c,u),t.keepMarks&&t.editor){const{selection:p,storedMarks:m}=e,{splittableMarks:y}=t.editor.extensionManager,b=m||p.$to.parentOffset&&p.$from.marks();if(b){const g=b.filter(x=>y.includes(x.type.name));s.ensureMarks(g)}}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&&gs(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,f))&&s.join(n.from-1)}})}class vn{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=xt(Je(this,"addOptions",{name:this.name}))),this.storage=xt(Je(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new vn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>yp(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new vn(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=xt(Je(n,"addOptions",{name:n.name})),n.storage=xt(Je(n,"addStorage",{name:n.name,options:n.options})),n}}class D7{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,c;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,y=0;if(this.dom!==p){const E=this.dom.getBoundingClientRect(),T=p.getBoundingClientRect(),C=(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-E.x+C,y=T.y-E.y+k}const b=this.dom.cloneNode(!0);(c=e.dataTransfer)===null||c===void 0||c.setDragImage(b,m,y);const g=this.getPos();if(typeof g!="number")return;const x=nt.create(u.state.doc,g),w=u.state.tr.setSelection(x);u.dispatch(w)}stopEvent(e){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const r=e.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const i=e.type.startsWith("drag"),s=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!s&&!i)return!0;const{isEditable:c}=this.editor,{isDragging:u}=this,f=!!this.node.type.spec.draggable,p=nt.isSelectable(this.node),m=e.type==="copy",y=e.type==="paste",b=e.type==="cut",g=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&&c&&!u&&g){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||y||b||g&&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"&&(xp()||a_())&&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 Es(t){return new s8({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=xt(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=e,a=r[r.length-1],c=r[0];let u=n.to;if(a){const f=c.search(/\S/),p=n.from+c.indexOf(a),m=p+a.length;if(vb(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 I7(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof nt){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 P7(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function zl(t,e){const n={...t};for(let r=0;r<e.length;r++){const o=e[r];delete n[o]}return n}const Tp={TABLE_ELEMENT:1,MENU_BAR:2,NOTCHED_OUTLINE:2};function Ta(t){var e,n,r,o,i,s,a,c,u,f;const p=Object.keys((e=t.typography.h1)!==null&&e!==void 0?e:{}).some(y=>y.includes("@media")),m=qo.keyframes`
|
|
331
|
-
0%, 95% {
|
|
332
|
-
opacity: 1;
|
|
333
|
-
}
|
|
334
|
-
100% {
|
|
335
|
-
opacity: 0;
|
|
336
|
-
}
|
|
337
|
-
`;return{...zl((n=t.typography.body1)!==null&&n!==void 0?n:{},["lineHeight"]),"&:focus":{outline:"none"},"& h1":{fontFamily:(r=t.typography.h3)===null||r===void 0?void 0:r.fontFamily,fontWeight:"bold",...p?{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":{...zl((o=t.typography.h4)!==null&&o!==void 0?o:{},["lineHeight"]),fontWeight:500},"& h3":{...zl((i=t.typography.h5)!==null&&i!==void 0?i:{},["lineHeight"]),fontWeight:500},"& h4":{...zl((s=t.typography.h6)!==null&&s!==void 0?s:{},["lineHeight"]),fontWeight:500},"& h5":{...zl((a=t.typography.subtitle1)!==null&&a!==void 0?a:{},["lineHeight"]),fontWeight:500},"& h6":{...zl((c=t.typography.subtitle2)!==null&&c!==void 0?c:{},["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:Xs(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"?ft(Xs(t.palette.primary.dark,.7),.5):ft(Qa(t.palette.primary.light,.6),.3),textDecoration:"none"},"& img:not(.ProseMirror-separator)":{maxWidth:"100%",height:"auto",display:"inline-flex",...N7(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:Tp.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:Tp.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, & .collaboration-carets__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, &:hover .collaboration-carets__label":{opacity:1,transition:t.transitions.create("opacity",{delay:0,duration:100,easing:"linear"})}},"& .collaboration-cursor__label, & .collaboration-carets__label":{borderRadius:"3px 3px 3px 0",color:"#0d0d0d",fontSize:12,fontStyle:"normal",fontWeight:600,fontFamily:(f=(u=t.typography.body1)===null||u===void 0?void 0:u.fontFamily)!==null&&f!==void 0?f:"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:`${m} 3s linear 1`}}}function N7(t){if(t.palette.mode!=="dark")return{};const e=t.palette.grey[200];return{backgroundColor:e,color:t.palette.getContrastText(e)}}const $7="MuiTiptap-";function rn(t){return`${$7}${t}`}function L7(t,e){return`${rn(t)}-${e}`}function cn(t,e){const n={};return e.forEach(r=>{n[r]=L7(t,r)}),n}const b_=cn("ControlledBubbleMenu",["root","paper"]),Tb=rn("ControlledBubbleMenu"),F7=re(Tl,{name:Tb,slot:"root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({zIndex:t.zIndex.tooltip})),R7=re(Ci,{name:Tb,slot:"paper",overridesResolver:(t,e)=>e.paper})(({theme:t})=>({backgroundColor:t.palette.background.default}));function v_(t){const e=ut({props:t,name:Tb}),{editor:n,open:r,className:o,classes:i={},sx:s,children:a,anchorEl:c,container:u,disablePortal:f,placement:p="top",fallbackPlacements:m=["top","bottom","top-start","bottom-start","top-end","bottom-end"],flipPadding:y=8,PaperProps:b,...g}=e,x=ro(),w=J.useCallback(()=>{const{ranges:E}=n.state.selection,T=Math.min(...E.map(k=>k.$from.pos)),C=Math.max(...E.map(k=>k.$to.pos));return{getBoundingClientRect:()=>{if(h_(n.state.selection)){const k=n.view.nodeDOM(T);if(k instanceof HTMLElement)return k.getBoundingClientRect()}return m_(n.view,T,C)}}},[n]);return v.jsx(F7,{open:r,placement:p,modifiers:[{name:"offset",options:{offset:[0,6]}},{name:"flip",enabled:!0,options:{boundary:n.options.element,fallbackPlacements:m,padding:y}},{name:"preventOverflow",enabled:!0,options:{altAxis:!0,boundary:"clippingParents",padding:8}}],anchorEl:c??w,className:me([b_.root,o,i.root]),sx:s,container:u,disablePortal:f,transition:!0,...g,children:({TransitionProps:E})=>v.jsx(Xo,{...E,timeout:{enter:x.transitions.duration.enteringScreen,exit:0},children:v.jsx(R7,{elevation:7,...b,className:me([b_.paper,i.paper,b==null?void 0:b.className]),children:a})})})}function Hl(){return(Hl=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 kb(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 Eb(t){var e=J.useRef(t),n=J.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var Wl=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},Eu=function(t){return"touches"in t},_b=function(t){return t&&t.ownerDocument.defaultView||self},x_=function(t,e,n){var r=t.getBoundingClientRect(),o=Eu(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:Wl((o.pageX-(r.left+_b(t).pageXOffset))/r.width),top:Wl((o.pageY-(r.top+_b(t).pageYOffset))/r.height)}},S_=function(t){!Eu(t)&&t.preventDefault()},Ob=J.memo(function(t){var e=t.onMove,n=t.onKey,r=kb(t,["onMove","onKey"]),o=J.useRef(null),i=Eb(e),s=Eb(n),a=J.useRef(null),c=J.useRef(!1),u=J.useMemo(function(){var y=function(x){S_(x),(Eu(x)?x.touches.length>0:x.buttons>0)&&o.current?i(x_(o.current,x,a.current)):g(!1)},b=function(){return g(!1)};function g(x){var w=c.current,E=_b(o.current),T=x?E.addEventListener:E.removeEventListener;T(w?"touchmove":"mousemove",y),T(w?"touchend":"mouseup",b)}return[function(x){var w=x.nativeEvent,E=o.current;if(E&&(S_(w),!(function(C,k){return k&&!Eu(C)})(w,c.current)&&E)){if(Eu(w)){c.current=!0;var T=w.changedTouches||[];T.length&&(a.current=T[0].identifier)}E.focus(),i(x_(E,w,a.current)),g(!0)}},function(x){var w=x.which||x.keyCode;w<37||w>40||(x.preventDefault(),s({left:w===39?.05:w===37?-.05:0,top:w===40?.05:w===38?-.05:0}))},g]},[s,i]),f=u[0],p=u[1],m=u[2];return J.useEffect(function(){return m},[m]),J.createElement("div",Hl({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:o,onKeyDown:p,tabIndex:0,role:"slider"}))}),_u=function(t){return t.filter(Boolean).join(" ")},Mb=function(t){var e=t.color,n=t.left,r=t.top,o=r===void 0?.5:r,i=_u(["react-colorful__pointer",t.className]);return J.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},J.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},Kn=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},w_=function(t){return z7(Ab(t))},Ab=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?Kn(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?Kn(parseInt(t.substring(6,8),16)/255,2):1}},C_=function(t){return V7(B7(t))},T_=function(t){var e=t.s,n=t.v,r=t.a,o=(200-e)*n/100;return{h:Kn(t.h),s:Kn(o>0&&o<200?e*n/100/(o<=100?o:200-o)*100:0),l:Kn(o/2),a:Kn(r,2)}},Db=function(t){var e=T_(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Ib=function(t){var e=T_(t);return"hsla("+e.h+", "+e.s+"%, "+e.l+"%, "+e.a+")"},B7=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),c=r*(1-(1-e+i)*n),u=i%6;return{r:Kn(255*[r,a,s,s,c,r][u]),g:Kn(255*[c,r,r,a,s,s][u]),b:Kn(255*[s,s,c,r,r,a][u]),a:Kn(o,2)}},kp=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},V7=function(t){var e=t.r,n=t.g,r=t.b,o=t.a,i=o<1?kp(Kn(255*o)):"";return"#"+kp(e)+kp(n)+kp(r)+i},z7=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:Kn(60*(a<0?a+6:a)),s:Kn(i?s/i*100:0),v:Kn(i/255*100),a:o}},k_=J.memo(function(t){var e=t.hue,n=t.onChange,r=_u(["react-colorful__hue",t.className]);return J.createElement("div",{className:r},J.createElement(Ob,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:Wl(e+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":Kn(e),"aria-valuemax":"360","aria-valuemin":"0"},J.createElement(Mb,{className:"react-colorful__hue-pointer",left:e/360,color:Db({h:e,s:100,v:100,a:1})})))}),E_=J.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:Db({h:e.h,s:100,v:100,a:1})};return J.createElement("div",{className:"react-colorful__saturation",style:r},J.createElement(Ob,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:Wl(e.s+100*o.left,0,100),v:Wl(e.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Kn(e.s)+"%, Brightness "+Kn(e.v)+"%"},J.createElement(Mb,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:Db(e)})))}),__=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},O_=function(t,e){return t.toLowerCase()===e.toLowerCase()||__(Ab(t),Ab(e))};function M_(t,e,n){var r=Eb(n),o=J.useState(function(){return t.toHsva(e)}),i=o[0],s=o[1],a=J.useRef({color:e,hsva:i});J.useEffect(function(){if(!t.equal(e,a.current.color)){var u=t.toHsva(e);a.current={hsva:u,color:e},s(u)}},[e,t]),J.useEffect(function(){var u;__(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 c=J.useCallback(function(u){s(function(f){return Object.assign({},f,u)})},[]);return[i,c]}var H7=typeof window<"u"?J.useLayoutEffect:J.useEffect,W7=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},A_=new Map,D_=function(t){H7(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!A_.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}`,A_.set(e,n);var r=W7();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},j7=function(t){var e=t.className,n=t.colorModel,r=t.color,o=r===void 0?n.defaultColor:r,i=t.onChange,s=kb(t,["className","colorModel","color","onChange"]),a=J.useRef(null);D_(a);var c=M_(n,o,i),u=c[0],f=c[1],p=_u(["react-colorful",e]);return J.createElement("div",Hl({},s,{ref:a,className:p}),J.createElement(E_,{hsva:u,onChange:f}),J.createElement(k_,{hue:u.h,onChange:f,className:"react-colorful__last-control"}))},U7={defaultColor:"000",toHsva:w_,fromHsva:function(t){return C_({h:t.h,s:t.s,v:t.v,a:1})},equal:O_},q7=function(t){return J.createElement(j7,Hl({},t,{colorModel:U7}))},K7=function(t){var e=t.className,n=t.hsva,r=t.onChange,o={backgroundImage:"linear-gradient(90deg, "+Ib(Object.assign({},n,{a:0}))+", "+Ib(Object.assign({},n,{a:1}))+")"},i=_u(["react-colorful__alpha",e]),s=Kn(100*n.a);return J.createElement("div",{className:i},J.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),J.createElement(Ob,{onMove:function(a){r({a:a.left})},onKey:function(a){r({a:Wl(n.a+a.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},J.createElement(Mb,{className:"react-colorful__alpha-pointer",left:n.a,color:Ib(n)})))},Y7=function(t){var e=t.className,n=t.colorModel,r=t.color,o=r===void 0?n.defaultColor:r,i=t.onChange,s=kb(t,["className","colorModel","color","onChange"]),a=J.useRef(null);D_(a);var c=M_(n,o,i),u=c[0],f=c[1],p=_u(["react-colorful",e]);return J.createElement("div",Hl({},s,{ref:a,className:p}),J.createElement(E_,{hsva:u,onChange:f}),J.createElement(k_,{hue:u.h,onChange:f}),J.createElement(K7,{hsva:u,onChange:f,className:"react-colorful__last-control"}))},G7={defaultColor:"0001",toHsva:w_,fromHsva:C_,equal:O_},J7=function(t){return J.createElement(Y7,Hl({},t,{colorModel:G7}))};function X7(t){try{return u$(t)}catch{return null}}const Ep=cn("ColorPicker",["gradientPicker","colorTextInput","swatchContainer"]),Pb=cn("ColorSwatchButton",["root","activeIcon","colorNotSet"]),Nb=rn("ColorSwatchButton"),Z7=re("button",{name:Nb,slot:"root",overridesResolver:(t,e)=>[e.root,t.ownerState.colorNotSet&&e.colorNotSet]})(({theme:t,ownerState:e})=>({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",...e.colorNotSet&&{background:`repeating-conic-gradient(
|
|
338
|
-
${t.palette.grey[400]} 0% 25%, ${t.palette.common.white} 0% 50%)
|
|
339
|
-
50% / 12px 12px`,backgroundClip:"content-box"}})),Q7=re(qL,{name:Nb,slot:"activeIcon",overridesResolver:(t,e)=>e.activeIcon})(()=>({height:"100%",width:"80%",verticalAlign:"middle"})),I_=J.forwardRef((t,e)=>{const n=ut({props:t,name:Nb}),{value:r,label:o,padding:i,active:s,className:a,classes:c={},sx:u,...f}=n,p=ro(),m=!r,y={active:s,colorNotSet:m};return v.jsx(Z7,{ref:e,type:"button",style:{backgroundColor:r,padding:i},"aria-label":o??r,value:r,...f,className:me([Pb.root,m&&[Pb.colorNotSet,c.colorNotSet],c.root,a]),sx:u,ownerState:y,children:s&&v.jsx(Q7,{fontSize:"small",className:me([Pb.activeIcon,c.activeIcon]),style:{color:r?p.palette.getContrastText(r):void 0}})})});I_.displayName="ColorSwatchButton";const Ou=rn("ColorPicker"),eq=re(q7,{name:Ou,slot:"gradientPicker",overridesResolver:(t,e)=>e.gradientPicker})(()=>({"&&":{width:"100%"}})),tq=re(J7,{name:Ou,slot:"gradientPicker",overridesResolver:(t,e)=>e.gradientPicker})(()=>({"&&":{width:"100%"}})),nq=re(Lc,{name:Ou,slot:"colorTextInput",overridesResolver:(t,e)=>e.colorTextInput})(({theme:t})=>({marginTop:t.spacing(1)})),rq=re("div",{name:Ou,slot:"swatchContainer",overridesResolver:(t,e)=>e.swatchContainer})(({theme:t})=>({display:"flex",flexWrap:"wrap",gap:5,marginTop:t.spacing(1)}));function oq(t){const e=ut({props:t,name:Ou}),{value:n,onChange:r,swatchColors:o,colorToHex:i=X7,disableAlpha:s=!1,labels:a={},classes:c={}}=e,{textFieldPlaceholder:u='Ex: "#7cb5ec"'}=a,f=J.useRef(null);J.useEffect(()=>{f.current&&f.current!==document.activeElement&&(f.current.value=n)},[n]);const p=(o??[]).map(y=>typeof y=="string"?{value:y}:y),m=i(n);return v.jsxs(v.Fragment,{children:[s?v.jsx(eq,{color:m??"#000000",className:me([Ep.gradientPicker,c.gradientPicker]),onChange:y=>{r(y,"gradient")}}):v.jsx(tq,{color:m??"#000000",className:me([Ep.gradientPicker,c.gradientPicker]),onChange:y=>{r(y,"gradient")}}),v.jsx(nq,{placeholder:u,variant:"outlined",size:"small",defaultValue:n||"",inputRef:f,spellCheck:!1,className:me([Ep.colorTextInput,c.colorTextInput]),onChange:y=>{const b=y.target.value,g=i(b);g&&r(g,"text")},fullWidth:!0}),p.length>0&&v.jsx(rq,{className:me([Ep.swatchContainer,c.swatchContainer]),children:p.map(y=>v.jsx(I_,{value:y.value,label:y.label,onClick:()=>{var b;r((b=y.value)!==null&&b!==void 0?b:"","swatch")},active:y.value==n||!y.value&&!n||!!y.value&&!!m&&i(y.value)===m},y.value))})]})}function P_(t){return t.substring(2).toLowerCase()}function iq(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function _p(t){const{children:e,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=t,s=D.useRef(!1),a=D.useRef(null),c=D.useRef(!1),u=D.useRef(!1);D.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const f=At(Ks(e),a),p=qe(b=>{const g=u.current;u.current=!1;const x=Fn(a.current);if(!c.current||!a.current||"clientX"in b&&iq(b,x))return;if(s.current){s.current=!1;return}let w;b.composedPath?w=b.composedPath().includes(a.current):w=!x.documentElement.contains(b.target)||a.current.contains(b.target),!w&&(n||!g)&&o(b)}),m=b=>g=>{u.current=!0;const x=e.props[b];x&&x(g)},y={ref:f};return i!==!1&&(y[i]=m(i)),D.useEffect(()=>{if(i!==!1){const b=P_(i),g=Fn(a.current),x=()=>{s.current=!0};return g.addEventListener(b,p),g.addEventListener("touchmove",x),()=>{g.removeEventListener(b,p),g.removeEventListener("touchmove",x)}}},[p,i]),r!==!1&&(y[r]=m(r)),D.useEffect(()=>{if(r!==!1){const b=P_(r),g=Fn(a.current);return g.addEventListener(b,p),()=>{g.removeEventListener(b,p)}}},[p,r]),D.cloneElement(e,y)}process.env.NODE_ENV!=="production"&&(_p.propTypes={children:Us.isRequired,disableReactTree:l.bool,mouseEvent:l.oneOf(["onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp",!1]),onClickAway:l.func.isRequired,touchEvent:l.oneOf(["onTouchEnd","onTouchStart",!1])}),process.env.NODE_ENV!=="production"&&(_p.propTypes=eg(_p.propTypes));const $b=U$({createStyledComponent:re("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>vt({props:t,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&($b.propTypes={children:l.node,component:l.elementType,direction:l.oneOfType([l.oneOf(["column-reverse","column","row-reverse","row"]),l.arrayOf(l.oneOf(["column-reverse","column","row-reverse","row"])),l.object]),divider:l.node,spacing:l.oneOfType([l.arrayOf(l.oneOfType([l.number,l.string])),l.number,l.object,l.string]),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),useFlexGap:l.bool});function sq(t){return Qe("MuiTooltip",t)}const xn=Ge("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function aq(t){return Math.round(t*1e5)/1e5}const lq=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:o,placement:i}=t,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${$e(i.split("-")[0])}`],arrow:["arrow"]};return Ze(s,sq,e)},cq=re(Tl,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(Tt(({theme:t})=>({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${xn.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${xn.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${xn.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${xn.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${xn.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${xn.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${xn.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${xn.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),uq=re("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${$e(n.placement.split("-")[0])}`]]}})(Tt(({theme:t})=>({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:ft(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium,[`.${xn.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${xn.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${xn.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${xn.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${aq(16/14)}em`,fontWeight:t.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${xn.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${xn.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${xn.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${xn.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${xn.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${xn.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${xn.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${xn.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${xn.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${xn.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),dq=re("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(Tt(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:ft(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Op=!1;const N_=new wd;let Mu={x:0,y:0};function Mp(t,e){return(n,...r)=>{e&&e(n,...r),t(n,...r)}}const Lb=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:s,components:a={},componentsProps:c={},describeChild:u=!1,disableFocusListener:f=!1,disableHoverListener:p=!1,disableInteractive:m=!1,disableTouchListener:y=!1,enterDelay:b=100,enterNextDelay:g=0,enterTouchDelay:x=700,followCursor:w=!1,id:E,leaveDelay:T=0,leaveTouchDelay:C=1500,onClose:k,onOpen:M,open:A,placement:I="bottom",PopperComponent:L,PopperProps:O={},slotProps:N={},slots:$={},title:V,TransitionComponent:z,TransitionProps:F,...B}=r,W=D.isValidElement(i)?i:v.jsx("span",{children:i}),Y=ro(),X=dg(),[K,Q]=D.useState(),[ve,xe]=D.useState(null),ye=D.useRef(!1),oe=m||w,ce=qs(),fe=qs(),q=qs(),ee=qs(),[se,be]=Go({controlled:A,default:!1,name:"Tooltip",state:"open"});let ne=se;if(process.env.NODE_ENV!=="production"){const{current:ht}=D.useRef(A!==void 0);D.useEffect(()=>{K&&K.disabled&&!ht&&V!==""&&K.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
|
|
340
|
-
`))},[V,K,ht])}const le=No(E),pe=D.useRef(),Oe=qe(()=>{pe.current!==void 0&&(document.body.style.WebkitUserSelect=pe.current,pe.current=void 0),ee.clear()});D.useEffect(()=>Oe,[Oe]);const ke=ht=>{N_.clear(),Op=!0,be(!0),M&&!ne&&M(ht)},Fe=qe(ht=>{N_.start(800+T,()=>{Op=!1}),be(!1),k&&ne&&k(ht),ce.start(Y.transitions.duration.shortest,()=>{ye.current=!1})}),Ie=ht=>{ye.current&&ht.type!=="touchstart"||(K&&K.removeAttribute("title"),fe.clear(),q.clear(),b||Op&&g?fe.start(Op?g:b,()=>{ke(ht)}):ke(ht))},Ke=ht=>{fe.clear(),q.start(T,()=>{Fe(ht)})},[,Xe]=D.useState(!1),U=ht=>{Ja(ht.target)||(Xe(!1),Ke(ht))},Z=ht=>{K||Q(ht.currentTarget),Ja(ht.target)&&(Xe(!0),Ie(ht))},he=ht=>{ye.current=!0;const nr=W.props;nr.onTouchStart&&nr.onTouchStart(ht)},Ne=ht=>{he(ht),q.clear(),ce.clear(),Oe(),pe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ee.start(x,()=>{document.body.style.WebkitUserSelect=pe.current,Ie(ht)})},Pe=ht=>{W.props.onTouchEnd&&W.props.onTouchEnd(ht),Oe(),q.start(C,()=>{Fe(ht)})};D.useEffect(()=>{if(!ne)return;function ht(nr){nr.key==="Escape"&&Fe(nr)}return document.addEventListener("keydown",ht),()=>{document.removeEventListener("keydown",ht)}},[Fe,ne]);const Ae=At(Ks(W),Q,n);!V&&V!==0&&(ne=!1);const ze=D.useRef(),st=ht=>{const nr=W.props;nr.onMouseMove&&nr.onMouseMove(ht),Mu={x:ht.clientX,y:ht.clientY},ze.current&&ze.current.update()},pt={},Vt=typeof V=="string";u?(pt.title=!ne&&Vt&&!p?V:null,pt["aria-describedby"]=ne?le:null):(pt["aria-label"]=Vt?V:null,pt["aria-labelledby"]=ne&&!Vt?le:null);const rt={...pt,...B,...W.props,className:me(B.className,W.props.className),onTouchStart:he,ref:Ae,...w?{onMouseMove:st}:{}};process.env.NODE_ENV!=="production"&&(rt["data-mui-internal-clone-element"]=!0,D.useEffect(()=>{K&&!K.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
|
|
341
|
-
`))},[K]));const Wt={};y||(rt.onTouchStart=Ne,rt.onTouchEnd=Pe),p||(rt.onMouseOver=Mp(Ie,rt.onMouseOver),rt.onMouseLeave=Mp(Ke,rt.onMouseLeave),oe||(Wt.onMouseOver=Ie,Wt.onMouseLeave=Ke)),f||(rt.onFocus=Mp(Z,rt.onFocus),rt.onBlur=Mp(U,rt.onBlur),oe||(Wt.onFocus=Z,Wt.onBlur=U)),process.env.NODE_ENV!=="production"&&W.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${W.props.title}\` or the Tooltip component.`].join(`
|
|
342
|
-
`));const Qt={...r,isRtl:X,arrow:o,disableInteractive:oe,placement:I,PopperComponentProp:L,touch:ye.current},ge=typeof N.popper=="function"?N.popper(Qt):N.popper,We=D.useMemo(()=>{var nr,Ui;let ht=[{name:"arrow",enabled:!!ve,options:{element:ve,padding:4}}];return(nr=O.popperOptions)!=null&&nr.modifiers&&(ht=ht.concat(O.popperOptions.modifiers)),(Ui=ge==null?void 0:ge.popperOptions)!=null&&Ui.modifiers&&(ht=ht.concat(ge.popperOptions.modifiers)),{...O.popperOptions,...ge==null?void 0:ge.popperOptions,modifiers:ht}},[ve,O.popperOptions,ge==null?void 0:ge.popperOptions]),_e=lq(Qt),je=typeof N.transition=="function"?N.transition(Qt):N.transition,et={slots:{popper:a.Popper,transition:a.Transition??z,tooltip:a.Tooltip,arrow:a.Arrow,...$},slotProps:{arrow:N.arrow??c.arrow,popper:{...O,...ge??c.popper},tooltip:N.tooltip??c.tooltip,transition:{...F,...je??c.transition}}},[it,zt]=Lt("popper",{elementType:cq,externalForwardedProps:et,ownerState:Qt,className:me(_e.popper,O==null?void 0:O.className)}),[tr,fr]=Lt("transition",{elementType:pl,externalForwardedProps:et,ownerState:Qt}),[zo,Na]=Lt("tooltip",{elementType:uq,className:_e.tooltip,externalForwardedProps:et,ownerState:Qt}),[Ps,fi]=Lt("arrow",{elementType:dq,className:_e.arrow,externalForwardedProps:et,ownerState:Qt,ref:xe});return v.jsxs(D.Fragment,{children:[D.cloneElement(W,rt),v.jsx(it,{as:L??Tl,placement:I,anchorEl:w?{getBoundingClientRect:()=>({top:Mu.y,left:Mu.x,right:Mu.x,bottom:Mu.y,width:0,height:0})}:K,popperRef:ze,open:K?ne:!1,id:le,transition:!0,...Wt,...zt,popperOptions:We,children:({TransitionProps:ht})=>v.jsx(tr,{timeout:Y.transitions.duration.shorter,...ht,...fr,children:v.jsxs(zo,{...Na,children:[V,o?v.jsx(Ps,{...fi}):null]})})})]})});process.env.NODE_ENV!=="production"&&(Lb.propTypes={arrow:l.bool,children:Us.isRequired,classes:l.object,className:l.string,components:l.shape({Arrow:l.elementType,Popper:l.elementType,Tooltip:l.elementType,Transition:l.elementType}),componentsProps:l.shape({arrow:l.object,popper:l.object,tooltip:l.object,transition:l.object}),describeChild:l.bool,disableFocusListener:l.bool,disableHoverListener:l.bool,disableInteractive:l.bool,disableTouchListener:l.bool,enterDelay:l.number,enterNextDelay:l.number,enterTouchDelay:l.number,followCursor:l.bool,id:l.string,leaveDelay:l.number,leaveTouchDelay:l.number,onClose:l.func,onOpen:l.func,open:l.bool,placement:l.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"]),PopperComponent:l.elementType,PopperProps:l.object,slotProps:l.shape({arrow:l.oneOfType([l.func,l.object]),popper:l.oneOfType([l.func,l.object]),tooltip:l.oneOfType([l.func,l.object]),transition:l.oneOfType([l.func,l.object])}),slots:l.shape({arrow:l.elementType,popper:l.elementType,tooltip:l.elementType,transition:l.elementType}),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),title:l.node,TransitionComponent:l.elementType,TransitionProps:l.object});const fq=cn("ColorPickerPopper",["root"]);function pq({value:t,onCancel:e,onSave:n,swatchColors:r,labels:o={},ColorPickerProps:i}){const{removeColorButton:s="None",removeColorButtonTooltipTitle:a="",cancelButton:c="Cancel",saveButton:u="OK"}=o,[f,p]=J.useState(t);return J.useEffect(()=>{p(t)},[t]),v.jsxs(v.Fragment,{children:[v.jsx(oq,{swatchColors:r,value:f,onChange:m=>{p(m)},labels:o,...i}),v.jsxs($b,{direction:"row",justifyContent:"space-between",sx:{mt:1},children:[v.jsx(Lb,{title:a,arrow:!0,children:v.jsx(go,{onClick:()=>{n("")},size:"small",children:s})}),v.jsx(go,{onClick:e,size:"small",children:c}),v.jsx(go,{onClick:()=>{n(f)},size:"small",children:u})]})]})}const $_=rn("ColorPickerPopper"),hq=re(Tl,{name:$_,slot:"root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({zIndex:t.zIndex.tooltip,width:235}));function mq(t){const e=ut({props:t,name:$_}),{value:n,onSave:r,onCancel:o,swatchColors:i,ColorPickerProps:s,labels:a,classes:c={},sx:u,...f}=e;return v.jsx(hq,{transition:!0,placement:"bottom-start",...f,className:me([fq.root,c.root,f.className]),sx:u,children:({TransitionProps:p})=>v.jsx(Xo,{...p,timeout:100,children:v.jsx("div",{children:v.jsx(_p,{mouseEvent:"onMouseDown",touchEvent:"onTouchStart",onClickAway:o,children:v.jsx(Ci,{elevation:5,sx:{p:2.5,pb:1},children:v.jsx(pq,{value:n||"",onSave:r,onCancel:o,swatchColors:i,ColorPickerProps:s,labels:a})})})})})})}function gq(t){return Qe("MuiToggleButton",t)}const Ap=Ge("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),L_=D.createContext({});process.env.NODE_ENV!=="production"&&(L_.displayName="ToggleButtonGroupContext");const F_=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(F_.displayName="ToggleButtonGroupButtonContext");function yq(t,e){return e===void 0||t===void 0?!1:Array.isArray(e)?e.includes(t):t===e}const bq=t=>{const{classes:e,fullWidth:n,selected:r,disabled:o,size:i,color:s}=t,a={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${$e(i)}`,s]};return Ze(a,gq,e)},vq=re(cs,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`size${$e(n.size)}`]]}})(Tt(({theme:t})=>({...t.typography.button,borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active,[`&.${Ap.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:ft(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${Ap.selected}`]:{color:(t.vars||t).palette.text.primary,backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.selectedOpacity})`:ft(t.palette.text.primary,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ft(t.palette.text.primary,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.selectedOpacity})`:ft(t.palette.text.primary,t.palette.action.selectedOpacity)}}}}},...Object.entries(t.palette).filter(Wn()).map(([e])=>({props:{color:e},style:{[`&.${Ap.selected}`]:{color:(t.vars||t).palette[e].main,backgroundColor:t.vars?`rgba(${t.vars.palette[e].mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ft(t.palette[e].main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[e].mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ft(t.palette[e].main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette[e].mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ft(t.palette[e].main,t.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:t.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:t.typography.pxToRem(15)}}]}))),R_=D.forwardRef(function(e,n){const{value:r,...o}=D.useContext(L_),i=D.useContext(F_),s=Xa({...o,selected:yq(e.value,r)},e),a=vt({props:s,name:"MuiToggleButton"}),{children:c,className:u,color:f="standard",disabled:p=!1,disableFocusRipple:m=!1,fullWidth:y=!1,onChange:b,onClick:g,selected:x,size:w="medium",value:E,...T}=a,C={...a,color:f,disabled:p,disableFocusRipple:m,fullWidth:y,size:w},k=bq(C),M=I=>{g&&(g(I,E),I.defaultPrevented)||b&&b(I,E)},A=i||"";return v.jsx(vq,{className:me(o.className,k.root,u,A),disabled:p,focusRipple:!m,ref:n,onClick:M,onChange:b,value:E,ownerState:C,"aria-pressed":x,...T,children:c})});process.env.NODE_ENV!=="production"&&(R_.propTypes={children:l.node,classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["standard","primary","secondary","error","info","success","warning"]),l.string]),disabled:l.bool,disableFocusRipple:l.bool,disableRipple:l.bool,fullWidth:l.bool,onChange:l.func,onClick:l.func,selected:l.bool,size:l.oneOfType([l.oneOf(["small","medium","large"]),l.string]),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),value:l.any.isRequired});const B_=cn("MenuButton",["root","icon"]);let Fb,Rb;function xq(){return Fb===void 0&&(Fb=navigator.platform.includes("Mac")),Fb}function Sq(){return xq()?"⌘":"Ctrl"}function wq(){return Rb===void 0&&(Rb=window&&"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),Rb}const Dp=cn("MenuButtonTooltip",["titleContainer","label","shortcutKey","contentWrapper"]),Au=rn("MenuButtonTooltip"),Cq=re("div",{name:Au,slot:"titleContainer",overridesResolver:(t,e)=>e.tooltip})(()=>({textAlign:"center"})),Tq=re("div",{name:Au,slot:"label",overridesResolver:(t,e)=>e.label})(({theme:t})=>({fontSize:t.typography.pxToRem(13)})),kq=re("span",{name:Au,slot:"shortcutKey",overridesResolver:(t,e)=>e.shortcutKey})(({theme:t})=>({fontSize:t.typography.pxToRem(12),border:`1px solid ${ft(t.palette.text.secondary,.2)}`,backgroundColor:ft(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}})),Eq=re("span",{name:Au,slot:"contentWrapper",overridesResolver:(t,e)=>e.contentWrapper})({});function Ip(t){const e=ut({props:t,name:Au}),{label:n,shortcutKeys:r,placement:o="top",contentWrapperClassName:i,children:s,className:a,classes:c={},sx:u,...f}=e;return v.jsx(Lb,{title:n||r&&r.length>0?v.jsxs(Cq,{className:me([Dp.titleContainer,c.titleContainer]),children:[v.jsx(Tq,{className:me([Dp.label,c.label]),children:n}),r&&r.length>0&&v.jsx(co,{variant:"body2",component:"div",children:r.map((p,m)=>v.jsx(kq,{className:me([Dp.shortcutKey,c.shortcutKey]),children:p==="mod"?Sq():p},m))})]}):"",placement:o,arrow:!0,sx:u,...f,children:v.jsx(Eq,{className:me([a,Dp.contentWrapper,c.contentWrapper,i]),children:s})})}const jl="1.25rem",Bb=rn("MenuButton"),_q=re("span",{name:Bb,slot:"root",overridesResolver:(t,e)=>e.root})(()=>({[`&& .${Ap.root}`]:{border:"none",padding:5}})),Oq=re("span",{name:Bb,slot:"icon",overridesResolver:(t,e)=>e.icon})(()=>({fontSize:jl}));function It(t){const e=ut({props:t,name:Bb}),{tooltipLabel:n,tooltipShortcutKeys:r,IconComponent:o,buttonRef:i,children:s,className:a,classes:c={},sx:u,...f}=e;return v.jsx(_q,{className:me([B_.root,a,c.root]),sx:u,children:v.jsx(Ip,{label:n,shortcutKeys:r,children:v.jsx(R_,{ref:i,size:"small",value:n,"aria-label":n,...f,children:s??(o&&v.jsx(Oq,{as:o,className:me([B_.icon,c.icon])}))})})})}function Mq({...t}){const e=Pt();return v.jsx(It,{tooltipLabel:"Insert image",IconComponent:UL,disabled:!(e!=null&&e.isEditable)||!e.can().setImage({src:"http://example.com"}),...t})}const Aq=Be(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"),Dq=Be(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"),Iq=Be(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"),Pq=Be(v.jsx("path",{d:"M 2 20 h 20 v 4 H 2 v -4 z"}),"FormatColorBar"),Nq=Be(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"),$q=Be(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"),Lq=Be(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"),Fq=Be(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"),Rq=Be(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"),Bq=Be(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"),Vq=Be(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"),zq=Be(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"),Hq=Be(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"),Wq=Be(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"),jq=Be(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");function Uq(t){const e=Pt();return v.jsx(It,{tooltipLabel:"Insert table",IconComponent:jq,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 qq(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Blockquote",tooltipShortcutKeys:["mod","Shift","B"],IconComponent:cF,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 Kq(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Bold",tooltipShortcutKeys:["mod","B"],IconComponent:tF,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 Yq(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Bulleted list",tooltipShortcutKeys:["mod","Shift","8"],IconComponent:aF,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 Gq(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Code",tooltipShortcutKeys:["mod","E"],IconComponent:JL,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 Jq(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Code block",tooltipShortcutKeys:["mod","Alt","C"],IconComponent:Aq,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 Vb=cn("MenuButtonColorPicker",["icon","colorIndicatorIcon","colorIndicatorIconDisabled"]),zb=rn("MenuButtonColorPicker"),Xq=re("span",{name:zb,slot:"icon",overridesResolver:(t,e)=>e.icon})({fontSize:jl}),Zq=re(Pq,{name:zb,slot:"colorIndicatorIcon",overridesResolver:(t,e)=>[e.colorIndicatorIcon,t.ownerState.disabled&&e.colorIndicatorIconDisabled]})(({theme:t,ownerState:e})=>({fontSize:jl,position:"absolute",...e.disabled&&{color:t.palette.action.disabled}}));function V_(t){const e=ut({props:t,name:zb}),{value:n,onChange:r,swatchColors:o,labels:i,hideColorIndicator:s=!1,popperId:a,PopperProps:c,ColorPickerProps:u,classes:f={},...p}=e,[m,y]=J.useState(null),b={disabled:p.disabled},g=()=>{y(null)},{IconComponent:x,children:w,...E}=p;return v.jsxs(v.Fragment,{children:[v.jsx(It,{onClick:T=>{m?g():y(T.currentTarget)},"aria-describedby":a,...E,children:w??v.jsxs(v.Fragment,{children:[x&&v.jsx(Xq,{as:x,ownerState:b,className:me([Vb.icon,f.icon])}),!s&&n&&v.jsx(Zq,{ownerState:b,className:me([Vb.colorIndicatorIcon,f.colorIndicatorIcon,p.disabled&&[Vb.colorIndicatorIconDisabled,f.colorIndicatorIconDisabled]]),style:p.disabled?void 0:{color:n}})]})}),v.jsx(mq,{id:a,open:!!m,anchorEl:m,value:n??"",onSave:T=>{r(T),g()},onCancel:g,swatchColors:o,ColorPickerProps:u,labels:i,...c})]})}function Qq(t){const e=Pt(),n=J.useRef(null);return v.jsx(It,{buttonRef:n,tooltipLabel:"Link",tooltipShortcutKeys:["mod","Shift","U"],IconComponent:VS,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 eK({defaultMarkColor:t="#ffff00",...e}){const n=Pt(),r=n!=null&&n.isActive("highlight")?n.getAttributes("highlight").color||t:"";return v.jsx(V_,{IconComponent:$q,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 tK(t){const e=Pt();return v.jsx(It,{tooltipLabel:"Insert horizontal line",IconComponent:pF,disabled:!(e!=null&&e.isEditable)||!e.can().setHorizontalRule(),onClick:()=>e==null?void 0:e.chain().focus().setHorizontalRule().run(),...t})}var Hb={},Wb={},z_;function nK(){return z_||(z_=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n,r,{signal:o,edges:i}={}){let s,a=null;const c=i!=null&&i.includes("leading"),u=i==null||i.includes("trailing"),f=()=>{a!==null&&(n.apply(s,a),s=void 0,a=null)},p=()=>{u&&f(),g()};let m=null;const y=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,p()},r)},b=()=>{m!==null&&(clearTimeout(m),m=null)},g=()=>{b(),s=void 0,a=null},x=()=>{f()},w=function(...E){if(o!=null&&o.aborted)return;s=this,a=E;const T=m==null;y(),c&&T&&f()};return w.schedule=y,w.cancel=g,w.flush=x,o==null||o.addEventListener("abort",g,{once:!0}),w}t.debounce=e})(Wb)),Wb}var H_;function W_(){return H_||(H_=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=nK();function n(r,o=0,i={}){typeof i!="object"&&(i={});const{leading:s=!1,trailing:a=!0,maxWait:c}=i,u=Array(2);s&&(u[0]="leading"),a&&(u[1]="trailing");let f,p=null;const m=e.debounce(function(...g){f=r.apply(this,g),p=null},o,{edges:u}),y=function(...g){return c!=null&&(p===null&&(p=Date.now()),Date.now()-p>=c)?(f=r.apply(this,g),p=Date.now(),m.cancel(),m.schedule(),f):(m.apply(this,g),f)},b=()=>(m.flush(),f);return y.cancel=m.cancel,y.flush=b,y}t.debounce=n})(Hb)),Hb}var jb,j_;function rK(){return j_||(j_=1,jb=W_().debounce),jb}var oK=rK();const U_=Rr(oK);class Ub extends J.Component{constructor(e){var n,r;super(e),this.updateDebounced=U_(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}}function iK(t,e){const n=Ro(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 sK(t,e){const n=Bn(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 Pp(t,e){const n=ku(typeof e=="string"?e:e.name,t.schema);return n==="node"?sK(t,e):n==="mark"?iK(t,e):[]}function qb({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()}/*!
|
|
343
|
-
* encodeurl
|
|
344
|
-
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
345
|
-
* MIT Licensed
|
|
346
|
-
*/var Kb,q_;function aK(){if(q_)return Kb;q_=1,Kb=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 Kb}var lK=aK();const cK=Rr(lK);function uK(t){let e=t.trim();return e&&!/^(https?:\/\/|mailto:|tel:|sms:|\/|#)/.test(e)&&(e=`http://${e}`),cK(e)}function dK(t){return t.toLowerCase().normalize("NFKD").replace(/[^\w\s-]+/g,"").replace(/[-\s]+/g,"-").replace(/^[\s-_]+|[\s-_]+$/g,"")}function fK(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()}`}function pK({onUploadFiles:t,inputProps:e,insertImages:n=qb,...r}){const o=Pt(),i=J.useRef(null),s=async a=>{if(!o||o.isDestroyed||a.length===0)return;const c=await t(Array.from(a));n({editor:o,images:c})};return v.jsxs(v.Fragment,{children:[v.jsx(Mq,{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 hK(t){const e=Pt();return v.jsx(It,{tooltipLabel:"Indent",tooltipShortcutKeys:["Tab"],IconComponent:iF,disabled:!(e!=null&&e.isEditable)||!e.can().sinkListItem("listItem"),onClick:()=>e==null?void 0:e.chain().focus().sinkListItem("listItem").run(),...t})}function mK(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Italic",tooltipShortcutKeys:["mod","I"],IconComponent:sF,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 gK(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Ordered list",tooltipShortcutKeys:["mod","Shift","7"],IconComponent:lF,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 yK(t){const e=Pt();return v.jsx(It,{tooltipLabel:"Redo",tooltipShortcutKeys:["mod","Shift","Z"],IconComponent:xF,disabled:!(e!=null&&e.isEditable)||!e.can().redo(),onClick:()=>e==null?void 0:e.chain().focus().redo().run(),...t})}function bK(t){const e=Pt();return v.jsx(It,{tooltipLabel:"Remove inline formatting",IconComponent:nF,disabled:!(e!=null&&e.isEditable)||!e.can().unsetAllMarks(),onClick:()=>e==null?void 0:e.chain().focus().unsetAllMarks().run(),...t})}function vK(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Strikethrough",tooltipShortcutKeys:["mod","Shift","S"],IconComponent:kF,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 xK(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Subscript",tooltipShortcutKeys:["mod",","],IconComponent:EF,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 SK(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Superscript",tooltipShortcutKeys:["mod","."],IconComponent:_F,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 wK(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Task checklist",tooltipShortcutKeys:["mod","Shift","9"],IconComponent:KL,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 CK({IconComponent:t=Nq,tooltipLabel:e="Text color",defaultTextColor:n="",...r}){const o=Pt(),i=o?Pp(o.state,"textStyle"):[],s=!!(o!=null&&o.isActive("textStyle")),a=i.map(f=>f.color||n);s||a.push(n);const c=new Set(a).size;let u;return c===1?u=a[0]:c>1?u="":u=n,v.jsx(V_,{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 TK(t){var e;const n=Pt();return v.jsx(It,{tooltipLabel:"Underline",tooltipShortcutKeys:["mod","U"],IconComponent:dF,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 kK(t){const e=Pt();return v.jsx(It,{tooltipLabel:"Undo",tooltipShortcutKeys:["mod","Z"],IconComponent:OF,disabled:!(e!=null&&e.isEditable)||!e.can().undo(),onClick:()=>e==null?void 0:e.chain().focus().undo().run(),...t})}function EK(t){const e=Pt();return v.jsx(It,{tooltipLabel:"Unindent",tooltipShortcutKeys:["Shift","Tab"],IconComponent:oF,disabled:!(e!=null&&e.isEditable)||!e.can().liftListItem("listItem"),onClick:()=>e==null?void 0:e.chain().focus().liftListItem("listItem").run(),...t})}const _K=Ge("MuiBox",["root"]),OK=MS(),Yb=XN({themeId:al,defaultTheme:OK,defaultClassName:_K.root,generateClassName:Lx.generate});process.env.NODE_ENV!=="production"&&(Yb.propTypes={children:l.node,component:l.elementType,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object])});const MK=cn("MenuControlsContainer",["root"]),K_=rn("MenuControlsContainer"),AK=re(Yb,{name:K_,slot:"root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({display:"flex",rowGap:t.spacing(.3),columnGap:t.spacing(.3),alignItems:"center",flexWrap:"wrap"}));function Y_(t){const e=ut({props:t,name:K_}),{children:n,className:r,classes:o={},sx:i,debounced:s,DebounceProps:a,...c}=e,u=v.jsx(AK,{...c,className:me([MK.root,r,o.root]),sx:i,children:n});return s?v.jsx(Ub,{...a,children:u}):u}const G_=cn("MenuSelect",["root","tooltip"]),Gb=rn("MenuSelect"),DK=re(uf,{name:Gb,slot:"root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({[`&:not(:hover):not(.${so.focused}) .${so.notchedOutline}`]:{borderWidth:0},[`& .${IS.root}`]:{color:t.palette.action.active},[`&.${Ti.disabled} .${IS.root}`]:{color:t.palette.action.disabled},[`& .${Ti.select}`]:{paddingTop:"3px",paddingBottom:"3px",fontSize:"0.9em"},[`&&& .${Ti.select}`]:{paddingLeft:t.spacing(1),paddingRight:t.spacing(3)},[`& .${Ti.icon}`]:{right:1}})),IK=re(Ip,{name:Gb,slot:"tooltip",overridesResolver:(t,e)=>e.tooltip})({display:"inline-flex"});function Np(t){const e=ut({props:t,name:Gb}),{tooltipTitle:n,classes:r={},sx:o,...i}=e,[s,a]=J.useState(!1),c=v.jsx(DK,{margin:"none",variant:"outlined",size:"small",...i,onMouseEnter:(...u)=>{var f;a(!0),(f=i.onMouseEnter)===null||f===void 0||f.call(i,...u)},onMouseLeave:(...u)=>{var f;a(!1),(f=i.onMouseLeave)===null||f===void 0||f.call(i,...u)},onClick:(...u)=>{var f;a(!1),(f=i.onClick)===null||f===void 0||f.call(i,...u)},onOpen:(...u)=>{var f;a(!1),(f=i.onOpen)===null||f===void 0||f.call(i,...u)},MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},...i.MenuProps},className:me([G_.root,r.root,i.className]),sx:o});return n?v.jsx(IK,{label:n,open:s,className:me([G_.tooltip,r.tooltip]),children:c}):c}function PK(t){return Qe("MuiDivider",t)}const J_=Ge("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),NK=t=>{const{absolute:e,children:n,classes:r,flexItem:o,light:i,orientation:s,textAlign:a,variant:c}=t;return Ze({root:["root",e&&"absolute",c,i&&"light",s==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},PK,r)},$K=re("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(Tt(({theme:t})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:ft(t.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:t.spacing(2),marginRight:t.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:t.spacing(1),marginBottom:t.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&e.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>e.orientation==="vertical"&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>e.textAlign==="right"&&e.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>e.textAlign==="left"&&e.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),LK=re("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(Tt(({theme:t})=>({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`}}]}))),$p=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiDivider"}),{absolute:o=!1,children:i,className:s,orientation:a="horizontal",component:c=i||a==="vertical"?"div":"hr",flexItem:u=!1,light:f=!1,role:p=c!=="hr"?"separator":void 0,textAlign:m="center",variant:y="fullWidth",...b}=r,g={...r,absolute:o,component:c,flexItem:u,light:f,orientation:a,role:p,textAlign:m,variant:y},x=NK(g);return v.jsx($K,{as:c,className:me(x.root,s),role:p,ref:n,ownerState:g,"aria-orientation":p==="separator"&&(c!=="hr"||a==="vertical")?a:void 0,...b,children:i?v.jsx(LK,{className:x.wrapper,ownerState:g,children:i}):null})});$p&&($p.muiSkipListHighlight=!0),process.env.NODE_ENV!=="production"&&($p.propTypes={absolute:l.bool,children:l.node,classes:l.object,className:l.string,component:l.elementType,flexItem:l.bool,light:l.bool,orientation:l.oneOf(["horizontal","vertical"]),role:l.string,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),textAlign:l.oneOf(["center","left","right"]),variant:l.oneOfType([l.oneOf(["fullWidth","inset","middle"]),l.string])});const X_=Ge("MuiListItemIcon",["root","alignItemsFlexStart"]),Z_=Ge("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function FK(t){return Qe("MuiMenuItem",t)}const Du=Ge("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),RK=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},BK=t=>{const{disabled:e,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=t,c=Ze({root:["root",n&&"dense",e&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},FK,s);return{...s,...c}},VK=re(cs,{shouldForwardProp:t=>oo(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:RK})(Tt(({theme:t})=>({...t.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Du.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ft(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Du.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:ft(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Du.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ft(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ft(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Du.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Du.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${J_.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${J_.inset}`]:{marginLeft:52},[`& .${Z_.root}`]:{marginTop:0,marginBottom:0},[`& .${Z_.inset}`]:{paddingLeft:36},[`& .${X_.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[t.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...t.typography.body2,[`& .${X_.root} svg`]:{fontSize:"1.25rem"}}}]}))),br=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:a=!1,disableGutters:c=!1,focusVisibleClassName:u,role:f="menuitem",tabIndex:p,className:m,...y}=r,b=D.useContext(ls),g=D.useMemo(()=>({dense:s||b.dense||!1,disableGutters:c}),[b.dense,s,c]),x=D.useRef(null);Rn(()=>{o&&(x.current?x.current.focus():process.env.NODE_ENV!=="production"&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))},[o]);const w={...r,dense:g.dense,divider:a,disableGutters:c},E=BK(r),T=At(x,n);let C;return r.disabled||(C=p!==void 0?p:-1),v.jsx(ls.Provider,{value:g,children:v.jsx(VK,{ref:T,role:f,tabIndex:C,component:i,focusVisibleClassName:me(E.focusVisible,u),className:me(E.root,m),...y,ownerState:w,classes:E})})});process.env.NODE_ENV!=="production"&&(br.propTypes={autoFocus:l.bool,children:l.node,classes:l.object,className:l.string,component:l.elementType,dense:l.bool,disabled:l.bool,disableGutters:l.bool,divider:l.bool,focusVisibleClassName:l.string,role:l.string,selected:l.bool,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),tabIndex:l.number});const Jb=cn("MenuSelectFontFamily",["root","selectInput"]),Q_=rn("MenuSelectFontFamily"),zK=re(Np,{name:Q_,slot:"root",overridesResolver:(t,e)=>e.root})({[`& .${Jb.selectInput}`]:{width:55}}),Xb="MULTIPLE";function HK(t){var e;const n=ut({props:t,name:Q_}),{options:r,hideUnsetOption:o=!1,unsetOptionLabel:i="Default",emptyLabel:s="Font",classes:a={},sx:c,...u}=n,f=Pt(),p=f?Pp(f.state,"textStyle"):[],m=!!(f!=null&&f.isActive("textStyle")),y=p.map(x=>{var w;return(w=x.fontFamily)!==null&&w!==void 0?w:""});m||y.push("");const b=new Set(y).size;let g;return b===1?g=y[0]:b>1?g=Xb:g="",v.jsxs(zK,{onChange:x=>{const w=x.target.value;w?f==null||f.chain().setFontFamily(w).focus().run():f==null||f.chain().unsetFontFamily().focus().run()},disabled:!(f!=null&&f.isEditable)||!f.can().setFontFamily("serif"),renderValue:x=>{var w,E;return!x||x===Xb?s:(E=(w=r.find(T=>T.value===x))===null||w===void 0?void 0:w.label)!==null&&E!==void 0?E:x},displayEmpty:!0,"aria-label":"Font families",tooltipTitle:"Font",...u,value:g||"",inputProps:{...u.inputProps,className:me([Jb.selectInput,a.selectInput,(e=u.inputProps)===null||e===void 0?void 0:e.className])},className:me([Jb.root,a.root,u.className]),sx:c,children:[!o&&v.jsx(br,{value:"",children:i}),v.jsx(br,{style:{display:"none"},value:Xb}),r.map(x=>{var w;return v.jsx(br,{value:x.value,children:v.jsx("span",{style:{fontFamily:x.value},children:(w=x.label)!==null&&w!==void 0?w:x.value})},x.value)})]})}const Lp=cn("MenuSelectFontSize",["root","selectInput","icon"]),Zb=rn("MenuSelectFontSize"),WK=re(Np,{name:Zb,slot:"root",overridesResolver:(t,e)=>e.root})(()=>({[`& .${Lp.selectInput}`]:{width:17,display:"flex",alignItems:"center"}})),jK=re(uF,{name:Zb,slot:"icon",overridesResolver:(t,e)=>e.icon})(()=>({fontSize:jl})),UK=["8px","9px","10px","11px","12px","14px","16px","18px","24px","30px","36px","48px","60px","72px","96px"];function eO(t){return t.replace("px","")}const Qb="MULTIPLE";function qK(t){var e;const n=ut({props:t,name:Zb}),{sizeOptions:r,options:o=r??UK,unsetOptionContent:i,unsetOptionLabel:s=i??"Default",emptyValue:a,emptyLabel:c=a,hideUnsetOption:u=!1,classes:f={},sx:p,...m}=n,y=Pt(),b=(o??[]).map(C=>typeof C=="string"?{value:C}:C),g=y?Pp(y.state,"textStyle"):[],x=!!(y!=null&&y.isActive("textStyle")),w=g.map(C=>{var k;return(k=C.fontSize)!==null&&k!==void 0?k:""});x||w.push("");const E=new Set(w).size;let T;return E===1?T=w[0]:E>1?T=Qb:T="",v.jsxs(WK,{onChange:C=>{const k=C.target.value;k?y==null||y.chain().setFontSize(k).focus().run():y==null||y.chain().unsetFontSize().focus().run()},disabled:!(y!=null&&y.isEditable)||!y.can().setFontSize("12px"),renderValue:C=>!C||C===Qb?c??v.jsx(jK,{className:me([Lp.icon,f.icon])}):eO(C),displayEmpty:!0,"aria-label":"Font sizes",tooltipTitle:"Font size",...m,value:T||"",inputProps:{...m.inputProps,className:me([Lp.selectInput,f.selectInput,(e=m.inputProps)===null||e===void 0?void 0:e.className])},className:me([Lp.root,f.root,m.className]),sx:p,children:[!u&&v.jsx(br,{value:"",children:s}),v.jsx(br,{style:{display:"none"},value:Qb}),b.map(C=>{var k;return v.jsx(br,{value:C.value,children:(k=C.label)!==null&&k!==void 0?k:eO(C.value)},C.value)})]})}const fn=cn("MenuSelectHeading",["root","selectInput","menuOption","paragraphOption","headingOption","headingOption1","headingOption2","headingOption3","headingOption4","headingOption5","headingOption6"]),ii=rn("MenuSelectHeading"),KK=re(Np,{name:ii,slot:"root",overridesResolver:(t,e)=>e.root})({[`& .${fn.selectInput}`]:{width:77}}),tO=re(Ip,{name:ii,slot:"menuOption",overridesResolver:(t,e)=>e.menuOption})({display:"block",width:"100%"}),Ul=re(tO,{name:ii,slot:"headingOption",overridesResolver:(t,e)=>e.option})({marginBlockStart:0,marginBlockEnd:0,fontWeight:"bold"}),YK=re(Ul,{name:ii,slot:"headingOption1",overridesResolver:(t,e)=>e.headingOption1})(({theme:t})=>({fontSize:Ta(t)["& h1"].fontSize})),GK=re(Ul,{name:ii,slot:"headingOption2",overridesResolver:(t,e)=>e.headingOption2})(({theme:t})=>({fontSize:Ta(t)["& h2"].fontSize})),JK=re(Ul,{name:ii,slot:"headingOption3",overridesResolver:(t,e)=>e.headingOption3})(({theme:t})=>({fontSize:Ta(t)["& h3"].fontSize})),XK=re(Ul,{name:ii,slot:"headingOption4",overridesResolver:(t,e)=>e.headingOption4})(({theme:t})=>({fontSize:Ta(t)["& h4"].fontSize})),ZK=re(Ul,{name:ii,slot:"headingOption5",overridesResolver:(t,e)=>e.headingOption5})(({theme:t})=>({fontSize:Ta(t)["& h5"].fontSize})),QK=re(Ul,{name:ii,slot:"headingOption6",overridesResolver:(t,e)=>e.headingOption6})(({theme:t})=>({fontSize:Ta(t)["& h6"].fontSize})),Ot={Paragraph:"Paragraph",Heading1:"Heading 1",Heading2:"Heading 2",Heading3:"Heading 3",Heading4:"Heading 4",Heading5:"Heading 5",Heading6:"Heading 6"},nO={[Ot.Heading1]:1,[Ot.Heading2]:2,[Ot.Heading3]:3,[Ot.Heading4]:4,[Ot.Heading5]:5,[Ot.Heading6]:6},rO={1:Ot.Heading1,2:Ot.Heading2,3:Ot.Heading3,4:Ot.Heading4,5:Ot.Heading5,6:Ot.Heading6};function eY(t){var e,n,r,o,i,s,a,c;const u=ut({props:t,name:ii}),{labels:f,hideShortcuts:p=!1,classes:m={},sx:y,...b}=u,g=Pt(),x=J.useCallback(L=>{const O=L.target.value;O===Ot.Paragraph?g==null||g.chain().setParagraph().focus().run():O in nO&&(g==null||g.chain().setHeading({level:nO[O]}).focus().run())},[g]);let w="",E;if(g!=null&&g.isActive("paragraph"))w=Ot.Paragraph;else if(g!=null&&g.isActive("heading")){const O=Pp(g.state,"heading").map($=>$.level);E=new Set(O).size===1?O[0]:void 0,E&&E in rO&&(w=rO[E])}const T=w!=="",C=!!(g!=null&&g.can().setParagraph()),k=J.useMemo(()=>{var L;const O=g==null?void 0:g.extensionManager.extensions.find(N=>N.name=="heading");return new Set((L=O==null?void 0:O.options.levels)!==null&&L!==void 0?L:[])},[g]),M=k.values().next(),A=M.done?void 0:M.value,I=A!==void 0&&(E===A||!!(g!=null&&g.can().setHeading({level:A})));return v.jsxs(KK,{onChange:x,disabled:!(g!=null&&g.isEditable)||!T&&!C&&!I,displayEmpty:!0,renderValue:L=>{var O,N;let $;return L===""?$=(N=(O=f==null?void 0:f.emptyValue)!==null&&O!==void 0?O:f==null?void 0:f.empty)!==null&&N!==void 0?N:v.jsx("em",{children:"Change to…"}):L===Ot.Paragraph?$=f==null?void 0:f.paragraph:L===Ot.Heading1?$=f==null?void 0:f.heading1:L===Ot.Heading2?$=f==null?void 0:f.heading2:L===Ot.Heading3?$=f==null?void 0:f.heading3:L===Ot.Heading4?$=f==null?void 0:f.heading4:L===Ot.Heading5?$=f==null?void 0:f.heading5:L===Ot.Heading6&&($=f==null?void 0:f.heading6),$??L},"aria-label":"Text headings",tooltipTitle:"Styles",...b,value:w,inputProps:{...b.inputProps,className:me([fn.selectInput,m.selectInput,(e=b.inputProps)===null||e===void 0?void 0:e.className])},className:me([fn.root,m.root,b.className]),sx:y,children:[v.jsx(br,{value:Ot.Paragraph,disabled:!T&&!C,children:v.jsx(tO,{label:"",shortcutKeys:p?void 0:["mod","alt","0"],placement:"right",classes:{contentWrapper:me([fn.menuOption,m.menuOption,fn.paragraphOption,m.paragraphOption])},children:(n=f==null?void 0:f.paragraph)!==null&&n!==void 0?n:Ot.Paragraph})}),k.has(1)&&v.jsx(br,{value:Ot.Heading1,disabled:!I,children:v.jsx(YK,{label:"",shortcutKeys:p?void 0:["mod","alt","1"],placement:"right",className:me([fn.menuOption,m.menuOption,fn.headingOption,m.headingOption,fn.headingOption1,m.headingOption1]),children:(r=f==null?void 0:f.heading1)!==null&&r!==void 0?r:Ot.Heading1})}),k.has(2)&&v.jsx(br,{value:Ot.Heading2,disabled:!I,children:v.jsx(GK,{label:"",shortcutKeys:p?void 0:["mod","alt","2"],placement:"right",className:me([fn.menuOption,m.menuOption,fn.headingOption,m.headingOption,fn.headingOption2,m.headingOption2]),children:(o=f==null?void 0:f.heading2)!==null&&o!==void 0?o:Ot.Heading2})}),k.has(3)&&v.jsx(br,{value:Ot.Heading3,disabled:!I,children:v.jsx(JK,{label:"",shortcutKeys:p?void 0:["mod","alt","3"],placement:"right",className:me([fn.menuOption,m.menuOption,fn.headingOption,m.headingOption,fn.headingOption3,m.headingOption3]),children:(i=f==null?void 0:f.heading3)!==null&&i!==void 0?i:Ot.Heading3})}),k.has(4)&&v.jsx(br,{value:Ot.Heading4,disabled:!I,children:v.jsx(XK,{label:"",shortcutKeys:p?void 0:["mod","alt","4"],placement:"right",className:me([fn.menuOption,m.menuOption,fn.headingOption,m.headingOption,fn.headingOption4,m.headingOption4]),children:(s=f==null?void 0:f.heading4)!==null&&s!==void 0?s:Ot.Heading4})}),k.has(5)&&v.jsx(br,{value:Ot.Heading5,disabled:!I,children:v.jsx(ZK,{label:"",shortcutKeys:p?void 0:["mod","alt","5"],placement:"right",className:me([fn.menuOption,m.menuOption,fn.headingOption,m.headingOption,fn.headingOption5,m.headingOption5]),children:(a=f==null?void 0:f.heading5)!==null&&a!==void 0?a:Ot.Heading5})}),k.has(6)&&v.jsx(br,{value:Ot.Heading6,disabled:!I,children:v.jsx(QK,{label:"",shortcutKeys:p?void 0:["mod","alt","6"],placement:"right",className:me([fn.menuOption,m.menuOption,fn.headingOption,m.headingOption,fn.headingOption6,m.headingOption6]),children:(c=f==null?void 0:f.heading6)!==null&&c!==void 0?c:Ot.Heading6})})]})}const Fi=cn("MenuSelectTextAlign",["root","selectInput","menuItem","menuOption","icon"]),Fp=rn("MenuSelectTextAlign"),oO={[`& .${Fi.menuOption}`]:{display:"flex",width:"100%",justifyContent:"center"}},iO=re("span",{name:Fp,slot:"icon",overridesResolver:(t,e)=>e.icon})(({theme:t})=>({fontSize:jl,color:t.palette.action.active})),tY=re(Np,{name:Fp,slot:"root",overridesResolver:(t,e)=>e.root})({[`& .${Fi.selectInput}`]:{width:jl},...oO}),nY=re(br,{name:Fp,slot:"menuItem",overridesResolver:(t,e)=>e.menuItem})({paddingLeft:0,paddingRight:0,...oO}),rY=[{value:"left",label:"Left",shortcutKeys:["mod","Shift","L"],IconComponent:QL},{value:"center",label:"Center",shortcutKeys:["mod","Shift","E"],IconComponent:XL},{value:"right",label:"Right",shortcutKeys:["mod","Shift","R"],IconComponent:eF},{value:"justify",label:"Justify",shortcutKeys:["mod","Shift","J"],IconComponent:ZL}];function oY(t){var e,n,r;const o=ut({props:t,name:Fp}),{emptyLabel:i="",alignmentOptions:s,options:a=(e=s==null?void 0:s.map(x=>({...x,value:x.alignment})))!==null&&e!==void 0?e:rY,classes:c={},sx:u,...f}=o,p=Pt(),m=J.useCallback(x=>{const w=x.target.value;p==null||p.chain().setTextAlign(w).focus().run()},[p]),y=J.useMemo(()=>{const x=p==null?void 0:p.extensionManager.extensions.find(w=>w.name=="textAlign");return x==null?void 0:x.options},[p]),b=J.useMemo(()=>new Set(y==null?void 0:y.alignments),[y]),g=(n=Array.from(b).find(x=>p==null?void 0:p.isActive({textAlign:x})))!==null&&n!==void 0?n:"";return v.jsx(tY,{onChange:m,disabled:!(p!=null&&p.isEditable)||!Array.from(b).some(x=>p.can().setTextAlign(x)),renderValue:x=>{let w;if(x){const E=a.find(T=>T.value===x);w=E?v.jsx(iO,{as:E.IconComponent,className:me([Fi.icon,c.icon])}):x}else w=i;return v.jsx("span",{className:me([Fi.menuOption,c.menuOption]),children:w})},"aria-label":"Text alignments",tooltipTitle:"Align",value:g,displayEmpty:!0,...f,inputProps:{...f.inputProps,className:me([Fi.selectInput,c.selectInput,(r=f.inputProps)===null||r===void 0?void 0:r.className])},className:me([Fi.root,c.root,f.className]),sx:u,children:a.filter(x=>b.has(x.value)).map(x=>{var w,E;return v.jsx(nY,{value:x.value,disabled:!(p!=null&&p.can().setTextAlign(x.value)),"aria-label":(w=x.label)!==null&&w!==void 0?w:x.value,className:me([Fi.menuItem,c.menuItem]),children:v.jsx(Ip,{label:(E=x.label)!==null&&E!==void 0?E:"",shortcutKeys:x.shortcutKeys,placement:"right",classes:{contentWrapper:me([Fi.menuOption,c.menuOption])},children:v.jsx(iO,{as:x.IconComponent,className:me([Fi.icon,c.icon])})})},x.value)})})}const iY=cn("MenuDivider",["root"]),sO=rn("MenuDivider"),sY=re($p,{name:sO,slot:"root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({height:18,margin:t.spacing(0,.5)}));function er(t){const e=ut({props:t,name:sO}),{className:n,classes:r={},sx:o,...i}=e;return v.jsx(sY,{orientation:"vertical",...i,className:me([iY.root,n,r.root]),sx:o})}function aY({className:t,labels:e}){var n,r,o,i,s,a,c,u,f,p,m,y,b;const g=Pt();return v.jsxs(Y_,{className:t,children:[v.jsx(It,{tooltipLabel:(n=e==null?void 0:e.insertColumnBefore)!==null&&n!==void 0?n:"Insert column before",IconComponent:Lq,onClick:()=>g==null?void 0:g.chain().focus().addColumnBefore().run(),disabled:!(g!=null&&g.can().addColumnBefore())}),v.jsx(It,{tooltipLabel:(r=e==null?void 0:e.insertColumnAfter)!==null&&r!==void 0?r:"Insert column after",IconComponent:Fq,onClick:()=>g==null?void 0:g.chain().focus().addColumnAfter().run(),disabled:!(g!=null&&g.can().addColumnAfter())}),v.jsx(It,{tooltipLabel:(o=e==null?void 0:e.deleteColumn)!==null&&o!==void 0?o:"Delete column",IconComponent:Dq,onClick:()=>g==null?void 0:g.chain().focus().deleteColumn().run(),disabled:!(g!=null&&g.can().deleteColumn())}),v.jsx(er,{}),v.jsx(It,{tooltipLabel:(i=e==null?void 0:e.insertRowAbove)!==null&&i!==void 0?i:"Insert row above",IconComponent:Bq,onClick:()=>g==null?void 0:g.chain().focus().addRowBefore().run(),disabled:!(g!=null&&g.can().addRowBefore())}),v.jsx(It,{tooltipLabel:(s=e==null?void 0:e.insertRowBelow)!==null&&s!==void 0?s:"Insert row below",IconComponent:Rq,onClick:()=>g==null?void 0:g.chain().focus().addRowAfter().run(),disabled:!(g!=null&&g.can().addRowAfter())}),v.jsx(It,{tooltipLabel:(a=e==null?void 0:e.deleteRow)!==null&&a!==void 0?a:"Delete row",IconComponent:Iq,onClick:()=>g==null?void 0:g.chain().focus().deleteRow().run(),disabled:!(g!=null&&g.can().deleteRow())}),v.jsx(er,{}),v.jsx(It,{tooltipLabel:(c=e==null?void 0:e.mergeCells)!==null&&c!==void 0?c:"Merge cells",IconComponent:Hq,onClick:()=>g==null?void 0:g.chain().focus().mergeCells().run(),disabled:!(g!=null&&g.can().mergeCells())}),v.jsx(It,{tooltipLabel:(u=e==null?void 0:e.splitCell)!==null&&u!==void 0?u:"Split cell",IconComponent:Wq,onClick:()=>g==null?void 0:g.chain().focus().splitCell().run(),disabled:!(g!=null&&g.can().splitCell())}),v.jsx(er,{}),v.jsx(It,{tooltipLabel:(f=e==null?void 0:e.toggleHeaderRow)!==null&&f!==void 0?f:"Toggle header row",IconComponent:zq,onClick:()=>g==null?void 0:g.chain().focus().toggleHeaderRow().run(),disabled:!(g!=null&&g.can().toggleHeaderRow())}),v.jsx(It,{tooltipLabel:(p=e==null?void 0:e.toggleHeaderColumn)!==null&&p!==void 0?p:"Toggle header column",IconComponent:Vq,onClick:()=>g==null?void 0:g.chain().focus().toggleHeaderColumn().run(),disabled:!(g!=null&&g.can().toggleHeaderColumn())}),v.jsx(It,{tooltipLabel:(m=e==null?void 0:e.toggleHeaderCell)!==null&&m!==void 0?m:"Toggle header cell",IconComponent:rF,onClick:()=>g==null?void 0:g.chain().focus().toggleHeaderCell().run(),disabled:!(g!=null&&g.can().toggleHeaderCell()),selected:(y=g==null?void 0:g.isActive("tableHeader"))!==null&&y!==void 0?y:!1}),v.jsx(er,{}),v.jsx(It,{tooltipLabel:(b=e==null?void 0:e.deleteTable)!==null&&b!==void 0?b:"Delete table",IconComponent:fF,onClick:()=>g==null?void 0:g.chain().focus().deleteTable().run(),disabled:!(g!=null&&g.can().deleteTable())})]})}const lY=$n.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()}}}),cY=vn.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]}`,Dt(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=>Cb({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var uY="tippy-box",aO="tippy-content",dY="tippy-backdrop",lO="tippy-arrow",cO="tippy-svg-arrow",ka={passive:!0,capture:!0},uO=function(){return document.body};function fY(t,e){return{}.hasOwnProperty.call(t,e)}function e0(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function t0(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function dO(t,e){return typeof t=="function"?t.apply(void 0,e):t}function fO(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function pY(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function hY(t){return t.split(/\s+/).filter(Boolean)}function ql(t){return[].concat(t)}function pO(t,e){t.indexOf(e)===-1&&t.push(e)}function mY(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function gY(t){return t.split("-")[0]}function Rp(t){return[].slice.call(t)}function hO(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function Iu(){return document.createElement("div")}function Pu(t){return["Element","Fragment"].some(function(e){return t0(t,e)})}function yY(t){return t0(t,"NodeList")}function bY(t){return t0(t,"MouseEvent")}function vY(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function xY(t){return Pu(t)?[t]:yY(t)?Rp(t):Array.isArray(t)?t:Rp(document.querySelectorAll(t))}function n0(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function mO(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function SY(t){var e,n=ql(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function wY(t,e){var n=e.clientX,r=e.clientY;return t.every(function(o){var i=o.popperRect,s=o.popperState,a=o.props,c=a.interactiveBorder,u=gY(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,y=u==="right"?f.left.x:0,b=u==="left"?f.right.x:0,g=i.top-r+p>c,x=r-i.bottom-m>c,w=i.left-n+y>c,E=n-i.right-b>c;return g||x||w||E})}function r0(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){t[r](o,n)})}function gO(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 si={isTouch:!1},yO=0;function CY(){si.isTouch||(si.isTouch=!0,window.performance&&document.addEventListener("mousemove",bO))}function bO(){var t=performance.now();t-yO<20&&(si.isTouch=!1,document.removeEventListener("mousemove",bO)),yO=t}function TY(){var t=document.activeElement;if(vY(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function kY(){document.addEventListener("touchstart",CY,ka),window.addEventListener("blur",TY)}var EY=typeof window<"u"&&typeof document<"u",_Y=EY?!!window.msCrypto:!1;function Kl(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 vO(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function OY(t){return vO(`
|
|
347
|
-
%ctippy.js
|
|
348
|
-
|
|
349
|
-
%c`+vO(t)+`
|
|
350
|
-
|
|
351
|
-
%c👷 This is a development-only message. It will be removed in production.
|
|
352
|
-
`)}function xO(t){return[OY(t),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Nu;process.env.NODE_ENV!=="production"&&MY();function MY(){Nu=new Set}function Ri(t,e){if(t&&!Nu.has(e)){var n;Nu.add(e),(n=console).warn.apply(n,xO(e))}}function o0(t,e){if(t&&!Nu.has(e)){var n;Nu.add(e),(n=console).error.apply(n,xO(e))}}function AY(t){var e=!t,n=Object.prototype.toString.call(t)==="[object Object]"&&!t.addEventListener;o0(e,["tippy() was passed","`"+String(t)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),o0(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var SO={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},DY={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ur=Object.assign({appendTo:uO,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},SO,DY),IY=Object.keys(Ur),PY=function(e){process.env.NODE_ENV!=="production"&&TO(e,[]);var n=Object.keys(e);n.forEach(function(r){Ur[r]=e[r]})};function wO(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=Ur[i])!=null?a:s}return r},{});return Object.assign({},t,n)}function NY(t,e){var n=e?Object.keys(wO(Object.assign({},Ur,{plugins:e}))):IY,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 CO(t,e){var n=Object.assign({},e,{content:dO(e.content,[t])},e.ignoreAttributes?{}:NY(t,e.plugins));return n.aria=Object.assign({},Ur.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 TO(t,e){t===void 0&&(t={}),e===void 0&&(e=[]);var n=Object.keys(t);n.forEach(function(r){var o=pY(Ur,Object.keys(SO)),i=!fY(o,r);i&&(i=e.filter(function(s){return s.name===r}).length===0),Ri(i,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
|
353
|
-
|
|
354
|
-
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
355
|
-
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var $Y=function(){return"innerHTML"};function i0(t,e){t[$Y()]=e}function kO(t){var e=Iu();return t===!0?e.className=lO:(e.className=cO,Pu(t)?e.appendChild(t):i0(e,t)),e}function EO(t,e){Pu(e.content)?(i0(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?i0(t,e.content):t.textContent=e.content)}function s0(t){var e=t.firstElementChild,n=Rp(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(aO)}),arrow:n.find(function(r){return r.classList.contains(lO)||r.classList.contains(cO)}),backdrop:n.find(function(r){return r.classList.contains(dY)})}}function _O(t){var e=Iu(),n=Iu();n.className=uY,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Iu();r.className=aO,r.setAttribute("data-state","hidden"),EO(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props);function o(i,s){var a=s0(e),c=a.box,u=a.content,f=a.arrow;s.theme?c.setAttribute("data-theme",s.theme):c.removeAttribute("data-theme"),typeof s.animation=="string"?c.setAttribute("data-animation",s.animation):c.removeAttribute("data-animation"),s.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?c.setAttribute("role",s.role):c.removeAttribute("role"),(i.content!==s.content||i.allowHTML!==s.allowHTML)&&EO(u,t.props),s.arrow?f?i.arrow!==s.arrow&&(c.removeChild(f),c.appendChild(kO(s.arrow))):c.appendChild(kO(s.arrow)):f&&c.removeChild(f)}return{popper:e,onUpdate:o}}_O.$$tippy=!0;var LY=1,Bp=[],a0=[];function FY(t,e){var n=CO(t,Object.assign({},Ur,wO(hO(e)))),r,o,i,s=!1,a=!1,c=!1,u=!1,f,p,m,y=[],b=fO(pe,n.interactiveDebounce),g,x=LY++,w=null,E=mY(n.plugins),T={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:x,reference:t,popper:Iu(),popperInstance:w,props:n,state:T,plugins:E,clearDelayTimeouts:Ae,setProps:ze,setContent:st,show:pt,hide:Vt,hideWithInteractivity:rt,enable:Ne,disable:Pe,unmount:Wt,destroy:Qt};if(!n.render)return process.env.NODE_ENV!=="production"&&o0(!0,"render() function has not been supplied."),C;var k=n.render(C),M=k.popper,A=k.onUpdate;M.setAttribute("data-tippy-root",""),M.id="tippy-"+C.id,C.popper=M,t._tippy=C,M._tippy=C;var I=E.map(function(ge){return ge.fn(C)}),L=t.hasAttribute("aria-expanded");return be(),K(),W(),Y("onCreate",[C]),n.showOnCreate&&Z(),M.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),M.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&z().addEventListener("mousemove",b)}),C;function O(){var ge=C.props.touch;return Array.isArray(ge)?ge:[ge,0]}function N(){return O()[0]==="hold"}function $(){var ge;return!!((ge=C.props.render)!=null&&ge.$$tippy)}function V(){return g||t}function z(){var ge=V().parentNode;return ge?SY(ge):document}function F(){return s0(M)}function B(ge){return C.state.isMounted&&!C.state.isVisible||si.isTouch||f&&f.type==="focus"?0:e0(C.props.delay,ge?0:1,Ur.delay)}function W(ge){ge===void 0&&(ge=!1),M.style.pointerEvents=C.props.interactive&&!ge?"":"none",M.style.zIndex=""+C.props.zIndex}function Y(ge,We,_e){if(_e===void 0&&(_e=!0),I.forEach(function(et){et[ge]&&et[ge].apply(et,We)}),_e){var je;(je=C.props)[ge].apply(je,We)}}function X(){var ge=C.props.aria;if(ge.content){var We="aria-"+ge.content,_e=M.id,je=ql(C.props.triggerTarget||t);je.forEach(function(et){var it=et.getAttribute(We);if(C.state.isVisible)et.setAttribute(We,it?it+" "+_e:_e);else{var zt=it&&it.replace(_e,"").trim();zt?et.setAttribute(We,zt):et.removeAttribute(We)}})}}function K(){if(!(L||!C.props.aria.expanded)){var ge=ql(C.props.triggerTarget||t);ge.forEach(function(We){C.props.interactive?We.setAttribute("aria-expanded",C.state.isVisible&&We===V()?"true":"false"):We.removeAttribute("aria-expanded")})}}function Q(){z().removeEventListener("mousemove",b),Bp=Bp.filter(function(ge){return ge!==b})}function ve(ge){if(!(si.isTouch&&(c||ge.type==="mousedown"))){var We=ge.composedPath&&ge.composedPath()[0]||ge.target;if(!(C.props.interactive&&gO(M,We))){if(ql(C.props.triggerTarget||t).some(function(_e){return gO(_e,We)})){if(si.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else Y("onClickOutside",[C,ge]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),a=!0,setTimeout(function(){a=!1}),C.state.isMounted||ce())}}}function xe(){c=!0}function ye(){c=!1}function oe(){var ge=z();ge.addEventListener("mousedown",ve,!0),ge.addEventListener("touchend",ve,ka),ge.addEventListener("touchstart",ye,ka),ge.addEventListener("touchmove",xe,ka)}function ce(){var ge=z();ge.removeEventListener("mousedown",ve,!0),ge.removeEventListener("touchend",ve,ka),ge.removeEventListener("touchstart",ye,ka),ge.removeEventListener("touchmove",xe,ka)}function fe(ge,We){ee(ge,function(){!C.state.isVisible&&M.parentNode&&M.parentNode.contains(M)&&We()})}function q(ge,We){ee(ge,We)}function ee(ge,We){var _e=F().box;function je(et){et.target===_e&&(r0(_e,"remove",je),We())}if(ge===0)return We();r0(_e,"remove",p),r0(_e,"add",je),p=je}function se(ge,We,_e){_e===void 0&&(_e=!1);var je=ql(C.props.triggerTarget||t);je.forEach(function(et){et.addEventListener(ge,We,_e),y.push({node:et,eventType:ge,handler:We,options:_e})})}function be(){N()&&(se("touchstart",le,{passive:!0}),se("touchend",Oe,{passive:!0})),hY(C.props.trigger).forEach(function(ge){if(ge!=="manual")switch(se(ge,le),ge){case"mouseenter":se("mouseleave",Oe);break;case"focus":se(_Y?"focusout":"blur",ke);break;case"focusin":se("focusout",ke);break}})}function ne(){y.forEach(function(ge){var We=ge.node,_e=ge.eventType,je=ge.handler,et=ge.options;We.removeEventListener(_e,je,et)}),y=[]}function le(ge){var We,_e=!1;if(!(!C.state.isEnabled||Fe(ge)||a)){var je=((We=f)==null?void 0:We.type)==="focus";f=ge,g=ge.currentTarget,K(),!C.state.isVisible&&bY(ge)&&Bp.forEach(function(et){return et(ge)}),ge.type==="click"&&(C.props.trigger.indexOf("mouseenter")<0||s)&&C.props.hideOnClick!==!1&&C.state.isVisible?_e=!0:Z(ge),ge.type==="click"&&(s=!_e),_e&&!je&&he(ge)}}function pe(ge){var We=ge.target,_e=V().contains(We)||M.contains(We);if(!(ge.type==="mousemove"&&_e)){var je=U().concat(M).map(function(et){var it,zt=et._tippy,tr=(it=zt.popperInstance)==null?void 0:it.state;return tr?{popperRect:et.getBoundingClientRect(),popperState:tr,props:n}:null}).filter(Boolean);wY(je,ge)&&(Q(),he(ge))}}function Oe(ge){var We=Fe(ge)||C.props.trigger.indexOf("click")>=0&&s;if(!We){if(C.props.interactive){C.hideWithInteractivity(ge);return}he(ge)}}function ke(ge){C.props.trigger.indexOf("focusin")<0&&ge.target!==V()||C.props.interactive&&ge.relatedTarget&&M.contains(ge.relatedTarget)||he(ge)}function Fe(ge){return si.isTouch?N()!==ge.type.indexOf("touch")>=0:!1}function Ie(){Ke();var ge=C.props,We=ge.popperOptions,_e=ge.placement,je=ge.offset,et=ge.getReferenceClientRect,it=ge.moveTransition,zt=$()?s0(M).arrow:null,tr=et?{getBoundingClientRect:et,contextElement:et.contextElement||V()}:t,fr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Ps){var fi=Ps.state;if($()){var ht=F(),nr=ht.box;["placement","reference-hidden","escaped"].forEach(function(Ui){Ui==="placement"?nr.setAttribute("data-placement",fi.placement):fi.attributes.popper["data-popper-"+Ui]?nr.setAttribute("data-"+Ui,""):nr.removeAttribute("data-"+Ui)}),fi.attributes.popper={}}}},zo=[{name:"offset",options:{offset:je}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!it}},fr];$()&&zt&&zo.push({name:"arrow",options:{element:zt,padding:3}}),zo.push.apply(zo,(We==null?void 0:We.modifiers)||[]),C.popperInstance=jC(tr,M,Object.assign({},We,{placement:_e,onFirstUpdate:m,modifiers:zo}))}function Ke(){C.popperInstance&&(C.popperInstance.destroy(),C.popperInstance=null)}function Xe(){var ge=C.props.appendTo,We,_e=V();C.props.interactive&&ge===uO||ge==="parent"?We=_e.parentNode:We=dO(ge,[_e]),We.contains(M)||We.appendChild(M),C.state.isMounted=!0,Ie(),process.env.NODE_ENV!=="production"&&Ri(C.props.interactive&&ge===Ur.appendTo&&_e.nextElementSibling!==M,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
|
|
356
|
-
|
|
357
|
-
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
358
|
-
|
|
359
|
-
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
|
360
|
-
|
|
361
|
-
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function U(){return Rp(M.querySelectorAll("[data-tippy-root]"))}function Z(ge){C.clearDelayTimeouts(),ge&&Y("onTrigger",[C,ge]),oe();var We=B(!0),_e=O(),je=_e[0],et=_e[1];si.isTouch&&je==="hold"&&et&&(We=et),We?r=setTimeout(function(){C.show()},We):C.show()}function he(ge){if(C.clearDelayTimeouts(),Y("onUntrigger",[C,ge]),!C.state.isVisible){ce();return}if(!(C.props.trigger.indexOf("mouseenter")>=0&&C.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(ge.type)>=0&&s)){var We=B(!1);We?o=setTimeout(function(){C.state.isVisible&&C.hide()},We):i=requestAnimationFrame(function(){C.hide()})}}function Ne(){C.state.isEnabled=!0}function Pe(){C.hide(),C.state.isEnabled=!1}function Ae(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)}function ze(ge){if(process.env.NODE_ENV!=="production"&&Ri(C.state.isDestroyed,Kl("setProps")),!C.state.isDestroyed){Y("onBeforeUpdate",[C,ge]),ne();var We=C.props,_e=CO(t,Object.assign({},We,hO(ge),{ignoreAttributes:!0}));C.props=_e,be(),We.interactiveDebounce!==_e.interactiveDebounce&&(Q(),b=fO(pe,_e.interactiveDebounce)),We.triggerTarget&&!_e.triggerTarget?ql(We.triggerTarget).forEach(function(je){je.removeAttribute("aria-expanded")}):_e.triggerTarget&&t.removeAttribute("aria-expanded"),K(),W(),A&&A(We,_e),C.popperInstance&&(Ie(),U().forEach(function(je){requestAnimationFrame(je._tippy.popperInstance.forceUpdate)})),Y("onAfterUpdate",[C,ge])}}function st(ge){C.setProps({content:ge})}function pt(){process.env.NODE_ENV!=="production"&&Ri(C.state.isDestroyed,Kl("show"));var ge=C.state.isVisible,We=C.state.isDestroyed,_e=!C.state.isEnabled,je=si.isTouch&&!C.props.touch,et=e0(C.props.duration,0,Ur.duration);if(!(ge||We||_e||je)&&!V().hasAttribute("disabled")&&(Y("onShow",[C],!1),C.props.onShow(C)!==!1)){if(C.state.isVisible=!0,$()&&(M.style.visibility="visible"),W(),oe(),C.state.isMounted||(M.style.transition="none"),$()){var it=F(),zt=it.box,tr=it.content;n0([zt,tr],0)}m=function(){var zo;if(!(!C.state.isVisible||u)){if(u=!0,M.offsetHeight,M.style.transition=C.props.moveTransition,$()&&C.props.animation){var Na=F(),Ps=Na.box,fi=Na.content;n0([Ps,fi],et),mO([Ps,fi],"visible")}X(),K(),pO(a0,C),(zo=C.popperInstance)==null||zo.forceUpdate(),Y("onMount",[C]),C.props.animation&&$()&&q(et,function(){C.state.isShown=!0,Y("onShown",[C])})}},Xe()}}function Vt(){process.env.NODE_ENV!=="production"&&Ri(C.state.isDestroyed,Kl("hide"));var ge=!C.state.isVisible,We=C.state.isDestroyed,_e=!C.state.isEnabled,je=e0(C.props.duration,1,Ur.duration);if(!(ge||We||_e)&&(Y("onHide",[C],!1),C.props.onHide(C)!==!1)){if(C.state.isVisible=!1,C.state.isShown=!1,u=!1,s=!1,$()&&(M.style.visibility="hidden"),Q(),ce(),W(!0),$()){var et=F(),it=et.box,zt=et.content;C.props.animation&&(n0([it,zt],je),mO([it,zt],"hidden"))}X(),K(),C.props.animation?$()&&fe(je,C.unmount):C.unmount()}}function rt(ge){process.env.NODE_ENV!=="production"&&Ri(C.state.isDestroyed,Kl("hideWithInteractivity")),z().addEventListener("mousemove",b),pO(Bp,b),b(ge)}function Wt(){process.env.NODE_ENV!=="production"&&Ri(C.state.isDestroyed,Kl("unmount")),C.state.isVisible&&C.hide(),C.state.isMounted&&(Ke(),U().forEach(function(ge){ge._tippy.unmount()}),M.parentNode&&M.parentNode.removeChild(M),a0=a0.filter(function(ge){return ge!==C}),C.state.isMounted=!1,Y("onHidden",[C]))}function Qt(){process.env.NODE_ENV!=="production"&&Ri(C.state.isDestroyed,Kl("destroy")),!C.state.isDestroyed&&(C.clearDelayTimeouts(),C.unmount(),ne(),delete t._tippy,C.state.isDestroyed=!0,Y("onDestroy",[C]))}}function $u(t,e){e===void 0&&(e={});var n=Ur.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(AY(t),TO(e,n)),kY();var r=Object.assign({},e,{plugins:n}),o=xY(t);if(process.env.NODE_ENV!=="production"){var i=Pu(r.content),s=o.length>1;Ri(i&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
|
|
362
|
-
|
|
363
|
-
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
364
|
-
|
|
365
|
-
`,`1) content: element.innerHTML
|
|
366
|
-
`,"2) content: () => element.cloneNode(true)"].join(" "))}var a=o.reduce(function(c,u){var f=u&&FY(u,r);return f&&c.push(f),c},[]);return Pu(t)?a[0]:a}$u.defaultProps=Ur,$u.setDefaultProps=PY,$u.currentInput=si,Object.assign({},OC,{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)}}),$u.setDefaultProps({render:_O});function RY(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var l0={exports:{}},c0={};/**
|
|
367
|
-
* @license React
|
|
368
|
-
* use-sync-external-store-shim.production.min.js
|
|
369
|
-
*
|
|
370
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
371
|
-
*
|
|
372
|
-
* This source code is licensed under the MIT license found in the
|
|
373
|
-
* LICENSE file in the root directory of this source tree.
|
|
374
|
-
*/var OO;function BY(){if(OO)return c0;OO=1;var t=J;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 y=m(),b=r({inst:{value:y,getSnapshot:m}}),g=b[0].inst,x=b[1];return i(function(){g.value=y,g.getSnapshot=m,c(g)&&x({inst:g})},[p,y,m]),o(function(){return c(g)&&x({inst:g}),p(function(){c(g)&&x({inst:g})})},[p]),s(y),y}function c(p){var m=p.getSnapshot;p=p.value;try{var y=m();return!n(p,y)}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 c0.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:f,c0}var u0={};/**
|
|
375
|
-
* @license React
|
|
376
|
-
* use-sync-external-store-shim.development.js
|
|
377
|
-
*
|
|
378
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
379
|
-
*
|
|
380
|
-
* This source code is licensed under the MIT license found in the
|
|
381
|
-
* LICENSE file in the root directory of this source tree.
|
|
382
|
-
*/var MO;function VY(){return MO||(MO=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=J,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(T){{for(var C=arguments.length,k=new Array(C>1?C-1:0),M=1;M<C;M++)k[M-1]=arguments[M];r("error",T,k)}}function r(T,C,k){{var M=e.ReactDebugCurrentFrame,A=M.getStackAddendum();A!==""&&(C+="%s",k=k.concat([A]));var I=k.map(function(L){return String(L)});I.unshift("Warning: "+C),Function.prototype.apply.call(console[T],console,I)}}function o(T,C){return T===C&&(T!==0||1/T===1/C)||T!==T&&C!==C}var i=typeof Object.is=="function"?Object.is:o,s=t.useState,a=t.useEffect,c=t.useLayoutEffect,u=t.useDebugValue,f=!1,p=!1;function m(T,C,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=C();if(!p){var A=C();i(M,A)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}var I=s({inst:{value:M,getSnapshot:C}}),L=I[0].inst,O=I[1];return c(function(){L.value=M,L.getSnapshot=C,y(L)&&O({inst:L})},[T,M,C]),a(function(){y(L)&&O({inst:L});var N=function(){y(L)&&O({inst:L})};return T(N)},[T]),u(M),M}function y(T){var C=T.getSnapshot,k=T.value;try{var M=C();return!i(k,M)}catch{return!0}}function b(T,C,k){return C()}var g=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",x=!g,w=x?b:m,E=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:w;u0.useSyncExternalStore=E,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()),u0}process.env.NODE_ENV==="production"?l0.exports=BY():l0.exports=VY();var Vp=l0.exports;const zY=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},HY=({contentComponent:t})=>{const e=Vp.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return J.createElement(J.Fragment,null,Object.values(e))};function WY(){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]:Ws.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 jY extends J.Component{constructor(e){var n;super(e),this.editorContentRef=J.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=WY(),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 J.createElement(J.Fragment,null,J.createElement("div",{ref:zY(n,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&J.createElement(HY,{contentComponent:e.contentComponent}))}}const UY=J.forwardRef((t,e)=>{const n=J.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return J.createElement(jY,{key:n,innerRef:e,...t})}),qY=J.memo(UY);var KY=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},YY=RY(KY),d0={exports:{}},f0={};/**
|
|
383
|
-
* @license React
|
|
384
|
-
* use-sync-external-store-shim/with-selector.production.min.js
|
|
385
|
-
*
|
|
386
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
387
|
-
*
|
|
388
|
-
* This source code is licensed under the MIT license found in the
|
|
389
|
-
* LICENSE file in the root directory of this source tree.
|
|
390
|
-
*/var AO;function GY(){if(AO)return f0;AO=1;var t=J,e=Vp;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,c=t.useDebugValue;return f0.useSyncExternalStoreWithSelector=function(u,f,p,m,y){var b=i(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=a(function(){function w(M){if(!E){if(E=!0,T=M,M=m(M),y!==void 0&&g.hasValue){var A=g.value;if(y(A,M))return C=A}return C=M}if(A=C,r(T,M))return A;var I=m(M);return y!==void 0&&y(A,I)?A:(T=M,C=I)}var E=!1,T,C,k=p===void 0?null:p;return[function(){return w(f())},k===null?void 0:function(){return w(k())}]},[f,p,m,y]);var x=o(u,b[0],b[1]);return s(function(){g.hasValue=!0,g.value=x},[x]),c(x),x},f0}var p0={};/**
|
|
391
|
-
* @license React
|
|
392
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
393
|
-
*
|
|
394
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
395
|
-
*
|
|
396
|
-
* This source code is licensed under the MIT license found in the
|
|
397
|
-
* LICENSE file in the root directory of this source tree.
|
|
398
|
-
*/var DO;function JY(){return DO||(DO=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=J,e=Vp;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,c=t.useDebugValue;function u(f,p,m,y,b){var g=i(null),x;g.current===null?(x={hasValue:!1,value:null},g.current=x):x=g.current;var w=a(function(){var k=!1,M,A,I=function($){if(!k){k=!0,M=$;var V=y($);if(b!==void 0&&x.hasValue){var z=x.value;if(b(z,V))return A=z,z}return A=V,V}var F=M,B=A;if(r(F,$))return B;var W=y($);return b!==void 0&&b(B,W)?B:(M=$,A=W,W)},L=m===void 0?null:m,O=function(){return I(p())},N=L===null?void 0:function(){return I(L())};return[O,N]},[p,m,y,b]),E=w[0],T=w[1],C=o(f,E,T);return s(function(){x.hasValue=!0,x.value=C},[C]),c(C),C}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"?d0.exports=GY():d0.exports=JY();var XY=d0.exports;const ZY=typeof window<"u"?J.useLayoutEffect:J.useEffect;class QY{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 eG(t){var e;const[n]=J.useState(()=>new QY(t.editor)),r=XY.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!==null&&e!==void 0?e:YY);return ZY(()=>n.watch(t.editor),[t.editor,n]),J.useDebugValue(r),r}const IO=process.env.NODE_ENV!=="production",h0=typeof window>"u",tG=h0||!!(typeof window<"u"&&window.next);class m0{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 h0||tG?(IO&&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&&h0&&IO)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 A7(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?m0.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 PO(t={},e=[]){const n=J.useRef(t);n.current=t;const[r]=J.useState(()=>new m0(n)),o=Vp.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return J.useDebugValue(o),J.useEffect(r.onRender(e)),eG({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1?null:t.immediatelyRender&&i===0?0:i+1}),o}J.createContext({editor:null}).Consumer;const NO=J.createContext({onDragStart:void 0}),$O=()=>J.useContext(NO),nG=t=>{const e=t.as||"div",{nodeViewContentRef:n}=$O();return J.createElement(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style}})},LO=J.forwardRef((t,e)=>{const{onDragStart:n}=$O(),r=t.as||"div";return J.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function FO(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function RO(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.forward_ref)"||t.$$typeof.description==="react.forward_ref"))}function rG(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.memo)"||t.$$typeof.description==="react.memo"))}function oG(t){if(FO(t)||RO(t))return!0;if(rG(t)){const e=t.type;if(e)return FO(e)||RO(e)}return!1}function iG(){try{if(J.version)return parseInt(J.version.split(".")[0],10)>=19}catch{}return!1}class BO{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?Ws.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;const n=this.component,r=this.props,o=this.editor,i=iG(),s=oG(n),a={...r};a.ref&&!(i||s)&&delete a.ref,!a.ref&&(i||s)&&(a.ref=c=>{this.ref=c}),this.reactElement=J.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 sG extends D7{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:J.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=J.memo(u=>J.createElement(NO.Provider,{value:o},J.createElement(i,u)));s.displayName="ReactNodeView";let a=this.node.isInline?"span":"div";this.options.as&&(a=this.options.as);const{className:c=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new BO(s,{editor:this.editor,props:e,as:a,className:`node-${this.node.type.name} ${c}`.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=hp(this.node,n);e=this.options.attrs({node:this.node,HTMLAttributes:r})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function VO(t,e){return n=>n.editor.contentComponent?new sG(t,n,e):{}}const Lu=cn("HeadingWithAnchorComponent",["root","container","link","linkIcon"]),Fu=rn("HeadingWithAnchorComponent"),aG=re(LO,{name:Fu,slot:"root",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>t!=="ownerState"&&t!=="theme"&&t!=="sx"})({[`&:hover .${Lu.link}`]:{opacity:100}}),lG=re("span",{name:Fu,slot:"container",overridesResolver:(t,e)=>e.container})({display:"inline-block",position:"relative"}),cG=re("a",{name:Fu,slot:"link",overridesResolver:(t,e)=>e.link})(({theme:t})=>({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"}})),uG=re(VS,{name:Fu,slot:"linkIcon",overridesResolver:(t,e)=>e.linkIcon})(({theme:t})=>({transform:"rotate(-45deg)",fontSize:"1.25rem",[t.breakpoints.down("sm")]:{fontSize:"1.15rem"}}));function dG(t){const e=ut({props:t,name:Fu}),{editor:n,node:r,extension:o,classes:i={},sx:s}=e,u=`h${o.options.levels.includes(r.attrs.level)?r.attrs.level:o.options.levels[0]}`,f=J.useMemo(()=>hb(n.schema),[n.schema]),p=dK(f_(r,{textSerializers:f}));return v.jsx(aG,{as:u,id:p,...o.options.HTMLAttributes,className:me([Lu.root,i.root]),style:{textAlign:r.attrs.textAlign},sx:s,children:v.jsxs(lG,{className:me([Lu.container,i.container]),children:[v.jsx(cG,{href:`#${p}`,contentEditable:!1,className:me([Lu.link,i.link]),children:v.jsx(uG,{className:me([Lu.linkIcon,i.linkIcon])})}),v.jsx(nG,{as:"span"})]})})}const fG=cY.extend({addOptions(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),scrollToAnchorOnMount:!0}},onCreate(){this.options.scrollToAnchorOnMount&&setTimeout(()=>{pG(this.editor)})},addNodeView(){return VO(dG)}});function pG(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.view.dom.contains(r)&&r.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}var vr;(function(t){t[t.HIDDEN=0]="HIDDEN",t[t.VIEW_LINK_DETAILS=1]="VIEW_LINK_DETAILS",t[t.EDIT_LINK=2]="EDIT_LINK"})(vr||(vr={}));const hG=$n.create({name:"linkBubbleMenuHandler",addStorage(){return{state:vr.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!==vr.VIEW_LINK_DETAILS&&n().extendMarkRange("link").focus().run(),i=vr.VIEW_LINK_DETAILS):i=vr.EDIT_LINK,r&&(this.storage.state=i,this.storage.bubbleMenuOptions=t),!0},editLinkInBubbleMenu:()=>({dispatch:t})=>{const e=this.storage.state,n=vr.EDIT_LINK;return e===n?!1:(t&&(this.storage.state=n),!0)},closeLinkBubbleMenu:()=>({commands:t,dispatch:e})=>this.storage.state===vr.HIDDEN?!1:(t.focus(),e&&(this.storage.state=vr.HIDDEN),!0)}},onSelectionUpdate(){this.storage.state===vr.EDIT_LINK?this.editor.commands.closeLinkBubbleMenu():this.storage.state===vr.VIEW_LINK_DETAILS&&!this.editor.isActive("link")&&this.editor.commands.closeLinkBubbleMenu()},addKeyboardShortcuts(){return{"Mod-Shift-u":()=>(this.editor.commands.openLinkBubbleMenu(),!0)}},addProseMirrorPlugins(){return[new bn({key:new Nn("handleClickLinkForMenu"),props:{handleClick:(t,e,n)=>{const r=bb(t.state,"link");return n.target.closest("a")&&r.href&&this.storage.state===vr.HIDDEN?this.editor.commands.openLinkBubbleMenu():this.editor.commands.closeLinkBubbleMenu(),!1}}})]}}),mG=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,gG=vn.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",Dt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[y_({find:mG,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}});var g0={},zO;function yG(){return zO||(zO=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=W_();function n(r,o=0,i={}){const{leading:s=!0,trailing:a=!0}=i;return e.debounce(r,o,{leading:s,maxWait:o,trailing:a})}t.throttle=n})(g0)),g0}var y0,HO;function bG(){return HO||(HO=1,y0=yG().throttle),y0}var vG=bG();const xG=Rr(vG),zp=cn("ResizableImageComponent",["imageContainer","image","imageSelected","resizer"]),SG=cn("ResizableImageResizer",["root"]),WO=rn("ResizableImageResizer"),wG=re("div",{name:WO,slot:"root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({position:"absolute",bottom:-3,right:-3,width:12,height:12,background:t.palette.primary.main,cursor:"nwse-resize"}));function CG(t){const e=ut({props:t,name:WO}),{onResize:n,className:r,mouseDown:o,setMouseDown:i,classes:s={},sx:a}=e;J.useEffect(()=>{if(!o)return;const u=f=>{n(f)};return window.addEventListener("mousemove",u),()=>{window.removeEventListener("mousemove",u)}},[o,n]),J.useEffect(()=>{const u=()=>{i(!1)};return window.addEventListener("mouseup",u),()=>{window.removeEventListener("mouseup",u)}},[i]);const c=J.useCallback(u=>{u.preventDefault(),u.stopPropagation(),i(!0)},[i]);return v.jsx(wG,{className:me([SG.root,r,s.root]),onMouseDown:c,sx:a})}const TG=15,Hp=rn("ResizableImageComponent"),kG=re("div",{name:Hp,slot:"imageContainer",overridesResolver:(t,e)=>e.imageContainer})(()=>({display:"inline-flex",position:"relative"})),EG=re("img",{name:Hp,slot:"image",overridesResolver:(t,e)=>[e.image,t.ownerState.selectedOrResizing&&e.imageSelected]})(({theme:t,ownerState:e})=>({display:"block",...e.selectedOrResizing&&{outline:`3px solid ${t.palette.primary.main}`}})),_G=re(CG,{name:Hp,slot:"resizer",overridesResolver:(t,e)=>e.resizer})(()=>({'.ProseMirror[contenteditable="false"] &':{display:"none"}}));function OG(t){var e,n,r;const o=ut({props:t,name:Hp}),{node:i,selected:s,updateAttributes:a,extension:c,classes:u={},sx:f}=o,{attrs:p}=i,m=J.useRef(null),[y,b]=J.useState(!1),g=s||y,x={selected:s,selectedOrResizing:g},w=J.useMemo(()=>xG(T=>{if(!m.current)return;const C=m.current.getBoundingClientRect(),k=T.clientX-C.x,M=T.clientY-C.y,A=Math.max(k,C.width/C.height*M,TG);a({width:Math.round(A)})},50,{trailing:!0}),[a]),E=c.options.ChildComponent;return v.jsx(LO,{style:{textAlign:p.textAlign,width:"100%"},as:c.options.inline?"span":"div",sx:f,children:v.jsxs(kG,{className:me([zp.imageContainer,u.imageContainer]),children:[v.jsx(EG,{ref:m,src:p.src,height:"auto",width:p.width?p.width:void 0,alt:(e=p.alt)!==null&&e!==void 0?e:void 0,title:(n=p.title)!==null&&n!==void 0?n:void 0,className:me([zp.image,u.image,g&&"ProseMirror-selectednode",g&&[zp.imageSelected,u.imageSelected]]),style:{maxWidth:p.width?void 0:"auto",aspectRatio:(r=p.aspectRatio)!==null&&r!==void 0?r:void 0},ownerState:x,"data-drag-handle":!0,onLoad:T=>{const C={};p.width||(C.width=T.currentTarget.naturalWidth),p.aspectRatio||(C.aspectRatio=String(T.currentTarget.naturalWidth/T.currentTarget.naturalHeight)),(C.width||C.aspectRatio)&&a(C)}}),g&&v.jsx(_G,{onResize:w,className:me([zp.resizer,u.resizer]),mouseDown:y,setMouseDown:b}),E&&v.jsx(E,{...o})]})})}const MG=gG.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",Dt({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 Su({find:r.find,handler:o=>{const i=n(o.match);if(this.options.isAllowedImgSrc(i.src))return r.handler(o)}}))},addNodeView(){return VO(OG)}});let b0,v0;if(typeof WeakMap<"u"){let t=new WeakMap;b0=e=>t.get(e),v0=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;b0=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},v0=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var Sn=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:c,bottom:u}=this.findCell(e);return{left:Math.min(n,s),top:Math.min(o,c),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 b0(t)||v0(t,AG(t))}};function AG(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=DG(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 g=p.child(b),{colspan:x,rowspan:w,colwidth:E}=g.attrs;for(let T=0;T<w;T++){if(T+u>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:f,n:w-T});break}const C=o+T*e;for(let k=0;k<x;k++){r[C+k]==0?r[C+k]=f:(i||(i=[])).push({type:"collision",row:u,pos:f,n:x-k});const M=E&&E[k];if(M){const A=(C+k)%e*2,I=s[A];I==null||I!=M&&s[A+1]==1?(s[A]=M,s[A+1]=1):I==M&&s[A+1]++}}}o+=x,f+=g.nodeSize}const m=(u+1)*e;let y=0;for(;o<m;)r[o++]==0&&y++;y&&(i||(i=[])).push({type:"missing",row:u,n:y}),f++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const a=new Sn(e,n,r,i);let c=!1;for(let u=0;!c&&u<s.length;u+=2)s[u]!=null&&s[u+1]<n&&(c=!0);return c&&IG(a,s,t),a}function DG(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 c=0;c<a.childCount;c++){const u=a.child(c);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 IG(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 c=s.attrs;for(let u=0;u<c.colspan;u++){const f=e[(o+u)%t.width*2];f!=null&&(!c.colwidth||c.colwidth[u]!=f)&&((a||(a=PG(c)))[u]=f)}a&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}function PG(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function dr(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}const _s=new Nn("selectingCells");function Ea(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 NG(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 Bo(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 Wp(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=Ea(e.$head)||$G(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function $G(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 x0(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function LG(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function S0(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function jO(t,e,n){const r=t.node(-1),o=Sn.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 _a(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 UO(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 FG(t,e,n){const r=dr(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 Zt=class ts extends dt{constructor(e,n=e){const r=e.node(-1),o=Sn.get(r),i=e.start(-1),s=o.rectBetween(e.pos-i,n.pos-i),a=e.node(0),c=o.cellsInRect(s).filter(f=>f!=n.pos-i);c.unshift(n.pos-i);const u=c.map(f=>{const p=r.nodeAt(f);if(!p)throw new RangeError(`No cell with offset ${f} found`);const m=i+f+1;return new mk(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(x0(r)&&x0(o)&&S0(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?ts.rowSelection(r,o):i&&this.isColSelection()?ts.colSelection(r,o):new ts(r,o)}return ot.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=Sn.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let c=o.top;c<o.bottom;c++){const u=[];for(let f=c*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 y=n.findCell(m);let b=e.nodeAt(m);if(!b)throw new RangeError(`No cell with offset ${m} found`);const g=o.left-y.left,x=y.right-o.right;if(g>0||x>0){let w=b.attrs;if(g>0&&(w=_a(w,0,g)),x>0&&(w=_a(w,w.colspan-x,x)),y.left<o.left){if(b=b.type.createAndFill(w),!b)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else b=b.type.create(w,b.content)}if(y.top<o.top||y.bottom>o.bottom){const w={...b.attrs,rowspan:Math.min(y.bottom,o.bottom)-Math.max(y.top,o.top)};y.top<o.top?b=b.type.createAndFill(w):b=b.type.create(w,b.content)}u.push(b)}s.push(e.child(c).copy(Me.from(u)))}const a=this.isColSelection()&&this.isRowSelection()?e:s;return new Ve(Me.from(a),1,1)}replace(e,n=Ve.empty){const r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){const{$from:a,$to:c}=o[s],u=e.mapping.slice(r);e.replace(u.map(a.pos),u.map(c.pos),s?Ve.empty:n)}const i=dt.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new Ve(Me.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=Sn.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=Sn.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),c=e.node(0);return s.top<=a.top?(s.top>0&&(e=c.resolve(i+o.map[s.left])),a.bottom<o.height&&(n=c.resolve(i+o.map[o.width*(o.height-1)+a.right-1]))):(a.top>0&&(n=c.resolve(i+o.map[a.left])),s.bottom<o.height&&(e=c.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))),new ts(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=Sn.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 ts&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=Sn.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),c=e.node(0);return s.left<=a.left?(s.left>0&&(e=c.resolve(i+o.map[s.top*o.width])),a.right<o.width&&(n=c.resolve(i+o.map[o.width*(a.top+1)-1]))):(a.left>0&&(n=c.resolve(i+o.map[a.top*o.width])),s.right<o.width&&(e=c.resolve(i+o.map[o.width*(s.top+1)-1]))),new ts(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new ts(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new ts(e.resolve(n),e.resolve(r))}getBookmark(){return new RG(this.$anchorCell.pos,this.$headCell.pos)}};Zt.prototype.visible=!1,dt.jsonID("cell",Zt);var RG=class jI{constructor(e,n){this.anchor=e,this.head=n}map(e){return new jI(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&&S0(n,r)?new Zt(n,r):dt.near(r,1)}};function BG(t){if(!(t.selection instanceof Zt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Zn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),ln.create(t.doc,e)}function VG({$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 zG({$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 HG(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,s;if(r instanceof nt&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=Zt.create(o,r.from);else if(s=="row"){const a=o.resolve(r.from+1);i=Zt.rowSelection(a,a)}else if(!n){const a=Sn.get(r.node),c=r.from+1,u=c+a.map[a.width*a.height-1];i=Zt.create(o,c+1,u)}}else r instanceof ot&&VG(r)?i=ot.create(o,r.from):r instanceof ot&&zG(r)&&(i=ot.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}const WG=new Nn("fix-tables");function qO(t,e,n,r){const o=t.childCount,i=e.childCount;e:for(let s=0,a=0;s<i;s++){const c=e.child(s);for(let u=a,f=Math.min(o,s+3);u<f;u++)if(t.child(u)==c){a=u+1,n+=c.nodeSize;continue e}r(c,n),a<o&&t.child(a).sameMarkup(c)?qO(t.child(a),c,n+1,r):c.nodesBetween(0,c.content.size,r,n+1),n+=c.nodeSize}}function KO(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=jG(t,o,i,n))};return e?e.doc!=t.doc&&qO(e.doc,t.doc,0,r):t.doc.descendants(r),n}function jG(t,e,n,r){const o=Sn.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let c=0;c<o.height;c++)i.push(0);for(let c=0;c<o.problems.length;c++){const u=o.problems[c];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,_a(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 c=0;c<i.length;c++)i[c]&&(s==null&&(s=c),a=c);for(let c=0,u=n+1;c<o.height;c++){const f=e.child(c),p=u+f.nodeSize,m=i[c];if(m>0){let y="cell";f.firstChild&&(y=f.firstChild.type.spec.tableRole);const b=[];for(let x=0;x<m;x++){const w=dr(t.schema)[y].createAndFill();w&&b.push(w)}const g=(c==0||s==c-1)&&a==c?u+1:p-1;r.insert(r.mapping.map(g),b)}u=p}return r.setMeta(WG,{fixTables:!0})}function ai(t){const e=t.selection,n=Wp(t),r=n.node(-1),o=n.start(-1),i=Sn.get(r);return{...e instanceof Zt?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function YO(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;FG(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 c=e.map[a],u=r.nodeAt(c);t.setNodeMarkup(t.mapping.map(n+c),null,UO(u.attrs,o-e.colCount(c))),s+=u.attrs.rowspan-1}else{const c=i==null?dr(r.type.schema).cell:r.nodeAt(e.map[a+i]).type,u=e.positionAt(s,o,r);t.insert(t.mapping.map(n+u),c.createAndFill())}}return t}function UG(t,e){if(!Bo(t))return!1;if(e){const n=ai(t);e(YO(t.tr,n,n.left))}return!0}function qG(t,e){if(!Bo(t))return!1;if(e){const n=ai(t);e(YO(t.tr,n,n.right))}return!0}function KG(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,c=e.map[a],u=n.nodeAt(c),f=u.attrs;if(o>0&&e.map[a-1]==c||o<e.width-1&&e.map[a+1]==c)t.setNodeMarkup(t.mapping.slice(i).map(r+c),null,_a(f,o-e.colCount(c)));else{const p=t.mapping.slice(i).map(r+c);t.delete(p,p+u.nodeSize)}s+=f.rowspan}}function YG(t,e){if(!Bo(t))return!1;if(e){const n=ai(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;KG(r,n,o),o!=n.left;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw new RangeError("No table found");n.table=i,n.map=Sn.get(i)}e(r)}return!0}function GG(t,e,n){var r;const o=dr(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((r=e.nodeAt(t.map[i+n*t.width]))===null||r===void 0?void 0:r.type)!=o)return!1;return!0}function GO(t,{map:e,tableStart:n,table:r},o){let i=n;for(let u=0;u<o;u++)i+=r.child(u).nodeSize;const s=[];let a=o>0?-1:0;GG(e,r,o+a)&&(a=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{var c;const p=a==null?dr(r.type.schema).cell:(c=r.nodeAt(e.map[f+a*e.width]))===null||c===void 0?void 0:c.type,m=p==null?void 0:p.createAndFill();m&&s.push(m)}return t.insert(i,dr(r.type.schema).row.create(null,s)),t}function JG(t,e){if(!Bo(t))return!1;if(e){const n=ai(t);e(GO(t.tr,n,n.top))}return!0}function XG(t,e){if(!Bo(t))return!1;if(e){const n=ai(t);e(GO(t.tr,n,n.bottom))}return!0}function ZG(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 c=new Set;for(let u=0,f=o*e.width;u<e.width;u++,f++){const p=e.map[f];if(!c.has(p)){if(c.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),y=m.attrs,b=m.type.create({...y,rowspan:m.attrs.rowspan-1},m.content),g=e.positionAt(o+1,u,n);t.insert(t.mapping.slice(a).map(r+g),b),u+=y.colspan-1}}}}function QG(t,e){if(!Bo(t))return!1;if(e){const n=ai(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;ZG(r,n,o),o!=n.top;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw new RangeError("No table found");n.table=i,n.map=Sn.get(n.table)}e(r)}return!0}function JO(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function eJ({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 c=r.top;c<r.bottom;c++){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 c=r.left;c<r.right;c++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[s]==n[s+t])return!0;o++,s++}return!1}function XO(t,e){const n=t.selection;if(!(n instanceof Zt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=ai(t),{map:o}=r;if(eJ(o,r))return!1;if(e){const i=t.tr,s={};let a=Me.empty,c,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],y=r.table.nodeAt(m);if(!(s[m]||!y))if(s[m]=!0,c==null)c=m,u=y;else{JO(y)||(a=a.append(y.content));const b=i.mapping.map(m+r.tableStart);i.delete(b,b+y.nodeSize)}}if(c==null||u==null)return!0;if(i.setNodeMarkup(c+r.tableStart,null,{...UO(u.attrs,u.attrs.colspan,r.right-r.left-u.attrs.colspan),rowspan:r.bottom-r.top}),a.size>0){const f=c+1+u.content.size,p=JO(u)?c+1:f;i.replaceWith(p+r.tableStart,f+r.tableStart,a)}i.setSelection(new Zt(i.doc.resolve(c+r.tableStart))),e(i)}return!0}function ZO(t,e){const n=dr(t.schema);return tJ(({node:r})=>n[r.type.spec.tableRole])(t,e)}function tJ(t){return(e,n)=>{const r=e.selection;let o,i;if(r instanceof Zt){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,i=r.$anchorCell.pos}else{var s;if(o=NG(r.$from),!o)return!1;i=(s=Ea(r.$from))===null||s===void 0?void 0:s.pos}if(o==null||i==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let a=o.attrs;const c=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const f=ai(e),p=e.tr;for(let y=0;y<f.right-f.left;y++)c.push(u?{...a,colwidth:u&&u[y]?[u[y]]:null}:a);let m;for(let y=f.top;y<f.bottom;y++){let b=f.map.positionAt(y,f.left,f.table);y==f.top&&(b+=o.nodeSize);for(let g=f.left,x=0;g<f.right;g++,x++)g==f.left&&y==f.top||p.insert(m=p.mapping.map(b+f.tableStart,1),t({node:o,row:y,col:g}).createAndFill(c[x]))}p.setNodeMarkup(i,t({node:o,row:f.top,col:f.left}),c[0]),r instanceof Zt&&p.setSelection(new Zt(p.doc.resolve(r.$anchorCell.pos),m?p.doc.resolve(m):void 0)),n(p)}return!0}}function nJ(t,e){return function(n,r){if(!Bo(n))return!1;const o=Wp(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof Zt?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 rJ(t){return function(e,n){if(!Bo(e))return!1;if(n){const r=dr(e.schema),o=ai(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(c=>o.table.nodeAt(c));for(let c=0;c<s.length;c++)a[c].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[c],r.cell,a[c].attrs);if(i.steps.length===0)for(let c=0;c<s.length;c++)i.setNodeMarkup(o.tableStart+s[c],r.header_cell,a[c].attrs);n(i)}return!0}}function QO(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 Ru(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?rJ(t):function(n,r){if(!Bo(n))return!1;if(r){const o=dr(n.schema),i=ai(n),s=n.tr,a=QO("row",i,o),c=QO("column",i,o),u=(t==="column"?a:t==="row"&&c)?1:0,f=t=="column"?{left:0,top:u,right:1,bottom:i.map.height}:t=="row"?{left:u,top:0,right:i.map.width,bottom:1}:i,p=t=="column"?c?o.cell:o.header_cell:t=="row"?a?o.cell:o.header_cell:o.cell;i.map.cellsInRect(f).forEach(m=>{const y=m+i.tableStart,b=s.doc.nodeAt(y);b&&s.setNodeMarkup(y,p,b.attrs)}),r(s)}return!0}}Ru("row",{useDeprecatedLogic:!0}),Ru("column",{useDeprecatedLogic:!0});const oJ=Ru("cell",{useDeprecatedLogic:!0});function iJ(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 eM(t){return function(e,n){if(!Bo(e))return!1;const r=iJ(Wp(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(ot.between(o,LG(o))).scrollIntoView())}return!0}}function sJ(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 jp(t,e){const n=t.selection;if(!(n instanceof Zt))return!1;if(e){const r=t.tr,o=dr(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 Ve(o,0,0))}),r.docChanged&&e(r)}return!0}function aJ(t){if(t.size===0)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 c=0;c<e.childCount;c++){let u=e.child(c).content;const f=c?0:Math.max(0,n-1),p=c<e.childCount-1?0:Math.max(0,r-1);(f||p)&&(u=w0(dr(s).row,new Ve(u,f,p)).content),a.push(u)}else if(i=="cell"||i=="header_cell")a.push(n||r?w0(dr(s).row,new Ve(e,n,r)).content:e);else return null;return lJ(s,a)}function lJ(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:c}=i.child(s).attrs;for(let u=o;u<o+a;u++)n[u]=(n[u]||0)+c}}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(Me.empty),n[o]<r){const i=dr(t).cell.createAndFill(),s=[];for(let a=n[o];a<r;a++)s.push(i);e[o]=e[o].append(Me.from(s))}return{height:e.length,width:r,rows:e}}function w0(t,e){const n=t.createAndFill();return new Oy(n).replace(0,n.content.size,e).doc}function cJ({width:t,height:e,rows:n},r,o){if(t!=r){const i=[],s=[];for(let a=0;a<n.length;a++){const c=n[a],u=[];for(let f=i[a]||0,p=0;f<r;p++){let m=c.child(p%c.childCount);f+m.attrs.colspan>r&&(m=m.type.createChecked(_a(m.attrs,m.attrs.colspan,f+m.attrs.colspan-r),m.content)),u.push(m),f+=m.attrs.colspan;for(let y=1;y<m.attrs.rowspan;y++)i[a+y]=(i[a+y]||0)+m.attrs.colspan}s.push(Me.from(u))}n=s,t=r}if(e!=o){const i=[];for(let s=0,a=0;s<o;s++,a++){const c=[],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)),c.push(p)}i.push(Me.from(c))}n=i,e=o}return{width:t,height:e,rows:n}}function uJ(t,e,n,r,o,i,s){const a=t.doc.type.schema,c=dr(a);let u,f;if(o>e.width)for(let p=0,m=0;p<e.height;p++){const y=n.child(p);m+=y.nodeSize;const b=[];let g;y.lastChild==null||y.lastChild.type==c.cell?g=u||(u=c.cell.createAndFill()):g=f||(f=c.header_cell.createAndFill());for(let x=e.width;x<o;x++)b.push(g);t.insert(t.mapping.slice(s).map(m-1+r),b)}if(i>e.height){const p=[];for(let b=0,g=(e.height-1)*e.width;b<Math.max(e.width,o);b++){const x=b>=e.width?!1:n.nodeAt(e.map[g+b]).type==c.header_cell;p.push(x?f||(f=c.header_cell.createAndFill()):u||(u=c.cell.createAndFill()))}const m=c.row.create(null,Me.from(p)),y=[];for(let b=e.height;b<i;b++)y.push(m);t.insert(t.mapping.slice(s).map(r+n.nodeSize-2),y)}return!!(u||f)}function tM(t,e,n,r,o,i,s,a){if(s==0||s==e.height)return!1;let c=!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){c=!0;const m=n.nodeAt(p),{top:y,left:b}=e.findCell(p);t.setNodeMarkup(t.mapping.slice(a).map(p+r),null,{...m.attrs,rowspan:s-y}),t.insert(t.mapping.slice(a).map(e.positionAt(s,b,n)),m.type.createAndFill({...m.attrs,rowspan:y+m.attrs.rowspan-s})),u+=m.attrs.colspan-1}}return c}function nM(t,e,n,r,o,i,s,a){if(s==0||s==e.width)return!1;let c=!1;for(let u=o;u<i;u++){const f=u*e.width+s,p=e.map[f];if(e.map[f-1]==p){c=!0;const m=n.nodeAt(p),y=e.colCount(p),b=t.mapping.slice(a).map(p+r);t.setNodeMarkup(b,null,_a(m.attrs,s-y,m.attrs.colspan-(s-y))),t.insert(b+m.nodeSize,m.type.createAndFill(_a(m.attrs,0,s-y))),u+=m.attrs.rowspan-1}}return c}function rM(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=Sn.get(i);const{top:a,left:c}=r,u=c+o.width,f=a+o.height,p=t.tr;let m=0;function y(){if(i=n?p.doc.nodeAt(n-1):p.doc,!i)throw new Error("No table found");s=Sn.get(i),m=p.mapping.maps.length}uJ(p,s,i,n,u,f,m)&&y(),tM(p,s,i,n,c,u,a,m)&&y(),tM(p,s,i,n,c,u,f,m)&&y(),nM(p,s,i,n,a,f,c,m)&&y(),nM(p,s,i,n,a,f,u,m)&&y();for(let b=a;b<f;b++){const g=s.positionAt(b,c,i),x=s.positionAt(b,u,i);p.replace(p.mapping.slice(m).map(g+n),p.mapping.slice(m).map(x+n),new Ve(o.rows[b-a],0,0))}y(),p.setSelection(new Zt(p.doc.resolve(n+s.positionAt(a,c,i)),p.doc.resolve(n+s.positionAt(f-1,u-1,i)))),e(p)}const dJ=ib({ArrowLeft:qp("horiz",-1),ArrowRight:qp("horiz",1),ArrowUp:qp("vert",-1),ArrowDown:qp("vert",1),"Shift-ArrowLeft":Kp("horiz",-1),"Shift-ArrowRight":Kp("horiz",1),"Shift-ArrowUp":Kp("vert",-1),"Shift-ArrowDown":Kp("vert",1),Backspace:jp,"Mod-Backspace":jp,Delete:jp,"Mod-Delete":jp});function Up(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function qp(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof Zt)return Up(n,r,dt.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const s=oM(o,t,e);if(s==null)return!1;if(t=="horiz")return Up(n,r,dt.near(n.doc.resolve(i.head+e),e));{const a=n.doc.resolve(s),c=jO(a,t,e);let u;return c?u=dt.near(c,1):e<0?u=dt.near(n.doc.resolve(a.before(-1)),-1):u=dt.near(n.doc.resolve(a.after(-1)),1),Up(n,r,u)}}}function Kp(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof Zt)s=i;else{const c=oM(o,t,e);if(c==null)return!1;s=new Zt(n.doc.resolve(c))}const a=jO(s.$headCell,t,e);return a?Up(n,r,new Zt(s.$anchorCell,a)):!1}}function fJ(t,e){const n=t.state.doc,r=Ea(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Zt(r))),!0):!1}function pJ(t,e,n){if(!Bo(t.state))return!1;let r=aJ(n);const o=t.state.selection;if(o instanceof Zt){r||(r={width:1,height:1,rows:[Me.from(w0(dr(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),a=Sn.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=cJ(r,a.right-a.left,a.bottom-a.top),rM(t.state,t.dispatch,s,a,r),!0}else if(r){const i=Wp(t.state),s=i.start(-1);return rM(t.state,t.dispatch,s,Sn.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function hJ(t,e){var n;if(e.button!=0||e.ctrlKey||e.metaKey)return;const r=iM(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof Zt)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=Ea(t.state.selection.$anchor))!=null&&((n=C0(t,e))===null||n===void 0?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(c,u){let f=C0(t,u);const p=_s.getState(t.state)==null;if(!f||!S0(c,f))if(p)f=c;else return;const m=new Zt(c,f);if(p||!t.state.selection.eq(m)){const y=t.state.tr.setSelection(m);p&&y.setMeta(_s,c.pos),t.dispatch(y)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",a),_s.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(_s,-1))}function a(c){const u=c,f=_s.getState(t.state);let p;if(f!=null)p=t.state.doc.resolve(f);else if(iM(t,u.target)!=r&&(p=C0(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 oM(t,e,n){if(!(t.state.selection instanceof ot))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 s=r.before(o),a=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(a)?s:null}}return null}function iM(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function C0(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});if(!n)return null;let{inside:r,pos:o}=n;return r>=0&&Ea(t.state.doc.resolve(r))||Ea(t.state.doc.resolve(o))}var mJ=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")),T0(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,T0(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function T0(t,e,n,r,o,i){let s=0,a=!0,c=e.firstChild;const u=t.firstChild;if(u){for(let p=0,m=0;p<u.childCount;p++){const{colspan:y,colwidth:b}=u.child(p).attrs;for(let g=0;g<y;g++,m++){const x=o==m?i:b&&b[g],w=x?x+"px":"";if(s+=x||r,x||(a=!1),c)c.style.width!=w&&(c.style.width=w),c=c.nextSibling;else{const E=document.createElement("col");E.style.width=w,e.appendChild(E)}}}for(;c;){var f;const p=c.nextSibling;(f=c.parentNode)===null||f===void 0||f.removeChild(c),c=p}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const qr=new Nn("tableColumnResizing");function sM({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=mJ,lastColumnResizable:o=!0}={}){const i=new bn({key:qr,state:{init(s,a){var c;const u=(c=i.spec)===null||c===void 0||(c=c.props)===null||c===void 0?void 0:c.nodeViews,f=dr(a.schema).table.name;return r&&u&&(u[f]=(p,m)=>new r(p,n,m)),new gJ(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=qr.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{yJ(s,a,t,o)},mouseleave:s=>{bJ(s)},mousedown:(s,a)=>{vJ(s,a,e,n)}},decorations:s=>{const a=qr.getState(s);if(a&&a.activeHandle>-1)return TJ(s,a.activeHandle)},nodeViews:{}}});return i}var gJ=class _m{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(qr);if(r&&r.setHandle!=null)return new _m(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new _m(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return x0(e.doc.resolve(o))||(o=-1),new _m(o,n.dragging)}return n}};function yJ(t,e,n,r){if(!t.editable)return;const o=qr.getState(t.state);if(o&&!o.dragging){const i=SJ(e.target);let s=-1;if(i){const{left:a,right:c}=i.getBoundingClientRect();e.clientX-a<=n?s=aM(t,e,"left",n):c-e.clientX<=n&&(s=aM(t,e,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){const a=t.state.doc.resolve(s),c=a.node(-1),u=Sn.get(c),f=a.start(-1);if(u.colCount(a.pos-f)+a.nodeAfter.attrs.colspan-1==u.width-1)return}cM(t,s)}}}function bJ(t){if(!t.editable)return;const e=qr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&cM(t,-1)}function vJ(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,s=qr.getState(t.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=t.state.doc.nodeAt(s.activeHandle),c=xJ(t,s.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(qr,{setDragging:{startX:e.clientX,startWidth:c}}));function u(p){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",f);const m=qr.getState(t.state);m!=null&&m.dragging&&(wJ(t,m.activeHandle,lM(m.dragging,p,n)),t.dispatch(t.state.tr.setMeta(qr,{setDragging:null})))}function f(p){if(!p.which)return u(p);const m=qr.getState(t.state);if(m&&m.dragging){const y=lM(m.dragging,p,n);uM(t,m.activeHandle,y,r)}}return uM(t,s.activeHandle,c,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",f),e.preventDefault(),!0}function xJ(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let s=i.node.childNodes[i.offset].offsetWidth,a=n;if(r)for(let c=0;c<n;c++)r[c]&&(s-=r[c],a--);return s/a}function SJ(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function aM(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=Ea(t.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;const c=Sn.get(a.node(-1)),u=a.start(-1),f=c.map.indexOf(a.pos-u);return f%c.width==0?-1:u+c.map[f-1]}function lM(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function cM(t,e){t.dispatch(t.state.tr.setMeta(qr,{setHandle:e}))}function wJ(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=Sn.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,c=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,y=m.colspan==1?0:a-i.colCount(p);if(m.colwidth&&m.colwidth[y]==n)continue;const b=m.colwidth?m.colwidth.slice():CJ(m.colspan);b[y]=n,c.setNodeMarkup(s+p,null,{...m,colwidth:b})}c.docChanged&&t.dispatch(c)}function uM(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),s=o.start(-1),a=Sn.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let c=t.domAtPos(o.start(-1)).node;for(;c&&c.nodeName!="TABLE";)c=c.parentNode;c&&T0(i,c.firstChild,c,r,a,n)}function CJ(t){return Array(t).fill(0)}function TJ(t,e){const n=[],r=t.doc.resolve(e),o=r.node(-1);if(!o)return ln.empty;const i=Sn.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let u=0;u<i.height;u++){const f=a+u*i.width;if((a==i.width-1||i.map[f]!=i.map[f+1])&&(u==0||i.map[f]!=i.map[f-i.width])){var c;const p=i.map[f],m=s+p+o.nodeAt(p).nodeSize-1,y=document.createElement("div");y.className="column-resize-handle",!((c=qr.getState(t))===null||c===void 0)&&c.dragging&&n.push(Zn.node(s+p,s+p+o.nodeAt(p).nodeSize,{class:"column-resize-dragging"})),n.push(Zn.widget(m,y))}}return ln.create(t.doc,n)}function dM({allowTableNodeSelection:t=!1}={}){return new bn({key:_s,state:{init(){return null},apply(e,n){const r=e.getMeta(_s);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:BG,handleDOMEvents:{mousedown:hJ},createSelectionBetween(e){return _s.getState(e.state)!=null?e.state.selection:null},handleTripleClick:fJ,handleKeyDown:dJ,handlePaste:pJ},appendTransaction(e,n,r){return HG(r,KO(r,n),t)}})}function k0(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function fM(t,e,n,r,o,i){var s;let a=0,c=!0,u=e.firstChild;const f=t.firstChild;if(f!==null)for(let p=0,m=0;p<f.childCount;p+=1){const{colspan:y,colwidth:b}=f.child(p).attrs;for(let g=0;g<y;g+=1,m+=1){const x=o===m?i:b&&b[g],w=x?`${x}px`:"";if(a+=x||r,x||(c=!1),u){if(u.style.width!==w){const[E,T]=k0(r,x);u.style.setProperty(E,T)}u=u.nextSibling}else{const E=document.createElement("col"),[T,C]=k0(r,x);E.style.setProperty(T,C),e.appendChild(E)}}}for(;u;){const p=u.nextSibling;(s=u.parentNode)===null||s===void 0||s.removeChild(u),u=p}c?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}class kJ{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")),fM(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,fM(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function EJ(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:y,colwidth:b}=a.child(p).attrs;for(let g=0;g<y;g+=1,m+=1){const x=n===m?r:b&&b[g];o+=x||e,x||(i=!1);const[w,E]=k0(e,x);s.push(["col",{style:`${w}: ${E}`}])}}const c=i?`${o}px`:"",u=i?"":`${o}px`;return{colgroup:["colgroup",{},...s],tableWidth:c,tableMinWidth:u}}function pM(t,e){return t.createAndFill()}function _J(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 OJ(t,e,n,r,o){const i=_J(t),s=[],a=[];for(let u=0;u<n;u+=1){const f=pM(i.cell);if(f&&a.push(f),r){const p=pM(i.header_cell);p&&s.push(p)}}const c=[];for(let u=0;u<e;u+=1)c.push(i.row.createChecked(null,r&&u===0?s:a));return i.table.createChecked(null,c)}function MJ(t){return t instanceof Zt}const Yp=({editor:t})=>{const{selection:e}=t.state;if(!MJ(e))return!1;let n=0;const r=gb(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},AJ=vn.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:kJ,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}=EJ(t,this.options.cellMinWidth),i=["table",Dt(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},i]:i},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const s=OJ(i.schema,t,e,n);if(o){const a=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(ot.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>UG(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>qG(t,e),deleteColumn:()=>({state:t,dispatch:e})=>YG(t,e),addRowBefore:()=>({state:t,dispatch:e})=>JG(t,e),addRowAfter:()=>({state:t,dispatch:e})=>XG(t,e),deleteRow:()=>({state:t,dispatch:e})=>QG(t,e),deleteTable:()=>({state:t,dispatch:e})=>sJ(t,e),mergeCells:()=>({state:t,dispatch:e})=>XO(t,e),splitCell:()=>({state:t,dispatch:e})=>ZO(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Ru("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Ru("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>oJ(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>XO(t,e)?!0:ZO(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>nJ(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>eM(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>eM(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&KO(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=Zt.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:Yp,"Mod-Backspace":Yp,Delete:Yp,"Mod-Delete":Yp}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[sM({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],dM({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:xt(Je(t,"tableRole",e))}}}).extend({addProseMirrorPlugins(){return[...this.options.resizable?[sM({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],dM({allowTableNodeSelection:this.options.allowTableNodeSelection})]}}),Oa=cn("FieldContainer",["root","outlined","standard","focused","disabled","notchedOutline"]),E0=rn("FieldContainer"),DJ=re(Yb,{name:E0,slot:"root",overridesResolver:(t,e)=>[e.root,t.ownerState.variant==="outlined"&&e.outlined,t.ownerState.variant==="standard"&&e.standard,t.ownerState.focused&&e.focused,t.ownerState.disabled&&e.disabled]})(({theme:t,ownerState:e})=>({...e.variant==="outlined"&&{borderRadius:t.shape.borderRadius,padding:1,position:"relative",...!e.focused&&!e.disabled&&{[`&:hover .${Oa.notchedOutline}`]:{borderColor:t.palette.text.primary}}}})),IJ=re("div",{name:E0,slot:"notchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t,ownerState:e})=>({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:Tp.NOTCHED_OUTLINE,...e.focused&&{borderColor:t.palette.primary.main,borderWidth:2},...e.disabled&&{borderColor:t.palette.action.disabled}}));function PJ(t){const e=ut({props:t,name:E0}),{variant:n="outlined",children:r,focused:o,disabled:i,classes:s={},className:a,sx:c,...u}=e,f={variant:n,focused:o,disabled:i};return v.jsxs(DJ,{...u,className:me([Oa.root,a,s.root,n==="outlined"?[Oa.outlined,s.outlined]:[Oa.standard,s.standard],o&&[Oa.focused,s.focused],i&&[Oa.disabled,s.disabled]]),sx:c,ownerState:f,children:[r,n==="outlined"&&v.jsx(IJ,{ownerState:f,className:me([Oa.notchedOutline,s.notchedOutline]),"aria-hidden":!0})]})}function hM({editor:t,wait:e=250}){const[n,r]=J.useState(!!(t!=null&&t.isFocused)),o=J.useMemo(()=>U_(i=>{r(i)},e),[e]);return J.useEffect(()=>{const i=!!(t!=null&&t.isFocused);return o(i),i&&o.flush(),()=>{o.cancel()}},[t==null?void 0:t.isFocused,o]),n}function mM(t,e){const n=J.useRef(e);J.useEffect(()=>{n.current=e},[e]),J.useEffect(()=>{function r(o){t===o.key&&n.current(o)}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t])}function NJ({editor:t,onCancel:e,onSave:n,labels:r,formatHref:o=uK}){var i,s,a,c,u,f;const p=t.isActive("link")?t.getAttributes("link").href:"",m=wu(t.state.selection.$from,Ro("link",t.schema)),y=m?t.state.doc.textBetween(m.from,m.to):"",b=t.state.doc.textBetween(t.state.selection.$from.pos,t.state.selection.$to.pos),g=y||b,[x,w]=J.useState(g),[E,T]=J.useState(p),C=J.useRef(null),k=J.useRef(null),M=!p,A=(i=r==null?void 0:r.editLinkAddTitle)!==null&&i!==void 0?i:"Add link",I=(s=r==null?void 0:r.editLinkEditTitle)!==null&&s!==void 0?s:"Edit link",L=M?A:I;J.useEffect(()=>{var V,z;!M||!g?(V=C.current)===null||V===void 0||V.focus({preventScroll:!0}):(z=k.current)===null||z===void 0||z.focus({preventScroll:!0})},[M,g]),mM("Escape",e);function O(){k.current&&T(o(k.current.value))}const[N,$]=J.useState(!1);return v.jsxs("form",{onSubmit:V=>{var z,F,B,W;V.preventDefault(),V.stopPropagation(),$(!0);const Y=(F=(z=C.current)===null||z===void 0?void 0:z.value)!==null&&F!==void 0?F:"",X=(W=(B=k.current)===null||B===void 0?void 0:B.value)!==null&&W!==void 0?W:"";n({text:Y,link:X}),$(!1)},autoComplete:"off",children:[v.jsx(co,{variant:"h6",children:L}),v.jsx(Lc,{inputRef:C,value:x,disabled:N,onChange:V=>{w(V.target.value)},label:(a=r==null?void 0:r.editLinkTextInputLabel)!==null&&a!==void 0?a:"Text",margin:"normal",size:"small",fullWidth:!0,required:!0}),v.jsx(Lc,{inputRef:k,value:E,onChange:V=>{T(V.target.value)},disabled:N,label:(c=r==null?void 0:r.editLinkHrefInputLabel)!==null&&c!==void 0?c:"Link",margin:"dense",size:"small",type:"text",onBlur:O,onKeyDown:V=>{V.key==="Enter"&&O()},fullWidth:!0,required:!0}),v.jsxs(Ff,{sx:{px:0},children:[v.jsx(go,{onClick:e,variant:"outlined",size:"small",children:(u=r==null?void 0:r.editLinkCancelButtonLabel)!==null&&u!==void 0?u:"Cancel"}),v.jsx(go,{type:"submit",color:"primary",variant:"outlined",size:"small",disabled:N,children:(f=r==null?void 0:r.editLinkSaveButtonLabel)!==null&&f!==void 0?f:"Save"})]})]})}const _0=cn("LinkBubbleMenu",["root","paper","content"]);function $J(t){return Qe("MuiLink",t)}const LJ=Ge("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),FJ=({theme:t,ownerState:e})=>{const n=e.color,r=is(t,`palette.${n}.main`,!1)||is(t,`palette.${n}`,!1)||e.color,o=is(t,`palette.${n}.mainChannel`)||is(t,`palette.${n}Channel`);return"vars"in t&&o?`rgba(${o} / 0.4)`:ft(r,.4)},gM={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},RJ=t=>{const{classes:e,component:n,focusVisible:r,underline:o}=t,i={root:["root",`underline${$e(o)}`,n==="button"&&"button",r&&"focusVisible"]};return Ze(i,$J,e)},BJ=re(co,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${$e(n.underline)}`],n.component==="button"&&e.button]}})(Tt(({theme:t})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:e,ownerState:n})=>e==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},...Object.entries(t.palette).filter(Wn()).map(([e])=>({props:{underline:"always",color:e},style:{"--Link-underlineColor":t.vars?`rgba(${t.vars.palette[e].mainChannel} / 0.4)`:ft(t.palette[e].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:ft(t.palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":t.vars?`rgba(${t.vars.palette.text.secondaryChannel} / 0.4)`:ft(t.palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(t.vars||t).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${LJ.focusVisible}`]:{outline:"auto"}}}]}))),yM=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiLink"}),o=ro(),{className:i,color:s="primary",component:a="a",onBlur:c,onFocus:u,TypographyClasses:f,underline:p="always",variant:m="inherit",sx:y,...b}=r,[g,x]=D.useState(!1),w=k=>{Ja(k.target)||x(!1),c&&c(k)},E=k=>{Ja(k.target)&&x(!0),u&&u(k)},T={...r,color:s,component:a,focusVisible:g,underline:p,variant:m},C=RJ(T);return v.jsx(BJ,{color:s,className:me(C.root,i),classes:f,component:a,onBlur:w,onFocus:E,ref:n,ownerState:T,variant:m,...b,sx:[...gM[s]===void 0?[{color:s}]:[],...Array.isArray(y)?y:[y]],style:{...b.style,...p==="always"&&s!=="inherit"&&!gM[s]&&{"--Link-underlineColor":FJ({theme:o,ownerState:T})}}})});process.env.NODE_ENV!=="production"&&(yM.propTypes={children:l.node,classes:l.object,className:l.string,color:l.oneOfType([l.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),l.string]),component:Ya,onBlur:l.func,onFocus:l.func,style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),TypographyClasses:l.object,underline:l.oneOf(["always","hover","none"]),variant:l.oneOfType([l.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),l.string])});var O0={},M0={},bM;function VJ(){return bM||(bM=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){return n!==null&&(typeof n=="object"||typeof n=="function")}t.isObject=e})(M0)),M0}var vM;function zJ(){return vM||(vM=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=VJ(),n=/[\u200d\ud800-\udfff\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff\ufe0e\ufe0f]/;function r(i,s){i=i!=null?`${i}`:"";let a=30,c="...";e.isObject(s)&&(a=o(s.length),c="omission"in s?`${s.omission}`:"...");let u=i.length;const f=Array.from(c).length,p=Math.max(a-f,0);let m;if(n.test(i)&&(m=Array.from(i),u=m.length),a>=u)return i;if(u<=f)return c;let b=m===void 0?i.slice(0,p):m==null?void 0:m.slice(0,p).join("");const g=s==null?void 0:s.separator;if(!g)return b+=c,b;const x=g instanceof RegExp?g.source:g,w="u"+(g instanceof RegExp?g.flags.replace("u",""):""),E=new RegExp(`(?<result>.*(?:(?!${x}).))(?:${x})`,w).exec(b);return(E!=null&&E.groups?E.groups.result:b)+c}function o(i){return i==null?30:i<=0?0:i}t.truncate=r})(O0)),O0}var A0,xM;function HJ(){return xM||(xM=1,A0=zJ().truncate),A0}var WJ=HJ();const jJ=Rr(WJ),D0=cn("ViewLinkMenuContent",["root","linkPreviewText"]),I0=rn("ViewLinkMenuContent"),UJ=re("div",{name:I0,slot:"root",overridesResolver:(t,e)=>e.root})({}),SM=re("div",{name:I0,slot:"linkPreviewText",overridesResolver:(t,e)=>e.linkPreviewText})({overflowWrap:"anywhere"});function qJ(t){var e,n,r;const o=ut({props:t,name:I0}),{editor:i,onCancel:s,onEdit:a,onRemove:c,labels:u,classes:f={},sx:p}=o,m=wu(i.state.selection.$to,Ro("link",i.schema)),y=m?i.state.doc.textBetween(m.from,m.to):"",b=(e=i.getAttributes("link").href)!==null&&e!==void 0?e:"";return mM("Escape",s),v.jsxs(UJ,{className:me([D0.root,f.root]),sx:p,children:[v.jsx(SM,{className:me([D0.linkPreviewText,f.linkPreviewText]),children:jJ(y,{length:50,omission:"…"})}),v.jsx(SM,{className:me([D0.linkPreviewText,f.linkPreviewText]),children:v.jsx(yM,{href:b,target:"_blank",rel:"noopener",children:fK(b,50)})}),v.jsxs(Ff,{sx:{px:0},children:[v.jsx(go,{onClick:a,color:"primary",variant:"outlined",size:"small",children:(n=u==null?void 0:u.viewLinkEditButtonLabel)!==null&&n!==void 0?n:"Edit"}),v.jsx(go,{onClick:c,color:"error",variant:"outlined",size:"small",children:(r=u==null?void 0:u.viewLinkRemoveButtonLabel)!==null&&r!==void 0?r:"Remove"})]})]})}const wM=rn("LinkBubbleMenu"),KJ=re("div",{name:wM,slot:"content",overridesResolver:(t,e)=>e.content})(({theme:t})=>({padding:t.spacing(1.5,2,.5)}));function YJ(t){const e=ut({props:t,name:wM}),{labels:n,formatHref:r,classes:o={},sx:i,...s}=e,a=Pt();if(!(a!=null&&a.isEditable))return null;if(!("linkBubbleMenuHandler"in a.storage))throw new Error("You must add the LinkBubbleMenuHandler extension to the useEditor `extensions` array in order to use this component!");const c=a.storage.linkBubbleMenuHandler,u=c.state;let f=null;return u===vr.VIEW_LINK_DETAILS?f=v.jsx(qJ,{editor:a,onCancel:a.commands.closeLinkBubbleMenu,onEdit:a.commands.editLinkInBubbleMenu,onRemove:()=>{a.chain().unsetLink().setTextSelection(a.state.selection.to).focus().run()},labels:n}):u===vr.EDIT_LINK&&(f=v.jsx(NJ,{editor:a,onCancel:a.commands.closeLinkBubbleMenu,onSave:({text:p,link:m})=>{a.chain().extendMarkRange("link").insertContent({type:"text",marks:[{type:"link",attrs:{href:m}}],text:p}).setLink({href:m}).focus().run(),a.commands.closeLinkBubbleMenu()},labels:n,formatHref:r})),v.jsx(v_,{editor:a,open:u!==vr.HIDDEN,...c.bubbleMenuOptions,...s,classes:{root:me([_0.root,o.root]),paper:me([_0.paper,o.paper])},sx:i,children:v.jsx(KJ,{className:me([_0.content,o.content]),children:f})})}function GJ(t){return Qe("MuiCollapse",t)}Ge("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const JJ=t=>{const{orientation:e,classes:n}=t,r={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};return Ze(r,GJ,n)},XJ=re("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.orientation],n.state==="entered"&&e.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&e.hidden]}})(Tt(({theme:t})=>({height:0,overflow:"hidden",transition:t.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:t.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>e.state==="exited"&&!e.in&&e.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),ZJ=re("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),QJ=re("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Gp=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiCollapse"}),{addEndListener:o,children:i,className:s,collapsedSize:a="0px",component:c,easing:u,in:f,onEnter:p,onEntered:m,onEntering:y,onExit:b,onExited:g,onExiting:x,orientation:w="vertical",style:E,timeout:T=CS.standard,TransitionComponent:C=Vr,...k}=r,M={...r,orientation:w,collapsedSize:a},A=JJ(M),I=ro(),L=qs(),O=D.useRef(null),N=D.useRef(),$=typeof a=="number"?`${a}px`:a,V=w==="horizontal",z=V?"width":"height",F=D.useRef(null),B=At(n,F),W=ce=>fe=>{if(ce){const q=F.current;fe===void 0?ce(q):ce(q,fe)}},Y=()=>O.current?O.current[V?"clientWidth":"clientHeight"]:0,X=W((ce,fe)=>{O.current&&V&&(O.current.style.position="absolute"),ce.style[z]=$,p&&p(ce,fe)}),K=W((ce,fe)=>{const q=Y();O.current&&V&&(O.current.style.position="");const{duration:ee,easing:se}=fl({style:E,timeout:T,easing:u},{mode:"enter"});if(T==="auto"){const be=I.transitions.getAutoHeightDuration(q);ce.style.transitionDuration=`${be}ms`,N.current=be}else ce.style.transitionDuration=typeof ee=="string"?ee:`${ee}ms`;ce.style[z]=`${q}px`,ce.style.transitionTimingFunction=se,y&&y(ce,fe)}),Q=W((ce,fe)=>{ce.style[z]="auto",m&&m(ce,fe)}),ve=W(ce=>{ce.style[z]=`${Y()}px`,b&&b(ce)}),xe=W(g),ye=W(ce=>{const fe=Y(),{duration:q,easing:ee}=fl({style:E,timeout:T,easing:u},{mode:"exit"});if(T==="auto"){const se=I.transitions.getAutoHeightDuration(fe);ce.style.transitionDuration=`${se}ms`,N.current=se}else ce.style.transitionDuration=typeof q=="string"?q:`${q}ms`;ce.style[z]=$,ce.style.transitionTimingFunction=ee,x&&x(ce)}),oe=ce=>{T==="auto"&&L.start(N.current||0,ce),o&&o(F.current,ce)};return v.jsx(C,{in:f,onEnter:X,onEntered:Q,onEntering:K,onExit:ve,onExited:xe,onExiting:ye,addEndListener:oe,nodeRef:F,timeout:T==="auto"?null:T,...k,children:(ce,{ownerState:fe,...q})=>v.jsx(XJ,{as:c,className:me(A.root,s,{entered:A.entered,exited:!f&&$==="0px"&&A.hidden}[ce]),style:{[V?"minWidth":"minHeight"]:$,...E},ref:B,ownerState:{...M,state:ce},...q,children:v.jsx(ZJ,{ownerState:{...M,state:ce},className:A.wrapper,ref:O,children:v.jsx(QJ,{ownerState:{...M,state:ce},className:A.wrapperInner,children:i})})})})});process.env.NODE_ENV!=="production"&&(Gp.propTypes={addEndListener:l.func,children:l.node,classes:l.object,className:l.string,collapsedSize:l.oneOfType([l.number,l.string]),component:Ya,easing:l.oneOfType([l.shape({enter:l.string,exit:l.string}),l.string]),in:l.bool,onEnter:l.func,onEntered:l.func,onEntering:l.func,onExit:l.func,onExited:l.func,onExiting:l.func,orientation:l.oneOf(["horizontal","vertical"]),style:l.object,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),timeout:l.oneOfType([l.oneOf(["auto"]),l.number,l.shape({appear:l.number,enter:l.number,exit:l.number})])}),Gp&&(Gp.muiSupportAuto=!0);const Jp=cn("MenuBar",["root","sticky","nonSticky","content"]),P0=rn("MenuBar"),eX=re(Gp,{name:P0,slot:"root",overridesResolver:(t,e)=>[e.root,t.ownerState.disableSticky?e.nonSticky:e.sticky]})(({theme:t,ownerState:e})=>({borderBottomColor:t.palette.divider,borderBottomStyle:"solid",borderBottomWidth:1,...e.disableSticky?{}:{position:"sticky",top:e.stickyOffset,zIndex:Tp.MENU_BAR,background:t.palette.background.default}})),tX=re("div",{name:P0,slot:"content",overridesResolver:(t,e)=>e.content})({});function nX(t){const e=ut({props:t,name:P0}),{hide:n,disableSticky:r,stickyOffset:o=0,children:i,className:s,classes:a={},unmountOnExit:c=!0,sx:u,...f}=e,p={hide:n,disableSticky:r,stickyOffset:o,unmountOnExit:c};return v.jsx(eX,{...f,in:!n,unmountOnExit:c,className:me([Jp.root,a.root,r?[Jp.nonSticky,a.nonSticky]:[Jp.sticky,a.sticky],s]),ownerState:p,sx:u,children:v.jsx(tX,{className:me([Jp.content,a.content]),ownerState:p,children:i})})}const N0=cn("RichTextContent",["root","readonly","editable"]),CM=rn("RichTextContent"),rX=re(qY,{name:CM,slot:"root",overridesResolver:(t,e)=>[e.root,t.ownerState.editable?e.editable:e.readonly]})(({theme:t,ownerState:e})=>e.disableDefaultStyles?{}:{"& .ProseMirror":{...Ta(t)}});function TM(t){const e=ut({props:t,name:CM}),{innerRef:n,className:r,classes:o={},disableDefaultStyles:i=!1,sx:s}=e,a=Pt(),c=!!(a!=null&&a.isEditable),u={editable:c,disableDefaultStyles:i},f=J.useMemo(()=>me([N0.root,r,o.root,c?[N0.editable,o.editable]:[N0.readonly,o.readonly]]),[r,o.root,o.editable,o.readonly,c]);return v.jsx(rX,{editor:a,...n?{innerRef:n}:{},ownerState:u,className:f,sx:s})}function kM({editor:t,children:e}){return v.jsx(kT.Provider,{value:t,children:e})}const li=cn("RichTextField",["root","standard","outlined","menuBar","menuBarContent","content"]),EM=rn("RichTextField"),oX=re(PJ,{name:EM,slot:"root",overridesResolver:(t,e)=>[e.root,t.ownerState.variant==="outlined"&&e.outlined,t.ownerState.variant==="standard"&&e.standard]})(({theme:t,ownerState:e})=>({...e.variant==="standard"&&{[`& .${li.content}`]:{padding:t.spacing(1.5,0)},[`& .${li.menuBarContent}`]:{padding:t.spacing(1,0)}},...e.variant==="outlined"&&{[`& .${li.content}`]:{padding:t.spacing(1.5)},[`& .${li.menuBarContent}`]:{padding:t.spacing(1,1.5)}}}));function iX(t){var e,n;const r=ut({props:t,name:EM}),{variant:o="outlined",controls:i,disableDebounceRenderControls:s=!1,disabled:a,className:c,classes:u={},footer:f,MenuBarProps:p,RichTextContentProps:m,sx:y,...b}=r,g=Pt(),x={variant:o,disabled:a,disableDebounceRenderControls:s},w=hM({editor:g});return v.jsxs(oX,{...b,variant:o,focused:!a&&w,disabled:a,className:me([li.root,u.root,o==="outlined"?[li.outlined,u.outlined]:[li.standard,u.standard],c]),ownerState:x,sx:y,children:[i&&v.jsx(nX,{...p,classes:{...p==null?void 0:p.classes,root:me([li.menuBar,u.menuBar,(e=p==null?void 0:p.classes)===null||e===void 0?void 0:e.root]),content:me([li.menuBarContent,u.menuBarContent,(n=p==null?void 0:p.classes)===null||n===void 0?void 0:n.content])},children:s?i:v.jsx(Ub,{children:i})}),v.jsx(TM,{...m,className:me([li.content,u.content,m==null?void 0:m.className])}),f]})}const sX=J.forwardRef(function({className:e,renderControls:n,RichTextFieldProps:r={},sx:o,children:i,editorDependencies:s=[],editable:a=!0,shouldRerenderOnTransaction:c=!0,...u},f){const p={editable:a,shouldRerenderOnTransaction:c,...u},m=PO(p,s);return J.useImperativeHandle(f,()=>({editor:m}),[m]),J.useEffect(()=>{!m||m.isDestroyed||m.isEditable===a||queueMicrotask(()=>{m.setEditable(a)})},[a,m]),v.jsxs(kM,{editor:m,children:[v.jsx(iX,{disabled:!a,controls:n==null?void 0:n(m),className:e,sx:o,...r}),i==null?void 0:i(m)]})});function aX({RichTextContentProps:t,sx:e,...n}){const r=PO({...n,editable:!1}),o=J.useRef(n.content);return J.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]),J.useEffect(()=>{o.current=n.content},[n.content]),v.jsx(kM,{editor:r,children:v.jsx(TM,{sx:e,...t})})}function lX(t){return t.content?v.jsx(aX,{...t}):null}const $0=cn("TableBubbleMenu",["root","paper","content"]),_M=rn("TableBubbleMenu"),cX=re(aY,{name:_M,slot:"content",overridesResolver:(t,e)=>e.content})(({theme:t})=>({maxWidth:"90vw",padding:t.spacing(.5,1)}));function uX(t){const e=ut({props:t,name:_M}),{disableDebounce:n=!1,DebounceProps:r,labels:o,classes:i={},...s}=e,a=Pt(),c=hM({editor:a}),u=J.useMemo(()=>a?{getBoundingClientRect:()=>{const p=a.isActive("table")?gb(a.state.selection.$anchor,g=>g.type.name==="table"):null;if(p){const g=a.view.nodeDOM(p.pos),x=g==null?void 0:g.querySelector("table");if(x)return x.getBoundingClientRect()}const{ranges:m}=a.state.selection,y=Math.min(...m.map(g=>g.$from.pos)),b=Math.max(...m.map(g=>g.$to.pos));return m_(a.view,y,b)}}:null,[a]);if(!(a!=null&&a.isEditable))return null;const f=v.jsx(cX,{className:me([$0.content,i.content]),labels:o});return v.jsx(v_,{editor:a,open:c&&a.isActive("table"),anchorEl:u,placement:"top-start",fallbackPlacements:["bottom-start","top","bottom","top-end","bottom-end"],flipPadding:{top:35,left:8,right:8,bottom:-1/0},...s,classes:{root:me([$0.root,i.root]),paper:me([$0.paper,i.paper])},children:n?f:v.jsx(Ub,{...r,children:f})})}const dX=t=>{const{onUploadFiles:e}=t,n=j.useTheme();return v.jsxs(Y_,{children:[v.jsx(HK,{options:[{label:"Monospace",value:"monospace"},{label:"Serif",value:"serif"}]}),v.jsx(er,{}),v.jsx(eY,{}),v.jsx(er,{}),v.jsx(qK,{}),v.jsx(er,{}),v.jsx(Kq,{}),v.jsx(mK,{}),v.jsx(TK,{}),v.jsx(vK,{}),v.jsx(xK,{}),v.jsx(SK,{}),v.jsx(er,{}),v.jsx(CK,{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(eK,{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(er,{}),v.jsx(Qq,{}),v.jsx(er,{}),v.jsx(oY,{}),v.jsx(er,{}),v.jsx(gK,{}),v.jsx(Yq,{}),v.jsx(wK,{}),wq()&&v.jsxs(v.Fragment,{children:[v.jsx(hK,{}),v.jsx(EK,{})]}),v.jsx(er,{}),v.jsx(qq,{}),v.jsx(er,{}),v.jsx(Gq,{}),v.jsx(Jq,{}),v.jsx(er,{}),v.jsx(pK,{onUploadFiles:e}),v.jsx(er,{}),v.jsx(tK,{}),v.jsx(Uq,{}),v.jsx(er,{}),v.jsx(bK,{}),v.jsx(er,{}),v.jsx(kK,{}),v.jsx(yK,{})]})},fX=/^\s*>\s$/,pX=vn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Dt(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[Vl({find:fX,type:this.type})]}}),hX=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,mX=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,gX=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,yX=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,bX=Ar.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",Dt(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[Ca({find:hX,type:this.type}),Ca({find:gX,type:this.type})]},addPasteRules(){return[Es({find:mX,type:this.type}),Es({find:yX,type:this.type})]}}),vX="listItem",OM="textStyle",MM=/^\s*([-+*])\s$/,xX=vn.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",Dt(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(vX,this.editor.getAttributes(OM)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Vl({find:MM,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Vl({find:MM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(OM),editor:this.editor})),[t]}}),SX=/(^|[^`])`([^`]+)`(?!`)/,wX=/(^|[^`])`([^`]+)`(?!`)/g,CX=Ar.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Dt(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[Ca({find:SX,type:this.type})]},addPasteRules(){return[Es({find:wX,type:this.type})]}}),TX=/^```([a-z]+)?[\s\n]$/,kX=/^~~~([a-z]+)?[\s\n]$/,EX=vn.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",Dt(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(`
|
|
399
|
-
|
|
400
|
-
`);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(dt.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[Cb({find:TX,type:this.type,getAttributes:t=>({language:t[1]})}),Cb({find:kX,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new bn({key:new Nn("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,c=a.text(n.replace(/\r\n?/g,`
|
|
401
|
-
`));return s.replaceSelectionWith(this.type.create({language:i},c)),s.selection.$from.parent.type!==this.type&&s.setSelection(ot.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),_X=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}`)})},OX=Ar.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&_X(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Dt(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}}}}),MX=$n.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()}}}),AX=vn.create({name:"doc",topNode:!0,content:"block+"});function DX(t={}){return new bn({view(e){return new IX(e,t)}})}class IX{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 y=this.editorView.nodeDOM(this.cursorPos-(p?p.nodeSize:0));if(y){let b=y.getBoundingClientRect(),g=p?b.bottom:b.top;p&&m&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let x=this.width/2*a;r={left:b.left,right:b.right,top:g-x,bottom:g+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 c=this.editorView.dom.offsetParent;this.element||(this.element=c.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(!c||c==document.body&&getComputedStyle(c).position=="static")u=-pageXOffset,f=-pageYOffset;else{let p=c.getBoundingClientRect(),m=p.width/c.offsetWidth,y=p.height/c.offsetHeight;u=p.left-c.scrollLeft*m,f=p.top-c.scrollTop*y}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=uk(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 PX=$n.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[DX(this.options)]}}),NX=$n.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 wn extends dt{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return wn.valid(r)?new wn(r):dt.near(r)}content(){return Ve.empty}eq(e){return e instanceof wn&&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 wn(e.resolve(n.pos))}getBookmark(){return new L0(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!$X(e)||!LX(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&&wn.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 c=e.doc.resolve(o);if(wn.valid(c))return c}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!nt.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(wn.valid(a))return a}return null}}}wn.prototype.visible=!1,wn.findFrom=wn.findGapCursorFrom,dt.jsonID("gapcursor",wn);class L0{constructor(e){this.pos=e}map(e){return new L0(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return wn.valid(n)?new wn(n):dt.near(n)}}function AM(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function $X(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||AM(o.type))return!0;if(o.inlineContent)return!1}}return!0}function LX(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||AM(o.type))return!0;if(o.inlineContent)return!1}}return!0}function FX(){return new bn({props:{decorations:zX,createSelectionBetween(t,e,n){return e.pos==n.pos&&wn.valid(n)?new wn(n):null},handleClick:BX,handleKeyDown:RX,handleDOMEvents:{beforeinput:VX}}})}const RX=ib({ArrowLeft:Xp("horiz",-1),ArrowRight:Xp("horiz",1),ArrowUp:Xp("vert",-1),ArrowDown:Xp("vert",1)});function Xp(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,c=s.empty;if(s instanceof ot){if(!i.endOfTextblock(n)||a.depth==0)return!1;c=!1,a=r.doc.resolve(e>0?a.after():a.before())}let u=wn.findGapCursorFrom(a,e,c);return u?(o&&o(r.tr.setSelection(new wn(u))),!0):!1}}function BX(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!wn.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&nt.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new wn(r))),!0)}function VX(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof wn))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=Me.empty;for(let s=r.length-1;s>=0;s--)o=Me.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new Ve(o,0,0));return i.setSelection(ot.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function zX(t){if(!(t.selection instanceof wn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ln.create(t.doc,[Zn.widget(t.selection.head,e,{key:"gapcursor"})])}const HX=$n.create({name:"gapCursor",addProseMirrorPlugins(){return[FX()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=xt(Je(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),WX=vn.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",Dt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
402
|
-
`},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,c=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:f})=>{if(f&&c&&s){const p=c.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()}}}),jX=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,UX=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,qX=Ar.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",Dt(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[Ca({find:jX,type:this.type})]},addPasteRules(){return[Es({find:UX,type:this.type})]}});var Zp=200,Yn=function(){};Yn.prototype.append=function(e){return e.length?(e=Yn.from(e),!this.length&&e||e.length<Zp&&this.leafAppend(e)||this.length<Zp&&e.leafPrepend(this)||this.appendInner(e)):this},Yn.prototype.prepend=function(e){return e.length?Yn.from(e).append(this):this},Yn.prototype.appendInner=function(e){return new KX(this,e)},Yn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Yn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},Yn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Yn.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)},Yn.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},Yn.from=function(e){return e instanceof Yn?e:e&&e.length?new DM(e):Yn.empty};var DM=(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 c=i;c<s;c++)if(o(this.values[c],a+c)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,s,a){for(var c=i-1;c>=s;c--)if(o(this.values[c],a+c)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=Zp)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=Zp)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})(Yn);Yn.empty=new DM([]);var KX=(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})(Yn);const YX=500;class Vo{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,c,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 ci(p.map));let y=p.step.map(o.slice(i)),b;y&&s.maybeStep(y).doc&&(b=s.mapping.maps[s.mapping.maps.length-1],u.push(new ci(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,c=new Vo(this.items.slice(0,r).append(f.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:s,selection:a}}addTransform(e,n,r,o){let i=[],s=this.eventCount,a=this.items,c=!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 ci(e.mapping.maps[f],p,n),y;(y=c&&c.merge(m))&&(m=y,f?i.pop():a=a.slice(0,a.length-1)),i.push(m),n&&(s++,n=void 0),o||(c=m)}let u=s-r.depth;return u>JX&&(a=GX(a,u),s-=u),new Vo(a.append(i),s)}remapping(e,n){let r=new au;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 Vo(this.items.append(e.map(n=>new ci(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 c=n;this.items.forEach(m=>{let y=i.getMirror(--c);if(y==null)return;s=Math.min(s,y);let b=i.maps[y];if(m.step){let g=e.steps[y].invert(e.docs[y]),x=m.selection&&m.selection.map(i.slice(c+1,y));x&&a++,r.push(new ci(b,g,x))}else r.push(new ci(b))},o);let u=[];for(let m=n;m<s;m++)u.push(new ci(i.maps[m]));let f=this.items.slice(0,o).append(u).append(r),p=new Vo(f,a);return p.emptyItemCount()>YX&&(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 c=s.step.map(n.slice(r)),u=c&&c.getMap();if(r--,u&&n.appendMap(u,r),c){let f=s.selection&&s.selection.map(n.slice(r));f&&i++;let p=new ci(u.invert(),c,f),m,y=o.length-1;(m=o.length&&o[y].merge(p))?o[y]=m:o.push(p)}}else s.map&&r--},this.items.length,0),new Vo(Yn.from(o.reverse()),i)}}Vo.empty=new Vo(Yn.empty,0);function GX(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class ci{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 ci(n.getMap().invert(),n,this.selection)}}}class Os{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const JX=20;function XX(t,e,n,r){let o=n.getMeta(Ma),i;if(o)return o.historyState;n.getMeta(eZ)&&(t=new Os(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(Ma))return s.getMeta(Ma).redo?new Os(t.done.addTransform(n,void 0,r,Qp(e)),t.undone,IM(n.mapping.maps),t.prevTime,t.prevComposition):new Os(t.done,t.undone.addTransform(n,void 0,r,Qp(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),c=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!ZX(n,t.prevRanges)),u=s?F0(t.prevRanges,n.mapping):IM(n.mapping.maps);return new Os(t.done.addTransform(n,c?e.selection.getBookmark():void 0,r,Qp(e)),Vo.empty,u,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Os(t.done.rebased(n,i),t.undone.rebased(n,i),F0(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Os(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),F0(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function ZX(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 IM(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 F0(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 QX(t,e,n){let r=Qp(e),o=Ma.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),c=new Os(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(s).setMeta(Ma,{redo:n,historyState:c})}let R0=!1,PM=null;function Qp(t){let e=t.plugins;if(PM!=e){R0=!1,PM=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){R0=!0;break}}return R0}const Ma=new Nn("history"),eZ=new Nn("closeHistory");function tZ(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new bn({key:Ma,state:{init(){return new Os(Vo.empty,Vo.empty,null,0,-1)},apply(e,n,r){return XX(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?$M:r=="historyRedo"?LM:null;return!o||!e.editable?!1:(n.preventDefault(),o(e.state,e.dispatch))}}}})}function NM(t,e){return(n,r)=>{let o=Ma.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=QX(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const $M=NM(!1,!0),LM=NM(!0,!0),nZ=$n.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>$M(t,e),redo:()=>({state:t,dispatch:e})=>LM(t,e)}},addProseMirrorPlugins(){return[tZ(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()}}}),rZ=vn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Dt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!I7(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}):h_(n)?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:s,dispatch:a})=>{var c;if(a){const{$to:u}=s.selection,f=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?s.setSelection(ot.create(s.doc,u.pos+1)):u.nodeAfter.isBlock?s.setSelection(nt.create(s.doc,u.pos)):s.setSelection(ot.create(s.doc,u.pos));else{const p=(c=u.parent.type.contentMatch.defaultType)===null||c===void 0?void 0:c.create();p&&(s.insert(f,p),s.setSelection(ot.create(s.doc,f+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[y_({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),oZ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,iZ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,sZ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,aZ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,lZ=Ar.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",Dt(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[Ca({find:oZ,type:this.type}),Ca({find:sZ,type:this.type})]},addPasteRules(){return[Es({find:iZ,type:this.type}),Es({find:aZ,type:this.type})]}}),cZ="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",uZ="ελ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",B0="numeric",V0="ascii",z0="alpha",Bu="asciinumeric",Vu="alphanumeric",H0="domain",FM="emoji",dZ="scheme",fZ="slashscheme",W0="whitespace";function pZ(t,e){return t in e||(e[t]=[]),e[t]}function Aa(t,e,n){e[B0]&&(e[Bu]=!0,e[Vu]=!0),e[V0]&&(e[Bu]=!0,e[z0]=!0),e[Bu]&&(e[Vu]=!0),e[z0]&&(e[Vu]=!0),e[Vu]&&(e[H0]=!0),e[FM]&&(e[H0]=!0);for(const r in e){const o=pZ(r,n);o.indexOf(t)<0&&o.push(t)}}function hZ(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Dr(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Dr.groups={},Dr.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||Dr.groups;let o;return e&&e.j?o=e:(o=new Dr(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||Dr.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 Dr,Object.assign(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Dr,i){if(r)if(s.t&&typeof s.t=="string"){const c=Object.assign(hZ(s.t,r),n);Aa(i,c,r)}else n&&Aa(i,n,r);s.t=i}return o.j[t]=s,s}};const St=(t,e,n,r,o)=>t.ta(e,n,r,o),Cn=(t,e,n,r,o)=>t.tr(e,n,r,o),RM=(t,e,n,r,o)=>t.ts(e,n,r,o),Le=(t,e,n,r,o)=>t.tt(e,n,r,o),Bi="WORD",j0="UWORD",BM="ASCIINUMERICAL",VM="ALPHANUMERICAL",zu="LOCALHOST",U0="TLD",q0="UTLD",eh="SCHEME",Yl="SLASH_SCHEME",K0="NUM",Y0="WS",G0="NL",Hu="OPENBRACE",Wu="CLOSEBRACE",th="OPENBRACKET",nh="CLOSEBRACKET",rh="OPENPAREN",oh="CLOSEPAREN",ih="OPENANGLEBRACKET",sh="CLOSEANGLEBRACKET",ah="FULLWIDTHLEFTPAREN",lh="FULLWIDTHRIGHTPAREN",ch="LEFTCORNERBRACKET",uh="RIGHTCORNERBRACKET",dh="LEFTWHITECORNERBRACKET",fh="RIGHTWHITECORNERBRACKET",ph="FULLWIDTHLESSTHAN",hh="FULLWIDTHGREATERTHAN",mh="AMPERSAND",gh="APOSTROPHE",yh="ASTERISK",Ms="AT",bh="BACKSLASH",vh="BACKTICK",xh="CARET",As="COLON",J0="COMMA",Sh="DOLLAR",ui="DOT",wh="EQUALS",X0="EXCLAMATION",wo="HYPHEN",ju="PERCENT",Ch="PIPE",Th="PLUS",kh="POUND",Uu="QUERY",Z0="QUOTE",zM="FULLWIDTHMIDDLEDOT",Q0="SEMI",di="SLASH",qu="TILDE",Eh="UNDERSCORE",HM="EMOJI",_h="SYM";var WM=Object.freeze({__proto__:null,ALPHANUMERICAL:VM,AMPERSAND:mh,APOSTROPHE:gh,ASCIINUMERICAL:BM,ASTERISK:yh,AT:Ms,BACKSLASH:bh,BACKTICK:vh,CARET:xh,CLOSEANGLEBRACKET:sh,CLOSEBRACE:Wu,CLOSEBRACKET:nh,CLOSEPAREN:oh,COLON:As,COMMA:J0,DOLLAR:Sh,DOT:ui,EMOJI:HM,EQUALS:wh,EXCLAMATION:X0,FULLWIDTHGREATERTHAN:hh,FULLWIDTHLEFTPAREN:ah,FULLWIDTHLESSTHAN:ph,FULLWIDTHMIDDLEDOT:zM,FULLWIDTHRIGHTPAREN:lh,HYPHEN:wo,LEFTCORNERBRACKET:ch,LEFTWHITECORNERBRACKET:dh,LOCALHOST:zu,NL:G0,NUM:K0,OPENANGLEBRACKET:ih,OPENBRACE:Hu,OPENBRACKET:th,OPENPAREN:rh,PERCENT:ju,PIPE:Ch,PLUS:Th,POUND:kh,QUERY:Uu,QUOTE:Z0,RIGHTCORNERBRACKET:uh,RIGHTWHITECORNERBRACKET:fh,SCHEME:eh,SEMI:Q0,SLASH:di,SLASH_SCHEME:Yl,SYM:_h,TILDE:qu,TLD:U0,UNDERSCORE:Eh,UTLD:q0,UWORD:j0,WORD:Bi,WS:Y0});const Vi=/[a-z]/,Ku=new RegExp("\\p{L}","u"),ev=new RegExp("\\p{Emoji}","u"),zi=/\d/,tv=/\s/,jM="\r",nv=`
|
|
403
|
-
`,mZ="️",gZ="",rv="";let Oh=null,Mh=null;function yZ(t=[]){const e={};Dr.groups=e;const n=new Dr;Oh==null&&(Oh=qM(cZ)),Mh==null&&(Mh=qM(uZ)),Le(n,"'",gh),Le(n,"{",Hu),Le(n,"}",Wu),Le(n,"[",th),Le(n,"]",nh),Le(n,"(",rh),Le(n,")",oh),Le(n,"<",ih),Le(n,">",sh),Le(n,"(",ah),Le(n,")",lh),Le(n,"「",ch),Le(n,"」",uh),Le(n,"『",dh),Le(n,"』",fh),Le(n,"<",ph),Le(n,">",hh),Le(n,"&",mh),Le(n,"*",yh),Le(n,"@",Ms),Le(n,"`",vh),Le(n,"^",xh),Le(n,":",As),Le(n,",",J0),Le(n,"$",Sh),Le(n,".",ui),Le(n,"=",wh),Le(n,"!",X0),Le(n,"-",wo),Le(n,"%",ju),Le(n,"|",Ch),Le(n,"+",Th),Le(n,"#",kh),Le(n,"?",Uu),Le(n,'"',Z0),Le(n,"/",di),Le(n,";",Q0),Le(n,"~",qu),Le(n,"_",Eh),Le(n,"\\",bh),Le(n,"・",zM);const r=Cn(n,zi,K0,{[B0]:!0});Cn(r,zi,r);const o=Cn(r,Vi,BM,{[Bu]:!0}),i=Cn(r,Ku,VM,{[Vu]:!0}),s=Cn(n,Vi,Bi,{[V0]:!0});Cn(s,zi,o),Cn(s,Vi,s),Cn(o,zi,o),Cn(o,Vi,o);const a=Cn(n,Ku,j0,{[z0]:!0});Cn(a,Vi),Cn(a,zi,i),Cn(a,Ku,a),Cn(i,zi,i),Cn(i,Vi),Cn(i,Ku,i);const c=Le(n,nv,G0,{[W0]:!0}),u=Le(n,jM,Y0,{[W0]:!0}),f=Cn(n,tv,Y0,{[W0]:!0});Le(n,rv,f),Le(u,nv,c),Le(u,rv,f),Cn(u,tv,f),Le(f,jM),Le(f,nv),Cn(f,tv,f),Le(f,rv,f);const p=Cn(n,ev,HM,{[FM]:!0});Le(p,"#"),Cn(p,ev,p),Le(p,mZ,p);const m=Le(p,gZ);Le(m,"#"),Cn(m,ev,p);const y=[[Vi,s],[zi,o]],b=[[Vi,null],[Ku,a],[zi,i]];for(let g=0;g<Oh.length;g++)Ds(n,Oh[g],U0,Bi,y);for(let g=0;g<Mh.length;g++)Ds(n,Mh[g],q0,j0,b);Aa(U0,{tld:!0,ascii:!0},e),Aa(q0,{utld:!0,alpha:!0},e),Ds(n,"file",eh,Bi,y),Ds(n,"mailto",eh,Bi,y),Ds(n,"http",Yl,Bi,y),Ds(n,"https",Yl,Bi,y),Ds(n,"ftp",Yl,Bi,y),Ds(n,"ftps",Yl,Bi,y),Aa(eh,{scheme:!0,ascii:!0},e),Aa(Yl,{slashscheme:!0,ascii:!0},e),t=t.sort((g,x)=>g[0]>x[0]?1:-1);for(let g=0;g<t.length;g++){const x=t[g][0],E=t[g][1]?{[dZ]:!0}:{[fZ]:!0};x.indexOf("-")>=0?E[H0]=!0:Vi.test(x)?zi.test(x)?E[Bu]=!0:E[V0]=!0:E[B0]=!0,RM(n,x,x,E)}return RM(n,"localhost",zu,{ascii:!0}),n.jd=new Dr(_h),{start:n,tokens:Object.assign({groups:e},WM)}}function UM(t,e){const n=bZ(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s<r;){let a=t,c=null,u=0,f=null,p=-1,m=-1;for(;s<r&&(c=a.go(n[s]));)a=c,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 bZ(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 Ds(t,e,n,r,o){let i;const s=e.length;for(let a=0;a<s-1;a++){const c=e[a];t.j[c]?i=t.j[c]:(i=new Dr(r),i.jr=o.slice(),t.j[c]=i),t=i}return i=new Dr(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function qM(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 Yu={defaultProtocol:"http",events:null,format:KM,formatHref:KM,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ov(t,e=null){let n=Object.assign({},Yu);t&&(n=Object.assign(n,t instanceof ov?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}ov.prototype={o:Yu,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]:Yu[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 KM(t){return t}function YM(t,e){this.t="token",this.v=t,this.tk=e}YM.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=Yu.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),c=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),c&&(s.target=c),u&&(s.rel=u),f&&Object.assign(s,f),{tagName:o,attributes:s,content:i,eventListeners:p}}};function Ah(t,e){class n extends YM{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 GM=Ah("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),JM=Ah("text"),vZ=Ah("nl"),Dh=Ah("url",{isLink:!0,toHref(t=Yu.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==zu&&t[1].t===As}}),Co=t=>new Dr(t);function xZ({groups:t}){const e=t.domain.concat([mh,yh,Ms,bh,vh,xh,Sh,wh,wo,K0,ju,Ch,Th,kh,di,_h,qu,Eh]),n=[gh,As,J0,ui,X0,ju,Uu,Z0,Q0,ih,sh,Hu,Wu,nh,th,rh,oh,ah,lh,ch,uh,dh,fh,ph,hh],r=[mh,gh,yh,bh,vh,xh,Sh,wh,wo,Hu,Wu,ju,Ch,Th,kh,Uu,di,_h,qu,Eh],o=Co(),i=Le(o,qu);St(i,r,i),St(i,t.domain,i);const s=Co(),a=Co(),c=Co();St(o,t.domain,s),St(o,t.scheme,a),St(o,t.slashscheme,c),St(s,r,i),St(s,t.domain,s);const u=Le(s,Ms);Le(i,Ms,u),Le(a,Ms,u),Le(c,Ms,u);const f=Le(i,ui);St(f,r,i),St(f,t.domain,i);const p=Co();St(u,t.domain,p),St(p,t.domain,p);const m=Le(p,ui);St(m,t.domain,p);const y=Co(GM);St(m,t.tld,y),St(m,t.utld,y),Le(u,zu,y);const b=Le(p,wo);Le(b,wo,b),St(b,t.domain,p),St(y,t.domain,p),Le(y,ui,m),Le(y,wo,b);const g=Le(y,As);St(g,t.numeric,GM);const x=Le(s,wo),w=Le(s,ui);Le(x,wo,x),St(x,t.domain,s),St(w,r,i),St(w,t.domain,s);const E=Co(Dh);St(w,t.tld,E),St(w,t.utld,E),St(E,t.domain,s),St(E,r,i),Le(E,ui,w),Le(E,wo,x),Le(E,Ms,u);const T=Le(E,As),C=Co(Dh);St(T,t.numeric,C);const k=Co(Dh),M=Co();St(k,e,k),St(k,n,M),St(M,e,k),St(M,n,M),Le(E,di,k),Le(C,di,k);const A=Le(a,As),I=Le(c,As),L=Le(I,di),O=Le(L,di);St(a,t.domain,s),Le(a,ui,w),Le(a,wo,x),St(c,t.domain,s),Le(c,ui,w),Le(c,wo,x),St(A,t.domain,k),Le(A,di,k),Le(A,Uu,k),St(O,t.domain,k),St(O,e,k),Le(O,di,k);const N=[[Hu,Wu],[th,nh],[rh,oh],[ih,sh],[ah,lh],[ch,uh],[dh,fh],[ph,hh]];for(let $=0;$<N.length;$++){const[V,z]=N[$],F=Le(k,V);Le(M,V,F),Le(F,z,k);const B=Co(Dh);St(F,e,B);const W=Co();St(F,n),St(B,e,B),St(B,n,W),St(W,e,B),St(W,n,W),Le(B,z,k),Le(W,z,k)}return Le(o,zu,E),Le(o,G0,vZ),{start:o,tokens:WM}}function SZ(t,e,n){let r=n.length,o=0,i=[],s=[];for(;o<r;){let a=t,c=null,u=null,f=0,p=null,m=-1;for(;o<r&&!(c=a.go(n[o].t));)s.push(n[o++]);for(;o<r&&(u=c||a.go(n[o].t));)c=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(iv(JM,e,s)),s=[]),o-=m,f-=m;const y=p.t,b=n.slice(o-f,o);i.push(iv(y,e,b))}}return s.length>0&&i.push(iv(JM,e,s)),i}function iv(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 wZ=typeof console<"u"&&console&&console.warn||(()=>{}),CZ="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",on={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function TZ(){return Dr.groups={},on.scanner=null,on.parser=null,on.tokenQueue=[],on.pluginQueue=[],on.customSchemes=[],on.initialized=!1,on}function XM(t,e=!1){if(on.initialized&&wZ(`linkifyjs: already initialized - will not register custom scheme "${t}" ${CZ}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
404
|
-
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
405
|
-
2. Cannot start or end with "-"
|
|
406
|
-
3. "-" cannot repeat`);on.customSchemes.push([t,e])}function kZ(){on.scanner=yZ(on.customSchemes);for(let t=0;t<on.tokenQueue.length;t++)on.tokenQueue[t][1]({scanner:on.scanner});on.parser=xZ(on.scanner.tokens);for(let t=0;t<on.pluginQueue.length;t++)on.pluginQueue[t][1]({scanner:on.scanner,parser:on.parser});return on.initialized=!0,on}function sv(t){return on.initialized||kZ(),SZ(on.parser.start,t,UM(on.scanner.start,t))}sv.scan=UM;function ZM(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 ov(n),o=sv(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 av="[\0- -\u2029 ]",EZ=new RegExp(av),_Z=new RegExp(`${av}$`),OZ=new RegExp(av,"g");function MZ(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function AZ(t){return new bn({key:new Nn("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=n7(n.doc,[...e]);if(l7(a).forEach(({newRange:u})=>{const f=o7(r.doc,u,y=>y.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 y=r.doc.textBetween(u.from,u.to," "," ");if(!_Z.test(y))return;p=f[0],m=r.doc.textBetween(p.pos,u.to,void 0," ")}if(p&&m){const y=m.split(EZ).filter(Boolean);if(y.length<=0)return!1;const b=y[y.length-1],g=p.pos+m.lastIndexOf(b);if(!b)return!1;const x=sv(b).map(w=>w.toObject(t.defaultProtocol));if(!MZ(x))return!1;x.filter(w=>w.isLink).map(w=>({...w,from:g+w.start+1,to:g+w.end+1})).filter(w=>r.schema.marks.code?!r.doc.rangeHasMark(w.from,w.to,r.schema.marks.code):!0).filter(w=>t.validate(w.value)).filter(w=>t.shouldAutoLink(w.value)).forEach(w=>{vb(w.from,w.to,r.doc).some(E=>E.mark.type===t.type)||s.addMark(w.from,w.to,t.type.create({href:w.href}))})}}),!!s.steps.length)return s}})}function DZ(t){return new bn({key:new Nn("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 c=bb(e.state,t.type.name),u=r.target,f=(o=u==null?void 0:u.href)!==null&&o!==void 0?o:c.href,p=(i=u==null?void 0:u.target)!==null&&i!==void 0?i:c.target;return u&&f?(window.open(f,p),!0):!1}}})}function IZ(t){return new bn({key:new Nn("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 c=ZM(a,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!c?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function Da(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(OZ,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const PZ=Ar.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"){XM(t);return}XM(t.scheme,t.optionalSlashes)})},onDestroy(){TZ()},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)=>!!Da(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=>!!Da(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=>!!Da(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Dt(this.options.HTMLAttributes,t),0]:["a",Dt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Da(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=>!!Da(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[Es({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=ZM(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!Da(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(AZ({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Da(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(DZ({type:this.type})),this.options.linkOnPaste&&t.push(IZ({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),NZ=vn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Dt(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 $Z(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:a}=t,c=r&&!o,u=P7(n),f=new RegExp(`\\s${u}$`),p=s?"^":"",m=o?"":u,y=c?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 g=a.pos-b.length,x=Array.from(b.matchAll(y)).pop();if(!x||x.input===void 0||x.index===void 0)return null;const w=x.input.slice(Math.max(0,x.index-1),x.index),E=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(w);if(i!==null&&!E)return null;const T=g+x.index;let C=T+x[0].length;return c&&f.test(b.slice(C-1,C+1))&&(x[0]+=" ",C+=1),T<a.pos&&C>=a.pos?{range:{from:T,to:C},query:x[0].slice(n.length),text:x[0]}:null}const LZ=new Nn("suggestion");function FZ({pluginKey:t=LZ,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:c="suggestion",decorationContent:u="",decorationEmptyClass:f="is-empty",command:p=()=>null,items:m=()=>[],render:y=()=>({}),allow:b=()=>!0,findSuggestionMatch:g=$Z}){let x;const w=y==null?void 0:y(),E=new bn({key:t,view(){return{update:async(T,C)=>{var k,M,A,I,L,O,N;const $=(k=this.key)===null||k===void 0?void 0:k.getState(C),V=(M=this.key)===null||M===void 0?void 0:M.getState(T.state),z=$.active&&V.active&&$.range.from!==V.range.from,F=!$.active&&V.active,B=$.active&&!V.active,W=!F&&!B&&$.query!==V.query,Y=F||z&&W,X=W||z,K=B||z&&W;if(!Y&&!X&&!K)return;const Q=K&&!Y?$:V,ve=T.dom.querySelector(`[data-decoration-id="${Q.decorationId}"]`);x={editor:e,range:Q.range,query:Q.query,text:Q.text,items:[],command:xe=>p({editor:e,range:Q.range,props:xe}),decorationNode:ve,clientRect:ve?()=>{var xe;const{decorationId:ye}=(xe=this.key)===null||xe===void 0?void 0:xe.getState(e.state),oe=T.dom.querySelector(`[data-decoration-id="${ye}"]`);return(oe==null?void 0:oe.getBoundingClientRect())||null}:null},Y&&((A=w==null?void 0:w.onBeforeStart)===null||A===void 0||A.call(w,x)),X&&((I=w==null?void 0:w.onBeforeUpdate)===null||I===void 0||I.call(w,x)),(X||Y)&&(x.items=await m({editor:e,query:Q.query})),K&&((L=w==null?void 0:w.onExit)===null||L===void 0||L.call(w,x)),X&&((O=w==null?void 0:w.onUpdate)===null||O===void 0||O.call(w,x)),Y&&((N=w==null?void 0:w.onStart)===null||N===void 0||N.call(w,x))},destroy:()=>{var T;x&&((T=w==null?void 0:w.onExit)===null||T===void 0||T.call(w,x))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(T,C,k,M){const{isEditable:A}=e,{composing:I}=e.view,{selection:L}=T,{empty:O,from:N}=L,$={...C};if($.composing=I,A&&(O||e.view.composing)){(N<C.range.from||N>C.range.to)&&!I&&!C.composing&&($.active=!1);const V=g({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:L.$from}),z=`id_${Math.floor(Math.random()*4294967295)}`;V&&b({editor:e,state:M,range:V.range,isActive:C.active})?($.active=!0,$.decorationId=C.decorationId?C.decorationId:z,$.range=V.range,$.query=V.query,$.text=V.text):$.active=!1}else $.active=!1;return $.active||($.decorationId=null,$.range={from:0,to:0},$.query=null,$.text=null),$}},props:{handleKeyDown(T,C){var k;const{active:M,range:A}=E.getState(T.state);return M&&((k=w==null?void 0:w.onKeyDown)===null||k===void 0?void 0:k.call(w,{view:T,event:C,range:A}))||!1},decorations(T){const{active:C,range:k,decorationId:M,query:A}=E.getState(T);if(!C)return null;const I=!(A!=null&&A.length),L=[c];return I&&L.push(f),ln.create(T.doc,[Zn.inline(k.from,k.to,{nodeName:a,class:L.join(" "),"data-decoration-id":M,"data-decoration-content":u})])}}});return E}function RZ({editor:t,overrideSuggestionOptions:e,extensionName:n,char:r="@"}){const o=new Nn;return{editor:t,char:r,pluginKey:o,command:({editor:i,range:s,props:a})=>{var c,u,f;const p=i.view.state.selection.$to.nodeAfter;((c=p==null?void 0:p.text)===null||c===void 0?void 0:c.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),c=i.schema.nodes[n];return!!a.parent.type.contentMatch.matchType(c)},...e}}function QM(t){return(t.options.suggestions.length?t.options.suggestions:[t.options.suggestion]).map(e=>RZ({editor:t.editor,overrideSuggestionOptions:e,extensionName:t.name,char:e.char}))}function eA(t,e){const n=QM(t),r=n.find(o=>o.char===e);return r||(n.length?n[0]:null)}const BZ=vn.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",Dt(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=eA(this,t.attrs.mentionSuggestionChar);if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",Dt({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t,suggestion:n})];const r={...this.options};r.HTMLAttributes=Dt({"data-type":this.name},this.options.HTMLAttributes,e);const o=this.options.renderHTML({options:r,node:t,suggestion:n});return typeof o=="string"?["span",Dt({"data-type":this.name},this.options.HTMLAttributes,e),o]:o},renderText({node:t}){const e={options:this.options,node:t,suggestion:eA(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,(c,u)=>{if(c.type.name===this.name)return n=!0,t.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",u,u+c.nodeSize),!1});let s=new Ai,a=0;return e.doc.nodesBetween(i-1,i,(c,u)=>{if(c.type.name===this.name)return n=!0,s=c,a=u,!1}),n&&t.insertText(this.options.deleteTriggerWithBackspace?"":s.attrs.mentionSuggestionChar,a,a+s.nodeSize),n})}},addProseMirrorPlugins(){return QM(this).map(FZ)}}),VZ="listItem",tA="textStyle",nA=/^(\d+)\.\s$/,zZ=vn.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",Dt(this.options.HTMLAttributes,n),0]:["ol",Dt(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(VZ,this.editor.getAttributes(tA)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Vl({find:nA,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=Vl({find:nA,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(tA)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),HZ=vn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Dt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),WZ=$n.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new bn({key:new Nn("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 c=r>=a&&r<=a+s.nodeSize,u=!s.isLeaf&&Cp(s);if((c||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];i&&f.push(this.options.emptyEditorClass);const p=Zn.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:c}):this.options.placeholder});o.push(p)}return this.options.includeChildren}),ln.create(t,o)}}})]}}),jZ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,UZ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,qZ=Ar.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",Dt(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[Ca({find:jZ,type:this.type})]},addPasteRules(){return[Es({find:UZ,type:this.type})]}}),KZ=Ar.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",Dt(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()}}}),YZ=Ar.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",Dt(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()}}}),GZ=vn.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",Dt(this.options.HTMLAttributes,t),0]}}),JZ=vn.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",Dt(this.options.HTMLAttributes,t),0]}}),XZ=vn.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Dt(this.options.HTMLAttributes,t),0]}}),ZZ=/^\s*(\[([( |x])?\])\s$/,QZ=vn.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",Dt(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"),c=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 y=n();if(typeof y!="number")return!1;const b=m.doc.nodeAt(y);return m.setNodeMarkup(y,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,c),Object.entries(e).forEach(([f,p])=>{o.setAttribute(f,p)}),{dom:o,contentDOM:c,update:f=>f.type!==this.type?!1:(o.dataset.checked=f.attrs.checked,a.checked=f.attrs.checked,u(),!0)}}},addInputRules(){return[Vl({find:ZZ,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),eQ=vn.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",Dt(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()}}}),tQ=vn.create({name:"text",group:"inline"}),nQ=$n.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")}}}),rQ=Ar.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",Dt(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()}}}),rA=J.forwardRef((t,e)=>{const[n,r]=J.useState(0),o=c=>{if(c>=t.items.length)return;const u=t.items[c],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 J.useEffect(()=>r(0),[t.items]),J.useImperativeHandle(e,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(i(),!0):c.key==="ArrowDown"?(s(),!0):c.key==="Enter"?(a(),!0):!1})),t.items.length>0?v.jsx(j.Paper,{elevation:5,children:v.jsx(j.List,{dense:!0,sx:{overflow:"hidden"},children:t.items.map((c,u)=>v.jsx(j.ListItem,{disablePadding:!0,children:v.jsx(j.ListItemButton,{selected:u===n,onClick:()=>o(u),children:c.mentionLabel})},c.id))})}):null});rA.displayName="SuggestionList";const oA={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0,toJSON(){return{}}},oQ={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 BO(rA,{props:n,editor:n.editor}),e=$u("body",{getReferenceClientRect:()=>{var r;return((r=n.clientRect)==null?void 0:r.call(n))??oA},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))??oA}})},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}}}},iQ=PZ.extend({inclusive:!1}),sQ=KZ.extend({excludes:"superscript"}),aQ=YZ.extend({excludes:"subscript"});function lQ({placeholder:t}={}){return J.useMemo(()=>[AJ.configure({resizable:!0}),XZ,JZ,GZ,xX,EX,AX,WX,NZ,zZ,HZ,sQ,aQ,tQ,bX,pX,CX,lZ,rQ,qZ,iQ.configure({autolink:!0,linkOnPaste:!0,openOnClick:!1}),hG,HX,fG,nQ.configure({types:["heading","paragraph","image"]}),OX,MX,NX,lY,qX.configure({multicolor:!0}),rZ,MG,PX,eQ,QZ.configure({nested:!0}),BZ.configure({suggestion:oQ}),WZ.configure({placeholder:t}),nZ],[t])}function iA(t){return Array.from(t).filter(e=>(e.type||"").toLowerCase().startsWith("image/"))}const cQ=t=>{const e=lQ({placeholder:"Add your own content here..."});if(t.renderContentOnly)return v.jsx(lX,{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:c,getValues:u}=dn();J.useEffect(()=>{var g,x,w;(w=(x=(g=f==null?void 0:f.current)==null?void 0:g.editor)==null?void 0:x.commands)==null||w.setContent(u(n))},[u(n)]);const f=J.useRef(null),p=J.useCallback((g,x)=>{var E;const w=(E=f.current)==null?void 0:E.editor;if(w)if(i instanceof Promise)i(g).then(T=>{qb({images:T,editor:w,position:x})});else{const T=i(g);qb({images:T,editor:w,position:x})}},[]),m=J.useCallback((g,x,w,E)=>{var C;if(!(x instanceof DragEvent)||!x.dataTransfer)return!1;const T=iA(x.dataTransfer.files);if(T.length>0){const k=(C=g.posAtCoords({left:x.clientX,top:x.clientY}))==null?void 0:C.pos;return p(T,k),x.preventDefault(),!0}return!1},[p]),y=J.useCallback((g,x,w)=>{if(!x.clipboardData)return!1;const E=iA(x.clipboardData.files);return E.length>0?(p(E),!0):!1},[p]),b=v.jsx(j.Box,{sx:{"& .ProseMirror":{"& h1, & h2, & h3, & h4, & h5, & h6":{scrollMarginTop:s?0:50}}},children:v.jsx(ir,{name:n,control:a,render:({field:g})=>v.jsx(sX,{...g,ref:f,extensions:e,content:u(n),editable:!s,editorProps:{handleDrop:m,handlePaste:y},renderControls:s?void 0:()=>v.jsx(dX,{onUploadFiles:i}),onBlur:()=>{var x,w;return c(n,((w=(x=f.current)==null?void 0:x.editor)==null?void 0:w.getHTML())??"",{shouldValidate:!0})},RichTextFieldProps:{variant:"outlined",MenuBarProps:{hide:s}},children:()=>v.jsxs(v.Fragment,{children:[v.jsx(YJ,{}),v.jsx(uX,{})]})})})});return v.jsxs(j.Box,{display:"flex",flexDirection:"column",children:[r&&v.jsx(j.Typography,{...o,children:r}),b]})},sA=()=>({height:window.innerHeight,width:window.innerWidth}),aA=()=>{const[t,e]=J.useState(sA());return J.useEffect(()=>{const n=()=>{e(sA())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t},lv=t=>{const{name:e="button",color:n="primary",fullWidthOnMobile:r=!0,type:o="button",variant:i="contained"}=t,{width:s}=aA(),a=["locationInBar","closeDialog","fullWidthOnMobile"],c=r&&s<600;return v.jsx(j.Button,{role:"button",name:e,color:n,variant:i,type:o,fullWidth:t.fullWidth?!0:c,...eo({...t},a)})},uQ=t=>{const{name:e="submit"}=t;return v.jsx(lv,{name:e,type:"submit",...t})},dQ=t=>{const{label:e="Return to Top",icon:n=RS,scrollThresholdPx:r=100}=t,o=j.useScrollTrigger({threshold:r}),i=J.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]);return v.jsx(j.Zoom,{in:o,children:v.jsx(j.Box,{sx:{position:"fixed",bottom:32,right:32,zIndex:1},children:v.jsxs(j.Fab,{onClick:i,color:"primary",size:"small",variant:"extended","aria-label":"Scroll back to top",children:[v.jsx(n,{fontSize:"medium"}),e]})})})},fQ=()=>{const{getValues:t,formState:{errors:e,isSubmitSuccessful:n}}=dn(),{palette:r}=j.useTheme();return v.jsx(j.Paper,{style:{backgroundColor:r.mode==="dark"?"#303030":"#f0f0f0",margin:"10px 0"},children:v.jsxs(j.List,{children:[v.jsxs(j.ListItem,{children:[v.jsx(j.Typography,{display:"block",variant:"h6",children:"Values"}),v.jsx("br",{}),v.jsx(j.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(t(),null,2)})]}),v.jsx(j.Divider,{variant:"inset",component:"li"}),v.jsxs(j.ListItem,{id:"testing",children:[v.jsx(j.Typography,{display:"block",variant:"h6",children:"Errors"}),v.jsx("br",{}),v.jsx(j.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(e,null,2)})]}),v.jsxs(j.ListItem,{children:[v.jsx(j.Typography,{display:"block",variant:"h6",children:"Status"}),v.jsx("br",{}),v.jsx(j.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(n,null,2)})]})]})})},pQ=t=>{const{steps:e,orientation:n,inlineLabel:r=n=="vertical",isResponsive:o=!1}=t,{width:i}=aA();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 c=["steps","inlineLabel","orientation","isResponsive"],u={alternativeLabel:s,orientation:a,...eo({...t},c)};return v.jsx(j.Stepper,{...u,children:e.map(f=>v.jsx(j.Step,{children:v.jsx(j.StepLabel,{children:f})},f))})},hQ=t=>{const{name:e,label:n=ar(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(wF,{}):"Remove",variant:c="card",addButtonSx:u,removeButtonSx:f,allowRemoveAll:p=!1,readOnly:m=!1,emptyListMsg:y="None",showDivider:b=!1,removePosition:g="bottom"}=t,{control:x,getValues:w}=dn(),{fields:E,append:T,remove:C}=pP({control:x,name:e}),k=M=>({display:"flex",flexDirection:M==="bottom"?"column":"row",alignItems:M==="bottom"?"flex-start":"center"});return v.jsxs(j.FormControl,{fullWidth:!0,children:[v.jsx(j.Typography,{...r,children:n}),m&&w(e).length===0?v.jsx(j.Typography,{children:y}):v.jsxs("div",{children:[E.map((M,A)=>v.jsx(J.Fragment,{children:v.jsx(mQ,{variant:c,content:v.jsxs(j.Box,{"data-testid":"form-group-container",sx:typeof g=="string"?k(g):{...g},children:[v.jsxs(j.Box,{width:"100%",children:[i(`${e}.${A}`,A),b&&A!==E.length-1&&v.jsx(j.Divider,{"data-testid":"divider"})]}),!m&&E.length>(p?0:1)&&v.jsx(j.Button,{"data-testid":"repeatable-form-group_remove-btn",sx:f,onClick:()=>C(A),children:a})]})})},M.id)),!m&&v.jsx(j.Button,{"data-testid":"repeatable-form-group_add-btn",onClick:()=>T(o),sx:u,children:s})]})]})},mQ=({variant:t,content:e})=>{switch(t){case"card":return v.jsx(j.Card,{"data-testid":"repeatable-form-group_card",sx:{padding:"8px",marginBottom:"8px"},children:v.jsx(j.CardContent,{children:e})});case"elevatedCard":return v.jsx(j.Card,{"data-testid":"repeatable-form-group_elevated-card",elevation:4,sx:{border:"unset",padding:"8px",marginBottom:"8px"},children:v.jsx(j.CardContent,{children:e})});case"none":return e}},lA=(t,e,n)=>{if(t&&"reportValidity"in t){const r=Re(n,e);t.setCustomValidity(r&&r.message||""),t.reportValidity()}},cA=(t,e)=>{for(const n in e.fields){const r=e.fields[n];r&&r.ref&&"reportValidity"in r.ref?lA(r.ref,n,t):r&&r.refs&&r.refs.forEach(o=>lA(o,n,t))}},gQ=(t,e)=>{e.shouldUseNativeValidation&&cA(t,e);const n={};for(const r in t){const o=Re(e.fields,r),i=Object.assign(t[r]||{},{ref:o&&o.ref});if(yQ(e.names||Object.keys(t),r)){const s=Object.assign({},Re(n,r));Nt(s,"root",i),Nt(n,r,s)}else Nt(n,r,i)}return n},yQ=(t,e)=>{const n=uA(e);return t.some(r=>uA(r).match(`^${n}\\.\\d+`))};function uA(t){return t.replace(/\]|\[/g,"")}function bQ(t,e,n){return n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve((function(s,a){try{var c=(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&&cA({},i),{values:n.raw?Object.assign({},r):u,errors:{}}}))}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c})(0,function(s){if(!s.inner)throw s;return{values:{},errors:gQ((a=s,c=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),c){var p=u[f.path].types,m=p&&p[f.type];u[f.path]=B1(f.path,c,u,f.type,m?[].concat(m,f.message):f.message)}return u},{})),i)};var a,c}))}catch(s){return Promise.reject(s)}}}var cv,dA;function vQ(){if(dA)return cv;dA=1;function t(w){this._maxSize=w,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(w){return this._values[w]},t.prototype.set=function(w,E){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=E};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,a=new t(s),c=new t(s),u=new t(s);cv={Cache:t,split:p,normalizePath:f,setter:function(w){var E=f(w);return c.get(w)||c.set(w,function(C,k){for(var M=0,A=E.length,I=C;M<A-1;){var L=E[M];if(L==="__proto__"||L==="constructor"||L==="prototype")return C;I=I[E[M++]]}I[E[M]]=k})},getter:function(w,E){var T=f(w);return u.get(w)||u.set(w,function(k){for(var M=0,A=T.length;M<A;)if(k!=null||!E)k=k[T[M++]];else return;return k})},join:function(w){return w.reduce(function(E,T){return E+(y(T)||n.test(T)?"["+T+"]":(E?".":"")+T)},"")},forEach:function(w,E,T){m(Array.isArray(w)?w:p(w),E,T)}};function f(w){return a.get(w)||a.set(w,p(w).map(function(E){return E.replace(i,"$2")}))}function p(w){return w.match(e)||[""]}function m(w,E,T){var C=w.length,k,M,A,I;for(M=0;M<C;M++)k=w[M],k&&(x(k)&&(k='"'+k+'"'),I=y(k),A=!I&&/^\d+$/.test(k),E.call(T,k,I,A,M,w))}function y(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function b(w){return w.match(r)&&!w.match(n)}function g(w){return o.test(w)}function x(w){return!y(w)&&(b(w)||g(w))}return cv}var Ia=vQ(),uv,fA;function xQ(){if(fA)return uv;fA=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 uv={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(" ")},uv}var dv=xQ(),Ih={exports:{}},pA;function SQ(){if(pA)return Ih.exports;pA=1,Ih.exports=function(o){return t(e(o),o)},Ih.exports.array=t;function t(o,i){var s=o.length,a=new Array(s),c={},u=s,f=n(i),p=r(o);for(i.forEach(function(y){if(!p.has(y[0])||!p.has(y[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)c[u]||m(o[u],u,new Set);return a;function m(y,b,g){if(g.has(y)){var x;try{x=", node was:"+JSON.stringify(y)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!p.has(y))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(y));if(!c[b]){c[b]=!0;var w=f.get(y)||new Set;if(w=Array.from(w),b=w.length){g.add(y);do{var E=w[--b];m(E,p.get(E),g)}while(b);g.delete(y)}a[--s]=y}}}function e(o){for(var i=new Set,s=0,a=o.length;s<a;s++){var c=o[s];i.add(c[0]),i.add(c[1])}return Array.from(i)}function n(o){for(var i=new Map,s=0,a=o.length;s<a;s++){var c=o[s];i.has(c[0])||i.set(c[0],new Set),i.has(c[1])||i.set(c[1],new Set),i.get(c[0]).add(c[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 Ih.exports}var wQ=SQ();const CQ=Rr(wQ),TQ=Object.prototype.toString,kQ=Error.prototype.toString,EQ=RegExp.prototype.toString,_Q=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",OQ=/^Symbol\((.*)\)(.*)$/;function MQ(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function hA(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const n=typeof t;if(n==="number")return MQ(t);if(n==="string")return e?`"${t}"`:t;if(n==="function")return"[Function "+(t.name||"anonymous")+"]";if(n==="symbol")return _Q.call(t).replace(OQ,"Symbol($1)");const r=TQ.call(t).slice(8,-1);return r==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):r==="Error"||t instanceof Error?"["+kQ.call(t)+"]":r==="RegExp"?EQ.call(t):null}function Is(t,e){let n=hA(t,e);return n!==null?n:JSON.stringify(t,function(r,o){let i=hA(this[r],e);return i!==null?i:o},2)}function mA(t){return t==null?[]:[].concat(t)}let gA,yA,bA,AQ=/\$\{\s*(\w+)\s*\}/g;gA=Symbol.toStringTag;class vA{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[gA]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],mA(e).forEach(i=>{if(xr.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]}}yA=Symbol.hasInstance,bA=Symbol.toStringTag;class xr 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(AQ,(o,i)=>Is(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 vA(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[bA]="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,xr)}static[yA](e){return vA[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Hi={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 \`${Is(r,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${Is(n,!0)}\``+o:`${t} must match the configured type. The validated value was: \`${Is(n,!0)}\``+o}},DQ={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"},IQ={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"},fv={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},PQ={isValue:"${path} field must be ${value}"},Ph={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Hi,string:DQ,number:IQ,date:fv,object:Ph,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:PQ,tuple:{notType:t=>{const{path:e,value:n,spec:r}=t,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${e} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${Is(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: \`${Is(n,!0)}\``}return xr.formatError(Hi.notType,t)}}});const pv=t=>t&&t.__isYupSchema__;class Nh{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(c=>c===r);return new Nh(e,(a,c)=>{var u;let f=s(...a)?o:i;return(u=f==null?void 0:f(c))!=null?u:c})}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(!pv(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const $h={context:"$",value:"."};class Pa{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]===$h.context,this.isValue=this.key[0]===$h.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?$h.context:this.isValue?$h.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ia.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}}Pa.prototype.__isYupRef=!0;const xA=t=>t==null;function Gl(t){function e({value:n,path:r="",options:o,originalValue:i,schema:s},a,c){const{name:u,test:f,params:p,message:m,skipAbsent:y}=t;let{parent:b,context:g,abortEarly:x=s.spec.abortEarly,disableStackTrace:w=s.spec.disableStackTrace}=o;const E={value:n,parent:b,context:g};function T(N={}){const $=SA(Object.assign({value:n,originalValue:i,label:s.spec.label,path:N.path||r,spec:s.spec,disableStackTrace:N.disableStackTrace||w},p,N.params),E),V=new xr(xr.formatError(N.message||m,$),n,$.path,N.type||u,$.disableStackTrace);return V.params=$,V}const C=x?a:c;let k={path:r,parent:b,type:u,from:o.from,createError:T,resolve(N){return wA(N,E)},options:o,originalValue:i,schema:s};const M=N=>{xr.isError(N)?C(N):N?c(null):C(T())},A=N=>{xr.isError(N)?C(N):a(N)};if(y&&xA(n))return M(!0);let L;try{var O;if(L=f.call(k,n,k),typeof((O=L)==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(L).then(M,A)}}catch(N){A(N);return}M(L)}return e.OPTIONS=t,e}function SA(t,e){if(!t)return t;for(const n of Object.keys(t))t[n]=wA(t[n],e);return t}function wA(t,e){return Pa.isRef(t)?t.getValue(e.value,e.parent,e.context):t}function NQ(t,e,n,r=n){let o,i,s;return e?(Ia.forEach(e,(a,c,u)=>{let f=c?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=c?"["+a+"]":"."+a}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}class Lh extends Set{describe(){const e=[];for(const n of this.values())e.push(Pa.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 Lh(this.values())}merge(e,n){const r=this.clone();return e.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Jl(t,e=new Map){if(pv(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]=Jl(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,Jl(o,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const r of t)n.add(Jl(r,e))}else if(t instanceof Object){n={},e.set(t,n);for(const[r,o]of Object.entries(t))n[r]=Jl(o,e)}else throw Error(`Unable to clone ${t}`);return n}function $Q(t){if(!(t!=null&&t.length))return;const e=[];let n="",r=!1,o=!1;for(let i=0;i<t.length;i++){const s=t[i];if(s==="["&&!o){n&&(e.push(...n.split(".").filter(Boolean)),n=""),r=!0;continue}if(s==="]"&&!o){n&&(/^\d+$/.test(n)?e.push(n):e.push(n.replace(/^"|"$/g,"")),n=""),r=!1;continue}if(s==='"'){o=!o;continue}if(s==="."&&!r&&!o){n&&(e.push(n),n="");continue}n+=s}return n&&e.push(...n.split(".").filter(Boolean)),e}function LQ(t,e){const n=e?`${e}.${t.path}`:t.path;return t.errors.map(r=>({message:r,path:$Q(n)}))}function CA(t,e){var n;if(!((n=t.inner)!=null&&n.length)&&t.errors.length)return LQ(t,e);const r=e?`${e}.${t.path}`:t.path;return t.inner.flatMap(o=>CA(o,r))}class Wi{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 Lh,this._blacklist=new Lh,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Hi.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=Jl(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({},n,{value:e})),o=n.assert==="ignore-optionality",i=r._cast(e,n);if(n.assert!==!1&&!r.isType(i)){if(o&&xA(i))return i;let s=Is(e),a=Is(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
|
|
407
|
-
|
|
408
|
-
attempted value: ${s}
|
|
409
|
-
`+(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,n),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,c=e;a||(c=this._cast(c,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:i,value:c,originalValue:s,options:n,tests:u},r,f=>{if(f.length)return o(f,c);this.runTests({path:i,value:c,originalValue:s,options:n,tests:this.tests},r,o)})}runTests(e,n,r){let o=!1,{tests:i,value:s,originalValue:a,path:c,options:u}=e,f=g=>{o||(o=!0,n(g,s))},p=g=>{o||(o=!0,r(g,s))},m=i.length,y=[];if(!m)return p([]);let b={value:s,originalValue:a,path:c,options:u,schema:this};for(let g=0;g<i.length;g++){const x=i[g];x(b,f,function(E){E&&(Array.isArray(E)?y.push(...E):y.push(E)),--m<=0&&p(y)})}}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 c=typeof a=="number";let u=r[a];const f=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:i[a],key:void 0,[c?"index":"key"]:a,path:c||a.includes(".")?`${o||""}[${c?a:`"${a}"`}]`:(o?`${o}.`:"")+e});return(p,m,y)=>this.resolve(f)._validate(u,f,m,y)}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,(c,u)=>{xr.isError(c)&&(c.value=u),a(c)},(c,u)=>{c.length?a(new xr(c,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,c)=>{throw xr.isError(a)&&(a.value=c),a},(a,c)=>{if(a.length)throw new xr(a,e,void 0,void 0,s);i=c}),i}isValid(e,n){return this.validate(e,n).then(()=>!0,r=>{if(xr.isError(r))return!1;throw r})}isValidSync(e,n){try{return this.validateSync(e,n),!0}catch(r){if(xr.isError(r))return!1;throw r}}_getDefault(e){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,e):Jl(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=Gl({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=Gl({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(e=Hi.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Hi.notNull){return this.nullability(!1,e)}required(e=Hi.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=Hi.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Gl(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=mA(e).map(i=>new Pa(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new Nh(o,n):Nh.fromOptions(o,n)),r}typeError(e){let n=this.clone();return n.internalTests.typeError=Gl({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=Hi.oneOf){let r=this.clone();return e.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Gl({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=Hi.notOneOf){let r=this.clone();return e.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Gl({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.filter((c,u,f)=>f.findIndex(p=>p.OPTIONS.name===c.OPTIONS.name)===u).map(c=>{const u=c.OPTIONS.params&&e?SA(Object.assign({},c.OPTIONS.params),e):c.OPTIONS.params;return{name:c.OPTIONS.name,params:u}})}}get"~standard"(){const e=this;return{version:1,vendor:"yup",async validate(r){try{return{value:await e.validate(r,{abortEarly:!1})}}catch(o){if(o instanceof xr)return{issues:CA(o)};throw o}}}}}Wi.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])Wi.prototype[`${t}At`]=function(e,n,r={}){const{parent:o,parentPath:i,schema:s}=NQ(this,e,n,r.context);return s[t](o&&o[i],Object.assign({},r,{parent:o,path:e}))};for(const t of["equals","is"])Wi.prototype[t]=Wi.prototype.oneOf;for(const t of["not","nope"])Wi.prototype[t]=Wi.prototype.notOneOf;const FQ=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function RQ(t){const e=BQ(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 BQ(t){var e,n;const r=FQ.exec(t);return r?{year:ji(r[1]),month:ji(r[2],1)-1,day:ji(r[3],1),hour:ji(r[4]),minute:ji(r[5]),second:ji(r[6]),millisecond:r[7]?ji(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:ji(r[10]),minuteOffset:ji(r[11])}:null}function ji(t,e=0){return Number(t)||e}let VQ=new Date(""),zQ=t=>Object.prototype.toString.call(t)==="[object Date]";class hv extends Wi{constructor(){super({type:"date",check(e){return zQ(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,n)=>!this.spec.coerce||this.isType(e)||e===null?e:(e=RQ(e),isNaN(e)?hv.INVALID_DATE:new Date(e)))})}prepareParam(e,n){let r;if(Pa.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=fv.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=fv.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)}})}}hv.INVALID_DATE=VQ;function HQ(t,e=[]){let n=[],r=new Set,o=new Set(e.map(([s,a])=>`${s}-${a}`));function i(s,a){let c=Ia.split(s)[0];r.add(c),o.has(`${a}-${c}`)||n.push([a,c])}for(const s of Object.keys(t)){let a=t[s];r.add(s),Pa.isRef(a)&&a.isSibling?i(a.path,s):pv(a)&&"deps"in a&&a.deps.forEach(c=>i(c,s))}return CQ.array(Array.from(r),n).reverse()}function TA(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 kA(t){return(e,n)=>TA(t,e)-TA(t,n)}const WQ=(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 Fh(t){if("fields"in t){const e={};for(const[n,r]of Object.entries(t.fields))e[n]=Fh(r);return t.setFields(e)}if(t.type==="array"){const e=t.optional();return e.innerType&&(e.innerType=Fh(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(Fh)}):"optional"in t?t.optional():t}const jQ=(t,e)=>{const n=[...Ia.normalizePath(e)];if(n.length===1)return n[0]in t;let r=n.pop(),o=Ia.getter(Ia.join(n),!0)(t);return!!(o&&r in o)};let EA=t=>Object.prototype.toString.call(t)==="[object Object]";function _A(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter(r=>n.indexOf(r)===-1)}const UQ=kA([]);function OA(t){return new MA(t)}class MA extends Wi{constructor(e){super({type:"object",check(n){return EA(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=UQ,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))),c={},u=Object.assign({},n,{parent:c,__validating:n.__validating||!1}),f=!1;for(const p of a){let m=i[p],y=p in o,b=o[p];if(m){let g;u.path=(n.path?`${n.path}.`:"")+p,m=m.resolve({value:b,context:n.context,parent:c});let x=m instanceof Wi?m.spec:void 0,w=x==null?void 0:x.strict;if(x!=null&&x.strip){f=f||p in o;continue}g=!n.__validating||!w?m.cast(b,u):b,g!==void 0&&(c[p]=g)}else y&&!s&&(c[p]=b);(y!==p in c||c[p]!==b)&&(f=!0)}return f?c: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,(c,u)=>{if(!a||!EA(u)){o(c,u);return}s=s||u;let f=[];for(let p of this._nodes){let m=this.fields[p];!m||Pa.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(c),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=HQ(e,n),r._sortErrors=kA(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 Fh(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=Ia.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return jQ(i,e)&&(s=Object.assign({},i),r||delete s[e],s[n]=o(i)),s})}json(){return this.transform(WQ)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Ph.exact,test(n){if(n==null)return!0;const r=_A(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,n=Ph.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=_A(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=e,r}unknown(e=!0,n=Ph.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(dv.camelCase)}snakeCase(){return this.transformKeys(dv.snakeCase)}constantCase(){return this.transformKeys(e=>dv.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}}OA.prototype=MA.prototype;const qQ=D.createContext(null);function KQ(t){var e;return((e=t==null?void 0:t.response)==null?void 0:e.status)===422}function YQ(t){return t&&t[0].toLowerCase()+t.slice(1)}function GQ(t,e,n=!0){if(!e)return;let r=n;for(const[o,i]of Object.entries(e)){const s=YQ(o);t(s,{type:"server",message:i},{shouldFocus:r}),r=!1}}function JQ({initialValues:t,onSubmit:e,children:n,initialErrors:r,validationSchema:o=OA({}),shouldValidateOption:i=!0,shouldDirtyOption:s=!0,validationOnMount:a=!1,enableReinitialize:c=!1,applyAxios422Errors:u=!0,submitRef:f}){const p=nx({defaultValues:t,resolver:bQ(o),mode:"onChange",errors:r}),m=fc({control:p.control}),y=J.useCallback((T,C)=>{p.setValue(T,C,{shouldValidate:i,shouldDirty:s})},[p,i,s]),b=J.useCallback((T,C=!0)=>GQ(p.setError,T,C),[p.setError]),g=async T=>{try{await e(T)}catch(C){if(u&&KQ(C)){b(C.response.data,!0);return}throw C}},x=J.useMemo(()=>p.handleSubmit(g),[p.handleSubmit,g]);J.useLayoutEffect(()=>{if(!(!f||!("current"in f)))return f.current=x,()=>{f.current=null}},[f,x]),J.useEffect(()=>{a&&p.trigger(),c&&p.reset(t)},[a,c,t,p]);const w=J.useMemo(()=>{const T=Object.create(p);return T.setValue=y,T},[p,y]),E=J.useMemo(()=>({applyServerErrors:b}),[b]);return v.jsx(F1,{...p,children:v.jsx(qQ.Provider,{value:E,children:v.jsx("form",{onSubmit:p.handleSubmit(g),children:typeof n=="function"?n({values:m,setValue:y,methods:w}):n})})})}function XQ(){const t=dn();if(!t)throw new Error("useMyForm must be used inside a FormProvider (MForm / MForm2 / MFormProvider2).");return t}function ZQ(t){var e;return((e=t==null?void 0:t.response)==null?void 0:e.status)===422}function QQ(t){return t&&t[0].toLowerCase()+t.slice(1)}function AA(t,e,n=!0){if(!e)return;let r=n;for(const[o,i]of Object.entries(e)){const s=QQ(o);t(s,{type:"server",message:i},{shouldFocus:r}),r=!1}}const eee=t=>{var n;if(!ZQ(t))return{ok:!1};const e=(n=t==null?void 0:t.response)==null?void 0:n.data;return e&&typeof e=="object"?{ok:!0,errors:e}:{ok:!1}},DA=D.createContext(null);function tee(){const t=D.useContext(DA);if(!t)throw new Error("useMForm2 must be used within <MFormProvider2> / <MForm2>.");return t}function IA(t){const{methods:e,onSubmit:n,onInvalid:r,validateOnMount:o=!1,applyAxios422Errors:i=!0,mapAxios422:s=eee,submitRef:a,children:c}=t,u=D.useCallback(async m=>{try{await n(m)}catch(y){if(i){const b=s(y);if(b.ok){AA(e.setError,b.errors,!0);return}}throw y}},[n,i,s,e.setError]),f=D.useCallback(async()=>{await e.handleSubmit(u,r)()},[e,u,r]);D.useLayoutEffect(()=>{if(!(!a||!("current"in a)))return a.current=f,()=>{a.current=null}},[a,f]),D.useEffect(()=>{o&&e.trigger()},[o,e]);const p=D.useMemo(()=>({submit:f,methods:e,applyServerErrors:(m,y=!0)=>AA(e.setError,m,y)}),[f,e]);return v.jsx(F1,{...e,children:v.jsx(DA.Provider,{value:p,children:typeof c=="function"?c({methods:e,submit:f}):c})})}function nee(t){return v.jsx(IA,{...t,methods:t.methods})}function ree(t){const e=nx({defaultValues:t.defaultValues,resolver:t.resolver,shouldFocusError:t.shouldFocusError,mode:"onChange",...t.useFormProps||void 0});return D.useEffect(()=>{t.reinitializeKey!==void 0&&e.reset(t.defaultValues,t.resetOptions)},[t.reinitializeKey]),v.jsx(IA,{...t,methods:e})}function PA(t){return"methods"in t?v.jsx(nee,{...t}):v.jsx(ree,{...t})}function oee(t){const{formId:e,className:n,style:r,children:o,...i}=t;return v.jsx(PA,{...i,children:({methods:s,submit:a})=>v.jsx("form",{id:e,className:n,style:r,noValidate:!0,onSubmit:c=>{c.preventDefault(),a()},children:typeof o=="function"?o({methods:s,submit:a}):o})})}const mv=t=>{const{open:e=!1,onClose:n,title:r,children:o,actions:i,closeBtnLabel:s="Cancel",closeButtonPosition:a="bottom",closeButtonProps:c={color:"primary",variant:"text"},disableDismiss:u=!1,...f}=t;if(!e)return null;const p=()=>{if(a!=="top")return v.jsx(j.Button,{className:"MBv2_Modal_Close",onClick:t.onClose,...c,children:s})},m=()=>i?v.jsx(j.DialogActions,{className:"MBv2_Modal_Actions",children:v.jsxs(j.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",gap:"0.25rem",children:[v.jsx(j.Box,{children:p()}),v.jsxs(j.Box,{display:"flex",gap:".25rem",children:[...i]})]})}):v.jsx(j.DialogActions,{className:"MBv2_Modal_Actions",children:v.jsx(j.Box,{children:p()})});return v.jsxs(j.Dialog,{className:"MBv2_Modal",open:e,onClose:()=>{u||n==null||n()},...f,children:[typeof r=="string"?v.jsx(j.DialogTitle,{className:"MBv2_Modal_Title",children:v.jsxs(j.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[r,a!=="bottom"&&v.jsx(j.IconButton,{"data-testid":"modal-header-close-btn",onClick:n,children:v.jsx(YL,{})})]})}):r,o&&(typeof o=="string"?v.jsx(j.DialogContent,{className:"MBv2_Modal_Content",children:v.jsx(j.DialogContentText,{className:"MBv2_Modal_Content_Text",children:o})}):o),m()]})},iee=t=>{const{confirmBtnLabel:e,onConfirm:n,confirmButtonProps:r={color:"primary",variant:"contained"},closeButtonProps:o={},...i}=t;return v.jsx(mv,{actions:[v.jsx(j.Button,{className:"MBv2_ConfirmationModal_ConfirmBtn",onClick:n,...r,children:e})],...i})},see=t=>{const{closeBtnLabel:e="OK",closeButtonProps:n={color:"primary",variant:"contained"}}=t;return v.jsx(mv,{closeBtnLabel:e,closeButtonProps:n,...t})},aee=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(mv,{actions:[v.jsx(j.Button,{className:"MBv2_DecisionModal_SecondaryAction",onClick:i,...s,children:o}),v.jsx(j.Button,{className:"MBv2_DecisionModal_PrimaryAction",onClick:n,...r,children:e})],...a})},gv=t=>{const{title:e="Loading...",message:n}=t;return v.jsxs(j.Box,{className:"loading-page",sx:{gap:2},"data-testid":"loading-page",children:[v.jsxs(j.Box,{className:"text-content",children:[v.jsx(j.Typography,{variant:"h1","data-testid":"title",children:e}),n&&v.jsx(j.Typography,{"data-testid":"message",children:n})]}),v.jsx(j.CircularProgress,{size:75,"data-testid":"loading-spinner"})]})},NA=t=>{const{colSpan:e,isExpanded:n,renderExpand:r,obj:o,asMobileCard:i=!1}=t,[s,a]=J.useState(!1),[c,u]=J.useState(void 0);return J.useEffect(()=>{n&&!s&&(a(!0),u(r(o)))},[n]),i?v.jsx(j.Box,{children:v.jsx(j.Collapse,{in:n,children:c})}):v.jsx(j.TableRow,{children:v.jsx(j.TableCell,{style:{paddingBottom:0,paddingTop:0},colSpan:e,children:v.jsx(j.Collapse,{in:n,children:c})})})},$A=t=>{const{id:e,getRowKey:n=q=>"id"in q&&(typeof q.id=="string"||typeof q.id=="number")?q.id:(console.warn(`Table: "id: string | number" not found in ${JSON.stringify(q)}. Please implement the Table.getRowKey prop so Table knows how to uniquely identify this row.`),JSON.stringify(q)),columns:r,data:o=[],onRowClick:i,renderExpand:s,hideColumnsOnMobile:a=[],sortField:c,sortOrder:u,onSortChange:f,allowSortCols:p,fixedLayout:m=!1,className:y,emptyTableMsg:b="No items to display",errorTableMsg:g,retryCallback:x,isLoading:w=!1,disableMobileCards:E=!1,highlightSelectedRow:T=!1,headerRowStyle:C={},stickyHeader:k,...M}=t,{palette:A}=j.useTheme(),[I,L]=J.useState(void 0),[O,N]=J.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 $=q=>{q!==c?f&&f(q,"asc"):f&&f(c,u==="asc"?"desc":"asc")},V=q=>c===q?u:null,z=j.useMediaQuery(j.useTheme().breakpoints.down("sm")),F=z&&a?r.filter(q=>!a.includes(q.fieldName)):r,B=(q,ee)=>ee.split(".").reduce((se,be)=>{if(se&&typeof se=="object")return se[be]},q),W=(q,ee)=>{const se=B(ee,q.fieldName);return q.render?q.render(se,ee,z):se},Y=f!==void 0,X=q=>Y?p?p.includes(q):!0:!1,K=v.jsxs(j.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:[v.jsx(hF,{})," ",b]}),Q=v.jsxs(j.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:[v.jsx(PS,{})," ",g,x&&v.jsx(j.Button,{variant:"text",onClick:x,children:"Retry?"})]}),ve=()=>{if(w)return v.jsx(j.TableRow,{children:v.jsx(j.TableCell,{colSpan:r.length,align:"center",children:v.jsx(j.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:v.jsx(gv,{})})})});if(g)return v.jsx(j.TableRow,{children:v.jsx(j.TableCell,{colSpan:r.length,align:"center",children:Q})});if(o.length===0)return v.jsx(j.TableRow,{children:v.jsx(j.TableCell,{colSpan:r.length,align:"center",children:K})})},xe=()=>{if(w)return v.jsx(gv,{});if(g)return Q;if(o.length===0)return K},ye=q=>{T&&N(q)},oe=q=>{if(i&&(i(q),ye(q)),s){const ee=I===q?void 0:q;L(ee),ye(ee)}},ce=typeof T=="string"?T:A.grey[A.mode=="dark"?600:50],fe=q=>{const ee=O===n(q)?ce:"inherit";return{cursor:i||s?"pointer":"default",backgroundColor:ee,...i&&{"&:hover":{backgroundColor:ee===ce?cz(ee,.1):ce}}}};return z&&!E?v.jsxs("div",{...e?{id:`mobile-table-${e}`}:{},className:y,"data-testid":"mui-table-mobile",children:[Y&&v.jsxs(v.Fragment,{children:[v.jsxs(j.Box,{display:"flex",className:"MBv2_Table_Stack_Sort",children:[v.jsx(j.TextField,{select:!0,sx:{flexGrow:1},id:"demo-simple-select",size:"small",value:c??"",label:"Sort By...",onChange:q=>$(q.target.value),fullWidth:!0,children:F.map(q=>{if(X(q.fieldName))return v.jsx(j.MenuItem,{value:q.sortName??q.fieldName,children:q.label??ar(q.fieldName)},`${q.key??"rowHeader"}-${q.fieldName}`)})}),v.jsx(j.IconButton,{onClick:()=>{c&&$(c)},children:v.jsx(TF,{className:`sort-icon-${u}`})})]}),v.jsx(j.Divider,{sx:{margin:"10px 0"}})]}),xe()??o.map(q=>v.jsxs(j.Card,{className:"MBv2_Table_Stack_Container",sx:{margin:"5px 0",padding:"5px",...fe(q)},onClick:()=>oe(n(q)),"data-testid":`card-${n(q)}`,children:[v.jsx("table",{className:"MBv2_Table_Stack",children:v.jsx("tbody",{className:"MBv2_Table_Stack_Body",children:F.map(ee=>v.jsxs("tr",{className:"MBv2_Table_Stack_Row",children:[v.jsx("td",{className:`MBv2_Table_Stack_Cell_Label MBv2_Table_Stack_Col_${ee.fieldName}`,children:ee.label??ar(ee.fieldName)}),v.jsx("td",{className:`MBv2_Table_Stack_Cell_Value MBv2_Table_Stack_Val_${ee.fieldName}`,style:{paddingLeft:"10px"},children:W(ee,q)})]},`${ee.key??"row"}-${n(q)}-${ee.fieldName}`))})}),s&&v.jsx(NA,{colSpan:r.length,isExpanded:n(q)===I,obj:q,renderExpand:ee=>s(ee),asMobileCard:!0})]},n(q)))]}):v.jsx(j.TableContainer,{component:j.Card,"data-testid":"mui-table",...e?{id:`table-${e}`}:{},className:y,style:k?{maxHeight:k,overflow:"auto"}:{},children:v.jsxs(j.Table,{stickyHeader:k!=="undefined",style:{tableLayout:m?"fixed":"auto"},className:"MBv2_Table",sx:C?{"& .MuiTableCell-head":{...C}}:{},...M,children:[v.jsx(j.TableHead,{className:"MBv2_Table_Head",children:v.jsx(j.TableRow,{className:"MBv2_Table_Head_Row",children:F.map((q,ee)=>{const se=X(q.fieldName);return v.jsx(j.TableCell,{width:Array.isArray(m)?m[ee]:"auto",children:v.jsx(j.Box,{style:{display:"flex",alignItems:"center"},children:v.jsxs(j.Box,{sx:[se&&{"&:hover":{cursor:"pointer",backgroundColor:A.mode==="dark"?"#222222":"#ededed",borderRadius:2}}],style:{display:"flex",alignItems:"center",padding:"5px",paddingLeft:"6px",marginLeft:"-6px"},onClick:se?()=>$(q.sortName??q.fieldName):void 0,children:[v.jsx("strong",{className:"MBv2_Table_Col_Label",style:{wordBreak:"normal"},children:q.label??ar(q.fieldName)}),se&&V(q.fieldName)==="asc"&&v.jsx(RS,{style:{marginLeft:"5px"}}),se&&V(q.fieldName)==="desc"&&v.jsx(mF,{style:{marginLeft:"5px"}}),se&&V(q.fieldName)!=="asc"&&V(q.fieldName)!=="desc"&&v.jsx(SF,{style:{marginLeft:"5px"}})]})})},`${q.key??"rowHeader"}-${q.fieldName}`)})})}),v.jsx(j.TableBody,{className:"MBv2_Table_Body",children:ve()??o.map(q=>v.jsxs(J.Fragment,{children:[v.jsx(j.TableRow,{"data-testid":`row-${n(q)}`,className:"MBv2_Table_Body_Row",onClick:()=>oe(n(q)),sx:fe(q),children:F.map(ee=>v.jsx(j.TableCell,{className:`MBv2_Table_Body_Cell MBv2_Table_Body_Col_${ee.fieldName}`,children:W(ee,q)},`${ee.key??"row"}-${n(q)}-${ee.fieldName}`))}),s&&v.jsx(NA,{colSpan:r.length,isExpanded:n(q)===I,obj:q,renderExpand:ee=>s(ee)})]},n(q)))})]})})},lee=t=>{const{paginationState:e,onPageChange:n,onRowsPerPageChange:r,hidePaginationControls:o=!1,rowsPerPageOptions:i=[5,10,25],...s}=t,{pageNo:a,pageSize:c,totalCount:u,sortField:f,sortOrder:p}=e,m=x=>{n(x)},y=x=>{r(parseInt(x.target.value,10))},b=j.useMediaQuery(j.useTheme().breakpoints.down("sm")),g=!t.data||t.data&&t.data.length===0;return v.jsxs(j.Box,{children:[v.jsx($A,{sortOrder:p,sortField:f,...s}),!o&&!g&&v.jsx(j.TablePagination,{"data-testid":"pagination-controls",component:"div",rowsPerPageOptions:b?[]:i,count:u,rowsPerPage:c,page:a,onPageChange:(x,w)=>m(w),onRowsPerPageChange:y,sx:{flexGrow:1,marginRight:{xs:0,md:15}}})]})},cee=t=>{const{featureMenuOptions:e=[],copyright:n,logo:r,sx:o={},fontColor:i="primary"}=t,{palette:s}=j.useTheme(),a=Io.useNavigate();return v.jsxs(j.Box,{className:"MBv2_Footer",sx:{backgroundColor:s.mode==="dark"?"#222222":"#ededed",padding:"25px 30px",...o},children:[v.jsx(j.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(j.Box,{display:"flex",justifyContent:"space-between",flexWrap:"wrap",className:"MBv2_Footer_Nav_Links_Container",gap:2,children:[v.jsx(j.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(c=>v.jsx(j.Link,{"data-testid":c.label,sx:{cursor:"pointer",fontSize:15},color:i,...hc(c,a),children:c.label},c.label))}),n&&v.jsx(j.Typography,{style:{fontSize:15},"data-testid":"copyright",className:"MBv2_Footer_Copyright",color:i,children:n})]})]})},LA=t=>{const{menuOptionLists:e,anchor:n="left",children:r}=t,{pathname:o}=Io.useLocation(),i=Io.useNavigate(),[s,a]=J.useState(!1),c=(m,y)=>v.jsx(j.MenuList,{children:m.map(b=>v.jsxs(j.MenuItem,{...hc(b,i,()=>a(!1)),children:[b.icon&&v.jsx(j.ListItemIcon,{children:b.icon}),v.jsx(j.ListItemText,{primary:b.label})]},`mobile-drawer-group-${y}-item-${b.path}`))}),f=(()=>{if(e){const m=e.filter(y=>y&&y.length>0);return m.length===0?null:m.map((y,b)=>v.jsxs(J.Fragment,{children:[c(y,b),b<m.length-1&&v.jsx(j.Divider,{})]},`mobile-drawer-group-${b}`))}return r?v.jsx(j.Box,{role:"presentation",onClick:()=>a(!1),children:r}):null})(),p=f??!1;return J.useEffect(()=>{a(!1)},[o]),p&&v.jsxs(v.Fragment,{children:[v.jsx(j.IconButton,{onClick:()=>a(!0),color:"inherit",title:"Menu",children:v.jsx(yF,{})}),v.jsx(j.Drawer,{"data-testid":"mobile-drawer",anchor:n,open:s,onClose:()=>a(!1),children:v.jsx(j.Box,{sx:{width:300},display:"flex",flexDirection:"column",justifyContent:"space-between",children:v.jsx(j.Box,{display:"flex",justifyContent:"start",flexDirection:"column",children:f})})})]})},FA=t=>{const{env:e,isProd:n}=t;return n?null:v.jsx(j.Paper,{sx:{borderRadius:0,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs(j.Typography,{variant:"h6",color:"error",children:[e," Environment - Test Data Only"]})})},RA=t=>{const{label:e,menuOptions:n=[],icon:r}=t,o=Io.useNavigate(),[i,s]=D.useState(null),a=!!i,c=f=>{s(f.currentTarget)},u=()=>{s(null)};return n.length===0?null:v.jsxs(v.Fragment,{children:[v.jsx(j.Button,{startIcon:r,variant:"outlined",color:"inherit",sx:{minWidth:0,padding:1},onClick:c,children:e}),v.jsx(j.Menu,{anchorEl:i,open:a,onClick:u,children:n.map(f=>v.jsxs(j.MenuItem,{...hc(f,o),children:[f.icon&&v.jsx(j.ListItemIcon,{children:f.icon}),v.jsx(j.ListItemText,{primary:f.label})]},f.label))})]})},BA=t=>{const{displayName:e,userMenuOptions:n}=t;return v.jsx(RA,{label:e,menuOptions:n,icon:v.jsx(vF,{})})},Rh=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}=j.useTheme(),a=Io.useNavigate();return v.jsx(j.Tabs,{orientation:n,value:r??!1,sx:o,slotProps:i,children:e.map((c,u)=>v.jsx(j.Tab,{icon:c.icon,label:c.label,value:u,...hc(c,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"}}},c.label))})},VA=t=>{const{featureMenuOptions:e=[],activeTabIdx:n,sx:r}=t;return e.length>0&&v.jsx(j.Paper,{sx:{pl:4,pr:4,borderRadius:0},"data-testid":"navBar",children:v.jsx(Rh,{menuOptions:e,activeTabIdx:n,sx:r})})},zA=t=>{const{onToggle:e}=t,{palette:n}=j.useTheme(),r=n.mode==="dark";return v.jsx(j.IconButton,{onClick:e,color:"inherit",title:"Dark Mode Toggle",children:r?v.jsx(BS,{}):v.jsx(FS,{})})},uee=t=>{const{envInfo:e,headerRef:n,logo:r,featureMenuOptions:o=[],userMenuOptions:i=[],onToggleDarkMode:s,quickLinks:a=[],displayName:c,banner:u,position:f="fixed",children:p,sx:m,navBarSx:y}=t,b=Io.useNavigate(),g=j.useMediaQuery(j.useTheme().breakpoints.down("sm")),{palette:x}=j.useTheme(),{pathname:w}=Io.useLocation(),E=x.mode==="dark",[T,C]=D.useState(void 0);D.useEffect(()=>{const A=o.findIndex(I=>I.path&&w.startsWith(I.path));C(A>=0?A:void 0)},[w,o]);const k=s&&v.jsx(zA,{onToggle:s}),M=s&&(g||!g&&c)?[{icon:E?v.jsx(BS,{}):v.jsx(FS,{}),label:`Switch to ${E?"Light":"Dark"} mode`,onClick:s},...i]:i;return v.jsxs(j.AppBar,{ref:n,position:f,sx:m,elevation:4,children:[e&&v.jsx(FA,{...e}),u,v.jsxs(j.Toolbar,{sx:{color:"white",display:"flex",justifyContent:"space-between",gap:2},children:[v.jsx(j.Button,{disableRipple:!0,component:Io.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(j.Box,{display:"flex",gap:2,alignItems:"center",children:[!c&&!g&&k,g&&v.jsx(LA,{menuOptionLists:[o,a,M],anchor:"right"}),!g&&v.jsxs(v.Fragment,{children:[v.jsx(j.Box,{display:"flex",gap:0,children:a==null?void 0:a.map((A,I)=>v.jsxs(j.Box,{display:"flex",alignItems:"center",children:[I>0&&v.jsx(j.Typography,{className:"quickLink-divider",color:x.primary.contrastText,children:"|"}),v.jsx(j.Button,{variant:"text",sx:{color:"white"},...hc(A,b),children:v.jsxs(j.Box,{display:"flex",gap:"3px",alignItems:"center",children:[A.icon,A.label]})})]},A.label))}),p,c&&v.jsx(BA,{displayName:c,userMenuOptions:M})]})]})]}),!g&&v.jsx(VA,{featureMenuOptions:o,activeTabIdx:T,sx:y})]})},dee=t=>{const{sx:e,menuOptions:n=[]}=t,{pathname:r}=Io.useLocation(),o=j.useMediaQuery(j.useTheme().breakpoints.down("sm")),[i,s]=J.useState(void 0);return J.useEffect(()=>{const a=n.findIndex(c=>c.path&&r.startsWith(c.path))??-1;s(a>=0?a:void 0)},[r,n]),!o&&n.length>0&&v.jsx(j.Box,{sx:e,children:v.jsx(j.Card,{sx:{height:"100%",width:200},children:v.jsx(Rh,{orientation:"vertical",menuOptions:n,activeTabIdx:i})})})},fee=t=>{const{featureMenuOptions:e=[],activeTabIdx:n,sx:r}=t,{palette:o}=j.useTheme();return e.length>0&&v.jsx(Rh,{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}})},yv=R$({createStyledComponent:re("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.container&&e.container]}}),componentName:"MuiGrid2",useThemeProps:t=>vt({props:t,name:"MuiGrid2"}),useTheme:ro});if(process.env.NODE_ENV!=="production"&&(yv.propTypes={children:l.node,columns:l.oneOfType([l.arrayOf(l.number),l.number,l.object]),columnSpacing:l.oneOfType([l.arrayOf(l.oneOfType([l.number,l.string])),l.number,l.object,l.string]),container:l.bool,direction:l.oneOfType([l.oneOf(["column-reverse","column","row-reverse","row"]),l.arrayOf(l.oneOf(["column-reverse","column","row-reverse","row"])),l.object]),offset:l.oneOfType([l.string,l.number,l.arrayOf(l.oneOfType([l.string,l.number])),l.object]),rowSpacing:l.oneOfType([l.arrayOf(l.oneOfType([l.number,l.string])),l.number,l.object,l.string]),size:l.oneOfType([l.string,l.bool,l.number,l.arrayOf(l.oneOfType([l.string,l.bool,l.number])),l.object]),spacing:l.oneOfType([l.arrayOf(l.oneOfType([l.number,l.string])),l.number,l.object,l.string]),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),unstable_level:l.number,wrap:l.oneOf(["nowrap","wrap-reverse","wrap"])}),process.env.NODE_ENV!=="production"){const t=yv,e=PP("Grid2",t);t.propTypes={...t.propTypes,direction:e("container"),spacing:e("container"),wrap:e("container")}}function pee({size:t={xs:12},spacing:e=2,sm:n,...r}){return n&&(t={xs:12,sm:n}),v.jsx(yv,{size:t,spacing:e,...r,children:r.children})}function hee(t){const{title:e="Title Goes Here",sx:n={p:2},children:r,...o}=t;return v.jsxs(Ci,{sx:n,...o,children:[v.jsx(co,{variant:"h6",sx:{fontWeight:"bold"},gutterBottom:!0,children:e}),r]})}function mee(t){return v.jsx($b,{className:t.className,...t,spacing:2,children:t.children})}function gee(t){return Qe("MuiAlert",t)}const HA=Ge("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),yee=Be(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"),bee=Be(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),vee=Be(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"),xee=Be(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"),See=Be(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"),wee=t=>{const{variant:e,color:n,severity:r,classes:o}=t,i={root:["root",`color${$e(n||r)}`,`${e}${$e(n||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return Ze(i,gee,o)},Cee=re(Ci,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${$e(n.color||n.severity)}`]]}})(Tt(({theme:t})=>{const e=t.palette.mode==="light"?Xs:Qa,n=t.palette.mode==="light"?Qa:Xs;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(Wn(["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),[`& .${HA.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Wn(["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}`,[`& .${HA.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Wn(["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)}}}))]}})),Tee=re("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),kee=re("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Eee=re("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),WA={success:v.jsx(yee,{fontSize:"inherit"}),warning:v.jsx(bee,{fontSize:"inherit"}),error:v.jsx(vee,{fontSize:"inherit"}),info:v.jsx(xee,{fontSize:"inherit"})},jA=D.forwardRef(function(e,n){const r=vt({props:e,name:"MuiAlert"}),{action:o,children:i,className:s,closeText:a="Close",color:c,components:u={},componentsProps:f={},icon:p,iconMapping:m=WA,onClose:y,role:b="alert",severity:g="success",slotProps:x={},slots:w={},variant:E="standard",...T}=r,C={...r,color:c,severity:g,variant:E,colorSeverity:c||g},k=wee(C),M={slots:{closeButton:u.CloseButton,closeIcon:u.CloseIcon,...w},slotProps:{...f,...x}},[A,I]=Lt("root",{ref:n,shouldForwardComponentProp:!0,className:me(k.root,s),elementType:Cee,externalForwardedProps:{...M,...T},ownerState:C,additionalProps:{role:b,elevation:0}}),[L,O]=Lt("icon",{className:k.icon,elementType:Tee,externalForwardedProps:M,ownerState:C}),[N,$]=Lt("message",{className:k.message,elementType:kee,externalForwardedProps:M,ownerState:C}),[V,z]=Lt("action",{className:k.action,elementType:Eee,externalForwardedProps:M,ownerState:C}),[F,B]=Lt("closeButton",{elementType:gl,externalForwardedProps:M,ownerState:C}),[W,Y]=Lt("closeIcon",{elementType:See,externalForwardedProps:M,ownerState:C});return v.jsxs(A,{...I,children:[p!==!1?v.jsx(L,{...O,children:p||m[g]||WA[g]}):null,v.jsx(N,{...$,children:i}),o!=null?v.jsx(V,{...z,children:o}):null,o==null&&y?v.jsx(V,{...z,children:v.jsx(F,{size:"small","aria-label":a,title:a,color:"inherit",onClick:y,...B,children:v.jsx(W,{fontSize:"small",...Y})})}):null]})});process.env.NODE_ENV!=="production"&&(jA.propTypes={action:l.node,children:l.node,classes:l.object,className:l.string,closeText:l.string,color:l.oneOfType([l.oneOf(["error","info","success","warning"]),l.string]),components:l.shape({CloseButton:l.elementType,CloseIcon:l.elementType}),componentsProps:l.shape({closeButton:l.object,closeIcon:l.object}),icon:l.node,iconMapping:l.shape({error:l.node,info:l.node,success:l.node,warning:l.node}),onClose:l.func,role:l.string,severity:l.oneOfType([l.oneOf(["error","info","success","warning"]),l.string]),slotProps:l.shape({action:l.oneOfType([l.func,l.object]),closeButton:l.oneOfType([l.func,l.object]),closeIcon:l.oneOfType([l.func,l.object]),icon:l.oneOfType([l.func,l.object]),message:l.oneOfType([l.func,l.object]),root:l.oneOfType([l.func,l.object])}),slots:l.shape({action:l.elementType,closeButton:l.elementType,closeIcon:l.elementType,icon:l.elementType,message:l.elementType,root:l.elementType}),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),variant:l.oneOfType([l.oneOf(["filled","outlined","standard"]),l.string])});const Gu=t=>{var y;const{noIcon:e=!1,children:n,severity:r="success",variant:o="leftBorder",sx:i,title:s,...a}=t,{palette:c}=j.useTheme(),u=e?{icon:!1}:{},f=o==="leftBorder"?"standard":o,p=o==="leftBorder"?{...i,borderLeft:`4px solid ${(y=c[r])==null?void 0:y.main}`}:i,m=s?{icon:{sx:{mt:"6px"}}}:{};return v.jsxs(jA,{severity:r,variant:f,sx:p,slotProps:m,...u,...a,children:[s&&v.jsx(j.Typography,{variant:"h3",children:s}),n]})},_ee=t=>v.jsx(Gu,{severity:"success",...t}),Oee=t=>v.jsx(Gu,{severity:"info",...t}),Mee=t=>v.jsx(Gu,{severity:"warning",...t}),Aee=t=>v.jsx(Gu,{severity:"error",...t}),UA=t=>{const{crumbInfo:e}=t,n=Io.useNavigate();return v.jsx(j.Breadcrumbs,{"aria-label":"breadcrumb",separator:v.jsx(bF,{color:"primary"}),sx:{marginBottom:2},children:e.map(({label:r,path:o},i)=>o&&i<e.length-1?v.jsx(j.Link,{color:"primary",sx:{cursor:"pointer"},onClick:()=>n(o),children:r},r):v.jsx(j.Typography,{color:"primary",children:r},r))})},Dee=t=>{const{title:e,message:n,type:r,onClose:o,autoHideDuration:i=8e3,variant:s="leftBorder",elevation:a=6}=t,c=Iee(r);return v.jsx(j.Snackbar,{"data-testid":"message-snackbar",anchorOrigin:{vertical:"bottom",horizontal:"right"},open:!0,onClose:u=>{u==null&&o()},autoHideDuration:i,children:v.jsx(Gu,{"data-testid":"message-snackbar-alert",severity:c,iconMapping:{info:qA(r),warning:qA(r)},onClose:o,elevation:a,variant:s,children:n?v.jsxs(v.Fragment,{children:[v.jsx(j.AlertTitle,{"data-testid":"alertTitle",sx:{fontWeight:"bold"},children:e}),n]}):e})})},Iee=t=>t=="logout"?"info":t=="timeout"?"warning":t,qA=t=>{if(t=="timeout")return v.jsx(WL,{});if(t=="logout")return v.jsx(gF,{})},Pee=t=>{const{title:e,createButtonLabel:n,showAddButton:r=!1,onAdd:o=()=>alert("Not implemented yet"),breadcrumbs:i=[],children:s,sx:a}=t,c=j.useMediaQuery(j.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(j.Box,{sx:a,children:[i.length>0&&v.jsx(UA,{crumbInfo:i}),v.jsxs(j.Box,{className:"MBv2_PageHeader_Header",display:"flex",flexDirection:c?"column":"row",justifyContent:"space-between",alignItems:"center",gap:1,children:[v.jsxs(j.Box,{className:"MBv2_PageHeader_TitleAndCreateBtn",display:"flex",flexDirection:"row",justifyContent:c||!s?"space-between":"start",alignItems:"center",width:"100%",gap:1,children:[typeof e=="string"?v.jsx(j.Typography,{className:"MBv2_PageHeader_Title",variant:"h2",children:e}):e,r&&v.jsxs(lv,{className:"MBv2_PageHeader_CreateBtn",onClick:()=>o(),children:[v.jsx(jL,{style:{marginRight:"0.5rem"}}),n]})]}),s&&v.jsx(j.Box,{width:c?"100%":"50%",children:s})]})]})},Nee=t=>{const{title:e,titleIcon:n,fullWidthIcon:r=!1,children:o,actionLabel:i,action:s,sx:a}=t,c=j.useMediaQuery(j.useTheme().breakpoints.down("sm"));return v.jsxs(j.Card,{sx:a||{padding:"30px 40px",display:"flex",flexDirection:"column",gap:"1rem"},children:[n&&v.jsx(j.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(j.Typography,{variant:"h1",display:"inline",fontSize:"calc(20px + .9vw)",className:"MBv2_SingleActionCard_Title",children:e}),o,v.jsx(j.Button,{variant:"contained",color:"primary",onClick:s,fullWidth:c,className:"MBv2_SingleActionCard_ActionButton",children:i})]})};He.AlertModal=see,He.Autocomplete=NS,He.Breadcrumbs=UA,He.Button=lv,He.Checkbox=IL,He.CheckboxGroup=PL,He.ConfirmationModal=iee,He.DarkModeToggle=zA,He.DateField=my,He.DateRangeField=Kj,He.DecisionModal=aee,He.Drawer=LA,He.DynamicAutocomplete=AL,He.EnvironmentBanner=FA,He.Error=io,He.ErrorAlert=Aee,He.FileList=FL,He.FileUpload=NL,He.FloatingNavBar=fee,He.Footer=cee,He.FormDebugger=fQ,He.Header=uee,He.InfoAlert=Oee,He.LoadingIndicator=gv,He.MForm=JQ,He.MForm2=oee,He.MFormProvider2=PA,He.MGrid=pee,He.MPanel=hee,He.MStack=mee,He.MenuButton=RA,He.MultiAutocomplete=DL,He.NavBar=VA,He.PageHeader=Pee,He.PaginatedTable=lee,He.ProfileMenu=BA,He.RadioGroup=RL,He.RangeSlider=BL,He.RepeatableFormGroup=hQ,He.RichTextField=cQ,He.ScrollToTop=dQ,He.SearchField=MF,He.Select=VL,He.Sidebar=dee,He.SingleActionCard=Nee,He.Snackbar=Dee,He.Stepper=pQ,He.Submit=uQ,He.SuccessAlert=_ee,He.Switch=zL,He.Table=$A,He.Tabs=Rh,He.TextField=HL,He.WarningAlert=Mee,He.commonTheme=Ln,He.darkTheme=YI,He.lightTheme=KI,He.useMForm2=tee,He.useMyForm=XQ,Object.defineProperty(He,Symbol.toStringTag,{value:"Module"})}));
|