@scmlatam/web-ui 0.1.25 → 0.1.26
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.
|
@@ -45497,7 +45497,7 @@ async function C0(e) {
|
|
|
45497
45497
|
return;
|
|
45498
45498
|
const {
|
|
45499
45499
|
default: t
|
|
45500
|
-
} = await import("./get-context-
|
|
45500
|
+
} = await import("./get-context-UF6dEV06.js"), r = await t();
|
|
45501
45501
|
if (!e || !z0(r))
|
|
45502
45502
|
return;
|
|
45503
45503
|
const n = Ce({}, e, {
|
|
@@ -62175,6 +62175,18 @@ const b_ = ({
|
|
|
62175
62175
|
backgroundColor: "#eee",
|
|
62176
62176
|
opacity: 0.7
|
|
62177
62177
|
}
|
|
62178
|
+
},
|
|
62179
|
+
"& .MuiDataGrid-row": {
|
|
62180
|
+
minHeight: 64,
|
|
62181
|
+
// Cambia 48 por el valor mínimo que desees
|
|
62182
|
+
maxHeight: "none"
|
|
62183
|
+
// Permite que crezca si es necesario
|
|
62184
|
+
},
|
|
62185
|
+
"& .MuiDataGrid-cell": {
|
|
62186
|
+
minHeight: 64,
|
|
62187
|
+
maxHeight: "none",
|
|
62188
|
+
display: "flex",
|
|
62189
|
+
alignItems: "center"
|
|
62178
62190
|
}
|
|
62179
62191
|
},
|
|
62180
62192
|
loading: e.loading,
|
|
@@ -62185,7 +62197,8 @@ const b_ = ({
|
|
|
62185
62197
|
onPaginationModelChange: e.setPaginationModel,
|
|
62186
62198
|
onRowSelectionModelChange: e.setRowSelectionModel,
|
|
62187
62199
|
rowSelectionModel: e.rowSelectionModel,
|
|
62188
|
-
disableRowSelectionOnClick: e.disableRowSelectionOnClick
|
|
62200
|
+
disableRowSelectionOnClick: e.disableRowSelectionOnClick,
|
|
62201
|
+
getRowHeight: () => "auto"
|
|
62189
62202
|
}
|
|
62190
62203
|
),
|
|
62191
62204
|
/* @__PURE__ */ p(
|
package/dist/web-ui.js
CHANGED
package/dist/web-ui.umd.cjs
CHANGED
|
@@ -518,7 +518,7 @@ return result$$;`.replaceAll("$$",String(v3)));return v3+=1,(a,c)=>s(o,a,c)},b3=
|
|
|
518
518
|
`))},[JSON.stringify(r)])}const u=E.useCallback(m=>{s||a(m)},[]);return[c,u]}const D$=({name:e,timezone:t,value:r,defaultValue:n,referenceDate:o,onChange:s,valueManager:l})=>{const a=wn(),[c,u]=pv({name:e,state:"value",controlled:r,default:n??l.emptyValue}),m=E.useMemo(()=>l.getTimezone(a,c),[a,l,c]),I=Vt(R=>m==null?R:l.setTimezone(a,m,R)),d=E.useMemo(()=>t||m||(o?a.getTimezone(Array.isArray(o)?o[0]:o):"default"),[t,m,o,a]),M=E.useMemo(()=>l.setTimezone(a,d,c),[l,a,d,c]),h=Vt((R,...f)=>{const V=I(R);u(V),s?.(V,...f)});return{value:M,handleValueChange:h,timezone:d}},na=e=>e.saveQuery!=null,Zv=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:r,timezone:n,setCharacterQuery:o,setTempAndroidValueStr:s,updateSectionValue:l}})=>{const a=wn(),c=({keyPressed:I,sectionIndex:d},M,h)=>{const R=I.toLowerCase(),f=r.sections[d];if(r.characterQuery!=null&&(!h||h(r.characterQuery.value))&&r.characterQuery.sectionIndex===d){const C=`${r.characterQuery.value}${R}`,p=M(C,f);if(!na(p))return o({sectionIndex:d,value:C,sectionType:f.type}),p}const V=M(R,f);return na(V)&&!V.saveQuery?(o(null),null):(o({sectionIndex:d,value:R,sectionType:f.type}),na(V)?null:V)},u=I=>{const d=(R,f,V)=>{const C=f.filter(p=>p.toLowerCase().startsWith(V));return C.length===0?{saveQuery:!1}:{sectionValue:C[0],shouldGoToNextSection:C.length===1}},M=(R,f,V,C)=>{const p=y=>Xy(a,n,f.type,y);if(f.contentType==="letter")return d(f.format,p(f.format),R);if(V&&C!=null&&hf(a,V).contentType==="letter"){const y=p(V),Z=d(V,y,R);return na(Z)?{saveQuery:!1}:qe({},Z,{sectionValue:C(Z.sectionValue,y)})}return{saveQuery:!1}};return c(I,(R,f)=>{switch(f.type){case"month":{const V=C=>_y(a,C,a.formats.month,f.format);return M(R,f,a.formats.month,V)}case"weekDay":{const V=(C,p)=>p.indexOf(C).toString();return M(R,f,a.formats.weekday,V)}case"meridiem":return M(R,f);default:return{saveQuery:!1}}})},m=I=>{const d=({queryValue:h,skipIfBelowMinimum:R,section:f})=>{const V=qs(h,e),C=Number(V),p=t[f.type]({currentDate:null,format:f.format,contentType:f.contentType});if(C>p.maximum)return{saveQuery:!1};if(R&&C<p.minimum)return{saveQuery:!0};const y=C*10>p.maximum||V.length===p.maximum.toString().length;return{sectionValue:$y(a,C,p,e,f),shouldGoToNextSection:y}};return c(I,(h,R)=>{if(R.contentType==="digit"||R.contentType==="digit-with-letter")return d({queryValue:h,skipIfBelowMinimum:!1,section:R});if(R.type==="month"){ev(a,"digit","month","MM");const f=d({queryValue:h,skipIfBelowMinimum:!0,section:{type:R.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2}});if(na(f))return f;const V=_y(a,f.sectionValue,"MM",R.format);return qe({},f,{sectionValue:V})}if(R.type==="weekDay"){const f=d({queryValue:h,skipIfBelowMinimum:!0,section:R});if(na(f))return f;const V=nE(a,R.format)[Number(f.sectionValue)-1];return qe({},f,{sectionValue:V})}return{saveQuery:!1}},h=>Dy(h,e))};return Vt(I=>{const d=r.sections[I.sectionIndex],h=Dy(I.keyPressed,e)?m(qe({},I,{keyPressed:ff(I.keyPressed,e)})):u(I);if(h==null){s(null);return}l({section:d,newSectionValue:h.sectionValue,shouldGoToNextSection:h.shouldGoToNextSection})})},qv={};function $$(e,t){const r=E.useRef(qv);return r.current===qv&&(r.current=e(t)),r}const _$=[];function e_(e){E.useEffect(e,_$)}class yf{static create(){return new yf}currentId=null;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function ia(){const e=$$(yf.create).current;return e_(e.disposeEffect),e}const Av=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),gv=(e,t)=>(r,n)=>e?t.isAfter(r,n):Av(r,t)>Av(n,t),gs={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},t_=e=>Math.max(...e.map(t=>gs[t.type]??1)),ou=(e,t,r)=>{if(t===gs.year)return e.startOfYear(r);if(t===gs.month)return e.startOfMonth(r);if(t===gs.day)return e.startOfDay(r);let n=r;return t<gs.minutes&&(n=e.setMinutes(n,0)),t<gs.seconds&&(n=e.setSeconds(n,0)),t<gs.milliseconds&&(n=e.setMilliseconds(n,0)),n},yv=({props:e,adapter:t,granularity:r,timezone:n,getTodayDate:o})=>{let s=o?o():ou(t,r,rE(t,n));e.minDate!=null&&t.isAfterDay(e.minDate,s)&&(s=ou(t,r,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,s)&&(s=ou(t,r,e.maxDate));const l=gv(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&l(e.minTime,s)&&(s=ou(t,r,e.disableIgnoringDatePartForTimeValidation?e.minTime:Hy(t,s,e.minTime))),e.maxTime!=null&&l(s,e.maxTime)&&(s=ou(t,r,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Hy(t,s,e.maxTime))),s},r_=["value","referenceDate"],uE={emptyValue:null,getTodayValue:rE,getInitialReferenceValue:e=>{let{value:t,referenceDate:r}=e,n=Cr(e,r_);return n.adapter.isValid(t)?t:r??yv(n)},cleanValue:By,areValuesEqual:Rf,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,r)=>r==null?null:e.setTimezone(r,t)},n_={updateReferenceValue:(e,t,r)=>e.isValid(t)?t:r,getSectionsFromValue:(e,t)=>t(e),getV7HiddenInputValueFromSections:tv,getV6InputValueFromSections:rv,parseValueStr:(e,t,r)=>r(e.trim(),t),getDateFromSection:e=>e,getDateSectionsFromValue:e=>e,updateDateInValue:(e,t,r)=>r,clearDateSections:e=>e.map(t=>qe({},t,{value:""}))},mE=({props:e,value:t,timezone:r,adapter:n})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:s,shouldDisableYear:l,disablePast:a,disableFuture:c,minDate:u,maxDate:m}=e,I=n.date(void 0,r);switch(!0){case!n.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(s&&s(t)):return"shouldDisableMonth";case!!(l&&l(t)):return"shouldDisableYear";case!!(c&&n.isAfterDay(t,I)):return"disableFuture";case!!(a&&n.isBeforeDay(t,I)):return"disablePast";case!!(u&&n.isBeforeDay(t,u)):return"minDate";case!!(m&&n.isAfterDay(t,m)):return"maxDate";default:return null}};mE.valueManager=uE;const vv=({adapter:e,value:t,timezone:r,props:n})=>{if(t===null)return null;const{minTime:o,maxTime:s,minutesStep:l,shouldDisableTime:a,disableIgnoringDatePartForTimeValidation:c=!1,disablePast:u,disableFuture:m}=n,I=e.date(void 0,r),d=gv(c,e);switch(!0){case!e.isValid(t):return"invalidDate";case!!(o&&d(o,t)):return"minTime";case!!(s&&d(t,s)):return"maxTime";case!!(m&&e.isAfter(t,I)):return"disableFuture";case!!(u&&e.isBefore(t,I)):return"disablePast";case!!(a&&a(t,"hours")):return"shouldDisableTime-hours";case!!(a&&a(t,"minutes")):return"shouldDisableTime-minutes";case!!(a&&a(t,"seconds")):return"shouldDisableTime-seconds";case!!(l&&e.getMinutes(t)%l!==0):return"minutesStep";default:return null}};vv.valueManager=uE;const bv=({adapter:e,value:t,timezone:r,props:n})=>{const o=mE({adapter:e,value:t,timezone:r,props:n});return o!==null?o:vv({adapter:e,value:t,timezone:r,props:n})};bv.valueManager=uE;function i_(e){const{props:t,validator:r,value:n,timezone:o,onError:s}=e,l=wn(),a=E.useRef(r.valueManager.defaultErrorState),c=r({adapter:l,value:n,timezone:o,props:t}),u=r.valueManager.hasError(c);E.useEffect(()=>{s&&!r.valueManager.isSameError(c,a.current)&&s(c,n),a.current=c},[r,s,c,n]);const m=Vt(I=>r({adapter:l,value:I,timezone:o,props:t}));return{validationError:c,hasValidationError:u,getValidationErrorForNewValue:m}}const o_=5e3,xv=e=>{const t=wn(),r=eu(),n=vr(),{manager:{validator:o,valueType:s,internal_valueManager:l,internal_fieldValueManager:a},internalPropsWithDefaults:c,internalPropsWithDefaults:{value:u,defaultValue:m,referenceDate:I,onChange:d,format:M,formatDensity:h="dense",selectedSections:R,onSelectedSectionsChange:f,shouldRespectLeadingZeros:V=!1,timezone:C,enableAccessibleFieldDOMStructure:p=!0},forwardedProps:{error:y}}=e,{value:Z,handleValueChange:v,timezone:g}=D$({name:"a field component",timezone:C,value:u,defaultValue:m,referenceDate:I,onChange:d,valueManager:l}),q=E.useRef(Z);E.useEffect(()=>{q.current=Z},[Z]);const{hasValidationError:b}=i_({props:c,validator:o,timezone:g,value:Z,onError:c.onError}),x=E.useMemo(()=>y!==void 0?y:b,[b,y]),F=E.useMemo(()=>TD(t),[t]),A=E.useMemo(()=>HD(t,F,g),[t,F,g]),W=E.useCallback(te=>a.getSectionsFromValue(te,fe=>lv({adapter:t,localeText:r,localizedDigits:F,format:M,date:fe,formatDensity:h,shouldRespectLeadingZeros:V,enableAccessibleFieldDOMStructure:p,isRtl:n})),[a,M,r,F,n,V,t,h,p]),[j,Y]=E.useState(()=>{const te=W(Z);iv(te,s);const fe={sections:te,lastExternalValue:Z,lastSectionsDependencies:{format:M,isRtl:n,locale:t.locale},tempValueStrAndroid:null,characterQuery:null},ae=t_(te),xe=l.getInitialReferenceValue({referenceDate:I,value:Z,adapter:t,props:c,granularity:ae,timezone:g});return qe({},fe,{referenceValue:xe})}),[K,U]=pv({controlled:R,default:null,name:"useField",state:"selectedSections"}),J=te=>{U(te),f?.(te)},P=E.useMemo(()=>Cf(K,j.sections),[K,j.sections]),S=P==="all"?0:P,k=E.useMemo(()=>XD(j.sections,n&&!p),[j.sections,n,p]),T=E.useMemo(()=>j.sections.every(te=>te.value===""),[j.sections]),L=te=>{const fe={validationError:o({adapter:t,value:te,timezone:g,props:c})};v(te,fe)},H=(te,fe)=>{const ae=[...j.sections];return ae[te]=qe({},ae[te],{value:fe,modified:!0}),ae},B=E.useRef(null),O=ia(),N=te=>{S!=null&&(B.current={sectionIndex:S,value:te},O.start(0,()=>{B.current=null}))},ee=()=>{l.areValuesEqual(t,Z,l.emptyValue)?Y(te=>qe({},te,{sections:te.sections.map(fe=>qe({},fe,{value:""})),tempValueStrAndroid:null,characterQuery:null})):(Y(te=>qe({},te,{characterQuery:null})),L(l.emptyValue))},$=()=>{if(S==null)return;const te=j.sections[S];te.value!==""&&(N(""),a.getDateFromSection(Z,te)===null?Y(fe=>qe({},fe,{sections:H(S,""),tempValueStrAndroid:null,characterQuery:null})):(Y(fe=>qe({},fe,{characterQuery:null})),L(a.updateDateInValue(Z,te,null))))},G=te=>{const fe=(xe,ve)=>{const Se=t.parse(xe,M);if(!t.isValid(Se))return null;const le=lv({adapter:t,localeText:r,localizedDigits:F,format:M,date:Se,formatDensity:h,shouldRespectLeadingZeros:V,enableAccessibleFieldDOMStructure:p,isRtl:n});return sv(t,Se,le,ve,!1)},ae=a.parseValueStr(te,j.referenceValue,fe);L(ae)},D=ia(),X=({section:te,newSectionValue:fe,shouldGoToNextSection:ae})=>{O.clear(),D.clear();const xe=a.getDateFromSection(Z,te);ae&&S<j.sections.length-1&&J(S+1);const ve=H(S,fe),Se=a.getDateSectionsFromValue(ve,te),le=GD(t,Se,F);if(t.isValid(le)){const je=sv(t,le,Se,a.getDateFromSection(j.referenceValue,te),!0);return xe==null&&D.start(0,()=>{q.current===Z&&Y(be=>qe({},be,{sections:a.clearDateSections(j.sections,te),tempValueStrAndroid:null}))}),L(a.updateDateInValue(Z,te,je))}return Se.every(je=>je.value!=="")&&(xe==null||t.isValid(xe))?(N(fe),L(a.updateDateInValue(Z,te,le))):xe!=null?(N(fe),L(a.updateDateInValue(Z,te,null))):Y(je=>qe({},je,{sections:ve,tempValueStrAndroid:null}))},se=te=>Y(fe=>qe({},fe,{tempValueStrAndroid:te})),ne=Vt(te=>{Y(fe=>qe({},fe,{characterQuery:te}))});if(Z!==j.lastExternalValue){let te;B.current!=null&&!t.isValid(a.getDateFromSection(Z,j.sections[B.current.sectionIndex]))?te=H(B.current.sectionIndex,B.current.value):te=W(Z),Y(fe=>qe({},fe,{lastExternalValue:Z,sections:te,sectionsDependencies:{format:M,isRtl:n,locale:t.locale},referenceValue:a.updateReferenceValue(t,Z,fe.referenceValue),tempValueStrAndroid:null}))}if(n!==j.lastSectionsDependencies.isRtl||M!==j.lastSectionsDependencies.format||t.locale!==j.lastSectionsDependencies.locale){const te=W(Z);iv(te,s),Y(fe=>qe({},fe,{lastSectionsDependencies:{format:M,isRtl:n,locale:t.locale},sections:te,tempValueStrAndroid:null,characterQuery:null}))}j.characterQuery!=null&&!x&&S==null&&ne(null),j.characterQuery!=null&&j.sections[j.characterQuery.sectionIndex]?.type!==j.characterQuery.sectionType&&ne(null),E.useEffect(()=>{B.current!=null&&(B.current=null)});const Me=ia();return E.useEffect(()=>(j.characterQuery!=null&&Me.start(o_,()=>ne(null)),()=>{}),[j.characterQuery,ne,Me]),E.useEffect(()=>{j.tempValueStrAndroid!=null&&S!=null&&$()},[j.sections]),{activeSectionIndex:S,areAllSectionsEmpty:T,error:x,localizedDigits:F,parsedSelectedSections:P,sectionOrder:k,sectionsValueBoundaries:A,state:j,timezone:g,value:Z,clearValue:ee,clearActiveSection:$,setCharacterQuery:ne,setSelectedSections:J,setTempAndroidValueStr:se,updateSectionValue:X,updateValueFromValueStr:G,getSectionsFromValue:W}};function Fv(e){const{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:r,skipContextFieldRefAssignment:n}=e,o=pf(),s=Qy(),l=Di(r.unstableFieldRef,n?null:s?.fieldRef),a=o?.setValue,c=E.useCallback((m,I)=>a?.(m,{validationError:I.validationError,shouldClose:!1}),[a]),u=E.useMemo(()=>s!=null&&o!=null?qe({value:o.value,onChange:c,timezone:o.timezone,disabled:o.disabled,readOnly:o.readOnly,autoFocus:o.autoFocus&&!o.open,focused:o.open?!0:void 0,format:o.fieldFormat,formatDensity:s.formatDensity,enableAccessibleFieldDOMStructure:s.enableAccessibleFieldDOMStructure,selectedSections:s.selectedSections,onSelectedSectionsChange:s.onSelectedSectionsChange,unstableFieldRef:l},r):r,[o,s,r,c,l]);return t(u)}function vf(e){const{focused:t,domGetters:r,stateResponse:{parsedSelectedSections:n,state:o}}=e;if(!r.isReady())return;const s=zv(r.getRoot()).getSelection();if(!s)return;if(n==null){s.rangeCount>0&&s.getRangeAt(0).startContainer instanceof Node&&r.getRoot().contains(s.getRangeAt(0).startContainer)&&s.removeAllRanges(),t&&r.getRoot().blur();return}if(!r.getRoot().contains(Tn(r.getRoot())))return;const l=new window.Range;let a;n==="all"?a=r.getRoot():o.sections[n].type==="empty"?a=r.getSectionContainer(n):a=r.getSectionContent(n),l.selectNodeContents(a),a.focus(),s.removeAllRanges(),s.addRange(l)}function Kv(e){const t=wn(),{manager:{internal_fieldValueManager:r},internalPropsWithDefaults:{minutesStep:n,disabled:o,readOnly:s},stateResponse:{state:l,value:a,activeSectionIndex:c,parsedSelectedSections:u,sectionsValueBoundaries:m,localizedDigits:I,timezone:d,sectionOrder:M,clearValue:h,clearActiveSection:R,setSelectedSections:f,updateSectionValue:V}}=e;return Vt(C=>{if(!o)switch(!0){case((C.ctrlKey||C.metaKey)&&String.fromCharCode(C.keyCode)==="A"&&!C.shiftKey&&!C.altKey):{C.preventDefault(),f("all");break}case C.key==="ArrowRight":{if(C.preventDefault(),u==null)f(M.startIndex);else if(u==="all")f(M.endIndex);else{const p=M.neighbors[u].rightIndex;p!==null&&f(p)}break}case C.key==="ArrowLeft":{if(C.preventDefault(),u==null)f(M.endIndex);else if(u==="all")f(M.startIndex);else{const p=M.neighbors[u].leftIndex;p!==null&&f(p)}break}case C.key==="Delete":{if(C.preventDefault(),s)break;u==null||u==="all"?h():R();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(C.key):{if(C.preventDefault(),s||c==null)break;u==="all"&&f(c);const p=l.sections[c],y=l_(t,d,p,C.key,m,I,r.getDateFromSection(a,p),{minutesStep:n});V({section:p,newSectionValue:y,shouldGoToNextSection:!1});break}}})}function s_(e){switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}}function l_(e,t,r,n,o,s,l,a){const c=s_(n),u=n==="Home",m=n==="End",I=r.value===""||u||m,d=()=>{const h=o[r.type]({currentDate:l,format:r.format,contentType:r.contentType}),R=C=>$y(e,C,h,s,r),f=r.type==="minutes"&&a?.minutesStep?a.minutesStep:1;let V;if(I){if(r.type==="year"&&!m&&!u)return e.formatByString(e.date(void 0,t),r.format);c>0||u?V=h.minimum:V=h.maximum}else V=parseInt(qs(r.value,s),10)+c*f;return V%f!==0&&((c<0||u)&&(V+=f-(f+V)%f),(c>0||m)&&(V-=V%f)),V>h.maximum?R(h.minimum+(V-h.maximum-1)%(h.maximum-h.minimum+1)):V<h.minimum?R(h.maximum-(h.minimum-V-1)%(h.maximum-h.minimum+1)):R(V)},M=()=>{const h=Xy(e,t,r.type,r.format);if(h.length===0)return r.value;if(I)return c>0||u?h[0]:h[h.length-1];const V=((h.indexOf(r.value)+c)%h.length+h.length)%h.length;return h[V]};return r.contentType==="digit"||r.contentType==="digit-with-letter"?d():M()}function a_(e){const{manager:t,focused:r,setFocused:n,domGetters:o,stateResponse:s,applyCharacterEditing:l,internalPropsWithDefaults:a,stateResponse:{parsedSelectedSections:c,sectionOrder:u,state:m,clearValue:I,setCharacterQuery:d,setSelectedSections:M,updateValueFromValueStr:h},internalPropsWithDefaults:{disabled:R=!1,readOnly:f=!1}}=e,V=Kv({manager:t,internalPropsWithDefaults:a,stateResponse:s}),C=ia(),p=Vt(q=>{R||!o.isReady()||(n(!0),c==="all"?C.start(0,()=>{const b=document.getSelection().getRangeAt(0).startOffset;if(b===0){M(u.startIndex);return}let x=0,F=0;for(;F<b&&x<m.sections.length;){const A=m.sections[x];x+=1,F+=`${A.startSeparator}${A.value||A.placeholder}${A.endSeparator}`.length}M(x-1)}):r?o.getRoot().contains(q.target)||M(u.startIndex):(n(!0),M(u.startIndex)))}),y=Vt(q=>{if(!o.isReady()||c!=="all")return;const x=q.target.textContent??"";o.getRoot().innerHTML=m.sections.map(F=>`${F.startSeparator}${F.value||F.placeholder}${F.endSeparator}`).join(""),vf({focused:r,domGetters:o,stateResponse:s}),x.length===0||x.charCodeAt(0)===10?(I(),M("all")):x.length>1?h(x):(c==="all"&&M(0),l({keyPressed:x,sectionIndex:0}))}),Z=Vt(q=>{if(f||c!=="all"){q.preventDefault();return}const b=q.clipboardData.getData("text");q.preventDefault(),d(null),h(b)}),v=Vt(()=>{if(r||R||!o.isReady())return;const q=Tn(o.getRoot());n(!0),o.getSectionIndexFromDOMElement(q)!=null||M(u.startIndex)}),g=Vt(()=>{setTimeout(()=>{if(!o.isReady())return;const q=Tn(o.getRoot());!o.getRoot().contains(q)&&(n(!1),M(null))})});return{onKeyDown:V,onBlur:g,onFocus:v,onClick:p,onPaste:Z,onInput:y,contentEditable:c==="all",tabIndex:c===0?-1:0}}function c_(e){const{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:r,state:n,updateValueFromValueStr:o}}=e,s=Vt(a=>{o(a.target.value)});return{value:E.useMemo(()=>r?"":t.getV7HiddenInputValueFromSections(n.sections),[r,n.sections,t]),onChange:s}}function u_(e){const{stateResponse:{setSelectedSections:t},internalPropsWithDefaults:{disabled:r=!1}}=e,n=E.useCallback(o=>s=>{r||s.isDefaultPrevented()||t(o)},[r,t]);return E.useCallback(o=>({"data-sectionindex":o,onClick:n(o)}),[n])}function m_(e){const t=wn(),r=eu(),n=uv(),{focused:o,domGetters:s,stateResponse:l,applyCharacterEditing:a,manager:{internal_fieldValueManager:c},stateResponse:{parsedSelectedSections:u,sectionsValueBoundaries:m,state:I,value:d,clearActiveSection:M,setCharacterQuery:h,setSelectedSections:R,updateSectionValue:f,updateValueFromValueStr:V},internalPropsWithDefaults:{disabled:C=!1,readOnly:p=!1}}=e,y=u==="all",Z=!y&&!C&&!p,v=Vt(A=>{if(!s.isReady())return;const W=I.sections[A];s.getSectionContent(A).innerHTML=W.value||W.placeholder,vf({focused:o,domGetters:s,stateResponse:l})}),g=Vt(A=>{if(!s.isReady())return;const W=A.target,j=W.textContent??"",Y=s.getSectionIndexFromDOMElement(W),K=I.sections[Y];if(p){v(Y);return}if(j.length===0){if(K.value===""){v(Y);return}const U=A.nativeEvent.inputType;if(U==="insertParagraph"||U==="insertLineBreak"){v(Y);return}v(Y),M();return}a({keyPressed:j,sectionIndex:Y}),v(Y)}),q=Vt(A=>{A.preventDefault()}),b=Vt(A=>{if(A.preventDefault(),p||C||typeof u!="number")return;const W=I.sections[u],j=A.clipboardData.getData("text"),Y=/^[a-zA-Z]+$/.test(j),K=/^[0-9]+$/.test(j),U=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(j);W.contentType==="letter"&&Y||W.contentType==="digit"&&K||W.contentType==="digit-with-letter"&&U?(h(null),f({section:W,newSectionValue:j,shouldGoToNextSection:!0})):!Y&&!K&&(h(null),V(j))}),x=Vt(A=>{A.preventDefault(),A.dataTransfer.dropEffect="none"}),F=E.useCallback(A=>()=>{C||R(A)},[C,R]);return E.useCallback((A,W)=>{const j=m[A.type]({currentDate:c.getDateFromSection(d,A),contentType:A.contentType,format:A.format});return{onInput:g,onPaste:b,onMouseUp:q,onDragOver:x,onFocus:F(W),"aria-labelledby":`${n}-${A.type}`,"aria-readonly":p,"aria-valuenow":E_(A,t),"aria-valuemin":j.minimum,"aria-valuemax":j.maximum,"aria-valuetext":A.value?I_(A,t):r.empty,"aria-label":r[A.type],"aria-disabled":C,tabIndex:y||W>0?-1:0,contentEditable:!y&&!C&&!p,role:"spinbutton",id:`${n}-${A.type}`,"data-range-position":A.dateName||void 0,spellCheck:Z?!1:void 0,autoCapitalize:Z?"off":void 0,autoCorrect:Z?"off":void 0,children:A.value||A.placeholder,inputMode:A.contentType==="letter"?"text":"numeric"}},[m,n,y,C,p,Z,r,t,g,b,q,x,F,c,d])}function I_(e,t){if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const r=t.parse(e.value,e.format);return r?t.format(r,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}}function E_(e,t){if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const r=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return r?t.getHours(r)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const r=t.parse(e.value,e.format);return r?t.getMonth(r)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}}const d_=e=>{const{props:t,manager:r,skipContextFieldRefAssignment:n,manager:{valueType:o,internal_useOpenPickerButtonAriaLabel:s}}=e,{internalProps:l,forwardedProps:a}=Gy(t,o),c=Fv({manager:r,internalProps:l,skipContextFieldRefAssignment:n}),{sectionListRef:u,onBlur:m,onClick:I,onFocus:d,onInput:M,onPaste:h,onKeyDown:R,onClear:f,clearable:V}=a,{disabled:C=!1,readOnly:p=!1,autoFocus:y=!1,focused:Z,unstableFieldRef:v}=c,g=E.useRef(null),q=Di(u,g),b=E.useMemo(()=>({isReady:()=>g.current!=null,getRoot:()=>g.current.getRoot(),getSectionContainer:te=>g.current.getSectionContainer(te),getSectionContent:te=>g.current.getSectionContent(te),getSectionIndexFromDOMElement:te=>g.current.getSectionIndexFromDOMElement(te)}),[g]),x=xv({manager:r,internalPropsWithDefaults:c,forwardedProps:a}),{areAllSectionsEmpty:F,error:A,parsedSelectedSections:W,sectionOrder:j,state:Y,value:K,clearValue:U,setSelectedSections:J}=x,P=Zv({stateResponse:x}),S=s(K),[k,T]=E.useState(!1);function L(te=0){if(C||!g.current||Sv(g)!=null)return;const fe=Cf(te,Y.sections);T(!0),g.current.getSectionContent(fe).focus()}const H=a_({manager:r,internalPropsWithDefaults:c,stateResponse:x,applyCharacterEditing:P,focused:k,setFocused:T,domGetters:b}),B=c_({manager:r,stateResponse:x}),O=u_({stateResponse:x,internalPropsWithDefaults:c}),N=m_({manager:r,stateResponse:x,applyCharacterEditing:P,internalPropsWithDefaults:c,domGetters:b,focused:k}),ee=Vt(te=>{R?.(te),H.onKeyDown(te)}),$=Vt(te=>{m?.(te),H.onBlur(te)}),G=Vt(te=>{d?.(te),H.onFocus(te)}),D=Vt(te=>{te.isDefaultPrevented()||(I?.(te),H.onClick(te))}),X=Vt(te=>{h?.(te),H.onPaste(te)}),se=Vt(te=>{M?.(te),H.onInput(te)}),ne=Vt((te,...fe)=>{te.preventDefault(),f?.(te,...fe),U(),Yv(g)?J(j.startIndex):L(0)}),Me=E.useMemo(()=>Y.sections.map((te,fe)=>{const ae=N(te,fe);return{container:O(fe),content:N(te,fe),before:{children:te.startSeparator},after:{children:te.endSeparator,"data-range-position":te.isEndFormatSeparator?ae["data-range-position"]:void 0}}}),[Y.sections,O,N]);return E.useEffect(()=>{if(g.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 add the `enableAccessibleFieldDOMStructure={false}` prop to your Picker or Field component:","","<DatePicker enableAccessibleFieldDOMStructure={false} 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(`
|
|
519
519
|
`));y&&!C&&g.current&&g.current.getSectionContent(j.startIndex).focus()},[]),eE(()=>{if(!(!k||!g.current)){if(W==="all")g.current.getRoot().focus();else if(typeof W=="number"){const te=g.current.getSectionContent(W);te&&te.focus()}}},[W,k]),eE(()=>{vf({focused:k,domGetters:b,stateResponse:x})}),E.useImperativeHandle(v,()=>({getSections:()=>Y.sections,getActiveSectionIndex:()=>Sv(g),setSelectedSections:te=>{if(C||!g.current)return;const fe=Cf(te,Y.sections);T((fe==="all"?0:fe)!==null),J(te)},focusField:L,isFieldFocused:()=>Yv(g)})),qe({},a,H,{onBlur:$,onClick:D,onFocus:G,onInput:se,onPaste:X,onKeyDown:ee,onClear:ne},B,{error:A,clearable:!!(V&&!F&&!p&&!C),focused:Z??k,sectionListRef:q,enableAccessibleFieldDOMStructure:!0,elements:Me,areAllSectionsEmpty:F,disabled:C,readOnly:p,autoFocus:y,openPickerAriaLabel:S})};function Sv(e){const t=Tn(e.current?.getRoot());return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function Yv(e){const t=Tn(e.current?.getRoot());return!!e.current&&e.current.getRoot().contains(t)}const oa=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),M_=(e,t,r)=>{let n=0,o=r?1:0;const s=[];for(let l=0;l<e.length;l+=1){const a=e[l],c=zf(a,r?"input-rtl":"input-ltr",t),u=`${a.startSeparator}${c}${a.endSeparator}`,m=oa(u).length,I=u.length,d=oa(c),M=o+(d===""?0:c.indexOf(d[0]))+a.startSeparator.length,h=M+d.length;s.push(qe({},a,{start:n,end:n+m,startInInput:M,endInInput:h})),n+=m,o+=I}return s},R_=e=>{const t=vr(),r=ia(),n=ia(),{props:o,manager:s,skipContextFieldRefAssignment:l,manager:{valueType:a,internal_valueManager:c,internal_fieldValueManager:u,internal_useOpenPickerButtonAriaLabel:m}}=e,{internalProps:I,forwardedProps:d}=Gy(o,a),M=Fv({manager:s,internalProps:I,skipContextFieldRefAssignment:l}),{onFocus:h,onClick:R,onPaste:f,onBlur:V,onKeyDown:C,onClear:p,clearable:y,inputRef:Z,placeholder:v}=d,{readOnly:g=!1,disabled:q=!1,autoFocus:b=!1,focused:x,unstableFieldRef:F}=M,A=E.useRef(null),W=Di(Z,A),j=xv({manager:s,internalPropsWithDefaults:M,forwardedProps:d}),{activeSectionIndex:Y,areAllSectionsEmpty:K,error:U,localizedDigits:J,parsedSelectedSections:P,sectionOrder:S,state:k,value:T,clearValue:L,clearActiveSection:H,setCharacterQuery:B,setSelectedSections:O,setTempAndroidValueStr:N,updateSectionValue:ee,updateValueFromValueStr:$,getSectionsFromValue:G}=j,D=Zv({stateResponse:j}),X=m(T),se=E.useMemo(()=>M_(k.sections,J,t),[k.sections,J,t]);function ne(){const Ee=A.current.selectionStart??0;let ze;Ee<=se[0].startInInput||Ee>=se[se.length-1].endInInput?ze=1:ze=se.findIndex(ye=>ye.startInInput-ye.startSeparator.length>Ee);const ce=ze===-1?se.length-1:ze-1;O(ce)}function Me(Ee=0){Tn(A.current)!==A.current&&(A.current?.focus(),O(Ee))}const te=Vt(Ee=>{h?.(Ee);const ze=A.current;r.start(0,()=>{!ze||ze!==A.current||Y==null&&(ze.value.length&&Number(ze.selectionEnd)-Number(ze.selectionStart)===ze.value.length?O("all"):ne())})}),fe=Vt((Ee,...ze)=>{Ee.isDefaultPrevented()||(R?.(Ee,...ze),ne())}),ae=Vt(Ee=>{if(f?.(Ee),Ee.preventDefault(),g||q)return;const ze=Ee.clipboardData.getData("text");if(typeof P=="number"){const ce=k.sections[P],ye=/^[a-zA-Z]+$/.test(ze),Ke=/^[0-9]+$/.test(ze),Oe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ze);if(ce.contentType==="letter"&&ye||ce.contentType==="digit"&&Ke||ce.contentType==="digit-with-letter"&&Oe){B(null),ee({section:ce,newSectionValue:ze,shouldGoToNextSection:!0});return}if(ye||Ke)return}B(null),$(ze)}),xe=Vt(Ee=>{V?.(Ee),O(null)}),ve=Vt(Ee=>{if(g)return;const ze=Ee.target.value;if(ze===""){L();return}const ce=Ee.nativeEvent.data,ye=ce&&ce.length>1,Ke=ye?ce:ze,Oe=oa(Ke);if(P==="all"&&O(Y),Y==null||ye){$(ye?ce:Oe);return}let Tt;if(P==="all"&&Oe.length===1)Tt=Oe;else{const ge=oa(u.getV6InputValueFromSections(se,J,t));let Ye=-1,dt=-1;for(let Ot=0;Ot<ge.length;Ot+=1)Ye===-1&&ge[Ot]!==Oe[Ot]&&(Ye=Ot),dt===-1&&ge[ge.length-Ot-1]!==Oe[Oe.length-Ot-1]&&(dt=Ot);const Xt=se[Y];if(Ye<Xt.start||ge.length-dt-1>Xt.end)return;const Kr=Oe.length-ge.length+Xt.end-oa(Xt.endSeparator||"").length;Tt=Oe.slice(Xt.start+oa(Xt.startSeparator||"").length,Kr)}if(Tt.length===0){LD()&&N(Ke),H();return}D({keyPressed:Tt,sectionIndex:Y})}),Se=Vt((Ee,...ze)=>{Ee.preventDefault(),p?.(Ee,...ze),L(),Wv(A)?O(S.startIndex):Me(0)}),le=Kv({manager:s,internalPropsWithDefaults:M,stateResponse:j}),je=Vt(Ee=>{C?.(Ee),le(Ee)}),be=E.useMemo(()=>v!==void 0?v:u.getV6InputValueFromSections(G(c.emptyValue),J,t),[v,u,G,c.emptyValue,J,t]),Ue=E.useMemo(()=>k.tempValueStrAndroid??u.getV6InputValueFromSections(k.sections,J,t),[k.sections,u,k.tempValueStrAndroid,J,t]);E.useEffect(()=>{A.current&&A.current===Tn(A.current)&&O("all")},[]),eE(()=>{function Ee(){if(!A.current)return;if(P==null){A.current.scrollLeft&&(A.current.scrollLeft=0);return}if(A.current!==Tn(A.current))return;const ze=A.current.scrollTop;if(P==="all")A.current.select();else{const ce=se[P],ye=ce.type==="empty"?ce.startInInput-ce.startSeparator.length:ce.startInInput,Ke=ce.type==="empty"?ce.endInInput+ce.endSeparator.length:ce.endInInput;(ye!==A.current.selectionStart||Ke!==A.current.selectionEnd)&&A.current===Tn(A.current)&&A.current.setSelectionRange(ye,Ke),n.start(0,()=>{A.current&&A.current===Tn(A.current)&&A.current.selectionStart===A.current.selectionEnd&&(A.current.selectionStart!==ye||A.current.selectionEnd!==Ke)&&Ee()})}A.current.scrollTop=ze}Ee()});const Qe=E.useMemo(()=>Y==null||k.sections[Y].contentType==="letter"?"text":"numeric",[Y,k.sections]),et=!(A.current&&A.current===Tn(A.current))&&K;return E.useImperativeHandle(F,()=>({getSections:()=>k.sections,getActiveSectionIndex:()=>{const Ee=A.current.selectionStart??0,ze=A.current.selectionEnd??0;if(Ee===0&&ze===0)return null;const ce=Ee<=se[0].startInInput?1:se.findIndex(ye=>ye.startInInput-ye.startSeparator.length>Ee);return ce===-1?se.length-1:ce-1},setSelectedSections:Ee=>O(Ee),focusField:Me,isFieldFocused:()=>Wv(A)})),qe({},d,{error:U,clearable:!!(y&&!K&&!g&&!q),onBlur:xe,onClick:fe,onFocus:te,onPaste:ae,onKeyDown:je,onClear:Se,inputRef:W,enableAccessibleFieldDOMStructure:!1,placeholder:be,inputMode:Qe,autoComplete:"off",value:et?"":Ue,onChange:ve,focused:x,disabled:q,readOnly:g,autoFocus:b,openPickerAriaLabel:X})};function Wv(e){return e.current===Tn(e.current)}const kv=e=>{const t=Qy();return(e.props.enableAccessibleFieldDOMStructure??t?.enableAccessibleFieldDOMStructure??!0?d_:R_)(e)},jv=()=>Mf().defaultDates;function h_(e){const t=wn(),r=jv();return E.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,minDate:tE(t,e.minDate,r.minDate),maxDate:tE(t,e.maxDate,r.maxDate)}),[e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,r])}function f_(e={}){const{enableAccessibleFieldDOMStructure:t=!0}=e;return E.useMemo(()=>({valueType:"date-time",validator:bv,internal_valueManager:uE,internal_fieldValueManager:n_,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:z_,internal_useOpenPickerButtonAriaLabel:V_}),[t])}function V_(e){const t=wn(),r=eu();return E.useMemo(()=>{const n=t.isValid(e)?t.format(e,"fullDate"):null;return r.openDatePickerDialogue(n)},[e,r,t])}function z_(e){const t=wn(),r=C_(e),n=E.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return E.useMemo(()=>qe({},e,r,{format:e.format??(n?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h)}),[e,r,n,t])}function C_(e){const t=wn(),r=jv();return E.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,disableIgnoringDatePartForTimeValidation:!!e.minDateTime||!!e.maxDateTime||!!e.disableFuture||!!e.disablePast,minDate:tE(t,e.minDateTime??e.minDate,r.minDate),maxDate:tE(t,e.maxDateTime??e.maxDate,r.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),[e.minDateTime,e.maxDateTime,e.minTime,e.maxTime,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,r])}function vi(){return vi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vi.apply(null,arguments)}const IE=e=>{const t=[],r=[];return e.forEach(n=>{n.dateName==="start"?t.push(n):r.push(n)}),{startDate:t,endDate:r}},p_=e=>e.map((t,r)=>r===e.length-1?vi({},t,{separator:null}):t),Z_=["value","referenceDate"],Uv={emptyValue:[null,null],getTodayValue:(e,t,r)=>[rE(e,t,r),rE(e,t,r)],getInitialReferenceValue:e=>{let{value:t,referenceDate:r}=e,n=mf(e,Z_);const o=n.adapter.isValid(t[0]),s=n.adapter.isValid(t[1]);if(o&&s)return t;const l=r??yv(n),a=Array.isArray(l)?l[0]:l,c=Array.isArray(l)?l[1]:l;return[o?t[0]:a,s?t[1]:c]},cleanValue:(e,t)=>t.map(r=>By(e,r)),areValuesEqual:(e,t,r)=>Rf(e,t[0],r[0])&&Rf(e,t[1],r[1]),isSameError:(e,t)=>t!==null&&e[1]===t[1]&&e[0]===t[0],hasError:e=>e[0]!=null||e[1]!=null,defaultErrorState:[null,null],getTimezone:(e,t)=>{const r=e.isValid(t[0])?e.getTimezone(t[0]):null,n=e.isValid(t[1])?e.getTimezone(t[1]):null;if(r!=null&&n!=null&&r!==n)throw new Error("MUI X: The timezone of the start and the end date should be the same.");return r??n},setTimezone:(e,t,r)=>[r[0]==null?null:e.setTimezone(r[0],t),r[1]==null?null:e.setTimezone(r[1],t)]},q_=({dateSeparator:e="–"})=>({updateReferenceValue:(t,r,n)=>{const o=t.isValid(r[0]),s=t.isValid(r[1]);return!o&&!s?n:o&&s?r:o?[r[0],n[0]]:[n[1],r[1]]},getSectionsFromValue:([t,r],n)=>{const o=(s,l)=>{const a=n(s);return a.map((c,u)=>u===a.length-1&&l==="start"?vi({},c,{dateName:l,endSeparator:`${c.endSeparator} ${e} `}):vi({},c,{dateName:l}))};return[...o(t,"start"),...o(r,"end")]},getV7HiddenInputValueFromSections:t=>{const r=IE(t);return tv([...r.startDate,...r.endDate])},getV6InputValueFromSections:(t,r,n)=>{const o=IE(t);return rv([...o.startDate,...o.endDate],r,n)},parseValueStr:(t,r,n)=>{const[o,s]=t.split(e);return[o,s].map((l,a)=>l==null?null:n(l.trim(),r[a]))},getDateFromSection:(t,r)=>t[EE(r)],getDateSectionsFromValue:(t,r)=>{const n=IE(t);return EE(r)===0?p_(n.startDate):n.endDate},updateDateInValue:(t,r,n)=>EE(r)===0?[n,t[1]]:[t[0],n],clearDateSections:(t,r)=>{const n=IE(t);return EE(r)===0?[...n.startDate.map(o=>vi({},o,{value:""})),...n.endDate]:[...n.startDate,...n.endDate.map(o=>vi({},o,{value:""}))]}});function EE(e){return e==null||e.dateName==="start"?0:1}const Qv=(e,t)=>e.isValid(t[0])&&e.isValid(t[1])&&!e.isBefore(t[1],t[0]),A_=(e,t,r)=>Qv(e,t)?`${e.format(t[0],r)} - ${e.format(t[1],r)}`:null,g_=["shouldDisableDate"],Pv=({adapter:e,value:t,timezone:r,props:n})=>{const[o,s]=t,{shouldDisableDate:l}=n,a=mf(n,g_),c=[mE({adapter:e,value:o,timezone:r,props:vi({},a,{shouldDisableDate:u=>!!l?.(u,"start")})}),mE({adapter:e,value:s,timezone:r,props:vi({},a,{shouldDisableDate:u=>!!l?.(u,"end")})})];return c[0]||c[1]?c:o===null||s===null?[null,null]:Qv(e,t)?[null,null]:["invalidRange","invalidRange"]};Pv.valueManager=Uv;function y_(e={}){const{enableAccessibleFieldDOMStructure:t=!0,dateSeparator:r}=e;return E.useMemo(()=>({valueType:"date",validator:Pv,internal_valueManager:Uv,internal_fieldValueManager:q_({dateSeparator:r}),internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:b_,internal_useOpenPickerButtonAriaLabel:v_}),[t,r])}function v_(e){const t=wn(),r=eu();return E.useMemo(()=>r.openRangePickerDialogue(A_(t,e,"fullDate")),[e,r,t])}function b_(e){const t=wn(),r=h_(e);return E.useMemo(()=>vi({},e,r,{format:e.format??t.formats.keyboardDate}),[e,r,t])}const x_=e=>{const t=y_(e);return kv({manager:t,props:e})},F_=["slots","slotProps"],dE=E.forwardRef(function(t,r){const n=hi({props:t,name:"MuiSingleInputDateRangeField"}),{slots:o,slotProps:s}=n,l=mf(n,F_),a=Vv({slotProps:s,ref:r,externalForwardedProps:l}),c=x_(a);return z.jsx(fv,{slots:o,slotProps:s,fieldResponse:c,defaultOpenPickerIcon:vD})});process.env.NODE_ENV!=="production"&&(dE.displayName="SingleInputDateRangeField"),dE.fieldType="single-input",process.env.NODE_ENV!=="production"&&(dE.propTypes={autoFocus:i.bool,className:i.string,clearable:i.bool,clearButtonPosition:i.oneOf(["end","start"]),color:i.oneOf(["error","info","primary","secondary","success","warning"]),component:i.elementType,dateSeparator:i.string,defaultValue:i.arrayOf(i.object),disabled:i.bool,disableFuture:i.bool,disablePast:i.bool,enableAccessibleFieldDOMStructure:i.bool,focused:i.bool,format:i.string,formatDensity:i.oneOf(["dense","spacious"]),FormHelperTextProps:i.object,fullWidth:i.bool,helperText:i.node,hiddenLabel:i.bool,id:i.string,InputLabelProps:i.object,inputProps:i.object,InputProps:i.object,inputRef:gD,label:i.node,margin:i.oneOf(["dense","none","normal"]),maxDate:i.object,minDate:i.object,name:i.string,onBlur:i.func,onChange:i.func,onClear:i.func,onError:i.func,onFocus:i.func,onSelectedSectionsChange:i.func,readOnly:i.bool,referenceDate:i.oneOfType([i.arrayOf(i.object),i.object]),required:i.bool,selectedSections:i.oneOfType([i.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),i.number]),shouldDisableDate:i.func,shouldRespectLeadingZeros:i.bool,size:i.oneOf(["medium","small"]),slotProps:i.object,slots:i.object,style:i.object,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),timezone:i.string,unstableFieldRef:i.oneOfType([i.func,i.object]),value:i.arrayOf(i.object),variant:i.oneOf(["filled","outlined","standard"])});var ME={exports:{}},K_=ME.exports,Jv;function S_(){return Jv||(Jv=1,function(e,t){(function(r,n){e.exports=n()})(K_,function(){var r=1e3,n=6e4,o=36e5,s="millisecond",l="second",a="minute",c="hour",u="day",m="week",I="month",d="quarter",M="year",h="date",R="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,V=/\[([^\]]+)]|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,C={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(j){var Y=["th","st","nd","rd"],K=j%100;return"["+j+(Y[(K-20)%10]||Y[K]||Y[0])+"]"}},p=function(j,Y,K){var U=String(j);return!U||U.length>=Y?j:""+Array(Y+1-U.length).join(K)+j},y={s:p,z:function(j){var Y=-j.utcOffset(),K=Math.abs(Y),U=Math.floor(K/60),J=K%60;return(Y<=0?"+":"-")+p(U,2,"0")+":"+p(J,2,"0")},m:function j(Y,K){if(Y.date()<K.date())return-j(K,Y);var U=12*(K.year()-Y.year())+(K.month()-Y.month()),J=Y.clone().add(U,I),P=K-J<0,S=Y.clone().add(U+(P?-1:1),I);return+(-(U+(K-J)/(P?J-S:S-J))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:I,y:M,w:m,d:u,D:h,h:c,m:a,s:l,ms:s,Q:d}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},Z="en",v={};v[Z]=C;var g="$isDayjsObject",q=function(j){return j instanceof A||!(!j||!j[g])},b=function j(Y,K,U){var J;if(!Y)return Z;if(typeof Y=="string"){var P=Y.toLowerCase();v[P]&&(J=P),K&&(v[P]=K,J=P);var S=Y.split("-");if(!J&&S.length>1)return j(S[0])}else{var k=Y.name;v[k]=Y,J=k}return!U&&J&&(Z=J),J||!U&&Z},x=function(j,Y){if(q(j))return j.clone();var K=typeof Y=="object"?Y:{};return K.date=j,K.args=arguments,new A(K)},F=y;F.l=b,F.i=q,F.w=function(j,Y){return x(j,{locale:Y.$L,utc:Y.$u,x:Y.$x,$offset:Y.$offset})};var A=function(){function j(K){this.$L=b(K.locale,null,!0),this.parse(K),this.$x=this.$x||K.x||{},this[g]=!0}var Y=j.prototype;return Y.parse=function(K){this.$d=function(U){var J=U.date,P=U.utc;if(J===null)return new Date(NaN);if(F.u(J))return new Date;if(J instanceof Date)return new Date(J);if(typeof J=="string"&&!/Z$/i.test(J)){var S=J.match(f);if(S){var k=S[2]-1||0,T=(S[7]||"0").substring(0,3);return P?new Date(Date.UTC(S[1],k,S[3]||1,S[4]||0,S[5]||0,S[6]||0,T)):new Date(S[1],k,S[3]||1,S[4]||0,S[5]||0,S[6]||0,T)}}return new Date(J)}(K),this.init()},Y.init=function(){var K=this.$d;this.$y=K.getFullYear(),this.$M=K.getMonth(),this.$D=K.getDate(),this.$W=K.getDay(),this.$H=K.getHours(),this.$m=K.getMinutes(),this.$s=K.getSeconds(),this.$ms=K.getMilliseconds()},Y.$utils=function(){return F},Y.isValid=function(){return this.$d.toString()!==R},Y.isSame=function(K,U){var J=x(K);return this.startOf(U)<=J&&J<=this.endOf(U)},Y.isAfter=function(K,U){return x(K)<this.startOf(U)},Y.isBefore=function(K,U){return this.endOf(U)<x(K)},Y.$g=function(K,U,J){return F.u(K)?this[U]:this.set(J,K)},Y.unix=function(){return Math.floor(this.valueOf()/1e3)},Y.valueOf=function(){return this.$d.getTime()},Y.startOf=function(K,U){var J=this,P=!!F.u(U)||U,S=F.p(K),k=function($,G){var D=F.w(J.$u?Date.UTC(J.$y,G,$):new Date(J.$y,G,$),J);return P?D:D.endOf(u)},T=function($,G){return F.w(J.toDate()[$].apply(J.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(G)),J)},L=this.$W,H=this.$M,B=this.$D,O="set"+(this.$u?"UTC":"");switch(S){case M:return P?k(1,0):k(31,11);case I:return P?k(1,H):k(0,H+1);case m:var N=this.$locale().weekStart||0,ee=(L<N?L+7:L)-N;return k(P?B-ee:B+(6-ee),H);case u:case h:return T(O+"Hours",0);case c:return T(O+"Minutes",1);case a:return T(O+"Seconds",2);case l:return T(O+"Milliseconds",3);default:return this.clone()}},Y.endOf=function(K){return this.startOf(K,!1)},Y.$set=function(K,U){var J,P=F.p(K),S="set"+(this.$u?"UTC":""),k=(J={},J[u]=S+"Date",J[h]=S+"Date",J[I]=S+"Month",J[M]=S+"FullYear",J[c]=S+"Hours",J[a]=S+"Minutes",J[l]=S+"Seconds",J[s]=S+"Milliseconds",J)[P],T=P===u?this.$D+(U-this.$W):U;if(P===I||P===M){var L=this.clone().set(h,1);L.$d[k](T),L.init(),this.$d=L.set(h,Math.min(this.$D,L.daysInMonth())).$d}else k&&this.$d[k](T);return this.init(),this},Y.set=function(K,U){return this.clone().$set(K,U)},Y.get=function(K){return this[F.p(K)]()},Y.add=function(K,U){var J,P=this;K=Number(K);var S=F.p(U),k=function(H){var B=x(P);return F.w(B.date(B.date()+Math.round(H*K)),P)};if(S===I)return this.set(I,this.$M+K);if(S===M)return this.set(M,this.$y+K);if(S===u)return k(1);if(S===m)return k(7);var T=(J={},J[a]=n,J[c]=o,J[l]=r,J)[S]||1,L=this.$d.getTime()+K*T;return F.w(L,this)},Y.subtract=function(K,U){return this.add(-1*K,U)},Y.format=function(K){var U=this,J=this.$locale();if(!this.isValid())return J.invalidDate||R;var P=K||"YYYY-MM-DDTHH:mm:ssZ",S=F.z(this),k=this.$H,T=this.$m,L=this.$M,H=J.weekdays,B=J.months,O=J.meridiem,N=function(G,D,X,se){return G&&(G[D]||G(U,P))||X[D].slice(0,se)},ee=function(G){return F.s(k%12||12,G,"0")},$=O||function(G,D,X){var se=G<12?"AM":"PM";return X?se.toLowerCase():se};return P.replace(V,function(G,D){return D||function(X){switch(X){case"YY":return String(U.$y).slice(-2);case"YYYY":return F.s(U.$y,4,"0");case"M":return L+1;case"MM":return F.s(L+1,2,"0");case"MMM":return N(J.monthsShort,L,B,3);case"MMMM":return N(B,L);case"D":return U.$D;case"DD":return F.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return N(J.weekdaysMin,U.$W,H,2);case"ddd":return N(J.weekdaysShort,U.$W,H,3);case"dddd":return H[U.$W];case"H":return String(k);case"HH":return F.s(k,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return $(k,T,!0);case"A":return $(k,T,!1);case"m":return String(T);case"mm":return F.s(T,2,"0");case"s":return String(U.$s);case"ss":return F.s(U.$s,2,"0");case"SSS":return F.s(U.$ms,3,"0");case"Z":return S}return null}(G)||S.replace(":","")})},Y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Y.diff=function(K,U,J){var P,S=this,k=F.p(U),T=x(K),L=(T.utcOffset()-this.utcOffset())*n,H=this-T,B=function(){return F.m(S,T)};switch(k){case M:P=B()/12;break;case I:P=B();break;case d:P=B()/3;break;case m:P=(H-L)/6048e5;break;case u:P=(H-L)/864e5;break;case c:P=H/o;break;case a:P=H/n;break;case l:P=H/r;break;default:P=H}return J?P:F.a(P)},Y.daysInMonth=function(){return this.endOf(I).$D},Y.$locale=function(){return v[this.$L]},Y.locale=function(K,U){if(!K)return this.$L;var J=this.clone(),P=b(K,U,!0);return P&&(J.$L=P),J},Y.clone=function(){return F.w(this.$d,this)},Y.toDate=function(){return new Date(this.valueOf())},Y.toJSON=function(){return this.isValid()?this.toISOString():null},Y.toISOString=function(){return this.$d.toISOString()},Y.toString=function(){return this.$d.toUTCString()},j}(),W=A.prototype;return x.prototype=W,[["$ms",s],["$s",l],["$m",a],["$H",c],["$W",u],["$M",I],["$y",M],["$D",h]].forEach(function(j){W[j[1]]=function(Y){return this.$g(Y,j[0],j[1])}}),x.extend=function(j,Y){return j.$i||(j(Y,A,x),j.$i=!0),x},x.locale=b,x.isDayjs=q,x.unix=function(j){return x(1e3*j)},x.en=v[Z],x.Ls=v,x.p={},x})}(ME)),ME.exports}var Y_=S_();const pr=io(Y_);var RE={exports:{}},W_=RE.exports,wv;function k_(){return wv||(wv=1,function(e,t){(function(r,n){e.exports=n()})(W_,function(){var r="week",n="year";return function(o,s,l){var a=s.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 m=l(this).startOf(n).add(1,n).date(u),I=l(this).endOf(r);if(m.isBefore(I))return 1}var d=l(this).startOf(n).date(u).startOf(r).subtract(1,"millisecond"),M=this.diff(d,r,!0);return M<0?l(this).startOf("week").week():Math.ceil(M)},a.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})}(RE)),RE.exports}var j_=k_();const U_=io(j_);var hE={exports:{}},Q_=hE.exports,Tv;function P_(){return Tv||(Tv=1,function(e,t){(function(r,n){e.exports=n()})(Q_,function(){var r={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"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,s=/\d\d/,l=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,c={},u=function(f){return(f=+f)+(f>68?1900:2e3)},m=function(f){return function(V){this[f]=+V}},I=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(V){if(!V||V==="Z")return 0;var C=V.match(/([+-]|\d\d)/g),p=60*C[1]+(+C[2]||0);return p===0?0:C[0]==="+"?-p:p}(f)}],d=function(f){var V=c[f];return V&&(V.indexOf?V:V.s.concat(V.f))},M=function(f,V){var C,p=c.meridiem;if(p){for(var y=1;y<=24;y+=1)if(f.indexOf(p(y,0,V))>-1){C=y>12;break}}else C=f===(V?"pm":"PM");return C},h={A:[a,function(f){this.afternoon=M(f,!1)}],a:[a,function(f){this.afternoon=M(f,!0)}],Q:[o,function(f){this.month=3*(f-1)+1}],S:[o,function(f){this.milliseconds=100*+f}],SS:[s,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[l,m("seconds")],ss:[l,m("seconds")],m:[l,m("minutes")],mm:[l,m("minutes")],H:[l,m("hours")],h:[l,m("hours")],HH:[l,m("hours")],hh:[l,m("hours")],D:[l,m("day")],DD:[s,m("day")],Do:[a,function(f){var V=c.ordinal,C=f.match(/\d+/);if(this.day=C[0],V)for(var p=1;p<=31;p+=1)V(p).replace(/\[|\]/g,"")===f&&(this.day=p)}],w:[l,m("week")],ww:[s,m("week")],M:[l,m("month")],MM:[s,m("month")],MMM:[a,function(f){var V=d("months"),C=(d("monthsShort")||V.map(function(p){return p.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(f){var V=d("months").indexOf(f)+1;if(V<1)throw new Error;this.month=V%12||V}],Y:[/[+-]?\d+/,m("year")],YY:[s,function(f){this.year=u(f)}],YYYY:[/\d{4}/,m("year")],Z:I,ZZ:I};function R(f){var V,C;V=f,C=c&&c.formats;for(var p=(f=V.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(x,F,A){var W=A&&A.toUpperCase();return F||C[A]||r[A]||C[W].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(j,Y,K){return Y||K.slice(1)})})).match(n),y=p.length,Z=0;Z<y;Z+=1){var v=p[Z],g=h[v],q=g&&g[0],b=g&&g[1];p[Z]=b?{regex:q,parser:b}:v.replace(/^\[|\]$/g,"")}return function(x){for(var F={},A=0,W=0;A<y;A+=1){var j=p[A];if(typeof j=="string")W+=j.length;else{var Y=j.regex,K=j.parser,U=x.slice(W),J=Y.exec(U)[0];K.call(F,J),x=x.replace(J,"")}}return function(P){var S=P.afternoon;if(S!==void 0){var k=P.hours;S?k<12&&(P.hours+=12):k===12&&(P.hours=0),delete P.afternoon}}(F),F}}return function(f,V,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(u=f.parseTwoDigitYear);var p=V.prototype,y=p.parse;p.parse=function(Z){var v=Z.date,g=Z.utc,q=Z.args;this.$u=g;var b=q[1];if(typeof b=="string"){var x=q[2]===!0,F=q[3]===!0,A=x||F,W=q[2];F&&(W=q[2]),c=this.$locale(),!x&&W&&(c=C.Ls[W]),this.$d=function(U,J,P,S){try{if(["x","X"].indexOf(J)>-1)return new Date((J==="X"?1e3:1)*U);var k=R(J)(U),T=k.year,L=k.month,H=k.day,B=k.hours,O=k.minutes,N=k.seconds,ee=k.milliseconds,$=k.zone,G=k.week,D=new Date,X=H||(T||L?1:D.getDate()),se=T||D.getFullYear(),ne=0;T&&!L||(ne=L>0?L-1:D.getMonth());var Me,te=B||0,fe=O||0,ae=N||0,xe=ee||0;return $?new Date(Date.UTC(se,ne,X,te,fe,ae,xe+60*$.offset*1e3)):P?new Date(Date.UTC(se,ne,X,te,fe,ae,xe)):(Me=new Date(se,ne,X,te,fe,ae,xe),G&&(Me=S(Me).week(G).toDate()),Me)}catch{return new Date("")}}(v,b,g,C),this.init(),W&&W!==!0&&(this.$L=this.locale(W).$L),A&&v!=this.format(b)&&(this.$d=new Date("")),c={}}else if(b instanceof Array)for(var j=b.length,Y=1;Y<=j;Y+=1){q[1]=b[Y-1];var K=C.apply(this,q);if(K.isValid()){this.$d=K.$d,this.$L=K.$L,this.init();break}Y===j&&(this.$d=new Date(""))}else y.call(this,Z)}}})}(hE)),hE.exports}var J_=P_();const w_=io(J_);var fE={exports:{}},T_=fE.exports,Ov;function O_(){return Ov||(Ov=1,function(e,t){(function(r,n){e.exports=n()})(T_,function(){var r={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(n,o,s){var l=o.prototype,a=l.format;s.en.formats=r,l.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,m=function(I,d){return I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(M,h,R){var f=R&&R.toUpperCase();return h||d[R]||r[R]||d[f].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,C,p){return C||p.slice(1)})})}(c,u===void 0?{}:u);return a.call(this,m)}}})}(fE)),fE.exports}var G_=O_();const H_=io(G_);var VE={exports:{}},B_=VE.exports,Gv;function L_(){return Gv||(Gv=1,function(e,t){(function(r,n){e.exports=n()})(B_,function(){return function(r,n,o){n.prototype.isBetween=function(s,l,a,c){var u=o(s),m=o(l),I=(c=c||"()")[0]==="(",d=c[1]===")";return(I?this.isAfter(u,a):!this.isBefore(u,a))&&(d?this.isBefore(m,a):!this.isAfter(m,a))||(I?this.isBefore(u,a):!this.isAfter(u,a))&&(d?this.isAfter(m,a):!this.isBefore(m,a))}}})}(VE)),VE.exports}var X_=L_();const N_=io(X_);var zE={exports:{}},D_=zE.exports,Hv;function $_(){return Hv||(Hv=1,function(e,t){(function(r,n){e.exports=n()})(D_,function(){return function(r,n){var o=n.prototype,s=o.format;o.format=function(l){var a=this,c=this.$locale();if(!this.isValid())return s.bind(this)(l);var u=this.$utils(),m=(l||"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(I){switch(I){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(),I==="w"?1:2,"0");case"W":case"WW":return u.s(a.isoWeek(),I==="W"?1:2,"0");case"k":case"kk":return u.s(String(a.$H===0?24:a.$H),I==="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 I}});return s.bind(this)(m)}}})}(zE)),zE.exports}var __=$_();const eee=io(__);pr.extend(H_),pr.extend(U_),pr.extend(N_),pr.extend(eee);const tee={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"},ree={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",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},bf=["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(`
|
|
520
520
|
`),Bv=["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(`
|
|
521
|
-
`);class Lv{isMUIAdapter=!0;isTimezoneCompatible=!0;lib="dayjs";escapedCharacters={start:"[",end:"]"};formatTokenMap=tee;constructor({locale:t,formats:r}={}){this.locale=t,this.formats=qe({},ree,r),pr.extend(w_)}setLocaleToValue=t=>{const r=this.getCurrentLocaleCode();return r===t.locale()?t:t.locale(r)};hasUTCPlugin=()=>typeof pr.utc<"u";hasTimezonePlugin=()=>typeof pr.tz<"u";isSame=(t,r,n)=>{const o=this.setTimezone(r,this.getTimezone(t));return t.format(n)===o.format(n)};cleanTimezone=t=>{switch(t){case"default":return;case"system":return pr.tz.guess();default:return t}};createSystemDate=t=>{let r;if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const n=pr.tz.guess();n==="UTC"?r=pr(t):r=pr.tz(t,n)}else r=pr(t);return this.setLocaleToValue(r)};createUTCDate=t=>{if(!this.hasUTCPlugin())throw new Error(bf);return this.setLocaleToValue(pr.utc(t))};createTZDate=(t,r)=>{if(!this.hasUTCPlugin())throw new Error(bf);if(!this.hasTimezonePlugin())throw new Error(Bv);const n=t!==void 0&&!t.endsWith("Z");return this.setLocaleToValue(pr(t).tz(this.cleanTimezone(r),n))};getLocaleFormats=()=>{const t=pr.Ls,r=this.locale||"en";let n=t[r];return n===void 0&&(process.env.NODE_ENV!=="production"&&br(["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."]),n=t.en),n.formats};adjustOffset=t=>{if(!this.hasTimezonePlugin())return t;const r=this.getTimezone(t);if(r!=="UTC"){const n=t.tz(this.cleanTimezone(r),!0);if(n.$offset===(t.$offset??0))return t;t.$offset=n.$offset}return t};date=(t,r="default")=>t===null?null:r==="UTC"?this.createUTCDate(t):r==="system"||r==="default"&&!this.hasTimezonePlugin()?this.createSystemDate(t):this.createTZDate(t,r);getInvalidDate=()=>pr(new Date("Invalid date"));getTimezone=t=>{if(this.hasTimezonePlugin()){const r=t.$x?.$timezone;if(r)return r}return this.hasUTCPlugin()&&t.isUTC()?"UTC":"system"};setTimezone=(t,r)=>{if(this.getTimezone(t)===r)return t;if(r==="UTC"){if(!this.hasUTCPlugin())throw new Error(bf);return t.utc()}if(r==="system")return t.local();if(!this.hasTimezonePlugin()){if(r==="default")return t;throw new Error(Bv)}return this.setLocaleToValue(pr.tz(t,this.cleanTimezone(r)))};toJsDate=t=>t.toDate();parse=(t,r)=>t===""?null:pr(t,r,this.locale,!0);getCurrentLocaleCode=()=>this.locale||"en";is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||"");expandFormat=t=>{const r=this.getLocaleFormats(),n=o=>o.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(s,l,a)=>l||a.slice(1));return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(o,s,l)=>{const a=l&&l.toUpperCase();return s||r[l]||n(r[a])})};isValid=t=>t==null?!1:t.isValid();format=(t,r)=>this.formatByString(t,this.formats[r]);formatByString=(t,r)=>this.setLocaleToValue(t).format(r);formatNumber=t=>t;isEqual=(t,r)=>t===null&&r===null?!0:t===null||r===null?!1:t.toDate().getTime()===r.toDate().getTime();isSameYear=(t,r)=>this.isSame(t,r,"YYYY");isSameMonth=(t,r)=>this.isSame(t,r,"YYYY-MM");isSameDay=(t,r)=>this.isSame(t,r,"YYYY-MM-DD");isSameHour=(t,r)=>t.isSame(r,"hour");isAfter=(t,r)=>t>r;isAfterYear=(t,r)=>this.hasUTCPlugin()?!this.isSameYear(t,r)&&t.utc()>r.utc():t.isAfter(r,"year");isAfterDay=(t,r)=>this.hasUTCPlugin()?!this.isSameDay(t,r)&&t.utc()>r.utc():t.isAfter(r,"day");isBefore=(t,r)=>t<r;isBeforeYear=(t,r)=>this.hasUTCPlugin()?!this.isSameYear(t,r)&&t.utc()<r.utc():t.isBefore(r,"year");isBeforeDay=(t,r)=>this.hasUTCPlugin()?!this.isSameDay(t,r)&&t.utc()<r.utc():t.isBefore(r,"day");isWithinRange=(t,[r,n])=>t>=r&&t<=n;startOfYear=t=>this.adjustOffset(t.startOf("year"));startOfMonth=t=>this.adjustOffset(t.startOf("month"));startOfWeek=t=>this.adjustOffset(this.setLocaleToValue(t).startOf("week"));startOfDay=t=>this.adjustOffset(t.startOf("day"));endOfYear=t=>this.adjustOffset(t.endOf("year"));endOfMonth=t=>this.adjustOffset(t.endOf("month"));endOfWeek=t=>this.adjustOffset(this.setLocaleToValue(t).endOf("week"));endOfDay=t=>this.adjustOffset(t.endOf("day"));addYears=(t,r)=>this.adjustOffset(t.add(r,"year"));addMonths=(t,r)=>this.adjustOffset(t.add(r,"month"));addWeeks=(t,r)=>this.adjustOffset(t.add(r,"week"));addDays=(t,r)=>this.adjustOffset(t.add(r,"day"));addHours=(t,r)=>this.adjustOffset(t.add(r,"hour"));addMinutes=(t,r)=>this.adjustOffset(t.add(r,"minute"));addSeconds=(t,r)=>this.adjustOffset(t.add(r,"second"));getYear=t=>t.year();getMonth=t=>t.month();getDate=t=>t.date();getHours=t=>t.hour();getMinutes=t=>t.minute();getSeconds=t=>t.second();getMilliseconds=t=>t.millisecond();setYear=(t,r)=>this.adjustOffset(t.set("year",r));setMonth=(t,r)=>this.adjustOffset(t.set("month",r));setDate=(t,r)=>this.adjustOffset(t.set("date",r));setHours=(t,r)=>this.adjustOffset(t.set("hour",r));setMinutes=(t,r)=>this.adjustOffset(t.set("minute",r));setSeconds=(t,r)=>this.adjustOffset(t.set("second",r));setMilliseconds=(t,r)=>this.adjustOffset(t.set("millisecond",r));getDaysInMonth=t=>t.daysInMonth();getWeekArray=t=>{const r=this.startOfWeek(this.startOfMonth(t)),n=this.endOfWeek(this.endOfMonth(t));let o=0,s=r;const l=[];for(;s<n;){const a=Math.floor(o/7);l[a]=l[a]||[],l[a].push(s),s=this.addDays(s,1),o+=1}return l};getWeekNumber=t=>t.week();getDayOfWeek(t){return t.day()+1}getYearRange=([t,r])=>{const n=this.startOfYear(t),o=this.endOfYear(r),s=[];let l=n;for(;this.isBefore(l,o);)s.push(l),l=this.addYears(l,1);return s}}const nee=({label:e,value:t,setValue:r,disabled:n,fullWidth:o})=>z.jsx(z.Fragment,{children:z.jsx(_I,{dateAdapter:Lv,children:z.jsx(dE,{label:e,value:t,onChange:s=>{r(s)},InputProps:{sx:{borderRadius:"16px"},color:s=>s.palette["gr-yellow"].main},size:"small",color:"gr-yellow",slotProps:{textField:{InputLabelProps:{sx:{color:"white !important"}}}},focused:!0,format:"YYYY-MM-DD",disabled:n,fullWidth:o})})}),iee=e=>{const{name:t={title:"",ncolumn:0},fields:r=[],actions:n={ncolumn:1,buttons:[{text:"Buscar",onClick:()=>{},variant:"contained",sx:{},icon:void 0}]}}=e,o=(s,l)=>{switch(s.element){case"SelectField":return z.jsx(mt,{size:s.ncolumn,children:z.jsx(qD,{label:s.label,placeholder:s.placeholder,value:s.value,setValue:s.setValue,values:s.values,disabled:s.disable,fullWidth:!0,white:!1})},l);case"MultiSelectField":return z.jsx(mt,{size:s.ncolumn,children:z.jsx(AD,{label:s.label,placeholder:s.placeholder,value:s.value,setValue:s.setValue,values:s.values,disabled:s.disable,fullWidth:!0,white:!1})},l);case"DateRangeField":return z.jsx(mt,{size:s.ncolumn,children:z.jsx(nee,{label:s.label,value:s.value,setValue:s.setValue,disabled:s.disable,fullWidth:!0})},l);default:return z.jsx(z.Fragment,{})}};return z.jsx(z.Fragment,{children:z.jsx(hr,{sx:{bgcolor:s=>s.palette.background.paper,height:"70px",borderTopLeftRadius:"20px",borderTopRightRadius:"20px",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",padding:"20px",gap:"20px"},children:z.jsxs(mt,{container:!0,spacing:2,sx:{flexGrow:1},children:[t.title&&z.jsx(mt,{size:t.ncolumn,sx:{display:"flex",alignItems:"center"},children:z.jsx(zr,{variant:"h4",color:"white",children:t.title})}),r.map((s,l)=>o(s,l)),n&&n.buttons.length>0&&z.jsx(mt,{size:n.ncolumn,sx:{display:"flex",justifyContent:"flex-end"},children:z.jsx(ap,{variant:"outlined",fullWidth:!0,sx:{"& .MuiButton-root":{borderRadius:"20px"}},children:n.buttons.map((s,l)=>z.jsx(Kn,{variant:s.variant,color:"gr-yellow",sx:s.sx,onClick:s.onClick,disableElevation:!0,children:s.icon?s.icon:z.jsx("span",{style:{marginTop:"2px"},children:s.text})},l))})})]})})})},oee=e=>z.jsxs(z.Fragment,{children:[z.jsx(Wy,{...e,showToolbar:!0,slots:{toolbar:iee},slotProps:{toolbar:{...e.toolbar}},sx:{border:"none",color:"black","& .MuiDataGrid-columnHeaderCheckbox":{backgroundColor:"white"},"& .MuiDataGrid-columnHeader":{backgroundColor:"white"},"& .MuiDataGrid-virtualScroller":{bgcolor:"white",borderBottomLeftRadius:"20px",borderBottomRightRadius:"20px"},"& .MuiDataGrid-checkboxInput":{color:t=>t.palette.background.paper},"& .MuiDataGrid-footerContainer":{borderTop:"none",fontWeight:"500",display:"flex",justifyContent:"center",alignItems:"center"},"& .MuiIconButton-root":{color:t=>t.palette.background.paper,"&.Mui-disabled":{color:"#888",backgroundColor:"#eee",opacity:.7}}},loading:e.loading,checkboxSelection:e.checkboxSelection,pagination:!0,autoPageSize:!0,paginationModel:e.paginationModel,onPaginationModelChange:e.setPaginationModel,onRowSelectionModelChange:e.setRowSelectionModel,rowSelectionModel:e.rowSelectionModel,disableRowSelectionOnClick:e.disableRowSelectionOnClick}),z.jsx(ZD,{contextMenu:e.contextMenu,setContextMenu:e.setContextMenu,options:e.options,checked:e.rowSelectionModel})]}),see=()=>{const[e,t]=me.useState(!1),[r,n]=me.useState([]),[o,s]=me.useState({pageSize:25,page:0}),[l,a]=me.useState({type:"include",ids:new Set}),[c,u]=me.useState(null);return{rows:r,setRows:n,loading:e,setLoading:t,paginationModel:o,setPaginationModel:s,rowSelectionModel:l,setRowSelectionModel:a,contextMenu:c,setContextMenu:u}},Xv=It(z.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel"),lee=It(z.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),aee=It(z.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"),cee=It(z.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"),uee=()=>{const{enqueueSnackbar:e}=x2(),t=n=>{Cq(n)};return{showAlert:(n,o)=>e(o,{variant:n,content:(l,a)=>z.jsx(Wd,{sx:{borderRadius:"24px",bgcolor:"#fff",boxShadow:3,color:c=>c.palette["gr-base-dark"].main},severity:n,iconMapping:{error:z.jsx(Xv,{}),info:z.jsx(cee,{}),success:z.jsx(lee,{}),warning:z.jsx(aee,{}),default:z.jsx(Ds,{color:"gr-blue",size:20})},onClose:()=>t(l),children:a},l)}),closeAlert:t}};var su={exports:{}},xf={},CE={exports:{}},Nv;function mee(){if(Nv)return CE.exports;Nv=1;function e(r){var n,o,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var l=r.length;for(n=0;n<l;n++)r[n]&&(o=e(r[n]))&&(s&&(s+=" "),s+=o)}else for(o in r)r[o]&&(s&&(s+=" "),s+=o);return s}function t(){for(var r,n,o=0,s="",l=arguments.length;o<l;o++)(r=arguments[o])&&(n=e(r))&&(s&&(s+=" "),s+=n);return s}return CE.exports=t,CE.exports.clsx=t,CE.exports}var ur={},So={},Dv;function pE(){if(Dv)return So;Dv=1,Object.defineProperty(So,"__esModule",{value:!0}),So.dontSetMe=o,So.findInArray=e,So.int=n,So.isFunction=t,So.isNum=r;function e(s,l){for(let a=0,c=s.length;a<c;a++)if(l.apply(l,[s[a],a,s]))return s[a]}function t(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Function]"}function r(s){return typeof s=="number"&&!isNaN(s)}function n(s){return parseInt(s,10)}function o(s,l,a){if(s[l])return new Error(`Invalid prop ${l} passed to ${a} - do not set this, set it on the child.`)}return So}var Yo={},$v;function Iee(){if($v)return Yo;$v=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.browserPrefixToKey=r,Yo.browserPrefixToStyle=n,Yo.default=void 0,Yo.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const l=window.document?.documentElement?.style;if(!l||s in l)return"";for(let a=0;a<e.length;a++)if(r(s,e[a])in l)return e[a];return""}function r(s,l){return l?`${l}${o(s)}`:s}function n(s,l){return l?`-${l.toLowerCase()}-${s}`:s}function o(s){let l="",a=!0;for(let c=0;c<s.length;c++)a?(l+=s[c].toUpperCase(),a=!1):s[c]==="-"?a=!0:l+=s[c];return l}return Yo.default=t(),Yo}var _v;function Ff(){if(_v)return ur;_v=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.addClassName=Z,ur.addEvent=l,ur.addUserSelectStyles=C,ur.createCSSTransform=M,ur.createSVGTransform=h,ur.getTouch=f,ur.getTouchIdentifier=V,ur.getTranslation=R,ur.innerHeight=m,ur.innerWidth=I,ur.matchesSelector=o,ur.matchesSelectorAndParentsTo=s,ur.offsetXYFromParent=d,ur.outerHeight=c,ur.outerWidth=u,ur.removeClassName=v,ur.removeEvent=a,ur.scheduleRemoveUserSelectStyles=p;var e=pE(),t=r(Iee());function r(g,q){if(typeof WeakMap=="function")var b=new WeakMap,x=new WeakMap;return(r=function(F,A){if(!A&&F&&F.__esModule)return F;var W,j,Y={__proto__:null,default:F};if(F===null||typeof F!="object"&&typeof F!="function")return Y;if(W=A?x:b){if(W.has(F))return W.get(F);W.set(F,Y)}for(const K in F)K!=="default"&&{}.hasOwnProperty.call(F,K)&&((j=(W=Object.defineProperty)&&Object.getOwnPropertyDescriptor(F,K))&&(j.get||j.set)?W(Y,K,j):Y[K]=F[K]);return Y})(g,q)}let n="";function o(g,q){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(b){return(0,e.isFunction)(g[b])})),(0,e.isFunction)(g[n])?g[n](q):!1}function s(g,q,b){let x=g;do{if(o(x,q))return!0;if(x===b)return!1;x=x.parentNode}while(x);return!1}function l(g,q,b,x){if(!g)return;const F={capture:!0,...x};g.addEventListener?g.addEventListener(q,b,F):g.attachEvent?g.attachEvent("on"+q,b):g["on"+q]=b}function a(g,q,b,x){if(!g)return;const F={capture:!0,...x};g.removeEventListener?g.removeEventListener(q,b,F):g.detachEvent?g.detachEvent("on"+q,b):g["on"+q]=null}function c(g){let q=g.clientHeight;const b=g.ownerDocument.defaultView.getComputedStyle(g);return q+=(0,e.int)(b.borderTopWidth),q+=(0,e.int)(b.borderBottomWidth),q}function u(g){let q=g.clientWidth;const b=g.ownerDocument.defaultView.getComputedStyle(g);return q+=(0,e.int)(b.borderLeftWidth),q+=(0,e.int)(b.borderRightWidth),q}function m(g){let q=g.clientHeight;const b=g.ownerDocument.defaultView.getComputedStyle(g);return q-=(0,e.int)(b.paddingTop),q-=(0,e.int)(b.paddingBottom),q}function I(g){let q=g.clientWidth;const b=g.ownerDocument.defaultView.getComputedStyle(g);return q-=(0,e.int)(b.paddingLeft),q-=(0,e.int)(b.paddingRight),q}function d(g,q,b){const F=q===q.ownerDocument.body?{left:0,top:0}:q.getBoundingClientRect(),A=(g.clientX+q.scrollLeft-F.left)/b,W=(g.clientY+q.scrollTop-F.top)/b;return{x:A,y:W}}function M(g,q){const b=R(g,q,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:b}}function h(g,q){return R(g,q,"")}function R(g,q,b){let{x,y:F}=g,A=`translate(${x}${b},${F}${b})`;if(q){const W=`${typeof q.x=="string"?q.x:q.x+b}`,j=`${typeof q.y=="string"?q.y:q.y+b}`;A=`translate(${W}, ${j})`+A}return A}function f(g,q){return g.targetTouches&&(0,e.findInArray)(g.targetTouches,b=>q===b.identifier)||g.changedTouches&&(0,e.findInArray)(g.changedTouches,b=>q===b.identifier)}function V(g){if(g.targetTouches&&g.targetTouches[0])return g.targetTouches[0].identifier;if(g.changedTouches&&g.changedTouches[0])return g.changedTouches[0].identifier}function C(g){if(!g)return;let q=g.getElementById("react-draggable-style-el");q||(q=g.createElement("style"),q.type="text/css",q.id="react-draggable-style-el",q.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
521
|
+
`);class Lv{isMUIAdapter=!0;isTimezoneCompatible=!0;lib="dayjs";escapedCharacters={start:"[",end:"]"};formatTokenMap=tee;constructor({locale:t,formats:r}={}){this.locale=t,this.formats=qe({},ree,r),pr.extend(w_)}setLocaleToValue=t=>{const r=this.getCurrentLocaleCode();return r===t.locale()?t:t.locale(r)};hasUTCPlugin=()=>typeof pr.utc<"u";hasTimezonePlugin=()=>typeof pr.tz<"u";isSame=(t,r,n)=>{const o=this.setTimezone(r,this.getTimezone(t));return t.format(n)===o.format(n)};cleanTimezone=t=>{switch(t){case"default":return;case"system":return pr.tz.guess();default:return t}};createSystemDate=t=>{let r;if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const n=pr.tz.guess();n==="UTC"?r=pr(t):r=pr.tz(t,n)}else r=pr(t);return this.setLocaleToValue(r)};createUTCDate=t=>{if(!this.hasUTCPlugin())throw new Error(bf);return this.setLocaleToValue(pr.utc(t))};createTZDate=(t,r)=>{if(!this.hasUTCPlugin())throw new Error(bf);if(!this.hasTimezonePlugin())throw new Error(Bv);const n=t!==void 0&&!t.endsWith("Z");return this.setLocaleToValue(pr(t).tz(this.cleanTimezone(r),n))};getLocaleFormats=()=>{const t=pr.Ls,r=this.locale||"en";let n=t[r];return n===void 0&&(process.env.NODE_ENV!=="production"&&br(["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."]),n=t.en),n.formats};adjustOffset=t=>{if(!this.hasTimezonePlugin())return t;const r=this.getTimezone(t);if(r!=="UTC"){const n=t.tz(this.cleanTimezone(r),!0);if(n.$offset===(t.$offset??0))return t;t.$offset=n.$offset}return t};date=(t,r="default")=>t===null?null:r==="UTC"?this.createUTCDate(t):r==="system"||r==="default"&&!this.hasTimezonePlugin()?this.createSystemDate(t):this.createTZDate(t,r);getInvalidDate=()=>pr(new Date("Invalid date"));getTimezone=t=>{if(this.hasTimezonePlugin()){const r=t.$x?.$timezone;if(r)return r}return this.hasUTCPlugin()&&t.isUTC()?"UTC":"system"};setTimezone=(t,r)=>{if(this.getTimezone(t)===r)return t;if(r==="UTC"){if(!this.hasUTCPlugin())throw new Error(bf);return t.utc()}if(r==="system")return t.local();if(!this.hasTimezonePlugin()){if(r==="default")return t;throw new Error(Bv)}return this.setLocaleToValue(pr.tz(t,this.cleanTimezone(r)))};toJsDate=t=>t.toDate();parse=(t,r)=>t===""?null:pr(t,r,this.locale,!0);getCurrentLocaleCode=()=>this.locale||"en";is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||"");expandFormat=t=>{const r=this.getLocaleFormats(),n=o=>o.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(s,l,a)=>l||a.slice(1));return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(o,s,l)=>{const a=l&&l.toUpperCase();return s||r[l]||n(r[a])})};isValid=t=>t==null?!1:t.isValid();format=(t,r)=>this.formatByString(t,this.formats[r]);formatByString=(t,r)=>this.setLocaleToValue(t).format(r);formatNumber=t=>t;isEqual=(t,r)=>t===null&&r===null?!0:t===null||r===null?!1:t.toDate().getTime()===r.toDate().getTime();isSameYear=(t,r)=>this.isSame(t,r,"YYYY");isSameMonth=(t,r)=>this.isSame(t,r,"YYYY-MM");isSameDay=(t,r)=>this.isSame(t,r,"YYYY-MM-DD");isSameHour=(t,r)=>t.isSame(r,"hour");isAfter=(t,r)=>t>r;isAfterYear=(t,r)=>this.hasUTCPlugin()?!this.isSameYear(t,r)&&t.utc()>r.utc():t.isAfter(r,"year");isAfterDay=(t,r)=>this.hasUTCPlugin()?!this.isSameDay(t,r)&&t.utc()>r.utc():t.isAfter(r,"day");isBefore=(t,r)=>t<r;isBeforeYear=(t,r)=>this.hasUTCPlugin()?!this.isSameYear(t,r)&&t.utc()<r.utc():t.isBefore(r,"year");isBeforeDay=(t,r)=>this.hasUTCPlugin()?!this.isSameDay(t,r)&&t.utc()<r.utc():t.isBefore(r,"day");isWithinRange=(t,[r,n])=>t>=r&&t<=n;startOfYear=t=>this.adjustOffset(t.startOf("year"));startOfMonth=t=>this.adjustOffset(t.startOf("month"));startOfWeek=t=>this.adjustOffset(this.setLocaleToValue(t).startOf("week"));startOfDay=t=>this.adjustOffset(t.startOf("day"));endOfYear=t=>this.adjustOffset(t.endOf("year"));endOfMonth=t=>this.adjustOffset(t.endOf("month"));endOfWeek=t=>this.adjustOffset(this.setLocaleToValue(t).endOf("week"));endOfDay=t=>this.adjustOffset(t.endOf("day"));addYears=(t,r)=>this.adjustOffset(t.add(r,"year"));addMonths=(t,r)=>this.adjustOffset(t.add(r,"month"));addWeeks=(t,r)=>this.adjustOffset(t.add(r,"week"));addDays=(t,r)=>this.adjustOffset(t.add(r,"day"));addHours=(t,r)=>this.adjustOffset(t.add(r,"hour"));addMinutes=(t,r)=>this.adjustOffset(t.add(r,"minute"));addSeconds=(t,r)=>this.adjustOffset(t.add(r,"second"));getYear=t=>t.year();getMonth=t=>t.month();getDate=t=>t.date();getHours=t=>t.hour();getMinutes=t=>t.minute();getSeconds=t=>t.second();getMilliseconds=t=>t.millisecond();setYear=(t,r)=>this.adjustOffset(t.set("year",r));setMonth=(t,r)=>this.adjustOffset(t.set("month",r));setDate=(t,r)=>this.adjustOffset(t.set("date",r));setHours=(t,r)=>this.adjustOffset(t.set("hour",r));setMinutes=(t,r)=>this.adjustOffset(t.set("minute",r));setSeconds=(t,r)=>this.adjustOffset(t.set("second",r));setMilliseconds=(t,r)=>this.adjustOffset(t.set("millisecond",r));getDaysInMonth=t=>t.daysInMonth();getWeekArray=t=>{const r=this.startOfWeek(this.startOfMonth(t)),n=this.endOfWeek(this.endOfMonth(t));let o=0,s=r;const l=[];for(;s<n;){const a=Math.floor(o/7);l[a]=l[a]||[],l[a].push(s),s=this.addDays(s,1),o+=1}return l};getWeekNumber=t=>t.week();getDayOfWeek(t){return t.day()+1}getYearRange=([t,r])=>{const n=this.startOfYear(t),o=this.endOfYear(r),s=[];let l=n;for(;this.isBefore(l,o);)s.push(l),l=this.addYears(l,1);return s}}const nee=({label:e,value:t,setValue:r,disabled:n,fullWidth:o})=>z.jsx(z.Fragment,{children:z.jsx(_I,{dateAdapter:Lv,children:z.jsx(dE,{label:e,value:t,onChange:s=>{r(s)},InputProps:{sx:{borderRadius:"16px"},color:s=>s.palette["gr-yellow"].main},size:"small",color:"gr-yellow",slotProps:{textField:{InputLabelProps:{sx:{color:"white !important"}}}},focused:!0,format:"YYYY-MM-DD",disabled:n,fullWidth:o})})}),iee=e=>{const{name:t={title:"",ncolumn:0},fields:r=[],actions:n={ncolumn:1,buttons:[{text:"Buscar",onClick:()=>{},variant:"contained",sx:{},icon:void 0}]}}=e,o=(s,l)=>{switch(s.element){case"SelectField":return z.jsx(mt,{size:s.ncolumn,children:z.jsx(qD,{label:s.label,placeholder:s.placeholder,value:s.value,setValue:s.setValue,values:s.values,disabled:s.disable,fullWidth:!0,white:!1})},l);case"MultiSelectField":return z.jsx(mt,{size:s.ncolumn,children:z.jsx(AD,{label:s.label,placeholder:s.placeholder,value:s.value,setValue:s.setValue,values:s.values,disabled:s.disable,fullWidth:!0,white:!1})},l);case"DateRangeField":return z.jsx(mt,{size:s.ncolumn,children:z.jsx(nee,{label:s.label,value:s.value,setValue:s.setValue,disabled:s.disable,fullWidth:!0})},l);default:return z.jsx(z.Fragment,{})}};return z.jsx(z.Fragment,{children:z.jsx(hr,{sx:{bgcolor:s=>s.palette.background.paper,height:"70px",borderTopLeftRadius:"20px",borderTopRightRadius:"20px",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",padding:"20px",gap:"20px"},children:z.jsxs(mt,{container:!0,spacing:2,sx:{flexGrow:1},children:[t.title&&z.jsx(mt,{size:t.ncolumn,sx:{display:"flex",alignItems:"center"},children:z.jsx(zr,{variant:"h4",color:"white",children:t.title})}),r.map((s,l)=>o(s,l)),n&&n.buttons.length>0&&z.jsx(mt,{size:n.ncolumn,sx:{display:"flex",justifyContent:"flex-end"},children:z.jsx(ap,{variant:"outlined",fullWidth:!0,sx:{"& .MuiButton-root":{borderRadius:"20px"}},children:n.buttons.map((s,l)=>z.jsx(Kn,{variant:s.variant,color:"gr-yellow",sx:s.sx,onClick:s.onClick,disableElevation:!0,children:s.icon?s.icon:z.jsx("span",{style:{marginTop:"2px"},children:s.text})},l))})})]})})})},oee=e=>z.jsxs(z.Fragment,{children:[z.jsx(Wy,{...e,showToolbar:!0,slots:{toolbar:iee},slotProps:{toolbar:{...e.toolbar}},sx:{border:"none",color:"black","& .MuiDataGrid-columnHeaderCheckbox":{backgroundColor:"white"},"& .MuiDataGrid-columnHeader":{backgroundColor:"white"},"& .MuiDataGrid-virtualScroller":{bgcolor:"white",borderBottomLeftRadius:"20px",borderBottomRightRadius:"20px"},"& .MuiDataGrid-checkboxInput":{color:t=>t.palette.background.paper},"& .MuiDataGrid-footerContainer":{borderTop:"none",fontWeight:"500",display:"flex",justifyContent:"center",alignItems:"center"},"& .MuiIconButton-root":{color:t=>t.palette.background.paper,"&.Mui-disabled":{color:"#888",backgroundColor:"#eee",opacity:.7}},"& .MuiDataGrid-row":{minHeight:64,maxHeight:"none"},"& .MuiDataGrid-cell":{minHeight:64,maxHeight:"none",display:"flex",alignItems:"center"}},loading:e.loading,checkboxSelection:e.checkboxSelection,pagination:!0,autoPageSize:!0,paginationModel:e.paginationModel,onPaginationModelChange:e.setPaginationModel,onRowSelectionModelChange:e.setRowSelectionModel,rowSelectionModel:e.rowSelectionModel,disableRowSelectionOnClick:e.disableRowSelectionOnClick,getRowHeight:()=>"auto"}),z.jsx(ZD,{contextMenu:e.contextMenu,setContextMenu:e.setContextMenu,options:e.options,checked:e.rowSelectionModel})]}),see=()=>{const[e,t]=me.useState(!1),[r,n]=me.useState([]),[o,s]=me.useState({pageSize:25,page:0}),[l,a]=me.useState({type:"include",ids:new Set}),[c,u]=me.useState(null);return{rows:r,setRows:n,loading:e,setLoading:t,paginationModel:o,setPaginationModel:s,rowSelectionModel:l,setRowSelectionModel:a,contextMenu:c,setContextMenu:u}},Xv=It(z.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel"),lee=It(z.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),aee=It(z.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"),cee=It(z.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"),uee=()=>{const{enqueueSnackbar:e}=x2(),t=n=>{Cq(n)};return{showAlert:(n,o)=>e(o,{variant:n,content:(l,a)=>z.jsx(Wd,{sx:{borderRadius:"24px",bgcolor:"#fff",boxShadow:3,color:c=>c.palette["gr-base-dark"].main},severity:n,iconMapping:{error:z.jsx(Xv,{}),info:z.jsx(cee,{}),success:z.jsx(lee,{}),warning:z.jsx(aee,{}),default:z.jsx(Ds,{color:"gr-blue",size:20})},onClose:()=>t(l),children:a},l)}),closeAlert:t}};var su={exports:{}},xf={},CE={exports:{}},Nv;function mee(){if(Nv)return CE.exports;Nv=1;function e(r){var n,o,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var l=r.length;for(n=0;n<l;n++)r[n]&&(o=e(r[n]))&&(s&&(s+=" "),s+=o)}else for(o in r)r[o]&&(s&&(s+=" "),s+=o);return s}function t(){for(var r,n,o=0,s="",l=arguments.length;o<l;o++)(r=arguments[o])&&(n=e(r))&&(s&&(s+=" "),s+=n);return s}return CE.exports=t,CE.exports.clsx=t,CE.exports}var ur={},So={},Dv;function pE(){if(Dv)return So;Dv=1,Object.defineProperty(So,"__esModule",{value:!0}),So.dontSetMe=o,So.findInArray=e,So.int=n,So.isFunction=t,So.isNum=r;function e(s,l){for(let a=0,c=s.length;a<c;a++)if(l.apply(l,[s[a],a,s]))return s[a]}function t(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Function]"}function r(s){return typeof s=="number"&&!isNaN(s)}function n(s){return parseInt(s,10)}function o(s,l,a){if(s[l])return new Error(`Invalid prop ${l} passed to ${a} - do not set this, set it on the child.`)}return So}var Yo={},$v;function Iee(){if($v)return Yo;$v=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.browserPrefixToKey=r,Yo.browserPrefixToStyle=n,Yo.default=void 0,Yo.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const l=window.document?.documentElement?.style;if(!l||s in l)return"";for(let a=0;a<e.length;a++)if(r(s,e[a])in l)return e[a];return""}function r(s,l){return l?`${l}${o(s)}`:s}function n(s,l){return l?`-${l.toLowerCase()}-${s}`:s}function o(s){let l="",a=!0;for(let c=0;c<s.length;c++)a?(l+=s[c].toUpperCase(),a=!1):s[c]==="-"?a=!0:l+=s[c];return l}return Yo.default=t(),Yo}var _v;function Ff(){if(_v)return ur;_v=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.addClassName=Z,ur.addEvent=l,ur.addUserSelectStyles=C,ur.createCSSTransform=M,ur.createSVGTransform=h,ur.getTouch=f,ur.getTouchIdentifier=V,ur.getTranslation=R,ur.innerHeight=m,ur.innerWidth=I,ur.matchesSelector=o,ur.matchesSelectorAndParentsTo=s,ur.offsetXYFromParent=d,ur.outerHeight=c,ur.outerWidth=u,ur.removeClassName=v,ur.removeEvent=a,ur.scheduleRemoveUserSelectStyles=p;var e=pE(),t=r(Iee());function r(g,q){if(typeof WeakMap=="function")var b=new WeakMap,x=new WeakMap;return(r=function(F,A){if(!A&&F&&F.__esModule)return F;var W,j,Y={__proto__:null,default:F};if(F===null||typeof F!="object"&&typeof F!="function")return Y;if(W=A?x:b){if(W.has(F))return W.get(F);W.set(F,Y)}for(const K in F)K!=="default"&&{}.hasOwnProperty.call(F,K)&&((j=(W=Object.defineProperty)&&Object.getOwnPropertyDescriptor(F,K))&&(j.get||j.set)?W(Y,K,j):Y[K]=F[K]);return Y})(g,q)}let n="";function o(g,q){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(b){return(0,e.isFunction)(g[b])})),(0,e.isFunction)(g[n])?g[n](q):!1}function s(g,q,b){let x=g;do{if(o(x,q))return!0;if(x===b)return!1;x=x.parentNode}while(x);return!1}function l(g,q,b,x){if(!g)return;const F={capture:!0,...x};g.addEventListener?g.addEventListener(q,b,F):g.attachEvent?g.attachEvent("on"+q,b):g["on"+q]=b}function a(g,q,b,x){if(!g)return;const F={capture:!0,...x};g.removeEventListener?g.removeEventListener(q,b,F):g.detachEvent?g.detachEvent("on"+q,b):g["on"+q]=null}function c(g){let q=g.clientHeight;const b=g.ownerDocument.defaultView.getComputedStyle(g);return q+=(0,e.int)(b.borderTopWidth),q+=(0,e.int)(b.borderBottomWidth),q}function u(g){let q=g.clientWidth;const b=g.ownerDocument.defaultView.getComputedStyle(g);return q+=(0,e.int)(b.borderLeftWidth),q+=(0,e.int)(b.borderRightWidth),q}function m(g){let q=g.clientHeight;const b=g.ownerDocument.defaultView.getComputedStyle(g);return q-=(0,e.int)(b.paddingTop),q-=(0,e.int)(b.paddingBottom),q}function I(g){let q=g.clientWidth;const b=g.ownerDocument.defaultView.getComputedStyle(g);return q-=(0,e.int)(b.paddingLeft),q-=(0,e.int)(b.paddingRight),q}function d(g,q,b){const F=q===q.ownerDocument.body?{left:0,top:0}:q.getBoundingClientRect(),A=(g.clientX+q.scrollLeft-F.left)/b,W=(g.clientY+q.scrollTop-F.top)/b;return{x:A,y:W}}function M(g,q){const b=R(g,q,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:b}}function h(g,q){return R(g,q,"")}function R(g,q,b){let{x,y:F}=g,A=`translate(${x}${b},${F}${b})`;if(q){const W=`${typeof q.x=="string"?q.x:q.x+b}`,j=`${typeof q.y=="string"?q.y:q.y+b}`;A=`translate(${W}, ${j})`+A}return A}function f(g,q){return g.targetTouches&&(0,e.findInArray)(g.targetTouches,b=>q===b.identifier)||g.changedTouches&&(0,e.findInArray)(g.changedTouches,b=>q===b.identifier)}function V(g){if(g.targetTouches&&g.targetTouches[0])return g.targetTouches[0].identifier;if(g.changedTouches&&g.changedTouches[0])return g.changedTouches[0].identifier}function C(g){if(!g)return;let q=g.getElementById("react-draggable-style-el");q||(q=g.createElement("style"),q.type="text/css",q.id="react-draggable-style-el",q.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
522
522
|
`,q.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
523
523
|
`,g.getElementsByTagName("head")[0].appendChild(q)),g.body&&Z(g.body,"react-draggable-transparent-selection")}function p(g){window.requestAnimationFrame?window.requestAnimationFrame(()=>{y(g)}):y(g)}function y(g){if(g)try{if(g.body&&v(g.body,"react-draggable-transparent-selection"),g.selection)g.selection.empty();else{const q=(g.defaultView||window).getSelection();q&&q.type!=="Caret"&&q.removeAllRanges()}}catch{}}function Z(g,q){g.classList?g.classList.add(q):g.className.match(new RegExp(`(?:^|\\s)${q}(?!\\S)`))||(g.className+=` ${q}`)}function v(g,q){g.classList?g.classList.remove(q):g.className=g.className.replace(new RegExp(`(?:^|\\s)${q}(?!\\S)`,"g"),"")}return ur}var bi={},e1;function t1(){if(e1)return bi;e1=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.canDragX=o,bi.canDragY=s,bi.createCoreData=a,bi.createDraggableData=c,bi.getBoundPosition=r,bi.getControlPosition=l,bi.snapToGrid=n;var e=pE(),t=Ff();function r(I,d,M){if(!I.props.bounds)return[d,M];let{bounds:h}=I.props;h=typeof h=="string"?h:u(h);const R=m(I);if(typeof h=="string"){const{ownerDocument:f}=R,V=f.defaultView;let C;if(h==="parent"?C=R.parentNode:C=R.getRootNode().querySelector(h),!(C instanceof V.HTMLElement))throw new Error('Bounds selector "'+h+'" could not find an element.');const p=C,y=V.getComputedStyle(R),Z=V.getComputedStyle(p);h={left:-R.offsetLeft+(0,e.int)(Z.paddingLeft)+(0,e.int)(y.marginLeft),top:-R.offsetTop+(0,e.int)(Z.paddingTop)+(0,e.int)(y.marginTop),right:(0,t.innerWidth)(p)-(0,t.outerWidth)(R)-R.offsetLeft+(0,e.int)(Z.paddingRight)-(0,e.int)(y.marginRight),bottom:(0,t.innerHeight)(p)-(0,t.outerHeight)(R)-R.offsetTop+(0,e.int)(Z.paddingBottom)-(0,e.int)(y.marginBottom)}}return(0,e.isNum)(h.right)&&(d=Math.min(d,h.right)),(0,e.isNum)(h.bottom)&&(M=Math.min(M,h.bottom)),(0,e.isNum)(h.left)&&(d=Math.max(d,h.left)),(0,e.isNum)(h.top)&&(M=Math.max(M,h.top)),[d,M]}function n(I,d,M){const h=Math.round(d/I[0])*I[0],R=Math.round(M/I[1])*I[1];return[h,R]}function o(I){return I.props.axis==="both"||I.props.axis==="x"}function s(I){return I.props.axis==="both"||I.props.axis==="y"}function l(I,d,M){const h=typeof d=="number"?(0,t.getTouch)(I,d):null;if(typeof d=="number"&&!h)return null;const R=m(M),f=M.props.offsetParent||R.offsetParent||R.ownerDocument.body;return(0,t.offsetXYFromParent)(h||I,f,M.props.scale)}function a(I,d,M){const h=!(0,e.isNum)(I.lastX),R=m(I);return h?{node:R,deltaX:0,deltaY:0,lastX:d,lastY:M,x:d,y:M}:{node:R,deltaX:d-I.lastX,deltaY:M-I.lastY,lastX:I.lastX,lastY:I.lastY,x:d,y:M}}function c(I,d){const M=I.props.scale;return{node:d.node,x:I.state.x+d.deltaX/M,y:I.state.y+d.deltaY/M,deltaX:d.deltaX/M,deltaY:d.deltaY/M,lastX:I.state.x,lastY:I.state.y}}function u(I){return{left:I.left,top:I.top,right:I.right,bottom:I.bottom}}function m(I){const d=I.findDOMNode();if(!d)throw new Error("<DraggableCore>: Unmounted during event!");return d}return bi}var lu={},ZE={},r1;function n1(){if(r1)return ZE;r1=1,Object.defineProperty(ZE,"__esModule",{value:!0}),ZE.default=e;function e(){}return ZE}var i1;function Eee(){if(i1)return lu;i1=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.default=void 0;var e=c(me),t=a(rd()),r=a(no),n=Ff(),o=t1(),s=pE(),l=a(n1());function a(R){return R&&R.__esModule?R:{default:R}}function c(R,f){if(typeof WeakMap=="function")var V=new WeakMap,C=new WeakMap;return(c=function(p,y){if(!y&&p&&p.__esModule)return p;var Z,v,g={__proto__:null,default:p};if(p===null||typeof p!="object"&&typeof p!="function")return g;if(Z=y?C:V){if(Z.has(p))return Z.get(p);Z.set(p,g)}for(const q in p)q!=="default"&&{}.hasOwnProperty.call(p,q)&&((v=(Z=Object.defineProperty)&&Object.getOwnPropertyDescriptor(p,q))&&(v.get||v.set)?Z(g,q,v):g[q]=p[q]);return g})(R,f)}function u(R,f,V){return(f=m(f))in R?Object.defineProperty(R,f,{value:V,enumerable:!0,configurable:!0,writable:!0}):R[f]=V,R}function m(R){var f=I(R,"string");return typeof f=="symbol"?f:f+""}function I(R,f){if(typeof R!="object"||!R)return R;var V=R[Symbol.toPrimitive];if(V!==void 0){var C=V.call(R,f);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(R)}const d={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let M=d.mouse,h=class extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",f=>{if(this.props.onMouseDown(f),!this.props.allowAnyClick&&typeof f.button=="number"&&f.button!==0)return!1;const V=this.findDOMNode();if(!V||!V.ownerDocument||!V.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:C}=V;if(this.props.disabled||!(f.target instanceof C.defaultView.Node)||this.props.handle&&!(0,n.matchesSelectorAndParentsTo)(f.target,this.props.handle,V)||this.props.cancel&&(0,n.matchesSelectorAndParentsTo)(f.target,this.props.cancel,V))return;f.type==="touchstart"&&!this.props.allowMobileScroll&&f.preventDefault();const p=(0,n.getTouchIdentifier)(f);this.touchIdentifier=p;const y=(0,o.getControlPosition)(f,p,this);if(y==null)return;const{x:Z,y:v}=y,g=(0,o.createCoreData)(this,Z,v);(0,l.default)("DraggableCore: handleDragStart: %j",g),(0,l.default)("calling",this.props.onStart),!(this.props.onStart(f,g)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,n.addUserSelectStyles)(C),this.dragging=!0,this.lastX=Z,this.lastY=v,(0,n.addEvent)(C,M.move,this.handleDrag),(0,n.addEvent)(C,M.stop,this.handleDragStop))}),u(this,"handleDrag",f=>{const V=(0,o.getControlPosition)(f,this.touchIdentifier,this);if(V==null)return;let{x:C,y:p}=V;if(Array.isArray(this.props.grid)){let v=C-this.lastX,g=p-this.lastY;if([v,g]=(0,o.snapToGrid)(this.props.grid,v,g),!v&&!g)return;C=this.lastX+v,p=this.lastY+g}const y=(0,o.createCoreData)(this,C,p);if((0,l.default)("DraggableCore: handleDrag: %j",y),this.props.onDrag(f,y)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const g=document.createEvent("MouseEvents");g.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(g)}return}this.lastX=C,this.lastY=p}),u(this,"handleDragStop",f=>{if(!this.dragging)return;const V=(0,o.getControlPosition)(f,this.touchIdentifier,this);if(V==null)return;let{x:C,y:p}=V;if(Array.isArray(this.props.grid)){let g=C-this.lastX||0,q=p-this.lastY||0;[g,q]=(0,o.snapToGrid)(this.props.grid,g,q),C=this.lastX+g,p=this.lastY+q}const y=(0,o.createCoreData)(this,C,p);if(this.props.onStop(f,y)===!1||this.mounted===!1)return!1;const v=this.findDOMNode();v&&this.props.enableUserSelectHack&&(0,n.scheduleRemoveUserSelectStyles)(v.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",y),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,v&&((0,l.default)("DraggableCore: Removing handlers"),(0,n.removeEvent)(v.ownerDocument,M.move,this.handleDrag),(0,n.removeEvent)(v.ownerDocument,M.stop,this.handleDragStop))}),u(this,"onMouseDown",f=>(M=d.mouse,this.handleDragStart(f))),u(this,"onMouseUp",f=>(M=d.mouse,this.handleDragStop(f))),u(this,"onTouchStart",f=>(M=d.touch,this.handleDragStart(f))),u(this,"onTouchEnd",f=>(M=d.touch,this.handleDragStop(f)))}componentDidMount(){this.mounted=!0;const f=this.findDOMNode();f&&(0,n.addEvent)(f,d.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const f=this.findDOMNode();if(f){const{ownerDocument:V}=f;(0,n.removeEvent)(V,d.mouse.move,this.handleDrag),(0,n.removeEvent)(V,d.touch.move,this.handleDrag),(0,n.removeEvent)(V,d.mouse.stop,this.handleDragStop),(0,n.removeEvent)(V,d.touch.stop,this.handleDragStop),(0,n.removeEvent)(f,d.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,n.scheduleRemoveUserSelectStyles)(V)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return lu.default=h,u(h,"displayName","DraggableCore"),u(h,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(R,f){if(R[f]&&R[f].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),u(h,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),lu}var o1;function dee(){return o1||(o1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=I(me),r=m(rd()),n=m(no),o=mee(),s=Ff(),l=t1(),a=pE(),c=m(Eee()),u=m(n1());function m(V){return V&&V.__esModule?V:{default:V}}function I(V,C){if(typeof WeakMap=="function")var p=new WeakMap,y=new WeakMap;return(I=function(Z,v){if(!v&&Z&&Z.__esModule)return Z;var g,q,b={__proto__:null,default:Z};if(Z===null||typeof Z!="object"&&typeof Z!="function")return b;if(g=v?y:p){if(g.has(Z))return g.get(Z);g.set(Z,b)}for(const x in Z)x!=="default"&&{}.hasOwnProperty.call(Z,x)&&((q=(g=Object.defineProperty)&&Object.getOwnPropertyDescriptor(Z,x))&&(q.get||q.set)?g(b,x,q):b[x]=Z[x]);return b})(V,C)}function d(){return d=Object.assign?Object.assign.bind():function(V){for(var C=1;C<arguments.length;C++){var p=arguments[C];for(var y in p)({}).hasOwnProperty.call(p,y)&&(V[y]=p[y])}return V},d.apply(null,arguments)}function M(V,C,p){return(C=h(C))in V?Object.defineProperty(V,C,{value:p,enumerable:!0,configurable:!0,writable:!0}):V[C]=p,V}function h(V){var C=R(V,"string");return typeof C=="symbol"?C:C+""}function R(V,C){if(typeof V!="object"||!V)return V;var p=V[Symbol.toPrimitive];if(p!==void 0){var y=p.call(V,C);if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(V)}class f extends t.Component{static getDerivedStateFromProps(C,p){let{position:y}=C,{prevPropsPosition:Z}=p;return y&&(!Z||y.x!==Z.x||y.y!==Z.y)?((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:y,prevPropsPosition:Z}),{x:y.x,y:y.y,prevPropsPosition:{...y}}):null}constructor(C){super(C),M(this,"onDragStart",(p,y)=>{if((0,u.default)("Draggable: onDragStart: %j",y),this.props.onStart(p,(0,l.createDraggableData)(this,y))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),M(this,"onDrag",(p,y)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",y);const Z=(0,l.createDraggableData)(this,y),v={x:Z.x,y:Z.y,slackX:0,slackY:0};if(this.props.bounds){const{x:q,y:b}=v;v.x+=this.state.slackX,v.y+=this.state.slackY;const[x,F]=(0,l.getBoundPosition)(this,v.x,v.y);v.x=x,v.y=F,v.slackX=this.state.slackX+(q-v.x),v.slackY=this.state.slackY+(b-v.y),Z.x=v.x,Z.y=v.y,Z.deltaX=v.x-this.state.x,Z.deltaY=v.y-this.state.y}if(this.props.onDrag(p,Z)===!1)return!1;this.setState(v)}),M(this,"onDragStop",(p,y)=>{if(!this.state.dragging||this.props.onStop(p,(0,l.createDraggableData)(this,y))===!1)return!1;(0,u.default)("Draggable: onDragStop: %j",y);const v={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:q,y:b}=this.props.position;v.x=q,v.y=b}this.setState(v)}),this.state={dragging:!1,dragged:!1,x:C.position?C.position.x:C.defaultPosition.x,y:C.position?C.position.y:C.defaultPosition.y,prevPropsPosition:{...C.position},slackX:0,slackY:0,isElementSVG:!1},C.position&&!(C.onDrag||C.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??n.default.findDOMNode(this)}render(){const{axis:C,bounds:p,children:y,defaultPosition:Z,defaultClassName:v,defaultClassNameDragging:g,defaultClassNameDragged:q,position:b,positionOffset:x,scale:F,...A}=this.props;let W={},j=null;const K=!!!b||this.state.dragging,U=b||Z,J={x:(0,l.canDragX)(this)&&K?this.state.x:U.x,y:(0,l.canDragY)(this)&&K?this.state.y:U.y};this.state.isElementSVG?j=(0,s.createSVGTransform)(J,x):W=(0,s.createCSSTransform)(J,x);const P=(0,o.clsx)(y.props.className||"",v,{[g]:this.state.dragging,[q]:this.state.dragged});return t.createElement(c.default,d({},A,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(y),{className:P,style:{...y.props.style,...W},transform:j}))}}e.default=f,M(f,"displayName","Draggable"),M(f,"propTypes",{...c.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),M(f,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(xf)),xf}var s1;function Mee(){if(s1)return su.exports;s1=1;const{default:e,DraggableCore:t}=dee();return su.exports=e,su.exports.default=e,su.exports.DraggableCore=t,su.exports}var Ree=Mee();const hee=io(Ree),fee=It(z.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Vee=e=>{const t=f_(e);return kv({manager:t,props:e})},zee=["slots","slotProps"],Kf=E.forwardRef(function(t,r){const n=hi({props:t,name:"MuiDateTimeField"}),{slots:o,slotProps:s}=n,l=Cr(n,zee),a=Vv({slotProps:s,ref:r,externalForwardedProps:l}),c=Vee(a);return z.jsx(fv,{slots:o,slotProps:s,fieldResponse:c,defaultOpenPickerIcon:yD})});process.env.NODE_ENV!=="production"&&(Kf.displayName="DateTimeField"),process.env.NODE_ENV!=="production"&&(Kf.propTypes={ampm:i.bool,autoFocus:i.bool,className:i.string,clearable:i.bool,clearButtonPosition:i.oneOf(["end","start"]),color:i.oneOf(["error","info","primary","secondary","success","warning"]),component:i.elementType,defaultValue:i.object,disabled:i.bool,disableFuture:i.bool,disableIgnoringDatePartForTimeValidation:i.bool,disablePast:i.bool,enableAccessibleFieldDOMStructure:i.bool,focused:i.bool,format:i.string,formatDensity:i.oneOf(["dense","spacious"]),FormHelperTextProps:i.object,fullWidth:i.bool,helperText:i.node,hiddenLabel:i.bool,id:i.string,InputLabelProps:i.object,inputProps:i.object,InputProps:i.object,inputRef:ta,label:i.node,margin:i.oneOf(["dense","none","normal"]),maxDate:i.object,maxDateTime:i.object,maxTime:i.object,minDate:i.object,minDateTime:i.object,minTime:i.object,minutesStep:i.number,name:i.string,onBlur:i.func,onChange:i.func,onClear:i.func,onError:i.func,onFocus:i.func,onSelectedSectionsChange:i.func,openPickerButtonPosition:i.oneOf(["end","start"]),readOnly:i.bool,referenceDate:i.object,required:i.bool,selectedSections:i.oneOfType([i.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),i.number]),shouldDisableDate:i.func,shouldDisableMonth:i.func,shouldDisableTime:i.func,shouldDisableYear:i.func,shouldRespectLeadingZeros:i.bool,size:i.oneOf(["medium","small"]),slotProps:i.object,slots:i.object,style:i.object,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),timezone:i.string,unstableFieldRef:i.oneOfType([i.func,i.object]),value:i.object,variant:i.oneOf(["filled","outlined","standard"])});const Cee=It(z.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),pee=({label:e,value:t,setValue:r,disabled:n,fullWidth:o,white:s})=>z.jsx(z.Fragment,{children:z.jsx(_I,{dateAdapter:Lv,children:z.jsx(Kf,{label:e,value:t,onChange:l=>{r(l)},InputProps:{sx:{borderRadius:"16px",color:s?"black !important":"white !important"}},size:"small",color:"gr-yellow",slotProps:{textField:{InputLabelProps:{sx:{color:s?"black !important":"white !important"}}}},focused:!0,format:"YYYY-MM-DD",disabled:n,fullWidth:o,endAdornment:z.jsx(zm,{position:"end",sx:{color:s?"black":"white"},children:z.jsx(Cee,{sx:{height:"18px",mt:"-4px"}})})})})}),Zee=It(z.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),qee=({label:e,placeholder:t,values:r,value:n,setValue:o,white:s})=>{const[l,a]=me.useState(!1);return z.jsx(z.Fragment,{children:z.jsx(Hd,{multiple:!0,options:r,getOptionLabel:c=>c.label,value:r.filter(c=>n.includes(c.value)),onChange:(c,u)=>{o(u.map(m=>m.value))},onOpen:()=>a(!0),onClose:()=>a(!1),renderInput:c=>z.jsx(fo,{...c,variant:"outlined",label:e,placeholder:t,sx:{backgroundColor:u=>s?"white":u.palette["gr-base-dark"].main,borderTopLeftRadius:"18px",borderTopRightRadius:"18px",borderBottomLeftRadius:l?"0px":"18px",borderBottomRightRadius:l?"0px":"18px",color:s?"black !important":"white !important","& .MuiChip-root":{maxWidth:"100px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"& .MuiAutocomplete-tag":{maxHeight:"32px",overflow:"hidden",display:"inline-flex",flexWrap:"nowrap"},"& .MuiAutocomplete-inputRoot":{flexWrap:"nowrap"}},slotProps:{inputLabel:{sx:{color:s?"black !important":"white !important"}}},color:"gr-yellow",focused:!0}),popupIcon:z.jsx(Zee,{sx:{color:s?"black":"white"}}),slotProps:{paper:{sx:{maxHeight:"500px",borderBottomLeftRadius:"32px",borderBottomRightRadius:"32px",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",backgroundColor:c=>s?"white":c.palette["gr-base-dark"].main,color:s?"black":"white"}},chip:{sx:{bgcolor:c=>s?`${c.palette["gr-grey"].light} !important`:`${c.palette["gr-grey"].main} !important`,color:s?"black":"white"},size:"small",deleteIcon:z.jsx(Xv,{sx:{color:s?"black !important":"white !important"}})}},limitTags:2,size:"small"})})},Aee=({label:e,value:t,setValue:r,values:n,placeholder:o,disabled:s,fullWidth:l,white:a})=>{const c=u=>z.jsx(uf,{...u,sx:{color:a?"black !important":"white !important",...u.sx}});return z.jsx(z.Fragment,{children:z.jsxs(_o,{fullWidth:l,focused:!0,children:[z.jsx(es,{id:`filter-table-label-${e}`,sx:{color:a?"black":"white",position:"absolute","&.Mui-focused":{color:a?"black":"white"},'&[data-shrink="false"]':{transform:"translateY(12px) translateX(12px)"}},children:e}),z.jsxs(ho,{labelId:`filter-table-label-${e}`,id:`filter-${e}`,value:t,label:e,onChange:u=>r(u.target.value),color:"gr-yellow",sx:{color:a?"black":"white"},IconComponent:c,MenuProps:{PaperProps:{style:{maxHeight:"500px",borderBottomLeftRadius:"32px",borderBottomRightRadius:"32px",borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},MenuListProps:{sx:{backgroundColor:u=>a?"white":u.palette["gr-base-dark"].main,"& .MuiMenuItem-root":{backgroundColor:u=>a?"white":u.palette["gr-base-dark"].main,color:a?"black":"white","&:hover":{backgroundColor:u=>a?"white":u.palette["gr-base-dark"].main},"&.Mui-selected":{backgroundColor:u=>a?"white":u.palette["gr-base-dark"].main},"&.Mui-focusVisible":{backgroundColor:u=>a?"white":u.palette["gr-base-dark"].main}}}}},displayEmpty:!0,disabled:s,children:[z.jsx(Dn,{sx:{mt:2},disabled:!0,value:"",children:z.jsx("em",{children:o})}),n.map(u=>z.jsx(Dn,{value:u.value,children:u.label},u.value))]})]})})};function au(...e){const t=E.useRef(void 0),r=E.useCallback(n=>{const o=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const l=s,a=l(n);return typeof a=="function"?a:()=>{l(null)}}return s.current=n,()=>{s.current=null}});return()=>{o.forEach(s=>s?.())}},e);return E.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}function gee(e){return typeof e=="string"}function yee(e,t,r){return e===void 0||gee(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function On(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function l1(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function vee(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:s}=e;if(!t){const M=oe(r?.className,s,o?.className,n?.className),h={...r?.style,...o?.style,...n?.style},R={...r,...o,...n};return M.length>0&&(R.className=M),Object.keys(h).length>0&&(R.style=h),{props:R,internalRef:void 0}}const l=On({...o,...n}),a=l1(n),c=l1(o),u=t(l),m=oe(u?.className,r?.className,s,o?.className,n?.className),I={...u?.style,...r?.style,...o?.style,...n?.style},d={...u,...r,...c,...a};return m.length>0&&(d.className=m),Object.keys(I).length>0&&(d.style=I),{props:d,internalRef:u.ref}}function Sf(e,t,r){return typeof e=="function"?e(t,r):e}function Gn(e){const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:o=!1,...s}=e,l=o?{}:Sf(r,n),{props:a,internalRef:c}=vee({...s,externalSlotProps:l}),u=au(c,l?.ref,e.additionalProps?.ref);return yee(t,{...a,ref:u},n)}function a1(e){return hi}function bee(e){return Qm("MuiSimpleTreeView",e)}mZ("MuiSimpleTreeView",["root","item","itemContent","itemGroupTransition","itemIconContainer","itemLabel","itemCheckbox"]);const c1={};function u1(e,t){const r=E.useRef(c1);return r.current===c1&&(r.current=e(t)),r}const xee=e=>e.isPropagationStopped!==void 0,m1=()=>{const[e]=E.useState(()=>new H7),t=E.useCallback((...n)=>{const[o,s,l={}]=n;l.defaultMuiPrevented=!1,!(xee(l)&&l.isPropagationStopped())&&e.emit(o,s,l)},[e]),r=E.useCallback((n,o)=>(e.on(n,o),()=>{e.removeListener(n,o)}),[e]);return{instance:{$$publishEvent:t,$$subscribeEvent:r}}};m1.params={};const I1=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};I1.params={};const cu={treeId:at(e=>e.id.treeId)};let E1=0;const Fee=()=>(E1+=1,`mui-tree-view-${E1}`),qE=({id:e,treeId:t="",itemId:r})=>e??`${t}-${r}`,Yf=({params:e,store:t})=>{E.useEffect(()=>{const n=t.state.id;e.id===n.providedTreeId&&n.treeId!==void 0||t.set("id",Ce({},n,{treeId:e.id??Fee()}))},[t,e.id]);const r=Rt(t,cu.treeId);return{getRootProps:()=>({id:r})}};Yf.params={id:!0},Yf.getInitialState=({id:e})=>({id:{treeId:void 0,providedTreeId:e}});const Kee=[m1,I1,Yf],See=["apiRef"],Yee=e=>{let{props:{apiRef:t},plugins:r}=e,n=Gs(e.props,See);const o=E.useMemo(()=>{const a={};return r.forEach(c=>{Object.assign(a,c.params)}),a},[r]),{forwardedProps:s,pluginParams:l}=E.useMemo(()=>{const a={},c={};Object.keys(n).forEach(m=>{const I=n[m];o[m]?a[m]=I:c[m]=I});const u=r.reduce((m,I)=>I.applyDefaultValuesToParams?I.applyDefaultValuesToParams({params:m}):m,a);return{forwardedProps:c,pluginParams:u}},[r,n,o]);return{forwardedProps:s,pluginParams:l,apiRef:t}},Wee=e=>{const{plugins:t,instance:r,publicAPI:n,store:o,rootRef:s}=e,l=E.useCallback(u=>{let m=null,I=null;const d=[],M={};t.forEach(f=>{if(!f.itemPlugin)return;const V=f.itemPlugin({props:u,rootRef:m,contentRef:I});V?.rootRef&&(m=V.rootRef),V?.contentRef&&(I=V.contentRef),V?.propsEnhancers&&(d.push(V.propsEnhancers),Object.keys(V.propsEnhancers).forEach(C=>{M[C]=!0}))});const h=f=>V=>{const C={};return d.forEach(p=>{const y=p[f];y!=null&&Object.assign(C,y(V))}),C},R=Object.fromEntries(Object.keys(M).map(f=>[f,h(f)]));return{contentRef:I,rootRef:m,propsEnhancers:R}},[t]),a=E.useCallback(({itemId:u,children:m,idAttribute:I})=>{let d=m;for(let M=t.length-1;M>=0;M-=1){const h=t[M];h.wrapItem&&(d=h.wrapItem({instance:r,itemId:u,children:d,idAttribute:I}))}return d},[t,r]),c=E.useCallback(({children:u})=>{let m=u;for(let I=t.length-1;I>=0;I-=1){const d=t[I];d.wrapRoot&&(m=d.wrapRoot({children:m}))}return m},[t]);return E.useMemo(()=>({runItemPlugins:l,wrapItem:a,wrapRoot:c,instance:r,publicAPI:n,store:o,rootRef:s}),[l,a,c,r,n,o,s])};function kee(e){return e.current==null&&(e.current={}),e}function jee(e){const t=E.useRef({});return e?kee(e):t}const Uee=({plugins:e,rootRef:t,props:r})=>{const n=E.useMemo(()=>[...Kee,...e],[e]),{pluginParams:o,forwardedProps:s,apiRef:l}=Yee({plugins:n,props:r}),a=u1(()=>({})).current,c=jee(l),u=E.useRef(null),m=au(u,t),I=u1(()=>{const f={};for(const V of n)V.getInitialState&&Object.assign(f,V.getInitialState(o));return new zc(f)}).current,d=Wee({plugins:n,instance:a,publicAPI:c.current,store:I,rootRef:u}),M=[],h=f=>{const V=f({instance:a,params:o,rootRef:u,plugins:n,store:I});V.getRootProps&&M.push(V.getRootProps),V.publicAPI&&Object.assign(c.current,V.publicAPI),V.instance&&Object.assign(a,V.instance)};return n.forEach(h),{getRootProps:(f={})=>{const V=Ce({role:"tree"},s,f,{ref:m});return M.forEach(C=>{Object.assign(V,C(f))}),V},rootRef:m,contextValue:d}},Wf=E.createContext(null);process.env.NODE_ENV!=="production"&&(Wf.displayName="TreeViewContext");const ys=()=>{const e=E.useContext(Wf);if(e==null)throw new Error(["MUI X: Could not find the Tree View context.","It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join(`
|
|
524
524
|
`));return e},kf=E.createContext({classes:{},slots:{},slotProps:{}});process.env.NODE_ENV!=="production"&&(kf.displayName="TreeViewStyleContext");const d1=()=>E.useContext(kf),jf={};function Qee(e){const{contextValue:t,classes:r=jf,slots:n=jf,slotProps:o=jf,children:s}=e,l=E.useMemo(()=>({classes:r,slots:{collapseIcon:n.collapseIcon,expandIcon:n.expandIcon,endIcon:n.endIcon},slotProps:{collapseIcon:o.collapseIcon,expandIcon:o.expandIcon,endIcon:o.endIcon}}),[r,n.collapseIcon,n.expandIcon,n.endIcon,o.collapseIcon,o.expandIcon,o.endIcon]);return z.jsx(Wf.Provider,{value:t,children:z.jsx(kf.Provider,{value:l,children:t.wrapRoot({children:s})})})}function sn(e){const t=E.useRef(e);return Pi(()=>{t.current=e}),E.useRef((...r)=>(0,t.current)(...r)).current}const uu=(e,t,r)=>{e.$$publishEvent(t,r)},sa="__TREE_VIEW_ROOT_PARENT_ID__",M1=e=>{const t={};return e.forEach((r,n)=>{t[r]=n}),t},AE=(e,t)=>{if(t==null)return!1;let r=e[t];if(!r)return!1;if(r.disabled)return!0;for(;r.parentId!=null;){if(r=e[r.parentId],!r)return!1;if(r.disabled)return!0}return!1},la=E.createContext(()=>-1);process.env.NODE_ENV!=="production"&&(la.displayName="TreeViewItemDepthContext");const Pee=[],Pe={isLoading:at(e=>e.items.loading),error:at(e=>e.items.error),disabledItemFocusable:at(e=>e.items.disabledItemsFocusable),itemMetaLookup:at(e=>e.items.itemMetaLookup),itemMeta:at((e,t)=>e.items.itemMetaLookup[t??sa]??null),itemOrderedChildrenIds:at((e,t)=>e.items.itemOrderedChildrenIdsLookup[t??sa]??Pee),itemModel:at((e,t)=>e.items.itemModelLookup[t]),isItemDisabled:at((e,t)=>AE(e.items.itemMetaLookup,t)),itemIndex:at((e,t)=>{const r=e.items.itemMetaLookup[t];return r==null?-1:e.items.itemChildrenIndexesLookup[r.parentId??sa][r.id]}),itemParentId:at((e,t)=>e.items.itemMetaLookup[t]?.parentId??null),itemDepth:at((e,t)=>e.items.itemMetaLookup[t]?.depth??0),canItemBeFocused:at((e,t)=>e.items.disabledItemsFocusable||!AE(e.items.itemMetaLookup,t))},Jee=(e,t,r)=>{if(e==null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.","An item was provided without id in the `items` prop:",JSON.stringify(t)].join(`
|