finform-react-builder 1.12.4 → 1.12.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- "use strict";var Gc=Object.defineProperty;var bs=e=>{throw TypeError(e)};var Qc=(e,t,r)=>t in e?Gc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pn=(e,t,r)=>Qc(e,typeof t!="symbol"?t+"":t,r),Pi=(e,t,r)=>t.has(e)||bs("Cannot "+r);var O=(e,t,r)=>(Pi(e,t,"read from private field"),r?r.call(e):t.get(e)),me=(e,t,r)=>t.has(e)?bs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),oe=(e,t,r,n)=>(Pi(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),xe=(e,t,r)=>(Pi(e,t,"access private method"),r);var Dn=(e,t,r,n)=>({set _(i){oe(e,t,i,r)},get _(){return O(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),$=require("react"),g=require("@mui/material"),Zc=require("@emotion/styled"),fr=require("@emotion/react");function Xc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ae=Xc($);var An=e=>e.type==="checkbox",br=e=>e instanceof Date,nt=e=>e==null;const ll=e=>typeof e=="object";var Le=e=>!nt(e)&&!Array.isArray(e)&&ll(e)&&!br(e),cl=e=>Le(e)&&e.target?An(e.target)?e.target.checked:e.target.value:e,Jc=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ul=(e,t)=>e.has(Jc(t)),eu=e=>{const t=e.constructor&&e.constructor.prototype;return Le(t)&&t.hasOwnProperty("isPrototypeOf")},Na=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function $e(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Na&&(e instanceof Blob||n))&&(r||Le(e)))if(t=r?[]:{},!r&&!eu(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=$e(e[i]));else return e;return t}var vi=e=>/^\w*$/.test(e),Ae=e=>e===void 0,bi=e=>Array.isArray(e)?e.filter(Boolean):[],La=e=>bi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),te=(e,t,r)=>{if(!t||!Le(e))return r;const n=(vi(t)?[t]:La(t)).reduce((i,a)=>nt(i)?i:i[a],e);return Ae(n)||n===e?Ae(e[t])?r:e[t]:n},ft=e=>typeof e=="boolean",we=(e,t,r)=>{let n=-1;const i=vi(t)?[t]:La(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let c=r;if(n!==s){const p=e[o];c=Le(p)||Array.isArray(p)?p:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=c,e=e[o]}};const Jn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ct={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},pl=$.createContext(null);pl.displayName="HookFormContext";const wi=()=>$.useContext(pl);var dl=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const s=a;return t._proxyFormState[s]!==Ct.all&&(t._proxyFormState[s]=!n||Ct.all),r&&(r[s]=!0),e[s]}});return i};const Si=typeof window<"u"?ae.useLayoutEffect:ae.useEffect;function tu(e){const t=wi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=$.useState(r._formState),c=$.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Si(()=>r._subscribe({name:i,formState:c.current,exact:a,callback:p=>{!n&&o({...r._formState,...p})}}),[i,n,a]),$.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),$.useMemo(()=>dl(s,r,c.current,!1),[s,r])}var zt=e=>typeof e=="string",fl=(e,t,r,n,i)=>zt(e)?(n&&t.watch.add(e),te(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),te(r,a))):(n&&(t.watchAll=!0),r);function hl(e){const t=wi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=$.useRef(i),[c,p]=$.useState(r._getWatch(n,o.current));return Si(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:d=>!a&&p(fl(n,r._names,d.values||r._formValues,!1,o.current))}),[n,r,a,s]),$.useEffect(()=>r._removeUnmounted()),c}function ru(e){const t=wi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=ul(i._names.array,r),o=hl({control:i,name:r,defaultValue:te(i._formValues,r,te(i._defaultValues,r,e.defaultValue)),exact:!0}),c=tu({control:i,name:r,exact:!0}),p=$.useRef(e),d=$.useRef(i.register(r,{...e.rules,value:o,...ft(e.disabled)?{disabled:e.disabled}:{}})),f=$.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!te(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!te(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!te(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!te(c.validatingFields,r)},error:{enumerable:!0,get:()=>te(c.errors,r)}}),[c,r]),u=$.useCallback(S=>d.current.onChange({target:{value:cl(S),name:r},type:Jn.CHANGE}),[r]),x=$.useCallback(()=>d.current.onBlur({target:{value:te(i._formValues,r),name:r},type:Jn.BLUR}),[r,i._formValues]),E=$.useCallback(S=>{const v=te(i._fields,r);v&&S&&(v._f.ref={focus:()=>S.focus&&S.focus(),select:()=>S.select&&S.select(),setCustomValidity:j=>S.setCustomValidity(j),reportValidity:()=>S.reportValidity()})},[i._fields,r]),m=$.useMemo(()=>({name:r,value:o,...ft(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:u,onBlur:x,ref:E}),[r,n,c.disabled,u,x,E,o]);return $.useEffect(()=>{const S=i._options.shouldUnregister||a;i.register(r,{...p.current.rules,...ft(p.current.disabled)?{disabled:p.current.disabled}:{}});const v=(j,D)=>{const F=te(i._fields,j);F&&F._f&&(F._f.mount=D)};if(v(r,!0),S){const j=$e(te(i._options.defaultValues,r));we(i._defaultValues,r,j),Ae(te(i._formValues,r))&&we(i._formValues,r,j)}return!s&&i.register(r),()=>{(s?S&&!i._state.action:S)?i.unregister(r):v(r,!1)}},[r,i,s,a]),$.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),$.useMemo(()=>({field:m,formState:c,fieldState:f}),[m,c,f])}const Re=e=>e.render(ru(e));var ml=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},ut=e=>Array.isArray(e)?e:[e],ws=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},la=e=>nt(e)||!ll(e);function Jt(e,t){if(la(e)||la(t))return e===t;if(br(e)&&br(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const s=t[i];if(br(a)&&br(s)||Le(a)&&Le(s)||Array.isArray(a)&&Array.isArray(s)?!Jt(a,s):a!==s)return!1}}return!0}var rt=e=>Le(e)&&!Object.keys(e).length,qa=e=>e.type==="file",At=e=>typeof e=="function",ei=e=>{if(!Na)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},gl=e=>e.type==="select-multiple",Wa=e=>e.type==="radio",nu=e=>Wa(e)||An(e),Di=e=>ei(e)&&e.isConnected;function iu(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Ae(e)?n++:e[t[n++]];return e}function au(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ae(e[t]))return!1;return!0}function He(e,t){const r=Array.isArray(t)?t:vi(t)?[t]:La(t),n=r.length===1?e:iu(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Le(n)&&rt(n)||Array.isArray(n)&&au(n))&&He(e,r.slice(0,-1)),e}var yl=e=>{for(const t in e)if(At(e[t]))return!0;return!1};function ti(e,t={}){const r=Array.isArray(e);if(Le(e)||r)for(const n in e)Array.isArray(e[n])||Le(e[n])&&!yl(e[n])?(t[n]=Array.isArray(e[n])?[]:{},ti(e[n],t[n])):nt(e[n])||(t[n]=!0);return t}function xl(e,t,r){const n=Array.isArray(e);if(Le(e)||n)for(const i in e)Array.isArray(e[i])||Le(e[i])&&!yl(e[i])?Ae(t)||la(r[i])?r[i]=Array.isArray(e[i])?ti(e[i],[]):{...ti(e[i])}:xl(e[i],nt(t)?{}:t[i],r[i]):r[i]=!Jt(e[i],t[i]);return r}var dn=(e,t)=>xl(e,t,ti(t));const Ss={value:!1,isValid:!1},Cs={value:!0,isValid:!0};var vl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ae(e[0].attributes.value)?Ae(e[0].value)||e[0].value===""?Cs:{value:e[0].value,isValid:!0}:Cs:Ss}return Ss},bl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ae(e)?e:t?e===""?NaN:e&&+e:r&&zt(e)?new Date(e):n?n(e):e;const Es={isValid:!1,value:null};var wl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Es):Es;function ks(e){const t=e.ref;return qa(t)?t.files:Wa(t)?wl(e.refs).value:gl(t)?[...t.selectedOptions].map(({value:r})=>r):An(t)?vl(e.refs).value:bl(Ae(t.value)?e.ref.value:t.value,e)}var su=(e,t,r,n)=>{const i={};for(const a of e){const s=te(t,a);s&&we(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},ri=e=>e instanceof RegExp,fn=e=>Ae(e)?e:ri(e)?e.source:Le(e)?ri(e.value)?e.value.source:e.value:e,Ur=e=>({isOnSubmit:!e||e===Ct.onSubmit,isOnBlur:e===Ct.onBlur,isOnChange:e===Ct.onChange,isOnAll:e===Ct.all,isOnTouch:e===Ct.onTouched});const Ts="AsyncFunction";var ou=e=>!!e&&!!e.validate&&!!(At(e.validate)&&e.validate.constructor.name===Ts||Le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ts)),lu=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ca=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Kr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=te(e,i);if(a){const{_f:s,...o}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Kr(o,t))break}else if(Le(o)&&Kr(o,t))break}}};function js(e,t,r){const n=te(e,r);if(n||vi(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=te(t,a),o=te(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};i.pop()}return{name:r}}var cu=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return rt(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||Ct.all))},uu=(e,t,r)=>!e||!t||e===t||ut(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),pu=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,du=(e,t)=>!bi(te(e,t)).length&&He(e,t),Sl=(e,t,r)=>{const n=ut(te(e,r));return we(n,"root",t[r]),we(e,r,n),e},Hn=e=>zt(e);function Fs(e,t,r="validate"){if(Hn(e)||Array.isArray(e)&&e.every(Hn)||ft(e)&&!e)return{type:r,message:Hn(e)?e:"",ref:t}}var zr=e=>Le(e)&&!ri(e)?e:{value:e,message:""},ua=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:c,maxLength:p,minLength:d,min:f,max:u,pattern:x,validate:E,name:m,valueAsNumber:S,mount:v}=e._f,j=te(r,m);if(!v||t.has(m))return{};const D=o?o[0]:s,F=q=>{i&&D.reportValidity&&(D.setCustomValidity(ft(q)?"":q||""),D.reportValidity())},C={},_=Wa(s),I=An(s),R=_||I,Y=(S||qa(s))&&Ae(s.value)&&Ae(j)||ei(s)&&s.value===""||j===""||Array.isArray(j)&&!j.length,h=ml.bind(null,m,n,C),B=(q,Z,L,H=Bt.maxLength,G=Bt.minLength)=>{const ne=q?Z:L;C[m]={type:q?H:G,message:ne,ref:s,...h(q?H:G,ne)}};if(a?!Array.isArray(j)||!j.length:c&&(!R&&(Y||nt(j))||ft(j)&&!j||I&&!vl(o).isValid||_&&!wl(o).isValid)){const{value:q,message:Z}=Hn(c)?{value:!!c,message:c}:zr(c);if(q&&(C[m]={type:Bt.required,message:Z,ref:D,...h(Bt.required,Z)},!n))return F(Z),C}if(!Y&&(!nt(f)||!nt(u))){let q,Z;const L=zr(u),H=zr(f);if(!nt(j)&&!isNaN(j)){const G=s.valueAsNumber||j&&+j;nt(L.value)||(q=G>L.value),nt(H.value)||(Z=G<H.value)}else{const G=s.valueAsDate||new Date(j),ne=U=>new Date(new Date().toDateString()+" "+U),ue=s.type=="time",P=s.type=="week";zt(L.value)&&j&&(q=ue?ne(j)>ne(L.value):P?j>L.value:G>new Date(L.value)),zt(H.value)&&j&&(Z=ue?ne(j)<ne(H.value):P?j<H.value:G<new Date(H.value))}if((q||Z)&&(B(!!q,L.message,H.message,Bt.max,Bt.min),!n))return F(C[m].message),C}if((p||d)&&!Y&&(zt(j)||a&&Array.isArray(j))){const q=zr(p),Z=zr(d),L=!nt(q.value)&&j.length>+q.value,H=!nt(Z.value)&&j.length<+Z.value;if((L||H)&&(B(L,q.message,Z.message),!n))return F(C[m].message),C}if(x&&!Y&&zt(j)){const{value:q,message:Z}=zr(x);if(ri(q)&&!j.match(q)&&(C[m]={type:Bt.pattern,message:Z,ref:s,...h(Bt.pattern,Z)},!n))return F(Z),C}if(E){if(At(E)){const q=await E(j,r),Z=Fs(q,D);if(Z&&(C[m]={...Z,...h(Bt.validate,Z.message)},!n))return F(Z.message),C}else if(Le(E)){let q={};for(const Z in E){if(!rt(q)&&!n)break;const L=Fs(await E[Z](j,r),D,Z);L&&(q={...L,...h(Z,L.message)},F(L.message),n&&(C[m]=q))}if(!rt(q)&&(C[m]={ref:D,...q},!n))return C}}return F(!0),C};const fu={mode:Ct.onSubmit,reValidateMode:Ct.onChange,shouldFocusError:!0};function hu(e={}){let t={...fu,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:At(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const n={};let i=Le(t.defaultValues)||Le(t.values)?$e(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:$e(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,p=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const u={array:ws(),state:ws()},x=t.criteriaMode===Ct.all,E=w=>T=>{clearTimeout(p),p=setTimeout(w,T)},m=async w=>{if(!t.disabled&&(d.isValid||f.isValid||w)){const T=t.resolver?rt((await I()).errors):await Y(n,!0);T!==r.isValid&&u.state.next({isValid:T})}},S=(w,T)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((w||Array.from(o.mount)).forEach(y=>{y&&(T?we(r.validatingFields,y,T):He(r.validatingFields,y))}),u.state.next({validatingFields:r.validatingFields,isValidating:!rt(r.validatingFields)}))},v=(w,T=[],y,M,b=!0,A=!0)=>{if(M&&y&&!t.disabled){if(s.action=!0,A&&Array.isArray(te(n,w))){const V=y(te(n,w),M.argA,M.argB);b&&we(n,w,V)}if(A&&Array.isArray(te(r.errors,w))){const V=y(te(r.errors,w),M.argA,M.argB);b&&we(r.errors,w,V),du(r.errors,w)}if((d.touchedFields||f.touchedFields)&&A&&Array.isArray(te(r.touchedFields,w))){const V=y(te(r.touchedFields,w),M.argA,M.argB);b&&we(r.touchedFields,w,V)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=dn(i,a)),u.state.next({name:w,isDirty:B(w,T),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else we(a,w,T)},j=(w,T)=>{we(r.errors,w,T),u.state.next({errors:r.errors})},D=w=>{r.errors=w,u.state.next({errors:r.errors,isValid:!1})},F=(w,T,y,M)=>{const b=te(n,w);if(b){const A=te(a,w,Ae(y)?te(i,w):y);Ae(A)||M&&M.defaultChecked||T?we(a,w,T?A:ks(b._f)):L(w,A),s.mount&&m()}},C=(w,T,y,M,b)=>{let A=!1,V=!1;const z={name:w};if(!t.disabled){if(!y||M){(d.isDirty||f.isDirty)&&(V=r.isDirty,r.isDirty=z.isDirty=B(),A=V!==z.isDirty);const K=Jt(te(i,w),T);V=!!te(r.dirtyFields,w),K?He(r.dirtyFields,w):we(r.dirtyFields,w,!0),z.dirtyFields=r.dirtyFields,A=A||(d.dirtyFields||f.dirtyFields)&&V!==!K}if(y){const K=te(r.touchedFields,w);K||(we(r.touchedFields,w,y),z.touchedFields=r.touchedFields,A=A||(d.touchedFields||f.touchedFields)&&K!==y)}A&&b&&u.state.next(z)}return A?z:{}},_=(w,T,y,M)=>{const b=te(r.errors,w),A=(d.isValid||f.isValid)&&ft(T)&&r.isValid!==T;if(t.delayError&&y?(c=E(()=>j(w,y)),c(t.delayError)):(clearTimeout(p),c=null,y?we(r.errors,w,y):He(r.errors,w)),(y?!Jt(b,y):b)||!rt(M)||A){const V={...M,...A&&ft(T)?{isValid:T}:{},errors:r.errors,name:w};r={...r,...V},u.state.next(V)}},I=async w=>{S(w,!0);const T=await t.resolver(a,t.context,su(w||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return S(w),T},R=async w=>{const{errors:T}=await I(w);if(w)for(const y of w){const M=te(T,y);M?we(r.errors,y,M):He(r.errors,y)}else r.errors=T;return T},Y=async(w,T,y={valid:!0})=>{for(const M in w){const b=w[M];if(b){const{_f:A,...V}=b;if(A){const z=o.array.has(A.name),K=b._f&&ou(b._f);K&&d.validatingFields&&S([M],!0);const fe=await ua(b,o.disabled,a,x,t.shouldUseNativeValidation&&!T,z);if(K&&d.validatingFields&&S([M]),fe[A.name]&&(y.valid=!1,T))break;!T&&(te(fe,A.name)?z?Sl(r.errors,fe,A.name):we(r.errors,A.name,fe[A.name]):He(r.errors,A.name))}!rt(V)&&await Y(V,T,y)}}return y.valid},h=()=>{for(const w of o.unMount){const T=te(n,w);T&&(T._f.refs?T._f.refs.every(y=>!Di(y)):!Di(T._f.ref))&&Q(w)}o.unMount=new Set},B=(w,T)=>!t.disabled&&(w&&T&&we(a,w,T),!Jt(U(),i)),q=(w,T,y)=>fl(w,o,{...s.mount?a:Ae(T)?i:zt(w)?{[w]:T}:T},y,T),Z=w=>bi(te(s.mount?a:i,w,t.shouldUnregister?te(i,w,[]):[])),L=(w,T,y={})=>{const M=te(n,w);let b=T;if(M){const A=M._f;A&&(!A.disabled&&we(a,w,bl(T,A)),b=ei(A.ref)&&nt(T)?"":T,gl(A.ref)?[...A.ref.options].forEach(V=>V.selected=b.includes(V.value)):A.refs?An(A.ref)?A.refs.forEach(V=>{(!V.defaultChecked||!V.disabled)&&(Array.isArray(b)?V.checked=!!b.find(z=>z===V.value):V.checked=b===V.value||!!b)}):A.refs.forEach(V=>V.checked=V.value===b):qa(A.ref)?A.ref.value="":(A.ref.value=b,A.ref.type||u.state.next({name:w,values:$e(a)})))}(y.shouldDirty||y.shouldTouch)&&C(w,b,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&P(w)},H=(w,T,y)=>{for(const M in T){if(!T.hasOwnProperty(M))return;const b=T[M],A=w+"."+M,V=te(n,A);(o.array.has(w)||Le(b)||V&&!V._f)&&!br(b)?H(A,b,y):L(A,b,y)}},G=(w,T,y={})=>{const M=te(n,w),b=o.array.has(w),A=$e(T);we(a,w,A),b?(u.array.next({name:w,values:$e(a)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&y.shouldDirty&&u.state.next({name:w,dirtyFields:dn(i,a),isDirty:B(w,A)})):M&&!M._f&&!nt(A)?H(w,A,y):L(w,A,y),ca(w,o)&&u.state.next({...r}),u.state.next({name:s.mount?w:void 0,values:$e(a)})},ne=async w=>{s.mount=!0;const T=w.target;let y=T.name,M=!0;const b=te(n,y),A=K=>{M=Number.isNaN(K)||br(K)&&isNaN(K.getTime())||Jt(K,te(a,y,K))},V=Ur(t.mode),z=Ur(t.reValidateMode);if(b){let K,fe;const ye=T.type?ks(b._f):cl(w),ge=w.type===Jn.BLUR||w.type===Jn.FOCUS_OUT,Ne=!lu(b._f)&&!t.resolver&&!te(r.errors,y)&&!b._f.deps||pu(ge,te(r.touchedFields,y),r.isSubmitted,z,V),Oe=ca(y,o,ge);we(a,y,ye),ge?(b._f.onBlur&&b._f.onBlur(w),c&&c(0)):b._f.onChange&&b._f.onChange(w);const at=C(y,ye,ge),dt=!rt(at)||Oe;if(!ge&&u.state.next({name:y,type:w.type,values:$e(a)}),Ne)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?ge&&m():ge||m()),dt&&u.state.next({name:y,...Oe?{}:at});if(!ge&&Oe&&u.state.next({...r}),t.resolver){const{errors:Me}=await I([y]);if(A(ye),M){const ie=js(r.errors,n,y),Ge=js(Me,n,ie.name||y);K=Ge.error,y=Ge.name,fe=rt(Me)}}else S([y],!0),K=(await ua(b,o.disabled,a,x,t.shouldUseNativeValidation))[y],S([y]),A(ye),M&&(K?fe=!1:(d.isValid||f.isValid)&&(fe=await Y(n,!0)));M&&(b._f.deps&&P(b._f.deps),_(y,fe,K,at))}},ue=(w,T)=>{if(te(r.errors,T)&&w.focus)return w.focus(),1},P=async(w,T={})=>{let y,M;const b=ut(w);if(t.resolver){const A=await R(Ae(w)?w:b);y=rt(A),M=w?!b.some(V=>te(A,V)):y}else w?(M=(await Promise.all(b.map(async A=>{const V=te(n,A);return await Y(V&&V._f?{[A]:V}:V)}))).every(Boolean),!(!M&&!r.isValid)&&m()):M=y=await Y(n);return u.state.next({...!zt(w)||(d.isValid||f.isValid)&&y!==r.isValid?{}:{name:w},...t.resolver||!w?{isValid:y}:{},errors:r.errors}),T.shouldFocus&&!M&&Kr(n,ue,w?b:o.mount),M},U=w=>{const T={...s.mount?a:i};return Ae(w)?T:zt(w)?te(T,w):w.map(y=>te(T,y))},X=(w,T)=>({invalid:!!te((T||r).errors,w),isDirty:!!te((T||r).dirtyFields,w),error:te((T||r).errors,w),isValidating:!!te(r.validatingFields,w),isTouched:!!te((T||r).touchedFields,w)}),pe=w=>{w&&ut(w).forEach(T=>He(r.errors,T)),u.state.next({errors:w?r.errors:{}})},he=(w,T,y)=>{const M=(te(n,w,{_f:{}})._f||{}).ref,b=te(r.errors,w)||{},{ref:A,message:V,type:z,...K}=b;we(r.errors,w,{...K,...T,ref:M}),u.state.next({name:w,errors:r.errors,isValid:!1}),y&&y.shouldFocus&&M&&M.focus&&M.focus()},de=(w,T)=>At(w)?u.state.subscribe({next:y=>w(q(void 0,T),y)}):q(w,T,!0),re=w=>u.state.subscribe({next:T=>{uu(w.name,T.name,w.exact)&&cu(T,w.formState||d,Ye,w.reRenderRoot)&&w.callback({values:{...a},...r,...T})}}).unsubscribe,W=w=>(s.mount=!0,f={...f,...w.formState},re({...w,formState:f})),Q=(w,T={})=>{for(const y of w?ut(w):o.mount)o.mount.delete(y),o.array.delete(y),T.keepValue||(He(n,y),He(a,y)),!T.keepError&&He(r.errors,y),!T.keepDirty&&He(r.dirtyFields,y),!T.keepTouched&&He(r.touchedFields,y),!T.keepIsValidating&&He(r.validatingFields,y),!t.shouldUnregister&&!T.keepDefaultValue&&He(i,y);u.state.next({values:$e(a)}),u.state.next({...r,...T.keepDirty?{isDirty:B()}:{}}),!T.keepIsValid&&m()},se=({disabled:w,name:T})=>{(ft(w)&&s.mount||w||o.disabled.has(T))&&(w?o.disabled.add(T):o.disabled.delete(T))},le=(w,T={})=>{let y=te(n,w);const M=ft(T.disabled)||ft(t.disabled);return we(n,w,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:w}},name:w,mount:!0,...T}}),o.mount.add(w),y?se({disabled:ft(T.disabled)?T.disabled:t.disabled,name:w}):F(w,!0,T.value),{...M?{disabled:T.disabled||t.disabled}:{},...t.progressive?{required:!!T.required,min:fn(T.min),max:fn(T.max),minLength:fn(T.minLength),maxLength:fn(T.maxLength),pattern:fn(T.pattern)}:{},name:w,onChange:ne,onBlur:ne,ref:b=>{if(b){le(w,T),y=te(n,w);const A=Ae(b.value)&&b.querySelectorAll&&b.querySelectorAll("input,select,textarea")[0]||b,V=nu(A),z=y._f.refs||[];if(V?z.find(K=>K===A):A===y._f.ref)return;we(n,w,{_f:{...y._f,...V?{refs:[...z.filter(Di),A,...Array.isArray(te(i,w))?[{}]:[]],ref:{type:A.type,name:w}}:{ref:A}}}),F(w,!1,void 0,A)}else y=te(n,w,{}),y._f&&(y._f.mount=!1),(t.shouldUnregister||T.shouldUnregister)&&!(ul(o.array,w)&&s.action)&&o.unMount.add(w)}}},ce=()=>t.shouldFocusError&&Kr(n,ue,o.mount),be=w=>{ft(w)&&(u.state.next({disabled:w}),Kr(n,(T,y)=>{const M=te(n,y);M&&(T.disabled=M._f.disabled||w,Array.isArray(M._f.refs)&&M._f.refs.forEach(b=>{b.disabled=M._f.disabled||w}))},0,!1))},J=(w,T)=>async y=>{let M;y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let b=$e(a);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:A,values:V}=await I();r.errors=A,b=V}else await Y(n);if(o.disabled.size)for(const A of o.disabled)we(b,A,void 0);if(He(r.errors,"root"),rt(r.errors)){u.state.next({errors:{}});try{await w(b,y)}catch(A){M=A}}else T&&await T({...r.errors},y),ce(),setTimeout(ce);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:rt(r.errors)&&!M,submitCount:r.submitCount+1,errors:r.errors}),M)throw M},Ie=(w,T={})=>{te(n,w)&&(Ae(T.defaultValue)?G(w,$e(te(i,w))):(G(w,T.defaultValue),we(i,w,$e(T.defaultValue))),T.keepTouched||He(r.touchedFields,w),T.keepDirty||(He(r.dirtyFields,w),r.isDirty=T.defaultValue?B(w,$e(te(i,w))):B()),T.keepError||(He(r.errors,w),d.isValid&&m()),u.state.next({...r}))},Ke=(w,T={})=>{const y=w?$e(w):i,M=$e(y),b=rt(w),A=b?i:M;if(T.keepDefaultValues||(i=y),!T.keepValues){if(T.keepDirtyValues){const V=new Set([...o.mount,...Object.keys(dn(i,a))]);for(const z of Array.from(V))te(r.dirtyFields,z)?we(A,z,te(a,z)):G(z,te(A,z))}else{if(Na&&Ae(w))for(const V of o.mount){const z=te(n,V);if(z&&z._f){const K=Array.isArray(z._f.refs)?z._f.refs[0]:z._f.ref;if(ei(K)){const fe=K.closest("form");if(fe){fe.reset();break}}}}for(const V of o.mount)G(V,te(A,V))}a=$e(A),u.array.next({values:{...A}}),u.state.next({values:{...A}})}o={mount:T.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!d.isValid||!!T.keepIsValid||!!T.keepDirtyValues,s.watch=!!t.shouldUnregister,u.state.next({submitCount:T.keepSubmitCount?r.submitCount:0,isDirty:b?!1:T.keepDirty?r.isDirty:!!(T.keepDefaultValues&&!Jt(w,i)),isSubmitted:T.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:b?{}:T.keepDirtyValues?T.keepDefaultValues&&a?dn(i,a):r.dirtyFields:T.keepDefaultValues&&w?dn(i,w):T.keepDirty?r.dirtyFields:{},touchedFields:T.keepTouched?r.touchedFields:{},errors:T.keepErrors?r.errors:{},isSubmitSuccessful:T.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Xe=(w,T)=>Ke(At(w)?w(a):w,T),Tt=(w,T={})=>{const y=te(n,w),M=y&&y._f;if(M){const b=M.refs?M.refs[0]:M.ref;b.focus&&(b.focus(),T.shouldSelect&&At(b.select)&&b.select())}},Ye=w=>{r={...r,...w}},Ue={control:{register:le,unregister:Q,getFieldState:X,handleSubmit:J,setError:he,_subscribe:re,_runSchema:I,_focusError:ce,_getWatch:q,_getDirty:B,_setValid:m,_setFieldArray:v,_setDisabledField:se,_setErrors:D,_getFieldArray:Z,_reset:Ke,_resetDefaultValues:()=>At(t.defaultValues)&&t.defaultValues().then(w=>{Xe(w,t.resetOptions),u.state.next({isLoading:!1})}),_removeUnmounted:h,_disableForm:be,_subjects:u,_proxyFormState:d,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(w){s=w},get _defaultValues(){return i},get _names(){return o},set _names(w){o=w},get _formState(){return r},get _options(){return t},set _options(w){t={...t,...w}}},subscribe:W,trigger:P,register:le,handleSubmit:J,watch:de,setValue:G,getValues:U,reset:Xe,resetField:Ie,clearErrors:pe,unregister:Q,setError:he,setFocus:Tt,getFieldState:X};return{...Ue,formControl:Ue}}var Gt=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Ii=(e,t,r={})=>r.shouldFocus||Ae(r.shouldFocus)?r.focusName||`${e}.${Ae(r.focusIndex)?t:r.focusIndex}.`:"",Mi=(e,t)=>[...e,...ut(t)],zi=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Bi(e,t,r){return[...e.slice(0,t),...ut(r),...e.slice(t)]}var Vi=(e,t,r)=>Array.isArray(e)?(Ae(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Ni=(e,t)=>[...ut(t),...ut(e)];function mu(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return bi(n).length?n:[]}var Li=(e,t)=>Ae(t)?[]:mu(e,ut(t).sort((r,n)=>r-n)),qi=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},As=(e,t,r)=>(e[t]=r,e);function gu(e){const t=wi(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a,rules:s}=e,[o,c]=$.useState(r._getFieldArray(n)),p=$.useRef(r._getFieldArray(n).map(Gt)),d=$.useRef(o),f=$.useRef(n),u=$.useRef(!1);f.current=n,d.current=o,r._names.array.add(n),s&&r.register(n,s),Si(()=>r._subjects.array.subscribe({next:({values:_,name:I})=>{if(I===f.current||!I){const R=te(_,f.current);Array.isArray(R)&&(c(R),p.current=R.map(Gt))}}}).unsubscribe,[r]);const x=$.useCallback(_=>{u.current=!0,r._setFieldArray(n,_)},[r,n]),E=(_,I)=>{const R=ut($e(_)),Y=Mi(r._getFieldArray(n),R);r._names.focus=Ii(n,Y.length-1,I),p.current=Mi(p.current,R.map(Gt)),x(Y),c(Y),r._setFieldArray(n,Y,Mi,{argA:zi(_)})},m=(_,I)=>{const R=ut($e(_)),Y=Ni(r._getFieldArray(n),R);r._names.focus=Ii(n,0,I),p.current=Ni(p.current,R.map(Gt)),x(Y),c(Y),r._setFieldArray(n,Y,Ni,{argA:zi(_)})},S=_=>{const I=Li(r._getFieldArray(n),_);p.current=Li(p.current,_),x(I),c(I),!Array.isArray(te(r._fields,n))&&we(r._fields,n,void 0),r._setFieldArray(n,I,Li,{argA:_})},v=(_,I,R)=>{const Y=ut($e(I)),h=Bi(r._getFieldArray(n),_,Y);r._names.focus=Ii(n,_,R),p.current=Bi(p.current,_,Y.map(Gt)),x(h),c(h),r._setFieldArray(n,h,Bi,{argA:_,argB:zi(I)})},j=(_,I)=>{const R=r._getFieldArray(n);qi(R,_,I),qi(p.current,_,I),x(R),c(R),r._setFieldArray(n,R,qi,{argA:_,argB:I},!1)},D=(_,I)=>{const R=r._getFieldArray(n);Vi(R,_,I),Vi(p.current,_,I),x(R),c(R),r._setFieldArray(n,R,Vi,{argA:_,argB:I},!1)},F=(_,I)=>{const R=$e(I),Y=As(r._getFieldArray(n),_,R);p.current=[...Y].map((h,B)=>!h||B===_?Gt():p.current[B]),x(Y),c([...Y]),r._setFieldArray(n,Y,As,{argA:_,argB:R},!0,!1)},C=_=>{const I=ut($e(_));p.current=I.map(Gt),x([...I]),c([...I]),r._setFieldArray(n,[...I],R=>R,{},!0,!1)};return $.useEffect(()=>{if(r._state.action=!1,ca(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!Ur(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Ur(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(_=>{const I=te(_.errors,n),R=te(r._formState.errors,n);(R?!I&&R.type||I&&(R.type!==I.type||R.message!==I.message):I&&I.type)&&(I?we(r._formState.errors,n,I):He(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const _=te(r._fields,n);_&&_._f&&!(Ur(r._options.reValidateMode).isOnSubmit&&Ur(r._options.mode).isOnSubmit)&&ua(_,r._names.disabled,r._formValues,r._options.criteriaMode===Ct.all,r._options.shouldUseNativeValidation,!0).then(I=>!rt(I)&&r._subjects.state.next({errors:Sl(r._formState.errors,I,n)}))}r._subjects.state.next({name:n,values:$e(r._formValues)}),r._names.focus&&Kr(r._fields,(_,I)=>{if(r._names.focus&&I.startsWith(r._names.focus)&&_.focus)return _.focus(),1}),r._names.focus="",r._setValid(),u.current=!1},[o,n,r]),$.useEffect(()=>(!te(r._formValues,n)&&r._setFieldArray(n),()=>{const _=(I,R)=>{const Y=te(r._fields,I);Y&&Y._f&&(Y._f.mount=R)};r._options.shouldUnregister||a?r.unregister(n):_(n,!1)}),[n,r,i,a]),{swap:$.useCallback(j,[x,n,r]),move:$.useCallback(D,[x,n,r]),prepend:$.useCallback(m,[x,n,r]),append:$.useCallback(E,[x,n,r]),remove:$.useCallback(S,[x,n,r]),insert:$.useCallback(v,[x,n,r]),update:$.useCallback(F,[x,n,r]),replace:$.useCallback(C,[x,n,r]),fields:$.useMemo(()=>o.map((_,I)=>({..._,[i]:p.current[I]||Gt()})),[o,i])}}function yu(e={}){const t=$.useRef(void 0),r=$.useRef(void 0),[n,i]=$.useState({isDirty:!1,isValidating:!1,isLoading:At(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:At(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!At(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=hu(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,Si(()=>{const s=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),a._formState.isReady=!0,s},[a]),$.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),$.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),$.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),$.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),$.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),$.useEffect(()=>{e.values&&!Jt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),$.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=dl(n,a),t.current}const Os=(e,t,r)=>{if(e&&"reportValidity"in e){const n=te(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Cl=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Os(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>Os(i,r,e))}},xu=(e,t)=>{t.shouldUseNativeValidation&&Cl(e,t);const r={};for(const n in e){const i=te(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(vu(t.names||Object.keys(e),n)){const s=Object.assign({},te(r,n));we(s,"root",a),we(r,n,s)}else we(r,n,a)}return r},vu=(e,t)=>{const r=_s(t);return e.some(n=>_s(n).match(`^${r}\\.\\d+`))};function _s(e){return e.replace(/\]|\[/g,"")}function bu(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var c=(t!=null&&t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:i}))).then(function(p){return a.shouldUseNativeValidation&&Cl({},a),{values:r.raw?Object.assign({},n):p,errors:{}}}))}catch(p){return o(p)}return c&&c.then?c.then(void 0,o):c}(0,function(s){if(!s.inner)throw s;return{values:{},errors:xu((o=s,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(p,d){if(p[d.path]||(p[d.path]={message:d.message,type:d.type}),c){var f=p[d.path].types,u=f&&f[d.type];p[d.path]=ml(d.path,c,p,d.type,u?[].concat(u,d.message):d.message)}return p},{})),a)};var o,c}))}catch(s){return Promise.reject(s)}}}var On=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},$r=typeof window>"u"||"Deno"in globalThis;function lt(){}function wu(e,t){return typeof e=="function"?e(t):e}function pa(e){return typeof e=="number"&&e>=0&&e!==1/0}function El(e,t){return Math.max(e+(t||0)-Date.now(),0)}function cr(e,t){return typeof e=="function"?e(t):e}function bt(e,t){return typeof e=="function"?e(t):e}function Rs(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Ua(s,t.options))return!1}else if(!Sn(t.queryKey,s))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function $s(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(wn(t.options.mutationKey)!==wn(a))return!1}else if(!Sn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ua(e,t){return((t==null?void 0:t.queryKeyHashFn)||wn)(e)}function wn(e){return JSON.stringify(e,(t,r)=>ha(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Sn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Sn(e[r],t[r])):!1}function da(e,t){if(e===t)return e;const r=Ps(e)&&Ps(t);if(r||ha(e)&&ha(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},c=new Set(n);let p=0;for(let d=0;d<s;d++){const f=r?d:a[d];(!r&&c.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(o[f]=void 0,p++):(o[f]=da(e[f],t[f]),o[f]===e[f]&&e[f]!==void 0&&p++)}return i===s&&p===i?e:o}return t}function fa(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Ps(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ha(e){if(!Ds(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Ds(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ds(e){return Object.prototype.toString.call(e)==="[object Object]"}function Su(e){return new Promise(t=>{setTimeout(t,e)})}function ma(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return da(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return da(e,t)}return t}function Cu(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Eu(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ni=Symbol();function kl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ni&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ni?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ku(e,t){return typeof e=="function"?e(...t):!!e}var Cr,er,Gr,Jo,Tu=(Jo=class extends On{constructor(){super();me(this,Cr);me(this,er);me(this,Gr);oe(this,Gr,t=>{if(!$r&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){O(this,er)||this.setEventListener(O(this,Gr))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,er))==null||t.call(this),oe(this,er,void 0))}setEventListener(t){var r;oe(this,Gr,t),(r=O(this,er))==null||r.call(this),oe(this,er,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){O(this,Cr)!==t&&(oe(this,Cr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof O(this,Cr)=="boolean"?O(this,Cr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Cr=new WeakMap,er=new WeakMap,Gr=new WeakMap,Jo),Ha=new Tu,Qr,tr,Zr,el,ju=(el=class extends On{constructor(){super();me(this,Qr,!0);me(this,tr);me(this,Zr);oe(this,Zr,t=>{if(!$r&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){O(this,tr)||this.setEventListener(O(this,Zr))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,tr))==null||t.call(this),oe(this,tr,void 0))}setEventListener(t){var r;oe(this,Zr,t),(r=O(this,tr))==null||r.call(this),oe(this,tr,t(this.setOnline.bind(this)))}setOnline(t){O(this,Qr)!==t&&(oe(this,Qr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return O(this,Qr)}},Qr=new WeakMap,tr=new WeakMap,Zr=new WeakMap,el),ii=new ju;function ga(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function Fu(e){return Math.min(1e3*2**e,3e4)}function Tl(e){return(e??"online")==="online"?ii.isOnline():!0}var jl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Wi(e){return e instanceof jl}function Fl(e){let t=!1,r=0,n=!1,i;const a=ga(),s=m=>{var S;n||(u(new jl(m)),(S=e.abort)==null||S.call(e))},o=()=>{t=!0},c=()=>{t=!1},p=()=>Ha.isFocused()&&(e.networkMode==="always"||ii.isOnline())&&e.canRun(),d=()=>Tl(e.networkMode)&&e.canRun(),f=m=>{var S;n||(n=!0,(S=e.onSuccess)==null||S.call(e,m),i==null||i(),a.resolve(m))},u=m=>{var S;n||(n=!0,(S=e.onError)==null||S.call(e,m),i==null||i(),a.reject(m))},x=()=>new Promise(m=>{var S;i=v=>{(n||p())&&m(v)},(S=e.onPause)==null||S.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),E=()=>{if(n)return;let m;const S=r===0?e.initialPromise:void 0;try{m=S??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(f).catch(v=>{var _;if(n)return;const j=e.retry??($r?0:3),D=e.retryDelay??Fu,F=typeof D=="function"?D(r,v):D,C=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,v);if(t||!C){u(v);return}r++,(_=e.onFail)==null||_.call(e,r,v),Su(F).then(()=>p()?void 0:x()).then(()=>{t?u(v):E()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:c,canStart:d,start:()=>(d()?E():x().then(E),a)}}var Au=e=>setTimeout(e,0);function Ou(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=Au;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(c=>{r(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||s()}return c},batchCalls:o=>(...c)=>{a(()=>{o(...c)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Qe=Ou(),Er,tl,Al=(tl=class{constructor(){me(this,Er)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pa(this.gcTime)&&oe(this,Er,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($r?1/0:5*60*1e3))}clearGcTimeout(){O(this,Er)&&(clearTimeout(O(this,Er)),oe(this,Er,void 0))}},Er=new WeakMap,tl),Xr,kr,xt,Tr,Je,kn,jr,jt,Wt,rl,_u=(rl=class extends Al{constructor(t){super();me(this,jt);me(this,Xr);me(this,kr);me(this,xt);me(this,Tr);me(this,Je);me(this,kn);me(this,jr);oe(this,jr,!1),oe(this,kn,t.defaultOptions),this.setOptions(t.options),this.observers=[],oe(this,Tr,t.client),oe(this,xt,O(this,Tr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,oe(this,Xr,Ru(this.options)),this.state=t.state??O(this,Xr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,Je))==null?void 0:t.promise}setOptions(t){this.options={...O(this,kn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,xt).remove(this)}setData(t,r){const n=ma(this.state.data,t,this.options);return xe(this,jt,Wt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){xe(this,jt,Wt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=O(this,Je))==null?void 0:n.promise;return(i=O(this,Je))==null||i.cancel(t),r?r.then(lt).catch(lt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,Xr))}isActive(){return this.observers.some(t=>bt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ni||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>cr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!El(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,Je))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,Je))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,xt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(O(this,Je)&&(O(this,jr)?O(this,Je).cancel({revert:!0}):O(this,Je).cancelRetry()),this.scheduleGc()),O(this,xt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xe(this,jt,Wt).call(this,{type:"invalidate"})}fetch(t,r){var p,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(O(this,Je))return O(this,Je).continueRetry(),O(this,Je).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(x=>x.options.queryFn);u&&this.setOptions(u.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(oe(this,jr,!0),n.signal)})},a=()=>{const u=kl(this.options,r),E=(()=>{const m={client:O(this,Tr),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return oe(this,jr,!1),this.options.persister?this.options.persister(u,E,this):u(E)},o=(()=>{const u={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:O(this,Tr),state:this.state,fetchFn:a};return i(u),u})();(p=this.options.behavior)==null||p.onFetch(o,this),oe(this,kr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&xe(this,jt,Wt).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const c=u=>{var x,E,m,S;Wi(u)&&u.silent||xe(this,jt,Wt).call(this,{type:"error",error:u}),Wi(u)||((E=(x=O(this,xt).config).onError)==null||E.call(x,u,this),(S=(m=O(this,xt).config).onSettled)==null||S.call(m,this.state.data,u,this)),this.scheduleGc()};return oe(this,Je,Fl({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:u=>{var x,E,m,S;if(u===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(v){c(v);return}(E=(x=O(this,xt).config).onSuccess)==null||E.call(x,u,this),(S=(m=O(this,xt).config).onSettled)==null||S.call(m,u,this.state.error,this),this.scheduleGc()},onError:c,onFail:(u,x)=>{xe(this,jt,Wt).call(this,{type:"failed",failureCount:u,error:x})},onPause:()=>{xe(this,jt,Wt).call(this,{type:"pause"})},onContinue:()=>{xe(this,jt,Wt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),O(this,Je).start()}},Xr=new WeakMap,kr=new WeakMap,xt=new WeakMap,Tr=new WeakMap,Je=new WeakMap,kn=new WeakMap,jr=new WeakMap,jt=new WeakSet,Wt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Ol(n.data,this.options),fetchMeta:t.meta??null};case"success":return oe(this,kr,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Wi(i)&&i.revert&&O(this,kr)?{...O(this,kr),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Qe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),O(this,xt).notify({query:this,type:"updated",action:t})})},rl);function Ol(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Tl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ru(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Pt,nl,$u=(nl=class extends On{constructor(t={}){super();me(this,Pt);this.config=t,oe(this,Pt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ua(i,r);let s=this.get(a);return s||(s=new _u({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){O(this,Pt).has(t.queryHash)||(O(this,Pt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=O(this,Pt).get(t.queryHash);r&&(t.destroy(),r===t&&O(this,Pt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,Pt).get(t)}getAll(){return[...O(this,Pt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Rs(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Rs(t,n)):r}notify(t){Qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Pt=new WeakMap,nl),Dt,et,Fr,It,Zt,il,Pu=(il=class extends Al{constructor(t){super();me(this,It);me(this,Dt);me(this,et);me(this,Fr);this.mutationId=t.mutationId,oe(this,et,t.mutationCache),oe(this,Dt,[]),this.state=t.state||Du(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,Dt).includes(t)||(O(this,Dt).push(t),this.clearGcTimeout(),O(this,et).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){oe(this,Dt,O(this,Dt).filter(r=>r!==t)),this.scheduleGc(),O(this,et).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():O(this,et).remove(this))}continue(){var t;return((t=O(this,Fr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,c,p,d,f,u,x,E,m,S,v,j,D,F,C,_,I,R;const r=()=>{xe(this,It,Zt).call(this,{type:"continue"})};oe(this,Fr,Fl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(Y,h)=>{xe(this,It,Zt).call(this,{type:"failed",failureCount:Y,error:h})},onPause:()=>{xe(this,It,Zt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,et).canRun(this)}));const n=this.state.status==="pending",i=!O(this,Fr).canStart();try{if(n)r();else{xe(this,It,Zt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=O(this,et).config).onMutate)==null?void 0:s.call(a,t,this));const h=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t));h!==this.state.context&&xe(this,It,Zt).call(this,{type:"pending",context:h,variables:t,isPaused:i})}const Y=await O(this,Fr).start();return await((d=(p=O(this,et).config).onSuccess)==null?void 0:d.call(p,Y,t,this.state.context,this)),await((u=(f=this.options).onSuccess)==null?void 0:u.call(f,Y,t,this.state.context)),await((E=(x=O(this,et).config).onSettled)==null?void 0:E.call(x,Y,null,this.state.variables,this.state.context,this)),await((S=(m=this.options).onSettled)==null?void 0:S.call(m,Y,null,t,this.state.context)),xe(this,It,Zt).call(this,{type:"success",data:Y}),Y}catch(Y){try{throw await((j=(v=O(this,et).config).onError)==null?void 0:j.call(v,Y,t,this.state.context,this)),await((F=(D=this.options).onError)==null?void 0:F.call(D,Y,t,this.state.context)),await((_=(C=O(this,et).config).onSettled)==null?void 0:_.call(C,void 0,Y,this.state.variables,this.state.context,this)),await((R=(I=this.options).onSettled)==null?void 0:R.call(I,void 0,Y,t,this.state.context)),Y}finally{xe(this,It,Zt).call(this,{type:"error",error:Y})}}finally{O(this,et).runNext(this)}}},Dt=new WeakMap,et=new WeakMap,Fr=new WeakMap,It=new WeakSet,Zt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Qe.batch(()=>{O(this,Dt).forEach(n=>{n.onMutationUpdate(t)}),O(this,et).notify({mutation:this,type:"updated",action:t})})},il);function Du(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ut,Ft,Tn,al,Iu=(al=class extends On{constructor(t={}){super();me(this,Ut);me(this,Ft);me(this,Tn);this.config=t,oe(this,Ut,new Set),oe(this,Ft,new Map),oe(this,Tn,0)}build(t,r,n){const i=new Pu({mutationCache:this,mutationId:++Dn(this,Tn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){O(this,Ut).add(t);const r=In(t);if(typeof r=="string"){const n=O(this,Ft).get(r);n?n.push(t):O(this,Ft).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,Ut).delete(t)){const r=In(t);if(typeof r=="string"){const n=O(this,Ft).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&O(this,Ft).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=In(t);if(typeof r=="string"){const n=O(this,Ft).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=In(t);if(typeof r=="string"){const i=(n=O(this,Ft).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>{O(this,Ut).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,Ut).clear(),O(this,Ft).clear()})}getAll(){return Array.from(O(this,Ut))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>$s(r,n))}findAll(t={}){return this.getAll().filter(r=>$s(t,r))}notify(t){Qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Qe.batch(()=>Promise.all(t.map(r=>r.continue().catch(lt))))}},Ut=new WeakMap,Ft=new WeakMap,Tn=new WeakMap,al);function In(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Is(e){return{onFetch:(t,r)=>{var d,f,u,x,E;const n=t.options,i=(u=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:u.direction,a=((x=t.state.data)==null?void 0:x.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const p=async()=>{let m=!1;const S=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=kl(t.options,t.fetchOptions),j=async(D,F,C)=>{if(m)return Promise.reject();if(F==null&&D.pages.length)return Promise.resolve(D);const I=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:F,direction:C?"backward":"forward",meta:t.options.meta};return S(B),B})(),R=await v(I),{maxPages:Y}=t.options,h=C?Eu:Cu;return{pages:h(D.pages,R,Y),pageParams:h(D.pageParams,F,Y)}};if(i&&a.length){const D=i==="backward",F=D?Mu:Ms,C={pages:a,pageParams:s},_=F(n,C);o=await j(C,_,D)}else{const D=e??a.length;do{const F=c===0?s[0]??n.initialPageParam:Ms(n,o);if(c>0&&F==null)break;o=await j(o,F),c++}while(c<D)}return o};t.options.persister?t.fetchFn=()=>{var m,S;return(S=(m=t.options).persister)==null?void 0:S.call(m,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=p}}}function Ms(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Mu(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ve,rr,nr,Jr,en,ir,tn,rn,sl,zu=(sl=class{constructor(e={}){me(this,Ve);me(this,rr);me(this,nr);me(this,Jr);me(this,en);me(this,ir);me(this,tn);me(this,rn);oe(this,Ve,e.queryCache||new $u),oe(this,rr,e.mutationCache||new Iu),oe(this,nr,e.defaultOptions||{}),oe(this,Jr,new Map),oe(this,en,new Map),oe(this,ir,0)}mount(){Dn(this,ir)._++,O(this,ir)===1&&(oe(this,tn,Ha.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Ve).onFocus())})),oe(this,rn,ii.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Ve).onOnline())})))}unmount(){var e,t;Dn(this,ir)._--,O(this,ir)===0&&((e=O(this,tn))==null||e.call(this),oe(this,tn,void 0),(t=O(this,rn))==null||t.call(this),oe(this,rn,void 0))}isFetching(e){return O(this,Ve).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,rr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=O(this,Ve).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=O(this,Ve).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(cr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return O(this,Ve).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=O(this,Ve).get(n.queryHash),a=i==null?void 0:i.state.data,s=wu(t,a);if(s!==void 0)return O(this,Ve).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Qe.batch(()=>O(this,Ve).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=O(this,Ve).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=O(this,Ve);Qe.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=O(this,Ve);return Qe.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Qe.batch(()=>O(this,Ve).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(lt).catch(lt)}invalidateQueries(e,t={}){return Qe.batch(()=>(O(this,Ve).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Qe.batch(()=>O(this,Ve).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(lt)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(lt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=O(this,Ve).build(this,t);return r.isStaleByTime(cr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(lt).catch(lt)}fetchInfiniteQuery(e){return e.behavior=Is(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(lt).catch(lt)}ensureInfiniteQueryData(e){return e.behavior=Is(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ii.isOnline()?O(this,rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Ve)}getMutationCache(){return O(this,rr)}getDefaultOptions(){return O(this,nr)}setDefaultOptions(e){oe(this,nr,e)}setQueryDefaults(e,t){O(this,Jr).set(wn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,Jr).values()],r={};return t.forEach(n=>{Sn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){O(this,en).set(wn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,en).values()],r={};return t.forEach(n=>{Sn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,nr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ua(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ni&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,nr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,Ve).clear(),O(this,rr).clear()}},Ve=new WeakMap,rr=new WeakMap,nr=new WeakMap,Jr=new WeakMap,en=new WeakMap,ir=new WeakMap,tn=new WeakMap,rn=new WeakMap,sl),ot,ve,jn,tt,Ar,nn,ar,sr,Fn,an,sn,Or,_r,or,on,Ee,mn,ya,xa,va,ba,wa,Sa,Ca,_l,ol,Bu=(ol=class extends On{constructor(t,r){super();me(this,Ee);me(this,ot);me(this,ve);me(this,jn);me(this,tt);me(this,Ar);me(this,nn);me(this,ar);me(this,sr);me(this,Fn);me(this,an);me(this,sn);me(this,Or);me(this,_r);me(this,or);me(this,on,new Set);this.options=r,oe(this,ot,t),oe(this,sr,null),oe(this,ar,ga()),this.options.experimental_prefetchInRender||O(this,ar).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,ve).addObserver(this),zs(O(this,ve),this.options)?xe(this,Ee,mn).call(this):this.updateResult(),xe(this,Ee,ba).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ea(O(this,ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ea(O(this,ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xe(this,Ee,wa).call(this),xe(this,Ee,Sa).call(this),O(this,ve).removeObserver(this)}setOptions(t){const r=this.options,n=O(this,ve);if(this.options=O(this,ot).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bt(this.options.enabled,O(this,ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xe(this,Ee,Ca).call(this),O(this,ve).setOptions(this.options),r._defaulted&&!fa(this.options,r)&&O(this,ot).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,ve),observer:this});const i=this.hasListeners();i&&Bs(O(this,ve),n,this.options,r)&&xe(this,Ee,mn).call(this),this.updateResult(),i&&(O(this,ve)!==n||bt(this.options.enabled,O(this,ve))!==bt(r.enabled,O(this,ve))||cr(this.options.staleTime,O(this,ve))!==cr(r.staleTime,O(this,ve)))&&xe(this,Ee,ya).call(this);const a=xe(this,Ee,xa).call(this);i&&(O(this,ve)!==n||bt(this.options.enabled,O(this,ve))!==bt(r.enabled,O(this,ve))||a!==O(this,or))&&xe(this,Ee,va).call(this,a)}getOptimisticResult(t){const r=O(this,ot).getQueryCache().build(O(this,ot),t),n=this.createResult(r,t);return Nu(this,n)&&(oe(this,tt,n),oe(this,nn,this.options),oe(this,Ar,O(this,ve).state)),n}getCurrentResult(){return O(this,tt)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){O(this,on).add(t)}getCurrentQuery(){return O(this,ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=O(this,ot).defaultQueryOptions(t),n=O(this,ot).getQueryCache().build(O(this,ot),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return xe(this,Ee,mn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,tt)))}createResult(t,r){var Y;const n=O(this,ve),i=this.options,a=O(this,tt),s=O(this,Ar),o=O(this,nn),p=t!==n?t.state:O(this,jn),{state:d}=t;let f={...d},u=!1,x;if(r._optimisticResults){const h=this.hasListeners(),B=!h&&zs(t,r),q=h&&Bs(t,n,r,i);(B||q)&&(f={...f,...Ol(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:E,errorUpdatedAt:m,status:S}=f;x=f.data;let v=!1;if(r.placeholderData!==void 0&&x===void 0&&S==="pending"){let h;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(h=a.data,v=!0):h=typeof r.placeholderData=="function"?r.placeholderData((Y=O(this,sn))==null?void 0:Y.state.data,O(this,sn)):r.placeholderData,h!==void 0&&(S="success",x=ma(a==null?void 0:a.data,h,r),u=!0)}if(r.select&&x!==void 0&&!v)if(a&&x===(s==null?void 0:s.data)&&r.select===O(this,Fn))x=O(this,an);else try{oe(this,Fn,r.select),x=r.select(x),x=ma(a==null?void 0:a.data,x,r),oe(this,an,x),oe(this,sr,null)}catch(h){oe(this,sr,h)}O(this,sr)&&(E=O(this,sr),x=O(this,an),m=Date.now(),S="error");const j=f.fetchStatus==="fetching",D=S==="pending",F=S==="error",C=D&&j,_=x!==void 0,R={status:S,fetchStatus:f.fetchStatus,isPending:D,isSuccess:S==="success",isError:F,isInitialLoading:C,isLoading:C,data:x,dataUpdatedAt:f.dataUpdatedAt,error:E,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>p.dataUpdateCount||f.errorUpdateCount>p.errorUpdateCount,isFetching:j,isRefetching:j&&!D,isLoadingError:F&&!_,isPaused:f.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:F&&_,isStale:Ka(t,r),refetch:this.refetch,promise:O(this,ar),isEnabled:bt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const h=Z=>{R.status==="error"?Z.reject(R.error):R.data!==void 0&&Z.resolve(R.data)},B=()=>{const Z=oe(this,ar,R.promise=ga());h(Z)},q=O(this,ar);switch(q.status){case"pending":t.queryHash===n.queryHash&&h(q);break;case"fulfilled":(R.status==="error"||R.data!==q.value)&&B();break;case"rejected":(R.status!=="error"||R.error!==q.reason)&&B();break}}return R}updateResult(){const t=O(this,tt),r=this.createResult(O(this,ve),this.options);if(oe(this,Ar,O(this,ve).state),oe(this,nn,this.options),O(this,Ar).data!==void 0&&oe(this,sn,O(this,ve)),fa(r,t))return;oe(this,tt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!O(this,on).size)return!0;const s=new Set(a??O(this,on));return this.options.throwOnError&&s.add("error"),Object.keys(O(this,tt)).some(o=>{const c=o;return O(this,tt)[c]!==t[c]&&s.has(c)})};xe(this,Ee,_l).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xe(this,Ee,ba).call(this)}},ot=new WeakMap,ve=new WeakMap,jn=new WeakMap,tt=new WeakMap,Ar=new WeakMap,nn=new WeakMap,ar=new WeakMap,sr=new WeakMap,Fn=new WeakMap,an=new WeakMap,sn=new WeakMap,Or=new WeakMap,_r=new WeakMap,or=new WeakMap,on=new WeakMap,Ee=new WeakSet,mn=function(t){xe(this,Ee,Ca).call(this);let r=O(this,ve).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(lt)),r},ya=function(){xe(this,Ee,wa).call(this);const t=cr(this.options.staleTime,O(this,ve));if($r||O(this,tt).isStale||!pa(t))return;const n=El(O(this,tt).dataUpdatedAt,t)+1;oe(this,Or,setTimeout(()=>{O(this,tt).isStale||this.updateResult()},n))},xa=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,ve)):this.options.refetchInterval)??!1},va=function(t){xe(this,Ee,Sa).call(this),oe(this,or,t),!($r||bt(this.options.enabled,O(this,ve))===!1||!pa(O(this,or))||O(this,or)===0)&&oe(this,_r,setInterval(()=>{(this.options.refetchIntervalInBackground||Ha.isFocused())&&xe(this,Ee,mn).call(this)},O(this,or)))},ba=function(){xe(this,Ee,ya).call(this),xe(this,Ee,va).call(this,xe(this,Ee,xa).call(this))},wa=function(){O(this,Or)&&(clearTimeout(O(this,Or)),oe(this,Or,void 0))},Sa=function(){O(this,_r)&&(clearInterval(O(this,_r)),oe(this,_r,void 0))},Ca=function(){const t=O(this,ot).getQueryCache().build(O(this,ot),this.options);if(t===O(this,ve))return;const r=O(this,ve);oe(this,ve,t),oe(this,jn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},_l=function(t){Qe.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(O(this,tt))}),O(this,ot).getQueryCache().notify({query:O(this,ve),type:"observerResultsUpdated"})})},ol);function Vu(e,t){return bt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zs(e,t){return Vu(e,t)||e.state.data!==void 0&&Ea(e,t,t.refetchOnMount)}function Ea(e,t,r){if(bt(t.enabled,e)!==!1&&cr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ka(e,t)}return!1}function Bs(e,t,r,n){return(e!==t||bt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ka(e,r)}function Ka(e,t){return bt(t.enabled,e)!==!1&&e.isStaleByTime(cr(t.staleTime,e))}function Nu(e,t){return!fa(e.getCurrentResult(),t)}var Rl=ae.createContext(void 0),Lu=e=>{const t=ae.useContext(Rl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qu=({client:e,children:t})=>(ae.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(Rl.Provider,{value:e,children:t})),$l=ae.createContext(!1),Wu=()=>ae.useContext($l);$l.Provider;function Uu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Hu=ae.createContext(Uu()),Ku=()=>ae.useContext(Hu),Yu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Gu=e=>{ae.useEffect(()=>{e.clearReset()},[e])},Qu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||ku(r,[e.error,n])),Zu=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Xu=(e,t)=>e.isLoading&&e.isFetching&&!t,Ju=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Vs=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function ep(e,t,r){var f,u,x,E,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=Wu(),i=Ku(),a=Lu(),s=a.defaultQueryOptions(e);(u=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||u.call(f,s),process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),s._optimisticResults=n?"isRestoring":"optimistic",Zu(s),Yu(s,i),Gu(i);const o=!a.getQueryCache().get(s.queryHash),[c]=ae.useState(()=>new t(a,s)),p=c.getOptimisticResult(s),d=!n&&e.subscribed!==!1;if(ae.useSyncExternalStore(ae.useCallback(S=>{const v=d?c.subscribe(Qe.batchCalls(S)):lt;return c.updateResult(),v},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),ae.useEffect(()=>{c.setOptions(s)},[s,c]),Ju(s,p))throw Vs(s,c,i);if(Qu({result:p,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw p.error;if((E=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||E.call(x,s,p),s.experimental_prefetchInRender&&!$r&&Xu(p,n)){const S=o?Vs(s,c,i):(m=a.getQueryCache().get(s.queryHash))==null?void 0:m.promise;S==null||S.catch(lt).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?p:c.trackResult(p)}function tp(e,t){return ep(e,Bu)}function Ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mn={exports:{}},zn={exports:{}},Se={};/** @license React v16.13.1
1
+ "use strict";var eu=Object.defineProperty;var Co=e=>{throw TypeError(e)};var tu=(e,t,r)=>t in e?eu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var un=(e,t,r)=>tu(e,typeof t!="symbol"?t+"":t,r),Ii=(e,t,r)=>t.has(e)||Co("Cannot "+r);var O=(e,t,r)=>(Ii(e,t,"read from private field"),r?r.call(e):t.get(e)),he=(e,t,r)=>t.has(e)?Co("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),oe=(e,t,r,n)=>(Ii(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ye=(e,t,r)=>(Ii(e,t,"access private method"),r);var Dn=(e,t,r,n)=>({set _(i){oe(e,t,i,r)},get _(){return O(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),P=require("react"),g=require("@mui/material"),ru=require("@emotion/styled"),dr=require("@emotion/react");function nu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ie=nu(P);var Fn=e=>e.type==="checkbox",vr=e=>e instanceof Date,rt=e=>e==null;const ul=e=>typeof e=="object";var Le=e=>!rt(e)&&!Array.isArray(e)&&ul(e)&&!vr(e),pl=e=>Le(e)&&e.target?Fn(e.target)?e.target.checked:e.target.value:e,iu=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dl=(e,t)=>e.has(iu(t)),au=e=>{const t=e.constructor&&e.constructor.prototype;return Le(t)&&t.hasOwnProperty("isPrototypeOf")},qa=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Pe(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(qa&&(e instanceof Blob||n))&&(r||Le(e)))if(t=r?[]:{},!r&&!au(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Pe(e[i]));else return e;return t}var bi=e=>/^\w*$/.test(e),Ae=e=>e===void 0,wi=e=>Array.isArray(e)?e.filter(Boolean):[],Wa=e=>wi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ee=(e,t,r)=>{if(!t||!Le(e))return r;const n=(bi(t)?[t]:Wa(t)).reduce((i,a)=>rt(i)?i:i[a],e);return Ae(n)||n===e?Ae(e[t])?r:e[t]:n},ft=e=>typeof e=="boolean",be=(e,t,r)=>{let n=-1;const i=bi(t)?[t]:Wa(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let c=r;if(n!==o){const p=e[s];c=Le(p)||Array.isArray(p)?p:isNaN(+i[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=c,e=e[s]}};const ei={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ct={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},zt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},fl=P.createContext(null);fl.displayName="HookFormContext";const Si=()=>P.useContext(fl);var hl=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Ct.all&&(t._proxyFormState[o]=!n||Ct.all),r&&(r[o]=!0),e[o]}});return i};const Ci=typeof window<"u"?ie.useLayoutEffect:ie.useEffect;function ou(e){const t=Si(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[o,s]=P.useState(r._formState),c=P.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ci(()=>r._subscribe({name:i,formState:c.current,exact:a,callback:p=>{!n&&s({...r._formState,...p})}}),[i,n,a]),P.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),P.useMemo(()=>hl(o,r,c.current,!1),[o,r])}var Mt=e=>typeof e=="string",ml=(e,t,r,n,i)=>Mt(e)?(n&&t.watch.add(e),ee(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),ee(r,a))):(n&&(t.watchAll=!0),r);function gl(e){const t=Si(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:o}=e||{},s=P.useRef(i),[c,p]=P.useState(r._getWatch(n,s.current));return Ci(()=>r._subscribe({name:n,formState:{values:!0},exact:o,callback:f=>!a&&p(ml(n,r._names,f.values||r._formValues,!1,s.current))}),[n,r,a,o]),P.useEffect(()=>r._removeUnmounted()),c}function su(e){const t=Si(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,o=dl(i._names.array,r),s=gl({control:i,name:r,defaultValue:ee(i._formValues,r,ee(i._defaultValues,r,e.defaultValue)),exact:!0}),c=ou({control:i,name:r,exact:!0}),p=P.useRef(e),f=P.useRef(i.register(r,{...e.rules,value:s,...ft(e.disabled)?{disabled:e.disabled}:{}})),d=P.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ee(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!ee(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ee(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ee(c.validatingFields,r)},error:{enumerable:!0,get:()=>ee(c.errors,r)}}),[c,r]),u=P.useCallback(C=>f.current.onChange({target:{value:pl(C),name:r},type:ei.CHANGE}),[r]),x=P.useCallback(()=>f.current.onBlur({target:{value:ee(i._formValues,r),name:r},type:ei.BLUR}),[r,i._formValues]),k=P.useCallback(C=>{const v=ee(i._fields,r);v&&C&&(v._f.ref={focus:()=>C.focus&&C.focus(),select:()=>C.select&&C.select(),setCustomValidity:w=>C.setCustomValidity(w),reportValidity:()=>C.reportValidity()})},[i._fields,r]),m=P.useMemo(()=>({name:r,value:s,...ft(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:u,onBlur:x,ref:k}),[r,n,c.disabled,u,x,k,s]);return P.useEffect(()=>{const C=i._options.shouldUnregister||a;i.register(r,{...p.current.rules,...ft(p.current.disabled)?{disabled:p.current.disabled}:{}});const v=(w,$)=>{const F=ee(i._fields,w);F&&F._f&&(F._f.mount=$)};if(v(r,!0),C){const w=Pe(ee(i._options.defaultValues,r));be(i._defaultValues,r,w),Ae(ee(i._formValues,r))&&be(i._formValues,r,w)}return!o&&i.register(r),()=>{(o?C&&!i._state.action:C)?i.unregister(r):v(r,!1)}},[r,i,o,a]),P.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),P.useMemo(()=>({field:m,formState:c,fieldState:d}),[m,c,d])}const Re=e=>e.render(su(e));var yl=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},ct=e=>Array.isArray(e)?e:[e],Eo=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},ua=e=>rt(e)||!ul(e);function Xt(e,t){if(ua(e)||ua(t))return e===t;if(vr(e)&&vr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const o=t[i];if(vr(a)&&vr(o)||Le(a)&&Le(o)||Array.isArray(a)&&Array.isArray(o)?!Xt(a,o):a!==o)return!1}}return!0}var tt=e=>Le(e)&&!Object.keys(e).length,Ua=e=>e.type==="file",Ft=e=>typeof e=="function",ti=e=>{if(!qa)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},xl=e=>e.type==="select-multiple",Ha=e=>e.type==="radio",lu=e=>Ha(e)||Fn(e),Mi=e=>ti(e)&&e.isConnected;function cu(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Ae(e)?n++:e[t[n++]];return e}function uu(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ae(e[t]))return!1;return!0}function He(e,t){const r=Array.isArray(t)?t:bi(t)?[t]:Wa(t),n=r.length===1?e:cu(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Le(n)&&tt(n)||Array.isArray(n)&&uu(n))&&He(e,r.slice(0,-1)),e}var vl=e=>{for(const t in e)if(Ft(e[t]))return!0;return!1};function ri(e,t={}){const r=Array.isArray(e);if(Le(e)||r)for(const n in e)Array.isArray(e[n])||Le(e[n])&&!vl(e[n])?(t[n]=Array.isArray(e[n])?[]:{},ri(e[n],t[n])):rt(e[n])||(t[n]=!0);return t}function bl(e,t,r){const n=Array.isArray(e);if(Le(e)||n)for(const i in e)Array.isArray(e[i])||Le(e[i])&&!vl(e[i])?Ae(t)||ua(r[i])?r[i]=Array.isArray(e[i])?ri(e[i],[]):{...ri(e[i])}:bl(e[i],rt(t)?{}:t[i],r[i]):r[i]=!Xt(e[i],t[i]);return r}var pn=(e,t)=>bl(e,t,ri(t));const ko={value:!1,isValid:!1},To={value:!0,isValid:!0};var wl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ae(e[0].attributes.value)?Ae(e[0].value)||e[0].value===""?To:{value:e[0].value,isValid:!0}:To:ko}return ko},Sl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ae(e)?e:t?e===""?NaN:e&&+e:r&&Mt(e)?new Date(e):n?n(e):e;const jo={isValid:!1,value:null};var Cl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,jo):jo;function Fo(e){const t=e.ref;return Ua(t)?t.files:Ha(t)?Cl(e.refs).value:xl(t)?[...t.selectedOptions].map(({value:r})=>r):Fn(t)?wl(e.refs).value:Sl(Ae(t.value)?e.ref.value:t.value,e)}var pu=(e,t,r,n)=>{const i={};for(const a of e){const o=ee(t,a);o&&be(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},ni=e=>e instanceof RegExp,dn=e=>Ae(e)?e:ni(e)?e.source:Le(e)?ni(e.value)?e.value.source:e.value:e,Wr=e=>({isOnSubmit:!e||e===Ct.onSubmit,isOnBlur:e===Ct.onBlur,isOnChange:e===Ct.onChange,isOnAll:e===Ct.all,isOnTouch:e===Ct.onTouched});const Ao="AsyncFunction";var du=e=>!!e&&!!e.validate&&!!(Ft(e.validate)&&e.validate.constructor.name===Ao||Le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ao)),fu=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),pa=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Hr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=ee(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Hr(s,t))break}else if(Le(s)&&Hr(s,t))break}}};function Oo(e,t,r){const n=ee(e,r);if(n||bi(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=ee(t,a),s=ee(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var hu=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return tt(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||Ct.all))},mu=(e,t,r)=>!e||!t||e===t||ct(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),gu=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,yu=(e,t)=>!wi(ee(e,t)).length&&He(e,t),El=(e,t,r)=>{const n=ct(ee(e,r));return be(n,"root",t[r]),be(e,r,n),e},Hn=e=>Mt(e);function _o(e,t,r="validate"){if(Hn(e)||Array.isArray(e)&&e.every(Hn)||ft(e)&&!e)return{type:r,message:Hn(e)?e:"",ref:t}}var Mr=e=>Le(e)&&!ni(e)?e:{value:e,message:""},da=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:c,maxLength:p,minLength:f,min:d,max:u,pattern:x,validate:k,name:m,valueAsNumber:C,mount:v}=e._f,w=ee(r,m);if(!v||t.has(m))return{};const $=s?s[0]:o,F=q=>{i&&$.reportValidity&&($.setCustomValidity(ft(q)?"":q||""),$.reportValidity())},E={},_=Ha(o),I=Fn(o),R=_||I,Y=(C||Ua(o))&&Ae(o.value)&&Ae(w)||ti(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,h=yl.bind(null,m,n,E),B=(q,Z,L,H=zt.maxLength,G=zt.minLength)=>{const re=q?Z:L;E[m]={type:q?H:G,message:re,ref:o,...h(q?H:G,re)}};if(a?!Array.isArray(w)||!w.length:c&&(!R&&(Y||rt(w))||ft(w)&&!w||I&&!wl(s).isValid||_&&!Cl(s).isValid)){const{value:q,message:Z}=Hn(c)?{value:!!c,message:c}:Mr(c);if(q&&(E[m]={type:zt.required,message:Z,ref:$,...h(zt.required,Z)},!n))return F(Z),E}if(!Y&&(!rt(d)||!rt(u))){let q,Z;const L=Mr(u),H=Mr(d);if(!rt(w)&&!isNaN(w)){const G=o.valueAsNumber||w&&+w;rt(L.value)||(q=G>L.value),rt(H.value)||(Z=G<H.value)}else{const G=o.valueAsDate||new Date(w),re=U=>new Date(new Date().toDateString()+" "+U),ce=o.type=="time",D=o.type=="week";Mt(L.value)&&w&&(q=ce?re(w)>re(L.value):D?w>L.value:G>new Date(L.value)),Mt(H.value)&&w&&(Z=ce?re(w)<re(H.value):D?w<H.value:G<new Date(H.value))}if((q||Z)&&(B(!!q,L.message,H.message,zt.max,zt.min),!n))return F(E[m].message),E}if((p||f)&&!Y&&(Mt(w)||a&&Array.isArray(w))){const q=Mr(p),Z=Mr(f),L=!rt(q.value)&&w.length>+q.value,H=!rt(Z.value)&&w.length<+Z.value;if((L||H)&&(B(L,q.message,Z.message),!n))return F(E[m].message),E}if(x&&!Y&&Mt(w)){const{value:q,message:Z}=Mr(x);if(ni(q)&&!w.match(q)&&(E[m]={type:zt.pattern,message:Z,ref:o,...h(zt.pattern,Z)},!n))return F(Z),E}if(k){if(Ft(k)){const q=await k(w,r),Z=_o(q,$);if(Z&&(E[m]={...Z,...h(zt.validate,Z.message)},!n))return F(Z.message),E}else if(Le(k)){let q={};for(const Z in k){if(!tt(q)&&!n)break;const L=_o(await k[Z](w,r),$,Z);L&&(q={...L,...h(Z,L.message)},F(L.message),n&&(E[m]=q))}if(!tt(q)&&(E[m]={ref:$,...q},!n))return E}}return F(!0),E};const xu={mode:Ct.onSubmit,reValidateMode:Ct.onChange,shouldFocusError:!0};function vu(e={}){let t={...xu,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ft(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const n={};let i=Le(t.defaultValues)||Le(t.values)?Pe(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Pe(i),o={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,p=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...f};const u={array:Eo(),state:Eo()},x=t.criteriaMode===Ct.all,k=S=>j=>{clearTimeout(p),p=setTimeout(S,j)},m=async S=>{if(!t.disabled&&(f.isValid||d.isValid||S)){const j=t.resolver?tt((await I()).errors):await Y(n,!0);j!==r.isValid&&u.state.next({isValid:j})}},C=(S,j)=>{!t.disabled&&(f.isValidating||f.validatingFields||d.isValidating||d.validatingFields)&&((S||Array.from(s.mount)).forEach(y=>{y&&(j?be(r.validatingFields,y,j):He(r.validatingFields,y))}),u.state.next({validatingFields:r.validatingFields,isValidating:!tt(r.validatingFields)}))},v=(S,j=[],y,M,b=!0,A=!0)=>{if(M&&y&&!t.disabled){if(o.action=!0,A&&Array.isArray(ee(n,S))){const V=y(ee(n,S),M.argA,M.argB);b&&be(n,S,V)}if(A&&Array.isArray(ee(r.errors,S))){const V=y(ee(r.errors,S),M.argA,M.argB);b&&be(r.errors,S,V),yu(r.errors,S)}if((f.touchedFields||d.touchedFields)&&A&&Array.isArray(ee(r.touchedFields,S))){const V=y(ee(r.touchedFields,S),M.argA,M.argB);b&&be(r.touchedFields,S,V)}(f.dirtyFields||d.dirtyFields)&&(r.dirtyFields=pn(i,a)),u.state.next({name:S,isDirty:B(S,j),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else be(a,S,j)},w=(S,j)=>{be(r.errors,S,j),u.state.next({errors:r.errors})},$=S=>{r.errors=S,u.state.next({errors:r.errors,isValid:!1})},F=(S,j,y,M)=>{const b=ee(n,S);if(b){const A=ee(a,S,Ae(y)?ee(i,S):y);Ae(A)||M&&M.defaultChecked||j?be(a,S,j?A:Fo(b._f)):L(S,A),o.mount&&m()}},E=(S,j,y,M,b)=>{let A=!1,V=!1;const z={name:S};if(!t.disabled){if(!y||M){(f.isDirty||d.isDirty)&&(V=r.isDirty,r.isDirty=z.isDirty=B(),A=V!==z.isDirty);const K=Xt(ee(i,S),j);V=!!ee(r.dirtyFields,S),K?He(r.dirtyFields,S):be(r.dirtyFields,S,!0),z.dirtyFields=r.dirtyFields,A=A||(f.dirtyFields||d.dirtyFields)&&V!==!K}if(y){const K=ee(r.touchedFields,S);K||(be(r.touchedFields,S,y),z.touchedFields=r.touchedFields,A=A||(f.touchedFields||d.touchedFields)&&K!==y)}A&&b&&u.state.next(z)}return A?z:{}},_=(S,j,y,M)=>{const b=ee(r.errors,S),A=(f.isValid||d.isValid)&&ft(j)&&r.isValid!==j;if(t.delayError&&y?(c=k(()=>w(S,y)),c(t.delayError)):(clearTimeout(p),c=null,y?be(r.errors,S,y):He(r.errors,S)),(y?!Xt(b,y):b)||!tt(M)||A){const V={...M,...A&&ft(j)?{isValid:j}:{},errors:r.errors,name:S};r={...r,...V},u.state.next(V)}},I=async S=>{C(S,!0);const j=await t.resolver(a,t.context,pu(S||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return C(S),j},R=async S=>{const{errors:j}=await I(S);if(S)for(const y of S){const M=ee(j,y);M?be(r.errors,y,M):He(r.errors,y)}else r.errors=j;return j},Y=async(S,j,y={valid:!0})=>{for(const M in S){const b=S[M];if(b){const{_f:A,...V}=b;if(A){const z=s.array.has(A.name),K=b._f&&du(b._f);K&&f.validatingFields&&C([M],!0);const de=await da(b,s.disabled,a,x,t.shouldUseNativeValidation&&!j,z);if(K&&f.validatingFields&&C([M]),de[A.name]&&(y.valid=!1,j))break;!j&&(ee(de,A.name)?z?El(r.errors,de,A.name):be(r.errors,A.name,de[A.name]):He(r.errors,A.name))}!tt(V)&&await Y(V,j,y)}}return y.valid},h=()=>{for(const S of s.unMount){const j=ee(n,S);j&&(j._f.refs?j._f.refs.every(y=>!Mi(y)):!Mi(j._f.ref))&&Q(S)}s.unMount=new Set},B=(S,j)=>!t.disabled&&(S&&j&&be(a,S,j),!Xt(U(),i)),q=(S,j,y)=>ml(S,s,{...o.mount?a:Ae(j)?i:Mt(S)?{[S]:j}:j},y,j),Z=S=>wi(ee(o.mount?a:i,S,t.shouldUnregister?ee(i,S,[]):[])),L=(S,j,y={})=>{const M=ee(n,S);let b=j;if(M){const A=M._f;A&&(!A.disabled&&be(a,S,Sl(j,A)),b=ti(A.ref)&&rt(j)?"":j,xl(A.ref)?[...A.ref.options].forEach(V=>V.selected=b.includes(V.value)):A.refs?Fn(A.ref)?A.refs.forEach(V=>{(!V.defaultChecked||!V.disabled)&&(Array.isArray(b)?V.checked=!!b.find(z=>z===V.value):V.checked=b===V.value||!!b)}):A.refs.forEach(V=>V.checked=V.value===b):Ua(A.ref)?A.ref.value="":(A.ref.value=b,A.ref.type||u.state.next({name:S,values:Pe(a)})))}(y.shouldDirty||y.shouldTouch)&&E(S,b,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&D(S)},H=(S,j,y)=>{for(const M in j){if(!j.hasOwnProperty(M))return;const b=j[M],A=S+"."+M,V=ee(n,A);(s.array.has(S)||Le(b)||V&&!V._f)&&!vr(b)?H(A,b,y):L(A,b,y)}},G=(S,j,y={})=>{const M=ee(n,S),b=s.array.has(S),A=Pe(j);be(a,S,A),b?(u.array.next({name:S,values:Pe(a)}),(f.isDirty||f.dirtyFields||d.isDirty||d.dirtyFields)&&y.shouldDirty&&u.state.next({name:S,dirtyFields:pn(i,a),isDirty:B(S,A)})):M&&!M._f&&!rt(A)?H(S,A,y):L(S,A,y),pa(S,s)&&u.state.next({...r}),u.state.next({name:o.mount?S:void 0,values:Pe(a)})},re=async S=>{o.mount=!0;const j=S.target;let y=j.name,M=!0;const b=ee(n,y),A=K=>{M=Number.isNaN(K)||vr(K)&&isNaN(K.getTime())||Xt(K,ee(a,y,K))},V=Wr(t.mode),z=Wr(t.reValidateMode);if(b){let K,de;const ge=j.type?Fo(b._f):pl(S),me=S.type===ei.BLUR||S.type===ei.FOCUS_OUT,Ne=!fu(b._f)&&!t.resolver&&!ee(r.errors,y)&&!b._f.deps||gu(me,ee(r.touchedFields,y),r.isSubmitted,z,V),Oe=pa(y,s,me);be(a,y,ge),me?(b._f.onBlur&&b._f.onBlur(S),c&&c(0)):b._f.onChange&&b._f.onChange(S);const it=E(y,ge,me),dt=!tt(it)||Oe;if(!me&&u.state.next({name:y,type:S.type,values:Pe(a)}),Ne)return(f.isValid||d.isValid)&&(t.mode==="onBlur"?me&&m():me||m()),dt&&u.state.next({name:y,...Oe?{}:it});if(!me&&Oe&&u.state.next({...r}),t.resolver){const{errors:Me}=await I([y]);if(A(ge),M){const ne=Oo(r.errors,n,y),Ge=Oo(Me,n,ne.name||y);K=Ge.error,y=Ge.name,de=tt(Me)}}else C([y],!0),K=(await da(b,s.disabled,a,x,t.shouldUseNativeValidation))[y],C([y]),A(ge),M&&(K?de=!1:(f.isValid||d.isValid)&&(de=await Y(n,!0)));M&&(b._f.deps&&D(b._f.deps),_(y,de,K,it))}},ce=(S,j)=>{if(ee(r.errors,j)&&S.focus)return S.focus(),1},D=async(S,j={})=>{let y,M;const b=ct(S);if(t.resolver){const A=await R(Ae(S)?S:b);y=tt(A),M=S?!b.some(V=>ee(A,V)):y}else S?(M=(await Promise.all(b.map(async A=>{const V=ee(n,A);return await Y(V&&V._f?{[A]:V}:V)}))).every(Boolean),!(!M&&!r.isValid)&&m()):M=y=await Y(n);return u.state.next({...!Mt(S)||(f.isValid||d.isValid)&&y!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:y}:{},errors:r.errors}),j.shouldFocus&&!M&&Hr(n,ce,S?b:s.mount),M},U=S=>{const j={...o.mount?a:i};return Ae(S)?j:Mt(S)?ee(j,S):S.map(y=>ee(j,y))},X=(S,j)=>({invalid:!!ee((j||r).errors,S),isDirty:!!ee((j||r).dirtyFields,S),error:ee((j||r).errors,S),isValidating:!!ee(r.validatingFields,S),isTouched:!!ee((j||r).touchedFields,S)}),ue=S=>{S&&ct(S).forEach(j=>He(r.errors,j)),u.state.next({errors:S?r.errors:{}})},fe=(S,j,y)=>{const M=(ee(n,S,{_f:{}})._f||{}).ref,b=ee(r.errors,S)||{},{ref:A,message:V,type:z,...K}=b;be(r.errors,S,{...K,...j,ref:M}),u.state.next({name:S,errors:r.errors,isValid:!1}),y&&y.shouldFocus&&M&&M.focus&&M.focus()},pe=(S,j)=>Ft(S)?u.state.subscribe({next:y=>S(q(void 0,j),y)}):q(S,j,!0),te=S=>u.state.subscribe({next:j=>{mu(S.name,j.name,S.exact)&&hu(j,S.formState||f,Ye,S.reRenderRoot)&&S.callback({values:{...a},...r,...j})}}).unsubscribe,W=S=>(o.mount=!0,d={...d,...S.formState},te({...S,formState:d})),Q=(S,j={})=>{for(const y of S?ct(S):s.mount)s.mount.delete(y),s.array.delete(y),j.keepValue||(He(n,y),He(a,y)),!j.keepError&&He(r.errors,y),!j.keepDirty&&He(r.dirtyFields,y),!j.keepTouched&&He(r.touchedFields,y),!j.keepIsValidating&&He(r.validatingFields,y),!t.shouldUnregister&&!j.keepDefaultValue&&He(i,y);u.state.next({values:Pe(a)}),u.state.next({...r,...j.keepDirty?{isDirty:B()}:{}}),!j.keepIsValid&&m()},ae=({disabled:S,name:j})=>{(ft(S)&&o.mount||S||s.disabled.has(j))&&(S?s.disabled.add(j):s.disabled.delete(j))},se=(S,j={})=>{let y=ee(n,S);const M=ft(j.disabled)||ft(t.disabled);return be(n,S,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:S}},name:S,mount:!0,...j}}),s.mount.add(S),y?ae({disabled:ft(j.disabled)?j.disabled:t.disabled,name:S}):F(S,!0,j.value),{...M?{disabled:j.disabled||t.disabled}:{},...t.progressive?{required:!!j.required,min:dn(j.min),max:dn(j.max),minLength:dn(j.minLength),maxLength:dn(j.maxLength),pattern:dn(j.pattern)}:{},name:S,onChange:re,onBlur:re,ref:b=>{if(b){se(S,j),y=ee(n,S);const A=Ae(b.value)&&b.querySelectorAll&&b.querySelectorAll("input,select,textarea")[0]||b,V=lu(A),z=y._f.refs||[];if(V?z.find(K=>K===A):A===y._f.ref)return;be(n,S,{_f:{...y._f,...V?{refs:[...z.filter(Mi),A,...Array.isArray(ee(i,S))?[{}]:[]],ref:{type:A.type,name:S}}:{ref:A}}}),F(S,!1,void 0,A)}else y=ee(n,S,{}),y._f&&(y._f.mount=!1),(t.shouldUnregister||j.shouldUnregister)&&!(dl(s.array,S)&&o.action)&&s.unMount.add(S)}}},le=()=>t.shouldFocusError&&Hr(n,ce,s.mount),ve=S=>{ft(S)&&(u.state.next({disabled:S}),Hr(n,(j,y)=>{const M=ee(n,y);M&&(j.disabled=M._f.disabled||S,Array.isArray(M._f.refs)&&M._f.refs.forEach(b=>{b.disabled=M._f.disabled||S}))},0,!1))},J=(S,j)=>async y=>{let M;y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let b=Pe(a);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:A,values:V}=await I();r.errors=A,b=V}else await Y(n);if(s.disabled.size)for(const A of s.disabled)be(b,A,void 0);if(He(r.errors,"root"),tt(r.errors)){u.state.next({errors:{}});try{await S(b,y)}catch(A){M=A}}else j&&await j({...r.errors},y),le(),setTimeout(le);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:tt(r.errors)&&!M,submitCount:r.submitCount+1,errors:r.errors}),M)throw M},Ie=(S,j={})=>{ee(n,S)&&(Ae(j.defaultValue)?G(S,Pe(ee(i,S))):(G(S,j.defaultValue),be(i,S,Pe(j.defaultValue))),j.keepTouched||He(r.touchedFields,S),j.keepDirty||(He(r.dirtyFields,S),r.isDirty=j.defaultValue?B(S,Pe(ee(i,S))):B()),j.keepError||(He(r.errors,S),f.isValid&&m()),u.state.next({...r}))},Ke=(S,j={})=>{const y=S?Pe(S):i,M=Pe(y),b=tt(S),A=b?i:M;if(j.keepDefaultValues||(i=y),!j.keepValues){if(j.keepDirtyValues){const V=new Set([...s.mount,...Object.keys(pn(i,a))]);for(const z of Array.from(V))ee(r.dirtyFields,z)?be(A,z,ee(a,z)):G(z,ee(A,z))}else{if(qa&&Ae(S))for(const V of s.mount){const z=ee(n,V);if(z&&z._f){const K=Array.isArray(z._f.refs)?z._f.refs[0]:z._f.ref;if(ti(K)){const de=K.closest("form");if(de){de.reset();break}}}}for(const V of s.mount)G(V,ee(A,V))}a=Pe(A),u.array.next({values:{...A}}),u.state.next({values:{...A}})}s={mount:j.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!j.keepIsValid||!!j.keepDirtyValues,o.watch=!!t.shouldUnregister,u.state.next({submitCount:j.keepSubmitCount?r.submitCount:0,isDirty:b?!1:j.keepDirty?r.isDirty:!!(j.keepDefaultValues&&!Xt(S,i)),isSubmitted:j.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:b?{}:j.keepDirtyValues?j.keepDefaultValues&&a?pn(i,a):r.dirtyFields:j.keepDefaultValues&&S?pn(i,S):j.keepDirty?r.dirtyFields:{},touchedFields:j.keepTouched?r.touchedFields:{},errors:j.keepErrors?r.errors:{},isSubmitSuccessful:j.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ze=(S,j)=>Ke(Ft(S)?S(a):S,j),kt=(S,j={})=>{const y=ee(n,S),M=y&&y._f;if(M){const b=M.refs?M.refs[0]:M.ref;b.focus&&(b.focus(),j.shouldSelect&&Ft(b.select)&&b.select())}},Ye=S=>{r={...r,...S}},Ue={control:{register:se,unregister:Q,getFieldState:X,handleSubmit:J,setError:fe,_subscribe:te,_runSchema:I,_focusError:le,_getWatch:q,_getDirty:B,_setValid:m,_setFieldArray:v,_setDisabledField:ae,_setErrors:$,_getFieldArray:Z,_reset:Ke,_resetDefaultValues:()=>Ft(t.defaultValues)&&t.defaultValues().then(S=>{Ze(S,t.resetOptions),u.state.next({isLoading:!1})}),_removeUnmounted:h,_disableForm:ve,_subjects:u,_proxyFormState:f,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(S){o=S},get _defaultValues(){return i},get _names(){return s},set _names(S){s=S},get _formState(){return r},get _options(){return t},set _options(S){t={...t,...S}}},subscribe:W,trigger:D,register:se,handleSubmit:J,watch:pe,setValue:G,getValues:U,reset:Ze,resetField:Ie,clearErrors:ue,unregister:Q,setError:fe,setFocus:kt,getFieldState:X};return{...Ue,formControl:Ue}}var Yt=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},zi=(e,t,r={})=>r.shouldFocus||Ae(r.shouldFocus)?r.focusName||`${e}.${Ae(r.focusIndex)?t:r.focusIndex}.`:"",Bi=(e,t)=>[...e,...ct(t)],Vi=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Ni(e,t,r){return[...e.slice(0,t),...ct(r),...e.slice(t)]}var Li=(e,t,r)=>Array.isArray(e)?(Ae(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],qi=(e,t)=>[...ct(t),...ct(e)];function bu(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return wi(n).length?n:[]}var Wi=(e,t)=>Ae(t)?[]:bu(e,ct(t).sort((r,n)=>r-n)),Ui=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Ro=(e,t,r)=>(e[t]=r,e);function wu(e){const t=Si(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a,rules:o}=e,[s,c]=P.useState(r._getFieldArray(n)),p=P.useRef(r._getFieldArray(n).map(Yt)),f=P.useRef(s),d=P.useRef(n),u=P.useRef(!1);d.current=n,f.current=s,r._names.array.add(n),o&&r.register(n,o),Ci(()=>r._subjects.array.subscribe({next:({values:_,name:I})=>{if(I===d.current||!I){const R=ee(_,d.current);Array.isArray(R)&&(c(R),p.current=R.map(Yt))}}}).unsubscribe,[r]);const x=P.useCallback(_=>{u.current=!0,r._setFieldArray(n,_)},[r,n]),k=(_,I)=>{const R=ct(Pe(_)),Y=Bi(r._getFieldArray(n),R);r._names.focus=zi(n,Y.length-1,I),p.current=Bi(p.current,R.map(Yt)),x(Y),c(Y),r._setFieldArray(n,Y,Bi,{argA:Vi(_)})},m=(_,I)=>{const R=ct(Pe(_)),Y=qi(r._getFieldArray(n),R);r._names.focus=zi(n,0,I),p.current=qi(p.current,R.map(Yt)),x(Y),c(Y),r._setFieldArray(n,Y,qi,{argA:Vi(_)})},C=_=>{const I=Wi(r._getFieldArray(n),_);p.current=Wi(p.current,_),x(I),c(I),!Array.isArray(ee(r._fields,n))&&be(r._fields,n,void 0),r._setFieldArray(n,I,Wi,{argA:_})},v=(_,I,R)=>{const Y=ct(Pe(I)),h=Ni(r._getFieldArray(n),_,Y);r._names.focus=zi(n,_,R),p.current=Ni(p.current,_,Y.map(Yt)),x(h),c(h),r._setFieldArray(n,h,Ni,{argA:_,argB:Vi(I)})},w=(_,I)=>{const R=r._getFieldArray(n);Ui(R,_,I),Ui(p.current,_,I),x(R),c(R),r._setFieldArray(n,R,Ui,{argA:_,argB:I},!1)},$=(_,I)=>{const R=r._getFieldArray(n);Li(R,_,I),Li(p.current,_,I),x(R),c(R),r._setFieldArray(n,R,Li,{argA:_,argB:I},!1)},F=(_,I)=>{const R=Pe(I),Y=Ro(r._getFieldArray(n),_,R);p.current=[...Y].map((h,B)=>!h||B===_?Yt():p.current[B]),x(Y),c([...Y]),r._setFieldArray(n,Y,Ro,{argA:_,argB:R},!0,!1)},E=_=>{const I=ct(Pe(_));p.current=I.map(Yt),x([...I]),c([...I]),r._setFieldArray(n,[...I],R=>R,{},!0,!1)};return P.useEffect(()=>{if(r._state.action=!1,pa(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!Wr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Wr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(_=>{const I=ee(_.errors,n),R=ee(r._formState.errors,n);(R?!I&&R.type||I&&(R.type!==I.type||R.message!==I.message):I&&I.type)&&(I?be(r._formState.errors,n,I):He(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const _=ee(r._fields,n);_&&_._f&&!(Wr(r._options.reValidateMode).isOnSubmit&&Wr(r._options.mode).isOnSubmit)&&da(_,r._names.disabled,r._formValues,r._options.criteriaMode===Ct.all,r._options.shouldUseNativeValidation,!0).then(I=>!tt(I)&&r._subjects.state.next({errors:El(r._formState.errors,I,n)}))}r._subjects.state.next({name:n,values:Pe(r._formValues)}),r._names.focus&&Hr(r._fields,(_,I)=>{if(r._names.focus&&I.startsWith(r._names.focus)&&_.focus)return _.focus(),1}),r._names.focus="",r._setValid(),u.current=!1},[s,n,r]),P.useEffect(()=>(!ee(r._formValues,n)&&r._setFieldArray(n),()=>{const _=(I,R)=>{const Y=ee(r._fields,I);Y&&Y._f&&(Y._f.mount=R)};r._options.shouldUnregister||a?r.unregister(n):_(n,!1)}),[n,r,i,a]),{swap:P.useCallback(w,[x,n,r]),move:P.useCallback($,[x,n,r]),prepend:P.useCallback(m,[x,n,r]),append:P.useCallback(k,[x,n,r]),remove:P.useCallback(C,[x,n,r]),insert:P.useCallback(v,[x,n,r]),update:P.useCallback(F,[x,n,r]),replace:P.useCallback(E,[x,n,r]),fields:P.useMemo(()=>s.map((_,I)=>({..._,[i]:p.current[I]||Yt()})),[s,i])}}function Su(e={}){const t=P.useRef(void 0),r=P.useRef(void 0),[n,i]=P.useState({isDirty:!1,isValidating:!1,isLoading:Ft(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ft(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ft(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=vu(e);t.current={...s,formState:n}}const a=t.current.control;return a._options=e,Ci(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),P.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),P.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),P.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),P.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),P.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),P.useEffect(()=>{e.values&&!Xt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(o=>({...o}))):a._resetDefaultValues()},[a,e.values]),P.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=hl(n,a),t.current}const Po=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ee(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},kl=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Po(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>Po(i,r,e))}},Cu=(e,t)=>{t.shouldUseNativeValidation&&kl(e,t);const r={};for(const n in e){const i=ee(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(Eu(t.names||Object.keys(e),n)){const o=Object.assign({},ee(r,n));be(o,"root",a),be(r,n,o)}else be(r,n,a)}return r},Eu=(e,t)=>{const r=$o(t);return e.some(n=>$o(n).match(`^${r}\\.\\d+`))};function $o(e){return e.replace(/\]|\[/g,"")}function ku(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(o,s){try{var c=(t!=null&&t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:i}))).then(function(p){return a.shouldUseNativeValidation&&kl({},a),{values:r.raw?Object.assign({},n):p,errors:{}}}))}catch(p){return s(p)}return c&&c.then?c.then(void 0,s):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:Cu((s=o,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(s.inner||[]).reduce(function(p,f){if(p[f.path]||(p[f.path]={message:f.message,type:f.type}),c){var d=p[f.path].types,u=d&&d[f.type];p[f.path]=yl(f.path,c,p,f.type,u?[].concat(u,f.message):f.message)}return p},{})),a)};var s,c}))}catch(o){return Promise.reject(o)}}}var An=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Rr=typeof window>"u"||"Deno"in globalThis;function st(){}function Tu(e,t){return typeof e=="function"?e(t):e}function fa(e){return typeof e=="number"&&e>=0&&e!==1/0}function Tl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function lr(e,t){return typeof e=="function"?e(t):e}function bt(e,t){return typeof e=="function"?e(t):e}function Do(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==Ka(o,t.options))return!1}else if(!wn(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Io(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(bn(t.options.mutationKey)!==bn(a))return!1}else if(!wn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ka(e,t){return((t==null?void 0:t.queryKeyHashFn)||bn)(e)}function bn(e){return JSON.stringify(e,(t,r)=>ga(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function wn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>wn(e[r],t[r])):!1}function ha(e,t){if(e===t)return e;const r=Mo(e)&&Mo(t);if(r||ga(e)&&ga(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{},c=new Set(n);let p=0;for(let f=0;f<o;f++){const d=r?f:a[f];(!r&&c.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(s[d]=void 0,p++):(s[d]=ha(e[d],t[d]),s[d]===e[d]&&e[d]!==void 0&&p++)}return i===o&&p===i?e:s}return t}function ma(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Mo(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ga(e){if(!zo(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!zo(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function zo(e){return Object.prototype.toString.call(e)==="[object Object]"}function ju(e){return new Promise(t=>{setTimeout(t,e)})}function ya(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return ha(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return ha(e,t)}return t}function Fu(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Au(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ii=Symbol();function jl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ii&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ii?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ou(e,t){return typeof e=="function"?e(...t):!!e}var Sr,Jt,Yr,tl,_u=(tl=class extends An{constructor(){super();he(this,Sr);he(this,Jt);he(this,Yr);oe(this,Yr,t=>{if(!Rr&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){O(this,Jt)||this.setEventListener(O(this,Yr))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Jt))==null||t.call(this),oe(this,Jt,void 0))}setEventListener(t){var r;oe(this,Yr,t),(r=O(this,Jt))==null||r.call(this),oe(this,Jt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){O(this,Sr)!==t&&(oe(this,Sr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof O(this,Sr)=="boolean"?O(this,Sr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Sr=new WeakMap,Jt=new WeakMap,Yr=new WeakMap,tl),Ya=new _u,Gr,er,Qr,rl,Ru=(rl=class extends An{constructor(){super();he(this,Gr,!0);he(this,er);he(this,Qr);oe(this,Qr,t=>{if(!Rr&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){O(this,er)||this.setEventListener(O(this,Qr))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,er))==null||t.call(this),oe(this,er,void 0))}setEventListener(t){var r;oe(this,Qr,t),(r=O(this,er))==null||r.call(this),oe(this,er,t(this.setOnline.bind(this)))}setOnline(t){O(this,Gr)!==t&&(oe(this,Gr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return O(this,Gr)}},Gr=new WeakMap,er=new WeakMap,Qr=new WeakMap,rl),ai=new Ru;function xa(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function Pu(e){return Math.min(1e3*2**e,3e4)}function Fl(e){return(e??"online")==="online"?ai.isOnline():!0}var Al=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Hi(e){return e instanceof Al}function Ol(e){let t=!1,r=0,n=!1,i;const a=xa(),o=m=>{var C;n||(u(new Al(m)),(C=e.abort)==null||C.call(e))},s=()=>{t=!0},c=()=>{t=!1},p=()=>Ya.isFocused()&&(e.networkMode==="always"||ai.isOnline())&&e.canRun(),f=()=>Fl(e.networkMode)&&e.canRun(),d=m=>{var C;n||(n=!0,(C=e.onSuccess)==null||C.call(e,m),i==null||i(),a.resolve(m))},u=m=>{var C;n||(n=!0,(C=e.onError)==null||C.call(e,m),i==null||i(),a.reject(m))},x=()=>new Promise(m=>{var C;i=v=>{(n||p())&&m(v)},(C=e.onPause)==null||C.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),k=()=>{if(n)return;let m;const C=r===0?e.initialPromise:void 0;try{m=C??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var _;if(n)return;const w=e.retry??(Rr?0:3),$=e.retryDelay??Pu,F=typeof $=="function"?$(r,v):$,E=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,v);if(t||!E){u(v);return}r++,(_=e.onFail)==null||_.call(e,r,v),ju(F).then(()=>p()?void 0:x()).then(()=>{t?u(v):k()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:c,canStart:f,start:()=>(f()?k():x().then(k),a)}}var $u=e=>setTimeout(e,0);function Du(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=$u;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(c=>{r(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||o()}return c},batchCalls:s=>(...c)=>{a(()=>{s(...c)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var Qe=Du(),Cr,nl,_l=(nl=class{constructor(){he(this,Cr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fa(this.gcTime)&&oe(this,Cr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rr?1/0:5*60*1e3))}clearGcTimeout(){O(this,Cr)&&(clearTimeout(O(this,Cr)),oe(this,Cr,void 0))}},Cr=new WeakMap,nl),Zr,Er,xt,kr,Xe,En,Tr,Tt,qt,il,Iu=(il=class extends _l{constructor(t){super();he(this,Tt);he(this,Zr);he(this,Er);he(this,xt);he(this,kr);he(this,Xe);he(this,En);he(this,Tr);oe(this,Tr,!1),oe(this,En,t.defaultOptions),this.setOptions(t.options),this.observers=[],oe(this,kr,t.client),oe(this,xt,O(this,kr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,oe(this,Zr,Mu(this.options)),this.state=t.state??O(this,Zr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,Xe))==null?void 0:t.promise}setOptions(t){this.options={...O(this,En),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,xt).remove(this)}setData(t,r){const n=ya(this.state.data,t,this.options);return ye(this,Tt,qt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ye(this,Tt,qt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=O(this,Xe))==null?void 0:n.promise;return(i=O(this,Xe))==null||i.cancel(t),r?r.then(st).catch(st):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,Zr))}isActive(){return this.observers.some(t=>bt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ii||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>lr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Tl(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,Xe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,Xe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,xt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(O(this,Xe)&&(O(this,Tr)?O(this,Xe).cancel({revert:!0}):O(this,Xe).cancelRetry()),this.scheduleGc()),O(this,xt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ye(this,Tt,qt).call(this,{type:"invalidate"})}fetch(t,r){var p,f,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(O(this,Xe))return O(this,Xe).continueRetry(),O(this,Xe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(x=>x.options.queryFn);u&&this.setOptions(u.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(oe(this,Tr,!0),n.signal)})},a=()=>{const u=jl(this.options,r),k=(()=>{const m={client:O(this,kr),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return oe(this,Tr,!1),this.options.persister?this.options.persister(u,k,this):u(k)},s=(()=>{const u={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:O(this,kr),state:this.state,fetchFn:a};return i(u),u})();(p=this.options.behavior)==null||p.onFetch(s,this),oe(this,Er,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=s.fetchOptions)==null?void 0:f.meta))&&ye(this,Tt,qt).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta});const c=u=>{var x,k,m,C;Hi(u)&&u.silent||ye(this,Tt,qt).call(this,{type:"error",error:u}),Hi(u)||((k=(x=O(this,xt).config).onError)==null||k.call(x,u,this),(C=(m=O(this,xt).config).onSettled)==null||C.call(m,this.state.data,u,this)),this.scheduleGc()};return oe(this,Xe,Ol({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:u=>{var x,k,m,C;if(u===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(v){c(v);return}(k=(x=O(this,xt).config).onSuccess)==null||k.call(x,u,this),(C=(m=O(this,xt).config).onSettled)==null||C.call(m,u,this.state.error,this),this.scheduleGc()},onError:c,onFail:(u,x)=>{ye(this,Tt,qt).call(this,{type:"failed",failureCount:u,error:x})},onPause:()=>{ye(this,Tt,qt).call(this,{type:"pause"})},onContinue:()=>{ye(this,Tt,qt).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),O(this,Xe).start()}},Zr=new WeakMap,Er=new WeakMap,xt=new WeakMap,kr=new WeakMap,Xe=new WeakMap,En=new WeakMap,Tr=new WeakMap,Tt=new WeakSet,qt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Rl(n.data,this.options),fetchMeta:t.meta??null};case"success":return oe(this,Er,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Hi(i)&&i.revert&&O(this,Er)?{...O(this,Er),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Qe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),O(this,xt).notify({query:this,type:"updated",action:t})})},il);function Rl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Mu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Pt,al,zu=(al=class extends An{constructor(t={}){super();he(this,Pt);this.config=t,oe(this,Pt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ka(i,r);let o=this.get(a);return o||(o=new Iu({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){O(this,Pt).has(t.queryHash)||(O(this,Pt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=O(this,Pt).get(t.queryHash);r&&(t.destroy(),r===t&&O(this,Pt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,Pt).get(t)}getAll(){return[...O(this,Pt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Do(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Do(t,n)):r}notify(t){Qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Pt=new WeakMap,al),$t,Je,jr,Dt,Qt,ol,Bu=(ol=class extends _l{constructor(t){super();he(this,Dt);he(this,$t);he(this,Je);he(this,jr);this.mutationId=t.mutationId,oe(this,Je,t.mutationCache),oe(this,$t,[]),this.state=t.state||Vu(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,$t).includes(t)||(O(this,$t).push(t),this.clearGcTimeout(),O(this,Je).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){oe(this,$t,O(this,$t).filter(r=>r!==t)),this.scheduleGc(),O(this,Je).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,$t).length||(this.state.status==="pending"?this.scheduleGc():O(this,Je).remove(this))}continue(){var t;return((t=O(this,jr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,c,p,f,d,u,x,k,m,C,v,w,$,F,E,_,I,R;const r=()=>{ye(this,Dt,Qt).call(this,{type:"continue"})};oe(this,jr,Ol({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(Y,h)=>{ye(this,Dt,Qt).call(this,{type:"failed",failureCount:Y,error:h})},onPause:()=>{ye(this,Dt,Qt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,Je).canRun(this)}));const n=this.state.status==="pending",i=!O(this,jr).canStart();try{if(n)r();else{ye(this,Dt,Qt).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=O(this,Je).config).onMutate)==null?void 0:o.call(a,t,this));const h=await((c=(s=this.options).onMutate)==null?void 0:c.call(s,t));h!==this.state.context&&ye(this,Dt,Qt).call(this,{type:"pending",context:h,variables:t,isPaused:i})}const Y=await O(this,jr).start();return await((f=(p=O(this,Je).config).onSuccess)==null?void 0:f.call(p,Y,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,Y,t,this.state.context)),await((k=(x=O(this,Je).config).onSettled)==null?void 0:k.call(x,Y,null,this.state.variables,this.state.context,this)),await((C=(m=this.options).onSettled)==null?void 0:C.call(m,Y,null,t,this.state.context)),ye(this,Dt,Qt).call(this,{type:"success",data:Y}),Y}catch(Y){try{throw await((w=(v=O(this,Je).config).onError)==null?void 0:w.call(v,Y,t,this.state.context,this)),await((F=($=this.options).onError)==null?void 0:F.call($,Y,t,this.state.context)),await((_=(E=O(this,Je).config).onSettled)==null?void 0:_.call(E,void 0,Y,this.state.variables,this.state.context,this)),await((R=(I=this.options).onSettled)==null?void 0:R.call(I,void 0,Y,t,this.state.context)),Y}finally{ye(this,Dt,Qt).call(this,{type:"error",error:Y})}}finally{O(this,Je).runNext(this)}}},$t=new WeakMap,Je=new WeakMap,jr=new WeakMap,Dt=new WeakSet,Qt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Qe.batch(()=>{O(this,$t).forEach(n=>{n.onMutationUpdate(t)}),O(this,Je).notify({mutation:this,type:"updated",action:t})})},ol);function Vu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Wt,jt,kn,sl,Nu=(sl=class extends An{constructor(t={}){super();he(this,Wt);he(this,jt);he(this,kn);this.config=t,oe(this,Wt,new Set),oe(this,jt,new Map),oe(this,kn,0)}build(t,r,n){const i=new Bu({mutationCache:this,mutationId:++Dn(this,kn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){O(this,Wt).add(t);const r=In(t);if(typeof r=="string"){const n=O(this,jt).get(r);n?n.push(t):O(this,jt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,Wt).delete(t)){const r=In(t);if(typeof r=="string"){const n=O(this,jt).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&O(this,jt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=In(t);if(typeof r=="string"){const n=O(this,jt).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=In(t);if(typeof r=="string"){const i=(n=O(this,jt).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>{O(this,Wt).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,Wt).clear(),O(this,jt).clear()})}getAll(){return Array.from(O(this,Wt))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Io(r,n))}findAll(t={}){return this.getAll().filter(r=>Io(t,r))}notify(t){Qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Qe.batch(()=>Promise.all(t.map(r=>r.continue().catch(st))))}},Wt=new WeakMap,jt=new WeakMap,kn=new WeakMap,sl);function In(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Bo(e){return{onFetch:(t,r)=>{var f,d,u,x,k;const n=t.options,i=(u=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:u.direction,a=((x=t.state.data)==null?void 0:x.pages)||[],o=((k=t.state.data)==null?void 0:k.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const p=async()=>{let m=!1;const C=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=jl(t.options,t.fetchOptions),w=async($,F,E)=>{if(m)return Promise.reject();if(F==null&&$.pages.length)return Promise.resolve($);const I=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:F,direction:E?"backward":"forward",meta:t.options.meta};return C(B),B})(),R=await v(I),{maxPages:Y}=t.options,h=E?Au:Fu;return{pages:h($.pages,R,Y),pageParams:h($.pageParams,F,Y)}};if(i&&a.length){const $=i==="backward",F=$?Lu:Vo,E={pages:a,pageParams:o},_=F(n,E);s=await w(E,_,$)}else{const $=e??a.length;do{const F=c===0?o[0]??n.initialPageParam:Vo(n,s);if(c>0&&F==null)break;s=await w(s,F),c++}while(c<$)}return s};t.options.persister?t.fetchFn=()=>{var m,C;return(C=(m=t.options).persister)==null?void 0:C.call(m,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=p}}}function Vo(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Lu(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ve,tr,rr,Xr,Jr,nr,en,tn,ll,qu=(ll=class{constructor(e={}){he(this,Ve);he(this,tr);he(this,rr);he(this,Xr);he(this,Jr);he(this,nr);he(this,en);he(this,tn);oe(this,Ve,e.queryCache||new zu),oe(this,tr,e.mutationCache||new Nu),oe(this,rr,e.defaultOptions||{}),oe(this,Xr,new Map),oe(this,Jr,new Map),oe(this,nr,0)}mount(){Dn(this,nr)._++,O(this,nr)===1&&(oe(this,en,Ya.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Ve).onFocus())})),oe(this,tn,ai.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Ve).onOnline())})))}unmount(){var e,t;Dn(this,nr)._--,O(this,nr)===0&&((e=O(this,en))==null||e.call(this),oe(this,en,void 0),(t=O(this,tn))==null||t.call(this),oe(this,tn,void 0))}isFetching(e){return O(this,Ve).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,tr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=O(this,Ve).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=O(this,Ve).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(lr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return O(this,Ve).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=O(this,Ve).get(n.queryHash),a=i==null?void 0:i.state.data,o=Tu(t,a);if(o!==void 0)return O(this,Ve).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Qe.batch(()=>O(this,Ve).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=O(this,Ve).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=O(this,Ve);Qe.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=O(this,Ve);return Qe.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Qe.batch(()=>O(this,Ve).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(st).catch(st)}invalidateQueries(e,t={}){return Qe.batch(()=>(O(this,Ve).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Qe.batch(()=>O(this,Ve).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(st)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(st)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=O(this,Ve).build(this,t);return r.isStaleByTime(lr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(st).catch(st)}fetchInfiniteQuery(e){return e.behavior=Bo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(st).catch(st)}ensureInfiniteQueryData(e){return e.behavior=Bo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ai.isOnline()?O(this,tr).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Ve)}getMutationCache(){return O(this,tr)}getDefaultOptions(){return O(this,rr)}setDefaultOptions(e){oe(this,rr,e)}setQueryDefaults(e,t){O(this,Xr).set(bn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,Xr).values()],r={};return t.forEach(n=>{wn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){O(this,Jr).set(bn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,Jr).values()],r={};return t.forEach(n=>{wn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,rr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ka(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ii&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,rr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,Ve).clear(),O(this,tr).clear()}},Ve=new WeakMap,tr=new WeakMap,rr=new WeakMap,Xr=new WeakMap,Jr=new WeakMap,nr=new WeakMap,en=new WeakMap,tn=new WeakMap,ll),ot,xe,Tn,et,Fr,rn,ir,ar,jn,nn,an,Ar,Or,or,on,Ce,hn,va,ba,wa,Sa,Ca,Ea,ka,Pl,cl,Wu=(cl=class extends An{constructor(t,r){super();he(this,Ce);he(this,ot);he(this,xe);he(this,Tn);he(this,et);he(this,Fr);he(this,rn);he(this,ir);he(this,ar);he(this,jn);he(this,nn);he(this,an);he(this,Ar);he(this,Or);he(this,or);he(this,on,new Set);this.options=r,oe(this,ot,t),oe(this,ar,null),oe(this,ir,xa()),this.options.experimental_prefetchInRender||O(this,ir).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,xe).addObserver(this),No(O(this,xe),this.options)?ye(this,Ce,hn).call(this):this.updateResult(),ye(this,Ce,Sa).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ta(O(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ta(O(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,Ce,Ca).call(this),ye(this,Ce,Ea).call(this),O(this,xe).removeObserver(this)}setOptions(t){const r=this.options,n=O(this,xe);if(this.options=O(this,ot).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bt(this.options.enabled,O(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ye(this,Ce,ka).call(this),O(this,xe).setOptions(this.options),r._defaulted&&!ma(this.options,r)&&O(this,ot).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,xe),observer:this});const i=this.hasListeners();i&&Lo(O(this,xe),n,this.options,r)&&ye(this,Ce,hn).call(this),this.updateResult(),i&&(O(this,xe)!==n||bt(this.options.enabled,O(this,xe))!==bt(r.enabled,O(this,xe))||lr(this.options.staleTime,O(this,xe))!==lr(r.staleTime,O(this,xe)))&&ye(this,Ce,va).call(this);const a=ye(this,Ce,ba).call(this);i&&(O(this,xe)!==n||bt(this.options.enabled,O(this,xe))!==bt(r.enabled,O(this,xe))||a!==O(this,or))&&ye(this,Ce,wa).call(this,a)}getOptimisticResult(t){const r=O(this,ot).getQueryCache().build(O(this,ot),t),n=this.createResult(r,t);return Hu(this,n)&&(oe(this,et,n),oe(this,rn,this.options),oe(this,Fr,O(this,xe).state)),n}getCurrentResult(){return O(this,et)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){O(this,on).add(t)}getCurrentQuery(){return O(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=O(this,ot).defaultQueryOptions(t),n=O(this,ot).getQueryCache().build(O(this,ot),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ye(this,Ce,hn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,et)))}createResult(t,r){var Y;const n=O(this,xe),i=this.options,a=O(this,et),o=O(this,Fr),s=O(this,rn),p=t!==n?t.state:O(this,Tn),{state:f}=t;let d={...f},u=!1,x;if(r._optimisticResults){const h=this.hasListeners(),B=!h&&No(t,r),q=h&&Lo(t,n,r,i);(B||q)&&(d={...d,...Rl(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:k,errorUpdatedAt:m,status:C}=d;x=d.data;let v=!1;if(r.placeholderData!==void 0&&x===void 0&&C==="pending"){let h;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(h=a.data,v=!0):h=typeof r.placeholderData=="function"?r.placeholderData((Y=O(this,an))==null?void 0:Y.state.data,O(this,an)):r.placeholderData,h!==void 0&&(C="success",x=ya(a==null?void 0:a.data,h,r),u=!0)}if(r.select&&x!==void 0&&!v)if(a&&x===(o==null?void 0:o.data)&&r.select===O(this,jn))x=O(this,nn);else try{oe(this,jn,r.select),x=r.select(x),x=ya(a==null?void 0:a.data,x,r),oe(this,nn,x),oe(this,ar,null)}catch(h){oe(this,ar,h)}O(this,ar)&&(k=O(this,ar),x=O(this,nn),m=Date.now(),C="error");const w=d.fetchStatus==="fetching",$=C==="pending",F=C==="error",E=$&&w,_=x!==void 0,R={status:C,fetchStatus:d.fetchStatus,isPending:$,isSuccess:C==="success",isError:F,isInitialLoading:E,isLoading:E,data:x,dataUpdatedAt:d.dataUpdatedAt,error:k,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>p.dataUpdateCount||d.errorUpdateCount>p.errorUpdateCount,isFetching:w,isRefetching:w&&!$,isLoadingError:F&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:F&&_,isStale:Ga(t,r),refetch:this.refetch,promise:O(this,ir),isEnabled:bt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const h=Z=>{R.status==="error"?Z.reject(R.error):R.data!==void 0&&Z.resolve(R.data)},B=()=>{const Z=oe(this,ir,R.promise=xa());h(Z)},q=O(this,ir);switch(q.status){case"pending":t.queryHash===n.queryHash&&h(q);break;case"fulfilled":(R.status==="error"||R.data!==q.value)&&B();break;case"rejected":(R.status!=="error"||R.error!==q.reason)&&B();break}}return R}updateResult(){const t=O(this,et),r=this.createResult(O(this,xe),this.options);if(oe(this,Fr,O(this,xe).state),oe(this,rn,this.options),O(this,Fr).data!==void 0&&oe(this,an,O(this,xe)),ma(r,t))return;oe(this,et,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!O(this,on).size)return!0;const o=new Set(a??O(this,on));return this.options.throwOnError&&o.add("error"),Object.keys(O(this,et)).some(s=>{const c=s;return O(this,et)[c]!==t[c]&&o.has(c)})};ye(this,Ce,Pl).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,Ce,Sa).call(this)}},ot=new WeakMap,xe=new WeakMap,Tn=new WeakMap,et=new WeakMap,Fr=new WeakMap,rn=new WeakMap,ir=new WeakMap,ar=new WeakMap,jn=new WeakMap,nn=new WeakMap,an=new WeakMap,Ar=new WeakMap,Or=new WeakMap,or=new WeakMap,on=new WeakMap,Ce=new WeakSet,hn=function(t){ye(this,Ce,ka).call(this);let r=O(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(st)),r},va=function(){ye(this,Ce,Ca).call(this);const t=lr(this.options.staleTime,O(this,xe));if(Rr||O(this,et).isStale||!fa(t))return;const n=Tl(O(this,et).dataUpdatedAt,t)+1;oe(this,Ar,setTimeout(()=>{O(this,et).isStale||this.updateResult()},n))},ba=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,xe)):this.options.refetchInterval)??!1},wa=function(t){ye(this,Ce,Ea).call(this),oe(this,or,t),!(Rr||bt(this.options.enabled,O(this,xe))===!1||!fa(O(this,or))||O(this,or)===0)&&oe(this,Or,setInterval(()=>{(this.options.refetchIntervalInBackground||Ya.isFocused())&&ye(this,Ce,hn).call(this)},O(this,or)))},Sa=function(){ye(this,Ce,va).call(this),ye(this,Ce,wa).call(this,ye(this,Ce,ba).call(this))},Ca=function(){O(this,Ar)&&(clearTimeout(O(this,Ar)),oe(this,Ar,void 0))},Ea=function(){O(this,Or)&&(clearInterval(O(this,Or)),oe(this,Or,void 0))},ka=function(){const t=O(this,ot).getQueryCache().build(O(this,ot),this.options);if(t===O(this,xe))return;const r=O(this,xe);oe(this,xe,t),oe(this,Tn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Pl=function(t){Qe.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(O(this,et))}),O(this,ot).getQueryCache().notify({query:O(this,xe),type:"observerResultsUpdated"})})},cl);function Uu(e,t){return bt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function No(e,t){return Uu(e,t)||e.state.data!==void 0&&Ta(e,t,t.refetchOnMount)}function Ta(e,t,r){if(bt(t.enabled,e)!==!1&&lr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ga(e,t)}return!1}function Lo(e,t,r,n){return(e!==t||bt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ga(e,r)}function Ga(e,t){return bt(t.enabled,e)!==!1&&e.isStaleByTime(lr(t.staleTime,e))}function Hu(e,t){return!ma(e.getCurrentResult(),t)}var $l=ie.createContext(void 0),Ku=e=>{const t=ie.useContext($l);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Yu=({client:e,children:t})=>(ie.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx($l.Provider,{value:e,children:t})),Dl=ie.createContext(!1),Gu=()=>ie.useContext(Dl);Dl.Provider;function Qu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Zu=ie.createContext(Qu()),Xu=()=>ie.useContext(Zu),Ju=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},ep=e=>{ie.useEffect(()=>{e.clearReset()},[e])},tp=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Ou(r,[e.error,n])),rp=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},np=(e,t)=>e.isLoading&&e.isFetching&&!t,ip=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,qo=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function ap(e,t,r){var d,u,x,k,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=Gu(),i=Xu(),a=Ku(),o=a.defaultQueryOptions(e);(u=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||u.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=n?"isRestoring":"optimistic",rp(o),Ju(o,i),ep(i);const s=!a.getQueryCache().get(o.queryHash),[c]=ie.useState(()=>new t(a,o)),p=c.getOptimisticResult(o),f=!n&&e.subscribed!==!1;if(ie.useSyncExternalStore(ie.useCallback(C=>{const v=f?c.subscribe(Qe.batchCalls(C)):st;return c.updateResult(),v},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),ie.useEffect(()=>{c.setOptions(o)},[o,c]),ip(o,p))throw qo(o,c,i);if(tp({result:p,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw p.error;if((k=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||k.call(x,o,p),o.experimental_prefetchInRender&&!Rr&&np(p,n)){const C=s?qo(o,c,i):(m=a.getQueryCache().get(o.queryHash))==null?void 0:m.promise;C==null||C.catch(st).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?p:c.trackResult(p)}function op(e,t){return ap(e,Wu)}function Qa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mn={exports:{}},zn={exports:{}},we={};/** @license React v16.13.1
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
5
5
  *
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
- */var Ns;function rp(){if(Ns)return Se;Ns=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function D(C){if(typeof C=="object"&&C!==null){var _=C.$$typeof;switch(_){case t:switch(C=C.type,C){case c:case p:case n:case a:case i:case f:return C;default:switch(C=C&&C.$$typeof,C){case o:case d:case E:case x:case s:return C;default:return _}}case r:return _}}}function F(C){return D(C)===p}return Se.AsyncMode=c,Se.ConcurrentMode=p,Se.ContextConsumer=o,Se.ContextProvider=s,Se.Element=t,Se.ForwardRef=d,Se.Fragment=n,Se.Lazy=E,Se.Memo=x,Se.Portal=r,Se.Profiler=a,Se.StrictMode=i,Se.Suspense=f,Se.isAsyncMode=function(C){return F(C)||D(C)===c},Se.isConcurrentMode=F,Se.isContextConsumer=function(C){return D(C)===o},Se.isContextProvider=function(C){return D(C)===s},Se.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},Se.isForwardRef=function(C){return D(C)===d},Se.isFragment=function(C){return D(C)===n},Se.isLazy=function(C){return D(C)===E},Se.isMemo=function(C){return D(C)===x},Se.isPortal=function(C){return D(C)===r},Se.isProfiler=function(C){return D(C)===a},Se.isStrictMode=function(C){return D(C)===i},Se.isSuspense=function(C){return D(C)===f},Se.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===p||C===a||C===i||C===f||C===u||typeof C=="object"&&C!==null&&(C.$$typeof===E||C.$$typeof===x||C.$$typeof===s||C.$$typeof===o||C.$$typeof===d||C.$$typeof===S||C.$$typeof===v||C.$$typeof===j||C.$$typeof===m)},Se.typeOf=D,Se}var Ce={};/** @license React v16.13.1
8
+ */var Wo;function sp(){if(Wo)return we;Wo=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function $(E){if(typeof E=="object"&&E!==null){var _=E.$$typeof;switch(_){case t:switch(E=E.type,E){case c:case p:case n:case a:case i:case d:return E;default:switch(E=E&&E.$$typeof,E){case s:case f:case k:case x:case o:return E;default:return _}}case r:return _}}}function F(E){return $(E)===p}return we.AsyncMode=c,we.ConcurrentMode=p,we.ContextConsumer=s,we.ContextProvider=o,we.Element=t,we.ForwardRef=f,we.Fragment=n,we.Lazy=k,we.Memo=x,we.Portal=r,we.Profiler=a,we.StrictMode=i,we.Suspense=d,we.isAsyncMode=function(E){return F(E)||$(E)===c},we.isConcurrentMode=F,we.isContextConsumer=function(E){return $(E)===s},we.isContextProvider=function(E){return $(E)===o},we.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},we.isForwardRef=function(E){return $(E)===f},we.isFragment=function(E){return $(E)===n},we.isLazy=function(E){return $(E)===k},we.isMemo=function(E){return $(E)===x},we.isPortal=function(E){return $(E)===r},we.isProfiler=function(E){return $(E)===a},we.isStrictMode=function(E){return $(E)===i},we.isSuspense=function(E){return $(E)===d},we.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===p||E===a||E===i||E===d||E===u||typeof E=="object"&&E!==null&&(E.$$typeof===k||E.$$typeof===x||E.$$typeof===o||E.$$typeof===s||E.$$typeof===f||E.$$typeof===C||E.$$typeof===v||E.$$typeof===w||E.$$typeof===m)},we.typeOf=$,we}var Se={};/** @license React v16.13.1
9
9
  * react-is.development.js
10
10
  *
11
11
  * Copyright (c) Facebook, Inc. and its affiliates.
12
12
  *
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
- */var Ls;function np(){return Ls||(Ls=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function D(J){return typeof J=="string"||typeof J=="function"||J===n||J===p||J===a||J===i||J===f||J===u||typeof J=="object"&&J!==null&&(J.$$typeof===E||J.$$typeof===x||J.$$typeof===s||J.$$typeof===o||J.$$typeof===d||J.$$typeof===S||J.$$typeof===v||J.$$typeof===j||J.$$typeof===m)}function F(J){if(typeof J=="object"&&J!==null){var Ie=J.$$typeof;switch(Ie){case t:var Ke=J.type;switch(Ke){case c:case p:case n:case a:case i:case f:return Ke;default:var Xe=Ke&&Ke.$$typeof;switch(Xe){case o:case d:case E:case x:case s:return Xe;default:return Ie}}case r:return Ie}}}var C=c,_=p,I=o,R=s,Y=t,h=d,B=n,q=E,Z=x,L=r,H=a,G=i,ne=f,ue=!1;function P(J){return ue||(ue=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),U(J)||F(J)===c}function U(J){return F(J)===p}function X(J){return F(J)===o}function pe(J){return F(J)===s}function he(J){return typeof J=="object"&&J!==null&&J.$$typeof===t}function de(J){return F(J)===d}function re(J){return F(J)===n}function W(J){return F(J)===E}function Q(J){return F(J)===x}function se(J){return F(J)===r}function le(J){return F(J)===a}function ce(J){return F(J)===i}function be(J){return F(J)===f}Ce.AsyncMode=C,Ce.ConcurrentMode=_,Ce.ContextConsumer=I,Ce.ContextProvider=R,Ce.Element=Y,Ce.ForwardRef=h,Ce.Fragment=B,Ce.Lazy=q,Ce.Memo=Z,Ce.Portal=L,Ce.Profiler=H,Ce.StrictMode=G,Ce.Suspense=ne,Ce.isAsyncMode=P,Ce.isConcurrentMode=U,Ce.isContextConsumer=X,Ce.isContextProvider=pe,Ce.isElement=he,Ce.isForwardRef=de,Ce.isFragment=re,Ce.isLazy=W,Ce.isMemo=Q,Ce.isPortal=se,Ce.isProfiler=le,Ce.isStrictMode=ce,Ce.isSuspense=be,Ce.isValidElementType=D,Ce.typeOf=F}()),Ce}var qs;function Pl(){return qs||(qs=1,process.env.NODE_ENV==="production"?zn.exports=rp():zn.exports=np()),zn.exports}/*
15
+ */var Uo;function lp(){return Uo||(Uo=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function $(J){return typeof J=="string"||typeof J=="function"||J===n||J===p||J===a||J===i||J===d||J===u||typeof J=="object"&&J!==null&&(J.$$typeof===k||J.$$typeof===x||J.$$typeof===o||J.$$typeof===s||J.$$typeof===f||J.$$typeof===C||J.$$typeof===v||J.$$typeof===w||J.$$typeof===m)}function F(J){if(typeof J=="object"&&J!==null){var Ie=J.$$typeof;switch(Ie){case t:var Ke=J.type;switch(Ke){case c:case p:case n:case a:case i:case d:return Ke;default:var Ze=Ke&&Ke.$$typeof;switch(Ze){case s:case f:case k:case x:case o:return Ze;default:return Ie}}case r:return Ie}}}var E=c,_=p,I=s,R=o,Y=t,h=f,B=n,q=k,Z=x,L=r,H=a,G=i,re=d,ce=!1;function D(J){return ce||(ce=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),U(J)||F(J)===c}function U(J){return F(J)===p}function X(J){return F(J)===s}function ue(J){return F(J)===o}function fe(J){return typeof J=="object"&&J!==null&&J.$$typeof===t}function pe(J){return F(J)===f}function te(J){return F(J)===n}function W(J){return F(J)===k}function Q(J){return F(J)===x}function ae(J){return F(J)===r}function se(J){return F(J)===a}function le(J){return F(J)===i}function ve(J){return F(J)===d}Se.AsyncMode=E,Se.ConcurrentMode=_,Se.ContextConsumer=I,Se.ContextProvider=R,Se.Element=Y,Se.ForwardRef=h,Se.Fragment=B,Se.Lazy=q,Se.Memo=Z,Se.Portal=L,Se.Profiler=H,Se.StrictMode=G,Se.Suspense=re,Se.isAsyncMode=D,Se.isConcurrentMode=U,Se.isContextConsumer=X,Se.isContextProvider=ue,Se.isElement=fe,Se.isForwardRef=pe,Se.isFragment=te,Se.isLazy=W,Se.isMemo=Q,Se.isPortal=ae,Se.isProfiler=se,Se.isStrictMode=le,Se.isSuspense=ve,Se.isValidElementType=$,Se.typeOf=F}()),Se}var Ho;function Il(){return Ho||(Ho=1,process.env.NODE_ENV==="production"?zn.exports=sp():zn.exports=lp()),zn.exports}/*
16
16
  object-assign
17
17
  (c) Sindre Sorhus
18
18
  @license MIT
19
- */var Ui,Ws;function ip(){if(Ws)return Ui;Ws=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(d){p[d]=d}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ui=i()?Object.assign:function(a,s){for(var o,c=n(a),p,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var f in o)t.call(o,f)&&(c[f]=o[f]);if(e){p=e(o);for(var u=0;u<p.length;u++)r.call(o,p[u])&&(c[p[u]]=o[p[u]])}}return c},Ui}var Hi,Us;function Ga(){if(Us)return Hi;Us=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hi=e,Hi}var Ki,Hs;function Dl(){return Hs||(Hs=1,Ki=Function.call.bind(Object.prototype.hasOwnProperty)),Ki}var Yi,Ks;function ap(){if(Ks)return Yi;Ks=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ga(),r={},n=Dl();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,c,p){if(process.env.NODE_ENV!=="production"){for(var d in a)if(n(a,d)){var f;try{if(typeof a[d]!="function"){var u=Error((c||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}f=a[d](s,d,c,o,null,t)}catch(E){f=E}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+o+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var x=p?p():"";e("Failed "+o+" type: "+f.message+(x??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Yi=i,Yi}var Gi,Ys;function sp(){if(Ys)return Gi;Ys=1;var e=Pl(),t=ip(),r=Ga(),n=Dl(),i=ap(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var c="Warning: "+o;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Gi=function(o,c){var p=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(U){var X=U&&(p&&U[p]||U[d]);if(typeof X=="function")return X}var u="<<anonymous>>",x={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:j(),arrayOf:D,element:F(),elementType:C(),instanceOf:_,node:h(),objectOf:R,oneOf:I,oneOfType:Y,shape:q,exact:Z};function E(U,X){return U===X?U!==0||1/U===1/X:U!==U&&X!==X}function m(U,X){this.message=U,this.data=X&&typeof X=="object"?X:{},this.stack=""}m.prototype=Error.prototype;function S(U){if(process.env.NODE_ENV!=="production")var X={},pe=0;function he(re,W,Q,se,le,ce,be){if(se=se||u,ce=ce||Q,be!==r){if(c){var J=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw J.name="Invariant Violation",J}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ie=se+":"+Q;!X[Ie]&&pe<3&&(a("You are manually calling a React.PropTypes validation function for the `"+ce+"` prop on `"+se+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),X[Ie]=!0,pe++)}}return W[Q]==null?re?W[Q]===null?new m("The "+le+" `"+ce+"` is marked as required "+("in `"+se+"`, but its value is `null`.")):new m("The "+le+" `"+ce+"` is marked as required in "+("`"+se+"`, but its value is `undefined`.")):null:U(W,Q,se,le,ce)}var de=he.bind(null,!1);return de.isRequired=he.bind(null,!0),de}function v(U){function X(pe,he,de,re,W,Q){var se=pe[he],le=G(se);if(le!==U){var ce=ne(se);return new m("Invalid "+re+" `"+W+"` of type "+("`"+ce+"` supplied to `"+de+"`, expected ")+("`"+U+"`."),{expectedType:U})}return null}return S(X)}function j(){return S(s)}function D(U){function X(pe,he,de,re,W){if(typeof U!="function")return new m("Property `"+W+"` of component `"+de+"` has invalid PropType notation inside arrayOf.");var Q=pe[he];if(!Array.isArray(Q)){var se=G(Q);return new m("Invalid "+re+" `"+W+"` of type "+("`"+se+"` supplied to `"+de+"`, expected an array."))}for(var le=0;le<Q.length;le++){var ce=U(Q,le,de,re,W+"["+le+"]",r);if(ce instanceof Error)return ce}return null}return S(X)}function F(){function U(X,pe,he,de,re){var W=X[pe];if(!o(W)){var Q=G(W);return new m("Invalid "+de+" `"+re+"` of type "+("`"+Q+"` supplied to `"+he+"`, expected a single ReactElement."))}return null}return S(U)}function C(){function U(X,pe,he,de,re){var W=X[pe];if(!e.isValidElementType(W)){var Q=G(W);return new m("Invalid "+de+" `"+re+"` of type "+("`"+Q+"` supplied to `"+he+"`, expected a single ReactElement type."))}return null}return S(U)}function _(U){function X(pe,he,de,re,W){if(!(pe[he]instanceof U)){var Q=U.name||u,se=P(pe[he]);return new m("Invalid "+re+" `"+W+"` of type "+("`"+se+"` supplied to `"+de+"`, expected ")+("instance of `"+Q+"`."))}return null}return S(X)}function I(U){if(!Array.isArray(U))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function X(pe,he,de,re,W){for(var Q=pe[he],se=0;se<U.length;se++)if(E(Q,U[se]))return null;var le=JSON.stringify(U,function(be,J){var Ie=ne(J);return Ie==="symbol"?String(J):J});return new m("Invalid "+re+" `"+W+"` of value `"+String(Q)+"` "+("supplied to `"+de+"`, expected one of "+le+"."))}return S(X)}function R(U){function X(pe,he,de,re,W){if(typeof U!="function")return new m("Property `"+W+"` of component `"+de+"` has invalid PropType notation inside objectOf.");var Q=pe[he],se=G(Q);if(se!=="object")return new m("Invalid "+re+" `"+W+"` of type "+("`"+se+"` supplied to `"+de+"`, expected an object."));for(var le in Q)if(n(Q,le)){var ce=U(Q,le,de,re,W+"."+le,r);if(ce instanceof Error)return ce}return null}return S(X)}function Y(U){if(!Array.isArray(U))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var X=0;X<U.length;X++){var pe=U[X];if(typeof pe!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ue(pe)+" at index "+X+"."),s}function he(de,re,W,Q,se){for(var le=[],ce=0;ce<U.length;ce++){var be=U[ce],J=be(de,re,W,Q,se,r);if(J==null)return null;J.data&&n(J.data,"expectedType")&&le.push(J.data.expectedType)}var Ie=le.length>0?", expected one of type ["+le.join(", ")+"]":"";return new m("Invalid "+Q+" `"+se+"` supplied to "+("`"+W+"`"+Ie+"."))}return S(he)}function h(){function U(X,pe,he,de,re){return L(X[pe])?null:new m("Invalid "+de+" `"+re+"` supplied to "+("`"+he+"`, expected a ReactNode."))}return S(U)}function B(U,X,pe,he,de){return new m((U||"React class")+": "+X+" type `"+pe+"."+he+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+de+"`.")}function q(U){function X(pe,he,de,re,W){var Q=pe[he],se=G(Q);if(se!=="object")return new m("Invalid "+re+" `"+W+"` of type `"+se+"` "+("supplied to `"+de+"`, expected `object`."));for(var le in U){var ce=U[le];if(typeof ce!="function")return B(de,re,W,le,ne(ce));var be=ce(Q,le,de,re,W+"."+le,r);if(be)return be}return null}return S(X)}function Z(U){function X(pe,he,de,re,W){var Q=pe[he],se=G(Q);if(se!=="object")return new m("Invalid "+re+" `"+W+"` of type `"+se+"` "+("supplied to `"+de+"`, expected `object`."));var le=t({},pe[he],U);for(var ce in le){var be=U[ce];if(n(U,ce)&&typeof be!="function")return B(de,re,W,ce,ne(be));if(!be)return new m("Invalid "+re+" `"+W+"` key `"+ce+"` supplied to `"+de+"`.\nBad object: "+JSON.stringify(pe[he],null," ")+`
20
- Valid keys: `+JSON.stringify(Object.keys(U),null," "));var J=be(Q,ce,de,re,W+"."+ce,r);if(J)return J}return null}return S(X)}function L(U){switch(typeof U){case"number":case"string":case"undefined":return!0;case"boolean":return!U;case"object":if(Array.isArray(U))return U.every(L);if(U===null||o(U))return!0;var X=f(U);if(X){var pe=X.call(U),he;if(X!==U.entries){for(;!(he=pe.next()).done;)if(!L(he.value))return!1}else for(;!(he=pe.next()).done;){var de=he.value;if(de&&!L(de[1]))return!1}}else return!1;return!0;default:return!1}}function H(U,X){return U==="symbol"?!0:X?X["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&X instanceof Symbol:!1}function G(U){var X=typeof U;return Array.isArray(U)?"array":U instanceof RegExp?"object":H(X,U)?"symbol":X}function ne(U){if(typeof U>"u"||U===null)return""+U;var X=G(U);if(X==="object"){if(U instanceof Date)return"date";if(U instanceof RegExp)return"regexp"}return X}function ue(U){var X=ne(U);switch(X){case"array":case"object":return"an "+X;case"boolean":case"date":case"regexp":return"a "+X;default:return X}}function P(U){return!U.constructor||!U.constructor.name?u:U.constructor.name}return x.checkPropTypes=i,x.resetWarningCache=i.resetWarningCache,x.PropTypes=x,x},Gi}var Qi,Gs;function op(){if(Gs)return Qi;Gs=1;var e=Ga();function t(){}function r(){}return r.resetWarningCache=t,Qi=function(){function n(s,o,c,p,d,f){if(f!==e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},Qi}var Qs;function lp(){if(Qs)return Mn.exports;if(Qs=1,process.env.NODE_ENV!=="production"){var e=Pl(),t=!0;Mn.exports=sp()(e.isElement,t)}else Mn.exports=op()();return Mn.exports}var cp=lp();const k=Ya(cp);function Il(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Il(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Il(e))&&(n&&(n+=" "),n+=t);return n}function un(e,t,r=void 0){const n={};for(const i in e){const a=e[i];let s="",o=!0;for(let c=0;c<a.length;c+=1){const p=a[c];p&&(s+=(o===!0?"":" ")+t(p),o=!1,r&&r[p]&&(s+=" "+r[p]))}n[i]=s}return n}function pr(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function De(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":pr(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Bn={exports:{}},ke={};/**
19
+ */var Ki,Ko;function cp(){if(Ko)return Ki;Ko=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(c.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(f){p[f]=f}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ki=i()?Object.assign:function(a,o){for(var s,c=n(a),p,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var d in s)t.call(s,d)&&(c[d]=s[d]);if(e){p=e(s);for(var u=0;u<p.length;u++)r.call(s,p[u])&&(c[p[u]]=s[p[u]])}}return c},Ki}var Yi,Yo;function Za(){if(Yo)return Yi;Yo=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Yi=e,Yi}var Gi,Go;function Ml(){return Go||(Go=1,Gi=Function.call.bind(Object.prototype.hasOwnProperty)),Gi}var Qi,Qo;function up(){if(Qo)return Qi;Qo=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Za(),r={},n=Ml();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,c,p){if(process.env.NODE_ENV!=="production"){for(var f in a)if(n(a,f)){var d;try{if(typeof a[f]!="function"){var u=Error((c||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=a[f](o,f,c,s,null,t)}catch(k){d=k}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in r)){r[d.message]=!0;var x=p?p():"";e("Failed "+s+" type: "+d.message+(x??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Qi=i,Qi}var Zi,Zo;function pp(){if(Zo)return Zi;Zo=1;var e=Il(),t=cp(),r=Za(),n=Ml(),i=up(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return Zi=function(s,c){var p=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(U){var X=U&&(p&&U[p]||U[f]);if(typeof X=="function")return X}var u="<<anonymous>>",x={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:w(),arrayOf:$,element:F(),elementType:E(),instanceOf:_,node:h(),objectOf:R,oneOf:I,oneOfType:Y,shape:q,exact:Z};function k(U,X){return U===X?U!==0||1/U===1/X:U!==U&&X!==X}function m(U,X){this.message=U,this.data=X&&typeof X=="object"?X:{},this.stack=""}m.prototype=Error.prototype;function C(U){if(process.env.NODE_ENV!=="production")var X={},ue=0;function fe(te,W,Q,ae,se,le,ve){if(ae=ae||u,le=le||Q,ve!==r){if(c){var J=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw J.name="Invariant Violation",J}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ie=ae+":"+Q;!X[Ie]&&ue<3&&(a("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+ae+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),X[Ie]=!0,ue++)}}return W[Q]==null?te?W[Q]===null?new m("The "+se+" `"+le+"` is marked as required "+("in `"+ae+"`, but its value is `null`.")):new m("The "+se+" `"+le+"` is marked as required in "+("`"+ae+"`, but its value is `undefined`.")):null:U(W,Q,ae,se,le)}var pe=fe.bind(null,!1);return pe.isRequired=fe.bind(null,!0),pe}function v(U){function X(ue,fe,pe,te,W,Q){var ae=ue[fe],se=G(ae);if(se!==U){var le=re(ae);return new m("Invalid "+te+" `"+W+"` of type "+("`"+le+"` supplied to `"+pe+"`, expected ")+("`"+U+"`."),{expectedType:U})}return null}return C(X)}function w(){return C(o)}function $(U){function X(ue,fe,pe,te,W){if(typeof U!="function")return new m("Property `"+W+"` of component `"+pe+"` has invalid PropType notation inside arrayOf.");var Q=ue[fe];if(!Array.isArray(Q)){var ae=G(Q);return new m("Invalid "+te+" `"+W+"` of type "+("`"+ae+"` supplied to `"+pe+"`, expected an array."))}for(var se=0;se<Q.length;se++){var le=U(Q,se,pe,te,W+"["+se+"]",r);if(le instanceof Error)return le}return null}return C(X)}function F(){function U(X,ue,fe,pe,te){var W=X[ue];if(!s(W)){var Q=G(W);return new m("Invalid "+pe+" `"+te+"` of type "+("`"+Q+"` supplied to `"+fe+"`, expected a single ReactElement."))}return null}return C(U)}function E(){function U(X,ue,fe,pe,te){var W=X[ue];if(!e.isValidElementType(W)){var Q=G(W);return new m("Invalid "+pe+" `"+te+"` of type "+("`"+Q+"` supplied to `"+fe+"`, expected a single ReactElement type."))}return null}return C(U)}function _(U){function X(ue,fe,pe,te,W){if(!(ue[fe]instanceof U)){var Q=U.name||u,ae=D(ue[fe]);return new m("Invalid "+te+" `"+W+"` of type "+("`"+ae+"` supplied to `"+pe+"`, expected ")+("instance of `"+Q+"`."))}return null}return C(X)}function I(U){if(!Array.isArray(U))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function X(ue,fe,pe,te,W){for(var Q=ue[fe],ae=0;ae<U.length;ae++)if(k(Q,U[ae]))return null;var se=JSON.stringify(U,function(ve,J){var Ie=re(J);return Ie==="symbol"?String(J):J});return new m("Invalid "+te+" `"+W+"` of value `"+String(Q)+"` "+("supplied to `"+pe+"`, expected one of "+se+"."))}return C(X)}function R(U){function X(ue,fe,pe,te,W){if(typeof U!="function")return new m("Property `"+W+"` of component `"+pe+"` has invalid PropType notation inside objectOf.");var Q=ue[fe],ae=G(Q);if(ae!=="object")return new m("Invalid "+te+" `"+W+"` of type "+("`"+ae+"` supplied to `"+pe+"`, expected an object."));for(var se in Q)if(n(Q,se)){var le=U(Q,se,pe,te,W+"."+se,r);if(le instanceof Error)return le}return null}return C(X)}function Y(U){if(!Array.isArray(U))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var X=0;X<U.length;X++){var ue=U[X];if(typeof ue!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ce(ue)+" at index "+X+"."),o}function fe(pe,te,W,Q,ae){for(var se=[],le=0;le<U.length;le++){var ve=U[le],J=ve(pe,te,W,Q,ae,r);if(J==null)return null;J.data&&n(J.data,"expectedType")&&se.push(J.data.expectedType)}var Ie=se.length>0?", expected one of type ["+se.join(", ")+"]":"";return new m("Invalid "+Q+" `"+ae+"` supplied to "+("`"+W+"`"+Ie+"."))}return C(fe)}function h(){function U(X,ue,fe,pe,te){return L(X[ue])?null:new m("Invalid "+pe+" `"+te+"` supplied to "+("`"+fe+"`, expected a ReactNode."))}return C(U)}function B(U,X,ue,fe,pe){return new m((U||"React class")+": "+X+" type `"+ue+"."+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+pe+"`.")}function q(U){function X(ue,fe,pe,te,W){var Q=ue[fe],ae=G(Q);if(ae!=="object")return new m("Invalid "+te+" `"+W+"` of type `"+ae+"` "+("supplied to `"+pe+"`, expected `object`."));for(var se in U){var le=U[se];if(typeof le!="function")return B(pe,te,W,se,re(le));var ve=le(Q,se,pe,te,W+"."+se,r);if(ve)return ve}return null}return C(X)}function Z(U){function X(ue,fe,pe,te,W){var Q=ue[fe],ae=G(Q);if(ae!=="object")return new m("Invalid "+te+" `"+W+"` of type `"+ae+"` "+("supplied to `"+pe+"`, expected `object`."));var se=t({},ue[fe],U);for(var le in se){var ve=U[le];if(n(U,le)&&typeof ve!="function")return B(pe,te,W,le,re(ve));if(!ve)return new m("Invalid "+te+" `"+W+"` key `"+le+"` supplied to `"+pe+"`.\nBad object: "+JSON.stringify(ue[fe],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var J=ve(Q,le,pe,te,W+"."+le,r);if(J)return J}return null}return C(X)}function L(U){switch(typeof U){case"number":case"string":case"undefined":return!0;case"boolean":return!U;case"object":if(Array.isArray(U))return U.every(L);if(U===null||s(U))return!0;var X=d(U);if(X){var ue=X.call(U),fe;if(X!==U.entries){for(;!(fe=ue.next()).done;)if(!L(fe.value))return!1}else for(;!(fe=ue.next()).done;){var pe=fe.value;if(pe&&!L(pe[1]))return!1}}else return!1;return!0;default:return!1}}function H(U,X){return U==="symbol"?!0:X?X["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&X instanceof Symbol:!1}function G(U){var X=typeof U;return Array.isArray(U)?"array":U instanceof RegExp?"object":H(X,U)?"symbol":X}function re(U){if(typeof U>"u"||U===null)return""+U;var X=G(U);if(X==="object"){if(U instanceof Date)return"date";if(U instanceof RegExp)return"regexp"}return X}function ce(U){var X=re(U);switch(X){case"array":case"object":return"an "+X;case"boolean":case"date":case"regexp":return"a "+X;default:return X}}function D(U){return!U.constructor||!U.constructor.name?u:U.constructor.name}return x.checkPropTypes=i,x.resetWarningCache=i.resetWarningCache,x.PropTypes=x,x},Zi}var Xi,Xo;function dp(){if(Xo)return Xi;Xo=1;var e=Za();function t(){}function r(){}return r.resetWarningCache=t,Xi=function(){function n(o,s,c,p,f,d){if(d!==e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},Xi}var Jo;function fp(){if(Jo)return Mn.exports;if(Jo=1,process.env.NODE_ENV!=="production"){var e=Il(),t=!0;Mn.exports=pp()(e.isElement,t)}else Mn.exports=dp()();return Mn.exports}var hp=fp();const T=Qa(hp);function zl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=zl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function nt(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=zl(e))&&(n&&(n+=" "),n+=t);return n}function cn(e,t,r=void 0){const n={};for(const i in e){const a=e[i];let o="",s=!0;for(let c=0;c<a.length;c+=1){const p=a[c];p&&(o+=(s===!0?"":" ")+t(p),s=!1,r&&r[p]&&(o+=" "+r[p]))}n[i]=o}return n}function ur(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function De(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":ur(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Bn={exports:{}},Ee={};/**
21
21
  * @license React
22
22
  * react-is.production.js
23
23
  *
@@ -25,7 +25,7 @@ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var J=be(Q,ce,de,re,W+".
25
25
  *
26
26
  * This source code is licensed under the MIT license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
- */var Zs;function up(){if(Zs)return ke;Zs=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function E(m){if(typeof m=="object"&&m!==null){var S=m.$$typeof;switch(S){case e:switch(m=m.type,m){case r:case i:case n:case c:case p:case u:return m;default:switch(m=m&&m.$$typeof,m){case s:case o:case f:case d:return m;case a:return m;default:return S}}case t:return S}}}return ke.ContextConsumer=a,ke.ContextProvider=s,ke.Element=e,ke.ForwardRef=o,ke.Fragment=r,ke.Lazy=f,ke.Memo=d,ke.Portal=t,ke.Profiler=i,ke.StrictMode=n,ke.Suspense=c,ke.SuspenseList=p,ke.isContextConsumer=function(m){return E(m)===a},ke.isContextProvider=function(m){return E(m)===s},ke.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},ke.isForwardRef=function(m){return E(m)===o},ke.isFragment=function(m){return E(m)===r},ke.isLazy=function(m){return E(m)===f},ke.isMemo=function(m){return E(m)===d},ke.isPortal=function(m){return E(m)===t},ke.isProfiler=function(m){return E(m)===i},ke.isStrictMode=function(m){return E(m)===n},ke.isSuspense=function(m){return E(m)===c},ke.isSuspenseList=function(m){return E(m)===p},ke.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===n||m===c||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===d||m.$$typeof===s||m.$$typeof===a||m.$$typeof===o||m.$$typeof===x||m.getModuleId!==void 0)},ke.typeOf=E,ke}var Te={};/**
28
+ */var es;function mp(){if(es)return Ee;es=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function k(m){if(typeof m=="object"&&m!==null){var C=m.$$typeof;switch(C){case e:switch(m=m.type,m){case r:case i:case n:case c:case p:case u:return m;default:switch(m=m&&m.$$typeof,m){case o:case s:case d:case f:return m;case a:return m;default:return C}}case t:return C}}}return Ee.ContextConsumer=a,Ee.ContextProvider=o,Ee.Element=e,Ee.ForwardRef=s,Ee.Fragment=r,Ee.Lazy=d,Ee.Memo=f,Ee.Portal=t,Ee.Profiler=i,Ee.StrictMode=n,Ee.Suspense=c,Ee.SuspenseList=p,Ee.isContextConsumer=function(m){return k(m)===a},Ee.isContextProvider=function(m){return k(m)===o},Ee.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Ee.isForwardRef=function(m){return k(m)===s},Ee.isFragment=function(m){return k(m)===r},Ee.isLazy=function(m){return k(m)===d},Ee.isMemo=function(m){return k(m)===f},Ee.isPortal=function(m){return k(m)===t},Ee.isProfiler=function(m){return k(m)===i},Ee.isStrictMode=function(m){return k(m)===n},Ee.isSuspense=function(m){return k(m)===c},Ee.isSuspenseList=function(m){return k(m)===p},Ee.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===n||m===c||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===f||m.$$typeof===o||m.$$typeof===a||m.$$typeof===s||m.$$typeof===x||m.getModuleId!==void 0)},Ee.typeOf=k,Ee}var ke={};/**
29
29
  * @license React
30
30
  * react-is.development.js
31
31
  *
@@ -33,22 +33,22 @@ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var J=be(Q,ce,de,re,W+".
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var Xs;function pp(){return Xs||(Xs=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var S=m.$$typeof;switch(S){case t:switch(m=m.type,m){case n:case a:case i:case p:case d:case x:return m;default:switch(m=m&&m.$$typeof,m){case o:case c:case u:case f:return m;case s:return m;default:return S}}case r:return S}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),x=Symbol.for("react.view_transition"),E=Symbol.for("react.client.reference");Te.ContextConsumer=s,Te.ContextProvider=o,Te.Element=t,Te.ForwardRef=c,Te.Fragment=n,Te.Lazy=u,Te.Memo=f,Te.Portal=r,Te.Profiler=a,Te.StrictMode=i,Te.Suspense=p,Te.SuspenseList=d,Te.isContextConsumer=function(m){return e(m)===s},Te.isContextProvider=function(m){return e(m)===o},Te.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Te.isForwardRef=function(m){return e(m)===c},Te.isFragment=function(m){return e(m)===n},Te.isLazy=function(m){return e(m)===u},Te.isMemo=function(m){return e(m)===f},Te.isPortal=function(m){return e(m)===r},Te.isProfiler=function(m){return e(m)===a},Te.isStrictMode=function(m){return e(m)===i},Te.isSuspense=function(m){return e(m)===p},Te.isSuspenseList=function(m){return e(m)===d},Te.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===a||m===i||m===p||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===u||m.$$typeof===f||m.$$typeof===o||m.$$typeof===s||m.$$typeof===c||m.$$typeof===E||m.getModuleId!==void 0)},Te.typeOf=e}()),Te}var Js;function dp(){return Js||(Js=1,process.env.NODE_ENV==="production"?Bn.exports=up():Bn.exports=pp()),Bn.exports}var ai=dp();function Mt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ml(e){if(ae.isValidElement(e)||ai.isValidElementType(e)||!Mt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Ml(e[r])}),t}function mt(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Mt(e)&&Mt(t)&&Object.keys(t).forEach(i=>{ae.isValidElement(t[i])||ai.isValidElementType(t[i])?n[i]=t[i]:Mt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Mt(e[i])?n[i]=mt(e[i],t[i],r):r.clone?n[i]=Mt(t[i])?Ml(t[i]):t[i]:n[i]=t[i]}),n}function bn(e,t){return t?mt(e,t,{clone:!1}):e}const hr=process.env.NODE_ENV!=="production"?k.oneOfType([k.number,k.string,k.object,k.array]):{};function fp(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,i)=>{var s,o;const a=/min-width:\s*([0-9.]+)/;return+(((s=n.match(a))==null?void 0:s[1])||0)-+(((o=i.match(a))==null?void 0:o[1])||0)});return r.length?r.reduce((n,i)=>{const a=t[i];return delete n[i],n[i]=a,n},{...t}):t}function hp(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function mp(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
37
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:pr(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function gp(e){const t=(a,s)=>a.replace("@media",s?`@container ${s}`:"@container");function r(a,s){a.up=(...o)=>t(e.breakpoints.up(...o),s),a.down=(...o)=>t(e.breakpoints.down(...o),s),a.between=(...o)=>t(e.breakpoints.between(...o),s),a.only=(...o)=>t(e.breakpoints.only(...o),s),a.not=(...o)=>{const c=t(e.breakpoints.not(...o),s);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const n={},i=a=>(r(n,a),n);return r(i),{...e,containerQueries:i}}const Ci={xs:0,sm:600,md:900,lg:1200,xl:1536},eo={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ci[e]}px)`},yp={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Ci[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Kt(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||eo;return t.reduce((s,o,c)=>(s[a.up(a.keys[c])]=r(t[c]),s),{})}if(typeof t=="object"){const a=n.breakpoints||eo;return Object.keys(t).reduce((s,o)=>{if(hp(a.keys,o)){const c=mp(n.containerQueries?n:yp,o);c&&(s[c]=r(t[o],o))}else if(Object.keys(a.values||Ci).includes(o)){const c=a.up(o);s[c]=r(t[o],o)}else{const c=o;s[c]=t[c]}return s},{})}return r(t)}function xp(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const a=e.up(i);return n[a]={},n},{}))||{}}function vp(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function Ei(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,e)}function si(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Ei(e,r)||n,t&&(i=t(i,n,e)),i}function qe(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,a=s=>{if(s[t]==null)return null;const o=s[t],c=s.theme,p=Ei(c,n)||{};return Kt(s,o,f=>{let u=si(p,i,f);return f===u&&typeof f=="string"&&(u=si(p,i,`${t}${f==="default"?"":De(f)}`,f)),r===!1?u:{[r]:u}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:hr}:{},a.filterProps=[t],a}function bp(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const wp={m:"margin",p:"padding"},Sp={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},to={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Cp=bp(e=>{if(e.length>2)if(to[e])e=to[e];else return[e];const[t,r]=e.split(""),n=wp[t],i=Sp[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),ki=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ep=[...ki,...Ti];function _n(e,t,r,n){const i=Ei(e,t,!0)??r;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${a}.`),typeof i=="string"?i.startsWith("var(")&&a===0?0:i.startsWith("var(")&&a===1?i:`calc(${a} * ${i})`:i*a):Array.isArray(i)?a=>{if(typeof a=="string")return a;const s=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>i.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${s} > ${i.length-1}, you need to add the missing values.`].join(`
36
+ */var ts;function gp(){return ts||(ts=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var C=m.$$typeof;switch(C){case t:switch(m=m.type,m){case n:case a:case i:case p:case f:case x:return m;default:switch(m=m&&m.$$typeof,m){case s:case c:case u:case d:return m;case o:return m;default:return C}}case r:return C}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),x=Symbol.for("react.view_transition"),k=Symbol.for("react.client.reference");ke.ContextConsumer=o,ke.ContextProvider=s,ke.Element=t,ke.ForwardRef=c,ke.Fragment=n,ke.Lazy=u,ke.Memo=d,ke.Portal=r,ke.Profiler=a,ke.StrictMode=i,ke.Suspense=p,ke.SuspenseList=f,ke.isContextConsumer=function(m){return e(m)===o},ke.isContextProvider=function(m){return e(m)===s},ke.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ke.isForwardRef=function(m){return e(m)===c},ke.isFragment=function(m){return e(m)===n},ke.isLazy=function(m){return e(m)===u},ke.isMemo=function(m){return e(m)===d},ke.isPortal=function(m){return e(m)===r},ke.isProfiler=function(m){return e(m)===a},ke.isStrictMode=function(m){return e(m)===i},ke.isSuspense=function(m){return e(m)===p},ke.isSuspenseList=function(m){return e(m)===f},ke.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===a||m===i||m===p||m===f||typeof m=="object"&&m!==null&&(m.$$typeof===u||m.$$typeof===d||m.$$typeof===s||m.$$typeof===o||m.$$typeof===c||m.$$typeof===k||m.getModuleId!==void 0)},ke.typeOf=e}()),ke}var rs;function yp(){return rs||(rs=1,process.env.NODE_ENV==="production"?Bn.exports=mp():Bn.exports=gp()),Bn.exports}var oi=yp();function It(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Bl(e){if(ie.isValidElement(e)||oi.isValidElementType(e)||!It(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Bl(e[r])}),t}function mt(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return It(e)&&It(t)&&Object.keys(t).forEach(i=>{ie.isValidElement(t[i])||oi.isValidElementType(t[i])?n[i]=t[i]:It(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&It(e[i])?n[i]=mt(e[i],t[i],r):r.clone?n[i]=It(t[i])?Bl(t[i]):t[i]:n[i]=t[i]}),n}function vn(e,t){return t?mt(e,t,{clone:!1}):e}const fr=process.env.NODE_ENV!=="production"?T.oneOfType([T.number,T.string,T.object,T.array]):{};function xp(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,i)=>{var o,s;const a=/min-width:\s*([0-9.]+)/;return+(((o=n.match(a))==null?void 0:o[1])||0)-+(((s=i.match(a))==null?void 0:s[1])||0)});return r.length?r.reduce((n,i)=>{const a=t[i];return delete n[i],n[i]=a,n},{...t}):t}function vp(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function bp(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
37
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ur(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function wp(e){const t=(a,o)=>a.replace("@media",o?`@container ${o}`:"@container");function r(a,o){a.up=(...s)=>t(e.breakpoints.up(...s),o),a.down=(...s)=>t(e.breakpoints.down(...s),o),a.between=(...s)=>t(e.breakpoints.between(...s),o),a.only=(...s)=>t(e.breakpoints.only(...s),o),a.not=(...s)=>{const c=t(e.breakpoints.not(...s),o);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const n={},i=a=>(r(n,a),n);return r(i),{...e,containerQueries:i}}const Ei={xs:0,sm:600,md:900,lg:1200,xl:1536},ns={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ei[e]}px)`},Sp={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Ei[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Ht(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||ns;return t.reduce((o,s,c)=>(o[a.up(a.keys[c])]=r(t[c]),o),{})}if(typeof t=="object"){const a=n.breakpoints||ns;return Object.keys(t).reduce((o,s)=>{if(vp(a.keys,s)){const c=bp(n.containerQueries?n:Sp,s);c&&(o[c]=r(t[s],s))}else if(Object.keys(a.values||Ei).includes(s)){const c=a.up(s);o[c]=r(t[s],s)}else{const c=s;o[c]=t[c]}return o},{})}return r(t)}function Cp(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const a=e.up(i);return n[a]={},n},{}))||{}}function Ep(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function ki(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,e)}function si(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=ki(e,r)||n,t&&(i=t(i,n,e)),i}function qe(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,a=o=>{if(o[t]==null)return null;const s=o[t],c=o.theme,p=ki(c,n)||{};return Ht(o,s,d=>{let u=si(p,i,d);return d===u&&typeof d=="string"&&(u=si(p,i,`${t}${d==="default"?"":De(d)}`,d)),r===!1?u:{[r]:u}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:fr}:{},a.filterProps=[t],a}function kp(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Tp={m:"margin",p:"padding"},jp={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},is={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Fp=kp(e=>{if(e.length>2)if(is[e])e=is[e];else return[e];const[t,r]=e.split(""),n=Tp[t],i=jp[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),Ti=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],ji=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ap=[...Ti,...ji];function On(e,t,r,n){const i=ki(e,t,!0)??r;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${a}.`),typeof i=="string"?i.startsWith("var(")&&a===0?0:i.startsWith("var(")&&a===1?i:`calc(${a} * ${i})`:i*a):Array.isArray(i)?a=>{if(typeof a=="string")return a;const o=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>i.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${o} > ${i.length-1}, you need to add the missing values.`].join(`
38
38
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
39
- `)));const o=i[s];return a>=0?o:typeof o=="number"?-o:typeof o=="string"&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
40
- `)),()=>{})}function Qa(e){return _n(e,"spacing",8,"spacing")}function Rn(e,t){return typeof t=="string"||t==null?t:e(t)}function kp(e,t){return r=>e.reduce((n,i)=>(n[i]=Rn(t,r),n),{})}function Tp(e,t,r,n){if(!t.includes(r))return null;const i=Cp(r),a=kp(i,n),s=e[r];return Kt(e,s,a)}function zl(e,t){const r=Qa(e.theme);return Object.keys(e).map(n=>Tp(e,t,n,r)).reduce(bn,{})}function ze(e){return zl(e,ki)}ze.propTypes=process.env.NODE_ENV!=="production"?ki.reduce((e,t)=>(e[t]=hr,e),{}):{};ze.filterProps=ki;function Be(e){return zl(e,Ti)}Be.propTypes=process.env.NODE_ENV!=="production"?Ti.reduce((e,t)=>(e[t]=hr,e),{}):{};Be.filterProps=Ti;process.env.NODE_ENV!=="production"&&Ep.reduce((e,t)=>(e[t]=hr,e),{});function ji(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(a=>{n[a]=i}),n),{}),r=n=>Object.keys(n).reduce((i,a)=>t[a]?bn(i,t[a](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function St(e){return typeof e!="number"?e:`${e}px solid`}function kt(e,t){return qe({prop:e,themeKey:"borders",transform:t})}const jp=kt("border",St),Fp=kt("borderTop",St),Ap=kt("borderRight",St),Op=kt("borderBottom",St),_p=kt("borderLeft",St),Rp=kt("borderColor"),$p=kt("borderTopColor"),Pp=kt("borderRightColor"),Dp=kt("borderBottomColor"),Ip=kt("borderLeftColor"),Mp=kt("outline",St),zp=kt("outlineColor"),Fi=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=_n(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Rn(t,n)});return Kt(e,e.borderRadius,r)}return null};Fi.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:hr}:{};Fi.filterProps=["borderRadius"];ji(jp,Fp,Ap,Op,_p,Rp,$p,Pp,Dp,Ip,Fi,Mp,zp);const Ai=e=>{if(e.gap!==void 0&&e.gap!==null){const t=_n(e.theme,"spacing",8,"gap"),r=n=>({gap:Rn(t,n)});return Kt(e,e.gap,r)}return null};Ai.propTypes=process.env.NODE_ENV!=="production"?{gap:hr}:{};Ai.filterProps=["gap"];const Oi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=_n(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Rn(t,n)});return Kt(e,e.columnGap,r)}return null};Oi.propTypes=process.env.NODE_ENV!=="production"?{columnGap:hr}:{};Oi.filterProps=["columnGap"];const _i=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=_n(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Rn(t,n)});return Kt(e,e.rowGap,r)}return null};_i.propTypes=process.env.NODE_ENV!=="production"?{rowGap:hr}:{};_i.filterProps=["rowGap"];const Bp=qe({prop:"gridColumn"}),Vp=qe({prop:"gridRow"}),Np=qe({prop:"gridAutoFlow"}),Lp=qe({prop:"gridAutoColumns"}),qp=qe({prop:"gridAutoRows"}),Wp=qe({prop:"gridTemplateColumns"}),Up=qe({prop:"gridTemplateRows"}),Hp=qe({prop:"gridTemplateAreas"}),Kp=qe({prop:"gridArea"});ji(Ai,Oi,_i,Bp,Vp,Np,Lp,qp,Wp,Up,Hp,Kp);function Yr(e,t){return t==="grey"?t:e}const Yp=qe({prop:"color",themeKey:"palette",transform:Yr}),Gp=qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yr}),Qp=qe({prop:"backgroundColor",themeKey:"palette",transform:Yr});ji(Yp,Gp,Qp);function ht(e){return e<=1&&e!==0?`${e*100}%`:e}const Zp=qe({prop:"width",transform:ht}),Za=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,s,o,c;const n=((s=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:s[r])||Ci[r];return n?((c=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ht(r)}};return Kt(e,e.maxWidth,t)}return null};Za.filterProps=["maxWidth"];const Xp=qe({prop:"minWidth",transform:ht}),Jp=qe({prop:"height",transform:ht}),ed=qe({prop:"maxHeight",transform:ht}),td=qe({prop:"minHeight",transform:ht});qe({prop:"size",cssProperty:"width",transform:ht});qe({prop:"size",cssProperty:"height",transform:ht});const rd=qe({prop:"boxSizing"});ji(Zp,Za,Xp,Jp,ed,td,rd);const $n={border:{themeKey:"borders",transform:St},borderTop:{themeKey:"borders",transform:St},borderRight:{themeKey:"borders",transform:St},borderBottom:{themeKey:"borders",transform:St},borderLeft:{themeKey:"borders",transform:St},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:St},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Fi},color:{themeKey:"palette",transform:Yr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yr},backgroundColor:{themeKey:"palette",transform:Yr},p:{style:Be},pt:{style:Be},pr:{style:Be},pb:{style:Be},pl:{style:Be},px:{style:Be},py:{style:Be},padding:{style:Be},paddingTop:{style:Be},paddingRight:{style:Be},paddingBottom:{style:Be},paddingLeft:{style:Be},paddingX:{style:Be},paddingY:{style:Be},paddingInline:{style:Be},paddingInlineStart:{style:Be},paddingInlineEnd:{style:Be},paddingBlock:{style:Be},paddingBlockStart:{style:Be},paddingBlockEnd:{style:Be},m:{style:ze},mt:{style:ze},mr:{style:ze},mb:{style:ze},ml:{style:ze},mx:{style:ze},my:{style:ze},margin:{style:ze},marginTop:{style:ze},marginRight:{style:ze},marginBottom:{style:ze},marginLeft:{style:ze},marginX:{style:ze},marginY:{style:ze},marginInline:{style:ze},marginInlineStart:{style:ze},marginInlineEnd:{style:ze},marginBlock:{style:ze},marginBlockStart:{style:ze},marginBlockEnd:{style:ze},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ai},rowGap:{style:_i},columnGap:{style:Oi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ht},maxWidth:{style:Za},minWidth:{transform:ht},height:{transform:ht},maxHeight:{transform:ht},minHeight:{transform:ht},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function nd(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function id(e,t){return typeof e=="function"?e(t):e}function ad(){function e(r,n,i,a){const s={[r]:n,theme:i},o=a[r];if(!o)return{[r]:n};const{cssProperty:c=r,themeKey:p,transform:d,style:f}=o;if(n==null)return null;if(p==="typography"&&n==="inherit")return{[r]:n};const u=Ei(i,p)||{};return f?f(s):Kt(s,n,E=>{let m=si(u,d,E);return E===m&&typeof E=="string"&&(m=si(u,d,`${r}${E==="default"?"":De(E)}`,E)),c===!1?m:{[c]:m}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??$n;function s(o){let c=o;if(typeof o=="function")c=o(i);else if(typeof o!="object")return o;if(!c)return null;const p=xp(i.breakpoints),d=Object.keys(p);let f=p;return Object.keys(c).forEach(u=>{const x=id(c[u],i);if(x!=null)if(typeof x=="object")if(a[u])f=bn(f,e(u,x,i,a));else{const E=Kt({theme:i},x,m=>({[u]:m}));nd(E,x)?f[u]=t({sx:x,theme:i}):f=bn(f,E)}else f=bn(f,e(u,x,i,a))}),fp(i,vp(d,f))}return Array.isArray(n)?n.map(s):s(n)}return t}const ln=ad();ln.filterProps=["sx"];const sd=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??$n;return Object.keys(e).forEach(i=>{r[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function od(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=sd(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...s)=>{const o=t(...s);return Mt(o)?{...n,...o}:n}:a={...n,...t},{...i,sx:a}}function ld(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var cd={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function ud(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var pd=/[A-Z]|^ms/g,dd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Bl=function(t){return t.charCodeAt(1)===45},ro=function(t){return t!=null&&typeof t!="boolean"},Zi=ud(function(e){return Bl(e)?e:e.replace(pd,"-$&").toLowerCase()}),no=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(dd,function(n,i,a){return lr={name:i,styles:a,next:lr},i})}return cd[t]!==1&&!Bl(t)&&typeof r=="number"&&r!==0?r+"px":r};function oi(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return lr={name:i.name,styles:i.styles,next:lr},i.name;var a=r;if(a.styles!==void 0){var s=a.next;if(s!==void 0)for(;s!==void 0;)lr={name:s.name,styles:s.styles,next:lr},s=s.next;var o=a.styles+";";return o}return fd(e,t,r)}}var c=r;return c}function fd(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=oi(e,t,r[i])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var o=s;ro(o)&&(n+=Zi(a)+":"+no(a,o)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var c=0;c<s.length;c++)ro(s[c])&&(n+=Zi(a)+":"+no(a,s[c])+";");else{var p=oi(e,t,s);switch(a){case"animation":case"animationName":{n+=Zi(a)+":"+p+";";break}default:n+=a+"{"+p+"}"}}}return n}var io=/label:\s*([^\s;{]+)\s*(;|$)/g,lr;function hd(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";lr=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=oi(r,t,a);else{var s=a;i+=s[0]}for(var o=1;o<e.length;o++)if(i+=oi(r,t,e[o]),n){var c=a;i+=c[o]}io.lastIndex=0;for(var p="",d;(d=io.exec(i))!==null;)p+="-"+d[1];var f=ld(i)+p;return{name:f,styles:i,next:lr}}/**
39
+ `)));const s=i[o];return a>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
40
+ `)),()=>{})}function Xa(e){return On(e,"spacing",8,"spacing")}function _n(e,t){return typeof t=="string"||t==null?t:e(t)}function Op(e,t){return r=>e.reduce((n,i)=>(n[i]=_n(t,r),n),{})}function _p(e,t,r,n){if(!t.includes(r))return null;const i=Fp(r),a=Op(i,n),o=e[r];return Ht(e,o,a)}function Vl(e,t){const r=Xa(e.theme);return Object.keys(e).map(n=>_p(e,t,n,r)).reduce(vn,{})}function ze(e){return Vl(e,Ti)}ze.propTypes=process.env.NODE_ENV!=="production"?Ti.reduce((e,t)=>(e[t]=fr,e),{}):{};ze.filterProps=Ti;function Be(e){return Vl(e,ji)}Be.propTypes=process.env.NODE_ENV!=="production"?ji.reduce((e,t)=>(e[t]=fr,e),{}):{};Be.filterProps=ji;process.env.NODE_ENV!=="production"&&Ap.reduce((e,t)=>(e[t]=fr,e),{});function Fi(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(a=>{n[a]=i}),n),{}),r=n=>Object.keys(n).reduce((i,a)=>t[a]?vn(i,t[a](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function St(e){return typeof e!="number"?e:`${e}px solid`}function Et(e,t){return qe({prop:e,themeKey:"borders",transform:t})}const Rp=Et("border",St),Pp=Et("borderTop",St),$p=Et("borderRight",St),Dp=Et("borderBottom",St),Ip=Et("borderLeft",St),Mp=Et("borderColor"),zp=Et("borderTopColor"),Bp=Et("borderRightColor"),Vp=Et("borderBottomColor"),Np=Et("borderLeftColor"),Lp=Et("outline",St),qp=Et("outlineColor"),Ai=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=On(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:_n(t,n)});return Ht(e,e.borderRadius,r)}return null};Ai.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:fr}:{};Ai.filterProps=["borderRadius"];Fi(Rp,Pp,$p,Dp,Ip,Mp,zp,Bp,Vp,Np,Ai,Lp,qp);const Oi=e=>{if(e.gap!==void 0&&e.gap!==null){const t=On(e.theme,"spacing",8,"gap"),r=n=>({gap:_n(t,n)});return Ht(e,e.gap,r)}return null};Oi.propTypes=process.env.NODE_ENV!=="production"?{gap:fr}:{};Oi.filterProps=["gap"];const _i=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=On(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:_n(t,n)});return Ht(e,e.columnGap,r)}return null};_i.propTypes=process.env.NODE_ENV!=="production"?{columnGap:fr}:{};_i.filterProps=["columnGap"];const Ri=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=On(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:_n(t,n)});return Ht(e,e.rowGap,r)}return null};Ri.propTypes=process.env.NODE_ENV!=="production"?{rowGap:fr}:{};Ri.filterProps=["rowGap"];const Wp=qe({prop:"gridColumn"}),Up=qe({prop:"gridRow"}),Hp=qe({prop:"gridAutoFlow"}),Kp=qe({prop:"gridAutoColumns"}),Yp=qe({prop:"gridAutoRows"}),Gp=qe({prop:"gridTemplateColumns"}),Qp=qe({prop:"gridTemplateRows"}),Zp=qe({prop:"gridTemplateAreas"}),Xp=qe({prop:"gridArea"});Fi(Oi,_i,Ri,Wp,Up,Hp,Kp,Yp,Gp,Qp,Zp,Xp);function Kr(e,t){return t==="grey"?t:e}const Jp=qe({prop:"color",themeKey:"palette",transform:Kr}),ed=qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Kr}),td=qe({prop:"backgroundColor",themeKey:"palette",transform:Kr});Fi(Jp,ed,td);function ht(e){return e<=1&&e!==0?`${e*100}%`:e}const rd=qe({prop:"width",transform:ht}),Ja=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,o,s,c;const n=((o=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:o[r])||Ei[r];return n?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ht(r)}};return Ht(e,e.maxWidth,t)}return null};Ja.filterProps=["maxWidth"];const nd=qe({prop:"minWidth",transform:ht}),id=qe({prop:"height",transform:ht}),ad=qe({prop:"maxHeight",transform:ht}),od=qe({prop:"minHeight",transform:ht});qe({prop:"size",cssProperty:"width",transform:ht});qe({prop:"size",cssProperty:"height",transform:ht});const sd=qe({prop:"boxSizing"});Fi(rd,Ja,nd,id,ad,od,sd);const Rn={border:{themeKey:"borders",transform:St},borderTop:{themeKey:"borders",transform:St},borderRight:{themeKey:"borders",transform:St},borderBottom:{themeKey:"borders",transform:St},borderLeft:{themeKey:"borders",transform:St},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:St},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ai},color:{themeKey:"palette",transform:Kr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Kr},backgroundColor:{themeKey:"palette",transform:Kr},p:{style:Be},pt:{style:Be},pr:{style:Be},pb:{style:Be},pl:{style:Be},px:{style:Be},py:{style:Be},padding:{style:Be},paddingTop:{style:Be},paddingRight:{style:Be},paddingBottom:{style:Be},paddingLeft:{style:Be},paddingX:{style:Be},paddingY:{style:Be},paddingInline:{style:Be},paddingInlineStart:{style:Be},paddingInlineEnd:{style:Be},paddingBlock:{style:Be},paddingBlockStart:{style:Be},paddingBlockEnd:{style:Be},m:{style:ze},mt:{style:ze},mr:{style:ze},mb:{style:ze},ml:{style:ze},mx:{style:ze},my:{style:ze},margin:{style:ze},marginTop:{style:ze},marginRight:{style:ze},marginBottom:{style:ze},marginLeft:{style:ze},marginX:{style:ze},marginY:{style:ze},marginInline:{style:ze},marginInlineStart:{style:ze},marginInlineEnd:{style:ze},marginBlock:{style:ze},marginBlockStart:{style:ze},marginBlockEnd:{style:ze},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Oi},rowGap:{style:Ri},columnGap:{style:_i},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ht},maxWidth:{style:Ja},minWidth:{transform:ht},height:{transform:ht},maxHeight:{transform:ht},minHeight:{transform:ht},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function ld(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function cd(e,t){return typeof e=="function"?e(t):e}function ud(){function e(r,n,i,a){const o={[r]:n,theme:i},s=a[r];if(!s)return{[r]:n};const{cssProperty:c=r,themeKey:p,transform:f,style:d}=s;if(n==null)return null;if(p==="typography"&&n==="inherit")return{[r]:n};const u=ki(i,p)||{};return d?d(o):Ht(o,n,k=>{let m=si(u,f,k);return k===m&&typeof k=="string"&&(m=si(u,f,`${r}${k==="default"?"":De(k)}`,k)),c===!1?m:{[c]:m}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??Rn;function o(s){let c=s;if(typeof s=="function")c=s(i);else if(typeof s!="object")return s;if(!c)return null;const p=Cp(i.breakpoints),f=Object.keys(p);let d=p;return Object.keys(c).forEach(u=>{const x=cd(c[u],i);if(x!=null)if(typeof x=="object")if(a[u])d=vn(d,e(u,x,i,a));else{const k=Ht({theme:i},x,m=>({[u]:m}));ld(k,x)?d[u]=t({sx:x,theme:i}):d=vn(d,k)}else d=vn(d,e(u,x,i,a))}),xp(i,Ep(f,d))}return Array.isArray(n)?n.map(o):o(n)}return t}const sn=ud();sn.filterProps=["sx"];const pd=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Rn;return Object.keys(e).forEach(i=>{r[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function dd(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=pd(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...o)=>{const s=t(...o);return It(s)?{...n,...s}:n}:a={...n,...t},{...i,sx:a}}function fd(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var hd={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function md(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var gd=/[A-Z]|^ms/g,yd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Nl=function(t){return t.charCodeAt(1)===45},as=function(t){return t!=null&&typeof t!="boolean"},Ji=md(function(e){return Nl(e)?e:e.replace(gd,"-$&").toLowerCase()}),os=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(yd,function(n,i,a){return sr={name:i,styles:a,next:sr},i})}return hd[t]!==1&&!Nl(t)&&typeof r=="number"&&r!==0?r+"px":r};function li(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return sr={name:i.name,styles:i.styles,next:sr},i.name;var a=r;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)sr={name:o.name,styles:o.styles,next:sr},o=o.next;var s=a.styles+";";return s}return xd(e,t,r)}}var c=r;return c}function xd(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=li(e,t,r[i])+";";else for(var a in r){var o=r[a];if(typeof o!="object"){var s=o;as(s)&&(n+=Ji(a)+":"+os(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var c=0;c<o.length;c++)as(o[c])&&(n+=Ji(a)+":"+os(a,o[c])+";");else{var p=li(e,t,o);switch(a){case"animation":case"animationName":{n+=Ji(a)+":"+p+";";break}default:n+=a+"{"+p+"}"}}}return n}var ss=/label:\s*([^\s;{]+)\s*(;|$)/g,sr;function vd(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";sr=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=li(r,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=li(r,t,e[s]),n){var c=a;i+=c[s]}ss.lastIndex=0;for(var p="",f;(f=ss.exec(i))!==null;)p+="-"+f[1];var d=fd(i)+p;return{name:d,styles:i,next:sr}}/**
41
41
  * @mui/styled-engine v7.1.1
42
42
  *
43
43
  * @license MIT
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
- */function md(e,t){const r=Zc(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const i=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
47
- `)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function gd(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const ao=[];function so(e){return ao[0]=e,hd(ao)}const yd=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function xd(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=yd(t),s=Object.keys(a);function o(u){return`@media (min-width:${typeof t[u]=="number"?t[u]:u}${r})`}function c(u){return`@media (max-width:${(typeof t[u]=="number"?t[u]:u)-n/100}${r})`}function p(u,x){const E=s.indexOf(x);return`@media (min-width:${typeof t[u]=="number"?t[u]:u}${r}) and (max-width:${(E!==-1&&typeof t[s[E]]=="number"?t[s[E]]:x)-n/100}${r})`}function d(u){return s.indexOf(u)+1<s.length?p(u,s[s.indexOf(u)+1]):o(u)}function f(u){const x=s.indexOf(u);return x===0?o(s[1]):x===s.length-1?c(s[x]):p(u,s[s.indexOf(u)+1]).replace("@media","@media not all and")}return{keys:s,values:a,up:o,down:c,between:p,only:d,not:f,unit:r,...i}}const vd={borderRadius:4};function Vl(e=8,t=Qa({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function bd(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let i=r.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return r.palette.mode===e?t:{}}function Xa(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...s}=e,o=xd(r),c=Vl(i);let p=mt({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:c,shape:{...vd,...a}},s);return p=gp(p),p.applyStyles=bd,p=t.reduce((d,f)=>mt(d,f),p),p.unstable_sxConfig={...$n,...s==null?void 0:s.unstable_sxConfig},p.unstable_sx=function(f){return ln({sx:f,theme:this})},p}function wd(e){return Object.keys(e).length===0}function Sd(e=null){const t=ae.useContext(fr.ThemeContext);return!t||wd(t)?e:t}const Cd=Xa();function Ed(e=Cd){return Sd(e)}const oo=e=>e,kd=()=>{let e=oo;return{configure(t){e=t},generate(t){return e(t)},reset(){e=oo}}},Td=kd(),jd={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function mr(e,t,r="Mui"){const n=jd[t];return n?`${r}-${n}`:`${Td.generate(e)}-${t}`}function Dr(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=mr(e,i,r)}),n}function Nl(e,t=""){return e.displayName||e.name||t}function lo(e,t,r){const n=Nl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Fd(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Nl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ai.ForwardRef:return lo(e,e.render,"ForwardRef");case ai.Memo:return lo(e,e.type,"memo");default:return}}}function Ll(e){const{variants:t,...r}=e,n={variants:t,style:so(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=so(i.style))}),n}const Ad=Xa();function Xi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Od(e){return e?(t,r)=>r[e]:null}function _d(e,t,r){e.theme=Dd(e.theme)?r:e.theme[t]||e.theme}function Kn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Kn(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:i,...a}=r;n=a}return ql(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function ql(e,t,r=[]){var i;let n;e:for(let a=0;a<t.length;a+=1){const s=t[a];if(typeof s.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(n))continue}else for(const o in s.props)if(e[o]!==s.props[o]&&((i=e.ownerState)==null?void 0:i[o])!==s.props[o])continue e;typeof s.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(s.style(n))):r.push(s.style)}return r}function Rd(e={}){const{themeId:t,defaultTheme:r=Ad,rootShouldForwardProp:n=Xi,slotShouldForwardProp:i=Xi}=e;function a(o){_d(o,t,r)}return(o,c={})=>{gd(o,C=>C.filter(_=>_!==ln));const{name:p,slot:d,skipVariantsResolver:f,skipSx:u,overridesResolver:x=Od(Wl(d)),...E}=c,m=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,S=u||!1;let v=Xi;d==="Root"||d==="root"?v=n:d?v=i:Id(o)&&(v=void 0);const j=md(o,{shouldForwardProp:v,label:Pd(p,d),...E}),D=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(I){return Kn(I,C)};if(Mt(C)){const _=Ll(C);return _.variants?function(R){return Kn(R,_)}:_.style}return C},F=(...C)=>{const _=[],I=C.map(D),R=[];if(_.push(a),p&&x&&R.push(function(q){var G,ne;const L=(ne=(G=q.theme.components)==null?void 0:G[p])==null?void 0:ne.styleOverrides;if(!L)return null;const H={};for(const ue in L)H[ue]=Kn(q,L[ue]);return x(q,H)}),p&&!m&&R.push(function(q){var H,G;const Z=q.theme,L=(G=(H=Z==null?void 0:Z.components)==null?void 0:H[p])==null?void 0:G.variants;return L?ql(q,L):null}),S||R.push(ln),Array.isArray(I[0])){const B=I.shift(),q=new Array(_.length).fill(""),Z=new Array(R.length).fill("");let L;L=[...q,...B,...Z],L.raw=[...q,...B.raw,...Z],_.unshift(L)}const Y=[..._,...I,...R],h=j(...Y);return o.muiName&&(h.muiName=o.muiName),process.env.NODE_ENV!=="production"&&(h.displayName=$d(p,d,o)),h};return j.withConfig&&(F.withConfig=j.withConfig),F}}function $d(e,t,r){return e?`${e}${De(t||"")}`:`Styled(${Fd(r)})`}function Pd(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Wl(t||"Root")}`),r}function Dd(e){for(const t in e)return!1;return!0}function Id(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ka(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=n;if(i==="components"||i==="slots")r[i]={...e[i],...r[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],s=t[i];if(!s)r[i]=a||{};else if(!a)r[i]=s;else{r[i]={...s};for(const o in a)if(Object.prototype.hasOwnProperty.call(a,o)){const c=o;r[i][c]=ka(a[c],s[c])}}}else r[i]===void 0&&(r[i]=e[i])}return r}const Md=typeof window<"u"?ae.useLayoutEffect:ae.useEffect;function zd(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Ja(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),zd(e,t,r)}function Bd(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function dr(e){if(e.type)return e;if(e.charAt(0)==="#")return dr(Bd(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
48
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:pr(9,e));let n=e.substring(t+1,e.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
49
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:pr(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const Vd=e=>{const t=dr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},gn=(e,t)=>{try{return Vd(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Ri(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Ul(e){e=dr(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),s=(p,d=(p+r/30)%12)=>i-a*Math.max(Math.min(d-3,9-d,1),-1);let o="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(o+="a",c.push(t[3])),Ri({type:o,values:c})}function Ta(e){e=dr(e);let t=e.type==="hsl"||e.type==="hsla"?dr(Ul(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function co(e,t){const r=Ta(e),n=Ta(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Et(e,t){return e=dr(e),t=Ja(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Ri(e)}function Vn(e,t,r){try{return Et(e,t)}catch{return e}}function es(e,t){if(e=dr(e),t=Ja(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Ri(e)}function je(e,t,r){try{return es(e,t)}catch{return e}}function ts(e,t){if(e=dr(e),t=Ja(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Ri(e)}function Fe(e,t,r){try{return ts(e,t)}catch{return e}}function Nd(e,t=.15){return Ta(e)>.5?es(e,t):ts(e,t)}function Nn(e,t,r){try{return Nd(e,t)}catch{return e}}const Ld=ae.createContext(void 0);process.env.NODE_ENV!=="production"&&(k.node,k.object);function qd(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?ka(i.defaultProps,n):!i.styleOverrides&&!i.variants?ka(i,n):n}function Wd({props:e,name:t}){const r=ae.useContext(Ld);return qd({props:e,name:t,theme:{components:r}})}const uo={theme:void 0};function Ud(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(uo.theme=i.theme,a=Ll(e(uo)),t=a,r=i.theme),a}}function Hd(e=""){function t(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${e?`${e}-`:""}${n}${t(...i)})`}const po=(e,t,r,n=[])=>{let i=e;t.forEach((a,s)=>{s===t.length-1?Array.isArray(i)?i[Number(a)]=r:i&&typeof i=="object"&&(i[a]=r):i&&typeof i=="object"&&(i[a]||(i[a]=n.includes(a)?[]:{}),i=i[a])})},Kd=(e,t,r)=>{function n(i,a=[],s=[]){Object.entries(i).forEach(([o,c])=>{(!r||r&&!r([...a,o]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?n(c,[...a,o],Array.isArray(c)?[...s,o]:s):t([...a,o],c,s))})}n(e)},Yd=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Ji(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},s={};return Kd(e,(o,c,p)=>{if((typeof c=="string"||typeof c=="number")&&(!n||!n(o,c))){const d=`--${r?`${r}-`:""}${o.join("-")}`,f=Yd(o,c);Object.assign(i,{[d]:f}),po(a,o,`var(${d})`,p),po(s,o,`var(${d}, ${f})`,p)}},o=>o[0]==="vars"),{css:i,vars:a,varsWithDefaults:s}}function Gd(e,t={}){const{getSelector:r=S,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:o="light",...c}=e,{vars:p,css:d,varsWithDefaults:f}=Ji(c,t);let u=f;const x={},{[o]:E,...m}=a;if(Object.entries(m||{}).forEach(([D,F])=>{const{vars:C,css:_,varsWithDefaults:I}=Ji(F,t);u=mt(u,I),x[D]={css:_,vars:C}}),E){const{css:D,vars:F,varsWithDefaults:C}=Ji(E,t);u=mt(u,C),x[o]={css:D,vars:F}}function S(D,F){var _,I;let C=i;if(i==="class"&&(C=".%s"),i==="data"&&(C="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(C=`[${i}="%s"]`),D){if(C==="media")return e.defaultColorScheme===D?":root":{[`@media (prefers-color-scheme: ${((I=(_=a[D])==null?void 0:_.palette)==null?void 0:I.mode)||D})`]:{":root":F}};if(C)return e.defaultColorScheme===D?`:root, ${C.replace("%s",String(D))}`:C.replace("%s",String(D))}return":root"}return{vars:u,generateThemeVars:()=>{let D={...p};return Object.entries(x).forEach(([,{vars:F}])=>{D=mt(D,F)}),D},generateStyleSheets:()=>{var R,Y;const D=[],F=e.defaultColorScheme||"light";function C(h,B){Object.keys(B).length&&D.push(typeof h=="string"?{[h]:{...B}}:h)}C(r(void 0,{...d}),d);const{[F]:_,...I}=x;if(_){const{css:h}=_,B=(Y=(R=a[F])==null?void 0:R.palette)==null?void 0:Y.mode,q=!n&&B?{colorScheme:B,...h}:{...h};C(r(F,{...q}),q)}return Object.entries(I).forEach(([h,{css:B}])=>{var L,H;const q=(H=(L=a[h])==null?void 0:L.palette)==null?void 0:H.mode,Z=!n&&q?{colorScheme:q,...B}:{...B};C(r(h,{...Z}),Z)}),D}}}function Qd(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Cn={black:"#000",white:"#fff"},Zd={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Br={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Vr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},hn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Nr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Lr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},qr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Hl(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Cn.white,default:Cn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Xd=Hl();function Kl(){return{text:{primary:Cn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Cn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const fo=Kl();function ho(e,t,r,n){const i=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=ts(e.main,i):t==="dark"&&(e.dark=es(e.main,a)))}function Jd(e="light"){return e==="dark"?{main:Nr[200],light:Nr[50],dark:Nr[400]}:{main:Nr[700],light:Nr[400],dark:Nr[800]}}function ef(e="light"){return e==="dark"?{main:Br[200],light:Br[50],dark:Br[400]}:{main:Br[500],light:Br[300],dark:Br[700]}}function tf(e="light"){return e==="dark"?{main:Vr[500],light:Vr[300],dark:Vr[700]}:{main:Vr[700],light:Vr[400],dark:Vr[800]}}function rf(e="light"){return e==="dark"?{main:Lr[400],light:Lr[300],dark:Lr[700]}:{main:Lr[700],light:Lr[500],dark:Lr[900]}}function nf(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function af(e="light"){return e==="dark"?{main:hn[400],light:hn[300],dark:hn[700]}:{main:"#ed6c02",light:hn[500],dark:hn[900]}}function rs(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...i}=e,a=e.primary||Jd(t),s=e.secondary||ef(t),o=e.error||tf(t),c=e.info||rf(t),p=e.success||nf(t),d=e.warning||af(t);function f(m){const S=co(m,fo.text.primary)>=r?fo.text.primary:Xd.text.primary;if(process.env.NODE_ENV!=="production"){const v=co(m,S);v<3&&console.error([`MUI: The contrast ratio of ${v}:1 for ${S} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
50
- `))}return S}const u=({color:m,name:S,mainShade:v=500,lightShade:j=300,darkShade:D=700})=>{if(m={...m},!m.main&&m[v]&&(m.main=m[v]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
51
- The color object needs to have a \`main\` property or a \`${v}\` property.`:pr(11,S?` (${S})`:"",v));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
46
+ */function bd(e,t){const r=ru(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const i=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
47
+ `)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function wd(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const ls=[];function cs(e){return ls[0]=e,vd(ls)}const Sd=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function Cd(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=Sd(t),o=Object.keys(a);function s(u){return`@media (min-width:${typeof t[u]=="number"?t[u]:u}${r})`}function c(u){return`@media (max-width:${(typeof t[u]=="number"?t[u]:u)-n/100}${r})`}function p(u,x){const k=o.indexOf(x);return`@media (min-width:${typeof t[u]=="number"?t[u]:u}${r}) and (max-width:${(k!==-1&&typeof t[o[k]]=="number"?t[o[k]]:x)-n/100}${r})`}function f(u){return o.indexOf(u)+1<o.length?p(u,o[o.indexOf(u)+1]):s(u)}function d(u){const x=o.indexOf(u);return x===0?s(o[1]):x===o.length-1?c(o[x]):p(u,o[o.indexOf(u)+1]).replace("@media","@media not all and")}return{keys:o,values:a,up:s,down:c,between:p,only:f,not:d,unit:r,...i}}const Ed={borderRadius:4};function Ll(e=8,t=Xa({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const o=t(a);return typeof o=="number"?`${o}px`:o}).join(" "));return r.mui=!0,r}function kd(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let i=r.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return r.palette.mode===e?t:{}}function eo(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...o}=e,s=Cd(r),c=Ll(i);let p=mt({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:c,shape:{...Ed,...a}},o);return p=wp(p),p.applyStyles=kd,p=t.reduce((f,d)=>mt(f,d),p),p.unstable_sxConfig={...Rn,...o==null?void 0:o.unstable_sxConfig},p.unstable_sx=function(d){return sn({sx:d,theme:this})},p}function Td(e){return Object.keys(e).length===0}function jd(e=null){const t=ie.useContext(dr.ThemeContext);return!t||Td(t)?e:t}const Fd=eo();function Ad(e=Fd){return jd(e)}const us=e=>e,Od=()=>{let e=us;return{configure(t){e=t},generate(t){return e(t)},reset(){e=us}}},_d=Od(),Rd={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function hr(e,t,r="Mui"){const n=Rd[t];return n?`${r}-${n}`:`${_d.generate(e)}-${t}`}function $r(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=hr(e,i,r)}),n}function ql(e,t=""){return e.displayName||e.name||t}function ps(e,t,r){const n=ql(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Pd(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return ql(e,"Component");if(typeof e=="object")switch(e.$$typeof){case oi.ForwardRef:return ps(e,e.render,"ForwardRef");case oi.Memo:return ps(e,e.type,"memo");default:return}}}function Wl(e){const{variants:t,...r}=e,n={variants:t,style:cs(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=cs(i.style))}),n}const $d=eo();function ea(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Dd(e){return e?(t,r)=>r[e]:null}function Id(e,t,r){e.theme=Vd(e.theme)?r:e.theme[t]||e.theme}function Kn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Kn(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:i,...a}=r;n=a}return Ul(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Ul(e,t,r=[]){var i;let n;e:for(let a=0;a<t.length;a+=1){const o=t[a];if(typeof o.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!o.props(n))continue}else for(const s in o.props)if(e[s]!==o.props[s]&&((i=e.ownerState)==null?void 0:i[s])!==o.props[s])continue e;typeof o.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(o.style(n))):r.push(o.style)}return r}function Md(e={}){const{themeId:t,defaultTheme:r=$d,rootShouldForwardProp:n=ea,slotShouldForwardProp:i=ea}=e;function a(s){Id(s,t,r)}return(s,c={})=>{wd(s,E=>E.filter(_=>_!==sn));const{name:p,slot:f,skipVariantsResolver:d,skipSx:u,overridesResolver:x=Dd(Hl(f)),...k}=c,m=d!==void 0?d:f&&f!=="Root"&&f!=="root"||!1,C=u||!1;let v=ea;f==="Root"||f==="root"?v=n:f?v=i:Nd(s)&&(v=void 0);const w=bd(s,{shouldForwardProp:v,label:Bd(p,f),...k}),$=E=>{if(E.__emotion_real===E)return E;if(typeof E=="function")return function(I){return Kn(I,E)};if(It(E)){const _=Wl(E);return _.variants?function(R){return Kn(R,_)}:_.style}return E},F=(...E)=>{const _=[],I=E.map($),R=[];if(_.push(a),p&&x&&R.push(function(q){var G,re;const L=(re=(G=q.theme.components)==null?void 0:G[p])==null?void 0:re.styleOverrides;if(!L)return null;const H={};for(const ce in L)H[ce]=Kn(q,L[ce]);return x(q,H)}),p&&!m&&R.push(function(q){var H,G;const Z=q.theme,L=(G=(H=Z==null?void 0:Z.components)==null?void 0:H[p])==null?void 0:G.variants;return L?Ul(q,L):null}),C||R.push(sn),Array.isArray(I[0])){const B=I.shift(),q=new Array(_.length).fill(""),Z=new Array(R.length).fill("");let L;L=[...q,...B,...Z],L.raw=[...q,...B.raw,...Z],_.unshift(L)}const Y=[..._,...I,...R],h=w(...Y);return s.muiName&&(h.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(h.displayName=zd(p,f,s)),h};return w.withConfig&&(F.withConfig=w.withConfig),F}}function zd(e,t,r){return e?`${e}${De(t||"")}`:`Styled(${Pd(r)})`}function Bd(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Hl(t||"Root")}`),r}function Vd(e){for(const t in e)return!1;return!0}function Nd(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Hl(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ja(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=n;if(i==="components"||i==="slots")r[i]={...e[i],...r[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],o=t[i];if(!o)r[i]=a||{};else if(!a)r[i]=o;else{r[i]={...o};for(const s in a)if(Object.prototype.hasOwnProperty.call(a,s)){const c=s;r[i][c]=ja(a[c],o[c])}}}else r[i]===void 0&&(r[i]=e[i])}return r}const Ld=typeof window<"u"?ie.useLayoutEffect:ie.useEffect;function qd(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function to(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),qd(e,t,r)}function Wd(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function pr(e){if(e.type)return e;if(e.charAt(0)==="#")return pr(Wd(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
48
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:ur(9,e));let n=e.substring(t+1,e.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
49
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:ur(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const Ud=e=>{const t=pr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},mn=(e,t)=>{try{return Ud(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Pi(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Kl(e){e=pr(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),o=(p,f=(p+r/30)%12)=>i-a*Math.max(Math.min(f-3,9-f,1),-1);let s="rgb";const c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(s+="a",c.push(t[3])),Pi({type:s,values:c})}function Fa(e){e=pr(e);let t=e.type==="hsl"||e.type==="hsla"?pr(Kl(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function ds(e,t){const r=Fa(e),n=Fa(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function ut(e,t){return e=pr(e),t=to(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Pi(e)}function Vn(e,t,r){try{return ut(e,t)}catch{return e}}function ro(e,t){if(e=pr(e),t=to(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Pi(e)}function Te(e,t,r){try{return ro(e,t)}catch{return e}}function no(e,t){if(e=pr(e),t=to(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Pi(e)}function je(e,t,r){try{return no(e,t)}catch{return e}}function Hd(e,t=.15){return Fa(e)>.5?ro(e,t):no(e,t)}function Nn(e,t,r){try{return Hd(e,t)}catch{return e}}const Kd=ie.createContext(void 0);process.env.NODE_ENV!=="production"&&(T.node,T.object);function Yd(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?ja(i.defaultProps,n):!i.styleOverrides&&!i.variants?ja(i,n):n}function Gd({props:e,name:t}){const r=ie.useContext(Kd);return Yd({props:e,name:t,theme:{components:r}})}const fs={theme:void 0};function Qd(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(fs.theme=i.theme,a=Wl(e(fs)),t=a,r=i.theme),a}}function Zd(e=""){function t(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${e?`${e}-`:""}${n}${t(...i)})`}const hs=(e,t,r,n=[])=>{let i=e;t.forEach((a,o)=>{o===t.length-1?Array.isArray(i)?i[Number(a)]=r:i&&typeof i=="object"&&(i[a]=r):i&&typeof i=="object"&&(i[a]||(i[a]=n.includes(a)?[]:{}),i=i[a])})},Xd=(e,t,r)=>{function n(i,a=[],o=[]){Object.entries(i).forEach(([s,c])=>{(!r||r&&!r([...a,s]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?n(c,[...a,s],Array.isArray(c)?[...o,s]:o):t([...a,s],c,o))})}n(e)},Jd=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function ta(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},o={};return Xd(e,(s,c,p)=>{if((typeof c=="string"||typeof c=="number")&&(!n||!n(s,c))){const f=`--${r?`${r}-`:""}${s.join("-")}`,d=Jd(s,c);Object.assign(i,{[f]:d}),hs(a,s,`var(${f})`,p),hs(o,s,`var(${f}, ${d})`,p)}},s=>s[0]==="vars"),{css:i,vars:a,varsWithDefaults:o}}function ef(e,t={}){const{getSelector:r=C,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:o,defaultColorScheme:s="light",...c}=e,{vars:p,css:f,varsWithDefaults:d}=ta(c,t);let u=d;const x={},{[s]:k,...m}=a;if(Object.entries(m||{}).forEach(([$,F])=>{const{vars:E,css:_,varsWithDefaults:I}=ta(F,t);u=mt(u,I),x[$]={css:_,vars:E}}),k){const{css:$,vars:F,varsWithDefaults:E}=ta(k,t);u=mt(u,E),x[s]={css:$,vars:F}}function C($,F){var _,I;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),$){if(E==="media")return e.defaultColorScheme===$?":root":{[`@media (prefers-color-scheme: ${((I=(_=a[$])==null?void 0:_.palette)==null?void 0:I.mode)||$})`]:{":root":F}};if(E)return e.defaultColorScheme===$?`:root, ${E.replace("%s",String($))}`:E.replace("%s",String($))}return":root"}return{vars:u,generateThemeVars:()=>{let $={...p};return Object.entries(x).forEach(([,{vars:F}])=>{$=mt($,F)}),$},generateStyleSheets:()=>{var R,Y;const $=[],F=e.defaultColorScheme||"light";function E(h,B){Object.keys(B).length&&$.push(typeof h=="string"?{[h]:{...B}}:h)}E(r(void 0,{...f}),f);const{[F]:_,...I}=x;if(_){const{css:h}=_,B=(Y=(R=a[F])==null?void 0:R.palette)==null?void 0:Y.mode,q=!n&&B?{colorScheme:B,...h}:{...h};E(r(F,{...q}),q)}return Object.entries(I).forEach(([h,{css:B}])=>{var L,H;const q=(H=(L=a[h])==null?void 0:L.palette)==null?void 0:H.mode,Z=!n&&q?{colorScheme:q,...B}:{...B};E(r(h,{...Z}),Z)}),$}}}function tf(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Sn={black:"#000",white:"#fff"},rf={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},zr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Br={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},fn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Vr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Nr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Lr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Yl(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Sn.white,default:Sn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const nf=Yl();function Gl(){return{text:{primary:Sn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Sn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const ms=Gl();function gs(e,t,r,n){const i=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=no(e.main,i):t==="dark"&&(e.dark=ro(e.main,a)))}function af(e="light"){return e==="dark"?{main:Vr[200],light:Vr[50],dark:Vr[400]}:{main:Vr[700],light:Vr[400],dark:Vr[800]}}function of(e="light"){return e==="dark"?{main:zr[200],light:zr[50],dark:zr[400]}:{main:zr[500],light:zr[300],dark:zr[700]}}function sf(e="light"){return e==="dark"?{main:Br[500],light:Br[300],dark:Br[700]}:{main:Br[700],light:Br[400],dark:Br[800]}}function lf(e="light"){return e==="dark"?{main:Nr[400],light:Nr[300],dark:Nr[700]}:{main:Nr[700],light:Nr[500],dark:Nr[900]}}function cf(e="light"){return e==="dark"?{main:Lr[400],light:Lr[300],dark:Lr[700]}:{main:Lr[800],light:Lr[500],dark:Lr[900]}}function uf(e="light"){return e==="dark"?{main:fn[400],light:fn[300],dark:fn[700]}:{main:"#ed6c02",light:fn[500],dark:fn[900]}}function io(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...i}=e,a=e.primary||af(t),o=e.secondary||of(t),s=e.error||sf(t),c=e.info||lf(t),p=e.success||cf(t),f=e.warning||uf(t);function d(m){const C=ds(m,ms.text.primary)>=r?ms.text.primary:nf.text.primary;if(process.env.NODE_ENV!=="production"){const v=ds(m,C);v<3&&console.error([`MUI: The contrast ratio of ${v}:1 for ${C} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
50
+ `))}return C}const u=({color:m,name:C,mainShade:v=500,lightShade:w=300,darkShade:$=700})=>{if(m={...m},!m.main&&m[v]&&(m.main=m[v]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${C?` (${C})`:""} provided to augmentColor(color) is invalid.
51
+ The color object needs to have a \`main\` property or a \`${v}\` property.`:ur(11,C?` (${C})`:"",v));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${C?` (${C})`:""} provided to augmentColor(color) is invalid.
52
52
  \`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
53
53
 
54
54
  Did you intend to use one of the following approaches?
@@ -61,18 +61,18 @@ const theme1 = createTheme({ palette: {
61
61
 
62
62
  const theme2 = createTheme({ palette: {
63
63
  primary: { main: green[500] },
64
- } });`:pr(12,S?` (${S})`:"",JSON.stringify(m.main)));return ho(m,"light",j,n),ho(m,"dark",D,n),m.contrastText||(m.contrastText=f(m.main)),m};let x;return t==="light"?x=Hl():t==="dark"&&(x=Kl()),process.env.NODE_ENV!=="production"&&(x||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),mt({common:{...Cn},mode:t,primary:u({color:a,name:"primary"}),secondary:u({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:u({color:o,name:"error"}),warning:u({color:d,name:"warning"}),info:u({color:c,name:"info"}),success:u({color:p,name:"success"}),grey:Zd,contrastThreshold:r,getContrastText:f,augmentColor:u,tonalOffset:n,...x},i)}function sf(e){const t={};return Object.entries(e).forEach(n=>{const[i,a]=n;typeof a=="object"&&(t[i]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function of(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function lf(e){return Math.round(e*1e5)/1e5}const mo={textTransform:"uppercase"},go='"Roboto", "Helvetica", "Arial", sans-serif';function cf(e,t){const{fontFamily:r=go,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:o=700,htmlFontSize:c=16,allVariants:p,pxToRem:d,...f}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const u=n/14,x=d||(S=>`${S/c*u}rem`),E=(S,v,j,D,F)=>({fontFamily:r,fontWeight:S,fontSize:x(v),lineHeight:j,...r===go?{letterSpacing:`${lf(D/v)}em`}:{},...F,...p}),m={h1:E(i,96,1.167,-1.5),h2:E(i,60,1.2,-.5),h3:E(a,48,1.167,0),h4:E(a,34,1.235,.25),h5:E(a,24,1.334,0),h6:E(s,20,1.6,.15),subtitle1:E(a,16,1.75,.15),subtitle2:E(s,14,1.57,.1),body1:E(a,16,1.5,.15),body2:E(a,14,1.43,.15),button:E(s,14,1.75,.4,mo),caption:E(a,12,1.66,.4),overline:E(a,12,2.66,1,mo),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return mt({htmlFontSize:c,pxToRem:x,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:o,...m},f,{clone:!1})}const uf=.2,pf=.14,df=.12;function _e(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${uf})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${pf})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${df})`].join(",")}const ff=["none",_e(0,2,1,-1,0,1,1,0,0,1,3,0),_e(0,3,1,-2,0,2,2,0,0,1,5,0),_e(0,3,3,-2,0,3,4,0,0,1,8,0),_e(0,2,4,-1,0,4,5,0,0,1,10,0),_e(0,3,5,-1,0,5,8,0,0,1,14,0),_e(0,3,5,-1,0,6,10,0,0,1,18,0),_e(0,4,5,-2,0,7,10,1,0,2,16,1),_e(0,5,5,-3,0,8,10,1,0,3,14,2),_e(0,5,6,-3,0,9,12,1,0,3,16,2),_e(0,6,6,-3,0,10,14,1,0,4,18,3),_e(0,6,7,-4,0,11,15,1,0,4,20,3),_e(0,7,8,-4,0,12,17,2,0,5,22,4),_e(0,7,8,-4,0,13,19,2,0,5,24,4),_e(0,7,9,-4,0,14,21,2,0,5,26,4),_e(0,8,9,-5,0,15,22,2,0,6,28,5),_e(0,8,10,-5,0,16,24,2,0,6,30,5),_e(0,8,11,-5,0,17,26,2,0,6,32,5),_e(0,9,11,-5,0,18,28,2,0,7,34,6),_e(0,9,12,-6,0,19,29,2,0,7,36,6),_e(0,10,13,-6,0,20,31,3,0,8,38,7),_e(0,10,13,-6,0,21,33,3,0,8,40,7),_e(0,10,14,-6,0,22,35,3,0,8,42,7),_e(0,11,14,-7,0,23,36,3,0,9,44,8),_e(0,11,15,-7,0,24,38,3,0,9,46,8)],hf={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},mf={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function yo(e){return`${Math.round(e)}ms`}function gf(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function yf(e){const t={...hf,...e.easing},r={...mf,...e.duration};return{getAutoHeightDuration:gf,create:(i=["all"],a={})=>{const{duration:s=r.standard,easing:o=t.easeInOut,delay:c=0,...p}=a;if(process.env.NODE_ENV!=="production"){const d=u=>typeof u=="string",f=u=>!Number.isNaN(parseFloat(u));!d(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(s)&&!d(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),d(o)||console.error('MUI: Argument "easing" must be a string.'),!f(c)&&!d(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
65
- `)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof s=="string"?s:yo(s)} ${o} ${typeof c=="string"?c:yo(c)}`).join(",")},...e,easing:t,duration:r}}const xf={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function vf(e){return Mt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Yl(e={}){const t={...e};function r(n){const i=Object.entries(n);for(let a=0;a<i.length;a++){const[s,o]=i[a];!vf(o)||s.startsWith("unstable_")?delete n[s]:Mt(o)&&(n[s]={...o},r(n[s]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
64
+ } });`:ur(12,C?` (${C})`:"",JSON.stringify(m.main)));return gs(m,"light",w,n),gs(m,"dark",$,n),m.contrastText||(m.contrastText=d(m.main)),m};let x;return t==="light"?x=Yl():t==="dark"&&(x=Gl()),process.env.NODE_ENV!=="production"&&(x||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),mt({common:{...Sn},mode:t,primary:u({color:a,name:"primary"}),secondary:u({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:u({color:s,name:"error"}),warning:u({color:f,name:"warning"}),info:u({color:c,name:"info"}),success:u({color:p,name:"success"}),grey:rf,contrastThreshold:r,getContrastText:d,augmentColor:u,tonalOffset:n,...x},i)}function pf(e){const t={};return Object.entries(e).forEach(n=>{const[i,a]=n;typeof a=="object"&&(t[i]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function df(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function ff(e){return Math.round(e*1e5)/1e5}const ys={textTransform:"uppercase"},xs='"Roboto", "Helvetica", "Arial", sans-serif';function hf(e,t){const{fontFamily:r=xs,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:p,pxToRem:f,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const u=n/14,x=f||(C=>`${C/c*u}rem`),k=(C,v,w,$,F)=>({fontFamily:r,fontWeight:C,fontSize:x(v),lineHeight:w,...r===xs?{letterSpacing:`${ff($/v)}em`}:{},...F,...p}),m={h1:k(i,96,1.167,-1.5),h2:k(i,60,1.2,-.5),h3:k(a,48,1.167,0),h4:k(a,34,1.235,.25),h5:k(a,24,1.334,0),h6:k(o,20,1.6,.15),subtitle1:k(a,16,1.75,.15),subtitle2:k(o,14,1.57,.1),body1:k(a,16,1.5,.15),body2:k(a,14,1.43,.15),button:k(o,14,1.75,.4,ys),caption:k(a,12,1.66,.4),overline:k(a,12,2.66,1,ys),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return mt({htmlFontSize:c,pxToRem:x,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,...m},d,{clone:!1})}const mf=.2,gf=.14,yf=.12;function _e(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${mf})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${gf})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${yf})`].join(",")}const xf=["none",_e(0,2,1,-1,0,1,1,0,0,1,3,0),_e(0,3,1,-2,0,2,2,0,0,1,5,0),_e(0,3,3,-2,0,3,4,0,0,1,8,0),_e(0,2,4,-1,0,4,5,0,0,1,10,0),_e(0,3,5,-1,0,5,8,0,0,1,14,0),_e(0,3,5,-1,0,6,10,0,0,1,18,0),_e(0,4,5,-2,0,7,10,1,0,2,16,1),_e(0,5,5,-3,0,8,10,1,0,3,14,2),_e(0,5,6,-3,0,9,12,1,0,3,16,2),_e(0,6,6,-3,0,10,14,1,0,4,18,3),_e(0,6,7,-4,0,11,15,1,0,4,20,3),_e(0,7,8,-4,0,12,17,2,0,5,22,4),_e(0,7,8,-4,0,13,19,2,0,5,24,4),_e(0,7,9,-4,0,14,21,2,0,5,26,4),_e(0,8,9,-5,0,15,22,2,0,6,28,5),_e(0,8,10,-5,0,16,24,2,0,6,30,5),_e(0,8,11,-5,0,17,26,2,0,6,32,5),_e(0,9,11,-5,0,18,28,2,0,7,34,6),_e(0,9,12,-6,0,19,29,2,0,7,36,6),_e(0,10,13,-6,0,20,31,3,0,8,38,7),_e(0,10,13,-6,0,21,33,3,0,8,40,7),_e(0,10,14,-6,0,22,35,3,0,8,42,7),_e(0,11,14,-7,0,23,36,3,0,9,44,8),_e(0,11,15,-7,0,24,38,3,0,9,46,8)],vf={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},bf={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function vs(e){return`${Math.round(e)}ms`}function wf(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Sf(e){const t={...vf,...e.easing},r={...bf,...e.duration};return{getAutoHeightDuration:wf,create:(i=["all"],a={})=>{const{duration:o=r.standard,easing:s=t.easeInOut,delay:c=0,...p}=a;if(process.env.NODE_ENV!=="production"){const f=u=>typeof u=="string",d=u=>!Number.isNaN(parseFloat(u));!f(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(o)&&!f(o)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),f(s)||console.error('MUI: Argument "easing" must be a string.'),!d(c)&&!f(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
65
+ `)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof o=="string"?o:vs(o)} ${s} ${typeof c=="string"?c:vs(c)}`).join(",")},...e,easing:t,duration:r}}const Cf={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ef(e){return It(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ql(e={}){const t={...e};function r(n){const i=Object.entries(n);for(let a=0;a<i.length;a++){const[o,s]=i[a];!Ef(s)||o.startsWith("unstable_")?delete n[o]:It(s)&&(n[o]={...s},r(n[o]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
66
66
 
67
67
  const theme = ${JSON.stringify(t,null,2)};
68
68
 
69
69
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
70
70
  theme.transitions = createTransitions(theme.transitions || {});
71
71
 
72
- export default theme;`}function ja(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:s={},typography:o={},shape:c,...p}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":pr(20));const d=rs(a),f=Xa(e);let u=mt(f,{mixins:of(f.breakpoints,n),palette:d,shadows:ff.slice(),typography:cf(d,o),transitions:yf(s),zIndex:{...xf}});if(u=mt(u,p),u=t.reduce((x,E)=>mt(x,E),u),process.env.NODE_ENV!=="production"){const x=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],E=(m,S)=>{let v;for(v in m){const j=m[v];if(x.includes(v)&&Object.keys(j).length>0){if(process.env.NODE_ENV!=="production"){const D=mr("",v);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${D}' syntax:`,JSON.stringify({root:{[`&.${D}`]:j}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
73
- `))}m[v]={}}}};Object.keys(u.components).forEach(m=>{const S=u.components[m].styleOverrides;S&&m.startsWith("Mui")&&E(S,m)})}return u.unstable_sxConfig={...$n,...p==null?void 0:p.unstable_sxConfig},u.unstable_sx=function(E){return ln({sx:E,theme:this})},u.toRuntimeSource=Yl,u}function bf(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const wf=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=bf(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Gl(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Ql(e){return e==="dark"?wf:[]}function Sf(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...i}=e,a=rs(t);return{palette:a,opacity:{...Gl(a.mode),...r},overlays:n||Ql(a.mode),...i}}function Cf(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Ef=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],kf=e=>(t,r)=>{const n=e.rootSelector||":root",i=e.colorSchemeSelector;let a=i;if(i==="class"&&(a=".%s"),i==="data"&&(a="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return Ef(e.cssVarPrefix).forEach(o=>{s[o]=r[o],delete r[o]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:a?{[a.replace("%s",t)]:s,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(a)return a.replace("%s",String(t))}return n};function Tf(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function N(e,t,r){!e[t]&&r&&(e[t]=r)}function yn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Ul(e)}function Vt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=gn(yn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
74
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function jf(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const _t=e=>{try{return e()}catch{}},Ff=(e="mui")=>Hd(e);function ea(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=Sf({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=ja({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Gl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Ql(i)},s}function Af(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=Cf,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...p}=e,d=Object.keys(r)[0],f=n||(r.light&&d!=="light"?"light":d),u=Ff(a),{[f]:x,light:E,dark:m,...S}=r,v={...S};let j=x;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(j=!0),!j)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:pr(21,f));const D=ea(v,j,p,f);E&&!v.light&&ea(v,E,void 0,"light"),m&&!v.dark&&ea(v,m,void 0,"dark");let F={defaultColorScheme:f,...D,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:c,getCssVar:u,colorSchemes:v,font:{...sf(D.typography),...D.font},spacing:jf(p.spacing)};Object.keys(F.colorSchemes).forEach(Y=>{const h=F.colorSchemes[Y].palette,B=q=>{const Z=q.split("-"),L=Z[1],H=Z[2];return u(q,h[L][H])};if(h.mode==="light"&&(N(h.common,"background","#fff"),N(h.common,"onBackground","#000")),h.mode==="dark"&&(N(h.common,"background","#000"),N(h.common,"onBackground","#fff")),Tf(h,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),h.mode==="light"){N(h.Alert,"errorColor",je(h.error.light,.6)),N(h.Alert,"infoColor",je(h.info.light,.6)),N(h.Alert,"successColor",je(h.success.light,.6)),N(h.Alert,"warningColor",je(h.warning.light,.6)),N(h.Alert,"errorFilledBg",B("palette-error-main")),N(h.Alert,"infoFilledBg",B("palette-info-main")),N(h.Alert,"successFilledBg",B("palette-success-main")),N(h.Alert,"warningFilledBg",B("palette-warning-main")),N(h.Alert,"errorFilledColor",_t(()=>h.getContrastText(h.error.main))),N(h.Alert,"infoFilledColor",_t(()=>h.getContrastText(h.info.main))),N(h.Alert,"successFilledColor",_t(()=>h.getContrastText(h.success.main))),N(h.Alert,"warningFilledColor",_t(()=>h.getContrastText(h.warning.main))),N(h.Alert,"errorStandardBg",Fe(h.error.light,.9)),N(h.Alert,"infoStandardBg",Fe(h.info.light,.9)),N(h.Alert,"successStandardBg",Fe(h.success.light,.9)),N(h.Alert,"warningStandardBg",Fe(h.warning.light,.9)),N(h.Alert,"errorIconColor",B("palette-error-main")),N(h.Alert,"infoIconColor",B("palette-info-main")),N(h.Alert,"successIconColor",B("palette-success-main")),N(h.Alert,"warningIconColor",B("palette-warning-main")),N(h.AppBar,"defaultBg",B("palette-grey-100")),N(h.Avatar,"defaultBg",B("palette-grey-400")),N(h.Button,"inheritContainedBg",B("palette-grey-300")),N(h.Button,"inheritContainedHoverBg",B("palette-grey-A100")),N(h.Chip,"defaultBorder",B("palette-grey-400")),N(h.Chip,"defaultAvatarColor",B("palette-grey-700")),N(h.Chip,"defaultIconColor",B("palette-grey-700")),N(h.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),N(h.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),N(h.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),N(h.LinearProgress,"primaryBg",Fe(h.primary.main,.62)),N(h.LinearProgress,"secondaryBg",Fe(h.secondary.main,.62)),N(h.LinearProgress,"errorBg",Fe(h.error.main,.62)),N(h.LinearProgress,"infoBg",Fe(h.info.main,.62)),N(h.LinearProgress,"successBg",Fe(h.success.main,.62)),N(h.LinearProgress,"warningBg",Fe(h.warning.main,.62)),N(h.Skeleton,"bg",`rgba(${B("palette-text-primaryChannel")} / 0.11)`),N(h.Slider,"primaryTrack",Fe(h.primary.main,.62)),N(h.Slider,"secondaryTrack",Fe(h.secondary.main,.62)),N(h.Slider,"errorTrack",Fe(h.error.main,.62)),N(h.Slider,"infoTrack",Fe(h.info.main,.62)),N(h.Slider,"successTrack",Fe(h.success.main,.62)),N(h.Slider,"warningTrack",Fe(h.warning.main,.62));const q=Nn(h.background.default,.8);N(h.SnackbarContent,"bg",q),N(h.SnackbarContent,"color",_t(()=>h.getContrastText(q))),N(h.SpeedDialAction,"fabHoverBg",Nn(h.background.paper,.15)),N(h.StepConnector,"border",B("palette-grey-400")),N(h.StepContent,"border",B("palette-grey-400")),N(h.Switch,"defaultColor",B("palette-common-white")),N(h.Switch,"defaultDisabledColor",B("palette-grey-100")),N(h.Switch,"primaryDisabledColor",Fe(h.primary.main,.62)),N(h.Switch,"secondaryDisabledColor",Fe(h.secondary.main,.62)),N(h.Switch,"errorDisabledColor",Fe(h.error.main,.62)),N(h.Switch,"infoDisabledColor",Fe(h.info.main,.62)),N(h.Switch,"successDisabledColor",Fe(h.success.main,.62)),N(h.Switch,"warningDisabledColor",Fe(h.warning.main,.62)),N(h.TableCell,"border",Fe(Vn(h.divider,1),.88)),N(h.Tooltip,"bg",Vn(h.grey[700],.92))}if(h.mode==="dark"){N(h.Alert,"errorColor",Fe(h.error.light,.6)),N(h.Alert,"infoColor",Fe(h.info.light,.6)),N(h.Alert,"successColor",Fe(h.success.light,.6)),N(h.Alert,"warningColor",Fe(h.warning.light,.6)),N(h.Alert,"errorFilledBg",B("palette-error-dark")),N(h.Alert,"infoFilledBg",B("palette-info-dark")),N(h.Alert,"successFilledBg",B("palette-success-dark")),N(h.Alert,"warningFilledBg",B("palette-warning-dark")),N(h.Alert,"errorFilledColor",_t(()=>h.getContrastText(h.error.dark))),N(h.Alert,"infoFilledColor",_t(()=>h.getContrastText(h.info.dark))),N(h.Alert,"successFilledColor",_t(()=>h.getContrastText(h.success.dark))),N(h.Alert,"warningFilledColor",_t(()=>h.getContrastText(h.warning.dark))),N(h.Alert,"errorStandardBg",je(h.error.light,.9)),N(h.Alert,"infoStandardBg",je(h.info.light,.9)),N(h.Alert,"successStandardBg",je(h.success.light,.9)),N(h.Alert,"warningStandardBg",je(h.warning.light,.9)),N(h.Alert,"errorIconColor",B("palette-error-main")),N(h.Alert,"infoIconColor",B("palette-info-main")),N(h.Alert,"successIconColor",B("palette-success-main")),N(h.Alert,"warningIconColor",B("palette-warning-main")),N(h.AppBar,"defaultBg",B("palette-grey-900")),N(h.AppBar,"darkBg",B("palette-background-paper")),N(h.AppBar,"darkColor",B("palette-text-primary")),N(h.Avatar,"defaultBg",B("palette-grey-600")),N(h.Button,"inheritContainedBg",B("palette-grey-800")),N(h.Button,"inheritContainedHoverBg",B("palette-grey-700")),N(h.Chip,"defaultBorder",B("palette-grey-700")),N(h.Chip,"defaultAvatarColor",B("palette-grey-300")),N(h.Chip,"defaultIconColor",B("palette-grey-300")),N(h.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),N(h.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),N(h.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),N(h.LinearProgress,"primaryBg",je(h.primary.main,.5)),N(h.LinearProgress,"secondaryBg",je(h.secondary.main,.5)),N(h.LinearProgress,"errorBg",je(h.error.main,.5)),N(h.LinearProgress,"infoBg",je(h.info.main,.5)),N(h.LinearProgress,"successBg",je(h.success.main,.5)),N(h.LinearProgress,"warningBg",je(h.warning.main,.5)),N(h.Skeleton,"bg",`rgba(${B("palette-text-primaryChannel")} / 0.13)`),N(h.Slider,"primaryTrack",je(h.primary.main,.5)),N(h.Slider,"secondaryTrack",je(h.secondary.main,.5)),N(h.Slider,"errorTrack",je(h.error.main,.5)),N(h.Slider,"infoTrack",je(h.info.main,.5)),N(h.Slider,"successTrack",je(h.success.main,.5)),N(h.Slider,"warningTrack",je(h.warning.main,.5));const q=Nn(h.background.default,.98);N(h.SnackbarContent,"bg",q),N(h.SnackbarContent,"color",_t(()=>h.getContrastText(q))),N(h.SpeedDialAction,"fabHoverBg",Nn(h.background.paper,.15)),N(h.StepConnector,"border",B("palette-grey-600")),N(h.StepContent,"border",B("palette-grey-600")),N(h.Switch,"defaultColor",B("palette-grey-300")),N(h.Switch,"defaultDisabledColor",B("palette-grey-600")),N(h.Switch,"primaryDisabledColor",je(h.primary.main,.55)),N(h.Switch,"secondaryDisabledColor",je(h.secondary.main,.55)),N(h.Switch,"errorDisabledColor",je(h.error.main,.55)),N(h.Switch,"infoDisabledColor",je(h.info.main,.55)),N(h.Switch,"successDisabledColor",je(h.success.main,.55)),N(h.Switch,"warningDisabledColor",je(h.warning.main,.55)),N(h.TableCell,"border",je(Vn(h.divider,1),.68)),N(h.Tooltip,"bg",Vn(h.grey[700],.92))}Vt(h.background,"default"),Vt(h.background,"paper"),Vt(h.common,"background"),Vt(h.common,"onBackground"),Vt(h,"divider"),Object.keys(h).forEach(q=>{const Z=h[q];q!=="tonalOffset"&&Z&&typeof Z=="object"&&(Z.main&&N(h[q],"mainChannel",gn(yn(Z.main))),Z.light&&N(h[q],"lightChannel",gn(yn(Z.light))),Z.dark&&N(h[q],"darkChannel",gn(yn(Z.dark))),Z.contrastText&&N(h[q],"contrastTextChannel",gn(yn(Z.contrastText))),q==="text"&&(Vt(h[q],"primary"),Vt(h[q],"secondary")),q==="action"&&(Z.active&&Vt(h[q],"active"),Z.selected&&Vt(h[q],"selected")))})}),F=t.reduce((Y,h)=>mt(Y,h),F);const C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:kf(F)},{vars:_,generateThemeVars:I,generateStyleSheets:R}=Gd(F,C);return F.vars=_,Object.entries(F.colorSchemes[F.defaultColorScheme]).forEach(([Y,h])=>{F[Y]=h}),F.generateThemeVars=I,F.generateStyleSheets=R,F.generateSpacing=function(){return Vl(p.spacing,Qa(this))},F.getColorSchemeSelector=Qd(o),F.spacing=F.generateSpacing(),F.shouldSkipGeneratingVar=s,F.unstable_sxConfig={...$n,...p==null?void 0:p.unstable_sxConfig},F.unstable_sx=function(h){return ln({sx:h,theme:this})},F.toRuntimeSource=Yl,F}function xo(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:rs({...r===!0?{}:r.palette,mode:t})})}function Of(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...s}=e,o=a||"light",c=i==null?void 0:i[o],p={...i,...r?{[o]:{...typeof c!="boolean"&&c,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return ja(e,...t);let d=r;"palette"in e||p[o]&&(p[o]!==!0?d=p[o].palette:o==="dark"&&(d={mode:"dark"}));const f=ja({...e,palette:d},...t);return f.defaultColorScheme=o,f.colorSchemes=p,f.palette.mode==="light"&&(f.colorSchemes.light={...p.light!==!0&&p.light,palette:f.palette},xo(f,"dark",p.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:f.palette},xo(f,"light",p.light)),f}return!r&&!("light"in p)&&o==="light"&&(p.light=!0),Af({...s,colorSchemes:p,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const Zl=Of(),Xl="$$material";function _f(){const e=Ed(Zl);return process.env.NODE_ENV!=="production"&&ae.useDebugValue(e),e[Xl]||e}function Rf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const $f=e=>Rf(e)&&e!=="classes",yt=Rd({themeId:Xl,defaultTheme:Zl,rootShouldForwardProp:$f});function Pf(){return od}const Pr=Ud;process.env.NODE_ENV!=="production"&&(k.node,k.object.isRequired);function Ir(e){return Wd(e)}function Df(e){return typeof e.main=="string"}function If(e,t=[]){if(!Df(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function li(e=[]){return([,t])=>t&&If(t,e)}function Mf(e){return mr("MuiTypography",e)}Dr("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const zf={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Bf=Pf(),Vf=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:s}=e,o={root:["root",a,e.align!=="inherit"&&`align${De(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return un(o,Mf,s)},Nf=yt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${De(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(Pr(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([r,n])=>r!=="inherit"&&n&&typeof n=="object").map(([r,n])=>({props:{variant:r},style:n})),...Object.entries(e.palette).filter(li()).map(([r])=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,r])=>typeof r=="string").map(([r])=>({props:{color:`text${De(r)}`},style:{color:(e.vars||e).palette.text[r]}})),{props:({ownerState:r})=>r.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:r})=>r.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:r})=>r.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:r})=>r.paragraph,style:{marginBottom:16}}]}})),vo={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Jl=ae.forwardRef(function(t,r){const{color:n,...i}=Ir({props:t,name:"MuiTypography"}),a=!zf[n],s=Bf({...i,...a&&{color:n}}),{align:o="inherit",className:c,component:p,gutterBottom:d=!1,noWrap:f=!1,paragraph:u=!1,variant:x="body1",variantMapping:E=vo,...m}=s,S={...s,align:o,color:n,className:c,component:p,gutterBottom:d,noWrap:f,paragraph:u,variant:x,variantMapping:E},v=p||(u?"p":E[x]||vo[x])||"span",j=Vf(S);return l.jsx(Nf,{as:v,ref:r,className:it(j.root,c),...m,ownerState:S,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...m.style}})});process.env.NODE_ENV!=="production"&&(Jl.propTypes={align:k.oneOf(["center","inherit","justify","left","right"]),children:k.node,classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),k.string]),component:k.elementType,gutterBottom:k.bool,noWrap:k.bool,paragraph:k.bool,style:k.object,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),variant:k.oneOfType([k.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),k.string]),variantMapping:k.object});const ns=ae.createContext(void 0);process.env.NODE_ENV!=="production"&&(ns.displayName="FormControlContext");function Lf(){return ae.useContext(ns)}function qf(e){return mr("MuiInputAdornment",e)}const bo=Dr("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var wo;const Wf=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${De(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},Uf=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:s}=e,o={root:["root",r&&"disablePointerEvents",i&&`position${De(i)}`,s,n&&"hiddenLabel",a&&`size${De(a)}`]};return un(o,qf,t)},Hf=yt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Wf})(Pr(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${bo.positionStart}&:not(.${bo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),ec=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:s="div",disablePointerEvents:o=!1,disableTypography:c=!1,position:p,variant:d,...f}=n,u=Lf()||{};let x=d;d&&u.variant&&process.env.NODE_ENV!=="production"&&d===u.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),u&&!x&&(x=u.variant);const E={...n,hiddenLabel:u.hiddenLabel,size:u.size,disablePointerEvents:o,position:p,variant:x},m=Uf(E);return l.jsx(ns.Provider,{value:null,children:l.jsx(Hf,{as:s,ownerState:E,className:it(m.root,a),ref:r,...f,children:typeof i=="string"&&!c?l.jsx(Jl,{color:"textSecondary",children:i}):l.jsxs(ae.Fragment,{children:[p==="start"?wo||(wo=l.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,i]})})})});process.env.NODE_ENV!=="production"&&(ec.propTypes={children:k.node,classes:k.object,className:k.string,component:k.elementType,disablePointerEvents:k.bool,disableTypography:k.bool,position:k.oneOf(["end","start"]).isRequired,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),variant:k.oneOf(["filled","outlined","standard"])});function is(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function Kf(e){return mr("MuiSvgIcon",e)}Dr("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Yf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(r)}`]};return un(i,Kf,n)},Gf=yt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${De(r.color)}`],t[`fontSize${De(r.fontSize)}`]]}})(Pr(({theme:e})=>{var t,r,n,i,a,s,o,c,p,d,f,u,x,E;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:c.call(o,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:d.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var S,v;return{props:{color:m},style:{color:(v=(S=(e.vars??e).palette)==null?void 0:S[m])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(u=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:u.active}},{props:{color:"disabled"},style:{color:(E=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:E.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ci=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:c="medium",htmlColor:p,inheritViewBox:d=!1,titleAccess:f,viewBox:u="0 0 24 24",...x}=n,E=ae.isValidElement(i)&&i.type==="svg",m={...n,color:s,component:o,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:u,hasSvgAsChild:E},S={};d||(S.viewBox=u);const v=Yf(m);return l.jsxs(Gf,{as:o,className:it(v.root,a),focusable:"false",color:p,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...S,...x,...E&&i.props,ownerState:m,children:[E?i.props.children:i,f?l.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(ci.propTypes={children:k.node,classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),k.string]),component:k.elementType,fontSize:k.oneOfType([k.oneOf(["inherit","large","medium","small"]),k.string]),htmlColor:k.string,inheritViewBox:k.bool,shapeRendering:k.string,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),titleAccess:k.string,viewBox:k.string});ci.muiName="SvgIcon";function pt(e,t){function r(n,i){return l.jsx(ci,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=ci.muiName,ae.memo(ae.forwardRef(r))}let So=0;function Qf(e){const[t,r]=ae.useState(e),n=e||t;return ae.useEffect(()=>{t==null&&(So+=1,r(`mui-${So}`))},[t]),n}const Zf={...ae},Co=Zf.useId;function Xf(e){if(Co!==void 0){const t=Co();return e??t}return Qf(e)}function Yn(e){const t=ae.useRef(e);return Md(()=>{t.current=e}),ae.useRef((...r)=>(0,t.current)(...r)).current}function Eo(...e){const t=ae.useRef(void 0),r=ae.useCallback(n=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const s=a,o=s(n);return typeof o=="function"?o:()=>{s(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return ae.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const Jf=k.oneOfType([k.func,k.object]);function eh(e){const{prototype:t={}}=e;return!!t.isReactComponent}function th(e,t,r,n,i){const a=e[t],s=i||t;if(a==null||typeof window>"u")return null;let o;return typeof a=="function"&&!eh(a)&&(o="Did you accidentally provide a plain function component instead?"),o!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const rh=is(k.elementType,th);function ko(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
75
- `))}return!1}const To={};function tc(e,t){const r=ae.useRef(To);return r.current===To&&(r.current=e(t)),r}class ui{constructor(){pn(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new ui}static use(){const t=tc(ui.create).current,[r,n]=ae.useState(!1);return t.shouldMount=r,t.setShouldMount=n,ae.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=ih(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.start(...t)})}stop(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.stop(...t)})}pulsate(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.pulsate(...t)})}}function nh(){return ui.use()}function ih(){let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}function Fa(){return Fa=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},Fa.apply(null,arguments)}function ah(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Aa(e,t){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Aa(e,t)}function sh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Aa(e,t)}const jo=$.createContext(null);function oh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function as(e,t){var r=function(a){return t&&$.isValidElement(a)?t(a):a},n=Object.create(null);return e&&$.Children.map(e,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function lh(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var n=Object.create(null),i=[];for(var a in e)a in t?i.length&&(n[a]=i,i=[]):i.push(a);var s,o={};for(var c in t){if(n[c])for(s=0;s<n[c].length;s++){var p=n[c][s];o[n[c][s]]=r(p)}o[c]=r(c)}for(s=0;s<i.length;s++)o[i[s]]=r(i[s]);return o}function wr(e,t,r){return r[t]!=null?r[t]:e.props[t]}function ch(e,t){return as(e.children,function(r){return $.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:wr(r,"appear",e),enter:wr(r,"enter",e),exit:wr(r,"exit",e)})})}function uh(e,t,r){var n=as(e.children),i=lh(t,n);return Object.keys(i).forEach(function(a){var s=i[a];if($.isValidElement(s)){var o=a in t,c=a in n,p=t[a],d=$.isValidElement(p)&&!p.props.in;c&&(!o||d)?i[a]=$.cloneElement(s,{onExited:r.bind(null,s),in:!0,exit:wr(s,"exit",e),enter:wr(s,"enter",e)}):!c&&o&&!d?i[a]=$.cloneElement(s,{in:!1}):c&&o&&$.isValidElement(p)&&(i[a]=$.cloneElement(s,{onExited:r.bind(null,s),in:p.props.in,exit:wr(s,"exit",e),enter:wr(s,"enter",e)}))}}),i}var ph=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},dh={component:"div",childFactory:function(t){return t}},ss=function(e){sh(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var s=a.handleExited.bind(oh(a));return a.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},a}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,a){var s=a.children,o=a.handleExited,c=a.firstRender;return{children:c?ch(i,o):uh(i,s,o),firstRender:!1}},r.handleExited=function(i,a){var s=as(this.props.children);i.key in s||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(o){var c=Fa({},o.children);return delete c[i.key],{children:c}}))},r.render=function(){var i=this.props,a=i.component,s=i.childFactory,o=ah(i,["component","childFactory"]),c=this.state.contextValue,p=ph(this.state.children).map(s);return delete o.appear,delete o.enter,delete o.exit,a===null?$.createElement(jo.Provider,{value:c},p):$.createElement(jo.Provider,{value:c},$.createElement(a,o,p))},t}($.Component);ss.propTypes=process.env.NODE_ENV!=="production"?{component:k.any,children:k.node,appear:k.bool,enter:k.bool,exit:k.bool,childFactory:k.func}:{};ss.defaultProps=dh;const fh=[];function hh(e){ae.useEffect(e,fh)}class os{constructor(){pn(this,"currentId",null);pn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});pn(this,"disposeEffect",()=>this.clear)}static create(){return new os}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function mh(){const e=tc(os.create).current;return hh(e.disposeEffect),e}function rc(e){const{className:t,classes:r,pulsate:n=!1,rippleX:i,rippleY:a,rippleSize:s,in:o,onExited:c,timeout:p}=e,[d,f]=ae.useState(!1),u=it(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),x={width:s,height:s,top:-(s/2)+a,left:-(s/2)+i},E=it(r.child,d&&r.childLeaving,n&&r.childPulsate);return!o&&!d&&f(!0),ae.useEffect(()=>{if(!o&&c!=null){const m=setTimeout(c,p);return()=>{clearTimeout(m)}}},[c,o,p]),l.jsx("span",{className:u,style:x,children:l.jsx("span",{className:E})})}process.env.NODE_ENV!=="production"&&(rc.propTypes={classes:k.object.isRequired,className:k.string,in:k.bool,onExited:k.func,pulsate:k.bool,rippleSize:k.number,rippleX:k.number,rippleY:k.number,timeout:k.number.isRequired});const wt=Dr("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Oa=550,gh=80,yh=fr.keyframes`
72
+ export default theme;`}function Aa(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:c,...p}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":ur(20));const f=io(a),d=eo(e);let u=mt(d,{mixins:df(d.breakpoints,n),palette:f,shadows:xf.slice(),typography:hf(f,s),transitions:Sf(o),zIndex:{...Cf}});if(u=mt(u,p),u=t.reduce((x,k)=>mt(x,k),u),process.env.NODE_ENV!=="production"){const x=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],k=(m,C)=>{let v;for(v in m){const w=m[v];if(x.includes(v)&&Object.keys(w).length>0){if(process.env.NODE_ENV!=="production"){const $=hr("",v);console.error([`MUI: The \`${C}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${$}' syntax:`,JSON.stringify({root:{[`&.${$}`]:w}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
73
+ `))}m[v]={}}}};Object.keys(u.components).forEach(m=>{const C=u.components[m].styleOverrides;C&&m.startsWith("Mui")&&k(C,m)})}return u.unstable_sxConfig={...Rn,...p==null?void 0:p.unstable_sxConfig},u.unstable_sx=function(k){return sn({sx:k,theme:this})},u.toRuntimeSource=Ql,u}function kf(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Tf=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=kf(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Zl(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Xl(e){return e==="dark"?Tf:[]}function jf(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...i}=e,a=io(t);return{palette:a,opacity:{...Zl(a.mode),...r},overlays:n||Xl(a.mode),...i}}function Ff(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Af=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Of=e=>(t,r)=>{const n=e.rootSelector||":root",i=e.colorSchemeSelector;let a=i;if(i==="class"&&(a=".%s"),i==="data"&&(a="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return Af(e.cssVarPrefix).forEach(s=>{o[s]=r[s],delete r[s]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:o}}:a?{[a.replace("%s",t)]:o,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...o}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(a)return a.replace("%s",String(t))}return n};function _f(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function N(e,t,r){!e[t]&&r&&(e[t]=r)}function gn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Kl(e)}function Bt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=mn(gn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
74
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Rf(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ot=e=>{try{return e()}catch{}},Pf=(e="mui")=>Zd(e);function ra(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=jf({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...o}=Aa({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Zl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Xl(i)},o}function $f(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:o=Ff,colorSchemeSelector:s=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...p}=e,f=Object.keys(r)[0],d=n||(r.light&&f!=="light"?"light":f),u=Pf(a),{[d]:x,light:k,dark:m,...C}=r,v={...C};let w=x;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(w=!0),!w)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:ur(21,d));const $=ra(v,w,p,d);k&&!v.light&&ra(v,k,void 0,"light"),m&&!v.dark&&ra(v,m,void 0,"dark");let F={defaultColorScheme:d,...$,cssVarPrefix:a,colorSchemeSelector:s,rootSelector:c,getCssVar:u,colorSchemes:v,font:{...pf($.typography),...$.font},spacing:Rf(p.spacing)};Object.keys(F.colorSchemes).forEach(Y=>{const h=F.colorSchemes[Y].palette,B=q=>{const Z=q.split("-"),L=Z[1],H=Z[2];return u(q,h[L][H])};if(h.mode==="light"&&(N(h.common,"background","#fff"),N(h.common,"onBackground","#000")),h.mode==="dark"&&(N(h.common,"background","#000"),N(h.common,"onBackground","#fff")),_f(h,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),h.mode==="light"){N(h.Alert,"errorColor",Te(h.error.light,.6)),N(h.Alert,"infoColor",Te(h.info.light,.6)),N(h.Alert,"successColor",Te(h.success.light,.6)),N(h.Alert,"warningColor",Te(h.warning.light,.6)),N(h.Alert,"errorFilledBg",B("palette-error-main")),N(h.Alert,"infoFilledBg",B("palette-info-main")),N(h.Alert,"successFilledBg",B("palette-success-main")),N(h.Alert,"warningFilledBg",B("palette-warning-main")),N(h.Alert,"errorFilledColor",Ot(()=>h.getContrastText(h.error.main))),N(h.Alert,"infoFilledColor",Ot(()=>h.getContrastText(h.info.main))),N(h.Alert,"successFilledColor",Ot(()=>h.getContrastText(h.success.main))),N(h.Alert,"warningFilledColor",Ot(()=>h.getContrastText(h.warning.main))),N(h.Alert,"errorStandardBg",je(h.error.light,.9)),N(h.Alert,"infoStandardBg",je(h.info.light,.9)),N(h.Alert,"successStandardBg",je(h.success.light,.9)),N(h.Alert,"warningStandardBg",je(h.warning.light,.9)),N(h.Alert,"errorIconColor",B("palette-error-main")),N(h.Alert,"infoIconColor",B("palette-info-main")),N(h.Alert,"successIconColor",B("palette-success-main")),N(h.Alert,"warningIconColor",B("palette-warning-main")),N(h.AppBar,"defaultBg",B("palette-grey-100")),N(h.Avatar,"defaultBg",B("palette-grey-400")),N(h.Button,"inheritContainedBg",B("palette-grey-300")),N(h.Button,"inheritContainedHoverBg",B("palette-grey-A100")),N(h.Chip,"defaultBorder",B("palette-grey-400")),N(h.Chip,"defaultAvatarColor",B("palette-grey-700")),N(h.Chip,"defaultIconColor",B("palette-grey-700")),N(h.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),N(h.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),N(h.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),N(h.LinearProgress,"primaryBg",je(h.primary.main,.62)),N(h.LinearProgress,"secondaryBg",je(h.secondary.main,.62)),N(h.LinearProgress,"errorBg",je(h.error.main,.62)),N(h.LinearProgress,"infoBg",je(h.info.main,.62)),N(h.LinearProgress,"successBg",je(h.success.main,.62)),N(h.LinearProgress,"warningBg",je(h.warning.main,.62)),N(h.Skeleton,"bg",`rgba(${B("palette-text-primaryChannel")} / 0.11)`),N(h.Slider,"primaryTrack",je(h.primary.main,.62)),N(h.Slider,"secondaryTrack",je(h.secondary.main,.62)),N(h.Slider,"errorTrack",je(h.error.main,.62)),N(h.Slider,"infoTrack",je(h.info.main,.62)),N(h.Slider,"successTrack",je(h.success.main,.62)),N(h.Slider,"warningTrack",je(h.warning.main,.62));const q=Nn(h.background.default,.8);N(h.SnackbarContent,"bg",q),N(h.SnackbarContent,"color",Ot(()=>h.getContrastText(q))),N(h.SpeedDialAction,"fabHoverBg",Nn(h.background.paper,.15)),N(h.StepConnector,"border",B("palette-grey-400")),N(h.StepContent,"border",B("palette-grey-400")),N(h.Switch,"defaultColor",B("palette-common-white")),N(h.Switch,"defaultDisabledColor",B("palette-grey-100")),N(h.Switch,"primaryDisabledColor",je(h.primary.main,.62)),N(h.Switch,"secondaryDisabledColor",je(h.secondary.main,.62)),N(h.Switch,"errorDisabledColor",je(h.error.main,.62)),N(h.Switch,"infoDisabledColor",je(h.info.main,.62)),N(h.Switch,"successDisabledColor",je(h.success.main,.62)),N(h.Switch,"warningDisabledColor",je(h.warning.main,.62)),N(h.TableCell,"border",je(Vn(h.divider,1),.88)),N(h.Tooltip,"bg",Vn(h.grey[700],.92))}if(h.mode==="dark"){N(h.Alert,"errorColor",je(h.error.light,.6)),N(h.Alert,"infoColor",je(h.info.light,.6)),N(h.Alert,"successColor",je(h.success.light,.6)),N(h.Alert,"warningColor",je(h.warning.light,.6)),N(h.Alert,"errorFilledBg",B("palette-error-dark")),N(h.Alert,"infoFilledBg",B("palette-info-dark")),N(h.Alert,"successFilledBg",B("palette-success-dark")),N(h.Alert,"warningFilledBg",B("palette-warning-dark")),N(h.Alert,"errorFilledColor",Ot(()=>h.getContrastText(h.error.dark))),N(h.Alert,"infoFilledColor",Ot(()=>h.getContrastText(h.info.dark))),N(h.Alert,"successFilledColor",Ot(()=>h.getContrastText(h.success.dark))),N(h.Alert,"warningFilledColor",Ot(()=>h.getContrastText(h.warning.dark))),N(h.Alert,"errorStandardBg",Te(h.error.light,.9)),N(h.Alert,"infoStandardBg",Te(h.info.light,.9)),N(h.Alert,"successStandardBg",Te(h.success.light,.9)),N(h.Alert,"warningStandardBg",Te(h.warning.light,.9)),N(h.Alert,"errorIconColor",B("palette-error-main")),N(h.Alert,"infoIconColor",B("palette-info-main")),N(h.Alert,"successIconColor",B("palette-success-main")),N(h.Alert,"warningIconColor",B("palette-warning-main")),N(h.AppBar,"defaultBg",B("palette-grey-900")),N(h.AppBar,"darkBg",B("palette-background-paper")),N(h.AppBar,"darkColor",B("palette-text-primary")),N(h.Avatar,"defaultBg",B("palette-grey-600")),N(h.Button,"inheritContainedBg",B("palette-grey-800")),N(h.Button,"inheritContainedHoverBg",B("palette-grey-700")),N(h.Chip,"defaultBorder",B("palette-grey-700")),N(h.Chip,"defaultAvatarColor",B("palette-grey-300")),N(h.Chip,"defaultIconColor",B("palette-grey-300")),N(h.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),N(h.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),N(h.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),N(h.LinearProgress,"primaryBg",Te(h.primary.main,.5)),N(h.LinearProgress,"secondaryBg",Te(h.secondary.main,.5)),N(h.LinearProgress,"errorBg",Te(h.error.main,.5)),N(h.LinearProgress,"infoBg",Te(h.info.main,.5)),N(h.LinearProgress,"successBg",Te(h.success.main,.5)),N(h.LinearProgress,"warningBg",Te(h.warning.main,.5)),N(h.Skeleton,"bg",`rgba(${B("palette-text-primaryChannel")} / 0.13)`),N(h.Slider,"primaryTrack",Te(h.primary.main,.5)),N(h.Slider,"secondaryTrack",Te(h.secondary.main,.5)),N(h.Slider,"errorTrack",Te(h.error.main,.5)),N(h.Slider,"infoTrack",Te(h.info.main,.5)),N(h.Slider,"successTrack",Te(h.success.main,.5)),N(h.Slider,"warningTrack",Te(h.warning.main,.5));const q=Nn(h.background.default,.98);N(h.SnackbarContent,"bg",q),N(h.SnackbarContent,"color",Ot(()=>h.getContrastText(q))),N(h.SpeedDialAction,"fabHoverBg",Nn(h.background.paper,.15)),N(h.StepConnector,"border",B("palette-grey-600")),N(h.StepContent,"border",B("palette-grey-600")),N(h.Switch,"defaultColor",B("palette-grey-300")),N(h.Switch,"defaultDisabledColor",B("palette-grey-600")),N(h.Switch,"primaryDisabledColor",Te(h.primary.main,.55)),N(h.Switch,"secondaryDisabledColor",Te(h.secondary.main,.55)),N(h.Switch,"errorDisabledColor",Te(h.error.main,.55)),N(h.Switch,"infoDisabledColor",Te(h.info.main,.55)),N(h.Switch,"successDisabledColor",Te(h.success.main,.55)),N(h.Switch,"warningDisabledColor",Te(h.warning.main,.55)),N(h.TableCell,"border",Te(Vn(h.divider,1),.68)),N(h.Tooltip,"bg",Vn(h.grey[700],.92))}Bt(h.background,"default"),Bt(h.background,"paper"),Bt(h.common,"background"),Bt(h.common,"onBackground"),Bt(h,"divider"),Object.keys(h).forEach(q=>{const Z=h[q];q!=="tonalOffset"&&Z&&typeof Z=="object"&&(Z.main&&N(h[q],"mainChannel",mn(gn(Z.main))),Z.light&&N(h[q],"lightChannel",mn(gn(Z.light))),Z.dark&&N(h[q],"darkChannel",mn(gn(Z.dark))),Z.contrastText&&N(h[q],"contrastTextChannel",mn(gn(Z.contrastText))),q==="text"&&(Bt(h[q],"primary"),Bt(h[q],"secondary")),q==="action"&&(Z.active&&Bt(h[q],"active"),Z.selected&&Bt(h[q],"selected")))})}),F=t.reduce((Y,h)=>mt(Y,h),F);const E={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:Of(F)},{vars:_,generateThemeVars:I,generateStyleSheets:R}=ef(F,E);return F.vars=_,Object.entries(F.colorSchemes[F.defaultColorScheme]).forEach(([Y,h])=>{F[Y]=h}),F.generateThemeVars=I,F.generateStyleSheets=R,F.generateSpacing=function(){return Ll(p.spacing,Xa(this))},F.getColorSchemeSelector=tf(s),F.spacing=F.generateSpacing(),F.shouldSkipGeneratingVar=o,F.unstable_sxConfig={...Rn,...p==null?void 0:p.unstable_sxConfig},F.unstable_sx=function(h){return sn({sx:h,theme:this})},F.toRuntimeSource=Ql,F}function bs(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:io({...r===!0?{}:r.palette,mode:t})})}function Jl(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...o}=e,s=a||"light",c=i==null?void 0:i[s],p={...i,...r?{[s]:{...typeof c!="boolean"&&c,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Aa(e,...t);let f=r;"palette"in e||p[s]&&(p[s]!==!0?f=p[s].palette:s==="dark"&&(f={mode:"dark"}));const d=Aa({...e,palette:f},...t);return d.defaultColorScheme=s,d.colorSchemes=p,d.palette.mode==="light"&&(d.colorSchemes.light={...p.light!==!0&&p.light,palette:d.palette},bs(d,"dark",p.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:d.palette},bs(d,"light",p.light)),d}return!r&&!("light"in p)&&s==="light"&&(p.light=!0),$f({...o,colorSchemes:p,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const ec=Jl(),tc="$$material";function ao(){const e=Ad(ec);return process.env.NODE_ENV!=="production"&&ie.useDebugValue(e),e[tc]||e}function Df(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const If=e=>Df(e)&&e!=="classes",yt=Md({themeId:tc,defaultTheme:ec,rootShouldForwardProp:If});function Mf(){return dd}const Pr=Qd;process.env.NODE_ENV!=="production"&&(T.node,T.object.isRequired);function Dr(e){return Gd(e)}function zf(e){return typeof e.main=="string"}function Bf(e,t=[]){if(!zf(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function ci(e=[]){return([,t])=>t&&Bf(t,e)}function Vf(e){return hr("MuiTypography",e)}$r("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Nf={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Lf=Mf(),qf=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:o}=e,s={root:["root",a,e.align!=="inherit"&&`align${De(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return cn(s,Vf,o)},Wf=yt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${De(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(Pr(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([r,n])=>r!=="inherit"&&n&&typeof n=="object").map(([r,n])=>({props:{variant:r},style:n})),...Object.entries(e.palette).filter(ci()).map(([r])=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,r])=>typeof r=="string").map(([r])=>({props:{color:`text${De(r)}`},style:{color:(e.vars||e).palette.text[r]}})),{props:({ownerState:r})=>r.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:r})=>r.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:r})=>r.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:r})=>r.paragraph,style:{marginBottom:16}}]}})),ws={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},rc=ie.forwardRef(function(t,r){const{color:n,...i}=Dr({props:t,name:"MuiTypography"}),a=!Nf[n],o=Lf({...i,...a&&{color:n}}),{align:s="inherit",className:c,component:p,gutterBottom:f=!1,noWrap:d=!1,paragraph:u=!1,variant:x="body1",variantMapping:k=ws,...m}=o,C={...o,align:s,color:n,className:c,component:p,gutterBottom:f,noWrap:d,paragraph:u,variant:x,variantMapping:k},v=p||(u?"p":k[x]||ws[x])||"span",w=qf(C);return l.jsx(Wf,{as:v,ref:r,className:nt(w.root,c),...m,ownerState:C,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...m.style}})});process.env.NODE_ENV!=="production"&&(rc.propTypes={align:T.oneOf(["center","inherit","justify","left","right"]),children:T.node,classes:T.object,className:T.string,color:T.oneOfType([T.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),T.string]),component:T.elementType,gutterBottom:T.bool,noWrap:T.bool,paragraph:T.bool,style:T.object,sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object]),variant:T.oneOfType([T.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),T.string]),variantMapping:T.object});const oo=ie.createContext(void 0);process.env.NODE_ENV!=="production"&&(oo.displayName="FormControlContext");function Uf(){return ie.useContext(oo)}function Hf(e){return hr("MuiInputAdornment",e)}const Ss=$r("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Cs;const Kf=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${De(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},Yf=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:o}=e,s={root:["root",r&&"disablePointerEvents",i&&`position${De(i)}`,o,n&&"hiddenLabel",a&&`size${De(a)}`]};return cn(s,Hf,t)},Gf=yt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Kf})(Pr(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${Ss.positionStart}&:not(.${Ss.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),nc=ie.forwardRef(function(t,r){const n=Dr({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:o="div",disablePointerEvents:s=!1,disableTypography:c=!1,position:p,variant:f,...d}=n,u=Uf()||{};let x=f;f&&u.variant&&process.env.NODE_ENV!=="production"&&f===u.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),u&&!x&&(x=u.variant);const k={...n,hiddenLabel:u.hiddenLabel,size:u.size,disablePointerEvents:s,position:p,variant:x},m=Yf(k);return l.jsx(oo.Provider,{value:null,children:l.jsx(Gf,{as:o,ownerState:k,className:nt(m.root,a),ref:r,...d,children:typeof i=="string"&&!c?l.jsx(rc,{color:"textSecondary",children:i}):l.jsxs(ie.Fragment,{children:[p==="start"?Cs||(Cs=l.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,i]})})})});process.env.NODE_ENV!=="production"&&(nc.propTypes={children:T.node,classes:T.object,className:T.string,component:T.elementType,disablePointerEvents:T.bool,disableTypography:T.bool,position:T.oneOf(["end","start"]).isRequired,sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object]),variant:T.oneOf(["filled","outlined","standard"])});function so(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function Qf(e){return hr("MuiSvgIcon",e)}$r("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Zf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(r)}`]};return cn(i,Qf,n)},Xf=yt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${De(r.color)}`],t[`fontSize${De(r.fontSize)}`]]}})(Pr(({theme:e})=>{var t,r,n,i,a,o,s,c,p,f,d,u,x,k;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:o.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:c.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:f.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var C,v;return{props:{color:m},style:{color:(v=(C=(e.vars??e).palette)==null?void 0:C[m])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(u=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:u.active}},{props:{color:"disabled"},style:{color:(k=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:k.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ui=ie.forwardRef(function(t,r){const n=Dr({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:o="inherit",component:s="svg",fontSize:c="medium",htmlColor:p,inheritViewBox:f=!1,titleAccess:d,viewBox:u="0 0 24 24",...x}=n,k=ie.isValidElement(i)&&i.type==="svg",m={...n,color:o,component:s,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:u,hasSvgAsChild:k},C={};f||(C.viewBox=u);const v=Zf(m);return l.jsxs(Xf,{as:s,className:nt(v.root,a),focusable:"false",color:p,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...C,...x,...k&&i.props,ownerState:m,children:[k?i.props.children:i,d?l.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(ui.propTypes={children:T.node,classes:T.object,className:T.string,color:T.oneOfType([T.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),T.string]),component:T.elementType,fontSize:T.oneOfType([T.oneOf(["inherit","large","medium","small"]),T.string]),htmlColor:T.string,inheritViewBox:T.bool,shapeRendering:T.string,sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object]),titleAccess:T.string,viewBox:T.string});ui.muiName="SvgIcon";function pt(e,t){function r(n,i){return l.jsx(ui,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=ui.muiName,ie.memo(ie.forwardRef(r))}let Es=0;function Jf(e){const[t,r]=ie.useState(e),n=e||t;return ie.useEffect(()=>{t==null&&(Es+=1,r(`mui-${Es}`))},[t]),n}const eh={...ie},ks=eh.useId;function th(e){if(ks!==void 0){const t=ks();return e??t}return Jf(e)}function Yn(e){const t=ie.useRef(e);return Ld(()=>{t.current=e}),ie.useRef((...r)=>(0,t.current)(...r)).current}function Ts(...e){const t=ie.useRef(void 0),r=ie.useCallback(n=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const o=a,s=o(n);return typeof s=="function"?s:()=>{o(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return ie.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const rh=T.oneOfType([T.func,T.object]);function nh(e){const{prototype:t={}}=e;return!!t.isReactComponent}function ih(e,t,r,n,i){const a=e[t],o=i||t;if(a==null||typeof window>"u")return null;let s;return typeof a=="function"&&!nh(a)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${n} \`${o}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const ah=so(T.elementType,ih);function js(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
75
+ `))}return!1}const Fs={};function ic(e,t){const r=ie.useRef(Fs);return r.current===Fs&&(r.current=e(t)),r}class pi{constructor(){un(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new pi}static use(){const t=ic(pi.create).current,[r,n]=ie.useState(!1);return t.shouldMount=r,t.setShouldMount=n,ie.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=sh(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.start(...t)})}stop(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.stop(...t)})}pulsate(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.pulsate(...t)})}}function oh(){return pi.use()}function sh(){let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}function Oa(){return Oa=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},Oa.apply(null,arguments)}function lh(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function _a(e,t){return _a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},_a(e,t)}function ch(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_a(e,t)}const As=P.createContext(null);function uh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lo(e,t){var r=function(a){return t&&P.isValidElement(a)?t(a):a},n=Object.create(null);return e&&P.Children.map(e,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function ph(e,t){e=e||{},t=t||{};function r(f){return f in t?t[f]:e[f]}var n=Object.create(null),i=[];for(var a in e)a in t?i.length&&(n[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(n[c])for(o=0;o<n[c].length;o++){var p=n[c][o];s[n[c][o]]=r(p)}s[c]=r(c)}for(o=0;o<i.length;o++)s[i[o]]=r(i[o]);return s}function br(e,t,r){return r[t]!=null?r[t]:e.props[t]}function dh(e,t){return lo(e.children,function(r){return P.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:br(r,"appear",e),enter:br(r,"enter",e),exit:br(r,"exit",e)})})}function fh(e,t,r){var n=lo(e.children),i=ph(t,n);return Object.keys(i).forEach(function(a){var o=i[a];if(P.isValidElement(o)){var s=a in t,c=a in n,p=t[a],f=P.isValidElement(p)&&!p.props.in;c&&(!s||f)?i[a]=P.cloneElement(o,{onExited:r.bind(null,o),in:!0,exit:br(o,"exit",e),enter:br(o,"enter",e)}):!c&&s&&!f?i[a]=P.cloneElement(o,{in:!1}):c&&s&&P.isValidElement(p)&&(i[a]=P.cloneElement(o,{onExited:r.bind(null,o),in:p.props.in,exit:br(o,"exit",e),enter:br(o,"enter",e)}))}}),i}var hh=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},mh={component:"div",childFactory:function(t){return t}},co=function(e){ch(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var o=a.handleExited.bind(uh(a));return a.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},a}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,a){var o=a.children,s=a.handleExited,c=a.firstRender;return{children:c?dh(i,s):fh(i,o,s),firstRender:!1}},r.handleExited=function(i,a){var o=lo(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(s){var c=Oa({},s.children);return delete c[i.key],{children:c}}))},r.render=function(){var i=this.props,a=i.component,o=i.childFactory,s=lh(i,["component","childFactory"]),c=this.state.contextValue,p=hh(this.state.children).map(o);return delete s.appear,delete s.enter,delete s.exit,a===null?P.createElement(As.Provider,{value:c},p):P.createElement(As.Provider,{value:c},P.createElement(a,s,p))},t}(P.Component);co.propTypes=process.env.NODE_ENV!=="production"?{component:T.any,children:T.node,appear:T.bool,enter:T.bool,exit:T.bool,childFactory:T.func}:{};co.defaultProps=mh;const gh=[];function yh(e){ie.useEffect(e,gh)}class uo{constructor(){un(this,"currentId",null);un(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});un(this,"disposeEffect",()=>this.clear)}static create(){return new uo}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function xh(){const e=ic(uo.create).current;return yh(e.disposeEffect),e}function ac(e){const{className:t,classes:r,pulsate:n=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:p}=e,[f,d]=ie.useState(!1),u=nt(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),x={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},k=nt(r.child,f&&r.childLeaving,n&&r.childPulsate);return!s&&!f&&d(!0),ie.useEffect(()=>{if(!s&&c!=null){const m=setTimeout(c,p);return()=>{clearTimeout(m)}}},[c,s,p]),l.jsx("span",{className:u,style:x,children:l.jsx("span",{className:k})})}process.env.NODE_ENV!=="production"&&(ac.propTypes={classes:T.object.isRequired,className:T.string,in:T.bool,onExited:T.func,pulsate:T.bool,rippleSize:T.number,rippleX:T.number,rippleY:T.number,timeout:T.number.isRequired});const wt=$r("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ra=550,vh=80,bh=dr.keyframes`
76
76
  0% {
77
77
  transform: scale(0);
78
78
  opacity: 0.1;
@@ -82,7 +82,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
82
82
  transform: scale(1);
83
83
  opacity: 0.3;
84
84
  }
85
- `,xh=fr.keyframes`
85
+ `,wh=dr.keyframes`
86
86
  0% {
87
87
  opacity: 1;
88
88
  }
@@ -90,7 +90,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
90
90
  100% {
91
91
  opacity: 0;
92
92
  }
93
- `,vh=fr.keyframes`
93
+ `,Sh=dr.keyframes`
94
94
  0% {
95
95
  transform: scale(1);
96
96
  }
@@ -102,15 +102,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
102
102
  100% {
103
103
  transform: scale(1);
104
104
  }
105
- `,bh=yt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),wh=yt(rc,{name:"MuiTouchRipple",slot:"Ripple"})`
105
+ `,Ch=yt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Eh=yt(ac,{name:"MuiTouchRipple",slot:"Ripple"})`
106
106
  opacity: 0;
107
107
  position: absolute;
108
108
 
109
109
  &.${wt.rippleVisible} {
110
110
  opacity: 0.3;
111
111
  transform: scale(1);
112
- animation-name: ${yh};
113
- animation-duration: ${Oa}ms;
112
+ animation-name: ${bh};
113
+ animation-duration: ${Ra}ms;
114
114
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
115
115
  }
116
116
 
@@ -129,8 +129,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
129
129
 
130
130
  & .${wt.childLeaving} {
131
131
  opacity: 0;
132
- animation-name: ${xh};
133
- animation-duration: ${Oa}ms;
132
+ animation-name: ${wh};
133
+ animation-duration: ${Ra}ms;
134
134
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
135
135
  }
136
136
 
@@ -139,13 +139,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
139
139
  /* @noflip */
140
140
  left: 0px;
141
141
  top: 0;
142
- animation-name: ${vh};
142
+ animation-name: ${Sh};
143
143
  animation-duration: 2500ms;
144
144
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
145
145
  animation-iteration-count: infinite;
146
146
  animation-delay: 200ms;
147
147
  }
148
- `,nc=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:s,...o}=n,[c,p]=ae.useState([]),d=ae.useRef(0),f=ae.useRef(null);ae.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const u=ae.useRef(!1),x=mh(),E=ae.useRef(null),m=ae.useRef(null),S=ae.useCallback(F=>{const{pulsate:C,rippleX:_,rippleY:I,rippleSize:R,cb:Y}=F;p(h=>[...h,l.jsx(wh,{classes:{ripple:it(a.ripple,wt.ripple),rippleVisible:it(a.rippleVisible,wt.rippleVisible),ripplePulsate:it(a.ripplePulsate,wt.ripplePulsate),child:it(a.child,wt.child),childLeaving:it(a.childLeaving,wt.childLeaving),childPulsate:it(a.childPulsate,wt.childPulsate)},timeout:Oa,pulsate:C,rippleX:_,rippleY:I,rippleSize:R},d.current)]),d.current+=1,f.current=Y},[a]),v=ae.useCallback((F={},C={},_=()=>{})=>{const{pulsate:I=!1,center:R=i||C.pulsate,fakeElement:Y=!1}=C;if((F==null?void 0:F.type)==="mousedown"&&u.current){u.current=!1;return}(F==null?void 0:F.type)==="touchstart"&&(u.current=!0);const h=Y?null:m.current,B=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};let q,Z,L;if(R||F===void 0||F.clientX===0&&F.clientY===0||!F.clientX&&!F.touches)q=Math.round(B.width/2),Z=Math.round(B.height/2);else{const{clientX:H,clientY:G}=F.touches&&F.touches.length>0?F.touches[0]:F;q=Math.round(H-B.left),Z=Math.round(G-B.top)}if(R)L=Math.sqrt((2*B.width**2+B.height**2)/3),L%2===0&&(L+=1);else{const H=Math.max(Math.abs((h?h.clientWidth:0)-q),q)*2+2,G=Math.max(Math.abs((h?h.clientHeight:0)-Z),Z)*2+2;L=Math.sqrt(H**2+G**2)}F!=null&&F.touches?E.current===null&&(E.current=()=>{S({pulsate:I,rippleX:q,rippleY:Z,rippleSize:L,cb:_})},x.start(gh,()=>{E.current&&(E.current(),E.current=null)})):S({pulsate:I,rippleX:q,rippleY:Z,rippleSize:L,cb:_})},[i,S,x]),j=ae.useCallback(()=>{v({},{pulsate:!0})},[v]),D=ae.useCallback((F,C)=>{if(x.clear(),(F==null?void 0:F.type)==="touchend"&&E.current){E.current(),E.current=null,x.start(0,()=>{D(F,C)});return}E.current=null,p(_=>_.length>0?_.slice(1):_),f.current=C},[x]);return ae.useImperativeHandle(r,()=>({pulsate:j,start:v,stop:D}),[j,v,D]),l.jsx(bh,{className:it(wt.root,a.root,s),ref:m,...o,children:l.jsx(ss,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(nc.propTypes={center:k.bool,classes:k.object,className:k.string});function Sh(e){return mr("MuiButtonBase",e)}const Ch=Dr("MuiButtonBase",["root","disabled","focusVisible"]),Eh=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:i}=e,s=un({root:["root",t&&"disabled",r&&"focusVisible"]},Sh,i);return r&&n&&(s.root+=` ${n}`),s},kh=yt("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Ch.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ic=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:s,className:o,component:c="button",disabled:p=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:u=!1,focusVisibleClassName:x,LinkComponent:E="a",onBlur:m,onClick:S,onContextMenu:v,onDragLeave:j,onFocus:D,onFocusVisible:F,onKeyDown:C,onKeyUp:_,onMouseDown:I,onMouseLeave:R,onMouseUp:Y,onTouchEnd:h,onTouchMove:B,onTouchStart:q,tabIndex:Z=0,TouchRippleProps:L,touchRippleRef:H,type:G,...ne}=n,ue=ae.useRef(null),P=nh(),U=Eo(P.ref,H),[X,pe]=ae.useState(!1);p&&X&&pe(!1),ae.useImperativeHandle(i,()=>({focusVisible:()=>{pe(!0),ue.current.focus()}}),[]);const he=P.shouldMount&&!d&&!p;ae.useEffect(()=>{X&&u&&!d&&P.pulsate()},[d,u,X,P]);const de=Nt(P,"start",I,f),re=Nt(P,"stop",v,f),W=Nt(P,"stop",j,f),Q=Nt(P,"stop",Y,f),se=Nt(P,"stop",y=>{X&&y.preventDefault(),R&&R(y)},f),le=Nt(P,"start",q,f),ce=Nt(P,"stop",h,f),be=Nt(P,"stop",B,f),J=Nt(P,"stop",y=>{ko(y.target)||pe(!1),m&&m(y)},!1),Ie=Yn(y=>{ue.current||(ue.current=y.currentTarget),ko(y.target)&&(pe(!0),F&&F(y)),D&&D(y)}),Ke=()=>{const y=ue.current;return c&&c!=="button"&&!(y.tagName==="A"&&y.href)},Xe=Yn(y=>{u&&!y.repeat&&X&&y.key===" "&&P.stop(y,()=>{P.start(y)}),y.target===y.currentTarget&&Ke()&&y.key===" "&&y.preventDefault(),C&&C(y),y.target===y.currentTarget&&Ke()&&y.key==="Enter"&&!p&&(y.preventDefault(),S&&S(y))}),Tt=Yn(y=>{u&&y.key===" "&&X&&!y.defaultPrevented&&P.stop(y,()=>{P.pulsate(y)}),_&&_(y),S&&y.target===y.currentTarget&&Ke()&&y.key===" "&&!y.defaultPrevented&&S(y)});let Ye=c;Ye==="button"&&(ne.href||ne.to)&&(Ye=E);const We={};Ye==="button"?(We.type=G===void 0?"button":G,We.disabled=p):(!ne.href&&!ne.to&&(We.role="button"),p&&(We["aria-disabled"]=p));const Ue=Eo(r,ue),w={...n,centerRipple:a,component:c,disabled:p,disableRipple:d,disableTouchRipple:f,focusRipple:u,tabIndex:Z,focusVisible:X},T=Eh(w);return l.jsxs(kh,{as:Ye,className:it(T.root,o),ownerState:w,onBlur:J,onClick:S,onContextMenu:re,onFocus:Ie,onKeyDown:Xe,onKeyUp:Tt,onMouseDown:de,onMouseLeave:se,onMouseUp:Q,onDragLeave:W,onTouchEnd:ce,onTouchMove:be,onTouchStart:le,ref:Ue,tabIndex:p?-1:Z,type:G,...We,...ne,children:[s,he?l.jsx(nc,{ref:U,center:a,...L}):null]})});function Nt(e,t,r,n=!1){return Yn(i=>(r&&r(i),n||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(ic.propTypes={action:Jf,centerRipple:k.bool,children:k.node,classes:k.object,className:k.string,component:rh,disabled:k.bool,disableRipple:k.bool,disableTouchRipple:k.bool,focusRipple:k.bool,focusVisibleClassName:k.string,href:k.any,LinkComponent:k.elementType,onBlur:k.func,onClick:k.func,onContextMenu:k.func,onDragLeave:k.func,onFocus:k.func,onFocusVisible:k.func,onKeyDown:k.func,onKeyUp:k.func,onMouseDown:k.func,onMouseLeave:k.func,onMouseUp:k.func,onTouchEnd:k.func,onTouchMove:k.func,onTouchStart:k.func,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),tabIndex:k.number,TouchRippleProps:k.object,touchRippleRef:k.oneOfType([k.func,k.shape({current:k.shape({pulsate:k.func.isRequired,start:k.func.isRequired,stop:k.func.isRequired})})]),type:k.oneOfType([k.oneOf(["button","reset","submit"]),k.string])});function Th(e){return mr("MuiCircularProgress",e)}Dr("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Qt=44,_a=fr.keyframes`
148
+ `,oc=ie.forwardRef(function(t,r){const n=Dr({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:o,...s}=n,[c,p]=ie.useState([]),f=ie.useRef(0),d=ie.useRef(null);ie.useEffect(()=>{d.current&&(d.current(),d.current=null)},[c]);const u=ie.useRef(!1),x=xh(),k=ie.useRef(null),m=ie.useRef(null),C=ie.useCallback(F=>{const{pulsate:E,rippleX:_,rippleY:I,rippleSize:R,cb:Y}=F;p(h=>[...h,l.jsx(Eh,{classes:{ripple:nt(a.ripple,wt.ripple),rippleVisible:nt(a.rippleVisible,wt.rippleVisible),ripplePulsate:nt(a.ripplePulsate,wt.ripplePulsate),child:nt(a.child,wt.child),childLeaving:nt(a.childLeaving,wt.childLeaving),childPulsate:nt(a.childPulsate,wt.childPulsate)},timeout:Ra,pulsate:E,rippleX:_,rippleY:I,rippleSize:R},f.current)]),f.current+=1,d.current=Y},[a]),v=ie.useCallback((F={},E={},_=()=>{})=>{const{pulsate:I=!1,center:R=i||E.pulsate,fakeElement:Y=!1}=E;if((F==null?void 0:F.type)==="mousedown"&&u.current){u.current=!1;return}(F==null?void 0:F.type)==="touchstart"&&(u.current=!0);const h=Y?null:m.current,B=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};let q,Z,L;if(R||F===void 0||F.clientX===0&&F.clientY===0||!F.clientX&&!F.touches)q=Math.round(B.width/2),Z=Math.round(B.height/2);else{const{clientX:H,clientY:G}=F.touches&&F.touches.length>0?F.touches[0]:F;q=Math.round(H-B.left),Z=Math.round(G-B.top)}if(R)L=Math.sqrt((2*B.width**2+B.height**2)/3),L%2===0&&(L+=1);else{const H=Math.max(Math.abs((h?h.clientWidth:0)-q),q)*2+2,G=Math.max(Math.abs((h?h.clientHeight:0)-Z),Z)*2+2;L=Math.sqrt(H**2+G**2)}F!=null&&F.touches?k.current===null&&(k.current=()=>{C({pulsate:I,rippleX:q,rippleY:Z,rippleSize:L,cb:_})},x.start(vh,()=>{k.current&&(k.current(),k.current=null)})):C({pulsate:I,rippleX:q,rippleY:Z,rippleSize:L,cb:_})},[i,C,x]),w=ie.useCallback(()=>{v({},{pulsate:!0})},[v]),$=ie.useCallback((F,E)=>{if(x.clear(),(F==null?void 0:F.type)==="touchend"&&k.current){k.current(),k.current=null,x.start(0,()=>{$(F,E)});return}k.current=null,p(_=>_.length>0?_.slice(1):_),d.current=E},[x]);return ie.useImperativeHandle(r,()=>({pulsate:w,start:v,stop:$}),[w,v,$]),l.jsx(Ch,{className:nt(wt.root,a.root,o),ref:m,...s,children:l.jsx(co,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(oc.propTypes={center:T.bool,classes:T.object,className:T.string});function kh(e){return hr("MuiButtonBase",e)}const Th=$r("MuiButtonBase",["root","disabled","focusVisible"]),jh=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:i}=e,o=cn({root:["root",t&&"disabled",r&&"focusVisible"]},kh,i);return r&&n&&(o.root+=` ${n}`),o},Fh=yt("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Th.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),sc=ie.forwardRef(function(t,r){const n=Dr({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:o,className:s,component:c="button",disabled:p=!1,disableRipple:f=!1,disableTouchRipple:d=!1,focusRipple:u=!1,focusVisibleClassName:x,LinkComponent:k="a",onBlur:m,onClick:C,onContextMenu:v,onDragLeave:w,onFocus:$,onFocusVisible:F,onKeyDown:E,onKeyUp:_,onMouseDown:I,onMouseLeave:R,onMouseUp:Y,onTouchEnd:h,onTouchMove:B,onTouchStart:q,tabIndex:Z=0,TouchRippleProps:L,touchRippleRef:H,type:G,...re}=n,ce=ie.useRef(null),D=oh(),U=Ts(D.ref,H),[X,ue]=ie.useState(!1);p&&X&&ue(!1),ie.useImperativeHandle(i,()=>({focusVisible:()=>{ue(!0),ce.current.focus()}}),[]);const fe=D.shouldMount&&!f&&!p;ie.useEffect(()=>{X&&u&&!f&&D.pulsate()},[f,u,X,D]);const pe=Vt(D,"start",I,d),te=Vt(D,"stop",v,d),W=Vt(D,"stop",w,d),Q=Vt(D,"stop",Y,d),ae=Vt(D,"stop",y=>{X&&y.preventDefault(),R&&R(y)},d),se=Vt(D,"start",q,d),le=Vt(D,"stop",h,d),ve=Vt(D,"stop",B,d),J=Vt(D,"stop",y=>{js(y.target)||ue(!1),m&&m(y)},!1),Ie=Yn(y=>{ce.current||(ce.current=y.currentTarget),js(y.target)&&(ue(!0),F&&F(y)),$&&$(y)}),Ke=()=>{const y=ce.current;return c&&c!=="button"&&!(y.tagName==="A"&&y.href)},Ze=Yn(y=>{u&&!y.repeat&&X&&y.key===" "&&D.stop(y,()=>{D.start(y)}),y.target===y.currentTarget&&Ke()&&y.key===" "&&y.preventDefault(),E&&E(y),y.target===y.currentTarget&&Ke()&&y.key==="Enter"&&!p&&(y.preventDefault(),C&&C(y))}),kt=Yn(y=>{u&&y.key===" "&&X&&!y.defaultPrevented&&D.stop(y,()=>{D.pulsate(y)}),_&&_(y),C&&y.target===y.currentTarget&&Ke()&&y.key===" "&&!y.defaultPrevented&&C(y)});let Ye=c;Ye==="button"&&(re.href||re.to)&&(Ye=k);const We={};Ye==="button"?(We.type=G===void 0?"button":G,We.disabled=p):(!re.href&&!re.to&&(We.role="button"),p&&(We["aria-disabled"]=p));const Ue=Ts(r,ce),S={...n,centerRipple:a,component:c,disabled:p,disableRipple:f,disableTouchRipple:d,focusRipple:u,tabIndex:Z,focusVisible:X},j=jh(S);return l.jsxs(Fh,{as:Ye,className:nt(j.root,s),ownerState:S,onBlur:J,onClick:C,onContextMenu:te,onFocus:Ie,onKeyDown:Ze,onKeyUp:kt,onMouseDown:pe,onMouseLeave:ae,onMouseUp:Q,onDragLeave:W,onTouchEnd:le,onTouchMove:ve,onTouchStart:se,ref:Ue,tabIndex:p?-1:Z,type:G,...We,...re,children:[o,fe?l.jsx(oc,{ref:U,center:a,...L}):null]})});function Vt(e,t,r,n=!1){return Yn(i=>(r&&r(i),n||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(sc.propTypes={action:rh,centerRipple:T.bool,children:T.node,classes:T.object,className:T.string,component:ah,disabled:T.bool,disableRipple:T.bool,disableTouchRipple:T.bool,focusRipple:T.bool,focusVisibleClassName:T.string,href:T.any,LinkComponent:T.elementType,onBlur:T.func,onClick:T.func,onContextMenu:T.func,onDragLeave:T.func,onFocus:T.func,onFocusVisible:T.func,onKeyDown:T.func,onKeyUp:T.func,onMouseDown:T.func,onMouseLeave:T.func,onMouseUp:T.func,onTouchEnd:T.func,onTouchMove:T.func,onTouchStart:T.func,sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object]),tabIndex:T.number,TouchRippleProps:T.object,touchRippleRef:T.oneOfType([T.func,T.shape({current:T.shape({pulsate:T.func.isRequired,start:T.func.isRequired,stop:T.func.isRequired})})]),type:T.oneOfType([T.oneOf(["button","reset","submit"]),T.string])});function Ah(e){return hr("MuiCircularProgress",e)}$r("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Gt=44,Pa=dr.keyframes`
149
149
  0% {
150
150
  transform: rotate(0deg);
151
151
  }
@@ -153,7 +153,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
153
153
  100% {
154
154
  transform: rotate(360deg);
155
155
  }
156
- `,Ra=fr.keyframes`
156
+ `,$a=dr.keyframes`
157
157
  0% {
158
158
  stroke-dasharray: 1px, 200px;
159
159
  stroke-dashoffset: 0;
@@ -168,16 +168,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
168
168
  stroke-dasharray: 1px, 200px;
169
169
  stroke-dashoffset: -126px;
170
170
  }
171
- `,jh=typeof _a!="string"?fr.css`
172
- animation: ${_a} 1.4s linear infinite;
173
- `:null,Fh=typeof Ra!="string"?fr.css`
174
- animation: ${Ra} 1.4s ease-in-out infinite;
175
- `:null,Ah=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${De(n)}`],svg:["svg"],circle:["circle",`circle${De(r)}`,i&&"circleDisableShrink"]};return un(a,Th,t)},Oh=yt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${De(r.color)}`]]}})(Pr(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:jh||{animation:`${_a} 1.4s linear infinite`}},...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),_h=yt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),Rh=yt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${De(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(Pr(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:Fh||{animation:`${Ra} 1.4s ease-in-out infinite`}}]}))),ac=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:s=!1,size:o=40,style:c,thickness:p=3.6,value:d=0,variant:f="indeterminate",...u}=n,x={...n,color:a,disableShrink:s,size:o,thickness:p,value:d,variant:f},E=Ah(x),m={},S={},v={};if(f==="determinate"){const j=2*Math.PI*((Qt-p)/2);m.strokeDasharray=j.toFixed(3),v["aria-valuenow"]=Math.round(d),m.strokeDashoffset=`${((100-d)/100*j).toFixed(3)}px`,S.transform="rotate(-90deg)"}return l.jsx(Oh,{className:it(E.root,i),style:{width:o,height:o,...S,...c},ownerState:x,ref:r,role:"progressbar",...v,...u,children:l.jsx(_h,{className:E.svg,ownerState:x,viewBox:`${Qt/2} ${Qt/2} ${Qt} ${Qt}`,children:l.jsx(Rh,{className:E.circle,style:m,ownerState:x,cx:Qt,cy:Qt,r:(Qt-p)/2,fill:"none",strokeWidth:p})})})});process.env.NODE_ENV!=="production"&&(ac.propTypes={classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","primary","secondary","error","info","success","warning"]),k.string]),disableShrink:is(k.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:k.oneOfType([k.number,k.string]),style:k.object,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),thickness:k.number,value:k.number,variant:k.oneOf(["determinate","indeterminate"])});function $h(e){return mr("MuiIconButton",e)}const Fo=Dr("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Ph=e=>{const{classes:t,disabled:r,color:n,edge:i,size:a,loading:s}=e,o={root:["root",s&&"loading",r&&"disabled",n!=="default"&&`color${De(n)}`,i&&`edge${De(i)}`,`size${De(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return un(o,$h,t)},Dh=yt(ic,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${De(r.color)}`],r.edge&&t[`edge${De(r.edge)}`],t[`size${De(r.size)}`]]}})(Pr(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Et(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Pr(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Et((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Fo.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Fo.loading}`]:{color:"transparent"}}))),Ih=yt("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Gn=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:s,color:o="default",disabled:c=!1,disableFocusRipple:p=!1,size:d="medium",id:f,loading:u=null,loadingIndicator:x,...E}=n,m=Xf(f),S=x??l.jsx(ac,{"aria-labelledby":m,color:"inherit",size:16}),v={...n,edge:i,color:o,disabled:c,disableFocusRipple:p,loading:u,loadingIndicator:S,size:d},j=Ph(v);return l.jsxs(Dh,{id:u?m:f,className:it(j.root,s),centerRipple:!0,focusRipple:!p,disabled:c||u,ref:r,...E,ownerState:v,children:[typeof u=="boolean"&&l.jsx("span",{className:j.loadingWrapper,style:{display:"contents"},children:l.jsx(Ih,{className:j.loadingIndicator,ownerState:v,children:u&&S})}),a]})});process.env.NODE_ENV!=="production"&&(Gn.propTypes={children:is(k.node,e=>ae.Children.toArray(e.children).some(r=>ae.isValidElement(r)&&r.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
176
- `)):null),classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),k.string]),disabled:k.bool,disableFocusRipple:k.bool,disableRipple:k.bool,edge:k.oneOf(["end","start",!1]),id:k.string,loading:k.bool,loadingIndicator:k.node,size:k.oneOfType([k.oneOf(["small","medium","large"]),k.string]),sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object])});const Ao=pt(l.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),Oo=pt(l.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),Mh=pt(l.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),ls=pt(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),pi=pt(l.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),zh=pt(l.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),ee={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},_o=e=>{const t=e.replace("#",""),r=parseInt(t.length===3?t.split("").map(n=>n+n).join(""):t,16);return{r:r>>16&255,g:r>>8&255,b:r&255}},Bh=(e,t,r)=>"#"+[e,t,r].map(n=>{const i=Math.round(Math.min(255,Math.max(0,n))).toString(16);return i.length===1?"0"+i:i}).join(""),Lt=(e,t,r)=>{const n=_o(e),i=_o(t);return Bh(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},cs=e=>{const t="#FFFFFF",r="#000000";return{50:Lt(t,e,.08),100:Lt(t,e,.16),200:Lt(t,e,.28),300:Lt(t,e,.4),400:Lt(t,e,.55),500:e,600:Lt(e,r,.1),700:Lt(e,r,.2),800:Lt(e,r,.3),900:Lt(e,r,.42)}},Vh=cs(ee.primary.main),Nh=cs(ee.secondary.main),Ze=cs(ee.text.primary),Lh={primary:ee.primary.main,secondary:ee.secondary.main,textPrimary:ee.text.primary,textSecondary:ee.text.secondary,divider:ee.divider,background:ee.background},vt=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:c="6px",endorsementHeight:p=28,endorsementPaddingX:d="8px",...f})=>{var m,S;const u=!!r,x=a?l.jsx(g.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:p,paddingLeft:d,paddingRight:d,borderRadius:c,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,E={...f.InputProps,endAdornment:x||i?l.jsxs(g.InputAdornment,{sx:{mr:-1},position:"end",children:[x||i,(m=f.InputProps)==null?void 0:m.endAdornment]}):(S=f.InputProps)==null?void 0:S.endAdornment};return l.jsxs(g.Box,{children:[u&&l.jsx(g.Typography,{variant:n,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:r}),l.jsx(g.TextField,{fullWidth:!0,size:"small",...f,InputProps:E,label:u?void 0:f.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:ee.background.paper,borderRadius:"8px","& fieldset":{borderColor:ee.divider},"&:hover fieldset":{borderColor:Ze[300]},"&.Mui-focused fieldset":{borderColor:Ze[400]},"&.Mui-error fieldset":{borderColor:ee.error.main}},"& .MuiInputBase-input":{color:ee.text.primary},"& .MuiFormLabel-root":{color:ee.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:ee.text.primary},"& .MuiFormHelperText-root":{color:e?ee.error.main:ee.text.secondary},...t}})]})},$i=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:c,sx:p,...d})=>{const f=$.useId(),u=c==null||c===""||Array.isArray(c)&&c.length===0,x=E=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...E,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:ee.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(g.FormControl,{fullWidth:!0,size:a,error:!!d.error,variant:"outlined",children:[e&&l.jsx(g.Typography,{variant:s,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(g.InputLabel,{id:f,shrink:!u||!!o,sx:{color:ee.text.secondary,"&.Mui-focused":{color:ee.text.primary},"&.Mui-error":{color:ee.error.main}},children:t}),l.jsx(g.Select,{...d,value:c,labelId:t?f:void 0,label:t,displayEmpty:!0,input:l.jsx(g.OutlinedInput,{label:t}),IconComponent:x,renderValue:E=>{const m=E;if(u)return l.jsx("span",{style:{color:ee.text.secondary},children:o??""});const S=r.find(v=>v.value===m);return(S==null?void 0:S.label)??String(m)},endAdornment:n?l.jsx(g.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${ee.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:ee.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:ee.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:ee.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:Ze[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:Ze[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:ee.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...p},children:n?l.jsx(g.MenuItem,{disabled:!0,children:l.jsx(g.CircularProgress,{size:16})}):r.map(E=>l.jsx(g.MenuItem,{value:E.value,sx:{backgroundColor:ee.background.paper,color:ee.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:Ze[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:Ze[50],borderRadius:"4px"}},children:E.label},E.value))}),i&&l.jsx(g.FormHelperText,{children:i})]})},qh=e=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:ee.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),sc=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:c="subtitle2",disabled:p,loading:d,error:f,helperText:u,onOpen:x,noOptionsText:E,sx:m})=>l.jsxs(g.Box,{children:[a&&l.jsx(g.Typography,{variant:c,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:a}),l.jsx(g.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:l.jsx(qh,{}),disabled:p,loading:d,onOpen:x,noOptionsText:E,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${ee.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:ee.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:ee.divider},"&:hover fieldset":{borderColor:Ze[300]},"&.Mui-focused fieldset":{borderColor:Ze[400]},"&.Mui-error fieldset":{borderColor:ee.error.main}},"& .MuiInputBase-input":{color:ee.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:ee.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...m},getOptionLabel:S=>typeof S=="string"?S:(S==null?void 0:S.label)??"",isOptionEqualToValue:(S,v)=>((S==null?void 0:S.value)??S)===((v==null?void 0:v.value)??v),renderOption:(S,v,{selected:j})=>{const{key:D,...F}=S;return l.jsxs(g.Box,{component:"li",...F,sx:{backgroundColor:ee.background.paper,color:ee.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:Ze[50]},"&.Mui-focused":{backgroundColor:Ze[50]},...j?{backgroundColor:Ze[50]}:{}},children:[n&&l.jsx(g.Checkbox,{checked:j}),l.jsx(g.Typography,{variant:"body2",sx:{color:ee.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]},D)},renderInput:S=>l.jsx(g.TextField,{...S,label:i,placeholder:s,size:"small",error:f,helperText:u,InputLabelProps:{shrink:!!r||!!s,sx:{color:ee.text.secondary,"&.Mui-focused":{color:ee.text.primary},"&.Mui-error":{color:ee.error.main}}},InputProps:{...S.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[d?l.jsx(g.CircularProgress,{size:20}):null,S.InputProps.endAdornment]})}}),onChange:(S,v)=>o(v)})]}),Ht=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),oc=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:p,groupPadding:d=1.5,itemGap:f=1,disabled:u=!1})=>{const x=typeof i=="number"&&i>0,E=x?i:12,m=i===!0,S=i===!1&&!x,v=(j,D)=>{const F=Array.isArray(r)?[...r]:[];D?F.includes(j)||a([...F,j]):a(F.filter(C=>C!==j))};return l.jsxs(g.FormControl,{error:p,disabled:u,sx:j=>{var D;return{display:"flex",flexDirection:"column",px:j.spacing(d),borderRadius:((D=j.shape)==null?void 0:D.borderRadius)||8,mx:-2.5,backgroundColor:j.palette.background.paper}},children:[s==="top"&&e&&l.jsx(g.Typography,{variant:o,sx:j=>({color:j.palette.text.primary,mb:.5,fontSize:j.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(g.FormLabel,{sx:j=>({color:j.palette.text.secondary,mb:.5,mx:1,fontSize:j.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:j.palette.text.primary},"&.Mui-error":{color:j.palette.error.main}}),children:t}),x&&l.jsx(g.Box,{sx:j=>({display:"grid",gridTemplateColumns:`repeat(${E}, 1fr)`,gap:j.spacing(f),mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),m&&l.jsx(g.Box,{sx:j=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:j.spacing(f),alignItems:"center",mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),S&&l.jsx(g.Box,{sx:j=>({display:"flex",flexDirection:"column",gap:j.spacing(f),alignItems:"flex-start",mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),c&&l.jsx(g.FormHelperText,{sx:{mt:.5},children:c})]})},di=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(g.FormControlLabel,{control:l.jsx(g.Switch,{checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),Sr=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:p,groupPadding:d=1.5,itemGap:f=1})=>l.jsxs(g.FormControl,{error:p,sx:u=>{var x;return{display:"flex",flexDirection:"column",px:u.spacing(d),borderRadius:((x=u.shape)==null?void 0:x.borderRadius)||8,mx:-2.5,backgroundColor:u.palette.background.paper}},children:[s==="top"&&e&&l.jsx(g.Typography,{variant:o,sx:u=>({color:u.palette.text.primary,mb:.5,fontSize:u.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(g.FormLabel,{sx:u=>({color:u.palette.text.secondary,mb:.5,mx:1,fontSize:u.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:u.palette.text.primary},"&.Mui-error":{color:u.palette.error.main}}),children:t}),l.jsx(g.RadioGroup,{row:i,value:r,onChange:u=>a(u.target.value),sx:u=>({display:"flex",flexDirection:i?"row":"column",gap:u.spacing(f),alignItems:i?"center":"flex-start"}),children:n.map(u=>l.jsx(g.FormControlLabel,{value:u.value,control:l.jsx(g.Radio,{size:"small",sx:x=>({color:x.palette.text.secondary,"&.Mui-checked":{color:x.palette.primary.main}})}),label:l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(g.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:u.label}),u.description&&l.jsx(g.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:u.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(u.value)))}),c&&l.jsx(g.FormHelperText,{sx:{mt:.5},children:c})]}),us=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>l.jsxs(g.Box,{children:[e==="top"&&r&&l.jsx(g.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),l.jsx(g.TextField,{fullWidth:!0,type:"date",size:"small",label:e==="inner"?r:void 0,InputLabelProps:{shrink:!0},...i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...n}})]}),lc=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return l.jsxs(g.Box,{children:[s&&l.jsx(g.Typography,{variant:t,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:e}),l.jsx(g.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:ee.background.paper,borderRadius:"8px","& fieldset":{borderColor:ee.divider},"&:hover fieldset":{borderColor:Ze[300]},"&.Mui-focused fieldset":{borderColor:Ze[400]},"&.Mui-error fieldset":{borderColor:ee.error.main}},"& .MuiInputBase-input":{color:ee.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:ee.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:ee.text.primary},"& .MuiFormHelperText-root":{color:r?ee.error.main:ee.text.secondary},...n}})]})},cc=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>l.jsxs(g.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&l.jsx(g.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:16,fontWeight:500,lineHeight:1.3}),children:e}),t&&l.jsx(g.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:500}),children:t})]}),r&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),xn=pt(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),uc=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:l.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_5814_24904",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function pc({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:c=!0,renderItem:p,chipText:d,helperText:f,emptyStateText:u,emptyStateButtonText:x="Add Phase",onEmptyStateButtonClick:E,emptyStateSx:m}){const[S,v]=$.useState(null),[j,D]=$.useState(null),F=h=>B=>{if(!i){v(h),B.dataTransfer.effectAllowed="move";try{B.dataTransfer.setData("text/plain",String(t(e[h])))}catch{}}},C=h=>B=>{i||(B.preventDefault(),D(h),B.dataTransfer.dropEffect="move")},_=h=>B=>{if(i)return;if(B.preventDefault(),S===null||S===h){v(null),D(null);return}const q=[...e],[Z]=q.splice(S,1);q.splice(h,0,Z),v(null),D(null),r(q)},I=()=>{v(null),D(null)},R=e.length===0,Y=R&&(u||E!==void 0);return l.jsxs(g.Box,{role:"list",sx:h=>({display:"flex",flexDirection:"column",gap:h.spacing(1),...a}),children:[n,!R&&l.jsx(g.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),Y?l.jsxs(g.Box,{sx:h=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:h.spacing(4),backgroundColor:h.palette.mode==="dark"?"#000000":ee.background.paper,border:`2px dashed ${h.palette.mode==="dark"?"#FFFFFF":ee.divider}`,borderRadius:"8px",textAlign:"center",...m}),children:[u&&l.jsx(g.Typography,{variant:"body1",sx:h=>({color:h.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:E?2:0,maxWidth:"400px"}),children:u}),E&&l.jsx(g.Button,{variant:"outlined",startIcon:l.jsx(xn,{}),onClick:E,disabled:i,sx:h=>({mt:u?0:2,backgroundColor:h.palette.mode==="dark"?`${h.palette.primary.main}1A`:`${h.palette.primary.main}0D`,borderColor:h.palette.primary.main,color:h.palette.primary.main,"&:hover":{backgroundColor:h.palette.mode==="dark"?`${h.palette.primary.main}33`:`${h.palette.primary.main}1A`,borderColor:h.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:x})]}):e.map((h,B)=>{const q=S===B,Z=j===B&&S!==null&&S!==B;return l.jsx(g.Box,{role:"listitem",draggable:!i,onDragStart:F(B),onDragOver:C(B),onDrop:_(B),onDragEnd:I,sx:L=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${Z?L.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:L.spacing(1),opacity:q?.6:1,boxShadow:Z?`0 0 0 2px ${L.palette.primary.main}33`:"none"}),children:p?p(h,q):l.jsxs(g.Box,{sx:L=>({display:"flex",alignItems:"center",gap:L.spacing(1),minWidth:0}),children:[c&&l.jsx(uc,{}),o&&l.jsxs(g.Typography,{variant:"body2",sx:L=>({fontWeight:600,fontSize:14,color:`${L.palette.text.primary}`,flex:"0 0 auto"}),children:[B+1,"."]}),(()=>{const L=typeof d=="function"?d(h,B):d;return L?l.jsx(g.Chip,{label:L,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(g.Typography,{variant:"body2",sx:L=>({fontSize:12,fontWeight:500,color:`${L.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(h):""})]})},String(t(h)))}),!R&&f?typeof f=="string"?l.jsx(g.Typography,{variant:"caption",sx:h=>({color:`${h.palette.text.primary}60`}),children:f}):f:null]})}const Wh=yt(g.StepConnector)(({theme:e})=>{const t=e.palette.divider||"#E8E8E8",r=e.palette.primary.main;return{[`&.${g.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${g.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:t,transition:"border-color 0.3s ease"},[`&.${g.stepConnectorClasses.completed} .${g.stepConnectorClasses.line}`]:{borderColor:r}}}),Uh=({items:e,activeIndex:t=1,onStepClick:r,sx:n,completedSteps:i})=>{const a=_f(),s=a.palette.primary.main,o=a.palette.text.primary,c=a.palette.divider,p=a.palette.action&&a.palette.action.disabledBackground||"#E8E8E8",d=f=>{const{active:u,completed:x,icon:E}=f;return x?l.jsx(g.Box,{sx:{width:24,height:24,border:`1.2px solid ${s}`,borderRadius:"50%",backgroundColor:s,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(ls,{sx:{fontSize:16,fontWeight:600}})}):u?l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${s}`,backgroundColor:Et(s,.2),color:s,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:E}):l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:p,color:o,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:E})};return l.jsx(g.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Wh,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:o,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((f,u)=>{const x=Array.isArray(i)&&i.length>0?i.includes(u):u<t;return l.jsxs(g.Step,{onClick:()=>r==null?void 0:r(u),completed:x,children:[l.jsx(g.StepLabel,{StepIconComponent:d,children:l.jsx(g.Typography,{sx:{fontSize:12,fontWeight:500,color:u===t?s:o},children:f.label})}),u!==e.length-1&&l.jsx(g.Divider,{sx:{ml:4.2,borderColor:c}})]},u)})})},ps=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>l.jsx(g.Chip,{...s,sx:o=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${Et(t||o.palette.text.primary,.5)}`,backgroundColor:Et(t||o.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||o.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Hh=yt(g.StepConnector)(()=>({[`&.${g.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${g.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${g.stepConnectorClasses.completed} .${g.stepConnectorClasses.line}`]:{borderColor:ee.primary.main}})),Kh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=$.useState(null),s=o=>{const{active:c,completed:p,icon:d}=o;return p?l.jsx(g.Box,{sx:{width:24,height:24,border:`1.2px solid ${ee.primary.main}`,borderRadius:"50%",backgroundColor:ee.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(ls,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${ee.primary.main}`,backgroundColor:Et(ee.primary.main,.2),color:ee.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:d}):l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:ee.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:d})};return l.jsx(g.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Hh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:ee.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,c)=>l.jsxs(g.Step,{onMouseEnter:()=>a(c),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(c),completed:c<t,children:[l.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(g.StepLabel,{StepIconComponent:s,children:[l.jsxs(g.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(g.Typography,{sx:{fontSize:14,fontWeight:500,color:c===t?ee.primary.main:ee.text.primary},children:o.label}),l.jsx(ps,{size:"small",colorHex:c<t?ee.success.main:c===t?"#973B00":ee.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(g.Typography,{sx:{fontSize:12,fontWeight:400,color:`${ee.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===c&&l.jsx(g.Button,{sx:{display:c>t?"none":"block"},variant:c<t?"outlined":"contained",size:"small",color:"primary",children:c<t?"Edit":c===t?"Complete":""})]}),c!==e.length-1&&l.jsx(g.Divider,{sx:{ml:4.2,borderColor:ee.divider}})]},c))})},Yh=pt(l.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Gh=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const c=s||ee.info.main,p=Et(c,.08),d=Et(c,.08),f=a??l.jsx(Yh,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(g.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${d}`,boxShadow:"none",...o},children:[l.jsx(g.Box,{sx:{display:"flex",alignItems:"center"},children:f}),l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})]}):e==="inline"?l.jsx(g.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${d}`,boxShadow:"none",...o},children:l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})}):e==="listWithHeader"?l.jsxs(g.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:p,border:`1px solid ${d}`,...o},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[f,l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),r&&l.jsx(g.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:r}),l.jsx(g.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:c,my:-.5}},children:i.map((u,x)=>l.jsx(g.ListItem,{sx:{py:0},children:l.jsx(g.ListItemText,{primary:u})},x))})]}):l.jsx(g.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:p,border:`0.5px solid ${d}`,boxShadow:"none",...o},children:l.jsx(g.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:c,my:-.5}},children:i.map((u,x)=>l.jsx(g.ListItem,{sx:{py:0},children:l.jsx(g.ListItemText,{primary:u})},x))})})},dc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>l.jsxs(g.Box,{children:[l.jsx(g.Tabs,{value:e,onChange:(s,o)=>t(o),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return l.jsx(g.Tab,{value:c,disabled:s.disabled,label:l.jsx(g.Typography,{variant:"body2",children:s.label}),sx:p=>({px:2,textTransform:"none",color:p.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:p.palette.action.hover},"&.Mui-selected":{color:p.palette.common.white,borderColor:p.palette.primary.main,backgroundColor:p.palette.primary.main,fontWeight:600},...a})},String(c))})}),r.map((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o,p=s.content??(typeof s.value=="object"?s.value:null);return p&&e===c?l.jsx(g.Box,{sx:{mt:1},children:p},`panel-${c}`):null})]}),Qh=pt(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),fc=({name:e,columns:t,initialRow:r,addLabel:n,maxRows:i,hideAddWhenMax:a,disableAddWhenMax:s=!0,showEmptyState:o=!0,rowDeletable:c=!0,control:p,sx:d,addActions:f,emptyTitle:u="No items configured",emptySubtitle:x="Click 'Add' to get started.",emptyCardSx:E,setValue:m,rowSelectionMode:S,rowSelectionKey:v})=>{const{fields:j,append:D,remove:F}=gu({control:p,name:e}),_=!(typeof i=="number"?j.length>=i:!1),I=$.useMemo(()=>{if(v)return v;const H=t.find(G=>G.type==="rowSelect");return H==null?void 0:H.key},[t,v]),R=hl({control:p,name:e})||[],Y=$.useMemo(()=>{if(!I)return{};const H={};return R.forEach((G,ne)=>{H[ne]=!!(G!=null&&G[I])}),H},[R,I]),h=$.useCallback(H=>Y[H]===!0,[Y]),B=$.useCallback((H,G)=>{if(!m||!I)return;const ne=`${e}.${H}.${I}`;S==="single"&&G&&R.forEach((ue,P)=>{if(P!==H){const U=`${e}.${P}.${I}`;m(U,!1,{shouldDirty:!0})}}),m(ne,G,{shouldDirty:!0})},[e,I,S,m,R]),q=H=>{const G={...H||r};t.forEach(ne=>{ne.value!==void 0&&G[ne.key]===void 0&&(G[ne.key]=typeof ne.value=="function"?ne.value(G,j.length):ne.value)}),D(G)};$.useEffect(()=>{!o&&j.length===0&&_&&q()},[o,j.length,_]);const Z=$.useMemo(()=>t.reduce((G,ne)=>{if(ne.width==="auto"||ne.width===void 0)return G+120;const ue=typeof ne.width=="number"?ne.width:typeof ne.width=="string"&&parseInt(ne.width)||160;return G+ue},0)+(c?100:0),[t,c]),L=H=>H.width==="auto"||H.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof H.width=="number"?{width:`${H.width}px`,minWidth:`${H.width}px`,maxWidth:`${H.width}px`}:typeof H.width=="string"?{width:H.width,minWidth:H.width}:{width:"160px",minWidth:"160px"};return l.jsx(g.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"visible",...d},children:j.length===0&&o?l.jsxs(g.Box,{sx:H=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:Et(H.palette.primary.main,.4),backgroundColor:Et(H.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...E}),children:[l.jsx(g.Typography,{variant:"subtitle1",sx:H=>({color:H.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:u}),l.jsx(g.Typography,{variant:"body2",sx:H=>({color:H.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:x}),Array.isArray(f)&&f.length>0?f.map((H,G)=>l.jsx(g.Button,{variant:"outlined",size:"small",startIcon:l.jsx(xn,{}),sx:{mr:1,mt:1},onClick:()=>q(H.template),disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:H.label},`empty-add-${G}`)):n&&l.jsx(g.Button,{variant:"outlined",size:"small",startIcon:l.jsx(xn,{}),onClick:()=>q(),disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:n})]}):l.jsxs(l.Fragment,{children:[l.jsx(g.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(f)&&f.length>0?f.map((H,G)=>l.jsx(g.Button,{variant:G===0?"contained":"outlined",size:"small",startIcon:l.jsx(xn,{}),onClick:()=>q(H.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:G===0?"#04502d":void 0}},disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:H.label},`add-${G}`)):n&&l.jsx(g.Button,{variant:"contained",size:"small",startIcon:l.jsx(xn,{}),onClick:()=>q(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:n})}),l.jsx(g.Box,{sx:{width:"100%",overflowX:"auto",overflowY:"auto",maxHeight:"600px","&::-webkit-scrollbar":{height:"8px",width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px","&:hover":{backgroundColor:"#555"}}},children:l.jsx(g.TableContainer,{sx:{width:"100%",minWidth:"100%"},children:l.jsxs(g.Table,{stickyHeader:!0,sx:{minWidth:`${Z||650}px`},children:[l.jsx(g.TableHead,{children:l.jsxs(g.TableRow,{children:[t.map(H=>l.jsx(g.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,...L(H)},children:H.header},H.key)),c&&l.jsx(g.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,width:100,textAlign:"center"},children:"Actions"})]})}),l.jsx(g.TableBody,{children:j.map((H,G)=>{const ne=h(G),ue=S&&!ne;return l.jsxs(g.TableRow,{children:[t.map(P=>{var de;const U=`${e}.${G}.${P.key}`,X=P.type==="rowSelect"||P.key===I,pe=X?!1:ue?!0:typeof P.disabled=="function"?P.disabled(H,G):!!P.disabled;if(P.type==="index"){const re=P.indexFormat?P.indexFormat(G):`#${G+1}`;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((de=P.cellSx)==null?void 0:de.textAlign)||"center",...L(P),...P.cellSx},children:re},P.key)}if(P.value!==void 0&&P.editable===!1){const re=typeof P.value=="function"?P.value(H,G):P.value;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...L(P),...P.cellSx},children:re},P.key)}const he=P.endorsementText?typeof P.endorsementText=="function"?P.endorsementText(H,G):P.endorsementText:void 0;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...L(P),...P.cellSx},children:P.type==="rowSelect"||X&&P.type==="checkbox"?l.jsx(Re,{name:U,control:p,defaultValue:!1,render:({field:re})=>l.jsx(Ht,{label:"",checked:!!re.value,disabled:!1,onChange:W=>{re.onChange(W),B(G,W)},sx:P.sx})}):P.type==="checkbox"?l.jsx(Re,{name:U,control:p,render:({field:re})=>l.jsx(Ht,{label:"",checked:!!re.value,disabled:pe,onChange:re.onChange,sx:P.sx})}):P.type==="select"?l.jsx(Re,{name:U,control:p,render:({field:re})=>l.jsx($i,{...re,fullWidth:!0,disabled:pe,options:P.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...P.sx},helperText:P.helperText,required:P.required})}):P.type==="date"?l.jsx(Re,{name:U,control:p,defaultValue:P.value!==void 0?typeof P.value=="function"?P.value(H,G):P.value:void 0,render:({field:re})=>($.useEffect(()=>{if(m&&(re.value===void 0||re.value===null||re.value==="")&&P.value!==void 0){const W=typeof P.value=="function"?P.value(H,G):P.value;m(U,W,{shouldValidate:!1})}},[U,re.value,P.value,H,G,m]),l.jsx(us,{...re,fullWidth:!0,disabled:pe,size:"small",placeholder:P.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...P.sx},helperText:P.helperText,required:P.required}))}):l.jsx(Re,{name:U,control:p,defaultValue:P.value!==void 0?typeof P.value=="function"?P.value(H,G):P.value:void 0,render:({field:re})=>($.useEffect(()=>{if(m&&(re.value===void 0||re.value===null||re.value==="")&&P.value!==void 0){const W=typeof P.value=="function"?P.value(H,G):P.value;m(U,W,{shouldValidate:!1})}},[U,re.value,P.value,H,G,m]),l.jsx(vt,{...re,fullWidth:!0,type:P.type==="number"?"number":"text",placeholder:P.placeholder,disabled:pe,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...P.sx},helperText:P.helperText,required:P.required,endorsementText:he,endorsementBg:P.endorsementBg,endorsementColor:P.endorsementColor,endorsementRadius:P.endorsementRadius,endorsementHeight:P.endorsementHeight,endorsementPaddingX:P.endorsementPaddingX,inputProps:{...P.type==="number"?{min:P.min,max:P.max,step:P.step}:{minLength:P.minLength,maxLength:P.maxLength,pattern:P.pattern}}}))})},P.key)}),c&&l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(g.IconButton,{size:"small",color:"error",onClick:()=>F(G),sx:{width:"20px",height:"20px"},children:l.jsx(Qh,{sx:{fontSize:"20px"}})})})]},H.id)})})]})})})]})})},hc=({name:e,control:t,items:r,sx:n,cardSx:i})=>l.jsx(g.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,c=!!(a.header||a.chipText),p=a.leftAction,d=a.rightAction;return l.jsxs(g.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[s&&p&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Re,{name:p.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(Ht,{label:p.label||"",checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),c&&l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&l.jsx(g.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.jsx(g.Box,{sx:{bgcolor:"rgba(26,26,26,0.1)",px:1.5,py:.375,borderRadius:"4px",fontSize:"12px",color:"rgba(26,26,26,0.8)"},children:a.chipText})]}),o&&d&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Re,{name:d.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(di,{label:d.label,checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),!s&&!o&&!c&&l.jsx(g.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),mc=pt(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),ta=pt(l.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),Zh=[{label:"Interest-only",value:"interest-only"},{label:"Principal moratorium",value:"principal-moratorium"},{label:"EMI",value:"emi"},{label:"Equal-principal",value:"equal-principal"},{label:"Balloon",value:"balloon"},{label:"Bullet",value:"bullet"},{label:"Step-up/Down",value:"step-up-down"},{label:"Seasonal skips",value:"seasonal-skips"},{label:"Custom fixed installment",value:"custom-fixed"},{label:"Full payment holiday (no billing)",value:"payment-holiday"}],ra=[{label:"Accrue & capitalize at end of phase",value:"accrue-capitalize"},{label:"Accrue & bill in first period after phase",value:"accrue-bill-next"},{label:"Accrue & forgive at phase end",value:"accrue-forgive"}],Xh=({phase:e,index:t,onUpdate:r,onDelete:n,months:i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],disabled:a=!1,sx:s})=>{const[o,c]=$.useState(e.seasonalMonths||[]),p=u=>{const x=o.includes(u)?o.filter(E=>E!==u):[...o,u];c(x),r(e.id,{seasonalMonths:x})},d=(()=>{const u=e.min||0;return u<0?"Min cannot be negative.":Number.isInteger(u)?null:"Use whole periods."})(),f=(()=>{const u=e.min||0,x=e.max||0;return Number.isInteger(x)?x<u?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(g.Card,{sx:{border:"2px solid",borderColor:ee.divider,position:"relative",...s},children:l.jsxs(g.CardContent,{sx:{p:2},children:[l.jsxs(g.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(g.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(g.Box,{children:l.jsx(uc,{})}),l.jsx(ps,{label:t+1,size:"small"})]}),l.jsx(g.IconButton,{onClick:()=>n(e.id),disabled:a,sx:{color:ee.error.main,"&:hover":{bgcolor:Ze[50]}},size:"small",children:l.jsx(mc,{fontSize:"small"})})]}),l.jsx(g.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(g.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(g.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(g.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx($i,{labelText:"Phase type",value:e.type,onChange:u=>r(e.id,{type:u.target.value}),options:Zh,disabled:a})}),l.jsxs(g.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(g.Typography,{variant:"caption",sx:{fontSize:"12px",color:ee.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(vt,{type:"number",value:e.priority||5,onChange:u=>{const x=parseInt(u.target.value)||5;r(e.id,{priority:Math.min(9,Math.max(1,x))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(g.Box,{sx:{display:"grid",gap:1},children:l.jsx(vt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:u=>{const x=parseInt(u.target.value)||0;r(e.id,{min:x,...e.lockLength?{max:x}:{}})},inputProps:{min:0},disabled:a,error:!!d,helperText:d||void 0})}),l.jsx(g.Box,{sx:{display:"grid",gap:1},children:l.jsx(vt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:u=>r(e.id,{max:parseInt(u.target.value)||0}),inputProps:{min:0},disabled:a||e.lockLength,error:!!f&&!e.lockLength,helperText:e.lockLength?"Locked to Min":f||void 0,sx:e.lockLength?{opacity:.5}:{}})})]}),l.jsxs(g.Box,{sx:{display:"flex",gap:3},children:[l.jsx(Ht,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:u=>r(e.id,{lockLength:u,...u?{max:e.min}:{}}),disabled:a}),l.jsx(Ht,{label:"Residual fill",checked:e.residualFill||!1,onChange:u=>r(e.id,{residualFill:u}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:ee.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(Sr,{value:e.balloonType||"percent",onChange:u=>r(e.id,{balloonType:u}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(vt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:u=>r(e.id,{balloonAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(vt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:u=>r(e.id,{balloonPercent:parseFloat(u.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(vt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:u=>r(e.id,{stepPercent:parseFloat(u.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(vt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:u=>r(e.id,{stepEveryN:parseInt(u.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(g.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(u=>l.jsx(g.Chip,{label:u,size:"small",onClick:()=>!a&&p(u),sx:{cursor:a?"default":"pointer",bgcolor:o.includes(u)?ee.primary.main:"transparent",color:o.includes(u)?ee.primary.contrastText:ee.text.primary,border:`1px solid ${ee.divider}`,"&:hover":{bgcolor:o.includes(u)?Ze[600]:Ze[50]}}},u))})]}),l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:ee.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(vt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:u=>r(e.id,{customAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:ee.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:u=>r(e.id,{holidayInterestTreatment:u}),options:ra,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};async function gc(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:c={},params:p={},body:d,transform:f,passThroughFields:u}=e;let x=i;if(t&&!i.startsWith("http")&&(x=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const F=/\{([^}]+)\}/g;x=x.replace(F,(C,_)=>{const I=n[_];return I!=null?encodeURIComponent(String(I)):""}),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const E=new URLSearchParams;Object.entries(p).forEach(([F,C])=>{C!=null&&E.append(F,String(C))}),E.toString()&&(x+=`${x.includes("?")?"&":"?"}${E.toString()}`);try{const F=/^https?:\/\//i.test(x),C=new URL(x,F?void 0:"http://local.placeholder"),_=Array.from(C.searchParams.entries());for(const[I,R]of _)(R===""||R==="undefined"||R==="null")&&C.searchParams.delete(I);F?x=C.toString():x=C.pathname+(C.search?C.search:""),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const m={"Content-Type":"application/json",...r,...c},S={method:a,headers:m};(a==="POST"||a==="PUT")&&d&&(S.body=JSON.stringify(d));const v=await fetch(x,S);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const j=await v.json();if(f)return f(Array.isArray(j)?j:j.data||j);const D=Array.isArray(j)?j:j.data||j;if(!Array.isArray(D))throw new Error("API response is not an array");return D.map(F=>{const C={label:F[o]||F.name||F.title||String(F[s]||""),value:F[s]||F.id||F.value||""},_=Array.isArray(u)?u:void 0;if(Array.isArray(_))for(const I of _)F[I]!==void 0&&(C[I]=F[I]);return C})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function yc(e,t,r,n,i=!1){const a=$.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const o=n[e.dependsOn];return o!==void 0?o:null},[e==null?void 0:e.dependsOn,n]),s=$.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return tp({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return gc(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:o=>Math.min(1e3*2**o,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function xr(e){return!!(e.apiConfig||e.api_endpoint)}function ds(e){return e.apiConfig?e.apiConfig:e.api_endpoint?{endpoint:e.api_endpoint,method:e.api_method||"GET",valueField:e.value_field||"value",labelField:e.label_field||"label",dependsOn:e.depends_on,conditional:e.conditional}:null}function Jh(e,t){const r=ds(e);if(!(r!=null&&r.conditional)&&!e.conditional)return!0;if(r!=null&&r.dependsOn||e.depends_on){const n=(r==null?void 0:r.dependsOn)||e.depends_on;if(n){const i=t[n];return i!=null&&i!==""}}return!0}const fs=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],c=!!o,[p,d]=$.useState(!1),f=$.useRef(!1),[u,x]=$.useState(!1),[E,m]=$.useState(!1),[S,v]=$.useState(!1),j=$.useRef(null),D=$.useRef(null),F=()=>{var se;const W=e.required;if(typeof W=="function")try{return!!W(a||{})}catch{return!1}if(W!==void 0)return!!W;const Q=(se=e.validation)==null?void 0:se.required;if(typeof Q=="function")try{return!!Q(a||{})}catch{return!1}return Q!==void 0?!!Q:!1},C=W=>F()?`${W} *`:W,_=()=>{if(e.value!==void 0){if(typeof e.value=="function")try{return e.value(a||{})}catch{return""}return e.value}return e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:""},I=$.useRef(void 0);$.useEffect(()=>{const W=e.value;if(typeof W!="function"||!s)return;let Q;try{Q=W(a||{})}catch{return}const se=a?a[e.name]:void 0;if(I.current===void 0&&(I.current=Q),se===void 0||se===I.current)try{s(e.name,Q,{shouldValidate:!0,shouldDirty:!1}),I.current=Q}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((W,Q)=>({...W,[Q]:a[Q]}),{}):a||{}),e.name]);const R=$.useMemo(()=>{const W=ds(e);return W&&Array.isArray(e.passThroughFields)&&(W.passThroughFields=e.passThroughFields),W},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),Y=$.useRef(null),h=R!=null&&R.dependsOn?a==null?void 0:a[R.dependsOn]:null;$.useEffect(()=>{R!=null&&R.dependsOn&&(Y.current=h)},[R==null?void 0:R.dependsOn,h]);const B=$.useMemo(()=>{const W=e.showWhen;if(typeof W=="function")try{return!!W(a||{})}catch{return!0}if(W&&typeof W=="object"){const Q=W.field,se=W.equals,le=W.in,ce=Q?(a||{})[Q]:void 0;if(Q&&typeof se<"u")return ce===se;if(Q&&Array.isArray(le))return le.includes(ce)}return!0},[e.showWhen,a]),q=$.useCallback(()=>{const W=e.dynamicEndorsement;if(typeof W=="function")try{return W(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),Z=$.useCallback(()=>{const W=e.endAdornment,Q=e.endAdornmentSwitch,se=e.endAdornmentCheckbox;if(Q)return l.jsx(Re,{name:Q,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:le})=>l.jsx(g.Switch,{checked:le.value||!1,onChange:ce=>{le.onChange(ce.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(ce.target.checked,a,s)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(se)return l.jsx(Re,{name:se,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:le})=>l.jsx(Ht,{label:"",checked:le.value||!1,onChange:le.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof W=="function")try{return W(a||{},{control:t,setValue:s})}catch{return}return W},[e,a,t,s]),L=$.useMemo(()=>p&&xr(e)&&(!(R!=null&&R.dependsOn)||h),[p,e,R==null?void 0:R.dependsOn,h]),H=$.useMemo(()=>{const W={};if(!a)return W;const Q=(R==null?void 0:R.endpoint)||(e==null?void 0:e.api_endpoint);if(Q&&typeof Q=="string"){const se=Q.match(/\{([^}]+)\}/g)||[];for(const le of se){const ce=le.slice(1,-1),be=a[ce];be!==void 0&&(W[ce]=be)}}if(R!=null&&R.dependsOn){const se=R.dependsOn,le=a[se];le!==void 0&&(W[se]=le)}return W},[R==null?void 0:R.endpoint,e==null?void 0:e.api_endpoint,R==null?void 0:R.dependsOn,a]),{data:G=[],isLoading:ne,error:ue}=yc(R,n,i,H,L),P=$.useCallback(()=>{xr(e)&&!f.current&&(f.current=!0,d(!0))},[e]),U=$.useCallback(()=>{xr(e)&&!f.current&&(f.current=!0,d(!0))},[e]);$.useEffect(()=>{if(xr(e)&&!f.current){const W=a==null?void 0:a[e.name];W!=null&&W!==""&&(f.current=!0,d(!0))}},[e,a]),$.useEffect(()=>{xr(e)&&(R!=null&&R.dependsOn)&&(h!=null&&`${h}`!=""?(f.current=!0,d(!0)):(f.current=!1,d(!1)))},[R==null?void 0:R.dependsOn,h]);const X=$.useCallback(W=>{if(typeof W=="function")try{const Q=W(a||{});return X(Q)}catch{return[]}return W?Array.isArray(W)?W.map(Q=>{if(Q&&typeof Q=="object"){const se=Q.value??Q.id??Q.key??void 0,le=Q.label??Q.name??Q.title??(se!==void 0?String(se):"");return{label:String(le??""),value:String(se??le??"")}}return{label:String(Q),value:String(Q)}}):typeof W=="object"?Object.keys(W).map(Q=>({value:String(Q),label:String(W[Q])})):[]:[]},[a]),pe=$.useCallback(()=>xr(e)?Array.isArray(G)?G:[]:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?X(e.options):[],[e,G,X]),he=()=>{var W,Q,se,le,ce,be;switch(e.type){case"title":return l.jsx(g.Typography,{variant:e.variant||"h4",component:"h1",color:e.color,align:e.align||"left",sx:{mb:3,fontWeight:600,...e.sx},children:e.label});case"section":return l.jsx(g.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left",sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const J=e.actionName,Ie=e.actionComponent,Ke=e.actionLabel,Xe=T=>l.jsx(cc,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:T??e.actions}),Tt=T=>{if(e.cardWrap){const M={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(g.Card,{sx:M,...e.cardProps,children:T})}return T};return Tt(J&&Ie?l.jsx(Re,{name:J,control:t,defaultValue:e.value??!1,render:({field:T})=>Xe(Ie==="switch"?l.jsx(di,{label:Ke,checked:!!T.value,onChange:T.onChange}):l.jsx(Ht,{label:Ke||"",checked:!!T.value,onChange:T.onChange}))}):Xe());case"tabs":return l.jsx(Re,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((Q=(W=e.items)==null?void 0:W[0])==null?void 0:Q.value)=="string"||typeof((le=(se=e.items)==null?void 0:se[0])==null?void 0:le.value)=="number"?(be=(ce=e.items)==null?void 0:ce[0])==null?void 0:be.value:0),render:({field:T})=>{const y=e.items||[],M=y.map((z,K)=>({label:z.label,value:typeof z.value=="string"||typeof z.value=="number"?z.value:K,content:z.content,disabled:z.disabled})),b=T.value,A=(()=>{if(typeof b=="string"||typeof b=="number"){const z=y.findIndex((K,fe)=>typeof K.value=="string"||typeof K.value=="number"?K.value===b:fe===b);return z>=0?z:0}return Number(b)||0})(),V=y[A]||{};return l.jsxs(g.Box,{children:[l.jsx(dc,{value:T.value,onChange:T.onChange,items:M,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(V.fields)&&V.fields.length>0&&(()=>{const z=V.fields,K=[];let fe=[];for(const ge of z)ge.type==="section"&&fe.length>0?(K.push(fe),fe=[ge]):fe.push(ge);fe.length>0&&K.push(fe);const ye={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1};return l.jsx(g.Box,{sx:{mt:1},children:K.map((ge,Ne)=>{const Oe=ge.find(Me=>Me.type==="section"),at=(Oe==null?void 0:Oe.cardWrap)!==!1,dt=l.jsx(l.Fragment,{children:ge.map(Me=>{const ie=Me.showWhen;if(ie)try{if(typeof ie=="function"){if(!ie(a||{}))return null}else if(typeof ie=="object"){const Yt=ie.field,ys=ie.equals,xs=ie.in,vs=Yt?(a||{})[Yt]:void 0;if(Yt&&typeof ys<"u"&&vs!==ys||Yt&&Array.isArray(xs)&&!xs.includes(vs))return null}}catch{}const Ge=Math.min(Math.max(Me.col??12,1),12);return l.jsx(g.Box,{sx:{gridColumn:`span ${Ge}`},children:l.jsx(fs,{field:Me,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},Me.name)})});return at?l.jsx(g.Card,{sx:{...ye,...(Oe==null?void 0:Oe.cardSx)||{}},...(Oe==null?void 0:Oe.cardProps)||{},children:dt},`tab-group-${Ne}`):l.jsx(g.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:dt},`tab-group-${Ne}`)})})})()]})}});case"grid":const Ye=e.defaultRows||[];return l.jsx(g.Box,{children:l.jsx(Re,{name:e.name,control:t,defaultValue:Ye.length>0?Ye:_()||[],render:()=>l.jsx(fc,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,showEmptyState:e.showEmptyState,maxRows:e.maxRows,hideAddWhenMax:e.hideAddWhenMax,disableAddWhenMax:e.disableAddWhenMax,rowDeletable:e.rowDeletable!==!1,control:t,setValue:s,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey})})});case"listcards":return l.jsx(hc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Re,{name:e.name,control:t,defaultValue:e.items||[],render:({field:T})=>{const y=e,M=T.value||y.items||[],b=typeof y.getId=="function"?y.getId:typeof y.getId=="string"?z=>z[y.getId]:z=>z.id??z._id??z.key??String(z),A=typeof y.getText=="function"?y.getText:typeof y.getText=="string"?z=>z[y.getText]??String(z):z=>z.text??z.label??z.name??z.title??String(z),V=(()=>{if(typeof y.chipText=="function")return y.chipText;if(typeof y.chipText=="string")return M.length>0&&M[0]&&y.chipText in M[0]?(z,K)=>z[y.chipText]??void 0:y.chipText})();return l.jsx(pc,{items:M,getId:b,onReorder:z=>{T.onChange(z)},header:y.header,disabled:e.disabled,sx:y.sx,chipText:V,helperText:y.helperText||(c?o==null?void 0:o.message:void 0),getText:A,showIndex:y.showIndex!==!1,showLeftIcon:y.showLeftIcon!==!1,renderItem:y.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>e.type==="textarea"?l.jsx(lc,{...T,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText}):l.jsx(vt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:Z(),endorsementText:q(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?u?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(ec,{position:"end",children:l.jsx(Gn,{"aria-label":"toggle password visibility",onClick:()=>x(y=>!y),edge:"end",children:u?l.jsx(Oo,{}):l.jsx(Ao,{})})})}:void 0})});case"number":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(vt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:Z(),endorsementText:q(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const We=pe();return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const y=typeof e.disabled=="function"?!!e.disabled(a||{}):!!e.disabled,M=e.disableWhenEmptyOptions===!0&&Array.isArray(We)&&We.length===0,b=y||M||ne,A=T.value,V=(()=>{if(Array.isArray(We)&&We.length>0){const z=We.find(K=>String(K==null?void 0:K.value)===String(A));return z?z.value:A}return A})();return l.jsx($i,{labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?C(e.label):void 0,labelVariant:e.labelVariant,value:V,onChange:T.onChange,options:We,disabled:b,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?C(e.label):void 0):e.placeholder,loading:ne,error:c||!!ue,helperText:(o==null?void 0:o.message)||(ue==null?void 0:ue.message)||e.helperText,onOpen:P})}});case"checkbox":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Ht,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"toggle":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Sr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:!0,onChange:T.onChange})});case"radio":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Sr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange})});case"checkboxGroup":return l.jsx(Re,{name:e.name,control:t,defaultValue:_()||[],render:({field:T})=>l.jsx(oc,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(T.value)?T.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange,disabled:e.disabled})});case"switch":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(di,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"autocomplete":const Ue=pe(),w=!!((typeof e.disabled=="function"?e.disabled(a||{},{options:Ue,isLoading:ne,error:ue}):e.disabled)||e.disableWhenEmptyOptions===!0&&Array.isArray(Ue)&&Ue.length===0||ne||R!=null&&R.dependsOn&&!h);return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const y=T.value,M=e.multiple===!0,b=(R==null?void 0:R.valueField)||e.value_field||"value",A=z=>{if(z!=null){if(typeof z=="string"||typeof z=="number")return z;if(typeof z=="object"){if(z[b]!==void 0)return z[b];if(z.value!==void 0)return z.value;if(z.id!==void 0)return z.id}}},V=(()=>{if(M)return(Array.isArray(y)?y:[]).map(K=>{const fe=String(typeof K=="object"?A(K):K);return Ue.find(ge=>{const Ne=A(ge);return Ne!==void 0&&String(Ne)===fe})||null}).filter(Boolean);{if(y==null||y==="")return null;const z=String(typeof y=="object"?A(y):y),K=Ue.find(fe=>{const ye=A(fe);return ye!==void 0&&String(ye)===z});return K||null}})();return l.jsx(sc,{id:e.id,options:Ue,value:V,multiple:M,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,placeholder:w&&(R!=null&&R.dependsOn)&&!h?`Please select ${R.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:w,loading:ne,error:c||!!ue,helperText:(o==null?void 0:o.message)||(ue==null?void 0:ue.message)||e.helperText||"",onOpen:U,noOptionsText:w&&(R!=null&&R.dependsOn)&&!h?`Please select ${R.dependsOn.replace(/_/g," ")} first`:ne?"Fetching data...":p&&!ne&&Ue.length===0?"No options available":"Click to load options",onChange:z=>{const K=(R==null?void 0:R.valueField)||e.value_field||"value";if(M){const ye=(Array.isArray(z)?z:[]).map(ge=>typeof ge=="object"&&(ge[K]||ge.value||ge.id)||ge);T.onChange(ye)}else{let fe;z&&typeof z=="object"?fe=z[K]||z.value||z.id||z:fe=z,T.onChange(fe);const ye=e.selectedAssignments;if(ye&&z&&typeof z=="object")for(const[ge,Ne]of Object.entries(ye)){const Oe=z[Ne];if(Oe!==void 0&&typeof s=="function")try{s(ge,Oe,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(us,{...T,id:e.name,label:C(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:c,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const y=T.value||e.defaultValue||e.src;if(y){const K=e.imageUploaded||{},fe=K.previewText||"Preview",ye=K.removeText||"Remove",ge=K.saveText||"Save logo",Ne=K.showSave!==void 0?K.showSave:!!(e.onSave||K.saveText),Oe=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(y)}catch{}},at=()=>{T.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},dt=()=>{typeof e.onSave=="function"&&e.onSave({url:y,file:D.current||void 0})},Me=ie=>{const Ge=ie.target.files&&ie.target.files[0];if(Ge){if(typeof e.onFileSelected=="function")try{e.onFileSelected(Ge)}catch{}try{const Yt=URL.createObjectURL(Ge);T.onChange(Yt)}catch{}D.current=Ge,v(!1)}};return l.jsxs(g.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...K.cardSx},children:[l.jsx("input",{type:"file",ref:j,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Me}),l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(g.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...K.thumbnailSx},children:l.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(g.Box,{sx:{flexGrow:1},children:[l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:500,...K.fileNameSx},children:typeof y=="string"?y.split("/").pop():"Selected image"}),l.jsx(g.Typography,{sx:{fontSize:"10px",...K.fileMetaSx},children:"Image selected"})]}),l.jsxs(g.Box,{sx:{display:"flex",gap:1},children:[l.jsx(g.Button,{type:"button",sx:{...K.previewButtonSx},variant:"outlined",onClick:Oe,startIcon:l.jsx(Ao,{}),children:fe}),l.jsx(g.Button,{variant:"outlined",color:"error",onClick:at,sx:{...K.removeButtonSx},startIcon:l.jsx(Oo,{}),children:ye}),Ne&&l.jsx(g.Button,{variant:"contained",onClick:dt,sx:{...K.saveButtonSx},children:ge})]})]}),l.jsxs(g.Dialog,{open:S,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(g.DialogTitle,{children:K.previewTitle||"Image preview"}),l.jsx(g.DialogContent,{children:l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:l.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(g.DialogActions,{children:[l.jsx(g.Button,{type:"button",variant:"outlined",onClick:()=>{var ie;return(ie=j.current)==null?void 0:ie.click()},children:K.replaceText||"Replace logo"}),l.jsx(g.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:K.closeText||"Close"})]})]})]})}const M=e.imagePlaceholder||{},b=M.icon||"upload",A=j,V=()=>{var K;try{(K=A.current)==null||K.click()}catch{}},z=K=>{const fe=K.target.files&&K.target.files[0];if(fe){typeof e.onFileSelected=="function"&&e.onFileSelected(fe);try{const ye=URL.createObjectURL(fe);T.onChange(ye)}catch{}D.current=fe}};return l.jsxs(g.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...M.sx},children:[l.jsx("input",{type:"file",ref:A,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:z}),l.jsx(Gn,{sx:{borderRadius:"8px",...M.iconSx},children:b==="image"?l.jsx(zh,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(g.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...M.titleSx},children:M.title||"Drag & Drop the image here"}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...M.subtitleSx},children:M.subtitle||""}),l.jsx(g.Button,{onClick:V,sx:{my:2,...M.buttonSx},startIcon:l.jsx(pi,{}),variant:"contained",disabled:e.disabled,children:M.buttonText||"Upload File"}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,...M.helperTextSx},children:M.helperText||e.helperText||""})]})}});case"component":return l.jsx(g.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:s})}catch{try{return e.render({control:t,formData:a,setValue:s})}catch{return e.render()}}})():e.render:e.content});default:return null}},de=$.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),re=$.useCallback(async()=>{try{const W=a?a[e.name]:void 0;let Q="";W==null?Q="":Array.isArray(W)?Q=W.join(", "):typeof W=="object"?Q=JSON.stringify(W):Q=String(W),await navigator.clipboard.writeText(Q),m(!0),window.setTimeout(()=>m(!1),1200)}catch{}},[a,e.name]);return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(g.Box,{sx:{flexGrow:1},children:B?he():null}),de&&l.jsx(Gn,{"aria-label":`copy ${e.label||e.name}`,onClick:re,size:"small",children:E?l.jsx(ls,{fontSize:"small"}):l.jsx(Mh,{fontSize:"small"})})]})};var na,Ro;function em(){if(Ro)return na;Ro=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,j){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=j};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),c=new e(s),p=new e(s);na={Cache:e,split:f,normalizePath:d,setter:function(v){var j=d(v);return c.get(v)||c.set(v,function(F,C){for(var _=0,I=j.length,R=F;_<I-1;){var Y=j[_];if(Y==="__proto__"||Y==="constructor"||Y==="prototype")return F;R=R[j[_++]]}R[j[_]]=C})},getter:function(v,j){var D=d(v);return p.get(v)||p.set(v,function(C){for(var _=0,I=D.length;_<I;)if(C!=null||!j)C=C[D[_++]];else return;return C})},join:function(v){return v.reduce(function(j,D){return j+(x(D)||r.test(D)?"["+D+"]":(j?".":"")+D)},"")},forEach:function(v,j,D){u(Array.isArray(v)?v:f(v),j,D)}};function d(v){return o.get(v)||o.set(v,f(v).map(function(j){return j.replace(a,"$2")}))}function f(v){return v.match(t)||[""]}function u(v,j,D){var F=v.length,C,_,I,R;for(_=0;_<F;_++)C=v[_],C&&(S(C)&&(C='"'+C+'"'),R=x(C),I=!R&&/^\d+$/.test(C),j.call(D,C,R,I,_,v))}function x(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function E(v){return v.match(n)&&!v.match(r)}function m(v){return i.test(v)}function S(v){return!x(v)&&(E(v)||m(v))}return na}var Rr=em(),ia,$o;function tm(){if($o)return ia;$o=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=d=>d.match(e)||[],r=d=>d[0].toUpperCase()+d.slice(1),n=(d,f)=>t(d).join(f).toLowerCase(),i=d=>t(d).reduce((f,u)=>`${f}${f?u[0].toUpperCase()+u.slice(1).toLowerCase():u.toLowerCase()}`,"");return ia={words:t,upperFirst:r,camelCase:i,pascalCase:d=>r(i(d)),snakeCase:d=>n(d,"_"),kebabCase:d=>n(d,"-"),sentenceCase:d=>r(n(d," ")),titleCase:d=>t(d).map(r).join(" ")},ia}var aa=tm(),Ln={exports:{}},Po;function rm(){if(Po)return Ln.exports;Po=1,Ln.exports=function(i){return e(t(i),i)},Ln.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),c={},p=s,d=r(a),f=n(i);for(a.forEach(function(x){if(!f.has(x[0])||!f.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});p--;)c[p]||u(i[p],p,new Set);return o;function u(x,E,m){if(m.has(x)){var S;try{S=", node was:"+JSON.stringify(x)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!f.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!c[E]){c[E]=!0;var v=d.get(x)||new Set;if(v=Array.from(v),E=v.length){m.add(x);do{var j=v[--E];u(j,f.get(j),m)}while(E);m.delete(x)}o[--s]=x}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var c=i[s];a.add(c[0]),a.add(c[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var c=i[s];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[1])}return a}function n(i){for(var a=new Map,s=0,o=i.length;s<o;s++)a.set(i[s],s);return a}return Ln.exports}var nm=rm();const im=Ya(nm),am=Object.prototype.toString,sm=Error.prototype.toString,om=RegExp.prototype.toString,lm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",cm=/^Symbol\((.*)\)(.*)$/;function um(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Do(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return um(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return lm.call(e).replace(cm,"Symbol($1)");const n=am.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+sm.call(e)+"]":n==="RegExp"?om.call(e):null}function ur(e,t){let r=Do(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=Do(this[n],t);return a!==null?a:i},2)}function xc(e){return e==null?[]:[].concat(e)}let vc,bc,wc,pm=/\$\{\s*(\w+)\s*\}/g;vc=Symbol.toStringTag;class Io{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[vc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],xc(t).forEach(a=>{if(ct.isError(a)){this.errors.push(...a.errors);const s=a.inner.length?a.inner:[a];this.inner.push(...s)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}bc=Symbol.hasInstance;wc=Symbol.toStringTag;class ct extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(pm,(i,a)=>ur(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const s=new Io(t,r,n,i);if(a)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[wc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ct)}static[bc](t){return Io[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let $t={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${ur(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ur(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ur(r,!0)}\``+i}},st={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Xt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},$a={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Pa={isValue:"${path} field must be ${value}"},Qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},dm={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},fm={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${ur(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${ur(r,!0)}\``}return ct.formatError($t.notType,e)}};Object.assign(Object.create(null),{mixed:$t,string:st,number:Xt,date:$a,object:Qn,array:dm,boolean:Pa,tuple:fm});const hs=e=>e&&e.__isYupSchema__;class fi{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,s=typeof n=="function"?n:(...o)=>o.every(c=>c===n);return new fi(t,(o,c)=>{var p;let d=s(...o)?i:a;return(p=d==null?void 0:d(c))!=null?p:c})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(a=>a.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!hs(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const qn={context:"$",value:"."};function hi(e,t){return new gr(e,t)}class gr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===qn.context,this.isValue=this.key[0]===qn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?qn.context:this.isValue?qn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Rr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}gr.prototype.__isYupRef=!0;const Ot=e=>e==null;function Wr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,c){const{name:p,test:d,params:f,message:u,skipAbsent:x}=e;let{parent:E,context:m,abortEarly:S=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function j(B){return gr.isRef(B)?B.getValue(r,E,m):B}function D(B={}){const q=Object.assign({value:r,originalValue:a,label:s.spec.label,path:B.path||n,spec:s.spec,disableStackTrace:B.disableStackTrace||v},f,B.params);for(const L of Object.keys(q))q[L]=j(q[L]);const Z=new ct(ct.formatError(B.message||u,q),r,q.path,B.type||p,q.disableStackTrace);return Z.params=q,Z}const F=S?o:c;let C={path:n,parent:E,type:p,from:i.from,createError:D,resolve:j,options:i,originalValue:a,schema:s};const _=B=>{ct.isError(B)?F(B):B?c(null):F(D())},I=B=>{ct.isError(B)?F(B):o(B)};if(x&&Ot(r))return _(!0);let Y;try{var h;if(Y=d.call(C,r,C),typeof((h=Y)==null?void 0:h.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Y).then(_,I)}}catch(B){I(B);return}_(Y)}return t.OPTIONS=e,t}function hm(e,t,r,n=r){let i,a,s;return t?(Rr.forEach(t,(o,c,p)=>{let d=c?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",u=p?parseInt(d,10):0;if(e.innerType||f){if(f&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&u>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[u],e=f?e.spec.types[u]:e.innerType}if(!p){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);i=r,r=r&&r[d],e=e.fields[d]}a=d,s=c?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class mi extends Set{describe(){const t=[];for(const r of this.values())t.push(gr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new mi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Hr(e,t=new Map){if(hs(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Hr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,Hr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Hr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Hr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class gt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new mi,this._blacklist=new mi,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($t.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Hr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(s=>{a.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&Ot(a))return a;let s=ur(t),o=ur(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
177
-
178
- attempted value: ${s}
179
- `+(o!==s?`result of cast: ${o}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:s=t,strict:o=this.spec.strict}=r,c=t;o||(c=this._cast(c,Object.assign({assert:!1},r)));let p=[];for(let d of Object.values(this.internalTests))d&&p.push(d);this.runTests({path:a,value:c,originalValue:s,options:r,tests:p},n,d=>{if(d.length)return i(d,c);this.runTests({path:a,value:c,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:c,options:p}=t,d=m=>{i||(i=!0,r(m,s))},f=m=>{i||(i=!0,n(m,s))},u=a.length,x=[];if(!u)return f([]);let E={value:s,originalValue:o,path:c,options:p,schema:this};for(let m=0;m<a.length;m++){const S=a[m];S(E,d,function(j){j&&(Array.isArray(j)?x.push(...j):x.push(j)),--u<=0&&f(x)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:s}){const o=t??r;if(o==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof o=="number";let p=n[o];const d=Object.assign({},s,{strict:!0,parent:n,value:p,originalValue:a[o],key:void 0,[c?"index":"key"]:o,path:c||o.includes(".")?`${i||""}[${c?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(f,u,x)=>this.resolve(d)._validate(p,d,u,x)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((s,o)=>i._validate(t,r,(c,p)=>{ct.isError(c)&&(c.value=p),o(c)},(c,p)=>{c.length?o(new ct(c,p,void 0,void 0,a)):s(p)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(o,c)=>{throw ct.isError(o)&&(o.value=c),o},(o,c)=>{if(o.length)throw new ct(o,t,void 0,void 0,s);a=c}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(ct.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(ct.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Hr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Wr({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Wr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=$t.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=$t.notNull){return this.nullability(!1,t)}required(t=$t.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=$t.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Wr(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(a||s.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=xc(t).map(a=>new gr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new fi(i,r):fi.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Wr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=$t.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=Wr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,s=a.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:s}})}}),n}notOneOf(t,r=$t.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=Wr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,s=a.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:s}=r.spec;return{meta:i,label:n,optional:a,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,p,d)=>d.findIndex(f=>f.name===c.name)===p)}}}gt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])gt.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=hm(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])gt.prototype[e]=gt.prototype.oneOf;for(const e of["not","nope"])gt.prototype[e]=gt.prototype.notOneOf;const mm=()=>!0;function Sc(e){return new Cc(e)}class Cc extends gt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:mm},t))}}Sc.prototype=Cc.prototype;function Ec(){return new kc}class kc extends gt{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Ot(r)||r===!0}})}isFalse(t=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Ot(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Ec.prototype=kc.prototype;const gm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ym(e){const t=Da(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function Da(e){var t,r;const n=gm.exec(e);return n?{year:qt(n[1]),month:qt(n[2],1)-1,day:qt(n[3],1),hour:qt(n[4]),minute:qt(n[5]),second:qt(n[6]),millisecond:n[7]?qt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:qt(n[10]),minuteOffset:qt(n[11])}:null}function qt(e,t=0){return Number(e)||t}let xm=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,vm=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,bm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,wm="^\\d{4}-\\d{2}-\\d{2}",Sm="\\d{2}:\\d{2}:\\d{2}",Cm="(([+-]\\d{2}(:?\\d{2})?)|Z)",Em=new RegExp(`${wm}T${Sm}(\\.\\d+)?${Cm}$`),km=e=>Ot(e)||e===e.trim(),Tm={}.toString();function vn(){return new Tc}class Tc extends gt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===Tm?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||$t.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=st.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=st.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=st.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||st.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=st.email){return this.matches(xm,{name:"email",message:t,excludeEmptyString:!0})}url(t=st.url){return this.matches(vm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=st.uuid){return this.matches(bm,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(Em,{name:"datetime",message:r||st.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||st.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Da(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||st.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Da(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=st.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:km})}lowercase(t=st.lowercase){return this.transform(r=>Ot(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toLowerCase()})}uppercase(t=st.uppercase){return this.transform(r=>Ot(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toUpperCase()})}}vn.prototype=Tc.prototype;let jm=e=>e!=+e;function jc(){return new Fc}class Fc extends gt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!jm(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return n.isType(i)||i===null?i:parseFloat(i)})})}min(t,r=Xt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Xt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Xt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Xt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Xt.positive){return this.moreThan(0,t)}negative(t=Xt.negative){return this.lessThan(0,t)}integer(t=Xt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Ot(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>Ot(i)?i:Math[t](i))}}jc.prototype=Fc.prototype;let Ac=new Date(""),Fm=e=>Object.prototype.toString.call(e)==="[object Date]";function ms(){return new Pn}class Pn extends gt{constructor(){super({type:"date",check(t){return Fm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=ym(t),isNaN(t)?Pn.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(gr.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=$a.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=$a.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}Pn.INVALID_DATE=Ac;ms.prototype=Pn.prototype;ms.INVALID_DATE=Ac;function Am(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let c=Rr.split(s)[0];n.add(c),i.has(`${o}-${c}`)||r.push([o,c])}for(const s of Object.keys(e)){let o=e[s];n.add(s),gr.isRef(o)&&o.isSibling?a(o.path,s):hs(o)&&"deps"in o&&o.deps.forEach(c=>a(c,s))}return im.array(Array.from(n),r).reverse()}function Mo(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function Oc(e){return(t,r)=>Mo(e,t)-Mo(e,r)}const Om=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Zn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Zn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Zn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Zn)}):"optional"in e?e.optional():e}const _m=(e,t)=>{const r=[...Rr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Rr.getter(Rr.join(r),!0)(e);return!!(i&&n in i)};let zo=e=>Object.prototype.toString.call(e)==="[object Object]";function Bo(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Rm=Oc([]);function _c(e){return new Rc(e)}class Rc extends gt{constructor(t){super({type:"object",check(r){return zo(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Rm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(f=>!this._nodes.includes(f))),c={},p=Object.assign({},r,{parent:c,__validating:r.__validating||!1}),d=!1;for(const f of o){let u=a[f],x=f in i;if(u){let E,m=i[f];p.path=(r.path?`${r.path}.`:"")+f,u=u.resolve({value:m,context:r.context,parent:c});let S=u instanceof gt?u.spec:void 0,v=S==null?void 0:S.strict;if(S!=null&&S.strip){d=d||f in i;continue}E=!r.__validating||!v?u.cast(i[f],p):i[f],E!==void 0&&(c[f]=E)}else x&&!s&&(c[f]=i[f]);(x!==f in c||c[f]!==i[f])&&(d=!0)}return d?c:i}_validate(t,r={},n,i){let{from:a=[],originalValue:s=t,recursive:o=this.spec.recursive}=r;r.from=[{schema:this,value:s},...a],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(c,p)=>{if(!o||!zo(p)){i(c,p);return}s=s||p;let d=[];for(let f of this._nodes){let u=this.fields[f];!u||gr.isRef(u)||d.push(u.asNestedTest({options:r,key:f,parent:p,parentPath:r.path,originalParent:s}))}this.runTests({tests:d,value:p,originalValue:s,options:r},n,f=>{i(f.sort(this._sortErrors).concat(c),p)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const s=n[i];n[i]=s===void 0?a:s}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Am(t,r),n._sortErrors=Oc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Zn(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=Rr.getter(t,!0);return this.transform(a=>{if(!a)return a;let s=a;return _m(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(Om)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Qn.exact,test(r){if(r==null)return!0;const n=Bo(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Qn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=Bo(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Qn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(aa.camelCase)}snakeCase(){return this.transformKeys(aa.snakeCase)}constantCase(){return this.transformKeys(t=>aa.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,s]of Object.entries(r.fields)){var i;let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),n.fields[a]=s.describe(o)}return n}}_c.prototype=Rc.prototype;const $c=e=>{const t={};return e.forEach(r=>{var s,o,c;let n;switch(r.type){case"text":case"textarea":case"tel":n=vn(),r.validation?n=yr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,p=>p?new RegExp(r.pattern).test(p):!0)));break;case"email":n=vn().email(((s=r.validation)==null?void 0:s.message)||`${r.label} must be a valid email address`),r.validation&&(n=yr(n,r,"string"));break;case"password":n=vn(),r.validation?n=yr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,p=>p?new RegExp(r.pattern).test(p):!0)));break;case"number":if(n=jc().transform((p,d)=>d===""||d===null?void 0:p).nullable().typeError(`${r.label} must be a number`),r.validation)n=yr(n,r,"number");else{if(r.min!==void 0){const p=typeof r.min=="object"&&r.min!==null&&"field"in r.min,d=p?hi(r.min.field):r.min,f=p&&r.min.message?r.min.message:`${r.label} must be at least ${p?"the minimum value":r.min}`;n=n.min(d,f)}if(r.max!==void 0){const p=typeof r.max=="object"&&r.max!==null&&"field"in r.max,d=p?hi(r.max.field):r.max,f=p&&r.max.message?r.max.message:`${r.label} must be at most ${p?"the maximum value":r.max}`;n=n.max(d,f)}}break;case"select":n=vn(),r.validation&&(n=yr(n,r,"string"));break;case"checkbox":n=Ec(),r.validation&&(n=yr(n,r,"boolean"));break;case"date":n=ms().typeError(`${r.label} must be a valid date`),r.validation?n=yr(n,r,"date"):(r.minDate&&(n=n.min(new Date(r.minDate),`${r.label} must be after ${r.minDate}`)),r.maxDate&&(n=n.max(new Date(r.maxDate),`${r.label} must be before ${r.maxDate}`)));break;default:n=Sc()}const i=((o=r.validation)==null?void 0:o.required)!==void 0?r.validation.required:r.required;if(typeof i=="function"?!1:!!i){const p=((c=r.validation)==null?void 0:c.message)||`${r.label} is required`;n=n.required(p)}t[r.name]=n}),_c().shape(t)},yr=(e,t,r,n)=>{const i=t.validation;if(!i)return e;if(r==="string"){if(i.minLength!==void 0){const a=i.message||`${t.label} must be at least ${i.minLength} characters`;e=e.min(i.minLength,a)}if(i.maxLength!==void 0){const a=i.message||`${t.label} must be at most ${i.maxLength} characters`;e=e.max(i.maxLength,a)}}if(r==="number"){if(i.min!==void 0)if(typeof i.min=="object"&&"field"in i.min){const a=hi(i.min.field),s=i.min.message||i.message||`${t.label} must be at least the value of ${i.min.field}`;e=e.min(a,s)}else{const a=i.message||`${t.label} must be at least ${i.min}`;e=e.min(i.min,a)}if(i.max!==void 0)if(typeof i.max=="object"&&"field"in i.max){const a=hi(i.max.field),s=i.max.message||i.message||`${t.label} must be at most the value of ${i.max.field}`;e=e.max(a,s)}else{const a=i.message||`${t.label} must be at most ${i.max}`;e=e.max(i.max,a)}}if(i.pattern){const a=typeof i.pattern=="string"?new RegExp(i.pattern):i.pattern,s=i.message||`${t.label} format is invalid`;e=e.test("pattern",s,o=>o?a.test(o):!0)}return i.custom&&(e=e.test("custom",i.message||`${t.label} is invalid`,function(a){const s=this.parent||{},o=i.custom(a,s);return typeof o=="boolean"?o:!1})),e},Pc=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=$.useMemo(()=>Array.from({length:t},(d,f)=>f+1),[t]),o=$.useMemo(()=>Math.round(e/t*100),[e,t]),c=d=>n[d-1]||`Step ${d}`,p=d=>d===e||a.includes(d)||d===e+1&&a.includes(e);return l.jsxs(g.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:s.map((d,f)=>{const u=d===e,x=d<e||a.includes(d),E=u||x?"primary.main":"#8F97A4";return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center"},children:[l.jsxs(g.Box,{onClick:()=>p(d)&&r(d),sx:{display:"flex",alignItems:"center",cursor:p(d)?"pointer":"default"},children:[l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:u||x?"2px solid":"1px solid",borderColor:u||x?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:m=>u||x?Et(m.palette.primary.main,.2):"transparent",mr:.5,color:E,fontWeight:u||x?600:500,fontSize:"12px"},children:d}),i&&l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:600,color:E},children:c(d)})]}),f<s.length-1&&l.jsx(g.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:d<e?"primary.main":"#DFE3E8"}})]},d)})}),l.jsx(g.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${o}% complete`})]}),l.jsx(g.LinearProgress,{variant:"determinate",value:o,sx:{height:4,borderRadius:"50px",backgroundColor:d=>d.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Dc=({buttons:e,disabled:t=!1})=>{const r=o=>{o.onClick&&o.onClick()},n=e.filter(o=>o.position==="left"||!o.position),i=e.filter(o=>o.position==="center"),a=e.filter(o=>o.position==="right"),s=(o,c)=>{const p=(o.text||"").toLowerCase(),d=o.type==="submit"||p.includes("submit")||p.includes("save")||p.includes("next"),f=o.position==="left"||p.includes("cancel")||p.includes("back")||p.includes("draft"),u=o.type?o.type:d?"submit":"button",x=f?"outlined":"contained",E=o.disabled||t,m=S=>S&&["primary","secondary","error","info","success","warning"].includes(S)?S:"primary";return l.jsxs(g.Button,{type:u,variant:x,color:m(o.color),size:o.size||"large",disabled:E,onClick:o.onClick?()=>r(o):void 0,sx:o.sx,children:[o.loading&&l.jsx(g.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${c}`)};return l.jsxs(g.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(g.Box,{sx:{display:"flex",gap:2},children:n.map((o,c)=>s(o,c))}),l.jsx(g.Box,{sx:{display:"flex",gap:2},children:i.map((o,c)=>s(o,c))}),l.jsx(g.Box,{sx:{display:"flex",gap:2},children:a.map((o,c)=>s(o,c))})]})},$m=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:c="right",layout:p="horizontal",spacing:d=2,sx:f}=e,u=v=>{let j="button",D="contained";return v.type?j=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?j="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(j="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&(D="outlined"),{buttonType:j,buttonVariant:D}},x=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",E=v=>{const{buttonType:j}=u(v);v.onClick?v.onClick():j==="submit"&&t?t(s):a&&r&&(v.text.toLowerCase().includes("next")?r(n+1,i):(v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("previous"))&&r(n-1,i))},m=(v,j)=>{const{buttonType:D,buttonVariant:F}=u(v),C=x(v.color);return l.jsx(g.Button,{type:D,variant:F,color:C,size:v.size||"medium",disabled:v.disabled,onClick:()=>E(v),sx:v.sx,children:v.text},j)},S=()=>{const v={display:"flex",gap:d,...f};switch(c){case"left":return{...v,justifyContent:"flex-start"};case"center":return{...v,justifyContent:"center"};case"right":return{...v,justifyContent:"flex-end"};case"space-between":return{...v,justifyContent:"space-between"};default:return{...v,justifyContent:"flex-end"}}};return p==="vertical"?l.jsx(g.Box,{sx:S(),children:o.map((v,j)=>l.jsx(g.Box,{sx:{width:"100%"},children:m(v,j)},j))}):l.jsx(g.Box,{sx:S(),children:l.jsx(g.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,j)=>m(v,j))})})},Ic=(e,t)=>{const r=e==null?void 0:e.showWhen;if(r){if(typeof r=="function")try{return!!r(t||{})}catch{return!0}if(r&&typeof r=="object"){const n=r.field,i=r.equals,a=r.in,s=n?(t||{})[n]:void 0;if(n&&typeof i<"u")return s===i;if(n&&Array.isArray(a))return a.includes(s)}}return!0},Xn=(e,t)=>{const r=[];for(const n of e)if(Ic(n,t)&&(r.push(n),n.type==="tabs"&&n.items)){const i=n.items||[],a=(t||{})[n.name],s=(()=>{if(typeof a=="string"||typeof a=="number"){const c=i.findIndex((p,d)=>typeof p.value=="string"||typeof p.value=="number"?p.value===a:d===a);return c>=0?c:0}return Number(a)||0})(),o=i[s]||{};Array.isArray(o.fields)&&r.push(...Xn(o.fields,t))}return r},Pm=new zu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Dm=e=>l.jsx(qu,{client:Pm,children:l.jsx(Im,{...e})}),Im=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:c=!0,buttons:p,buttonGroup:d,stickyButtons:f,stickyButtonsSx:u,fixedButtons:x,fixedButtonsSx:E,formCardWrap:m,formCardSx:S,formCardProps:v,baseUrl:j,apiHeaders:D,stepNavigationProps:F})=>{var w,T;const C=[...new Set(r.map(y=>y.step).filter(y=>y!=null&&y>0))].sort((y,M)=>(y||0)-(M||0)),_=C.length>1,I=C.length||1,[R,Y]=$.useState(1),h=_?r.filter(y=>y.step===R):r,B=$.useCallback(y=>{const M=[];for(const b of y)if(M.push(b),b.type==="tabs"&&b.items)for(const A of b.items||[])Array.isArray(A.fields)&&M.push(...B(A.fields));return M},[]),{control:q,handleSubmit:Z,formState:{errors:L},watch:H,setValue:G,resetField:ne,trigger:ue}=yu({resolver:$.useCallback((y,M,b)=>{const V=Xn(_?h:r,y),z=$c(V);return bu(z)(y,M,b)},[_,h,r]),mode:"onChange",defaultValues:o}),P=H(),U=$.useRef({});$.useEffect(()=>{const y=[];for(const M of r){const b=M.depends_on;b&&typeof M.name=="string"&&y.push({dependentField:M.name,dependencyName:b})}if(y.length!==0)for(const{dependentField:M,dependencyName:b}of y){const A=U.current[b],V=P==null?void 0:P[b];if(A!==V)try{ne(M)}catch{}U.current[b]=V}},[r,P,ne]);const X=$.useRef(i);$.useEffect(()=>{X.current=i},[i]);const pe=$.useMemo(()=>{try{return JSON.stringify(P)}catch{return String(Date.now())}},[P]),he=$.useRef(null);$.useEffect(()=>{X.current&&he.current!==pe&&(he.current=pe,X.current(P))},[pe]);const de=async()=>{if(!_)return!0;const y=r.filter(b=>b.step===R);for(const b of y)if(typeof b.required=="function"?!!b.required(P):!!b.required){const V=P[b.name];let z=!0;if(b.type==="checkbox"?z=V===!0:Array.isArray(V)?z=V.length>0:z=V!=null&&V!=="",!z)return!1}return await ue()?!0:Object.keys(L).filter(A=>y.some(V=>V.name===A)).map(A=>{const V=L[A];return typeof(V==null?void 0:V.message)=="string"?V.message:`${A} is invalid`}).length===0},re=$.useMemo(()=>{if(!_)return!0;const y=r.filter(b=>b.step===R);for(const b of y)if(typeof b.required=="function"?!!b.required(P):!!b.required){const V=P[b.name];let z=!0;if(b.type==="checkbox"?z=V===!0:Array.isArray(V)?z=V.length>0:z=V!=null&&V!=="",!z)return!1}return Object.keys(L).filter(b=>y.some(A=>A.name===b)).length===0},[_,R,r,P,L]),W=$.useCallback((y,M)=>Ic(y,M),[]),Q=$.useCallback(y=>{const M=[];for(const b of y)if(M.push(b),b.type==="tabs"&&b.items)for(const A of b.items||[])Array.isArray(A.fields)&&M.push(...Q(A.fields));return M},[]),se=$.useCallback((y,M)=>Xn(y,M),[]),le=$.useMemo(()=>{if(_)return re;const y=Xn(r,P);for(const A of y){if(!W(A,P))continue;if(typeof A.required=="function"?!!A.required(P):!!A.required){const z=P[A.name];let K=!0;if(A.type==="checkbox"?K=z===!0:K=z!=null&&z!==""&&!(Array.isArray(z)&&z.length===0),!K)return!1}}const M=new Set(y.map(A=>A.name));return Object.keys(L).filter(A=>M.has(A)).length===0},[_,re,r,P,L,se,W]),ce=async y=>{y<1||y>I||y>R&&_&&!await de()||Y(y)},be=async y=>{if(_&&R<I){console.warn("Form submission attempted on non-final step");return}const b=(A=>{const V={...A||{}},z=Q(r);for(const K of z){if(!K||!K.name)continue;const fe=V[K.name];if(K.type==="dragdroplist"&&Array.isArray(fe)){const ye=K,ge=ye.serialize;if(!ge)continue;const Ne=fe,Oe=typeof ye.getId=="function"?ye.getId:typeof ye.getId=="string"?ie=>ie==null?void 0:ie[ye.getId]:ie=>(ie==null?void 0:ie.id)??(ie==null?void 0:ie._id)??(ie==null?void 0:ie.key)??String(ie),at=typeof ye.getText=="function"?ye.getText:typeof ye.getText=="string"?ie=>(ie==null?void 0:ie[ye.getText])??String(ie):ie=>(ie==null?void 0:ie.text)??(ie==null?void 0:ie.label)??(ie==null?void 0:ie.name)??(ie==null?void 0:ie.title)??String(ie),dt=(()=>{if(typeof ye.chipText=="function")return ye.chipText;if(typeof ye.chipText=="string")return(ie,Ge)=>ie==null?void 0:ie[ye.chipText]})();let Me=fe;typeof ge=="function"?Me=Ne.map((ie,Ge)=>ge(ie,Ge)):ge==="ids"?Me=Ne.map(ie=>Oe(ie)):ge==="text"?Me=Ne.map(ie=>at(ie)):ge==="chips"?Me=Ne.map((ie,Ge)=>(typeof dt=="function"?dt(ie,Ge):void 0)??""):ge&&typeof ge=="object"&&"field"in ge&&(Me=Ne.map(ie=>ie==null?void 0:ie[ge.field])),V[K.name]=Me}}return V})(y);s&&s(b),n(b)},J=async y=>{y&&(y.preventDefault(),y.stopPropagation()),_&&R<I&&await de()&&ce(R+1)},Ie=y=>{y&&(y.preventDefault(),y.stopPropagation()),_&&R>1&&ce(R-1)},Ke=y=>y.col?y.col:(y.xs||y.sm||y.md||y.lg||y.xl)&&(y.xs||y.sm||y.md||y.lg||y.xl)||12,Xe=t?g.createTheme({palette:{primary:{main:t.primaryColor||"#1976d2"},secondary:{main:t.secondaryColor||"#dc004e"},background:{default:t.backgroundColor||"#ffffff"},text:{primary:t.textColor||"#000000"}},shape:{borderRadius:t.borderRadius||4},spacing:t.spacing||8,typography:{fontFamily:((w=t.typography)==null?void 0:w.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((T=t.typography)==null?void 0:T.fontSize)=="number"?t.typography.fontSize:14}}):void 0,Tt=()=>{const y=x?{position:"fixed",left:0,right:0,bottom:0,background:"#FFFFFF",pt:2,px:2,pb:2,zIndex:1300,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.08)",...E}:f?{position:"sticky",bottom:0,background:"#FFFFFF",pt:2,pb:2,zIndex:1200,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.04)",...u}:void 0;if(d&&d.buttons&&d.buttons.length>0){const M={...d,buttons:d.buttons.map(b=>{const A=(b.text||"").toLowerCase(),V=b.type==="submit"||A.includes("submit")||A.includes("save")||A.includes("finish")||A.includes("complete"),z=A.includes("next");let K=!1;return _?(V||z)&&(K=!re):V&&(K=!le),{...b,disabled:b.disabled||K}})};return l.jsx(g.Box,{sx:{mt:3,...y||{}},children:l.jsx($m,{config:M,onSubmit:be,onStepChange:ce,currentStep:R,totalSteps:I,isMultiStep:_,formData:P})})}if(p&&p.length>0){const M=p.map(b=>{const A=(b.text||"").toLowerCase(),V=b.type==="submit"||A.includes("submit")||A.includes("save")||A.includes("finish")||A.includes("complete"),z=A.includes("next");let K=!1;return _?(V||z)&&(K=!re):V&&(K=!le),{...b,disabled:b.disabled||K}});return l.jsx(g.Box,{sx:y,children:l.jsx(Dc,{buttons:M})})}return c?l.jsx(g.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end",...y||{}},children:l.jsxs(g.Box,{sx:{display:"flex",gap:2},children:[_&&R>1&&l.jsx(g.Button,{type:"button",variant:"outlined",onClick:Ie,children:"Previous"}),_?R<I?l.jsx(g.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!re,onClick:J,children:"Next"}):l.jsx(g.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!re,children:a}):l.jsx(g.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!le,children:a})]})}):null},Ye=$.useMemo(()=>{const y=[];let M=[];for(const b of h)b.type==="section"&&M.length>0?(y.push(M),M=[b]):M.push(b);return M.length>0&&y.push(M),y},[h]),We=l.jsxs(g.Box,{component:"form",onSubmit:y=>{if(_&&R<I){y.preventDefault(),y.stopPropagation(),re&&J();return}Z(be)(y)},id:e,onKeyDown:y=>{y.key==="Enter"&&_&&R<I&&(y.preventDefault(),re&&J())},sx:{pb:x?10:void 0},children:[_&&l.jsx(Pc,{currentStep:R,totalSteps:I,onStepChange:ce,stepTitles:F==null?void 0:F.stepTitles,showStepTitles:(F==null?void 0:F.showStepTitles)!==!1}),Ye.map((y,M)=>{const b=y.find(fe=>fe.type==="section");if(b&&!W(b,P))return null;const A=(b==null?void 0:b.cardWrap)!==!1,V={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},z={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},K=l.jsx(l.Fragment,{children:y.map(fe=>{if(!W(fe,P))return null;const ye=Ke(fe);return l.jsx(g.Box,{sx:{gridColumn:`span ${ye}`},children:l.jsx(fs,{field:fe,control:q,errors:L,baseUrl:j,apiHeaders:D,formData:P,setValue:G})},fe.name)})});return A?l.jsx(g.Card,{sx:{...V,...(b==null?void 0:b.cardSx)||{}},...(b==null?void 0:b.cardProps)||{},children:K},`group-${M}`):l.jsx(g.Box,{sx:z,children:K},`group-${M}`)}),Tt()]}),Ue=m?l.jsx(g.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...S},...v,children:We}):We;return Xe?l.jsx(g.ThemeProvider,{theme:Xe,children:Ue}):Ue},Mm=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>l.jsx(g.Box,{sx:{textAlign:"center"},children:l.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:s?"pointer":"default",...i},className:a,onClick:s,onError:o=>{o.currentTarget.src="/placeholder-image.png"}})});function Mr(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(d){try{p(n.next(d))}catch(f){s(f)}}function c(d){try{p(n.throw(d))}catch(f){s(f)}}function p(d){d.done?a(d.value):i(d.value).then(o,c)}p((n=n.apply(e,t||[])).next())})}const zm=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function cn(e,t,r){const n=Bm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&Vo(n,"path",a),Vo(n,"relativePath",a),n}function Bm(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=zm.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Vo(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Vm=[".DS_Store","Thumbs.db"];function Nm(e){return Mr(this,void 0,void 0,function*(){return gi(e)&&Lm(e.dataTransfer)?Hm(e.dataTransfer,e.type):qm(e)?Wm(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Um(e):[]})}function Lm(e){return gi(e)}function qm(e){return gi(e)&&gi(e.target)}function gi(e){return typeof e=="object"&&e!==null}function Wm(e){return Ia(e.target.files).map(t=>cn(t))}function Um(e){return Mr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>cn(r))})}function Hm(e,t){return Mr(this,void 0,void 0,function*(){if(e.items){const r=Ia(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(Km));return No(Mc(n))}return No(Ia(e.files).map(r=>cn(r)))})}function No(e){return e.filter(t=>Vm.indexOf(t.name)===-1)}function Ia(e){if(e===null)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function Km(e){if(typeof e.webkitGetAsEntry!="function")return Lo(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?zc(t):Lo(e,t)}function Mc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Mc(r):[r]],[])}function Lo(e,t){return Mr(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const s=yield a.getFile();return s.handle=a,cn(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return cn(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Ym(e){return Mr(this,void 0,void 0,function*(){return e.isDirectory?zc(e):Gm(e)})}function zc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(s=>Mr(this,void 0,void 0,function*(){if(s.length){const o=Promise.all(s.map(Ym));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function Gm(e){return Mr(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=cn(n,e.fullPath);t(i)},n=>{r(n)})})})}var Wn={},qo;function Qm(){return qo||(qo=1,Wn.__esModule=!0,Wn.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(s){var o=s.trim().toLowerCase();return o.charAt(0)==="."?n.toLowerCase().endsWith(o):o.endsWith("/*")?a===o.replace(/\/.*$/,""):i===o})}return!0}),Wn}var Zm=Qm();const sa=Ya(Zm);function Wo(e){return eg(e)||Jm(e)||Vc(e)||Xm()}function Xm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
180
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jm(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eg(e){if(Array.isArray(e))return Ma(e)}function Uo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ho(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uo(Object(r),!0).forEach(function(n){Bc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function En(e,t){return ng(e)||rg(e,t)||Vc(e,t)||tg()}function tg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
181
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vc(e,t){if(e){if(typeof e=="string")return Ma(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ma(e,t)}}function Ma(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rg(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function ng(e){if(Array.isArray(e))return e}var ig=typeof sa=="function"?sa:sa.default,ag="file-invalid-type",sg="file-too-large",og="file-too-small",lg="too-many-files",cg=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=t.split(","),n=r.length>1?"one of ".concat(r.join(", ")):r[0];return{code:ag,message:"File type must be ".concat(n)}},Ko=function(t){return{code:sg,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Yo=function(t){return{code:og,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},ug={code:lg,message:"Too many files"};function Nc(e,t){var r=e.type==="application/x-moz-file"||ig(e,t);return[r,r?null:cg(t)]}function Lc(e,t,r){if(vr(e.size))if(vr(t)&&vr(r)){if(e.size>r)return[!1,Ko(r)];if(e.size<t)return[!1,Yo(t)]}else{if(vr(t)&&e.size<t)return[!1,Yo(t)];if(vr(r)&&e.size>r)return[!1,Ko(r)]}return[!0,null]}function vr(e){return e!=null}function pg(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,s=e.maxFiles,o=e.validator;return!a&&t.length>1||a&&s>=1&&t.length>s?!1:t.every(function(c){var p=Nc(c,r),d=En(p,1),f=d[0],u=Lc(c,n,i),x=En(u,1),E=x[0],m=o?o(c):null;return f&&E&&!m})}function yi(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Un(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Go(e){e.preventDefault()}function dg(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function fg(e){return e.indexOf("Edge/")!==-1}function hg(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return dg(e)||fg(e)}function Rt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return t.some(function(o){return!yi(n)&&o&&o.apply(void 0,[n].concat(a)),yi(n)})}}function mg(){return"showOpenFilePicker"in window}function gg(e){if(vr(e)){var t=Object.entries(e).filter(function(r){var n=En(r,2),i=n[0],a=n[1],s=!0;return qc(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(a)||!a.every(Wc))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(r,n){var i=En(n,2),a=i[0],s=i[1];return Ho(Ho({},r),{},Bc({},a,s))},{});return[{description:"Files",accept:t}]}return e}function yg(e){if(vr(e))return Object.entries(e).reduce(function(t,r){var n=En(r,2),i=n[0],a=n[1];return[].concat(Wo(t),[i],Wo(a))},[]).filter(function(t){return qc(t)||Wc(t)}).join(",")}function xg(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function vg(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function qc(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Wc(e){return/^.*\.[\w]+$/.test(e)}var bg=["children"],wg=["open"],Sg=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Cg=["refKey","onChange","onClick"];function Eg(e){return jg(e)||Tg(e)||Uc(e)||kg()}function kg(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
182
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tg(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jg(e){if(Array.isArray(e))return za(e)}function oa(e,t){return Og(e)||Ag(e,t)||Uc(e,t)||Fg()}function Fg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
183
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uc(e,t){if(e){if(typeof e=="string")return za(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return za(e,t)}}function za(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ag(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function Og(e){if(Array.isArray(e))return e}function Qo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qo(Object(r),!0).forEach(function(n){Ba(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ba(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xi(e,t){if(e==null)return{};var r=_g(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _g(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var gs=$.forwardRef(function(e,t){var r=e.children,n=xi(e,bg),i=Kc(n),a=i.open,s=xi(i,wg);return $.useImperativeHandle(t,function(){return{open:a}},[a]),$.createElement($.Fragment,null,r(Pe(Pe({},s),{},{open:a})))});gs.displayName="Dropzone";var Hc={disabled:!1,getFilesFromEvent:Nm,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};gs.defaultProps=Hc;gs.propTypes={children:k.func,accept:k.objectOf(k.arrayOf(k.string)),multiple:k.bool,preventDropOnDocument:k.bool,noClick:k.bool,noKeyboard:k.bool,noDrag:k.bool,noDragEventsBubbling:k.bool,minSize:k.number,maxSize:k.number,maxFiles:k.number,disabled:k.bool,getFilesFromEvent:k.func,onFileDialogCancel:k.func,onFileDialogOpen:k.func,useFsAccessApi:k.bool,autoFocus:k.bool,onDragEnter:k.func,onDragLeave:k.func,onDragOver:k.func,onDrop:k.func,onDropAccepted:k.func,onDropRejected:k.func,onError:k.func,validator:k.func};var Va={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Kc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Pe(Pe({},Hc),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,c=t.maxFiles,p=t.onDragEnter,d=t.onDragLeave,f=t.onDragOver,u=t.onDrop,x=t.onDropAccepted,E=t.onDropRejected,m=t.onFileDialogCancel,S=t.onFileDialogOpen,v=t.useFsAccessApi,j=t.autoFocus,D=t.preventDropOnDocument,F=t.noClick,C=t.noKeyboard,_=t.noDrag,I=t.noDragEventsBubbling,R=t.onError,Y=t.validator,h=$.useMemo(function(){return yg(r)},[r]),B=$.useMemo(function(){return gg(r)},[r]),q=$.useMemo(function(){return typeof S=="function"?S:Zo},[S]),Z=$.useMemo(function(){return typeof m=="function"?m:Zo},[m]),L=$.useRef(null),H=$.useRef(null),G=$.useReducer(Rg,Va),ne=oa(G,2),ue=ne[0],P=ne[1],U=ue.isFocused,X=ue.isFileDialogActive,pe=$.useRef(typeof window<"u"&&window.isSecureContext&&v&&mg()),he=function(){!pe.current&&X&&setTimeout(function(){if(H.current){var A=H.current.files;A.length||(P({type:"closeDialog"}),Z())}},300)};$.useEffect(function(){return window.addEventListener("focus",he,!1),function(){window.removeEventListener("focus",he,!1)}},[H,X,Z,pe]);var de=$.useRef([]),re=function(A){L.current&&L.current.contains(A.target)||(A.preventDefault(),de.current=[])};$.useEffect(function(){return D&&(document.addEventListener("dragover",Go,!1),document.addEventListener("drop",re,!1)),function(){D&&(document.removeEventListener("dragover",Go),document.removeEventListener("drop",re))}},[L,D]),$.useEffect(function(){return!n&&j&&L.current&&L.current.focus(),function(){}},[L,j,n]);var W=$.useCallback(function(b){R?R(b):console.error(b)},[R]),Q=$.useCallback(function(b){b.preventDefault(),b.persist(),w(b),de.current=[].concat(Eg(de.current),[b.target]),Un(b)&&Promise.resolve(i(b)).then(function(A){if(!(yi(b)&&!I)){var V=A.length,z=V>0&&pg({files:A,accept:h,minSize:s,maxSize:a,multiple:o,maxFiles:c,validator:Y}),K=V>0&&!z;P({isDragAccept:z,isDragReject:K,isDragActive:!0,type:"setDraggedFiles"}),p&&p(b)}}).catch(function(A){return W(A)})},[i,p,W,I,h,s,a,o,c,Y]),se=$.useCallback(function(b){b.preventDefault(),b.persist(),w(b);var A=Un(b);if(A&&b.dataTransfer)try{b.dataTransfer.dropEffect="copy"}catch{}return A&&f&&f(b),!1},[f,I]),le=$.useCallback(function(b){b.preventDefault(),b.persist(),w(b);var A=de.current.filter(function(z){return L.current&&L.current.contains(z)}),V=A.indexOf(b.target);V!==-1&&A.splice(V,1),de.current=A,!(A.length>0)&&(P({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Un(b)&&d&&d(b))},[L,d,I]),ce=$.useCallback(function(b,A){var V=[],z=[];b.forEach(function(K){var fe=Nc(K,h),ye=oa(fe,2),ge=ye[0],Ne=ye[1],Oe=Lc(K,s,a),at=oa(Oe,2),dt=at[0],Me=at[1],ie=Y?Y(K):null;if(ge&&dt&&!ie)V.push(K);else{var Ge=[Ne,Me];ie&&(Ge=Ge.concat(ie)),z.push({file:K,errors:Ge.filter(function(Yt){return Yt})})}}),(!o&&V.length>1||o&&c>=1&&V.length>c)&&(V.forEach(function(K){z.push({file:K,errors:[ug]})}),V.splice(0)),P({acceptedFiles:V,fileRejections:z,isDragReject:z.length>0,type:"setFiles"}),u&&u(V,z,A),z.length>0&&E&&E(z,A),V.length>0&&x&&x(V,A)},[P,o,h,s,a,c,u,x,E,Y]),be=$.useCallback(function(b){b.preventDefault(),b.persist(),w(b),de.current=[],Un(b)&&Promise.resolve(i(b)).then(function(A){yi(b)&&!I||ce(A,b)}).catch(function(A){return W(A)}),P({type:"reset"})},[i,ce,W,I]),J=$.useCallback(function(){if(pe.current){P({type:"openDialog"}),q();var b={multiple:o,types:B};window.showOpenFilePicker(b).then(function(A){return i(A)}).then(function(A){ce(A,null),P({type:"closeDialog"})}).catch(function(A){xg(A)?(Z(A),P({type:"closeDialog"})):vg(A)?(pe.current=!1,H.current?(H.current.value=null,H.current.click()):W(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):W(A)});return}H.current&&(P({type:"openDialog"}),q(),H.current.value=null,H.current.click())},[P,q,Z,v,ce,W,B,o]),Ie=$.useCallback(function(b){!L.current||!L.current.isEqualNode(b.target)||(b.key===" "||b.key==="Enter"||b.keyCode===32||b.keyCode===13)&&(b.preventDefault(),J())},[L,J]),Ke=$.useCallback(function(){P({type:"focus"})},[]),Xe=$.useCallback(function(){P({type:"blur"})},[]),Tt=$.useCallback(function(){F||(hg()?setTimeout(J,0):J())},[F,J]),Ye=function(A){return n?null:A},We=function(A){return C?null:Ye(A)},Ue=function(A){return _?null:Ye(A)},w=function(A){I&&A.stopPropagation()},T=$.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=b.refKey,V=A===void 0?"ref":A,z=b.role,K=b.onKeyDown,fe=b.onFocus,ye=b.onBlur,ge=b.onClick,Ne=b.onDragEnter,Oe=b.onDragOver,at=b.onDragLeave,dt=b.onDrop,Me=xi(b,Sg);return Pe(Pe(Ba({onKeyDown:We(Rt(K,Ie)),onFocus:We(Rt(fe,Ke)),onBlur:We(Rt(ye,Xe)),onClick:Ye(Rt(ge,Tt)),onDragEnter:Ue(Rt(Ne,Q)),onDragOver:Ue(Rt(Oe,se)),onDragLeave:Ue(Rt(at,le)),onDrop:Ue(Rt(dt,be)),role:typeof z=="string"&&z!==""?z:"presentation"},V,L),!n&&!C?{tabIndex:0}:{}),Me)}},[L,Ie,Ke,Xe,Tt,Q,se,le,be,C,_,n]),y=$.useCallback(function(b){b.stopPropagation()},[]),M=$.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=b.refKey,V=A===void 0?"ref":A,z=b.onChange,K=b.onClick,fe=xi(b,Cg),ye=Ba({accept:h,multiple:o,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ye(Rt(z,be)),onClick:Ye(Rt(K,y)),tabIndex:-1},V,H);return Pe(Pe({},ye),fe)}},[H,r,o,be,n]);return Pe(Pe({},ue),{},{isFocused:U&&!n,getRootProps:T,getInputProps:M,rootRef:L,inputRef:H,open:Ye(J)})}function Rg(e,t){switch(t.type){case"focus":return Pe(Pe({},e),{},{isFocused:!0});case"blur":return Pe(Pe({},e),{},{isFocused:!1});case"openDialog":return Pe(Pe({},Va),{},{isFileDialogActive:!0});case"closeDialog":return Pe(Pe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Pe(Pe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Pe(Pe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Pe({},Va);default:return e}}function Zo(){}const $g=pt(l.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"),Xo=pt(l.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),Pg=pt(l.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),Yc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?l.jsx(Pg,{}):e.file.type.includes("pdf")?l.jsx(Xo,{}):l.jsx(Xo,{}),n=()=>{switch(e.status){case"success":return l.jsx($g,{color:"success"});case"uploading":return l.jsx(g.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,c)).toFixed(2))+" "+o[c]};return l.jsxs(g.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),l.jsxs(g.Box,{sx:{flex:1,minWidth:0},children:[l.jsx(g.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),l.jsxs(g.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),l.jsx(g.Tooltip,{title:"Remove file",children:l.jsx(g.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:l.jsx(mc,{})})})]})},Dg=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s,title:o,subtitle:c,buttonText:p,fileSupportedText:d})=>{const[f,u]=$.useState(t),[x,E]=$.useState([]),[m,S]=$.useState(!1),[v,j]=$.useState(!1),[D,F]=$.useState([]),C=$.useRef(null);$.useEffect(()=>{u(t)},[t]);const _=$.useCallback(L=>{var G,ne;return((G=e==null?void 0:e.fileTypes)==null?void 0:G.some(ue=>{if(ue.includes("*")){const P=ue.split("/")[0];return L.type.startsWith(P)}return L.type===ue}))?e!=null&&e.maxSize&&L.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${L.type} is not allowed. Allowed types: ${(ne=e==null?void 0:e.fileTypes)==null?void 0:ne.join(", ")}`},[e]),I=$.useCallback(async L=>{console.log("handleFiles called with:",L.length,"files"),S(!0);const H=[],G=[];try{for(const ue of L){let P=null;if(e!=null&&e.multiple&&f.some(X=>X.file.name===ue.name&&X.file.size===ue.size&&X.file.lastModified===ue.lastModified)){G.push(`${ue.name}: File already exists`);continue}if(P=_(ue),!P&&(e!=null&&e.customValidation))try{const U=e.customValidation(ue);U instanceof Promise?P=await U:P=U}catch(U){P=`Custom validation failed: ${U instanceof Error?U.message:"Unknown error"}`}if(P)G.push(`${ue.name}: ${P}`);else{const U={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:ue,preview:ue.type.startsWith("image/")?URL.createObjectURL(ue):void 0,progress:0,status:"pending",uploadedAt:new Date};H.push(U)}}const ne=e!=null&&e.multiple?[...f,...H]:H;u(ne),r==null||r(ne),G.length>0?(F(G),E(G)):(F([]),E([]))}catch(ne){const ue=`Unexpected error: ${ne instanceof Error?ne.message:"Unknown error"}`;F([ue]),E([ue])}},[f,e==null?void 0:e.multiple,_,e==null?void 0:e.customValidation,r]),R=$.useCallback(L=>{S(!0);const H=f.filter(G=>G.id!==L);u(H),r==null||r(H),F([]),C.current&&(C.current.value="")},[f,r]),Y=$.useCallback(()=>{if(e!=null&&e.required&&f.length===0){E([`${e.title} is required`]);return}F([]),j(!0);const L=f.filter(H=>H.status!=="error");n==null||n(L)},[f,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:h,getInputProps:B,isDragActive:q}=Kc({onDrop:I,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});$.useEffect(()=>{if(!m)return;const L=[],H=[...D,...L];H.length>0?E(H):E([])},[f,e==null?void 0:e.required,e==null?void 0:e.title,m,v,D]);const Z=()=>{var L;switch(((L=e==null?void 0:e.submitButton)==null?void 0:L.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return l.jsxs(g.Box,{className:a,style:s,children:[l.jsxs(g.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&l.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&l.jsx(g.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),$.createElement(g.Card,{...h(),key:`dropzone-${f.length}`,sx:{border:"1px dashed",borderColor:q?"primary.main":"#CCCCCC",backgroundColor:q?"action.hover":"#F5F5F5",boxShadow:"none",p:3,textAlign:"center",cursor:i?"not-allowed":"pointer",transition:"all 0.2s ease","&:hover":{borderColor:i?"grey.300":"primary.main",backgroundColor:i?"background.paper":"action.hover"}}},l.jsx("input",{...B(),ref:C}),l.jsx(g.IconButton,{sx:{borderRadius:"8px"},children:l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(g.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:o}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:c}),l.jsx(g.Button,{onClick:()=>{var L;return(L=C.current)==null?void 0:L.click()},sx:{my:2},startIcon:l.jsx(pi,{}),variant:"contained",children:p}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400},children:d})),x.length>0&&l.jsx(g.Alert,{severity:"error",sx:{mt:2},children:x.map((L,H)=>l.jsx(g.Typography,{variant:"body2",children:L},H))}),f.length>0&&l.jsxs(g.Box,{sx:{mt:2},children:[l.jsxs(g.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",f.length,")"]}),f.map(L=>l.jsx(Yc,{file:L,onRemove:R},L.id))]}),(e==null?void 0:e.helperText)&&l.jsx(g.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&l.jsx(g.Box,{sx:{mt:3,display:"flex",justifyContent:Z()},children:l.jsx(g.Button,{variant:"contained",onClick:Y,disabled:i||e.submitButton.disabled||f.length===0,startIcon:e.submitButton.loading?l.jsx(g.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Dc;exports.DocumentUpload=Dg;exports.FieldRenderer=fs;exports.FilePreview=Yc;exports.FinAutocomplete=sc;exports.FinCheckbox=Ht;exports.FinCheckboxGroup=oc;exports.FinChip=ps;exports.FinCustomizedVerticalStepper=Kh;exports.FinDateField=us;exports.FinDragDropList=pc;exports.FinEditableGrid=fc;exports.FinForm=Dm;exports.FinInfoCard=Gh;exports.FinListCards=hc;exports.FinPhaseCard=Xh;exports.FinRadioGroup=Sr;exports.FinSelect=$i;exports.FinSwitch=di;exports.FinTabs=dc;exports.FinTextField=vt;exports.FinTextarea=lc;exports.FinUiHeader=cc;exports.FinVerticalStepper=Uh;exports.ImageComponent=Mm;exports.StepNavigation=Pc;exports.brand=Lh;exports.fetchApiData=gc;exports.finflowPalette=ee;exports.generateSchema=$c;exports.getApiConfig=ds;exports.hasApiConfig=xr;exports.neutral=Ze;exports.primary=Vh;exports.secondary=Nh;exports.shouldShowField=Jh;exports.useApiData=yc;
171
+ `,Oh=typeof Pa!="string"?dr.css`
172
+ animation: ${Pa} 1.4s linear infinite;
173
+ `:null,_h=typeof $a!="string"?dr.css`
174
+ animation: ${$a} 1.4s ease-in-out infinite;
175
+ `:null,Rh=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${De(n)}`],svg:["svg"],circle:["circle",`circle${De(r)}`,i&&"circleDisableShrink"]};return cn(a,Ah,t)},Ph=yt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${De(r.color)}`]]}})(Pr(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Oh||{animation:`${Pa} 1.4s linear infinite`}},...Object.entries(e.palette).filter(ci()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),$h=yt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),Dh=yt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${De(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(Pr(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:_h||{animation:`${$a} 1.4s ease-in-out infinite`}}]}))),lc=ie.forwardRef(function(t,r){const n=Dr({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:o=!1,size:s=40,style:c,thickness:p=3.6,value:f=0,variant:d="indeterminate",...u}=n,x={...n,color:a,disableShrink:o,size:s,thickness:p,value:f,variant:d},k=Rh(x),m={},C={},v={};if(d==="determinate"){const w=2*Math.PI*((Gt-p)/2);m.strokeDasharray=w.toFixed(3),v["aria-valuenow"]=Math.round(f),m.strokeDashoffset=`${((100-f)/100*w).toFixed(3)}px`,C.transform="rotate(-90deg)"}return l.jsx(Ph,{className:nt(k.root,i),style:{width:s,height:s,...C,...c},ownerState:x,ref:r,role:"progressbar",...v,...u,children:l.jsx($h,{className:k.svg,ownerState:x,viewBox:`${Gt/2} ${Gt/2} ${Gt} ${Gt}`,children:l.jsx(Dh,{className:k.circle,style:m,ownerState:x,cx:Gt,cy:Gt,r:(Gt-p)/2,fill:"none",strokeWidth:p})})})});process.env.NODE_ENV!=="production"&&(lc.propTypes={classes:T.object,className:T.string,color:T.oneOfType([T.oneOf(["inherit","primary","secondary","error","info","success","warning"]),T.string]),disableShrink:so(T.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:T.oneOfType([T.number,T.string]),style:T.object,sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object]),thickness:T.number,value:T.number,variant:T.oneOf(["determinate","indeterminate"])});function Ih(e){return hr("MuiIconButton",e)}const Os=$r("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Mh=e=>{const{classes:t,disabled:r,color:n,edge:i,size:a,loading:o}=e,s={root:["root",o&&"loading",r&&"disabled",n!=="default"&&`color${De(n)}`,i&&`edge${De(i)}`,`size${De(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return cn(s,Ih,t)},zh=yt(sc,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${De(r.color)}`],r.edge&&t[`edge${De(r.edge)}`],t[`size${De(r.size)}`]]}})(Pr(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ut(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Pr(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(ci()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(ci()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ut((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Os.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Os.loading}`]:{color:"transparent"}}))),Bh=yt("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Gn=ie.forwardRef(function(t,r){const n=Dr({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:o,color:s="default",disabled:c=!1,disableFocusRipple:p=!1,size:f="medium",id:d,loading:u=null,loadingIndicator:x,...k}=n,m=th(d),C=x??l.jsx(lc,{"aria-labelledby":m,color:"inherit",size:16}),v={...n,edge:i,color:s,disabled:c,disableFocusRipple:p,loading:u,loadingIndicator:C,size:f},w=Mh(v);return l.jsxs(zh,{id:u?m:d,className:nt(w.root,o),centerRipple:!0,focusRipple:!p,disabled:c||u,ref:r,...k,ownerState:v,children:[typeof u=="boolean"&&l.jsx("span",{className:w.loadingWrapper,style:{display:"contents"},children:l.jsx(Bh,{className:w.loadingIndicator,ownerState:v,children:u&&C})}),a]})});process.env.NODE_ENV!=="production"&&(Gn.propTypes={children:so(T.node,e=>ie.Children.toArray(e.children).some(r=>ie.isValidElement(r)&&r.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
176
+ `)):null),classes:T.object,className:T.string,color:T.oneOfType([T.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),T.string]),disabled:T.bool,disableFocusRipple:T.bool,disableRipple:T.bool,edge:T.oneOf(["end","start",!1]),id:T.string,loading:T.bool,loadingIndicator:T.node,size:T.oneOfType([T.oneOf(["small","medium","large"]),T.string]),sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object])});const _s=pt(l.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),Rs=pt(l.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),Vh=pt(l.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),po=pt(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),di=pt(l.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),Nh=pt(l.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),Fe={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},Ps=e=>{const t=e.replace("#",""),r=parseInt(t.length===3?t.split("").map(n=>n+n).join(""):t,16);return{r:r>>16&255,g:r>>8&255,b:r&255}},Lh=(e,t,r)=>"#"+[e,t,r].map(n=>{const i=Math.round(Math.min(255,Math.max(0,n))).toString(16);return i.length===1?"0"+i:i}).join(""),Nt=(e,t,r)=>{const n=Ps(e),i=Ps(t);return Lh(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},$i=e=>{const t="#FFFFFF",r="#000000";return{50:Nt(t,e,.08),100:Nt(t,e,.16),200:Nt(t,e,.28),300:Nt(t,e,.4),400:Nt(t,e,.55),500:e,600:Nt(e,r,.1),700:Nt(e,r,.2),800:Nt(e,r,.3),900:Nt(e,r,.42)}},qh=$i(Fe.primary.main),Wh=$i(Fe.secondary.main),Qn=$i(Fe.text.primary),cc=e=>$i(e),Uh={primary:Fe.primary.main,secondary:Fe.secondary.main,textPrimary:Fe.text.primary,textSecondary:Fe.text.secondary,divider:Fe.divider,background:Fe.background},Hh="#111827";function Kh(e){const t=e.palette.text.primary;return typeof t=="string"?t:Hh}function Pn(){const e=ao(),t=e.palette.mode,r=Kh(e),n=e.palette.background.paper,i=e.palette.divider,a=e.palette.text.secondary,o=e.palette.error.main;return P.useMemo(()=>{const s=cc(r);return{paper:n,divider:i,textPrimary:r,textSecondary:a,errorMain:o,neutral50:s[50],outlineDefault:ut(s[300],.5),outlineHover:s[300],outlineFocus:s[400]}},[t,r,n,i,a,o])}const uc="#244061";function Yh(){return Jl({palette:{mode:"light",primary:{main:uc,light:"#0a8a4f",dark:"#0d9c5a"},success:{main:"#10B981"},warning:{main:"#F59E0B"},error:{main:"#D40824"},info:{main:"#3B82F6"},text:{primary:"#1A1A1A",secondary:"rgba(0, 0, 0, 0.6)"},background:{default:"#fafafa",paper:"#ffffff"},divider:"#e2e8f0"},typography:{fontFamily:'"Inter", sans-serif',h1:{fontSize:"24px",fontWeight:700,lineHeight:1.3,letterSpacing:"-0.01em"},h2:{fontSize:"20px",fontWeight:600,lineHeight:1.35,letterSpacing:"-0.005em"},h3:{fontSize:"18px",fontWeight:600,lineHeight:1.4},h4:{fontSize:"18px",fontWeight:600,lineHeight:1.35,letterSpacing:"-0.005em"},h5:{fontSize:"15px",fontWeight:500,lineHeight:1.4},h6:{fontSize:"13px",fontWeight:500,lineHeight:1.5},body1:{fontSize:"14px",fontWeight:400,lineHeight:1.6,letterSpacing:"0.01em"},body2:{fontSize:"13px",fontWeight:400,lineHeight:1.6,letterSpacing:"0.01em"},subtitle1:{fontSize:"14px",fontWeight:500,lineHeight:1.5},subtitle2:{fontSize:"13px",fontWeight:500,lineHeight:1.5},caption:{fontSize:"12px",fontWeight:400,lineHeight:1.5,letterSpacing:"0.02em"},overline:{fontSize:"11px",fontWeight:500,lineHeight:1.5,letterSpacing:"0.08em",textTransform:"uppercase"},button:{fontSize:"14px",fontWeight:500,lineHeight:1.2,letterSpacing:"0.01em"},allVariants:{fontFamily:'"Inter", sans-serif'}},shape:{borderRadius:6},spacing:8})}const vt=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:o="#E6E8EC",endorsementColor:s="#111827",endorsementRadius:c="6px",endorsementHeight:p=28,endorsementPaddingX:f="8px",...d})=>{var C,v;const u=Pn(),x=!!r,k=a?l.jsx(g.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:p,paddingLeft:f,paddingRight:f,borderRadius:c,backgroundColor:o,color:s,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,m={...d.InputProps,endAdornment:k||i?l.jsxs(g.InputAdornment,{sx:{mr:-1},position:"end",children:[k||i,(C=d.InputProps)==null?void 0:C.endAdornment]}):(v=d.InputProps)==null?void 0:v.endAdornment};return l.jsxs(g.Box,{children:[x&&l.jsx(g.Typography,{variant:n,sx:{color:u.textPrimary,mb:.5,fontWeight:500},children:r}),l.jsx(g.TextField,{fullWidth:!0,size:"small",...d,InputProps:m,label:x?void 0:d.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:u.paper,borderRadius:"8px","& fieldset":{borderColor:u.outlineDefault},"&:hover fieldset":{borderColor:u.outlineHover},"&.Mui-focused fieldset":{borderColor:u.outlineFocus},"&.Mui-error fieldset":{borderColor:u.errorMain}},"& .MuiInputBase-input":{color:u.textPrimary},"& .MuiFormLabel-root":{color:u.textSecondary},"& .MuiFormLabel-root.Mui-focused":{color:u.textPrimary},"& .MuiFormHelperText-root":{color:e?u.errorMain:u.textSecondary},...t}})]})},Di=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:o="subtitle2",placeholder:s,value:c,sx:p,...f})=>{const d=Pn(),u=P.useId(),x=c==null||c===""||Array.isArray(c)&&c.length===0,k=m=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...m,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:d.textSecondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(g.FormControl,{fullWidth:!0,size:a,error:!!f.error,variant:"outlined",children:[e&&l.jsx(g.Typography,{variant:o,sx:{color:d.textPrimary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(g.InputLabel,{id:u,shrink:!x||!!s,sx:{color:d.textSecondary,"&.Mui-focused":{color:d.textPrimary},"&.Mui-error":{color:d.errorMain}},children:t}),l.jsx(g.Select,{...f,value:c,labelId:t?u:void 0,label:t,displayEmpty:!0,input:l.jsx(g.OutlinedInput,{label:t}),IconComponent:k,renderValue:m=>{const C=m;if(x)return l.jsx("span",{style:{color:d.textSecondary},children:s??""});const v=r.find(w=>w.value===C);return(v==null?void 0:v.label)??String(C)},endAdornment:n?l.jsx(g.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${d.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:d.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:d.textPrimary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:d.outlineDefault},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:d.outlineHover},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:d.outlineFocus},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:d.errorMain},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...p},children:n?l.jsx(g.MenuItem,{disabled:!0,children:l.jsx(g.CircularProgress,{size:16})}):r.map(m=>l.jsx(g.MenuItem,{value:m.value,sx:{backgroundColor:d.paper,color:d.textPrimary,fontSize:14,mx:1,"&:hover":{backgroundColor:d.neutral50,borderRadius:"4px"},"&.Mui-selected":{backgroundColor:d.neutral50,borderRadius:"4px"}},children:m.label},m.value))}),i&&l.jsx(g.FormHelperText,{children:i})]})},pc=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:o,onChange:s,labelVariant:c="subtitle2",disabled:p,loading:f,error:d,helperText:u,onOpen:x,noOptionsText:k,sx:m})=>{const C=Pn(),v=w=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...w,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:C.textSecondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(g.Box,{children:[a&&l.jsx(g.Typography,{variant:c,sx:{color:C.textPrimary,mb:.5,fontWeight:500},children:a}),l.jsx(g.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:l.jsx(v,{}),disabled:p,loading:f,onOpen:x,noOptionsText:k,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${C.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:C.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:C.outlineDefault},"&:hover fieldset":{borderColor:C.outlineHover},"&.Mui-focused fieldset":{borderColor:C.outlineFocus},"&.Mui-error fieldset":{borderColor:C.errorMain}},"& .MuiInputBase-input":{color:C.textPrimary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:C.textSecondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...m},getOptionLabel:w=>typeof w=="string"?w:(w==null?void 0:w.label)??"",isOptionEqualToValue:(w,$)=>((w==null?void 0:w.value)??w)===(($==null?void 0:$.value)??$),renderOption:(w,$,{selected:F})=>{const{key:E,..._}=w;return l.jsxs(g.Box,{component:"li",..._,sx:{backgroundColor:C.paper,color:C.textPrimary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:C.neutral50},"&.Mui-focused":{backgroundColor:C.neutral50},...F?{backgroundColor:C.neutral50}:{}},children:[n&&l.jsx(g.Checkbox,{checked:F}),l.jsx(g.Typography,{variant:"body2",sx:{color:C.textPrimary,fontSize:14},children:typeof $=="string"?$:$.label})]},E)},renderInput:w=>l.jsx(g.TextField,{...w,label:i,placeholder:o,size:"small",error:d,helperText:u,InputLabelProps:{shrink:!!r||!!o,sx:{color:C.textSecondary,"&.Mui-focused":{color:C.textPrimary},"&.Mui-error":{color:C.errorMain}}},InputProps:{...w.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[f?l.jsx(g.CircularProgress,{size:20}):null,w.InputProps.endAdornment]})}}),onChange:(w,$)=>s($)})]})},Ut=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,o)=>n(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),dc=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:c,error:p,groupPadding:f=1.5,itemGap:d=1,disabled:u=!1})=>{const x=typeof i=="number"&&i>0,k=x?i:12,m=i===!0,C=i===!1&&!x,v=(w,$)=>{const F=Array.isArray(r)?[...r]:[];$?F.includes(w)||a([...F,w]):a(F.filter(E=>E!==w))};return l.jsxs(g.FormControl,{error:p,disabled:u,sx:w=>{var $;return{display:"flex",flexDirection:"column",px:w.spacing(f),borderRadius:(($=w.shape)==null?void 0:$.borderRadius)||8,mx:-2.5,backgroundColor:w.palette.background.paper}},children:[o==="top"&&e&&l.jsx(g.Typography,{variant:s,sx:w=>({color:w.palette.text.primary,mb:.5,fontSize:w.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(g.FormLabel,{sx:w=>({color:w.palette.text.secondary,mb:.5,mx:1,fontSize:w.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:w.palette.text.primary},"&.Mui-error":{color:w.palette.error.main}}),children:t}),x&&l.jsx(g.Box,{sx:w=>({display:"grid",gridTemplateColumns:`repeat(${k}, 1fr)`,gap:w.spacing(d),mt:0}),children:n.map(w=>{const $=Array.isArray(r)&&r.includes(w.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:$,onChange:F=>v(w.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:w.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(w.value))})}),m&&l.jsx(g.Box,{sx:w=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:w.spacing(d),alignItems:"center",mt:0}),children:n.map(w=>{const $=Array.isArray(r)&&r.includes(w.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:$,onChange:F=>v(w.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:w.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(w.value))})}),C&&l.jsx(g.Box,{sx:w=>({display:"flex",flexDirection:"column",gap:w.spacing(d),alignItems:"flex-start",mt:0}),children:n.map(w=>{const $=Array.isArray(r)&&r.includes(w.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:$,onChange:F=>v(w.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:w.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(w.value))})}),c&&l.jsx(g.FormHelperText,{sx:{mt:.5},children:c})]})},fi=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(g.FormControlLabel,{control:l.jsx(g.Switch,{checked:t,disabled:r,onChange:(a,o)=>n(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),wr=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:c,error:p,groupPadding:f=1.5,itemGap:d=1})=>l.jsxs(g.FormControl,{error:p,sx:u=>{var x;return{display:"flex",flexDirection:"column",px:u.spacing(f),borderRadius:((x=u.shape)==null?void 0:x.borderRadius)||8,mx:-2.5,backgroundColor:u.palette.background.paper}},children:[o==="top"&&e&&l.jsx(g.Typography,{variant:s,sx:u=>({color:u.palette.text.primary,mb:.5,fontSize:u.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(g.FormLabel,{sx:u=>({color:u.palette.text.secondary,mb:.5,mx:1,fontSize:u.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:u.palette.text.primary},"&.Mui-error":{color:u.palette.error.main}}),children:t}),l.jsx(g.RadioGroup,{row:i,value:r,onChange:u=>a(u.target.value),sx:u=>({display:"flex",flexDirection:i?"row":"column",gap:u.spacing(d),alignItems:i?"center":"flex-start"}),children:n.map(u=>l.jsx(g.FormControlLabel,{value:u.value,control:l.jsx(g.Radio,{size:"small",sx:x=>({color:x.palette.text.secondary,"&.Mui-checked":{color:x.palette.primary.main}})}),label:l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(g.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:u.label}),u.description&&l.jsx(g.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:u.description})]}),sx:{m:0,gap:0,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(u.value)))}),c&&l.jsx(g.FormHelperText,{sx:{mt:.5},children:c})]}),fo=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>l.jsxs(g.Box,{children:[e==="top"&&r&&l.jsx(g.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),l.jsx(g.TextField,{fullWidth:!0,type:"date",size:"small",label:e==="inner"?r:void 0,InputLabelProps:{shrink:!0},...i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...n}})]}),fc=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const o=Pn(),s=!!e;return l.jsxs(g.Box,{children:[s&&l.jsx(g.Typography,{variant:t,sx:{color:o.textPrimary,mb:.5,fontWeight:500},children:e}),l.jsx(g.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:o.paper,borderRadius:"8px","& fieldset":{borderColor:o.outlineDefault},"&:hover fieldset":{borderColor:o.outlineHover},"&.Mui-focused fieldset":{borderColor:o.outlineFocus},"&.Mui-error fieldset":{borderColor:o.errorMain}},"& .MuiInputBase-input":{color:o.textPrimary,fontSize:14},"& .MuiFormLabel-root":{color:o.textSecondary},"& .MuiFormLabel-root.Mui-focused":{color:o.textPrimary},"& .MuiFormHelperText-root":{color:r?o.errorMain:o.textSecondary},...n}})]})},hc=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>l.jsxs(g.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&l.jsx(g.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:16,fontWeight:500,lineHeight:1.3}),children:e}),t&&l.jsx(g.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:500}),children:t})]}),r&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),yn=pt(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),mc=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:l.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_5814_24904",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function gc({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:o,showIndex:s=!0,showLeftIcon:c=!0,renderItem:p,chipText:f,helperText:d,emptyStateText:u,emptyStateButtonText:x="Add Phase",onEmptyStateButtonClick:k,emptyStateSx:m}){const[C,v]=P.useState(null),[w,$]=P.useState(null),F=h=>B=>{if(!i){v(h),B.dataTransfer.effectAllowed="move";try{B.dataTransfer.setData("text/plain",String(t(e[h])))}catch{}}},E=h=>B=>{i||(B.preventDefault(),$(h),B.dataTransfer.dropEffect="move")},_=h=>B=>{if(i)return;if(B.preventDefault(),C===null||C===h){v(null),$(null);return}const q=[...e],[Z]=q.splice(C,1);q.splice(h,0,Z),v(null),$(null),r(q)},I=()=>{v(null),$(null)},R=e.length===0,Y=R&&(u||k!==void 0);return l.jsxs(g.Box,{role:"list",sx:h=>({display:"flex",flexDirection:"column",gap:h.spacing(1),...a}),children:[n,!R&&l.jsx(g.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),Y?l.jsxs(g.Box,{sx:h=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:h.spacing(4),backgroundColor:h.palette.mode==="dark"?"#000000":Fe.background.paper,border:`2px dashed ${h.palette.mode==="dark"?"#FFFFFF":Fe.divider}`,borderRadius:"8px",textAlign:"center",...m}),children:[u&&l.jsx(g.Typography,{variant:"body1",sx:h=>({color:h.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:k?2:0,maxWidth:"400px"}),children:u}),k&&l.jsx(g.Button,{variant:"outlined",startIcon:l.jsx(yn,{}),onClick:k,disabled:i,sx:h=>({mt:u?0:2,backgroundColor:h.palette.mode==="dark"?`${h.palette.primary.main}1A`:`${h.palette.primary.main}0D`,borderColor:h.palette.primary.main,color:h.palette.primary.main,"&:hover":{backgroundColor:h.palette.mode==="dark"?`${h.palette.primary.main}33`:`${h.palette.primary.main}1A`,borderColor:h.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:x})]}):e.map((h,B)=>{const q=C===B,Z=w===B&&C!==null&&C!==B;return l.jsx(g.Box,{role:"listitem",draggable:!i,onDragStart:F(B),onDragOver:E(B),onDrop:_(B),onDragEnd:I,sx:L=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${Z?L.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:L.spacing(1),opacity:q?.6:1,boxShadow:Z?`0 0 0 2px ${L.palette.primary.main}33`:"none"}),children:p?p(h,q):l.jsxs(g.Box,{sx:L=>({display:"flex",alignItems:"center",gap:L.spacing(1),minWidth:0}),children:[c&&l.jsx(mc,{}),s&&l.jsxs(g.Typography,{variant:"body2",sx:L=>({fontWeight:600,fontSize:14,color:`${L.palette.text.primary}`,flex:"0 0 auto"}),children:[B+1,"."]}),(()=>{const L=typeof f=="function"?f(h,B):f;return L?l.jsx(g.Chip,{label:L,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(g.Typography,{variant:"body2",sx:L=>({fontSize:12,fontWeight:500,color:`${L.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:o?o(h):""})]})},String(t(h)))}),!R&&d?typeof d=="string"?l.jsx(g.Typography,{variant:"caption",sx:h=>({color:`${h.palette.text.primary}60`}),children:d}):d:null]})}const Gh=yt(g.StepConnector)(({theme:e})=>{const t=e.palette.divider||"#E8E8E8",r=e.palette.primary.main;return{[`&.${g.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${g.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:t,transition:"border-color 0.3s ease"},[`&.${g.stepConnectorClasses.completed} .${g.stepConnectorClasses.line}`]:{borderColor:r}}}),Qh=({items:e,activeIndex:t=1,onStepClick:r,sx:n,completedSteps:i})=>{const a=ao(),o=a.palette.primary.main,s=a.palette.text.primary,c=a.palette.divider,p=a.palette.action&&a.palette.action.disabledBackground||"#E8E8E8",f=d=>{const{active:u,completed:x,icon:k}=d;return x?l.jsx(g.Box,{sx:{width:24,height:24,border:`1.2px solid ${o}`,borderRadius:"50%",backgroundColor:o,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(po,{sx:{fontSize:16,fontWeight:600}})}):u?l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${o}`,backgroundColor:ut(o,.2),color:o,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:k}):l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:p,color:s,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:k})};return l.jsx(g.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Gh,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:s,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((d,u)=>{const x=Array.isArray(i)&&i.length>0?i.includes(u):u<t;return l.jsxs(g.Step,{onClick:()=>r==null?void 0:r(u),completed:x,children:[l.jsx(g.StepLabel,{StepIconComponent:f,children:l.jsx(g.Typography,{sx:{fontSize:12,fontWeight:500,color:u===t?o:s},children:d.label})}),u!==e.length-1&&l.jsx(g.Divider,{sx:{ml:4.2,borderColor:c}})]},u)})})},ho=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...o})=>l.jsx(g.Chip,{...o,sx:s=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${ut(t||s.palette.text.primary,.5)}`,backgroundColor:ut(t||s.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||s.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Zh=yt(g.StepConnector)(({theme:e})=>{const t=e.palette.divider||"#E8E8E8",r=e.palette.primary.main;return{[`&.${g.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${g.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:t,transition:"border-color 0.3s ease"},[`&.${g.stepConnectorClasses.completed} .${g.stepConnectorClasses.line}`]:{borderColor:r}}}),Xh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=ao(),a=i.palette.primary.main,o=i.palette.text.primary,s=i.palette.action&&i.palette.action.disabledBackground||"#E8E8E8",[c,p]=P.useState(null),f=d=>{const{active:u,completed:x,icon:k}=d;return x?l.jsx(g.Box,{sx:{width:24,height:24,border:`1.2px solid ${a}`,borderRadius:"50%",backgroundColor:a,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(po,{sx:{fontSize:16,fontWeight:600}})}):u?l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${a}`,backgroundColor:ut(a,.2),color:a,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:k}):l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:s,color:o,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:k})};return l.jsx(g.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Zh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:o,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((d,u)=>l.jsxs(g.Step,{onMouseEnter:()=>p(u),onMouseLeave:()=>p(null),onClick:()=>r==null?void 0:r(u),completed:u<t,children:[l.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(g.StepLabel,{StepIconComponent:f,children:[l.jsxs(g.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(g.Typography,{sx:{fontSize:14,fontWeight:500,color:u===t?a:o},children:d.label}),l.jsx(ho,{size:"small",colorHex:u<t?a:u===t?"#973B00":o,label:u<t?"Completed":u===t?"In progress":"Not started"})]}),l.jsx(g.Typography,{sx:{fontSize:12,fontWeight:400,color:ut(o,.38),mt:.5,width:"80%"},children:d.description})]}),c===u&&l.jsx(g.Button,{sx:{display:u>t?"none":"block"},variant:u<t?"outlined":"contained",size:"small",color:"primary",children:u<t?"Edit":u===t?"Complete":""})]}),u!==e.length-1&&l.jsx(g.Divider,{sx:{ml:4.2,borderColor:i.palette.divider}})]},u))})},Jh=pt(l.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),em=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:o,sx:s})=>{const c=o||Fe.info.main,p=ut(c,.08),f=ut(c,.08),d=a??l.jsx(Jh,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(g.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${f}`,boxShadow:"none",...s},children:[l.jsx(g.Box,{sx:{display:"flex",alignItems:"center"},children:d}),l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})]}):e==="inline"?l.jsx(g.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${f}`,boxShadow:"none",...s},children:l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})}):e==="listWithHeader"?l.jsxs(g.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:p,border:`1px solid ${f}`,...s},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[d,l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),r&&l.jsx(g.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:r}),l.jsx(g.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:c,my:-.5}},children:i.map((u,x)=>l.jsx(g.ListItem,{sx:{py:0},children:l.jsx(g.ListItemText,{primary:u})},x))})]}):l.jsx(g.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:p,border:`0.5px solid ${f}`,boxShadow:"none",...s},children:l.jsx(g.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:c,my:-.5}},children:i.map((u,x)=>l.jsx(g.ListItem,{sx:{py:0},children:l.jsx(g.ListItemText,{primary:u})},x))})})},yc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>l.jsxs(g.Box,{children:[l.jsx(g.Tabs,{value:e,onChange:(o,s)=>t(s),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((o,s)=>{const c=typeof o.value=="string"||typeof o.value=="number"?o.value:s;return l.jsx(g.Tab,{value:c,disabled:o.disabled,label:l.jsx(g.Typography,{variant:"body2",children:o.label}),sx:p=>({px:2,textTransform:"none",color:p.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:p.palette.action.hover},"&.Mui-selected":{color:p.palette.common.white,borderColor:p.palette.primary.main,backgroundColor:p.palette.primary.main,fontWeight:600},...a})},String(c))})}),r.map((o,s)=>{const c=typeof o.value=="string"||typeof o.value=="number"?o.value:s,p=o.content??(typeof o.value=="object"?o.value:null);return p&&e===c?l.jsx(g.Box,{sx:{mt:1},children:p},`panel-${c}`):null})]}),tm=pt(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),xc=({name:e,columns:t,initialRow:r,addLabel:n,maxRows:i,hideAddWhenMax:a,disableAddWhenMax:o=!0,showEmptyState:s=!0,rowDeletable:c=!0,control:p,sx:f,addActions:d,emptyTitle:u="No items configured",emptySubtitle:x="Click 'Add' to get started.",emptyCardSx:k,setValue:m,rowSelectionMode:C,rowSelectionKey:v})=>{const{fields:w,append:$,remove:F}=wu({control:p,name:e}),_=!(typeof i=="number"?w.length>=i:!1),I=P.useMemo(()=>{if(v)return v;const H=t.find(G=>G.type==="rowSelect");return H==null?void 0:H.key},[t,v]),R=gl({control:p,name:e})||[],Y=P.useMemo(()=>{if(!I)return{};const H={};return R.forEach((G,re)=>{H[re]=!!(G!=null&&G[I])}),H},[R,I]),h=P.useCallback(H=>Y[H]===!0,[Y]),B=P.useCallback((H,G)=>{if(!m||!I)return;const re=`${e}.${H}.${I}`;C==="single"&&G&&R.forEach((ce,D)=>{if(D!==H){const U=`${e}.${D}.${I}`;m(U,!1,{shouldDirty:!0})}}),m(re,G,{shouldDirty:!0})},[e,I,C,m,R]),q=H=>{const G={...H||r};t.forEach(re=>{re.value!==void 0&&G[re.key]===void 0&&(G[re.key]=typeof re.value=="function"?re.value(G,w.length):re.value)}),$(G)};P.useEffect(()=>{!s&&w.length===0&&_&&q()},[s,w.length,_]);const Z=P.useMemo(()=>t.reduce((G,re)=>{if(re.width==="auto"||re.width===void 0)return G+120;const ce=typeof re.width=="number"?re.width:typeof re.width=="string"&&parseInt(re.width)||160;return G+ce},0)+(c?100:0),[t,c]),L=H=>H.width==="auto"||H.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof H.width=="number"?{width:`${H.width}px`,minWidth:`${H.width}px`,maxWidth:`${H.width}px`}:typeof H.width=="string"?{width:H.width,minWidth:H.width}:{width:"160px",minWidth:"160px"};return l.jsx(g.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"visible",...f},children:w.length===0&&s?l.jsxs(g.Box,{sx:H=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:ut(H.palette.primary.main,.4),backgroundColor:ut(H.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...k}),children:[l.jsx(g.Typography,{variant:"subtitle1",sx:H=>({color:H.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:u}),l.jsx(g.Typography,{variant:"body2",sx:H=>({color:H.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:x}),Array.isArray(d)&&d.length>0?d.map((H,G)=>l.jsx(g.Button,{variant:"outlined",size:"small",startIcon:l.jsx(yn,{}),sx:{mr:1,mt:1},onClick:()=>q(H.template),disabled:!_&&o,style:{display:!_&&a?"none":void 0},children:H.label},`empty-add-${G}`)):n&&l.jsx(g.Button,{variant:"outlined",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>q(),disabled:!_&&o,style:{display:!_&&a?"none":void 0},children:n})]}):l.jsxs(l.Fragment,{children:[l.jsx(g.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(d)&&d.length>0?d.map((H,G)=>l.jsx(g.Button,{variant:G===0?"contained":"outlined",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>q(H.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:G===0?"#04502d":void 0}},disabled:!_&&o,style:{display:!_&&a?"none":void 0},children:H.label},`add-${G}`)):n&&l.jsx(g.Button,{variant:"contained",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>q(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},disabled:!_&&o,style:{display:!_&&a?"none":void 0},children:n})}),l.jsx(g.Box,{sx:{width:"100%",overflowX:"auto",overflowY:"auto",maxHeight:"600px","&::-webkit-scrollbar":{height:"8px",width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px","&:hover":{backgroundColor:"#555"}}},children:l.jsx(g.TableContainer,{sx:{width:"100%",minWidth:"100%"},children:l.jsxs(g.Table,{stickyHeader:!0,sx:{minWidth:`${Z||650}px`},children:[l.jsx(g.TableHead,{children:l.jsxs(g.TableRow,{children:[t.map(H=>l.jsx(g.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,...L(H)},children:H.header},H.key)),c&&l.jsx(g.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,width:100,textAlign:"center"},children:"Actions"})]})}),l.jsx(g.TableBody,{children:w.map((H,G)=>{const re=h(G),ce=C&&!re;return l.jsxs(g.TableRow,{children:[t.map(D=>{var pe;const U=`${e}.${G}.${D.key}`,X=D.type==="rowSelect"||D.key===I,ue=X?!1:ce?!0:typeof D.disabled=="function"?D.disabled(H,G):!!D.disabled;if(D.type==="index"){const te=D.indexFormat?D.indexFormat(G):`#${G+1}`;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((pe=D.cellSx)==null?void 0:pe.textAlign)||"center",...L(D),...D.cellSx},children:te},D.key)}if(D.value!==void 0&&D.editable===!1){const te=typeof D.value=="function"?D.value(H,G):D.value;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...L(D),...D.cellSx},children:te},D.key)}const fe=D.endorsementText?typeof D.endorsementText=="function"?D.endorsementText(H,G):D.endorsementText:void 0;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...L(D),...D.cellSx},children:D.type==="rowSelect"||X&&D.type==="checkbox"?l.jsx(Re,{name:U,control:p,defaultValue:!1,render:({field:te})=>l.jsx(Ut,{label:"",checked:!!te.value,disabled:!1,onChange:W=>{te.onChange(W),B(G,W)},sx:D.sx})}):D.type==="checkbox"?l.jsx(Re,{name:U,control:p,render:({field:te})=>l.jsx(Ut,{label:"",checked:!!te.value,disabled:ue,onChange:te.onChange,sx:D.sx})}):D.type==="select"?l.jsx(Re,{name:U,control:p,render:({field:te})=>l.jsx(Di,{...te,fullWidth:!0,disabled:ue,options:D.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...D.sx},helperText:D.helperText,required:D.required})}):D.type==="date"?l.jsx(Re,{name:U,control:p,defaultValue:D.value!==void 0?typeof D.value=="function"?D.value(H,G):D.value:void 0,render:({field:te})=>(P.useEffect(()=>{if(m&&(te.value===void 0||te.value===null||te.value==="")&&D.value!==void 0){const W=typeof D.value=="function"?D.value(H,G):D.value;m(U,W,{shouldValidate:!1})}},[U,te.value,D.value,H,G,m]),l.jsx(fo,{...te,fullWidth:!0,disabled:ue,size:"small",placeholder:D.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...D.sx},helperText:D.helperText,required:D.required}))}):l.jsx(Re,{name:U,control:p,defaultValue:D.value!==void 0?typeof D.value=="function"?D.value(H,G):D.value:void 0,render:({field:te})=>(P.useEffect(()=>{if(m&&(te.value===void 0||te.value===null||te.value==="")&&D.value!==void 0){const W=typeof D.value=="function"?D.value(H,G):D.value;m(U,W,{shouldValidate:!1})}},[U,te.value,D.value,H,G,m]),l.jsx(vt,{...te,fullWidth:!0,type:D.type==="number"?"number":"text",placeholder:D.placeholder,disabled:ue,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...D.sx},helperText:D.helperText,required:D.required,endorsementText:fe,endorsementBg:D.endorsementBg,endorsementColor:D.endorsementColor,endorsementRadius:D.endorsementRadius,endorsementHeight:D.endorsementHeight,endorsementPaddingX:D.endorsementPaddingX,inputProps:{...D.type==="number"?{min:D.min,max:D.max,step:D.step}:{minLength:D.minLength,maxLength:D.maxLength,pattern:D.pattern}}}))})},D.key)}),c&&l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(g.IconButton,{size:"small",color:"error",onClick:()=>F(G),sx:{width:"20px",height:"20px"},children:l.jsx(tm,{sx:{fontSize:"20px"}})})})]},H.id)})})]})})})]})})},vc=({name:e,control:t,items:r,sx:n,cardSx:i})=>l.jsx(g.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const o=!!a.leftAction,s=!!a.rightAction,c=!!(a.header||a.chipText),p=a.leftAction,f=a.rightAction;return l.jsxs(g.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[o&&p&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Re,{name:p.name,control:t,defaultValue:!1,render:({field:d})=>l.jsx(Ut,{label:p.label||"",checked:!!d.value,onChange:d.onChange,sx:{margin:0}})})}),c&&l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:o||s?1:"none",ml:o?1:0},children:[a.header&&l.jsx(g.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.jsx(g.Box,{sx:{bgcolor:"rgba(26,26,26,0.1)",px:1.5,py:.375,borderRadius:"4px",fontSize:"12px",color:"rgba(26,26,26,0.8)"},children:a.chipText})]}),s&&f&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Re,{name:f.name,control:t,defaultValue:!1,render:({field:d})=>l.jsx(fi,{label:f.label,checked:!!d.value,onChange:d.onChange,sx:{margin:0}})})}),!o&&!s&&!c&&l.jsx(g.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),bc=pt(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),na=pt(l.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),rm=[{label:"Interest-only",value:"interest-only"},{label:"Principal moratorium",value:"principal-moratorium"},{label:"EMI",value:"emi"},{label:"Equal-principal",value:"equal-principal"},{label:"Balloon",value:"balloon"},{label:"Bullet",value:"bullet"},{label:"Step-up/Down",value:"step-up-down"},{label:"Seasonal skips",value:"seasonal-skips"},{label:"Custom fixed installment",value:"custom-fixed"},{label:"Full payment holiday (no billing)",value:"payment-holiday"}],ia=[{label:"Accrue & capitalize at end of phase",value:"accrue-capitalize"},{label:"Accrue & bill in first period after phase",value:"accrue-bill-next"},{label:"Accrue & forgive at phase end",value:"accrue-forgive"}],nm=({phase:e,index:t,onUpdate:r,onDelete:n,months:i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],disabled:a=!1,sx:o})=>{const[s,c]=P.useState(e.seasonalMonths||[]),p=u=>{const x=s.includes(u)?s.filter(k=>k!==u):[...s,u];c(x),r(e.id,{seasonalMonths:x})},f=(()=>{const u=e.min||0;return u<0?"Min cannot be negative.":Number.isInteger(u)?null:"Use whole periods."})(),d=(()=>{const u=e.min||0,x=e.max||0;return Number.isInteger(x)?x<u?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(g.Card,{sx:{border:"2px solid",borderColor:Fe.divider,position:"relative",...o},children:l.jsxs(g.CardContent,{sx:{p:2},children:[l.jsxs(g.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(g.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(g.Box,{children:l.jsx(mc,{})}),l.jsx(ho,{label:t+1,size:"small"})]}),l.jsx(g.IconButton,{onClick:()=>n(e.id),disabled:a,sx:{color:Fe.error.main,"&:hover":{bgcolor:Qn[50]}},size:"small",children:l.jsx(bc,{fontSize:"small"})})]}),l.jsx(g.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(g.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(g.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(g.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx(Di,{labelText:"Phase type",value:e.type,onChange:u=>r(e.id,{type:u.target.value}),options:rm,disabled:a})}),l.jsxs(g.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(g.Typography,{variant:"caption",sx:{fontSize:"12px",color:Fe.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(vt,{type:"number",value:e.priority||5,onChange:u=>{const x=parseInt(u.target.value)||5;r(e.id,{priority:Math.min(9,Math.max(1,x))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(g.Box,{sx:{display:"grid",gap:1},children:l.jsx(vt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:u=>{const x=parseInt(u.target.value)||0;r(e.id,{min:x,...e.lockLength?{max:x}:{}})},inputProps:{min:0},disabled:a,error:!!f,helperText:f||void 0})}),l.jsx(g.Box,{sx:{display:"grid",gap:1},children:l.jsx(vt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:u=>r(e.id,{max:parseInt(u.target.value)||0}),inputProps:{min:0},disabled:a||e.lockLength,error:!!d&&!e.lockLength,helperText:e.lockLength?"Locked to Min":d||void 0,sx:e.lockLength?{opacity:.5}:{}})})]}),l.jsxs(g.Box,{sx:{display:"flex",gap:3},children:[l.jsx(Ut,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:u=>r(e.id,{lockLength:u,...u?{max:e.min}:{}}),disabled:a}),l.jsx(Ut,{label:"Residual fill",checked:e.residualFill||!1,onChange:u=>r(e.id,{residualFill:u}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(na,{sx:{fontSize:14,color:Fe.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ia,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:Fe.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(wr,{value:e.balloonType||"percent",onChange:u=>r(e.id,{balloonType:u}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(vt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:u=>r(e.id,{balloonAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(vt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:u=>r(e.id,{balloonPercent:parseFloat(u.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(g.Typography,{variant:"caption",sx:{color:Fe.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(vt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:u=>r(e.id,{stepPercent:parseFloat(u.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(vt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:u=>r(e.id,{stepEveryN:parseInt(u.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(g.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(u=>l.jsx(g.Chip,{label:u,size:"small",onClick:()=>!a&&p(u),sx:{cursor:a?"default":"pointer",bgcolor:s.includes(u)?Fe.primary.main:"transparent",color:s.includes(u)?Fe.primary.contrastText:Fe.text.primary,border:`1px solid ${Fe.divider}`,"&:hover":{bgcolor:s.includes(u)?Qn[600]:Qn[50]}}},u))})]}),l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(na,{sx:{fontSize:14,color:Fe.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ia,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:Fe.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(vt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:u=>r(e.id,{customAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(na,{sx:{fontSize:14,color:Fe.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:u=>r(e.id,{holidayInterestTreatment:u}),options:ia,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:Fe.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};async function wc(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:o="value",labelField:s="label",headers:c={},params:p={},body:f,transform:d,passThroughFields:u}=e;let x=i;if(t&&!i.startsWith("http")&&(x=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const F=/\{([^}]+)\}/g;x=x.replace(F,(E,_)=>{const I=n[_];return I!=null?encodeURIComponent(String(I)):""}),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const k=new URLSearchParams;Object.entries(p).forEach(([F,E])=>{E!=null&&k.append(F,String(E))}),k.toString()&&(x+=`${x.includes("?")?"&":"?"}${k.toString()}`);try{const F=/^https?:\/\//i.test(x),E=new URL(x,F?void 0:"http://local.placeholder"),_=Array.from(E.searchParams.entries());for(const[I,R]of _)(R===""||R==="undefined"||R==="null")&&E.searchParams.delete(I);F?x=E.toString():x=E.pathname+(E.search?E.search:""),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const m={"Content-Type":"application/json",...r,...c},C={method:a,headers:m};(a==="POST"||a==="PUT")&&f&&(C.body=JSON.stringify(f));const v=await fetch(x,C);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const w=await v.json();if(d)return d(Array.isArray(w)?w:w.data||w);const $=Array.isArray(w)?w:w.data||w;if(!Array.isArray($))throw new Error("API response is not an array");return $.map(F=>{const E={label:F[s]||F.name||F.title||String(F[o]||""),value:F[o]||F.id||F.value||""},_=Array.isArray(u)?u:void 0;if(Array.isArray(_))for(const I of _)F[I]!==void 0&&(E[I]=F[I]);return E})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function Sc(e,t,r,n,i=!1){const a=P.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const s=n[e.dependsOn];return s!==void 0?s:null},[e==null?void 0:e.dependsOn,n]),o=P.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return op({queryKey:o,queryFn:()=>{if(!e)throw new Error("API config is required");return wc(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:s=>Math.min(1e3*2**s,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function yr(e){return!!(e.apiConfig||e.api_endpoint)}function mo(e){return e.apiConfig?e.apiConfig:e.api_endpoint?{endpoint:e.api_endpoint,method:e.api_method||"GET",valueField:e.value_field||"value",labelField:e.label_field||"label",dependsOn:e.depends_on,conditional:e.conditional}:null}function im(e,t){const r=mo(e);if(!(r!=null&&r.conditional)&&!e.conditional)return!0;if(r!=null&&r.dependsOn||e.depends_on){const n=(r==null?void 0:r.dependsOn)||e.depends_on;if(n){const i=t[n];return i!=null&&i!==""}}return!0}const go=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:o})=>{const s=r[e.name],c=!!s,[p,f]=P.useState(!1),d=P.useRef(!1),[u,x]=P.useState(!1),[k,m]=P.useState(!1),[C,v]=P.useState(!1),w=P.useRef(null),$=P.useRef(null),F=()=>{var ae;const W=e.required;if(typeof W=="function")try{return!!W(a||{})}catch{return!1}if(W!==void 0)return!!W;const Q=(ae=e.validation)==null?void 0:ae.required;if(typeof Q=="function")try{return!!Q(a||{})}catch{return!1}return Q!==void 0?!!Q:!1},E=W=>F()?`${W} *`:W,_=()=>{if(e.value!==void 0){if(typeof e.value=="function")try{return e.value(a||{})}catch{return""}return e.value}return e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:""},I=P.useRef(void 0);P.useEffect(()=>{const W=e.value;if(typeof W!="function"||!o)return;let Q;try{Q=W(a||{})}catch{return}const ae=a?a[e.name]:void 0;if(I.current===void 0&&(I.current=Q),ae===void 0||ae===I.current)try{o(e.name,Q,{shouldValidate:!0,shouldDirty:!1}),I.current=Q}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((W,Q)=>({...W,[Q]:a[Q]}),{}):a||{}),e.name]);const R=P.useMemo(()=>{const W=mo(e);return W&&Array.isArray(e.passThroughFields)&&(W.passThroughFields=e.passThroughFields),W},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),Y=P.useRef(null),h=R!=null&&R.dependsOn?a==null?void 0:a[R.dependsOn]:null;P.useEffect(()=>{R!=null&&R.dependsOn&&(Y.current=h)},[R==null?void 0:R.dependsOn,h]);const B=P.useMemo(()=>{const W=e.showWhen;if(typeof W=="function")try{return!!W(a||{})}catch{return!0}if(W&&typeof W=="object"){const Q=W.field,ae=W.equals,se=W.in,le=Q?(a||{})[Q]:void 0;if(Q&&typeof ae<"u")return le===ae;if(Q&&Array.isArray(se))return se.includes(le)}return!0},[e.showWhen,a]),q=P.useCallback(()=>{const W=e.dynamicEndorsement;if(typeof W=="function")try{return W(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),Z=P.useCallback(()=>{const W=e.endAdornment,Q=e.endAdornmentSwitch,ae=e.endAdornmentCheckbox;if(Q)return l.jsx(Re,{name:Q,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:se})=>l.jsx(g.Switch,{checked:se.value||!1,onChange:le=>{se.onChange(le.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(le.target.checked,a,o)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(ae)return l.jsx(Re,{name:ae,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:se})=>l.jsx(Ut,{label:"",checked:se.value||!1,onChange:se.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof W=="function")try{return W(a||{},{control:t,setValue:o})}catch{return}return W},[e,a,t,o]),L=P.useMemo(()=>p&&yr(e)&&(!(R!=null&&R.dependsOn)||h),[p,e,R==null?void 0:R.dependsOn,h]),H=P.useMemo(()=>{const W={};if(!a)return W;const Q=(R==null?void 0:R.endpoint)||(e==null?void 0:e.api_endpoint);if(Q&&typeof Q=="string"){const ae=Q.match(/\{([^}]+)\}/g)||[];for(const se of ae){const le=se.slice(1,-1),ve=a[le];ve!==void 0&&(W[le]=ve)}}if(R!=null&&R.dependsOn){const ae=R.dependsOn,se=a[ae];se!==void 0&&(W[ae]=se)}return W},[R==null?void 0:R.endpoint,e==null?void 0:e.api_endpoint,R==null?void 0:R.dependsOn,a]),{data:G=[],isLoading:re,error:ce}=Sc(R,n,i,H,L),D=P.useCallback(()=>{yr(e)&&!d.current&&(d.current=!0,f(!0))},[e]),U=P.useCallback(()=>{yr(e)&&!d.current&&(d.current=!0,f(!0))},[e]);P.useEffect(()=>{if(yr(e)&&!d.current){const W=a==null?void 0:a[e.name];W!=null&&W!==""&&(d.current=!0,f(!0))}},[e,a]),P.useEffect(()=>{yr(e)&&(R!=null&&R.dependsOn)&&(h!=null&&`${h}`!=""?(d.current=!0,f(!0)):(d.current=!1,f(!1)))},[R==null?void 0:R.dependsOn,h]);const X=P.useCallback(W=>{if(typeof W=="function")try{const Q=W(a||{});return X(Q)}catch{return[]}return W?Array.isArray(W)?W.map(Q=>{if(Q&&typeof Q=="object"){const ae=Q.value??Q.id??Q.key??void 0,se=Q.label??Q.name??Q.title??(ae!==void 0?String(ae):"");return{label:String(se??""),value:String(ae??se??"")}}return{label:String(Q),value:String(Q)}}):typeof W=="object"?Object.keys(W).map(Q=>({value:String(Q),label:String(W[Q])})):[]:[]},[a]),ue=P.useCallback(()=>yr(e)?Array.isArray(G)?G:[]:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?X(e.options):[],[e,G,X]),fe=()=>{var W,Q,ae,se,le,ve;switch(e.type){case"title":return l.jsx(g.Typography,{variant:e.variant||"h4",component:"h1",color:e.color,align:e.align||"left",sx:{mb:3,fontWeight:600,...e.sx},children:e.label});case"section":return l.jsx(g.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left",sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const J=e.actionName,Ie=e.actionComponent,Ke=e.actionLabel,Ze=j=>l.jsx(hc,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:j??e.actions}),kt=j=>{if(e.cardWrap){const M={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(g.Card,{sx:M,...e.cardProps,children:j})}return j};return kt(J&&Ie?l.jsx(Re,{name:J,control:t,defaultValue:e.value??!1,render:({field:j})=>Ze(Ie==="switch"?l.jsx(fi,{label:Ke,checked:!!j.value,onChange:j.onChange}):l.jsx(Ut,{label:Ke||"",checked:!!j.value,onChange:j.onChange}))}):Ze());case"tabs":return l.jsx(Re,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((Q=(W=e.items)==null?void 0:W[0])==null?void 0:Q.value)=="string"||typeof((se=(ae=e.items)==null?void 0:ae[0])==null?void 0:se.value)=="number"?(ve=(le=e.items)==null?void 0:le[0])==null?void 0:ve.value:0),render:({field:j})=>{const y=e.items||[],M=y.map((z,K)=>({label:z.label,value:typeof z.value=="string"||typeof z.value=="number"?z.value:K,content:z.content,disabled:z.disabled})),b=j.value,A=(()=>{if(typeof b=="string"||typeof b=="number"){const z=y.findIndex((K,de)=>typeof K.value=="string"||typeof K.value=="number"?K.value===b:de===b);return z>=0?z:0}return Number(b)||0})(),V=y[A]||{};return l.jsxs(g.Box,{children:[l.jsx(yc,{value:j.value,onChange:j.onChange,items:M,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(V.fields)&&V.fields.length>0&&(()=>{const z=V.fields,K=[];let de=[];for(const me of z)me.type==="section"&&de.length>0?(K.push(de),de=[me]):de.push(me);de.length>0&&K.push(de);const ge={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1};return l.jsx(g.Box,{sx:{mt:1},children:K.map((me,Ne)=>{const Oe=me.find(Me=>Me.type==="section"),it=(Oe==null?void 0:Oe.cardWrap)!==!1,dt=l.jsx(l.Fragment,{children:me.map(Me=>{const ne=Me.showWhen;if(ne)try{if(typeof ne=="function"){if(!ne(a||{}))return null}else if(typeof ne=="object"){const Kt=ne.field,bo=ne.equals,wo=ne.in,So=Kt?(a||{})[Kt]:void 0;if(Kt&&typeof bo<"u"&&So!==bo||Kt&&Array.isArray(wo)&&!wo.includes(So))return null}}catch{}const Ge=Math.min(Math.max(Me.col??12,1),12);return l.jsx(g.Box,{sx:{gridColumn:`span ${Ge}`},children:l.jsx(go,{field:Me,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:o})},Me.name)})});return it?l.jsx(g.Card,{sx:{...ge,...(Oe==null?void 0:Oe.cardSx)||{}},...(Oe==null?void 0:Oe.cardProps)||{},children:dt},`tab-group-${Ne}`):l.jsx(g.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:dt},`tab-group-${Ne}`)})})})()]})}});case"grid":const Ye=e.defaultRows||[];return l.jsx(g.Box,{children:l.jsx(Re,{name:e.name,control:t,defaultValue:Ye.length>0?Ye:_()||[],render:()=>l.jsx(xc,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,showEmptyState:e.showEmptyState,maxRows:e.maxRows,hideAddWhenMax:e.hideAddWhenMax,disableAddWhenMax:e.disableAddWhenMax,rowDeletable:e.rowDeletable!==!1,control:t,setValue:o,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey})})});case"listcards":return l.jsx(vc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Re,{name:e.name,control:t,defaultValue:e.items||[],render:({field:j})=>{const y=e,M=j.value||y.items||[],b=typeof y.getId=="function"?y.getId:typeof y.getId=="string"?z=>z[y.getId]:z=>z.id??z._id??z.key??String(z),A=typeof y.getText=="function"?y.getText:typeof y.getText=="string"?z=>z[y.getText]??String(z):z=>z.text??z.label??z.name??z.title??String(z),V=(()=>{if(typeof y.chipText=="function")return y.chipText;if(typeof y.chipText=="string")return M.length>0&&M[0]&&y.chipText in M[0]?(z,K)=>z[y.chipText]??void 0:y.chipText})();return l.jsx(gc,{items:M,getId:b,onReorder:z=>{j.onChange(z)},header:y.header,disabled:e.disabled,sx:y.sx,chipText:V,helperText:y.helperText||(c?s==null?void 0:s.message:void 0),getText:A,showIndex:y.showIndex!==!1,showLeftIcon:y.showLeftIcon!==!1,renderItem:y.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:j})=>e.type==="textarea"?l.jsx(fc,{...j,labelText:e.labelPosition==="top"?E(e.label):void 0,label:e.labelPosition!=="top"?E(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(s==null?void 0:s.message)||e.helperText}):l.jsx(vt,{...j,id:e.id,labelText:e.labelPosition==="top"?E(e.label):void 0,label:e.labelPosition!=="top"?E(e.label):void 0,endAdornment:Z(),endorsementText:q(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?u?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(s==null?void 0:s.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(nc,{position:"end",children:l.jsx(Gn,{"aria-label":"toggle password visibility",onClick:()=>x(y=>!y),edge:"end",children:u?l.jsx(Rs,{}):l.jsx(_s,{})})})}:void 0})});case"number":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:j})=>l.jsx(vt,{...j,id:e.id,labelText:e.labelPosition==="top"?E(e.label):void 0,label:e.labelPosition!=="top"?E(e.label):void 0,endAdornment:Z(),endorsementText:q(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(s==null?void 0:s.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const We=ue();return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:j})=>{const y=typeof e.disabled=="function"?!!e.disabled(a||{}):!!e.disabled,M=e.disableWhenEmptyOptions===!0&&Array.isArray(We)&&We.length===0,b=y||M||re,A=j.value,V=(()=>{if(Array.isArray(We)&&We.length>0){const z=We.find(K=>String(K==null?void 0:K.value)===String(A));return z?z.value:A}return A})();return l.jsx(Di,{labelText:e.labelPosition==="top"?E(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?E(e.label):void 0,labelVariant:e.labelVariant,value:V,onChange:j.onChange,options:We,disabled:b,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?E(e.label):void 0):e.placeholder,loading:re,error:c||!!ce,helperText:(s==null?void 0:s.message)||(ce==null?void 0:ce.message)||e.helperText,onOpen:D})}});case"checkbox":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:j})=>l.jsx(Ut,{label:E(e.label),checked:!!j.value,disabled:e.disabled,onChange:j.onChange})});case"toggle":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:j})=>l.jsx(wr,{label:E(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:j.value,options:e.options||[],row:!0,onChange:j.onChange})});case"radio":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:j})=>l.jsx(wr,{label:E(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:j.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:j.onChange})});case"checkboxGroup":return l.jsx(Re,{name:e.name,control:t,defaultValue:_()||[],render:({field:j})=>l.jsx(dc,{label:E(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(j.value)?j.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:j.onChange,disabled:e.disabled})});case"switch":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:j})=>l.jsx(fi,{label:E(e.label),checked:!!j.value,disabled:e.disabled,onChange:j.onChange})});case"autocomplete":const Ue=ue(),S=!!((typeof e.disabled=="function"?e.disabled(a||{},{options:Ue,isLoading:re,error:ce}):e.disabled)||e.disableWhenEmptyOptions===!0&&Array.isArray(Ue)&&Ue.length===0||re||R!=null&&R.dependsOn&&!h);return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:j})=>{const y=j.value,M=e.multiple===!0,b=(R==null?void 0:R.valueField)||e.value_field||"value",A=z=>{if(z!=null){if(typeof z=="string"||typeof z=="number")return z;if(typeof z=="object"){if(z[b]!==void 0)return z[b];if(z.value!==void 0)return z.value;if(z.id!==void 0)return z.id}}},V=(()=>{if(M)return(Array.isArray(y)?y:[]).map(K=>{const de=String(typeof K=="object"?A(K):K);return Ue.find(me=>{const Ne=A(me);return Ne!==void 0&&String(Ne)===de})||null}).filter(Boolean);{if(y==null||y==="")return null;const z=String(typeof y=="object"?A(y):y),K=Ue.find(de=>{const ge=A(de);return ge!==void 0&&String(ge)===z});return K||null}})();return l.jsx(pc,{id:e.id,options:Ue,value:V,multiple:M,labelText:e.labelPosition==="top"?E(e.label):void 0,label:e.labelPosition!=="top"?E(e.label):void 0,placeholder:S&&(R!=null&&R.dependsOn)&&!h?`Please select ${R.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:S,loading:re,error:c||!!ce,helperText:(s==null?void 0:s.message)||(ce==null?void 0:ce.message)||e.helperText||"",onOpen:U,noOptionsText:S&&(R!=null&&R.dependsOn)&&!h?`Please select ${R.dependsOn.replace(/_/g," ")} first`:re?"Fetching data...":p&&!re&&Ue.length===0?"No options available":"Click to load options",onChange:z=>{const K=(R==null?void 0:R.valueField)||e.value_field||"value";if(M){const ge=(Array.isArray(z)?z:[]).map(me=>typeof me=="object"&&(me[K]||me.value||me.id)||me);j.onChange(ge)}else{let de;z&&typeof z=="object"?de=z[K]||z.value||z.id||z:de=z,j.onChange(de);const ge=e.selectedAssignments;if(ge&&z&&typeof z=="object")for(const[me,Ne]of Object.entries(ge)){const Oe=z[Ne];if(Oe!==void 0&&typeof o=="function")try{o(me,Oe,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:j})=>l.jsx(fo,{...j,id:e.name,label:E(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:c,helperText:s==null?void 0:s.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:j})=>{const y=j.value||e.defaultValue||e.src;if(y){const K=e.imageUploaded||{},de=K.previewText||"Preview",ge=K.removeText||"Remove",me=K.saveText||"Save logo",Ne=K.showSave!==void 0?K.showSave:!!(e.onSave||K.saveText),Oe=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(y)}catch{}},it=()=>{j.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},dt=()=>{typeof e.onSave=="function"&&e.onSave({url:y,file:$.current||void 0})},Me=ne=>{const Ge=ne.target.files&&ne.target.files[0];if(Ge){if(typeof e.onFileSelected=="function")try{e.onFileSelected(Ge)}catch{}try{const Kt=URL.createObjectURL(Ge);j.onChange(Kt)}catch{}$.current=Ge,v(!1)}};return l.jsxs(g.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...K.cardSx},children:[l.jsx("input",{type:"file",ref:w,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Me}),l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(g.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...K.thumbnailSx},children:l.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(g.Box,{sx:{flexGrow:1},children:[l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:500,...K.fileNameSx},children:typeof y=="string"?y.split("/").pop():"Selected image"}),l.jsx(g.Typography,{sx:{fontSize:"10px",...K.fileMetaSx},children:"Image selected"})]}),l.jsxs(g.Box,{sx:{display:"flex",gap:1},children:[l.jsx(g.Button,{type:"button",sx:{...K.previewButtonSx},variant:"outlined",onClick:Oe,startIcon:l.jsx(_s,{}),children:de}),l.jsx(g.Button,{variant:"outlined",color:"error",onClick:it,sx:{...K.removeButtonSx},startIcon:l.jsx(Rs,{}),children:ge}),Ne&&l.jsx(g.Button,{variant:"contained",onClick:dt,sx:{...K.saveButtonSx},children:me})]})]}),l.jsxs(g.Dialog,{open:C,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(g.DialogTitle,{children:K.previewTitle||"Image preview"}),l.jsx(g.DialogContent,{children:l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:l.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(g.DialogActions,{children:[l.jsx(g.Button,{type:"button",variant:"outlined",onClick:()=>{var ne;return(ne=w.current)==null?void 0:ne.click()},children:K.replaceText||"Replace logo"}),l.jsx(g.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:K.closeText||"Close"})]})]})]})}const M=e.imagePlaceholder||{},b=M.icon||"upload",A=w,V=()=>{var K;try{(K=A.current)==null||K.click()}catch{}},z=K=>{const de=K.target.files&&K.target.files[0];if(de){typeof e.onFileSelected=="function"&&e.onFileSelected(de);try{const ge=URL.createObjectURL(de);j.onChange(ge)}catch{}$.current=de}};return l.jsxs(g.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...M.sx},children:[l.jsx("input",{type:"file",ref:A,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:z}),l.jsx(Gn,{sx:{borderRadius:"8px",...M.iconSx},children:b==="image"?l.jsx(Nh,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(di,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(g.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...M.titleSx},children:M.title||"Drag & Drop the image here"}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...M.subtitleSx},children:M.subtitle||""}),l.jsx(g.Button,{onClick:V,sx:{my:2,...M.buttonSx},startIcon:l.jsx(di,{}),variant:"contained",disabled:e.disabled,children:M.buttonText||"Upload File"}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,...M.helperTextSx},children:M.helperText||e.helperText||""})]})}});case"component":return l.jsx(g.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:o})}catch{try{return e.render({control:t,formData:a,setValue:o})}catch{return e.render()}}})():e.render:e.content});default:return null}},pe=P.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),te=P.useCallback(async()=>{try{const W=a?a[e.name]:void 0;let Q="";W==null?Q="":Array.isArray(W)?Q=W.join(", "):typeof W=="object"?Q=JSON.stringify(W):Q=String(W),await navigator.clipboard.writeText(Q),m(!0),window.setTimeout(()=>m(!1),1200)}catch{}},[a,e.name]);return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(g.Box,{sx:{flexGrow:1},children:B?fe():null}),pe&&l.jsx(Gn,{"aria-label":`copy ${e.label||e.name}`,onClick:te,size:"small",children:k?l.jsx(po,{fontSize:"small"}):l.jsx(Vh,{fontSize:"small"})})]})};var aa,$s;function am(){if($s)return aa;$s=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,w){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=w};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,s=new e(o),c=new e(o),p=new e(o);aa={Cache:e,split:d,normalizePath:f,setter:function(v){var w=f(v);return c.get(v)||c.set(v,function(F,E){for(var _=0,I=w.length,R=F;_<I-1;){var Y=w[_];if(Y==="__proto__"||Y==="constructor"||Y==="prototype")return F;R=R[w[_++]]}R[w[_]]=E})},getter:function(v,w){var $=f(v);return p.get(v)||p.set(v,function(E){for(var _=0,I=$.length;_<I;)if(E!=null||!w)E=E[$[_++]];else return;return E})},join:function(v){return v.reduce(function(w,$){return w+(x($)||r.test($)?"["+$+"]":(w?".":"")+$)},"")},forEach:function(v,w,$){u(Array.isArray(v)?v:d(v),w,$)}};function f(v){return s.get(v)||s.set(v,d(v).map(function(w){return w.replace(a,"$2")}))}function d(v){return v.match(t)||[""]}function u(v,w,$){var F=v.length,E,_,I,R;for(_=0;_<F;_++)E=v[_],E&&(C(E)&&(E='"'+E+'"'),R=x(E),I=!R&&/^\d+$/.test(E),w.call($,E,R,I,_,v))}function x(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function k(v){return v.match(n)&&!v.match(r)}function m(v){return i.test(v)}function C(v){return!x(v)&&(k(v)||m(v))}return aa}var _r=am(),oa,Ds;function om(){if(Ds)return oa;Ds=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=f=>f.match(e)||[],r=f=>f[0].toUpperCase()+f.slice(1),n=(f,d)=>t(f).join(d).toLowerCase(),i=f=>t(f).reduce((d,u)=>`${d}${d?u[0].toUpperCase()+u.slice(1).toLowerCase():u.toLowerCase()}`,"");return oa={words:t,upperFirst:r,camelCase:i,pascalCase:f=>r(i(f)),snakeCase:f=>n(f,"_"),kebabCase:f=>n(f,"-"),sentenceCase:f=>r(n(f," ")),titleCase:f=>t(f).map(r).join(" ")},oa}var sa=om(),Ln={exports:{}},Is;function sm(){if(Is)return Ln.exports;Is=1,Ln.exports=function(i){return e(t(i),i)},Ln.exports.array=e;function e(i,a){var o=i.length,s=new Array(o),c={},p=o,f=r(a),d=n(i);for(a.forEach(function(x){if(!d.has(x[0])||!d.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});p--;)c[p]||u(i[p],p,new Set);return s;function u(x,k,m){if(m.has(x)){var C;try{C=", node was:"+JSON.stringify(x)}catch{C=""}throw new Error("Cyclic dependency"+C)}if(!d.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!c[k]){c[k]=!0;var v=f.get(x)||new Set;if(v=Array.from(v),k=v.length){m.add(x);do{var w=v[--k];u(w,d.get(w),m)}while(k);m.delete(x)}s[--o]=x}}}function t(i){for(var a=new Set,o=0,s=i.length;o<s;o++){var c=i[o];a.add(c[0]),a.add(c[1])}return Array.from(a)}function r(i){for(var a=new Map,o=0,s=i.length;o<s;o++){var c=i[o];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[1])}return a}function n(i){for(var a=new Map,o=0,s=i.length;o<s;o++)a.set(i[o],o);return a}return Ln.exports}var lm=sm();const cm=Qa(lm),um=Object.prototype.toString,pm=Error.prototype.toString,dm=RegExp.prototype.toString,fm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",hm=/^Symbol\((.*)\)(.*)$/;function mm(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Ms(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return mm(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return fm.call(e).replace(hm,"Symbol($1)");const n=um.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+pm.call(e)+"]":n==="RegExp"?dm.call(e):null}function cr(e,t){let r=Ms(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=Ms(this[n],t);return a!==null?a:i},2)}function Cc(e){return e==null?[]:[].concat(e)}let Ec,kc,Tc,gm=/\$\{\s*(\w+)\s*\}/g;Ec=Symbol.toStringTag;class zs{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Ec]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],Cc(t).forEach(a=>{if(lt.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}kc=Symbol.hasInstance;Tc=Symbol.toStringTag;class lt extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(gm,(i,a)=>cr(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const o=new zs(t,r,n,i);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Tc]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,lt)}static[kc](t){return zs[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Rt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${cr(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${cr(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${cr(r,!0)}\``+i}},at={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Zt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Da={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ia={isValue:"${path} field must be ${value}"},Zn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},ym={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},xm={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${cr(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${cr(r,!0)}\``}return lt.formatError(Rt.notType,e)}};Object.assign(Object.create(null),{mixed:Rt,string:at,number:Zt,date:Da,object:Zn,array:ym,boolean:Ia,tuple:xm});const yo=e=>e&&e.__isYupSchema__;class hi{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,o=typeof n=="function"?n:(...s)=>s.every(c=>c===n);return new hi(t,(s,c)=>{var p;let f=o(...s)?i:a;return(p=f==null?void 0:f(c))!=null?p:c})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(a=>a.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!yo(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const qn={context:"$",value:"."};function mi(e,t){return new mr(e,t)}class mr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===qn.context,this.isValue=this.key[0]===qn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?qn.context:this.isValue?qn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&_r.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}mr.prototype.__isYupRef=!0;const At=e=>e==null;function qr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:o},s,c){const{name:p,test:f,params:d,message:u,skipAbsent:x}=e;let{parent:k,context:m,abortEarly:C=o.spec.abortEarly,disableStackTrace:v=o.spec.disableStackTrace}=i;function w(B){return mr.isRef(B)?B.getValue(r,k,m):B}function $(B={}){const q=Object.assign({value:r,originalValue:a,label:o.spec.label,path:B.path||n,spec:o.spec,disableStackTrace:B.disableStackTrace||v},d,B.params);for(const L of Object.keys(q))q[L]=w(q[L]);const Z=new lt(lt.formatError(B.message||u,q),r,q.path,B.type||p,q.disableStackTrace);return Z.params=q,Z}const F=C?s:c;let E={path:n,parent:k,type:p,from:i.from,createError:$,resolve:w,options:i,originalValue:a,schema:o};const _=B=>{lt.isError(B)?F(B):B?c(null):F($())},I=B=>{lt.isError(B)?F(B):s(B)};if(x&&At(r))return _(!0);let Y;try{var h;if(Y=f.call(E,r,E),typeof((h=Y)==null?void 0:h.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Y).then(_,I)}}catch(B){I(B);return}_(Y)}return t.OPTIONS=e,t}function vm(e,t,r,n=r){let i,a,o;return t?(_r.forEach(t,(s,c,p)=>{let f=c?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:i,value:r});let d=e.type==="tuple",u=p?parseInt(f,10):0;if(e.innerType||d){if(d&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&u>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[u],e=d?e.spec.types[u]:e.innerType}if(!p){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=r,r=r&&r[f],e=e.fields[f]}a=f,o=c?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class gi extends Set{describe(){const t=[];for(const r of this.values())t.push(mr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new gi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Ur(e,t=new Map){if(yo(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Ur(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,Ur(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Ur(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Ur(i,t)}else throw Error(`Unable to clone ${e}`);return r}class gt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new gi,this._blacklist=new gi,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Rt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Ur(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&At(a))return a;let o=cr(t),s=cr(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
177
+
178
+ attempted value: ${o}
179
+ `+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=r,c=t;s||(c=this._cast(c,Object.assign({assert:!1},r)));let p=[];for(let f of Object.values(this.internalTests))f&&p.push(f);this.runTests({path:a,value:c,originalValue:o,options:r,tests:p},n,f=>{if(f.length)return i(f,c);this.runTests({path:a,value:c,originalValue:o,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:o,originalValue:s,path:c,options:p}=t,f=m=>{i||(i=!0,r(m,o))},d=m=>{i||(i=!0,n(m,o))},u=a.length,x=[];if(!u)return d([]);let k={value:o,originalValue:s,path:c,options:p,schema:this};for(let m=0;m<a.length;m++){const C=a[m];C(k,f,function(w){w&&(Array.isArray(w)?x.push(...w):x.push(w)),--u<=0&&d(x)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:o}){const s=t??r;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof s=="number";let p=n[s];const f=Object.assign({},o,{strict:!0,parent:n,value:p,originalValue:a[s],key:void 0,[c?"index":"key"]:s,path:c||s.includes(".")?`${i||""}[${c?s:`"${s}"`}]`:(i?`${i}.`:"")+t});return(d,u,x)=>this.resolve(f)._validate(p,f,u,x)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,r,(c,p)=>{lt.isError(c)&&(c.value=p),s(c)},(c,p)=>{c.length?s(new lt(c,p,void 0,void 0,a)):o(p)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(s,c)=>{throw lt.isError(s)&&(s.value=c),s},(s,c)=>{if(s.length)throw new lt(s,t,void 0,void 0,o);a=c}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(lt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(lt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Ur(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=qr({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=qr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Rt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Rt.notNull){return this.nullability(!1,t)}required(t=Rt.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Rt.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=qr(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=Cc(t).map(a=>new mr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new hi(i,r):hi.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=qr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Rt.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=qr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),n}notOneOf(t,r=Rt.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=qr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:o}=r.spec;return{meta:i,label:n,optional:a,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,p,f)=>f.findIndex(d=>d.name===c.name)===p)}}}gt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])gt.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:o}=vm(this,t,r,n.context);return o[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])gt.prototype[e]=gt.prototype.oneOf;for(const e of["not","nope"])gt.prototype[e]=gt.prototype.notOneOf;const bm=()=>!0;function jc(e){return new Fc(e)}class Fc extends gt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:bm},t))}}jc.prototype=Fc.prototype;function Ac(){return new Oc}class Oc extends gt{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=Ia.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return At(r)||r===!0}})}isFalse(t=Ia.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return At(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Ac.prototype=Oc.prototype;const wm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Sm(e){const t=Ma(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function Ma(e){var t,r;const n=wm.exec(e);return n?{year:Lt(n[1]),month:Lt(n[2],1)-1,day:Lt(n[3],1),hour:Lt(n[4]),minute:Lt(n[5]),second:Lt(n[6]),millisecond:n[7]?Lt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Lt(n[10]),minuteOffset:Lt(n[11])}:null}function Lt(e,t=0){return Number(e)||t}let Cm=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Em=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,km=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Tm="^\\d{4}-\\d{2}-\\d{2}",jm="\\d{2}:\\d{2}:\\d{2}",Fm="(([+-]\\d{2}(:?\\d{2})?)|Z)",Am=new RegExp(`${Tm}T${jm}(\\.\\d+)?${Fm}$`),Om=e=>At(e)||e===e.trim(),_m={}.toString();function xn(){return new _c}class _c extends gt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===_m?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Rt.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=at.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=at.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=at.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||at.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=at.email){return this.matches(Cm,{name:"email",message:t,excludeEmptyString:!0})}url(t=at.url){return this.matches(Em,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=at.uuid){return this.matches(km,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(Am,{name:"datetime",message:r||at.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||at.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const o=Ma(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:r||at.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=Ma(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=at.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Om})}lowercase(t=at.lowercase){return this.transform(r=>At(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>At(r)||r===r.toLowerCase()})}uppercase(t=at.uppercase){return this.transform(r=>At(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>At(r)||r===r.toUpperCase()})}}xn.prototype=_c.prototype;let Rm=e=>e!=+e;function Rc(){return new Pc}class Pc extends gt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Rm(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return n.isType(i)||i===null?i:parseFloat(i)})})}min(t,r=Zt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Zt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Zt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Zt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Zt.positive){return this.moreThan(0,t)}negative(t=Zt.negative){return this.lessThan(0,t)}integer(t=Zt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>At(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>At(i)?i:Math[t](i))}}Rc.prototype=Pc.prototype;let $c=new Date(""),Pm=e=>Object.prototype.toString.call(e)==="[object Date]";function xo(){return new $n}class $n extends gt{constructor(){super({type:"date",check(t){return Pm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=Sm(t),isNaN(t)?$n.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(mr.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=Da.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=Da.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}$n.INVALID_DATE=$c;xo.prototype=$n.prototype;xo.INVALID_DATE=$c;function $m(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let c=_r.split(o)[0];n.add(c),i.has(`${s}-${c}`)||r.push([s,c])}for(const o of Object.keys(e)){let s=e[o];n.add(o),mr.isRef(s)&&s.isSibling?a(s.path,o):yo(s)&&"deps"in s&&s.deps.forEach(c=>a(c,o))}return cm.array(Array.from(n),r).reverse()}function Bs(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function Dc(e){return(t,r)=>Bs(e,t)-Bs(e,r)}const Dm=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Xn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Xn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Xn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Xn)}):"optional"in e?e.optional():e}const Im=(e,t)=>{const r=[..._r.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=_r.getter(_r.join(r),!0)(e);return!!(i&&n in i)};let Vs=e=>Object.prototype.toString.call(e)==="[object Object]";function Ns(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Mm=Dc([]);function Ic(e){return new Mc(e)}class Mc extends gt{constructor(t){super({type:"object",check(r){return Vs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Mm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(d=>!this._nodes.includes(d))),c={},p=Object.assign({},r,{parent:c,__validating:r.__validating||!1}),f=!1;for(const d of s){let u=a[d],x=d in i;if(u){let k,m=i[d];p.path=(r.path?`${r.path}.`:"")+d,u=u.resolve({value:m,context:r.context,parent:c});let C=u instanceof gt?u.spec:void 0,v=C==null?void 0:C.strict;if(C!=null&&C.strip){f=f||d in i;continue}k=!r.__validating||!v?u.cast(i[d],p):i[d],k!==void 0&&(c[d]=k)}else x&&!o&&(c[d]=i[d]);(x!==d in c||c[d]!==i[d])&&(f=!0)}return f?c:i}_validate(t,r={},n,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...a],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(c,p)=>{if(!s||!Vs(p)){i(c,p);return}o=o||p;let f=[];for(let d of this._nodes){let u=this.fields[d];!u||mr.isRef(u)||f.push(u.asNestedTest({options:r,key:d,parent:p,parentPath:r.path,originalParent:o}))}this.runTests({tests:f,value:p,originalValue:o,options:r},n,d=>{i(d.sort(this._sortErrors).concat(c),p)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const o=n[i];n[i]=o===void 0?a:o}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=$m(t,r),n._sortErrors=Dc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Xn(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=_r.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return Im(a,t)&&(o=Object.assign({},a),n||delete o[t],o[r]=i(a)),o})}json(){return this.transform(Dm)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Zn.exact,test(r){if(r==null)return!0;const n=Ns(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Zn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=Ns(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Zn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(sa.camelCase)}snakeCase(){return this.transformKeys(sa.snakeCase)}constantCase(){return this.transformKeys(t=>sa.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,o]of Object.entries(r.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),n.fields[a]=o.describe(s)}return n}}Ic.prototype=Mc.prototype;const zc=e=>{const t={};return e.forEach(r=>{var o,s,c;let n;switch(r.type){case"text":case"textarea":case"tel":n=xn(),r.validation?n=gr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,p=>p?new RegExp(r.pattern).test(p):!0)));break;case"email":n=xn().email(((o=r.validation)==null?void 0:o.message)||`${r.label} must be a valid email address`),r.validation&&(n=gr(n,r,"string"));break;case"password":n=xn(),r.validation?n=gr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,p=>p?new RegExp(r.pattern).test(p):!0)));break;case"number":if(n=Rc().transform((p,f)=>f===""||f===null?void 0:p).nullable().typeError(`${r.label} must be a number`),r.validation)n=gr(n,r,"number");else{if(r.min!==void 0){const p=typeof r.min=="object"&&r.min!==null&&"field"in r.min,f=p?mi(r.min.field):r.min,d=p&&r.min.message?r.min.message:`${r.label} must be at least ${p?"the minimum value":r.min}`;n=n.min(f,d)}if(r.max!==void 0){const p=typeof r.max=="object"&&r.max!==null&&"field"in r.max,f=p?mi(r.max.field):r.max,d=p&&r.max.message?r.max.message:`${r.label} must be at most ${p?"the maximum value":r.max}`;n=n.max(f,d)}}break;case"select":n=xn(),r.validation&&(n=gr(n,r,"string"));break;case"checkbox":n=Ac(),r.validation&&(n=gr(n,r,"boolean"));break;case"date":n=xo().typeError(`${r.label} must be a valid date`),r.validation?n=gr(n,r,"date"):(r.minDate&&(n=n.min(new Date(r.minDate),`${r.label} must be after ${r.minDate}`)),r.maxDate&&(n=n.max(new Date(r.maxDate),`${r.label} must be before ${r.maxDate}`)));break;default:n=jc()}const i=((s=r.validation)==null?void 0:s.required)!==void 0?r.validation.required:r.required;if(typeof i=="function"?!1:!!i){const p=((c=r.validation)==null?void 0:c.message)||`${r.label} is required`;n=n.required(p)}t[r.name]=n}),Ic().shape(t)},gr=(e,t,r,n)=>{const i=t.validation;if(!i)return e;if(r==="string"){if(i.minLength!==void 0){const a=i.message||`${t.label} must be at least ${i.minLength} characters`;e=e.min(i.minLength,a)}if(i.maxLength!==void 0){const a=i.message||`${t.label} must be at most ${i.maxLength} characters`;e=e.max(i.maxLength,a)}}if(r==="number"){if(i.min!==void 0)if(typeof i.min=="object"&&"field"in i.min){const a=mi(i.min.field),o=i.min.message||i.message||`${t.label} must be at least the value of ${i.min.field}`;e=e.min(a,o)}else{const a=i.message||`${t.label} must be at least ${i.min}`;e=e.min(i.min,a)}if(i.max!==void 0)if(typeof i.max=="object"&&"field"in i.max){const a=mi(i.max.field),o=i.max.message||i.message||`${t.label} must be at most the value of ${i.max.field}`;e=e.max(a,o)}else{const a=i.message||`${t.label} must be at most ${i.max}`;e=e.max(i.max,a)}}if(i.pattern){const a=typeof i.pattern=="string"?new RegExp(i.pattern):i.pattern,o=i.message||`${t.label} format is invalid`;e=e.test("pattern",o,s=>s?a.test(s):!0)}return i.custom&&(e=e.test("custom",i.message||`${t.label} is invalid`,function(a){const o=this.parent||{},s=i.custom(a,o);return typeof s=="boolean"?s:!1})),e},Bc=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const o=P.useMemo(()=>Array.from({length:t},(f,d)=>d+1),[t]),s=P.useMemo(()=>Math.round(e/t*100),[e,t]),c=f=>n[f-1]||`Step ${f}`,p=f=>f===e||a.includes(f)||f===e+1&&a.includes(e);return l.jsxs(g.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:o.map((f,d)=>{const u=f===e,x=f<e||a.includes(f),k=u||x?"primary.main":"#8F97A4";return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center"},children:[l.jsxs(g.Box,{onClick:()=>p(f)&&r(f),sx:{display:"flex",alignItems:"center",cursor:p(f)?"pointer":"default"},children:[l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:u||x?"2px solid":"1px solid",borderColor:u||x?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:m=>u||x?ut(m.palette.primary.main,.2):"transparent",mr:.5,color:k,fontWeight:u||x?600:500,fontSize:"12px"},children:f}),i&&l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:600,color:k},children:c(f)})]}),d<o.length-1&&l.jsx(g.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:f<e?"primary.main":"#DFE3E8"}})]},f)})}),l.jsx(g.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${s}% complete`})]}),l.jsx(g.LinearProgress,{variant:"determinate",value:s,sx:{height:4,borderRadius:"50px",backgroundColor:f=>f.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Vc=({buttons:e,disabled:t=!1})=>{const r=s=>{s.onClick&&s.onClick()},n=e.filter(s=>s.position==="left"||!s.position),i=e.filter(s=>s.position==="center"),a=e.filter(s=>s.position==="right"),o=(s,c)=>{const p=(s.text||"").toLowerCase(),f=s.type==="submit"||p.includes("submit")||p.includes("save")||p.includes("next"),d=s.position==="left"||p.includes("cancel")||p.includes("back")||p.includes("draft"),u=s.type?s.type:f?"submit":"button",x=d?"outlined":"contained",k=s.disabled||t,m=C=>C&&["primary","secondary","error","info","success","warning"].includes(C)?C:"primary";return l.jsxs(g.Button,{type:u,variant:x,color:m(s.color),size:s.size||"large",disabled:k,onClick:s.onClick?()=>r(s):void 0,sx:s.sx,children:[s.loading&&l.jsx(g.CircularProgress,{size:20,sx:{mr:1}}),s.text]},`${s.text}-${c}`)};return l.jsxs(g.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(g.Box,{sx:{display:"flex",gap:2},children:n.map((s,c)=>o(s,c))}),l.jsx(g.Box,{sx:{display:"flex",gap:2},children:i.map((s,c)=>o(s,c))}),l.jsx(g.Box,{sx:{display:"flex",gap:2},children:a.map((s,c)=>o(s,c))})]})},zm=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:o})=>{const{buttons:s,position:c="right",layout:p="horizontal",spacing:f=2,sx:d}=e,u=v=>{let w="button",$="contained";return v.type?w=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?w="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(w="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&($="outlined"),{buttonType:w,buttonVariant:$}},x=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",k=v=>{const{buttonType:w}=u(v);v.onClick?v.onClick():w==="submit"&&t?t(o):a&&r&&(v.text.toLowerCase().includes("next")?r(n+1,i):(v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("previous"))&&r(n-1,i))},m=(v,w)=>{const{buttonType:$,buttonVariant:F}=u(v),E=x(v.color);return l.jsx(g.Button,{type:$,variant:F,color:E,size:v.size||"medium",disabled:v.disabled,onClick:()=>k(v),sx:v.sx,children:v.text},w)},C=()=>{const v={display:"flex",gap:f,...d};switch(c){case"left":return{...v,justifyContent:"flex-start"};case"center":return{...v,justifyContent:"center"};case"right":return{...v,justifyContent:"flex-end"};case"space-between":return{...v,justifyContent:"space-between"};default:return{...v,justifyContent:"flex-end"}}};return p==="vertical"?l.jsx(g.Box,{sx:C(),children:s.map((v,w)=>l.jsx(g.Box,{sx:{width:"100%"},children:m(v,w)},w))}):l.jsx(g.Box,{sx:C(),children:l.jsx(g.ButtonGroup,{variant:"outlined",size:"medium",children:s.map((v,w)=>m(v,w))})})},Nc=(e,t)=>{const r=e==null?void 0:e.showWhen;if(r){if(typeof r=="function")try{return!!r(t||{})}catch{return!0}if(r&&typeof r=="object"){const n=r.field,i=r.equals,a=r.in,o=n?(t||{})[n]:void 0;if(n&&typeof i<"u")return o===i;if(n&&Array.isArray(a))return a.includes(o)}}return!0},Jn=(e,t)=>{const r=[];for(const n of e)if(Nc(n,t)&&(r.push(n),n.type==="tabs"&&n.items)){const i=n.items||[],a=(t||{})[n.name],o=(()=>{if(typeof a=="string"||typeof a=="number"){const c=i.findIndex((p,f)=>typeof p.value=="string"||typeof p.value=="number"?p.value===a:f===a);return c>=0?c:0}return Number(a)||0})(),s=i[o]||{};Array.isArray(s.fields)&&r.push(...Jn(s.fields,t))}return r},Bm=new qu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Vm=e=>l.jsx(Yu,{client:Bm,children:l.jsx(Nm,{...e})}),Nm=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:o,defaultValues:s,showSubmitButton:c=!0,buttons:p,buttonGroup:f,stickyButtons:d,stickyButtonsSx:u,fixedButtons:x,fixedButtonsSx:k,formCardWrap:m,formCardSx:C,formCardProps:v,baseUrl:w,apiHeaders:$,stepNavigationProps:F})=>{var S,j;const E=[...new Set(r.map(y=>y.step).filter(y=>y!=null&&y>0))].sort((y,M)=>(y||0)-(M||0)),_=E.length>1,I=E.length||1,[R,Y]=P.useState(1),h=_?r.filter(y=>y.step===R):r,B=P.useCallback(y=>{const M=[];for(const b of y)if(M.push(b),b.type==="tabs"&&b.items)for(const A of b.items||[])Array.isArray(A.fields)&&M.push(...B(A.fields));return M},[]),{control:q,handleSubmit:Z,formState:{errors:L},watch:H,setValue:G,resetField:re,trigger:ce}=Su({resolver:P.useCallback((y,M,b)=>{const V=Jn(_?h:r,y),z=zc(V);return ku(z)(y,M,b)},[_,h,r]),mode:"onChange",defaultValues:s}),D=H(),U=P.useRef({});P.useEffect(()=>{const y=[];for(const M of r){const b=M.depends_on;b&&typeof M.name=="string"&&y.push({dependentField:M.name,dependencyName:b})}if(y.length!==0)for(const{dependentField:M,dependencyName:b}of y){const A=U.current[b],V=D==null?void 0:D[b];if(A!==V)try{re(M)}catch{}U.current[b]=V}},[r,D,re]);const X=P.useRef(i);P.useEffect(()=>{X.current=i},[i]);const ue=P.useMemo(()=>{try{return JSON.stringify(D)}catch{return String(Date.now())}},[D]),fe=P.useRef(null);P.useEffect(()=>{X.current&&fe.current!==ue&&(fe.current=ue,X.current(D))},[ue]);const pe=async()=>{if(!_)return!0;const y=r.filter(b=>b.step===R);for(const b of y)if(typeof b.required=="function"?!!b.required(D):!!b.required){const V=D[b.name];let z=!0;if(b.type==="checkbox"?z=V===!0:Array.isArray(V)?z=V.length>0:z=V!=null&&V!=="",!z)return!1}return await ce()?!0:Object.keys(L).filter(A=>y.some(V=>V.name===A)).map(A=>{const V=L[A];return typeof(V==null?void 0:V.message)=="string"?V.message:`${A} is invalid`}).length===0},te=P.useMemo(()=>{if(!_)return!0;const y=r.filter(b=>b.step===R);for(const b of y)if(typeof b.required=="function"?!!b.required(D):!!b.required){const V=D[b.name];let z=!0;if(b.type==="checkbox"?z=V===!0:Array.isArray(V)?z=V.length>0:z=V!=null&&V!=="",!z)return!1}return Object.keys(L).filter(b=>y.some(A=>A.name===b)).length===0},[_,R,r,D,L]),W=P.useCallback((y,M)=>Nc(y,M),[]),Q=P.useCallback(y=>{const M=[];for(const b of y)if(M.push(b),b.type==="tabs"&&b.items)for(const A of b.items||[])Array.isArray(A.fields)&&M.push(...Q(A.fields));return M},[]),ae=P.useCallback((y,M)=>Jn(y,M),[]),se=P.useMemo(()=>{if(_)return te;const y=Jn(r,D);for(const A of y){if(!W(A,D))continue;if(typeof A.required=="function"?!!A.required(D):!!A.required){const z=D[A.name];let K=!0;if(A.type==="checkbox"?K=z===!0:K=z!=null&&z!==""&&!(Array.isArray(z)&&z.length===0),!K)return!1}}const M=new Set(y.map(A=>A.name));return Object.keys(L).filter(A=>M.has(A)).length===0},[_,te,r,D,L,ae,W]),le=async y=>{y<1||y>I||y>R&&_&&!await pe()||Y(y)},ve=async y=>{if(_&&R<I){console.warn("Form submission attempted on non-final step");return}const b=(A=>{const V={...A||{}},z=Q(r);for(const K of z){if(!K||!K.name)continue;const de=V[K.name];if(K.type==="dragdroplist"&&Array.isArray(de)){const ge=K,me=ge.serialize;if(!me)continue;const Ne=de,Oe=typeof ge.getId=="function"?ge.getId:typeof ge.getId=="string"?ne=>ne==null?void 0:ne[ge.getId]:ne=>(ne==null?void 0:ne.id)??(ne==null?void 0:ne._id)??(ne==null?void 0:ne.key)??String(ne),it=typeof ge.getText=="function"?ge.getText:typeof ge.getText=="string"?ne=>(ne==null?void 0:ne[ge.getText])??String(ne):ne=>(ne==null?void 0:ne.text)??(ne==null?void 0:ne.label)??(ne==null?void 0:ne.name)??(ne==null?void 0:ne.title)??String(ne),dt=(()=>{if(typeof ge.chipText=="function")return ge.chipText;if(typeof ge.chipText=="string")return(ne,Ge)=>ne==null?void 0:ne[ge.chipText]})();let Me=de;typeof me=="function"?Me=Ne.map((ne,Ge)=>me(ne,Ge)):me==="ids"?Me=Ne.map(ne=>Oe(ne)):me==="text"?Me=Ne.map(ne=>it(ne)):me==="chips"?Me=Ne.map((ne,Ge)=>(typeof dt=="function"?dt(ne,Ge):void 0)??""):me&&typeof me=="object"&&"field"in me&&(Me=Ne.map(ne=>ne==null?void 0:ne[me.field])),V[K.name]=Me}}return V})(y);o&&o(b),n(b)},J=async y=>{y&&(y.preventDefault(),y.stopPropagation()),_&&R<I&&await pe()&&le(R+1)},Ie=y=>{y&&(y.preventDefault(),y.stopPropagation()),_&&R>1&&le(R-1)},Ke=y=>y.col?y.col:(y.xs||y.sm||y.md||y.lg||y.xl)&&(y.xs||y.sm||y.md||y.lg||y.xl)||12,Ze=t?g.createTheme({palette:{primary:{main:t.primaryColor||"#1976d2"},secondary:{main:t.secondaryColor||"#dc004e"},background:{default:t.backgroundColor||"#ffffff"},text:{primary:t.textColor||"#000000"}},shape:{borderRadius:t.borderRadius||4},spacing:t.spacing||8,typography:{fontFamily:((S=t.typography)==null?void 0:S.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((j=t.typography)==null?void 0:j.fontSize)=="number"?t.typography.fontSize:14}}):void 0,kt=()=>{const y=x?{position:"fixed",left:0,right:0,bottom:0,background:"#FFFFFF",pt:2,px:2,pb:2,zIndex:1300,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.08)",...k}:d?{position:"sticky",bottom:0,background:"#FFFFFF",pt:2,pb:2,zIndex:1200,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.04)",...u}:void 0;if(f&&f.buttons&&f.buttons.length>0){const M={...f,buttons:f.buttons.map(b=>{const A=(b.text||"").toLowerCase(),V=b.type==="submit"||A.includes("submit")||A.includes("save")||A.includes("finish")||A.includes("complete"),z=A.includes("next");let K=!1;return _?(V||z)&&(K=!te):V&&(K=!se),{...b,disabled:b.disabled||K}})};return l.jsx(g.Box,{sx:{mt:3,...y||{}},children:l.jsx(zm,{config:M,onSubmit:ve,onStepChange:le,currentStep:R,totalSteps:I,isMultiStep:_,formData:D})})}if(p&&p.length>0){const M=p.map(b=>{const A=(b.text||"").toLowerCase(),V=b.type==="submit"||A.includes("submit")||A.includes("save")||A.includes("finish")||A.includes("complete"),z=A.includes("next");let K=!1;return _?(V||z)&&(K=!te):V&&(K=!se),{...b,disabled:b.disabled||K}});return l.jsx(g.Box,{sx:y,children:l.jsx(Vc,{buttons:M})})}return c?l.jsx(g.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end",...y||{}},children:l.jsxs(g.Box,{sx:{display:"flex",gap:2},children:[_&&R>1&&l.jsx(g.Button,{type:"button",variant:"outlined",onClick:Ie,children:"Previous"}),_?R<I?l.jsx(g.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!te,onClick:J,children:"Next"}):l.jsx(g.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!te,children:a}):l.jsx(g.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!se,children:a})]})}):null},Ye=P.useMemo(()=>{const y=[];let M=[];for(const b of h)b.type==="section"&&M.length>0?(y.push(M),M=[b]):M.push(b);return M.length>0&&y.push(M),y},[h]),We=l.jsxs(g.Box,{component:"form",onSubmit:y=>{if(_&&R<I){y.preventDefault(),y.stopPropagation(),te&&J();return}Z(ve)(y)},id:e,onKeyDown:y=>{y.key==="Enter"&&_&&R<I&&(y.preventDefault(),te&&J())},sx:{pb:x?10:void 0},children:[_&&l.jsx(Bc,{currentStep:R,totalSteps:I,onStepChange:le,stepTitles:F==null?void 0:F.stepTitles,showStepTitles:(F==null?void 0:F.showStepTitles)!==!1}),Ye.map((y,M)=>{const b=y.find(de=>de.type==="section");if(b&&!W(b,D))return null;const A=(b==null?void 0:b.cardWrap)!==!1,V={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},z={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},K=l.jsx(l.Fragment,{children:y.map(de=>{if(!W(de,D))return null;const ge=Ke(de);return l.jsx(g.Box,{sx:{gridColumn:`span ${ge}`},children:l.jsx(go,{field:de,control:q,errors:L,baseUrl:w,apiHeaders:$,formData:D,setValue:G})},de.name)})});return A?l.jsx(g.Card,{sx:{...V,...(b==null?void 0:b.cardSx)||{}},...(b==null?void 0:b.cardProps)||{},children:K},`group-${M}`):l.jsx(g.Box,{sx:z,children:K},`group-${M}`)}),kt()]}),Ue=m?l.jsx(g.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...C},...v,children:We}):We;return Ze?l.jsx(g.ThemeProvider,{theme:Ze,children:Ue}):Ue},Lm=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:o})=>l.jsx(g.Box,{sx:{textAlign:"center"},children:l.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:o?"pointer":"default",...i},className:a,onClick:o,onError:s=>{s.currentTarget.src="/placeholder-image.png"}})});function Ir(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(f){try{p(n.next(f))}catch(d){o(d)}}function c(f){try{p(n.throw(f))}catch(d){o(d)}}function p(f){f.done?a(f.value):i(f.value).then(s,c)}p((n=n.apply(e,t||[])).next())})}const qm=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function ln(e,t,r){const n=Wm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&Ls(n,"path",a),Ls(n,"relativePath",a),n}function Wm(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=qm.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Ls(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Um=[".DS_Store","Thumbs.db"];function Hm(e){return Ir(this,void 0,void 0,function*(){return yi(e)&&Km(e.dataTransfer)?Zm(e.dataTransfer,e.type):Ym(e)?Gm(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Qm(e):[]})}function Km(e){return yi(e)}function Ym(e){return yi(e)&&yi(e.target)}function yi(e){return typeof e=="object"&&e!==null}function Gm(e){return za(e.target.files).map(t=>ln(t))}function Qm(e){return Ir(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>ln(r))})}function Zm(e,t){return Ir(this,void 0,void 0,function*(){if(e.items){const r=za(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(Xm));return qs(Lc(n))}return qs(za(e.files).map(r=>ln(r)))})}function qs(e){return e.filter(t=>Um.indexOf(t.name)===-1)}function za(e){if(e===null)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function Xm(e){if(typeof e.webkitGetAsEntry!="function")return Ws(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?qc(t):Ws(e,t)}function Lc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Lc(r):[r]],[])}function Ws(e,t){return Ir(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const o=yield a.getFile();return o.handle=a,ln(o)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return ln(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Jm(e){return Ir(this,void 0,void 0,function*(){return e.isDirectory?qc(e):eg(e)})}function qc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(o=>Ir(this,void 0,void 0,function*(){if(o.length){const s=Promise.all(o.map(Jm));i.push(s),a()}else try{const s=yield Promise.all(i);r(s)}catch(s){n(s)}}),o=>{n(o)})}a()})}function eg(e){return Ir(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=ln(n,e.fullPath);t(i)},n=>{r(n)})})})}var Wn={},Us;function tg(){return Us||(Us=1,Wn.__esModule=!0,Wn.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}),Wn}var rg=tg();const la=Qa(rg);function Hs(e){return ag(e)||ig(e)||Uc(e)||ng()}function ng(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
180
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ig(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ag(e){if(Array.isArray(e))return Ba(e)}function Ks(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ys(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ks(Object(r),!0).forEach(function(n){Wc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ks(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cn(e,t){return lg(e)||sg(e,t)||Uc(e,t)||og()}function og(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
181
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uc(e,t){if(e){if(typeof e=="string")return Ba(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ba(e,t)}}function Ba(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sg(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,o,s;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}return n}}function lg(e){if(Array.isArray(e))return e}var cg=typeof la=="function"?la:la.default,ug="file-invalid-type",pg="file-too-large",dg="file-too-small",fg="too-many-files",hg=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=t.split(","),n=r.length>1?"one of ".concat(r.join(", ")):r[0];return{code:ug,message:"File type must be ".concat(n)}},Gs=function(t){return{code:pg,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Qs=function(t){return{code:dg,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},mg={code:fg,message:"Too many files"};function Hc(e,t){var r=e.type==="application/x-moz-file"||cg(e,t);return[r,r?null:hg(t)]}function Kc(e,t,r){if(xr(e.size))if(xr(t)&&xr(r)){if(e.size>r)return[!1,Gs(r)];if(e.size<t)return[!1,Qs(t)]}else{if(xr(t)&&e.size<t)return[!1,Qs(t)];if(xr(r)&&e.size>r)return[!1,Gs(r)]}return[!0,null]}function xr(e){return e!=null}function gg(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(c){var p=Hc(c,r),f=Cn(p,1),d=f[0],u=Kc(c,n,i),x=Cn(u,1),k=x[0],m=s?s(c):null;return d&&k&&!m})}function xi(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Un(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Zs(e){e.preventDefault()}function yg(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function xg(e){return e.indexOf("Edge/")!==-1}function vg(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return yg(e)||xg(e)}function _t(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!xi(n)&&s&&s.apply(void 0,[n].concat(a)),xi(n)})}}function bg(){return"showOpenFilePicker"in window}function wg(e){if(xr(e)){var t=Object.entries(e).filter(function(r){var n=Cn(r,2),i=n[0],a=n[1],o=!0;return Yc(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(Gc))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(r,n){var i=Cn(n,2),a=i[0],o=i[1];return Ys(Ys({},r),{},Wc({},a,o))},{});return[{description:"Files",accept:t}]}return e}function Sg(e){if(xr(e))return Object.entries(e).reduce(function(t,r){var n=Cn(r,2),i=n[0],a=n[1];return[].concat(Hs(t),[i],Hs(a))},[]).filter(function(t){return Yc(t)||Gc(t)}).join(",")}function Cg(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Eg(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Yc(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Gc(e){return/^.*\.[\w]+$/.test(e)}var kg=["children"],Tg=["open"],jg=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Fg=["refKey","onChange","onClick"];function Ag(e){return Rg(e)||_g(e)||Qc(e)||Og()}function Og(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
182
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _g(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rg(e){if(Array.isArray(e))return Va(e)}function ca(e,t){return Dg(e)||$g(e,t)||Qc(e,t)||Pg()}function Pg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
183
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qc(e,t){if(e){if(typeof e=="string")return Va(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Va(e,t)}}function Va(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $g(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,o,s;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}return n}}function Dg(e){if(Array.isArray(e))return e}function Xs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xs(Object(r),!0).forEach(function(n){Na(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Na(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vi(e,t){if(e==null)return{};var r=Ig(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ig(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var vo=P.forwardRef(function(e,t){var r=e.children,n=vi(e,kg),i=Xc(n),a=i.open,o=vi(i,Tg);return P.useImperativeHandle(t,function(){return{open:a}},[a]),P.createElement(P.Fragment,null,r($e($e({},o),{},{open:a})))});vo.displayName="Dropzone";var Zc={disabled:!1,getFilesFromEvent:Hm,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};vo.defaultProps=Zc;vo.propTypes={children:T.func,accept:T.objectOf(T.arrayOf(T.string)),multiple:T.bool,preventDropOnDocument:T.bool,noClick:T.bool,noKeyboard:T.bool,noDrag:T.bool,noDragEventsBubbling:T.bool,minSize:T.number,maxSize:T.number,maxFiles:T.number,disabled:T.bool,getFilesFromEvent:T.func,onFileDialogCancel:T.func,onFileDialogOpen:T.func,useFsAccessApi:T.bool,autoFocus:T.bool,onDragEnter:T.func,onDragLeave:T.func,onDragOver:T.func,onDrop:T.func,onDropAccepted:T.func,onDropRejected:T.func,onError:T.func,validator:T.func};var La={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Xc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=$e($e({},Zc),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,c=t.maxFiles,p=t.onDragEnter,f=t.onDragLeave,d=t.onDragOver,u=t.onDrop,x=t.onDropAccepted,k=t.onDropRejected,m=t.onFileDialogCancel,C=t.onFileDialogOpen,v=t.useFsAccessApi,w=t.autoFocus,$=t.preventDropOnDocument,F=t.noClick,E=t.noKeyboard,_=t.noDrag,I=t.noDragEventsBubbling,R=t.onError,Y=t.validator,h=P.useMemo(function(){return Sg(r)},[r]),B=P.useMemo(function(){return wg(r)},[r]),q=P.useMemo(function(){return typeof C=="function"?C:Js},[C]),Z=P.useMemo(function(){return typeof m=="function"?m:Js},[m]),L=P.useRef(null),H=P.useRef(null),G=P.useReducer(Mg,La),re=ca(G,2),ce=re[0],D=re[1],U=ce.isFocused,X=ce.isFileDialogActive,ue=P.useRef(typeof window<"u"&&window.isSecureContext&&v&&bg()),fe=function(){!ue.current&&X&&setTimeout(function(){if(H.current){var A=H.current.files;A.length||(D({type:"closeDialog"}),Z())}},300)};P.useEffect(function(){return window.addEventListener("focus",fe,!1),function(){window.removeEventListener("focus",fe,!1)}},[H,X,Z,ue]);var pe=P.useRef([]),te=function(A){L.current&&L.current.contains(A.target)||(A.preventDefault(),pe.current=[])};P.useEffect(function(){return $&&(document.addEventListener("dragover",Zs,!1),document.addEventListener("drop",te,!1)),function(){$&&(document.removeEventListener("dragover",Zs),document.removeEventListener("drop",te))}},[L,$]),P.useEffect(function(){return!n&&w&&L.current&&L.current.focus(),function(){}},[L,w,n]);var W=P.useCallback(function(b){R?R(b):console.error(b)},[R]),Q=P.useCallback(function(b){b.preventDefault(),b.persist(),S(b),pe.current=[].concat(Ag(pe.current),[b.target]),Un(b)&&Promise.resolve(i(b)).then(function(A){if(!(xi(b)&&!I)){var V=A.length,z=V>0&&gg({files:A,accept:h,minSize:o,maxSize:a,multiple:s,maxFiles:c,validator:Y}),K=V>0&&!z;D({isDragAccept:z,isDragReject:K,isDragActive:!0,type:"setDraggedFiles"}),p&&p(b)}}).catch(function(A){return W(A)})},[i,p,W,I,h,o,a,s,c,Y]),ae=P.useCallback(function(b){b.preventDefault(),b.persist(),S(b);var A=Un(b);if(A&&b.dataTransfer)try{b.dataTransfer.dropEffect="copy"}catch{}return A&&d&&d(b),!1},[d,I]),se=P.useCallback(function(b){b.preventDefault(),b.persist(),S(b);var A=pe.current.filter(function(z){return L.current&&L.current.contains(z)}),V=A.indexOf(b.target);V!==-1&&A.splice(V,1),pe.current=A,!(A.length>0)&&(D({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Un(b)&&f&&f(b))},[L,f,I]),le=P.useCallback(function(b,A){var V=[],z=[];b.forEach(function(K){var de=Hc(K,h),ge=ca(de,2),me=ge[0],Ne=ge[1],Oe=Kc(K,o,a),it=ca(Oe,2),dt=it[0],Me=it[1],ne=Y?Y(K):null;if(me&&dt&&!ne)V.push(K);else{var Ge=[Ne,Me];ne&&(Ge=Ge.concat(ne)),z.push({file:K,errors:Ge.filter(function(Kt){return Kt})})}}),(!s&&V.length>1||s&&c>=1&&V.length>c)&&(V.forEach(function(K){z.push({file:K,errors:[mg]})}),V.splice(0)),D({acceptedFiles:V,fileRejections:z,isDragReject:z.length>0,type:"setFiles"}),u&&u(V,z,A),z.length>0&&k&&k(z,A),V.length>0&&x&&x(V,A)},[D,s,h,o,a,c,u,x,k,Y]),ve=P.useCallback(function(b){b.preventDefault(),b.persist(),S(b),pe.current=[],Un(b)&&Promise.resolve(i(b)).then(function(A){xi(b)&&!I||le(A,b)}).catch(function(A){return W(A)}),D({type:"reset"})},[i,le,W,I]),J=P.useCallback(function(){if(ue.current){D({type:"openDialog"}),q();var b={multiple:s,types:B};window.showOpenFilePicker(b).then(function(A){return i(A)}).then(function(A){le(A,null),D({type:"closeDialog"})}).catch(function(A){Cg(A)?(Z(A),D({type:"closeDialog"})):Eg(A)?(ue.current=!1,H.current?(H.current.value=null,H.current.click()):W(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):W(A)});return}H.current&&(D({type:"openDialog"}),q(),H.current.value=null,H.current.click())},[D,q,Z,v,le,W,B,s]),Ie=P.useCallback(function(b){!L.current||!L.current.isEqualNode(b.target)||(b.key===" "||b.key==="Enter"||b.keyCode===32||b.keyCode===13)&&(b.preventDefault(),J())},[L,J]),Ke=P.useCallback(function(){D({type:"focus"})},[]),Ze=P.useCallback(function(){D({type:"blur"})},[]),kt=P.useCallback(function(){F||(vg()?setTimeout(J,0):J())},[F,J]),Ye=function(A){return n?null:A},We=function(A){return E?null:Ye(A)},Ue=function(A){return _?null:Ye(A)},S=function(A){I&&A.stopPropagation()},j=P.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=b.refKey,V=A===void 0?"ref":A,z=b.role,K=b.onKeyDown,de=b.onFocus,ge=b.onBlur,me=b.onClick,Ne=b.onDragEnter,Oe=b.onDragOver,it=b.onDragLeave,dt=b.onDrop,Me=vi(b,jg);return $e($e(Na({onKeyDown:We(_t(K,Ie)),onFocus:We(_t(de,Ke)),onBlur:We(_t(ge,Ze)),onClick:Ye(_t(me,kt)),onDragEnter:Ue(_t(Ne,Q)),onDragOver:Ue(_t(Oe,ae)),onDragLeave:Ue(_t(it,se)),onDrop:Ue(_t(dt,ve)),role:typeof z=="string"&&z!==""?z:"presentation"},V,L),!n&&!E?{tabIndex:0}:{}),Me)}},[L,Ie,Ke,Ze,kt,Q,ae,se,ve,E,_,n]),y=P.useCallback(function(b){b.stopPropagation()},[]),M=P.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=b.refKey,V=A===void 0?"ref":A,z=b.onChange,K=b.onClick,de=vi(b,Fg),ge=Na({accept:h,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ye(_t(z,ve)),onClick:Ye(_t(K,y)),tabIndex:-1},V,H);return $e($e({},ge),de)}},[H,r,s,ve,n]);return $e($e({},ce),{},{isFocused:U&&!n,getRootProps:j,getInputProps:M,rootRef:L,inputRef:H,open:Ye(J)})}function Mg(e,t){switch(t.type){case"focus":return $e($e({},e),{},{isFocused:!0});case"blur":return $e($e({},e),{},{isFocused:!1});case"openDialog":return $e($e({},La),{},{isFileDialogActive:!0});case"closeDialog":return $e($e({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return $e($e({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return $e($e({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return $e({},La);default:return e}}function Js(){}const zg=pt(l.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"),el=pt(l.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),Bg=pt(l.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),Jc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?l.jsx(Bg,{}):e.file.type.includes("pdf")?l.jsx(el,{}):l.jsx(el,{}),n=()=>{switch(e.status){case"success":return l.jsx(zg,{color:"success"});case"uploading":return l.jsx(g.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const o=1024,s=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(a)/Math.log(o));return parseFloat((a/Math.pow(o,c)).toFixed(2))+" "+s[c]};return l.jsxs(g.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),l.jsxs(g.Box,{sx:{flex:1,minWidth:0},children:[l.jsx(g.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),l.jsxs(g.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),l.jsx(g.Tooltip,{title:"Remove file",children:l.jsx(g.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:l.jsx(bc,{})})})]})},Vg=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:o,title:s,subtitle:c,buttonText:p,fileSupportedText:f})=>{const[d,u]=P.useState(t),[x,k]=P.useState([]),[m,C]=P.useState(!1),[v,w]=P.useState(!1),[$,F]=P.useState([]),E=P.useRef(null);P.useEffect(()=>{u(t)},[t]);const _=P.useCallback(L=>{var G,re;return((G=e==null?void 0:e.fileTypes)==null?void 0:G.some(ce=>{if(ce.includes("*")){const D=ce.split("/")[0];return L.type.startsWith(D)}return L.type===ce}))?e!=null&&e.maxSize&&L.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${L.type} is not allowed. Allowed types: ${(re=e==null?void 0:e.fileTypes)==null?void 0:re.join(", ")}`},[e]),I=P.useCallback(async L=>{console.log("handleFiles called with:",L.length,"files"),C(!0);const H=[],G=[];try{for(const ce of L){let D=null;if(e!=null&&e.multiple&&d.some(X=>X.file.name===ce.name&&X.file.size===ce.size&&X.file.lastModified===ce.lastModified)){G.push(`${ce.name}: File already exists`);continue}if(D=_(ce),!D&&(e!=null&&e.customValidation))try{const U=e.customValidation(ce);U instanceof Promise?D=await U:D=U}catch(U){D=`Custom validation failed: ${U instanceof Error?U.message:"Unknown error"}`}if(D)G.push(`${ce.name}: ${D}`);else{const U={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:ce,preview:ce.type.startsWith("image/")?URL.createObjectURL(ce):void 0,progress:0,status:"pending",uploadedAt:new Date};H.push(U)}}const re=e!=null&&e.multiple?[...d,...H]:H;u(re),r==null||r(re),G.length>0?(F(G),k(G)):(F([]),k([]))}catch(re){const ce=`Unexpected error: ${re instanceof Error?re.message:"Unknown error"}`;F([ce]),k([ce])}},[d,e==null?void 0:e.multiple,_,e==null?void 0:e.customValidation,r]),R=P.useCallback(L=>{C(!0);const H=d.filter(G=>G.id!==L);u(H),r==null||r(H),F([]),E.current&&(E.current.value="")},[d,r]),Y=P.useCallback(()=>{if(e!=null&&e.required&&d.length===0){k([`${e.title} is required`]);return}F([]),w(!0);const L=d.filter(H=>H.status!=="error");n==null||n(L)},[d,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:h,getInputProps:B,isDragActive:q}=Xc({onDrop:I,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});P.useEffect(()=>{if(!m)return;const L=[],H=[...$,...L];H.length>0?k(H):k([])},[d,e==null?void 0:e.required,e==null?void 0:e.title,m,v,$]);const Z=()=>{var L;switch(((L=e==null?void 0:e.submitButton)==null?void 0:L.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return l.jsxs(g.Box,{className:a,style:o,children:[l.jsxs(g.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&l.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&l.jsx(g.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),P.createElement(g.Card,{...h(),key:`dropzone-${d.length}`,sx:{border:"1px dashed",borderColor:q?"primary.main":"#CCCCCC",backgroundColor:q?"action.hover":"#F5F5F5",boxShadow:"none",p:3,textAlign:"center",cursor:i?"not-allowed":"pointer",transition:"all 0.2s ease","&:hover":{borderColor:i?"grey.300":"primary.main",backgroundColor:i?"background.paper":"action.hover"}}},l.jsx("input",{...B(),ref:E}),l.jsx(g.IconButton,{sx:{borderRadius:"8px"},children:l.jsx(di,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(g.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:s}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:c}),l.jsx(g.Button,{onClick:()=>{var L;return(L=E.current)==null?void 0:L.click()},sx:{my:2},startIcon:l.jsx(di,{}),variant:"contained",children:p}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400},children:f})),x.length>0&&l.jsx(g.Alert,{severity:"error",sx:{mt:2},children:x.map((L,H)=>l.jsx(g.Typography,{variant:"body2",children:L},H))}),d.length>0&&l.jsxs(g.Box,{sx:{mt:2},children:[l.jsxs(g.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",d.length,")"]}),d.map(L=>l.jsx(Jc,{file:L,onRemove:R},L.id))]}),(e==null?void 0:e.helperText)&&l.jsx(g.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&l.jsx(g.Box,{sx:{mt:3,display:"flex",justifyContent:Z()},children:l.jsx(g.Button,{variant:"contained",onClick:Y,disabled:i||e.submitButton.disabled||d.length===0,startIcon:e.submitButton.loading?l.jsx(g.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Vc;exports.DocumentUpload=Vg;exports.FINFLOW_FRONTEND_DEFAULT_PRIMARY=uc;exports.FieldRenderer=go;exports.FilePreview=Jc;exports.FinAutocomplete=pc;exports.FinCheckbox=Ut;exports.FinCheckboxGroup=dc;exports.FinChip=ho;exports.FinCustomizedVerticalStepper=Xh;exports.FinDateField=fo;exports.FinDragDropList=gc;exports.FinEditableGrid=xc;exports.FinForm=Vm;exports.FinInfoCard=em;exports.FinListCards=vc;exports.FinPhaseCard=nm;exports.FinRadioGroup=wr;exports.FinSelect=Di;exports.FinSwitch=fi;exports.FinTabs=yc;exports.FinTextField=vt;exports.FinTextarea=fc;exports.FinUiHeader=hc;exports.FinVerticalStepper=Qh;exports.ImageComponent=Lm;exports.StepNavigation=Bc;exports.brand=Uh;exports.createFinflowFrontendMirrorTheme=Yh;exports.createNeutralToneScale=cc;exports.fetchApiData=wc;exports.finflowPalette=Fe;exports.generateSchema=zc;exports.getApiConfig=mo;exports.hasApiConfig=yr;exports.neutral=Qn;exports.primary=qh;exports.secondary=Wh;exports.shouldShowField=im;exports.useApiData=Sc;exports.useFinInputTokens=Pn;