finform-react-builder 1.13.1 → 1.15.0
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/components/FinForm/CustomButtons.d.ts +1 -0
- package/dist/components/FinForm/index.d.ts +2 -1
- package/dist/components/FinForm/inputs/FinAutocomplete.d.ts +4 -0
- package/dist/components/FinForm/inputs/FinCheckbox.d.ts +2 -0
- package/dist/components/FinForm/inputs/FinDateField.d.ts +30 -3
- package/dist/components/FinForm/inputs/FinEditableGrid.d.ts +4 -0
- package/dist/components/FinForm/inputs/FinSelect.d.ts +4 -0
- package/dist/components/FinForm/inputs/FinTextField.d.ts +3 -0
- package/dist/components/FinForm/inputs/FinTextarea.d.ts +3 -0
- package/dist/components/FinForm/testIds.d.ts +24 -0
- package/dist/components/FinForm/types.d.ts +30 -0
- package/dist/index.es.js +6702 -7739
- package/dist/index.js +48 -48
- package/package.json +7 -3
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";var tu=Object.defineProperty;var So=e=>{throw TypeError(e)};var ru=(e,t,r)=>t in e?tu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var un=(e,t,r)=>ru(e,typeof t!="symbol"?t+"":t,r),Ii=(e,t,r)=>t.has(e)||So("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)?So("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),xe=(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"),nu=require("@emotion/styled"),dr=require("@emotion/react");function iu(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=iu(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,au=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dl=(e,t)=>e.has(au(t)),ou=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&&!ou(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},dt=e=>typeof e=="boolean",we=(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 su(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 lu(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=su({control:i,name:r,exact:!0}),p=P.useRef(e),f=P.useRef(i.register(r,{...e.rules,value:s,...dt(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]),T=P.useCallback(C=>{const b=ee(i._fields,r);b&&C&&(b._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,...dt(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:u,onBlur:x,ref:T}),[r,n,c.disabled,u,x,T,s]);return P.useEffect(()=>{const C=i._options.shouldUnregister||a;i.register(r,{...p.current.rules,...dt(p.current.disabled)?{disabled:p.current.disabled}:{}});const b=(w,$)=>{const F=ee(i._fields,w);F&&F._f&&(F._f.mount=$)};if(b(r,!0),C){const w=Pe(ee(i._options.defaultValues,r));we(i._defaultValues,r,w),Ae(ee(i._formValues,r))&&we(i._formValues,r,w)}return!o&&i.register(r),()=>{(o?C&&!i._state.action:C)?i.unregister(r):b(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(lu(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],Co=()=>{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",cu=e=>Ha(e)||Fn(e),Mi=e=>ti(e)&&e.isConnected;function uu(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 pu(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:uu(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Le(n)&&tt(n)||Array.isArray(n)&&pu(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 Eo={value:!1,isValid:!1},ko={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===""?ko:{value:e[0].value,isValid:!0}:ko:Eo}return Eo},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 To={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,To):To;function jo(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 du=(e,t,r,n)=>{const i={};for(const a of e){const o=ee(t,a);o&&we(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 Fo="AsyncFunction";var fu=e=>!!e&&!!e.validate&&!!(Ft(e.validate)&&e.validate.constructor.name===Fo||Le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Fo)),hu=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 Ao(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 mu=(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))},gu=(e,t,r)=>!e||!t||e===t||ct(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),yu=(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,xu=(e,t)=>!wi(ee(e,t)).length&&He(e,t),El=(e,t,r)=>{const n=ct(ee(e,r));return we(n,"root",t[r]),we(e,r,n),e},Hn=e=>Mt(e);function Oo(e,t,r="validate"){if(Hn(e)||Array.isArray(e)&&e.every(Hn)||dt(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:T,name:m,valueAsNumber:C,mount:b}=e._f,w=ee(r,m);if(!b||t.has(m))return{};const $=s?s[0]:o,F=q=>{i&&$.reportValidity&&($.setCustomValidity(dt(q)?"":q||""),$.reportValidity())},E={},_=Ha(o),z=Fn(o),R=_||z,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))||dt(w)&&!w||z&&!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(T){if(Ft(T)){const q=await T(w,r),Z=Oo(q,$);if(Z&&(E[m]={...Z,...h(zt.validate,Z.message)},!n))return F(Z.message),E}else if(Le(T)){let q={};for(const Z in T){if(!tt(q)&&!n)break;const L=Oo(await T[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 vu={mode:Ct.onSubmit,reValidateMode:Ct.onChange,shouldFocusError:!0};function bu(e={}){let t={...vu,...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:Co(),state:Co()},x=t.criteriaMode===Ct.all,T=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 z()).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?we(r.validatingFields,y,j):He(r.validatingFields,y))}),u.state.next({validatingFields:r.validatingFields,isValidating:!tt(r.validatingFields)}))},b=(S,j=[],y,I,v=!0,A=!0)=>{if(I&&y&&!t.disabled){if(o.action=!0,A&&Array.isArray(ee(n,S))){const V=y(ee(n,S),I.argA,I.argB);v&&we(n,S,V)}if(A&&Array.isArray(ee(r.errors,S))){const V=y(ee(r.errors,S),I.argA,I.argB);v&&we(r.errors,S,V),xu(r.errors,S)}if((f.touchedFields||d.touchedFields)&&A&&Array.isArray(ee(r.touchedFields,S))){const V=y(ee(r.touchedFields,S),I.argA,I.argB);v&&we(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 we(a,S,j)},w=(S,j)=>{we(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,I)=>{const v=ee(n,S);if(v){const A=ee(a,S,Ae(y)?ee(i,S):y);Ae(A)||I&&I.defaultChecked||j?we(a,S,j?A:jo(v._f)):L(S,A),o.mount&&m()}},E=(S,j,y,I,v)=>{let A=!1,V=!1;const M={name:S};if(!t.disabled){if(!y||I){(f.isDirty||d.isDirty)&&(V=r.isDirty,r.isDirty=M.isDirty=B(),A=V!==M.isDirty);const K=Xt(ee(i,S),j);V=!!ee(r.dirtyFields,S),K?He(r.dirtyFields,S):we(r.dirtyFields,S,!0),M.dirtyFields=r.dirtyFields,A=A||(f.dirtyFields||d.dirtyFields)&&V!==!K}if(y){const K=ee(r.touchedFields,S);K||(we(r.touchedFields,S,y),M.touchedFields=r.touchedFields,A=A||(f.touchedFields||d.touchedFields)&&K!==y)}A&&v&&u.state.next(M)}return A?M:{}},_=(S,j,y,I)=>{const v=ee(r.errors,S),A=(f.isValid||d.isValid)&&dt(j)&&r.isValid!==j;if(t.delayError&&y?(c=T(()=>w(S,y)),c(t.delayError)):(clearTimeout(p),c=null,y?we(r.errors,S,y):He(r.errors,S)),(y?!Xt(v,y):v)||!tt(I)||A){const V={...I,...A&&dt(j)?{isValid:j}:{},errors:r.errors,name:S};r={...r,...V},u.state.next(V)}},z=async S=>{C(S,!0);const j=await t.resolver(a,t.context,du(S||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return C(S),j},R=async S=>{const{errors:j}=await z(S);if(S)for(const y of S){const I=ee(j,y);I?we(r.errors,y,I):He(r.errors,y)}else r.errors=j;return j},Y=async(S,j,y={valid:!0})=>{for(const I in S){const v=S[I];if(v){const{_f:A,...V}=v;if(A){const M=s.array.has(A.name),K=v._f&&fu(v._f);K&&f.validatingFields&&C([I],!0);const de=await da(v,s.disabled,a,x,t.shouldUseNativeValidation&&!j,M);if(K&&f.validatingFields&&C([I]),de[A.name]&&(y.valid=!1,j))break;!j&&(ee(de,A.name)?M?El(r.errors,de,A.name):we(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&&we(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 I=ee(n,S);let v=j;if(I){const A=I._f;A&&(!A.disabled&&we(a,S,Sl(j,A)),v=ti(A.ref)&&rt(j)?"":j,xl(A.ref)?[...A.ref.options].forEach(V=>V.selected=v.includes(V.value)):A.refs?Fn(A.ref)?A.refs.forEach(V=>{(!V.defaultChecked||!V.disabled)&&(Array.isArray(v)?V.checked=!!v.find(M=>M===V.value):V.checked=v===V.value||!!v)}):A.refs.forEach(V=>V.checked=V.value===v):Ua(A.ref)?A.ref.value="":(A.ref.value=v,A.ref.type||u.state.next({name:S,values:Pe(a)})))}(y.shouldDirty||y.shouldTouch)&&E(S,v,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&D(S)},H=(S,j,y)=>{for(const I in j){if(!j.hasOwnProperty(I))return;const v=j[I],A=S+"."+I,V=ee(n,A);(s.array.has(S)||Le(v)||V&&!V._f)&&!vr(v)?H(A,v,y):L(A,v,y)}},G=(S,j,y={})=>{const I=ee(n,S),v=s.array.has(S),A=Pe(j);we(a,S,A),v?(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)})):I&&!I._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,I=!0;const v=ee(n,y),A=K=>{I=Number.isNaN(K)||vr(K)&&isNaN(K.getTime())||Xt(K,ee(a,y,K))},V=Wr(t.mode),M=Wr(t.reValidateMode);if(v){let K,de;const me=j.type?jo(v._f):pl(S),ge=S.type===ei.BLUR||S.type===ei.FOCUS_OUT,Ne=!hu(v._f)&&!t.resolver&&!ee(r.errors,y)&&!v._f.deps||yu(ge,ee(r.touchedFields,y),r.isSubmitted,M,V),Oe=pa(y,s,ge);we(a,y,me),ge?(v._f.onBlur&&v._f.onBlur(S),c&&c(0)):v._f.onChange&&v._f.onChange(S);const it=E(y,me,ge),pt=!tt(it)||Oe;if(!ge&&u.state.next({name:y,type:S.type,values:Pe(a)}),Ne)return(f.isValid||d.isValid)&&(t.mode==="onBlur"?ge&&m():ge||m()),pt&&u.state.next({name:y,...Oe?{}:it});if(!ge&&Oe&&u.state.next({...r}),t.resolver){const{errors:Me}=await z([y]);if(A(me),I){const ne=Ao(r.errors,n,y),Ge=Ao(Me,n,ne.name||y);K=Ge.error,y=Ge.name,de=tt(Me)}}else C([y],!0),K=(await da(v,s.disabled,a,x,t.shouldUseNativeValidation))[y],C([y]),A(me),I&&(K?de=!1:(f.isValid||d.isValid)&&(de=await Y(n,!0)));I&&(v._f.deps&&D(v._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,I;const v=ct(S);if(t.resolver){const A=await R(Ae(S)?S:v);y=tt(A),I=S?!v.some(V=>ee(A,V)):y}else S?(I=(await Promise.all(v.map(async A=>{const V=ee(n,A);return await Y(V&&V._f?{[A]:V}:V)}))).every(Boolean),!(!I&&!r.isValid)&&m()):I=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&&!I&&Hr(n,ce,S?v:s.mount),I},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 I=(ee(n,S,{_f:{}})._f||{}).ref,v=ee(r.errors,S)||{},{ref:A,message:V,type:M,...K}=v;we(r.errors,S,{...K,...j,ref:I}),u.state.next({name:S,errors:r.errors,isValid:!1}),y&&y.shouldFocus&&I&&I.focus&&I.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=>{gu(S.name,j.name,S.exact)&&mu(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})=>{(dt(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 I=dt(j.disabled)||dt(t.disabled);return we(n,S,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:S}},name:S,mount:!0,...j}}),s.mount.add(S),y?ae({disabled:dt(j.disabled)?j.disabled:t.disabled,name:S}):F(S,!0,j.value),{...I?{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:v=>{if(v){se(S,j),y=ee(n,S);const A=Ae(v.value)&&v.querySelectorAll&&v.querySelectorAll("input,select,textarea")[0]||v,V=cu(A),M=y._f.refs||[];if(V?M.find(K=>K===A):A===y._f.ref)return;we(n,S,{_f:{...y._f,...V?{refs:[...M.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),be=S=>{dt(S)&&(u.state.next({disabled:S}),Hr(n,(j,y)=>{const I=ee(n,y);I&&(j.disabled=I._f.disabled||S,Array.isArray(I._f.refs)&&I._f.refs.forEach(v=>{v.disabled=I._f.disabled||S}))},0,!1))},J=(S,j)=>async y=>{let I;y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let v=Pe(a);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:A,values:V}=await z();r.errors=A,v=V}else await Y(n);if(s.disabled.size)for(const A of s.disabled)we(v,A,void 0);if(He(r.errors,"root"),tt(r.errors)){u.state.next({errors:{}});try{await S(v,y)}catch(A){I=A}}else j&&await j({...r.errors},y),le(),setTimeout(le);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:tt(r.errors)&&!I,submitCount:r.submitCount+1,errors:r.errors}),I)throw I},Ie=(S,j={})=>{ee(n,S)&&(Ae(j.defaultValue)?G(S,Pe(ee(i,S))):(G(S,j.defaultValue),we(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,I=Pe(y),v=tt(S),A=v?i:I;if(j.keepDefaultValues||(i=y),!j.keepValues){if(j.keepDirtyValues){const V=new Set([...s.mount,...Object.keys(pn(i,a))]);for(const M of Array.from(V))ee(r.dirtyFields,M)?we(A,M,ee(a,M)):G(M,ee(A,M))}else{if(qa&&Ae(S))for(const V of s.mount){const M=ee(n,V);if(M&&M._f){const K=Array.isArray(M._f.refs)?M._f.refs[0]:M._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:v?!1:j.keepDirty?r.isDirty:!!(j.keepDefaultValues&&!Xt(S,i)),isSubmitted:j.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:v?{}: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),I=y&&y._f;if(I){const v=I.refs?I.refs[0]:I.ref;v.focus&&(v.focus(),j.shouldSelect&&Ft(v.select)&&v.select())}},Ye=S=>{r={...r,...S}},Ue={control:{register:se,unregister:Q,getFieldState:X,handleSubmit:J,setError:fe,_subscribe:te,_runSchema:z,_focusError:le,_getWatch:q,_getDirty:B,_setValid:m,_setFieldArray:b,_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:be,_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 wu(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)?[]:wu(e,ct(t).sort((r,n)=>r-n)),Ui=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},_o=(e,t,r)=>(e[t]=r,e);function Su(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:z})=>{if(z===d.current||!z){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]),T=(_,z)=>{const R=ct(Pe(_)),Y=Bi(r._getFieldArray(n),R);r._names.focus=zi(n,Y.length-1,z),p.current=Bi(p.current,R.map(Yt)),x(Y),c(Y),r._setFieldArray(n,Y,Bi,{argA:Vi(_)})},m=(_,z)=>{const R=ct(Pe(_)),Y=qi(r._getFieldArray(n),R);r._names.focus=zi(n,0,z),p.current=qi(p.current,R.map(Yt)),x(Y),c(Y),r._setFieldArray(n,Y,qi,{argA:Vi(_)})},C=_=>{const z=Wi(r._getFieldArray(n),_);p.current=Wi(p.current,_),x(z),c(z),!Array.isArray(ee(r._fields,n))&&we(r._fields,n,void 0),r._setFieldArray(n,z,Wi,{argA:_})},b=(_,z,R)=>{const Y=ct(Pe(z)),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(z)})},w=(_,z)=>{const R=r._getFieldArray(n);Ui(R,_,z),Ui(p.current,_,z),x(R),c(R),r._setFieldArray(n,R,Ui,{argA:_,argB:z},!1)},$=(_,z)=>{const R=r._getFieldArray(n);Li(R,_,z),Li(p.current,_,z),x(R),c(R),r._setFieldArray(n,R,Li,{argA:_,argB:z},!1)},F=(_,z)=>{const R=Pe(z),Y=_o(r._getFieldArray(n),_,R);p.current=[...Y].map((h,B)=>!h||B===_?Yt():p.current[B]),x(Y),c([...Y]),r._setFieldArray(n,Y,_o,{argA:_,argB:R},!0,!1)},E=_=>{const z=ct(Pe(_));p.current=z.map(Yt),x([...z]),c([...z]),r._setFieldArray(n,[...z],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 z=ee(_.errors,n),R=ee(r._formState.errors,n);(R?!z&&R.type||z&&(R.type!==z.type||R.message!==z.message):z&&z.type)&&(z?we(r._formState.errors,n,z):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(z=>!tt(z)&&r._subjects.state.next({errors:El(r._formState.errors,z,n)}))}r._subjects.state.next({name:n,values:Pe(r._formValues)}),r._names.focus&&Hr(r._fields,(_,z)=>{if(r._names.focus&&z.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 _=(z,R)=>{const Y=ee(r._fields,z);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(T,[x,n,r]),remove:P.useCallback(C,[x,n,r]),insert:P.useCallback(b,[x,n,r]),update:P.useCallback(F,[x,n,r]),replace:P.useCallback(E,[x,n,r]),fields:P.useMemo(()=>s.map((_,z)=>({..._,[i]:p.current[z]||Yt()})),[s,i])}}function Cu(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}=bu(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 Ro=(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?Ro(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>Ro(i,r,e))}},Eu=(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(ku(t.names||Object.keys(e),n)){const o=Object.assign({},ee(r,n));we(o,"root",a),we(r,n,o)}else we(r,n,a)}return r},ku=(e,t)=>{const r=Po(t);return e.some(n=>Po(n).match(`^${r}\\.\\d+`))};function Po(e){return e.replace(/\]|\[/g,"")}function Tu(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:Eu((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 ju(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 $o(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 Do(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=Io(e)&&Io(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 Io(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ga(e){if(!Mo(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Mo(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Mo(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fu(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 Au(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Ou(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 _u(e,t){return typeof e=="function"?e(...t):!!e}var Sr,Jt,Yr,tl,Ru=(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 Ru,Gr,er,Qr,rl,Pu=(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 Pu;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 $u(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=b=>{(n||p())&&m(b)},(C=e.onPause)==null||C.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),T=()=>{if(n)return;let m;const C=r===0?e.initialPromise:void 0;try{m=C??e.fn()}catch(b){m=Promise.reject(b)}Promise.resolve(m).then(d).catch(b=>{var _;if(n)return;const w=e.retry??(Rr?0:3),$=e.retryDelay??$u,F=typeof $=="function"?$(r,b):$,E=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,b);if(t||!E){u(b);return}r++,(_=e.onFail)==null||_.call(e,r,b),Fu(F).then(()=>p()?void 0:x()).then(()=>{t?u(b):T()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:c,canStart:f,start:()=>(f()?T():x().then(T),a)}}var Du=e=>setTimeout(e,0);function Iu(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=Du;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=Iu(),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,Mu=(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,zu(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 xe(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){xe(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||xe(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),T=(()=>{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,T,this):u(T)},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))&&xe(this,Tt,qt).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta});const c=u=>{var x,T,m,C;Hi(u)&&u.silent||xe(this,Tt,qt).call(this,{type:"error",error:u}),Hi(u)||((T=(x=O(this,xt).config).onError)==null||T.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,T,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(b){c(b);return}(T=(x=O(this,xt).config).onSuccess)==null||T.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)=>{xe(this,Tt,qt).call(this,{type:"failed",failureCount:u,error:x})},onPause:()=>{xe(this,Tt,qt).call(this,{type:"pause"})},onContinue:()=>{xe(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 zu(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,Bu=(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 Mu({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=>$o(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>$o(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,Vu=(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||Nu(),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,T,m,C,b,w,$,F,E,_,z,R;const r=()=>{xe(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)=>{xe(this,Dt,Qt).call(this,{type:"failed",failureCount:Y,error:h})},onPause:()=>{xe(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{xe(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&&xe(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((T=(x=O(this,Je).config).onSettled)==null?void 0:T.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)),xe(this,Dt,Qt).call(this,{type:"success",data:Y}),Y}catch(Y){try{throw await((w=(b=O(this,Je).config).onError)==null?void 0:w.call(b,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=(z=this.options).onSettled)==null?void 0:R.call(z,void 0,Y,t,this.state.context)),Y}finally{xe(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 Nu(){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,Lu=(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 Vu({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=>Do(r,n))}findAll(t={}){return this.getAll().filter(r=>Do(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 zo(e){return{onFetch:(t,r)=>{var f,d,u,x,T;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=((T=t.state.data)==null?void 0:T.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)})},b=jl(t.options,t.fetchOptions),w=async($,F,E)=>{if(m)return Promise.reject();if(F==null&&$.pages.length)return Promise.resolve($);const z=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:F,direction:E?"backward":"forward",meta:t.options.meta};return C(B),B})(),R=await b(z),{maxPages:Y}=t.options,h=E?Ou:Au;return{pages:h($.pages,R,Y),pageParams:h($.pageParams,F,Y)}};if(i&&a.length){const $=i==="backward",F=$?qu:Bo,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:Bo(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 Bo(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 qu(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,Wu=(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 Bu),oe(this,tr,e.mutationCache||new Lu),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=ju(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=zo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(st).catch(st)}ensureInfiniteQueryData(e){return e.behavior=zo(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,ve,Tn,et,Fr,rn,ir,ar,jn,nn,an,Ar,Or,or,on,Ee,hn,va,ba,wa,Sa,Ca,Ea,ka,Pl,cl,Uu=(cl=class extends An{constructor(t,r){super();he(this,Ee);he(this,ot);he(this,ve);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,ve).addObserver(this),Vo(O(this,ve),this.options)?xe(this,Ee,hn).call(this):this.updateResult(),xe(this,Ee,Sa).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ta(O(this,ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ta(O(this,ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xe(this,Ee,Ca).call(this),xe(this,Ee,Ea).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,ka).call(this),O(this,ve).setOptions(this.options),r._defaulted&&!ma(this.options,r)&&O(this,ot).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,ve),observer:this});const i=this.hasListeners();i&&No(O(this,ve),n,this.options,r)&&xe(this,Ee,hn).call(this),this.updateResult(),i&&(O(this,ve)!==n||bt(this.options.enabled,O(this,ve))!==bt(r.enabled,O(this,ve))||lr(this.options.staleTime,O(this,ve))!==lr(r.staleTime,O(this,ve)))&&xe(this,Ee,va).call(this);const a=xe(this,Ee,ba).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,wa).call(this,a)}getOptimisticResult(t){const r=O(this,ot).getQueryCache().build(O(this,ot),t),n=this.createResult(r,t);return Ku(this,n)&&(oe(this,et,n),oe(this,rn,this.options),oe(this,Fr,O(this,ve).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,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,hn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,et)))}createResult(t,r){var Y;const n=O(this,ve),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&&Vo(t,r),q=h&&No(t,n,r,i);(B||q)&&(d={...d,...Rl(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:T,errorUpdatedAt:m,status:C}=d;x=d.data;let b=!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,b=!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&&!b)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)&&(T=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:T,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,ve),this.options);if(oe(this,Fr,O(this,ve).state),oe(this,rn,this.options),O(this,Fr).data!==void 0&&oe(this,an,O(this,ve)),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)})};xe(this,Ee,Pl).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xe(this,Ee,Sa).call(this)}},ot=new WeakMap,ve=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,Ee=new WeakSet,hn=function(t){xe(this,Ee,ka).call(this);let r=O(this,ve).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(st)),r},va=function(){xe(this,Ee,Ca).call(this);const t=lr(this.options.staleTime,O(this,ve));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,ve)):this.options.refetchInterval)??!1},wa=function(t){xe(this,Ee,Ea).call(this),oe(this,or,t),!(Rr||bt(this.options.enabled,O(this,ve))===!1||!fa(O(this,or))||O(this,or)===0)&&oe(this,Or,setInterval(()=>{(this.options.refetchIntervalInBackground||Ya.isFocused())&&xe(this,Ee,hn).call(this)},O(this,or)))},Sa=function(){xe(this,Ee,va).call(this),xe(this,Ee,wa).call(this,xe(this,Ee,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,ve))return;const r=O(this,ve);oe(this,ve,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,ve),type:"observerResultsUpdated"})})},cl);function Hu(e,t){return bt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Vo(e,t){return Hu(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 No(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 Ku(e,t){return!ma(e.getCurrentResult(),t)}var $l=ie.createContext(void 0),Yu=e=>{const t=ie.useContext($l);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Gu=({client:e,children:t})=>(ie.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx($l.Provider,{value:e,children:t})),Dl=ie.createContext(!1),Qu=()=>ie.useContext(Dl);Dl.Provider;function Zu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xu=ie.createContext(Zu()),Ju=()=>ie.useContext(Xu),ep=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},tp=e=>{ie.useEffect(()=>{e.clearReset()},[e])},rp=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||_u(r,[e.error,n])),np=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))}},ip=(e,t)=>e.isLoading&&e.isFetching&&!t,ap=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Lo=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function op(e,t,r){var d,u,x,T,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=Qu(),i=Ju(),a=Yu(),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",np(o),ep(o,i),tp(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 b=f?c.subscribe(Qe.batchCalls(C)):st;return c.updateResult(),b},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),ie.useEffect(()=>{c.setOptions(o)},[o,c]),ap(o,p))throw Lo(o,c,i);if(rp({result:p,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw p.error;if((T=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||T.call(x,o,p),o.experimental_prefetchInRender&&!Rr&&ip(p,n)){const C=s?Lo(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 sp(e,t){return op(e,Uu)}function Qa(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 Wl=Object.defineProperty;var _a=e=>{throw TypeError(e)};var Ul=(e,t,n)=>t in e?Wl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Qn=(e,t,n)=>Ul(e,typeof t!="symbol"?t+"":t,n),ui=(e,t,n)=>t.has(e)||_a("Cannot "+n);var C=(e,t,n)=>(ui(e,t,"read from private field"),n?n.call(e):t.get(e)),ue=(e,t,n)=>t.has(e)?_a("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),X=(e,t,n,r)=>(ui(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ye=(e,t,n)=>(ui(e,t,"access private method"),n);var gr=(e,t,n,r)=>({set _(i){X(e,t,i,n)},get _(){return C(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),I=require("react"),Ee=require("react-hook-form"),Da=require("@hookform/resolvers"),x=require("@mui/material"),Hl=require("@emotion/styled"),Xt=require("@emotion/react"),Yl=require("@mui/x-date-pickers/DatePicker"),$n=require("dayjs"),Kl=require("dayjs/plugin/customParseFormat");function Ql(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const J=Ql(I);function Gl(e,t,n){return n===void 0&&(n={}),function(r,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[n.mode==="sync"?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:i}))).then(function(u){return a.shouldUseNativeValidation&&Da.validateFieldsNatively({},a),{values:n.raw?Object.assign({},r):u,errors:{}}}))}catch(u){return s(u)}return c&&c.then?c.then(void 0,s):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:Da.toNestErrors((s=o,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(s.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),c){var m=u[f.path].types,h=m&&m[f.type];u[f.path]=Ee.appendErrors(f.path,c,u,f.type,h?[].concat(h,f.message):f.message)}return u},{})),a)};var s,c}))}catch(o){return Promise.reject(o)}}}var pr=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(){}},yn=typeof window>"u"||"Deno"in globalThis;function Ze(){}function Zl(e,t){return typeof e=="function"?e(t):e}function Fi(e){return typeof e=="number"&&e>=0&&e!==1/0}function fs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Kt(e,t){return typeof e=="function"?e(t):e}function pt(e,t){return typeof e=="function"?e(t):e}function Ia(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==aa(o,t.options))return!1}else if(!ir(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ma(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(rr(t.options.mutationKey)!==rr(a))return!1}else if(!ir(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function aa(e,t){return((t==null?void 0:t.queryKeyHashFn)||rr)(e)}function rr(e){return JSON.stringify(e,(t,n)=>Ri(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ir(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ir(e[n],t[n])):!1}function Ai(e,t){if(e===t)return e;const n=za(e)&&za(t);if(n||Ri(e)&&Ri(t)){const r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),o=a.length,s=n?[]:{},c=new Set(r);let u=0;for(let f=0;f<o;f++){const m=n?f:a[f];(!n&&c.has(m)||n)&&e[m]===void 0&&t[m]===void 0?(s[m]=void 0,u++):(s[m]=Ai(e[m],t[m]),s[m]===e[m]&&e[m]!==void 0&&u++)}return i===o&&u===i?e:s}return t}function $i(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function za(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ri(e){if(!Ba(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ba(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ba(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xl(e){return new Promise(t=>{setTimeout(t,e)})}function Pi(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Ai(e,t)}catch(r){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. [${n.queryHash}]: ${r}`),r}return Ai(e,t)}return t}function Jl(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ec(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Dr=Symbol();function hs(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Dr&&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===Dr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function tc(e,t){return typeof e=="function"?e(...t):!!e}var ln,Bt,_n,is,nc=(is=class extends pr{constructor(){super();ue(this,ln);ue(this,Bt);ue(this,_n);X(this,_n,t=>{if(!yn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,Bt)||this.setEventListener(C(this,_n))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Bt))==null||t.call(this),X(this,Bt,void 0))}setEventListener(t){var n;X(this,_n,t),(n=C(this,Bt))==null||n.call(this),X(this,Bt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,ln)!==t&&(X(this,ln,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,ln)=="boolean"?C(this,ln):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ln=new WeakMap,Bt=new WeakMap,_n=new WeakMap,is),oa=new nc,Dn,Nt,In,as,rc=(as=class extends pr{constructor(){super();ue(this,Dn,!0);ue(this,Nt);ue(this,In);X(this,In,t=>{if(!yn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,Nt)||this.setEventListener(C(this,In))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Nt))==null||t.call(this),X(this,Nt,void 0))}setEventListener(t){var n;X(this,In,t),(n=C(this,Nt))==null||n.call(this),X(this,Nt,t(this.setOnline.bind(this)))}setOnline(t){C(this,Dn)!==t&&(X(this,Dn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,Dn)}},Dn=new WeakMap,Nt=new WeakMap,In=new WeakMap,as),Ir=new rc;function _i(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function ic(e){return Math.min(1e3*2**e,3e4)}function ms(e){return(e??"online")==="online"?Ir.isOnline():!0}var xs=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function pi(e){return e instanceof xs}function gs(e){let t=!1,n=0,r=!1,i;const a=_i(),o=d=>{var E;r||(h(new xs(d)),(E=e.abort)==null||E.call(e))},s=()=>{t=!0},c=()=>{t=!1},u=()=>oa.isFocused()&&(e.networkMode==="always"||Ir.isOnline())&&e.canRun(),f=()=>ms(e.networkMode)&&e.canRun(),m=d=>{var E;r||(r=!0,(E=e.onSuccess)==null||E.call(e,d),i==null||i(),a.resolve(d))},h=d=>{var E;r||(r=!0,(E=e.onError)==null||E.call(e,d),i==null||i(),a.reject(d))},g=()=>new Promise(d=>{var E;i=y=>{(r||u())&&d(y)},(E=e.onPause)==null||E.call(e)}).then(()=>{var d;i=void 0,r||(d=e.onContinue)==null||d.call(e)}),w=()=>{if(r)return;let d;const E=n===0?e.initialPromise:void 0;try{d=E??e.fn()}catch(y){d=Promise.reject(y)}Promise.resolve(d).then(m).catch(y=>{var _;if(r)return;const j=e.retry??(yn?0:3),k=e.retryDelay??ic,v=typeof k=="function"?k(n,y):k,S=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,y);if(t||!S){h(y);return}n++,(_=e.onFail)==null||_.call(e,n,y),Xl(v).then(()=>u()?void 0:g()).then(()=>{t?h(y):w()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:c,canStart:f,start:()=>(f()?w():g().then(w),a)}}var ac=e=>setTimeout(e,0);function oc(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=ac;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(c=>{n(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=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ne=oc(),cn,os,ys=(os=class{constructor(){ue(this,cn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fi(this.gcTime)&&X(this,cn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(yn?1/0:5*60*1e3))}clearGcTimeout(){C(this,cn)&&(clearTimeout(C(this,cn)),X(this,cn,void 0))}},cn=new WeakMap,os),Mn,un,ut,pn,Le,sr,dn,xt,Rt,ss,sc=(ss=class extends ys{constructor(t){super();ue(this,xt);ue(this,Mn);ue(this,un);ue(this,ut);ue(this,pn);ue(this,Le);ue(this,sr);ue(this,dn);X(this,dn,!1),X(this,sr,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,pn,t.client),X(this,ut,C(this,pn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,Mn,lc(this.options)),this.state=t.state??C(this,Mn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,Le))==null?void 0:t.promise}setOptions(t){this.options={...C(this,sr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,ut).remove(this)}setData(t,n){const r=Pi(this.state.data,t,this.options);return ye(this,xt,Rt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ye(this,xt,Rt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=C(this,Le))==null?void 0:r.promise;return(i=C(this,Le))==null||i.cancel(t),n?n.then(Ze).catch(Ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Mn))}isActive(){return this.observers.some(t=>pt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Kt(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:!fs(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,Le))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,Le))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,Le)&&(C(this,dn)?C(this,Le).cancel({revert:!0}):C(this,Le).cancelRetry()),this.scheduleGc()),C(this,ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ye(this,xt,Rt).call(this,{type:"invalidate"})}fetch(t,n){var u,f,m;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,Le))return C(this,Le).continueRetry(),C(this,Le).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.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 r=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(X(this,dn,!0),r.signal)})},a=()=>{const h=hs(this.options,n),w=(()=>{const d={client:C(this,pn),queryKey:this.queryKey,meta:this.meta};return i(d),d})();return X(this,dn,!1),this.options.persister?this.options.persister(h,w,this):h(w)},s=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,pn),state:this.state,fetchFn:a};return i(h),h})();(u=this.options.behavior)==null||u.onFetch(s,this),X(this,un,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=s.fetchOptions)==null?void 0:f.meta))&&ye(this,xt,Rt).call(this,{type:"fetch",meta:(m=s.fetchOptions)==null?void 0:m.meta});const c=h=>{var g,w,d,E;pi(h)&&h.silent||ye(this,xt,Rt).call(this,{type:"error",error:h}),pi(h)||((w=(g=C(this,ut).config).onError)==null||w.call(g,h,this),(E=(d=C(this,ut).config).onSettled)==null||E.call(d,this.state.data,h,this)),this.scheduleGc()};return X(this,Le,gs({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var g,w,d,E;if(h===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(h)}catch(y){c(y);return}(w=(g=C(this,ut).config).onSuccess)==null||w.call(g,h,this),(E=(d=C(this,ut).config).onSettled)==null||E.call(d,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,g)=>{ye(this,xt,Rt).call(this,{type:"failed",failureCount:h,error:g})},onPause:()=>{ye(this,xt,Rt).call(this,{type:"pause"})},onContinue:()=>{ye(this,xt,Rt).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),C(this,Le).start()}},Mn=new WeakMap,un=new WeakMap,ut=new WeakMap,pn=new WeakMap,Le=new WeakMap,sr=new WeakMap,dn=new WeakMap,xt=new WeakSet,Rt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...vs(r.data,this.options),fetchMeta:t.meta??null};case"success":return X(this,un,void 0),{...r,data:t.data,dataUpdateCount:r.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 pi(i)&&i.revert&&C(this,un)?{...C(this,un),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ne.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,ut).notify({query:this,type:"updated",action:t})})},ss);function vs(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ms(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lc(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var St,ls,cc=(ls=class extends pr{constructor(t={}){super();ue(this,St);this.config=t,X(this,St,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??aa(i,n);let o=this.get(a);return o||(o=new sc({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){C(this,St).has(t.queryHash)||(C(this,St).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,St).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,St).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ne.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,St).get(t)}getAll(){return[...C(this,St).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ia(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Ia(t,r)):n}notify(t){Ne.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ne.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ne.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},St=new WeakMap,ls),Ct,We,fn,Tt,Mt,cs,uc=(cs=class extends ys{constructor(t){super();ue(this,Tt);ue(this,Ct);ue(this,We);ue(this,fn);this.mutationId=t.mutationId,X(this,We,t.mutationCache),X(this,Ct,[]),this.state=t.state||pc(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Ct).includes(t)||(C(this,Ct).push(t),this.clearGcTimeout(),C(this,We).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,Ct,C(this,Ct).filter(n=>n!==t)),this.scheduleGc(),C(this,We).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Ct).length||(this.state.status==="pending"?this.scheduleGc():C(this,We).remove(this))}continue(){var t;return((t=C(this,fn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,c,u,f,m,h,g,w,d,E,y,j,k,v,S,_,M,B;const n=()=>{ye(this,Tt,Mt).call(this,{type:"continue"})};X(this,fn,gs({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(q,p)=>{ye(this,Tt,Mt).call(this,{type:"failed",failureCount:q,error:p})},onPause:()=>{ye(this,Tt,Mt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,We).canRun(this)}));const r=this.state.status==="pending",i=!C(this,fn).canStart();try{if(r)n();else{ye(this,Tt,Mt).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=C(this,We).config).onMutate)==null?void 0:o.call(a,t,this));const p=await((c=(s=this.options).onMutate)==null?void 0:c.call(s,t));p!==this.state.context&&ye(this,Tt,Mt).call(this,{type:"pending",context:p,variables:t,isPaused:i})}const q=await C(this,fn).start();return await((f=(u=C(this,We).config).onSuccess)==null?void 0:f.call(u,q,t,this.state.context,this)),await((h=(m=this.options).onSuccess)==null?void 0:h.call(m,q,t,this.state.context)),await((w=(g=C(this,We).config).onSettled)==null?void 0:w.call(g,q,null,this.state.variables,this.state.context,this)),await((E=(d=this.options).onSettled)==null?void 0:E.call(d,q,null,t,this.state.context)),ye(this,Tt,Mt).call(this,{type:"success",data:q}),q}catch(q){try{throw await((j=(y=C(this,We).config).onError)==null?void 0:j.call(y,q,t,this.state.context,this)),await((v=(k=this.options).onError)==null?void 0:v.call(k,q,t,this.state.context)),await((_=(S=C(this,We).config).onSettled)==null?void 0:_.call(S,void 0,q,this.state.variables,this.state.context,this)),await((B=(M=this.options).onSettled)==null?void 0:B.call(M,void 0,q,t,this.state.context)),q}finally{ye(this,Tt,Mt).call(this,{type:"error",error:q})}}finally{C(this,We).runNext(this)}}},Ct=new WeakMap,We=new WeakMap,fn=new WeakMap,Tt=new WeakSet,Mt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ne.batch(()=>{C(this,Ct).forEach(r=>{r.onMutationUpdate(t)}),C(this,We).notify({mutation:this,type:"updated",action:t})})},cs);function pc(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pt,gt,lr,us,dc=(us=class extends pr{constructor(t={}){super();ue(this,Pt);ue(this,gt);ue(this,lr);this.config=t,X(this,Pt,new Set),X(this,gt,new Map),X(this,lr,0)}build(t,n,r){const i=new uc({mutationCache:this,mutationId:++gr(this,lr)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){C(this,Pt).add(t);const n=yr(t);if(typeof n=="string"){const r=C(this,gt).get(n);r?r.push(t):C(this,gt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,Pt).delete(t)){const n=yr(t);if(typeof n=="string"){const r=C(this,gt).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&C(this,gt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=yr(t);if(typeof n=="string"){const r=C(this,gt).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=yr(t);if(typeof n=="string"){const i=(r=C(this,gt).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ne.batch(()=>{C(this,Pt).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,Pt).clear(),C(this,gt).clear()})}getAll(){return Array.from(C(this,Pt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ma(n,r))}findAll(t={}){return this.getAll().filter(n=>Ma(t,n))}notify(t){Ne.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ne.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ze))))}},Pt=new WeakMap,gt=new WeakMap,lr=new WeakMap,us);function yr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Na(e){return{onFetch:(t,n)=>{var f,m,h,g,w;const r=t.options,i=(h=(m=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:m.fetchMore)==null?void 0:h.direction,a=((g=t.state.data)==null?void 0:g.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const u=async()=>{let d=!1;const E=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},y=hs(t.options,t.fetchOptions),j=async(k,v,S)=>{if(d)return Promise.reject();if(v==null&&k.pages.length)return Promise.resolve(k);const M=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:v,direction:S?"backward":"forward",meta:t.options.meta};return E(R),R})(),B=await y(M),{maxPages:q}=t.options,p=S?ec:Jl;return{pages:p(k.pages,B,q),pageParams:p(k.pageParams,v,q)}};if(i&&a.length){const k=i==="backward",v=k?fc:La,S={pages:a,pageParams:o},_=v(r,S);s=await j(S,_,k)}else{const k=e??a.length;do{const v=c===0?o[0]??r.initialPageParam:La(r,s);if(c>0&&v==null)break;s=await j(s,v),c++}while(c<k)}return s};t.options.persister?t.fetchFn=()=>{var d,E;return(E=(d=t.options).persister)==null?void 0:E.call(d,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function La(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function fc(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ie,Lt,Vt,zn,Bn,qt,Nn,Ln,ps,hc=(ps=class{constructor(e={}){ue(this,Ie);ue(this,Lt);ue(this,Vt);ue(this,zn);ue(this,Bn);ue(this,qt);ue(this,Nn);ue(this,Ln);X(this,Ie,e.queryCache||new cc),X(this,Lt,e.mutationCache||new dc),X(this,Vt,e.defaultOptions||{}),X(this,zn,new Map),X(this,Bn,new Map),X(this,qt,0)}mount(){gr(this,qt)._++,C(this,qt)===1&&(X(this,Nn,oa.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Ie).onFocus())})),X(this,Ln,Ir.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Ie).onOnline())})))}unmount(){var e,t;gr(this,qt)._--,C(this,qt)===0&&((e=C(this,Nn))==null||e.call(this),X(this,Nn,void 0),(t=C(this,Ln))==null||t.call(this),X(this,Ln,void 0))}isFetching(e){return C(this,Ie).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Lt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,Ie).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=C(this,Ie).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Kt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return C(this,Ie).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=C(this,Ie).get(r.queryHash),a=i==null?void 0:i.state.data,o=Zl(t,a);if(o!==void 0)return C(this,Ie).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ne.batch(()=>C(this,Ie).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,Ie).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,Ie);Ne.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,Ie);return Ne.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ne.batch(()=>C(this,Ie).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ze).catch(Ze)}invalidateQueries(e,t={}){return Ne.batch(()=>(C(this,Ie).findAll(e).forEach(n=>{n.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 n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ne.batch(()=>C(this,Ie).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Ze)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Ze)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,Ie).build(this,t);return n.isStaleByTime(Kt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ze).catch(Ze)}fetchInfiniteQuery(e){return e.behavior=Na(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ze).catch(Ze)}ensureInfiniteQueryData(e){return e.behavior=Na(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ir.isOnline()?C(this,Lt).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,Ie)}getMutationCache(){return C(this,Lt)}getDefaultOptions(){return C(this,Vt)}setDefaultOptions(e){X(this,Vt,e)}setQueryDefaults(e,t){C(this,zn).set(rr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,zn).values()],n={};return t.forEach(r=>{ir(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,Bn).set(rr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Bn).values()],n={};return t.forEach(r=>{ir(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Vt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=aa(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===Dr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Vt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,Ie).clear(),C(this,Lt).clear()}},Ie=new WeakMap,Lt=new WeakMap,Vt=new WeakMap,zn=new WeakMap,Bn=new WeakMap,qt=new WeakMap,Nn=new WeakMap,Ln=new WeakMap,ps),Ge,ve,cr,Ue,hn,Vn,Wt,Ut,ur,qn,Wn,mn,xn,Ht,Un,Se,Zn,Di,Ii,Mi,zi,Bi,Ni,Li,bs,ds,mc=(ds=class extends pr{constructor(t,n){super();ue(this,Se);ue(this,Ge);ue(this,ve);ue(this,cr);ue(this,Ue);ue(this,hn);ue(this,Vn);ue(this,Wt);ue(this,Ut);ue(this,ur);ue(this,qn);ue(this,Wn);ue(this,mn);ue(this,xn);ue(this,Ht);ue(this,Un,new Set);this.options=n,X(this,Ge,t),X(this,Ut,null),X(this,Wt,_i()),this.options.experimental_prefetchInRender||C(this,Wt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,ve).addObserver(this),Va(C(this,ve),this.options)?ye(this,Se,Zn).call(this):this.updateResult(),ye(this,Se,zi).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Vi(C(this,ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Vi(C(this,ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,Se,Bi).call(this),ye(this,Se,Ni).call(this),C(this,ve).removeObserver(this)}setOptions(t){const n=this.options,r=C(this,ve);if(this.options=C(this,Ge).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pt(this.options.enabled,C(this,ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ye(this,Se,Li).call(this),C(this,ve).setOptions(this.options),n._defaulted&&!$i(this.options,n)&&C(this,Ge).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,ve),observer:this});const i=this.hasListeners();i&&qa(C(this,ve),r,this.options,n)&&ye(this,Se,Zn).call(this),this.updateResult(),i&&(C(this,ve)!==r||pt(this.options.enabled,C(this,ve))!==pt(n.enabled,C(this,ve))||Kt(this.options.staleTime,C(this,ve))!==Kt(n.staleTime,C(this,ve)))&&ye(this,Se,Di).call(this);const a=ye(this,Se,Ii).call(this);i&&(C(this,ve)!==r||pt(this.options.enabled,C(this,ve))!==pt(n.enabled,C(this,ve))||a!==C(this,Ht))&&ye(this,Se,Mi).call(this,a)}getOptimisticResult(t){const n=C(this,Ge).getQueryCache().build(C(this,Ge),t),r=this.createResult(n,t);return gc(this,r)&&(X(this,Ue,r),X(this,Vn,this.options),X(this,hn,C(this,ve).state)),r}getCurrentResult(){return C(this,Ue)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){C(this,Un).add(t)}getCurrentQuery(){return C(this,ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,Ge).defaultQueryOptions(t),r=C(this,Ge).getQueryCache().build(C(this,Ge),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ye(this,Se,Zn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Ue)))}createResult(t,n){var q;const r=C(this,ve),i=this.options,a=C(this,Ue),o=C(this,hn),s=C(this,Vn),u=t!==r?t.state:C(this,cr),{state:f}=t;let m={...f},h=!1,g;if(n._optimisticResults){const p=this.hasListeners(),R=!p&&Va(t,n),$=p&&qa(t,r,n,i);(R||$)&&(m={...m,...vs(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:w,errorUpdatedAt:d,status:E}=m;g=m.data;let y=!1;if(n.placeholderData!==void 0&&g===void 0&&E==="pending"){let p;a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?(p=a.data,y=!0):p=typeof n.placeholderData=="function"?n.placeholderData((q=C(this,Wn))==null?void 0:q.state.data,C(this,Wn)):n.placeholderData,p!==void 0&&(E="success",g=Pi(a==null?void 0:a.data,p,n),h=!0)}if(n.select&&g!==void 0&&!y)if(a&&g===(o==null?void 0:o.data)&&n.select===C(this,ur))g=C(this,qn);else try{X(this,ur,n.select),g=n.select(g),g=Pi(a==null?void 0:a.data,g,n),X(this,qn,g),X(this,Ut,null)}catch(p){X(this,Ut,p)}C(this,Ut)&&(w=C(this,Ut),g=C(this,qn),d=Date.now(),E="error");const j=m.fetchStatus==="fetching",k=E==="pending",v=E==="error",S=k&&j,_=g!==void 0,B={status:E,fetchStatus:m.fetchStatus,isPending:k,isSuccess:E==="success",isError:v,isInitialLoading:S,isLoading:S,data:g,dataUpdatedAt:m.dataUpdatedAt,error:w,errorUpdatedAt:d,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>u.dataUpdateCount||m.errorUpdateCount>u.errorUpdateCount,isFetching:j,isRefetching:j&&!k,isLoadingError:v&&!_,isPaused:m.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:v&&_,isStale:sa(t,n),refetch:this.refetch,promise:C(this,Wt),isEnabled:pt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const p=G=>{B.status==="error"?G.reject(B.error):B.data!==void 0&&G.resolve(B.data)},R=()=>{const G=X(this,Wt,B.promise=_i());p(G)},$=C(this,Wt);switch($.status){case"pending":t.queryHash===r.queryHash&&p($);break;case"fulfilled":(B.status==="error"||B.data!==$.value)&&R();break;case"rejected":(B.status!=="error"||B.error!==$.reason)&&R();break}}return B}updateResult(){const t=C(this,Ue),n=this.createResult(C(this,ve),this.options);if(X(this,hn,C(this,ve).state),X(this,Vn,this.options),C(this,hn).data!==void 0&&X(this,Wn,C(this,ve)),$i(n,t))return;X(this,Ue,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!C(this,Un).size)return!0;const o=new Set(a??C(this,Un));return this.options.throwOnError&&o.add("error"),Object.keys(C(this,Ue)).some(s=>{const c=s;return C(this,Ue)[c]!==t[c]&&o.has(c)})};ye(this,Se,bs).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,Se,zi).call(this)}},Ge=new WeakMap,ve=new WeakMap,cr=new WeakMap,Ue=new WeakMap,hn=new WeakMap,Vn=new WeakMap,Wt=new WeakMap,Ut=new WeakMap,ur=new WeakMap,qn=new WeakMap,Wn=new WeakMap,mn=new WeakMap,xn=new WeakMap,Ht=new WeakMap,Un=new WeakMap,Se=new WeakSet,Zn=function(t){ye(this,Se,Li).call(this);let n=C(this,ve).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ze)),n},Di=function(){ye(this,Se,Bi).call(this);const t=Kt(this.options.staleTime,C(this,ve));if(yn||C(this,Ue).isStale||!Fi(t))return;const r=fs(C(this,Ue).dataUpdatedAt,t)+1;X(this,mn,setTimeout(()=>{C(this,Ue).isStale||this.updateResult()},r))},Ii=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,ve)):this.options.refetchInterval)??!1},Mi=function(t){ye(this,Se,Ni).call(this),X(this,Ht,t),!(yn||pt(this.options.enabled,C(this,ve))===!1||!Fi(C(this,Ht))||C(this,Ht)===0)&&X(this,xn,setInterval(()=>{(this.options.refetchIntervalInBackground||oa.isFocused())&&ye(this,Se,Zn).call(this)},C(this,Ht)))},zi=function(){ye(this,Se,Di).call(this),ye(this,Se,Mi).call(this,ye(this,Se,Ii).call(this))},Bi=function(){C(this,mn)&&(clearTimeout(C(this,mn)),X(this,mn,void 0))},Ni=function(){C(this,xn)&&(clearInterval(C(this,xn)),X(this,xn,void 0))},Li=function(){const t=C(this,Ge).getQueryCache().build(C(this,Ge),this.options);if(t===C(this,ve))return;const n=C(this,ve);X(this,ve,t),X(this,cr,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},bs=function(t){Ne.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,Ue))}),C(this,Ge).getQueryCache().notify({query:C(this,ve),type:"observerResultsUpdated"})})},ds);function xc(e,t){return pt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Va(e,t){return xc(e,t)||e.state.data!==void 0&&Vi(e,t,t.refetchOnMount)}function Vi(e,t,n){if(pt(t.enabled,e)!==!1&&Kt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&sa(e,t)}return!1}function qa(e,t,n,r){return(e!==t||pt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&sa(e,n)}function sa(e,t){return pt(t.enabled,e)!==!1&&e.isStaleByTime(Kt(t.staleTime,e))}function gc(e,t){return!$i(e.getCurrentResult(),t)}var ws=J.createContext(void 0),yc=e=>{const t=J.useContext(ws);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vc=({client:e,children:t})=>(J.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(ws.Provider,{value:e,children:t})),Ss=J.createContext(!1),bc=()=>J.useContext(Ss);Ss.Provider;function wc(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Sc=J.createContext(wc()),Cc=()=>J.useContext(Sc),Tc=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ec=e=>{J.useEffect(()=>{e.clearReset()},[e])},jc=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||tc(n,[e.error,r])),kc=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Oc=(e,t)=>e.isLoading&&e.isFetching&&!t,Fc=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Wa=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ac(e,t,n){var m,h,g,w,d;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 r=bc(),i=Cc(),a=yc(),o=a.defaultQueryOptions(e);(h=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||h.call(m,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=r?"isRestoring":"optimistic",kc(o),Tc(o,i),Ec(i);const s=!a.getQueryCache().get(o.queryHash),[c]=J.useState(()=>new t(a,o)),u=c.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(J.useSyncExternalStore(J.useCallback(E=>{const y=f?c.subscribe(Ne.batchCalls(E)):Ze;return c.updateResult(),y},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),J.useEffect(()=>{c.setOptions(o)},[o,c]),Fc(o,u))throw Wa(o,c,i);if(jc({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((w=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||w.call(g,o,u),o.experimental_prefetchInRender&&!yn&&Oc(u,r)){const E=s?Wa(o,c,i):(d=a.getQueryCache().get(o.queryHash))==null?void 0:d.promise;E==null||E.catch(Ze).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function $c(e,t){return Ac(e,mc)}function la(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vr={exports:{}},br={exports:{}},be={};/** @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
|
|
8
|
+
*/var Ua;function Rc(){if(Ua)return be;Ua=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=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,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function k(S){if(typeof S=="object"&&S!==null){var _=S.$$typeof;switch(_){case t:switch(S=S.type,S){case c:case u:case r:case a:case i:case m:return S;default:switch(S=S&&S.$$typeof,S){case s:case f:case w:case g:case o:return S;default:return _}}case n:return _}}}function v(S){return k(S)===u}return be.AsyncMode=c,be.ConcurrentMode=u,be.ContextConsumer=s,be.ContextProvider=o,be.Element=t,be.ForwardRef=f,be.Fragment=r,be.Lazy=w,be.Memo=g,be.Portal=n,be.Profiler=a,be.StrictMode=i,be.Suspense=m,be.isAsyncMode=function(S){return v(S)||k(S)===c},be.isConcurrentMode=v,be.isContextConsumer=function(S){return k(S)===s},be.isContextProvider=function(S){return k(S)===o},be.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},be.isForwardRef=function(S){return k(S)===f},be.isFragment=function(S){return k(S)===r},be.isLazy=function(S){return k(S)===w},be.isMemo=function(S){return k(S)===g},be.isPortal=function(S){return k(S)===n},be.isProfiler=function(S){return k(S)===a},be.isStrictMode=function(S){return k(S)===i},be.isSuspense=function(S){return k(S)===m},be.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===a||S===i||S===m||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===w||S.$$typeof===g||S.$$typeof===o||S.$$typeof===s||S.$$typeof===f||S.$$typeof===E||S.$$typeof===y||S.$$typeof===j||S.$$typeof===d)},be.typeOf=k,be}var we={};/** @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
|
|
15
|
+
*/var Ha;function Pc(){return Ha||(Ha=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=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,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function k(z){return typeof z=="string"||typeof z=="function"||z===r||z===u||z===a||z===i||z===m||z===h||typeof z=="object"&&z!==null&&(z.$$typeof===w||z.$$typeof===g||z.$$typeof===o||z.$$typeof===s||z.$$typeof===f||z.$$typeof===E||z.$$typeof===y||z.$$typeof===j||z.$$typeof===d)}function v(z){if(typeof z=="object"&&z!==null){var xe=z.$$typeof;switch(xe){case t:var je=z.type;switch(je){case c:case u:case r:case a:case i:case m:return je;default:var Ve=je&&je.$$typeof;switch(Ve){case s:case f:case w:case g:case o:return Ve;default:return xe}}case n:return xe}}}var S=c,_=u,M=s,B=o,q=t,p=f,R=r,$=w,G=g,N=n,re=a,V=i,K=m,te=!1;function oe(z){return te||(te=!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.")),T(z)||v(z)===c}function T(z){return v(z)===u}function D(z){return v(z)===s}function ee(z){return v(z)===o}function se(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function ie(z){return v(z)===f}function pe(z){return v(z)===r}function U(z){return v(z)===w}function ne(z){return v(z)===g}function de(z){return v(z)===n}function me(z){return v(z)===a}function L(z){return v(z)===i}function Y(z){return v(z)===m}we.AsyncMode=S,we.ConcurrentMode=_,we.ContextConsumer=M,we.ContextProvider=B,we.Element=q,we.ForwardRef=p,we.Fragment=R,we.Lazy=$,we.Memo=G,we.Portal=N,we.Profiler=re,we.StrictMode=V,we.Suspense=K,we.isAsyncMode=oe,we.isConcurrentMode=T,we.isContextConsumer=D,we.isContextProvider=ee,we.isElement=se,we.isForwardRef=ie,we.isFragment=pe,we.isLazy=U,we.isMemo=ne,we.isPortal=de,we.isProfiler=me,we.isStrictMode=L,we.isSuspense=Y,we.isValidElementType=k,we.typeOf=v}()),we}var Ya;function Cs(){return Ya||(Ya=1,process.env.NODE_ENV==="production"?br.exports=Rc():br.exports=Pc()),br.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
19
|
+
*/var di,Ka;function _c(){if(Ka)return di;Ka=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(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 u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return di=i()?Object.assign:function(a,o){for(var s,c=r(a),u,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var m in s)t.call(s,m)&&(c[m]=s[m]);if(e){u=e(s);for(var h=0;h<u.length;h++)n.call(s,u[h])&&(c[u[h]]=s[u[h]])}}return c},di}var fi,Qa;function ca(){if(Qa)return fi;Qa=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fi=e,fi}var hi,Ga;function Ts(){return Ga||(Ga=1,hi=Function.call.bind(Object.prototype.hasOwnProperty)),hi}var mi,Za;function Dc(){if(Za)return mi;Za=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ca(),n={},r=Ts();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,u){if(process.env.NODE_ENV!=="production"){for(var f in a)if(r(a,f)){var m;try{if(typeof a[f]!="function"){var h=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 h.name="Invariant Violation",h}m=a[f](o,f,c,s,null,t)}catch(w){m=w}if(m&&!(m 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 m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in n)){n[m.message]=!0;var g=u?u():"";e("Failed "+s+" type: "+m.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mi=i,mi}var xi,Xa;function Ic(){if(Xa)return xi;Xa=1;var e=Cs(),t=_c(),n=ca(),r=Ts(),i=Dc(),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 xi=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function m(T){var D=T&&(u&&T[u]||T[f]);if(typeof D=="function")return D}var h="<<anonymous>>",g={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:j(),arrayOf:k,element:v(),elementType:S(),instanceOf:_,node:p(),objectOf:B,oneOf:M,oneOfType:q,shape:$,exact:G};function w(T,D){return T===D?T!==0||1/T===1/D:T!==T&&D!==D}function d(T,D){this.message=T,this.data=D&&typeof D=="object"?D:{},this.stack=""}d.prototype=Error.prototype;function E(T){if(process.env.NODE_ENV!=="production")var D={},ee=0;function se(pe,U,ne,de,me,L,Y){if(de=de||h,L=L||ne,Y!==n){if(c){var z=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 z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var xe=de+":"+ne;!D[xe]&&ee<3&&(a("You are manually calling a React.PropTypes validation function for the `"+L+"` prop on `"+de+"`. 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."),D[xe]=!0,ee++)}}return U[ne]==null?pe?U[ne]===null?new d("The "+me+" `"+L+"` is marked as required "+("in `"+de+"`, but its value is `null`.")):new d("The "+me+" `"+L+"` is marked as required in "+("`"+de+"`, but its value is `undefined`.")):null:T(U,ne,de,me,L)}var ie=se.bind(null,!1);return ie.isRequired=se.bind(null,!0),ie}function y(T){function D(ee,se,ie,pe,U,ne){var de=ee[se],me=V(de);if(me!==T){var L=K(de);return new d("Invalid "+pe+" `"+U+"` of type "+("`"+L+"` supplied to `"+ie+"`, expected ")+("`"+T+"`."),{expectedType:T})}return null}return E(D)}function j(){return E(o)}function k(T){function D(ee,se,ie,pe,U){if(typeof T!="function")return new d("Property `"+U+"` of component `"+ie+"` has invalid PropType notation inside arrayOf.");var ne=ee[se];if(!Array.isArray(ne)){var de=V(ne);return new d("Invalid "+pe+" `"+U+"` of type "+("`"+de+"` supplied to `"+ie+"`, expected an array."))}for(var me=0;me<ne.length;me++){var L=T(ne,me,ie,pe,U+"["+me+"]",n);if(L instanceof Error)return L}return null}return E(D)}function v(){function T(D,ee,se,ie,pe){var U=D[ee];if(!s(U)){var ne=V(U);return new d("Invalid "+ie+" `"+pe+"` of type "+("`"+ne+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return E(T)}function S(){function T(D,ee,se,ie,pe){var U=D[ee];if(!e.isValidElementType(U)){var ne=V(U);return new d("Invalid "+ie+" `"+pe+"` of type "+("`"+ne+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return E(T)}function _(T){function D(ee,se,ie,pe,U){if(!(ee[se]instanceof T)){var ne=T.name||h,de=oe(ee[se]);return new d("Invalid "+pe+" `"+U+"` of type "+("`"+de+"` supplied to `"+ie+"`, expected ")+("instance of `"+ne+"`."))}return null}return E(D)}function M(T){if(!Array.isArray(T))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 D(ee,se,ie,pe,U){for(var ne=ee[se],de=0;de<T.length;de++)if(w(ne,T[de]))return null;var me=JSON.stringify(T,function(Y,z){var xe=K(z);return xe==="symbol"?String(z):z});return new d("Invalid "+pe+" `"+U+"` of value `"+String(ne)+"` "+("supplied to `"+ie+"`, expected one of "+me+"."))}return E(D)}function B(T){function D(ee,se,ie,pe,U){if(typeof T!="function")return new d("Property `"+U+"` of component `"+ie+"` has invalid PropType notation inside objectOf.");var ne=ee[se],de=V(ne);if(de!=="object")return new d("Invalid "+pe+" `"+U+"` of type "+("`"+de+"` supplied to `"+ie+"`, expected an object."));for(var me in ne)if(r(ne,me)){var L=T(ne,me,ie,pe,U+"."+me,n);if(L instanceof Error)return L}return null}return E(D)}function q(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var D=0;D<T.length;D++){var ee=T[D];if(typeof ee!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+te(ee)+" at index "+D+"."),o}function se(ie,pe,U,ne,de){for(var me=[],L=0;L<T.length;L++){var Y=T[L],z=Y(ie,pe,U,ne,de,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&me.push(z.data.expectedType)}var xe=me.length>0?", expected one of type ["+me.join(", ")+"]":"";return new d("Invalid "+ne+" `"+de+"` supplied to "+("`"+U+"`"+xe+"."))}return E(se)}function p(){function T(D,ee,se,ie,pe){return N(D[ee])?null:new d("Invalid "+ie+" `"+pe+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return E(T)}function R(T,D,ee,se,ie){return new d((T||"React class")+": "+D+" type `"+ee+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ie+"`.")}function $(T){function D(ee,se,ie,pe,U){var ne=ee[se],de=V(ne);if(de!=="object")return new d("Invalid "+pe+" `"+U+"` of type `"+de+"` "+("supplied to `"+ie+"`, expected `object`."));for(var me in T){var L=T[me];if(typeof L!="function")return R(ie,pe,U,me,K(L));var Y=L(ne,me,ie,pe,U+"."+me,n);if(Y)return Y}return null}return E(D)}function G(T){function D(ee,se,ie,pe,U){var ne=ee[se],de=V(ne);if(de!=="object")return new d("Invalid "+pe+" `"+U+"` of type `"+de+"` "+("supplied to `"+ie+"`, expected `object`."));var me=t({},ee[se],T);for(var L in me){var Y=T[L];if(r(T,L)&&typeof Y!="function")return R(ie,pe,U,L,K(Y));if(!Y)return new d("Invalid "+pe+" `"+U+"` key `"+L+"` supplied to `"+ie+"`.\nBad object: "+JSON.stringify(ee[se],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(T),null," "));var z=Y(ne,L,ie,pe,U+"."+L,n);if(z)return z}return null}return E(D)}function N(T){switch(typeof T){case"number":case"string":case"undefined":return!0;case"boolean":return!T;case"object":if(Array.isArray(T))return T.every(N);if(T===null||s(T))return!0;var D=m(T);if(D){var ee=D.call(T),se;if(D!==T.entries){for(;!(se=ee.next()).done;)if(!N(se.value))return!1}else for(;!(se=ee.next()).done;){var ie=se.value;if(ie&&!N(ie[1]))return!1}}else return!1;return!0;default:return!1}}function re(T,D){return T==="symbol"?!0:D?D["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&D instanceof Symbol:!1}function V(T){var D=typeof T;return Array.isArray(T)?"array":T instanceof RegExp?"object":re(D,T)?"symbol":D}function K(T){if(typeof T>"u"||T===null)return""+T;var D=V(T);if(D==="object"){if(T instanceof Date)return"date";if(T instanceof RegExp)return"regexp"}return D}function te(T){var D=K(T);switch(D){case"array":case"object":return"an "+D;case"boolean":case"date":case"regexp":return"a "+D;default:return D}}function oe(T){return!T.constructor||!T.constructor.name?h:T.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},xi}var gi,Ja;function Mc(){if(Ja)return gi;Ja=1;var e=ca();function t(){}function n(){}return n.resetWarningCache=t,gi=function(){function r(o,s,c,u,f,m){if(m!==e){var h=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 h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},gi}var eo;function zc(){if(eo)return vr.exports;if(eo=1,process.env.NODE_ENV!=="production"){var e=Cs(),t=!0;vr.exports=Ic()(e.isElement,t)}else vr.exports=Mc()();return vr.exports}var Bc=zc();const b=la(Bc);function Es(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Es(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function He(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Es(e))&&(r&&(r+=" "),r+=t);return r}function Kn(e,t,n=void 0){const r={};for(const i in e){const a=e[i];let o="",s=!0;for(let c=0;c<a.length;c+=1){const u=a[c];u&&(o+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(o+=" "+n[u]))}r[i]=o}return r}function Gt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Pe(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Gt(7));return e.charAt(0).toUpperCase()+e.slice(1)}var wr={exports:{}},Ce={};/**
|
|
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,le,pe,te,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
|
|
28
|
+
*/var to;function Nc(){if(to)return Ce;to=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=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"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function w(d){if(typeof d=="object"&&d!==null){var E=d.$$typeof;switch(E){case e:switch(d=d.type,d){case n:case i:case r:case c:case u:case h:return d;default:switch(d=d&&d.$$typeof,d){case o:case s:case m:case f:return d;case a:return d;default:return E}}case t:return E}}}return Ce.ContextConsumer=a,Ce.ContextProvider=o,Ce.Element=e,Ce.ForwardRef=s,Ce.Fragment=n,Ce.Lazy=m,Ce.Memo=f,Ce.Portal=t,Ce.Profiler=i,Ce.StrictMode=r,Ce.Suspense=c,Ce.SuspenseList=u,Ce.isContextConsumer=function(d){return w(d)===a},Ce.isContextProvider=function(d){return w(d)===o},Ce.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===e},Ce.isForwardRef=function(d){return w(d)===s},Ce.isFragment=function(d){return w(d)===n},Ce.isLazy=function(d){return w(d)===m},Ce.isMemo=function(d){return w(d)===f},Ce.isPortal=function(d){return w(d)===t},Ce.isProfiler=function(d){return w(d)===i},Ce.isStrictMode=function(d){return w(d)===r},Ce.isSuspense=function(d){return w(d)===c},Ce.isSuspenseList=function(d){return w(d)===u},Ce.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===n||d===i||d===r||d===c||d===u||typeof d=="object"&&d!==null&&(d.$$typeof===m||d.$$typeof===f||d.$$typeof===o||d.$$typeof===a||d.$$typeof===s||d.$$typeof===g||d.getModuleId!==void 0)},Ce.typeOf=w,Ce}var Te={};/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-is.development.js
|
|
31
31
|
*
|
|
@@ -33,23 +33,23 @@ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var J=be(Q,le,pe,te,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
|
|
37
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:
|
|
36
|
+
*/var no;function Lc(){return no||(no=1,process.env.NODE_ENV!=="production"&&function(){function e(d){if(typeof d=="object"&&d!==null){var E=d.$$typeof;switch(E){case t:switch(d=d.type,d){case r:case a:case i:case u:case f:case g:return d;default:switch(d=d&&d.$$typeof,d){case s:case c:case h:case m:return d;case o:return d;default:return E}}case n:return E}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=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"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),w=Symbol.for("react.client.reference");Te.ContextConsumer=o,Te.ContextProvider=s,Te.Element=t,Te.ForwardRef=c,Te.Fragment=r,Te.Lazy=h,Te.Memo=m,Te.Portal=n,Te.Profiler=a,Te.StrictMode=i,Te.Suspense=u,Te.SuspenseList=f,Te.isContextConsumer=function(d){return e(d)===o},Te.isContextProvider=function(d){return e(d)===s},Te.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},Te.isForwardRef=function(d){return e(d)===c},Te.isFragment=function(d){return e(d)===r},Te.isLazy=function(d){return e(d)===h},Te.isMemo=function(d){return e(d)===m},Te.isPortal=function(d){return e(d)===n},Te.isProfiler=function(d){return e(d)===a},Te.isStrictMode=function(d){return e(d)===i},Te.isSuspense=function(d){return e(d)===u},Te.isSuspenseList=function(d){return e(d)===f},Te.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===a||d===i||d===u||d===f||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===m||d.$$typeof===s||d.$$typeof===o||d.$$typeof===c||d.$$typeof===w||d.getModuleId!==void 0)},Te.typeOf=e}()),Te}var ro;function Vc(){return ro||(ro=1,process.env.NODE_ENV==="production"?wr.exports=Nc():wr.exports=Lc()),wr.exports}var Mr=Vc();function Et(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 js(e){if(J.isValidElement(e)||Mr.isValidElementType(e)||!Et(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=js(e[n])}),t}function at(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Et(e)&&Et(t)&&Object.keys(t).forEach(i=>{J.isValidElement(t[i])||Mr.isValidElementType(t[i])?r[i]=t[i]:Et(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Et(e[i])?r[i]=at(e[i],t[i],n):n.clone?r[i]=Et(t[i])?js(t[i]):t[i]:r[i]=t[i]}),r}function nr(e,t){return t?at(e,t,{clone:!1}):e}const Jt=process.env.NODE_ENV!=="production"?b.oneOfType([b.number,b.string,b.object,b.array]):{};function qc(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var o,s;const a=/min-width:\s*([0-9.]+)/;return+(((o=r.match(a))==null?void 0:o[1])||0)-+(((s=i.match(a))==null?void 0:s[1])||0)});return n.length?n.reduce((r,i)=>{const a=t[i];return delete r[i],r[i]=a,r},{...t}):t}function Wc(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Uc(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){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\`.`:Gt(18,`(${t})`));return null}const[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function Hc(e){const t=(a,o)=>a.replace("@media",o?`@container ${o}`:"@container");function n(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 r={},i=a=>(n(r,a),r);return n(i),{...e,containerQueries:i}}const Xr={xs:0,sm:600,md:900,lg:1200,xl:1536},io={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Xr[e]}px)`},Yc={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Xr[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Dt(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||io;return t.reduce((o,s,c)=>(o[a.up(a.keys[c])]=n(t[c]),o),{})}if(typeof t=="object"){const a=r.breakpoints||io;return Object.keys(t).reduce((o,s)=>{if(Wc(a.keys,s)){const c=Uc(r.containerQueries?r:Yc,s);c&&(o[c]=n(t[s],s))}else if(Object.keys(a.values||Xr).includes(s)){const c=a.up(s);o[c]=n(t[s],s)}else{const c=s;o[c]=t[c]}return o},{})}return n(t)}function Kc(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const a=e.up(i);return r[a]={},r},{}))||{}}function Qc(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Jr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function zr(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Jr(e,n)||r,t&&(i=t(i,r,e)),i}function ze(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=o=>{if(o[t]==null)return null;const s=o[t],c=o.theme,u=Jr(c,r)||{};return Dt(o,s,m=>{let h=zr(u,i,m);return m===h&&typeof m=="string"&&(h=zr(u,i,`${t}${m==="default"?"":Pe(m)}`,m)),n===!1?h:{[n]:h}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:Jt}:{},a.filterProps=[t],a}function Gc(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Zc={m:"margin",p:"padding"},Xc={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ao={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Jc=Gc(e=>{if(e.length>2)if(ao[e])e=ao[e];else return[e];const[t,n]=e.split(""),r=Zc[t],i=Xc[n]||"";return Array.isArray(i)?i.map(a=>r+a):[r+i]}),ei=["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"],eu=[...ei,...ti];function dr(e,t,n,r){const i=Jr(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${r} 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
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 _p(e,t){return r=>e.reduce((n,i)=>(n[i]=_n(t,r),n),{})}function Rp(e,t,r,n){if(!t.includes(r))return null;const i=Ap(r),a=_p(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=>Rp(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"&&Op.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 Pp=Et("border",St),$p=Et("borderTop",St),Dp=Et("borderRight",St),Ip=Et("borderBottom",St),Mp=Et("borderLeft",St),zp=Et("borderColor"),Bp=Et("borderTopColor"),Vp=Et("borderRightColor"),Np=Et("borderBottomColor"),Lp=Et("borderLeftColor"),qp=Et("outline",St),Wp=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(Pp,$p,Dp,Ip,Mp,zp,Bp,Vp,Np,Lp,Ai,qp,Wp);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 Up=qe({prop:"gridColumn"}),Hp=qe({prop:"gridRow"}),Kp=qe({prop:"gridAutoFlow"}),Yp=qe({prop:"gridAutoColumns"}),Gp=qe({prop:"gridAutoRows"}),Qp=qe({prop:"gridTemplateColumns"}),Zp=qe({prop:"gridTemplateRows"}),Xp=qe({prop:"gridTemplateAreas"}),Jp=qe({prop:"gridArea"});Fi(Oi,_i,Ri,Up,Hp,Kp,Yp,Gp,Qp,Zp,Xp,Jp);function Kr(e,t){return t==="grey"?t:e}const ed=qe({prop:"color",themeKey:"palette",transform:Kr}),td=qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Kr}),rd=qe({prop:"backgroundColor",themeKey:"palette",transform:Kr});Fi(ed,td,rd);function ft(e){return e<=1&&e!==0?`${e*100}%`:e}const nd=qe({prop:"width",transform:ft}),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:ft(r)}};return Ht(e,e.maxWidth,t)}return null};Ja.filterProps=["maxWidth"];const id=qe({prop:"minWidth",transform:ft}),ad=qe({prop:"height",transform:ft}),od=qe({prop:"maxHeight",transform:ft}),sd=qe({prop:"minHeight",transform:ft});qe({prop:"size",cssProperty:"width",transform:ft});qe({prop:"size",cssProperty:"height",transform:ft});const ld=qe({prop:"boxSizing"});Fi(nd,Ja,id,ad,od,sd,ld);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:ft},maxWidth:{style:Ja},minWidth:{transform:ft},height:{transform:ft},maxHeight:{transform:ft},minHeight:{transform:ft},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 cd(...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 ud(e,t){return typeof e=="function"?e(t):e}function pd(){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,T=>{let m=si(u,f,T);return T===m&&typeof T=="string"&&(m=si(u,f,`${r}${T==="default"?"":De(T)}`,T)),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=Ep(i.breakpoints),f=Object.keys(p);let d=p;return Object.keys(c).forEach(u=>{const x=ud(c[u],i);if(x!=null)if(typeof x=="object")if(a[u])d=vn(d,e(u,x,i,a));else{const T=Ht({theme:i},x,m=>({[u]:m}));cd(T,x)?d[u]=t({sx:x,theme:i}):d=vn(d,T)}else d=vn(d,e(u,x,i,a))}),vp(i,kp(f,d))}return Array.isArray(n)?n.map(o):o(n)}return t}const sn=pd();sn.filterProps=["sx"];const dd=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 fd(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=dd(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 hd(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 md={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 gd(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var yd=/[A-Z]|^ms/g,xd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Nl=function(t){return t.charCodeAt(1)===45},is=function(t){return t!=null&&typeof t!="boolean"},Ji=gd(function(e){return Nl(e)?e:e.replace(yd,"-$&").toLowerCase()}),as=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(xd,function(n,i,a){return sr={name:i,styles:a,next:sr},i})}return md[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 vd(e,t,r)}}var c=r;return c}function vd(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;is(s)&&(n+=Ji(a)+":"+as(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var c=0;c<o.length;c++)is(o[c])&&(n+=Ji(a)+":"+as(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 os=/label:\s*([^\s;{]+)\s*(;|$)/g,sr;function bd(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]}os.lastIndex=0;for(var p="",f;(f=os.exec(i))!==null;)p+="-"+f[1];var d=hd(i)+p;return{name:d,styles:i,next:sr}}/**
|
|
40
|
+
`)),()=>{})}function ua(e){return dr(e,"spacing",8,"spacing")}function fr(e,t){return typeof t=="string"||t==null?t:e(t)}function tu(e,t){return n=>e.reduce((r,i)=>(r[i]=fr(t,n),r),{})}function nu(e,t,n,r){if(!t.includes(n))return null;const i=Jc(n),a=tu(i,r),o=e[n];return Dt(e,o,a)}function ks(e,t){const n=ua(e.theme);return Object.keys(e).map(r=>nu(e,t,r,n)).reduce(nr,{})}function _e(e){return ks(e,ei)}_e.propTypes=process.env.NODE_ENV!=="production"?ei.reduce((e,t)=>(e[t]=Jt,e),{}):{};_e.filterProps=ei;function De(e){return ks(e,ti)}De.propTypes=process.env.NODE_ENV!=="production"?ti.reduce((e,t)=>(e[t]=Jt,e),{}):{};De.filterProps=ti;process.env.NODE_ENV!=="production"&&eu.reduce((e,t)=>(e[t]=Jt,e),{});function ni(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(a=>{r[a]=i}),r),{}),n=r=>Object.keys(r).reduce((i,a)=>t[a]?nr(i,t[a](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function ft(e){return typeof e!="number"?e:`${e}px solid`}function ht(e,t){return ze({prop:e,themeKey:"borders",transform:t})}const ru=ht("border",ft),iu=ht("borderTop",ft),au=ht("borderRight",ft),ou=ht("borderBottom",ft),su=ht("borderLeft",ft),lu=ht("borderColor"),cu=ht("borderTopColor"),uu=ht("borderRightColor"),pu=ht("borderBottomColor"),du=ht("borderLeftColor"),fu=ht("outline",ft),hu=ht("outlineColor"),ri=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=dr(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:fr(t,r)});return Dt(e,e.borderRadius,n)}return null};ri.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Jt}:{};ri.filterProps=["borderRadius"];ni(ru,iu,au,ou,su,lu,cu,uu,pu,du,ri,fu,hu);const ii=e=>{if(e.gap!==void 0&&e.gap!==null){const t=dr(e.theme,"spacing",8,"gap"),n=r=>({gap:fr(t,r)});return Dt(e,e.gap,n)}return null};ii.propTypes=process.env.NODE_ENV!=="production"?{gap:Jt}:{};ii.filterProps=["gap"];const ai=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=dr(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:fr(t,r)});return Dt(e,e.columnGap,n)}return null};ai.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Jt}:{};ai.filterProps=["columnGap"];const oi=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=dr(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:fr(t,r)});return Dt(e,e.rowGap,n)}return null};oi.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Jt}:{};oi.filterProps=["rowGap"];const mu=ze({prop:"gridColumn"}),xu=ze({prop:"gridRow"}),gu=ze({prop:"gridAutoFlow"}),yu=ze({prop:"gridAutoColumns"}),vu=ze({prop:"gridAutoRows"}),bu=ze({prop:"gridTemplateColumns"}),wu=ze({prop:"gridTemplateRows"}),Su=ze({prop:"gridTemplateAreas"}),Cu=ze({prop:"gridArea"});ni(ii,ai,oi,mu,xu,gu,yu,vu,bu,wu,Su,Cu);function Pn(e,t){return t==="grey"?t:e}const Tu=ze({prop:"color",themeKey:"palette",transform:Pn}),Eu=ze({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Pn}),ju=ze({prop:"backgroundColor",themeKey:"palette",transform:Pn});ni(Tu,Eu,ju);function it(e){return e<=1&&e!==0?`${e*100}%`:e}const ku=ze({prop:"width",transform:it}),pa=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,a,o,s,c;const r=((o=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:o[n])||Xr[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:it(n)}};return Dt(e,e.maxWidth,t)}return null};pa.filterProps=["maxWidth"];const Ou=ze({prop:"minWidth",transform:it}),Fu=ze({prop:"height",transform:it}),Au=ze({prop:"maxHeight",transform:it}),$u=ze({prop:"minHeight",transform:it});ze({prop:"size",cssProperty:"width",transform:it});ze({prop:"size",cssProperty:"height",transform:it});const Ru=ze({prop:"boxSizing"});ni(ku,pa,Ou,Fu,Au,$u,Ru);const hr={border:{themeKey:"borders",transform:ft},borderTop:{themeKey:"borders",transform:ft},borderRight:{themeKey:"borders",transform:ft},borderBottom:{themeKey:"borders",transform:ft},borderLeft:{themeKey:"borders",transform:ft},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ft},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ri},color:{themeKey:"palette",transform:Pn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Pn},backgroundColor:{themeKey:"palette",transform:Pn},p:{style:De},pt:{style:De},pr:{style:De},pb:{style:De},pl:{style:De},px:{style:De},py:{style:De},padding:{style:De},paddingTop:{style:De},paddingRight:{style:De},paddingBottom:{style:De},paddingLeft:{style:De},paddingX:{style:De},paddingY:{style:De},paddingInline:{style:De},paddingInlineStart:{style:De},paddingInlineEnd:{style:De},paddingBlock:{style:De},paddingBlockStart:{style:De},paddingBlockEnd:{style:De},m:{style:_e},mt:{style:_e},mr:{style:_e},mb:{style:_e},ml:{style:_e},mx:{style:_e},my:{style:_e},margin:{style:_e},marginTop:{style:_e},marginRight:{style:_e},marginBottom:{style:_e},marginLeft:{style:_e},marginX:{style:_e},marginY:{style:_e},marginInline:{style:_e},marginInlineStart:{style:_e},marginInlineEnd:{style:_e},marginBlock:{style:_e},marginBlockStart:{style:_e},marginBlockEnd:{style:_e},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:ii},rowGap:{style:oi},columnGap:{style:ai},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:it},maxWidth:{style:pa},minWidth:{transform:it},height:{transform:it},maxHeight:{transform:it},minHeight:{transform:it},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 Pu(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function _u(e,t){return typeof e=="function"?e(t):e}function Du(){function e(n,r,i,a){const o={[n]:r,theme:i},s=a[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:m}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=Jr(i,u)||{};return m?m(o):Dt(o,r,w=>{let d=zr(h,f,w);return w===d&&typeof w=="string"&&(d=zr(h,f,`${n}${w==="default"?"":Pe(w)}`,w)),c===!1?d:{[c]:d}})}function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const a=i.unstable_sxConfig??hr;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 u=Kc(i.breakpoints),f=Object.keys(u);let m=u;return Object.keys(c).forEach(h=>{const g=_u(c[h],i);if(g!=null)if(typeof g=="object")if(a[h])m=nr(m,e(h,g,i,a));else{const w=Dt({theme:i},g,d=>({[h]:d}));Pu(w,g)?m[h]=t({sx:g,theme:i}):m=nr(m,w)}else m=nr(m,e(h,g,i,a))}),qc(i,Qc(f,m))}return Array.isArray(r)?r.map(o):o(r)}return t}const Hn=Du();Hn.filterProps=["sx"];const Iu=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??hr;return Object.keys(e).forEach(i=>{n[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function Mu(e){const{sx:t,...n}=e,{systemProps:r,otherProps:i}=Iu(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...o)=>{const s=t(...o);return Et(s)?{...r,...s}:r}:a={...r,...t},{...i,sx:a}}function zu(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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 Bu={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 Nu(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Lu=/[A-Z]|^ms/g,Vu=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Os=function(t){return t.charCodeAt(1)===45},oo=function(t){return t!=null&&typeof t!="boolean"},yi=Nu(function(e){return Os(e)?e:e.replace(Lu,"-$&").toLowerCase()}),so=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Vu,function(r,i,a){return Yt={name:i,styles:a,next:Yt},i})}return Bu[t]!==1&&!Os(t)&&typeof n=="number"&&n!==0?n+"px":n};function Br(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Yt={name:i.name,styles:i.styles,next:Yt},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Yt={name:o.name,styles:o.styles,next:Yt},o=o.next;var s=a.styles+";";return s}return qu(e,t,n)}}var c=n;return c}function qu(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Br(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;oo(s)&&(r+=yi(a)+":"+so(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var c=0;c<o.length;c++)oo(o[c])&&(r+=yi(a)+":"+so(a,o[c])+";");else{var u=Br(e,t,o);switch(a){case"animation":case"animationName":{r+=yi(a)+":"+u+";";break}default:r+=a+"{"+u+"}"}}}return r}var lo=/label:\s*([^\s;{]+)\s*(;|$)/g,Yt;function Wu(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";Yt=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=Br(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Br(n,t,e[s]),r){var c=a;i+=c[s]}lo.lastIndex=0;for(var u="",f;(f=lo.exec(i))!==null;)u+="-"+f[1];var m=zu(i)+u;return{name:m,styles:i,next:Yt}}/**
|
|
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
|
|
47
|
-
`)):
|
|
48
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
49
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:
|
|
50
|
-
`))}return
|
|
51
|
-
The color object needs to have a \`main\` property or a \`${
|
|
52
|
-
\`color.main\` should be a string, but \`${JSON.stringify(
|
|
46
|
+
*/function Uu(e,t){const n=Hl(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const i=typeof e=="string"?`"${e}"`:"component";return r.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
|
+
`)):r.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function Hu(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const co=[];function uo(e){return co[0]=e,Wu(co)}const Yu=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Ku(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,a=Yu(t),o=Object.keys(a);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,g){const w=o.indexOf(g);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(w!==-1&&typeof t[o[w]]=="number"?t[o[w]]:g)-r/100}${n})`}function f(h){return o.indexOf(h)+1<o.length?u(h,o[o.indexOf(h)+1]):s(h)}function m(h){const g=o.indexOf(h);return g===0?s(o[1]):g===o.length-1?c(o[g]):u(h,o[o.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:o,values:a,up:s,down:c,between:u,only:f,not:m,unit:n,...i}}const Qu={borderRadius:4};function Fs(e=8,t=ua({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(a=>{const o=t(a);return typeof o=="number"?`${o}px`:o}).join(" "));return n.mui=!0,n}function Gu(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function da(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=Ku(n),c=Fs(i);let u=at({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...Qu,...a}},o);return u=Hc(u),u.applyStyles=Gu,u=t.reduce((f,m)=>at(f,m),u),u.unstable_sxConfig={...hr,...o==null?void 0:o.unstable_sxConfig},u.unstable_sx=function(m){return Hn({sx:m,theme:this})},u}function Zu(e){return Object.keys(e).length===0}function Xu(e=null){const t=J.useContext(Xt.ThemeContext);return!t||Zu(t)?e:t}const Ju=da();function ep(e=Ju){return Xu(e)}const po=e=>e,tp=()=>{let e=po;return{configure(t){e=t},generate(t){return e(t)},reset(){e=po}}},np=tp(),rp={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 en(e,t,n="Mui"){const r=rp[t];return r?`${n}-${r}`:`${np.generate(e)}-${t}`}function bn(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=en(e,i,n)}),r}function As(e,t=""){return e.displayName||e.name||t}function fo(e,t,n){const r=As(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function ip(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return As(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Mr.ForwardRef:return fo(e,e.render,"ForwardRef");case Mr.Memo:return fo(e,e.type,"memo");default:return}}}function $s(e){const{variants:t,...n}=e,r={variants:t,style:uo(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=uo(i.style))}),r}const ap=da();function vi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function op(e){return e?(t,n)=>n[e]:null}function sp(e,t,n){e.theme=pp(e.theme)?n:e.theme[t]||e.theme}function Or(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>Or(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:i,...a}=n;r=a}return Rs(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function Rs(e,t,n=[]){var i;let r;e:for(let a=0;a<t.length;a+=1){const o=t[a];if(typeof o.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!o.props(r))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"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(o.style(r))):n.push(o.style)}return n}function lp(e={}){const{themeId:t,defaultTheme:n=ap,rootShouldForwardProp:r=vi,slotShouldForwardProp:i=vi}=e;function a(s){sp(s,t,n)}return(s,c={})=>{Hu(s,S=>S.filter(_=>_!==Hn));const{name:u,slot:f,skipVariantsResolver:m,skipSx:h,overridesResolver:g=op(Ps(f)),...w}=c,d=m!==void 0?m:f&&f!=="Root"&&f!=="root"||!1,E=h||!1;let y=vi;f==="Root"||f==="root"?y=r:f?y=i:dp(s)&&(y=void 0);const j=Uu(s,{shouldForwardProp:y,label:up(u,f),...w}),k=S=>{if(S.__emotion_real===S)return S;if(typeof S=="function")return function(M){return Or(M,S)};if(Et(S)){const _=$s(S);return _.variants?function(B){return Or(B,_)}:_.style}return S},v=(...S)=>{const _=[],M=S.map(k),B=[];if(_.push(a),u&&g&&B.push(function($){var V,K;const N=(K=(V=$.theme.components)==null?void 0:V[u])==null?void 0:K.styleOverrides;if(!N)return null;const re={};for(const te in N)re[te]=Or($,N[te]);return g($,re)}),u&&!d&&B.push(function($){var re,V;const G=$.theme,N=(V=(re=G==null?void 0:G.components)==null?void 0:re[u])==null?void 0:V.variants;return N?Rs($,N):null}),E||B.push(Hn),Array.isArray(M[0])){const R=M.shift(),$=new Array(_.length).fill(""),G=new Array(B.length).fill("");let N;N=[...$,...R,...G],N.raw=[...$,...R.raw,...G],_.unshift(N)}const q=[..._,...M,...B],p=j(...q);return s.muiName&&(p.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(p.displayName=cp(u,f,s)),p};return j.withConfig&&(v.withConfig=j.withConfig),v}}function cp(e,t,n){return e?`${e}${Pe(t||"")}`:`Styled(${ip(n)})`}function up(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Ps(t||"Root")}`),n}function pp(e){for(const t in e)return!1;return!0}function dp(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ps(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function qi(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]={...e[i],...n[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],o=t[i];if(!o)n[i]=a||{};else if(!a)n[i]=o;else{n[i]={...o};for(const s in a)if(Object.prototype.hasOwnProperty.call(a,s)){const c=s;n[i][c]=qi(a[c],o[c])}}}else n[i]===void 0&&(n[i]=e[i])}return n}const fp=typeof window<"u"?J.useLayoutEffect:J.useEffect;function hp(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function fa(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),hp(e,t,n)}function mp(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),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.`),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Zt(e){if(e.type)return e;if(e.charAt(0)==="#")return Zt(mp(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))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().`:Gt(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(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.`:Gt(10,i))}else r=r.split(",");return r=r.map(a=>parseFloat(a)),{type:n,values:r,colorSpace:i}}const xp=e=>{const t=Zt(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Xn=(e,t)=>{try{return xp(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function si(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function _s(e){e=Zt(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(u,f=(u+n/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])),si({type:s,values:c})}function Wi(e){e=Zt(e);let t=e.type==="hsl"||e.type==="hsla"?Zt(_s(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function ho(e,t){const n=Wi(e),r=Wi(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function ot(e,t){return e=Zt(e),t=fa(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,si(e)}function Sr(e,t,n){try{return ot(e,t)}catch{return e}}function ha(e,t){if(e=Zt(e),t=fa(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return si(e)}function ke(e,t,n){try{return ha(e,t)}catch{return e}}function ma(e,t){if(e=Zt(e),t=fa(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return si(e)}function Oe(e,t,n){try{return ma(e,t)}catch{return e}}function gp(e,t=.15){return Wi(e)>.5?ha(e,t):ma(e,t)}function Cr(e,t,n){try{return gp(e,t)}catch{return e}}const yp=J.createContext(void 0);process.env.NODE_ENV!=="production"&&(b.node,b.object);function vp(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?qi(i.defaultProps,r):!i.styleOverrides&&!i.variants?qi(i,r):r}function bp({props:e,name:t}){const n=J.useContext(yp);return vp({props:e,name:t,theme:{components:n}})}const mo={theme:void 0};function wp(e){let t,n;return function(i){let a=t;return(a===void 0||i.theme!==n)&&(mo.theme=i.theme,a=$s(e(mo)),t=a,n=i.theme),a}}function Sp(e=""){function t(...r){if(!r.length)return"";const i=r[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(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const xo=(e,t,n,r=[])=>{let i=e;t.forEach((a,o)=>{o===t.length-1?Array.isArray(i)?i[Number(a)]=n:i&&typeof i=="object"&&(i[a]=n):i&&typeof i=="object"&&(i[a]||(i[a]=r.includes(a)?[]:{}),i=i[a])})},Cp=(e,t,n)=>{function r(i,a=[],o=[]){Object.entries(i).forEach(([s,c])=>{(!n||n&&!n([...a,s]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...a,s],Array.isArray(c)?[...o,s]:o):t([...a,s],c,o))})}r(e)},Tp=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function bi(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return Cp(e,(s,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(s,c))){const f=`--${n?`${n}-`:""}${s.join("-")}`,m=Tp(s,c);Object.assign(i,{[f]:m}),xo(a,s,`var(${f})`,u),xo(o,s,`var(${f}, ${m})`,u)}},s=>s[0]==="vars"),{css:i,vars:a,varsWithDefaults:o}}function Ep(e,t={}){const{getSelector:n=E,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:a={},components:o,defaultColorScheme:s="light",...c}=e,{vars:u,css:f,varsWithDefaults:m}=bi(c,t);let h=m;const g={},{[s]:w,...d}=a;if(Object.entries(d||{}).forEach(([k,v])=>{const{vars:S,css:_,varsWithDefaults:M}=bi(v,t);h=at(h,M),g[k]={css:_,vars:S}}),w){const{css:k,vars:v,varsWithDefaults:S}=bi(w,t);h=at(h,S),g[s]={css:k,vars:v}}function E(k,v){var _,M;let S=i;if(i==="class"&&(S=".%s"),i==="data"&&(S="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(S=`[${i}="%s"]`),k){if(S==="media")return e.defaultColorScheme===k?":root":{[`@media (prefers-color-scheme: ${((M=(_=a[k])==null?void 0:_.palette)==null?void 0:M.mode)||k})`]:{":root":v}};if(S)return e.defaultColorScheme===k?`:root, ${S.replace("%s",String(k))}`:S.replace("%s",String(k))}return":root"}return{vars:h,generateThemeVars:()=>{let k={...u};return Object.entries(g).forEach(([,{vars:v}])=>{k=at(k,v)}),k},generateStyleSheets:()=>{var B,q;const k=[],v=e.defaultColorScheme||"light";function S(p,R){Object.keys(R).length&&k.push(typeof p=="string"?{[p]:{...R}}:p)}S(n(void 0,{...f}),f);const{[v]:_,...M}=g;if(_){const{css:p}=_,R=(q=(B=a[v])==null?void 0:B.palette)==null?void 0:q.mode,$=!r&&R?{colorScheme:R,...p}:{...p};S(n(v,{...$}),$)}return Object.entries(M).forEach(([p,{css:R}])=>{var N,re;const $=(re=(N=a[p])==null?void 0:N.palette)==null?void 0:re.mode,G=!r&&$?{colorScheme:$,...R}:{...R};S(n(p,{...G}),G)}),k}}}function jp(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const ar={black:"#000",white:"#fff"},kp={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"},En={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},jn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Gn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},kn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},On={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Fn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Ds(){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:ar.white,default:ar.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 Op=Ds();function Is(){return{text:{primary:ar.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:ar.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 go=Is();function yo(e,t,n,r){const i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=ma(e.main,i):t==="dark"&&(e.dark=ha(e.main,a)))}function Fp(e="light"){return e==="dark"?{main:kn[200],light:kn[50],dark:kn[400]}:{main:kn[700],light:kn[400],dark:kn[800]}}function Ap(e="light"){return e==="dark"?{main:En[200],light:En[50],dark:En[400]}:{main:En[500],light:En[300],dark:En[700]}}function $p(e="light"){return e==="dark"?{main:jn[500],light:jn[300],dark:jn[700]}:{main:jn[700],light:jn[400],dark:jn[800]}}function Rp(e="light"){return e==="dark"?{main:On[400],light:On[300],dark:On[700]}:{main:On[700],light:On[500],dark:On[900]}}function Pp(e="light"){return e==="dark"?{main:Fn[400],light:Fn[300],dark:Fn[700]}:{main:Fn[800],light:Fn[500],dark:Fn[900]}}function _p(e="light"){return e==="dark"?{main:Gn[400],light:Gn[300],dark:Gn[700]}:{main:"#ed6c02",light:Gn[500],dark:Gn[900]}}function xa(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,a=e.primary||Fp(t),o=e.secondary||Ap(t),s=e.error||$p(t),c=e.info||Rp(t),u=e.success||Pp(t),f=e.warning||_p(t);function m(d){const E=ho(d,go.text.primary)>=n?go.text.primary:Op.text.primary;if(process.env.NODE_ENV!=="production"){const y=ho(d,E);y<3&&console.error([`MUI: The contrast ratio of ${y}:1 for ${E} on ${d}`,"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 E}const h=({color:d,name:E,mainShade:y=500,lightShade:j=300,darkShade:k=700})=>{if(d={...d},!d.main&&d[y]&&(d.main=d[y]),!d.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${E?` (${E})`:""} provided to augmentColor(color) is invalid.
|
|
51
|
+
The color object needs to have a \`main\` property or a \`${y}\` property.`:Gt(11,E?` (${E})`:"",y));if(typeof d.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${E?` (${E})`:""} provided to augmentColor(color) is invalid.
|
|
52
|
+
\`color.main\` should be a string, but \`${JSON.stringify(d.main)}\` was provided instead.
|
|
53
53
|
|
|
54
54
|
Did you intend to use one of the following approaches?
|
|
55
55
|
|
|
@@ -61,18 +61,18 @@ const theme1 = createTheme({ palette: {
|
|
|
61
61
|
|
|
62
62
|
const theme2 = createTheme({ palette: {
|
|
63
63
|
primary: { main: green[500] },
|
|
64
|
-
} });`:
|
|
65
|
-
`)),Object.keys(
|
|
64
|
+
} });`:Gt(12,E?` (${E})`:"",JSON.stringify(d.main)));return yo(d,"light",j,r),yo(d,"dark",k,r),d.contrastText||(d.contrastText=m(d.main)),d};let g;return t==="light"?g=Ds():t==="dark"&&(g=Is()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),at({common:{...ar},mode:t,primary:h({color:a,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:f,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:u,name:"success"}),grey:kp,contrastThreshold:n,getContrastText:m,augmentColor:h,tonalOffset:r,...g},i)}function Dp(e){const t={};return Object.entries(e).forEach(r=>{const[i,a]=r;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 Ip(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Mp(e){return Math.round(e*1e5)/1e5}const vo={textTransform:"uppercase"},bo='"Roboto", "Helvetica", "Arial", sans-serif';function zp(e,t){const{fontFamily:n=bo,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:u,pxToRem:f,...m}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=r/14,g=f||(E=>`${E/c*h}rem`),w=(E,y,j,k,v)=>({fontFamily:n,fontWeight:E,fontSize:g(y),lineHeight:j,...n===bo?{letterSpacing:`${Mp(k/y)}em`}:{},...v,...u}),d={h1:w(i,96,1.167,-1.5),h2:w(i,60,1.2,-.5),h3:w(a,48,1.167,0),h4:w(a,34,1.235,.25),h5:w(a,24,1.334,0),h6:w(o,20,1.6,.15),subtitle1:w(a,16,1.75,.15),subtitle2:w(o,14,1.57,.1),body1:w(a,16,1.5,.15),body2:w(a,14,1.43,.15),button:w(o,14,1.75,.4,vo),caption:w(a,12,1.66,.4),overline:w(a,12,2.66,1,vo),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return at({htmlFontSize:c,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,...d},m,{clone:!1})}const Bp=.2,Np=.14,Lp=.12;function $e(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Bp})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Np})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Lp})`].join(",")}const Vp=["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)],qp={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)"},Wp={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function wo(e){return`${Math.round(e)}ms`}function Up(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Hp(e){const t={...qp,...e.easing},n={...Wp,...e.duration};return{getAutoHeightDuration:Up,create:(i=["all"],a={})=>{const{duration:o=n.standard,easing:s=t.easeInOut,delay:c=0,...u}=a;if(process.env.NODE_ENV!=="production"){const f=h=>typeof h=="string",m=h=>!Number.isNaN(parseFloat(h));!f(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!m(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.'),!m(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(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof o=="string"?o:wo(o)} ${s} ${typeof c=="string"?c:wo(c)}`).join(",")},...e,easing:t,duration:n}}const Yp={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Kp(e){return Et(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ms(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let a=0;a<i.length;a++){const[o,s]=i[a];!Kp(s)||o.startsWith("unstable_")?delete r[o]:Et(s)&&(r[o]={...s},n(r[o]))}}return n(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
|
|
73
|
-
`))}
|
|
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 Pf(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{}},$f=(e="mui")=>Xd(e);function ra(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=Ff({...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 Df(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:o=Af,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=$f(a),{[d]:x,light:T,dark:m,...C}=r,b={...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(b,w,p,d);T&&!b.light&&ra(b,T,void 0,"light"),m&&!b.dark&&ra(b,m,void 0,"dark");let F={defaultColorScheme:d,...$,cssVarPrefix:a,colorSchemeSelector:s,rootSelector:c,getCssVar:u,colorSchemes:b,font:{...df($.typography),...$.font},spacing:Pf(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")),Rf(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",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",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",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",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",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",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",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",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))}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)=>ht(Y,h),F);const E={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:_f(F)},{vars:_,generateThemeVars:z,generateStyleSheets:R}=tf(F,E);return F.vars=_,Object.entries(F.colorSchemes[F.defaultColorScheme]).forEach(([Y,h])=>{F[Y]=h}),F.generateThemeVars=z,F.generateStyleSheets=R,F.generateSpacing=function(){return Ll(p.spacing,Xa(this))},F.getColorSchemeSelector=rf(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 vs(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},vs(d,"dark",p.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:d.palette},vs(d,"light",p.light)),d}return!r&&!("light"in p)&&s==="light"&&(p.light=!0),Df({...o,colorSchemes:p,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const ec=Jl(),tc="$$material";function rc(){const e=Od(ec);return process.env.NODE_ENV!=="production"&&ie.useDebugValue(e),e[tc]||e}function If(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Mf=e=>If(e)&&e!=="classes",yt=zd({themeId:tc,defaultTheme:ec,rootShouldForwardProp:Mf});function zf(){return fd}const Pr=Zd;process.env.NODE_ENV!=="production"&&(k.node,k.object.isRequired);function Dr(e){return Qd(e)}function Bf(e){return typeof e.main=="string"}function Vf(e,t=[]){if(!Bf(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&&Vf(t,e)}function Nf(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 Lf={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},qf=zf(),Wf=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,Nf,o)},Uf=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}}]}})),bs={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},nc=ie.forwardRef(function(t,r){const{color:n,...i}=Dr({props:t,name:"MuiTypography"}),a=!Lf[n],o=qf({...i,...a&&{color:n}}),{align:s="inherit",className:c,component:p,gutterBottom:f=!1,noWrap:d=!1,paragraph:u=!1,variant:x="body1",variantMapping:T=bs,...m}=o,C={...o,align:s,color:n,className:c,component:p,gutterBottom:f,noWrap:d,paragraph:u,variant:x,variantMapping:T},b=p||(u?"p":T[x]||bs[x])||"span",w=Wf(C);return l.jsx(Uf,{as:b,ref:r,className:nt(w.root,c),...m,ownerState:C,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...m.style}})});process.env.NODE_ENV!=="production"&&(nc.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 ao=ie.createContext(void 0);process.env.NODE_ENV!=="production"&&(ao.displayName="FormControlContext");function Hf(){return ie.useContext(ao)}function Kf(e){return hr("MuiInputAdornment",e)}const ws=$r("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Ss;const Yf=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${De(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},Gf=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,Kf,t)},Qf=yt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Yf})(Pr(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${ws.positionStart}&:not(.${ws.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),ic=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=Hf()||{};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 T={...n,hiddenLabel:u.hiddenLabel,size:u.size,disablePointerEvents:s,position:p,variant:x},m=Gf(T);return l.jsx(ao.Provider,{value:null,children:l.jsx(Qf,{as:o,ownerState:T,className:nt(m.root,a),ref:r,...d,children:typeof i=="string"&&!c?l.jsx(nc,{color:"textSecondary",children:i}):l.jsxs(ie.Fragment,{children:[p==="start"?Ss||(Ss=l.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});process.env.NODE_ENV!=="production"&&(ic.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 oo(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function Zf(e){return hr("MuiSvgIcon",e)}$r("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Xf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(r)}`]};return cn(i,Zf,n)},Jf=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,T;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,b;return{props:{color:m},style:{color:(b=(C=(e.vars??e).palette)==null?void 0:C[m])==null?void 0:b.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:(T=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:T.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,T=ie.isValidElement(i)&&i.type==="svg",m={...n,color:o,component:s,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:u,hasSvgAsChild:T},C={};f||(C.viewBox=u);const b=Xf(m);return l.jsxs(Jf,{as:s,className:nt(b.root,a),focusable:"false",color:p,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...C,...x,...T&&i.props,ownerState:m,children:[T?i.props.children:i,d?l.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(ui.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});ui.muiName="SvgIcon";function ut(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 Cs=0;function eh(e){const[t,r]=ie.useState(e),n=e||t;return ie.useEffect(()=>{t==null&&(Cs+=1,r(`mui-${Cs}`))},[t]),n}const th={...ie},Es=th.useId;function rh(e){if(Es!==void 0){const t=Es();return e??t}return eh(e)}function Yn(e){const t=ie.useRef(e);return qd(()=>{t.current=e}),ie.useRef((...r)=>(0,t.current)(...r)).current}function ks(...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 nh=k.oneOfType([k.func,k.object]);function ih(e){const{prototype:t={}}=e;return!!t.isReactComponent}function ah(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"&&!ih(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 oh=oo(k.elementType,ah);function Ts(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
|
|
72
|
+
export default theme;`}function Ui(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:c,...u}=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.":Gt(20));const f=xa(a),m=da(e);let h=at(m,{mixins:Ip(m.breakpoints,r),palette:f,shadows:Vp.slice(),typography:zp(f,s),transitions:Hp(o),zIndex:{...Yp}});if(h=at(h,u),h=t.reduce((g,w)=>at(g,w),h),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],w=(d,E)=>{let y;for(y in d){const j=d[y];if(g.includes(y)&&Object.keys(j).length>0){if(process.env.NODE_ENV!=="production"){const k=en("",y);console.error([`MUI: The \`${E}\` component increases the CSS specificity of the \`${y}\` internal state.`,"You can not override it like this: ",JSON.stringify(d,null,2),"",`Instead, you need to use the '&.${k}' syntax:`,JSON.stringify({root:{[`&.${k}`]:j}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
73
|
+
`))}d[y]={}}}};Object.keys(h.components).forEach(d=>{const E=h.components[d].styleOverrides;E&&d.startsWith("Mui")&&w(E,d)})}return h.unstable_sxConfig={...hr,...u==null?void 0:u.unstable_sxConfig},h.unstable_sx=function(w){return Hn({sx:w,theme:this})},h.toRuntimeSource=Ms,h}function Qp(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 Gp=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Qp(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function zs(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Bs(e){return e==="dark"?Gp:[]}function Zp(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,a=xa(t);return{palette:a,opacity:{...zs(a.mode),...n},overlays:r||Bs(a.mode),...i}}function Xp(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 Jp=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],ed=e=>(t,n)=>{const r=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 Jp(e.cssVarPrefix).forEach(s=>{o[s]=n[s],delete n[s]}),a==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:a?{[a.replace("%s",t)]:o,[`${r}, ${a.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(a&&a!=="media")return`${r}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace("%s",String(t))}return r};function td(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function P(e,t,n){!e[t]&&n&&(e[t]=n)}function Jn(e){return typeof e!="string"||!e.startsWith("hsl")?e:_s(e)}function Ot(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Xn(Jn(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 nd(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const vt=e=>{try{return e()}catch{}},rd=(e="mui")=>Sp(e);function wi(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Zp({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...o}=Ui({...n,palette:{mode:i,...t==null?void 0:t.palette}});return e[r]={...t,palette:a,opacity:{...zs(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Bs(i)},o}function id(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:o=Xp,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,f=Object.keys(n)[0],m=r||(n.light&&f!=="light"?"light":f),h=rd(a),{[m]:g,light:w,dark:d,...E}=n,y={...E};let j=g;if((m==="dark"&&!("dark"in n)||m==="light"&&!("light"in n))&&(j=!0),!j)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:Gt(21,m));const k=wi(y,j,u,m);w&&!y.light&&wi(y,w,void 0,"light"),d&&!y.dark&&wi(y,d,void 0,"dark");let v={defaultColorScheme:m,...k,cssVarPrefix:a,colorSchemeSelector:s,rootSelector:c,getCssVar:h,colorSchemes:y,font:{...Dp(k.typography),...k.font},spacing:nd(u.spacing)};Object.keys(v.colorSchemes).forEach(q=>{const p=v.colorSchemes[q].palette,R=$=>{const G=$.split("-"),N=G[1],re=G[2];return h($,p[N][re])};if(p.mode==="light"&&(P(p.common,"background","#fff"),P(p.common,"onBackground","#000")),p.mode==="dark"&&(P(p.common,"background","#000"),P(p.common,"onBackground","#fff")),td(p,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),p.mode==="light"){P(p.Alert,"errorColor",ke(p.error.light,.6)),P(p.Alert,"infoColor",ke(p.info.light,.6)),P(p.Alert,"successColor",ke(p.success.light,.6)),P(p.Alert,"warningColor",ke(p.warning.light,.6)),P(p.Alert,"errorFilledBg",R("palette-error-main")),P(p.Alert,"infoFilledBg",R("palette-info-main")),P(p.Alert,"successFilledBg",R("palette-success-main")),P(p.Alert,"warningFilledBg",R("palette-warning-main")),P(p.Alert,"errorFilledColor",vt(()=>p.getContrastText(p.error.main))),P(p.Alert,"infoFilledColor",vt(()=>p.getContrastText(p.info.main))),P(p.Alert,"successFilledColor",vt(()=>p.getContrastText(p.success.main))),P(p.Alert,"warningFilledColor",vt(()=>p.getContrastText(p.warning.main))),P(p.Alert,"errorStandardBg",Oe(p.error.light,.9)),P(p.Alert,"infoStandardBg",Oe(p.info.light,.9)),P(p.Alert,"successStandardBg",Oe(p.success.light,.9)),P(p.Alert,"warningStandardBg",Oe(p.warning.light,.9)),P(p.Alert,"errorIconColor",R("palette-error-main")),P(p.Alert,"infoIconColor",R("palette-info-main")),P(p.Alert,"successIconColor",R("palette-success-main")),P(p.Alert,"warningIconColor",R("palette-warning-main")),P(p.AppBar,"defaultBg",R("palette-grey-100")),P(p.Avatar,"defaultBg",R("palette-grey-400")),P(p.Button,"inheritContainedBg",R("palette-grey-300")),P(p.Button,"inheritContainedHoverBg",R("palette-grey-A100")),P(p.Chip,"defaultBorder",R("palette-grey-400")),P(p.Chip,"defaultAvatarColor",R("palette-grey-700")),P(p.Chip,"defaultIconColor",R("palette-grey-700")),P(p.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),P(p.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),P(p.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),P(p.LinearProgress,"primaryBg",Oe(p.primary.main,.62)),P(p.LinearProgress,"secondaryBg",Oe(p.secondary.main,.62)),P(p.LinearProgress,"errorBg",Oe(p.error.main,.62)),P(p.LinearProgress,"infoBg",Oe(p.info.main,.62)),P(p.LinearProgress,"successBg",Oe(p.success.main,.62)),P(p.LinearProgress,"warningBg",Oe(p.warning.main,.62)),P(p.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),P(p.Slider,"primaryTrack",Oe(p.primary.main,.62)),P(p.Slider,"secondaryTrack",Oe(p.secondary.main,.62)),P(p.Slider,"errorTrack",Oe(p.error.main,.62)),P(p.Slider,"infoTrack",Oe(p.info.main,.62)),P(p.Slider,"successTrack",Oe(p.success.main,.62)),P(p.Slider,"warningTrack",Oe(p.warning.main,.62));const $=Cr(p.background.default,.8);P(p.SnackbarContent,"bg",$),P(p.SnackbarContent,"color",vt(()=>p.getContrastText($))),P(p.SpeedDialAction,"fabHoverBg",Cr(p.background.paper,.15)),P(p.StepConnector,"border",R("palette-grey-400")),P(p.StepContent,"border",R("palette-grey-400")),P(p.Switch,"defaultColor",R("palette-common-white")),P(p.Switch,"defaultDisabledColor",R("palette-grey-100")),P(p.Switch,"primaryDisabledColor",Oe(p.primary.main,.62)),P(p.Switch,"secondaryDisabledColor",Oe(p.secondary.main,.62)),P(p.Switch,"errorDisabledColor",Oe(p.error.main,.62)),P(p.Switch,"infoDisabledColor",Oe(p.info.main,.62)),P(p.Switch,"successDisabledColor",Oe(p.success.main,.62)),P(p.Switch,"warningDisabledColor",Oe(p.warning.main,.62)),P(p.TableCell,"border",Oe(Sr(p.divider,1),.88)),P(p.Tooltip,"bg",Sr(p.grey[700],.92))}if(p.mode==="dark"){P(p.Alert,"errorColor",Oe(p.error.light,.6)),P(p.Alert,"infoColor",Oe(p.info.light,.6)),P(p.Alert,"successColor",Oe(p.success.light,.6)),P(p.Alert,"warningColor",Oe(p.warning.light,.6)),P(p.Alert,"errorFilledBg",R("palette-error-dark")),P(p.Alert,"infoFilledBg",R("palette-info-dark")),P(p.Alert,"successFilledBg",R("palette-success-dark")),P(p.Alert,"warningFilledBg",R("palette-warning-dark")),P(p.Alert,"errorFilledColor",vt(()=>p.getContrastText(p.error.dark))),P(p.Alert,"infoFilledColor",vt(()=>p.getContrastText(p.info.dark))),P(p.Alert,"successFilledColor",vt(()=>p.getContrastText(p.success.dark))),P(p.Alert,"warningFilledColor",vt(()=>p.getContrastText(p.warning.dark))),P(p.Alert,"errorStandardBg",ke(p.error.light,.9)),P(p.Alert,"infoStandardBg",ke(p.info.light,.9)),P(p.Alert,"successStandardBg",ke(p.success.light,.9)),P(p.Alert,"warningStandardBg",ke(p.warning.light,.9)),P(p.Alert,"errorIconColor",R("palette-error-main")),P(p.Alert,"infoIconColor",R("palette-info-main")),P(p.Alert,"successIconColor",R("palette-success-main")),P(p.Alert,"warningIconColor",R("palette-warning-main")),P(p.AppBar,"defaultBg",R("palette-grey-900")),P(p.AppBar,"darkBg",R("palette-background-paper")),P(p.AppBar,"darkColor",R("palette-text-primary")),P(p.Avatar,"defaultBg",R("palette-grey-600")),P(p.Button,"inheritContainedBg",R("palette-grey-800")),P(p.Button,"inheritContainedHoverBg",R("palette-grey-700")),P(p.Chip,"defaultBorder",R("palette-grey-700")),P(p.Chip,"defaultAvatarColor",R("palette-grey-300")),P(p.Chip,"defaultIconColor",R("palette-grey-300")),P(p.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),P(p.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),P(p.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),P(p.LinearProgress,"primaryBg",ke(p.primary.main,.5)),P(p.LinearProgress,"secondaryBg",ke(p.secondary.main,.5)),P(p.LinearProgress,"errorBg",ke(p.error.main,.5)),P(p.LinearProgress,"infoBg",ke(p.info.main,.5)),P(p.LinearProgress,"successBg",ke(p.success.main,.5)),P(p.LinearProgress,"warningBg",ke(p.warning.main,.5)),P(p.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),P(p.Slider,"primaryTrack",ke(p.primary.main,.5)),P(p.Slider,"secondaryTrack",ke(p.secondary.main,.5)),P(p.Slider,"errorTrack",ke(p.error.main,.5)),P(p.Slider,"infoTrack",ke(p.info.main,.5)),P(p.Slider,"successTrack",ke(p.success.main,.5)),P(p.Slider,"warningTrack",ke(p.warning.main,.5));const $=Cr(p.background.default,.98);P(p.SnackbarContent,"bg",$),P(p.SnackbarContent,"color",vt(()=>p.getContrastText($))),P(p.SpeedDialAction,"fabHoverBg",Cr(p.background.paper,.15)),P(p.StepConnector,"border",R("palette-grey-600")),P(p.StepContent,"border",R("palette-grey-600")),P(p.Switch,"defaultColor",R("palette-grey-300")),P(p.Switch,"defaultDisabledColor",R("palette-grey-600")),P(p.Switch,"primaryDisabledColor",ke(p.primary.main,.55)),P(p.Switch,"secondaryDisabledColor",ke(p.secondary.main,.55)),P(p.Switch,"errorDisabledColor",ke(p.error.main,.55)),P(p.Switch,"infoDisabledColor",ke(p.info.main,.55)),P(p.Switch,"successDisabledColor",ke(p.success.main,.55)),P(p.Switch,"warningDisabledColor",ke(p.warning.main,.55)),P(p.TableCell,"border",ke(Sr(p.divider,1),.68)),P(p.Tooltip,"bg",Sr(p.grey[700],.92))}Ot(p.background,"default"),Ot(p.background,"paper"),Ot(p.common,"background"),Ot(p.common,"onBackground"),Ot(p,"divider"),Object.keys(p).forEach($=>{const G=p[$];$!=="tonalOffset"&&G&&typeof G=="object"&&(G.main&&P(p[$],"mainChannel",Xn(Jn(G.main))),G.light&&P(p[$],"lightChannel",Xn(Jn(G.light))),G.dark&&P(p[$],"darkChannel",Xn(Jn(G.dark))),G.contrastText&&P(p[$],"contrastTextChannel",Xn(Jn(G.contrastText))),$==="text"&&(Ot(p[$],"primary"),Ot(p[$],"secondary")),$==="action"&&(G.active&&Ot(p[$],"active"),G.selected&&Ot(p[$],"selected")))})}),v=t.reduce((q,p)=>at(q,p),v);const S={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:ed(v)},{vars:_,generateThemeVars:M,generateStyleSheets:B}=Ep(v,S);return v.vars=_,Object.entries(v.colorSchemes[v.defaultColorScheme]).forEach(([q,p])=>{v[q]=p}),v.generateThemeVars=M,v.generateStyleSheets=B,v.generateSpacing=function(){return Fs(u.spacing,ua(this))},v.getColorSchemeSelector=jp(s),v.spacing=v.generateSpacing(),v.shouldSkipGeneratingVar=o,v.unstable_sxConfig={...hr,...u==null?void 0:u.unstable_sxConfig},v.unstable_sx=function(p){return Hn({sx:p,theme:this})},v.toRuntimeSource=Ms,v}function So(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:xa({...n===!0?{}:n.palette,mode:t})})}function Ns(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n==null?void 0:n.mode,...o}=e,s=a||"light",c=i==null?void 0:i[s],u={...i,...n?{[s]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Ui(e,...t);let f=n;"palette"in e||u[s]&&(u[s]!==!0?f=u[s].palette:s==="dark"&&(f={mode:"dark"}));const m=Ui({...e,palette:f},...t);return m.defaultColorScheme=s,m.colorSchemes=u,m.palette.mode==="light"&&(m.colorSchemes.light={...u.light!==!0&&u.light,palette:m.palette},So(m,"dark",u.dark)),m.palette.mode==="dark"&&(m.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:m.palette},So(m,"light",u.light)),m}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),id({...o,colorSchemes:u,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Ls=Ns(),Vs="$$material";function qs(){const e=ep(Ls);return process.env.NODE_ENV!=="production"&&J.useDebugValue(e),e[Vs]||e}function ad(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const od=e=>ad(e)&&e!=="classes",lt=lp({themeId:Vs,defaultTheme:Ls,rootShouldForwardProp:od});function sd(){return Mu}const vn=wp;process.env.NODE_ENV!=="production"&&(b.node,b.object.isRequired);function wn(e){return bp(e)}function ld(e){return typeof e.main=="string"}function cd(e,t=[]){if(!ld(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Nr(e=[]){return([,t])=>t&&cd(t,e)}function ud(e){return en("MuiTypography",e)}bn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const pd={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},dd=sd(),fd=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:a,classes:o}=e,s={root:["root",a,e.align!=="inherit"&&`align${Pe(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Kn(s,ud,o)},hd=lt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Pe(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(vn(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(Nr()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Pe(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),Co={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ws=J.forwardRef(function(t,n){const{color:r,...i}=wn({props:t,name:"MuiTypography"}),a=!pd[r],o=dd({...i,...a&&{color:r}}),{align:s="inherit",className:c,component:u,gutterBottom:f=!1,noWrap:m=!1,paragraph:h=!1,variant:g="body1",variantMapping:w=Co,...d}=o,E={...o,align:s,color:r,className:c,component:u,gutterBottom:f,noWrap:m,paragraph:h,variant:g,variantMapping:w},y=u||(h?"p":w[g]||Co[g])||"span",j=fd(E);return l.jsx(hd,{as:y,ref:n,className:He(j.root,c),...d,ownerState:E,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...d.style}})});process.env.NODE_ENV!=="production"&&(Ws.propTypes={align:b.oneOf(["center","inherit","justify","left","right"]),children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),b.string]),component:b.elementType,gutterBottom:b.bool,noWrap:b.bool,paragraph:b.bool,style:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),variant:b.oneOfType([b.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),b.string]),variantMapping:b.object});const ga=J.createContext(void 0);process.env.NODE_ENV!=="production"&&(ga.displayName="FormControlContext");function md(){return J.useContext(ga)}function xd(e){return en("MuiInputAdornment",e)}const To=bn("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Eo;const gd=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Pe(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},yd=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e,s={root:["root",n&&"disablePointerEvents",i&&`position${Pe(i)}`,o,r&&"hiddenLabel",a&&`size${Pe(a)}`]};return Kn(s,xd,t)},vd=lt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:gd})(vn(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${To.positionStart}&:not(.${To.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Us=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:o="div",disablePointerEvents:s=!1,disableTypography:c=!1,position:u,variant:f,...m}=r,h=md()||{};let g=f;f&&h.variant&&process.env.NODE_ENV!=="production"&&f===h.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),h&&!g&&(g=h.variant);const w={...r,hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:s,position:u,variant:g},d=yd(w);return l.jsx(ga.Provider,{value:null,children:l.jsx(vd,{as:o,ownerState:w,className:He(d.root,a),ref:n,...m,children:typeof i=="string"&&!c?l.jsx(Ws,{color:"textSecondary",children:i}):l.jsxs(J.Fragment,{children:[u==="start"?Eo||(Eo=l.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Us.propTypes={children:b.node,classes:b.object,className:b.string,component:b.elementType,disablePointerEvents:b.bool,disableTypography:b.bool,position:b.oneOf(["end","start"]).isRequired,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),variant:b.oneOf(["filled","outlined","standard"])});function ya(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function bd(e){return en("MuiSvgIcon",e)}bn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const wd=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Pe(t)}`,`fontSize${Pe(n)}`]};return Kn(i,bd,r)},Sd=lt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Pe(n.color)}`],t[`fontSize${Pe(n.fontSize)}`]]}})(vn(({theme:e})=>{var t,n,r,i,a,o,s,c,u,f,m,h,g,w;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:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:d=>!d.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=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:f.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,d])=>d&&d.main).map(([d])=>{var E,y;return{props:{color:d},style:{color:(y=(E=(e.vars??e).palette)==null?void 0:E[d])==null?void 0:y.main}}}),{props:{color:"action"},style:{color:(h=(m=(e.vars??e).palette)==null?void 0:m.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(w=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Lr=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:o="inherit",component:s="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:m,viewBox:h="0 0 24 24",...g}=r,w=J.isValidElement(i)&&i.type==="svg",d={...r,color:o,component:s,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:h,hasSvgAsChild:w},E={};f||(E.viewBox=h);const y=wd(d);return l.jsxs(Sd,{as:s,className:He(y.root,a),focusable:"false",color:u,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:n,...E,...g,...w&&i.props,ownerState:d,children:[w?i.props.children:i,m?l.jsx("title",{children:m}):null]})});process.env.NODE_ENV!=="production"&&(Lr.propTypes={children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),b.string]),component:b.elementType,fontSize:b.oneOfType([b.oneOf(["inherit","large","medium","small"]),b.string]),htmlColor:b.string,inheritViewBox:b.bool,shapeRendering:b.string,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),titleAccess:b.string,viewBox:b.string});Lr.muiName="SvgIcon";function Je(e,t){function n(r,i){return l.jsx(Lr,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Lr.muiName,J.memo(J.forwardRef(n))}let jo=0;function Cd(e){const[t,n]=J.useState(e),r=e||t;return J.useEffect(()=>{t==null&&(jo+=1,n(`mui-${jo}`))},[t]),r}const Td={...J},ko=Td.useId;function Ed(e){if(ko!==void 0){const t=ko();return e??t}return Cd(e)}function Fr(e){const t=J.useRef(e);return fp(()=>{t.current=e}),J.useRef((...n)=>(0,t.current)(...n)).current}function Oo(...e){const t=J.useRef(void 0),n=J.useCallback(r=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const o=a,s=o(r);return typeof s=="function"?s:()=>{o(null)}}return a.current=r,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return J.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const jd=b.oneOfType([b.func,b.object]);function kd(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Od(e,t,n,r,i){const a=e[t],o=i||t;if(a==null||typeof window>"u")return null;let s;return typeof a=="function"&&!kd(a)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${r} \`${o}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Fd=ya(b.elementType,Od);function Fo(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 Ao={};function Hs(e,t){const n=J.useRef(Ao);return n.current===Ao&&(n.current=e(t)),n}class Vr{constructor(){Qn(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 Vr}static use(){const t=Hs(Vr.create).current,[n,r]=J.useState(!1);return t.shouldMount=n,t.setShouldMount=r,J.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=$d(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function Ad(){return Vr.use()}function $d(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hi.apply(null,arguments)}function Rd(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yi(e,t){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Yi(e,t)}function Pd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yi(e,t)}const $o=I.createContext(null);function _d(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function va(e,t){var n=function(a){return t&&I.isValidElement(a)?t(a):a},r=Object.create(null);return e&&I.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function Dd(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var u=r[c][o];s[r[c][o]]=n(u)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function on(e,t,n){return n[t]!=null?n[t]:e.props[t]}function Id(e,t){return va(e.children,function(n){return I.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:on(n,"appear",e),enter:on(n,"enter",e),exit:on(n,"exit",e)})})}function Md(e,t,n){var r=va(e.children),i=Dd(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if(I.isValidElement(o)){var s=a in t,c=a in r,u=t[a],f=I.isValidElement(u)&&!u.props.in;c&&(!s||f)?i[a]=I.cloneElement(o,{onExited:n.bind(null,o),in:!0,exit:on(o,"exit",e),enter:on(o,"enter",e)}):!c&&s&&!f?i[a]=I.cloneElement(o,{in:!1}):c&&s&&I.isValidElement(u)&&(i[a]=I.cloneElement(o,{onExited:n.bind(null,o),in:u.props.in,exit:on(o,"exit",e),enter:on(o,"enter",e)}))}}),i}var zd=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Bd={component:"div",childFactory:function(t){return t}},ba=function(e){Pd(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var o=a.handleExited.bind(_d(a));return a.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},a}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,a){var o=a.children,s=a.handleExited,c=a.firstRender;return{children:c?Id(i,s):Md(i,o,s),firstRender:!1}},n.handleExited=function(i,a){var o=va(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(s){var c=Hi({},s.children);return delete c[i.key],{children:c}}))},n.render=function(){var i=this.props,a=i.component,o=i.childFactory,s=Rd(i,["component","childFactory"]),c=this.state.contextValue,u=zd(this.state.children).map(o);return delete s.appear,delete s.enter,delete s.exit,a===null?I.createElement($o.Provider,{value:c},u):I.createElement($o.Provider,{value:c},I.createElement(a,s,u))},t}(I.Component);ba.propTypes=process.env.NODE_ENV!=="production"?{component:b.any,children:b.node,appear:b.bool,enter:b.bool,exit:b.bool,childFactory:b.func}:{};ba.defaultProps=Bd;const Nd=[];function Ld(e){J.useEffect(e,Nd)}class wa{constructor(){Qn(this,"currentId",null);Qn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Qn(this,"disposeEffect",()=>this.clear)}static create(){return new wa}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Vd(){const e=Hs(wa.create).current;return Ld(e.disposeEffect),e}function Ys(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:u}=e,[f,m]=J.useState(!1),h=He(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},w=He(n.child,f&&n.childLeaving,r&&n.childPulsate);return!s&&!f&&m(!0),J.useEffect(()=>{if(!s&&c!=null){const d=setTimeout(c,u);return()=>{clearTimeout(d)}}},[c,s,u]),l.jsx("span",{className:h,style:g,children:l.jsx("span",{className:w})})}process.env.NODE_ENV!=="production"&&(Ys.propTypes={classes:b.object.isRequired,className:b.string,in:b.bool,onExited:b.func,pulsate:b.bool,rippleSize:b.number,rippleX:b.number,rippleY:b.number,timeout:b.number.isRequired});const dt=bn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ki=550,qd=80,Wd=Xt.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
|
-
`,
|
|
85
|
+
`,Ud=Xt.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
|
-
`,
|
|
93
|
+
`,Hd=Xt.keyframes`
|
|
94
94
|
0% {
|
|
95
95
|
transform: scale(1);
|
|
96
96
|
}
|
|
@@ -102,23 +102,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
102
102
|
100% {
|
|
103
103
|
transform: scale(1);
|
|
104
104
|
}
|
|
105
|
-
`,
|
|
105
|
+
`,Yd=lt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Kd=lt(Ys,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
106
106
|
opacity: 0;
|
|
107
107
|
position: absolute;
|
|
108
108
|
|
|
109
|
-
&.${
|
|
109
|
+
&.${dt.rippleVisible} {
|
|
110
110
|
opacity: 0.3;
|
|
111
111
|
transform: scale(1);
|
|
112
|
-
animation-name: ${
|
|
113
|
-
animation-duration: ${
|
|
112
|
+
animation-name: ${Wd};
|
|
113
|
+
animation-duration: ${Ki}ms;
|
|
114
114
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
&.${
|
|
117
|
+
&.${dt.ripplePulsate} {
|
|
118
118
|
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
& .${
|
|
121
|
+
& .${dt.child} {
|
|
122
122
|
opacity: 1;
|
|
123
123
|
display: block;
|
|
124
124
|
width: 100%;
|
|
@@ -127,25 +127,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
127
127
|
background-color: currentColor;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
& .${
|
|
130
|
+
& .${dt.childLeaving} {
|
|
131
131
|
opacity: 0;
|
|
132
|
-
animation-name: ${
|
|
133
|
-
animation-duration: ${
|
|
132
|
+
animation-name: ${Ud};
|
|
133
|
+
animation-duration: ${Ki}ms;
|
|
134
134
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
& .${
|
|
137
|
+
& .${dt.childPulsate} {
|
|
138
138
|
position: absolute;
|
|
139
139
|
/* @noflip */
|
|
140
140
|
left: 0px;
|
|
141
141
|
top: 0;
|
|
142
|
-
animation-name: ${
|
|
142
|
+
animation-name: ${Hd};
|
|
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
|
-
`,
|
|
148
|
+
`,Ks=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:o,...s}=r,[c,u]=J.useState([]),f=J.useRef(0),m=J.useRef(null);J.useEffect(()=>{m.current&&(m.current(),m.current=null)},[c]);const h=J.useRef(!1),g=Vd(),w=J.useRef(null),d=J.useRef(null),E=J.useCallback(v=>{const{pulsate:S,rippleX:_,rippleY:M,rippleSize:B,cb:q}=v;u(p=>[...p,l.jsx(Kd,{classes:{ripple:He(a.ripple,dt.ripple),rippleVisible:He(a.rippleVisible,dt.rippleVisible),ripplePulsate:He(a.ripplePulsate,dt.ripplePulsate),child:He(a.child,dt.child),childLeaving:He(a.childLeaving,dt.childLeaving),childPulsate:He(a.childPulsate,dt.childPulsate)},timeout:Ki,pulsate:S,rippleX:_,rippleY:M,rippleSize:B},f.current)]),f.current+=1,m.current=q},[a]),y=J.useCallback((v={},S={},_=()=>{})=>{const{pulsate:M=!1,center:B=i||S.pulsate,fakeElement:q=!1}=S;if((v==null?void 0:v.type)==="mousedown"&&h.current){h.current=!1;return}(v==null?void 0:v.type)==="touchstart"&&(h.current=!0);const p=q?null:d.current,R=p?p.getBoundingClientRect():{width:0,height:0,left:0,top:0};let $,G,N;if(B||v===void 0||v.clientX===0&&v.clientY===0||!v.clientX&&!v.touches)$=Math.round(R.width/2),G=Math.round(R.height/2);else{const{clientX:re,clientY:V}=v.touches&&v.touches.length>0?v.touches[0]:v;$=Math.round(re-R.left),G=Math.round(V-R.top)}if(B)N=Math.sqrt((2*R.width**2+R.height**2)/3),N%2===0&&(N+=1);else{const re=Math.max(Math.abs((p?p.clientWidth:0)-$),$)*2+2,V=Math.max(Math.abs((p?p.clientHeight:0)-G),G)*2+2;N=Math.sqrt(re**2+V**2)}v!=null&&v.touches?w.current===null&&(w.current=()=>{E({pulsate:M,rippleX:$,rippleY:G,rippleSize:N,cb:_})},g.start(qd,()=>{w.current&&(w.current(),w.current=null)})):E({pulsate:M,rippleX:$,rippleY:G,rippleSize:N,cb:_})},[i,E,g]),j=J.useCallback(()=>{y({},{pulsate:!0})},[y]),k=J.useCallback((v,S)=>{if(g.clear(),(v==null?void 0:v.type)==="touchend"&&w.current){w.current(),w.current=null,g.start(0,()=>{k(v,S)});return}w.current=null,u(_=>_.length>0?_.slice(1):_),m.current=S},[g]);return J.useImperativeHandle(n,()=>({pulsate:j,start:y,stop:k}),[j,y,k]),l.jsx(Yd,{className:He(dt.root,a.root,o),ref:d,...s,children:l.jsx(ba,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(Ks.propTypes={center:b.bool,classes:b.object,className:b.string});function Qd(e){return en("MuiButtonBase",e)}const Gd=bn("MuiButtonBase",["root","disabled","focusVisible"]),Zd=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=Kn({root:["root",t&&"disabled",n&&"focusVisible"]},Qd,i);return n&&r&&(o.root+=` ${r}`),o},Xd=lt("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"},[`&.${Gd.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Qs=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:o,className:s,component:c="button",disabled:u=!1,disableRipple:f=!1,disableTouchRipple:m=!1,focusRipple:h=!1,focusVisibleClassName:g,LinkComponent:w="a",onBlur:d,onClick:E,onContextMenu:y,onDragLeave:j,onFocus:k,onFocusVisible:v,onKeyDown:S,onKeyUp:_,onMouseDown:M,onMouseLeave:B,onMouseUp:q,onTouchEnd:p,onTouchMove:R,onTouchStart:$,tabIndex:G=0,TouchRippleProps:N,touchRippleRef:re,type:V,...K}=r,te=J.useRef(null),oe=Ad(),T=Oo(oe.ref,re),[D,ee]=J.useState(!1);u&&D&&ee(!1),J.useImperativeHandle(i,()=>({focusVisible:()=>{ee(!0),te.current.focus()}}),[]);const se=oe.shouldMount&&!f&&!u;J.useEffect(()=>{D&&h&&!f&&oe.pulsate()},[f,h,D,oe]);const ie=Ft(oe,"start",M,m),pe=Ft(oe,"stop",y,m),U=Ft(oe,"stop",j,m),ne=Ft(oe,"stop",q,m),de=Ft(oe,"stop",le=>{D&&le.preventDefault(),B&&B(le)},m),me=Ft(oe,"start",$,m),L=Ft(oe,"stop",p,m),Y=Ft(oe,"stop",R,m),z=Ft(oe,"stop",le=>{Fo(le.target)||ee(!1),d&&d(le)},!1),xe=Fr(le=>{te.current||(te.current=le.currentTarget),Fo(le.target)&&(ee(!0),v&&v(le)),k&&k(le)}),je=()=>{const le=te.current;return c&&c!=="button"&&!(le.tagName==="A"&&le.href)},Ve=Fr(le=>{h&&!le.repeat&&D&&le.key===" "&&oe.stop(le,()=>{oe.start(le)}),le.target===le.currentTarget&&je()&&le.key===" "&&le.preventDefault(),S&&S(le),le.target===le.currentTarget&&je()&&le.key==="Enter"&&!u&&(le.preventDefault(),E&&E(le))}),jt=Fr(le=>{h&&le.key===" "&&D&&!le.defaultPrevented&&oe.stop(le,()=>{oe.pulsate(le)}),_&&_(le),E&&le.target===le.currentTarget&&je()&&le.key===" "&&!le.defaultPrevented&&E(le)});let Be=c;Be==="button"&&(K.href||K.to)&&(Be=w);const Ye={};Be==="button"?(Ye.type=V===void 0?"button":V,Ye.disabled=u):(!K.href&&!K.to&&(Ye.role="button"),u&&(Ye["aria-disabled"]=u));const mt=Oo(n,te),et={...r,centerRipple:a,component:c,disabled:u,disableRipple:f,disableTouchRipple:m,focusRipple:h,tabIndex:G,focusVisible:D},kt=Zd(et);return l.jsxs(Xd,{as:Be,className:He(kt.root,s),ownerState:et,onBlur:z,onClick:E,onContextMenu:pe,onFocus:xe,onKeyDown:Ve,onKeyUp:jt,onMouseDown:ie,onMouseLeave:de,onMouseUp:ne,onDragLeave:U,onTouchEnd:L,onTouchMove:Y,onTouchStart:me,ref:mt,tabIndex:u?-1:G,type:V,...Ye,...K,children:[o,se?l.jsx(Ks,{ref:T,center:a,...N}):null]})});function Ft(e,t,n,r=!1){return Fr(i=>(n&&n(i),r||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(Qs.propTypes={action:jd,centerRipple:b.bool,children:b.node,classes:b.object,className:b.string,component:Fd,disabled:b.bool,disableRipple:b.bool,disableTouchRipple:b.bool,focusRipple:b.bool,focusVisibleClassName:b.string,href:b.any,LinkComponent:b.elementType,onBlur:b.func,onClick:b.func,onContextMenu:b.func,onDragLeave:b.func,onFocus:b.func,onFocusVisible:b.func,onKeyDown:b.func,onKeyUp:b.func,onMouseDown:b.func,onMouseLeave:b.func,onMouseUp:b.func,onTouchEnd:b.func,onTouchMove:b.func,onTouchStart:b.func,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),tabIndex:b.number,TouchRippleProps:b.object,touchRippleRef:b.oneOfType([b.func,b.shape({current:b.shape({pulsate:b.func.isRequired,start:b.func.isRequired,stop:b.func.isRequired})})]),type:b.oneOfType([b.oneOf(["button","reset","submit"]),b.string])});function Jd(e){return en("MuiCircularProgress",e)}bn("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const It=44,Qi=Xt.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
|
-
|
|
156
|
+
`,Gi=Xt.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
|
-
`,
|
|
172
|
-
animation: ${
|
|
173
|
-
`:null,
|
|
174
|
-
animation: ${
|
|
175
|
-
`:null,
|
|
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 Os=ut(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"),_s=ut(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"),Nh=ut(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"),uo=ut(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),di=ut(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"),Lh=ut(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"),ye={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"},Rs=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}},qh=(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=Rs(e),i=Rs(t);return qh(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)}},Wh=$i(ye.primary.main),Uh=$i(ye.secondary.main),Qn=$i(ye.text.primary),uc=e=>$i(e),Hh={primary:ye.primary.main,secondary:ye.secondary.main,textPrimary:ye.text.primary,textSecondary:ye.text.secondary,divider:ye.divider,background:ye.background},Kh="#111827";function Yh(e){const t=e.palette.text.primary;return typeof t=="string"?t:Kh}function Pn(){const e=rc(),t=e.palette.mode,r=Yh(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=uc(r);return{paper:n,divider:i,textPrimary:r,textSecondary:a,errorMain:o,neutral50:s[50],outlineDefault:mt(s[300],.5),outlineHover:s[300],outlineFocus:s[400]}},[t,r,n,i,a,o])}const pc="#244061";function Gh(){return Jl({palette:{mode:"light",primary:{main:pc,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,b;const u=Pn(),x=!!r,T=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:T||i?l.jsxs(g.InputAdornment,{sx:{mr:-1},position:"end",children:[T||i,(C=d.InputProps)==null?void 0:C.endAdornment]}):(b=d.InputProps)==null?void 0:b.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,T=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:T,renderValue:m=>{const C=m;if(x)return l.jsx("span",{style:{color:d.textSecondary},children:s??""});const b=r.find(w=>w.value===C);return(b==null?void 0:b.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})]})},dc=({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:T,sx:m})=>{const C=Pn(),b=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(b,{}),disabled:p,loading:f,onOpen:x,noOptionsText:T,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})}),fc=({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,T=x?i:12,m=i===!0,C=i===!1&&!x,b=(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(${T}, 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=>b(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=>b(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=>b(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})]}),po=({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}})]}),hc=({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}})]})},mc=({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=ut(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),gc=()=>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 yc({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:T,emptyStateSx:m}){const[C,b]=P.useState(null),[w,$]=P.useState(null),F=h=>B=>{if(!i){b(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){b(null),$(null);return}const q=[...e],[Z]=q.splice(C,1);q.splice(h,0,Z),b(null),$(null),r(q)},z=()=>{b(null),$(null)},R=e.length===0,Y=R&&(u||T!==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":ye.background.paper,border:`2px dashed ${h.palette.mode==="dark"?"#FFFFFF":ye.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:T?2:0,maxWidth:"400px"}),children:u}),T&&l.jsx(g.Button,{variant:"outlined",startIcon:l.jsx(yn,{}),onClick:T,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:z,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(gc,{}),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 Qh=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}}}),Zh=({items:e,activeIndex:t=1,onStepClick:r,sx:n,completedSteps:i})=>{const a=rc(),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:T}=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(uo,{sx:{fontSize:16,fontWeight:600}})}):u?l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${o}`,backgroundColor:mt(o,.2),color:o,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:T}):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:T})};return l.jsx(g.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Qh,{}),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)})})},fo=({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 ${mt(t||s.palette.text.primary,.5)}`,backgroundColor:mt(t||s.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||s.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Xh=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:ye.primary.main}})),Jh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=P.useState(null),o=s=>{const{active:c,completed:p,icon:f}=s;return p?l.jsx(g.Box,{sx:{width:24,height:24,border:`1.2px solid ${ye.primary.main}`,borderRadius:"50%",backgroundColor:ye.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(uo,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${ye.primary.main}`,backgroundColor:mt(ye.primary.main,.2),color:ye.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:f}):l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:ye.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:f})};return l.jsx(g.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Xh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:ye.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((s,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:o,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?ye.primary.main:ye.text.primary},children:s.label}),l.jsx(fo,{size:"small",colorHex:c<t?ye.success.main:c===t?"#973B00":ye.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(g.Typography,{sx:{fontSize:12,fontWeight:400,color:`${ye.text.primary}60`,mt:.5,width:"80%"},children:s.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:ye.divider}})]},c))})},em=ut(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"),tm=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:o,sx:s})=>{const c=o||ye.info.main,p=mt(c,.08),f=mt(c,.08),d=a??l.jsx(em,{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))})})},Ps=e=>e==null?[]:Array.isArray(e)?e:[e],xc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>{const o=[{alignItems:"center",borderRadius:"6px",p:"10px",backgroundColor:"#FFFFFF","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"}},...Ps(i)];return l.jsxs(g.Box,{children:[l.jsx(g.Tabs,{value:e,onChange:(s,c)=>t(c),"aria-label":n||"Fin tabs",sx:o,children:r.map((s,c)=>{const p=typeof s.value=="string"||typeof s.value=="number"?s.value:c;return l.jsx(g.Tab,{value:p,disabled:s.disabled,label:l.jsx(g.Typography,{variant:"body2",children:s.label}),sx:[f=>({px:2,textTransform:"none",color:f.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#FFFFFF","&:hover":{backgroundColor:f.palette.action.hover},"&.Mui-selected":{color:f.palette.common.white,borderColor:f.palette.primary.main,backgroundColor:f.palette.primary.main,fontWeight:600}}),...Ps(a)]},String(p))})}),r.map((s,c)=>{const p=typeof s.value=="string"||typeof s.value=="number"?s.value:c,f=s.content??(typeof s.value=="object"?s.value:null);return f&&e===p?l.jsx(g.Box,{sx:{mt:1},children:f},`panel-${p}`):null})]})},rm=ut(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"),vc=({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:T,setValue:m,rowSelectionMode:C,rowSelectionKey:b})=>{const{fields:w,append:$,remove:F}=Su({control:p,name:e}),_=!(typeof i=="number"?w.length>=i:!1),z=P.useMemo(()=>{if(b)return b;const H=t.find(G=>G.type==="rowSelect");return H==null?void 0:H.key},[t,b]),R=gl({control:p,name:e})||[],Y=P.useMemo(()=>{if(!z)return{};const H={};return R.forEach((G,re)=>{H[re]=!!(G!=null&&G[z])}),H},[R,z]),h=P.useCallback(H=>Y[H]===!0,[Y]),B=P.useCallback((H,G)=>{if(!m||!z)return;const re=`${e}.${H}.${z}`;C==="single"&&G&&R.forEach((ce,D)=>{if(D!==H){const U=`${e}.${D}.${z}`;m(U,!1,{shouldDirty:!0})}}),m(re,G,{shouldDirty:!0})},[e,z,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:mt(H.palette.primary.main,.4),backgroundColor:mt(H.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...T}),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===z,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(po,{...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(rm,{sx:{fontSize:"20px"}})})})]},H.id)})})]})})})]})})},bc=({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)})}),wc=ut(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=ut(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"),nm=[{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"}],im=({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(T=>T!==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:ye.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(gc,{})}),l.jsx(fo,{label:t+1,size:"small"})]}),l.jsx(g.IconButton,{onClick:()=>n(e.id),disabled:a,sx:{color:ye.error.main,"&:hover":{bgcolor:Qn[50]}},size:"small",children:l.jsx(wc,{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:nm,disabled:a})}),l.jsxs(g.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(g.Typography,{variant:"caption",sx:{fontSize:"12px",color:ye.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:ye.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:ye.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:ye.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)?ye.primary.main:"transparent",color:s.includes(u)?ye.primary.contrastText:ye.text.primary,border:`1px solid ${ye.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:ye.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:ye.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:ye.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:ye.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};async function Sc(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 z=n[_];return z!=null?encodeURIComponent(String(z)):""}),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const T=new URLSearchParams;Object.entries(p).forEach(([F,E])=>{E!=null&&T.append(F,String(E))}),T.toString()&&(x+=`${x.includes("?")?"&":"?"}${T.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[z,R]of _)(R===""||R==="undefined"||R==="null")&&E.searchParams.delete(z);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 b=await fetch(x,C);if(!b.ok)throw new Error(`API request failed: ${b.status} ${b.statusText}`);const w=await b.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 z of _)F[z]!==void 0&&(E[z]=F[z]);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 Cc(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 sp({queryKey:o,queryFn:()=>{if(!e)throw new Error("API config is required");return Sc(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 ho(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 am(e,t){const r=ho(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 mo=({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),[T,m]=P.useState(!1),[C,b]=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?[]:""},z=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(z.current===void 0&&(z.current=Q),ae===void 0||ae===z.current)try{o(e.name,Q,{shouldValidate:!0,shouldDirty:!1}),z.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=ho(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),be=a[le];be!==void 0&&(W[le]=be)}}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}=Cc(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,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,Ze=j=>l.jsx(mc,{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 I={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(g.Card,{sx:I,...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"?(be=(le=e.items)==null?void 0:le[0])==null?void 0:be.value:0),render:({field:j})=>{const y=e.items||[],I=y.map((M,K)=>({label:M.label,value:typeof M.value=="string"||typeof M.value=="number"?M.value:K,content:M.content,disabled:M.disabled})),v=j.value,A=(()=>{if(typeof v=="string"||typeof v=="number"){const M=y.findIndex((K,de)=>typeof K.value=="string"||typeof K.value=="number"?K.value===v:de===v);return M>=0?M:0}return Number(v)||0})(),V=y[A]||{};return l.jsxs(g.Box,{children:[l.jsx(xc,{value:j.value,onChange:j.onChange,items:I,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(V.fields)&&V.fields.length>0&&(()=>{const M=V.fields,K=[];let de=[];for(const ge of M)ge.type==="section"&&de.length>0?(K.push(de),de=[ge]):de.push(ge);de.length>0&&K.push(de);const me={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"),it=(Oe==null?void 0:Oe.cardWrap)!==!1,pt=l.jsx(l.Fragment,{children:ge.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,vo=ne.equals,bo=ne.in,wo=Kt?(a||{})[Kt]:void 0;if(Kt&&typeof vo<"u"&&wo!==vo||Kt&&Array.isArray(bo)&&!bo.includes(wo))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(mo,{field:Me,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:o})},Me.name)})});return it?l.jsx(g.Card,{sx:{...me,...(Oe==null?void 0:Oe.cardSx)||{}},...(Oe==null?void 0:Oe.cardProps)||{},children:pt},`tab-group-${Ne}`):l.jsx(g.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:pt},`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(vc,{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(bc,{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,I=j.value||y.items||[],v=typeof y.getId=="function"?y.getId:typeof y.getId=="string"?M=>M[y.getId]:M=>M.id??M._id??M.key??String(M),A=typeof y.getText=="function"?y.getText:typeof y.getText=="string"?M=>M[y.getText]??String(M):M=>M.text??M.label??M.name??M.title??String(M),V=(()=>{if(typeof y.chipText=="function")return y.chipText;if(typeof y.chipText=="string")return I.length>0&&I[0]&&y.chipText in I[0]?(M,K)=>M[y.chipText]??void 0:y.chipText})();return l.jsx(yc,{items:I,getId:v,onReorder:M=>{j.onChange(M)},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(hc,{...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(ic,{position:"end",children:l.jsx(Gn,{"aria-label":"toggle password visibility",onClick:()=>x(y=>!y),edge:"end",children:u?l.jsx(_s,{}):l.jsx(Os,{})})})}: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,I=e.disableWhenEmptyOptions===!0&&Array.isArray(We)&&We.length===0,v=y||I||re,A=j.value,V=(()=>{if(Array.isArray(We)&&We.length>0){const M=We.find(K=>String(K==null?void 0:K.value)===String(A));return M?M.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:v,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(fc,{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,I=e.multiple===!0,v=(R==null?void 0:R.valueField)||e.value_field||"value",A=M=>{if(M!=null){if(typeof M=="string"||typeof M=="number")return M;if(typeof M=="object"){if(M[v]!==void 0)return M[v];if(M.value!==void 0)return M.value;if(M.id!==void 0)return M.id}}},V=(()=>{if(I)return(Array.isArray(y)?y:[]).map(K=>{const de=String(typeof K=="object"?A(K):K);return Ue.find(ge=>{const Ne=A(ge);return Ne!==void 0&&String(Ne)===de})||null}).filter(Boolean);{if(y==null||y==="")return null;const M=String(typeof y=="object"?A(y):y),K=Ue.find(de=>{const me=A(de);return me!==void 0&&String(me)===M});return K||null}})();return l.jsx(dc,{id:e.id,options:Ue,value:V,multiple:I,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:M=>{const K=(R==null?void 0:R.valueField)||e.value_field||"value";if(I){const me=(Array.isArray(M)?M:[]).map(ge=>typeof ge=="object"&&(ge[K]||ge.value||ge.id)||ge);j.onChange(me)}else{let de;M&&typeof M=="object"?de=M[K]||M.value||M.id||M:de=M,j.onChange(de);const me=e.selectedAssignments;if(me&&M&&typeof M=="object")for(const[ge,Ne]of Object.entries(me)){const Oe=M[Ne];if(Oe!==void 0&&typeof o=="function")try{o(ge,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(po,{...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",me=K.removeText||"Remove",ge=K.saveText||"Save logo",Ne=K.showSave!==void 0?K.showSave:!!(e.onSave||K.saveText),Oe=()=>{if(b(!0),typeof e.onPreview=="function")try{e.onPreview(y)}catch{}},it=()=>{j.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},pt=()=>{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,b(!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(Os,{}),children:de}),l.jsx(g.Button,{variant:"outlined",color:"error",onClick:it,sx:{...K.removeButtonSx},startIcon:l.jsx(_s,{}),children:me}),Ne&&l.jsx(g.Button,{variant:"contained",onClick:pt,sx:{...K.saveButtonSx},children:ge})]})]}),l.jsxs(g.Dialog,{open:C,onClose:()=>b(!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:()=>b(!1),children:K.closeText||"Close"})]})]})]})}const I=e.imagePlaceholder||{},v=I.icon||"upload",A=w,V=()=>{var K;try{(K=A.current)==null||K.click()}catch{}},M=K=>{const de=K.target.files&&K.target.files[0];if(de){typeof e.onFileSelected=="function"&&e.onFileSelected(de);try{const me=URL.createObjectURL(de);j.onChange(me)}catch{}$.current=de}};return l.jsxs(g.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...I.sx},children:[l.jsx("input",{type:"file",ref:A,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:M}),l.jsx(Gn,{sx:{borderRadius:"8px",...I.iconSx},children:v==="image"?l.jsx(Lh,{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",...I.titleSx},children:I.title||"Drag & Drop the image here"}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...I.subtitleSx},children:I.subtitle||""}),l.jsx(g.Button,{onClick:V,sx:{my:2,...I.buttonSx},startIcon:l.jsx(di,{}),variant:"contained",disabled:e.disabled,children:I.buttonText||"Upload File"}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,...I.helperTextSx},children:I.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:T?l.jsx(uo,{fontSize:"small"}):l.jsx(Nh,{fontSize:"small"})})]})};var aa,$s;function om(){if($s)return aa;$s=1;function e(b){this._maxSize=b,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(b){return this._values[b]},e.prototype.set=function(b,w){return this._size>=this._maxSize&&this.clear(),b in this._values||this._size++,this._values[b]=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(b){var w=f(b);return c.get(b)||c.set(b,function(F,E){for(var _=0,z=w.length,R=F;_<z-1;){var Y=w[_];if(Y==="__proto__"||Y==="constructor"||Y==="prototype")return F;R=R[w[_++]]}R[w[_]]=E})},getter:function(b,w){var $=f(b);return p.get(b)||p.set(b,function(E){for(var _=0,z=$.length;_<z;)if(E!=null||!w)E=E[$[_++]];else return;return E})},join:function(b){return b.reduce(function(w,$){return w+(x($)||r.test($)?"["+$+"]":(w?".":"")+$)},"")},forEach:function(b,w,$){u(Array.isArray(b)?b:d(b),w,$)}};function f(b){return s.get(b)||s.set(b,d(b).map(function(w){return w.replace(a,"$2")}))}function d(b){return b.match(t)||[""]}function u(b,w,$){var F=b.length,E,_,z,R;for(_=0;_<F;_++)E=b[_],E&&(C(E)&&(E='"'+E+'"'),R=x(E),z=!R&&/^\d+$/.test(E),w.call($,E,R,z,_,b))}function x(b){return typeof b=="string"&&b&&["'",'"'].indexOf(b.charAt(0))!==-1}function T(b){return b.match(n)&&!b.match(r)}function m(b){return i.test(b)}function C(b){return!x(b)&&(T(b)||m(b))}return aa}var _r=om(),oa,Ds;function sm(){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=sm(),Ln={exports:{}},Is;function lm(){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,T,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[T]){c[T]=!0;var b=f.get(x)||new Set;if(b=Array.from(b),T=b.length){m.add(x);do{var w=b[--T];u(w,d.get(w),m)}while(T);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 cm=lm();const um=Qa(cm),pm=Object.prototype.toString,dm=Error.prototype.toString,fm=RegExp.prototype.toString,hm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",mm=/^Symbol\((.*)\)(.*)$/;function gm(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 gm(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return hm.call(e).replace(mm,"Symbol($1)");const n=pm.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+dm.call(e)+"]":n==="RegExp"?fm.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 Ec(e){return e==null?[]:[].concat(e)}let kc,Tc,jc,ym=/\$\{\s*(\w+)\s*\}/g;kc=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[kc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],Ec(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]}}Tc=Symbol.hasInstance;jc=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(ym,(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[jc]="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[Tc](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}"},xm={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"},vm={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:xm,boolean:Ia,tuple:vm});const go=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(!go(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:T,context:m,abortEarly:C=o.spec.abortEarly,disableStackTrace:b=o.spec.disableStackTrace}=i;function w(B){return mr.isRef(B)?B.getValue(r,T,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||b},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:T,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($())},z=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(_,z)}}catch(B){z(B);return}_(Y)}return t.OPTIONS=e,t}function bm(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(go(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}".
|
|
171
|
+
`,ef=typeof Qi!="string"?Xt.css`
|
|
172
|
+
animation: ${Qi} 1.4s linear infinite;
|
|
173
|
+
`:null,tf=typeof Gi!="string"?Xt.css`
|
|
174
|
+
animation: ${Gi} 1.4s ease-in-out infinite;
|
|
175
|
+
`:null,nf=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,a={root:["root",n,`color${Pe(r)}`],svg:["svg"],circle:["circle",`circle${Pe(n)}`,i&&"circleDisableShrink"]};return Kn(a,Jd,t)},rf=lt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Pe(n.color)}`]]}})(vn(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:ef||{animation:`${Qi} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Nr()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),af=lt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),of=lt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Pe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(vn(({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:tf||{animation:`${Gi} 1.4s ease-in-out infinite`}}]}))),Gs=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:o=!1,size:s=40,style:c,thickness:u=3.6,value:f=0,variant:m="indeterminate",...h}=r,g={...r,color:a,disableShrink:o,size:s,thickness:u,value:f,variant:m},w=nf(g),d={},E={},y={};if(m==="determinate"){const j=2*Math.PI*((It-u)/2);d.strokeDasharray=j.toFixed(3),y["aria-valuenow"]=Math.round(f),d.strokeDashoffset=`${((100-f)/100*j).toFixed(3)}px`,E.transform="rotate(-90deg)"}return l.jsx(rf,{className:He(w.root,i),style:{width:s,height:s,...E,...c},ownerState:g,ref:n,role:"progressbar",...y,...h,children:l.jsx(af,{className:w.svg,ownerState:g,viewBox:`${It/2} ${It/2} ${It} ${It}`,children:l.jsx(of,{className:w.circle,style:d,ownerState:g,cx:It,cy:It,r:(It-u)/2,fill:"none",strokeWidth:u})})})});process.env.NODE_ENV!=="production"&&(Gs.propTypes={classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","primary","secondary","error","info","success","warning"]),b.string]),disableShrink:ya(b.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:b.oneOfType([b.number,b.string]),style:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),thickness:b.number,value:b.number,variant:b.oneOf(["determinate","indeterminate"])});function sf(e){return en("MuiIconButton",e)}const Ro=bn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),lf=e=>{const{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e,s={root:["root",o&&"loading",n&&"disabled",r!=="default"&&`color${Pe(r)}`,i&&`edge${Pe(i)}`,`size${Pe(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Kn(s,sf,t)},cf=lt(Qs,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${Pe(n.color)}`],n.edge&&t[`edge${Pe(n.edge)}`],t[`size${Pe(n.size)}`]]}})(vn(({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})`:ot(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}}]})),vn(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Nr()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Nr()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ot((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)}}],[`&.${Ro.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Ro.loading}`]:{color:"transparent"}}))),uf=lt("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"}}]})),Ar=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:o,color:s="default",disabled:c=!1,disableFocusRipple:u=!1,size:f="medium",id:m,loading:h=null,loadingIndicator:g,...w}=r,d=Ed(m),E=g??l.jsx(Gs,{"aria-labelledby":d,color:"inherit",size:16}),y={...r,edge:i,color:s,disabled:c,disableFocusRipple:u,loading:h,loadingIndicator:E,size:f},j=lf(y);return l.jsxs(cf,{id:h?d:m,className:He(j.root,o),centerRipple:!0,focusRipple:!u,disabled:c||h,ref:n,...w,ownerState:y,children:[typeof h=="boolean"&&l.jsx("span",{className:j.loadingWrapper,style:{display:"contents"},children:l.jsx(uf,{className:j.loadingIndicator,ownerState:y,children:h&&E})}),a]})});process.env.NODE_ENV!=="production"&&(Ar.propTypes={children:ya(b.node,e=>J.Children.toArray(e.children).some(n=>J.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
176
|
+
`)):null),classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),b.string]),disabled:b.bool,disableFocusRipple:b.bool,disableRipple:b.bool,edge:b.oneOf(["end","start",!1]),id:b.string,loading:b.bool,loadingIndicator:b.node,size:b.oneOfType([b.oneOf(["small","medium","large"]),b.string]),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});const Po=Je(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"),_o=Je(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"),pf=Je(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"),Sa=Je(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),qr=Je(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"),df=Je(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"),he={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"},Do=e=>{const t=e.replace("#",""),n=parseInt(t.length===3?t.split("").map(r=>r+r).join(""):t,16);return{r:n>>16&255,g:n>>8&255,b:n&255}},ff=(e,t,n)=>"#"+[e,t,n].map(r=>{const i=Math.round(Math.min(255,Math.max(0,r))).toString(16);return i.length===1?"0"+i:i}).join(""),At=(e,t,n)=>{const r=Do(e),i=Do(t);return ff(r.r+(i.r-r.r)*n,r.g+(i.g-r.g)*n,r.b+(i.b-r.b)*n)},li=e=>{const t="#FFFFFF",n="#000000";return{50:At(t,e,.08),100:At(t,e,.16),200:At(t,e,.28),300:At(t,e,.4),400:At(t,e,.55),500:e,600:At(e,n,.1),700:At(e,n,.2),800:At(e,n,.3),900:At(e,n,.42)}},hf=li(he.primary.main),mf=li(he.secondary.main),$r=li(he.text.primary),Zs=e=>li(e),xf={primary:he.primary.main,secondary:he.secondary.main,textPrimary:he.text.primary,textSecondary:he.text.secondary,divider:he.divider,background:he.background},gf="#111827";function yf(e){const t=e.palette.text.primary;return typeof t=="string"?t:gf}function mr(){const e=qs(),t=e.palette.mode,n=yf(e),r=e.palette.background.paper,i=e.palette.divider,a=e.palette.text.secondary,o=e.palette.error.main;return I.useMemo(()=>{const s=Zs(n);return{paper:r,divider:i,textPrimary:n,textSecondary:a,errorMain:o,neutral50:s[50],outlineDefault:ot(s[300],.5),outlineHover:s[300],outlineFocus:s[400]}},[t,n,r,i,a,o])}const Xs="#244061";function vf(){return Ns({palette:{mode:"light",primary:{main:Xs,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 rt=({hasError:e,sx:t,labelText:n,labelVariant:r="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:o="#E6E8EC",endorsementColor:s="#111827",endorsementRadius:c="6px",endorsementHeight:u=28,endorsementPaddingX:f="8px",inputTestId:m,labelTestId:h,errorTestId:g,...w})=>{var k,v;const d=mr(),E=!!n,y=a?l.jsx(x.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:u,paddingLeft:f,paddingRight:f,borderRadius:c,backgroundColor:o,color:s,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,j={...w.InputProps,endAdornment:y||i?l.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[y||i,(k=w.InputProps)==null?void 0:k.endAdornment]}):(v=w.InputProps)==null?void 0:v.endAdornment};return l.jsxs(x.Box,{children:[E&&l.jsx(x.Typography,{variant:r,"data-testid":h,sx:{color:d.textPrimary,mb:.5,fontWeight:500},children:n}),l.jsx(x.TextField,{fullWidth:!0,size:"small",...w,InputProps:j,label:E?void 0:w.label,inputProps:{...w.inputProps,...m?{"data-testid":m}:{}},FormHelperTextProps:{...w.FormHelperTextProps,...g?{"data-testid":g}:{}},InputLabelProps:{...w.InputLabelProps,...h&&!E?{"data-testid":h}:{}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:d.paper,borderRadius:"8px","& fieldset":{borderColor:d.outlineDefault},"&:hover fieldset":{borderColor:d.outlineHover},"&.Mui-focused fieldset":{borderColor:d.outlineFocus},"&.Mui-error fieldset":{borderColor:d.errorMain}},"& .MuiInputBase-input":{color:d.textPrimary},"& .MuiFormLabel-root":{color:d.textSecondary},"& .MuiFormLabel-root.Mui-focused":{color:d.textPrimary},"& .MuiFormHelperText-root":{color:e?d.errorMain:d.textSecondary},...t}})]})},ci=({labelText:e,label:t,options:n,loading:r,helperText:i,size:a="small",labelVariant:o="subtitle2",placeholder:s,value:c,sx:u,inputTestId:f,labelTestId:m,errorTestId:h,optionTestId:g,...w})=>{const d=mr(),E=I.useId(),y=c==null||c===""||Array.isArray(c)&&c.length===0,j=k=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...k,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:d.textSecondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!w.error,variant:"outlined",children:[e&&l.jsx(x.Typography,{variant:o,"data-testid":m,sx:{color:d.textPrimary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(x.InputLabel,{id:E,shrink:!y||!!s,"data-testid":m,sx:{color:d.textSecondary,"&.Mui-focused":{color:d.textPrimary},"&.Mui-error":{color:d.errorMain}},children:t}),l.jsx(x.Select,{...w,value:c,labelId:t?E:void 0,label:t,displayEmpty:!0,input:l.jsx(x.OutlinedInput,{label:t,inputProps:f?{"data-testid":f}:void 0}),IconComponent:j,renderValue:k=>{const v=k;if(y)return l.jsx("span",{style:{color:d.textSecondary},children:s??""});const S=n.find(_=>_.value===v);return(S==null?void 0:S.label)??String(v)},endAdornment:r?l.jsx(x.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"},...u},children:r?l.jsx(x.MenuItem,{disabled:!0,children:l.jsx(x.CircularProgress,{size:16})}):n.map(k=>l.jsx(x.MenuItem,{value:k.value,"data-testid":g?g(k.value):void 0,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:k.label},k.value))}),i&&l.jsx(x.FormHelperText,{"data-testid":h,children:i})]})},Js=({id:e,options:t,value:n,multiple:r,label:i,labelText:a,placeholder:o,onChange:s,labelVariant:c="subtitle2",disabled:u,loading:f,error:m,helperText:h,onOpen:g,noOptionsText:w,sx:d,inputTestId:E,labelTestId:y,errorTestId:j,optionTestId:k})=>{const v=mr(),S=_=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",..._,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:v.textSecondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(x.Box,{children:[a&&l.jsx(x.Typography,{variant:c,"data-testid":y,sx:{color:v.textPrimary,mb:.5,fontWeight:500},children:a}),l.jsx(x.Autocomplete,{id:e,options:t,value:n,multiple:r,size:"small",popupIcon:l.jsx(S,{}),disabled:u,loading:f,onOpen:g,noOptionsText:w,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${v.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:v.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:v.outlineDefault},"&:hover fieldset":{borderColor:v.outlineHover},"&.Mui-focused fieldset":{borderColor:v.outlineFocus},"&.Mui-error fieldset":{borderColor:v.errorMain}},"& .MuiInputBase-input":{color:v.textPrimary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:v.textSecondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...d},getOptionLabel:_=>typeof _=="string"?_:(_==null?void 0:_.label)??"",isOptionEqualToValue:(_,M)=>((_==null?void 0:_.value)??_)===((M==null?void 0:M.value)??M),renderOption:(_,M,{selected:B})=>{const{key:q,...p}=_,R=typeof M=="string"?M:(M==null?void 0:M.value)??(M==null?void 0:M.id)??(M==null?void 0:M.label)??"";return l.jsxs(x.Box,{component:"li",...p,"data-testid":k?k(R):void 0,sx:{backgroundColor:v.paper,color:v.textPrimary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:v.neutral50},"&.Mui-focused":{backgroundColor:v.neutral50},...B?{backgroundColor:v.neutral50}:{}},children:[r&&l.jsx(x.Checkbox,{checked:B}),l.jsx(x.Typography,{variant:"body2",sx:{color:v.textPrimary,fontSize:14},children:typeof M=="string"?M:M.label})]},q)},renderInput:_=>l.jsx(x.TextField,{..._,label:i,placeholder:o,size:"small",error:m,helperText:h,inputProps:{..._.inputProps,...E?{"data-testid":E}:{}},FormHelperTextProps:j?{"data-testid":j}:void 0,InputLabelProps:{shrink:!!n||!!o,sx:{color:v.textSecondary,"&.Mui-focused":{color:v.textPrimary},"&.Mui-error":{color:v.errorMain}},...y&&!a?{"data-testid":y}:{}},InputProps:{..._.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[f?l.jsx(x.CircularProgress,{size:20}):null,_.InputProps.endAdornment]})}}),onChange:(_,M)=>s(M)})]})},_t=({label:e,checked:t,disabled:n,onChange:r,sx:i,inputTestId:a,labelTestId:o})=>l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:t,disabled:n,onChange:(s,c)=>r(c),inputProps:a?{"data-testid":a}:void 0}),label:e,"data-testid":o,sx:s=>({"& .MuiFormControlLabel-label":{color:s.palette.text.primary,fontSize:14},...i})}),el=({labelText:e,label:t,value:n=[],options:r,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:c,error:u,groupPadding:f=1.5,itemGap:m=1,disabled:h=!1})=>{const g=typeof i=="number"&&i>0,w=g?i:12,d=i===!0,E=i===!1&&!g,y=(j,k)=>{const v=Array.isArray(n)?[...n]:[];k?v.includes(j)||a([...v,j]):a(v.filter(S=>S!==j))};return l.jsxs(x.FormControl,{error:u,disabled:h,sx:j=>{var k;return{display:"flex",flexDirection:"column",px:j.spacing(f),borderRadius:((k=j.shape)==null?void 0:k.borderRadius)||8,mx:-2.5,backgroundColor:j.palette.background.paper}},children:[o==="top"&&e&&l.jsx(x.Typography,{variant:s,sx:j=>({color:j.palette.text.primary,mb:.5,fontSize:j.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.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}),g&&l.jsx(x.Box,{sx:j=>({display:"grid",gridTemplateColumns:`repeat(${w}, 1fr)`,gap:j.spacing(m),mt:0}),children:r.map(j=>{const k=Array.isArray(n)&&n.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:k,onChange:v=>y(j.value,v.target.checked),disabled:h,sx:v=>({color:v.palette.text.secondary,"&.Mui-checked":{color:v.palette.primary.main}})}),label:j.label,sx:v=>({m:0,"& .MuiFormControlLabel-label":{color:v.palette.text.primary,fontSize:12}})},String(j.value))})}),d&&l.jsx(x.Box,{sx:j=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:j.spacing(m),alignItems:"center",mt:0}),children:r.map(j=>{const k=Array.isArray(n)&&n.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:k,onChange:v=>y(j.value,v.target.checked),disabled:h,sx:v=>({color:v.palette.text.secondary,"&.Mui-checked":{color:v.palette.primary.main}})}),label:j.label,sx:v=>({m:0,"& .MuiFormControlLabel-label":{color:v.palette.text.primary,fontSize:12}})},String(j.value))})}),E&&l.jsx(x.Box,{sx:j=>({display:"flex",flexDirection:"column",gap:j.spacing(m),alignItems:"flex-start",mt:0}),children:r.map(j=>{const k=Array.isArray(n)&&n.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:k,onChange:v=>y(j.value,v.target.checked),disabled:h,sx:v=>({color:v.palette.text.secondary,"&.Mui-checked":{color:v.palette.primary.main}})}),label:j.label,sx:v=>({m:0,"& .MuiFormControlLabel-label":{color:v.palette.text.primary,fontSize:12}})},String(j.value))})}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]})},Wr=({label:e,checked:t,disabled:n,onChange:r,sx:i})=>l.jsx(x.FormControlLabel,{control:l.jsx(x.Switch,{checked:t,disabled:n,onChange:(a,o)=>r(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),sn=({labelText:e,label:t,value:n,options:r,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:c,error:u,groupPadding:f=1.5,itemGap:m=1})=>l.jsxs(x.FormControl,{error:u,sx:h=>{var g;return{display:"flex",flexDirection:"column",px:h.spacing(f),borderRadius:((g=h.shape)==null?void 0:g.borderRadius)||8,mx:-2.5,backgroundColor:h.palette.background.paper}},children:[o==="top"&&e&&l.jsx(x.Typography,{variant:s,sx:h=>({color:h.palette.text.primary,mb:.5,fontSize:h.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:h=>({color:h.palette.text.secondary,mb:.5,mx:1,fontSize:h.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:h.palette.text.primary},"&.Mui-error":{color:h.palette.error.main}}),children:t}),l.jsx(x.RadioGroup,{row:i,value:n,onChange:h=>a(h.target.value),sx:h=>({display:"flex",flexDirection:i?"row":"column",gap:h.spacing(m),alignItems:i?"center":"flex-start"}),children:r.map(h=>l.jsx(x.FormControlLabel,{value:h.value,control:l.jsx(x.Radio,{size:"small",sx:g=>({color:g.palette.text.secondary,"&.Mui-checked":{color:g.palette.primary.main}})}),label:l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:h.label}),h.description&&l.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:h.description})]}),sx:{m:0,gap:0,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(h.value)))}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]});$n.extend(Kl);const Ur="DD-MM-YYYY";function Ca(e){return(e||Ur).replace(/-/g,"/")}const Ta=({labelPosition:e="inner",labelVariant:t="subtitle2",label:n,sx:r,inputTestId:i,labelTestId:a,errorTestId:o,value:s,onChange:c,onBlur:u,dateFormat:f=Ur,minDate:m,maxDate:h,disabled:g,error:w,helperText:d,fullWidth:E=!0,size:y="small",placeholder:j,inputProps:k})=>{const v=m??(k==null?void 0:k.min),S=h??(k==null?void 0:k.max),_=f||Ur,M=j??Ca(_),B=s?$n(s,"YYYY-MM-DD",!0):null,q=B!=null&&B.isValid()?B:null,p=R=>{const $=R&&R.isValid()?R.format("YYYY-MM-DD"):"";c==null||c($)};return l.jsxs(x.Box,{children:[e==="top"&&n&&l.jsx(x.Typography,{variant:t,"data-testid":a,sx:{color:"#111827",mb:.5},children:n}),l.jsx(Yl.DatePicker,{format:_,value:q,disabled:g,minDate:v&&$n(v,"YYYY-MM-DD",!0).isValid()?$n(v,"YYYY-MM-DD",!0):void 0,maxDate:S&&$n(S,"YYYY-MM-DD",!0).isValid()?$n(S,"YYYY-MM-DD",!0):void 0,onChange:p,onClose:u,slots:{textField:rt},slotProps:{textField:{fullWidth:E,size:y,label:e==="inner"?n:void 0,error:w,helperText:d,placeholder:M,labelTestId:e==="inner"?a:void 0,inputTestId:i,errorTestId:o,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},...r}}}})]})},tl=({labelText:e,labelVariant:t="subtitle2",hasError:n,sx:r,label:i,inputTestId:a,labelTestId:o,errorTestId:s,...c})=>{const u=mr(),f=!!e;return l.jsxs(x.Box,{children:[f&&l.jsx(x.Typography,{variant:t,"data-testid":o,sx:{color:u.textPrimary,mb:.5,fontWeight:500},children:e}),l.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...c,label:f?void 0:i,inputProps:{...c.inputProps,...a?{"data-testid":a}:{}},FormHelperTextProps:{...c.FormHelperTextProps,...s?{"data-testid":s}:{}},InputLabelProps:{...c.InputLabelProps,...o&&!f?{"data-testid":o}:{}},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,fontSize:14},"& .MuiFormLabel-root":{color:u.textSecondary},"& .MuiFormLabel-root.Mui-focused":{color:u.textPrimary},"& .MuiFormHelperText-root":{color:n?u.errorMain:u.textSecondary},...r}})]})},nl=({title:e,subtitle:t,actions:n,align:r="left",sx:i})=>l.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:r},children:[e&&l.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:16,fontWeight:500,lineHeight:1.3}),children:e}),t&&l.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:500}),children:t})]}),n&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:n})]}),er=Je(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),rl=()=>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 il({items:e,getId:t,onReorder:n,header:r,disabled:i,sx:a,getText:o,showIndex:s=!0,showLeftIcon:c=!0,renderItem:u,chipText:f,helperText:m,emptyStateText:h,emptyStateButtonText:g="Add Phase",onEmptyStateButtonClick:w,emptyStateSx:d}){const[E,y]=I.useState(null),[j,k]=I.useState(null),v=p=>R=>{if(!i){y(p),R.dataTransfer.effectAllowed="move";try{R.dataTransfer.setData("text/plain",String(t(e[p])))}catch{}}},S=p=>R=>{i||(R.preventDefault(),k(p),R.dataTransfer.dropEffect="move")},_=p=>R=>{if(i)return;if(R.preventDefault(),E===null||E===p){y(null),k(null);return}const $=[...e],[G]=$.splice(E,1);$.splice(p,0,G),y(null),k(null),n($)},M=()=>{y(null),k(null)},B=e.length===0,q=B&&(h||w!==void 0);return l.jsxs(x.Box,{role:"list",sx:p=>({display:"flex",flexDirection:"column",gap:p.spacing(1),...a}),children:[r,!B&&l.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),q?l.jsxs(x.Box,{sx:p=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:p.spacing(4),backgroundColor:p.palette.mode==="dark"?"#000000":he.background.paper,border:`2px dashed ${p.palette.mode==="dark"?"#FFFFFF":he.divider}`,borderRadius:"8px",textAlign:"center",...d}),children:[h&&l.jsx(x.Typography,{variant:"body1",sx:p=>({color:p.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:w?2:0,maxWidth:"400px"}),children:h}),w&&l.jsx(x.Button,{variant:"outlined",startIcon:l.jsx(er,{}),onClick:w,disabled:i,sx:p=>({mt:h?0:2,backgroundColor:p.palette.mode==="dark"?`${p.palette.primary.main}1A`:`${p.palette.primary.main}0D`,borderColor:p.palette.primary.main,color:p.palette.primary.main,"&:hover":{backgroundColor:p.palette.mode==="dark"?`${p.palette.primary.main}33`:`${p.palette.primary.main}1A`,borderColor:p.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:g})]}):e.map((p,R)=>{const $=E===R,G=j===R&&E!==null&&E!==R;return l.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:v(R),onDragOver:S(R),onDrop:_(R),onDragEnd:M,sx:N=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${G?N.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:N.spacing(1),opacity:$?.6:1,boxShadow:G?`0 0 0 2px ${N.palette.primary.main}33`:"none"}),children:u?u(p,$):l.jsxs(x.Box,{sx:N=>({display:"flex",alignItems:"center",gap:N.spacing(1),minWidth:0}),children:[c&&l.jsx(rl,{}),s&&l.jsxs(x.Typography,{variant:"body2",sx:N=>({fontWeight:600,fontSize:14,color:`${N.palette.text.primary}`,flex:"0 0 auto"}),children:[R+1,"."]}),(()=>{const N=typeof f=="function"?f(p,R):f;return N?l.jsx(x.Chip,{label:N,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(x.Typography,{variant:"body2",sx:N=>({fontSize:12,fontWeight:500,color:`${N.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:o?o(p):""})]})},String(t(p)))}),!B&&m?typeof m=="string"?l.jsx(x.Typography,{variant:"caption",sx:p=>({color:`${p.palette.text.primary}60`}),children:m}):m:null]})}const bf=lt(x.StepConnector)(({theme:e})=>{const t=e.palette.divider||"#E8E8E8",n=e.palette.primary.main;return{[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:t,transition:"border-color 0.3s ease"},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:n}}}),wf=({items:e,activeIndex:t=1,onStepClick:n,sx:r,completedSteps:i})=>{const a=qs(),o=a.palette.primary.main,s=a.palette.text.primary,c=a.palette.divider,u=a.palette.action&&a.palette.action.disabledBackground||"#E8E8E8",f=m=>{const{active:h,completed:g,icon:w}=m;return g?l.jsx(x.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(Sa,{sx:{fontSize:16,fontWeight:600}})}):h?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${o}`,backgroundColor:ot(o,.2),color:o,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:w}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:u,color:s,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:w})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(bf,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:s,fontWeight:500},"& .MuiStep-root":{cursor:n?"pointer":"default"},...r},children:e.map((m,h)=>{const g=Array.isArray(i)&&i.length>0?i.includes(h):h<t;return l.jsxs(x.Step,{onClick:()=>n==null?void 0:n(h),completed:g,children:[l.jsx(x.StepLabel,{StepIconComponent:f,children:l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:h===t?o:s},children:m.label})}),h!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:c}})]},h)})})},Ea=({colorKey:e="primary",colorHex:t,tone:n="soft",bgAlpha:r=.12,borderAlpha:i=.24,sx:a,...o})=>l.jsx(x.Chip,{...o,sx:s=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${ot(t||s.palette.text.primary,.5)}`,backgroundColor:ot(t||s.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||s.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Sf=lt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:he.primary.main}})),Cf=({items:e,activeIndex:t=1,onStepClick:n,sx:r})=>{const[i,a]=I.useState(null),o=s=>{const{active:c,completed:u,icon:f}=s;return u?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${he.primary.main}`,borderRadius:"50%",backgroundColor:he.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(Sa,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${he.primary.main}`,backgroundColor:ot(he.primary.main,.2),color:he.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:f}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:he.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:f})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Sf,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:he.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:n?"pointer":"default"},...r},children:e.map((s,c)=>l.jsxs(x.Step,{onMouseEnter:()=>a(c),onMouseLeave:()=>a(null),onClick:()=>n==null?void 0:n(c),completed:c<t,children:[l.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(x.StepLabel,{StepIconComponent:o,children:[l.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:c===t?he.primary.main:he.text.primary},children:s.label}),l.jsx(Ea,{size:"small",colorHex:c<t?he.success.main:c===t?"#973B00":he.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${he.text.primary}60`,mt:.5,width:"80%"},children:s.description})]}),i===c&&l.jsx(x.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(x.Divider,{sx:{ml:4.2,borderColor:he.divider}})]},c))})},Tf=Je(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"),Ef=({variant:e="list",title:t,subtitle:n,text:r,items:i=[],icon:a,colorHex:o,sx:s})=>{const c=o||he.info.main,u=ot(c,.08),f=ot(c,.08),m=a??l.jsx(Tf,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:u,border:`1px solid ${f}`,boxShadow:"none",...s},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:m}),l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:r})]}):e==="inline"?l.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:u,border:`1px solid ${f}`,boxShadow:"none",...s},children:l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:r})}):e==="listWithHeader"?l.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:u,border:`1px solid ${f}`,...s},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),n&&l.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:n}),l.jsx(x.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((h,g)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:h})},g))})]}):l.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:u,border:`0.5px solid ${f}`,boxShadow:"none",...s},children:l.jsx(x.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((h,g)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:h})},g))})})},Io=e=>e==null?[]:Array.isArray(e)?e:[e],al=({value:e,onChange:t,items:n,ariaLabel:r,sx:i,tabSx:a})=>{const o=[{alignItems:"center",borderRadius:"6px",p:"10px",backgroundColor:"#FFFFFF","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"}},...Io(i)];return l.jsxs(x.Box,{children:[l.jsx(x.Tabs,{value:e,onChange:(s,c)=>t(c),"aria-label":r||"Fin tabs",sx:o,children:n.map((s,c)=>{const u=typeof s.value=="string"||typeof s.value=="number"?s.value:c;return l.jsx(x.Tab,{value:u,disabled:s.disabled,label:l.jsx(x.Typography,{variant:"body2",children:s.label}),sx:[f=>({px:2,textTransform:"none",color:f.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#FFFFFF","&:hover":{backgroundColor:f.palette.action.hover},"&.Mui-selected":{color:f.palette.common.white,borderColor:f.palette.primary.main,backgroundColor:f.palette.primary.main,fontWeight:600}}),...Io(a)]},String(u))})}),n.map((s,c)=>{const u=typeof s.value=="string"||typeof s.value=="number"?s.value:c,f=s.content??(typeof s.value=="object"?s.value:null);return f&&e===u?l.jsx(x.Box,{sx:{mt:1},children:f},`panel-${u}`):null})]})},jf=Je(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"),ol=({name:e,columns:t,initialRow:n,addLabel:r,maxRows:i,hideAddWhenMax:a,disableAddWhenMax:o=!0,showEmptyState:s=!0,rowDeletable:c=!0,control:u,sx:f,addActions:m,emptyTitle:h="No items configured",emptySubtitle:g="Click 'Add' to get started.",emptyCardSx:w,setValue:d,rowSelectionMode:E,rowSelectionKey:y,dateFormat:j})=>{const{fields:k,append:v,remove:S}=Ee.useFieldArray({control:u,name:e}),M=!(typeof i=="number"?k.length>=i:!1),B=I.useMemo(()=>{if(y)return y;const V=t.find(K=>K.type==="rowSelect");return V==null?void 0:V.key},[t,y]),q=Ee.useWatch({control:u,name:e})||[],p=I.useMemo(()=>{if(!B)return{};const V={};return q.forEach((K,te)=>{V[te]=!!(K!=null&&K[B])}),V},[q,B]),R=I.useCallback(V=>p[V]===!0,[p]),$=I.useCallback((V,K)=>{if(!d||!B)return;const te=`${e}.${V}.${B}`;E==="single"&&K&&q.forEach((oe,T)=>{if(T!==V){const D=`${e}.${T}.${B}`;d(D,!1,{shouldDirty:!0})}}),d(te,K,{shouldDirty:!0})},[e,B,E,d,q]),G=V=>{const K={...V||n};t.forEach(te=>{te.value!==void 0&&K[te.key]===void 0&&(K[te.key]=typeof te.value=="function"?te.value(K,k.length):te.value)}),v(K)};I.useEffect(()=>{!s&&k.length===0&&M&&G()},[s,k.length,M]);const N=I.useMemo(()=>t.reduce((K,te)=>{if(te.width==="auto"||te.width===void 0)return K+120;const oe=typeof te.width=="number"?te.width:typeof te.width=="string"&&parseInt(te.width)||160;return K+oe},0)+(c?100:0),[t,c]),re=V=>V.width==="auto"||V.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof V.width=="number"?{width:`${V.width}px`,minWidth:`${V.width}px`,maxWidth:`${V.width}px`}:typeof V.width=="string"?{width:V.width,minWidth:V.width}:{width:"160px",minWidth:"160px"};return l.jsx(x.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:k.length===0&&s?l.jsxs(x.Box,{sx:V=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:ot(V.palette.primary.main,.4),backgroundColor:ot(V.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...w}),children:[l.jsx(x.Typography,{variant:"subtitle1",sx:V=>({color:V.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:h}),l.jsx(x.Typography,{variant:"body2",sx:V=>({color:V.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:g}),Array.isArray(m)&&m.length>0?m.map((V,K)=>l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(er,{}),sx:{mr:1,mt:1},onClick:()=>G(V.template),disabled:!M&&o,style:{display:!M&&a?"none":void 0},children:V.label},`empty-add-${K}`)):r&&l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(er,{}),onClick:()=>G(),disabled:!M&&o,style:{display:!M&&a?"none":void 0},children:r})]}):l.jsxs(l.Fragment,{children:[l.jsx(x.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(m)&&m.length>0?m.map((V,K)=>l.jsx(x.Button,{variant:K===0?"contained":"outlined",size:"small",startIcon:l.jsx(er,{}),onClick:()=>G(V.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:K===0?"#04502d":void 0}},disabled:!M&&o,style:{display:!M&&a?"none":void 0},children:V.label},`add-${K}`)):r&&l.jsx(x.Button,{variant:"contained",size:"small",startIcon:l.jsx(er,{}),onClick:()=>G(),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:!M&&o,style:{display:!M&&a?"none":void 0},children:r})}),l.jsx(x.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(x.TableContainer,{sx:{width:"100%",minWidth:"100%"},children:l.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${N||650}px`},children:[l.jsx(x.TableHead,{children:l.jsxs(x.TableRow,{children:[t.map(V=>l.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,...re(V)},children:V.header},V.key)),c&&l.jsx(x.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(x.TableBody,{children:k.map((V,K)=>{const te=R(K),oe=E&&!te;return l.jsxs(x.TableRow,{children:[t.map(T=>{var pe;const D=`${e}.${K}.${T.key}`,ee=T.type==="rowSelect"||T.key===B,se=ee?!1:oe?!0:typeof T.disabled=="function"?T.disabled(V,K):!!T.disabled;if(T.type==="index"){const U=T.indexFormat?T.indexFormat(K):`#${K+1}`;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((pe=T.cellSx)==null?void 0:pe.textAlign)||"center",...re(T),...T.cellSx},children:U},T.key)}if(T.value!==void 0&&T.editable===!1){const U=typeof T.value=="function"?T.value(V,K):T.value;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...re(T),...T.cellSx},children:U},T.key)}const ie=T.endorsementText?typeof T.endorsementText=="function"?T.endorsementText(V,K):T.endorsementText:void 0;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...re(T),...T.cellSx},children:T.type==="rowSelect"||ee&&T.type==="checkbox"?l.jsx(Ee.Controller,{name:D,control:u,defaultValue:!1,render:({field:U})=>l.jsx(_t,{label:"",checked:!!U.value,disabled:!1,onChange:ne=>{U.onChange(ne),$(K,ne)},sx:T.sx})}):T.type==="checkbox"?l.jsx(Ee.Controller,{name:D,control:u,render:({field:U})=>l.jsx(_t,{label:"",checked:!!U.value,disabled:se,onChange:U.onChange,sx:T.sx})}):T.type==="select"?l.jsx(Ee.Controller,{name:D,control:u,render:({field:U})=>l.jsx(ci,{...U,fullWidth:!0,disabled:se,options:T.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...T.sx},helperText:T.helperText,required:T.required})}):T.type==="date"?l.jsx(Ee.Controller,{name:D,control:u,defaultValue:T.value!==void 0?typeof T.value=="function"?T.value(V,K):T.value:void 0,render:({field:U})=>(I.useEffect(()=>{if(d&&(U.value===void 0||U.value===null||U.value==="")&&T.value!==void 0){const ne=typeof T.value=="function"?T.value(V,K):T.value;d(D,ne,{shouldValidate:!1})}},[D,U.value,T.value,V,K,d]),l.jsx(Ta,{name:U.name,value:U.value,onChange:U.onChange,onBlur:U.onBlur,fullWidth:!0,disabled:se,size:"small",dateFormat:T.dateFormat??j,placeholder:T.placeholder||Ca(T.dateFormat??j??"DD-MM-YYYY"),sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...T.sx},helperText:T.helperText,required:T.required}))}):l.jsx(Ee.Controller,{name:D,control:u,defaultValue:T.value!==void 0?typeof T.value=="function"?T.value(V,K):T.value:void 0,render:({field:U})=>(I.useEffect(()=>{if(d&&(U.value===void 0||U.value===null||U.value==="")&&T.value!==void 0){const ne=typeof T.value=="function"?T.value(V,K):T.value;d(D,ne,{shouldValidate:!1})}},[D,U.value,T.value,V,K,d]),l.jsx(rt,{...U,fullWidth:!0,type:T.type==="number"?"number":"text",placeholder:T.placeholder,disabled:se,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...T.sx},helperText:T.helperText,required:T.required,endorsementText:ie,endorsementBg:T.endorsementBg,endorsementColor:T.endorsementColor,endorsementRadius:T.endorsementRadius,endorsementHeight:T.endorsementHeight,endorsementPaddingX:T.endorsementPaddingX,inputProps:{...T.type==="number"?{min:T.min,max:T.max,step:T.step}:{minLength:T.minLength,maxLength:T.maxLength,pattern:T.pattern}}}))})},T.key)}),c&&l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>S(K),sx:{width:"20px",height:"20px"},children:l.jsx(jf,{sx:{fontSize:"20px"}})})})]},V.id)})})]})})})]})})},sl=({name:e,control:t,items:n,sx:r,cardSx:i})=>l.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...r},children:n.map(a=>{const o=!!a.leftAction,s=!!a.rightAction,c=!!(a.header||a.chipText),u=a.leftAction,f=a.rightAction;return l.jsxs(x.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[o&&u&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Ee.Controller,{name:u.name,control:t,defaultValue:!1,render:({field:m})=>l.jsx(_t,{label:u.label||"",checked:!!m.value,onChange:m.onChange,sx:{margin:0}})})}),c&&l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:o||s?1:"none",ml:o?1:0},children:[a.header&&l.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.jsx(x.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(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Ee.Controller,{name:f.name,control:t,defaultValue:!1,render:({field:m})=>l.jsx(Wr,{label:f.label,checked:!!m.value,onChange:m.onChange,sx:{margin:0}})})}),!o&&!s&&!c&&l.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),ll=Je(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"),Si=Je(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"),kf=[{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"}],Ci=[{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"}],Of=({phase:e,index:t,onUpdate:n,onDelete:r,months:i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],disabled:a=!1,sx:o})=>{const[s,c]=I.useState(e.seasonalMonths||[]),u=h=>{const g=s.includes(h)?s.filter(w=>w!==h):[...s,h];c(g),n(e.id,{seasonalMonths:g})},f=(()=>{const h=e.min||0;return h<0?"Min cannot be negative.":Number.isInteger(h)?null:"Use whole periods."})(),m=(()=>{const h=e.min||0,g=e.max||0;return Number.isInteger(g)?g<h?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(x.Card,{sx:{border:"2px solid",borderColor:he.divider,position:"relative",...o},children:l.jsxs(x.CardContent,{sx:{p:2},children:[l.jsxs(x.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(x.Box,{children:l.jsx(rl,{})}),l.jsx(Ea,{label:t+1,size:"small"})]}),l.jsx(x.IconButton,{onClick:()=>r(e.id),disabled:a,sx:{color:he.error.main,"&:hover":{bgcolor:$r[50]}},size:"small",children:l.jsx(ll,{fontSize:"small"})})]}),l.jsx(x.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(x.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(x.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx(ci,{labelText:"Phase type",value:e.type,onChange:h=>n(e.id,{type:h.target.value}),options:kf,disabled:a})}),l.jsxs(x.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(x.Typography,{variant:"caption",sx:{fontSize:"12px",color:he.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(rt,{type:"number",value:e.priority||5,onChange:h=>{const g=parseInt(h.target.value)||5;n(e.id,{priority:Math.min(9,Math.max(1,g))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(rt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:h=>{const g=parseInt(h.target.value)||0;n(e.id,{min:g,...e.lockLength?{max:g}:{}})},inputProps:{min:0},disabled:a,error:!!f,helperText:f||void 0})}),l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(rt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:h=>n(e.id,{max:parseInt(h.target.value)||0}),inputProps:{min:0},disabled:a||e.lockLength,error:!!m&&!e.lockLength,helperText:e.lockLength?"Locked to Min":m||void 0,sx:e.lockLength?{opacity:.5}:{}})})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:3},children:[l.jsx(_t,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:h=>n(e.id,{lockLength:h,...h?{max:e.min}:{}}),disabled:a}),l.jsx(_t,{label:"Residual fill",checked:e.residualFill||!1,onChange:h=>n(e.id,{residualFill:h}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(Si,{sx:{fontSize:14,color:he.text.secondary,cursor:"help"}})})]}),l.jsx(sn,{value:e.interestPolicy||"accrue-capitalize",onChange:h=>n(e.id,{interestPolicy:h}),options:Ci,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(sn,{value:e.balloonType||"percent",onChange:h=>n(e.id,{balloonType:h}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(rt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:h=>n(e.id,{balloonAmount:parseFloat(h.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(rt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:h=>n(e.id,{balloonPercent:parseFloat(h.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(rt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:h=>n(e.id,{stepPercent:parseFloat(h.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(rt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:h=>n(e.id,{stepEveryN:parseInt(h.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(x.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(h=>l.jsx(x.Chip,{label:h,size:"small",onClick:()=>!a&&u(h),sx:{cursor:a?"default":"pointer",bgcolor:s.includes(h)?he.primary.main:"transparent",color:s.includes(h)?he.primary.contrastText:he.text.primary,border:`1px solid ${he.divider}`,"&:hover":{bgcolor:s.includes(h)?$r[600]:$r[50]}}},h))})]}),l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(Si,{sx:{fontSize:14,color:he.text.secondary,cursor:"help"}})})]}),l.jsx(sn,{value:e.interestPolicy||"accrue-capitalize",onChange:h=>n(e.id,{interestPolicy:h}),options:Ci,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(rt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:h=>n(e.id,{customAmount:parseFloat(h.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(Si,{sx:{fontSize:14,color:he.text.secondary,cursor:"help"}})})]}),l.jsx(sn,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:h=>n(e.id,{holidayInterestTreatment:h}),options:Ci,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};function cl(e,t){return{field:`${e}-field-${t}`,label:`${e}-label-${t}`,input:`${e}-input-${t}`,error:`${e}-error-${t}`,section:`${e}-section-${t}`,upload:`${e}-upload-${t}`,preview:`${e}-preview-${t}`,remove:`${e}-remove-${t}`,replace:`${e}-replace-${t}`,option:n=>`${e}-option-${t}-${String(n)}`,submit:`${e}-submit`,cancel:`${e}-cancel`}}function ul(e,t){if(!e||!t.name)return null;const n=t.automation;if(n!=null&&n.skip)return null;const r=cl(e,t.name);return{field:(n==null?void 0:n.fieldTestId)||r.field,label:(n==null?void 0:n.labelTestId)||r.label,input:t.testId||(n==null?void 0:n.inputTestId)||r.input,error:(n==null?void 0:n.errorTestId)||r.error,section:r.section,upload:r.upload,preview:r.preview,remove:r.remove,replace:r.replace,option:r.option}}async function pl(e,t,n,r){try{const{endpoint:i,method:a="GET",valueField:o="value",labelField:s="label",headers:c={},params:u={},body:f,transform:m,passThroughFields:h}=e;let g=i;if(t&&!i.startsWith("http")&&(g=`${t}${i.startsWith("/")?i:`/${i}`}`),r){const v=/\{([^}]+)\}/g;g=g.replace(v,(S,_)=>{const M=r[_];return M!=null?encodeURIComponent(String(M)):""}),g=g.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const w=new URLSearchParams;Object.entries(u).forEach(([v,S])=>{S!=null&&w.append(v,String(S))}),w.toString()&&(g+=`${g.includes("?")?"&":"?"}${w.toString()}`);try{const v=/^https?:\/\//i.test(g),S=new URL(g,v?void 0:"http://local.placeholder"),_=Array.from(S.searchParams.entries());for(const[M,B]of _)(B===""||B==="undefined"||B==="null")&&S.searchParams.delete(M);v?g=S.toString():g=S.pathname+(S.search?S.search:""),g=g.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const d={"Content-Type":"application/json",...n,...c},E={method:a,headers:d};(a==="POST"||a==="PUT")&&f&&(E.body=JSON.stringify(f));const y=await fetch(g,E);if(!y.ok)throw new Error(`API request failed: ${y.status} ${y.statusText}`);const j=await y.json();if(m)return m(Array.isArray(j)?j:j.data||j);const k=Array.isArray(j)?j:j.data||j;if(!Array.isArray(k))throw new Error("API response is not an array");return k.map(v=>{const S={label:v[s]||v.name||v.title||String(v[o]||""),value:v[o]||v.id||v.value||""},_=Array.isArray(h)?h:void 0;if(Array.isArray(_))for(const M of _)v[M]!==void 0&&(S[M]=v[M]);return S})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function dl(e,t,n,r,i=!1){const a=I.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!r)return null;const s=r[e.dependsOn];return s!==void 0?s:null},[e==null?void 0:e.dependsOn,r]),o=I.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,r?JSON.stringify(r):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,r]);return $c({queryKey:o,queryFn:()=>{if(!e)throw new Error("API config is required");return pl(e,t,n,r)},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 rn(e){return!!(e.apiConfig||e.api_endpoint)}function ja(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 Ff(e,t){const n=ja(e);if(!(n!=null&&n.conditional)&&!e.conditional)return!0;if(n!=null&&n.dependsOn||e.depends_on){const r=(n==null?void 0:n.dependsOn)||e.depends_on;if(r){const i=t[r];return i!=null&&i!==""}}return!0}const ka=({field:e,control:t,errors:n,baseUrl:r,apiHeaders:i,formData:a,setValue:o,testIdPrefix:s,dateFormat:c})=>{const u=n[e.name],f=!!u,m=I.useMemo(()=>ul(s,e),[s,e]),h=I.useMemo(()=>m?{inputTestId:m.input,labelTestId:m.label,errorTestId:m.error,optionTestId:m.option}:{},[m]),[g,w]=I.useState(!1),d=I.useRef(!1),[E,y]=I.useState(!1),[j,k]=I.useState(!1),[v,S]=I.useState(!1),_=I.useRef(null),M=I.useRef(null),B=()=>{var z;const L=e.required;if(typeof L=="function")try{return!!L(a||{})}catch{return!1}if(L!==void 0)return!!L;const Y=(z=e.validation)==null?void 0:z.required;if(typeof Y=="function")try{return!!Y(a||{})}catch{return!1}return Y!==void 0?!!Y:!1},q=L=>B()?`${L} *`:L,p=()=>{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?[]:""},R=I.useRef(void 0);I.useEffect(()=>{const L=e.value;if(typeof L!="function"||!o)return;let Y;try{Y=L(a||{})}catch{return}const z=a?a[e.name]:void 0;if(R.current===void 0&&(R.current=Y),z===void 0||z===R.current)try{o(e.name,Y,{shouldValidate:!0,shouldDirty:!1}),R.current=Y}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((L,Y)=>({...L,[Y]:a[Y]}),{}):a||{}),e.name]);const $=I.useMemo(()=>{const L=ja(e);return L&&Array.isArray(e.passThroughFields)&&(L.passThroughFields=e.passThroughFields),L},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),G=I.useRef(null),N=$!=null&&$.dependsOn?a==null?void 0:a[$.dependsOn]:null;I.useEffect(()=>{$!=null&&$.dependsOn&&(G.current=N)},[$==null?void 0:$.dependsOn,N]);const re=I.useMemo(()=>{const L=e.showWhen;if(typeof L=="function")try{return!!L(a||{})}catch{return!0}if(L&&typeof L=="object"){const Y=L.field,z=L.equals,xe=L.in,je=Y?(a||{})[Y]:void 0;if(Y&&typeof z<"u")return je===z;if(Y&&Array.isArray(xe))return xe.includes(je)}return!0},[e.showWhen,a]),V=I.useCallback(()=>{const L=e.dynamicEndorsement;if(typeof L=="function")try{return L(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),K=I.useCallback(()=>{const L=e.endAdornment,Y=e.endAdornmentSwitch,z=e.endAdornmentCheckbox;if(Y)return l.jsx(Ee.Controller,{name:Y,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:xe})=>l.jsx(x.Switch,{checked:xe.value||!1,onChange:je=>{xe.onChange(je.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(je.target.checked,a,o)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(z)return l.jsx(Ee.Controller,{name:z,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:xe})=>l.jsx(_t,{label:"",checked:xe.value||!1,onChange:xe.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof L=="function")try{return L(a||{},{control:t,setValue:o})}catch{return}return L},[e,a,t,o]),te=I.useMemo(()=>!!(g&&rn(e)&&(!($!=null&&$.dependsOn)||N)),[g,e,$==null?void 0:$.dependsOn,N]),oe=I.useMemo(()=>{const L={};if(!a)return L;const Y=($==null?void 0:$.endpoint)||(e==null?void 0:e.api_endpoint);if(Y&&typeof Y=="string"){const z=Y.match(/\{([^}]+)\}/g)||[];for(const xe of z){const je=xe.slice(1,-1),Ve=a[je];Ve!==void 0&&(L[je]=Ve)}}if($!=null&&$.dependsOn){const z=$.dependsOn,xe=a[z];xe!==void 0&&(L[z]=xe)}return L},[$==null?void 0:$.endpoint,e==null?void 0:e.api_endpoint,$==null?void 0:$.dependsOn,a]),{data:T=[],isLoading:D,error:ee}=dl($,r,i,oe,te),se=I.useCallback(()=>{rn(e)&&!d.current&&(d.current=!0,w(!0))},[e]),ie=I.useCallback(()=>{rn(e)&&!d.current&&(d.current=!0,w(!0))},[e]);I.useEffect(()=>{if(rn(e)&&!d.current){const L=a==null?void 0:a[e.name];L!=null&&L!==""&&(d.current=!0,w(!0))}},[e,a]),I.useEffect(()=>{rn(e)&&($!=null&&$.dependsOn)&&(N!=null&&`${N}`!=""?(d.current=!0,w(!0)):(d.current=!1,w(!1)))},[$==null?void 0:$.dependsOn,N]);const pe=I.useCallback(L=>{if(typeof L=="function")try{const Y=L(a||{});return pe(Y)}catch{return[]}return L?Array.isArray(L)?L.map(Y=>{if(Y&&typeof Y=="object"){const z=Y.value??Y.id??Y.key??void 0,xe=Y.label??Y.name??Y.title??(z!==void 0?String(z):"");return{label:String(xe??""),value:String(z??xe??"")}}return{label:String(Y),value:String(Y)}}):typeof L=="object"?Object.keys(L).map(Y=>({value:String(Y),label:String(L[Y])})):[]:[]},[a]),U=I.useCallback(()=>rn(e)?Array.isArray(T)?T:[]:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?pe(e.options):[],[e,T,pe]),ne=()=>{var L,Y,z,xe,je,Ve;switch(e.type){case"title":return l.jsx(x.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(x.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left","data-testid":m==null?void 0:m.section,sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const jt=e.actionName,Be=e.actionComponent,Ye=e.actionLabel,mt=F=>l.jsx(nl,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:F??e.actions}),et=F=>{if(e.cardWrap){const W={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(x.Card,{sx:W,...e.cardProps,children:F})}return F};return et(jt&&Be?l.jsx(Ee.Controller,{name:jt,control:t,defaultValue:e.value??!1,render:({field:F})=>mt(Be==="switch"?l.jsx(Wr,{label:Ye,checked:!!F.value,onChange:F.onChange}):l.jsx(_t,{label:Ye||"",checked:!!F.value,onChange:F.onChange}))}):mt());case"tabs":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((Y=(L=e.items)==null?void 0:L[0])==null?void 0:Y.value)=="string"||typeof((xe=(z=e.items)==null?void 0:z[0])==null?void 0:xe.value)=="number"?(Ve=(je=e.items)==null?void 0:je[0])==null?void 0:Ve.value:0),render:({field:F})=>{const A=e.items||[],W=A.map((H,Q)=>({label:H.label,value:typeof H.value=="string"||typeof H.value=="number"?H.value:Q,content:H.content,disabled:H.disabled})),Z=F.value,ce=(()=>{if(typeof Z=="string"||typeof Z=="number"){const H=A.findIndex((Q,ge)=>typeof Q.value=="string"||typeof Q.value=="number"?Q.value===Z:ge===Z);return H>=0?H:0}return Number(Z)||0})(),fe=A[ce]||{};return l.jsxs(x.Box,{children:[l.jsx(al,{value:F.value,onChange:F.onChange,items:W,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(fe.fields)&&fe.fields.length>0&&(()=>{const H=fe.fields,Q=[];let ge=[];for(const Ae of H)Ae.type==="section"&&ge.length>0?(Q.push(ge),ge=[Ae]):ge.push(Ae);ge.length>0&&Q.push(ge);const Fe={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(x.Box,{sx:{mt:1},children:Q.map((Ae,qe)=>{const Me=Ae.find(tt=>tt.type==="section"),Ke=(Me==null?void 0:Me.cardWrap)!==!1,ae=l.jsx(l.Fragment,{children:Ae.map(tt=>{const nt=tt.showWhen;if(nt)try{if(typeof nt=="function"){if(!nt(a||{}))return null}else if(typeof nt=="object"){const Tn=nt.field,$a=nt.equals,Ra=nt.in,Pa=Tn?(a||{})[Tn]:void 0;if(Tn&&typeof $a<"u"&&Pa!==$a||Tn&&Array.isArray(Ra)&&!Ra.includes(Pa))return null}}catch{}const Cn=Math.min(Math.max(tt.col??12,1),12);return l.jsx(x.Box,{sx:{gridColumn:`span ${Cn}`},children:l.jsx(ka,{field:tt,control:t,errors:n,baseUrl:r,apiHeaders:i,formData:a,setValue:o,testIdPrefix:s})},tt.name)})});return Ke?l.jsx(x.Card,{sx:{...Fe,...(Me==null?void 0:Me.cardSx)||{}},...(Me==null?void 0:Me.cardProps)||{},children:ae},`tab-group-${qe}`):l.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:ae},`tab-group-${qe}`)})})})()]})}});case"grid":const kt=e.defaultRows||[];return l.jsx(x.Box,{children:l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:kt.length>0?kt:p()||[],render:()=>l.jsx(ol,{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,dateFormat:c})})});case"listcards":return l.jsx(sl,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:e.items||[],render:({field:F})=>{const A=e,W=F.value||A.items||[],Z=typeof A.getId=="function"?A.getId:typeof A.getId=="string"?H=>H[A.getId]:H=>H.id??H._id??H.key??String(H),ce=typeof A.getText=="function"?A.getText:typeof A.getText=="string"?H=>H[A.getText]??String(H):H=>H.text??H.label??H.name??H.title??String(H),fe=(()=>{if(typeof A.chipText=="function")return A.chipText;if(typeof A.chipText=="string")return W.length>0&&W[0]&&A.chipText in W[0]?(H,Q)=>H[A.chipText]??void 0:A.chipText})();return l.jsx(il,{items:W,getId:Z,onReorder:H=>{F.onChange(H)},header:A.header,disabled:e.disabled,sx:A.sx,chipText:fe,helperText:A.helperText||(f?u==null?void 0:u.message:void 0),getText:ce,showIndex:A.showIndex!==!1,showLeftIcon:A.showLeftIcon!==!1,renderItem:A.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>e.type==="textarea"?l.jsx(tl,{...F,...h,labelText:e.labelPosition==="top"?q(e.label):void 0,label:e.labelPosition!=="top"?q(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:f,helperText:(u==null?void 0:u.message)||e.helperText}):l.jsx(rt,{...F,...h,id:e.id,labelText:e.labelPosition==="top"?q(e.label):void 0,label:e.labelPosition!=="top"?q(e.label):void 0,endAdornment:K(),endorsementText:V(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?E?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:f,helperText:(u==null?void 0:u.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(Us,{position:"end",children:l.jsx(Ar,{"aria-label":"toggle password visibility",onClick:()=>y(A=>!A),edge:"end",children:E?l.jsx(_o,{}):l.jsx(Po,{})})})}:void 0})});case"number":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(rt,{...F,...h,id:e.id,labelText:e.labelPosition==="top"?q(e.label):void 0,label:e.labelPosition!=="top"?q(e.label):void 0,endAdornment:K(),endorsementText:V(),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:f,helperText:(u==null?void 0:u.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const le=U();return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>{const A=typeof e.disabled=="function"?!!e.disabled(a||{}):!!e.disabled,W=e.disableWhenEmptyOptions===!0&&Array.isArray(le)&&le.length===0,Z=A||W||D,ce=F.value,fe=(()=>{if(Array.isArray(le)&&le.length>0){const H=le.find(Q=>String(Q==null?void 0:Q.value)===String(ce));return H?H.value:ce}return ce})();return l.jsx(ci,{...h,labelText:e.labelPosition==="top"?q(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?q(e.label):void 0,labelVariant:e.labelVariant,value:fe,onChange:F.onChange,options:le,disabled:Z,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?q(e.label):void 0):e.placeholder,loading:D,error:f||!!ee,helperText:(u==null?void 0:u.message)||(ee==null?void 0:ee.message)||e.helperText,onOpen:se})}});case"checkbox":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(_t,{...h,label:q(e.label),checked:!!F.value,disabled:e.disabled,onChange:F.onChange})});case"toggle":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(sn,{label:q(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:F.value,options:e.options||[],row:!0,onChange:F.onChange})});case"radio":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(sn,{label:q(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:F.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:F.onChange})});case"checkboxGroup":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p()||[],render:({field:F})=>l.jsx(el,{label:q(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(F.value)?F.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:F.onChange,disabled:e.disabled})});case"switch":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(Wr,{label:q(e.label),checked:!!F.value,disabled:e.disabled,onChange:F.onChange})});case"autocomplete":const ct=U(),O=!!((typeof e.disabled=="function"?e.disabled(a||{},{options:ct,isLoading:D,error:ee}):e.disabled)||e.disableWhenEmptyOptions===!0&&Array.isArray(ct)&&ct.length===0||D||$!=null&&$.dependsOn&&!N);return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>{const A=F.value,W=e.multiple===!0,Z=($==null?void 0:$.valueField)||e.value_field||"value",ce=H=>{if(H!=null){if(typeof H=="string"||typeof H=="number")return H;if(typeof H=="object"){if(H[Z]!==void 0)return H[Z];if(H.value!==void 0)return H.value;if(H.id!==void 0)return H.id}}},fe=(()=>{if(W)return(Array.isArray(A)?A:[]).map(Q=>{const ge=String(typeof Q=="object"?ce(Q):Q);return ct.find(Ae=>{const qe=ce(Ae);return qe!==void 0&&String(qe)===ge})||null}).filter(Boolean);{if(A==null||A==="")return null;const H=String(typeof A=="object"?ce(A):A),Q=ct.find(ge=>{const Fe=ce(ge);return Fe!==void 0&&String(Fe)===H});return Q||null}})();return l.jsx(Js,{...h,id:e.id,options:ct,value:fe,multiple:W,labelText:e.labelPosition==="top"?q(e.label):void 0,label:e.labelPosition!=="top"?q(e.label):void 0,placeholder:O&&($!=null&&$.dependsOn)&&!N?`Please select ${$.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:O,loading:D,error:f||!!ee,helperText:(u==null?void 0:u.message)||(ee==null?void 0:ee.message)||e.helperText||"",onOpen:ie,noOptionsText:O&&($!=null&&$.dependsOn)&&!N?`Please select ${$.dependsOn.replace(/_/g," ")} first`:D?"Fetching data...":g&&!D&&ct.length===0?"No options available":"Click to load options",onChange:H=>{const Q=($==null?void 0:$.valueField)||e.value_field||"value";if(W){const Fe=(Array.isArray(H)?H:[]).map(Ae=>typeof Ae=="object"&&(Ae[Q]||Ae.value||Ae.id)||Ae);F.onChange(Fe)}else{let ge;H&&typeof H=="object"?ge=H[Q]||H.value||H.id||H:ge=H,F.onChange(ge);const Fe=e.selectedAssignments;if(Fe&&H&&typeof H=="object")for(const[Ae,qe]of Object.entries(Fe)){const Me=H[qe];if(Me!==void 0&&typeof o=="function")try{o(Ae,Me,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":{const F=e.dateFormat??c;return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>l.jsx(Ta,{name:A.name,value:A.value,onChange:A.onChange,onBlur:A.onBlur,...h,id:e.name,label:q(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:f,helperText:u==null?void 0:u.message,dateFormat:F,minDate:e.minDate,maxDate:e.maxDate})})}case"image":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>{const A=F.value||e.defaultValue||e.src;if(A){const Q=e.imageUploaded||{},ge=Q.previewText||"Preview",Fe=Q.removeText||"Remove",Ae=Q.saveText||"Save logo",qe=Q.showSave!==void 0?Q.showSave:!!(e.onSave||Q.saveText),Me=()=>{if(S(!0),typeof e.onPreview=="function")try{e.onPreview(A)}catch{}},Ke=()=>{F.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},ae=()=>{typeof e.onSave=="function"&&e.onSave({url:A,file:M.current||void 0})},tt=nt=>{const Cn=nt.target.files&&nt.target.files[0];if(Cn){if(typeof e.onFileSelected=="function")try{e.onFileSelected(Cn)}catch{}try{const Tn=URL.createObjectURL(Cn);F.onChange(Tn)}catch{}M.current=Cn,S(!1)}};return l.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...Q.cardSx},children:[l.jsx("input",{type:"file",ref:_,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:tt}),l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...Q.thumbnailSx},children:l.jsx("img",{src:A,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(x.Box,{sx:{flexGrow:1},children:[l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...Q.fileNameSx},children:typeof A=="string"?A.split("/").pop():"Selected image"}),l.jsx(x.Typography,{sx:{fontSize:"10px",...Q.fileMetaSx},children:"Image selected"})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[l.jsx(x.Button,{type:"button",sx:{...Q.previewButtonSx},variant:"outlined",onClick:Me,startIcon:l.jsx(Po,{}),"data-testid":m==null?void 0:m.preview,children:ge}),l.jsx(x.Button,{variant:"outlined",color:"error",onClick:Ke,sx:{...Q.removeButtonSx},startIcon:l.jsx(_o,{}),"data-testid":m==null?void 0:m.remove,children:Fe}),qe&&l.jsx(x.Button,{variant:"contained",onClick:ae,sx:{...Q.saveButtonSx},children:Ae})]})]}),l.jsxs(x.Dialog,{open:v,onClose:()=>S(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(x.DialogTitle,{children:Q.previewTitle||"Image preview"}),l.jsx(x.DialogContent,{children:l.jsx(x.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:A,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(x.DialogActions,{children:[l.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var nt;return(nt=_.current)==null?void 0:nt.click()},"data-testid":m==null?void 0:m.replace,children:Q.replaceText||"Replace logo"}),l.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>S(!1),children:Q.closeText||"Close"})]})]})]})}const W=e.imagePlaceholder||{},Z=W.icon||"upload",ce=_,fe=()=>{var Q;try{(Q=ce.current)==null||Q.click()}catch{}},H=Q=>{const ge=Q.target.files&&Q.target.files[0];if(ge){typeof e.onFileSelected=="function"&&e.onFileSelected(ge);try{const Fe=URL.createObjectURL(ge);F.onChange(Fe)}catch{}M.current=ge}};return l.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...W.sx},children:[l.jsx("input",{type:"file",ref:ce,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:H}),l.jsx(Ar,{sx:{borderRadius:"8px",...W.iconSx},children:Z==="image"?l.jsx(df,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(qr,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...W.titleSx},children:W.title||"Drag & Drop the image here"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...W.subtitleSx},children:W.subtitle||""}),l.jsx(x.Button,{onClick:fe,sx:{my:2,...W.buttonSx},startIcon:l.jsx(qr,{}),variant:"contained",disabled:e.disabled,"data-testid":m==null?void 0:m.upload,children:W.buttonText||"Upload File"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...W.helperTextSx},children:W.helperText||e.helperText||""})]})}});case"component":return l.jsx(x.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}},de=I.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),me=I.useCallback(async()=>{try{const L=a?a[e.name]:void 0;let Y="";L==null?Y="":Array.isArray(L)?Y=L.join(", "):typeof L=="object"?Y=JSON.stringify(L):Y=String(L),await navigator.clipboard.writeText(Y),k(!0),window.setTimeout(()=>k(!1),1200)}catch{}},[a,e.name]);return l.jsxs(x.Box,{"data-testid":m==null?void 0:m.field,sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(x.Box,{sx:{flexGrow:1},children:re?ne():null}),de&&l.jsx(Ar,{"aria-label":`copy ${e.label||e.name}`,onClick:me,size:"small",children:j?l.jsx(Sa,{fontSize:"small"}):l.jsx(pf,{fontSize:"small"})})]})};var Ti,Mo;function Af(){if(Mo)return Ti;Mo=1;function e(y){this._maxSize=y,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(y){return this._values[y]},e.prototype.set=function(y,j){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=j};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,s=new e(o),c=new e(o),u=new e(o);Ti={Cache:e,split:m,normalizePath:f,setter:function(y){var j=f(y);return c.get(y)||c.set(y,function(v,S){for(var _=0,M=j.length,B=v;_<M-1;){var q=j[_];if(q==="__proto__"||q==="constructor"||q==="prototype")return v;B=B[j[_++]]}B[j[_]]=S})},getter:function(y,j){var k=f(y);return u.get(y)||u.set(y,function(S){for(var _=0,M=k.length;_<M;)if(S!=null||!j)S=S[k[_++]];else return;return S})},join:function(y){return y.reduce(function(j,k){return j+(g(k)||n.test(k)?"["+k+"]":(j?".":"")+k)},"")},forEach:function(y,j,k){h(Array.isArray(y)?y:m(y),j,k)}};function f(y){return s.get(y)||s.set(y,m(y).map(function(j){return j.replace(a,"$2")}))}function m(y){return y.match(t)||[""]}function h(y,j,k){var v=y.length,S,_,M,B;for(_=0;_<v;_++)S=y[_],S&&(E(S)&&(S='"'+S+'"'),B=g(S),M=!B&&/^\d+$/.test(S),j.call(k,S,B,M,_,y))}function g(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function w(y){return y.match(r)&&!y.match(n)}function d(y){return i.test(y)}function E(y){return!g(y)&&(w(y)||d(y))}return Ti}var gn=Af(),Ei,zo;function $f(){if(zo)return Ei;zo=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)||[],n=f=>f[0].toUpperCase()+f.slice(1),r=(f,m)=>t(f).join(m).toLowerCase(),i=f=>t(f).reduce((m,h)=>`${m}${m?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return Ei={words:t,upperFirst:n,camelCase:i,pascalCase:f=>n(i(f)),snakeCase:f=>r(f,"_"),kebabCase:f=>r(f,"-"),sentenceCase:f=>n(r(f," ")),titleCase:f=>t(f).map(n).join(" ")},Ei}var ji=$f(),Tr={exports:{}},Bo;function Rf(){if(Bo)return Tr.exports;Bo=1,Tr.exports=function(i){return e(t(i),i)},Tr.exports.array=e;function e(i,a){var o=i.length,s=new Array(o),c={},u=o,f=n(a),m=r(i);for(a.forEach(function(g){if(!m.has(g[0])||!m.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)c[u]||h(i[u],u,new Set);return s;function h(g,w,d){if(d.has(g)){var E;try{E=", node was:"+JSON.stringify(g)}catch{E=""}throw new Error("Cyclic dependency"+E)}if(!m.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!c[w]){c[w]=!0;var y=f.get(g)||new Set;if(y=Array.from(y),w=y.length){d.add(g);do{var j=y[--w];h(j,m.get(j),d)}while(w);d.delete(g)}s[--o]=g}}}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 n(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 r(i){for(var a=new Map,o=0,s=i.length;o<s;o++)a.set(i[o],o);return a}return Tr.exports}var Pf=Rf();const _f=la(Pf),Df=Object.prototype.toString,If=Error.prototype.toString,Mf=RegExp.prototype.toString,zf=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Bf=/^Symbol\((.*)\)(.*)$/;function Nf(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function No(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Nf(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return zf.call(e).replace(Bf,"Symbol($1)");const r=Df.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+If.call(e)+"]":r==="RegExp"?Mf.call(e):null}function Qt(e,t){let n=No(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let a=No(this[r],t);return a!==null?a:i},2)}function fl(e){return e==null?[]:[].concat(e)}let hl,ml,xl,Lf=/\$\{\s*(\w+)\s*\}/g;hl=Symbol.toStringTag;class Lo{constructor(t,n,r,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[hl]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],fl(t).forEach(a=>{if(Xe.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]}}ml=Symbol.hasInstance;xl=Symbol.toStringTag;class Xe extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(Lf,(i,a)=>Qt(n[a])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,a){const o=new Lo(t,n,r,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[xl]="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,Xe)}static[ml](t){return Lo[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let wt={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:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Qt(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Qt(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Qt(n,!0)}\``+i}},Qe={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"},Zi={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Xi={isValue:"${path} field must be ${value}"},Rr={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Vf={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"},qf={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Qt(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Qt(n,!0)}\``}return Xe.formatError(wt.notType,e)}};Object.assign(Object.create(null),{mixed:wt,string:Qe,number:zt,date:Zi,object:Rr,array:Vf,boolean:Xi,tuple:qf});const Oa=e=>e&&e.__isYupSchema__;class Hr{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:a}=n,o=typeof r=="function"?r:(...s)=>s.every(c=>c===r);return new Hr(t,(s,c)=>{var u;let f=o(...s)?i:a;return(u=f==null?void 0:f(c))!=null?u:c})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(a=>a.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!Oa(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Er={context:"$",value:"."};function Yr(e,t){return new tn(e,t)}class tn{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof 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]===Er.context,this.isValue=this.key[0]===Er.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Er.context:this.isValue?Er.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&gn.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}tn.prototype.__isYupRef=!0;const yt=e=>e==null;function An(e){function t({value:n,path:r="",options:i,originalValue:a,schema:o},s,c){const{name:u,test:f,params:m,message:h,skipAbsent:g}=e;let{parent:w,context:d,abortEarly:E=o.spec.abortEarly,disableStackTrace:y=o.spec.disableStackTrace}=i;function j(R){return tn.isRef(R)?R.getValue(n,w,d):R}function k(R={}){const $=Object.assign({value:n,originalValue:a,label:o.spec.label,path:R.path||r,spec:o.spec,disableStackTrace:R.disableStackTrace||y},m,R.params);for(const N of Object.keys($))$[N]=j($[N]);const G=new Xe(Xe.formatError(R.message||h,$),n,$.path,R.type||u,$.disableStackTrace);return G.params=$,G}const v=E?s:c;let S={path:r,parent:w,type:u,from:i.from,createError:k,resolve:j,options:i,originalValue:a,schema:o};const _=R=>{Xe.isError(R)?v(R):R?c(null):v(k())},M=R=>{Xe.isError(R)?v(R):s(R)};if(g&&yt(n))return _(!0);let q;try{var p;if(q=f.call(S,n,S),typeof((p=q)==null?void 0:p.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(q).then(_,M)}}catch(R){M(R);return}_(q)}return t.OPTIONS=e,t}function Wf(e,t,n,r=n){let i,a,o;return t?(gn.forEach(t,(s,c,u)=>{let f=c?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:i,value:n});let m=e.type==="tuple",h=u?parseInt(f,10):0;if(e.innerType||m){if(m&&!u)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(n&&h>=n.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=n,n=n&&n[h],e=m?e.spec.types[h]:e.innerType}if(!u){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=n,n=n&&n[f],e=e.fields[f]}a=f,o=c?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class Kr extends Set{describe(){const t=[];for(const n of this.values())t.push(tn.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Kr(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Rn(e,t=new Map){if(Oa(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Rn(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Rn(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Rn(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Rn(i,t)}else throw Error(`Unable to clone ${e}`);return n}class st{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 Kr,this._blacklist=new Kr,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(wt.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(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Rn(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}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 n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,a)=>a.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,a;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",a=r._cast(t,n);if(n.assert!==!1&&!r.isType(a)){if(i&&yt(a))return a;let o=Qt(t),s=Qt(a);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
|
|
177
177
|
|
|
178
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 T={value:o,originalValue:s,path:c,options:p,schema:this};for(let m=0;m<a.length;m++){const C=a[m];C(T,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=Ec(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}=bm(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 wm=()=>!0;function Fc(e){return new Ac(e)}class Ac extends gt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:wm},t))}}Fc.prototype=Ac.prototype;function Oc(){return new _c}class _c 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)}}Oc.prototype=_c.prototype;const Sm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Cm(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=Sm.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 Em=/^[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])?)*$/,km=/^((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,Tm=/^(?:[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,jm="^\\d{4}-\\d{2}-\\d{2}",Fm="\\d{2}:\\d{2}:\\d{2}",Am="(([+-]\\d{2}(:?\\d{2})?)|Z)",Om=new RegExp(`${jm}T${Fm}(\\.\\d+)?${Am}$`),_m=e=>At(e)||e===e.trim(),Rm={}.toString();function xn(){return new Rc}class Rc 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===Rm?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(Em,{name:"email",message:t,excludeEmptyString:!0})}url(t=at.url){return this.matches(km,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=at.uuid){return this.matches(Tm,{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(Om,{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:_m})}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=Rc.prototype;let Pm=e=>e!=+e;function Pc(){return new $c}class $c extends gt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Pm(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))}}Pc.prototype=$c.prototype;let Dc=new Date(""),$m=e=>Object.prototype.toString.call(e)==="[object Date]";function yo(){return new $n}class $n extends gt{constructor(){super({type:"date",check(t){return $m(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=Cm(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=Dc;yo.prototype=$n.prototype;yo.INVALID_DATE=Dc;function Dm(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):go(s)&&"deps"in s&&s.deps.forEach(c=>a(c,o))}return um.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 Ic(e){return(t,r)=>Bs(e,t)-Bs(e,r)}const Im=(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 Mm=(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 zm=Ic([]);function Mc(e){return new zc(e)}class zc extends gt{constructor(t){super({type:"object",check(r){return Vs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=zm,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 T,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,b=C==null?void 0:C.strict;if(C!=null&&C.strip){f=f||d in i;continue}T=!r.__validating||!b?u.cast(i[d],p):i[d],T!==void 0&&(c[d]=T)}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=Dm(t,r),n._sortErrors=Ic(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 Mm(a,t)&&(o=Object.assign({},a),n||delete o[t],o[r]=i(a)),o})}json(){return this.transform(Im)}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}}Mc.prototype=zc.prototype;const Bc=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=Pc().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=Oc(),r.validation&&(n=gr(n,r,"boolean"));break;case"date":n=yo().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=Fc()}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}),Mc().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},Vc=({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),T=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?mt(m.palette.primary.main,.2):"transparent",mr:.5,color:T,fontWeight:u||x?600:500,fontSize:"12px"},children:f}),i&&l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:600,color:T},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}}})]})},Nc=({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",T=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:T,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))})]})},Bm=({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=b=>{let w="button",$="contained";return b.type?w=b.type:b.text.toLowerCase().includes("submit")||b.text.toLowerCase().includes("save")||b.text.toLowerCase().includes("next")?w="submit":(b.text.toLowerCase().includes("reset")||b.text.toLowerCase().includes("clear"))&&(w="reset"),(b.text.toLowerCase().includes("cancel")||b.text.toLowerCase().includes("back")||b.text.toLowerCase().includes("draft"))&&($="outlined"),{buttonType:w,buttonVariant:$}},x=b=>["primary","secondary","error","warning","info","success"].includes(b||"")?b:"primary",T=b=>{const{buttonType:w}=u(b);b.onClick?b.onClick():w==="submit"&&t?t(o):a&&r&&(b.text.toLowerCase().includes("next")?r(n+1,i):(b.text.toLowerCase().includes("back")||b.text.toLowerCase().includes("previous"))&&r(n-1,i))},m=(b,w)=>{const{buttonType:$,buttonVariant:F}=u(b),E=x(b.color);return l.jsx(g.Button,{type:$,variant:F,color:E,size:b.size||"medium",disabled:b.disabled,onClick:()=>T(b),sx:b.sx,children:b.text},w)},C=()=>{const b={display:"flex",gap:f,...d};switch(c){case"left":return{...b,justifyContent:"flex-start"};case"center":return{...b,justifyContent:"center"};case"right":return{...b,justifyContent:"flex-end"};case"space-between":return{...b,justifyContent:"space-between"};default:return{...b,justifyContent:"flex-end"}}};return p==="vertical"?l.jsx(g.Box,{sx:C(),children:s.map((b,w)=>l.jsx(g.Box,{sx:{width:"100%"},children:m(b,w)},w))}):l.jsx(g.Box,{sx:C(),children:l.jsx(g.ButtonGroup,{variant:"outlined",size:"medium",children:s.map((b,w)=>m(b,w))})})},Lc=(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(Lc(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},Vm=new Wu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Nm=e=>l.jsx(Gu,{client:Vm,children:l.jsx(Lm,{...e})}),Lm=({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:T,formCardWrap:m,formCardSx:C,formCardProps:b,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,I)=>(y||0)-(I||0)),_=E.length>1,z=E.length||1,[R,Y]=P.useState(1),h=_?r.filter(y=>y.step===R):r,B=P.useCallback(y=>{const I=[];for(const v of y)if(I.push(v),v.type==="tabs"&&v.items)for(const A of v.items||[])Array.isArray(A.fields)&&I.push(...B(A.fields));return I},[]),{control:q,handleSubmit:Z,formState:{errors:L},watch:H,setValue:G,resetField:re,trigger:ce}=Cu({resolver:P.useCallback((y,I,v)=>{const V=Jn(_?h:r,y),M=Bc(V);return Tu(M)(y,I,v)},[_,h,r]),mode:"onChange",defaultValues:s}),D=H(),U=P.useRef({});P.useEffect(()=>{const y=[];for(const I of r){const v=I.depends_on;v&&typeof I.name=="string"&&y.push({dependentField:I.name,dependencyName:v})}if(y.length!==0)for(const{dependentField:I,dependencyName:v}of y){const A=U.current[v],V=D==null?void 0:D[v];if(A!==V)try{re(I)}catch{}U.current[v]=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(v=>v.step===R);for(const v of y)if(typeof v.required=="function"?!!v.required(D):!!v.required){const V=D[v.name];let M=!0;if(v.type==="checkbox"?M=V===!0:Array.isArray(V)?M=V.length>0:M=V!=null&&V!=="",!M)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(v=>v.step===R);for(const v of y)if(typeof v.required=="function"?!!v.required(D):!!v.required){const V=D[v.name];let M=!0;if(v.type==="checkbox"?M=V===!0:Array.isArray(V)?M=V.length>0:M=V!=null&&V!=="",!M)return!1}return Object.keys(L).filter(v=>y.some(A=>A.name===v)).length===0},[_,R,r,D,L]),W=P.useCallback((y,I)=>Lc(y,I),[]),Q=P.useCallback(y=>{const I=[];for(const v of y)if(I.push(v),v.type==="tabs"&&v.items)for(const A of v.items||[])Array.isArray(A.fields)&&I.push(...Q(A.fields));return I},[]),ae=P.useCallback((y,I)=>Jn(y,I),[]),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 M=D[A.name];let K=!0;if(A.type==="checkbox"?K=M===!0:K=M!=null&&M!==""&&!(Array.isArray(M)&&M.length===0),!K)return!1}}const I=new Set(y.map(A=>A.name));return Object.keys(L).filter(A=>I.has(A)).length===0},[_,te,r,D,L,ae,W]),le=async y=>{y<1||y>z||y>R&&_&&!await pe()||Y(y)},be=async y=>{if(_&&R<z){console.warn("Form submission attempted on non-final step");return}const v=(A=>{const V={...A||{}},M=Q(r);for(const K of M){if(!K||!K.name)continue;const de=V[K.name];if(K.type==="dragdroplist"&&Array.isArray(de)){const me=K,ge=me.serialize;if(!ge)continue;const Ne=de,Oe=typeof me.getId=="function"?me.getId:typeof me.getId=="string"?ne=>ne==null?void 0:ne[me.getId]:ne=>(ne==null?void 0:ne.id)??(ne==null?void 0:ne._id)??(ne==null?void 0:ne.key)??String(ne),it=typeof me.getText=="function"?me.getText:typeof me.getText=="string"?ne=>(ne==null?void 0:ne[me.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),pt=(()=>{if(typeof me.chipText=="function")return me.chipText;if(typeof me.chipText=="string")return(ne,Ge)=>ne==null?void 0:ne[me.chipText]})();let Me=de;typeof ge=="function"?Me=Ne.map((ne,Ge)=>ge(ne,Ge)):ge==="ids"?Me=Ne.map(ne=>Oe(ne)):ge==="text"?Me=Ne.map(ne=>it(ne)):ge==="chips"?Me=Ne.map((ne,Ge)=>(typeof pt=="function"?pt(ne,Ge):void 0)??""):ge&&typeof ge=="object"&&"field"in ge&&(Me=Ne.map(ne=>ne==null?void 0:ne[ge.field])),V[K.name]=Me}}return V})(y);o&&o(v),n(v)},J=async y=>{y&&(y.preventDefault(),y.stopPropagation()),_&&R<z&&await pe()&&le(R+1)},Ie=y=>{y&&(y.preventDefault(),y.stopPropagation()),_&&R>1&&le(R-1)},Ke=y=>{const I=y.col??12,v=y.xs!==void 0?y.xs:12,A=y.sm!==void 0?y.sm:I,V=y.md!==void 0?y.md:I,M=y.lg!==void 0?y.lg:V,K=y.xl!==void 0?y.xl:M;return{xs:v,sm:A,md:V,lg:M,xl:K}},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)",...T}: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 I={...f,buttons:f.buttons.map(v=>{const A=(v.text||"").toLowerCase(),V=v.type==="submit"||A.includes("submit")||A.includes("save")||A.includes("finish")||A.includes("complete"),M=A.includes("next");let K=!1;return _?(V||M)&&(K=!te):V&&(K=!se),{...v,disabled:v.disabled||K}})};return l.jsx(g.Box,{sx:{mt:3,...y||{}},children:l.jsx(Bm,{config:I,onSubmit:be,onStepChange:le,currentStep:R,totalSteps:z,isMultiStep:_,formData:D})})}if(p&&p.length>0){const I=p.map(v=>{const A=(v.text||"").toLowerCase(),V=v.type==="submit"||A.includes("submit")||A.includes("save")||A.includes("finish")||A.includes("complete"),M=A.includes("next");let K=!1;return _?(V||M)&&(K=!te):V&&(K=!se),{...v,disabled:v.disabled||K}});return l.jsx(g.Box,{sx:y,children:l.jsx(Nc,{buttons:I})})}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<z?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 I=[];for(const v of h)v.type==="section"&&I.length>0?(y.push(I),I=[v]):I.push(v);return I.length>0&&y.push(I),y},[h]),We=l.jsxs(g.Box,{component:"form",onSubmit:y=>{if(_&&R<z){y.preventDefault(),y.stopPropagation(),te&&J();return}Z(be)(y)},id:e,onKeyDown:y=>{y.key==="Enter"&&_&&R<z&&(y.preventDefault(),te&&J())},sx:{pb:x?10:void 0},children:[_&&l.jsx(Vc,{currentStep:R,totalSteps:z,onStepChange:le,stepTitles:F==null?void 0:F.stepTitles,showStepTitles:(F==null?void 0:F.showStepTitles)!==!1}),Ye.map((y,I)=>{const v=y.find(de=>de.type==="section");if(v&&!W(v,D))return null;const A=(v==null?void 0:v.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},M={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 me=Ke(de);return l.jsx(g.Box,{sx:{gridColumn:{xs:`span ${me.xs}`,sm:`span ${me.sm}`,md:`span ${me.md}`,lg:`span ${me.lg}`,xl:`span ${me.xl}`}},children:l.jsx(mo,{field:de,control:q,errors:L,baseUrl:w,apiHeaders:$,formData:D,setValue:G})},de.name)})});return A?l.jsx(g.Card,{sx:{...V,...(v==null?void 0:v.cardSx)||{}},...(v==null?void 0:v.cardProps)||{},children:K},`group-${I}`):l.jsx(g.Box,{sx:M,children:K},`group-${I}`)}),kt()]}),Ue=m?l.jsx(g.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...C},...b,children:We}):We;return Ze?l.jsx(g.ThemeProvider,{theme:Ze,children:Ue}):Ue},qm=({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 Wm=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=Um(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 Um(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=Wm.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 Hm=[".DS_Store","Thumbs.db"];function Km(e){return Ir(this,void 0,void 0,function*(){return yi(e)&&Ym(e.dataTransfer)?Xm(e.dataTransfer,e.type):Gm(e)?Qm(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Zm(e):[]})}function Ym(e){return yi(e)}function Gm(e){return yi(e)&&yi(e.target)}function yi(e){return typeof e=="object"&&e!==null}function Qm(e){return za(e.target.files).map(t=>ln(t))}function Zm(e){return Ir(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>ln(r))})}function Xm(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(Jm));return qs(qc(n))}return qs(za(e.files).map(r=>ln(r)))})}function qs(e){return e.filter(t=>Hm.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 Jm(e){if(typeof e.webkitGetAsEntry!="function")return Ws(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Wc(t):Ws(e,t)}function qc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?qc(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 eg(e){return Ir(this,void 0,void 0,function*(){return e.isDirectory?Wc(e):tg(e)})}function Wc(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(eg));i.push(s),a()}else try{const s=yield Promise.all(i);r(s)}catch(s){n(s)}}),o=>{n(o)})}a()})}function tg(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 rg(){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 ng=rg();const la=Qa(ng);function Hs(e){return og(e)||ag(e)||Hc(e)||ig()}function ig(){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
|
|
181
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
182
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
183
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zc(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 Dg(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 Ig(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=Mg(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 Mg(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 xo=P.forwardRef(function(e,t){var r=e.children,n=vi(e,Tg),i=Jc(n),a=i.open,o=vi(i,jg);return P.useImperativeHandle(t,function(){return{open:a}},[a]),P.createElement(P.Fragment,null,r($e($e({},o),{},{open:a})))});xo.displayName="Dropzone";var Xc={disabled:!1,getFilesFromEvent:Km,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};xo.defaultProps=Xc;xo.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 La={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Jc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=$e($e({},Xc),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,T=t.onDropRejected,m=t.onFileDialogCancel,C=t.onFileDialogOpen,b=t.useFsAccessApi,w=t.autoFocus,$=t.preventDropOnDocument,F=t.noClick,E=t.noKeyboard,_=t.noDrag,z=t.noDragEventsBubbling,R=t.onError,Y=t.validator,h=P.useMemo(function(){return Cg(r)},[r]),B=P.useMemo(function(){return Sg(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(zg,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&&b&&wg()),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(v){R?R(v):console.error(v)},[R]),Q=P.useCallback(function(v){v.preventDefault(),v.persist(),S(v),pe.current=[].concat(Og(pe.current),[v.target]),Un(v)&&Promise.resolve(i(v)).then(function(A){if(!(xi(v)&&!z)){var V=A.length,M=V>0&&yg({files:A,accept:h,minSize:o,maxSize:a,multiple:s,maxFiles:c,validator:Y}),K=V>0&&!M;D({isDragAccept:M,isDragReject:K,isDragActive:!0,type:"setDraggedFiles"}),p&&p(v)}}).catch(function(A){return W(A)})},[i,p,W,z,h,o,a,s,c,Y]),ae=P.useCallback(function(v){v.preventDefault(),v.persist(),S(v);var A=Un(v);if(A&&v.dataTransfer)try{v.dataTransfer.dropEffect="copy"}catch{}return A&&d&&d(v),!1},[d,z]),se=P.useCallback(function(v){v.preventDefault(),v.persist(),S(v);var A=pe.current.filter(function(M){return L.current&&L.current.contains(M)}),V=A.indexOf(v.target);V!==-1&&A.splice(V,1),pe.current=A,!(A.length>0)&&(D({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Un(v)&&f&&f(v))},[L,f,z]),le=P.useCallback(function(v,A){var V=[],M=[];v.forEach(function(K){var de=Kc(K,h),me=ca(de,2),ge=me[0],Ne=me[1],Oe=Yc(K,o,a),it=ca(Oe,2),pt=it[0],Me=it[1],ne=Y?Y(K):null;if(ge&&pt&&!ne)V.push(K);else{var Ge=[Ne,Me];ne&&(Ge=Ge.concat(ne)),M.push({file:K,errors:Ge.filter(function(Kt){return Kt})})}}),(!s&&V.length>1||s&&c>=1&&V.length>c)&&(V.forEach(function(K){M.push({file:K,errors:[gg]})}),V.splice(0)),D({acceptedFiles:V,fileRejections:M,isDragReject:M.length>0,type:"setFiles"}),u&&u(V,M,A),M.length>0&&T&&T(M,A),V.length>0&&x&&x(V,A)},[D,s,h,o,a,c,u,x,T,Y]),be=P.useCallback(function(v){v.preventDefault(),v.persist(),S(v),pe.current=[],Un(v)&&Promise.resolve(i(v)).then(function(A){xi(v)&&!z||le(A,v)}).catch(function(A){return W(A)}),D({type:"reset"})},[i,le,W,z]),J=P.useCallback(function(){if(ue.current){D({type:"openDialog"}),q();var v={multiple:s,types:B};window.showOpenFilePicker(v).then(function(A){return i(A)}).then(function(A){le(A,null),D({type:"closeDialog"})}).catch(function(A){Eg(A)?(Z(A),D({type:"closeDialog"})):kg(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,b,le,W,B,s]),Ie=P.useCallback(function(v){!L.current||!L.current.isEqualNode(v.target)||(v.key===" "||v.key==="Enter"||v.keyCode===32||v.keyCode===13)&&(v.preventDefault(),J())},[L,J]),Ke=P.useCallback(function(){D({type:"focus"})},[]),Ze=P.useCallback(function(){D({type:"blur"})},[]),kt=P.useCallback(function(){F||(bg()?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){z&&A.stopPropagation()},j=P.useMemo(function(){return function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=v.refKey,V=A===void 0?"ref":A,M=v.role,K=v.onKeyDown,de=v.onFocus,me=v.onBlur,ge=v.onClick,Ne=v.onDragEnter,Oe=v.onDragOver,it=v.onDragLeave,pt=v.onDrop,Me=vi(v,Fg);return $e($e(Na({onKeyDown:We(_t(K,Ie)),onFocus:We(_t(de,Ke)),onBlur:We(_t(me,Ze)),onClick:Ye(_t(ge,kt)),onDragEnter:Ue(_t(Ne,Q)),onDragOver:Ue(_t(Oe,ae)),onDragLeave:Ue(_t(it,se)),onDrop:Ue(_t(pt,be)),role:typeof M=="string"&&M!==""?M:"presentation"},V,L),!n&&!E?{tabIndex:0}:{}),Me)}},[L,Ie,Ke,Ze,kt,Q,ae,se,be,E,_,n]),y=P.useCallback(function(v){v.stopPropagation()},[]),I=P.useMemo(function(){return function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=v.refKey,V=A===void 0?"ref":A,M=v.onChange,K=v.onClick,de=vi(v,Ag),me=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(M,be)),onClick:Ye(_t(K,y)),tabIndex:-1},V,H);return $e($e({},me),de)}},[H,r,s,be,n]);return $e($e({},ce),{},{isFocused:U&&!n,getRootProps:j,getInputProps:I,rootRef:L,inputRef:H,open:Ye(J)})}function zg(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 Bg=ut(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=ut(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"),Vg=ut(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"),eu=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?l.jsx(Vg,{}):e.file.type.includes("pdf")?l.jsx(el,{}):l.jsx(el,{}),n=()=>{switch(e.status){case"success":return l.jsx(Bg,{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(wc,{})})})]})},Ng=({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,T]=P.useState([]),[m,C]=P.useState(!1),[b,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]),z=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),T(G)):(F([]),T([]))}catch(re){const ce=`Unexpected error: ${re instanceof Error?re.message:"Unknown error"}`;F([ce]),T([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){T([`${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}=Jc({onDrop:z,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?T(H):T([])},[d,e==null?void 0:e.required,e==null?void 0:e.title,m,b,$]);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(eu,{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=Nc;exports.DocumentUpload=Ng;exports.FINFLOW_FRONTEND_DEFAULT_PRIMARY=pc;exports.FieldRenderer=mo;exports.FilePreview=eu;exports.FinAutocomplete=dc;exports.FinCheckbox=Ut;exports.FinCheckboxGroup=fc;exports.FinChip=fo;exports.FinCustomizedVerticalStepper=Jh;exports.FinDateField=po;exports.FinDragDropList=yc;exports.FinEditableGrid=vc;exports.FinForm=Nm;exports.FinInfoCard=tm;exports.FinListCards=bc;exports.FinPhaseCard=im;exports.FinRadioGroup=wr;exports.FinSelect=Di;exports.FinSwitch=fi;exports.FinTabs=xc;exports.FinTextField=vt;exports.FinTextarea=hc;exports.FinUiHeader=mc;exports.FinVerticalStepper=Zh;exports.ImageComponent=qm;exports.StepNavigation=Vc;exports.brand=Hh;exports.createFinflowFrontendMirrorTheme=Gh;exports.createNeutralToneScale=uc;exports.fetchApiData=Sc;exports.finflowPalette=ye;exports.generateSchema=Bc;exports.getApiConfig=ho;exports.hasApiConfig=yr;exports.neutral=Qn;exports.primary=Wh;exports.secondary=Uh;exports.shouldShowField=am;exports.useApiData=Cc;exports.useFinInputTokens=Pn;
|
|
179
|
+
`+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=n,c=t;s||(c=this._cast(c,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:a,value:c,originalValue:o,options:n,tests:u},r,f=>{if(f.length)return i(f,c);this.runTests({path:a,value:c,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:a,value:o,originalValue:s,path:c,options:u}=t,f=d=>{i||(i=!0,n(d,o))},m=d=>{i||(i=!0,r(d,o))},h=a.length,g=[];if(!h)return m([]);let w={value:o,originalValue:s,path:c,options:u,schema:this};for(let d=0;d<a.length;d++){const E=a[d];E(w,f,function(j){j&&(Array.isArray(j)?g.push(...j):g.push(j)),--h<=0&&m(g)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:a,options:o}){const s=t??n;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof s=="number";let u=r[s];const f=Object.assign({},o,{strict:!0,parent:r,value:u,originalValue:a[s],key:void 0,[c?"index":"key"]:s,path:c||s.includes(".")?`${i||""}[${c?s:`"${s}"`}]`:(i?`${i}.`:"")+t});return(m,h,g)=>this.resolve(f)._validate(u,f,h,g)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),a=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,n,(c,u)=>{Xe.isError(c)&&(c.value=u),s(c)},(c,u)=>{c.length?s(new Xe(c,u,void 0,void 0,a)):o(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),a,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(s,c)=>{throw Xe.isError(s)&&(s.value=c),s},(s,c)=>{if(s.length)throw new Xe(s,t,void 0,void 0,o);a=c}),a}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Xe.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Xe.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Rn(n)}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,n){const r=this.clone({nullable:t});return r.internalTests.nullable=An({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=An({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=wt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=wt.notNull){return this.nullability(!1,t)}required(t=wt.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=wt.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=An(n),a=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=fl(t).map(a=>new tn(a));return i.forEach(a=>{a.isSibling&&r.deps.push(a.key)}),r.conditions.push(typeof n=="function"?new Hr(i,n):Hr.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=An({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=wt.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=An({message:n,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}})}}),r}notOneOf(t,n=wt.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=An({message:n,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}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:a,nullable:o}=n.spec;return{meta:i,label:r,optional:a,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,u,f)=>f.findIndex(m=>m.name===c.name)===u)}}}st.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])st.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:a,schema:o}=Wf(this,t,n,r.context);return o[e](i&&i[a],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])st.prototype[e]=st.prototype.oneOf;for(const e of["not","nope"])st.prototype[e]=st.prototype.notOneOf;const Uf=()=>!0;function gl(e){return new yl(e)}class yl extends st{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Uf},t))}}gl.prototype=yl.prototype;function vl(){return new bl}class bl extends st{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=Xi.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return yt(n)||n===!0}})}isFalse(t=Xi.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return yt(n)||n===!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)}}vl.prototype=bl.prototype;const Hf=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Yf(e){const t=Ji(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 n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function Ji(e){var t,n;const r=Hf.exec(e);return r?{year:$t(r[1]),month:$t(r[2],1)-1,day:$t(r[3],1),hour:$t(r[4]),minute:$t(r[5]),second:$t(r[6]),millisecond:r[7]?$t(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:$t(r[10]),minuteOffset:$t(r[11])}:null}function $t(e,t=0){return Number(e)||t}let Kf=/^[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])?)*$/,Qf=/^((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,Gf=/^(?:[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,Zf="^\\d{4}-\\d{2}-\\d{2}",Xf="\\d{2}:\\d{2}:\\d{2}",Jf="(([+-]\\d{2}(:?\\d{2})?)|Z)",eh=new RegExp(`${Zf}T${Xf}(\\.\\d+)?${Jf}$`),th=e=>yt(e)||e===e.trim(),nh={}.toString();function tr(){return new wl}class wl extends st{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===nh?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||wt.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Qe.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Qe.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Qe.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,a;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:a}=n:i=n),this.test({name:a||"matches",message:i||Qe.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=Qe.email){return this.matches(Kf,{name:"email",message:t,excludeEmptyString:!0})}url(t=Qe.url){return this.matches(Qf,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Qe.uuid){return this.matches(Gf,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(eh,{name:"datetime",message:n||Qe.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Qe.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:a=>{if(!a||r)return!0;const o=Ji(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||Qe.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=Ji(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Qe.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:th})}lowercase(t=Qe.lowercase){return this.transform(n=>yt(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>yt(n)||n===n.toLowerCase()})}uppercase(t=Qe.uppercase){return this.transform(n=>yt(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>yt(n)||n===n.toUpperCase()})}}tr.prototype=wl.prototype;let rh=e=>e!=+e;function Sl(){return new Cl}class Cl extends st{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!rh(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return r.isType(i)||i===null?i:parseFloat(i)})})}min(t,n=zt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=zt.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=zt.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=zt.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>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:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>yt(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(i=>yt(i)?i:Math[t](i))}}Sl.prototype=Cl.prototype;let Tl=new Date(""),ih=e=>Object.prototype.toString.call(e)==="[object Date]";function Fa(){return new xr}class xr extends st{constructor(){super({type:"date",check(t){return ih(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=Yf(t),isNaN(t)?xr.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(tn.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=Zi.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=Zi.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}xr.INVALID_DATE=Tl;Fa.prototype=xr.prototype;Fa.INVALID_DATE=Tl;function ah(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let c=gn.split(o)[0];r.add(c),i.has(`${s}-${c}`)||n.push([s,c])}for(const o of Object.keys(e)){let s=e[o];r.add(o),tn.isRef(s)&&s.isSibling?a(s.path,o):Oa(s)&&"deps"in s&&s.deps.forEach(c=>a(c,o))}return _f.array(Array.from(r),n).reverse()}function Vo(e,t){let n=1/0;return e.some((r,i)=>{var a;if((a=t.path)!=null&&a.includes(r))return n=i,!0}),n}function El(e){return(t,n)=>Vo(e,t)-Vo(e,n)}const oh=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function Pr(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Pr(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Pr(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Pr)}):"optional"in e?e.optional():e}const sh=(e,t)=>{const n=[...gn.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=gn.getter(gn.join(n),!0)(e);return!!(i&&r in i)};let qo=e=>Object.prototype.toString.call(e)==="[object Object]";function Wo(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const lh=El([]);function jl(e){return new kl(e)}class kl extends st{constructor(t){super({type:"object",check(n){return qo(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=lh,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let a=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(m=>!this._nodes.includes(m))),c={},u=Object.assign({},n,{parent:c,__validating:n.__validating||!1}),f=!1;for(const m of s){let h=a[m],g=m in i;if(h){let w,d=i[m];u.path=(n.path?`${n.path}.`:"")+m,h=h.resolve({value:d,context:n.context,parent:c});let E=h instanceof st?h.spec:void 0,y=E==null?void 0:E.strict;if(E!=null&&E.strip){f=f||m in i;continue}w=!n.__validating||!y?h.cast(i[m],u):i[m],w!==void 0&&(c[m]=w)}else g&&!o&&(c[m]=i[m]);(g!==m in c||c[m]!==i[m])&&(f=!0)}return f?c:i}_validate(t,n={},r,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:o},...a],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(c,u)=>{if(!s||!qo(u)){i(c,u);return}o=o||u;let f=[];for(let m of this._nodes){let h=this.fields[m];!h||tn.isRef(h)||f.push(h.asNestedTest({options:n,key:m,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:n},r,m=>{i(m.sort(this._sortErrors).concat(c),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,a]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?a:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const a=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=a&&"getDefault"in a?a.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=ah(t,n),r._sortErrors=El(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return Pr(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=gn.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return sh(a,t)&&(o=Object.assign({},a),r||delete o[t],o[n]=i(a)),o})}json(){return this.transform(oh)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Rr.exact,test(n){if(n==null)return!0;const r=Wo(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Rr.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const a=Wo(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Rr.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(ji.camelCase)}snakeCase(){return this.transformKeys(ji.snakeCase)}constantCase(){return this.transformKeys(t=>ji.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[a,o]of Object.entries(n.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),r.fields[a]=o.describe(s)}return r}}jl.prototype=kl.prototype;const Ol=e=>{const t={};return e.forEach(n=>{var o,s,c;let r;switch(n.type){case"text":case"textarea":case"tel":r=tr(),n.validation?r=nn(r,n,"string"):(n.minLength&&(r=r.min(n.minLength,`${n.label} must be at least ${n.minLength} characters`)),n.maxLength&&(r=r.max(n.maxLength,`${n.label} must be at most ${n.maxLength} characters`)),n.pattern&&(r=r.test("pattern",`${n.label} format is invalid`,u=>u?new RegExp(n.pattern).test(u):!0)));break;case"email":r=tr().email(((o=n.validation)==null?void 0:o.message)||`${n.label} must be a valid email address`),n.validation&&(r=nn(r,n,"string"));break;case"password":r=tr(),n.validation?r=nn(r,n,"string"):(n.minLength&&(r=r.min(n.minLength,`${n.label} must be at least ${n.minLength} characters`)),n.maxLength&&(r=r.max(n.maxLength,`${n.label} must be at most ${n.maxLength} characters`)),n.pattern&&(r=r.test("pattern",`${n.label} format is invalid`,u=>u?new RegExp(n.pattern).test(u):!0)));break;case"number":if(r=Sl().transform((u,f)=>f===""||f===null?void 0:u).nullable().typeError(`${n.label} must be a number`),n.validation)r=nn(r,n,"number");else{if(n.min!==void 0){const u=typeof n.min=="object"&&n.min!==null&&"field"in n.min,f=u?Yr(n.min.field):n.min,m=u&&n.min.message?n.min.message:`${n.label} must be at least ${u?"the minimum value":n.min}`;r=r.min(f,m)}if(n.max!==void 0){const u=typeof n.max=="object"&&n.max!==null&&"field"in n.max,f=u?Yr(n.max.field):n.max,m=u&&n.max.message?n.max.message:`${n.label} must be at most ${u?"the maximum value":n.max}`;r=r.max(f,m)}}break;case"select":r=tr(),n.validation&&(r=nn(r,n,"string"));break;case"checkbox":r=vl(),n.validation&&(r=nn(r,n,"boolean"));break;case"date":r=Fa().typeError(`${n.label} must be a valid date`),n.validation?r=nn(r,n,"date"):(n.minDate&&(r=r.min(new Date(n.minDate),`${n.label} must be after ${n.minDate}`)),n.maxDate&&(r=r.max(new Date(n.maxDate),`${n.label} must be before ${n.maxDate}`)));break;default:r=gl()}const i=((s=n.validation)==null?void 0:s.required)!==void 0?n.validation.required:n.required;if(typeof i=="function"?!1:!!i){const u=((c=n.validation)==null?void 0:c.message)||`${n.label} is required`;r=r.required(u)}t[n.name]=r}),jl().shape(t)},nn=(e,t,n,r)=>{const i=t.validation;if(!i)return e;if(n==="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(n==="number"){if(i.min!==void 0)if(typeof i.min=="object"&&"field"in i.min){const a=Yr(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=Yr(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},Fl=({currentStep:e,totalSteps:t,onStepChange:n,stepTitles:r=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const o=I.useMemo(()=>Array.from({length:t},(f,m)=>m+1),[t]),s=I.useMemo(()=>Math.round(e/t*100),[e,t]),c=f=>r[f-1]||`Step ${f}`,u=f=>f===e||a.includes(f)||f===e+1&&a.includes(e);return l.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:o.map((f,m)=>{const h=f===e,g=f<e||a.includes(f),w=h||g?"primary.main":"#8F97A4";return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[l.jsxs(x.Box,{onClick:()=>u(f)&&n(f),sx:{display:"flex",alignItems:"center",cursor:u(f)?"pointer":"default"},children:[l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:h||g?"2px solid":"1px solid",borderColor:h||g?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:d=>h||g?ot(d.palette.primary.main,.2):"transparent",mr:.5,color:w,fontWeight:h||g?600:500,fontSize:"12px"},children:f}),i&&l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:w},children:c(f)})]}),m<o.length-1&&l.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:f<e?"primary.main":"#DFE3E8"}})]},f)})}),l.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${s}% complete`})]}),l.jsx(x.LinearProgress,{variant:"determinate",value:s,sx:{height:4,borderRadius:"50px",backgroundColor:f=>f.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Al=({buttons:e,disabled:t=!1,testIdPrefix:n})=>{const r=c=>{c.onClick&&c.onClick()},i=e.filter(c=>c.position==="left"||!c.position),a=e.filter(c=>c.position==="center"),o=e.filter(c=>c.position==="right"),s=(c,u)=>{const f=(c.text||"").toLowerCase(),m=c.type==="submit"||f.includes("submit")||f.includes("save")||f.includes("next"),h=c.position==="left"||f.includes("cancel")||f.includes("back")||f.includes("draft"),g=c.type?c.type:m?"submit":"button",w=h?"outlined":"contained",d=c.disabled||t,E=f.includes("cancel")||f.includes("back"),y=n?m?`${n}-submit`:E?`${n}-cancel`:void 0:void 0,j=k=>k&&["primary","secondary","error","info","success","warning"].includes(k)?k:"primary";return l.jsxs(x.Button,{type:g,variant:w,color:j(c.color),size:c.size||"large",disabled:d,onClick:c.onClick?()=>r(c):void 0,"data-testid":y,sx:c.sx,children:[c.loading&&l.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),c.text]},`${c.text}-${u}`)};return l.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((c,u)=>s(c,u))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((c,u)=>s(c,u))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:o.map((c,u)=>s(c,u))})]})},ch=({config:e,onSubmit:t,onStepChange:n,currentStep:r=1,totalSteps:i=1,isMultiStep:a=!1,formData:o})=>{const{buttons:s,position:c="right",layout:u="horizontal",spacing:f=2,sx:m}=e,h=y=>{let j="button",k="contained";return y.type?j=y.type:y.text.toLowerCase().includes("submit")||y.text.toLowerCase().includes("save")||y.text.toLowerCase().includes("next")?j="submit":(y.text.toLowerCase().includes("reset")||y.text.toLowerCase().includes("clear"))&&(j="reset"),(y.text.toLowerCase().includes("cancel")||y.text.toLowerCase().includes("back")||y.text.toLowerCase().includes("draft"))&&(k="outlined"),{buttonType:j,buttonVariant:k}},g=y=>["primary","secondary","error","warning","info","success"].includes(y||"")?y:"primary",w=y=>{const{buttonType:j}=h(y);y.onClick?y.onClick():j==="submit"&&t?t(o):a&&n&&(y.text.toLowerCase().includes("next")?n(r+1,i):(y.text.toLowerCase().includes("back")||y.text.toLowerCase().includes("previous"))&&n(r-1,i))},d=(y,j)=>{const{buttonType:k,buttonVariant:v}=h(y),S=g(y.color);return l.jsx(x.Button,{type:k,variant:v,color:S,size:y.size||"medium",disabled:y.disabled,onClick:()=>w(y),sx:y.sx,children:y.text},j)},E=()=>{const y={display:"flex",gap:f,...m};switch(c){case"left":return{...y,justifyContent:"flex-start"};case"center":return{...y,justifyContent:"center"};case"right":return{...y,justifyContent:"flex-end"};case"space-between":return{...y,justifyContent:"space-between"};default:return{...y,justifyContent:"flex-end"}}};return u==="vertical"?l.jsx(x.Box,{sx:E(),children:s.map((y,j)=>l.jsx(x.Box,{sx:{width:"100%"},children:d(y,j)},j))}):l.jsx(x.Box,{sx:E(),children:l.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:s.map((y,j)=>d(y,j))})})},$l=(e,t)=>{const n=e==null?void 0:e.showWhen;if(n){if(typeof n=="function")try{return!!n(t||{})}catch{return!0}if(n&&typeof n=="object"){const r=n.field,i=n.equals,a=n.in,o=r?(t||{})[r]:void 0;if(r&&typeof i<"u")return o===i;if(r&&Array.isArray(a))return a.includes(o)}}return!0},_r=(e,t)=>{const n=[];for(const r of e)if($l(r,t)&&(n.push(r),r.type==="tabs"&&r.items)){const i=r.items||[],a=(t||{})[r.name],o=(()=>{if(typeof a=="string"||typeof a=="number"){const c=i.findIndex((u,f)=>typeof u.value=="string"||typeof u.value=="number"?u.value===a:f===a);return c>=0?c:0}return Number(a)||0})(),s=i[o]||{};Array.isArray(s.fields)&&n.push(..._r(s.fields,t))}return n},uh=new hc({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),ph=e=>l.jsx(vc,{client:uh,children:l.jsx(dh,{...e})}),dh=({id:e,theme:t,fields:n,onSubmit:r,onChange:i,submitButtonText:a="Submit",onSubmitClick:o,defaultValues:s,showSubmitButton:c=!0,buttons:u,buttonGroup:f,stickyButtons:m,stickyButtonsSx:h,fixedButtons:g,fixedButtonsSx:w,formCardWrap:d,formCardSx:E,formCardProps:y,baseUrl:j,apiHeaders:k,stepNavigationProps:v,testIdPrefix:S,dateFormat:_})=>{var le,ct;const M=[...new Set(n.map(O=>O.step).filter(O=>O!=null&&O>0))].sort((O,F)=>(O||0)-(F||0)),B=M.length>1,q=M.length||1,[p,R]=I.useState(1),$=B?n.filter(O=>O.step===p):n,G=I.useCallback(O=>{const F=[];for(const A of O)if(F.push(A),A.type==="tabs"&&A.items)for(const W of A.items||[])Array.isArray(W.fields)&&F.push(...G(W.fields));return F},[]),{control:N,handleSubmit:re,formState:{errors:V},watch:K,setValue:te,resetField:oe,trigger:T}=Ee.useForm({resolver:I.useCallback((O,F,A)=>{const Z=_r(B?$:n,O),ce=Ol(Z);return Gl(ce)(O,F,A)},[B,$,n]),mode:"onChange",defaultValues:s}),D=K(),ee=I.useRef({});I.useEffect(()=>{const O=[];for(const F of n){const A=F.depends_on;A&&typeof F.name=="string"&&O.push({dependentField:F.name,dependencyName:A})}if(O.length!==0)for(const{dependentField:F,dependencyName:A}of O){const W=ee.current[A],Z=D==null?void 0:D[A];if(W!==Z)try{oe(F)}catch{}ee.current[A]=Z}},[n,D,oe]);const se=I.useRef(i);I.useEffect(()=>{se.current=i},[i]);const ie=I.useMemo(()=>{try{return JSON.stringify(D)}catch{return String(Date.now())}},[D]),pe=I.useRef(null);I.useEffect(()=>{se.current&&pe.current!==ie&&(pe.current=ie,se.current(D))},[ie]);const U=async()=>{if(!B)return!0;const O=n.filter(A=>A.step===p);for(const A of O)if(typeof A.required=="function"?!!A.required(D):!!A.required){const Z=D[A.name];let ce=!0;if(A.type==="checkbox"?ce=Z===!0:Array.isArray(Z)?ce=Z.length>0:ce=Z!=null&&Z!=="",!ce)return!1}return await T()?!0:Object.keys(V).filter(W=>O.some(Z=>Z.name===W)).map(W=>{const Z=V[W];return typeof(Z==null?void 0:Z.message)=="string"?Z.message:`${W} is invalid`}).length===0},ne=I.useMemo(()=>{if(!B)return!0;const O=n.filter(A=>A.step===p);for(const A of O)if(typeof A.required=="function"?!!A.required(D):!!A.required){const Z=D[A.name];let ce=!0;if(A.type==="checkbox"?ce=Z===!0:Array.isArray(Z)?ce=Z.length>0:ce=Z!=null&&Z!=="",!ce)return!1}return Object.keys(V).filter(A=>O.some(W=>W.name===A)).length===0},[B,p,n,D,V]),de=I.useCallback((O,F)=>$l(O,F),[]),me=I.useCallback(O=>{const F=[];for(const A of O)if(F.push(A),A.type==="tabs"&&A.items)for(const W of A.items||[])Array.isArray(W.fields)&&F.push(...me(W.fields));return F},[]),L=I.useCallback((O,F)=>_r(O,F),[]),Y=I.useMemo(()=>{if(B)return ne;const O=_r(n,D);for(const W of O){if(!de(W,D))continue;if(typeof W.required=="function"?!!W.required(D):!!W.required){const ce=D[W.name];let fe=!0;if(W.type==="checkbox"?fe=ce===!0:fe=ce!=null&&ce!==""&&!(Array.isArray(ce)&&ce.length===0),!fe)return!1}}const F=new Set(O.map(W=>W.name));return Object.keys(V).filter(W=>F.has(W)).length===0},[B,ne,n,D,V,L,de]),z=async O=>{O<1||O>q||O>p&&B&&!await U()||R(O)},xe=async O=>{if(B&&p<q){console.warn("Form submission attempted on non-final step");return}const A=(W=>{const Z={...W||{}},ce=me(n);for(const fe of ce){if(!fe||!fe.name)continue;const H=Z[fe.name];if(fe.type==="dragdroplist"&&Array.isArray(H)){const Q=fe,ge=Q.serialize;if(!ge)continue;const Fe=H,Ae=typeof Q.getId=="function"?Q.getId:typeof Q.getId=="string"?ae=>ae==null?void 0:ae[Q.getId]:ae=>(ae==null?void 0:ae.id)??(ae==null?void 0:ae._id)??(ae==null?void 0:ae.key)??String(ae),qe=typeof Q.getText=="function"?Q.getText:typeof Q.getText=="string"?ae=>(ae==null?void 0:ae[Q.getText])??String(ae):ae=>(ae==null?void 0:ae.text)??(ae==null?void 0:ae.label)??(ae==null?void 0:ae.name)??(ae==null?void 0:ae.title)??String(ae),Me=(()=>{if(typeof Q.chipText=="function")return Q.chipText;if(typeof Q.chipText=="string")return(ae,tt)=>ae==null?void 0:ae[Q.chipText]})();let Ke=H;typeof ge=="function"?Ke=Fe.map((ae,tt)=>ge(ae,tt)):ge==="ids"?Ke=Fe.map(ae=>Ae(ae)):ge==="text"?Ke=Fe.map(ae=>qe(ae)):ge==="chips"?Ke=Fe.map((ae,tt)=>(typeof Me=="function"?Me(ae,tt):void 0)??""):ge&&typeof ge=="object"&&"field"in ge&&(Ke=Fe.map(ae=>ae==null?void 0:ae[ge.field])),Z[fe.name]=Ke}}return Z})(O);o&&o(A),r(A)},je=async O=>{O&&(O.preventDefault(),O.stopPropagation()),B&&p<q&&await U()&&z(p+1)},Ve=O=>{O&&(O.preventDefault(),O.stopPropagation()),B&&p>1&&z(p-1)},jt=O=>{const F=O.col??12,A=O.xs!==void 0?O.xs:12,W=O.sm!==void 0?O.sm:F,Z=O.md!==void 0?O.md:F,ce=O.lg!==void 0?O.lg:Z,fe=O.xl!==void 0?O.xl:ce;return{xs:A,sm:W,md:Z,lg:ce,xl:fe}},Be=t?x.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:((le=t.typography)==null?void 0:le.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((ct=t.typography)==null?void 0:ct.fontSize)=="number"?t.typography.fontSize:14}}):void 0,Ye=()=>{const O=g?{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)",...w}:m?{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)",...h}:void 0;if(f&&f.buttons&&f.buttons.length>0){const F={...f,buttons:f.buttons.map(A=>{const W=(A.text||"").toLowerCase(),Z=A.type==="submit"||W.includes("submit")||W.includes("save")||W.includes("finish")||W.includes("complete"),ce=W.includes("next");let fe=!1;return B?(Z||ce)&&(fe=!ne):Z&&(fe=!Y),{...A,disabled:A.disabled||fe}})};return l.jsx(x.Box,{sx:{mt:3,...O||{}},children:l.jsx(ch,{config:F,onSubmit:xe,onStepChange:z,currentStep:p,totalSteps:q,isMultiStep:B,formData:D})})}if(u&&u.length>0){const F=u.map(A=>{const W=(A.text||"").toLowerCase(),Z=A.type==="submit"||W.includes("submit")||W.includes("save")||W.includes("finish")||W.includes("complete"),ce=W.includes("next");let fe=!1;return B?(Z||ce)&&(fe=!ne):Z&&(fe=!Y),{...A,disabled:A.disabled||fe}});return l.jsx(x.Box,{sx:O,children:l.jsx(Al,{buttons:F,testIdPrefix:S})})}return c?l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end",...O||{}},children:l.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[B&&p>1&&l.jsx(x.Button,{type:"button",variant:"outlined",onClick:Ve,children:"Previous"}),B?p<q?l.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!ne,onClick:je,children:"Next"}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!ne,children:a}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!Y,"data-testid":S?`${S}-submit`:void 0,children:a})]})}):null},mt=I.useMemo(()=>{const O=[];let F=[];for(const A of $)A.type==="section"&&F.length>0?(O.push(F),F=[A]):F.push(A);return F.length>0&&O.push(F),O},[$]),et=l.jsxs(x.Box,{component:"form",onSubmit:O=>{if(B&&p<q){O.preventDefault(),O.stopPropagation(),ne&&je();return}re(xe)(O)},id:e,onKeyDown:O=>{O.key==="Enter"&&B&&p<q&&(O.preventDefault(),ne&&je())},sx:{pb:g?10:void 0},children:[B&&l.jsx(Fl,{currentStep:p,totalSteps:q,onStepChange:z,stepTitles:v==null?void 0:v.stepTitles,showStepTitles:(v==null?void 0:v.showStepTitles)!==!1}),mt.map((O,F)=>{const A=O.find(H=>H.type==="section");if(A&&!de(A,D))return null;const W=(A==null?void 0:A.cardWrap)!==!1,Z={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},ce={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},fe=l.jsx(l.Fragment,{children:O.map(H=>{if(!de(H,D))return null;const Q=jt(H);return l.jsx(x.Box,{sx:{gridColumn:{xs:`span ${Q.xs}`,sm:`span ${Q.sm}`,md:`span ${Q.md}`,lg:`span ${Q.lg}`,xl:`span ${Q.xl}`}},children:l.jsx(ka,{field:H,control:N,errors:V,baseUrl:j,apiHeaders:k,formData:D,setValue:te,testIdPrefix:S,dateFormat:_})},H.name)})});return W?l.jsx(x.Card,{sx:{...Z,...(A==null?void 0:A.cardSx)||{}},...(A==null?void 0:A.cardProps)||{},children:fe},`group-${F}`):l.jsx(x.Box,{sx:ce,children:fe},`group-${F}`)}),Ye()]}),kt=d?l.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...E},...y,children:et}):et;return Be?l.jsx(x.ThemeProvider,{theme:Be,children:kt}):kt},fh=({src:e,alt:t,width:n="100%",height:r="auto",style:i,className:a,onClick:o})=>l.jsx(x.Box,{sx:{textAlign:"center"},children:l.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:n,height:r,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 Sn(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(f){try{u(r.next(f))}catch(m){o(m)}}function c(f){try{u(r.throw(f))}catch(m){o(m)}}function u(f){f.done?a(f.value):i(f.value).then(s,c)}u((r=r.apply(e,t||[])).next())})}const hh=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 Yn(e,t,n){const r=mh(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&Uo(r,"path",a),Uo(r,"relativePath",a),r}function mh(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=hh.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Uo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const xh=[".DS_Store","Thumbs.db"];function gh(e){return Sn(this,void 0,void 0,function*(){return Qr(e)&&yh(e.dataTransfer)?Sh(e.dataTransfer,e.type):vh(e)?bh(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?wh(e):[]})}function yh(e){return Qr(e)}function vh(e){return Qr(e)&&Qr(e.target)}function Qr(e){return typeof e=="object"&&e!==null}function bh(e){return ea(e.target.files).map(t=>Yn(t))}function wh(e){return Sn(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Yn(n))})}function Sh(e,t){return Sn(this,void 0,void 0,function*(){if(e.items){const n=ea(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(Ch));return Ho(Rl(r))}return Ho(ea(e.files).map(n=>Yn(n)))})}function Ho(e){return e.filter(t=>xh.indexOf(t.name)===-1)}function ea(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function Ch(e){if(typeof e.webkitGetAsEntry!="function")return Yo(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Pl(t):Yo(e,t)}function Rl(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Rl(n):[n]],[])}function Yo(e,t){return Sn(this,void 0,void 0,function*(){var n;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,Yn(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Yn(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function Th(e){return Sn(this,void 0,void 0,function*(){return e.isDirectory?Pl(e):Eh(e)})}function Pl(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function a(){t.readEntries(o=>Sn(this,void 0,void 0,function*(){if(o.length){const s=Promise.all(o.map(Th));i.push(s),a()}else try{const s=yield Promise.all(i);n(s)}catch(s){r(s)}}),o=>{r(o)})}a()})}function Eh(e){return Sn(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=Yn(r,e.fullPath);t(i)},r=>{n(r)})})})}var jr={},Ko;function jh(){return Ko||(Ko=1,jr.__esModule=!0,jr.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}),jr}var kh=jh();const ki=la(kh);function Qo(e){return Ah(e)||Fh(e)||Dl(e)||Oh()}function Oh(){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 Fh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ah(e){if(Array.isArray(e))return ta(e)}function Go(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Go(Object(n),!0).forEach(function(r){_l(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Go(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function or(e,t){return Ph(e)||Rh(e,t)||Dl(e,t)||$h()}function $h(){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 Dl(e,t){if(e){if(typeof e=="string")return ta(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ta(e,t)}}function ta(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rh(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Ph(e){if(Array.isArray(e))return e}var _h=typeof ki=="function"?ki:ki.default,Dh="file-invalid-type",Ih="file-too-large",Mh="file-too-small",zh="too-many-files",Bh=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:Dh,message:"File type must be ".concat(r)}},Xo=function(t){return{code:Ih,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Jo=function(t){return{code:Mh,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Nh={code:zh,message:"Too many files"};function Il(e,t){var n=e.type==="application/x-moz-file"||_h(e,t);return[n,n?null:Bh(t)]}function Ml(e,t,n){if(an(e.size))if(an(t)&&an(n)){if(e.size>n)return[!1,Xo(n)];if(e.size<t)return[!1,Jo(t)]}else{if(an(t)&&e.size<t)return[!1,Jo(t)];if(an(n)&&e.size>n)return[!1,Xo(n)]}return[!0,null]}function an(e){return e!=null}function Lh(e){var t=e.files,n=e.accept,r=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 u=Il(c,n),f=or(u,1),m=f[0],h=Ml(c,r,i),g=or(h,1),w=g[0],d=s?s(c):null;return m&&w&&!d})}function Gr(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function kr(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 es(e){e.preventDefault()}function Vh(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function qh(e){return e.indexOf("Edge/")!==-1}function Wh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Vh(e)||qh(e)}function bt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){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!Gr(r)&&s&&s.apply(void 0,[r].concat(a)),Gr(r)})}}function Uh(){return"showOpenFilePicker"in window}function Hh(e){if(an(e)){var t=Object.entries(e).filter(function(n){var r=or(n,2),i=r[0],a=r[1],o=!0;return zl(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(Bl))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=or(r,2),a=i[0],o=i[1];return Zo(Zo({},n),{},_l({},a,o))},{});return[{description:"Files",accept:t}]}return e}function Yh(e){if(an(e))return Object.entries(e).reduce(function(t,n){var r=or(n,2),i=r[0],a=r[1];return[].concat(Qo(t),[i],Qo(a))},[]).filter(function(t){return zl(t)||Bl(t)}).join(",")}function Kh(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Qh(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function zl(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Bl(e){return/^.*\.[\w]+$/.test(e)}var Gh=["children"],Zh=["open"],Xh=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Jh=["refKey","onChange","onClick"];function em(e){return rm(e)||nm(e)||Nl(e)||tm()}function tm(){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 nm(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rm(e){if(Array.isArray(e))return na(e)}function Oi(e,t){return om(e)||am(e,t)||Nl(e,t)||im()}function im(){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 Nl(e,t){if(e){if(typeof e=="string")return na(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return na(e,t)}}function na(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function am(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function om(e){if(Array.isArray(e))return e}function ts(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ts(Object(n),!0).forEach(function(r){ra(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ts(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ra(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zr(e,t){if(e==null)return{};var n=sm(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sm(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Aa=I.forwardRef(function(e,t){var n=e.children,r=Zr(e,Gh),i=Vl(r),a=i.open,o=Zr(i,Zh);return I.useImperativeHandle(t,function(){return{open:a}},[a]),I.createElement(I.Fragment,null,n(Re(Re({},o),{},{open:a})))});Aa.displayName="Dropzone";var Ll={disabled:!1,getFilesFromEvent:gh,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};Aa.defaultProps=Ll;Aa.propTypes={children:b.func,accept:b.objectOf(b.arrayOf(b.string)),multiple:b.bool,preventDropOnDocument:b.bool,noClick:b.bool,noKeyboard:b.bool,noDrag:b.bool,noDragEventsBubbling:b.bool,minSize:b.number,maxSize:b.number,maxFiles:b.number,disabled:b.bool,getFilesFromEvent:b.func,onFileDialogCancel:b.func,onFileDialogOpen:b.func,useFsAccessApi:b.bool,autoFocus:b.bool,onDragEnter:b.func,onDragLeave:b.func,onDragOver:b.func,onDrop:b.func,onDropAccepted:b.func,onDropRejected:b.func,onError:b.func,validator:b.func};var ia={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Vl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Re(Re({},Ll),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,c=t.maxFiles,u=t.onDragEnter,f=t.onDragLeave,m=t.onDragOver,h=t.onDrop,g=t.onDropAccepted,w=t.onDropRejected,d=t.onFileDialogCancel,E=t.onFileDialogOpen,y=t.useFsAccessApi,j=t.autoFocus,k=t.preventDropOnDocument,v=t.noClick,S=t.noKeyboard,_=t.noDrag,M=t.noDragEventsBubbling,B=t.onError,q=t.validator,p=I.useMemo(function(){return Yh(n)},[n]),R=I.useMemo(function(){return Hh(n)},[n]),$=I.useMemo(function(){return typeof E=="function"?E:ns},[E]),G=I.useMemo(function(){return typeof d=="function"?d:ns},[d]),N=I.useRef(null),re=I.useRef(null),V=I.useReducer(lm,ia),K=Oi(V,2),te=K[0],oe=K[1],T=te.isFocused,D=te.isFileDialogActive,ee=I.useRef(typeof window<"u"&&window.isSecureContext&&y&&Uh()),se=function(){!ee.current&&D&&setTimeout(function(){if(re.current){var F=re.current.files;F.length||(oe({type:"closeDialog"}),G())}},300)};I.useEffect(function(){return window.addEventListener("focus",se,!1),function(){window.removeEventListener("focus",se,!1)}},[re,D,G,ee]);var ie=I.useRef([]),pe=function(F){N.current&&N.current.contains(F.target)||(F.preventDefault(),ie.current=[])};I.useEffect(function(){return k&&(document.addEventListener("dragover",es,!1),document.addEventListener("drop",pe,!1)),function(){k&&(document.removeEventListener("dragover",es),document.removeEventListener("drop",pe))}},[N,k]),I.useEffect(function(){return!r&&j&&N.current&&N.current.focus(),function(){}},[N,j,r]);var U=I.useCallback(function(O){B?B(O):console.error(O)},[B]),ne=I.useCallback(function(O){O.preventDefault(),O.persist(),et(O),ie.current=[].concat(em(ie.current),[O.target]),kr(O)&&Promise.resolve(i(O)).then(function(F){if(!(Gr(O)&&!M)){var A=F.length,W=A>0&&Lh({files:F,accept:p,minSize:o,maxSize:a,multiple:s,maxFiles:c,validator:q}),Z=A>0&&!W;oe({isDragAccept:W,isDragReject:Z,isDragActive:!0,type:"setDraggedFiles"}),u&&u(O)}}).catch(function(F){return U(F)})},[i,u,U,M,p,o,a,s,c,q]),de=I.useCallback(function(O){O.preventDefault(),O.persist(),et(O);var F=kr(O);if(F&&O.dataTransfer)try{O.dataTransfer.dropEffect="copy"}catch{}return F&&m&&m(O),!1},[m,M]),me=I.useCallback(function(O){O.preventDefault(),O.persist(),et(O);var F=ie.current.filter(function(W){return N.current&&N.current.contains(W)}),A=F.indexOf(O.target);A!==-1&&F.splice(A,1),ie.current=F,!(F.length>0)&&(oe({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),kr(O)&&f&&f(O))},[N,f,M]),L=I.useCallback(function(O,F){var A=[],W=[];O.forEach(function(Z){var ce=Il(Z,p),fe=Oi(ce,2),H=fe[0],Q=fe[1],ge=Ml(Z,o,a),Fe=Oi(ge,2),Ae=Fe[0],qe=Fe[1],Me=q?q(Z):null;if(H&&Ae&&!Me)A.push(Z);else{var Ke=[Q,qe];Me&&(Ke=Ke.concat(Me)),W.push({file:Z,errors:Ke.filter(function(ae){return ae})})}}),(!s&&A.length>1||s&&c>=1&&A.length>c)&&(A.forEach(function(Z){W.push({file:Z,errors:[Nh]})}),A.splice(0)),oe({acceptedFiles:A,fileRejections:W,isDragReject:W.length>0,type:"setFiles"}),h&&h(A,W,F),W.length>0&&w&&w(W,F),A.length>0&&g&&g(A,F)},[oe,s,p,o,a,c,h,g,w,q]),Y=I.useCallback(function(O){O.preventDefault(),O.persist(),et(O),ie.current=[],kr(O)&&Promise.resolve(i(O)).then(function(F){Gr(O)&&!M||L(F,O)}).catch(function(F){return U(F)}),oe({type:"reset"})},[i,L,U,M]),z=I.useCallback(function(){if(ee.current){oe({type:"openDialog"}),$();var O={multiple:s,types:R};window.showOpenFilePicker(O).then(function(F){return i(F)}).then(function(F){L(F,null),oe({type:"closeDialog"})}).catch(function(F){Kh(F)?(G(F),oe({type:"closeDialog"})):Qh(F)?(ee.current=!1,re.current?(re.current.value=null,re.current.click()):U(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."))):U(F)});return}re.current&&(oe({type:"openDialog"}),$(),re.current.value=null,re.current.click())},[oe,$,G,y,L,U,R,s]),xe=I.useCallback(function(O){!N.current||!N.current.isEqualNode(O.target)||(O.key===" "||O.key==="Enter"||O.keyCode===32||O.keyCode===13)&&(O.preventDefault(),z())},[N,z]),je=I.useCallback(function(){oe({type:"focus"})},[]),Ve=I.useCallback(function(){oe({type:"blur"})},[]),jt=I.useCallback(function(){v||(Wh()?setTimeout(z,0):z())},[v,z]),Be=function(F){return r?null:F},Ye=function(F){return S?null:Be(F)},mt=function(F){return _?null:Be(F)},et=function(F){M&&F.stopPropagation()},kt=I.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=O.refKey,A=F===void 0?"ref":F,W=O.role,Z=O.onKeyDown,ce=O.onFocus,fe=O.onBlur,H=O.onClick,Q=O.onDragEnter,ge=O.onDragOver,Fe=O.onDragLeave,Ae=O.onDrop,qe=Zr(O,Xh);return Re(Re(ra({onKeyDown:Ye(bt(Z,xe)),onFocus:Ye(bt(ce,je)),onBlur:Ye(bt(fe,Ve)),onClick:Be(bt(H,jt)),onDragEnter:mt(bt(Q,ne)),onDragOver:mt(bt(ge,de)),onDragLeave:mt(bt(Fe,me)),onDrop:mt(bt(Ae,Y)),role:typeof W=="string"&&W!==""?W:"presentation"},A,N),!r&&!S?{tabIndex:0}:{}),qe)}},[N,xe,je,Ve,jt,ne,de,me,Y,S,_,r]),le=I.useCallback(function(O){O.stopPropagation()},[]),ct=I.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=O.refKey,A=F===void 0?"ref":F,W=O.onChange,Z=O.onClick,ce=Zr(O,Jh),fe=ra({accept:p,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:Be(bt(W,Y)),onClick:Be(bt(Z,le)),tabIndex:-1},A,re);return Re(Re({},fe),ce)}},[re,n,s,Y,r]);return Re(Re({},te),{},{isFocused:T&&!r,getRootProps:kt,getInputProps:ct,rootRef:N,inputRef:re,open:Be(z)})}function lm(e,t){switch(t.type){case"focus":return Re(Re({},e),{},{isFocused:!0});case"blur":return Re(Re({},e),{},{isFocused:!1});case"openDialog":return Re(Re({},ia),{},{isFileDialogActive:!0});case"closeDialog":return Re(Re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Re(Re({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Re(Re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Re({},ia);default:return e}}function ns(){}const cm=Je(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"),rs=Je(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"),um=Je(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"),ql=({file:e,onRemove:t})=>{const n=()=>e.file.type.startsWith("image/")?l.jsx(um,{}):e.file.type.includes("pdf")?l.jsx(rs,{}):l.jsx(rs,{}),r=()=>{switch(e.status){case"success":return l.jsx(cm,{color:"success"});case"uploading":return l.jsx(x.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(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[n(),r()]}),l.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[l.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),l.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),l.jsx(x.Tooltip,{title:"Remove file",children:l.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:l.jsx(ll,{})})})]})},pm=({config:e,value:t=[],onChange:n,onSubmit:r,disabled:i=!1,className:a,style:o,title:s,subtitle:c,buttonText:u,fileSupportedText:f})=>{const[m,h]=I.useState(t),[g,w]=I.useState([]),[d,E]=I.useState(!1),[y,j]=I.useState(!1),[k,v]=I.useState([]),S=I.useRef(null);I.useEffect(()=>{h(t)},[t]);const _=I.useCallback(N=>{var V,K;return((V=e==null?void 0:e.fileTypes)==null?void 0:V.some(te=>{if(te.includes("*")){const oe=te.split("/")[0];return N.type.startsWith(oe)}return N.type===te}))?e!=null&&e.maxSize&&N.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${N.type} is not allowed. Allowed types: ${(K=e==null?void 0:e.fileTypes)==null?void 0:K.join(", ")}`},[e]),M=I.useCallback(async N=>{console.log("handleFiles called with:",N.length,"files"),E(!0);const re=[],V=[];try{for(const te of N){let oe=null;if(e!=null&&e.multiple&&m.some(D=>D.file.name===te.name&&D.file.size===te.size&&D.file.lastModified===te.lastModified)){V.push(`${te.name}: File already exists`);continue}if(oe=_(te),!oe&&(e!=null&&e.customValidation))try{const T=e.customValidation(te);T instanceof Promise?oe=await T:oe=T}catch(T){oe=`Custom validation failed: ${T instanceof Error?T.message:"Unknown error"}`}if(oe)V.push(`${te.name}: ${oe}`);else{const T={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:te,preview:te.type.startsWith("image/")?URL.createObjectURL(te):void 0,progress:0,status:"pending",uploadedAt:new Date};re.push(T)}}const K=e!=null&&e.multiple?[...m,...re]:re;h(K),n==null||n(K),V.length>0?(v(V),w(V)):(v([]),w([]))}catch(K){const te=`Unexpected error: ${K instanceof Error?K.message:"Unknown error"}`;v([te]),w([te])}},[m,e==null?void 0:e.multiple,_,e==null?void 0:e.customValidation,n]),B=I.useCallback(N=>{E(!0);const re=m.filter(V=>V.id!==N);h(re),n==null||n(re),v([]),S.current&&(S.current.value="")},[m,n]),q=I.useCallback(()=>{if(e!=null&&e.required&&m.length===0){w([`${e.title} is required`]);return}v([]),j(!0);const N=m.filter(re=>re.status!=="error");r==null||r(N)},[m,r,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:p,getInputProps:R,isDragActive:$}=Vl({onDrop:M,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});I.useEffect(()=>{if(!d)return;const N=[],re=[...k,...N];re.length>0?w(re):w([])},[m,e==null?void 0:e.required,e==null?void 0:e.title,d,y,k]);const G=()=>{var N;switch(((N=e==null?void 0:e.submitButton)==null?void 0:N.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return l.jsxs(x.Box,{className:a,style:o,children:[l.jsxs(x.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(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),I.createElement(x.Card,{...p(),key:`dropzone-${m.length}`,sx:{border:"1px dashed",borderColor:$?"primary.main":"#CCCCCC",backgroundColor:$?"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",{...R(),ref:S}),l.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:l.jsx(qr,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:s}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:c}),l.jsx(x.Button,{onClick:()=>{var N;return(N=S.current)==null?void 0:N.click()},sx:{my:2},startIcon:l.jsx(qr,{}),variant:"contained",children:u}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:f})),g.length>0&&l.jsx(x.Alert,{severity:"error",sx:{mt:2},children:g.map((N,re)=>l.jsx(x.Typography,{variant:"body2",children:N},re))}),m.length>0&&l.jsxs(x.Box,{sx:{mt:2},children:[l.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",m.length,")"]}),m.map(N=>l.jsx(ql,{file:N,onRemove:B},N.id))]}),(e==null?void 0:e.helperText)&&l.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:G()},children:l.jsx(x.Button,{variant:"contained",onClick:q,disabled:i||e.submitButton.disabled||m.length===0,startIcon:e.submitButton.loading?l.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Al;exports.DEFAULT_DATE_FORMAT=Ur;exports.DocumentUpload=pm;exports.FINFLOW_FRONTEND_DEFAULT_PRIMARY=Xs;exports.FieldRenderer=ka;exports.FilePreview=ql;exports.FinAutocomplete=Js;exports.FinCheckbox=_t;exports.FinCheckboxGroup=el;exports.FinChip=Ea;exports.FinCustomizedVerticalStepper=Cf;exports.FinDateField=Ta;exports.FinDragDropList=il;exports.FinEditableGrid=ol;exports.FinForm=ph;exports.FinInfoCard=Ef;exports.FinListCards=sl;exports.FinPhaseCard=Of;exports.FinRadioGroup=sn;exports.FinSelect=ci;exports.FinSwitch=Wr;exports.FinTabs=al;exports.FinTextField=rt;exports.FinTextarea=tl;exports.FinUiHeader=nl;exports.FinVerticalStepper=wf;exports.ImageComponent=fh;exports.StepNavigation=Fl;exports.brand=xf;exports.buildFinformTestIds=cl;exports.createFinflowFrontendMirrorTheme=vf;exports.createNeutralToneScale=Zs;exports.dateFormatToPlaceholder=Ca;exports.fetchApiData=pl;exports.finflowPalette=he;exports.generateSchema=Ol;exports.getApiConfig=ja;exports.hasApiConfig=rn;exports.neutral=$r;exports.primary=hf;exports.resolveFieldTestIds=ul;exports.secondary=mf;exports.shouldShowField=Ff;exports.useApiData=dl;exports.useFinInputTokens=mr;
|