finform-react-builder 1.8.33 → 1.8.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +313 -309
- package/dist/index.js +11 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Mc=Object.defineProperty;var ps=e=>{throw TypeError(e)};var Ic=(e,t,r)=>t in e?Mc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ln=(e,t,r)=>Ic(e,typeof t!="symbol"?t+"":t,r),Ai=(e,t,r)=>t.has(e)||ps("Cannot "+r);var O=(e,t,r)=>(Ai(e,t,"read from private field"),r?r.call(e):t.get(e)),ye=(e,t,r)=>t.has(e)?ps("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),re=(e,t,r,n)=>(Ai(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ve=(e,t,r)=>(Ai(e,t,"access private method"),r);var _n=(e,t,r,n)=>({set _(i){re(e,t,i,r)},get _(){return O(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),$=require("react"),x=require("@mui/material"),zc=require("@emotion/styled"),Ar=require("@emotion/react");function Vc(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 ne=Vc($);var kn=e=>e.type==="checkbox",mr=e=>e instanceof Date,tt=e=>e==null;const Jo=e=>typeof e=="object";var We=e=>!tt(e)&&!Array.isArray(e)&&Jo(e)&&!mr(e),el=e=>We(e)&&e.target?kn(e.target)?e.target.checked:e.target.value:e,Bc=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,tl=(e,t)=>e.has(Bc(t)),Nc=e=>{const t=e.constructor&&e.constructor.prototype;return We(t)&&t.hasOwnProperty("isPrototypeOf")},Ma=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Me(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(!(Ma&&(e instanceof Blob||n))&&(r||We(e)))if(t=r?[]:{},!r&&!Nc(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Me(e[i]));else return e;return t}var mi=e=>/^\w*$/.test(e),Re=e=>e===void 0,yi=e=>Array.isArray(e)?e.filter(Boolean):[],Ia=e=>yi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Z=(e,t,r)=>{if(!t||!We(e))return r;const n=(mi(t)?[t]:Ia(t)).reduce((i,a)=>tt(i)?i:i[a],e);return Re(n)||n===e?Re(e[t])?r:e[t]:n},pt=e=>typeof e=="boolean",we=(e,t,r)=>{let n=-1;const i=mi(t)?[t]:Ia(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let l=r;if(n!==s){const d=e[o];l=We(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=l,e=e[o]}};const Qn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},wt={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"},rl=$.createContext(null);rl.displayName="HookFormContext";const gi=()=>$.useContext(rl);var nl=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const s=a;return t._proxyFormState[s]!==wt.all&&(t._proxyFormState[s]=!n||wt.all),r&&(r[s]=!0),e[s]}});return i};const xi=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function Lc(e){const t=gi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=$.useState(r._formState),l=$.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return xi(()=>r._subscribe({name:i,formState:l.current,exact:a,callback:d=>{!n&&o({...r._formState,...d})}}),[i,n,a]),$.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),$.useMemo(()=>nl(s,r,l.current,!1),[s,r])}var It=e=>typeof e=="string",il=(e,t,r,n,i)=>It(e)?(n&&t.watch.add(e),Z(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),Z(r,a))):(n&&(t.watchAll=!0),r);function al(e){const t=gi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=$.useRef(i),[l,d]=$.useState(r._getWatch(n,o.current));return xi(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:f=>!a&&d(il(n,r._names,f.values||r._formValues,!1,o.current))}),[n,r,a,s]),$.useEffect(()=>r._removeUnmounted()),l}function qc(e){const t=gi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=tl(i._names.array,r),o=al({control:i,name:r,defaultValue:Z(i._formValues,r,Z(i._defaultValues,r,e.defaultValue)),exact:!0}),l=Lc({control:i,name:r,exact:!0}),d=$.useRef(e),f=$.useRef(i.register(r,{...e.rules,value:o,...pt(e.disabled)?{disabled:e.disabled}:{}})),p=$.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Z(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!Z(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Z(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Z(l.validatingFields,r)},error:{enumerable:!0,get:()=>Z(l.errors,r)}}),[l,r]),m=$.useCallback(C=>f.current.onChange({target:{value:el(C),name:r},type:Qn.CHANGE}),[r]),y=$.useCallback(()=>f.current.onBlur({target:{value:Z(i._formValues,r),name:r},type:Qn.BLUR}),[r,i._formValues]),T=$.useCallback(C=>{const v=Z(i._fields,r);v&&C&&(v._f.ref={focus:()=>C.focus&&C.focus(),select:()=>C.select&&C.select(),setCustomValidity:S=>C.setCustomValidity(S),reportValidity:()=>C.reportValidity()})},[i._fields,r]),h=$.useMemo(()=>({name:r,value:o,...pt(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:m,onBlur:y,ref:T}),[r,n,l.disabled,m,y,T,o]);return $.useEffect(()=>{const C=i._options.shouldUnregister||a;i.register(r,{...d.current.rules,...pt(d.current.disabled)?{disabled:d.current.disabled}:{}});const v=(S,P)=>{const w=Z(i._fields,S);w&&w._f&&(w._f.mount=P)};if(v(r,!0),C){const S=Me(Z(i._options.defaultValues,r));we(i._defaultValues,r,S),Re(Z(i._formValues,r))&&we(i._formValues,r,S)}return!s&&i.register(r),()=>{(s?C&&!i._state.action:C)?i.unregister(r):v(r,!1)}},[r,i,s,a]),$.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),$.useMemo(()=>({field:h,formState:l,fieldState:p}),[h,l,p])}const Pe=e=>e.render(qc(e));var sl=(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],ds=()=>{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=[]}}},ra=e=>tt(e)||!Jo(e);function Yt(e,t){if(ra(e)||ra(t))return e===t;if(mr(e)&&mr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const s=t[i];if(mr(a)&&mr(s)||We(a)&&We(s)||Array.isArray(a)&&Array.isArray(s)?!Yt(a,s):a!==s)return!1}}return!0}var et=e=>We(e)&&!Object.keys(e).length,za=e=>e.type==="file",jt=e=>typeof e=="function",Yn=e=>{if(!Ma)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ol=e=>e.type==="select-multiple",Va=e=>e.type==="radio",Wc=e=>Va(e)||kn(e),_i=e=>Yn(e)&&e.isConnected;function Uc(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Re(e)?n++:e[t[n++]];return e}function Hc(e){for(const t in e)if(e.hasOwnProperty(t)&&!Re(e[t]))return!1;return!0}function Ke(e,t){const r=Array.isArray(t)?t:mi(t)?[t]:Ia(t),n=r.length===1?e:Uc(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(We(n)&&et(n)||Array.isArray(n)&&Hc(n))&&Ke(e,r.slice(0,-1)),e}var ll=e=>{for(const t in e)if(jt(e[t]))return!0;return!1};function Zn(e,t={}){const r=Array.isArray(e);if(We(e)||r)for(const n in e)Array.isArray(e[n])||We(e[n])&&!ll(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Zn(e[n],t[n])):tt(e[n])||(t[n]=!0);return t}function cl(e,t,r){const n=Array.isArray(e);if(We(e)||n)for(const i in e)Array.isArray(e[i])||We(e[i])&&!ll(e[i])?Re(t)||ra(r[i])?r[i]=Array.isArray(e[i])?Zn(e[i],[]):{...Zn(e[i])}:cl(e[i],tt(t)?{}:t[i],r[i]):r[i]=!Yt(e[i],t[i]);return r}var cn=(e,t)=>cl(e,t,Zn(t));const fs={value:!1,isValid:!1},hs={value:!0,isValid:!0};var ul=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&&!Re(e[0].attributes.value)?Re(e[0].value)||e[0].value===""?hs:{value:e[0].value,isValid:!0}:hs:fs}return fs},pl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Re(e)?e:t?e===""?NaN:e&&+e:r&&It(e)?new Date(e):n?n(e):e;const ms={isValid:!1,value:null};var dl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,ms):ms;function ys(e){const t=e.ref;return za(t)?t.files:Va(t)?dl(e.refs).value:ol(t)?[...t.selectedOptions].map(({value:r})=>r):kn(t)?ul(e.refs).value:pl(Re(t.value)?e.ref.value:t.value,e)}var Kc=(e,t,r,n)=>{const i={};for(const a of e){const s=Z(t,a);s&&we(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Xn=e=>e instanceof RegExp,un=e=>Re(e)?e:Xn(e)?e.source:We(e)?Xn(e.value)?e.value.source:e.value:e,Lr=e=>({isOnSubmit:!e||e===wt.onSubmit,isOnBlur:e===wt.onBlur,isOnChange:e===wt.onChange,isOnAll:e===wt.all,isOnTouch:e===wt.onTouched});const gs="AsyncFunction";var Gc=e=>!!e&&!!e.validate&&!!(jt(e.validate)&&e.validate.constructor.name===gs||We(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===gs)),Qc=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),na=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Wr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=Z(e,i);if(a){const{_f:s,...o}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Wr(o,t))break}else if(We(o)&&Wr(o,t))break}}};function xs(e,t,r){const n=Z(e,r);if(n||mi(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=Z(t,a),o=Z(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};i.pop()}return{name:r}}var Yc=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return et(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||wt.all))},Zc=(e,t,r)=>!e||!t||e===t||ct(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Xc=(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,Jc=(e,t)=>!yi(Z(e,t)).length&&Ke(e,t),fl=(e,t,r)=>{const n=ct(Z(e,r));return we(n,"root",t[r]),we(e,r,n),e},qn=e=>It(e);function vs(e,t,r="validate"){if(qn(e)||Array.isArray(e)&&e.every(qn)||pt(e)&&!e)return{type:r,message:qn(e)?e:"",ref:t}}var Pr=e=>We(e)&&!Xn(e)?e:{value:e,message:""},ia=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:l,maxLength:d,minLength:f,min:p,max:m,pattern:y,validate:T,name:h,valueAsNumber:C,mount:v}=e._f,S=Z(r,h);if(!v||t.has(h))return{};const P=o?o[0]:s,w=N=>{i&&P.reportValidity&&(P.setCustomValidity(pt(N)?"":N||""),P.reportValidity())},b={},_=Va(s),z=kn(s),F=_||z,D=(C||za(s))&&Re(s.value)&&Re(S)||Yn(s)&&s.value===""||S===""||Array.isArray(S)&&!S.length,u=sl.bind(null,h,n,b),M=(N,A,L,Q=zt.maxLength,se=zt.minLength)=>{const me=N?A:L;b[h]={type:N?Q:se,message:me,ref:s,...u(N?Q:se,me)}};if(a?!Array.isArray(S)||!S.length:l&&(!F&&(D||tt(S))||pt(S)&&!S||z&&!ul(o).isValid||_&&!dl(o).isValid)){const{value:N,message:A}=qn(l)?{value:!!l,message:l}:Pr(l);if(N&&(b[h]={type:zt.required,message:A,ref:P,...u(zt.required,A)},!n))return w(A),b}if(!D&&(!tt(p)||!tt(m))){let N,A;const L=Pr(m),Q=Pr(p);if(!tt(S)&&!isNaN(S)){const se=s.valueAsNumber||S&&+S;tt(L.value)||(N=se>L.value),tt(Q.value)||(A=se<Q.value)}else{const se=s.valueAsDate||new Date(S),me=B=>new Date(new Date().toDateString()+" "+B),ue=s.type=="time",K=s.type=="week";It(L.value)&&S&&(N=ue?me(S)>me(L.value):K?S>L.value:se>new Date(L.value)),It(Q.value)&&S&&(A=ue?me(S)<me(Q.value):K?S<Q.value:se<new Date(Q.value))}if((N||A)&&(M(!!N,L.message,Q.message,zt.max,zt.min),!n))return w(b[h].message),b}if((d||f)&&!D&&(It(S)||a&&Array.isArray(S))){const N=Pr(d),A=Pr(f),L=!tt(N.value)&&S.length>+N.value,Q=!tt(A.value)&&S.length<+A.value;if((L||Q)&&(M(L,N.message,A.message),!n))return w(b[h].message),b}if(y&&!D&&It(S)){const{value:N,message:A}=Pr(y);if(Xn(N)&&!S.match(N)&&(b[h]={type:zt.pattern,message:A,ref:s,...u(zt.pattern,A)},!n))return w(A),b}if(T){if(jt(T)){const N=await T(S,r),A=vs(N,P);if(A&&(b[h]={...A,...u(zt.validate,A.message)},!n))return w(A.message),b}else if(We(T)){let N={};for(const A in T){if(!et(N)&&!n)break;const L=vs(await T[A](S,r),P,A);L&&(N={...L,...u(A,L.message)},w(L.message),n&&(b[h]=N))}if(!et(N)&&(b[h]={ref:P,...N},!n))return b}}return w(!0),b};const eu={mode:wt.onSubmit,reValidateMode:wt.onChange,shouldFocusError:!0};function tu(e={}){let t={...eu,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:jt(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=We(t.defaultValues)||We(t.values)?Me(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Me(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let p={...f};const m={array:ds(),state:ds()},y=t.criteriaMode===wt.all,T=g=>E=>{clearTimeout(d),d=setTimeout(g,E)},h=async g=>{if(!t.disabled&&(f.isValid||p.isValid||g)){const E=t.resolver?et((await z()).errors):await D(n,!0);E!==r.isValid&&m.state.next({isValid:E})}},C=(g,E)=>{!t.disabled&&(f.isValidating||f.validatingFields||p.isValidating||p.validatingFields)&&((g||Array.from(o.mount)).forEach(j=>{j&&(E?we(r.validatingFields,j,E):Ke(r.validatingFields,j))}),m.state.next({validatingFields:r.validatingFields,isValidating:!et(r.validatingFields)}))},v=(g,E=[],j,U,R=!0,I=!0)=>{if(U&&j&&!t.disabled){if(s.action=!0,I&&Array.isArray(Z(n,g))){const Y=j(Z(n,g),U.argA,U.argB);R&&we(n,g,Y)}if(I&&Array.isArray(Z(r.errors,g))){const Y=j(Z(r.errors,g),U.argA,U.argB);R&&we(r.errors,g,Y),Jc(r.errors,g)}if((f.touchedFields||p.touchedFields)&&I&&Array.isArray(Z(r.touchedFields,g))){const Y=j(Z(r.touchedFields,g),U.argA,U.argB);R&&we(r.touchedFields,g,Y)}(f.dirtyFields||p.dirtyFields)&&(r.dirtyFields=cn(i,a)),m.state.next({name:g,isDirty:M(g,E),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else we(a,g,E)},S=(g,E)=>{we(r.errors,g,E),m.state.next({errors:r.errors})},P=g=>{r.errors=g,m.state.next({errors:r.errors,isValid:!1})},w=(g,E,j,U)=>{const R=Z(n,g);if(R){const I=Z(a,g,Re(j)?Z(i,g):j);Re(I)||U&&U.defaultChecked||E?we(a,g,E?I:ys(R._f)):L(g,I),s.mount&&h()}},b=(g,E,j,U,R)=>{let I=!1,Y=!1;const ie={name:g};if(!t.disabled){if(!j||U){(f.isDirty||p.isDirty)&&(Y=r.isDirty,r.isDirty=ie.isDirty=M(),I=Y!==ie.isDirty);const W=Yt(Z(i,g),E);Y=!!Z(r.dirtyFields,g),W?Ke(r.dirtyFields,g):we(r.dirtyFields,g,!0),ie.dirtyFields=r.dirtyFields,I=I||(f.dirtyFields||p.dirtyFields)&&Y!==!W}if(j){const W=Z(r.touchedFields,g);W||(we(r.touchedFields,g,j),ie.touchedFields=r.touchedFields,I=I||(f.touchedFields||p.touchedFields)&&W!==j)}I&&R&&m.state.next(ie)}return I?ie:{}},_=(g,E,j,U)=>{const R=Z(r.errors,g),I=(f.isValid||p.isValid)&&pt(E)&&r.isValid!==E;if(t.delayError&&j?(l=T(()=>S(g,j)),l(t.delayError)):(clearTimeout(d),l=null,j?we(r.errors,g,j):Ke(r.errors,g)),(j?!Yt(R,j):R)||!et(U)||I){const Y={...U,...I&&pt(E)?{isValid:E}:{},errors:r.errors,name:g};r={...r,...Y},m.state.next(Y)}},z=async g=>{C(g,!0);const E=await t.resolver(a,t.context,Kc(g||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return C(g),E},F=async g=>{const{errors:E}=await z(g);if(g)for(const j of g){const U=Z(E,j);U?we(r.errors,j,U):Ke(r.errors,j)}else r.errors=E;return E},D=async(g,E,j={valid:!0})=>{for(const U in g){const R=g[U];if(R){const{_f:I,...Y}=R;if(I){const ie=o.array.has(I.name),W=R._f&&Gc(R._f);W&&f.validatingFields&&C([U],!0);const xe=await ia(R,o.disabled,a,y,t.shouldUseNativeValidation&&!E,ie);if(W&&f.validatingFields&&C([U]),xe[I.name]&&(j.valid=!1,E))break;!E&&(Z(xe,I.name)?ie?fl(r.errors,xe,I.name):we(r.errors,I.name,xe[I.name]):Ke(r.errors,I.name))}!et(Y)&&await D(Y,E,j)}}return j.valid},u=()=>{for(const g of o.unMount){const E=Z(n,g);E&&(E._f.refs?E._f.refs.every(j=>!_i(j)):!_i(E._f.ref))&&ee(g)}o.unMount=new Set},M=(g,E)=>!t.disabled&&(g&&E&&we(a,g,E),!Yt(B(),i)),N=(g,E,j)=>il(g,o,{...s.mount?a:Re(E)?i:It(g)?{[g]:E}:E},j,E),A=g=>yi(Z(s.mount?a:i,g,t.shouldUnregister?Z(i,g,[]):[])),L=(g,E,j={})=>{const U=Z(n,g);let R=E;if(U){const I=U._f;I&&(!I.disabled&&we(a,g,pl(E,I)),R=Yn(I.ref)&&tt(E)?"":E,ol(I.ref)?[...I.ref.options].forEach(Y=>Y.selected=R.includes(Y.value)):I.refs?kn(I.ref)?I.refs.forEach(Y=>{(!Y.defaultChecked||!Y.disabled)&&(Array.isArray(R)?Y.checked=!!R.find(ie=>ie===Y.value):Y.checked=R===Y.value||!!R)}):I.refs.forEach(Y=>Y.checked=Y.value===R):za(I.ref)?I.ref.value="":(I.ref.value=R,I.ref.type||m.state.next({name:g,values:Me(a)})))}(j.shouldDirty||j.shouldTouch)&&b(g,R,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&K(g)},Q=(g,E,j)=>{for(const U in E){if(!E.hasOwnProperty(U))return;const R=E[U],I=g+"."+U,Y=Z(n,I);(o.array.has(g)||We(R)||Y&&!Y._f)&&!mr(R)?Q(I,R,j):L(I,R,j)}},se=(g,E,j={})=>{const U=Z(n,g),R=o.array.has(g),I=Me(E);we(a,g,I),R?(m.array.next({name:g,values:Me(a)}),(f.isDirty||f.dirtyFields||p.isDirty||p.dirtyFields)&&j.shouldDirty&&m.state.next({name:g,dirtyFields:cn(i,a),isDirty:M(g,I)})):U&&!U._f&&!tt(I)?Q(g,I,j):L(g,I,j),na(g,o)&&m.state.next({...r}),m.state.next({name:s.mount?g:void 0,values:Me(a)})},me=async g=>{s.mount=!0;const E=g.target;let j=E.name,U=!0;const R=Z(n,j),I=W=>{U=Number.isNaN(W)||mr(W)&&isNaN(W.getTime())||Yt(W,Z(a,j,W))},Y=Lr(t.mode),ie=Lr(t.reValidateMode);if(R){let W,xe;const Te=E.type?ys(R._f):el(g),je=g.type===Qn.BLUR||g.type===Qn.FOCUS_OUT,Ve=!Qc(R._f)&&!t.resolver&&!Z(r.errors,j)&&!R._f.deps||Xc(je,Z(r.touchedFields,j),r.isSubmitted,ie,Y),qe=na(j,o,je);we(a,j,Te),je?(R._f.onBlur&&R._f.onBlur(g),l&&l(0)):R._f.onChange&&R._f.onChange(g);const Ze=b(j,Te,je),Ft=!et(Ze)||qe;if(!je&&m.state.next({name:j,type:g.type,values:Me(a)}),Ve)return(f.isValid||p.isValid)&&(t.mode==="onBlur"?je&&h():je||h()),Ft&&m.state.next({name:j,...qe?{}:Ze});if(!je&&qe&&m.state.next({...r}),t.resolver){const{errors:nt}=await z([j]);if(I(Te),U){const ut=xs(r.errors,n,j),Et=xs(nt,n,ut.name||j);W=Et.error,j=Et.name,xe=et(nt)}}else C([j],!0),W=(await ia(R,o.disabled,a,y,t.shouldUseNativeValidation))[j],C([j]),I(Te),U&&(W?xe=!1:(f.isValid||p.isValid)&&(xe=await D(n,!0)));U&&(R._f.deps&&K(R._f.deps),_(j,xe,W,Ze))}},ue=(g,E)=>{if(Z(r.errors,E)&&g.focus)return g.focus(),1},K=async(g,E={})=>{let j,U;const R=ct(g);if(t.resolver){const I=await F(Re(g)?g:R);j=et(I),U=g?!R.some(Y=>Z(I,Y)):j}else g?(U=(await Promise.all(R.map(async I=>{const Y=Z(n,I);return await D(Y&&Y._f?{[I]:Y}:Y)}))).every(Boolean),!(!U&&!r.isValid)&&h()):U=j=await D(n);return m.state.next({...!It(g)||(f.isValid||p.isValid)&&j!==r.isValid?{}:{name:g},...t.resolver||!g?{isValid:j}:{},errors:r.errors}),E.shouldFocus&&!U&&Wr(n,ue,g?R:o.mount),U},B=g=>{const E={...s.mount?a:i};return Re(g)?E:It(g)?Z(E,g):g.map(j=>Z(E,j))},H=(g,E)=>({invalid:!!Z((E||r).errors,g),isDirty:!!Z((E||r).dirtyFields,g),error:Z((E||r).errors,g),isValidating:!!Z(r.validatingFields,g),isTouched:!!Z((E||r).touchedFields,g)}),de=g=>{g&&ct(g).forEach(E=>Ke(r.errors,E)),m.state.next({errors:g?r.errors:{}})},fe=(g,E,j)=>{const U=(Z(n,g,{_f:{}})._f||{}).ref,R=Z(r.errors,g)||{},{ref:I,message:Y,type:ie,...W}=R;we(r.errors,g,{...W,...E,ref:U}),m.state.next({name:g,errors:r.errors,isValid:!1}),j&&j.shouldFocus&&U&&U.focus&&U.focus()},pe=(g,E)=>jt(g)?m.state.subscribe({next:j=>g(N(void 0,E),j)}):N(g,E,!0),ge=g=>m.state.subscribe({next:E=>{Zc(g.name,E.name,g.exact)&&Yc(E,g.formState||f,le,g.reRenderRoot)&&g.callback({values:{...a},...r,...E})}}).unsubscribe,q=g=>(s.mount=!0,p={...p,...g.formState},ge({...g,formState:p})),ee=(g,E={})=>{for(const j of g?ct(g):o.mount)o.mount.delete(j),o.array.delete(j),E.keepValue||(Ke(n,j),Ke(a,j)),!E.keepError&&Ke(r.errors,j),!E.keepDirty&&Ke(r.dirtyFields,j),!E.keepTouched&&Ke(r.touchedFields,j),!E.keepIsValidating&&Ke(r.validatingFields,j),!t.shouldUnregister&&!E.keepDefaultValue&&Ke(i,j);m.state.next({values:Me(a)}),m.state.next({...r,...E.keepDirty?{isDirty:M()}:{}}),!E.keepIsValid&&h()},ae=({disabled:g,name:E})=>{(pt(g)&&s.mount||g||o.disabled.has(E))&&(g?o.disabled.add(E):o.disabled.delete(E))},oe=(g,E={})=>{let j=Z(n,g);const U=pt(E.disabled)||pt(t.disabled);return we(n,g,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:g}},name:g,mount:!0,...E}}),o.mount.add(g),j?ae({disabled:pt(E.disabled)?E.disabled:t.disabled,name:g}):w(g,!0,E.value),{...U?{disabled:E.disabled||t.disabled}:{},...t.progressive?{required:!!E.required,min:un(E.min),max:un(E.max),minLength:un(E.minLength),maxLength:un(E.maxLength),pattern:un(E.pattern)}:{},name:g,onChange:me,onBlur:me,ref:R=>{if(R){oe(g,E),j=Z(n,g);const I=Re(R.value)&&R.querySelectorAll&&R.querySelectorAll("input,select,textarea")[0]||R,Y=Wc(I),ie=j._f.refs||[];if(Y?ie.find(W=>W===I):I===j._f.ref)return;we(n,g,{_f:{...j._f,...Y?{refs:[...ie.filter(_i),I,...Array.isArray(Z(i,g))?[{}]:[]],ref:{type:I.type,name:g}}:{ref:I}}}),w(g,!1,void 0,I)}else j=Z(n,g,{}),j._f&&(j._f.mount=!1),(t.shouldUnregister||E.shouldUnregister)&&!(tl(o.array,g)&&s.action)&&o.unMount.add(g)}}},ce=()=>t.shouldFocusError&&Wr(n,ue,o.mount),Se=g=>{pt(g)&&(m.state.next({disabled:g}),Wr(n,(E,j)=>{const U=Z(n,j);U&&(E.disabled=U._f.disabled||g,Array.isArray(U._f.refs)&&U._f.refs.forEach(R=>{R.disabled=U._f.disabled||g}))},0,!1))},G=(g,E)=>async j=>{let U;j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let R=Me(a);if(m.state.next({isSubmitting:!0}),t.resolver){const{errors:I,values:Y}=await z();r.errors=I,R=Y}else await D(n);if(o.disabled.size)for(const I of o.disabled)we(R,I,void 0);if(Ke(r.errors,"root"),et(r.errors)){m.state.next({errors:{}});try{await g(R,j)}catch(I){U=I}}else E&&await E({...r.errors},j),ce(),setTimeout(ce);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:et(r.errors)&&!U,submitCount:r.submitCount+1,errors:r.errors}),U)throw U},De=(g,E={})=>{Z(n,g)&&(Re(E.defaultValue)?se(g,Me(Z(i,g))):(se(g,E.defaultValue),we(i,g,Me(E.defaultValue))),E.keepTouched||Ke(r.touchedFields,g),E.keepDirty||(Ke(r.dirtyFields,g),r.isDirty=E.defaultValue?M(g,Me(Z(i,g))):M()),E.keepError||(Ke(r.errors,g),f.isValid&&h()),m.state.next({...r}))},He=(g,E={})=>{const j=g?Me(g):i,U=Me(j),R=et(g),I=R?i:U;if(E.keepDefaultValues||(i=j),!E.keepValues){if(E.keepDirtyValues){const Y=new Set([...o.mount,...Object.keys(cn(i,a))]);for(const ie of Array.from(Y))Z(r.dirtyFields,ie)?we(I,ie,Z(a,ie)):se(ie,Z(I,ie))}else{if(Ma&&Re(g))for(const Y of o.mount){const ie=Z(n,Y);if(ie&&ie._f){const W=Array.isArray(ie._f.refs)?ie._f.refs[0]:ie._f.ref;if(Yn(W)){const xe=W.closest("form");if(xe){xe.reset();break}}}}for(const Y of o.mount)se(Y,Z(I,Y))}a=Me(I),m.array.next({values:{...I}}),m.state.next({values:{...I}})}o={mount:E.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!f.isValid||!!E.keepIsValid||!!E.keepDirtyValues,s.watch=!!t.shouldUnregister,m.state.next({submitCount:E.keepSubmitCount?r.submitCount:0,isDirty:R?!1:E.keepDirty?r.isDirty:!!(E.keepDefaultValues&&!Yt(g,i)),isSubmitted:E.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:R?{}:E.keepDirtyValues?E.keepDefaultValues&&a?cn(i,a):r.dirtyFields:E.keepDefaultValues&&g?cn(i,g):E.keepDirty?r.dirtyFields:{},touchedFields:E.keepTouched?r.touchedFields:{},errors:E.keepErrors?r.errors:{},isSubmitSuccessful:E.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Qe=(g,E)=>He(jt(g)?g(a):g,E),X=(g,E={})=>{const j=Z(n,g),U=j&&j._f;if(U){const R=U.refs?U.refs[0]:U.ref;R.focus&&(R.focus(),E.shouldSelect&&jt(R.select)&&R.select())}},le=g=>{r={...r,...g}},he={control:{register:oe,unregister:ee,getFieldState:H,handleSubmit:G,setError:fe,_subscribe:ge,_runSchema:z,_focusError:ce,_getWatch:N,_getDirty:M,_setValid:h,_setFieldArray:v,_setDisabledField:ae,_setErrors:P,_getFieldArray:A,_reset:He,_resetDefaultValues:()=>jt(t.defaultValues)&&t.defaultValues().then(g=>{Qe(g,t.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:u,_disableForm:Se,_subjects:m,_proxyFormState:f,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(g){s=g},get _defaultValues(){return i},get _names(){return o},set _names(g){o=g},get _formState(){return r},get _options(){return t},set _options(g){t={...t,...g}}},subscribe:q,trigger:K,register:oe,handleSubmit:G,watch:pe,setValue:se,getValues:B,reset:Qe,resetField:De,clearErrors:de,unregister:ee,setError:fe,setFocus:X,getFieldState:H};return{...he,formControl:he}}var Ht=()=>{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)})},Ri=(e,t,r={})=>r.shouldFocus||Re(r.shouldFocus)?r.focusName||`${e}.${Re(r.focusIndex)?t:r.focusIndex}.`:"",$i=(e,t)=>[...e,...ct(t)],Di=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Pi(e,t,r){return[...e.slice(0,t),...ct(r),...e.slice(t)]}var Mi=(e,t,r)=>Array.isArray(e)?(Re(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Ii=(e,t)=>[...ct(t),...ct(e)];function ru(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return yi(n).length?n:[]}var zi=(e,t)=>Re(t)?[]:ru(e,ct(t).sort((r,n)=>r-n)),Vi=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},bs=(e,t,r)=>(e[t]=r,e);function nu(e){const t=gi(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a,rules:s}=e,[o,l]=$.useState(r._getFieldArray(n)),d=$.useRef(r._getFieldArray(n).map(Ht)),f=$.useRef(o),p=$.useRef(n),m=$.useRef(!1);p.current=n,f.current=o,r._names.array.add(n),s&&r.register(n,s),xi(()=>r._subjects.array.subscribe({next:({values:_,name:z})=>{if(z===p.current||!z){const F=Z(_,p.current);Array.isArray(F)&&(l(F),d.current=F.map(Ht))}}}).unsubscribe,[r]);const y=$.useCallback(_=>{m.current=!0,r._setFieldArray(n,_)},[r,n]),T=(_,z)=>{const F=ct(Me(_)),D=$i(r._getFieldArray(n),F);r._names.focus=Ri(n,D.length-1,z),d.current=$i(d.current,F.map(Ht)),y(D),l(D),r._setFieldArray(n,D,$i,{argA:Di(_)})},h=(_,z)=>{const F=ct(Me(_)),D=Ii(r._getFieldArray(n),F);r._names.focus=Ri(n,0,z),d.current=Ii(d.current,F.map(Ht)),y(D),l(D),r._setFieldArray(n,D,Ii,{argA:Di(_)})},C=_=>{const z=zi(r._getFieldArray(n),_);d.current=zi(d.current,_),y(z),l(z),!Array.isArray(Z(r._fields,n))&&we(r._fields,n,void 0),r._setFieldArray(n,z,zi,{argA:_})},v=(_,z,F)=>{const D=ct(Me(z)),u=Pi(r._getFieldArray(n),_,D);r._names.focus=Ri(n,_,F),d.current=Pi(d.current,_,D.map(Ht)),y(u),l(u),r._setFieldArray(n,u,Pi,{argA:_,argB:Di(z)})},S=(_,z)=>{const F=r._getFieldArray(n);Vi(F,_,z),Vi(d.current,_,z),y(F),l(F),r._setFieldArray(n,F,Vi,{argA:_,argB:z},!1)},P=(_,z)=>{const F=r._getFieldArray(n);Mi(F,_,z),Mi(d.current,_,z),y(F),l(F),r._setFieldArray(n,F,Mi,{argA:_,argB:z},!1)},w=(_,z)=>{const F=Me(z),D=bs(r._getFieldArray(n),_,F);d.current=[...D].map((u,M)=>!u||M===_?Ht():d.current[M]),y(D),l([...D]),r._setFieldArray(n,D,bs,{argA:_,argB:F},!0,!1)},b=_=>{const z=ct(Me(_));d.current=z.map(Ht),y([...z]),l([...z]),r._setFieldArray(n,[...z],F=>F,{},!0,!1)};return $.useEffect(()=>{if(r._state.action=!1,na(n,r._names)&&r._subjects.state.next({...r._formState}),m.current&&(!Lr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Lr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(_=>{const z=Z(_.errors,n),F=Z(r._formState.errors,n);(F?!z&&F.type||z&&(F.type!==z.type||F.message!==z.message):z&&z.type)&&(z?we(r._formState.errors,n,z):Ke(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const _=Z(r._fields,n);_&&_._f&&!(Lr(r._options.reValidateMode).isOnSubmit&&Lr(r._options.mode).isOnSubmit)&&ia(_,r._names.disabled,r._formValues,r._options.criteriaMode===wt.all,r._options.shouldUseNativeValidation,!0).then(z=>!et(z)&&r._subjects.state.next({errors:fl(r._formState.errors,z,n)}))}r._subjects.state.next({name:n,values:Me(r._formValues)}),r._names.focus&&Wr(r._fields,(_,z)=>{if(r._names.focus&&z.startsWith(r._names.focus)&&_.focus)return _.focus(),1}),r._names.focus="",r._setValid(),m.current=!1},[o,n,r]),$.useEffect(()=>(!Z(r._formValues,n)&&r._setFieldArray(n),()=>{const _=(z,F)=>{const D=Z(r._fields,z);D&&D._f&&(D._f.mount=F)};r._options.shouldUnregister||a?r.unregister(n):_(n,!1)}),[n,r,i,a]),{swap:$.useCallback(S,[y,n,r]),move:$.useCallback(P,[y,n,r]),prepend:$.useCallback(h,[y,n,r]),append:$.useCallback(T,[y,n,r]),remove:$.useCallback(C,[y,n,r]),insert:$.useCallback(v,[y,n,r]),update:$.useCallback(w,[y,n,r]),replace:$.useCallback(b,[y,n,r]),fields:$.useMemo(()=>o.map((_,z)=>({..._,[i]:d.current[z]||Ht()})),[o,i])}}function iu(e={}){const t=$.useRef(void 0),r=$.useRef(void 0),[n,i]=$.useState({isDirty:!1,isValidating:!1,isLoading:jt(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:jt(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!jt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=tu(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,xi(()=>{const s=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),a._formState.isReady=!0,s},[a]),$.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),$.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),$.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),$.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),$.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),$.useEffect(()=>{e.values&&!Yt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),$.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=nl(n,a),t.current}const ws=(e,t,r)=>{if(e&&"reportValidity"in e){const n=Z(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},hl=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?ws(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>ws(i,r,e))}},au=(e,t)=>{t.shouldUseNativeValidation&&hl(e,t);const r={};for(const n in e){const i=Z(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(su(t.names||Object.keys(e),n)){const s=Object.assign({},Z(r,n));we(s,"root",a),we(r,n,s)}else we(r,n,a)}return r},su=(e,t)=>{const r=Ss(t);return e.some(n=>Ss(n).match(`^${r}\\.\\d+`))};function Ss(e){return e.replace(/\]|\[/g,"")}function ou(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var l=(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(d){return a.shouldUseNativeValidation&&hl({},a),{values:r.raw?Object.assign({},n):d,errors:{}}}))}catch(d){return o(d)}return l&&l.then?l.then(void 0,o):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:au((o=s,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(d,f){if(d[f.path]||(d[f.path]={message:f.message,type:f.type}),l){var p=d[f.path].types,m=p&&p[f.type];d[f.path]=sl(f.path,l,d,f.type,m?[].concat(m,f.message):f.message)}return d},{})),a)};var o,l}))}catch(s){return Promise.reject(s)}}}var Tn=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(){}},Or=typeof window>"u"||"Deno"in globalThis;function st(){}function lu(e,t){return typeof e=="function"?e(t):e}function aa(e){return typeof e=="number"&&e>=0&&e!==1/0}function ml(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sr(e,t){return typeof e=="function"?e(t):e}function xt(e,t){return typeof e=="function"?e(t):e}function Cs(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Ba(s,t.options))return!1}else if(!xn(t.queryKey,s))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function Es(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(gn(t.options.mutationKey)!==gn(a))return!1}else if(!xn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ba(e,t){return((t==null?void 0:t.queryKeyHashFn)||gn)(e)}function gn(e){return JSON.stringify(e,(t,r)=>la(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function xn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>xn(e[r],t[r])):!1}function sa(e,t){if(e===t)return e;const r=ks(e)&&ks(t);if(r||la(e)&&la(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},l=new Set(n);let d=0;for(let f=0;f<s;f++){const p=r?f:a[f];(!r&&l.has(p)||r)&&e[p]===void 0&&t[p]===void 0?(o[p]=void 0,d++):(o[p]=sa(e[p],t[p]),o[p]===e[p]&&e[p]!==void 0&&d++)}return i===s&&d===i?e:o}return t}function oa(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 ks(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function la(e){if(!Ts(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Ts(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ts(e){return Object.prototype.toString.call(e)==="[object Object]"}function cu(e){return new Promise(t=>{setTimeout(t,e)})}function ca(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 sa(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 sa(e,t)}return t}function uu(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function pu(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Jn=Symbol();function yl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Jn&&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===Jn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function du(e,t){return typeof e=="function"?e(...t):!!e}var gr,Zt,Hr,Wo,fu=(Wo=class extends Tn{constructor(){super();ye(this,gr);ye(this,Zt);ye(this,Hr);re(this,Hr,t=>{if(!Or&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){O(this,Zt)||this.setEventListener(O(this,Hr))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Zt))==null||t.call(this),re(this,Zt,void 0))}setEventListener(t){var r;re(this,Hr,t),(r=O(this,Zt))==null||r.call(this),re(this,Zt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){O(this,gr)!==t&&(re(this,gr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof O(this,gr)=="boolean"?O(this,gr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},gr=new WeakMap,Zt=new WeakMap,Hr=new WeakMap,Wo),Na=new fu,Kr,Xt,Gr,Uo,hu=(Uo=class extends Tn{constructor(){super();ye(this,Kr,!0);ye(this,Xt);ye(this,Gr);re(this,Gr,t=>{if(!Or&&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,Xt)||this.setEventListener(O(this,Gr))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Xt))==null||t.call(this),re(this,Xt,void 0))}setEventListener(t){var r;re(this,Gr,t),(r=O(this,Xt))==null||r.call(this),re(this,Xt,t(this.setOnline.bind(this)))}setOnline(t){O(this,Kr)!==t&&(re(this,Kr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return O(this,Kr)}},Kr=new WeakMap,Xt=new WeakMap,Gr=new WeakMap,Uo),ei=new hu;function ua(){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 mu(e){return Math.min(1e3*2**e,3e4)}function gl(e){return(e??"online")==="online"?ei.isOnline():!0}var xl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Bi(e){return e instanceof xl}function vl(e){let t=!1,r=0,n=!1,i;const a=ua(),s=h=>{var C;n||(m(new xl(h)),(C=e.abort)==null||C.call(e))},o=()=>{t=!0},l=()=>{t=!1},d=()=>Na.isFocused()&&(e.networkMode==="always"||ei.isOnline())&&e.canRun(),f=()=>gl(e.networkMode)&&e.canRun(),p=h=>{var C;n||(n=!0,(C=e.onSuccess)==null||C.call(e,h),i==null||i(),a.resolve(h))},m=h=>{var C;n||(n=!0,(C=e.onError)==null||C.call(e,h),i==null||i(),a.reject(h))},y=()=>new Promise(h=>{var C;i=v=>{(n||d())&&h(v)},(C=e.onPause)==null||C.call(e)}).then(()=>{var h;i=void 0,n||(h=e.onContinue)==null||h.call(e)}),T=()=>{if(n)return;let h;const C=r===0?e.initialPromise:void 0;try{h=C??e.fn()}catch(v){h=Promise.reject(v)}Promise.resolve(h).then(p).catch(v=>{var _;if(n)return;const S=e.retry??(Or?0:3),P=e.retryDelay??mu,w=typeof P=="function"?P(r,v):P,b=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,v);if(t||!b){m(v);return}r++,(_=e.onFail)==null||_.call(e,r,v),cu(w).then(()=>d()?void 0:y()).then(()=>{t?m(v):T()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:l,canStart:f,start:()=>(f()?T():y().then(T),a)}}var yu=e=>setTimeout(e,0);function gu(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=yu;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(l=>{r(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{a(()=>{o(...l)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Ge=gu(),xr,Ho,bl=(Ho=class{constructor(){ye(this,xr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),aa(this.gcTime)&&re(this,xr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Or?1/0:5*60*1e3))}clearGcTimeout(){O(this,xr)&&(clearTimeout(O(this,xr)),re(this,xr,void 0))}},xr=new WeakMap,Ho),Qr,vr,gt,br,Ye,wn,wr,kt,qt,Ko,xu=(Ko=class extends bl{constructor(t){super();ye(this,kt);ye(this,Qr);ye(this,vr);ye(this,gt);ye(this,br);ye(this,Ye);ye(this,wn);ye(this,wr);re(this,wr,!1),re(this,wn,t.defaultOptions),this.setOptions(t.options),this.observers=[],re(this,br,t.client),re(this,gt,O(this,br).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,re(this,Qr,vu(this.options)),this.state=t.state??O(this,Qr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,Ye))==null?void 0:t.promise}setOptions(t){this.options={...O(this,wn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,gt).remove(this)}setData(t,r){const n=ca(this.state.data,t,this.options);return ve(this,kt,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){ve(this,kt,qt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=O(this,Ye))==null?void 0:n.promise;return(i=O(this,Ye))==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,Qr))}isActive(){return this.observers.some(t=>xt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Jn||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>sr(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:!ml(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,Ye))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,Ye))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,gt).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,Ye)&&(O(this,wr)?O(this,Ye).cancel({revert:!0}):O(this,Ye).cancelRetry()),this.scheduleGc()),O(this,gt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,kt,qt).call(this,{type:"invalidate"})}fetch(t,r){var d,f,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(O(this,Ye))return O(this,Ye).continueRetry(),O(this,Ye).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(y=>y.options.queryFn);m&&this.setOptions(m.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=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(re(this,wr,!0),n.signal)})},a=()=>{const m=yl(this.options,r),T=(()=>{const h={client:O(this,br),queryKey:this.queryKey,meta:this.meta};return i(h),h})();return re(this,wr,!1),this.options.persister?this.options.persister(m,T,this):m(T)},o=(()=>{const m={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:O(this,br),state:this.state,fetchFn:a};return i(m),m})();(d=this.options.behavior)==null||d.onFetch(o,this),re(this,vr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&ve(this,kt,qt).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const l=m=>{var y,T,h,C;Bi(m)&&m.silent||ve(this,kt,qt).call(this,{type:"error",error:m}),Bi(m)||((T=(y=O(this,gt).config).onError)==null||T.call(y,m,this),(C=(h=O(this,gt).config).onSettled)==null||C.call(h,this.state.data,m,this)),this.scheduleGc()};return re(this,Ye,vl({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:m=>{var y,T,h,C;if(m===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}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(v){l(v);return}(T=(y=O(this,gt).config).onSuccess)==null||T.call(y,m,this),(C=(h=O(this,gt).config).onSettled)==null||C.call(h,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,y)=>{ve(this,kt,qt).call(this,{type:"failed",failureCount:m,error:y})},onPause:()=>{ve(this,kt,qt).call(this,{type:"pause"})},onContinue:()=>{ve(this,kt,qt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),O(this,Ye).start()}},Qr=new WeakMap,vr=new WeakMap,gt=new WeakMap,br=new WeakMap,Ye=new WeakMap,wn=new WeakMap,wr=new WeakMap,kt=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,...wl(n.data,this.options),fetchMeta:t.meta??null};case"success":return re(this,vr,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 Bi(i)&&i.revert&&O(this,vr)?{...O(this,vr),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),Ge.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),O(this,gt).notify({query:this,type:"updated",action:t})})},Ko);function wl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vu(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 $t,Go,bu=(Go=class extends Tn{constructor(t={}){super();ye(this,$t);this.config=t,re(this,$t,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ba(i,r);let s=this.get(a);return s||(s=new xu({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){O(this,$t).has(t.queryHash)||(O(this,$t).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=O(this,$t).get(t.queryHash);r&&(t.destroy(),r===t&&O(this,$t).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,$t).get(t)}getAll(){return[...O(this,$t).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Cs(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Cs(t,n)):r}notify(t){Ge.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$t=new WeakMap,Go),Dt,Xe,Sr,Pt,Gt,Qo,wu=(Qo=class extends bl{constructor(t){super();ye(this,Pt);ye(this,Dt);ye(this,Xe);ye(this,Sr);this.mutationId=t.mutationId,re(this,Xe,t.mutationCache),re(this,Dt,[]),this.state=t.state||Su(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,Dt).includes(t)||(O(this,Dt).push(t),this.clearGcTimeout(),O(this,Xe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){re(this,Dt,O(this,Dt).filter(r=>r!==t)),this.scheduleGc(),O(this,Xe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():O(this,Xe).remove(this))}continue(){var t;return((t=O(this,Sr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,l,d,f,p,m,y,T,h,C,v,S,P,w,b,_,z,F;const r=()=>{ve(this,Pt,Gt).call(this,{type:"continue"})};re(this,Sr,vl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(D,u)=>{ve(this,Pt,Gt).call(this,{type:"failed",failureCount:D,error:u})},onPause:()=>{ve(this,Pt,Gt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,Xe).canRun(this)}));const n=this.state.status==="pending",i=!O(this,Sr).canStart();try{if(n)r();else{ve(this,Pt,Gt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=O(this,Xe).config).onMutate)==null?void 0:s.call(a,t,this));const u=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));u!==this.state.context&&ve(this,Pt,Gt).call(this,{type:"pending",context:u,variables:t,isPaused:i})}const D=await O(this,Sr).start();return await((f=(d=O(this,Xe).config).onSuccess)==null?void 0:f.call(d,D,t,this.state.context,this)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,D,t,this.state.context)),await((T=(y=O(this,Xe).config).onSettled)==null?void 0:T.call(y,D,null,this.state.variables,this.state.context,this)),await((C=(h=this.options).onSettled)==null?void 0:C.call(h,D,null,t,this.state.context)),ve(this,Pt,Gt).call(this,{type:"success",data:D}),D}catch(D){try{throw await((S=(v=O(this,Xe).config).onError)==null?void 0:S.call(v,D,t,this.state.context,this)),await((w=(P=this.options).onError)==null?void 0:w.call(P,D,t,this.state.context)),await((_=(b=O(this,Xe).config).onSettled)==null?void 0:_.call(b,void 0,D,this.state.variables,this.state.context,this)),await((F=(z=this.options).onSettled)==null?void 0:F.call(z,void 0,D,t,this.state.context)),D}finally{ve(this,Pt,Gt).call(this,{type:"error",error:D})}}finally{O(this,Xe).runNext(this)}}},Dt=new WeakMap,Xe=new WeakMap,Sr=new WeakMap,Pt=new WeakSet,Gt=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),Ge.batch(()=>{O(this,Dt).forEach(n=>{n.onMutationUpdate(t)}),O(this,Xe).notify({mutation:this,type:"updated",action:t})})},Qo);function Su(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Wt,Tt,Sn,Yo,Cu=(Yo=class extends Tn{constructor(t={}){super();ye(this,Wt);ye(this,Tt);ye(this,Sn);this.config=t,re(this,Wt,new Set),re(this,Tt,new Map),re(this,Sn,0)}build(t,r,n){const i=new wu({mutationCache:this,mutationId:++_n(this,Sn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){O(this,Wt).add(t);const r=Rn(t);if(typeof r=="string"){const n=O(this,Tt).get(r);n?n.push(t):O(this,Tt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,Wt).delete(t)){const r=Rn(t);if(typeof r=="string"){const n=O(this,Tt).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,Tt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Rn(t);if(typeof r=="string"){const n=O(this,Tt).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=Rn(t);if(typeof r=="string"){const i=(n=O(this,Tt).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(){Ge.batch(()=>{O(this,Wt).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,Wt).clear(),O(this,Tt).clear()})}getAll(){return Array.from(O(this,Wt))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Es(r,n))}findAll(t={}){return this.getAll().filter(r=>Es(t,r))}notify(t){Ge.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ge.batch(()=>Promise.all(t.map(r=>r.continue().catch(st))))}},Wt=new WeakMap,Tt=new WeakMap,Sn=new WeakMap,Yo);function Rn(e){var t;return(t=e.options.scope)==null?void 0:t.id}function js(e){return{onFetch:(t,r)=>{var f,p,m,y,T;const n=t.options,i=(m=(p=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,a=((y=t.state.data)==null?void 0:y.pages)||[],s=((T=t.state.data)==null?void 0:T.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const d=async()=>{let h=!1;const C=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},v=yl(t.options,t.fetchOptions),S=async(P,w,b)=>{if(h)return Promise.reject();if(w==null&&P.pages.length)return Promise.resolve(P);const z=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:w,direction:b?"backward":"forward",meta:t.options.meta};return C(M),M})(),F=await v(z),{maxPages:D}=t.options,u=b?pu:uu;return{pages:u(P.pages,F,D),pageParams:u(P.pageParams,w,D)}};if(i&&a.length){const P=i==="backward",w=P?Eu:Os,b={pages:a,pageParams:s},_=w(n,b);o=await S(b,_,P)}else{const P=e??a.length;do{const w=l===0?s[0]??n.initialPageParam:Os(n,o);if(l>0&&w==null)break;o=await S(o,w),l++}while(l<P)}return o};t.options.persister?t.fetchFn=()=>{var h,C;return(C=(h=t.options).persister)==null?void 0:C.call(h,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function Os(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 Eu(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 Le,Jt,er,Yr,Zr,tr,Xr,Jr,Zo,ku=(Zo=class{constructor(e={}){ye(this,Le);ye(this,Jt);ye(this,er);ye(this,Yr);ye(this,Zr);ye(this,tr);ye(this,Xr);ye(this,Jr);re(this,Le,e.queryCache||new bu),re(this,Jt,e.mutationCache||new Cu),re(this,er,e.defaultOptions||{}),re(this,Yr,new Map),re(this,Zr,new Map),re(this,tr,0)}mount(){_n(this,tr)._++,O(this,tr)===1&&(re(this,Xr,Na.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Le).onFocus())})),re(this,Jr,ei.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Le).onOnline())})))}unmount(){var e,t;_n(this,tr)._--,O(this,tr)===0&&((e=O(this,Xr))==null||e.call(this),re(this,Xr,void 0),(t=O(this,Jr))==null||t.call(this),re(this,Jr,void 0))}isFetching(e){return O(this,Le).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,Jt).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=O(this,Le).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=O(this,Le).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(sr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return O(this,Le).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,Le).get(n.queryHash),a=i==null?void 0:i.state.data,s=lu(t,a);if(s!==void 0)return O(this,Le).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ge.batch(()=>O(this,Le).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,Le).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=O(this,Le);Ge.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=O(this,Le);return Ge.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ge.batch(()=>O(this,Le).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(st).catch(st)}invalidateQueries(e,t={}){return Ge.batch(()=>(O(this,Le).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=Ge.batch(()=>O(this,Le).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,Le).build(this,t);return r.isStaleByTime(sr(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=js(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(st).catch(st)}ensureInfiniteQueryData(e){return e.behavior=js(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ei.isOnline()?O(this,Jt).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Le)}getMutationCache(){return O(this,Jt)}getDefaultOptions(){return O(this,er)}setDefaultOptions(e){re(this,er,e)}setQueryDefaults(e,t){O(this,Yr).set(gn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,Yr).values()],r={};return t.forEach(n=>{xn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){O(this,Zr).set(gn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,Zr).values()],r={};return t.forEach(n=>{xn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,er).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ba(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===Jn&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,er).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,Le).clear(),O(this,Jt).clear()}},Le=new WeakMap,Jt=new WeakMap,er=new WeakMap,Yr=new WeakMap,Zr=new WeakMap,tr=new WeakMap,Xr=new WeakMap,Jr=new WeakMap,Zo),at,be,Cn,Je,Cr,en,rr,nr,En,tn,rn,Er,kr,ir,nn,ke,dn,pa,da,fa,ha,ma,ya,ga,Sl,Xo,Tu=(Xo=class extends Tn{constructor(t,r){super();ye(this,ke);ye(this,at);ye(this,be);ye(this,Cn);ye(this,Je);ye(this,Cr);ye(this,en);ye(this,rr);ye(this,nr);ye(this,En);ye(this,tn);ye(this,rn);ye(this,Er);ye(this,kr);ye(this,ir);ye(this,nn,new Set);this.options=r,re(this,at,t),re(this,nr,null),re(this,rr,ua()),this.options.experimental_prefetchInRender||O(this,rr).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,be).addObserver(this),Fs(O(this,be),this.options)?ve(this,ke,dn).call(this):this.updateResult(),ve(this,ke,ha).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xa(O(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xa(O(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,ke,ma).call(this),ve(this,ke,ya).call(this),O(this,be).removeObserver(this)}setOptions(t){const r=this.options,n=O(this,be);if(this.options=O(this,at).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xt(this.options.enabled,O(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,ke,ga).call(this),O(this,be).setOptions(this.options),r._defaulted&&!oa(this.options,r)&&O(this,at).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,be),observer:this});const i=this.hasListeners();i&&As(O(this,be),n,this.options,r)&&ve(this,ke,dn).call(this),this.updateResult(),i&&(O(this,be)!==n||xt(this.options.enabled,O(this,be))!==xt(r.enabled,O(this,be))||sr(this.options.staleTime,O(this,be))!==sr(r.staleTime,O(this,be)))&&ve(this,ke,pa).call(this);const a=ve(this,ke,da).call(this);i&&(O(this,be)!==n||xt(this.options.enabled,O(this,be))!==xt(r.enabled,O(this,be))||a!==O(this,ir))&&ve(this,ke,fa).call(this,a)}getOptimisticResult(t){const r=O(this,at).getQueryCache().build(O(this,at),t),n=this.createResult(r,t);return Ou(this,n)&&(re(this,Je,n),re(this,en,this.options),re(this,Cr,O(this,be).state)),n}getCurrentResult(){return O(this,Je)}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,nn).add(t)}getCurrentQuery(){return O(this,be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=O(this,at).defaultQueryOptions(t),n=O(this,at).getQueryCache().build(O(this,at),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ve(this,ke,dn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,Je)))}createResult(t,r){var D;const n=O(this,be),i=this.options,a=O(this,Je),s=O(this,Cr),o=O(this,en),d=t!==n?t.state:O(this,Cn),{state:f}=t;let p={...f},m=!1,y;if(r._optimisticResults){const u=this.hasListeners(),M=!u&&Fs(t,r),N=u&&As(t,n,r,i);(M||N)&&(p={...p,...wl(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:T,errorUpdatedAt:h,status:C}=p;y=p.data;let v=!1;if(r.placeholderData!==void 0&&y===void 0&&C==="pending"){let u;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(u=a.data,v=!0):u=typeof r.placeholderData=="function"?r.placeholderData((D=O(this,rn))==null?void 0:D.state.data,O(this,rn)):r.placeholderData,u!==void 0&&(C="success",y=ca(a==null?void 0:a.data,u,r),m=!0)}if(r.select&&y!==void 0&&!v)if(a&&y===(s==null?void 0:s.data)&&r.select===O(this,En))y=O(this,tn);else try{re(this,En,r.select),y=r.select(y),y=ca(a==null?void 0:a.data,y,r),re(this,tn,y),re(this,nr,null)}catch(u){re(this,nr,u)}O(this,nr)&&(T=O(this,nr),y=O(this,tn),h=Date.now(),C="error");const S=p.fetchStatus==="fetching",P=C==="pending",w=C==="error",b=P&&S,_=y!==void 0,F={status:C,fetchStatus:p.fetchStatus,isPending:P,isSuccess:C==="success",isError:w,isInitialLoading:b,isLoading:b,data:y,dataUpdatedAt:p.dataUpdatedAt,error:T,errorUpdatedAt:h,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!P,isLoadingError:w&&!_,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:w&&_,isStale:La(t,r),refetch:this.refetch,promise:O(this,rr),isEnabled:xt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const u=A=>{F.status==="error"?A.reject(F.error):F.data!==void 0&&A.resolve(F.data)},M=()=>{const A=re(this,rr,F.promise=ua());u(A)},N=O(this,rr);switch(N.status){case"pending":t.queryHash===n.queryHash&&u(N);break;case"fulfilled":(F.status==="error"||F.data!==N.value)&&M();break;case"rejected":(F.status!=="error"||F.error!==N.reason)&&M();break}}return F}updateResult(){const t=O(this,Je),r=this.createResult(O(this,be),this.options);if(re(this,Cr,O(this,be).state),re(this,en,this.options),O(this,Cr).data!==void 0&&re(this,rn,O(this,be)),oa(r,t))return;re(this,Je,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!O(this,nn).size)return!0;const s=new Set(a??O(this,nn));return this.options.throwOnError&&s.add("error"),Object.keys(O(this,Je)).some(o=>{const l=o;return O(this,Je)[l]!==t[l]&&s.has(l)})};ve(this,ke,Sl).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,ke,ha).call(this)}},at=new WeakMap,be=new WeakMap,Cn=new WeakMap,Je=new WeakMap,Cr=new WeakMap,en=new WeakMap,rr=new WeakMap,nr=new WeakMap,En=new WeakMap,tn=new WeakMap,rn=new WeakMap,Er=new WeakMap,kr=new WeakMap,ir=new WeakMap,nn=new WeakMap,ke=new WeakSet,dn=function(t){ve(this,ke,ga).call(this);let r=O(this,be).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(st)),r},pa=function(){ve(this,ke,ma).call(this);const t=sr(this.options.staleTime,O(this,be));if(Or||O(this,Je).isStale||!aa(t))return;const n=ml(O(this,Je).dataUpdatedAt,t)+1;re(this,Er,setTimeout(()=>{O(this,Je).isStale||this.updateResult()},n))},da=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,be)):this.options.refetchInterval)??!1},fa=function(t){ve(this,ke,ya).call(this),re(this,ir,t),!(Or||xt(this.options.enabled,O(this,be))===!1||!aa(O(this,ir))||O(this,ir)===0)&&re(this,kr,setInterval(()=>{(this.options.refetchIntervalInBackground||Na.isFocused())&&ve(this,ke,dn).call(this)},O(this,ir)))},ha=function(){ve(this,ke,pa).call(this),ve(this,ke,fa).call(this,ve(this,ke,da).call(this))},ma=function(){O(this,Er)&&(clearTimeout(O(this,Er)),re(this,Er,void 0))},ya=function(){O(this,kr)&&(clearInterval(O(this,kr)),re(this,kr,void 0))},ga=function(){const t=O(this,at).getQueryCache().build(O(this,at),this.options);if(t===O(this,be))return;const r=O(this,be);re(this,be,t),re(this,Cn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Sl=function(t){Ge.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(O(this,Je))}),O(this,at).getQueryCache().notify({query:O(this,be),type:"observerResultsUpdated"})})},Xo);function ju(e,t){return xt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Fs(e,t){return ju(e,t)||e.state.data!==void 0&&xa(e,t,t.refetchOnMount)}function xa(e,t,r){if(xt(t.enabled,e)!==!1&&sr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&La(e,t)}return!1}function As(e,t,r,n){return(e!==t||xt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&La(e,r)}function La(e,t){return xt(t.enabled,e)!==!1&&e.isStaleByTime(sr(t.staleTime,e))}function Ou(e,t){return!oa(e.getCurrentResult(),t)}var Cl=ne.createContext(void 0),Fu=e=>{const t=ne.useContext(Cl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Au=({client:e,children:t})=>(ne.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(Cl.Provider,{value:e,children:t})),El=ne.createContext(!1),_u=()=>ne.useContext(El);El.Provider;function Ru(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $u=ne.createContext(Ru()),Du=()=>ne.useContext($u),Pu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Mu=e=>{ne.useEffect(()=>{e.clearReset()},[e])},Iu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||du(r,[e.error,n])),zu=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Vu=(e,t)=>e.isLoading&&e.isFetching&&!t,Bu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,_s=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Nu(e,t,r){var p,m,y,T,h;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=_u(),i=Du(),a=Fu(),s=a.defaultQueryOptions(e);(m=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||m.call(p,s),process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),s._optimisticResults=n?"isRestoring":"optimistic",zu(s),Pu(s,i),Mu(i);const o=!a.getQueryCache().get(s.queryHash),[l]=ne.useState(()=>new t(a,s)),d=l.getOptimisticResult(s),f=!n&&e.subscribed!==!1;if(ne.useSyncExternalStore(ne.useCallback(C=>{const v=f?l.subscribe(Ge.batchCalls(C)):st;return l.updateResult(),v},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),ne.useEffect(()=>{l.setOptions(s)},[s,l]),Bu(s,d))throw _s(s,l,i);if(Iu({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw d.error;if((T=(y=a.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||T.call(y,s,d),s.experimental_prefetchInRender&&!Or&&Vu(d,n)){const C=o?_s(s,l,i):(h=a.getQueryCache().get(s.queryHash))==null?void 0:h.promise;C==null||C.catch(st).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?d:l.trackResult(d)}function Lu(e,t){return Nu(e,Tu)}function qa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $n={exports:{}},Dn={exports:{}},Ce={};/** @license React v16.13.1
|
|
1
|
+
"use strict";var Mc=Object.defineProperty;var ps=e=>{throw TypeError(e)};var Ic=(e,t,r)=>t in e?Mc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ln=(e,t,r)=>Ic(e,typeof t!="symbol"?t+"":t,r),Ai=(e,t,r)=>t.has(e)||ps("Cannot "+r);var O=(e,t,r)=>(Ai(e,t,"read from private field"),r?r.call(e):t.get(e)),ye=(e,t,r)=>t.has(e)?ps("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),re=(e,t,r,n)=>(Ai(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ve=(e,t,r)=>(Ai(e,t,"access private method"),r);var _n=(e,t,r,n)=>({set _(i){re(e,t,i,r)},get _(){return O(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),$=require("react"),x=require("@mui/material"),zc=require("@emotion/styled"),Ar=require("@emotion/react");function Vc(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 ne=Vc($);var kn=e=>e.type==="checkbox",mr=e=>e instanceof Date,tt=e=>e==null;const Jo=e=>typeof e=="object";var We=e=>!tt(e)&&!Array.isArray(e)&&Jo(e)&&!mr(e),el=e=>We(e)&&e.target?kn(e.target)?e.target.checked:e.target.value:e,Bc=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,tl=(e,t)=>e.has(Bc(t)),Nc=e=>{const t=e.constructor&&e.constructor.prototype;return We(t)&&t.hasOwnProperty("isPrototypeOf")},Ma=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Me(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(!(Ma&&(e instanceof Blob||n))&&(r||We(e)))if(t=r?[]:{},!r&&!Nc(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Me(e[i]));else return e;return t}var mi=e=>/^\w*$/.test(e),Re=e=>e===void 0,yi=e=>Array.isArray(e)?e.filter(Boolean):[],Ia=e=>yi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Z=(e,t,r)=>{if(!t||!We(e))return r;const n=(mi(t)?[t]:Ia(t)).reduce((i,a)=>tt(i)?i:i[a],e);return Re(n)||n===e?Re(e[t])?r:e[t]:n},pt=e=>typeof e=="boolean",we=(e,t,r)=>{let n=-1;const i=mi(t)?[t]:Ia(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let l=r;if(n!==s){const d=e[o];l=We(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=l,e=e[o]}};const Qn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},wt={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"},rl=$.createContext(null);rl.displayName="HookFormContext";const gi=()=>$.useContext(rl);var nl=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const s=a;return t._proxyFormState[s]!==wt.all&&(t._proxyFormState[s]=!n||wt.all),r&&(r[s]=!0),e[s]}});return i};const xi=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function Lc(e){const t=gi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=$.useState(r._formState),l=$.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return xi(()=>r._subscribe({name:i,formState:l.current,exact:a,callback:d=>{!n&&o({...r._formState,...d})}}),[i,n,a]),$.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),$.useMemo(()=>nl(s,r,l.current,!1),[s,r])}var It=e=>typeof e=="string",il=(e,t,r,n,i)=>It(e)?(n&&t.watch.add(e),Z(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),Z(r,a))):(n&&(t.watchAll=!0),r);function al(e){const t=gi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=$.useRef(i),[l,d]=$.useState(r._getWatch(n,o.current));return xi(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:f=>!a&&d(il(n,r._names,f.values||r._formValues,!1,o.current))}),[n,r,a,s]),$.useEffect(()=>r._removeUnmounted()),l}function qc(e){const t=gi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=tl(i._names.array,r),o=al({control:i,name:r,defaultValue:Z(i._formValues,r,Z(i._defaultValues,r,e.defaultValue)),exact:!0}),l=Lc({control:i,name:r,exact:!0}),d=$.useRef(e),f=$.useRef(i.register(r,{...e.rules,value:o,...pt(e.disabled)?{disabled:e.disabled}:{}})),p=$.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Z(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!Z(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Z(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Z(l.validatingFields,r)},error:{enumerable:!0,get:()=>Z(l.errors,r)}}),[l,r]),m=$.useCallback(C=>f.current.onChange({target:{value:el(C),name:r},type:Qn.CHANGE}),[r]),y=$.useCallback(()=>f.current.onBlur({target:{value:Z(i._formValues,r),name:r},type:Qn.BLUR}),[r,i._formValues]),T=$.useCallback(C=>{const v=Z(i._fields,r);v&&C&&(v._f.ref={focus:()=>C.focus&&C.focus(),select:()=>C.select&&C.select(),setCustomValidity:S=>C.setCustomValidity(S),reportValidity:()=>C.reportValidity()})},[i._fields,r]),h=$.useMemo(()=>({name:r,value:o,...pt(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:m,onBlur:y,ref:T}),[r,n,l.disabled,m,y,T,o]);return $.useEffect(()=>{const C=i._options.shouldUnregister||a;i.register(r,{...d.current.rules,...pt(d.current.disabled)?{disabled:d.current.disabled}:{}});const v=(S,P)=>{const w=Z(i._fields,S);w&&w._f&&(w._f.mount=P)};if(v(r,!0),C){const S=Me(Z(i._options.defaultValues,r));we(i._defaultValues,r,S),Re(Z(i._formValues,r))&&we(i._formValues,r,S)}return!s&&i.register(r),()=>{(s?C&&!i._state.action:C)?i.unregister(r):v(r,!1)}},[r,i,s,a]),$.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),$.useMemo(()=>({field:h,formState:l,fieldState:p}),[h,l,p])}const Pe=e=>e.render(qc(e));var sl=(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],ds=()=>{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=[]}}},ra=e=>tt(e)||!Jo(e);function Yt(e,t){if(ra(e)||ra(t))return e===t;if(mr(e)&&mr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const s=t[i];if(mr(a)&&mr(s)||We(a)&&We(s)||Array.isArray(a)&&Array.isArray(s)?!Yt(a,s):a!==s)return!1}}return!0}var et=e=>We(e)&&!Object.keys(e).length,za=e=>e.type==="file",jt=e=>typeof e=="function",Yn=e=>{if(!Ma)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ol=e=>e.type==="select-multiple",Va=e=>e.type==="radio",Wc=e=>Va(e)||kn(e),_i=e=>Yn(e)&&e.isConnected;function Uc(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Re(e)?n++:e[t[n++]];return e}function Hc(e){for(const t in e)if(e.hasOwnProperty(t)&&!Re(e[t]))return!1;return!0}function Ke(e,t){const r=Array.isArray(t)?t:mi(t)?[t]:Ia(t),n=r.length===1?e:Uc(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(We(n)&&et(n)||Array.isArray(n)&&Hc(n))&&Ke(e,r.slice(0,-1)),e}var ll=e=>{for(const t in e)if(jt(e[t]))return!0;return!1};function Zn(e,t={}){const r=Array.isArray(e);if(We(e)||r)for(const n in e)Array.isArray(e[n])||We(e[n])&&!ll(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Zn(e[n],t[n])):tt(e[n])||(t[n]=!0);return t}function cl(e,t,r){const n=Array.isArray(e);if(We(e)||n)for(const i in e)Array.isArray(e[i])||We(e[i])&&!ll(e[i])?Re(t)||ra(r[i])?r[i]=Array.isArray(e[i])?Zn(e[i],[]):{...Zn(e[i])}:cl(e[i],tt(t)?{}:t[i],r[i]):r[i]=!Yt(e[i],t[i]);return r}var cn=(e,t)=>cl(e,t,Zn(t));const fs={value:!1,isValid:!1},hs={value:!0,isValid:!0};var ul=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&&!Re(e[0].attributes.value)?Re(e[0].value)||e[0].value===""?hs:{value:e[0].value,isValid:!0}:hs:fs}return fs},pl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Re(e)?e:t?e===""?NaN:e&&+e:r&&It(e)?new Date(e):n?n(e):e;const ms={isValid:!1,value:null};var dl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,ms):ms;function ys(e){const t=e.ref;return za(t)?t.files:Va(t)?dl(e.refs).value:ol(t)?[...t.selectedOptions].map(({value:r})=>r):kn(t)?ul(e.refs).value:pl(Re(t.value)?e.ref.value:t.value,e)}var Kc=(e,t,r,n)=>{const i={};for(const a of e){const s=Z(t,a);s&&we(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Xn=e=>e instanceof RegExp,un=e=>Re(e)?e:Xn(e)?e.source:We(e)?Xn(e.value)?e.value.source:e.value:e,Lr=e=>({isOnSubmit:!e||e===wt.onSubmit,isOnBlur:e===wt.onBlur,isOnChange:e===wt.onChange,isOnAll:e===wt.all,isOnTouch:e===wt.onTouched});const gs="AsyncFunction";var Gc=e=>!!e&&!!e.validate&&!!(jt(e.validate)&&e.validate.constructor.name===gs||We(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===gs)),Qc=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),na=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Wr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=Z(e,i);if(a){const{_f:s,...o}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Wr(o,t))break}else if(We(o)&&Wr(o,t))break}}};function xs(e,t,r){const n=Z(e,r);if(n||mi(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=Z(t,a),o=Z(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};i.pop()}return{name:r}}var Yc=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return et(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||wt.all))},Zc=(e,t,r)=>!e||!t||e===t||ct(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Xc=(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,Jc=(e,t)=>!yi(Z(e,t)).length&&Ke(e,t),fl=(e,t,r)=>{const n=ct(Z(e,r));return we(n,"root",t[r]),we(e,r,n),e},qn=e=>It(e);function vs(e,t,r="validate"){if(qn(e)||Array.isArray(e)&&e.every(qn)||pt(e)&&!e)return{type:r,message:qn(e)?e:"",ref:t}}var Pr=e=>We(e)&&!Xn(e)?e:{value:e,message:""},ia=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:l,maxLength:d,minLength:f,min:p,max:m,pattern:y,validate:T,name:h,valueAsNumber:C,mount:v}=e._f,S=Z(r,h);if(!v||t.has(h))return{};const P=o?o[0]:s,w=N=>{i&&P.reportValidity&&(P.setCustomValidity(pt(N)?"":N||""),P.reportValidity())},b={},_=Va(s),z=kn(s),F=_||z,D=(C||za(s))&&Re(s.value)&&Re(S)||Yn(s)&&s.value===""||S===""||Array.isArray(S)&&!S.length,u=sl.bind(null,h,n,b),M=(N,A,L,G=zt.maxLength,se=zt.minLength)=>{const me=N?A:L;b[h]={type:N?G:se,message:me,ref:s,...u(N?G:se,me)}};if(a?!Array.isArray(S)||!S.length:l&&(!F&&(D||tt(S))||pt(S)&&!S||z&&!ul(o).isValid||_&&!dl(o).isValid)){const{value:N,message:A}=qn(l)?{value:!!l,message:l}:Pr(l);if(N&&(b[h]={type:zt.required,message:A,ref:P,...u(zt.required,A)},!n))return w(A),b}if(!D&&(!tt(p)||!tt(m))){let N,A;const L=Pr(m),G=Pr(p);if(!tt(S)&&!isNaN(S)){const se=s.valueAsNumber||S&&+S;tt(L.value)||(N=se>L.value),tt(G.value)||(A=se<G.value)}else{const se=s.valueAsDate||new Date(S),me=B=>new Date(new Date().toDateString()+" "+B),ue=s.type=="time",K=s.type=="week";It(L.value)&&S&&(N=ue?me(S)>me(L.value):K?S>L.value:se>new Date(L.value)),It(G.value)&&S&&(A=ue?me(S)<me(G.value):K?S<G.value:se<new Date(G.value))}if((N||A)&&(M(!!N,L.message,G.message,zt.max,zt.min),!n))return w(b[h].message),b}if((d||f)&&!D&&(It(S)||a&&Array.isArray(S))){const N=Pr(d),A=Pr(f),L=!tt(N.value)&&S.length>+N.value,G=!tt(A.value)&&S.length<+A.value;if((L||G)&&(M(L,N.message,A.message),!n))return w(b[h].message),b}if(y&&!D&&It(S)){const{value:N,message:A}=Pr(y);if(Xn(N)&&!S.match(N)&&(b[h]={type:zt.pattern,message:A,ref:s,...u(zt.pattern,A)},!n))return w(A),b}if(T){if(jt(T)){const N=await T(S,r),A=vs(N,P);if(A&&(b[h]={...A,...u(zt.validate,A.message)},!n))return w(A.message),b}else if(We(T)){let N={};for(const A in T){if(!et(N)&&!n)break;const L=vs(await T[A](S,r),P,A);L&&(N={...L,...u(A,L.message)},w(L.message),n&&(b[h]=N))}if(!et(N)&&(b[h]={ref:P,...N},!n))return b}}return w(!0),b};const eu={mode:wt.onSubmit,reValidateMode:wt.onChange,shouldFocusError:!0};function tu(e={}){let t={...eu,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:jt(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=We(t.defaultValues)||We(t.values)?Me(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Me(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let p={...f};const m={array:ds(),state:ds()},y=t.criteriaMode===wt.all,T=g=>E=>{clearTimeout(d),d=setTimeout(g,E)},h=async g=>{if(!t.disabled&&(f.isValid||p.isValid||g)){const E=t.resolver?et((await z()).errors):await D(n,!0);E!==r.isValid&&m.state.next({isValid:E})}},C=(g,E)=>{!t.disabled&&(f.isValidating||f.validatingFields||p.isValidating||p.validatingFields)&&((g||Array.from(o.mount)).forEach(j=>{j&&(E?we(r.validatingFields,j,E):Ke(r.validatingFields,j))}),m.state.next({validatingFields:r.validatingFields,isValidating:!et(r.validatingFields)}))},v=(g,E=[],j,U,R=!0,I=!0)=>{if(U&&j&&!t.disabled){if(s.action=!0,I&&Array.isArray(Z(n,g))){const Y=j(Z(n,g),U.argA,U.argB);R&&we(n,g,Y)}if(I&&Array.isArray(Z(r.errors,g))){const Y=j(Z(r.errors,g),U.argA,U.argB);R&&we(r.errors,g,Y),Jc(r.errors,g)}if((f.touchedFields||p.touchedFields)&&I&&Array.isArray(Z(r.touchedFields,g))){const Y=j(Z(r.touchedFields,g),U.argA,U.argB);R&&we(r.touchedFields,g,Y)}(f.dirtyFields||p.dirtyFields)&&(r.dirtyFields=cn(i,a)),m.state.next({name:g,isDirty:M(g,E),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else we(a,g,E)},S=(g,E)=>{we(r.errors,g,E),m.state.next({errors:r.errors})},P=g=>{r.errors=g,m.state.next({errors:r.errors,isValid:!1})},w=(g,E,j,U)=>{const R=Z(n,g);if(R){const I=Z(a,g,Re(j)?Z(i,g):j);Re(I)||U&&U.defaultChecked||E?we(a,g,E?I:ys(R._f)):L(g,I),s.mount&&h()}},b=(g,E,j,U,R)=>{let I=!1,Y=!1;const ie={name:g};if(!t.disabled){if(!j||U){(f.isDirty||p.isDirty)&&(Y=r.isDirty,r.isDirty=ie.isDirty=M(),I=Y!==ie.isDirty);const W=Yt(Z(i,g),E);Y=!!Z(r.dirtyFields,g),W?Ke(r.dirtyFields,g):we(r.dirtyFields,g,!0),ie.dirtyFields=r.dirtyFields,I=I||(f.dirtyFields||p.dirtyFields)&&Y!==!W}if(j){const W=Z(r.touchedFields,g);W||(we(r.touchedFields,g,j),ie.touchedFields=r.touchedFields,I=I||(f.touchedFields||p.touchedFields)&&W!==j)}I&&R&&m.state.next(ie)}return I?ie:{}},_=(g,E,j,U)=>{const R=Z(r.errors,g),I=(f.isValid||p.isValid)&&pt(E)&&r.isValid!==E;if(t.delayError&&j?(l=T(()=>S(g,j)),l(t.delayError)):(clearTimeout(d),l=null,j?we(r.errors,g,j):Ke(r.errors,g)),(j?!Yt(R,j):R)||!et(U)||I){const Y={...U,...I&&pt(E)?{isValid:E}:{},errors:r.errors,name:g};r={...r,...Y},m.state.next(Y)}},z=async g=>{C(g,!0);const E=await t.resolver(a,t.context,Kc(g||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return C(g),E},F=async g=>{const{errors:E}=await z(g);if(g)for(const j of g){const U=Z(E,j);U?we(r.errors,j,U):Ke(r.errors,j)}else r.errors=E;return E},D=async(g,E,j={valid:!0})=>{for(const U in g){const R=g[U];if(R){const{_f:I,...Y}=R;if(I){const ie=o.array.has(I.name),W=R._f&&Gc(R._f);W&&f.validatingFields&&C([U],!0);const xe=await ia(R,o.disabled,a,y,t.shouldUseNativeValidation&&!E,ie);if(W&&f.validatingFields&&C([U]),xe[I.name]&&(j.valid=!1,E))break;!E&&(Z(xe,I.name)?ie?fl(r.errors,xe,I.name):we(r.errors,I.name,xe[I.name]):Ke(r.errors,I.name))}!et(Y)&&await D(Y,E,j)}}return j.valid},u=()=>{for(const g of o.unMount){const E=Z(n,g);E&&(E._f.refs?E._f.refs.every(j=>!_i(j)):!_i(E._f.ref))&&ee(g)}o.unMount=new Set},M=(g,E)=>!t.disabled&&(g&&E&&we(a,g,E),!Yt(B(),i)),N=(g,E,j)=>il(g,o,{...s.mount?a:Re(E)?i:It(g)?{[g]:E}:E},j,E),A=g=>yi(Z(s.mount?a:i,g,t.shouldUnregister?Z(i,g,[]):[])),L=(g,E,j={})=>{const U=Z(n,g);let R=E;if(U){const I=U._f;I&&(!I.disabled&&we(a,g,pl(E,I)),R=Yn(I.ref)&&tt(E)?"":E,ol(I.ref)?[...I.ref.options].forEach(Y=>Y.selected=R.includes(Y.value)):I.refs?kn(I.ref)?I.refs.forEach(Y=>{(!Y.defaultChecked||!Y.disabled)&&(Array.isArray(R)?Y.checked=!!R.find(ie=>ie===Y.value):Y.checked=R===Y.value||!!R)}):I.refs.forEach(Y=>Y.checked=Y.value===R):za(I.ref)?I.ref.value="":(I.ref.value=R,I.ref.type||m.state.next({name:g,values:Me(a)})))}(j.shouldDirty||j.shouldTouch)&&b(g,R,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&K(g)},G=(g,E,j)=>{for(const U in E){if(!E.hasOwnProperty(U))return;const R=E[U],I=g+"."+U,Y=Z(n,I);(o.array.has(g)||We(R)||Y&&!Y._f)&&!mr(R)?G(I,R,j):L(I,R,j)}},se=(g,E,j={})=>{const U=Z(n,g),R=o.array.has(g),I=Me(E);we(a,g,I),R?(m.array.next({name:g,values:Me(a)}),(f.isDirty||f.dirtyFields||p.isDirty||p.dirtyFields)&&j.shouldDirty&&m.state.next({name:g,dirtyFields:cn(i,a),isDirty:M(g,I)})):U&&!U._f&&!tt(I)?G(g,I,j):L(g,I,j),na(g,o)&&m.state.next({...r}),m.state.next({name:s.mount?g:void 0,values:Me(a)})},me=async g=>{s.mount=!0;const E=g.target;let j=E.name,U=!0;const R=Z(n,j),I=W=>{U=Number.isNaN(W)||mr(W)&&isNaN(W.getTime())||Yt(W,Z(a,j,W))},Y=Lr(t.mode),ie=Lr(t.reValidateMode);if(R){let W,xe;const Te=E.type?ys(R._f):el(g),je=g.type===Qn.BLUR||g.type===Qn.FOCUS_OUT,Ve=!Qc(R._f)&&!t.resolver&&!Z(r.errors,j)&&!R._f.deps||Xc(je,Z(r.touchedFields,j),r.isSubmitted,ie,Y),qe=na(j,o,je);we(a,j,Te),je?(R._f.onBlur&&R._f.onBlur(g),l&&l(0)):R._f.onChange&&R._f.onChange(g);const Ze=b(j,Te,je),Ft=!et(Ze)||qe;if(!je&&m.state.next({name:j,type:g.type,values:Me(a)}),Ve)return(f.isValid||p.isValid)&&(t.mode==="onBlur"?je&&h():je||h()),Ft&&m.state.next({name:j,...qe?{}:Ze});if(!je&&qe&&m.state.next({...r}),t.resolver){const{errors:nt}=await z([j]);if(I(Te),U){const ut=xs(r.errors,n,j),Et=xs(nt,n,ut.name||j);W=Et.error,j=Et.name,xe=et(nt)}}else C([j],!0),W=(await ia(R,o.disabled,a,y,t.shouldUseNativeValidation))[j],C([j]),I(Te),U&&(W?xe=!1:(f.isValid||p.isValid)&&(xe=await D(n,!0)));U&&(R._f.deps&&K(R._f.deps),_(j,xe,W,Ze))}},ue=(g,E)=>{if(Z(r.errors,E)&&g.focus)return g.focus(),1},K=async(g,E={})=>{let j,U;const R=ct(g);if(t.resolver){const I=await F(Re(g)?g:R);j=et(I),U=g?!R.some(Y=>Z(I,Y)):j}else g?(U=(await Promise.all(R.map(async I=>{const Y=Z(n,I);return await D(Y&&Y._f?{[I]:Y}:Y)}))).every(Boolean),!(!U&&!r.isValid)&&h()):U=j=await D(n);return m.state.next({...!It(g)||(f.isValid||p.isValid)&&j!==r.isValid?{}:{name:g},...t.resolver||!g?{isValid:j}:{},errors:r.errors}),E.shouldFocus&&!U&&Wr(n,ue,g?R:o.mount),U},B=g=>{const E={...s.mount?a:i};return Re(g)?E:It(g)?Z(E,g):g.map(j=>Z(E,j))},H=(g,E)=>({invalid:!!Z((E||r).errors,g),isDirty:!!Z((E||r).dirtyFields,g),error:Z((E||r).errors,g),isValidating:!!Z(r.validatingFields,g),isTouched:!!Z((E||r).touchedFields,g)}),de=g=>{g&&ct(g).forEach(E=>Ke(r.errors,E)),m.state.next({errors:g?r.errors:{}})},fe=(g,E,j)=>{const U=(Z(n,g,{_f:{}})._f||{}).ref,R=Z(r.errors,g)||{},{ref:I,message:Y,type:ie,...W}=R;we(r.errors,g,{...W,...E,ref:U}),m.state.next({name:g,errors:r.errors,isValid:!1}),j&&j.shouldFocus&&U&&U.focus&&U.focus()},pe=(g,E)=>jt(g)?m.state.subscribe({next:j=>g(N(void 0,E),j)}):N(g,E,!0),ge=g=>m.state.subscribe({next:E=>{Zc(g.name,E.name,g.exact)&&Yc(E,g.formState||f,ce,g.reRenderRoot)&&g.callback({values:{...a},...r,...E})}}).unsubscribe,q=g=>(s.mount=!0,p={...p,...g.formState},ge({...g,formState:p})),ee=(g,E={})=>{for(const j of g?ct(g):o.mount)o.mount.delete(j),o.array.delete(j),E.keepValue||(Ke(n,j),Ke(a,j)),!E.keepError&&Ke(r.errors,j),!E.keepDirty&&Ke(r.dirtyFields,j),!E.keepTouched&&Ke(r.touchedFields,j),!E.keepIsValidating&&Ke(r.validatingFields,j),!t.shouldUnregister&&!E.keepDefaultValue&&Ke(i,j);m.state.next({values:Me(a)}),m.state.next({...r,...E.keepDirty?{isDirty:M()}:{}}),!E.keepIsValid&&h()},ae=({disabled:g,name:E})=>{(pt(g)&&s.mount||g||o.disabled.has(E))&&(g?o.disabled.add(E):o.disabled.delete(E))},oe=(g,E={})=>{let j=Z(n,g);const U=pt(E.disabled)||pt(t.disabled);return we(n,g,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:g}},name:g,mount:!0,...E}}),o.mount.add(g),j?ae({disabled:pt(E.disabled)?E.disabled:t.disabled,name:g}):w(g,!0,E.value),{...U?{disabled:E.disabled||t.disabled}:{},...t.progressive?{required:!!E.required,min:un(E.min),max:un(E.max),minLength:un(E.minLength),maxLength:un(E.maxLength),pattern:un(E.pattern)}:{},name:g,onChange:me,onBlur:me,ref:R=>{if(R){oe(g,E),j=Z(n,g);const I=Re(R.value)&&R.querySelectorAll&&R.querySelectorAll("input,select,textarea")[0]||R,Y=Wc(I),ie=j._f.refs||[];if(Y?ie.find(W=>W===I):I===j._f.ref)return;we(n,g,{_f:{...j._f,...Y?{refs:[...ie.filter(_i),I,...Array.isArray(Z(i,g))?[{}]:[]],ref:{type:I.type,name:g}}:{ref:I}}}),w(g,!1,void 0,I)}else j=Z(n,g,{}),j._f&&(j._f.mount=!1),(t.shouldUnregister||E.shouldUnregister)&&!(tl(o.array,g)&&s.action)&&o.unMount.add(g)}}},le=()=>t.shouldFocusError&&Wr(n,ue,o.mount),Se=g=>{pt(g)&&(m.state.next({disabled:g}),Wr(n,(E,j)=>{const U=Z(n,j);U&&(E.disabled=U._f.disabled||g,Array.isArray(U._f.refs)&&U._f.refs.forEach(R=>{R.disabled=U._f.disabled||g}))},0,!1))},Q=(g,E)=>async j=>{let U;j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let R=Me(a);if(m.state.next({isSubmitting:!0}),t.resolver){const{errors:I,values:Y}=await z();r.errors=I,R=Y}else await D(n);if(o.disabled.size)for(const I of o.disabled)we(R,I,void 0);if(Ke(r.errors,"root"),et(r.errors)){m.state.next({errors:{}});try{await g(R,j)}catch(I){U=I}}else E&&await E({...r.errors},j),le(),setTimeout(le);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:et(r.errors)&&!U,submitCount:r.submitCount+1,errors:r.errors}),U)throw U},De=(g,E={})=>{Z(n,g)&&(Re(E.defaultValue)?se(g,Me(Z(i,g))):(se(g,E.defaultValue),we(i,g,Me(E.defaultValue))),E.keepTouched||Ke(r.touchedFields,g),E.keepDirty||(Ke(r.dirtyFields,g),r.isDirty=E.defaultValue?M(g,Me(Z(i,g))):M()),E.keepError||(Ke(r.errors,g),f.isValid&&h()),m.state.next({...r}))},He=(g,E={})=>{const j=g?Me(g):i,U=Me(j),R=et(g),I=R?i:U;if(E.keepDefaultValues||(i=j),!E.keepValues){if(E.keepDirtyValues){const Y=new Set([...o.mount,...Object.keys(cn(i,a))]);for(const ie of Array.from(Y))Z(r.dirtyFields,ie)?we(I,ie,Z(a,ie)):se(ie,Z(I,ie))}else{if(Ma&&Re(g))for(const Y of o.mount){const ie=Z(n,Y);if(ie&&ie._f){const W=Array.isArray(ie._f.refs)?ie._f.refs[0]:ie._f.ref;if(Yn(W)){const xe=W.closest("form");if(xe){xe.reset();break}}}}for(const Y of o.mount)se(Y,Z(I,Y))}a=Me(I),m.array.next({values:{...I}}),m.state.next({values:{...I}})}o={mount:E.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!f.isValid||!!E.keepIsValid||!!E.keepDirtyValues,s.watch=!!t.shouldUnregister,m.state.next({submitCount:E.keepSubmitCount?r.submitCount:0,isDirty:R?!1:E.keepDirty?r.isDirty:!!(E.keepDefaultValues&&!Yt(g,i)),isSubmitted:E.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:R?{}:E.keepDirtyValues?E.keepDefaultValues&&a?cn(i,a):r.dirtyFields:E.keepDefaultValues&&g?cn(i,g):E.keepDirty?r.dirtyFields:{},touchedFields:E.keepTouched?r.touchedFields:{},errors:E.keepErrors?r.errors:{},isSubmitSuccessful:E.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Qe=(g,E)=>He(jt(g)?g(a):g,E),X=(g,E={})=>{const j=Z(n,g),U=j&&j._f;if(U){const R=U.refs?U.refs[0]:U.ref;R.focus&&(R.focus(),E.shouldSelect&&jt(R.select)&&R.select())}},ce=g=>{r={...r,...g}},he={control:{register:oe,unregister:ee,getFieldState:H,handleSubmit:Q,setError:fe,_subscribe:ge,_runSchema:z,_focusError:le,_getWatch:N,_getDirty:M,_setValid:h,_setFieldArray:v,_setDisabledField:ae,_setErrors:P,_getFieldArray:A,_reset:He,_resetDefaultValues:()=>jt(t.defaultValues)&&t.defaultValues().then(g=>{Qe(g,t.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:u,_disableForm:Se,_subjects:m,_proxyFormState:f,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(g){s=g},get _defaultValues(){return i},get _names(){return o},set _names(g){o=g},get _formState(){return r},get _options(){return t},set _options(g){t={...t,...g}}},subscribe:q,trigger:K,register:oe,handleSubmit:Q,watch:pe,setValue:se,getValues:B,reset:Qe,resetField:De,clearErrors:de,unregister:ee,setError:fe,setFocus:X,getFieldState:H};return{...he,formControl:he}}var Ht=()=>{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)})},Ri=(e,t,r={})=>r.shouldFocus||Re(r.shouldFocus)?r.focusName||`${e}.${Re(r.focusIndex)?t:r.focusIndex}.`:"",$i=(e,t)=>[...e,...ct(t)],Di=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Pi(e,t,r){return[...e.slice(0,t),...ct(r),...e.slice(t)]}var Mi=(e,t,r)=>Array.isArray(e)?(Re(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Ii=(e,t)=>[...ct(t),...ct(e)];function ru(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return yi(n).length?n:[]}var zi=(e,t)=>Re(t)?[]:ru(e,ct(t).sort((r,n)=>r-n)),Vi=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},bs=(e,t,r)=>(e[t]=r,e);function nu(e){const t=gi(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a,rules:s}=e,[o,l]=$.useState(r._getFieldArray(n)),d=$.useRef(r._getFieldArray(n).map(Ht)),f=$.useRef(o),p=$.useRef(n),m=$.useRef(!1);p.current=n,f.current=o,r._names.array.add(n),s&&r.register(n,s),xi(()=>r._subjects.array.subscribe({next:({values:_,name:z})=>{if(z===p.current||!z){const F=Z(_,p.current);Array.isArray(F)&&(l(F),d.current=F.map(Ht))}}}).unsubscribe,[r]);const y=$.useCallback(_=>{m.current=!0,r._setFieldArray(n,_)},[r,n]),T=(_,z)=>{const F=ct(Me(_)),D=$i(r._getFieldArray(n),F);r._names.focus=Ri(n,D.length-1,z),d.current=$i(d.current,F.map(Ht)),y(D),l(D),r._setFieldArray(n,D,$i,{argA:Di(_)})},h=(_,z)=>{const F=ct(Me(_)),D=Ii(r._getFieldArray(n),F);r._names.focus=Ri(n,0,z),d.current=Ii(d.current,F.map(Ht)),y(D),l(D),r._setFieldArray(n,D,Ii,{argA:Di(_)})},C=_=>{const z=zi(r._getFieldArray(n),_);d.current=zi(d.current,_),y(z),l(z),!Array.isArray(Z(r._fields,n))&&we(r._fields,n,void 0),r._setFieldArray(n,z,zi,{argA:_})},v=(_,z,F)=>{const D=ct(Me(z)),u=Pi(r._getFieldArray(n),_,D);r._names.focus=Ri(n,_,F),d.current=Pi(d.current,_,D.map(Ht)),y(u),l(u),r._setFieldArray(n,u,Pi,{argA:_,argB:Di(z)})},S=(_,z)=>{const F=r._getFieldArray(n);Vi(F,_,z),Vi(d.current,_,z),y(F),l(F),r._setFieldArray(n,F,Vi,{argA:_,argB:z},!1)},P=(_,z)=>{const F=r._getFieldArray(n);Mi(F,_,z),Mi(d.current,_,z),y(F),l(F),r._setFieldArray(n,F,Mi,{argA:_,argB:z},!1)},w=(_,z)=>{const F=Me(z),D=bs(r._getFieldArray(n),_,F);d.current=[...D].map((u,M)=>!u||M===_?Ht():d.current[M]),y(D),l([...D]),r._setFieldArray(n,D,bs,{argA:_,argB:F},!0,!1)},b=_=>{const z=ct(Me(_));d.current=z.map(Ht),y([...z]),l([...z]),r._setFieldArray(n,[...z],F=>F,{},!0,!1)};return $.useEffect(()=>{if(r._state.action=!1,na(n,r._names)&&r._subjects.state.next({...r._formState}),m.current&&(!Lr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Lr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(_=>{const z=Z(_.errors,n),F=Z(r._formState.errors,n);(F?!z&&F.type||z&&(F.type!==z.type||F.message!==z.message):z&&z.type)&&(z?we(r._formState.errors,n,z):Ke(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const _=Z(r._fields,n);_&&_._f&&!(Lr(r._options.reValidateMode).isOnSubmit&&Lr(r._options.mode).isOnSubmit)&&ia(_,r._names.disabled,r._formValues,r._options.criteriaMode===wt.all,r._options.shouldUseNativeValidation,!0).then(z=>!et(z)&&r._subjects.state.next({errors:fl(r._formState.errors,z,n)}))}r._subjects.state.next({name:n,values:Me(r._formValues)}),r._names.focus&&Wr(r._fields,(_,z)=>{if(r._names.focus&&z.startsWith(r._names.focus)&&_.focus)return _.focus(),1}),r._names.focus="",r._setValid(),m.current=!1},[o,n,r]),$.useEffect(()=>(!Z(r._formValues,n)&&r._setFieldArray(n),()=>{const _=(z,F)=>{const D=Z(r._fields,z);D&&D._f&&(D._f.mount=F)};r._options.shouldUnregister||a?r.unregister(n):_(n,!1)}),[n,r,i,a]),{swap:$.useCallback(S,[y,n,r]),move:$.useCallback(P,[y,n,r]),prepend:$.useCallback(h,[y,n,r]),append:$.useCallback(T,[y,n,r]),remove:$.useCallback(C,[y,n,r]),insert:$.useCallback(v,[y,n,r]),update:$.useCallback(w,[y,n,r]),replace:$.useCallback(b,[y,n,r]),fields:$.useMemo(()=>o.map((_,z)=>({..._,[i]:d.current[z]||Ht()})),[o,i])}}function iu(e={}){const t=$.useRef(void 0),r=$.useRef(void 0),[n,i]=$.useState({isDirty:!1,isValidating:!1,isLoading:jt(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:jt(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!jt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=tu(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,xi(()=>{const s=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),a._formState.isReady=!0,s},[a]),$.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),$.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),$.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),$.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),$.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),$.useEffect(()=>{e.values&&!Yt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),$.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=nl(n,a),t.current}const ws=(e,t,r)=>{if(e&&"reportValidity"in e){const n=Z(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},hl=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?ws(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>ws(i,r,e))}},au=(e,t)=>{t.shouldUseNativeValidation&&hl(e,t);const r={};for(const n in e){const i=Z(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(su(t.names||Object.keys(e),n)){const s=Object.assign({},Z(r,n));we(s,"root",a),we(r,n,s)}else we(r,n,a)}return r},su=(e,t)=>{const r=Ss(t);return e.some(n=>Ss(n).match(`^${r}\\.\\d+`))};function Ss(e){return e.replace(/\]|\[/g,"")}function ou(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var l=(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(d){return a.shouldUseNativeValidation&&hl({},a),{values:r.raw?Object.assign({},n):d,errors:{}}}))}catch(d){return o(d)}return l&&l.then?l.then(void 0,o):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:au((o=s,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(d,f){if(d[f.path]||(d[f.path]={message:f.message,type:f.type}),l){var p=d[f.path].types,m=p&&p[f.type];d[f.path]=sl(f.path,l,d,f.type,m?[].concat(m,f.message):f.message)}return d},{})),a)};var o,l}))}catch(s){return Promise.reject(s)}}}var Tn=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(){}},Or=typeof window>"u"||"Deno"in globalThis;function st(){}function lu(e,t){return typeof e=="function"?e(t):e}function aa(e){return typeof e=="number"&&e>=0&&e!==1/0}function ml(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sr(e,t){return typeof e=="function"?e(t):e}function xt(e,t){return typeof e=="function"?e(t):e}function Cs(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Ba(s,t.options))return!1}else if(!xn(t.queryKey,s))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function Es(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(gn(t.options.mutationKey)!==gn(a))return!1}else if(!xn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ba(e,t){return((t==null?void 0:t.queryKeyHashFn)||gn)(e)}function gn(e){return JSON.stringify(e,(t,r)=>la(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function xn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>xn(e[r],t[r])):!1}function sa(e,t){if(e===t)return e;const r=ks(e)&&ks(t);if(r||la(e)&&la(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},l=new Set(n);let d=0;for(let f=0;f<s;f++){const p=r?f:a[f];(!r&&l.has(p)||r)&&e[p]===void 0&&t[p]===void 0?(o[p]=void 0,d++):(o[p]=sa(e[p],t[p]),o[p]===e[p]&&e[p]!==void 0&&d++)}return i===s&&d===i?e:o}return t}function oa(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 ks(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function la(e){if(!Ts(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Ts(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ts(e){return Object.prototype.toString.call(e)==="[object Object]"}function cu(e){return new Promise(t=>{setTimeout(t,e)})}function ca(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 sa(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 sa(e,t)}return t}function uu(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function pu(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Jn=Symbol();function yl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Jn&&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===Jn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function du(e,t){return typeof e=="function"?e(...t):!!e}var gr,Zt,Hr,Wo,fu=(Wo=class extends Tn{constructor(){super();ye(this,gr);ye(this,Zt);ye(this,Hr);re(this,Hr,t=>{if(!Or&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){O(this,Zt)||this.setEventListener(O(this,Hr))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Zt))==null||t.call(this),re(this,Zt,void 0))}setEventListener(t){var r;re(this,Hr,t),(r=O(this,Zt))==null||r.call(this),re(this,Zt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){O(this,gr)!==t&&(re(this,gr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof O(this,gr)=="boolean"?O(this,gr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},gr=new WeakMap,Zt=new WeakMap,Hr=new WeakMap,Wo),Na=new fu,Kr,Xt,Gr,Uo,hu=(Uo=class extends Tn{constructor(){super();ye(this,Kr,!0);ye(this,Xt);ye(this,Gr);re(this,Gr,t=>{if(!Or&&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,Xt)||this.setEventListener(O(this,Gr))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Xt))==null||t.call(this),re(this,Xt,void 0))}setEventListener(t){var r;re(this,Gr,t),(r=O(this,Xt))==null||r.call(this),re(this,Xt,t(this.setOnline.bind(this)))}setOnline(t){O(this,Kr)!==t&&(re(this,Kr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return O(this,Kr)}},Kr=new WeakMap,Xt=new WeakMap,Gr=new WeakMap,Uo),ei=new hu;function ua(){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 mu(e){return Math.min(1e3*2**e,3e4)}function gl(e){return(e??"online")==="online"?ei.isOnline():!0}var xl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Bi(e){return e instanceof xl}function vl(e){let t=!1,r=0,n=!1,i;const a=ua(),s=h=>{var C;n||(m(new xl(h)),(C=e.abort)==null||C.call(e))},o=()=>{t=!0},l=()=>{t=!1},d=()=>Na.isFocused()&&(e.networkMode==="always"||ei.isOnline())&&e.canRun(),f=()=>gl(e.networkMode)&&e.canRun(),p=h=>{var C;n||(n=!0,(C=e.onSuccess)==null||C.call(e,h),i==null||i(),a.resolve(h))},m=h=>{var C;n||(n=!0,(C=e.onError)==null||C.call(e,h),i==null||i(),a.reject(h))},y=()=>new Promise(h=>{var C;i=v=>{(n||d())&&h(v)},(C=e.onPause)==null||C.call(e)}).then(()=>{var h;i=void 0,n||(h=e.onContinue)==null||h.call(e)}),T=()=>{if(n)return;let h;const C=r===0?e.initialPromise:void 0;try{h=C??e.fn()}catch(v){h=Promise.reject(v)}Promise.resolve(h).then(p).catch(v=>{var _;if(n)return;const S=e.retry??(Or?0:3),P=e.retryDelay??mu,w=typeof P=="function"?P(r,v):P,b=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,v);if(t||!b){m(v);return}r++,(_=e.onFail)==null||_.call(e,r,v),cu(w).then(()=>d()?void 0:y()).then(()=>{t?m(v):T()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:l,canStart:f,start:()=>(f()?T():y().then(T),a)}}var yu=e=>setTimeout(e,0);function gu(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=yu;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(l=>{r(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{a(()=>{o(...l)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Ge=gu(),xr,Ho,bl=(Ho=class{constructor(){ye(this,xr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),aa(this.gcTime)&&re(this,xr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Or?1/0:5*60*1e3))}clearGcTimeout(){O(this,xr)&&(clearTimeout(O(this,xr)),re(this,xr,void 0))}},xr=new WeakMap,Ho),Qr,vr,gt,br,Ye,wn,wr,kt,qt,Ko,xu=(Ko=class extends bl{constructor(t){super();ye(this,kt);ye(this,Qr);ye(this,vr);ye(this,gt);ye(this,br);ye(this,Ye);ye(this,wn);ye(this,wr);re(this,wr,!1),re(this,wn,t.defaultOptions),this.setOptions(t.options),this.observers=[],re(this,br,t.client),re(this,gt,O(this,br).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,re(this,Qr,vu(this.options)),this.state=t.state??O(this,Qr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,Ye))==null?void 0:t.promise}setOptions(t){this.options={...O(this,wn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,gt).remove(this)}setData(t,r){const n=ca(this.state.data,t,this.options);return ve(this,kt,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){ve(this,kt,qt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=O(this,Ye))==null?void 0:n.promise;return(i=O(this,Ye))==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,Qr))}isActive(){return this.observers.some(t=>xt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Jn||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>sr(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:!ml(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,Ye))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,Ye))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,gt).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,Ye)&&(O(this,wr)?O(this,Ye).cancel({revert:!0}):O(this,Ye).cancelRetry()),this.scheduleGc()),O(this,gt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,kt,qt).call(this,{type:"invalidate"})}fetch(t,r){var d,f,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(O(this,Ye))return O(this,Ye).continueRetry(),O(this,Ye).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(y=>y.options.queryFn);m&&this.setOptions(m.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=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(re(this,wr,!0),n.signal)})},a=()=>{const m=yl(this.options,r),T=(()=>{const h={client:O(this,br),queryKey:this.queryKey,meta:this.meta};return i(h),h})();return re(this,wr,!1),this.options.persister?this.options.persister(m,T,this):m(T)},o=(()=>{const m={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:O(this,br),state:this.state,fetchFn:a};return i(m),m})();(d=this.options.behavior)==null||d.onFetch(o,this),re(this,vr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&ve(this,kt,qt).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const l=m=>{var y,T,h,C;Bi(m)&&m.silent||ve(this,kt,qt).call(this,{type:"error",error:m}),Bi(m)||((T=(y=O(this,gt).config).onError)==null||T.call(y,m,this),(C=(h=O(this,gt).config).onSettled)==null||C.call(h,this.state.data,m,this)),this.scheduleGc()};return re(this,Ye,vl({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:m=>{var y,T,h,C;if(m===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}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(v){l(v);return}(T=(y=O(this,gt).config).onSuccess)==null||T.call(y,m,this),(C=(h=O(this,gt).config).onSettled)==null||C.call(h,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,y)=>{ve(this,kt,qt).call(this,{type:"failed",failureCount:m,error:y})},onPause:()=>{ve(this,kt,qt).call(this,{type:"pause"})},onContinue:()=>{ve(this,kt,qt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),O(this,Ye).start()}},Qr=new WeakMap,vr=new WeakMap,gt=new WeakMap,br=new WeakMap,Ye=new WeakMap,wn=new WeakMap,wr=new WeakMap,kt=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,...wl(n.data,this.options),fetchMeta:t.meta??null};case"success":return re(this,vr,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 Bi(i)&&i.revert&&O(this,vr)?{...O(this,vr),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),Ge.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),O(this,gt).notify({query:this,type:"updated",action:t})})},Ko);function wl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vu(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 $t,Go,bu=(Go=class extends Tn{constructor(t={}){super();ye(this,$t);this.config=t,re(this,$t,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ba(i,r);let s=this.get(a);return s||(s=new xu({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){O(this,$t).has(t.queryHash)||(O(this,$t).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=O(this,$t).get(t.queryHash);r&&(t.destroy(),r===t&&O(this,$t).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,$t).get(t)}getAll(){return[...O(this,$t).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Cs(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Cs(t,n)):r}notify(t){Ge.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$t=new WeakMap,Go),Dt,Xe,Sr,Pt,Gt,Qo,wu=(Qo=class extends bl{constructor(t){super();ye(this,Pt);ye(this,Dt);ye(this,Xe);ye(this,Sr);this.mutationId=t.mutationId,re(this,Xe,t.mutationCache),re(this,Dt,[]),this.state=t.state||Su(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,Dt).includes(t)||(O(this,Dt).push(t),this.clearGcTimeout(),O(this,Xe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){re(this,Dt,O(this,Dt).filter(r=>r!==t)),this.scheduleGc(),O(this,Xe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():O(this,Xe).remove(this))}continue(){var t;return((t=O(this,Sr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,l,d,f,p,m,y,T,h,C,v,S,P,w,b,_,z,F;const r=()=>{ve(this,Pt,Gt).call(this,{type:"continue"})};re(this,Sr,vl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(D,u)=>{ve(this,Pt,Gt).call(this,{type:"failed",failureCount:D,error:u})},onPause:()=>{ve(this,Pt,Gt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,Xe).canRun(this)}));const n=this.state.status==="pending",i=!O(this,Sr).canStart();try{if(n)r();else{ve(this,Pt,Gt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=O(this,Xe).config).onMutate)==null?void 0:s.call(a,t,this));const u=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));u!==this.state.context&&ve(this,Pt,Gt).call(this,{type:"pending",context:u,variables:t,isPaused:i})}const D=await O(this,Sr).start();return await((f=(d=O(this,Xe).config).onSuccess)==null?void 0:f.call(d,D,t,this.state.context,this)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,D,t,this.state.context)),await((T=(y=O(this,Xe).config).onSettled)==null?void 0:T.call(y,D,null,this.state.variables,this.state.context,this)),await((C=(h=this.options).onSettled)==null?void 0:C.call(h,D,null,t,this.state.context)),ve(this,Pt,Gt).call(this,{type:"success",data:D}),D}catch(D){try{throw await((S=(v=O(this,Xe).config).onError)==null?void 0:S.call(v,D,t,this.state.context,this)),await((w=(P=this.options).onError)==null?void 0:w.call(P,D,t,this.state.context)),await((_=(b=O(this,Xe).config).onSettled)==null?void 0:_.call(b,void 0,D,this.state.variables,this.state.context,this)),await((F=(z=this.options).onSettled)==null?void 0:F.call(z,void 0,D,t,this.state.context)),D}finally{ve(this,Pt,Gt).call(this,{type:"error",error:D})}}finally{O(this,Xe).runNext(this)}}},Dt=new WeakMap,Xe=new WeakMap,Sr=new WeakMap,Pt=new WeakSet,Gt=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),Ge.batch(()=>{O(this,Dt).forEach(n=>{n.onMutationUpdate(t)}),O(this,Xe).notify({mutation:this,type:"updated",action:t})})},Qo);function Su(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Wt,Tt,Sn,Yo,Cu=(Yo=class extends Tn{constructor(t={}){super();ye(this,Wt);ye(this,Tt);ye(this,Sn);this.config=t,re(this,Wt,new Set),re(this,Tt,new Map),re(this,Sn,0)}build(t,r,n){const i=new wu({mutationCache:this,mutationId:++_n(this,Sn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){O(this,Wt).add(t);const r=Rn(t);if(typeof r=="string"){const n=O(this,Tt).get(r);n?n.push(t):O(this,Tt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,Wt).delete(t)){const r=Rn(t);if(typeof r=="string"){const n=O(this,Tt).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,Tt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Rn(t);if(typeof r=="string"){const n=O(this,Tt).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=Rn(t);if(typeof r=="string"){const i=(n=O(this,Tt).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(){Ge.batch(()=>{O(this,Wt).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,Wt).clear(),O(this,Tt).clear()})}getAll(){return Array.from(O(this,Wt))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Es(r,n))}findAll(t={}){return this.getAll().filter(r=>Es(t,r))}notify(t){Ge.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ge.batch(()=>Promise.all(t.map(r=>r.continue().catch(st))))}},Wt=new WeakMap,Tt=new WeakMap,Sn=new WeakMap,Yo);function Rn(e){var t;return(t=e.options.scope)==null?void 0:t.id}function js(e){return{onFetch:(t,r)=>{var f,p,m,y,T;const n=t.options,i=(m=(p=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,a=((y=t.state.data)==null?void 0:y.pages)||[],s=((T=t.state.data)==null?void 0:T.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const d=async()=>{let h=!1;const C=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},v=yl(t.options,t.fetchOptions),S=async(P,w,b)=>{if(h)return Promise.reject();if(w==null&&P.pages.length)return Promise.resolve(P);const z=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:w,direction:b?"backward":"forward",meta:t.options.meta};return C(M),M})(),F=await v(z),{maxPages:D}=t.options,u=b?pu:uu;return{pages:u(P.pages,F,D),pageParams:u(P.pageParams,w,D)}};if(i&&a.length){const P=i==="backward",w=P?Eu:Os,b={pages:a,pageParams:s},_=w(n,b);o=await S(b,_,P)}else{const P=e??a.length;do{const w=l===0?s[0]??n.initialPageParam:Os(n,o);if(l>0&&w==null)break;o=await S(o,w),l++}while(l<P)}return o};t.options.persister?t.fetchFn=()=>{var h,C;return(C=(h=t.options).persister)==null?void 0:C.call(h,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function Os(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 Eu(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 Le,Jt,er,Yr,Zr,tr,Xr,Jr,Zo,ku=(Zo=class{constructor(e={}){ye(this,Le);ye(this,Jt);ye(this,er);ye(this,Yr);ye(this,Zr);ye(this,tr);ye(this,Xr);ye(this,Jr);re(this,Le,e.queryCache||new bu),re(this,Jt,e.mutationCache||new Cu),re(this,er,e.defaultOptions||{}),re(this,Yr,new Map),re(this,Zr,new Map),re(this,tr,0)}mount(){_n(this,tr)._++,O(this,tr)===1&&(re(this,Xr,Na.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Le).onFocus())})),re(this,Jr,ei.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Le).onOnline())})))}unmount(){var e,t;_n(this,tr)._--,O(this,tr)===0&&((e=O(this,Xr))==null||e.call(this),re(this,Xr,void 0),(t=O(this,Jr))==null||t.call(this),re(this,Jr,void 0))}isFetching(e){return O(this,Le).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,Jt).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=O(this,Le).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=O(this,Le).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(sr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return O(this,Le).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,Le).get(n.queryHash),a=i==null?void 0:i.state.data,s=lu(t,a);if(s!==void 0)return O(this,Le).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ge.batch(()=>O(this,Le).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,Le).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=O(this,Le);Ge.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=O(this,Le);return Ge.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ge.batch(()=>O(this,Le).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(st).catch(st)}invalidateQueries(e,t={}){return Ge.batch(()=>(O(this,Le).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=Ge.batch(()=>O(this,Le).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,Le).build(this,t);return r.isStaleByTime(sr(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=js(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(st).catch(st)}ensureInfiniteQueryData(e){return e.behavior=js(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ei.isOnline()?O(this,Jt).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Le)}getMutationCache(){return O(this,Jt)}getDefaultOptions(){return O(this,er)}setDefaultOptions(e){re(this,er,e)}setQueryDefaults(e,t){O(this,Yr).set(gn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,Yr).values()],r={};return t.forEach(n=>{xn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){O(this,Zr).set(gn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,Zr).values()],r={};return t.forEach(n=>{xn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,er).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ba(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===Jn&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,er).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,Le).clear(),O(this,Jt).clear()}},Le=new WeakMap,Jt=new WeakMap,er=new WeakMap,Yr=new WeakMap,Zr=new WeakMap,tr=new WeakMap,Xr=new WeakMap,Jr=new WeakMap,Zo),at,be,Cn,Je,Cr,en,rr,nr,En,tn,rn,Er,kr,ir,nn,ke,dn,pa,da,fa,ha,ma,ya,ga,Sl,Xo,Tu=(Xo=class extends Tn{constructor(t,r){super();ye(this,ke);ye(this,at);ye(this,be);ye(this,Cn);ye(this,Je);ye(this,Cr);ye(this,en);ye(this,rr);ye(this,nr);ye(this,En);ye(this,tn);ye(this,rn);ye(this,Er);ye(this,kr);ye(this,ir);ye(this,nn,new Set);this.options=r,re(this,at,t),re(this,nr,null),re(this,rr,ua()),this.options.experimental_prefetchInRender||O(this,rr).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,be).addObserver(this),Fs(O(this,be),this.options)?ve(this,ke,dn).call(this):this.updateResult(),ve(this,ke,ha).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xa(O(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xa(O(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,ke,ma).call(this),ve(this,ke,ya).call(this),O(this,be).removeObserver(this)}setOptions(t){const r=this.options,n=O(this,be);if(this.options=O(this,at).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xt(this.options.enabled,O(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,ke,ga).call(this),O(this,be).setOptions(this.options),r._defaulted&&!oa(this.options,r)&&O(this,at).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,be),observer:this});const i=this.hasListeners();i&&As(O(this,be),n,this.options,r)&&ve(this,ke,dn).call(this),this.updateResult(),i&&(O(this,be)!==n||xt(this.options.enabled,O(this,be))!==xt(r.enabled,O(this,be))||sr(this.options.staleTime,O(this,be))!==sr(r.staleTime,O(this,be)))&&ve(this,ke,pa).call(this);const a=ve(this,ke,da).call(this);i&&(O(this,be)!==n||xt(this.options.enabled,O(this,be))!==xt(r.enabled,O(this,be))||a!==O(this,ir))&&ve(this,ke,fa).call(this,a)}getOptimisticResult(t){const r=O(this,at).getQueryCache().build(O(this,at),t),n=this.createResult(r,t);return Ou(this,n)&&(re(this,Je,n),re(this,en,this.options),re(this,Cr,O(this,be).state)),n}getCurrentResult(){return O(this,Je)}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,nn).add(t)}getCurrentQuery(){return O(this,be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=O(this,at).defaultQueryOptions(t),n=O(this,at).getQueryCache().build(O(this,at),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ve(this,ke,dn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,Je)))}createResult(t,r){var D;const n=O(this,be),i=this.options,a=O(this,Je),s=O(this,Cr),o=O(this,en),d=t!==n?t.state:O(this,Cn),{state:f}=t;let p={...f},m=!1,y;if(r._optimisticResults){const u=this.hasListeners(),M=!u&&Fs(t,r),N=u&&As(t,n,r,i);(M||N)&&(p={...p,...wl(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:T,errorUpdatedAt:h,status:C}=p;y=p.data;let v=!1;if(r.placeholderData!==void 0&&y===void 0&&C==="pending"){let u;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(u=a.data,v=!0):u=typeof r.placeholderData=="function"?r.placeholderData((D=O(this,rn))==null?void 0:D.state.data,O(this,rn)):r.placeholderData,u!==void 0&&(C="success",y=ca(a==null?void 0:a.data,u,r),m=!0)}if(r.select&&y!==void 0&&!v)if(a&&y===(s==null?void 0:s.data)&&r.select===O(this,En))y=O(this,tn);else try{re(this,En,r.select),y=r.select(y),y=ca(a==null?void 0:a.data,y,r),re(this,tn,y),re(this,nr,null)}catch(u){re(this,nr,u)}O(this,nr)&&(T=O(this,nr),y=O(this,tn),h=Date.now(),C="error");const S=p.fetchStatus==="fetching",P=C==="pending",w=C==="error",b=P&&S,_=y!==void 0,F={status:C,fetchStatus:p.fetchStatus,isPending:P,isSuccess:C==="success",isError:w,isInitialLoading:b,isLoading:b,data:y,dataUpdatedAt:p.dataUpdatedAt,error:T,errorUpdatedAt:h,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!P,isLoadingError:w&&!_,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:w&&_,isStale:La(t,r),refetch:this.refetch,promise:O(this,rr),isEnabled:xt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const u=A=>{F.status==="error"?A.reject(F.error):F.data!==void 0&&A.resolve(F.data)},M=()=>{const A=re(this,rr,F.promise=ua());u(A)},N=O(this,rr);switch(N.status){case"pending":t.queryHash===n.queryHash&&u(N);break;case"fulfilled":(F.status==="error"||F.data!==N.value)&&M();break;case"rejected":(F.status!=="error"||F.error!==N.reason)&&M();break}}return F}updateResult(){const t=O(this,Je),r=this.createResult(O(this,be),this.options);if(re(this,Cr,O(this,be).state),re(this,en,this.options),O(this,Cr).data!==void 0&&re(this,rn,O(this,be)),oa(r,t))return;re(this,Je,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!O(this,nn).size)return!0;const s=new Set(a??O(this,nn));return this.options.throwOnError&&s.add("error"),Object.keys(O(this,Je)).some(o=>{const l=o;return O(this,Je)[l]!==t[l]&&s.has(l)})};ve(this,ke,Sl).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,ke,ha).call(this)}},at=new WeakMap,be=new WeakMap,Cn=new WeakMap,Je=new WeakMap,Cr=new WeakMap,en=new WeakMap,rr=new WeakMap,nr=new WeakMap,En=new WeakMap,tn=new WeakMap,rn=new WeakMap,Er=new WeakMap,kr=new WeakMap,ir=new WeakMap,nn=new WeakMap,ke=new WeakSet,dn=function(t){ve(this,ke,ga).call(this);let r=O(this,be).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(st)),r},pa=function(){ve(this,ke,ma).call(this);const t=sr(this.options.staleTime,O(this,be));if(Or||O(this,Je).isStale||!aa(t))return;const n=ml(O(this,Je).dataUpdatedAt,t)+1;re(this,Er,setTimeout(()=>{O(this,Je).isStale||this.updateResult()},n))},da=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,be)):this.options.refetchInterval)??!1},fa=function(t){ve(this,ke,ya).call(this),re(this,ir,t),!(Or||xt(this.options.enabled,O(this,be))===!1||!aa(O(this,ir))||O(this,ir)===0)&&re(this,kr,setInterval(()=>{(this.options.refetchIntervalInBackground||Na.isFocused())&&ve(this,ke,dn).call(this)},O(this,ir)))},ha=function(){ve(this,ke,pa).call(this),ve(this,ke,fa).call(this,ve(this,ke,da).call(this))},ma=function(){O(this,Er)&&(clearTimeout(O(this,Er)),re(this,Er,void 0))},ya=function(){O(this,kr)&&(clearInterval(O(this,kr)),re(this,kr,void 0))},ga=function(){const t=O(this,at).getQueryCache().build(O(this,at),this.options);if(t===O(this,be))return;const r=O(this,be);re(this,be,t),re(this,Cn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Sl=function(t){Ge.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(O(this,Je))}),O(this,at).getQueryCache().notify({query:O(this,be),type:"observerResultsUpdated"})})},Xo);function ju(e,t){return xt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Fs(e,t){return ju(e,t)||e.state.data!==void 0&&xa(e,t,t.refetchOnMount)}function xa(e,t,r){if(xt(t.enabled,e)!==!1&&sr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&La(e,t)}return!1}function As(e,t,r,n){return(e!==t||xt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&La(e,r)}function La(e,t){return xt(t.enabled,e)!==!1&&e.isStaleByTime(sr(t.staleTime,e))}function Ou(e,t){return!oa(e.getCurrentResult(),t)}var Cl=ne.createContext(void 0),Fu=e=>{const t=ne.useContext(Cl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Au=({client:e,children:t})=>(ne.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(Cl.Provider,{value:e,children:t})),El=ne.createContext(!1),_u=()=>ne.useContext(El);El.Provider;function Ru(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $u=ne.createContext(Ru()),Du=()=>ne.useContext($u),Pu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Mu=e=>{ne.useEffect(()=>{e.clearReset()},[e])},Iu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||du(r,[e.error,n])),zu=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Vu=(e,t)=>e.isLoading&&e.isFetching&&!t,Bu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,_s=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Nu(e,t,r){var p,m,y,T,h;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=_u(),i=Du(),a=Fu(),s=a.defaultQueryOptions(e);(m=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||m.call(p,s),process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),s._optimisticResults=n?"isRestoring":"optimistic",zu(s),Pu(s,i),Mu(i);const o=!a.getQueryCache().get(s.queryHash),[l]=ne.useState(()=>new t(a,s)),d=l.getOptimisticResult(s),f=!n&&e.subscribed!==!1;if(ne.useSyncExternalStore(ne.useCallback(C=>{const v=f?l.subscribe(Ge.batchCalls(C)):st;return l.updateResult(),v},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),ne.useEffect(()=>{l.setOptions(s)},[s,l]),Bu(s,d))throw _s(s,l,i);if(Iu({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw d.error;if((T=(y=a.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||T.call(y,s,d),s.experimental_prefetchInRender&&!Or&&Vu(d,n)){const C=o?_s(s,l,i):(h=a.getQueryCache().get(s.queryHash))==null?void 0:h.promise;C==null||C.catch(st).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?d:l.trackResult(d)}function Lu(e,t){return Nu(e,Tu)}function qa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $n={exports:{}},Dn={exports:{}},Ce={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -12,12 +12,12 @@
|
|
|
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 $s;function Wu(){return $s||($s=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function P(
|
|
15
|
+
*/var $s;function Wu(){return $s||($s=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function P(Q){return typeof Q=="string"||typeof Q=="function"||Q===n||Q===d||Q===a||Q===i||Q===p||Q===m||typeof Q=="object"&&Q!==null&&(Q.$$typeof===T||Q.$$typeof===y||Q.$$typeof===s||Q.$$typeof===o||Q.$$typeof===f||Q.$$typeof===C||Q.$$typeof===v||Q.$$typeof===S||Q.$$typeof===h)}function w(Q){if(typeof Q=="object"&&Q!==null){var De=Q.$$typeof;switch(De){case t:var He=Q.type;switch(He){case l:case d:case n:case a:case i:case p:return He;default:var Qe=He&&He.$$typeof;switch(Qe){case o:case f:case T:case y:case s:return Qe;default:return De}}case r:return De}}}var b=l,_=d,z=o,F=s,D=t,u=f,M=n,N=T,A=y,L=r,G=a,se=i,me=p,ue=!1;function K(Q){return ue||(ue=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(Q)||w(Q)===l}function B(Q){return w(Q)===d}function H(Q){return w(Q)===o}function de(Q){return w(Q)===s}function fe(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===t}function pe(Q){return w(Q)===f}function ge(Q){return w(Q)===n}function q(Q){return w(Q)===T}function ee(Q){return w(Q)===y}function ae(Q){return w(Q)===r}function oe(Q){return w(Q)===a}function le(Q){return w(Q)===i}function Se(Q){return w(Q)===p}Ee.AsyncMode=b,Ee.ConcurrentMode=_,Ee.ContextConsumer=z,Ee.ContextProvider=F,Ee.Element=D,Ee.ForwardRef=u,Ee.Fragment=M,Ee.Lazy=N,Ee.Memo=A,Ee.Portal=L,Ee.Profiler=G,Ee.StrictMode=se,Ee.Suspense=me,Ee.isAsyncMode=K,Ee.isConcurrentMode=B,Ee.isContextConsumer=H,Ee.isContextProvider=de,Ee.isElement=fe,Ee.isForwardRef=pe,Ee.isFragment=ge,Ee.isLazy=q,Ee.isMemo=ee,Ee.isPortal=ae,Ee.isProfiler=oe,Ee.isStrictMode=le,Ee.isSuspense=Se,Ee.isValidElementType=P,Ee.typeOf=w}()),Ee}var Ds;function kl(){return Ds||(Ds=1,process.env.NODE_ENV==="production"?Dn.exports=qu():Dn.exports=Wu()),Dn.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var Ni,Ps;function Uu(){if(Ps)return Ni;Ps=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(l.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ni=i()?Object.assign:function(a,s){for(var o,l=n(a),d,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var p in o)t.call(o,p)&&(l[p]=o[p]);if(e){d=e(o);for(var m=0;m<d.length;m++)r.call(o,d[m])&&(l[d[m]]=o[d[m]])}}return l},Ni}var Li,Ms;function Wa(){if(Ms)return Li;Ms=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Li=e,Li}var qi,Is;function Tl(){return Is||(Is=1,qi=Function.call.bind(Object.prototype.hasOwnProperty)),qi}var Wi,zs;function Hu(){if(zs)return Wi;zs=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Wa(),r={},n=Tl();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,l,d){if(process.env.NODE_ENV!=="production"){for(var f in a)if(n(a,f)){var p;try{if(typeof a[f]!="function"){var m=Error((l||"React class")+": "+o+" 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 m.name="Invariant Violation",m}p=a[f](s,f,l,o,null,t)}catch(T){p=T}if(p&&!(p instanceof Error)&&e((l||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var y=d?d():"";e("Failed "+o+" type: "+p.message+(y??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Wi=i,Wi}var Ui,Vs;function Ku(){if(Vs)return Ui;Vs=1;var e=kl(),t=Uu(),r=Wa(),n=Tl(),i=Hu(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Ui=function(o,l){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function p(B){var H=B&&(d&&B[d]||B[f]);if(typeof H=="function")return H}var m="<<anonymous>>",y={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:S(),arrayOf:P,element:w(),elementType:b(),instanceOf:_,node:u(),objectOf:F,oneOf:z,oneOfType:D,shape:N,exact:A};function T(B,H){return B===H?B!==0||1/B===1/H:B!==B&&H!==H}function h(B,H){this.message=B,this.data=H&&typeof H=="object"?H:{},this.stack=""}h.prototype=Error.prototype;function C(B){if(process.env.NODE_ENV!=="production")var H={},de=0;function fe(ge,q,ee,ae,oe,
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(B),null," "));var
|
|
19
|
+
*/var Ni,Ps;function Uu(){if(Ps)return Ni;Ps=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(l.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ni=i()?Object.assign:function(a,s){for(var o,l=n(a),d,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var p in o)t.call(o,p)&&(l[p]=o[p]);if(e){d=e(o);for(var m=0;m<d.length;m++)r.call(o,d[m])&&(l[d[m]]=o[d[m]])}}return l},Ni}var Li,Ms;function Wa(){if(Ms)return Li;Ms=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Li=e,Li}var qi,Is;function Tl(){return Is||(Is=1,qi=Function.call.bind(Object.prototype.hasOwnProperty)),qi}var Wi,zs;function Hu(){if(zs)return Wi;zs=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Wa(),r={},n=Tl();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,l,d){if(process.env.NODE_ENV!=="production"){for(var f in a)if(n(a,f)){var p;try{if(typeof a[f]!="function"){var m=Error((l||"React class")+": "+o+" 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 m.name="Invariant Violation",m}p=a[f](s,f,l,o,null,t)}catch(T){p=T}if(p&&!(p instanceof Error)&&e((l||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var y=d?d():"";e("Failed "+o+" type: "+p.message+(y??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Wi=i,Wi}var Ui,Vs;function Ku(){if(Vs)return Ui;Vs=1;var e=kl(),t=Uu(),r=Wa(),n=Tl(),i=Hu(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Ui=function(o,l){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function p(B){var H=B&&(d&&B[d]||B[f]);if(typeof H=="function")return H}var m="<<anonymous>>",y={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:S(),arrayOf:P,element:w(),elementType:b(),instanceOf:_,node:u(),objectOf:F,oneOf:z,oneOfType:D,shape:N,exact:A};function T(B,H){return B===H?B!==0||1/B===1/H:B!==B&&H!==H}function h(B,H){this.message=B,this.data=H&&typeof H=="object"?H:{},this.stack=""}h.prototype=Error.prototype;function C(B){if(process.env.NODE_ENV!=="production")var H={},de=0;function fe(ge,q,ee,ae,oe,le,Se){if(ae=ae||m,le=le||ee,Se!==r){if(l){var Q=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 Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var De=ae+":"+ee;!H[De]&&de<3&&(a("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+ae+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),H[De]=!0,de++)}}return q[ee]==null?ge?q[ee]===null?new h("The "+oe+" `"+le+"` is marked as required "+("in `"+ae+"`, but its value is `null`.")):new h("The "+oe+" `"+le+"` is marked as required in "+("`"+ae+"`, but its value is `undefined`.")):null:B(q,ee,ae,oe,le)}var pe=fe.bind(null,!1);return pe.isRequired=fe.bind(null,!0),pe}function v(B){function H(de,fe,pe,ge,q,ee){var ae=de[fe],oe=se(ae);if(oe!==B){var le=me(ae);return new h("Invalid "+ge+" `"+q+"` of type "+("`"+le+"` supplied to `"+pe+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return C(H)}function S(){return C(s)}function P(B){function H(de,fe,pe,ge,q){if(typeof B!="function")return new h("Property `"+q+"` of component `"+pe+"` has invalid PropType notation inside arrayOf.");var ee=de[fe];if(!Array.isArray(ee)){var ae=se(ee);return new h("Invalid "+ge+" `"+q+"` of type "+("`"+ae+"` supplied to `"+pe+"`, expected an array."))}for(var oe=0;oe<ee.length;oe++){var le=B(ee,oe,pe,ge,q+"["+oe+"]",r);if(le instanceof Error)return le}return null}return C(H)}function w(){function B(H,de,fe,pe,ge){var q=H[de];if(!o(q)){var ee=se(q);return new h("Invalid "+pe+" `"+ge+"` of type "+("`"+ee+"` supplied to `"+fe+"`, expected a single ReactElement."))}return null}return C(B)}function b(){function B(H,de,fe,pe,ge){var q=H[de];if(!e.isValidElementType(q)){var ee=se(q);return new h("Invalid "+pe+" `"+ge+"` of type "+("`"+ee+"` supplied to `"+fe+"`, expected a single ReactElement type."))}return null}return C(B)}function _(B){function H(de,fe,pe,ge,q){if(!(de[fe]instanceof B)){var ee=B.name||m,ae=K(de[fe]);return new h("Invalid "+ge+" `"+q+"` of type "+("`"+ae+"` supplied to `"+pe+"`, expected ")+("instance of `"+ee+"`."))}return null}return C(H)}function z(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function H(de,fe,pe,ge,q){for(var ee=de[fe],ae=0;ae<B.length;ae++)if(T(ee,B[ae]))return null;var oe=JSON.stringify(B,function(Se,Q){var De=me(Q);return De==="symbol"?String(Q):Q});return new h("Invalid "+ge+" `"+q+"` of value `"+String(ee)+"` "+("supplied to `"+pe+"`, expected one of "+oe+"."))}return C(H)}function F(B){function H(de,fe,pe,ge,q){if(typeof B!="function")return new h("Property `"+q+"` of component `"+pe+"` has invalid PropType notation inside objectOf.");var ee=de[fe],ae=se(ee);if(ae!=="object")return new h("Invalid "+ge+" `"+q+"` of type "+("`"+ae+"` supplied to `"+pe+"`, expected an object."));for(var oe in ee)if(n(ee,oe)){var le=B(ee,oe,pe,ge,q+"."+oe,r);if(le instanceof Error)return le}return null}return C(H)}function D(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var H=0;H<B.length;H++){var de=B[H];if(typeof de!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ue(de)+" at index "+H+"."),s}function fe(pe,ge,q,ee,ae){for(var oe=[],le=0;le<B.length;le++){var Se=B[le],Q=Se(pe,ge,q,ee,ae,r);if(Q==null)return null;Q.data&&n(Q.data,"expectedType")&&oe.push(Q.data.expectedType)}var De=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new h("Invalid "+ee+" `"+ae+"` supplied to "+("`"+q+"`"+De+"."))}return C(fe)}function u(){function B(H,de,fe,pe,ge){return L(H[de])?null:new h("Invalid "+pe+" `"+ge+"` supplied to "+("`"+fe+"`, expected a ReactNode."))}return C(B)}function M(B,H,de,fe,pe){return new h((B||"React class")+": "+H+" type `"+de+"."+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+pe+"`.")}function N(B){function H(de,fe,pe,ge,q){var ee=de[fe],ae=se(ee);if(ae!=="object")return new h("Invalid "+ge+" `"+q+"` of type `"+ae+"` "+("supplied to `"+pe+"`, expected `object`."));for(var oe in B){var le=B[oe];if(typeof le!="function")return M(pe,ge,q,oe,me(le));var Se=le(ee,oe,pe,ge,q+"."+oe,r);if(Se)return Se}return null}return C(H)}function A(B){function H(de,fe,pe,ge,q){var ee=de[fe],ae=se(ee);if(ae!=="object")return new h("Invalid "+ge+" `"+q+"` of type `"+ae+"` "+("supplied to `"+pe+"`, expected `object`."));var oe=t({},de[fe],B);for(var le in oe){var Se=B[le];if(n(B,le)&&typeof Se!="function")return M(pe,ge,q,le,me(Se));if(!Se)return new h("Invalid "+ge+" `"+q+"` key `"+le+"` supplied to `"+pe+"`.\nBad object: "+JSON.stringify(de[fe],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(B),null," "));var Q=Se(ee,le,pe,ge,q+"."+le,r);if(Q)return Q}return null}return C(H)}function L(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(L);if(B===null||o(B))return!0;var H=p(B);if(H){var de=H.call(B),fe;if(H!==B.entries){for(;!(fe=de.next()).done;)if(!L(fe.value))return!1}else for(;!(fe=de.next()).done;){var pe=fe.value;if(pe&&!L(pe[1]))return!1}}else return!1;return!0;default:return!1}}function G(B,H){return B==="symbol"?!0:H?H["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&H instanceof Symbol:!1}function se(B){var H=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":G(H,B)?"symbol":H}function me(B){if(typeof B>"u"||B===null)return""+B;var H=se(B);if(H==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return H}function ue(B){var H=me(B);switch(H){case"array":case"object":return"an "+H;case"boolean":case"date":case"regexp":return"a "+H;default:return H}}function K(B){return!B.constructor||!B.constructor.name?m:B.constructor.name}return y.checkPropTypes=i,y.resetWarningCache=i.resetWarningCache,y.PropTypes=y,y},Ui}var Hi,Bs;function Gu(){if(Bs)return Hi;Bs=1;var e=Wa();function t(){}function r(){}return r.resetWarningCache=t,Hi=function(){function n(s,o,l,d,f,p){if(p!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},Hi}var Ns;function Qu(){if(Ns)return $n.exports;if(Ns=1,process.env.NODE_ENV!=="production"){var e=kl(),t=!0;$n.exports=Ku()(e.isElement,t)}else $n.exports=Gu()();return $n.exports}var Yu=Qu();const k=qa(Yu);function jl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=jl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function rt(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=jl(e))&&(n&&(n+=" "),n+=t);return n}function on(e,t,r=void 0){const n={};for(const i in e){const a=e[i];let s="",o=!0;for(let l=0;l<a.length;l+=1){const d=a[l];d&&(s+=(o===!0?"":" ")+t(d),o=!1,r&&r[d]&&(s+=" "+r[d]))}n[i]=s}return n}function lr(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function ze(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":lr(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Pn={exports:{}},Oe={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* react-is.production.js
|
|
23
23
|
*
|
|
@@ -44,9 +44,9 @@ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:lr(18,`(${t})`));return
|
|
|
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
46
|
*/function rd(e,t){const r=zc(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const i=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
47
|
-
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function nd(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ys=[];function Zs(e){return Ys[0]=e,td(Ys)}const id=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function ad(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=id(t),s=Object.keys(a);function o(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r})`}function l(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-n/100}${r})`}function d(m,y){const T=s.indexOf(y);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r}) and (max-width:${(T!==-1&&typeof t[s[T]]=="number"?t[s[T]]:y)-n/100}${r})`}function f(m){return s.indexOf(m)+1<s.length?d(m,s[s.indexOf(m)+1]):o(m)}function p(m){const y=s.indexOf(m);return y===0?o(s[1]):y===s.length-1?l(s[y]):d(m,s[s.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:s,values:a,up:o,down:l,between:d,only:f,not:p,unit:r,...i}}const sd={borderRadius:4};function _l(e=8,t=Ua({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function od(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let i=r.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return r.palette.mode===e?t:{}}function Rl(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...s}=e,o=ad(r),l=_l(i);let d=ft({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...sd,...a}},s);return d=np(d),d.applyStyles=od,d=t.reduce((f,p)=>ft(f,p),d),d.unstable_sxConfig={...Fn,...s==null?void 0:s.unstable_sxConfig},d.unstable_sx=function(p){return an({sx:p,theme:this})},d}const Xs=e=>e,ld=()=>{let e=Xs;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Xs}}},cd=ld(),ud={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 pr(e,t,r="Mui"){const n=ud[t];return n?`${r}-${n}`:`${cd.generate(e)}-${t}`}function _r(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=pr(e,i,r)}),n}function $l(e,t=""){return e.displayName||e.name||t}function Js(e,t,r){const n=$l(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function pd(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return $l(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ti.ForwardRef:return Js(e,e.render,"ForwardRef");case ti.Memo:return Js(e,e.type,"memo");default:return}}}function Dl(e){const{variants:t,...r}=e,n={variants:t,style:Zs(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=Zs(i.style))}),n}const dd=Rl();function Gi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function fd(e){return e?(t,r)=>r[e]:null}function hd(e,t,r){e.theme=xd(e.theme)?r:e.theme[t]||e.theme}function Wn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Wn(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:i,...a}=r;n=a}return Pl(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Pl(e,t,r=[]){var i;let n;e:for(let a=0;a<t.length;a+=1){const s=t[a];if(typeof s.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(n))continue}else for(const o in s.props)if(e[o]!==s.props[o]&&((i=e.ownerState)==null?void 0:i[o])!==s.props[o])continue e;typeof s.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(s.style(n))):r.push(s.style)}return r}function md(e={}){const{themeId:t,defaultTheme:r=dd,rootShouldForwardProp:n=Gi,slotShouldForwardProp:i=Gi}=e;function a(o){hd(o,t,r)}return(o,l={})=>{nd(o,b=>b.filter(_=>_!==an));const{name:d,slot:f,skipVariantsResolver:p,skipSx:m,overridesResolver:y=fd(Ml(f)),...T}=l,h=p!==void 0?p:f&&f!=="Root"&&f!=="root"||!1,C=m||!1;let v=Gi;f==="Root"||f==="root"?v=n:f?v=i:vd(o)&&(v=void 0);const S=rd(o,{shouldForwardProp:v,label:gd(d,f),...T}),P=b=>{if(b.__emotion_real===b)return b;if(typeof b=="function")return function(z){return Wn(z,b)};if(Mt(b)){const _=Dl(b);return _.variants?function(F){return Wn(F,_)}:_.style}return b},w=(...b)=>{const _=[],z=b.map(P),F=[];if(_.push(a),d&&y&&F.push(function(N){var se,me;const L=(me=(se=N.theme.components)==null?void 0:se[d])==null?void 0:me.styleOverrides;if(!L)return null;const
|
|
47
|
+
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function nd(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ys=[];function Zs(e){return Ys[0]=e,td(Ys)}const id=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function ad(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=id(t),s=Object.keys(a);function o(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r})`}function l(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-n/100}${r})`}function d(m,y){const T=s.indexOf(y);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r}) and (max-width:${(T!==-1&&typeof t[s[T]]=="number"?t[s[T]]:y)-n/100}${r})`}function f(m){return s.indexOf(m)+1<s.length?d(m,s[s.indexOf(m)+1]):o(m)}function p(m){const y=s.indexOf(m);return y===0?o(s[1]):y===s.length-1?l(s[y]):d(m,s[s.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:s,values:a,up:o,down:l,between:d,only:f,not:p,unit:r,...i}}const sd={borderRadius:4};function _l(e=8,t=Ua({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function od(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let i=r.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return r.palette.mode===e?t:{}}function Rl(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...s}=e,o=ad(r),l=_l(i);let d=ft({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...sd,...a}},s);return d=np(d),d.applyStyles=od,d=t.reduce((f,p)=>ft(f,p),d),d.unstable_sxConfig={...Fn,...s==null?void 0:s.unstable_sxConfig},d.unstable_sx=function(p){return an({sx:p,theme:this})},d}const Xs=e=>e,ld=()=>{let e=Xs;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Xs}}},cd=ld(),ud={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 pr(e,t,r="Mui"){const n=ud[t];return n?`${r}-${n}`:`${cd.generate(e)}-${t}`}function _r(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=pr(e,i,r)}),n}function $l(e,t=""){return e.displayName||e.name||t}function Js(e,t,r){const n=$l(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function pd(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return $l(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ti.ForwardRef:return Js(e,e.render,"ForwardRef");case ti.Memo:return Js(e,e.type,"memo");default:return}}}function Dl(e){const{variants:t,...r}=e,n={variants:t,style:Zs(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=Zs(i.style))}),n}const dd=Rl();function Gi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function fd(e){return e?(t,r)=>r[e]:null}function hd(e,t,r){e.theme=xd(e.theme)?r:e.theme[t]||e.theme}function Wn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Wn(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:i,...a}=r;n=a}return Pl(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Pl(e,t,r=[]){var i;let n;e:for(let a=0;a<t.length;a+=1){const s=t[a];if(typeof s.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(n))continue}else for(const o in s.props)if(e[o]!==s.props[o]&&((i=e.ownerState)==null?void 0:i[o])!==s.props[o])continue e;typeof s.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(s.style(n))):r.push(s.style)}return r}function md(e={}){const{themeId:t,defaultTheme:r=dd,rootShouldForwardProp:n=Gi,slotShouldForwardProp:i=Gi}=e;function a(o){hd(o,t,r)}return(o,l={})=>{nd(o,b=>b.filter(_=>_!==an));const{name:d,slot:f,skipVariantsResolver:p,skipSx:m,overridesResolver:y=fd(Ml(f)),...T}=l,h=p!==void 0?p:f&&f!=="Root"&&f!=="root"||!1,C=m||!1;let v=Gi;f==="Root"||f==="root"?v=n:f?v=i:vd(o)&&(v=void 0);const S=rd(o,{shouldForwardProp:v,label:gd(d,f),...T}),P=b=>{if(b.__emotion_real===b)return b;if(typeof b=="function")return function(z){return Wn(z,b)};if(Mt(b)){const _=Dl(b);return _.variants?function(F){return Wn(F,_)}:_.style}return b},w=(...b)=>{const _=[],z=b.map(P),F=[];if(_.push(a),d&&y&&F.push(function(N){var se,me;const L=(me=(se=N.theme.components)==null?void 0:se[d])==null?void 0:me.styleOverrides;if(!L)return null;const G={};for(const ue in L)G[ue]=Wn(N,L[ue]);return y(N,G)}),d&&!h&&F.push(function(N){var G,se;const A=N.theme,L=(se=(G=A==null?void 0:A.components)==null?void 0:G[d])==null?void 0:se.variants;return L?Pl(N,L):null}),C||F.push(an),Array.isArray(z[0])){const M=z.shift(),N=new Array(_.length).fill(""),A=new Array(F.length).fill("");let L;L=[...N,...M,...A],L.raw=[...N,...M.raw,...A],_.unshift(L)}const D=[..._,...z,...F],u=S(...D);return o.muiName&&(u.muiName=o.muiName),process.env.NODE_ENV!=="production"&&(u.displayName=yd(d,f,o)),u};return S.withConfig&&(w.withConfig=S.withConfig),w}}function yd(e,t,r){return e?`${e}${ze(t||"")}`:`Styled(${pd(r)})`}function gd(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Ml(t||"Root")}`),r}function xd(e){for(const t in e)return!1;return!0}function vd(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ml(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function va(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=n;if(i==="components"||i==="slots")r[i]={...e[i],...r[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],s=t[i];if(!s)r[i]=a||{};else if(!a)r[i]=s;else{r[i]={...s};for(const o in a)if(Object.prototype.hasOwnProperty.call(a,o)){const l=o;r[i][l]=va(a[l],s[l])}}}else r[i]===void 0&&(r[i]=e[i])}return r}const bd=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function wd(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Ka(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),wd(e,t,r)}function Sd(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function cr(e){if(e.type)return e;if(e.charAt(0)==="#")return cr(Sd(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
48
48
|
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:lr(9,e));let n=e.substring(t+1,e.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
|
|
49
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:lr(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const Cd=e=>{const t=cr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},fn=(e,t)=>{try{return Cd(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Oi(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Il(e){e=cr(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),s=(d,f=(d+r/30)%12)=>i-a*Math.max(Math.min(f-3,9-f,1),-1);let o="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(o+="a",l.push(t[3])),Oi({type:o,values:l})}function ba(e){e=cr(e);let t=e.type==="hsl"||e.type==="hsla"?cr(Il(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function eo(e,t){const r=ba(e),n=ba(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function St(e,t){return e=cr(e),t=Ka(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Oi(e)}function Mn(e,t,r){try{return St(e,t)}catch{return e}}function Ga(e,t){if(e=cr(e),t=Ka(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Oi(e)}function Ae(e,t,r){try{return Ga(e,t)}catch{return e}}function Qa(e,t){if(e=cr(e),t=Ka(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Oi(e)}function _e(e,t,r){try{return Qa(e,t)}catch{return e}}function Ed(e,t=.15){return ba(e)>.5?Ga(e,t):Qa(e,t)}function In(e,t,r){try{return Ed(e,t)}catch{return e}}const kd=ne.createContext(void 0);process.env.NODE_ENV!=="production"&&(k.node,k.object);function Td(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?va(i.defaultProps,n):!i.styleOverrides&&!i.variants?va(i,n):n}function jd({props:e,name:t}){const r=ne.useContext(kd);return Td({props:e,name:t,theme:{components:r}})}const to={theme:void 0};function Od(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(to.theme=i.theme,a=Dl(e(to)),t=a,r=i.theme),a}}function Fd(e=""){function t(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${e?`${e}-`:""}${n}${t(...i)})`}const ro=(e,t,r,n=[])=>{let i=e;t.forEach((a,s)=>{s===t.length-1?Array.isArray(i)?i[Number(a)]=r:i&&typeof i=="object"&&(i[a]=r):i&&typeof i=="object"&&(i[a]||(i[a]=n.includes(a)?[]:{}),i=i[a])})},Ad=(e,t,r)=>{function n(i,a=[],s=[]){Object.entries(i).forEach(([o,l])=>{(!r||r&&!r([...a,o]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...a,o],Array.isArray(l)?[...s,o]:s):t([...a,o],l,s))})}n(e)},_d=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Qi(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},s={};return Ad(e,(o,l,d)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(o,l))){const f=`--${r?`${r}-`:""}${o.join("-")}`,p=_d(o,l);Object.assign(i,{[f]:p}),ro(a,o,`var(${f})`,d),ro(s,o,`var(${f}, ${p})`,d)}},o=>o[0]==="vars"),{css:i,vars:a,varsWithDefaults:s}}function Rd(e,t={}){const{getSelector:r=C,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:o="light",...l}=e,{vars:d,css:f,varsWithDefaults:p}=Qi(l,t);let m=p;const y={},{[o]:T,...h}=a;if(Object.entries(h||{}).forEach(([P,w])=>{const{vars:b,css:_,varsWithDefaults:z}=Qi(w,t);m=ft(m,z),y[P]={css:_,vars:b}}),T){const{css:P,vars:w,varsWithDefaults:b}=Qi(T,t);m=ft(m,b),y[o]={css:P,vars:w}}function C(P,w){var _,z;let b=i;if(i==="class"&&(b=".%s"),i==="data"&&(b="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(b=`[${i}="%s"]`),P){if(b==="media")return e.defaultColorScheme===P?":root":{[`@media (prefers-color-scheme: ${((z=(_=a[P])==null?void 0:_.palette)==null?void 0:z.mode)||P})`]:{":root":w}};if(b)return e.defaultColorScheme===P?`:root, ${b.replace("%s",String(P))}`:b.replace("%s",String(P))}return":root"}return{vars:m,generateThemeVars:()=>{let P={...d};return Object.entries(y).forEach(([,{vars:w}])=>{P=ft(P,w)}),P},generateStyleSheets:()=>{var F,D;const P=[],w=e.defaultColorScheme||"light";function b(u,M){Object.keys(M).length&&P.push(typeof u=="string"?{[u]:{...M}}:u)}b(r(void 0,{...f}),f);const{[w]:_,...z}=y;if(_){const{css:u}=_,M=(D=(F=a[w])==null?void 0:F.palette)==null?void 0:D.mode,N=!n&&M?{colorScheme:M,...u}:{...u};b(r(w,{...N}),N)}return Object.entries(z).forEach(([u,{css:M}])=>{var L,
|
|
49
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:lr(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const Cd=e=>{const t=cr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},fn=(e,t)=>{try{return Cd(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Oi(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Il(e){e=cr(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),s=(d,f=(d+r/30)%12)=>i-a*Math.max(Math.min(f-3,9-f,1),-1);let o="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(o+="a",l.push(t[3])),Oi({type:o,values:l})}function ba(e){e=cr(e);let t=e.type==="hsl"||e.type==="hsla"?cr(Il(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function eo(e,t){const r=ba(e),n=ba(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function St(e,t){return e=cr(e),t=Ka(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Oi(e)}function Mn(e,t,r){try{return St(e,t)}catch{return e}}function Ga(e,t){if(e=cr(e),t=Ka(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Oi(e)}function Ae(e,t,r){try{return Ga(e,t)}catch{return e}}function Qa(e,t){if(e=cr(e),t=Ka(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Oi(e)}function _e(e,t,r){try{return Qa(e,t)}catch{return e}}function Ed(e,t=.15){return ba(e)>.5?Ga(e,t):Qa(e,t)}function In(e,t,r){try{return Ed(e,t)}catch{return e}}const kd=ne.createContext(void 0);process.env.NODE_ENV!=="production"&&(k.node,k.object);function Td(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?va(i.defaultProps,n):!i.styleOverrides&&!i.variants?va(i,n):n}function jd({props:e,name:t}){const r=ne.useContext(kd);return Td({props:e,name:t,theme:{components:r}})}const to={theme:void 0};function Od(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(to.theme=i.theme,a=Dl(e(to)),t=a,r=i.theme),a}}function Fd(e=""){function t(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${e?`${e}-`:""}${n}${t(...i)})`}const ro=(e,t,r,n=[])=>{let i=e;t.forEach((a,s)=>{s===t.length-1?Array.isArray(i)?i[Number(a)]=r:i&&typeof i=="object"&&(i[a]=r):i&&typeof i=="object"&&(i[a]||(i[a]=n.includes(a)?[]:{}),i=i[a])})},Ad=(e,t,r)=>{function n(i,a=[],s=[]){Object.entries(i).forEach(([o,l])=>{(!r||r&&!r([...a,o]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...a,o],Array.isArray(l)?[...s,o]:s):t([...a,o],l,s))})}n(e)},_d=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Qi(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},s={};return Ad(e,(o,l,d)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(o,l))){const f=`--${r?`${r}-`:""}${o.join("-")}`,p=_d(o,l);Object.assign(i,{[f]:p}),ro(a,o,`var(${f})`,d),ro(s,o,`var(${f}, ${p})`,d)}},o=>o[0]==="vars"),{css:i,vars:a,varsWithDefaults:s}}function Rd(e,t={}){const{getSelector:r=C,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:o="light",...l}=e,{vars:d,css:f,varsWithDefaults:p}=Qi(l,t);let m=p;const y={},{[o]:T,...h}=a;if(Object.entries(h||{}).forEach(([P,w])=>{const{vars:b,css:_,varsWithDefaults:z}=Qi(w,t);m=ft(m,z),y[P]={css:_,vars:b}}),T){const{css:P,vars:w,varsWithDefaults:b}=Qi(T,t);m=ft(m,b),y[o]={css:P,vars:w}}function C(P,w){var _,z;let b=i;if(i==="class"&&(b=".%s"),i==="data"&&(b="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(b=`[${i}="%s"]`),P){if(b==="media")return e.defaultColorScheme===P?":root":{[`@media (prefers-color-scheme: ${((z=(_=a[P])==null?void 0:_.palette)==null?void 0:z.mode)||P})`]:{":root":w}};if(b)return e.defaultColorScheme===P?`:root, ${b.replace("%s",String(P))}`:b.replace("%s",String(P))}return":root"}return{vars:m,generateThemeVars:()=>{let P={...d};return Object.entries(y).forEach(([,{vars:w}])=>{P=ft(P,w)}),P},generateStyleSheets:()=>{var F,D;const P=[],w=e.defaultColorScheme||"light";function b(u,M){Object.keys(M).length&&P.push(typeof u=="string"?{[u]:{...M}}:u)}b(r(void 0,{...f}),f);const{[w]:_,...z}=y;if(_){const{css:u}=_,M=(D=(F=a[w])==null?void 0:F.palette)==null?void 0:D.mode,N=!n&&M?{colorScheme:M,...u}:{...u};b(r(w,{...N}),N)}return Object.entries(z).forEach(([u,{css:M}])=>{var L,G;const N=(G=(L=a[u])==null?void 0:L.palette)==null?void 0:G.mode,A=!n&&N?{colorScheme:N,...M}:{...M};b(r(u,{...A}),A)}),P}}}function $d(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const vn={black:"#000",white:"#fff"},Dd={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"},Mr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ir={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},pn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},zr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Vr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Br={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function zl(){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:vn.white,default:vn.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 Pd=zl();function Vl(){return{text:{primary:vn.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:vn.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 no=Vl();function io(e,t,r,n){const i=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Qa(e.main,i):t==="dark"&&(e.dark=Ga(e.main,a)))}function Md(e="light"){return e==="dark"?{main:zr[200],light:zr[50],dark:zr[400]}:{main:zr[700],light:zr[400],dark:zr[800]}}function Id(e="light"){return e==="dark"?{main:Mr[200],light:Mr[50],dark:Mr[400]}:{main:Mr[500],light:Mr[300],dark:Mr[700]}}function zd(e="light"){return e==="dark"?{main:Ir[500],light:Ir[300],dark:Ir[700]}:{main:Ir[700],light:Ir[400],dark:Ir[800]}}function Vd(e="light"){return e==="dark"?{main:Vr[400],light:Vr[300],dark:Vr[700]}:{main:Vr[700],light:Vr[500],dark:Vr[900]}}function Bd(e="light"){return e==="dark"?{main:Br[400],light:Br[300],dark:Br[700]}:{main:Br[800],light:Br[500],dark:Br[900]}}function Nd(e="light"){return e==="dark"?{main:pn[400],light:pn[300],dark:pn[700]}:{main:"#ed6c02",light:pn[500],dark:pn[900]}}function Ya(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...i}=e,a=e.primary||Md(t),s=e.secondary||Id(t),o=e.error||zd(t),l=e.info||Vd(t),d=e.success||Bd(t),f=e.warning||Nd(t);function p(h){const C=eo(h,no.text.primary)>=r?no.text.primary:Pd.text.primary;if(process.env.NODE_ENV!=="production"){const v=eo(h,C);v<3&&console.error([`MUI: The contrast ratio of ${v}:1 for ${C} on ${h}`,"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
50
|
`))}return C}const m=({color:h,name:C,mainShade:v=500,lightShade:S=300,darkShade:P=700})=>{if(h={...h},!h.main&&h[v]&&(h.main=h[v]),!h.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${C?` (${C})`:""} provided to augmentColor(color) is invalid.
|
|
51
51
|
The color object needs to have a \`main\` property or a \`${v}\` property.`:lr(11,C?` (${C})`:"",v));if(typeof h.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${C?` (${C})`:""} provided to augmentColor(color) is invalid.
|
|
52
52
|
\`color.main\` should be a string, but \`${JSON.stringify(h.main)}\` was provided instead.
|
|
@@ -71,7 +71,7 @@ theme.transitions = createTransitions(theme.transitions || {});
|
|
|
71
71
|
|
|
72
72
|
export default theme;`}function wa(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:s={},typography:o={},shape:l,...d}=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.":lr(20));const f=Ya(a),p=Rl(e);let m=ft(p,{mixins:qd(p.breakpoints,n),palette:f,shadows:Qd.slice(),typography:Ud(f,o),transitions:Jd(s),zIndex:{...ef}});if(m=ft(m,d),m=t.reduce((y,T)=>ft(y,T),m),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],T=(h,C)=>{let v;for(v in h){const S=h[v];if(y.includes(v)&&Object.keys(S).length>0){if(process.env.NODE_ENV!=="production"){const P=pr("",v);console.error([`MUI: The \`${C}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(h,null,2),"",`Instead, you need to use the '&.${P}' syntax:`,JSON.stringify({root:{[`&.${P}`]:S}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
73
73
|
`))}h[v]={}}}};Object.keys(m.components).forEach(h=>{const C=m.components[h].styleOverrides;C&&h.startsWith("Mui")&&T(C,h)})}return m.unstable_sxConfig={...Fn,...d==null?void 0:d.unstable_sxConfig},m.unstable_sx=function(T){return an({sx:T,theme:this})},m.toRuntimeSource=Bl,m}function rf(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 nf=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=rf(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Nl(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Ll(e){return e==="dark"?nf:[]}function af(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...i}=e,a=Ya(t);return{palette:a,opacity:{...Nl(a.mode),...r},overlays:n||Ll(a.mode),...i}}function sf(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 of=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],lf=e=>(t,r)=>{const n=e.rootSelector||":root",i=e.colorSchemeSelector;let a=i;if(i==="class"&&(a=".%s"),i==="data"&&(a="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return of(e.cssVarPrefix).forEach(o=>{s[o]=r[o],delete r[o]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:a?{[a.replace("%s",t)]:s,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(a)return a.replace("%s",String(t))}return n};function cf(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function V(e,t,r){!e[t]&&r&&(e[t]=r)}function hn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Il(e)}function Vt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=fn(hn(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 uf(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const At=e=>{try{return e()}catch{}},pf=(e="mui")=>Fd(e);function Yi(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=af({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=wa({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Nl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Ll(i)},s}function df(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=sf,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...d}=e,f=Object.keys(r)[0],p=n||(r.light&&f!=="light"?"light":f),m=pf(a),{[p]:y,light:T,dark:h,...C}=r,v={...C};let S=y;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(S=!0),!S)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:lr(21,p));const P=Yi(v,S,d,p);T&&!v.light&&Yi(v,T,void 0,"light"),h&&!v.dark&&Yi(v,h,void 0,"dark");let w={defaultColorScheme:p,...P,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:l,getCssVar:m,colorSchemes:v,font:{...Ld(P.typography),...P.font},spacing:uf(d.spacing)};Object.keys(w.colorSchemes).forEach(D=>{const u=w.colorSchemes[D].palette,M=N=>{const A=N.split("-"),L=A[1],Q=A[2];return m(N,u[L][Q])};if(u.mode==="light"&&(V(u.common,"background","#fff"),V(u.common,"onBackground","#000")),u.mode==="dark"&&(V(u.common,"background","#000"),V(u.common,"onBackground","#fff")),cf(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){V(u.Alert,"errorColor",Ae(u.error.light,.6)),V(u.Alert,"infoColor",Ae(u.info.light,.6)),V(u.Alert,"successColor",Ae(u.success.light,.6)),V(u.Alert,"warningColor",Ae(u.warning.light,.6)),V(u.Alert,"errorFilledBg",M("palette-error-main")),V(u.Alert,"infoFilledBg",M("palette-info-main")),V(u.Alert,"successFilledBg",M("palette-success-main")),V(u.Alert,"warningFilledBg",M("palette-warning-main")),V(u.Alert,"errorFilledColor",At(()=>u.getContrastText(u.error.main))),V(u.Alert,"infoFilledColor",At(()=>u.getContrastText(u.info.main))),V(u.Alert,"successFilledColor",At(()=>u.getContrastText(u.success.main))),V(u.Alert,"warningFilledColor",At(()=>u.getContrastText(u.warning.main))),V(u.Alert,"errorStandardBg",_e(u.error.light,.9)),V(u.Alert,"infoStandardBg",_e(u.info.light,.9)),V(u.Alert,"successStandardBg",_e(u.success.light,.9)),V(u.Alert,"warningStandardBg",_e(u.warning.light,.9)),V(u.Alert,"errorIconColor",M("palette-error-main")),V(u.Alert,"infoIconColor",M("palette-info-main")),V(u.Alert,"successIconColor",M("palette-success-main")),V(u.Alert,"warningIconColor",M("palette-warning-main")),V(u.AppBar,"defaultBg",M("palette-grey-100")),V(u.Avatar,"defaultBg",M("palette-grey-400")),V(u.Button,"inheritContainedBg",M("palette-grey-300")),V(u.Button,"inheritContainedHoverBg",M("palette-grey-A100")),V(u.Chip,"defaultBorder",M("palette-grey-400")),V(u.Chip,"defaultAvatarColor",M("palette-grey-700")),V(u.Chip,"defaultIconColor",M("palette-grey-700")),V(u.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),V(u.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),V(u.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),V(u.LinearProgress,"primaryBg",_e(u.primary.main,.62)),V(u.LinearProgress,"secondaryBg",_e(u.secondary.main,.62)),V(u.LinearProgress,"errorBg",_e(u.error.main,.62)),V(u.LinearProgress,"infoBg",_e(u.info.main,.62)),V(u.LinearProgress,"successBg",_e(u.success.main,.62)),V(u.LinearProgress,"warningBg",_e(u.warning.main,.62)),V(u.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.11)`),V(u.Slider,"primaryTrack",_e(u.primary.main,.62)),V(u.Slider,"secondaryTrack",_e(u.secondary.main,.62)),V(u.Slider,"errorTrack",_e(u.error.main,.62)),V(u.Slider,"infoTrack",_e(u.info.main,.62)),V(u.Slider,"successTrack",_e(u.success.main,.62)),V(u.Slider,"warningTrack",_e(u.warning.main,.62));const N=In(u.background.default,.8);V(u.SnackbarContent,"bg",N),V(u.SnackbarContent,"color",At(()=>u.getContrastText(N))),V(u.SpeedDialAction,"fabHoverBg",In(u.background.paper,.15)),V(u.StepConnector,"border",M("palette-grey-400")),V(u.StepContent,"border",M("palette-grey-400")),V(u.Switch,"defaultColor",M("palette-common-white")),V(u.Switch,"defaultDisabledColor",M("palette-grey-100")),V(u.Switch,"primaryDisabledColor",_e(u.primary.main,.62)),V(u.Switch,"secondaryDisabledColor",_e(u.secondary.main,.62)),V(u.Switch,"errorDisabledColor",_e(u.error.main,.62)),V(u.Switch,"infoDisabledColor",_e(u.info.main,.62)),V(u.Switch,"successDisabledColor",_e(u.success.main,.62)),V(u.Switch,"warningDisabledColor",_e(u.warning.main,.62)),V(u.TableCell,"border",_e(Mn(u.divider,1),.88)),V(u.Tooltip,"bg",Mn(u.grey[700],.92))}if(u.mode==="dark"){V(u.Alert,"errorColor",_e(u.error.light,.6)),V(u.Alert,"infoColor",_e(u.info.light,.6)),V(u.Alert,"successColor",_e(u.success.light,.6)),V(u.Alert,"warningColor",_e(u.warning.light,.6)),V(u.Alert,"errorFilledBg",M("palette-error-dark")),V(u.Alert,"infoFilledBg",M("palette-info-dark")),V(u.Alert,"successFilledBg",M("palette-success-dark")),V(u.Alert,"warningFilledBg",M("palette-warning-dark")),V(u.Alert,"errorFilledColor",At(()=>u.getContrastText(u.error.dark))),V(u.Alert,"infoFilledColor",At(()=>u.getContrastText(u.info.dark))),V(u.Alert,"successFilledColor",At(()=>u.getContrastText(u.success.dark))),V(u.Alert,"warningFilledColor",At(()=>u.getContrastText(u.warning.dark))),V(u.Alert,"errorStandardBg",Ae(u.error.light,.9)),V(u.Alert,"infoStandardBg",Ae(u.info.light,.9)),V(u.Alert,"successStandardBg",Ae(u.success.light,.9)),V(u.Alert,"warningStandardBg",Ae(u.warning.light,.9)),V(u.Alert,"errorIconColor",M("palette-error-main")),V(u.Alert,"infoIconColor",M("palette-info-main")),V(u.Alert,"successIconColor",M("palette-success-main")),V(u.Alert,"warningIconColor",M("palette-warning-main")),V(u.AppBar,"defaultBg",M("palette-grey-900")),V(u.AppBar,"darkBg",M("palette-background-paper")),V(u.AppBar,"darkColor",M("palette-text-primary")),V(u.Avatar,"defaultBg",M("palette-grey-600")),V(u.Button,"inheritContainedBg",M("palette-grey-800")),V(u.Button,"inheritContainedHoverBg",M("palette-grey-700")),V(u.Chip,"defaultBorder",M("palette-grey-700")),V(u.Chip,"defaultAvatarColor",M("palette-grey-300")),V(u.Chip,"defaultIconColor",M("palette-grey-300")),V(u.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),V(u.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),V(u.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),V(u.LinearProgress,"primaryBg",Ae(u.primary.main,.5)),V(u.LinearProgress,"secondaryBg",Ae(u.secondary.main,.5)),V(u.LinearProgress,"errorBg",Ae(u.error.main,.5)),V(u.LinearProgress,"infoBg",Ae(u.info.main,.5)),V(u.LinearProgress,"successBg",Ae(u.success.main,.5)),V(u.LinearProgress,"warningBg",Ae(u.warning.main,.5)),V(u.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.13)`),V(u.Slider,"primaryTrack",Ae(u.primary.main,.5)),V(u.Slider,"secondaryTrack",Ae(u.secondary.main,.5)),V(u.Slider,"errorTrack",Ae(u.error.main,.5)),V(u.Slider,"infoTrack",Ae(u.info.main,.5)),V(u.Slider,"successTrack",Ae(u.success.main,.5)),V(u.Slider,"warningTrack",Ae(u.warning.main,.5));const N=In(u.background.default,.98);V(u.SnackbarContent,"bg",N),V(u.SnackbarContent,"color",At(()=>u.getContrastText(N))),V(u.SpeedDialAction,"fabHoverBg",In(u.background.paper,.15)),V(u.StepConnector,"border",M("palette-grey-600")),V(u.StepContent,"border",M("palette-grey-600")),V(u.Switch,"defaultColor",M("palette-grey-300")),V(u.Switch,"defaultDisabledColor",M("palette-grey-600")),V(u.Switch,"primaryDisabledColor",Ae(u.primary.main,.55)),V(u.Switch,"secondaryDisabledColor",Ae(u.secondary.main,.55)),V(u.Switch,"errorDisabledColor",Ae(u.error.main,.55)),V(u.Switch,"infoDisabledColor",Ae(u.info.main,.55)),V(u.Switch,"successDisabledColor",Ae(u.success.main,.55)),V(u.Switch,"warningDisabledColor",Ae(u.warning.main,.55)),V(u.TableCell,"border",Ae(Mn(u.divider,1),.68)),V(u.Tooltip,"bg",Mn(u.grey[700],.92))}Vt(u.background,"default"),Vt(u.background,"paper"),Vt(u.common,"background"),Vt(u.common,"onBackground"),Vt(u,"divider"),Object.keys(u).forEach(N=>{const A=u[N];N!=="tonalOffset"&&A&&typeof A=="object"&&(A.main&&V(u[N],"mainChannel",fn(hn(A.main))),A.light&&V(u[N],"lightChannel",fn(hn(A.light))),A.dark&&V(u[N],"darkChannel",fn(hn(A.dark))),A.contrastText&&V(u[N],"contrastTextChannel",fn(hn(A.contrastText))),N==="text"&&(Vt(u[N],"primary"),Vt(u[N],"secondary")),N==="action"&&(A.active&&Vt(u[N],"active"),A.selected&&Vt(u[N],"selected")))})}),w=t.reduce((D,u)=>ft(D,u),w);const b={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:lf(w)},{vars:_,generateThemeVars:z,generateStyleSheets:F}=Rd(w,b);return w.vars=_,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([D,u])=>{w[D]=u}),w.generateThemeVars=z,w.generateStyleSheets=F,w.generateSpacing=function(){return _l(d.spacing,Ua(this))},w.getColorSchemeSelector=$d(o),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=s,w.unstable_sxConfig={...Fn,...d==null?void 0:d.unstable_sxConfig},w.unstable_sx=function(u){return an({sx:u,theme:this})},w.toRuntimeSource=Bl,w}function lo(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ya({...r===!0?{}:r.palette,mode:t})})}function ff(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...s}=e,o=a||"light",l=i==null?void 0:i[o],d={...i,...r?{[o]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return wa(e,...t);let f=r;"palette"in e||d[o]&&(d[o]!==!0?f=d[o].palette:o==="dark"&&(f={mode:"dark"}));const p=wa({...e,palette:f},...t);return p.defaultColorScheme=o,p.colorSchemes=d,p.palette.mode==="light"&&(p.colorSchemes.light={...d.light!==!0&&d.light,palette:p.palette},lo(p,"dark",d.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:p.palette},lo(p,"light",d.light)),p}return!r&&!("light"in d)&&o==="light"&&(d.light=!0),df({...s,colorSchemes:d,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const hf=ff(),mf="$$material";function yf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const gf=e=>yf(e)&&e!=="classes",mt=md({themeId:mf,defaultTheme:hf,rootShouldForwardProp:gf});function xf(){return Gp}const Fr=Od;process.env.NODE_ENV!=="production"&&(k.node,k.object.isRequired);function Rr(e){return jd(e)}function vf(e){return typeof e.main=="string"}function bf(e,t=[]){if(!vf(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function ii(e=[]){return([,t])=>t&&bf(t,e)}function wf(e){return pr("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 Sf={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Cf=xf(),Ef=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:s}=e,o={root:["root",a,e.align!=="inherit"&&`align${ze(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return on(o,wf,s)},kf=mt("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${ze(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(Fr(({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(ii()).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${ze(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}}]}})),co={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ql=ne.forwardRef(function(t,r){const{color:n,...i}=Rr({props:t,name:"MuiTypography"}),a=!Sf[n],s=Cf({...i,...a&&{color:n}}),{align:o="inherit",className:l,component:d,gutterBottom:f=!1,noWrap:p=!1,paragraph:m=!1,variant:y="body1",variantMapping:T=co,...h}=s,C={...s,align:o,color:n,className:l,component:d,gutterBottom:f,noWrap:p,paragraph:m,variant:y,variantMapping:T},v=d||(m?"p":T[y]||co[y])||"span",S=Ef(C);return c.jsx(kf,{as:v,ref:r,className:rt(S.root,l),...h,ownerState:C,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...h.style}})});process.env.NODE_ENV!=="production"&&(ql.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 Za=ne.createContext(void 0);process.env.NODE_ENV!=="production"&&(Za.displayName="FormControlContext");function Tf(){return ne.useContext(Za)}function jf(e){return pr("MuiInputAdornment",e)}const uo=_r("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var po;const Of=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${ze(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},Ff=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:s}=e,o={root:["root",r&&"disablePointerEvents",i&&`position${ze(i)}`,s,n&&"hiddenLabel",a&&`size${ze(a)}`]};return on(o,jf,t)},Af=mt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Of})(Fr(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${uo.positionStart}&:not(.${uo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Wl=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:s="div",disablePointerEvents:o=!1,disableTypography:l=!1,position:d,variant:f,...p}=n,m=Tf()||{};let y=f;f&&m.variant&&process.env.NODE_ENV!=="production"&&f===m.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),m&&!y&&(y=m.variant);const T={...n,hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:o,position:d,variant:y},h=Ff(T);return c.jsx(Za.Provider,{value:null,children:c.jsx(Af,{as:s,ownerState:T,className:rt(h.root,a),ref:r,...p,children:typeof i=="string"&&!l?c.jsx(ql,{color:"textSecondary",children:i}):c.jsxs(ne.Fragment,{children:[d==="start"?po||(po=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Wl.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 Xa(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function _f(e){return pr("MuiSvgIcon",e)}_r("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Rf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${ze(t)}`,`fontSize${ze(r)}`]};return on(i,_f,n)},$f=mt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ze(r.color)}`],t[`fontSize${ze(r.fontSize)}`]]}})(Fr(({theme:e})=>{var t,r,n,i,a,s,o,l,d,f,p,m,y,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:h=>!h.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:l.call(o,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var C,v;return{props:{color:h},style:{color:(v=(C=(e.vars??e).palette)==null?void 0:C[h])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(m=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(T=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:T.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ai=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:l="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:p,viewBox:m="0 0 24 24",...y}=n,T=ne.isValidElement(i)&&i.type==="svg",h={...n,color:s,component:o,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:T},C={};f||(C.viewBox=m);const v=Rf(h);return c.jsxs($f,{as:o,className:rt(v.root,a),focusable:"false",color:d,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r,...C,...y,...T&&i.props,ownerState:h,children:[T?i.props.children:i,p?c.jsx("title",{children:p}):null]})});process.env.NODE_ENV!=="production"&&(ai.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});ai.muiName="SvgIcon";function yt(e,t){function r(n,i){return c.jsx(ai,{"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=ai.muiName,ne.memo(ne.forwardRef(r))}let fo=0;function Df(e){const[t,r]=ne.useState(e),n=e||t;return ne.useEffect(()=>{t==null&&(fo+=1,r(`mui-${fo}`))},[t]),n}const Pf={...ne},ho=Pf.useId;function Mf(e){if(ho!==void 0){const t=ho();return e??t}return Df(e)}function Un(e){const t=ne.useRef(e);return bd(()=>{t.current=e}),ne.useRef((...r)=>(0,t.current)(...r)).current}function mo(...e){const t=ne.useRef(void 0),r=ne.useCallback(n=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const s=a,o=s(n);return typeof o=="function"?o:()=>{s(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return ne.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const If=k.oneOfType([k.func,k.object]);function zf(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Vf(e,t,r,n,i){const a=e[t],s=i||t;if(a==null||typeof window>"u")return null;let o;return typeof a=="function"&&!zf(a)&&(o="Did you accidentally provide a plain function component instead?"),o!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Bf=Xa(k.elementType,Vf);function yo(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(`
|
|
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 uf(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const At=e=>{try{return e()}catch{}},pf=(e="mui")=>Fd(e);function Yi(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=af({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=wa({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Nl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Ll(i)},s}function df(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=sf,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...d}=e,f=Object.keys(r)[0],p=n||(r.light&&f!=="light"?"light":f),m=pf(a),{[p]:y,light:T,dark:h,...C}=r,v={...C};let S=y;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(S=!0),!S)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:lr(21,p));const P=Yi(v,S,d,p);T&&!v.light&&Yi(v,T,void 0,"light"),h&&!v.dark&&Yi(v,h,void 0,"dark");let w={defaultColorScheme:p,...P,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:l,getCssVar:m,colorSchemes:v,font:{...Ld(P.typography),...P.font},spacing:uf(d.spacing)};Object.keys(w.colorSchemes).forEach(D=>{const u=w.colorSchemes[D].palette,M=N=>{const A=N.split("-"),L=A[1],G=A[2];return m(N,u[L][G])};if(u.mode==="light"&&(V(u.common,"background","#fff"),V(u.common,"onBackground","#000")),u.mode==="dark"&&(V(u.common,"background","#000"),V(u.common,"onBackground","#fff")),cf(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){V(u.Alert,"errorColor",Ae(u.error.light,.6)),V(u.Alert,"infoColor",Ae(u.info.light,.6)),V(u.Alert,"successColor",Ae(u.success.light,.6)),V(u.Alert,"warningColor",Ae(u.warning.light,.6)),V(u.Alert,"errorFilledBg",M("palette-error-main")),V(u.Alert,"infoFilledBg",M("palette-info-main")),V(u.Alert,"successFilledBg",M("palette-success-main")),V(u.Alert,"warningFilledBg",M("palette-warning-main")),V(u.Alert,"errorFilledColor",At(()=>u.getContrastText(u.error.main))),V(u.Alert,"infoFilledColor",At(()=>u.getContrastText(u.info.main))),V(u.Alert,"successFilledColor",At(()=>u.getContrastText(u.success.main))),V(u.Alert,"warningFilledColor",At(()=>u.getContrastText(u.warning.main))),V(u.Alert,"errorStandardBg",_e(u.error.light,.9)),V(u.Alert,"infoStandardBg",_e(u.info.light,.9)),V(u.Alert,"successStandardBg",_e(u.success.light,.9)),V(u.Alert,"warningStandardBg",_e(u.warning.light,.9)),V(u.Alert,"errorIconColor",M("palette-error-main")),V(u.Alert,"infoIconColor",M("palette-info-main")),V(u.Alert,"successIconColor",M("palette-success-main")),V(u.Alert,"warningIconColor",M("palette-warning-main")),V(u.AppBar,"defaultBg",M("palette-grey-100")),V(u.Avatar,"defaultBg",M("palette-grey-400")),V(u.Button,"inheritContainedBg",M("palette-grey-300")),V(u.Button,"inheritContainedHoverBg",M("palette-grey-A100")),V(u.Chip,"defaultBorder",M("palette-grey-400")),V(u.Chip,"defaultAvatarColor",M("palette-grey-700")),V(u.Chip,"defaultIconColor",M("palette-grey-700")),V(u.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),V(u.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),V(u.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),V(u.LinearProgress,"primaryBg",_e(u.primary.main,.62)),V(u.LinearProgress,"secondaryBg",_e(u.secondary.main,.62)),V(u.LinearProgress,"errorBg",_e(u.error.main,.62)),V(u.LinearProgress,"infoBg",_e(u.info.main,.62)),V(u.LinearProgress,"successBg",_e(u.success.main,.62)),V(u.LinearProgress,"warningBg",_e(u.warning.main,.62)),V(u.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.11)`),V(u.Slider,"primaryTrack",_e(u.primary.main,.62)),V(u.Slider,"secondaryTrack",_e(u.secondary.main,.62)),V(u.Slider,"errorTrack",_e(u.error.main,.62)),V(u.Slider,"infoTrack",_e(u.info.main,.62)),V(u.Slider,"successTrack",_e(u.success.main,.62)),V(u.Slider,"warningTrack",_e(u.warning.main,.62));const N=In(u.background.default,.8);V(u.SnackbarContent,"bg",N),V(u.SnackbarContent,"color",At(()=>u.getContrastText(N))),V(u.SpeedDialAction,"fabHoverBg",In(u.background.paper,.15)),V(u.StepConnector,"border",M("palette-grey-400")),V(u.StepContent,"border",M("palette-grey-400")),V(u.Switch,"defaultColor",M("palette-common-white")),V(u.Switch,"defaultDisabledColor",M("palette-grey-100")),V(u.Switch,"primaryDisabledColor",_e(u.primary.main,.62)),V(u.Switch,"secondaryDisabledColor",_e(u.secondary.main,.62)),V(u.Switch,"errorDisabledColor",_e(u.error.main,.62)),V(u.Switch,"infoDisabledColor",_e(u.info.main,.62)),V(u.Switch,"successDisabledColor",_e(u.success.main,.62)),V(u.Switch,"warningDisabledColor",_e(u.warning.main,.62)),V(u.TableCell,"border",_e(Mn(u.divider,1),.88)),V(u.Tooltip,"bg",Mn(u.grey[700],.92))}if(u.mode==="dark"){V(u.Alert,"errorColor",_e(u.error.light,.6)),V(u.Alert,"infoColor",_e(u.info.light,.6)),V(u.Alert,"successColor",_e(u.success.light,.6)),V(u.Alert,"warningColor",_e(u.warning.light,.6)),V(u.Alert,"errorFilledBg",M("palette-error-dark")),V(u.Alert,"infoFilledBg",M("palette-info-dark")),V(u.Alert,"successFilledBg",M("palette-success-dark")),V(u.Alert,"warningFilledBg",M("palette-warning-dark")),V(u.Alert,"errorFilledColor",At(()=>u.getContrastText(u.error.dark))),V(u.Alert,"infoFilledColor",At(()=>u.getContrastText(u.info.dark))),V(u.Alert,"successFilledColor",At(()=>u.getContrastText(u.success.dark))),V(u.Alert,"warningFilledColor",At(()=>u.getContrastText(u.warning.dark))),V(u.Alert,"errorStandardBg",Ae(u.error.light,.9)),V(u.Alert,"infoStandardBg",Ae(u.info.light,.9)),V(u.Alert,"successStandardBg",Ae(u.success.light,.9)),V(u.Alert,"warningStandardBg",Ae(u.warning.light,.9)),V(u.Alert,"errorIconColor",M("palette-error-main")),V(u.Alert,"infoIconColor",M("palette-info-main")),V(u.Alert,"successIconColor",M("palette-success-main")),V(u.Alert,"warningIconColor",M("palette-warning-main")),V(u.AppBar,"defaultBg",M("palette-grey-900")),V(u.AppBar,"darkBg",M("palette-background-paper")),V(u.AppBar,"darkColor",M("palette-text-primary")),V(u.Avatar,"defaultBg",M("palette-grey-600")),V(u.Button,"inheritContainedBg",M("palette-grey-800")),V(u.Button,"inheritContainedHoverBg",M("palette-grey-700")),V(u.Chip,"defaultBorder",M("palette-grey-700")),V(u.Chip,"defaultAvatarColor",M("palette-grey-300")),V(u.Chip,"defaultIconColor",M("palette-grey-300")),V(u.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),V(u.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),V(u.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),V(u.LinearProgress,"primaryBg",Ae(u.primary.main,.5)),V(u.LinearProgress,"secondaryBg",Ae(u.secondary.main,.5)),V(u.LinearProgress,"errorBg",Ae(u.error.main,.5)),V(u.LinearProgress,"infoBg",Ae(u.info.main,.5)),V(u.LinearProgress,"successBg",Ae(u.success.main,.5)),V(u.LinearProgress,"warningBg",Ae(u.warning.main,.5)),V(u.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.13)`),V(u.Slider,"primaryTrack",Ae(u.primary.main,.5)),V(u.Slider,"secondaryTrack",Ae(u.secondary.main,.5)),V(u.Slider,"errorTrack",Ae(u.error.main,.5)),V(u.Slider,"infoTrack",Ae(u.info.main,.5)),V(u.Slider,"successTrack",Ae(u.success.main,.5)),V(u.Slider,"warningTrack",Ae(u.warning.main,.5));const N=In(u.background.default,.98);V(u.SnackbarContent,"bg",N),V(u.SnackbarContent,"color",At(()=>u.getContrastText(N))),V(u.SpeedDialAction,"fabHoverBg",In(u.background.paper,.15)),V(u.StepConnector,"border",M("palette-grey-600")),V(u.StepContent,"border",M("palette-grey-600")),V(u.Switch,"defaultColor",M("palette-grey-300")),V(u.Switch,"defaultDisabledColor",M("palette-grey-600")),V(u.Switch,"primaryDisabledColor",Ae(u.primary.main,.55)),V(u.Switch,"secondaryDisabledColor",Ae(u.secondary.main,.55)),V(u.Switch,"errorDisabledColor",Ae(u.error.main,.55)),V(u.Switch,"infoDisabledColor",Ae(u.info.main,.55)),V(u.Switch,"successDisabledColor",Ae(u.success.main,.55)),V(u.Switch,"warningDisabledColor",Ae(u.warning.main,.55)),V(u.TableCell,"border",Ae(Mn(u.divider,1),.68)),V(u.Tooltip,"bg",Mn(u.grey[700],.92))}Vt(u.background,"default"),Vt(u.background,"paper"),Vt(u.common,"background"),Vt(u.common,"onBackground"),Vt(u,"divider"),Object.keys(u).forEach(N=>{const A=u[N];N!=="tonalOffset"&&A&&typeof A=="object"&&(A.main&&V(u[N],"mainChannel",fn(hn(A.main))),A.light&&V(u[N],"lightChannel",fn(hn(A.light))),A.dark&&V(u[N],"darkChannel",fn(hn(A.dark))),A.contrastText&&V(u[N],"contrastTextChannel",fn(hn(A.contrastText))),N==="text"&&(Vt(u[N],"primary"),Vt(u[N],"secondary")),N==="action"&&(A.active&&Vt(u[N],"active"),A.selected&&Vt(u[N],"selected")))})}),w=t.reduce((D,u)=>ft(D,u),w);const b={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:lf(w)},{vars:_,generateThemeVars:z,generateStyleSheets:F}=Rd(w,b);return w.vars=_,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([D,u])=>{w[D]=u}),w.generateThemeVars=z,w.generateStyleSheets=F,w.generateSpacing=function(){return _l(d.spacing,Ua(this))},w.getColorSchemeSelector=$d(o),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=s,w.unstable_sxConfig={...Fn,...d==null?void 0:d.unstable_sxConfig},w.unstable_sx=function(u){return an({sx:u,theme:this})},w.toRuntimeSource=Bl,w}function lo(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ya({...r===!0?{}:r.palette,mode:t})})}function ff(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...s}=e,o=a||"light",l=i==null?void 0:i[o],d={...i,...r?{[o]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return wa(e,...t);let f=r;"palette"in e||d[o]&&(d[o]!==!0?f=d[o].palette:o==="dark"&&(f={mode:"dark"}));const p=wa({...e,palette:f},...t);return p.defaultColorScheme=o,p.colorSchemes=d,p.palette.mode==="light"&&(p.colorSchemes.light={...d.light!==!0&&d.light,palette:p.palette},lo(p,"dark",d.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:p.palette},lo(p,"light",d.light)),p}return!r&&!("light"in d)&&o==="light"&&(d.light=!0),df({...s,colorSchemes:d,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const hf=ff(),mf="$$material";function yf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const gf=e=>yf(e)&&e!=="classes",mt=md({themeId:mf,defaultTheme:hf,rootShouldForwardProp:gf});function xf(){return Gp}const Fr=Od;process.env.NODE_ENV!=="production"&&(k.node,k.object.isRequired);function Rr(e){return jd(e)}function vf(e){return typeof e.main=="string"}function bf(e,t=[]){if(!vf(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function ii(e=[]){return([,t])=>t&&bf(t,e)}function wf(e){return pr("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 Sf={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Cf=xf(),Ef=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:s}=e,o={root:["root",a,e.align!=="inherit"&&`align${ze(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return on(o,wf,s)},kf=mt("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${ze(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(Fr(({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(ii()).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${ze(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}}]}})),co={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ql=ne.forwardRef(function(t,r){const{color:n,...i}=Rr({props:t,name:"MuiTypography"}),a=!Sf[n],s=Cf({...i,...a&&{color:n}}),{align:o="inherit",className:l,component:d,gutterBottom:f=!1,noWrap:p=!1,paragraph:m=!1,variant:y="body1",variantMapping:T=co,...h}=s,C={...s,align:o,color:n,className:l,component:d,gutterBottom:f,noWrap:p,paragraph:m,variant:y,variantMapping:T},v=d||(m?"p":T[y]||co[y])||"span",S=Ef(C);return c.jsx(kf,{as:v,ref:r,className:rt(S.root,l),...h,ownerState:C,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...h.style}})});process.env.NODE_ENV!=="production"&&(ql.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 Za=ne.createContext(void 0);process.env.NODE_ENV!=="production"&&(Za.displayName="FormControlContext");function Tf(){return ne.useContext(Za)}function jf(e){return pr("MuiInputAdornment",e)}const uo=_r("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var po;const Of=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${ze(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},Ff=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:s}=e,o={root:["root",r&&"disablePointerEvents",i&&`position${ze(i)}`,s,n&&"hiddenLabel",a&&`size${ze(a)}`]};return on(o,jf,t)},Af=mt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Of})(Fr(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${uo.positionStart}&:not(.${uo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Wl=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:s="div",disablePointerEvents:o=!1,disableTypography:l=!1,position:d,variant:f,...p}=n,m=Tf()||{};let y=f;f&&m.variant&&process.env.NODE_ENV!=="production"&&f===m.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),m&&!y&&(y=m.variant);const T={...n,hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:o,position:d,variant:y},h=Ff(T);return c.jsx(Za.Provider,{value:null,children:c.jsx(Af,{as:s,ownerState:T,className:rt(h.root,a),ref:r,...p,children:typeof i=="string"&&!l?c.jsx(ql,{color:"textSecondary",children:i}):c.jsxs(ne.Fragment,{children:[d==="start"?po||(po=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Wl.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 Xa(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function _f(e){return pr("MuiSvgIcon",e)}_r("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Rf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${ze(t)}`,`fontSize${ze(r)}`]};return on(i,_f,n)},$f=mt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ze(r.color)}`],t[`fontSize${ze(r.fontSize)}`]]}})(Fr(({theme:e})=>{var t,r,n,i,a,s,o,l,d,f,p,m,y,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:h=>!h.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:l.call(o,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var C,v;return{props:{color:h},style:{color:(v=(C=(e.vars??e).palette)==null?void 0:C[h])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(m=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(T=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:T.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ai=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:l="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:p,viewBox:m="0 0 24 24",...y}=n,T=ne.isValidElement(i)&&i.type==="svg",h={...n,color:s,component:o,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:T},C={};f||(C.viewBox=m);const v=Rf(h);return c.jsxs($f,{as:o,className:rt(v.root,a),focusable:"false",color:d,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r,...C,...y,...T&&i.props,ownerState:h,children:[T?i.props.children:i,p?c.jsx("title",{children:p}):null]})});process.env.NODE_ENV!=="production"&&(ai.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});ai.muiName="SvgIcon";function yt(e,t){function r(n,i){return c.jsx(ai,{"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=ai.muiName,ne.memo(ne.forwardRef(r))}let fo=0;function Df(e){const[t,r]=ne.useState(e),n=e||t;return ne.useEffect(()=>{t==null&&(fo+=1,r(`mui-${fo}`))},[t]),n}const Pf={...ne},ho=Pf.useId;function Mf(e){if(ho!==void 0){const t=ho();return e??t}return Df(e)}function Un(e){const t=ne.useRef(e);return bd(()=>{t.current=e}),ne.useRef((...r)=>(0,t.current)(...r)).current}function mo(...e){const t=ne.useRef(void 0),r=ne.useCallback(n=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const s=a,o=s(n);return typeof o=="function"?o:()=>{s(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return ne.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const If=k.oneOfType([k.func,k.object]);function zf(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Vf(e,t,r,n,i){const a=e[t],s=i||t;if(a==null||typeof window>"u")return null;let o;return typeof a=="function"&&!zf(a)&&(o="Did you accidentally provide a plain function component instead?"),o!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Bf=Xa(k.elementType,Vf);function yo(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
75
|
`))}return!1}const go={};function Ul(e,t){const r=ne.useRef(go);return r.current===go&&(r.current=e(t)),r}class si{constructor(){ln(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 si}static use(){const t=Ul(si.create).current,[r,n]=ne.useState(!1);return t.shouldMount=r,t.setShouldMount=n,ne.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=Lf(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.start(...t)})}stop(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.stop(...t)})}pulsate(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.pulsate(...t)})}}function Nf(){return si.use()}function Lf(){let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}function Sa(){return Sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sa.apply(null,arguments)}function qf(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ca(e,t){return Ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ca(e,t)}function Wf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ca(e,t)}const xo=$.createContext(null);function Uf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ja(e,t){var r=function(a){return t&&$.isValidElement(a)?t(a):a},n=Object.create(null);return e&&$.Children.map(e,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function Hf(e,t){e=e||{},t=t||{};function r(f){return f in t?t[f]:e[f]}var n=Object.create(null),i=[];for(var a in e)a in t?i.length&&(n[a]=i,i=[]):i.push(a);var s,o={};for(var l in t){if(n[l])for(s=0;s<n[l].length;s++){var d=n[l][s];o[n[l][s]]=r(d)}o[l]=r(l)}for(s=0;s<i.length;s++)o[i[s]]=r(i[s]);return o}function yr(e,t,r){return r[t]!=null?r[t]:e.props[t]}function Kf(e,t){return Ja(e.children,function(r){return $.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:yr(r,"appear",e),enter:yr(r,"enter",e),exit:yr(r,"exit",e)})})}function Gf(e,t,r){var n=Ja(e.children),i=Hf(t,n);return Object.keys(i).forEach(function(a){var s=i[a];if($.isValidElement(s)){var o=a in t,l=a in n,d=t[a],f=$.isValidElement(d)&&!d.props.in;l&&(!o||f)?i[a]=$.cloneElement(s,{onExited:r.bind(null,s),in:!0,exit:yr(s,"exit",e),enter:yr(s,"enter",e)}):!l&&o&&!f?i[a]=$.cloneElement(s,{in:!1}):l&&o&&$.isValidElement(d)&&(i[a]=$.cloneElement(s,{onExited:r.bind(null,s),in:d.props.in,exit:yr(s,"exit",e),enter:yr(s,"enter",e)}))}}),i}var Qf=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Yf={component:"div",childFactory:function(t){return t}},es=function(e){Wf(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var s=a.handleExited.bind(Uf(a));return a.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},a}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,a){var s=a.children,o=a.handleExited,l=a.firstRender;return{children:l?Kf(i,o):Gf(i,s,o),firstRender:!1}},r.handleExited=function(i,a){var s=Ja(this.props.children);i.key in s||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(o){var l=Sa({},o.children);return delete l[i.key],{children:l}}))},r.render=function(){var i=this.props,a=i.component,s=i.childFactory,o=qf(i,["component","childFactory"]),l=this.state.contextValue,d=Qf(this.state.children).map(s);return delete o.appear,delete o.enter,delete o.exit,a===null?$.createElement(xo.Provider,{value:l},d):$.createElement(xo.Provider,{value:l},$.createElement(a,o,d))},t}($.Component);es.propTypes=process.env.NODE_ENV!=="production"?{component:k.any,children:k.node,appear:k.bool,enter:k.bool,exit:k.bool,childFactory:k.func}:{};es.defaultProps=Yf;const Zf=[];function Xf(e){ne.useEffect(e,Zf)}class ts{constructor(){ln(this,"currentId",null);ln(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});ln(this,"disposeEffect",()=>this.clear)}static create(){return new ts}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function Jf(){const e=Ul(ts.create).current;return Xf(e.disposeEffect),e}function Hl(e){const{className:t,classes:r,pulsate:n=!1,rippleX:i,rippleY:a,rippleSize:s,in:o,onExited:l,timeout:d}=e,[f,p]=ne.useState(!1),m=rt(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),y={width:s,height:s,top:-(s/2)+a,left:-(s/2)+i},T=rt(r.child,f&&r.childLeaving,n&&r.childPulsate);return!o&&!f&&p(!0),ne.useEffect(()=>{if(!o&&l!=null){const h=setTimeout(l,d);return()=>{clearTimeout(h)}}},[l,o,d]),c.jsx("span",{className:m,style:y,children:c.jsx("span",{className:T})})}process.env.NODE_ENV!=="production"&&(Hl.propTypes={classes:k.object.isRequired,className:k.string,in:k.bool,onExited:k.func,pulsate:k.bool,rippleSize:k.number,rippleX:k.number,rippleY:k.number,timeout:k.number.isRequired});const vt=_r("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ea=550,eh=80,th=Ar.keyframes`
|
|
76
76
|
0% {
|
|
77
77
|
transform: scale(0);
|
|
@@ -145,7 +145,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
145
145
|
animation-iteration-count: infinite;
|
|
146
146
|
animation-delay: 200ms;
|
|
147
147
|
}
|
|
148
|
-
`,Kl=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:s,...o}=n,[l,d]=ne.useState([]),f=ne.useRef(0),p=ne.useRef(null);ne.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);const m=ne.useRef(!1),y=Jf(),T=ne.useRef(null),h=ne.useRef(null),C=ne.useCallback(w=>{const{pulsate:b,rippleX:_,rippleY:z,rippleSize:F,cb:D}=w;d(u=>[...u,c.jsx(ah,{classes:{ripple:rt(a.ripple,vt.ripple),rippleVisible:rt(a.rippleVisible,vt.rippleVisible),ripplePulsate:rt(a.ripplePulsate,vt.ripplePulsate),child:rt(a.child,vt.child),childLeaving:rt(a.childLeaving,vt.childLeaving),childPulsate:rt(a.childPulsate,vt.childPulsate)},timeout:Ea,pulsate:b,rippleX:_,rippleY:z,rippleSize:F},f.current)]),f.current+=1,p.current=D},[a]),v=ne.useCallback((w={},b={},_=()=>{})=>{const{pulsate:z=!1,center:F=i||b.pulsate,fakeElement:D=!1}=b;if((w==null?void 0:w.type)==="mousedown"&&m.current){m.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(m.current=!0);const u=D?null:h.current,M=u?u.getBoundingClientRect():{width:0,height:0,left:0,top:0};let N,A,L;if(F||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)N=Math.round(M.width/2),A=Math.round(M.height/2);else{const{clientX:
|
|
148
|
+
`,Kl=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:s,...o}=n,[l,d]=ne.useState([]),f=ne.useRef(0),p=ne.useRef(null);ne.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);const m=ne.useRef(!1),y=Jf(),T=ne.useRef(null),h=ne.useRef(null),C=ne.useCallback(w=>{const{pulsate:b,rippleX:_,rippleY:z,rippleSize:F,cb:D}=w;d(u=>[...u,c.jsx(ah,{classes:{ripple:rt(a.ripple,vt.ripple),rippleVisible:rt(a.rippleVisible,vt.rippleVisible),ripplePulsate:rt(a.ripplePulsate,vt.ripplePulsate),child:rt(a.child,vt.child),childLeaving:rt(a.childLeaving,vt.childLeaving),childPulsate:rt(a.childPulsate,vt.childPulsate)},timeout:Ea,pulsate:b,rippleX:_,rippleY:z,rippleSize:F},f.current)]),f.current+=1,p.current=D},[a]),v=ne.useCallback((w={},b={},_=()=>{})=>{const{pulsate:z=!1,center:F=i||b.pulsate,fakeElement:D=!1}=b;if((w==null?void 0:w.type)==="mousedown"&&m.current){m.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(m.current=!0);const u=D?null:h.current,M=u?u.getBoundingClientRect():{width:0,height:0,left:0,top:0};let N,A,L;if(F||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)N=Math.round(M.width/2),A=Math.round(M.height/2);else{const{clientX:G,clientY:se}=w.touches&&w.touches.length>0?w.touches[0]:w;N=Math.round(G-M.left),A=Math.round(se-M.top)}if(F)L=Math.sqrt((2*M.width**2+M.height**2)/3),L%2===0&&(L+=1);else{const G=Math.max(Math.abs((u?u.clientWidth:0)-N),N)*2+2,se=Math.max(Math.abs((u?u.clientHeight:0)-A),A)*2+2;L=Math.sqrt(G**2+se**2)}w!=null&&w.touches?T.current===null&&(T.current=()=>{C({pulsate:z,rippleX:N,rippleY:A,rippleSize:L,cb:_})},y.start(eh,()=>{T.current&&(T.current(),T.current=null)})):C({pulsate:z,rippleX:N,rippleY:A,rippleSize:L,cb:_})},[i,C,y]),S=ne.useCallback(()=>{v({},{pulsate:!0})},[v]),P=ne.useCallback((w,b)=>{if(y.clear(),(w==null?void 0:w.type)==="touchend"&&T.current){T.current(),T.current=null,y.start(0,()=>{P(w,b)});return}T.current=null,d(_=>_.length>0?_.slice(1):_),p.current=b},[y]);return ne.useImperativeHandle(r,()=>({pulsate:S,start:v,stop:P}),[S,v,P]),c.jsx(ih,{className:rt(vt.root,a.root,s),ref:h,...o,children:c.jsx(es,{component:null,exit:!0,children:l})})});process.env.NODE_ENV!=="production"&&(Kl.propTypes={center:k.bool,classes:k.object,className:k.string});function sh(e){return pr("MuiButtonBase",e)}const oh=_r("MuiButtonBase",["root","disabled","focusVisible"]),lh=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:i}=e,s=on({root:["root",t&&"disabled",r&&"focusVisible"]},sh,i);return r&&n&&(s.root+=` ${n}`),s},ch=mt("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"},[`&.${oh.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Gl=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:s,className:o,component:l="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:p=!1,focusRipple:m=!1,focusVisibleClassName:y,LinkComponent:T="a",onBlur:h,onClick:C,onContextMenu:v,onDragLeave:S,onFocus:P,onFocusVisible:w,onKeyDown:b,onKeyUp:_,onMouseDown:z,onMouseLeave:F,onMouseUp:D,onTouchEnd:u,onTouchMove:M,onTouchStart:N,tabIndex:A=0,TouchRippleProps:L,touchRippleRef:G,type:se,...me}=n,ue=ne.useRef(null),K=Nf(),B=mo(K.ref,G),[H,de]=ne.useState(!1);d&&H&&de(!1),ne.useImperativeHandle(i,()=>({focusVisible:()=>{de(!0),ue.current.focus()}}),[]);const fe=K.shouldMount&&!f&&!d;ne.useEffect(()=>{H&&m&&!f&&K.pulsate()},[f,m,H,K]);const pe=Bt(K,"start",z,p),ge=Bt(K,"stop",v,p),q=Bt(K,"stop",S,p),ee=Bt(K,"stop",D,p),ae=Bt(K,"stop",j=>{H&&j.preventDefault(),F&&F(j)},p),oe=Bt(K,"start",N,p),le=Bt(K,"stop",u,p),Se=Bt(K,"stop",M,p),Q=Bt(K,"stop",j=>{yo(j.target)||de(!1),h&&h(j)},!1),De=Un(j=>{ue.current||(ue.current=j.currentTarget),yo(j.target)&&(de(!0),w&&w(j)),P&&P(j)}),He=()=>{const j=ue.current;return l&&l!=="button"&&!(j.tagName==="A"&&j.href)},Qe=Un(j=>{m&&!j.repeat&&H&&j.key===" "&&K.stop(j,()=>{K.start(j)}),j.target===j.currentTarget&&He()&&j.key===" "&&j.preventDefault(),b&&b(j),j.target===j.currentTarget&&He()&&j.key==="Enter"&&!d&&(j.preventDefault(),C&&C(j))}),X=Un(j=>{m&&j.key===" "&&H&&!j.defaultPrevented&&K.stop(j,()=>{K.pulsate(j)}),_&&_(j),C&&j.target===j.currentTarget&&He()&&j.key===" "&&!j.defaultPrevented&&C(j)});let ce=l;ce==="button"&&(me.href||me.to)&&(ce=T);const te={};ce==="button"?(te.type=se===void 0?"button":se,te.disabled=d):(!me.href&&!me.to&&(te.role="button"),d&&(te["aria-disabled"]=d));const he=mo(r,ue),g={...n,centerRipple:a,component:l,disabled:d,disableRipple:f,disableTouchRipple:p,focusRipple:m,tabIndex:A,focusVisible:H},E=lh(g);return c.jsxs(ch,{as:ce,className:rt(E.root,o),ownerState:g,onBlur:Q,onClick:C,onContextMenu:ge,onFocus:De,onKeyDown:Qe,onKeyUp:X,onMouseDown:pe,onMouseLeave:ae,onMouseUp:ee,onDragLeave:q,onTouchEnd:le,onTouchMove:Se,onTouchStart:oe,ref:he,tabIndex:d?-1:A,type:se,...te,...me,children:[s,fe?c.jsx(Kl,{ref:B,center:a,...L}):null]})});function Bt(e,t,r,n=!1){return Un(i=>(r&&r(i),n||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(Gl.propTypes={action:If,centerRipple:k.bool,children:k.node,classes:k.object,className:k.string,component:Bf,disabled:k.bool,disableRipple:k.bool,disableTouchRipple:k.bool,focusRipple:k.bool,focusVisibleClassName:k.string,href:k.any,LinkComponent:k.elementType,onBlur:k.func,onClick:k.func,onContextMenu:k.func,onDragLeave:k.func,onFocus:k.func,onFocusVisible:k.func,onKeyDown:k.func,onKeyUp:k.func,onMouseDown:k.func,onMouseLeave:k.func,onMouseUp:k.func,onTouchEnd:k.func,onTouchMove:k.func,onTouchStart:k.func,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),tabIndex:k.number,TouchRippleProps:k.object,touchRippleRef:k.oneOfType([k.func,k.shape({current:k.shape({pulsate:k.func.isRequired,start:k.func.isRequired,stop:k.func.isRequired})})]),type:k.oneOfType([k.oneOf(["button","reset","submit"]),k.string])});function uh(e){return pr("MuiCircularProgress",e)}_r("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Kt=44,ka=Ar.keyframes`
|
|
149
149
|
0% {
|
|
150
150
|
transform: rotate(0deg);
|
|
151
151
|
}
|
|
@@ -173,11 +173,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
173
173
|
`:null,dh=typeof Ta!="string"?Ar.css`
|
|
174
174
|
animation: ${Ta} 1.4s ease-in-out infinite;
|
|
175
175
|
`:null,fh=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${ze(n)}`],svg:["svg"],circle:["circle",`circle${ze(r)}`,i&&"circleDisableShrink"]};return on(a,uh,t)},hh=mt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${ze(r.color)}`]]}})(Fr(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:ph||{animation:`${ka} 1.4s linear infinite`}},...Object.entries(e.palette).filter(ii()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),mh=mt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),yh=mt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${ze(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(Fr(({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:dh||{animation:`${Ta} 1.4s ease-in-out infinite`}}]}))),Ql=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:s=!1,size:o=40,style:l,thickness:d=3.6,value:f=0,variant:p="indeterminate",...m}=n,y={...n,color:a,disableShrink:s,size:o,thickness:d,value:f,variant:p},T=fh(y),h={},C={},v={};if(p==="determinate"){const S=2*Math.PI*((Kt-d)/2);h.strokeDasharray=S.toFixed(3),v["aria-valuenow"]=Math.round(f),h.strokeDashoffset=`${((100-f)/100*S).toFixed(3)}px`,C.transform="rotate(-90deg)"}return c.jsx(hh,{className:rt(T.root,i),style:{width:o,height:o,...C,...l},ownerState:y,ref:r,role:"progressbar",...v,...m,children:c.jsx(mh,{className:T.svg,ownerState:y,viewBox:`${Kt/2} ${Kt/2} ${Kt} ${Kt}`,children:c.jsx(yh,{className:T.circle,style:h,ownerState:y,cx:Kt,cy:Kt,r:(Kt-d)/2,fill:"none",strokeWidth:d})})})});process.env.NODE_ENV!=="production"&&(Ql.propTypes={classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","primary","secondary","error","info","success","warning"]),k.string]),disableShrink:Xa(k.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:k.oneOfType([k.number,k.string]),style:k.object,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),thickness:k.number,value:k.number,variant:k.oneOf(["determinate","indeterminate"])});function gh(e){return pr("MuiIconButton",e)}const vo=_r("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),xh=e=>{const{classes:t,disabled:r,color:n,edge:i,size:a,loading:s}=e,o={root:["root",s&&"loading",r&&"disabled",n!=="default"&&`color${ze(n)}`,i&&`edge${ze(i)}`,`size${ze(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return on(o,gh,t)},vh=mt(Gl,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${ze(r.color)}`],r.edge&&t[`edge${ze(r.edge)}`],t[`size${ze(r.size)}`]]}})(Fr(({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})`:St(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}}]})),Fr(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(ii()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(ii()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:St((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)}}],[`&.${vo.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${vo.loading}`]:{color:"transparent"}}))),bh=mt("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"}}]})),Hn=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:s,color:o="default",disabled:l=!1,disableFocusRipple:d=!1,size:f="medium",id:p,loading:m=null,loadingIndicator:y,...T}=n,h=Mf(p),C=y??c.jsx(Ql,{"aria-labelledby":h,color:"inherit",size:16}),v={...n,edge:i,color:o,disabled:l,disableFocusRipple:d,loading:m,loadingIndicator:C,size:f},S=xh(v);return c.jsxs(vh,{id:m?h:p,className:rt(S.root,s),centerRipple:!0,focusRipple:!d,disabled:l||m,ref:r,...T,ownerState:v,children:[typeof m=="boolean"&&c.jsx("span",{className:S.loadingWrapper,style:{display:"contents"},children:c.jsx(bh,{className:S.loadingIndicator,ownerState:v,children:m&&C})}),a]})});process.env.NODE_ENV!=="production"&&(Hn.propTypes={children:Xa(k.node,e=>ne.Children.toArray(e.children).some(r=>ne.isValidElement(r)&&r.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
176
|
-
`)):null),classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),k.string]),disabled:k.bool,disableFocusRipple:k.bool,disableRipple:k.bool,edge:k.oneOf(["end","start",!1]),id:k.string,loading:k.bool,loadingIndicator:k.node,size:k.oneOfType([k.oneOf(["small","medium","large"]),k.string]),sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object])});const bo=yt(c.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"),wo=yt(c.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"),wh=yt(c.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"),rs=yt(c.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),oi=yt(c.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"),Sh=yt(c.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"),J={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"},So=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}},Ch=(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=So(e),i=So(t);return Ch(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},ns=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)}},Eh=ns(J.primary.main),kh=ns(J.secondary.main),lt=ns(J.text.primary),Th={primary:J.primary.main,secondary:J.secondary.main,textPrimary:J.text.primary,textSecondary:J.text.secondary,divider:J.divider,background:J.background},li=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:l="6px",endorsementHeight:d=28,endorsementPaddingX:f="8px",...p})=>{var h,C;const m=!!r,y=a?c.jsx(x.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:d,paddingLeft:f,paddingRight:f,borderRadius:l,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,T={...p.InputProps,endAdornment:y||i?c.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[y||i,(h=p.InputProps)==null?void 0:h.endAdornment]}):(C=p.InputProps)==null?void 0:C.endAdornment};return c.jsxs(x.Box,{children:[m&&c.jsx(x.Typography,{variant:n,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:r}),c.jsx(x.TextField,{fullWidth:!0,size:"small",...p,InputProps:T,label:m?void 0:p.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:lt[300]},"&.Mui-focused fieldset":{borderColor:lt[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary},"& .MuiFormLabel-root":{color:J.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:J.text.primary},"& .MuiFormHelperText-root":{color:e?J.error.main:J.text.secondary},...t}})]})},is=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:l,sx:d,...f})=>{const p=$.useId(),m=l==null||l===""||Array.isArray(l)&&l.length===0,y=T=>c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...T,children:c.jsx("path",{d:"M6 9l6 6 6-6",stroke:J.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return c.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!f.error,variant:"outlined",children:[e&&c.jsx(x.Typography,{variant:s,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:e}),t&&c.jsx(x.InputLabel,{id:p,shrink:!m||!!o,sx:{color:J.text.secondary,"&.Mui-focused":{color:J.text.primary},"&.Mui-error":{color:J.error.main}},children:t}),c.jsx(x.Select,{...f,value:l,labelId:t?p:void 0,label:t,displayEmpty:!0,input:c.jsx(x.OutlinedInput,{label:t}),IconComponent:y,renderValue:T=>{const h=T;if(m)return c.jsx("span",{style:{color:J.text.secondary},children:o??""});const C=r.find(v=>v.value===h);return(C==null?void 0:C.label)??String(h)},endAdornment:n?c.jsx(x.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${J.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:J.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:J.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:J.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:lt[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:lt[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:J.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...d},children:n?c.jsx(x.MenuItem,{disabled:!0,children:c.jsx(x.CircularProgress,{size:16})}):r.map(T=>c.jsx(x.MenuItem,{value:T.value,sx:{backgroundColor:J.background.paper,color:J.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:lt[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:lt[50],borderRadius:"4px"}},children:T.label},T.value))}),i&&c.jsx(x.FormHelperText,{children:i})]})},jh=e=>c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:c.jsx("path",{d:"M6 9l6 6 6-6",stroke:J.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Yl=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:l="subtitle2",disabled:d,loading:f,error:p,helperText:m,onOpen:y,noOptionsText:T,sx:h})=>c.jsxs(x.Box,{children:[a&&c.jsx(x.Typography,{variant:l,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:a}),c.jsx(x.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:c.jsx(jh,{}),disabled:d,loading:f,onOpen:y,noOptionsText:T,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${J.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:lt[300]},"&.Mui-focused fieldset":{borderColor:lt[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:J.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...h},getOptionLabel:C=>typeof C=="string"?C:(C==null?void 0:C.label)??"",isOptionEqualToValue:(C,v)=>((C==null?void 0:C.value)??C)===((v==null?void 0:v.value)??v),renderOption:(C,v,{selected:S})=>c.jsxs(x.Box,{component:"li",...C,sx:{backgroundColor:J.background.paper,color:J.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:lt[50]},"&.Mui-focused":{backgroundColor:lt[50]},...S?{backgroundColor:lt[50]}:{}},children:[n&&c.jsx(x.Checkbox,{checked:S}),c.jsx(x.Typography,{variant:"body2",sx:{color:J.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]}),renderInput:C=>c.jsx(x.TextField,{...C,label:i,placeholder:s,size:"small",error:p,helperText:m,InputLabelProps:{shrink:!!r||!!s,sx:{color:J.text.secondary,"&.Mui-focused":{color:J.text.primary},"&.Mui-error":{color:J.error.main}}},InputProps:{...C.InputProps,endAdornment:c.jsxs(c.Fragment,{children:[f?c.jsx(x.CircularProgress,{size:20}):null,C.InputProps.endAdornment]})}}),onChange:(C,v)=>o(v)})]}),Tr=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),Zl=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:l,error:d,groupPadding:f=1.5,itemGap:p=1,disabled:m=!1})=>{const y=typeof i=="number"&&i>0,T=y?i:12,h=i===!0,C=i===!1&&!y,v=(S,P)=>{const w=Array.isArray(r)?[...r]:[];P?w.includes(S)||a([...w,S]):a(w.filter(b=>b!==S))};return c.jsxs(x.FormControl,{error:d,disabled:m,sx:S=>{var P;return{display:"flex",flexDirection:"column",px:S.spacing(f),borderRadius:((P=S.shape)==null?void 0:P.borderRadius)||8,mx:-2.5,backgroundColor:S.palette.background.paper}},children:[s==="top"&&e&&c.jsx(x.Typography,{variant:o,sx:S=>({color:S.palette.text.primary,mb:.5,fontSize:S.typography.fontSize,fontWeight:500}),children:e}),t&&c.jsx(x.FormLabel,{sx:S=>({color:S.palette.text.secondary,mb:.5,mx:1,fontSize:S.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:S.palette.text.primary},"&.Mui-error":{color:S.palette.error.main}}),children:t}),y&&c.jsx(x.Box,{sx:S=>({display:"grid",gridTemplateColumns:`repeat(${T}, 1fr)`,gap:S.spacing(p),mt:0}),children:n.map(S=>{const P=Array.isArray(r)&&r.includes(S.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:w=>v(S.value,w.target.checked),disabled:m,sx:w=>({color:w.palette.text.secondary,"&.Mui-checked":{color:w.palette.primary.main}})}),label:S.label,sx:w=>({m:0,"& .MuiFormControlLabel-label":{color:w.palette.text.primary,fontSize:12}})},String(S.value))})}),h&&c.jsx(x.Box,{sx:S=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:S.spacing(p),alignItems:"center",mt:0}),children:n.map(S=>{const P=Array.isArray(r)&&r.includes(S.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:w=>v(S.value,w.target.checked),disabled:m,sx:w=>({color:w.palette.text.secondary,"&.Mui-checked":{color:w.palette.primary.main}})}),label:S.label,sx:w=>({m:0,"& .MuiFormControlLabel-label":{color:w.palette.text.primary,fontSize:12}})},String(S.value))})}),C&&c.jsx(x.Box,{sx:S=>({display:"flex",flexDirection:"column",gap:S.spacing(p),alignItems:"flex-start",mt:0}),children:n.map(S=>{const P=Array.isArray(r)&&r.includes(S.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:w=>v(S.value,w.target.checked),disabled:m,sx:w=>({color:w.palette.text.secondary,"&.Mui-checked":{color:w.palette.primary.main}})}),label:S.label,sx:w=>({m:0,"& .MuiFormControlLabel-label":{color:w.palette.text.primary,fontSize:12}})},String(S.value))})}),l&&c.jsx(x.FormHelperText,{sx:{mt:.5},children:l})]})},ci=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>c.jsx(x.FormControlLabel,{control:c.jsx(x.Switch,{checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ja=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:l,error:d,groupPadding:f=1.5,itemGap:p=1})=>c.jsxs(x.FormControl,{error:d,sx:m=>{var y;return{display:"flex",flexDirection:"column",px:m.spacing(f),borderRadius:((y=m.shape)==null?void 0:y.borderRadius)||8,mx:-2.5,backgroundColor:m.palette.background.paper}},children:[s==="top"&&e&&c.jsx(x.Typography,{variant:o,sx:m=>({color:m.palette.text.primary,mb:.5,fontSize:m.typography.fontSize,fontWeight:500}),children:e}),t&&c.jsx(x.FormLabel,{sx:m=>({color:m.palette.text.secondary,mb:.5,mx:1,fontSize:m.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:m.palette.text.primary},"&.Mui-error":{color:m.palette.error.main}}),children:t}),c.jsx(x.RadioGroup,{row:i,value:r,onChange:m=>a(m.target.value),sx:m=>({display:"flex",flexDirection:i?"row":"column",gap:m.spacing(p),alignItems:i?"center":"flex-start"}),children:n.map(m=>c.jsx(x.FormControlLabel,{value:m.value,control:c.jsx(x.Radio,{size:"small",sx:y=>({color:y.palette.text.secondary,"&.Mui-checked":{color:y.palette.primary.main}})}),label:c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[c.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:m.label}),m.description&&c.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:m.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(m.value)))}),l&&c.jsx(x.FormHelperText,{sx:{mt:.5},children:l})]}),as=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>c.jsxs(x.Box,{children:[e==="top"&&r&&c.jsx(x.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),c.jsx(x.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}})]}),Xl=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return c.jsxs(x.Box,{children:[s&&c.jsx(x.Typography,{variant:t,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:e}),c.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:lt[300]},"&.Mui-focused fieldset":{borderColor:lt[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:J.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:J.text.primary},"& .MuiFormHelperText-root":{color:r?J.error.main:J.text.secondary},...n}})]})},Jl=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>c.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&c.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&c.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),Oh=()=>c.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:c.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"})}),c.jsx("defs",{children:c.jsx("clipPath",{id:"clip0_5814_24904",children:c.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function Fh({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:l=!0,renderItem:d,chipText:f,helperText:p}){const[m,y]=$.useState(null),[T,h]=$.useState(null),C=w=>b=>{if(!i){y(w),b.dataTransfer.effectAllowed="move";try{b.dataTransfer.setData("text/plain",String(t(e[w])))}catch{}}},v=w=>b=>{i||(b.preventDefault(),h(w),b.dataTransfer.dropEffect="move")},S=w=>b=>{if(i)return;if(b.preventDefault(),m===null||m===w){y(null),h(null);return}const _=[...e],[z]=_.splice(m,1);_.splice(w,0,z),y(null),h(null),r(_)},P=()=>{y(null),h(null)};return c.jsxs(x.Box,{role:"list",sx:w=>({display:"flex",flexDirection:"column",gap:w.spacing(1),...a}),children:[n,c.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),e.map((w,b)=>{const _=m===b,z=T===b&&m!==null&&m!==b;return c.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:C(b),onDragOver:v(b),onDrop:S(b),onDragEnd:P,sx:F=>{var D;return{userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${z?F.palette.primary.main:"#EBEBEB"}`,borderRadius:((D=F.shape)==null?void 0:D.borderRadius)||"8px",padding:F.spacing(1),opacity:_?.6:1,boxShadow:z?`0 0 0 2px ${F.palette.primary.main}33`:"none"}},children:d?d(w,_):c.jsxs(x.Box,{sx:F=>({display:"flex",alignItems:"center",gap:F.spacing(1),minWidth:0}),children:[l&&c.jsx(Oh,{}),o&&c.jsxs(x.Typography,{variant:"body2",sx:F=>({fontWeight:600,fontSize:14,color:`${F.palette.text.primary}`,flex:"0 0 auto"}),children:[b+1,"."]}),(()=>{const F=typeof f=="function"?f(w,b):f;return F?c.jsx(x.Chip,{label:F,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),c.jsx(x.Typography,{variant:"body2",sx:F=>({fontSize:12,fontWeight:500,color:`${F.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(w):""})]})},String(t(w)))}),p?typeof p=="string"?c.jsx(x.Typography,{variant:"caption",sx:w=>({color:`${w.palette.text.primary}60`}),children:p}):p:null]})}const Ah=mt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:"#E8E8E8",transition:"border-color 0.3s ease"},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:J.primary.main}})),_h=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=a=>{const{active:s,completed:o,icon:l}=a;return o?c.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${J.primary.main}`,borderRadius:"50%",backgroundColor:J.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:c.jsx(rs,{sx:{fontSize:16,fontWeight:600}})}):s?c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${J.primary.main}`,backgroundColor:St(J.primary.main,.2),color:J.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l}):c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:J.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l})};return c.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:c.jsx(Ah,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:J.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((a,s)=>c.jsxs(x.Step,{onClick:()=>r==null?void 0:r(s),completed:s<t,children:[c.jsx(x.StepLabel,{StepIconComponent:i,children:c.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:s===t?J.primary.main:J.text.primary},children:a.label})}),s!==e.length-1&&c.jsx(x.Divider,{sx:{ml:4.2,borderColor:J.divider}})]},s))})},ec=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>c.jsx(x.Chip,{...s,sx:o=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${St(t||o.palette.text.primary,.5)}`,backgroundColor:St(t||o.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||o.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Rh=mt(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:J.primary.main}})),$h=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=$.useState(null),s=o=>{const{active:l,completed:d,icon:f}=o;return d?c.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${J.primary.main}`,borderRadius:"50%",backgroundColor:J.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:c.jsx(rs,{sx:{fontSize:16,fontWeight:600}})}):l?c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${J.primary.main}`,backgroundColor:St(J.primary.main,.2),color:J.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:f}):c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:J.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:f})};return c.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:c.jsx(Rh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:J.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,l)=>c.jsxs(x.Step,{onMouseEnter:()=>a(l),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(l),completed:l<t,children:[c.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[c.jsxs(x.StepLabel,{StepIconComponent:s,children:[c.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[c.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:l===t?J.primary.main:J.text.primary},children:o.label}),c.jsx(ec,{size:"small",colorHex:l<t?J.success.main:l===t?"#973B00":J.text.primary,label:l<t?"Completed":l===t?"In progress":"Not started"})]}),c.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${J.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===l&&c.jsx(x.Button,{sx:{display:l>t?"none":"block"},variant:l<t?"outlined":"contained",size:"small",color:"primary",children:l<t?"Edit":l===t?"Complete":""})]}),l!==e.length-1&&c.jsx(x.Divider,{sx:{ml:4.2,borderColor:J.divider}})]},l))})},Dh=yt(c.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"),Ph=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const l=s||J.info.main,d=St(l,.08),f=St(l,.08),p=a??c.jsx(Dh,{sx:{color:l,fontSize:18}});return e==="inlineInfo"?c.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${f}`,boxShadow:"none",...o},children:[c.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:p}),c.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})]}):e==="inline"?c.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${f}`,boxShadow:"none",...o},children:c.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})}):e==="listWithHeader"?c.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:d,border:`1px solid ${f}`,...o},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[p,c.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:l,fontSize:14,lineHeight:1.3},children:t})]}),r&&c.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:l,fontSize:10,lineHeight:1.3},children:r}),c.jsx(x.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:l,my:-.5}},children:i.map((m,y)=>c.jsx(x.ListItem,{sx:{py:0},children:c.jsx(x.ListItemText,{primary:m})},y))})]}):c.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:d,border:`0.5px solid ${f}`,boxShadow:"none",...o},children:c.jsx(x.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:l,my:-.5}},children:i.map((m,y)=>c.jsx(x.ListItem,{sx:{py:0},children:c.jsx(x.ListItemText,{primary:m})},y))})})},tc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>c.jsxs(x.Box,{children:[c.jsx(x.Tabs,{value:e,onChange:(s,o)=>t(o),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((s,o)=>{const l=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return c.jsx(x.Tab,{value:l,disabled:s.disabled,label:c.jsx(x.Typography,{variant:"body2",children:s.label}),sx:d=>({px:2,textTransform:"none",color:d.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:d.palette.action.hover},"&.Mui-selected":{color:d.palette.common.white,borderColor:d.palette.primary.main,backgroundColor:d.palette.primary.main,fontWeight:600},...a})},String(l))})}),r.map((s,o)=>{const l=typeof s.value=="string"||typeof s.value=="number"?s.value:o,d=s.content??(typeof s.value=="object"?s.value:null);return d&&e===l?c.jsx(x.Box,{sx:{mt:1},children:d},`panel-${l}`):null})]}),zn=yt(c.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Mh=yt(c.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"),rc=({name:e,columns:t,initialRow:r,addLabel:n,rowDeletable:i=!0,control:a,sx:s,addActions:o,emptyTitle:l="No items configured",emptySubtitle:d="Click 'Add' to get started.",emptyCardSx:f,setValue:p,rowSelectionMode:m,rowSelectionKey:y})=>{const{fields:T,append:h,remove:C}=nu({control:a,name:e}),v=$.useMemo(()=>{if(y)return y;const D=t.find(u=>u.type==="rowSelect");return D==null?void 0:D.key},[t,y]),S=al({control:a,name:e})||[],P=$.useMemo(()=>{if(!v)return{};const D={};return S.forEach((u,M)=>{D[M]=!!(u!=null&&u[v])}),D},[S,v]),w=$.useCallback(D=>P[D]===!0,[P]),b=$.useCallback((D,u)=>{if(!p||!v)return;const M=`${e}.${D}.${v}`;m==="single"&&u&&S.forEach((N,A)=>{if(A!==D){const L=`${e}.${A}.${v}`;p(L,!1,{shouldDirty:!0})}}),p(M,u,{shouldDirty:!0})},[e,v,m,p,S]),_=D=>{const u={...D||r};t.forEach(M=>{M.value!==void 0&&u[M.key]===void 0&&(u[M.key]=typeof M.value=="function"?M.value(u,T.length):M.value)}),h(u)},z=$.useMemo(()=>t.reduce((u,M)=>{if(M.width==="auto"||M.width===void 0)return u+120;const N=typeof M.width=="number"?M.width:typeof M.width=="string"&&parseInt(M.width)||160;return u+N},0)+(i?100:0),[t,i]),F=D=>D.width==="auto"||D.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof D.width=="number"?{width:`${D.width}px`,minWidth:`${D.width}px`,maxWidth:`${D.width}px`}:typeof D.width=="string"?{width:D.width,minWidth:D.width}:{width:"160px",minWidth:"160px"};return c.jsx(x.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"hidden",...s},children:T.length===0?c.jsxs(x.Box,{sx:D=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:St(D.palette.primary.main,.4),backgroundColor:St(D.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...f}),children:[c.jsx(x.Typography,{variant:"subtitle1",sx:D=>({color:D.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:l}),c.jsx(x.Typography,{variant:"body2",sx:D=>({color:D.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:d}),Array.isArray(o)&&o.length>0?o.map((D,u)=>c.jsx(x.Button,{variant:"outlined",size:"small",startIcon:c.jsx(zn,{}),sx:{mr:1,mt:1},onClick:()=>_(D.template),children:D.label},`empty-add-${u}`)):n&&c.jsx(x.Button,{variant:"outlined",size:"small",startIcon:c.jsx(zn,{}),onClick:()=>_(),children:n})]}):c.jsxs(c.Fragment,{children:[c.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(o)&&o.length>0?o.map((D,u)=>c.jsx(x.Button,{variant:u===0?"contained":"outlined",size:"small",startIcon:c.jsx(zn,{}),onClick:()=>_(D.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:u===0?"#04502d":void 0}},children:D.label},`add-${u}`)):n&&c.jsx(x.Button,{variant:"contained",size:"small",startIcon:c.jsx(zn,{}),onClick:()=>_(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},children:n})}),c.jsx(x.Box,{sx:{width:"100%",overflow:"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:c.jsx(x.TableContainer,{sx:{width:"max-content",minWidth:"100%"},children:c.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${z||650}px`},children:[c.jsx(x.TableHead,{children:c.jsxs(x.TableRow,{children:[t.map(D=>c.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,...F(D)},children:D.header},D.key)),i&&c.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"})]})}),c.jsx(x.TableBody,{children:T.map((D,u)=>{const M=w(u),N=m&&!M;return c.jsxs(x.TableRow,{children:[t.map(A=>{var ue;const L=`${e}.${u}.${A.key}`,Q=A.type==="rowSelect"||A.key===v,se=Q?!1:N?!0:typeof A.disabled=="function"?A.disabled(D,u):!!A.disabled;if(A.type==="index"){const K=A.indexFormat?A.indexFormat(u):`#${u+1}`;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((ue=A.cellSx)==null?void 0:ue.textAlign)||"center",...F(A),...A.cellSx},children:K},A.key)}if(A.value!==void 0&&A.editable===!1){const K=typeof A.value=="function"?A.value(D,u):A.value;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...F(A),...A.cellSx},children:K},A.key)}const me=A.endorsementText?typeof A.endorsementText=="function"?A.endorsementText(D,u):A.endorsementText:void 0;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...F(A),...A.cellSx},children:A.type==="rowSelect"||Q&&A.type==="checkbox"?c.jsx(Pe,{name:L,control:a,defaultValue:!1,render:({field:K})=>c.jsx(Tr,{label:"",checked:!!K.value,disabled:!1,onChange:B=>{K.onChange(B),b(u,B)},sx:A.sx})}):A.type==="checkbox"?c.jsx(Pe,{name:L,control:a,render:({field:K})=>c.jsx(Tr,{label:"",checked:!!K.value,disabled:se,onChange:K.onChange,sx:A.sx})}):A.type==="select"?c.jsx(Pe,{name:L,control:a,render:({field:K})=>c.jsx(is,{...K,fullWidth:!0,disabled:se,options:A.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required})}):A.type==="date"?c.jsx(Pe,{name:L,control:a,defaultValue:A.value!==void 0?typeof A.value=="function"?A.value(D,u):A.value:void 0,render:({field:K})=>($.useEffect(()=>{if(p&&(K.value===void 0||K.value===null||K.value==="")&&A.value!==void 0){const B=typeof A.value=="function"?A.value(D,u):A.value;p(L,B,{shouldValidate:!1})}},[L,K.value,A.value,D,u,p]),c.jsx(as,{...K,fullWidth:!0,disabled:se,size:"small",placeholder:A.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required}))}):c.jsx(Pe,{name:L,control:a,defaultValue:A.value!==void 0?typeof A.value=="function"?A.value(D,u):A.value:void 0,render:({field:K})=>($.useEffect(()=>{if(p&&(K.value===void 0||K.value===null||K.value==="")&&A.value!==void 0){const B=typeof A.value=="function"?A.value(D,u):A.value;p(L,B,{shouldValidate:!1})}},[L,K.value,A.value,D,u,p]),c.jsx(li,{...K,fullWidth:!0,type:A.type==="number"?"number":"text",placeholder:A.placeholder,disabled:se,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required,endorsementText:me,endorsementBg:A.endorsementBg,endorsementColor:A.endorsementColor,endorsementRadius:A.endorsementRadius,endorsementHeight:A.endorsementHeight,endorsementPaddingX:A.endorsementPaddingX,inputProps:{...A.type==="number"?{min:A.min,max:A.max,step:A.step}:{minLength:A.minLength,maxLength:A.maxLength,pattern:A.pattern}}}))})},A.key)}),i&&c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:c.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>C(u),sx:{width:"20px",height:"20px"},children:c.jsx(Mh,{sx:{fontSize:"20px"}})})})]},D.id)})})]})})})]})})},nc=({name:e,control:t,items:r,sx:n,cardSx:i})=>c.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,l=!!(a.header||a.chipText),d=a.leftAction,f=a.rightAction;return c.jsxs(x.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[s&&d&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:c.jsx(Pe,{name:d.name,control:t,defaultValue:!1,render:({field:p})=>c.jsx(Tr,{label:d.label||"",checked:!!p.value,onChange:p.onChange,sx:{margin:0}})})}),l&&c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&c.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&c.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})]}),o&&f&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:c.jsx(Pe,{name:f.name,control:t,defaultValue:!1,render:({field:p})=>c.jsx(ci,{label:f.label,checked:!!p.value,onChange:p.onChange,sx:{margin:0}})})}),!s&&!o&&!l&&c.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})});async function ic(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:l={},params:d={},body:f,transform:p,passThroughFields:m}=e;let y=i;if(t&&!i.startsWith("http")&&(y=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const w=/\{([^}]+)\}/g;y=y.replace(w,(b,_)=>{const z=n[_];return z!=null?encodeURIComponent(String(z)):""}),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const T=new URLSearchParams;Object.entries(d).forEach(([w,b])=>{b!=null&&T.append(w,String(b))}),T.toString()&&(y+=`${y.includes("?")?"&":"?"}${T.toString()}`);try{const w=/^https?:\/\//i.test(y),b=new URL(y,w?void 0:"http://local.placeholder"),_=Array.from(b.searchParams.entries());for(const[z,F]of _)(F===""||F==="undefined"||F==="null")&&b.searchParams.delete(z);w?y=b.toString():y=b.pathname+(b.search?b.search:""),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const h={"Content-Type":"application/json",...r,...l},C={method:a,headers:h};(a==="POST"||a==="PUT")&&f&&(C.body=JSON.stringify(f));const v=await fetch(y,C);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const S=await v.json();if(p)return p(Array.isArray(S)?S:S.data||S);const P=Array.isArray(S)?S:S.data||S;if(!Array.isArray(P))throw new Error("API response is not an array");return P.map(w=>{const b={label:w[o]||w.name||w.title||String(w[s]||""),value:w[s]||w.id||w.value||""},_=Array.isArray(m)?m:void 0;if(Array.isArray(_))for(const z of _)w[z]!==void 0&&(b[z]=w[z]);return b})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function ac(e,t,r,n,i=!1){const a=$.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const o=n[e.dependsOn];return o!==void 0?o:null},[e==null?void 0:e.dependsOn,n]),s=$.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return Lu({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return ic(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:o=>Math.min(1e3*2**o,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function fr(e){return!!(e.apiConfig||e.api_endpoint)}function ss(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 Ih(e,t){const r=ss(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 os=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],l=!!o,[d,f]=$.useState(!1),p=$.useRef(!1),[m,y]=$.useState(!1),[T,h]=$.useState(!1),[C,v]=$.useState(!1),S=$.useRef(null),P=$.useRef(null),w=()=>{var q;return e.required!==void 0?e.required:((q=e.validation)==null?void 0:q.required)!==void 0?e.validation.required:!1},b=q=>w()?`${q} *`:q,_=()=>{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=$.useRef(void 0);$.useEffect(()=>{const q=e.value;if(typeof q!="function"||!s)return;let ee;try{ee=q(a||{})}catch{return}const ae=a?a[e.name]:void 0;if(z.current===void 0&&(z.current=ee),ae===void 0||ae===z.current)try{s(e.name,ee,{shouldValidate:!0,shouldDirty:!1}),z.current=ee}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((q,ee)=>({...q,[ee]:a[ee]}),{}):a||{}),e.name]);const F=$.useMemo(()=>{const q=ss(e);return q&&Array.isArray(e.passThroughFields)&&(q.passThroughFields=e.passThroughFields),q},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),D=$.useRef(null),u=F!=null&&F.dependsOn?a==null?void 0:a[F.dependsOn]:null,M=$.useMemo(()=>{if(!(F!=null&&F.dependsOn))return!1;const q=u,ee=D.current,ae=q!==ee;return ae&&(D.current=q),ae},[F==null?void 0:F.dependsOn,u]),N=$.useMemo(()=>{const q=e.showWhen;if(typeof q=="function")try{return!!q(a||{})}catch{return!0}if(q&&typeof q=="object"){const ee=q.field,ae=q.equals,oe=q.in,ce=ee?(a||{})[ee]:void 0;if(ee&&typeof ae<"u")return ce===ae;if(ee&&Array.isArray(oe))return oe.includes(ce)}return!0},[e.showWhen,a]),A=$.useCallback(()=>{const q=e.dynamicEndorsement;if(typeof q=="function")try{return q(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),L=$.useCallback(()=>{const q=e.endAdornment,ee=e.endAdornmentSwitch,ae=e.endAdornmentCheckbox;if(ee)return c.jsx(Pe,{name:ee,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:oe})=>c.jsx(x.Switch,{checked:oe.value||!1,onChange:ce=>{oe.onChange(ce.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(ce.target.checked,a,s)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(ae)return c.jsx(Pe,{name:ae,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:oe})=>c.jsx(Tr,{label:"",checked:oe.value||!1,onChange:oe.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof q=="function")try{return q(a||{},{control:t,setValue:s})}catch{return}return q},[e,a,t,s]),Q=$.useMemo(()=>d&&fr(e)&&(!(F!=null&&F.dependsOn)||u),[d,e,F==null?void 0:F.dependsOn,u]),se=$.useMemo(()=>{const q={};if(!a)return q;const ee=(F==null?void 0:F.endpoint)||(e==null?void 0:e.api_endpoint);if(ee&&typeof ee=="string"){const ae=ee.match(/\{([^}]+)\}/g)||[];for(const oe of ae){const ce=oe.slice(1,-1),Se=a[ce];Se!==void 0&&(q[ce]=Se)}}if(F!=null&&F.dependsOn){const ae=F.dependsOn,oe=a[ae];oe!==void 0&&(q[ae]=oe)}return q},[F==null?void 0:F.endpoint,e==null?void 0:e.api_endpoint,F==null?void 0:F.dependsOn,a]),{data:me=[],isLoading:ue,error:K}=ac(F,n,i,se,Q),B=$.useCallback(()=>{fr(e)&&!p.current&&(p.current=!0,f(!0))},[e]),H=$.useCallback(()=>{fr(e)&&!p.current&&(p.current=!0,f(!0))},[e]);$.useEffect(()=>{if(fr(e)&&!p.current){const q=a==null?void 0:a[e.name];q!=null&&q!==""&&(p.current=!0,f(!0))}},[e,a]),$.useEffect(()=>{fr(e)&&(F!=null&&F.dependsOn)&&M&&p.current&&(p.current=!1,f(!1))},[M,F==null?void 0:F.dependsOn]);const de=$.useCallback(()=>fr(e)?me:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,me]),fe=()=>{var q,ee,ae,oe,ce,Se;switch(e.type){case"title":return c.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 c.jsx(x.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 G=e.actionName,De=e.actionComponent,He=e.actionLabel,Qe=E=>c.jsx(Jl,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:E??e.actions}),X=E=>{if(e.cardWrap){const U={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return c.jsx(x.Card,{sx:U,...e.cardProps,children:E})}return E};return X(G&&De?c.jsx(Pe,{name:G,control:t,defaultValue:e.value??!1,render:({field:E})=>Qe(De==="switch"?c.jsx(ci,{label:He,checked:!!E.value,onChange:E.onChange}):c.jsx(Tr,{label:He||"",checked:!!E.value,onChange:E.onChange}))}):Qe());case"tabs":return c.jsx(Pe,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((ee=(q=e.items)==null?void 0:q[0])==null?void 0:ee.value)=="string"||typeof((oe=(ae=e.items)==null?void 0:ae[0])==null?void 0:oe.value)=="number"?(Se=(ce=e.items)==null?void 0:ce[0])==null?void 0:Se.value:0),render:({field:E})=>{const j=e.items||[],U=j.map((ie,W)=>({label:ie.label,value:typeof ie.value=="string"||typeof ie.value=="number"?ie.value:W,content:ie.content,disabled:ie.disabled})),R=E.value,I=(()=>{if(typeof R=="string"||typeof R=="number"){const ie=j.findIndex((W,xe)=>typeof W.value=="string"||typeof W.value=="number"?W.value===R:xe===R);return ie>=0?ie:0}return Number(R)||0})(),Y=j[I]||{};return c.jsxs(x.Box,{children:[c.jsx(tc,{value:E.value,onChange:E.onChange,items:U,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(Y.fields)&&Y.fields.length>0&&(()=>{const ie=Y.fields,W=[];let xe=[];for(const je of ie)je.type==="section"&&xe.length>0?(W.push(xe),xe=[je]):xe.push(je);xe.length>0&&W.push(xe);const Te={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 c.jsx(x.Box,{sx:{mt:1},children:W.map((je,Ve)=>{const qe=je.find(nt=>nt.type==="section"),Ze=(qe==null?void 0:qe.cardWrap)!==!1,Ft=c.jsx(c.Fragment,{children:je.map(nt=>{const ut=Math.min(Math.max(nt.col??12,1),12);return c.jsx(x.Box,{sx:{gridColumn:`span ${ut}`},children:c.jsx(os,{field:nt,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},nt.name)})});return Ze?c.jsx(x.Card,{sx:{...Te,...(qe==null?void 0:qe.cardSx)||{}},...(qe==null?void 0:qe.cardProps)||{},children:Ft},`tab-group-${Ve}`):c.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:Ft},`tab-group-${Ve}`)})})})()]})}});case"grid":const le=e.defaultRows||[];return c.jsx(Pe,{name:e.name,control:t,defaultValue:le.length>0?le:_()||[],render:()=>c.jsx(rc,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,rowDeletable:e.rowDeletable!==!1,control:t,setValue:s,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey})});case"listcards":return c.jsx(nc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"text":case"email":case"password":case"tel":case"textarea":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>e.type==="textarea"?c.jsx(Xl,{...E,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(o==null?void 0:o.message)||e.helperText}):c.jsx(li,{...E,id:e.id,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,endAdornment:L(),endorsementText:A(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?m?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:c.jsx(Wl,{position:"end",children:c.jsx(Hn,{"aria-label":"toggle password visibility",onClick:()=>y(j=>!j),edge:"end",children:m?c.jsx(wo,{}):c.jsx(bo,{})})})}:void 0})});case"number":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(li,{...E,id:e.id,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,endAdornment:L(),endorsementText:A(),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:l,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const te=de();return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(is,{labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?b(e.label):void 0,labelVariant:e.labelVariant,value:E.value,onChange:E.onChange,options:te,disabled:e.disabled||ue,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?b(e.label):void 0):e.placeholder,loading:ue,error:l||!!K,helperText:(o==null?void 0:o.message)||(K==null?void 0:K.message)||e.helperText,onOpen:B})});case"checkbox":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(Tr,{label:b(e.label),checked:!!E.value,disabled:e.disabled,onChange:E.onChange})});case"toggle":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(ja,{label:b(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:E.value,options:e.options||[],row:!0,onChange:E.onChange})});case"radio":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(ja,{label:b(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:E.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:E.onChange})});case"checkboxGroup":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_()||[],render:({field:E})=>c.jsx(Zl,{label:b(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(E.value)?E.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:E.onChange,disabled:e.disabled})});case"switch":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(ci,{label:b(e.label),checked:!!E.value,disabled:e.disabled,onChange:E.onChange})});case"autocomplete":const he=de(),g=!!(e.disabled||ue||F!=null&&F.dependsOn&&!u);return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>{const j=E.value,U=e.multiple===!0,R=(F==null?void 0:F.valueField)||e.value_field||"value",I=(F==null?void 0:F.labelField)||e.label_field||"label",Y=W=>{if(W!=null){if(typeof W=="string"||typeof W=="number")return W;if(typeof W=="object"){if(W[R]!==void 0)return W[R];if(W.value!==void 0)return W.value;if(W.id!==void 0)return W.id}}},ie=(()=>{if(U)return(Array.isArray(j)?j:[]).map(xe=>{const Te=he.find(je=>{const Ve=Y(je);return Ve!==void 0&&Ve===xe});return Te||{[R]:xe,[I]:`Selected: ${xe}`,value:xe,label:`Selected: ${xe}`}});{if(j==null||j==="")return null;const W=he.find(xe=>{const Te=Y(xe);return Te!==void 0&&Te===j});return W||{[R]:j,[I]:`Selected: ${j}`,value:j,label:`Selected: ${j}`}}})();return c.jsx(Yl,{id:e.id,options:he,value:ie,multiple:U,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,placeholder:g&&(F!=null&&F.dependsOn)&&!u?`Please select ${F.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:g,loading:ue,error:l||!!K,helperText:(o==null?void 0:o.message)||(K==null?void 0:K.message)||e.helperText||"",onOpen:H,noOptionsText:g&&(F!=null&&F.dependsOn)&&!u?`Please select ${F.dependsOn.replace(/_/g," ")} first`:ue?"Fetching data...":d&&!ue&&he.length===0?"No options available":"Click to load options",onChange:W=>{const xe=(F==null?void 0:F.valueField)||e.value_field||"value";if(U){const je=(Array.isArray(W)?W:[]).map(Ve=>typeof Ve=="object"&&(Ve[xe]||Ve.value||Ve.id)||Ve);E.onChange(je)}else{let Te;W&&typeof W=="object"?Te=W[xe]||W.value||W.id||W:Te=W,E.onChange(Te);const je=e.selectedAssignments;if(je&&W&&typeof W=="object")for(const[Ve,qe]of Object.entries(je)){const Ze=W[qe];if(Ze!==void 0&&typeof s=="function")try{s(Ve,Ze,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(as,{...E,id:e.name,label:b(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:l,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>{const j=E.value||e.defaultValue||e.src;if(j){const W=e.imageUploaded||{},xe=W.previewText||"Preview",Te=W.removeText||"Remove",je=W.saveText||"Save logo",Ve=W.showSave!==void 0?W.showSave:!!(e.onSave||W.saveText),qe=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(j)}catch{}},Ze=()=>{E.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},Ft=()=>{typeof e.onSave=="function"&&e.onSave({url:j,file:P.current||void 0})},nt=ut=>{const Et=ut.target.files&&ut.target.files[0];if(Et){if(typeof e.onFileSelected=="function")try{e.onFileSelected(Et)}catch{}try{const Fi=URL.createObjectURL(Et);E.onChange(Fi)}catch{}P.current=Et,v(!1)}};return c.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...W.cardSx},children:[c.jsx("input",{type:"file",ref:S,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:nt}),c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...W.thumbnailSx},children:c.jsx("img",{src:j,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),c.jsxs(x.Box,{sx:{flexGrow:1},children:[c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...W.fileNameSx},children:typeof j=="string"?j.split("/").pop():"Selected image"}),c.jsx(x.Typography,{sx:{fontSize:"10px",...W.fileMetaSx},children:"Image selected"})]}),c.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[c.jsx(x.Button,{type:"button",sx:{...W.previewButtonSx},variant:"outlined",onClick:qe,startIcon:c.jsx(bo,{}),children:xe}),c.jsx(x.Button,{variant:"outlined",color:"error",onClick:Ze,sx:{...W.removeButtonSx},startIcon:c.jsx(wo,{}),children:Te}),Ve&&c.jsx(x.Button,{variant:"contained",onClick:Ft,sx:{...W.saveButtonSx},children:je})]})]}),c.jsxs(x.Dialog,{open:C,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[c.jsx(x.DialogTitle,{children:W.previewTitle||"Image preview"}),c.jsx(x.DialogContent,{children:c.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:c.jsx("img",{src:j,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),c.jsxs(x.DialogActions,{children:[c.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var ut;return(ut=S.current)==null?void 0:ut.click()},children:W.replaceText||"Replace logo"}),c.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:W.closeText||"Close"})]})]})]})}const U=e.imagePlaceholder||{},R=U.icon||"upload",I=S,Y=()=>{var W;try{(W=I.current)==null||W.click()}catch{}},ie=W=>{const xe=W.target.files&&W.target.files[0];if(xe){typeof e.onFileSelected=="function"&&e.onFileSelected(xe);try{const Te=URL.createObjectURL(xe);E.onChange(Te)}catch{}P.current=xe}};return c.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...U.sx},children:[c.jsx("input",{type:"file",ref:I,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:ie}),c.jsx(Hn,{sx:{borderRadius:"8px",...U.iconSx},children:R==="image"?c.jsx(Sh,{sx:{width:36,height:36,color:"primary.main"}}):c.jsx(oi,{sx:{width:36,height:36,color:"primary.main"}})}),c.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...U.titleSx},children:U.title||"Drag & Drop the image here"}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...U.subtitleSx},children:U.subtitle||""}),c.jsx(x.Button,{onClick:Y,sx:{my:2,...U.buttonSx},startIcon:c.jsx(oi,{}),variant:"contained",disabled:e.disabled,children:U.buttonText||"Upload File"}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...U.helperTextSx},children:U.helperText||e.helperText||""})]})}});case"component":return c.jsx(x.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:s})}catch{try{return e.render({control:t,formData:a,setValue:s})}catch{return e.render()}}})():e.render:e.content});default:return null}},pe=$.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),ge=$.useCallback(async()=>{try{const q=a?a[e.name]:void 0;let ee="";q==null?ee="":Array.isArray(q)?ee=q.join(", "):typeof q=="object"?ee=JSON.stringify(q):ee=String(q),await navigator.clipboard.writeText(ee),h(!0),window.setTimeout(()=>h(!1),1200)}catch{}},[a,e.name]);return c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[c.jsx(x.Box,{sx:{flexGrow:1},children:N?fe():null}),pe&&c.jsx(Hn,{"aria-label":`copy ${e.label||e.name}`,onClick:ge,size:"small",children:T?c.jsx(rs,{fontSize:"small"}):c.jsx(wh,{fontSize:"small"})})]})};var Zi,Co;function zh(){if(Co)return Zi;Co=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,S){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=S};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),l=new e(s),d=new e(s);Zi={Cache:e,split:p,normalizePath:f,setter:function(v){var S=f(v);return l.get(v)||l.set(v,function(w,b){for(var _=0,z=S.length,F=w;_<z-1;){var D=S[_];if(D==="__proto__"||D==="constructor"||D==="prototype")return w;F=F[S[_++]]}F[S[_]]=b})},getter:function(v,S){var P=f(v);return d.get(v)||d.set(v,function(b){for(var _=0,z=P.length;_<z;)if(b!=null||!S)b=b[P[_++]];else return;return b})},join:function(v){return v.reduce(function(S,P){return S+(y(P)||r.test(P)?"["+P+"]":(S?".":"")+P)},"")},forEach:function(v,S,P){m(Array.isArray(v)?v:p(v),S,P)}};function f(v){return o.get(v)||o.set(v,p(v).map(function(S){return S.replace(a,"$2")}))}function p(v){return v.match(t)||[""]}function m(v,S,P){var w=v.length,b,_,z,F;for(_=0;_<w;_++)b=v[_],b&&(C(b)&&(b='"'+b+'"'),F=y(b),z=!F&&/^\d+$/.test(b),S.call(P,b,F,z,_,v))}function y(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function T(v){return v.match(n)&&!v.match(r)}function h(v){return i.test(v)}function C(v){return!y(v)&&(T(v)||h(v))}return Zi}var jr=zh(),Xi,Eo;function Vh(){if(Eo)return Xi;Eo=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,p)=>t(f).join(p).toLowerCase(),i=f=>t(f).reduce((p,m)=>`${p}${p?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return Xi={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(" ")},Xi}var Ji=Vh(),Vn={exports:{}},ko;function Bh(){if(ko)return Vn.exports;ko=1,Vn.exports=function(i){return e(t(i),i)},Vn.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),l={},d=s,f=r(a),p=n(i);for(a.forEach(function(y){if(!p.has(y[0])||!p.has(y[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)l[d]||m(i[d],d,new Set);return o;function m(y,T,h){if(h.has(y)){var C;try{C=", node was:"+JSON.stringify(y)}catch{C=""}throw new Error("Cyclic dependency"+C)}if(!p.has(y))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(y));if(!l[T]){l[T]=!0;var v=f.get(y)||new Set;if(v=Array.from(v),T=v.length){h.add(y);do{var S=v[--T];m(S,p.get(S),h)}while(T);h.delete(y)}o[--s]=y}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var l=i[s];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var l=i[s];a.has(l[0])||a.set(l[0],new Set),a.has(l[1])||a.set(l[1],new Set),a.get(l[0]).add(l[1])}return a}function n(i){for(var a=new Map,s=0,o=i.length;s<o;s++)a.set(i[s],s);return a}return Vn.exports}var Nh=Bh();const Lh=qa(Nh),qh=Object.prototype.toString,Wh=Error.prototype.toString,Uh=RegExp.prototype.toString,Hh=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Kh=/^Symbol\((.*)\)(.*)$/;function Gh(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function To(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return Gh(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Hh.call(e).replace(Kh,"Symbol($1)");const n=qh.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Wh.call(e)+"]":n==="RegExp"?Uh.call(e):null}function or(e,t){let r=To(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=To(this[n],t);return a!==null?a:i},2)}function sc(e){return e==null?[]:[].concat(e)}let oc,lc,cc,Qh=/\$\{\s*(\w+)\s*\}/g;oc=Symbol.toStringTag;class jo{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[oc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],sc(t).forEach(a=>{if(ot.isError(a)){this.errors.push(...a.errors);const s=a.inner.length?a.inner:[a];this.inner.push(...s)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}lc=Symbol.hasInstance;cc=Symbol.toStringTag;class ot 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(Qh,(i,a)=>or(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const s=new jo(t,r,n,i);if(a)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[cc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ot)}static[lc](t){return jo[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 \`${or(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${or(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${or(r,!0)}\``+i}},it={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"},Qt={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"},Oa={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Fa={isValue:"${path} field must be ${value}"},Kn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Yh={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"},Zh={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: \`${or(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: \`${or(r,!0)}\``}return ot.formatError(Rt.notType,e)}};Object.assign(Object.create(null),{mixed:Rt,string:it,number:Qt,date:Oa,object:Kn,array:Yh,boolean:Fa,tuple:Zh});const ls=e=>e&&e.__isYupSchema__;class ui{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,s=typeof n=="function"?n:(...o)=>o.every(l=>l===n);return new ui(t,(o,l)=>{var d;let f=s(...o)?i:a;return(d=f==null?void 0:f(l))!=null?d:l})}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(!ls(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const Bn={context:"$",value:"."};class $r{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]===Bn.context,this.isValue=this.key[0]===Bn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Bn.context:this.isValue?Bn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&jr.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}}$r.prototype.__isYupRef=!0;const Ot=e=>e==null;function Nr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,l){const{name:d,test:f,params:p,message:m,skipAbsent:y}=e;let{parent:T,context:h,abortEarly:C=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function S(M){return $r.isRef(M)?M.getValue(r,T,h):M}function P(M={}){const N=Object.assign({value:r,originalValue:a,label:s.spec.label,path:M.path||n,spec:s.spec,disableStackTrace:M.disableStackTrace||v},p,M.params);for(const L of Object.keys(N))N[L]=S(N[L]);const A=new ot(ot.formatError(M.message||m,N),r,N.path,M.type||d,N.disableStackTrace);return A.params=N,A}const w=C?o:l;let b={path:n,parent:T,type:d,from:i.from,createError:P,resolve:S,options:i,originalValue:a,schema:s};const _=M=>{ot.isError(M)?w(M):M?l(null):w(P())},z=M=>{ot.isError(M)?w(M):o(M)};if(y&&Ot(r))return _(!0);let D;try{var u;if(D=f.call(b,r,b),typeof((u=D)==null?void 0:u.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(D).then(_,z)}}catch(M){z(M);return}_(D)}return t.OPTIONS=e,t}function Xh(e,t,r,n=r){let i,a,s;return t?(jr.forEach(t,(o,l,d)=>{let f=l?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let p=e.type==="tuple",m=d?parseInt(f,10):0;if(e.innerType||p){if(p&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&m>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[m],e=p?e.spec.types[m]:e.innerType}if(!d){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);i=r,r=r&&r[f],e=e.fields[f]}a=f,s=l?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class pi extends Set{describe(){const t=[];for(const r of this.values())t.push($r.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 pi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function qr(e,t=new Map){if(ls(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]=qr(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,qr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(qr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=qr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class ht{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 pi,this._blacklist=new pi,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=qr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(s=>{a.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&Ot(a))return a;let s=or(t),o=or(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
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 bo=yt(c.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"),wo=yt(c.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"),wh=yt(c.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"),rs=yt(c.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),oi=yt(c.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"),Sh=yt(c.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"),J={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"},So=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}},Ch=(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=So(e),i=So(t);return Ch(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},ns=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)}},Eh=ns(J.primary.main),kh=ns(J.secondary.main),lt=ns(J.text.primary),Th={primary:J.primary.main,secondary:J.secondary.main,textPrimary:J.text.primary,textSecondary:J.text.secondary,divider:J.divider,background:J.background},li=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:l="6px",endorsementHeight:d=28,endorsementPaddingX:f="8px",...p})=>{var h,C;const m=!!r,y=a?c.jsx(x.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:d,paddingLeft:f,paddingRight:f,borderRadius:l,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,T={...p.InputProps,endAdornment:y||i?c.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[y||i,(h=p.InputProps)==null?void 0:h.endAdornment]}):(C=p.InputProps)==null?void 0:C.endAdornment};return c.jsxs(x.Box,{children:[m&&c.jsx(x.Typography,{variant:n,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:r}),c.jsx(x.TextField,{fullWidth:!0,size:"small",...p,InputProps:T,label:m?void 0:p.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:lt[300]},"&.Mui-focused fieldset":{borderColor:lt[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary},"& .MuiFormLabel-root":{color:J.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:J.text.primary},"& .MuiFormHelperText-root":{color:e?J.error.main:J.text.secondary},...t}})]})},is=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:l,sx:d,...f})=>{const p=$.useId(),m=l==null||l===""||Array.isArray(l)&&l.length===0,y=T=>c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...T,children:c.jsx("path",{d:"M6 9l6 6 6-6",stroke:J.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return c.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!f.error,variant:"outlined",children:[e&&c.jsx(x.Typography,{variant:s,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:e}),t&&c.jsx(x.InputLabel,{id:p,shrink:!m||!!o,sx:{color:J.text.secondary,"&.Mui-focused":{color:J.text.primary},"&.Mui-error":{color:J.error.main}},children:t}),c.jsx(x.Select,{...f,value:l,labelId:t?p:void 0,label:t,displayEmpty:!0,input:c.jsx(x.OutlinedInput,{label:t}),IconComponent:y,renderValue:T=>{const h=T;if(m)return c.jsx("span",{style:{color:J.text.secondary},children:o??""});const C=r.find(v=>v.value===h);return(C==null?void 0:C.label)??String(h)},endAdornment:n?c.jsx(x.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${J.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:J.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:J.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:J.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:lt[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:lt[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:J.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...d},children:n?c.jsx(x.MenuItem,{disabled:!0,children:c.jsx(x.CircularProgress,{size:16})}):r.map(T=>c.jsx(x.MenuItem,{value:T.value,sx:{backgroundColor:J.background.paper,color:J.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:lt[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:lt[50],borderRadius:"4px"}},children:T.label},T.value))}),i&&c.jsx(x.FormHelperText,{children:i})]})},jh=e=>c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:c.jsx("path",{d:"M6 9l6 6 6-6",stroke:J.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Yl=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:l="subtitle2",disabled:d,loading:f,error:p,helperText:m,onOpen:y,noOptionsText:T,sx:h})=>c.jsxs(x.Box,{children:[a&&c.jsx(x.Typography,{variant:l,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:a}),c.jsx(x.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:c.jsx(jh,{}),disabled:d,loading:f,onOpen:y,noOptionsText:T,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${J.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:lt[300]},"&.Mui-focused fieldset":{borderColor:lt[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:J.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...h},getOptionLabel:C=>typeof C=="string"?C:(C==null?void 0:C.label)??"",isOptionEqualToValue:(C,v)=>((C==null?void 0:C.value)??C)===((v==null?void 0:v.value)??v),renderOption:(C,v,{selected:S})=>c.jsxs(x.Box,{component:"li",...C,sx:{backgroundColor:J.background.paper,color:J.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:lt[50]},"&.Mui-focused":{backgroundColor:lt[50]},...S?{backgroundColor:lt[50]}:{}},children:[n&&c.jsx(x.Checkbox,{checked:S}),c.jsx(x.Typography,{variant:"body2",sx:{color:J.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]}),renderInput:C=>c.jsx(x.TextField,{...C,label:i,placeholder:s,size:"small",error:p,helperText:m,InputLabelProps:{shrink:!!r||!!s,sx:{color:J.text.secondary,"&.Mui-focused":{color:J.text.primary},"&.Mui-error":{color:J.error.main}}},InputProps:{...C.InputProps,endAdornment:c.jsxs(c.Fragment,{children:[f?c.jsx(x.CircularProgress,{size:20}):null,C.InputProps.endAdornment]})}}),onChange:(C,v)=>o(v)})]}),Tr=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),Zl=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:l,error:d,groupPadding:f=1.5,itemGap:p=1,disabled:m=!1})=>{const y=typeof i=="number"&&i>0,T=y?i:12,h=i===!0,C=i===!1&&!y,v=(S,P)=>{const w=Array.isArray(r)?[...r]:[];P?w.includes(S)||a([...w,S]):a(w.filter(b=>b!==S))};return c.jsxs(x.FormControl,{error:d,disabled:m,sx:S=>{var P;return{display:"flex",flexDirection:"column",px:S.spacing(f),borderRadius:((P=S.shape)==null?void 0:P.borderRadius)||8,mx:-2.5,backgroundColor:S.palette.background.paper}},children:[s==="top"&&e&&c.jsx(x.Typography,{variant:o,sx:S=>({color:S.palette.text.primary,mb:.5,fontSize:S.typography.fontSize,fontWeight:500}),children:e}),t&&c.jsx(x.FormLabel,{sx:S=>({color:S.palette.text.secondary,mb:.5,mx:1,fontSize:S.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:S.palette.text.primary},"&.Mui-error":{color:S.palette.error.main}}),children:t}),y&&c.jsx(x.Box,{sx:S=>({display:"grid",gridTemplateColumns:`repeat(${T}, 1fr)`,gap:S.spacing(p),mt:0}),children:n.map(S=>{const P=Array.isArray(r)&&r.includes(S.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:w=>v(S.value,w.target.checked),disabled:m,sx:w=>({color:w.palette.text.secondary,"&.Mui-checked":{color:w.palette.primary.main}})}),label:S.label,sx:w=>({m:0,"& .MuiFormControlLabel-label":{color:w.palette.text.primary,fontSize:12}})},String(S.value))})}),h&&c.jsx(x.Box,{sx:S=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:S.spacing(p),alignItems:"center",mt:0}),children:n.map(S=>{const P=Array.isArray(r)&&r.includes(S.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:w=>v(S.value,w.target.checked),disabled:m,sx:w=>({color:w.palette.text.secondary,"&.Mui-checked":{color:w.palette.primary.main}})}),label:S.label,sx:w=>({m:0,"& .MuiFormControlLabel-label":{color:w.palette.text.primary,fontSize:12}})},String(S.value))})}),C&&c.jsx(x.Box,{sx:S=>({display:"flex",flexDirection:"column",gap:S.spacing(p),alignItems:"flex-start",mt:0}),children:n.map(S=>{const P=Array.isArray(r)&&r.includes(S.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:w=>v(S.value,w.target.checked),disabled:m,sx:w=>({color:w.palette.text.secondary,"&.Mui-checked":{color:w.palette.primary.main}})}),label:S.label,sx:w=>({m:0,"& .MuiFormControlLabel-label":{color:w.palette.text.primary,fontSize:12}})},String(S.value))})}),l&&c.jsx(x.FormHelperText,{sx:{mt:.5},children:l})]})},ci=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>c.jsx(x.FormControlLabel,{control:c.jsx(x.Switch,{checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ja=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:l,error:d,groupPadding:f=1.5,itemGap:p=1})=>c.jsxs(x.FormControl,{error:d,sx:m=>{var y;return{display:"flex",flexDirection:"column",px:m.spacing(f),borderRadius:((y=m.shape)==null?void 0:y.borderRadius)||8,mx:-2.5,backgroundColor:m.palette.background.paper}},children:[s==="top"&&e&&c.jsx(x.Typography,{variant:o,sx:m=>({color:m.palette.text.primary,mb:.5,fontSize:m.typography.fontSize,fontWeight:500}),children:e}),t&&c.jsx(x.FormLabel,{sx:m=>({color:m.palette.text.secondary,mb:.5,mx:1,fontSize:m.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:m.palette.text.primary},"&.Mui-error":{color:m.palette.error.main}}),children:t}),c.jsx(x.RadioGroup,{row:i,value:r,onChange:m=>a(m.target.value),sx:m=>({display:"flex",flexDirection:i?"row":"column",gap:m.spacing(p),alignItems:i?"center":"flex-start"}),children:n.map(m=>c.jsx(x.FormControlLabel,{value:m.value,control:c.jsx(x.Radio,{size:"small",sx:y=>({color:y.palette.text.secondary,"&.Mui-checked":{color:y.palette.primary.main}})}),label:c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[c.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:m.label}),m.description&&c.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:m.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(m.value)))}),l&&c.jsx(x.FormHelperText,{sx:{mt:.5},children:l})]}),as=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>c.jsxs(x.Box,{children:[e==="top"&&r&&c.jsx(x.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),c.jsx(x.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}})]}),Xl=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return c.jsxs(x.Box,{children:[s&&c.jsx(x.Typography,{variant:t,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:e}),c.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:lt[300]},"&.Mui-focused fieldset":{borderColor:lt[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:J.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:J.text.primary},"& .MuiFormHelperText-root":{color:r?J.error.main:J.text.secondary},...n}})]})},Jl=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>c.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&c.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&c.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),Oh=()=>c.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:c.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"})}),c.jsx("defs",{children:c.jsx("clipPath",{id:"clip0_5814_24904",children:c.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function Fh({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:l=!0,renderItem:d,chipText:f,helperText:p}){const[m,y]=$.useState(null),[T,h]=$.useState(null),C=w=>b=>{if(!i){y(w),b.dataTransfer.effectAllowed="move";try{b.dataTransfer.setData("text/plain",String(t(e[w])))}catch{}}},v=w=>b=>{i||(b.preventDefault(),h(w),b.dataTransfer.dropEffect="move")},S=w=>b=>{if(i)return;if(b.preventDefault(),m===null||m===w){y(null),h(null);return}const _=[...e],[z]=_.splice(m,1);_.splice(w,0,z),y(null),h(null),r(_)},P=()=>{y(null),h(null)};return c.jsxs(x.Box,{role:"list",sx:w=>({display:"flex",flexDirection:"column",gap:w.spacing(1),...a}),children:[n,c.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),e.map((w,b)=>{const _=m===b,z=T===b&&m!==null&&m!==b;return c.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:C(b),onDragOver:v(b),onDrop:S(b),onDragEnd:P,sx:F=>{var D;return{userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${z?F.palette.primary.main:"#EBEBEB"}`,borderRadius:((D=F.shape)==null?void 0:D.borderRadius)||"8px",padding:F.spacing(1),opacity:_?.6:1,boxShadow:z?`0 0 0 2px ${F.palette.primary.main}33`:"none"}},children:d?d(w,_):c.jsxs(x.Box,{sx:F=>({display:"flex",alignItems:"center",gap:F.spacing(1),minWidth:0}),children:[l&&c.jsx(Oh,{}),o&&c.jsxs(x.Typography,{variant:"body2",sx:F=>({fontWeight:600,fontSize:14,color:`${F.palette.text.primary}`,flex:"0 0 auto"}),children:[b+1,"."]}),(()=>{const F=typeof f=="function"?f(w,b):f;return F?c.jsx(x.Chip,{label:F,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),c.jsx(x.Typography,{variant:"body2",sx:F=>({fontSize:12,fontWeight:500,color:`${F.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(w):""})]})},String(t(w)))}),p?typeof p=="string"?c.jsx(x.Typography,{variant:"caption",sx:w=>({color:`${w.palette.text.primary}60`}),children:p}):p:null]})}const Ah=mt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:"#E8E8E8",transition:"border-color 0.3s ease"},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:J.primary.main}})),_h=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=a=>{const{active:s,completed:o,icon:l}=a;return o?c.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${J.primary.main}`,borderRadius:"50%",backgroundColor:J.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:c.jsx(rs,{sx:{fontSize:16,fontWeight:600}})}):s?c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${J.primary.main}`,backgroundColor:St(J.primary.main,.2),color:J.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l}):c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:J.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l})};return c.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:c.jsx(Ah,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:J.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((a,s)=>c.jsxs(x.Step,{onClick:()=>r==null?void 0:r(s),completed:s<t,children:[c.jsx(x.StepLabel,{StepIconComponent:i,children:c.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:s===t?J.primary.main:J.text.primary},children:a.label})}),s!==e.length-1&&c.jsx(x.Divider,{sx:{ml:4.2,borderColor:J.divider}})]},s))})},ec=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>c.jsx(x.Chip,{...s,sx:o=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${St(t||o.palette.text.primary,.5)}`,backgroundColor:St(t||o.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||o.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Rh=mt(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:J.primary.main}})),$h=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=$.useState(null),s=o=>{const{active:l,completed:d,icon:f}=o;return d?c.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${J.primary.main}`,borderRadius:"50%",backgroundColor:J.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:c.jsx(rs,{sx:{fontSize:16,fontWeight:600}})}):l?c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${J.primary.main}`,backgroundColor:St(J.primary.main,.2),color:J.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:f}):c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:J.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:f})};return c.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:c.jsx(Rh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:J.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,l)=>c.jsxs(x.Step,{onMouseEnter:()=>a(l),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(l),completed:l<t,children:[c.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[c.jsxs(x.StepLabel,{StepIconComponent:s,children:[c.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[c.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:l===t?J.primary.main:J.text.primary},children:o.label}),c.jsx(ec,{size:"small",colorHex:l<t?J.success.main:l===t?"#973B00":J.text.primary,label:l<t?"Completed":l===t?"In progress":"Not started"})]}),c.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${J.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===l&&c.jsx(x.Button,{sx:{display:l>t?"none":"block"},variant:l<t?"outlined":"contained",size:"small",color:"primary",children:l<t?"Edit":l===t?"Complete":""})]}),l!==e.length-1&&c.jsx(x.Divider,{sx:{ml:4.2,borderColor:J.divider}})]},l))})},Dh=yt(c.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"),Ph=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const l=s||J.info.main,d=St(l,.08),f=St(l,.08),p=a??c.jsx(Dh,{sx:{color:l,fontSize:18}});return e==="inlineInfo"?c.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${f}`,boxShadow:"none",...o},children:[c.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:p}),c.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})]}):e==="inline"?c.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${f}`,boxShadow:"none",...o},children:c.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})}):e==="listWithHeader"?c.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:d,border:`1px solid ${f}`,...o},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[p,c.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:l,fontSize:14,lineHeight:1.3},children:t})]}),r&&c.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:l,fontSize:10,lineHeight:1.3},children:r}),c.jsx(x.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:l,my:-.5}},children:i.map((m,y)=>c.jsx(x.ListItem,{sx:{py:0},children:c.jsx(x.ListItemText,{primary:m})},y))})]}):c.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:d,border:`0.5px solid ${f}`,boxShadow:"none",...o},children:c.jsx(x.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:l,my:-.5}},children:i.map((m,y)=>c.jsx(x.ListItem,{sx:{py:0},children:c.jsx(x.ListItemText,{primary:m})},y))})})},tc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>c.jsxs(x.Box,{children:[c.jsx(x.Tabs,{value:e,onChange:(s,o)=>t(o),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((s,o)=>{const l=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return c.jsx(x.Tab,{value:l,disabled:s.disabled,label:c.jsx(x.Typography,{variant:"body2",children:s.label}),sx:d=>({px:2,textTransform:"none",color:d.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:d.palette.action.hover},"&.Mui-selected":{color:d.palette.common.white,borderColor:d.palette.primary.main,backgroundColor:d.palette.primary.main,fontWeight:600},...a})},String(l))})}),r.map((s,o)=>{const l=typeof s.value=="string"||typeof s.value=="number"?s.value:o,d=s.content??(typeof s.value=="object"?s.value:null);return d&&e===l?c.jsx(x.Box,{sx:{mt:1},children:d},`panel-${l}`):null})]}),zn=yt(c.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Mh=yt(c.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"),rc=({name:e,columns:t,initialRow:r,addLabel:n,rowDeletable:i=!0,control:a,sx:s,addActions:o,emptyTitle:l="No items configured",emptySubtitle:d="Click 'Add' to get started.",emptyCardSx:f,setValue:p,rowSelectionMode:m,rowSelectionKey:y})=>{const{fields:T,append:h,remove:C}=nu({control:a,name:e}),v=$.useMemo(()=>{if(y)return y;const D=t.find(u=>u.type==="rowSelect");return D==null?void 0:D.key},[t,y]),S=al({control:a,name:e})||[],P=$.useMemo(()=>{if(!v)return{};const D={};return S.forEach((u,M)=>{D[M]=!!(u!=null&&u[v])}),D},[S,v]),w=$.useCallback(D=>P[D]===!0,[P]),b=$.useCallback((D,u)=>{if(!p||!v)return;const M=`${e}.${D}.${v}`;m==="single"&&u&&S.forEach((N,A)=>{if(A!==D){const L=`${e}.${A}.${v}`;p(L,!1,{shouldDirty:!0})}}),p(M,u,{shouldDirty:!0})},[e,v,m,p,S]),_=D=>{const u={...D||r};t.forEach(M=>{M.value!==void 0&&u[M.key]===void 0&&(u[M.key]=typeof M.value=="function"?M.value(u,T.length):M.value)}),h(u)},z=$.useMemo(()=>t.reduce((u,M)=>{if(M.width==="auto"||M.width===void 0)return u+120;const N=typeof M.width=="number"?M.width:typeof M.width=="string"&&parseInt(M.width)||160;return u+N},0)+(i?100:0),[t,i]),F=D=>D.width==="auto"||D.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof D.width=="number"?{width:`${D.width}px`,minWidth:`${D.width}px`,maxWidth:`${D.width}px`}:typeof D.width=="string"?{width:D.width,minWidth:D.width}:{width:"160px",minWidth:"160px"};return c.jsx(x.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"hidden",...s},children:T.length===0?c.jsxs(x.Box,{sx:D=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:St(D.palette.primary.main,.4),backgroundColor:St(D.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...f}),children:[c.jsx(x.Typography,{variant:"subtitle1",sx:D=>({color:D.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:l}),c.jsx(x.Typography,{variant:"body2",sx:D=>({color:D.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:d}),Array.isArray(o)&&o.length>0?o.map((D,u)=>c.jsx(x.Button,{variant:"outlined",size:"small",startIcon:c.jsx(zn,{}),sx:{mr:1,mt:1},onClick:()=>_(D.template),children:D.label},`empty-add-${u}`)):n&&c.jsx(x.Button,{variant:"outlined",size:"small",startIcon:c.jsx(zn,{}),onClick:()=>_(),children:n})]}):c.jsxs(c.Fragment,{children:[c.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(o)&&o.length>0?o.map((D,u)=>c.jsx(x.Button,{variant:u===0?"contained":"outlined",size:"small",startIcon:c.jsx(zn,{}),onClick:()=>_(D.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:u===0?"#04502d":void 0}},children:D.label},`add-${u}`)):n&&c.jsx(x.Button,{variant:"contained",size:"small",startIcon:c.jsx(zn,{}),onClick:()=>_(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},children:n})}),c.jsx(x.Box,{sx:{width:"100%",overflow:"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:c.jsx(x.TableContainer,{sx:{width:"max-content",minWidth:"100%"},children:c.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${z||650}px`},children:[c.jsx(x.TableHead,{children:c.jsxs(x.TableRow,{children:[t.map(D=>c.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,...F(D)},children:D.header},D.key)),i&&c.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"})]})}),c.jsx(x.TableBody,{children:T.map((D,u)=>{const M=w(u),N=m&&!M;return c.jsxs(x.TableRow,{children:[t.map(A=>{var ue;const L=`${e}.${u}.${A.key}`,G=A.type==="rowSelect"||A.key===v,se=G?!1:N?!0:typeof A.disabled=="function"?A.disabled(D,u):!!A.disabled;if(A.type==="index"){const K=A.indexFormat?A.indexFormat(u):`#${u+1}`;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((ue=A.cellSx)==null?void 0:ue.textAlign)||"center",...F(A),...A.cellSx},children:K},A.key)}if(A.value!==void 0&&A.editable===!1){const K=typeof A.value=="function"?A.value(D,u):A.value;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...F(A),...A.cellSx},children:K},A.key)}const me=A.endorsementText?typeof A.endorsementText=="function"?A.endorsementText(D,u):A.endorsementText:void 0;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...F(A),...A.cellSx},children:A.type==="rowSelect"||G&&A.type==="checkbox"?c.jsx(Pe,{name:L,control:a,defaultValue:!1,render:({field:K})=>c.jsx(Tr,{label:"",checked:!!K.value,disabled:!1,onChange:B=>{K.onChange(B),b(u,B)},sx:A.sx})}):A.type==="checkbox"?c.jsx(Pe,{name:L,control:a,render:({field:K})=>c.jsx(Tr,{label:"",checked:!!K.value,disabled:se,onChange:K.onChange,sx:A.sx})}):A.type==="select"?c.jsx(Pe,{name:L,control:a,render:({field:K})=>c.jsx(is,{...K,fullWidth:!0,disabled:se,options:A.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required})}):A.type==="date"?c.jsx(Pe,{name:L,control:a,defaultValue:A.value!==void 0?typeof A.value=="function"?A.value(D,u):A.value:void 0,render:({field:K})=>($.useEffect(()=>{if(p&&(K.value===void 0||K.value===null||K.value==="")&&A.value!==void 0){const B=typeof A.value=="function"?A.value(D,u):A.value;p(L,B,{shouldValidate:!1})}},[L,K.value,A.value,D,u,p]),c.jsx(as,{...K,fullWidth:!0,disabled:se,size:"small",placeholder:A.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required}))}):c.jsx(Pe,{name:L,control:a,defaultValue:A.value!==void 0?typeof A.value=="function"?A.value(D,u):A.value:void 0,render:({field:K})=>($.useEffect(()=>{if(p&&(K.value===void 0||K.value===null||K.value==="")&&A.value!==void 0){const B=typeof A.value=="function"?A.value(D,u):A.value;p(L,B,{shouldValidate:!1})}},[L,K.value,A.value,D,u,p]),c.jsx(li,{...K,fullWidth:!0,type:A.type==="number"?"number":"text",placeholder:A.placeholder,disabled:se,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required,endorsementText:me,endorsementBg:A.endorsementBg,endorsementColor:A.endorsementColor,endorsementRadius:A.endorsementRadius,endorsementHeight:A.endorsementHeight,endorsementPaddingX:A.endorsementPaddingX,inputProps:{...A.type==="number"?{min:A.min,max:A.max,step:A.step}:{minLength:A.minLength,maxLength:A.maxLength,pattern:A.pattern}}}))})},A.key)}),i&&c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:c.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>C(u),sx:{width:"20px",height:"20px"},children:c.jsx(Mh,{sx:{fontSize:"20px"}})})})]},D.id)})})]})})})]})})},nc=({name:e,control:t,items:r,sx:n,cardSx:i})=>c.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,l=!!(a.header||a.chipText),d=a.leftAction,f=a.rightAction;return c.jsxs(x.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[s&&d&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:c.jsx(Pe,{name:d.name,control:t,defaultValue:!1,render:({field:p})=>c.jsx(Tr,{label:d.label||"",checked:!!p.value,onChange:p.onChange,sx:{margin:0}})})}),l&&c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&c.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&c.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})]}),o&&f&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:c.jsx(Pe,{name:f.name,control:t,defaultValue:!1,render:({field:p})=>c.jsx(ci,{label:f.label,checked:!!p.value,onChange:p.onChange,sx:{margin:0}})})}),!s&&!o&&!l&&c.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})});async function ic(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:l={},params:d={},body:f,transform:p,passThroughFields:m}=e;let y=i;if(t&&!i.startsWith("http")&&(y=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const w=/\{([^}]+)\}/g;y=y.replace(w,(b,_)=>{const z=n[_];return z!=null?encodeURIComponent(String(z)):""}),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const T=new URLSearchParams;Object.entries(d).forEach(([w,b])=>{b!=null&&T.append(w,String(b))}),T.toString()&&(y+=`${y.includes("?")?"&":"?"}${T.toString()}`);try{const w=/^https?:\/\//i.test(y),b=new URL(y,w?void 0:"http://local.placeholder"),_=Array.from(b.searchParams.entries());for(const[z,F]of _)(F===""||F==="undefined"||F==="null")&&b.searchParams.delete(z);w?y=b.toString():y=b.pathname+(b.search?b.search:""),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const h={"Content-Type":"application/json",...r,...l},C={method:a,headers:h};(a==="POST"||a==="PUT")&&f&&(C.body=JSON.stringify(f));const v=await fetch(y,C);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const S=await v.json();if(p)return p(Array.isArray(S)?S:S.data||S);const P=Array.isArray(S)?S:S.data||S;if(!Array.isArray(P))throw new Error("API response is not an array");return P.map(w=>{const b={label:w[o]||w.name||w.title||String(w[s]||""),value:w[s]||w.id||w.value||""},_=Array.isArray(m)?m:void 0;if(Array.isArray(_))for(const z of _)w[z]!==void 0&&(b[z]=w[z]);return b})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function ac(e,t,r,n,i=!1){const a=$.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const o=n[e.dependsOn];return o!==void 0?o:null},[e==null?void 0:e.dependsOn,n]),s=$.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return Lu({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return ic(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:o=>Math.min(1e3*2**o,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function fr(e){return!!(e.apiConfig||e.api_endpoint)}function ss(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 Ih(e,t){const r=ss(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 os=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],l=!!o,[d,f]=$.useState(!1),p=$.useRef(!1),[m,y]=$.useState(!1),[T,h]=$.useState(!1),[C,v]=$.useState(!1),S=$.useRef(null),P=$.useRef(null),w=()=>{var q;return e.required!==void 0?e.required:((q=e.validation)==null?void 0:q.required)!==void 0?e.validation.required:!1},b=q=>w()?`${q} *`:q,_=()=>{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=$.useRef(void 0);$.useEffect(()=>{const q=e.value;if(typeof q!="function"||!s)return;let ee;try{ee=q(a||{})}catch{return}const ae=a?a[e.name]:void 0;if(z.current===void 0&&(z.current=ee),ae===void 0||ae===z.current)try{s(e.name,ee,{shouldValidate:!0,shouldDirty:!1}),z.current=ee}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((q,ee)=>({...q,[ee]:a[ee]}),{}):a||{}),e.name]);const F=$.useMemo(()=>{const q=ss(e);return q&&Array.isArray(e.passThroughFields)&&(q.passThroughFields=e.passThroughFields),q},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),D=$.useRef(null),u=F!=null&&F.dependsOn?a==null?void 0:a[F.dependsOn]:null,M=$.useMemo(()=>{if(!(F!=null&&F.dependsOn))return!1;const q=u,ee=D.current,ae=q!==ee;return ae&&(D.current=q),ae},[F==null?void 0:F.dependsOn,u]),N=$.useMemo(()=>{const q=e.showWhen;if(typeof q=="function")try{return!!q(a||{})}catch{return!0}if(q&&typeof q=="object"){const ee=q.field,ae=q.equals,oe=q.in,le=ee?(a||{})[ee]:void 0;if(ee&&typeof ae<"u")return le===ae;if(ee&&Array.isArray(oe))return oe.includes(le)}return!0},[e.showWhen,a]),A=$.useCallback(()=>{const q=e.dynamicEndorsement;if(typeof q=="function")try{return q(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),L=$.useCallback(()=>{const q=e.endAdornment,ee=e.endAdornmentSwitch,ae=e.endAdornmentCheckbox;if(ee)return c.jsx(Pe,{name:ee,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:oe})=>c.jsx(x.Switch,{checked:oe.value||!1,onChange:le=>{oe.onChange(le.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(le.target.checked,a,s)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(ae)return c.jsx(Pe,{name:ae,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:oe})=>c.jsx(Tr,{label:"",checked:oe.value||!1,onChange:oe.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof q=="function")try{return q(a||{},{control:t,setValue:s})}catch{return}return q},[e,a,t,s]),G=$.useMemo(()=>d&&fr(e)&&(!(F!=null&&F.dependsOn)||u),[d,e,F==null?void 0:F.dependsOn,u]),se=$.useMemo(()=>{const q={};if(!a)return q;const ee=(F==null?void 0:F.endpoint)||(e==null?void 0:e.api_endpoint);if(ee&&typeof ee=="string"){const ae=ee.match(/\{([^}]+)\}/g)||[];for(const oe of ae){const le=oe.slice(1,-1),Se=a[le];Se!==void 0&&(q[le]=Se)}}if(F!=null&&F.dependsOn){const ae=F.dependsOn,oe=a[ae];oe!==void 0&&(q[ae]=oe)}return q},[F==null?void 0:F.endpoint,e==null?void 0:e.api_endpoint,F==null?void 0:F.dependsOn,a]),{data:me=[],isLoading:ue,error:K}=ac(F,n,i,se,G),B=$.useCallback(()=>{fr(e)&&!p.current&&(p.current=!0,f(!0))},[e]),H=$.useCallback(()=>{fr(e)&&!p.current&&(p.current=!0,f(!0))},[e]);$.useEffect(()=>{if(fr(e)&&!p.current){const q=a==null?void 0:a[e.name];q!=null&&q!==""&&(p.current=!0,f(!0))}},[e,a]),$.useEffect(()=>{fr(e)&&(F!=null&&F.dependsOn)&&M&&p.current&&(p.current=!1,f(!1))},[M,F==null?void 0:F.dependsOn]);const de=$.useCallback(()=>fr(e)?me:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,me]),fe=()=>{var q,ee,ae,oe,le,Se;switch(e.type){case"title":return c.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 c.jsx(x.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 Q=e.actionName,De=e.actionComponent,He=e.actionLabel,Qe=E=>c.jsx(Jl,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:E??e.actions}),X=E=>{if(e.cardWrap){const U={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return c.jsx(x.Card,{sx:U,...e.cardProps,children:E})}return E};return X(Q&&De?c.jsx(Pe,{name:Q,control:t,defaultValue:e.value??!1,render:({field:E})=>Qe(De==="switch"?c.jsx(ci,{label:He,checked:!!E.value,onChange:E.onChange}):c.jsx(Tr,{label:He||"",checked:!!E.value,onChange:E.onChange}))}):Qe());case"tabs":return c.jsx(Pe,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((ee=(q=e.items)==null?void 0:q[0])==null?void 0:ee.value)=="string"||typeof((oe=(ae=e.items)==null?void 0:ae[0])==null?void 0:oe.value)=="number"?(Se=(le=e.items)==null?void 0:le[0])==null?void 0:Se.value:0),render:({field:E})=>{const j=e.items||[],U=j.map((ie,W)=>({label:ie.label,value:typeof ie.value=="string"||typeof ie.value=="number"?ie.value:W,content:ie.content,disabled:ie.disabled})),R=E.value,I=(()=>{if(typeof R=="string"||typeof R=="number"){const ie=j.findIndex((W,xe)=>typeof W.value=="string"||typeof W.value=="number"?W.value===R:xe===R);return ie>=0?ie:0}return Number(R)||0})(),Y=j[I]||{};return c.jsxs(x.Box,{children:[c.jsx(tc,{value:E.value,onChange:E.onChange,items:U,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(Y.fields)&&Y.fields.length>0&&(()=>{const ie=Y.fields,W=[];let xe=[];for(const je of ie)je.type==="section"&&xe.length>0?(W.push(xe),xe=[je]):xe.push(je);xe.length>0&&W.push(xe);const Te={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 c.jsx(x.Box,{sx:{mt:1},children:W.map((je,Ve)=>{const qe=je.find(nt=>nt.type==="section"),Ze=(qe==null?void 0:qe.cardWrap)!==!1,Ft=c.jsx(c.Fragment,{children:je.map(nt=>{const ut=Math.min(Math.max(nt.col??12,1),12);return c.jsx(x.Box,{sx:{gridColumn:`span ${ut}`},children:c.jsx(os,{field:nt,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},nt.name)})});return Ze?c.jsx(x.Card,{sx:{...Te,...(qe==null?void 0:qe.cardSx)||{}},...(qe==null?void 0:qe.cardProps)||{},children:Ft},`tab-group-${Ve}`):c.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:Ft},`tab-group-${Ve}`)})})})()]})}});case"grid":const ce=e.defaultRows||[];return c.jsx(Pe,{name:e.name,control:t,defaultValue:ce.length>0?ce:_()||[],render:()=>c.jsx(rc,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,rowDeletable:e.rowDeletable!==!1,control:t,setValue:s,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey})});case"listcards":return c.jsx(nc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"text":case"email":case"password":case"tel":case"textarea":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>e.type==="textarea"?c.jsx(Xl,{...E,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(o==null?void 0:o.message)||e.helperText}):c.jsx(li,{...E,id:e.id,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,endAdornment:L(),endorsementText:A(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?m?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:c.jsx(Wl,{position:"end",children:c.jsx(Hn,{"aria-label":"toggle password visibility",onClick:()=>y(j=>!j),edge:"end",children:m?c.jsx(wo,{}):c.jsx(bo,{})})})}:void 0})});case"number":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(li,{...E,id:e.id,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,endAdornment:L(),endorsementText:A(),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:l,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const te=de();return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(is,{labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?b(e.label):void 0,labelVariant:e.labelVariant,value:E.value,onChange:E.onChange,options:te,disabled:e.disabled||ue,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?b(e.label):void 0):e.placeholder,loading:ue,error:l||!!K,helperText:(o==null?void 0:o.message)||(K==null?void 0:K.message)||e.helperText,onOpen:B})});case"checkbox":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(Tr,{label:b(e.label),checked:!!E.value,disabled:e.disabled,onChange:E.onChange})});case"toggle":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(ja,{label:b(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:E.value,options:e.options||[],row:!0,onChange:E.onChange})});case"radio":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(ja,{label:b(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:E.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:E.onChange})});case"checkboxGroup":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_()||[],render:({field:E})=>c.jsx(Zl,{label:b(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(E.value)?E.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:E.onChange,disabled:e.disabled})});case"switch":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(ci,{label:b(e.label),checked:!!E.value,disabled:e.disabled,onChange:E.onChange})});case"autocomplete":const he=de(),g=!!(e.disabled||ue||F!=null&&F.dependsOn&&!u);return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>{const j=E.value,U=e.multiple===!0,R=(F==null?void 0:F.valueField)||e.value_field||"value",I=(F==null?void 0:F.labelField)||e.label_field||"label",Y=W=>{if(W!=null){if(typeof W=="string"||typeof W=="number")return W;if(typeof W=="object"){if(W[R]!==void 0)return W[R];if(W.value!==void 0)return W.value;if(W.id!==void 0)return W.id}}},ie=(()=>{if(U)return(Array.isArray(j)?j:[]).map(xe=>{const Te=he.find(je=>{const Ve=Y(je);return Ve!==void 0&&Ve===xe});return Te||{[R]:xe,[I]:`Selected: ${xe}`,value:xe,label:`Selected: ${xe}`}});{if(j==null||j==="")return null;const W=he.find(xe=>{const Te=Y(xe);return Te!==void 0&&Te===j});return W||{[R]:j,[I]:`Selected: ${j}`,value:j,label:`Selected: ${j}`}}})();return c.jsx(Yl,{id:e.id,options:he,value:ie,multiple:U,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,placeholder:g&&(F!=null&&F.dependsOn)&&!u?`Please select ${F.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:g,loading:ue,error:l||!!K,helperText:(o==null?void 0:o.message)||(K==null?void 0:K.message)||e.helperText||"",onOpen:H,noOptionsText:g&&(F!=null&&F.dependsOn)&&!u?`Please select ${F.dependsOn.replace(/_/g," ")} first`:ue?"Fetching data...":d&&!ue&&he.length===0?"No options available":"Click to load options",onChange:W=>{const xe=(F==null?void 0:F.valueField)||e.value_field||"value";if(U){const je=(Array.isArray(W)?W:[]).map(Ve=>typeof Ve=="object"&&(Ve[xe]||Ve.value||Ve.id)||Ve);E.onChange(je)}else{let Te;W&&typeof W=="object"?Te=W[xe]||W.value||W.id||W:Te=W,E.onChange(Te);const je=e.selectedAssignments;if(je&&W&&typeof W=="object")for(const[Ve,qe]of Object.entries(je)){const Ze=W[qe];if(Ze!==void 0&&typeof s=="function")try{s(Ve,Ze,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(as,{...E,id:e.name,label:b(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:l,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>{const j=E.value||e.defaultValue||e.src;if(j){const W=e.imageUploaded||{},xe=W.previewText||"Preview",Te=W.removeText||"Remove",je=W.saveText||"Save logo",Ve=W.showSave!==void 0?W.showSave:!!(e.onSave||W.saveText),qe=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(j)}catch{}},Ze=()=>{E.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},Ft=()=>{typeof e.onSave=="function"&&e.onSave({url:j,file:P.current||void 0})},nt=ut=>{const Et=ut.target.files&&ut.target.files[0];if(Et){if(typeof e.onFileSelected=="function")try{e.onFileSelected(Et)}catch{}try{const Fi=URL.createObjectURL(Et);E.onChange(Fi)}catch{}P.current=Et,v(!1)}};return c.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...W.cardSx},children:[c.jsx("input",{type:"file",ref:S,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:nt}),c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...W.thumbnailSx},children:c.jsx("img",{src:j,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),c.jsxs(x.Box,{sx:{flexGrow:1},children:[c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...W.fileNameSx},children:typeof j=="string"?j.split("/").pop():"Selected image"}),c.jsx(x.Typography,{sx:{fontSize:"10px",...W.fileMetaSx},children:"Image selected"})]}),c.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[c.jsx(x.Button,{type:"button",sx:{...W.previewButtonSx},variant:"outlined",onClick:qe,startIcon:c.jsx(bo,{}),children:xe}),c.jsx(x.Button,{variant:"outlined",color:"error",onClick:Ze,sx:{...W.removeButtonSx},startIcon:c.jsx(wo,{}),children:Te}),Ve&&c.jsx(x.Button,{variant:"contained",onClick:Ft,sx:{...W.saveButtonSx},children:je})]})]}),c.jsxs(x.Dialog,{open:C,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[c.jsx(x.DialogTitle,{children:W.previewTitle||"Image preview"}),c.jsx(x.DialogContent,{children:c.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:c.jsx("img",{src:j,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),c.jsxs(x.DialogActions,{children:[c.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var ut;return(ut=S.current)==null?void 0:ut.click()},children:W.replaceText||"Replace logo"}),c.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:W.closeText||"Close"})]})]})]})}const U=e.imagePlaceholder||{},R=U.icon||"upload",I=S,Y=()=>{var W;try{(W=I.current)==null||W.click()}catch{}},ie=W=>{const xe=W.target.files&&W.target.files[0];if(xe){typeof e.onFileSelected=="function"&&e.onFileSelected(xe);try{const Te=URL.createObjectURL(xe);E.onChange(Te)}catch{}P.current=xe}};return c.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...U.sx},children:[c.jsx("input",{type:"file",ref:I,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:ie}),c.jsx(Hn,{sx:{borderRadius:"8px",...U.iconSx},children:R==="image"?c.jsx(Sh,{sx:{width:36,height:36,color:"primary.main"}}):c.jsx(oi,{sx:{width:36,height:36,color:"primary.main"}})}),c.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...U.titleSx},children:U.title||"Drag & Drop the image here"}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...U.subtitleSx},children:U.subtitle||""}),c.jsx(x.Button,{onClick:Y,sx:{my:2,...U.buttonSx},startIcon:c.jsx(oi,{}),variant:"contained",disabled:e.disabled,children:U.buttonText||"Upload File"}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...U.helperTextSx},children:U.helperText||e.helperText||""})]})}});case"component":return c.jsx(x.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:s})}catch{try{return e.render({control:t,formData:a,setValue:s})}catch{return e.render()}}})():e.render:e.content});default:return null}},pe=$.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),ge=$.useCallback(async()=>{try{const q=a?a[e.name]:void 0;let ee="";q==null?ee="":Array.isArray(q)?ee=q.join(", "):typeof q=="object"?ee=JSON.stringify(q):ee=String(q),await navigator.clipboard.writeText(ee),h(!0),window.setTimeout(()=>h(!1),1200)}catch{}},[a,e.name]);return c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[c.jsx(x.Box,{sx:{flexGrow:1},children:N?fe():null}),pe&&c.jsx(Hn,{"aria-label":`copy ${e.label||e.name}`,onClick:ge,size:"small",children:T?c.jsx(rs,{fontSize:"small"}):c.jsx(wh,{fontSize:"small"})})]})};var Zi,Co;function zh(){if(Co)return Zi;Co=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,S){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=S};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),l=new e(s),d=new e(s);Zi={Cache:e,split:p,normalizePath:f,setter:function(v){var S=f(v);return l.get(v)||l.set(v,function(w,b){for(var _=0,z=S.length,F=w;_<z-1;){var D=S[_];if(D==="__proto__"||D==="constructor"||D==="prototype")return w;F=F[S[_++]]}F[S[_]]=b})},getter:function(v,S){var P=f(v);return d.get(v)||d.set(v,function(b){for(var _=0,z=P.length;_<z;)if(b!=null||!S)b=b[P[_++]];else return;return b})},join:function(v){return v.reduce(function(S,P){return S+(y(P)||r.test(P)?"["+P+"]":(S?".":"")+P)},"")},forEach:function(v,S,P){m(Array.isArray(v)?v:p(v),S,P)}};function f(v){return o.get(v)||o.set(v,p(v).map(function(S){return S.replace(a,"$2")}))}function p(v){return v.match(t)||[""]}function m(v,S,P){var w=v.length,b,_,z,F;for(_=0;_<w;_++)b=v[_],b&&(C(b)&&(b='"'+b+'"'),F=y(b),z=!F&&/^\d+$/.test(b),S.call(P,b,F,z,_,v))}function y(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function T(v){return v.match(n)&&!v.match(r)}function h(v){return i.test(v)}function C(v){return!y(v)&&(T(v)||h(v))}return Zi}var jr=zh(),Xi,Eo;function Vh(){if(Eo)return Xi;Eo=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,p)=>t(f).join(p).toLowerCase(),i=f=>t(f).reduce((p,m)=>`${p}${p?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return Xi={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(" ")},Xi}var Ji=Vh(),Vn={exports:{}},ko;function Bh(){if(ko)return Vn.exports;ko=1,Vn.exports=function(i){return e(t(i),i)},Vn.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),l={},d=s,f=r(a),p=n(i);for(a.forEach(function(y){if(!p.has(y[0])||!p.has(y[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)l[d]||m(i[d],d,new Set);return o;function m(y,T,h){if(h.has(y)){var C;try{C=", node was:"+JSON.stringify(y)}catch{C=""}throw new Error("Cyclic dependency"+C)}if(!p.has(y))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(y));if(!l[T]){l[T]=!0;var v=f.get(y)||new Set;if(v=Array.from(v),T=v.length){h.add(y);do{var S=v[--T];m(S,p.get(S),h)}while(T);h.delete(y)}o[--s]=y}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var l=i[s];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var l=i[s];a.has(l[0])||a.set(l[0],new Set),a.has(l[1])||a.set(l[1],new Set),a.get(l[0]).add(l[1])}return a}function n(i){for(var a=new Map,s=0,o=i.length;s<o;s++)a.set(i[s],s);return a}return Vn.exports}var Nh=Bh();const Lh=qa(Nh),qh=Object.prototype.toString,Wh=Error.prototype.toString,Uh=RegExp.prototype.toString,Hh=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Kh=/^Symbol\((.*)\)(.*)$/;function Gh(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function To(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return Gh(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Hh.call(e).replace(Kh,"Symbol($1)");const n=qh.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Wh.call(e)+"]":n==="RegExp"?Uh.call(e):null}function or(e,t){let r=To(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=To(this[n],t);return a!==null?a:i},2)}function sc(e){return e==null?[]:[].concat(e)}let oc,lc,cc,Qh=/\$\{\s*(\w+)\s*\}/g;oc=Symbol.toStringTag;class jo{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[oc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],sc(t).forEach(a=>{if(ot.isError(a)){this.errors.push(...a.errors);const s=a.inner.length?a.inner:[a];this.inner.push(...s)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}lc=Symbol.hasInstance;cc=Symbol.toStringTag;class ot 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(Qh,(i,a)=>or(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const s=new jo(t,r,n,i);if(a)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[cc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ot)}static[lc](t){return jo[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 \`${or(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${or(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${or(r,!0)}\``+i}},it={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"},Qt={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"},Oa={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Fa={isValue:"${path} field must be ${value}"},Kn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Yh={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"},Zh={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: \`${or(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: \`${or(r,!0)}\``}return ot.formatError(Rt.notType,e)}};Object.assign(Object.create(null),{mixed:Rt,string:it,number:Qt,date:Oa,object:Kn,array:Yh,boolean:Fa,tuple:Zh});const ls=e=>e&&e.__isYupSchema__;class ui{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,s=typeof n=="function"?n:(...o)=>o.every(l=>l===n);return new ui(t,(o,l)=>{var d;let f=s(...o)?i:a;return(d=f==null?void 0:f(l))!=null?d:l})}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(!ls(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const Bn={context:"$",value:"."};class $r{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]===Bn.context,this.isValue=this.key[0]===Bn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Bn.context:this.isValue?Bn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&jr.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}}$r.prototype.__isYupRef=!0;const Ot=e=>e==null;function Nr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,l){const{name:d,test:f,params:p,message:m,skipAbsent:y}=e;let{parent:T,context:h,abortEarly:C=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function S(M){return $r.isRef(M)?M.getValue(r,T,h):M}function P(M={}){const N=Object.assign({value:r,originalValue:a,label:s.spec.label,path:M.path||n,spec:s.spec,disableStackTrace:M.disableStackTrace||v},p,M.params);for(const L of Object.keys(N))N[L]=S(N[L]);const A=new ot(ot.formatError(M.message||m,N),r,N.path,M.type||d,N.disableStackTrace);return A.params=N,A}const w=C?o:l;let b={path:n,parent:T,type:d,from:i.from,createError:P,resolve:S,options:i,originalValue:a,schema:s};const _=M=>{ot.isError(M)?w(M):M?l(null):w(P())},z=M=>{ot.isError(M)?w(M):o(M)};if(y&&Ot(r))return _(!0);let D;try{var u;if(D=f.call(b,r,b),typeof((u=D)==null?void 0:u.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(D).then(_,z)}}catch(M){z(M);return}_(D)}return t.OPTIONS=e,t}function Xh(e,t,r,n=r){let i,a,s;return t?(jr.forEach(t,(o,l,d)=>{let f=l?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let p=e.type==="tuple",m=d?parseInt(f,10):0;if(e.innerType||p){if(p&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&m>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[m],e=p?e.spec.types[m]:e.innerType}if(!d){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);i=r,r=r&&r[f],e=e.fields[f]}a=f,s=l?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class pi extends Set{describe(){const t=[];for(const r of this.values())t.push($r.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 pi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function qr(e,t=new Map){if(ls(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]=qr(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,qr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(qr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=qr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class ht{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 pi,this._blacklist=new pi,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=qr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(s=>{a.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&Ot(a))return a;let s=or(t),o=or(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
177
177
|
|
|
178
178
|
attempted value: ${s}
|
|
179
|
-
`+(o!==s?`result of cast: ${o}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:s=t,strict:o=this.spec.strict}=r,l=t;o||(l=this._cast(l,Object.assign({assert:!1},r)));let d=[];for(let f of Object.values(this.internalTests))f&&d.push(f);this.runTests({path:a,value:l,originalValue:s,options:r,tests:d},n,f=>{if(f.length)return i(f,l);this.runTests({path:a,value:l,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:l,options:d}=t,f=h=>{i||(i=!0,r(h,s))},p=h=>{i||(i=!0,n(h,s))},m=a.length,y=[];if(!m)return p([]);let T={value:s,originalValue:o,path:l,options:d,schema:this};for(let h=0;h<a.length;h++){const C=a[h];C(T,f,function(S){S&&(Array.isArray(S)?y.push(...S):y.push(S)),--m<=0&&p(y)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:s}){const o=t??r;if(o==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof o=="number";let d=n[o];const f=Object.assign({},s,{strict:!0,parent:n,value:d,originalValue:a[o],key:void 0,[l?"index":"key"]:o,path:l||o.includes(".")?`${i||""}[${l?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(p,m,y)=>this.resolve(f)._validate(d,f,m,y)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((s,o)=>i._validate(t,r,(l,d)=>{ot.isError(l)&&(l.value=d),o(l)},(l,d)=>{l.length?o(new ot(l,d,void 0,void 0,a)):s(d)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(o,l)=>{throw ot.isError(o)&&(o.value=l),o},(o,l)=>{if(o.length)throw new ot(o,t,void 0,void 0,s);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(ot.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(ot.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):qr(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=Nr({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=Nr({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=Nr(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(a||s.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=sc(t).map(a=>new $r(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new ui(i,r):ui.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Nr({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=Nr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,s=a.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:s}})}}),n}notOneOf(t,r=Rt.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=Nr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,s=a.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:s}=r.spec;return{meta:i,label:n,optional:a,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,d,f)=>f.findIndex(p=>p.name===l.name)===d)}}}ht.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ht.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=Xh(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])ht.prototype[e]=ht.prototype.oneOf;for(const e of["not","nope"])ht.prototype[e]=ht.prototype.notOneOf;const Jh=()=>!0;function uc(e){return new pc(e)}class pc extends ht{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Jh},t))}}uc.prototype=pc.prototype;function dc(){return new fc}class fc extends ht{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=Fa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Ot(r)||r===!0}})}isFalse(t=Fa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Ot(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}dc.prototype=fc.prototype;const em=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function tm(e){const t=Aa(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 Aa(e){var t,r;const n=em.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 rm=/^[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])?)*$/,nm=/^((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,im=/^(?:[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,am="^\\d{4}-\\d{2}-\\d{2}",sm="\\d{2}:\\d{2}:\\d{2}",om="(([+-]\\d{2}(:?\\d{2})?)|Z)",lm=new RegExp(`${am}T${sm}(\\.\\d+)?${om}$`),cm=e=>Ot(e)||e===e.trim(),um={}.toString();function mn(){return new hc}class hc extends ht{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===um?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=it.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=it.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=it.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||it.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=it.email){return this.matches(rm,{name:"email",message:t,excludeEmptyString:!0})}url(t=it.url){return this.matches(nm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=it.uuid){return this.matches(im,{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(lm,{name:"datetime",message:r||it.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||it.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Aa(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||it.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Aa(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=it.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:cm})}lowercase(t=it.lowercase){return this.transform(r=>Ot(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toLowerCase()})}uppercase(t=it.uppercase){return this.transform(r=>Ot(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toUpperCase()})}}mn.prototype=hc.prototype;let pm=e=>e!=+e;function mc(){return new yc}class yc extends ht{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=Qt.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=Qt.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=Qt.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=Qt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Qt.positive){return this.moreThan(0,t)}negative(t=Qt.negative){return this.lessThan(0,t)}integer(t=Qt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Ot(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>Ot(i)?i:Math[t](i))}}mc.prototype=yc.prototype;let gc=new Date(""),dm=e=>Object.prototype.toString.call(e)==="[object Date]";function cs(){return new An}class An extends ht{constructor(){super({type:"date",check(t){return dm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=tm(t),isNaN(t)?An.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if($r.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=Oa.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=Oa.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)}})}}An.INVALID_DATE=gc;cs.prototype=An.prototype;cs.INVALID_DATE=gc;function fm(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let l=jr.split(s)[0];n.add(l),i.has(`${o}-${l}`)||r.push([o,l])}for(const s of Object.keys(e)){let o=e[s];n.add(s),$r.isRef(o)&&o.isSibling?a(o.path,s):ls(o)&&"deps"in o&&o.deps.forEach(l=>a(l,s))}return Lh.array(Array.from(n),r).reverse()}function Oo(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 xc(e){return(t,r)=>Oo(e,t)-Oo(e,r)}const hm=(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 Gn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Gn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Gn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Gn)}):"optional"in e?e.optional():e}const mm=(e,t)=>{const r=[...jr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=jr.getter(jr.join(r),!0)(e);return!!(i&&n in i)};let Fo=e=>Object.prototype.toString.call(e)==="[object Object]";function Ao(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const ym=xc([]);function vc(e){return new bc(e)}class bc extends ht{constructor(t){super({type:"object",check(r){return Fo(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=ym,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(p=>!this._nodes.includes(p))),l={},d=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),f=!1;for(const p of o){let m=a[p],y=p in i;if(m){let T,h=i[p];d.path=(r.path?`${r.path}.`:"")+p,m=m.resolve({value:h,context:r.context,parent:l});let C=m instanceof ht?m.spec:void 0,v=C==null?void 0:C.strict;if(C!=null&&C.strip){f=f||p in i;continue}T=!r.__validating||!v?m.cast(i[p],d):i[p],T!==void 0&&(l[p]=T)}else y&&!s&&(l[p]=i[p]);(y!==p in l||l[p]!==i[p])&&(f=!0)}return f?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:s=t,recursive:o=this.spec.recursive}=r;r.from=[{schema:this,value:s},...a],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,d)=>{if(!o||!Fo(d)){i(l,d);return}s=s||d;let f=[];for(let p of this._nodes){let m=this.fields[p];!m||$r.isRef(m)||f.push(m.asNestedTest({options:r,key:p,parent:d,parentPath:r.path,originalParent:s}))}this.runTests({tests:f,value:d,originalValue:s,options:r},n,p=>{i(p.sort(this._sortErrors).concat(l),d)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const s=n[i];n[i]=s===void 0?a:s}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=fm(t,r),n._sortErrors=xc(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 Gn(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=jr.getter(t,!0);return this.transform(a=>{if(!a)return a;let s=a;return mm(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(hm)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Kn.exact,test(r){if(r==null)return!0;const n=Ao(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Kn.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=Ao(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Kn.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(Ji.camelCase)}snakeCase(){return this.transformKeys(Ji.snakeCase)}constantCase(){return this.transformKeys(t=>Ji.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,s]of Object.entries(r.fields)){var i;let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),n.fields[a]=s.describe(o)}return n}}vc.prototype=bc.prototype;const wc=e=>{const t={};return e.forEach(r=>{var a,s,o;let n;switch(r.type){case"text":case"textarea":case"tel":n=mn(),r.validation?n=dr(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`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"email":n=mn().email(((a=r.validation)==null?void 0:a.message)||`${r.label} must be a valid email address`),r.validation&&(n=dr(n,r,"string"));break;case"password":n=mn(),r.validation?n=dr(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`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"number":n=mc().typeError(`${r.label} must be a number`),r.validation?n=dr(n,r,"number"):(r.min!==void 0&&(n=n.min(r.min,`${r.label} must be at least ${r.min}`)),r.max!==void 0&&(n=n.max(r.max,`${r.label} must be at most ${r.max}`)));break;case"select":n=mn(),r.validation&&(n=dr(n,r,"string"));break;case"checkbox":n=dc(),r.validation&&(n=dr(n,r,"boolean"));break;case"date":n=cs().typeError(`${r.label} must be a valid date`),r.validation?n=dr(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=uc()}if(((s=r.validation)==null?void 0:s.required)!==void 0?r.validation.required:r.required){const l=((o=r.validation)==null?void 0:o.message)||`${r.label} is required`;n=n.required(l)}t[r.name]=n}),vc().shape(t)},dr=(e,t,r)=>{const n=t.validation;if(!n)return e;if(r==="string"){if(n.minLength!==void 0){const i=n.message||`${t.label} must be at least ${n.minLength} characters`;e=e.min(n.minLength,i)}if(n.maxLength!==void 0){const i=n.message||`${t.label} must be at most ${n.maxLength} characters`;e=e.max(n.maxLength,i)}}if(r==="number"){if(n.min!==void 0){const i=n.message||`${t.label} must be at least ${n.min}`;e=e.min(n.min,i)}if(n.max!==void 0){const i=n.message||`${t.label} must be at most ${n.max}`;e=e.max(n.max,i)}}if(n.pattern){const i=typeof n.pattern=="string"?new RegExp(n.pattern):n.pattern,a=n.message||`${t.label} format is invalid`;e=e.test("pattern",a,s=>s?i.test(s):!0)}return n.custom&&(e=e.test("custom",n.message||`${t.label} is invalid`,i=>{const a=n.custom(i);return typeof a=="boolean"?a:!1})),e},Sc=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=$.useMemo(()=>Array.from({length:t},(f,p)=>p+1),[t]),o=$.useMemo(()=>Math.round(e/t*100),[e,t]),l=f=>n[f-1]||`Step ${f}`,d=f=>f===e||a.includes(f)||f===e+1&&a.includes(e);return c.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:s.map((f,p)=>{const m=f===e,y=f<e||a.includes(f),T=m||y?"primary.main":"#8F97A4";return c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[c.jsxs(x.Box,{onClick:()=>d(f)&&r(f),sx:{display:"flex",alignItems:"center",cursor:d(f)?"pointer":"default"},children:[c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:m||y?"2px solid":"1px solid",borderColor:m||y?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:h=>m||y?St(h.palette.primary.main,.2):"transparent",mr:.5,color:T,fontWeight:m||y?600:500,fontSize:"12px"},children:f}),i&&c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:T},children:l(f)})]}),p<s.length-1&&c.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:f<e?"primary.main":"#DFE3E8"}})]},f)})}),c.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${o}% complete`})]}),c.jsx(x.LinearProgress,{variant:"determinate",value:o,sx:{height:4,borderRadius:"50px",backgroundColor:f=>f.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Cc=({buttons:e,disabled:t=!1})=>{const r=o=>{o.onClick&&o.onClick()},n=e.filter(o=>o.position==="left"||!o.position),i=e.filter(o=>o.position==="center"),a=e.filter(o=>o.position==="right"),s=(o,l)=>{const d=(o.text||"").toLowerCase(),f=o.type==="submit"||d.includes("submit")||d.includes("save")||d.includes("next"),p=o.position==="left"||d.includes("cancel")||d.includes("back")||d.includes("draft"),m=o.type?o.type:f?"submit":"button",y=p?"outlined":"contained",T=o.disabled||t,h=C=>C&&["primary","secondary","error","info","success","warning"].includes(C)?C:"primary";return c.jsxs(x.Button,{type:m,variant:y,color:h(o.color),size:o.size||"large",disabled:T,onClick:o.onClick?()=>r(o):void 0,sx:o.sx,children:[o.loading&&c.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${l}`)};return c.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx(x.Box,{sx:{display:"flex",gap:2},children:n.map((o,l)=>s(o,l))}),c.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((o,l)=>s(o,l))}),c.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((o,l)=>s(o,l))})]})},gm=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:l="right",layout:d="horizontal",spacing:f=2,sx:p}=e,m=v=>{let S="button",P="contained";return v.type?S=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?S="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(S="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&(P="outlined"),{buttonType:S,buttonVariant:P}},y=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",T=v=>{const{buttonType:S}=m(v);v.onClick?v.onClick():S==="submit"&&t?t(s):a&&r&&(v.text.toLowerCase().includes("next")?r(n+1,i):(v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("previous"))&&r(n-1,i))},h=(v,S)=>{const{buttonType:P,buttonVariant:w}=m(v),b=y(v.color);return c.jsx(x.Button,{type:P,variant:w,color:b,size:v.size||"medium",disabled:v.disabled,onClick:()=>T(v),sx:v.sx,children:v.text},S)},C=()=>{const v={display:"flex",gap:f,...p};switch(l){case"left":return{...v,justifyContent:"flex-start"};case"center":return{...v,justifyContent:"center"};case"right":return{...v,justifyContent:"flex-end"};case"space-between":return{...v,justifyContent:"space-between"};default:return{...v,justifyContent:"flex-end"}}};return d==="vertical"?c.jsx(x.Box,{sx:C(),children:o.map((v,S)=>c.jsx(x.Box,{sx:{width:"100%"},children:h(v,S)},S))}):c.jsx(x.Box,{sx:C(),children:c.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,S)=>h(v,S))})})},xm=new ku({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),vm=e=>c.jsx(Au,{client:xm,children:c.jsx(bm,{...e})}),bm=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:l=!0,buttons:d,buttonGroup:f,formCardWrap:p,formCardSx:m,formCardProps:y,baseUrl:T,apiHeaders:h,stepNavigationProps:C})=>{var He,Qe;const v=[...new Set(r.map(X=>X.step).filter(X=>X!=null&&X>0))].sort((X,le)=>(X||0)-(le||0)),S=v.length>1,P=v.length||1,[w,b]=$.useState(1),_=S?r.filter(X=>X.step===w):r,z=$.useMemo(()=>wc(_),[_]),{control:F,handleSubmit:D,formState:{errors:u},watch:M,setValue:N,resetField:A,trigger:L}=iu({resolver:ou(z),mode:"onChange",defaultValues:o}),Q=M(),se=$.useRef({});$.useEffect(()=>{const X=[];for(const le of r){const te=le.depends_on;te&&typeof le.name=="string"&&X.push({dependentField:le.name,dependencyName:te})}if(X.length!==0)for(const{dependentField:le,dependencyName:te}of X){const he=se.current[te],g=Q==null?void 0:Q[te];if(he!==g)try{A(le)}catch{}se.current[te]=g}},[r,Q,A]);const me=$.useRef(i);$.useEffect(()=>{me.current=i},[i]);const ue=$.useMemo(()=>{try{return JSON.stringify(Q)}catch{return String(Date.now())}},[Q]),K=$.useRef(null);$.useEffect(()=>{me.current&&K.current!==ue&&(K.current=ue,me.current(Q))},[ue]);const B=async()=>{if(!S)return!0;const X=r.filter(te=>te.step===w);for(const te of X)if(te.required){const he=Q[te.name];let g=!0;if(te.type==="checkbox"?g=he===!0:Array.isArray(he)?g=he.length>0:g=he!=null&&he!=="",!g)return!1}return await L()?!0:Object.keys(u).filter(he=>X.some(g=>g.name===he)).map(he=>{const g=u[he];return typeof(g==null?void 0:g.message)=="string"?g.message:`${he} is invalid`}).length===0},H=$.useMemo(()=>{if(!S)return!0;const X=r.filter(te=>te.step===w);for(const te of X)if(te.required){const he=Q[te.name];let g=!0;if(te.type==="checkbox"?g=he===!0:Array.isArray(he)?g=he.length>0:g=he!=null&&he!=="",!g)return!1}return Object.keys(u).filter(te=>X.some(he=>he.name===te)).length===0},[S,w,r,Q,u]),de=$.useMemo(()=>{if(S)return H;for(const X of r)if(X.required){const le=Q[X.name];let te=!0;if(X.type==="checkbox"?te=le===!0:te=le!=null&&le!==""&&!(Array.isArray(le)&&le.length===0),!te)return!1}return Object.keys(u).length===0},[S,H,r,Q,u]),fe=async X=>{X<1||X>P||X>w&&S&&!await B()||b(X)},pe=async X=>{if(S&&w<P){console.warn("Form submission attempted on non-final step");return}s&&s(X),n(X)},ge=async X=>{X&&(X.preventDefault(),X.stopPropagation()),S&&w<P&&await B()&&fe(w+1)},q=X=>{X&&(X.preventDefault(),X.stopPropagation()),S&&w>1&&fe(w-1)},ee=X=>X.col?X.col:(X.xs||X.sm||X.md||X.lg||X.xl)&&(X.xs||X.sm||X.md||X.lg||X.xl)||12,ae=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:((He=t.typography)==null?void 0:He.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((Qe=t.typography)==null?void 0:Qe.fontSize)=="number"?t.typography.fontSize:14}}):void 0,oe=()=>{if(f&&f.buttons&&f.buttons.length>0){const X={...f,buttons:f.buttons.map(le=>{const te=(le.text||"").toLowerCase(),he=le.type==="submit"||te.includes("submit")||te.includes("save")||te.includes("finish")||te.includes("complete"),g=te.includes("next");let E=!1;return S?(he||g)&&(E=!H):he&&(E=!de),{...le,disabled:le.disabled||E}})};return c.jsx(x.Box,{sx:{mt:3},children:c.jsx(gm,{config:X,onSubmit:pe,onStepChange:fe,currentStep:w,totalSteps:P,isMultiStep:S,formData:Q})})}if(d&&d.length>0){const X=d.map(le=>{const te=(le.text||"").toLowerCase(),he=le.type==="submit"||te.includes("submit")||te.includes("save")||te.includes("finish")||te.includes("complete"),g=te.includes("next");let E=!1;return S?(he||g)&&(E=!H):he&&(E=!de),{...le,disabled:le.disabled||E}});return c.jsx(Cc,{buttons:X})}return l?c.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:c.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[S&&w>1&&c.jsx(x.Button,{type:"button",variant:"outlined",onClick:q,children:"Previous"}),S?w<P?c.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!H,onClick:ge,children:"Next"}):c.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!H,children:a}):c.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!de,children:a})]})}):null},ce=$.useCallback((X,le)=>{const te=X.showWhen;if(typeof te=="function")try{return!!te(le||{})}catch{return!0}if(te&&typeof te=="object"){const he=te.field,g=te.equals,E=te.in,j=he?(le||{})[he]:void 0;if(he&&typeof g<"u")return j===g;if(he&&Array.isArray(E))return E.includes(j)}return!0},[]),Se=$.useMemo(()=>{const X=[];let le=[];for(const te of _)te.type==="section"&&le.length>0?(X.push(le),le=[te]):le.push(te);return le.length>0&&X.push(le),X},[_]),G=c.jsxs(x.Box,{component:"form",onSubmit:X=>{if(S&&w<P){X.preventDefault(),X.stopPropagation(),H&&ge();return}D(pe)(X)},id:e,onKeyDown:X=>{X.key==="Enter"&&S&&w<P&&(X.preventDefault(),H&&ge())},children:[S&&c.jsx(Sc,{currentStep:w,totalSteps:P,onStepChange:fe,stepTitles:C==null?void 0:C.stepTitles,showStepTitles:(C==null?void 0:C.showStepTitles)!==!1}),Se.map((X,le)=>{const te=X.find(U=>U.type==="section");if(te&&!ce(te,Q))return null;const he=(te==null?void 0:te.cardWrap)!==!1,g={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},E={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},j=c.jsx(c.Fragment,{children:X.map(U=>{const R=ee(U);return c.jsx(x.Box,{sx:{gridColumn:`span ${R}`},children:c.jsx(os,{field:U,control:F,errors:u,baseUrl:T,apiHeaders:h,formData:Q,setValue:N})},U.name)})});return he?c.jsx(x.Card,{sx:{...g,...(te==null?void 0:te.cardSx)||{}},...(te==null?void 0:te.cardProps)||{},children:j},`group-${le}`):c.jsx(x.Box,{sx:E,children:j},`group-${le}`)}),oe()]}),De=p?c.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...m},...y,children:G}):G;return ae?c.jsx(x.ThemeProvider,{theme:ae,children:De}):De},wm=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>c.jsx(x.Box,{sx:{textAlign:"center"},children:c.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:s?"pointer":"default",...i},className:a,onClick:s,onError:o=>{o.currentTarget.src="/placeholder-image.png"}})});function Dr(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(f){try{d(n.next(f))}catch(p){s(p)}}function l(f){try{d(n.throw(f))}catch(p){s(p)}}function d(f){f.done?a(f.value):i(f.value).then(o,l)}d((n=n.apply(e,t||[])).next())})}const Sm=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 sn(e,t,r){const n=Cm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&_o(n,"path",a),_o(n,"relativePath",a),n}function Cm(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=Sm.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function _o(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Em=[".DS_Store","Thumbs.db"];function km(e){return Dr(this,void 0,void 0,function*(){return di(e)&&Tm(e.dataTransfer)?Am(e.dataTransfer,e.type):jm(e)?Om(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Fm(e):[]})}function Tm(e){return di(e)}function jm(e){return di(e)&&di(e.target)}function di(e){return typeof e=="object"&&e!==null}function Om(e){return _a(e.target.files).map(t=>sn(t))}function Fm(e){return Dr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>sn(r))})}function Am(e,t){return Dr(this,void 0,void 0,function*(){if(e.items){const r=_a(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(_m));return Ro(Ec(n))}return Ro(_a(e.files).map(r=>sn(r)))})}function Ro(e){return e.filter(t=>Em.indexOf(t.name)===-1)}function _a(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 _m(e){if(typeof e.webkitGetAsEntry!="function")return $o(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?kc(t):$o(e,t)}function Ec(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Ec(r):[r]],[])}function $o(e,t){return Dr(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const s=yield a.getFile();return s.handle=a,sn(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return sn(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Rm(e){return Dr(this,void 0,void 0,function*(){return e.isDirectory?kc(e):$m(e)})}function kc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(s=>Dr(this,void 0,void 0,function*(){if(s.length){const o=Promise.all(s.map(Rm));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function $m(e){return Dr(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=sn(n,e.fullPath);t(i)},n=>{r(n)})})})}var Nn={},Do;function Dm(){return Do||(Do=1,Nn.__esModule=!0,Nn.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(s){var o=s.trim().toLowerCase();return o.charAt(0)==="."?n.toLowerCase().endsWith(o):o.endsWith("/*")?a===o.replace(/\/.*$/,""):i===o})}return!0}),Nn}var Pm=Dm();const ea=qa(Pm);function Po(e){return zm(e)||Im(e)||jc(e)||Mm()}function Mm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
179
|
+
`+(o!==s?`result of cast: ${o}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:s=t,strict:o=this.spec.strict}=r,l=t;o||(l=this._cast(l,Object.assign({assert:!1},r)));let d=[];for(let f of Object.values(this.internalTests))f&&d.push(f);this.runTests({path:a,value:l,originalValue:s,options:r,tests:d},n,f=>{if(f.length)return i(f,l);this.runTests({path:a,value:l,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:l,options:d}=t,f=h=>{i||(i=!0,r(h,s))},p=h=>{i||(i=!0,n(h,s))},m=a.length,y=[];if(!m)return p([]);let T={value:s,originalValue:o,path:l,options:d,schema:this};for(let h=0;h<a.length;h++){const C=a[h];C(T,f,function(S){S&&(Array.isArray(S)?y.push(...S):y.push(S)),--m<=0&&p(y)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:s}){const o=t??r;if(o==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof o=="number";let d=n[o];const f=Object.assign({},s,{strict:!0,parent:n,value:d,originalValue:a[o],key:void 0,[l?"index":"key"]:o,path:l||o.includes(".")?`${i||""}[${l?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(p,m,y)=>this.resolve(f)._validate(d,f,m,y)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((s,o)=>i._validate(t,r,(l,d)=>{ot.isError(l)&&(l.value=d),o(l)},(l,d)=>{l.length?o(new ot(l,d,void 0,void 0,a)):s(d)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(o,l)=>{throw ot.isError(o)&&(o.value=l),o},(o,l)=>{if(o.length)throw new ot(o,t,void 0,void 0,s);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(ot.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(ot.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):qr(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=Nr({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=Nr({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=Nr(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(a||s.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=sc(t).map(a=>new $r(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new ui(i,r):ui.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Nr({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=Nr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,s=a.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:s}})}}),n}notOneOf(t,r=Rt.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=Nr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,s=a.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:s}=r.spec;return{meta:i,label:n,optional:a,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,d,f)=>f.findIndex(p=>p.name===l.name)===d)}}}ht.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ht.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=Xh(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])ht.prototype[e]=ht.prototype.oneOf;for(const e of["not","nope"])ht.prototype[e]=ht.prototype.notOneOf;const Jh=()=>!0;function uc(e){return new pc(e)}class pc extends ht{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Jh},t))}}uc.prototype=pc.prototype;function dc(){return new fc}class fc extends ht{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=Fa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Ot(r)||r===!0}})}isFalse(t=Fa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Ot(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}dc.prototype=fc.prototype;const em=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function tm(e){const t=Aa(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 Aa(e){var t,r;const n=em.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 rm=/^[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])?)*$/,nm=/^((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,im=/^(?:[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,am="^\\d{4}-\\d{2}-\\d{2}",sm="\\d{2}:\\d{2}:\\d{2}",om="(([+-]\\d{2}(:?\\d{2})?)|Z)",lm=new RegExp(`${am}T${sm}(\\.\\d+)?${om}$`),cm=e=>Ot(e)||e===e.trim(),um={}.toString();function mn(){return new hc}class hc extends ht{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===um?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=it.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=it.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=it.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||it.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=it.email){return this.matches(rm,{name:"email",message:t,excludeEmptyString:!0})}url(t=it.url){return this.matches(nm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=it.uuid){return this.matches(im,{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(lm,{name:"datetime",message:r||it.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||it.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Aa(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||it.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Aa(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=it.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:cm})}lowercase(t=it.lowercase){return this.transform(r=>Ot(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toLowerCase()})}uppercase(t=it.uppercase){return this.transform(r=>Ot(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toUpperCase()})}}mn.prototype=hc.prototype;let pm=e=>e!=+e;function mc(){return new yc}class yc extends ht{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=Qt.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=Qt.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=Qt.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=Qt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Qt.positive){return this.moreThan(0,t)}negative(t=Qt.negative){return this.lessThan(0,t)}integer(t=Qt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Ot(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>Ot(i)?i:Math[t](i))}}mc.prototype=yc.prototype;let gc=new Date(""),dm=e=>Object.prototype.toString.call(e)==="[object Date]";function cs(){return new An}class An extends ht{constructor(){super({type:"date",check(t){return dm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=tm(t),isNaN(t)?An.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if($r.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=Oa.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=Oa.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)}})}}An.INVALID_DATE=gc;cs.prototype=An.prototype;cs.INVALID_DATE=gc;function fm(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let l=jr.split(s)[0];n.add(l),i.has(`${o}-${l}`)||r.push([o,l])}for(const s of Object.keys(e)){let o=e[s];n.add(s),$r.isRef(o)&&o.isSibling?a(o.path,s):ls(o)&&"deps"in o&&o.deps.forEach(l=>a(l,s))}return Lh.array(Array.from(n),r).reverse()}function Oo(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 xc(e){return(t,r)=>Oo(e,t)-Oo(e,r)}const hm=(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 Gn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Gn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Gn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Gn)}):"optional"in e?e.optional():e}const mm=(e,t)=>{const r=[...jr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=jr.getter(jr.join(r),!0)(e);return!!(i&&n in i)};let Fo=e=>Object.prototype.toString.call(e)==="[object Object]";function Ao(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const ym=xc([]);function vc(e){return new bc(e)}class bc extends ht{constructor(t){super({type:"object",check(r){return Fo(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=ym,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(p=>!this._nodes.includes(p))),l={},d=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),f=!1;for(const p of o){let m=a[p],y=p in i;if(m){let T,h=i[p];d.path=(r.path?`${r.path}.`:"")+p,m=m.resolve({value:h,context:r.context,parent:l});let C=m instanceof ht?m.spec:void 0,v=C==null?void 0:C.strict;if(C!=null&&C.strip){f=f||p in i;continue}T=!r.__validating||!v?m.cast(i[p],d):i[p],T!==void 0&&(l[p]=T)}else y&&!s&&(l[p]=i[p]);(y!==p in l||l[p]!==i[p])&&(f=!0)}return f?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:s=t,recursive:o=this.spec.recursive}=r;r.from=[{schema:this,value:s},...a],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,d)=>{if(!o||!Fo(d)){i(l,d);return}s=s||d;let f=[];for(let p of this._nodes){let m=this.fields[p];!m||$r.isRef(m)||f.push(m.asNestedTest({options:r,key:p,parent:d,parentPath:r.path,originalParent:s}))}this.runTests({tests:f,value:d,originalValue:s,options:r},n,p=>{i(p.sort(this._sortErrors).concat(l),d)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const s=n[i];n[i]=s===void 0?a:s}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=fm(t,r),n._sortErrors=xc(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 Gn(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=jr.getter(t,!0);return this.transform(a=>{if(!a)return a;let s=a;return mm(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(hm)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Kn.exact,test(r){if(r==null)return!0;const n=Ao(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Kn.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=Ao(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Kn.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(Ji.camelCase)}snakeCase(){return this.transformKeys(Ji.snakeCase)}constantCase(){return this.transformKeys(t=>Ji.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,s]of Object.entries(r.fields)){var i;let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),n.fields[a]=s.describe(o)}return n}}vc.prototype=bc.prototype;const wc=e=>{const t={};return e.forEach(r=>{var a,s,o;let n;switch(r.type){case"text":case"textarea":case"tel":n=mn(),r.validation?n=dr(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`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"email":n=mn().email(((a=r.validation)==null?void 0:a.message)||`${r.label} must be a valid email address`),r.validation&&(n=dr(n,r,"string"));break;case"password":n=mn(),r.validation?n=dr(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`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"number":n=mc().typeError(`${r.label} must be a number`),r.validation?n=dr(n,r,"number"):(r.min!==void 0&&(n=n.min(r.min,`${r.label} must be at least ${r.min}`)),r.max!==void 0&&(n=n.max(r.max,`${r.label} must be at most ${r.max}`)));break;case"select":n=mn(),r.validation&&(n=dr(n,r,"string"));break;case"checkbox":n=dc(),r.validation&&(n=dr(n,r,"boolean"));break;case"date":n=cs().typeError(`${r.label} must be a valid date`),r.validation?n=dr(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=uc()}if(((s=r.validation)==null?void 0:s.required)!==void 0?r.validation.required:r.required){const l=((o=r.validation)==null?void 0:o.message)||`${r.label} is required`;n=n.required(l)}t[r.name]=n}),vc().shape(t)},dr=(e,t,r)=>{const n=t.validation;if(!n)return e;if(r==="string"){if(n.minLength!==void 0){const i=n.message||`${t.label} must be at least ${n.minLength} characters`;e=e.min(n.minLength,i)}if(n.maxLength!==void 0){const i=n.message||`${t.label} must be at most ${n.maxLength} characters`;e=e.max(n.maxLength,i)}}if(r==="number"){if(n.min!==void 0){const i=n.message||`${t.label} must be at least ${n.min}`;e=e.min(n.min,i)}if(n.max!==void 0){const i=n.message||`${t.label} must be at most ${n.max}`;e=e.max(n.max,i)}}if(n.pattern){const i=typeof n.pattern=="string"?new RegExp(n.pattern):n.pattern,a=n.message||`${t.label} format is invalid`;e=e.test("pattern",a,s=>s?i.test(s):!0)}return n.custom&&(e=e.test("custom",n.message||`${t.label} is invalid`,i=>{const a=n.custom(i);return typeof a=="boolean"?a:!1})),e},Sc=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=$.useMemo(()=>Array.from({length:t},(f,p)=>p+1),[t]),o=$.useMemo(()=>Math.round(e/t*100),[e,t]),l=f=>n[f-1]||`Step ${f}`,d=f=>f===e||a.includes(f)||f===e+1&&a.includes(e);return c.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:s.map((f,p)=>{const m=f===e,y=f<e||a.includes(f),T=m||y?"primary.main":"#8F97A4";return c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[c.jsxs(x.Box,{onClick:()=>d(f)&&r(f),sx:{display:"flex",alignItems:"center",cursor:d(f)?"pointer":"default"},children:[c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:m||y?"2px solid":"1px solid",borderColor:m||y?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:h=>m||y?St(h.palette.primary.main,.2):"transparent",mr:.5,color:T,fontWeight:m||y?600:500,fontSize:"12px"},children:f}),i&&c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:T},children:l(f)})]}),p<s.length-1&&c.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:f<e?"primary.main":"#DFE3E8"}})]},f)})}),c.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${o}% complete`})]}),c.jsx(x.LinearProgress,{variant:"determinate",value:o,sx:{height:4,borderRadius:"50px",backgroundColor:f=>f.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Cc=({buttons:e,disabled:t=!1})=>{const r=o=>{o.onClick&&o.onClick()},n=e.filter(o=>o.position==="left"||!o.position),i=e.filter(o=>o.position==="center"),a=e.filter(o=>o.position==="right"),s=(o,l)=>{const d=(o.text||"").toLowerCase(),f=o.type==="submit"||d.includes("submit")||d.includes("save")||d.includes("next"),p=o.position==="left"||d.includes("cancel")||d.includes("back")||d.includes("draft"),m=o.type?o.type:f?"submit":"button",y=p?"outlined":"contained",T=o.disabled||t,h=C=>C&&["primary","secondary","error","info","success","warning"].includes(C)?C:"primary";return c.jsxs(x.Button,{type:m,variant:y,color:h(o.color),size:o.size||"large",disabled:T,onClick:o.onClick?()=>r(o):void 0,sx:o.sx,children:[o.loading&&c.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${l}`)};return c.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx(x.Box,{sx:{display:"flex",gap:2},children:n.map((o,l)=>s(o,l))}),c.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((o,l)=>s(o,l))}),c.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((o,l)=>s(o,l))})]})},gm=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:l="right",layout:d="horizontal",spacing:f=2,sx:p}=e,m=v=>{let S="button",P="contained";return v.type?S=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?S="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(S="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&(P="outlined"),{buttonType:S,buttonVariant:P}},y=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",T=v=>{const{buttonType:S}=m(v);v.onClick?v.onClick():S==="submit"&&t?t(s):a&&r&&(v.text.toLowerCase().includes("next")?r(n+1,i):(v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("previous"))&&r(n-1,i))},h=(v,S)=>{const{buttonType:P,buttonVariant:w}=m(v),b=y(v.color);return c.jsx(x.Button,{type:P,variant:w,color:b,size:v.size||"medium",disabled:v.disabled,onClick:()=>T(v),sx:v.sx,children:v.text},S)},C=()=>{const v={display:"flex",gap:f,...p};switch(l){case"left":return{...v,justifyContent:"flex-start"};case"center":return{...v,justifyContent:"center"};case"right":return{...v,justifyContent:"flex-end"};case"space-between":return{...v,justifyContent:"space-between"};default:return{...v,justifyContent:"flex-end"}}};return d==="vertical"?c.jsx(x.Box,{sx:C(),children:o.map((v,S)=>c.jsx(x.Box,{sx:{width:"100%"},children:h(v,S)},S))}):c.jsx(x.Box,{sx:C(),children:c.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,S)=>h(v,S))})})},xm=new ku({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),vm=e=>c.jsx(Au,{client:xm,children:c.jsx(bm,{...e})}),bm=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:l=!0,buttons:d,buttonGroup:f,formCardWrap:p,formCardSx:m,formCardProps:y,baseUrl:T,apiHeaders:h,stepNavigationProps:C})=>{var He,Qe;const v=[...new Set(r.map(X=>X.step).filter(X=>X!=null&&X>0))].sort((X,ce)=>(X||0)-(ce||0)),S=v.length>1,P=v.length||1,[w,b]=$.useState(1),_=S?r.filter(X=>X.step===w):r,z=$.useMemo(()=>wc(_),[_]),{control:F,handleSubmit:D,formState:{errors:u},watch:M,setValue:N,resetField:A,trigger:L}=iu({resolver:ou(z),mode:"onChange",defaultValues:o}),G=M(),se=$.useRef({});$.useEffect(()=>{const X=[];for(const ce of r){const te=ce.depends_on;te&&typeof ce.name=="string"&&X.push({dependentField:ce.name,dependencyName:te})}if(X.length!==0)for(const{dependentField:ce,dependencyName:te}of X){const he=se.current[te],g=G==null?void 0:G[te];if(he!==g)try{A(ce)}catch{}se.current[te]=g}},[r,G,A]);const me=$.useRef(i);$.useEffect(()=>{me.current=i},[i]);const ue=$.useMemo(()=>{try{return JSON.stringify(G)}catch{return String(Date.now())}},[G]),K=$.useRef(null);$.useEffect(()=>{me.current&&K.current!==ue&&(K.current=ue,me.current(G))},[ue]);const B=async()=>{if(!S)return!0;const X=r.filter(te=>te.step===w);for(const te of X)if(te.required){const he=G[te.name];let g=!0;if(te.type==="checkbox"?g=he===!0:Array.isArray(he)?g=he.length>0:g=he!=null&&he!=="",!g)return!1}return await L()?!0:Object.keys(u).filter(he=>X.some(g=>g.name===he)).map(he=>{const g=u[he];return typeof(g==null?void 0:g.message)=="string"?g.message:`${he} is invalid`}).length===0},H=$.useMemo(()=>{if(!S)return!0;const X=r.filter(te=>te.step===w);for(const te of X)if(te.required){const he=G[te.name];let g=!0;if(te.type==="checkbox"?g=he===!0:Array.isArray(he)?g=he.length>0:g=he!=null&&he!=="",!g)return!1}return Object.keys(u).filter(te=>X.some(he=>he.name===te)).length===0},[S,w,r,G,u]),de=$.useMemo(()=>{if(S)return H;for(const X of r)if(X.required){const ce=G[X.name];let te=!0;if(X.type==="checkbox"?te=ce===!0:te=ce!=null&&ce!==""&&!(Array.isArray(ce)&&ce.length===0),!te)return!1}return Object.keys(u).length===0},[S,H,r,G,u]),fe=async X=>{X<1||X>P||X>w&&S&&!await B()||b(X)},pe=async X=>{if(S&&w<P){console.warn("Form submission attempted on non-final step");return}s&&s(X),n(X)},ge=async X=>{X&&(X.preventDefault(),X.stopPropagation()),S&&w<P&&await B()&&fe(w+1)},q=X=>{X&&(X.preventDefault(),X.stopPropagation()),S&&w>1&&fe(w-1)},ee=X=>X.col?X.col:(X.xs||X.sm||X.md||X.lg||X.xl)&&(X.xs||X.sm||X.md||X.lg||X.xl)||12,ae=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:((He=t.typography)==null?void 0:He.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((Qe=t.typography)==null?void 0:Qe.fontSize)=="number"?t.typography.fontSize:14}}):void 0,oe=()=>{if(f&&f.buttons&&f.buttons.length>0){const X={...f,buttons:f.buttons.map(ce=>{const te=(ce.text||"").toLowerCase(),he=ce.type==="submit"||te.includes("submit")||te.includes("save")||te.includes("finish")||te.includes("complete"),g=te.includes("next");let E=!1;return S?(he||g)&&(E=!H):he&&(E=!de),{...ce,disabled:ce.disabled||E}})};return c.jsx(x.Box,{sx:{mt:3},children:c.jsx(gm,{config:X,onSubmit:pe,onStepChange:fe,currentStep:w,totalSteps:P,isMultiStep:S,formData:G})})}if(d&&d.length>0){const X=d.map(ce=>{const te=(ce.text||"").toLowerCase(),he=ce.type==="submit"||te.includes("submit")||te.includes("save")||te.includes("finish")||te.includes("complete"),g=te.includes("next");let E=!1;return S?(he||g)&&(E=!H):he&&(E=!de),{...ce,disabled:ce.disabled||E}});return c.jsx(Cc,{buttons:X})}return l?c.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:c.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[S&&w>1&&c.jsx(x.Button,{type:"button",variant:"outlined",onClick:q,children:"Previous"}),S?w<P?c.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!H,onClick:ge,children:"Next"}):c.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!H,children:a}):c.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!de,children:a})]})}):null},le=$.useCallback((X,ce)=>{const te=X.showWhen;if(te){if(typeof te=="function")try{return!!te(ce||{})}catch{return!0}if(te&&typeof te=="object"){const he=te.field,g=te.equals,E=te.in,j=he?(ce||{})[he]:void 0;if(he&&typeof g<"u")return j===g;if(he&&Array.isArray(E))return E.includes(j)}}return!0},[]),Se=$.useMemo(()=>{const X=[];let ce=[];for(const te of _)te.type==="section"&&ce.length>0?(X.push(ce),ce=[te]):ce.push(te);return ce.length>0&&X.push(ce),X},[_]),Q=c.jsxs(x.Box,{component:"form",onSubmit:X=>{if(S&&w<P){X.preventDefault(),X.stopPropagation(),H&&ge();return}D(pe)(X)},id:e,onKeyDown:X=>{X.key==="Enter"&&S&&w<P&&(X.preventDefault(),H&&ge())},children:[S&&c.jsx(Sc,{currentStep:w,totalSteps:P,onStepChange:fe,stepTitles:C==null?void 0:C.stepTitles,showStepTitles:(C==null?void 0:C.showStepTitles)!==!1}),Se.map((X,ce)=>{const te=X.find(U=>U.type==="section");if(te&&!le(te,G))return null;const he=(te==null?void 0:te.cardWrap)!==!1,g={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},E={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},j=c.jsx(c.Fragment,{children:X.map(U=>{if(!le(U,G))return null;const R=ee(U);return c.jsx(x.Box,{sx:{gridColumn:`span ${R}`},children:c.jsx(os,{field:U,control:F,errors:u,baseUrl:T,apiHeaders:h,formData:G,setValue:N})},U.name)})});return he?c.jsx(x.Card,{sx:{...g,...(te==null?void 0:te.cardSx)||{}},...(te==null?void 0:te.cardProps)||{},children:j},`group-${ce}`):c.jsx(x.Box,{sx:E,children:j},`group-${ce}`)}),oe()]}),De=p?c.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...m},...y,children:Q}):Q;return ae?c.jsx(x.ThemeProvider,{theme:ae,children:De}):De},wm=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>c.jsx(x.Box,{sx:{textAlign:"center"},children:c.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:s?"pointer":"default",...i},className:a,onClick:s,onError:o=>{o.currentTarget.src="/placeholder-image.png"}})});function Dr(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(f){try{d(n.next(f))}catch(p){s(p)}}function l(f){try{d(n.throw(f))}catch(p){s(p)}}function d(f){f.done?a(f.value):i(f.value).then(o,l)}d((n=n.apply(e,t||[])).next())})}const Sm=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 sn(e,t,r){const n=Cm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&_o(n,"path",a),_o(n,"relativePath",a),n}function Cm(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=Sm.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function _o(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Em=[".DS_Store","Thumbs.db"];function km(e){return Dr(this,void 0,void 0,function*(){return di(e)&&Tm(e.dataTransfer)?Am(e.dataTransfer,e.type):jm(e)?Om(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Fm(e):[]})}function Tm(e){return di(e)}function jm(e){return di(e)&&di(e.target)}function di(e){return typeof e=="object"&&e!==null}function Om(e){return _a(e.target.files).map(t=>sn(t))}function Fm(e){return Dr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>sn(r))})}function Am(e,t){return Dr(this,void 0,void 0,function*(){if(e.items){const r=_a(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(_m));return Ro(Ec(n))}return Ro(_a(e.files).map(r=>sn(r)))})}function Ro(e){return e.filter(t=>Em.indexOf(t.name)===-1)}function _a(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 _m(e){if(typeof e.webkitGetAsEntry!="function")return $o(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?kc(t):$o(e,t)}function Ec(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Ec(r):[r]],[])}function $o(e,t){return Dr(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const s=yield a.getFile();return s.handle=a,sn(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return sn(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Rm(e){return Dr(this,void 0,void 0,function*(){return e.isDirectory?kc(e):$m(e)})}function kc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(s=>Dr(this,void 0,void 0,function*(){if(s.length){const o=Promise.all(s.map(Rm));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function $m(e){return Dr(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=sn(n,e.fullPath);t(i)},n=>{r(n)})})})}var Nn={},Do;function Dm(){return Do||(Do=1,Nn.__esModule=!0,Nn.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(s){var o=s.trim().toLowerCase();return o.charAt(0)==="."?n.toLowerCase().endsWith(o):o.endsWith("/*")?a===o.replace(/\/.*$/,""):i===o})}return!0}),Nn}var Pm=Dm();const ea=qa(Pm);function Po(e){return zm(e)||Im(e)||jc(e)||Mm()}function Mm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
180
180
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Im(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zm(e){if(Array.isArray(e))return Ra(e)}function Mo(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 Io(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mo(Object(r),!0).forEach(function(n){Tc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bn(e,t){return Nm(e)||Bm(e,t)||jc(e,t)||Vm()}function Vm(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
181
181
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jc(e,t){if(e){if(typeof e=="string")return Ra(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 Ra(e,t)}}function Ra(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 Bm(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function Nm(e){if(Array.isArray(e))return e}var Lm=typeof ea=="function"?ea:ea.default,qm="file-invalid-type",Wm="file-too-large",Um="file-too-small",Hm="too-many-files",Km=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=t.split(","),n=r.length>1?"one of ".concat(r.join(", ")):r[0];return{code:qm,message:"File type must be ".concat(n)}},zo=function(t){return{code:Wm,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Vo=function(t){return{code:Um,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Gm={code:Hm,message:"Too many files"};function Oc(e,t){var r=e.type==="application/x-moz-file"||Lm(e,t);return[r,r?null:Km(t)]}function Fc(e,t,r){if(hr(e.size))if(hr(t)&&hr(r)){if(e.size>r)return[!1,zo(r)];if(e.size<t)return[!1,Vo(t)]}else{if(hr(t)&&e.size<t)return[!1,Vo(t)];if(hr(r)&&e.size>r)return[!1,zo(r)]}return[!0,null]}function hr(e){return e!=null}function Qm(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,s=e.maxFiles,o=e.validator;return!a&&t.length>1||a&&s>=1&&t.length>s?!1:t.every(function(l){var d=Oc(l,r),f=bn(d,1),p=f[0],m=Fc(l,n,i),y=bn(m,1),T=y[0],h=o?o(l):null;return p&&T&&!h})}function fi(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ln(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 Bo(e){e.preventDefault()}function Ym(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Zm(e){return e.indexOf("Edge/")!==-1}function Xm(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Ym(e)||Zm(e)}function _t(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return t.some(function(o){return!fi(n)&&o&&o.apply(void 0,[n].concat(a)),fi(n)})}}function Jm(){return"showOpenFilePicker"in window}function ey(e){if(hr(e)){var t=Object.entries(e).filter(function(r){var n=bn(r,2),i=n[0],a=n[1],s=!0;return Ac(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(a)||!a.every(_c))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(r,n){var i=bn(n,2),a=i[0],s=i[1];return Io(Io({},r),{},Tc({},a,s))},{});return[{description:"Files",accept:t}]}return e}function ty(e){if(hr(e))return Object.entries(e).reduce(function(t,r){var n=bn(r,2),i=n[0],a=n[1];return[].concat(Po(t),[i],Po(a))},[]).filter(function(t){return Ac(t)||_c(t)}).join(",")}function ry(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function ny(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Ac(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function _c(e){return/^.*\.[\w]+$/.test(e)}var iy=["children"],ay=["open"],sy=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],oy=["refKey","onChange","onClick"];function ly(e){return py(e)||uy(e)||Rc(e)||cy()}function cy(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
182
182
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uy(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function py(e){if(Array.isArray(e))return $a(e)}function ta(e,t){return hy(e)||fy(e,t)||Rc(e,t)||dy()}function dy(){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 Rc(e,t){if(e){if(typeof e=="string")return $a(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 $a(e,t)}}function $a(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 fy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function hy(e){if(Array.isArray(e))return e}function No(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 Ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?No(Object(r),!0).forEach(function(n){Da(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Da(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hi(e,t){if(e==null)return{};var r=my(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 my(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 us=$.forwardRef(function(e,t){var r=e.children,n=hi(e,iy),i=Dc(n),a=i.open,s=hi(i,ay);return $.useImperativeHandle(t,function(){return{open:a}},[a]),$.createElement($.Fragment,null,r(Ie(Ie({},s),{},{open:a})))});us.displayName="Dropzone";var $c={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};us.defaultProps=$c;us.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 Pa={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Dc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ie(Ie({},$c),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,l=t.maxFiles,d=t.onDragEnter,f=t.onDragLeave,p=t.onDragOver,m=t.onDrop,y=t.onDropAccepted,T=t.onDropRejected,h=t.onFileDialogCancel,C=t.onFileDialogOpen,v=t.useFsAccessApi,S=t.autoFocus,P=t.preventDropOnDocument,w=t.noClick,b=t.noKeyboard,_=t.noDrag,z=t.noDragEventsBubbling,F=t.onError,D=t.validator,u=$.useMemo(function(){return ty(r)},[r]),M=$.useMemo(function(){return ey(r)},[r]),N=$.useMemo(function(){return typeof C=="function"?C:Lo},[C]),A=$.useMemo(function(){return typeof h=="function"?h:Lo},[h]),L=$.useRef(null),Q=$.useRef(null),se=$.useReducer(yy,Pa),me=ta(se,2),ue=me[0],K=me[1],B=ue.isFocused,H=ue.isFileDialogActive,de=$.useRef(typeof window<"u"&&window.isSecureContext&&v&&Jm()),fe=function(){!de.current&&H&&setTimeout(function(){if(Q.current){var I=Q.current.files;I.length||(K({type:"closeDialog"}),A())}},300)};$.useEffect(function(){return window.addEventListener("focus",fe,!1),function(){window.removeEventListener("focus",fe,!1)}},[Q,H,A,de]);var pe=$.useRef([]),ge=function(I){L.current&&L.current.contains(I.target)||(I.preventDefault(),pe.current=[])};$.useEffect(function(){return P&&(document.addEventListener("dragover",Bo,!1),document.addEventListener("drop",ge,!1)),function(){P&&(document.removeEventListener("dragover",Bo),document.removeEventListener("drop",ge))}},[L,P]),$.useEffect(function(){return!n&&S&&L.current&&L.current.focus(),function(){}},[L,S,n]);var q=$.useCallback(function(R){F?F(R):console.error(R)},[F]),ee=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R),pe.current=[].concat(ly(pe.current),[R.target]),Ln(R)&&Promise.resolve(i(R)).then(function(I){if(!(fi(R)&&!z)){var Y=I.length,ie=Y>0&&Qm({files:I,accept:u,minSize:s,maxSize:a,multiple:o,maxFiles:l,validator:D}),W=Y>0&&!ie;K({isDragAccept:ie,isDragReject:W,isDragActive:!0,type:"setDraggedFiles"}),d&&d(R)}}).catch(function(I){return q(I)})},[i,d,q,z,u,s,a,o,l,D]),ae=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R);var I=Ln(R);if(I&&R.dataTransfer)try{R.dataTransfer.dropEffect="copy"}catch{}return I&&p&&p(R),!1},[p,z]),oe=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R);var I=pe.current.filter(function(ie){return L.current&&L.current.contains(ie)}),Y=I.indexOf(R.target);Y!==-1&&I.splice(Y,1),pe.current=I,!(I.length>0)&&(K({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ln(R)&&f&&f(R))},[L,f,z]),ce=$.useCallback(function(R,I){var Y=[],ie=[];R.forEach(function(W){var xe=Oc(W,u),Te=ta(xe,2),je=Te[0],Ve=Te[1],qe=Fc(W,s,a),Ze=ta(qe,2),Ft=Ze[0],nt=Ze[1],ut=D?D(W):null;if(je&&Ft&&!ut)Y.push(W);else{var Et=[Ve,nt];ut&&(Et=Et.concat(ut)),ie.push({file:W,errors:Et.filter(function(Fi){return Fi})})}}),(!o&&Y.length>1||o&&l>=1&&Y.length>l)&&(Y.forEach(function(W){ie.push({file:W,errors:[Gm]})}),Y.splice(0)),K({acceptedFiles:Y,fileRejections:ie,isDragReject:ie.length>0,type:"setFiles"}),m&&m(Y,ie,I),ie.length>0&&T&&T(ie,I),Y.length>0&&y&&y(Y,I)},[K,o,u,s,a,l,m,y,T,D]),Se=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R),pe.current=[],Ln(R)&&Promise.resolve(i(R)).then(function(I){fi(R)&&!z||ce(I,R)}).catch(function(I){return q(I)}),K({type:"reset"})},[i,ce,q,z]),G=$.useCallback(function(){if(de.current){K({type:"openDialog"}),N();var R={multiple:o,types:M};window.showOpenFilePicker(R).then(function(I){return i(I)}).then(function(I){ce(I,null),K({type:"closeDialog"})}).catch(function(I){ry(I)?(A(I),K({type:"closeDialog"})):ny(I)?(de.current=!1,Q.current?(Q.current.value=null,Q.current.click()):q(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."))):q(I)});return}Q.current&&(K({type:"openDialog"}),N(),Q.current.value=null,Q.current.click())},[K,N,A,v,ce,q,M,o]),De=$.useCallback(function(R){!L.current||!L.current.isEqualNode(R.target)||(R.key===" "||R.key==="Enter"||R.keyCode===32||R.keyCode===13)&&(R.preventDefault(),G())},[L,G]),He=$.useCallback(function(){K({type:"focus"})},[]),Qe=$.useCallback(function(){K({type:"blur"})},[]),X=$.useCallback(function(){w||(Xm()?setTimeout(G,0):G())},[w,G]),le=function(I){return n?null:I},te=function(I){return b?null:le(I)},he=function(I){return _?null:le(I)},g=function(I){z&&I.stopPropagation()},E=$.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=R.refKey,Y=I===void 0?"ref":I,ie=R.role,W=R.onKeyDown,xe=R.onFocus,Te=R.onBlur,je=R.onClick,Ve=R.onDragEnter,qe=R.onDragOver,Ze=R.onDragLeave,Ft=R.onDrop,nt=hi(R,sy);return Ie(Ie(Da({onKeyDown:te(_t(W,De)),onFocus:te(_t(xe,He)),onBlur:te(_t(Te,Qe)),onClick:le(_t(je,X)),onDragEnter:he(_t(Ve,ee)),onDragOver:he(_t(qe,ae)),onDragLeave:he(_t(Ze,oe)),onDrop:he(_t(Ft,Se)),role:typeof ie=="string"&&ie!==""?ie:"presentation"},Y,L),!n&&!b?{tabIndex:0}:{}),nt)}},[L,De,He,Qe,X,ee,ae,oe,Se,b,_,n]),j=$.useCallback(function(R){R.stopPropagation()},[]),U=$.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=R.refKey,Y=I===void 0?"ref":I,ie=R.onChange,W=R.onClick,xe=hi(R,oy),Te=Da({accept:u,multiple:o,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:le(_t(ie,Se)),onClick:le(_t(W,j)),tabIndex:-1},Y,Q);return Ie(Ie({},Te),xe)}},[Q,r,o,Se,n]);return Ie(Ie({},ue),{},{isFocused:B&&!n,getRootProps:E,getInputProps:U,rootRef:L,inputRef:Q,open:le(G)})}function yy(e,t){switch(t.type){case"focus":return Ie(Ie({},e),{},{isFocused:!0});case"blur":return Ie(Ie({},e),{},{isFocused:!1});case"openDialog":return Ie(Ie({},Pa),{},{isFileDialogActive:!0});case"closeDialog":return Ie(Ie({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ie(Ie({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ie(Ie({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Ie({},Pa);default:return e}}function Lo(){}const gy=yt(c.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"),xy=yt(c.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"),qo=yt(c.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"),vy=yt(c.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"),Pc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?c.jsx(vy,{}):e.file.type.includes("pdf")?c.jsx(qo,{}):c.jsx(qo,{}),n=()=>{switch(e.status){case"success":return c.jsx(gy,{color:"success"});case"uploading":return c.jsx(x.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],l=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,l)).toFixed(2))+" "+o[l]};return c.jsxs(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),c.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[c.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),c.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),c.jsx(x.Tooltip,{title:"Remove file",children:c.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:c.jsx(xy,{})})})]})},by=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s,title:o,subtitle:l,buttonText:d,fileSupportedText:f})=>{const[p,m]=$.useState(t),[y,T]=$.useState([]),[h,C]=$.useState(!1),[v,S]=$.useState(!1),[P,w]=$.useState([]),b=$.useRef(null);$.useEffect(()=>{m(t)},[t]);const _=$.useCallback(L=>{var se,me;return((se=e==null?void 0:e.fileTypes)==null?void 0:se.some(ue=>{if(ue.includes("*")){const K=ue.split("/")[0];return L.type.startsWith(K)}return L.type===ue}))?e!=null&&e.maxSize&&L.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${L.type} is not allowed. Allowed types: ${(me=e==null?void 0:e.fileTypes)==null?void 0:me.join(", ")}`},[e]),z=$.useCallback(async L=>{console.log("handleFiles called with:",L.length,"files"),C(!0);const Q=[],se=[];try{for(const ue of L){let K=null;if(e!=null&&e.multiple&&p.some(H=>H.file.name===ue.name&&H.file.size===ue.size&&H.file.lastModified===ue.lastModified)){se.push(`${ue.name}: File already exists`);continue}if(K=_(ue),!K&&(e!=null&&e.customValidation))try{const B=e.customValidation(ue);B instanceof Promise?K=await B:K=B}catch(B){K=`Custom validation failed: ${B instanceof Error?B.message:"Unknown error"}`}if(K)se.push(`${ue.name}: ${K}`);else{const B={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:ue,preview:ue.type.startsWith("image/")?URL.createObjectURL(ue):void 0,progress:0,status:"pending",uploadedAt:new Date};Q.push(B)}}const me=e!=null&&e.multiple?[...p,...Q]:Q;m(me),r==null||r(me),se.length>0?(w(se),T(se)):(w([]),T([]))}catch(me){const ue=`Unexpected error: ${me instanceof Error?me.message:"Unknown error"}`;w([ue]),T([ue])}},[p,e==null?void 0:e.multiple,_,e==null?void 0:e.customValidation,r]),F=$.useCallback(L=>{C(!0);const Q=p.filter(se=>se.id!==L);m(Q),r==null||r(Q),w([]),b.current&&(b.current.value="")},[p,r]),D=$.useCallback(()=>{if(e!=null&&e.required&&p.length===0){T([`${e.title} is required`]);return}w([]),S(!0);const L=p.filter(Q=>Q.status!=="error");n==null||n(L)},[p,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:u,getInputProps:M,isDragActive:N}=Dc({onDrop:z,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});$.useEffect(()=>{if(!h)return;const L=[],Q=[...P,...L];Q.length>0?T(Q):T([])},[p,e==null?void 0:e.required,e==null?void 0:e.title,h,v,P]);const A=()=>{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 c.jsxs(x.Box,{className:a,style:s,children:[c.jsxs(x.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&c.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&c.jsx(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),$.createElement(x.Card,{...u(),key:`dropzone-${p.length}`,sx:{border:"1px dashed",borderColor:N?"primary.main":"#CCCCCC",backgroundColor:N?"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"}}},c.jsx("input",{...M(),ref:b}),c.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:c.jsx(oi,{sx:{width:36,height:36,color:"primary.main"}})}),c.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:o}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:l}),c.jsx(x.Button,{onClick:()=>{var L;return(L=b.current)==null?void 0:L.click()},sx:{my:2},startIcon:c.jsx(oi,{}),variant:"contained",children:d}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:f})),y.length>0&&c.jsx(x.Alert,{severity:"error",sx:{mt:2},children:y.map((L,Q)=>c.jsx(x.Typography,{variant:"body2",children:L},Q))}),p.length>0&&c.jsxs(x.Box,{sx:{mt:2},children:[c.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",p.length,")"]}),p.map(L=>c.jsx(Pc,{file:L,onRemove:F},L.id))]}),(e==null?void 0:e.helperText)&&c.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&c.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:A()},children:c.jsx(x.Button,{variant:"contained",onClick:D,disabled:i||e.submitButton.disabled||p.length===0,startIcon:e.submitButton.loading?c.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Cc;exports.DocumentUpload=by;exports.FieldRenderer=os;exports.FilePreview=Pc;exports.FinAutocomplete=Yl;exports.FinCheckbox=Tr;exports.FinCheckboxGroup=Zl;exports.FinChip=ec;exports.FinCustomizedVerticalStepper=$h;exports.FinDateField=as;exports.FinDragDropList=Fh;exports.FinEditableGrid=rc;exports.FinForm=vm;exports.FinInfoCard=Ph;exports.FinListCards=nc;exports.FinRadioGroup=ja;exports.FinSelect=is;exports.FinSwitch=ci;exports.FinTabs=tc;exports.FinTextField=li;exports.FinTextarea=Xl;exports.FinUiHeader=Jl;exports.FinVerticalStepper=_h;exports.ImageComponent=wm;exports.StepNavigation=Sc;exports.brand=Th;exports.fetchApiData=ic;exports.finflowPalette=J;exports.generateSchema=wc;exports.getApiConfig=ss;exports.hasApiConfig=fr;exports.neutral=lt;exports.primary=Eh;exports.secondary=kh;exports.shouldShowField=Ih;exports.useApiData=ac;
|
|
183
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rc(e,t){if(e){if(typeof e=="string")return $a(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 $a(e,t)}}function $a(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 fy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function hy(e){if(Array.isArray(e))return e}function No(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 Ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?No(Object(r),!0).forEach(function(n){Da(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Da(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hi(e,t){if(e==null)return{};var r=my(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 my(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 us=$.forwardRef(function(e,t){var r=e.children,n=hi(e,iy),i=Dc(n),a=i.open,s=hi(i,ay);return $.useImperativeHandle(t,function(){return{open:a}},[a]),$.createElement($.Fragment,null,r(Ie(Ie({},s),{},{open:a})))});us.displayName="Dropzone";var $c={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};us.defaultProps=$c;us.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 Pa={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Dc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ie(Ie({},$c),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,l=t.maxFiles,d=t.onDragEnter,f=t.onDragLeave,p=t.onDragOver,m=t.onDrop,y=t.onDropAccepted,T=t.onDropRejected,h=t.onFileDialogCancel,C=t.onFileDialogOpen,v=t.useFsAccessApi,S=t.autoFocus,P=t.preventDropOnDocument,w=t.noClick,b=t.noKeyboard,_=t.noDrag,z=t.noDragEventsBubbling,F=t.onError,D=t.validator,u=$.useMemo(function(){return ty(r)},[r]),M=$.useMemo(function(){return ey(r)},[r]),N=$.useMemo(function(){return typeof C=="function"?C:Lo},[C]),A=$.useMemo(function(){return typeof h=="function"?h:Lo},[h]),L=$.useRef(null),G=$.useRef(null),se=$.useReducer(yy,Pa),me=ta(se,2),ue=me[0],K=me[1],B=ue.isFocused,H=ue.isFileDialogActive,de=$.useRef(typeof window<"u"&&window.isSecureContext&&v&&Jm()),fe=function(){!de.current&&H&&setTimeout(function(){if(G.current){var I=G.current.files;I.length||(K({type:"closeDialog"}),A())}},300)};$.useEffect(function(){return window.addEventListener("focus",fe,!1),function(){window.removeEventListener("focus",fe,!1)}},[G,H,A,de]);var pe=$.useRef([]),ge=function(I){L.current&&L.current.contains(I.target)||(I.preventDefault(),pe.current=[])};$.useEffect(function(){return P&&(document.addEventListener("dragover",Bo,!1),document.addEventListener("drop",ge,!1)),function(){P&&(document.removeEventListener("dragover",Bo),document.removeEventListener("drop",ge))}},[L,P]),$.useEffect(function(){return!n&&S&&L.current&&L.current.focus(),function(){}},[L,S,n]);var q=$.useCallback(function(R){F?F(R):console.error(R)},[F]),ee=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R),pe.current=[].concat(ly(pe.current),[R.target]),Ln(R)&&Promise.resolve(i(R)).then(function(I){if(!(fi(R)&&!z)){var Y=I.length,ie=Y>0&&Qm({files:I,accept:u,minSize:s,maxSize:a,multiple:o,maxFiles:l,validator:D}),W=Y>0&&!ie;K({isDragAccept:ie,isDragReject:W,isDragActive:!0,type:"setDraggedFiles"}),d&&d(R)}}).catch(function(I){return q(I)})},[i,d,q,z,u,s,a,o,l,D]),ae=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R);var I=Ln(R);if(I&&R.dataTransfer)try{R.dataTransfer.dropEffect="copy"}catch{}return I&&p&&p(R),!1},[p,z]),oe=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R);var I=pe.current.filter(function(ie){return L.current&&L.current.contains(ie)}),Y=I.indexOf(R.target);Y!==-1&&I.splice(Y,1),pe.current=I,!(I.length>0)&&(K({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ln(R)&&f&&f(R))},[L,f,z]),le=$.useCallback(function(R,I){var Y=[],ie=[];R.forEach(function(W){var xe=Oc(W,u),Te=ta(xe,2),je=Te[0],Ve=Te[1],qe=Fc(W,s,a),Ze=ta(qe,2),Ft=Ze[0],nt=Ze[1],ut=D?D(W):null;if(je&&Ft&&!ut)Y.push(W);else{var Et=[Ve,nt];ut&&(Et=Et.concat(ut)),ie.push({file:W,errors:Et.filter(function(Fi){return Fi})})}}),(!o&&Y.length>1||o&&l>=1&&Y.length>l)&&(Y.forEach(function(W){ie.push({file:W,errors:[Gm]})}),Y.splice(0)),K({acceptedFiles:Y,fileRejections:ie,isDragReject:ie.length>0,type:"setFiles"}),m&&m(Y,ie,I),ie.length>0&&T&&T(ie,I),Y.length>0&&y&&y(Y,I)},[K,o,u,s,a,l,m,y,T,D]),Se=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R),pe.current=[],Ln(R)&&Promise.resolve(i(R)).then(function(I){fi(R)&&!z||le(I,R)}).catch(function(I){return q(I)}),K({type:"reset"})},[i,le,q,z]),Q=$.useCallback(function(){if(de.current){K({type:"openDialog"}),N();var R={multiple:o,types:M};window.showOpenFilePicker(R).then(function(I){return i(I)}).then(function(I){le(I,null),K({type:"closeDialog"})}).catch(function(I){ry(I)?(A(I),K({type:"closeDialog"})):ny(I)?(de.current=!1,G.current?(G.current.value=null,G.current.click()):q(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."))):q(I)});return}G.current&&(K({type:"openDialog"}),N(),G.current.value=null,G.current.click())},[K,N,A,v,le,q,M,o]),De=$.useCallback(function(R){!L.current||!L.current.isEqualNode(R.target)||(R.key===" "||R.key==="Enter"||R.keyCode===32||R.keyCode===13)&&(R.preventDefault(),Q())},[L,Q]),He=$.useCallback(function(){K({type:"focus"})},[]),Qe=$.useCallback(function(){K({type:"blur"})},[]),X=$.useCallback(function(){w||(Xm()?setTimeout(Q,0):Q())},[w,Q]),ce=function(I){return n?null:I},te=function(I){return b?null:ce(I)},he=function(I){return _?null:ce(I)},g=function(I){z&&I.stopPropagation()},E=$.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=R.refKey,Y=I===void 0?"ref":I,ie=R.role,W=R.onKeyDown,xe=R.onFocus,Te=R.onBlur,je=R.onClick,Ve=R.onDragEnter,qe=R.onDragOver,Ze=R.onDragLeave,Ft=R.onDrop,nt=hi(R,sy);return Ie(Ie(Da({onKeyDown:te(_t(W,De)),onFocus:te(_t(xe,He)),onBlur:te(_t(Te,Qe)),onClick:ce(_t(je,X)),onDragEnter:he(_t(Ve,ee)),onDragOver:he(_t(qe,ae)),onDragLeave:he(_t(Ze,oe)),onDrop:he(_t(Ft,Se)),role:typeof ie=="string"&&ie!==""?ie:"presentation"},Y,L),!n&&!b?{tabIndex:0}:{}),nt)}},[L,De,He,Qe,X,ee,ae,oe,Se,b,_,n]),j=$.useCallback(function(R){R.stopPropagation()},[]),U=$.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=R.refKey,Y=I===void 0?"ref":I,ie=R.onChange,W=R.onClick,xe=hi(R,oy),Te=Da({accept:u,multiple:o,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:ce(_t(ie,Se)),onClick:ce(_t(W,j)),tabIndex:-1},Y,G);return Ie(Ie({},Te),xe)}},[G,r,o,Se,n]);return Ie(Ie({},ue),{},{isFocused:B&&!n,getRootProps:E,getInputProps:U,rootRef:L,inputRef:G,open:ce(Q)})}function yy(e,t){switch(t.type){case"focus":return Ie(Ie({},e),{},{isFocused:!0});case"blur":return Ie(Ie({},e),{},{isFocused:!1});case"openDialog":return Ie(Ie({},Pa),{},{isFileDialogActive:!0});case"closeDialog":return Ie(Ie({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ie(Ie({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ie(Ie({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Ie({},Pa);default:return e}}function Lo(){}const gy=yt(c.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"),xy=yt(c.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"),qo=yt(c.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"),vy=yt(c.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"),Pc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?c.jsx(vy,{}):e.file.type.includes("pdf")?c.jsx(qo,{}):c.jsx(qo,{}),n=()=>{switch(e.status){case"success":return c.jsx(gy,{color:"success"});case"uploading":return c.jsx(x.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],l=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,l)).toFixed(2))+" "+o[l]};return c.jsxs(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),c.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[c.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),c.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),c.jsx(x.Tooltip,{title:"Remove file",children:c.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:c.jsx(xy,{})})})]})},by=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s,title:o,subtitle:l,buttonText:d,fileSupportedText:f})=>{const[p,m]=$.useState(t),[y,T]=$.useState([]),[h,C]=$.useState(!1),[v,S]=$.useState(!1),[P,w]=$.useState([]),b=$.useRef(null);$.useEffect(()=>{m(t)},[t]);const _=$.useCallback(L=>{var se,me;return((se=e==null?void 0:e.fileTypes)==null?void 0:se.some(ue=>{if(ue.includes("*")){const K=ue.split("/")[0];return L.type.startsWith(K)}return L.type===ue}))?e!=null&&e.maxSize&&L.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${L.type} is not allowed. Allowed types: ${(me=e==null?void 0:e.fileTypes)==null?void 0:me.join(", ")}`},[e]),z=$.useCallback(async L=>{console.log("handleFiles called with:",L.length,"files"),C(!0);const G=[],se=[];try{for(const ue of L){let K=null;if(e!=null&&e.multiple&&p.some(H=>H.file.name===ue.name&&H.file.size===ue.size&&H.file.lastModified===ue.lastModified)){se.push(`${ue.name}: File already exists`);continue}if(K=_(ue),!K&&(e!=null&&e.customValidation))try{const B=e.customValidation(ue);B instanceof Promise?K=await B:K=B}catch(B){K=`Custom validation failed: ${B instanceof Error?B.message:"Unknown error"}`}if(K)se.push(`${ue.name}: ${K}`);else{const B={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:ue,preview:ue.type.startsWith("image/")?URL.createObjectURL(ue):void 0,progress:0,status:"pending",uploadedAt:new Date};G.push(B)}}const me=e!=null&&e.multiple?[...p,...G]:G;m(me),r==null||r(me),se.length>0?(w(se),T(se)):(w([]),T([]))}catch(me){const ue=`Unexpected error: ${me instanceof Error?me.message:"Unknown error"}`;w([ue]),T([ue])}},[p,e==null?void 0:e.multiple,_,e==null?void 0:e.customValidation,r]),F=$.useCallback(L=>{C(!0);const G=p.filter(se=>se.id!==L);m(G),r==null||r(G),w([]),b.current&&(b.current.value="")},[p,r]),D=$.useCallback(()=>{if(e!=null&&e.required&&p.length===0){T([`${e.title} is required`]);return}w([]),S(!0);const L=p.filter(G=>G.status!=="error");n==null||n(L)},[p,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:u,getInputProps:M,isDragActive:N}=Dc({onDrop:z,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});$.useEffect(()=>{if(!h)return;const L=[],G=[...P,...L];G.length>0?T(G):T([])},[p,e==null?void 0:e.required,e==null?void 0:e.title,h,v,P]);const A=()=>{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 c.jsxs(x.Box,{className:a,style:s,children:[c.jsxs(x.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&c.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&c.jsx(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),$.createElement(x.Card,{...u(),key:`dropzone-${p.length}`,sx:{border:"1px dashed",borderColor:N?"primary.main":"#CCCCCC",backgroundColor:N?"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"}}},c.jsx("input",{...M(),ref:b}),c.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:c.jsx(oi,{sx:{width:36,height:36,color:"primary.main"}})}),c.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:o}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:l}),c.jsx(x.Button,{onClick:()=>{var L;return(L=b.current)==null?void 0:L.click()},sx:{my:2},startIcon:c.jsx(oi,{}),variant:"contained",children:d}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:f})),y.length>0&&c.jsx(x.Alert,{severity:"error",sx:{mt:2},children:y.map((L,G)=>c.jsx(x.Typography,{variant:"body2",children:L},G))}),p.length>0&&c.jsxs(x.Box,{sx:{mt:2},children:[c.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",p.length,")"]}),p.map(L=>c.jsx(Pc,{file:L,onRemove:F},L.id))]}),(e==null?void 0:e.helperText)&&c.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&c.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:A()},children:c.jsx(x.Button,{variant:"contained",onClick:D,disabled:i||e.submitButton.disabled||p.length===0,startIcon:e.submitButton.loading?c.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Cc;exports.DocumentUpload=by;exports.FieldRenderer=os;exports.FilePreview=Pc;exports.FinAutocomplete=Yl;exports.FinCheckbox=Tr;exports.FinCheckboxGroup=Zl;exports.FinChip=ec;exports.FinCustomizedVerticalStepper=$h;exports.FinDateField=as;exports.FinDragDropList=Fh;exports.FinEditableGrid=rc;exports.FinForm=vm;exports.FinInfoCard=Ph;exports.FinListCards=nc;exports.FinRadioGroup=ja;exports.FinSelect=is;exports.FinSwitch=ci;exports.FinTabs=tc;exports.FinTextField=li;exports.FinTextarea=Xl;exports.FinUiHeader=Jl;exports.FinVerticalStepper=_h;exports.ImageComponent=wm;exports.StepNavigation=Sc;exports.brand=Th;exports.fetchApiData=ic;exports.finflowPalette=J;exports.generateSchema=wc;exports.getApiConfig=ss;exports.hasApiConfig=fr;exports.neutral=lt;exports.primary=Eh;exports.secondary=kh;exports.shouldShowField=Ih;exports.useApiData=ac;
|