finform-react-builder 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- "use strict";var Wl=Object.defineProperty;var _a=e=>{throw TypeError(e)};var Ul=(e,t,n)=>t in e?Wl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Qn=(e,t,n)=>Ul(e,typeof t!="symbol"?t+"":t,n),ui=(e,t,n)=>t.has(e)||_a("Cannot "+n);var C=(e,t,n)=>(ui(e,t,"read from private field"),n?n.call(e):t.get(e)),ue=(e,t,n)=>t.has(e)?_a("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),X=(e,t,n,r)=>(ui(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ye=(e,t,n)=>(ui(e,t,"access private method"),n);var gr=(e,t,n,r)=>({set _(i){X(e,t,i,n)},get _(){return C(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),I=require("react"),Ee=require("react-hook-form"),Da=require("@hookform/resolvers"),x=require("@mui/material"),Hl=require("@emotion/styled"),Xt=require("@emotion/react"),Yl=require("@mui/x-date-pickers/DatePicker"),$n=require("dayjs"),Kl=require("dayjs/plugin/customParseFormat");function Ql(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const J=Ql(I);function Gl(e,t,n){return n===void 0&&(n={}),function(r,i,a){try{return Promise.resolve(function(o,s){try{var c=(t!=null&&t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[n.mode==="sync"?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:i}))).then(function(u){return a.shouldUseNativeValidation&&Da.validateFieldsNatively({},a),{values:n.raw?Object.assign({},r):u,errors:{}}}))}catch(u){return s(u)}return c&&c.then?c.then(void 0,s):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:Da.toNestErrors((s=o,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(s.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),c){var m=u[f.path].types,h=m&&m[f.type];u[f.path]=Ee.appendErrors(f.path,c,u,f.type,h?[].concat(h,f.message):f.message)}return u},{})),a)};var s,c}))}catch(o){return Promise.reject(o)}}}var pr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},yn=typeof window>"u"||"Deno"in globalThis;function Ze(){}function Zl(e,t){return typeof e=="function"?e(t):e}function Fi(e){return typeof e=="number"&&e>=0&&e!==1/0}function fs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Kt(e,t){return typeof e=="function"?e(t):e}function pt(e,t){return typeof e=="function"?e(t):e}function Ia(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==aa(o,t.options))return!1}else if(!ir(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ma(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(rr(t.options.mutationKey)!==rr(a))return!1}else if(!ir(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function aa(e,t){return((t==null?void 0:t.queryKeyHashFn)||rr)(e)}function rr(e){return JSON.stringify(e,(t,n)=>Ri(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ir(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ir(e[n],t[n])):!1}function Ai(e,t){if(e===t)return e;const n=za(e)&&za(t);if(n||Ri(e)&&Ri(t)){const r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),o=a.length,s=n?[]:{},c=new Set(r);let u=0;for(let f=0;f<o;f++){const m=n?f:a[f];(!n&&c.has(m)||n)&&e[m]===void 0&&t[m]===void 0?(s[m]=void 0,u++):(s[m]=Ai(e[m],t[m]),s[m]===e[m]&&e[m]!==void 0&&u++)}return i===o&&u===i?e:s}return t}function $i(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function za(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ri(e){if(!Ba(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ba(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ba(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xl(e){return new Promise(t=>{setTimeout(t,e)})}function Pi(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Ai(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Ai(e,t)}return t}function Jl(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ec(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Dr=Symbol();function hs(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Dr&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Dr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function tc(e,t){return typeof e=="function"?e(...t):!!e}var ln,Bt,_n,is,nc=(is=class extends pr{constructor(){super();ue(this,ln);ue(this,Bt);ue(this,_n);X(this,_n,t=>{if(!yn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,Bt)||this.setEventListener(C(this,_n))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Bt))==null||t.call(this),X(this,Bt,void 0))}setEventListener(t){var n;X(this,_n,t),(n=C(this,Bt))==null||n.call(this),X(this,Bt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,ln)!==t&&(X(this,ln,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,ln)=="boolean"?C(this,ln):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ln=new WeakMap,Bt=new WeakMap,_n=new WeakMap,is),oa=new nc,Dn,Nt,In,as,rc=(as=class extends pr{constructor(){super();ue(this,Dn,!0);ue(this,Nt);ue(this,In);X(this,In,t=>{if(!yn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,Nt)||this.setEventListener(C(this,In))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Nt))==null||t.call(this),X(this,Nt,void 0))}setEventListener(t){var n;X(this,In,t),(n=C(this,Nt))==null||n.call(this),X(this,Nt,t(this.setOnline.bind(this)))}setOnline(t){C(this,Dn)!==t&&(X(this,Dn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,Dn)}},Dn=new WeakMap,Nt=new WeakMap,In=new WeakMap,as),Ir=new rc;function _i(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function ic(e){return Math.min(1e3*2**e,3e4)}function ms(e){return(e??"online")==="online"?Ir.isOnline():!0}var xs=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function pi(e){return e instanceof xs}function gs(e){let t=!1,n=0,r=!1,i;const a=_i(),o=d=>{var E;r||(h(new xs(d)),(E=e.abort)==null||E.call(e))},s=()=>{t=!0},c=()=>{t=!1},u=()=>oa.isFocused()&&(e.networkMode==="always"||Ir.isOnline())&&e.canRun(),f=()=>ms(e.networkMode)&&e.canRun(),m=d=>{var E;r||(r=!0,(E=e.onSuccess)==null||E.call(e,d),i==null||i(),a.resolve(d))},h=d=>{var E;r||(r=!0,(E=e.onError)==null||E.call(e,d),i==null||i(),a.reject(d))},g=()=>new Promise(d=>{var E;i=y=>{(r||u())&&d(y)},(E=e.onPause)==null||E.call(e)}).then(()=>{var d;i=void 0,r||(d=e.onContinue)==null||d.call(e)}),w=()=>{if(r)return;let d;const E=n===0?e.initialPromise:void 0;try{d=E??e.fn()}catch(y){d=Promise.reject(y)}Promise.resolve(d).then(m).catch(y=>{var _;if(r)return;const j=e.retry??(yn?0:3),k=e.retryDelay??ic,v=typeof k=="function"?k(n,y):k,S=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,y);if(t||!S){h(y);return}n++,(_=e.onFail)==null||_.call(e,n,y),Xl(v).then(()=>u()?void 0:g()).then(()=>{t?h(y):w()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:c,canStart:f,start:()=>(f()?w():g().then(w),a)}}var ac=e=>setTimeout(e,0);function oc(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=ac;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(c=>{n(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||o()}return c},batchCalls:s=>(...c)=>{a(()=>{s(...c)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ne=oc(),cn,os,ys=(os=class{constructor(){ue(this,cn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fi(this.gcTime)&&X(this,cn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(yn?1/0:5*60*1e3))}clearGcTimeout(){C(this,cn)&&(clearTimeout(C(this,cn)),X(this,cn,void 0))}},cn=new WeakMap,os),Mn,un,ut,pn,Le,sr,dn,xt,Rt,ss,sc=(ss=class extends ys{constructor(t){super();ue(this,xt);ue(this,Mn);ue(this,un);ue(this,ut);ue(this,pn);ue(this,Le);ue(this,sr);ue(this,dn);X(this,dn,!1),X(this,sr,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,pn,t.client),X(this,ut,C(this,pn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,Mn,lc(this.options)),this.state=t.state??C(this,Mn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,Le))==null?void 0:t.promise}setOptions(t){this.options={...C(this,sr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,ut).remove(this)}setData(t,n){const r=Pi(this.state.data,t,this.options);return ye(this,xt,Rt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ye(this,xt,Rt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=C(this,Le))==null?void 0:r.promise;return(i=C(this,Le))==null||i.cancel(t),n?n.then(Ze).catch(Ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Mn))}isActive(){return this.observers.some(t=>pt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Kt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!fs(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,Le))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,Le))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,Le)&&(C(this,dn)?C(this,Le).cancel({revert:!0}):C(this,Le).cancelRetry()),this.scheduleGc()),C(this,ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ye(this,xt,Rt).call(this,{type:"invalidate"})}fetch(t,n){var u,f,m;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,Le))return C(this,Le).continueRetry(),C(this,Le).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(X(this,dn,!0),r.signal)})},a=()=>{const h=hs(this.options,n),w=(()=>{const d={client:C(this,pn),queryKey:this.queryKey,meta:this.meta};return i(d),d})();return X(this,dn,!1),this.options.persister?this.options.persister(h,w,this):h(w)},s=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,pn),state:this.state,fetchFn:a};return i(h),h})();(u=this.options.behavior)==null||u.onFetch(s,this),X(this,un,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=s.fetchOptions)==null?void 0:f.meta))&&ye(this,xt,Rt).call(this,{type:"fetch",meta:(m=s.fetchOptions)==null?void 0:m.meta});const c=h=>{var g,w,d,E;pi(h)&&h.silent||ye(this,xt,Rt).call(this,{type:"error",error:h}),pi(h)||((w=(g=C(this,ut).config).onError)==null||w.call(g,h,this),(E=(d=C(this,ut).config).onSettled)==null||E.call(d,this.state.data,h,this)),this.scheduleGc()};return X(this,Le,gs({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var g,w,d,E;if(h===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(y){c(y);return}(w=(g=C(this,ut).config).onSuccess)==null||w.call(g,h,this),(E=(d=C(this,ut).config).onSettled)==null||E.call(d,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,g)=>{ye(this,xt,Rt).call(this,{type:"failed",failureCount:h,error:g})},onPause:()=>{ye(this,xt,Rt).call(this,{type:"pause"})},onContinue:()=>{ye(this,xt,Rt).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),C(this,Le).start()}},Mn=new WeakMap,un=new WeakMap,ut=new WeakMap,pn=new WeakMap,Le=new WeakMap,sr=new WeakMap,dn=new WeakMap,xt=new WeakSet,Rt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...vs(r.data,this.options),fetchMeta:t.meta??null};case"success":return X(this,un,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return pi(i)&&i.revert&&C(this,un)?{...C(this,un),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ne.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,ut).notify({query:this,type:"updated",action:t})})},ss);function vs(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ms(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lc(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var St,ls,cc=(ls=class extends pr{constructor(t={}){super();ue(this,St);this.config=t,X(this,St,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??aa(i,n);let o=this.get(a);return o||(o=new sc({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){C(this,St).has(t.queryHash)||(C(this,St).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,St).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,St).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ne.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,St).get(t)}getAll(){return[...C(this,St).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ia(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Ia(t,r)):n}notify(t){Ne.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ne.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ne.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},St=new WeakMap,ls),Ct,We,fn,Tt,Mt,cs,uc=(cs=class extends ys{constructor(t){super();ue(this,Tt);ue(this,Ct);ue(this,We);ue(this,fn);this.mutationId=t.mutationId,X(this,We,t.mutationCache),X(this,Ct,[]),this.state=t.state||pc(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Ct).includes(t)||(C(this,Ct).push(t),this.clearGcTimeout(),C(this,We).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,Ct,C(this,Ct).filter(n=>n!==t)),this.scheduleGc(),C(this,We).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Ct).length||(this.state.status==="pending"?this.scheduleGc():C(this,We).remove(this))}continue(){var t;return((t=C(this,fn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,c,u,f,m,h,g,w,d,E,y,j,k,v,S,_,M,B;const n=()=>{ye(this,Tt,Mt).call(this,{type:"continue"})};X(this,fn,gs({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(q,p)=>{ye(this,Tt,Mt).call(this,{type:"failed",failureCount:q,error:p})},onPause:()=>{ye(this,Tt,Mt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,We).canRun(this)}));const r=this.state.status==="pending",i=!C(this,fn).canStart();try{if(r)n();else{ye(this,Tt,Mt).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=C(this,We).config).onMutate)==null?void 0:o.call(a,t,this));const p=await((c=(s=this.options).onMutate)==null?void 0:c.call(s,t));p!==this.state.context&&ye(this,Tt,Mt).call(this,{type:"pending",context:p,variables:t,isPaused:i})}const q=await C(this,fn).start();return await((f=(u=C(this,We).config).onSuccess)==null?void 0:f.call(u,q,t,this.state.context,this)),await((h=(m=this.options).onSuccess)==null?void 0:h.call(m,q,t,this.state.context)),await((w=(g=C(this,We).config).onSettled)==null?void 0:w.call(g,q,null,this.state.variables,this.state.context,this)),await((E=(d=this.options).onSettled)==null?void 0:E.call(d,q,null,t,this.state.context)),ye(this,Tt,Mt).call(this,{type:"success",data:q}),q}catch(q){try{throw await((j=(y=C(this,We).config).onError)==null?void 0:j.call(y,q,t,this.state.context,this)),await((v=(k=this.options).onError)==null?void 0:v.call(k,q,t,this.state.context)),await((_=(S=C(this,We).config).onSettled)==null?void 0:_.call(S,void 0,q,this.state.variables,this.state.context,this)),await((B=(M=this.options).onSettled)==null?void 0:B.call(M,void 0,q,t,this.state.context)),q}finally{ye(this,Tt,Mt).call(this,{type:"error",error:q})}}finally{C(this,We).runNext(this)}}},Ct=new WeakMap,We=new WeakMap,fn=new WeakMap,Tt=new WeakSet,Mt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ne.batch(()=>{C(this,Ct).forEach(r=>{r.onMutationUpdate(t)}),C(this,We).notify({mutation:this,type:"updated",action:t})})},cs);function pc(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pt,gt,lr,us,dc=(us=class extends pr{constructor(t={}){super();ue(this,Pt);ue(this,gt);ue(this,lr);this.config=t,X(this,Pt,new Set),X(this,gt,new Map),X(this,lr,0)}build(t,n,r){const i=new uc({mutationCache:this,mutationId:++gr(this,lr)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){C(this,Pt).add(t);const n=yr(t);if(typeof n=="string"){const r=C(this,gt).get(n);r?r.push(t):C(this,gt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,Pt).delete(t)){const n=yr(t);if(typeof n=="string"){const r=C(this,gt).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&C(this,gt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=yr(t);if(typeof n=="string"){const r=C(this,gt).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=yr(t);if(typeof n=="string"){const i=(r=C(this,gt).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ne.batch(()=>{C(this,Pt).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,Pt).clear(),C(this,gt).clear()})}getAll(){return Array.from(C(this,Pt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ma(n,r))}findAll(t={}){return this.getAll().filter(n=>Ma(t,n))}notify(t){Ne.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ne.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ze))))}},Pt=new WeakMap,gt=new WeakMap,lr=new WeakMap,us);function yr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Na(e){return{onFetch:(t,n)=>{var f,m,h,g,w;const r=t.options,i=(h=(m=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:m.fetchMore)==null?void 0:h.direction,a=((g=t.state.data)==null?void 0:g.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const u=async()=>{let d=!1;const E=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},y=hs(t.options,t.fetchOptions),j=async(k,v,S)=>{if(d)return Promise.reject();if(v==null&&k.pages.length)return Promise.resolve(k);const M=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:v,direction:S?"backward":"forward",meta:t.options.meta};return E(R),R})(),B=await y(M),{maxPages:q}=t.options,p=S?ec:Jl;return{pages:p(k.pages,B,q),pageParams:p(k.pageParams,v,q)}};if(i&&a.length){const k=i==="backward",v=k?fc:La,S={pages:a,pageParams:o},_=v(r,S);s=await j(S,_,k)}else{const k=e??a.length;do{const v=c===0?o[0]??r.initialPageParam:La(r,s);if(c>0&&v==null)break;s=await j(s,v),c++}while(c<k)}return s};t.options.persister?t.fetchFn=()=>{var d,E;return(E=(d=t.options).persister)==null?void 0:E.call(d,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function La(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function fc(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ie,Lt,Vt,zn,Bn,qt,Nn,Ln,ps,hc=(ps=class{constructor(e={}){ue(this,Ie);ue(this,Lt);ue(this,Vt);ue(this,zn);ue(this,Bn);ue(this,qt);ue(this,Nn);ue(this,Ln);X(this,Ie,e.queryCache||new cc),X(this,Lt,e.mutationCache||new dc),X(this,Vt,e.defaultOptions||{}),X(this,zn,new Map),X(this,Bn,new Map),X(this,qt,0)}mount(){gr(this,qt)._++,C(this,qt)===1&&(X(this,Nn,oa.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Ie).onFocus())})),X(this,Ln,Ir.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Ie).onOnline())})))}unmount(){var e,t;gr(this,qt)._--,C(this,qt)===0&&((e=C(this,Nn))==null||e.call(this),X(this,Nn,void 0),(t=C(this,Ln))==null||t.call(this),X(this,Ln,void 0))}isFetching(e){return C(this,Ie).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Lt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,Ie).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=C(this,Ie).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Kt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return C(this,Ie).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=C(this,Ie).get(r.queryHash),a=i==null?void 0:i.state.data,o=Zl(t,a);if(o!==void 0)return C(this,Ie).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ne.batch(()=>C(this,Ie).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,Ie).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,Ie);Ne.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,Ie);return Ne.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ne.batch(()=>C(this,Ie).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ze).catch(Ze)}invalidateQueries(e,t={}){return Ne.batch(()=>(C(this,Ie).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ne.batch(()=>C(this,Ie).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Ze)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Ze)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,Ie).build(this,t);return n.isStaleByTime(Kt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ze).catch(Ze)}fetchInfiniteQuery(e){return e.behavior=Na(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ze).catch(Ze)}ensureInfiniteQueryData(e){return e.behavior=Na(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ir.isOnline()?C(this,Lt).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,Ie)}getMutationCache(){return C(this,Lt)}getDefaultOptions(){return C(this,Vt)}setDefaultOptions(e){X(this,Vt,e)}setQueryDefaults(e,t){C(this,zn).set(rr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,zn).values()],n={};return t.forEach(r=>{ir(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,Bn).set(rr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Bn).values()],n={};return t.forEach(r=>{ir(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Vt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=aa(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Dr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Vt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,Ie).clear(),C(this,Lt).clear()}},Ie=new WeakMap,Lt=new WeakMap,Vt=new WeakMap,zn=new WeakMap,Bn=new WeakMap,qt=new WeakMap,Nn=new WeakMap,Ln=new WeakMap,ps),Ge,ve,cr,Ue,hn,Vn,Wt,Ut,ur,qn,Wn,mn,xn,Ht,Un,Se,Zn,Di,Ii,Mi,zi,Bi,Ni,Li,bs,ds,mc=(ds=class extends pr{constructor(t,n){super();ue(this,Se);ue(this,Ge);ue(this,ve);ue(this,cr);ue(this,Ue);ue(this,hn);ue(this,Vn);ue(this,Wt);ue(this,Ut);ue(this,ur);ue(this,qn);ue(this,Wn);ue(this,mn);ue(this,xn);ue(this,Ht);ue(this,Un,new Set);this.options=n,X(this,Ge,t),X(this,Ut,null),X(this,Wt,_i()),this.options.experimental_prefetchInRender||C(this,Wt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,ve).addObserver(this),Va(C(this,ve),this.options)?ye(this,Se,Zn).call(this):this.updateResult(),ye(this,Se,zi).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Vi(C(this,ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Vi(C(this,ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,Se,Bi).call(this),ye(this,Se,Ni).call(this),C(this,ve).removeObserver(this)}setOptions(t){const n=this.options,r=C(this,ve);if(this.options=C(this,Ge).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pt(this.options.enabled,C(this,ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ye(this,Se,Li).call(this),C(this,ve).setOptions(this.options),n._defaulted&&!$i(this.options,n)&&C(this,Ge).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,ve),observer:this});const i=this.hasListeners();i&&qa(C(this,ve),r,this.options,n)&&ye(this,Se,Zn).call(this),this.updateResult(),i&&(C(this,ve)!==r||pt(this.options.enabled,C(this,ve))!==pt(n.enabled,C(this,ve))||Kt(this.options.staleTime,C(this,ve))!==Kt(n.staleTime,C(this,ve)))&&ye(this,Se,Di).call(this);const a=ye(this,Se,Ii).call(this);i&&(C(this,ve)!==r||pt(this.options.enabled,C(this,ve))!==pt(n.enabled,C(this,ve))||a!==C(this,Ht))&&ye(this,Se,Mi).call(this,a)}getOptimisticResult(t){const n=C(this,Ge).getQueryCache().build(C(this,Ge),t),r=this.createResult(n,t);return gc(this,r)&&(X(this,Ue,r),X(this,Vn,this.options),X(this,hn,C(this,ve).state)),r}getCurrentResult(){return C(this,Ue)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){C(this,Un).add(t)}getCurrentQuery(){return C(this,ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,Ge).defaultQueryOptions(t),r=C(this,Ge).getQueryCache().build(C(this,Ge),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ye(this,Se,Zn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Ue)))}createResult(t,n){var q;const r=C(this,ve),i=this.options,a=C(this,Ue),o=C(this,hn),s=C(this,Vn),u=t!==r?t.state:C(this,cr),{state:f}=t;let m={...f},h=!1,g;if(n._optimisticResults){const p=this.hasListeners(),R=!p&&Va(t,n),$=p&&qa(t,r,n,i);(R||$)&&(m={...m,...vs(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:w,errorUpdatedAt:d,status:E}=m;g=m.data;let y=!1;if(n.placeholderData!==void 0&&g===void 0&&E==="pending"){let p;a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?(p=a.data,y=!0):p=typeof n.placeholderData=="function"?n.placeholderData((q=C(this,Wn))==null?void 0:q.state.data,C(this,Wn)):n.placeholderData,p!==void 0&&(E="success",g=Pi(a==null?void 0:a.data,p,n),h=!0)}if(n.select&&g!==void 0&&!y)if(a&&g===(o==null?void 0:o.data)&&n.select===C(this,ur))g=C(this,qn);else try{X(this,ur,n.select),g=n.select(g),g=Pi(a==null?void 0:a.data,g,n),X(this,qn,g),X(this,Ut,null)}catch(p){X(this,Ut,p)}C(this,Ut)&&(w=C(this,Ut),g=C(this,qn),d=Date.now(),E="error");const j=m.fetchStatus==="fetching",k=E==="pending",v=E==="error",S=k&&j,_=g!==void 0,B={status:E,fetchStatus:m.fetchStatus,isPending:k,isSuccess:E==="success",isError:v,isInitialLoading:S,isLoading:S,data:g,dataUpdatedAt:m.dataUpdatedAt,error:w,errorUpdatedAt:d,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>u.dataUpdateCount||m.errorUpdateCount>u.errorUpdateCount,isFetching:j,isRefetching:j&&!k,isLoadingError:v&&!_,isPaused:m.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:v&&_,isStale:sa(t,n),refetch:this.refetch,promise:C(this,Wt),isEnabled:pt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const p=G=>{B.status==="error"?G.reject(B.error):B.data!==void 0&&G.resolve(B.data)},R=()=>{const G=X(this,Wt,B.promise=_i());p(G)},$=C(this,Wt);switch($.status){case"pending":t.queryHash===r.queryHash&&p($);break;case"fulfilled":(B.status==="error"||B.data!==$.value)&&R();break;case"rejected":(B.status!=="error"||B.error!==$.reason)&&R();break}}return B}updateResult(){const t=C(this,Ue),n=this.createResult(C(this,ve),this.options);if(X(this,hn,C(this,ve).state),X(this,Vn,this.options),C(this,hn).data!==void 0&&X(this,Wn,C(this,ve)),$i(n,t))return;X(this,Ue,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!C(this,Un).size)return!0;const o=new Set(a??C(this,Un));return this.options.throwOnError&&o.add("error"),Object.keys(C(this,Ue)).some(s=>{const c=s;return C(this,Ue)[c]!==t[c]&&o.has(c)})};ye(this,Se,bs).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,Se,zi).call(this)}},Ge=new WeakMap,ve=new WeakMap,cr=new WeakMap,Ue=new WeakMap,hn=new WeakMap,Vn=new WeakMap,Wt=new WeakMap,Ut=new WeakMap,ur=new WeakMap,qn=new WeakMap,Wn=new WeakMap,mn=new WeakMap,xn=new WeakMap,Ht=new WeakMap,Un=new WeakMap,Se=new WeakSet,Zn=function(t){ye(this,Se,Li).call(this);let n=C(this,ve).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ze)),n},Di=function(){ye(this,Se,Bi).call(this);const t=Kt(this.options.staleTime,C(this,ve));if(yn||C(this,Ue).isStale||!Fi(t))return;const r=fs(C(this,Ue).dataUpdatedAt,t)+1;X(this,mn,setTimeout(()=>{C(this,Ue).isStale||this.updateResult()},r))},Ii=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,ve)):this.options.refetchInterval)??!1},Mi=function(t){ye(this,Se,Ni).call(this),X(this,Ht,t),!(yn||pt(this.options.enabled,C(this,ve))===!1||!Fi(C(this,Ht))||C(this,Ht)===0)&&X(this,xn,setInterval(()=>{(this.options.refetchIntervalInBackground||oa.isFocused())&&ye(this,Se,Zn).call(this)},C(this,Ht)))},zi=function(){ye(this,Se,Di).call(this),ye(this,Se,Mi).call(this,ye(this,Se,Ii).call(this))},Bi=function(){C(this,mn)&&(clearTimeout(C(this,mn)),X(this,mn,void 0))},Ni=function(){C(this,xn)&&(clearInterval(C(this,xn)),X(this,xn,void 0))},Li=function(){const t=C(this,Ge).getQueryCache().build(C(this,Ge),this.options);if(t===C(this,ve))return;const n=C(this,ve);X(this,ve,t),X(this,cr,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},bs=function(t){Ne.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,Ue))}),C(this,Ge).getQueryCache().notify({query:C(this,ve),type:"observerResultsUpdated"})})},ds);function xc(e,t){return pt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Va(e,t){return xc(e,t)||e.state.data!==void 0&&Vi(e,t,t.refetchOnMount)}function Vi(e,t,n){if(pt(t.enabled,e)!==!1&&Kt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&sa(e,t)}return!1}function qa(e,t,n,r){return(e!==t||pt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&sa(e,n)}function sa(e,t){return pt(t.enabled,e)!==!1&&e.isStaleByTime(Kt(t.staleTime,e))}function gc(e,t){return!$i(e.getCurrentResult(),t)}var ws=J.createContext(void 0),yc=e=>{const t=J.useContext(ws);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vc=({client:e,children:t})=>(J.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(ws.Provider,{value:e,children:t})),Ss=J.createContext(!1),bc=()=>J.useContext(Ss);Ss.Provider;function wc(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Sc=J.createContext(wc()),Cc=()=>J.useContext(Sc),Tc=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ec=e=>{J.useEffect(()=>{e.clearReset()},[e])},jc=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||tc(n,[e.error,r])),kc=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Oc=(e,t)=>e.isLoading&&e.isFetching&&!t,Fc=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Wa=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ac(e,t,n){var m,h,g,w,d;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=bc(),i=Cc(),a=yc(),o=a.defaultQueryOptions(e);(h=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||h.call(m,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=r?"isRestoring":"optimistic",kc(o),Tc(o,i),Ec(i);const s=!a.getQueryCache().get(o.queryHash),[c]=J.useState(()=>new t(a,o)),u=c.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(J.useSyncExternalStore(J.useCallback(E=>{const y=f?c.subscribe(Ne.batchCalls(E)):Ze;return c.updateResult(),y},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),J.useEffect(()=>{c.setOptions(o)},[o,c]),Fc(o,u))throw Wa(o,c,i);if(jc({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((w=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||w.call(g,o,u),o.experimental_prefetchInRender&&!yn&&Oc(u,r)){const E=s?Wa(o,c,i):(d=a.getQueryCache().get(o.queryHash))==null?void 0:d.promise;E==null||E.catch(Ze).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function $c(e,t){return Ac(e,mc)}function la(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vr={exports:{}},br={exports:{}},be={};/** @license React v16.13.1
1
+ "use strict";var Gl=Object.defineProperty;var Ia=e=>{throw TypeError(e)};var Zl=(e,t,n)=>t in e?Gl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Xn=(e,t,n)=>Zl(e,typeof t!="symbol"?t+"":t,n),fi=(e,t,n)=>t.has(e)||Ia("Cannot "+n);var T=(e,t,n)=>(fi(e,t,"read from private field"),n?n.call(e):t.get(e)),ue=(e,t,n)=>t.has(e)?Ia("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ee=(e,t,n,r)=>(fi(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ye=(e,t,n)=>(fi(e,t,"access private method"),n);var vr=(e,t,n,r)=>({set _(i){ee(e,t,i,n)},get _(){return T(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),D=require("react"),Ce=require("react-hook-form"),za=require("@hookform/resolvers"),x=require("@mui/material"),Xl=require("@emotion/styled"),en=require("@emotion/react"),Jl=require("@mui/x-date-pickers/DatePicker"),Pn=require("dayjs"),ec=require("dayjs/plugin/customParseFormat");function tc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const te=tc(D);function nc(e,t,n){return n===void 0&&(n={}),function(r,i,a){try{return Promise.resolve(function(o,s){try{var c=(t!=null&&t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[n.mode==="sync"?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:i}))).then(function(u){return a.shouldUseNativeValidation&&za.validateFieldsNatively({},a),{values:n.raw?Object.assign({},r):u,errors:{}}}))}catch(u){return s(u)}return c&&c.then?c.then(void 0,s):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:za.toNestErrors((s=o,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(s.inner||[]).reduce(function(u,h){if(u[h.path]||(u[h.path]={message:h.message,type:h.type}),c){var m=u[h.path].types,d=m&&m[h.type];u[h.path]=Ce.appendErrors(h.path,c,u,h.type,d?[].concat(d,h.message):h.message)}return u},{})),a)};var s,c}))}catch(o){return Promise.reject(o)}}}var hr=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(){}},bn=typeof window>"u"||"Deno"in globalThis;function Xe(){}function rc(e,t){return typeof e=="function"?e(t):e}function Ri(e){return typeof e=="number"&&e>=0&&e!==1/0}function xs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gt(e,t){return typeof e=="function"?e(t):e}function pt(e,t){return typeof e=="function"?e(t):e}function Ba(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==la(o,t.options))return!1}else if(!sr(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Na(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(or(t.options.mutationKey)!==or(a))return!1}else if(!sr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function la(e,t){return((t==null?void 0:t.queryKeyHashFn)||or)(e)}function or(e){return JSON.stringify(e,(t,n)=>_i(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function sr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>sr(e[n],t[n])):!1}function Pi(e,t){if(e===t)return e;const n=La(e)&&La(t);if(n||_i(e)&&_i(t)){const r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),o=a.length,s=n?[]:{},c=new Set(r);let u=0;for(let h=0;h<o;h++){const m=n?h:a[h];(!n&&c.has(m)||n)&&e[m]===void 0&&t[m]===void 0?(s[m]=void 0,u++):(s[m]=Pi(e[m],t[m]),s[m]===e[m]&&e[m]!==void 0&&u++)}return i===o&&u===i?e:s}return t}function Di(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function La(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function _i(e){if(!Va(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Va(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Va(e){return Object.prototype.toString.call(e)==="[object Object]"}function ic(e){return new Promise(t=>{setTimeout(t,e)})}function Mi(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Pi(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Pi(e,t)}return t}function ac(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function oc(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var zr=Symbol();function gs(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===zr&&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===zr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function sc(e,t){return typeof e=="function"?e(...t):!!e}var un,Lt,Mn,ss,lc=(ss=class extends hr{constructor(){super();ue(this,un);ue(this,Lt);ue(this,Mn);ee(this,Mn,t=>{if(!bn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,Lt)||this.setEventListener(T(this,Mn))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Lt))==null||t.call(this),ee(this,Lt,void 0))}setEventListener(t){var n;ee(this,Mn,t),(n=T(this,Lt))==null||n.call(this),ee(this,Lt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,un)!==t&&(ee(this,un,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,un)=="boolean"?T(this,un):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},un=new WeakMap,Lt=new WeakMap,Mn=new WeakMap,ss),ca=new lc,In,Vt,zn,ls,cc=(ls=class extends hr{constructor(){super();ue(this,In,!0);ue(this,Vt);ue(this,zn);ee(this,zn,t=>{if(!bn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,Vt)||this.setEventListener(T(this,zn))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Vt))==null||t.call(this),ee(this,Vt,void 0))}setEventListener(t){var n;ee(this,zn,t),(n=T(this,Vt))==null||n.call(this),ee(this,Vt,t(this.setOnline.bind(this)))}setOnline(t){T(this,In)!==t&&(ee(this,In,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,In)}},In=new WeakMap,Vt=new WeakMap,zn=new WeakMap,ls),Br=new cc;function Ii(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function uc(e){return Math.min(1e3*2**e,3e4)}function ys(e){return(e??"online")==="online"?Br.isOnline():!0}var vs=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function hi(e){return e instanceof vs}function bs(e){let t=!1,n=0,r=!1,i;const a=Ii(),o=f=>{var E;r||(d(new vs(f)),(E=e.abort)==null||E.call(e))},s=()=>{t=!0},c=()=>{t=!1},u=()=>ca.isFocused()&&(e.networkMode==="always"||Br.isOnline())&&e.canRun(),h=()=>ys(e.networkMode)&&e.canRun(),m=f=>{var E;r||(r=!0,(E=e.onSuccess)==null||E.call(e,f),i==null||i(),a.resolve(f))},d=f=>{var E;r||(r=!0,(E=e.onError)==null||E.call(e,f),i==null||i(),a.reject(f))},g=()=>new Promise(f=>{var E;i=y=>{(r||u())&&f(y)},(E=e.onPause)==null||E.call(e)}).then(()=>{var f;i=void 0,r||(f=e.onContinue)==null||f.call(e)}),b=()=>{if(r)return;let f;const E=n===0?e.initialPromise:void 0;try{f=E??e.fn()}catch(y){f=Promise.reject(y)}Promise.resolve(f).then(m).catch(y=>{var P;if(r)return;const k=e.retry??(bn?0:3),j=e.retryDelay??uc,v=typeof j=="function"?j(n,y):j,S=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,y);if(t||!S){d(y);return}n++,(P=e.onFail)==null||P.call(e,n,y),ic(v).then(()=>u()?void 0:g()).then(()=>{t?d(y):b()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:c,canStart:h,start:()=>(h()?b():g().then(b),a)}}var pc=e=>setTimeout(e,0);function dc(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=pc;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(c=>{n(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||o()}return c},batchCalls:s=>(...c)=>{a(()=>{s(...c)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ne=dc(),pn,cs,ws=(cs=class{constructor(){ue(this,pn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ri(this.gcTime)&&ee(this,pn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bn?1/0:5*60*1e3))}clearGcTimeout(){T(this,pn)&&(clearTimeout(T(this,pn)),ee(this,pn,void 0))}},pn=new WeakMap,cs),Bn,dn,ut,fn,Le,ur,hn,xt,Rt,us,fc=(us=class extends ws{constructor(t){super();ue(this,xt);ue(this,Bn);ue(this,dn);ue(this,ut);ue(this,fn);ue(this,Le);ue(this,ur);ue(this,hn);ee(this,hn,!1),ee(this,ur,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,fn,t.client),ee(this,ut,T(this,fn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,Bn,hc(this.options)),this.state=t.state??T(this,Bn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Le))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ur),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,ut).remove(this)}setData(t,n){const r=Mi(this.state.data,t,this.options);return ye(this,xt,Rt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ye(this,xt,Rt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,Le))==null?void 0:r.promise;return(i=T(this,Le))==null||i.cancel(t),n?n.then(Xe).catch(Xe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Bn))}isActive(){return this.observers.some(t=>pt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Gt(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:!xs(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Le))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Le))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,Le)&&(T(this,hn)?T(this,Le).cancel({revert:!0}):T(this,Le).cancelRetry()),this.scheduleGc()),T(this,ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ye(this,xt,Rt).call(this,{type:"invalidate"})}fetch(t,n){var u,h,m;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,Le))return T(this,Le).continueRetry(),T(this,Le).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(g=>g.options.queryFn);d&&this.setOptions(d.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(ee(this,hn,!0),r.signal)})},a=()=>{const d=gs(this.options,n),b=(()=>{const f={client:T(this,fn),queryKey:this.queryKey,meta:this.meta};return i(f),f})();return ee(this,hn,!1),this.options.persister?this.options.persister(d,b,this):d(b)},s=(()=>{const d={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:T(this,fn),state:this.state,fetchFn:a};return i(d),d})();(u=this.options.behavior)==null||u.onFetch(s,this),ee(this,dn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=s.fetchOptions)==null?void 0:h.meta))&&ye(this,xt,Rt).call(this,{type:"fetch",meta:(m=s.fetchOptions)==null?void 0:m.meta});const c=d=>{var g,b,f,E;hi(d)&&d.silent||ye(this,xt,Rt).call(this,{type:"error",error:d}),hi(d)||((b=(g=T(this,ut).config).onError)==null||b.call(g,d,this),(E=(f=T(this,ut).config).onSettled)==null||E.call(f,this.state.data,d,this)),this.scheduleGc()};return ee(this,Le,bs({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var g,b,f,E;if(d===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(y){c(y);return}(b=(g=T(this,ut).config).onSuccess)==null||b.call(g,d,this),(E=(f=T(this,ut).config).onSettled)==null||E.call(f,d,this.state.error,this),this.scheduleGc()},onError:c,onFail:(d,g)=>{ye(this,xt,Rt).call(this,{type:"failed",failureCount:d,error:g})},onPause:()=>{ye(this,xt,Rt).call(this,{type:"pause"})},onContinue:()=>{ye(this,xt,Rt).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),T(this,Le).start()}},Bn=new WeakMap,dn=new WeakMap,ut=new WeakMap,fn=new WeakMap,Le=new WeakMap,ur=new WeakMap,hn=new WeakMap,xt=new WeakSet,Rt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ss(r.data,this.options),fetchMeta:t.meta??null};case"success":return ee(this,dn,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return hi(i)&&i.revert&&T(this,dn)?{...T(this,dn),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ne.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,ut).notify({query:this,type:"updated",action:t})})},us);function Ss(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ys(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hc(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var St,ps,mc=(ps=class extends hr{constructor(t={}){super();ue(this,St);this.config=t,ee(this,St,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??la(i,n);let o=this.get(a);return o||(o=new fc({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,St).has(t.queryHash)||(T(this,St).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,St).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,St).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ne.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,St).get(t)}getAll(){return[...T(this,St).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ba(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Ba(t,r)):n}notify(t){Ne.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ne.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ne.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},St=new WeakMap,ps),Ct,We,mn,Tt,Bt,ds,xc=(ds=class extends ws{constructor(t){super();ue(this,Tt);ue(this,Ct);ue(this,We);ue(this,mn);this.mutationId=t.mutationId,ee(this,We,t.mutationCache),ee(this,Ct,[]),this.state=t.state||gc(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Ct).includes(t)||(T(this,Ct).push(t),this.clearGcTimeout(),T(this,We).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,Ct,T(this,Ct).filter(n=>n!==t)),this.scheduleGc(),T(this,We).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Ct).length||(this.state.status==="pending"?this.scheduleGc():T(this,We).remove(this))}continue(){var t;return((t=T(this,mn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,c,u,h,m,d,g,b,f,E,y,k,j,v,S,P,z,I;const n=()=>{ye(this,Tt,Bt).call(this,{type:"continue"})};ee(this,mn,bs({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(B,p)=>{ye(this,Tt,Bt).call(this,{type:"failed",failureCount:B,error:p})},onPause:()=>{ye(this,Tt,Bt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,We).canRun(this)}));const r=this.state.status==="pending",i=!T(this,mn).canStart();try{if(r)n();else{ye(this,Tt,Bt).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=T(this,We).config).onMutate)==null?void 0:o.call(a,t,this));const p=await((c=(s=this.options).onMutate)==null?void 0:c.call(s,t));p!==this.state.context&&ye(this,Tt,Bt).call(this,{type:"pending",context:p,variables:t,isPaused:i})}const B=await T(this,mn).start();return await((h=(u=T(this,We).config).onSuccess)==null?void 0:h.call(u,B,t,this.state.context,this)),await((d=(m=this.options).onSuccess)==null?void 0:d.call(m,B,t,this.state.context)),await((b=(g=T(this,We).config).onSettled)==null?void 0:b.call(g,B,null,this.state.variables,this.state.context,this)),await((E=(f=this.options).onSettled)==null?void 0:E.call(f,B,null,t,this.state.context)),ye(this,Tt,Bt).call(this,{type:"success",data:B}),B}catch(B){try{throw await((k=(y=T(this,We).config).onError)==null?void 0:k.call(y,B,t,this.state.context,this)),await((v=(j=this.options).onError)==null?void 0:v.call(j,B,t,this.state.context)),await((P=(S=T(this,We).config).onSettled)==null?void 0:P.call(S,void 0,B,this.state.variables,this.state.context,this)),await((I=(z=this.options).onSettled)==null?void 0:I.call(z,void 0,B,t,this.state.context)),B}finally{ye(this,Tt,Bt).call(this,{type:"error",error:B})}}finally{T(this,We).runNext(this)}}},Ct=new WeakMap,We=new WeakMap,mn=new WeakMap,Tt=new WeakSet,Bt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ne.batch(()=>{T(this,Ct).forEach(r=>{r.onMutationUpdate(t)}),T(this,We).notify({mutation:this,type:"updated",action:t})})},ds);function gc(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pt,gt,pr,fs,yc=(fs=class extends hr{constructor(t={}){super();ue(this,Pt);ue(this,gt);ue(this,pr);this.config=t,ee(this,Pt,new Set),ee(this,gt,new Map),ee(this,pr,0)}build(t,n,r){const i=new xc({mutationCache:this,mutationId:++vr(this,pr)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){T(this,Pt).add(t);const n=br(t);if(typeof n=="string"){const r=T(this,gt).get(n);r?r.push(t):T(this,gt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,Pt).delete(t)){const n=br(t);if(typeof n=="string"){const r=T(this,gt).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&T(this,gt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=br(t);if(typeof n=="string"){const r=T(this,gt).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=br(t);if(typeof n=="string"){const i=(r=T(this,gt).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ne.batch(()=>{T(this,Pt).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,Pt).clear(),T(this,gt).clear()})}getAll(){return Array.from(T(this,Pt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Na(n,r))}findAll(t={}){return this.getAll().filter(n=>Na(t,n))}notify(t){Ne.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ne.batch(()=>Promise.all(t.map(n=>n.continue().catch(Xe))))}},Pt=new WeakMap,gt=new WeakMap,pr=new WeakMap,fs);function br(e){var t;return(t=e.options.scope)==null?void 0:t.id}function qa(e){return{onFetch:(t,n)=>{var h,m,d,g,b;const r=t.options,i=(d=(m=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:d.direction,a=((g=t.state.data)==null?void 0:g.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const u=async()=>{let f=!1;const E=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(t.signal.aborted?f=!0:t.signal.addEventListener("abort",()=>{f=!0}),t.signal)})},y=gs(t.options,t.fetchOptions),k=async(j,v,S)=>{if(f)return Promise.reject();if(v==null&&j.pages.length)return Promise.resolve(j);const z=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:v,direction:S?"backward":"forward",meta:t.options.meta};return E(R),R})(),I=await y(z),{maxPages:B}=t.options,p=S?oc:ac;return{pages:p(j.pages,I,B),pageParams:p(j.pageParams,v,B)}};if(i&&a.length){const j=i==="backward",v=j?vc:Wa,S={pages:a,pageParams:o},P=v(r,S);s=await k(S,P,j)}else{const j=e??a.length;do{const v=c===0?o[0]??r.initialPageParam:Wa(r,s);if(c>0&&v==null)break;s=await k(s,v),c++}while(c<j)}return s};t.options.persister?t.fetchFn=()=>{var f,E;return(E=(f=t.options).persister)==null?void 0:E.call(f,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Wa(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function vc(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Me,qt,Wt,Nn,Ln,Ut,Vn,qn,hs,bc=(hs=class{constructor(e={}){ue(this,Me);ue(this,qt);ue(this,Wt);ue(this,Nn);ue(this,Ln);ue(this,Ut);ue(this,Vn);ue(this,qn);ee(this,Me,e.queryCache||new mc),ee(this,qt,e.mutationCache||new yc),ee(this,Wt,e.defaultOptions||{}),ee(this,Nn,new Map),ee(this,Ln,new Map),ee(this,Ut,0)}mount(){vr(this,Ut)._++,T(this,Ut)===1&&(ee(this,Vn,ca.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Me).onFocus())})),ee(this,qn,Br.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Me).onOnline())})))}unmount(){var e,t;vr(this,Ut)._--,T(this,Ut)===0&&((e=T(this,Vn))==null||e.call(this),ee(this,Vn,void 0),(t=T(this,qn))==null||t.call(this),ee(this,qn,void 0))}isFetching(e){return T(this,Me).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,qt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Me).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=T(this,Me).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Gt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return T(this,Me).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Me).get(r.queryHash),a=i==null?void 0:i.state.data,o=rc(t,a);if(o!==void 0)return T(this,Me).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ne.batch(()=>T(this,Me).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Me).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Me);Ne.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Me);return Ne.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ne.batch(()=>T(this,Me).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Xe).catch(Xe)}invalidateQueries(e,t={}){return Ne.batch(()=>(T(this,Me).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ne.batch(()=>T(this,Me).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Xe)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Xe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Me).build(this,t);return n.isStaleByTime(Gt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xe).catch(Xe)}fetchInfiniteQuery(e){return e.behavior=qa(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xe).catch(Xe)}ensureInfiniteQueryData(e){return e.behavior=qa(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Br.isOnline()?T(this,qt).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Me)}getMutationCache(){return T(this,qt)}getDefaultOptions(){return T(this,Wt)}setDefaultOptions(e){ee(this,Wt,e)}setQueryDefaults(e,t){T(this,Nn).set(or(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Nn).values()],n={};return t.forEach(r=>{sr(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,Ln).set(or(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,Ln).values()],n={};return t.forEach(r=>{sr(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,Wt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=la(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===zr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,Wt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Me).clear(),T(this,qt).clear()}},Me=new WeakMap,qt=new WeakMap,Wt=new WeakMap,Nn=new WeakMap,Ln=new WeakMap,Ut=new WeakMap,Vn=new WeakMap,qn=new WeakMap,hs),Ze,ve,dr,Ue,xn,Wn,Ht,Yt,fr,Un,Hn,gn,yn,Kt,Yn,Se,er,zi,Bi,Ni,Li,Vi,qi,Wi,Cs,ms,wc=(ms=class extends hr{constructor(t,n){super();ue(this,Se);ue(this,Ze);ue(this,ve);ue(this,dr);ue(this,Ue);ue(this,xn);ue(this,Wn);ue(this,Ht);ue(this,Yt);ue(this,fr);ue(this,Un);ue(this,Hn);ue(this,gn);ue(this,yn);ue(this,Kt);ue(this,Yn,new Set);this.options=n,ee(this,Ze,t),ee(this,Yt,null),ee(this,Ht,Ii()),this.options.experimental_prefetchInRender||T(this,Ht).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ve).addObserver(this),Ua(T(this,ve),this.options)?ye(this,Se,er).call(this):this.updateResult(),ye(this,Se,Li).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ui(T(this,ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ui(T(this,ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,Se,Vi).call(this),ye(this,Se,qi).call(this),T(this,ve).removeObserver(this)}setOptions(t){const n=this.options,r=T(this,ve);if(this.options=T(this,Ze).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pt(this.options.enabled,T(this,ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ye(this,Se,Wi).call(this),T(this,ve).setOptions(this.options),n._defaulted&&!Di(this.options,n)&&T(this,Ze).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ve),observer:this});const i=this.hasListeners();i&&Ha(T(this,ve),r,this.options,n)&&ye(this,Se,er).call(this),this.updateResult(),i&&(T(this,ve)!==r||pt(this.options.enabled,T(this,ve))!==pt(n.enabled,T(this,ve))||Gt(this.options.staleTime,T(this,ve))!==Gt(n.staleTime,T(this,ve)))&&ye(this,Se,zi).call(this);const a=ye(this,Se,Bi).call(this);i&&(T(this,ve)!==r||pt(this.options.enabled,T(this,ve))!==pt(n.enabled,T(this,ve))||a!==T(this,Kt))&&ye(this,Se,Ni).call(this,a)}getOptimisticResult(t){const n=T(this,Ze).getQueryCache().build(T(this,Ze),t),r=this.createResult(n,t);return Cc(this,r)&&(ee(this,Ue,r),ee(this,Wn,this.options),ee(this,xn,T(this,ve).state)),r}getCurrentResult(){return T(this,Ue)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){T(this,Yn).add(t)}getCurrentQuery(){return T(this,ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,Ze).defaultQueryOptions(t),r=T(this,Ze).getQueryCache().build(T(this,Ze),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ye(this,Se,er).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,Ue)))}createResult(t,n){var B;const r=T(this,ve),i=this.options,a=T(this,Ue),o=T(this,xn),s=T(this,Wn),u=t!==r?t.state:T(this,dr),{state:h}=t;let m={...h},d=!1,g;if(n._optimisticResults){const p=this.hasListeners(),R=!p&&Ua(t,n),$=p&&Ha(t,r,n,i);(R||$)&&(m={...m,...Ss(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:b,errorUpdatedAt:f,status:E}=m;g=m.data;let y=!1;if(n.placeholderData!==void 0&&g===void 0&&E==="pending"){let p;a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?(p=a.data,y=!0):p=typeof n.placeholderData=="function"?n.placeholderData((B=T(this,Hn))==null?void 0:B.state.data,T(this,Hn)):n.placeholderData,p!==void 0&&(E="success",g=Mi(a==null?void 0:a.data,p,n),d=!0)}if(n.select&&g!==void 0&&!y)if(a&&g===(o==null?void 0:o.data)&&n.select===T(this,fr))g=T(this,Un);else try{ee(this,fr,n.select),g=n.select(g),g=Mi(a==null?void 0:a.data,g,n),ee(this,Un,g),ee(this,Yt,null)}catch(p){ee(this,Yt,p)}T(this,Yt)&&(b=T(this,Yt),g=T(this,Un),f=Date.now(),E="error");const k=m.fetchStatus==="fetching",j=E==="pending",v=E==="error",S=j&&k,P=g!==void 0,I={status:E,fetchStatus:m.fetchStatus,isPending:j,isSuccess:E==="success",isError:v,isInitialLoading:S,isLoading:S,data:g,dataUpdatedAt:m.dataUpdatedAt,error:b,errorUpdatedAt:f,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>u.dataUpdateCount||m.errorUpdateCount>u.errorUpdateCount,isFetching:k,isRefetching:k&&!j,isLoadingError:v&&!P,isPaused:m.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:v&&P,isStale:ua(t,n),refetch:this.refetch,promise:T(this,Ht),isEnabled:pt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const p=Z=>{I.status==="error"?Z.reject(I.error):I.data!==void 0&&Z.resolve(I.data)},R=()=>{const Z=ee(this,Ht,I.promise=Ii());p(Z)},$=T(this,Ht);switch($.status){case"pending":t.queryHash===r.queryHash&&p($);break;case"fulfilled":(I.status==="error"||I.data!==$.value)&&R();break;case"rejected":(I.status!=="error"||I.error!==$.reason)&&R();break}}return I}updateResult(){const t=T(this,Ue),n=this.createResult(T(this,ve),this.options);if(ee(this,xn,T(this,ve).state),ee(this,Wn,this.options),T(this,xn).data!==void 0&&ee(this,Hn,T(this,ve)),Di(n,t))return;ee(this,Ue,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!T(this,Yn).size)return!0;const o=new Set(a??T(this,Yn));return this.options.throwOnError&&o.add("error"),Object.keys(T(this,Ue)).some(s=>{const c=s;return T(this,Ue)[c]!==t[c]&&o.has(c)})};ye(this,Se,Cs).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,Se,Li).call(this)}},Ze=new WeakMap,ve=new WeakMap,dr=new WeakMap,Ue=new WeakMap,xn=new WeakMap,Wn=new WeakMap,Ht=new WeakMap,Yt=new WeakMap,fr=new WeakMap,Un=new WeakMap,Hn=new WeakMap,gn=new WeakMap,yn=new WeakMap,Kt=new WeakMap,Yn=new WeakMap,Se=new WeakSet,er=function(t){ye(this,Se,Wi).call(this);let n=T(this,ve).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Xe)),n},zi=function(){ye(this,Se,Vi).call(this);const t=Gt(this.options.staleTime,T(this,ve));if(bn||T(this,Ue).isStale||!Ri(t))return;const r=xs(T(this,Ue).dataUpdatedAt,t)+1;ee(this,gn,setTimeout(()=>{T(this,Ue).isStale||this.updateResult()},r))},Bi=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ve)):this.options.refetchInterval)??!1},Ni=function(t){ye(this,Se,qi).call(this),ee(this,Kt,t),!(bn||pt(this.options.enabled,T(this,ve))===!1||!Ri(T(this,Kt))||T(this,Kt)===0)&&ee(this,yn,setInterval(()=>{(this.options.refetchIntervalInBackground||ca.isFocused())&&ye(this,Se,er).call(this)},T(this,Kt)))},Li=function(){ye(this,Se,zi).call(this),ye(this,Se,Ni).call(this,ye(this,Se,Bi).call(this))},Vi=function(){T(this,gn)&&(clearTimeout(T(this,gn)),ee(this,gn,void 0))},qi=function(){T(this,yn)&&(clearInterval(T(this,yn)),ee(this,yn,void 0))},Wi=function(){const t=T(this,Ze).getQueryCache().build(T(this,Ze),this.options);if(t===T(this,ve))return;const n=T(this,ve);ee(this,ve,t),ee(this,dr,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Cs=function(t){Ne.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,Ue))}),T(this,Ze).getQueryCache().notify({query:T(this,ve),type:"observerResultsUpdated"})})},ms);function Sc(e,t){return pt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ua(e,t){return Sc(e,t)||e.state.data!==void 0&&Ui(e,t,t.refetchOnMount)}function Ui(e,t,n){if(pt(t.enabled,e)!==!1&&Gt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ua(e,t)}return!1}function Ha(e,t,n,r){return(e!==t||pt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ua(e,n)}function ua(e,t){return pt(t.enabled,e)!==!1&&e.isStaleByTime(Gt(t.staleTime,e))}function Cc(e,t){return!Di(e.getCurrentResult(),t)}var Ts=te.createContext(void 0),Tc=e=>{const t=te.useContext(Ts);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ec=({client:e,children:t})=>(te.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(Ts.Provider,{value:e,children:t})),Es=te.createContext(!1),jc=()=>te.useContext(Es);Es.Provider;function kc(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Oc=te.createContext(kc()),Fc=()=>te.useContext(Oc),Ac=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},$c=e=>{te.useEffect(()=>{e.clearReset()},[e])},Rc=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||sc(n,[e.error,r])),Pc=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Dc=(e,t)=>e.isLoading&&e.isFetching&&!t,_c=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ya=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Mc(e,t,n){var m,d,g,b,f;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=jc(),i=Fc(),a=Tc(),o=a.defaultQueryOptions(e);(d=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||d.call(m,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=r?"isRestoring":"optimistic",Pc(o),Ac(o,i),$c(i);const s=!a.getQueryCache().get(o.queryHash),[c]=te.useState(()=>new t(a,o)),u=c.getOptimisticResult(o),h=!r&&e.subscribed!==!1;if(te.useSyncExternalStore(te.useCallback(E=>{const y=h?c.subscribe(Ne.batchCalls(E)):Xe;return c.updateResult(),y},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),te.useEffect(()=>{c.setOptions(o)},[o,c]),_c(o,u))throw Ya(o,c,i);if(Rc({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((b=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,o,u),o.experimental_prefetchInRender&&!bn&&Dc(u,r)){const E=s?Ya(o,c,i):(f=a.getQueryCache().get(o.queryHash))==null?void 0:f.promise;E==null||E.catch(Xe).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function Ic(e,t){return Mc(e,wc)}function pa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wr={exports:{}},Sr={exports:{}},be={};/** @license React v16.13.1
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
5
5
  *
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
- */var Ua;function Rc(){if(Ua)return be;Ua=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function k(S){if(typeof S=="object"&&S!==null){var _=S.$$typeof;switch(_){case t:switch(S=S.type,S){case c:case u:case r:case a:case i:case m:return S;default:switch(S=S&&S.$$typeof,S){case s:case f:case w:case g:case o:return S;default:return _}}case n:return _}}}function v(S){return k(S)===u}return be.AsyncMode=c,be.ConcurrentMode=u,be.ContextConsumer=s,be.ContextProvider=o,be.Element=t,be.ForwardRef=f,be.Fragment=r,be.Lazy=w,be.Memo=g,be.Portal=n,be.Profiler=a,be.StrictMode=i,be.Suspense=m,be.isAsyncMode=function(S){return v(S)||k(S)===c},be.isConcurrentMode=v,be.isContextConsumer=function(S){return k(S)===s},be.isContextProvider=function(S){return k(S)===o},be.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},be.isForwardRef=function(S){return k(S)===f},be.isFragment=function(S){return k(S)===r},be.isLazy=function(S){return k(S)===w},be.isMemo=function(S){return k(S)===g},be.isPortal=function(S){return k(S)===n},be.isProfiler=function(S){return k(S)===a},be.isStrictMode=function(S){return k(S)===i},be.isSuspense=function(S){return k(S)===m},be.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===a||S===i||S===m||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===w||S.$$typeof===g||S.$$typeof===o||S.$$typeof===s||S.$$typeof===f||S.$$typeof===E||S.$$typeof===y||S.$$typeof===j||S.$$typeof===d)},be.typeOf=k,be}var we={};/** @license React v16.13.1
8
+ */var Ka;function zc(){if(Ka)return be;Ka=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function j(S){if(typeof S=="object"&&S!==null){var P=S.$$typeof;switch(P){case t:switch(S=S.type,S){case c:case u:case r:case a:case i:case m:return S;default:switch(S=S&&S.$$typeof,S){case s:case h:case b:case g:case o:return S;default:return P}}case n:return P}}}function v(S){return j(S)===u}return be.AsyncMode=c,be.ConcurrentMode=u,be.ContextConsumer=s,be.ContextProvider=o,be.Element=t,be.ForwardRef=h,be.Fragment=r,be.Lazy=b,be.Memo=g,be.Portal=n,be.Profiler=a,be.StrictMode=i,be.Suspense=m,be.isAsyncMode=function(S){return v(S)||j(S)===c},be.isConcurrentMode=v,be.isContextConsumer=function(S){return j(S)===s},be.isContextProvider=function(S){return j(S)===o},be.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},be.isForwardRef=function(S){return j(S)===h},be.isFragment=function(S){return j(S)===r},be.isLazy=function(S){return j(S)===b},be.isMemo=function(S){return j(S)===g},be.isPortal=function(S){return j(S)===n},be.isProfiler=function(S){return j(S)===a},be.isStrictMode=function(S){return j(S)===i},be.isSuspense=function(S){return j(S)===m},be.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===a||S===i||S===m||S===d||typeof S=="object"&&S!==null&&(S.$$typeof===b||S.$$typeof===g||S.$$typeof===o||S.$$typeof===s||S.$$typeof===h||S.$$typeof===E||S.$$typeof===y||S.$$typeof===k||S.$$typeof===f)},be.typeOf=j,be}var we={};/** @license React v16.13.1
9
9
  * react-is.development.js
10
10
  *
11
11
  * Copyright (c) Facebook, Inc. and its affiliates.
12
12
  *
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
- */var Ha;function Pc(){return Ha||(Ha=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function k(z){return typeof z=="string"||typeof z=="function"||z===r||z===u||z===a||z===i||z===m||z===h||typeof z=="object"&&z!==null&&(z.$$typeof===w||z.$$typeof===g||z.$$typeof===o||z.$$typeof===s||z.$$typeof===f||z.$$typeof===E||z.$$typeof===y||z.$$typeof===j||z.$$typeof===d)}function v(z){if(typeof z=="object"&&z!==null){var xe=z.$$typeof;switch(xe){case t:var je=z.type;switch(je){case c:case u:case r:case a:case i:case m:return je;default:var Ve=je&&je.$$typeof;switch(Ve){case s:case f:case w:case g:case o:return Ve;default:return xe}}case n:return xe}}}var S=c,_=u,M=s,B=o,q=t,p=f,R=r,$=w,G=g,N=n,re=a,V=i,K=m,te=!1;function oe(z){return te||(te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),T(z)||v(z)===c}function T(z){return v(z)===u}function D(z){return v(z)===s}function ee(z){return v(z)===o}function se(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function ie(z){return v(z)===f}function pe(z){return v(z)===r}function U(z){return v(z)===w}function ne(z){return v(z)===g}function de(z){return v(z)===n}function me(z){return v(z)===a}function L(z){return v(z)===i}function Y(z){return v(z)===m}we.AsyncMode=S,we.ConcurrentMode=_,we.ContextConsumer=M,we.ContextProvider=B,we.Element=q,we.ForwardRef=p,we.Fragment=R,we.Lazy=$,we.Memo=G,we.Portal=N,we.Profiler=re,we.StrictMode=V,we.Suspense=K,we.isAsyncMode=oe,we.isConcurrentMode=T,we.isContextConsumer=D,we.isContextProvider=ee,we.isElement=se,we.isForwardRef=ie,we.isFragment=pe,we.isLazy=U,we.isMemo=ne,we.isPortal=de,we.isProfiler=me,we.isStrictMode=L,we.isSuspense=Y,we.isValidElementType=k,we.typeOf=v}()),we}var Ya;function Cs(){return Ya||(Ya=1,process.env.NODE_ENV==="production"?br.exports=Rc():br.exports=Pc()),br.exports}/*
15
+ */var Qa;function Bc(){return Qa||(Qa=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function j(L){return typeof L=="string"||typeof L=="function"||L===r||L===u||L===a||L===i||L===m||L===d||typeof L=="object"&&L!==null&&(L.$$typeof===b||L.$$typeof===g||L.$$typeof===o||L.$$typeof===s||L.$$typeof===h||L.$$typeof===E||L.$$typeof===y||L.$$typeof===k||L.$$typeof===f)}function v(L){if(typeof L=="object"&&L!==null){var xe=L.$$typeof;switch(xe){case t:var je=L.type;switch(je){case c:case u:case r:case a:case i:case m:return je;default:var Ve=je&&je.$$typeof;switch(Ve){case s:case h:case b:case g:case o:return Ve;default:return xe}}case n:return xe}}}var S=c,P=u,z=s,I=o,B=t,p=h,R=r,$=b,Z=g,N=n,re=a,V=i,Q=m,W=!1;function K(L){return W||(W=!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.")),C(L)||v(L)===c}function C(L){return v(L)===u}function M(L){return v(L)===s}function ne(L){return v(L)===o}function se(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function ae(L){return v(L)===h}function pe(L){return v(L)===r}function H(L){return v(L)===b}function ie(L){return v(L)===g}function de(L){return v(L)===n}function me(L){return v(L)===a}function q(L){return v(L)===i}function G(L){return v(L)===m}we.AsyncMode=S,we.ConcurrentMode=P,we.ContextConsumer=z,we.ContextProvider=I,we.Element=B,we.ForwardRef=p,we.Fragment=R,we.Lazy=$,we.Memo=Z,we.Portal=N,we.Profiler=re,we.StrictMode=V,we.Suspense=Q,we.isAsyncMode=K,we.isConcurrentMode=C,we.isContextConsumer=M,we.isContextProvider=ne,we.isElement=se,we.isForwardRef=ae,we.isFragment=pe,we.isLazy=H,we.isMemo=ie,we.isPortal=de,we.isProfiler=me,we.isStrictMode=q,we.isSuspense=G,we.isValidElementType=j,we.typeOf=v}()),we}var Ga;function js(){return Ga||(Ga=1,process.env.NODE_ENV==="production"?Sr.exports=zc():Sr.exports=Bc()),Sr.exports}/*
16
16
  object-assign
17
17
  (c) Sindre Sorhus
18
18
  @license MIT
19
- */var di,Ka;function _c(){if(Ka)return di;Ka=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return di=i()?Object.assign:function(a,o){for(var s,c=r(a),u,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var m in s)t.call(s,m)&&(c[m]=s[m]);if(e){u=e(s);for(var h=0;h<u.length;h++)n.call(s,u[h])&&(c[u[h]]=s[u[h]])}}return c},di}var fi,Qa;function ca(){if(Qa)return fi;Qa=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fi=e,fi}var hi,Ga;function Ts(){return Ga||(Ga=1,hi=Function.call.bind(Object.prototype.hasOwnProperty)),hi}var mi,Za;function Dc(){if(Za)return mi;Za=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ca(),n={},r=Ts();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,c,u){if(process.env.NODE_ENV!=="production"){for(var f in a)if(r(a,f)){var m;try{if(typeof a[f]!="function"){var h=Error((c||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}m=a[f](o,f,c,s,null,t)}catch(w){m=w}if(m&&!(m instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in n)){n[m.message]=!0;var g=u?u():"";e("Failed "+s+" type: "+m.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mi=i,mi}var xi,Xa;function Ic(){if(Xa)return xi;Xa=1;var e=Cs(),t=_c(),n=ca(),r=Ts(),i=Dc(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return xi=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function m(T){var D=T&&(u&&T[u]||T[f]);if(typeof D=="function")return D}var h="<<anonymous>>",g={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:j(),arrayOf:k,element:v(),elementType:S(),instanceOf:_,node:p(),objectOf:B,oneOf:M,oneOfType:q,shape:$,exact:G};function w(T,D){return T===D?T!==0||1/T===1/D:T!==T&&D!==D}function d(T,D){this.message=T,this.data=D&&typeof D=="object"?D:{},this.stack=""}d.prototype=Error.prototype;function E(T){if(process.env.NODE_ENV!=="production")var D={},ee=0;function se(pe,U,ne,de,me,L,Y){if(de=de||h,L=L||ne,Y!==n){if(c){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var xe=de+":"+ne;!D[xe]&&ee<3&&(a("You are manually calling a React.PropTypes validation function for the `"+L+"` prop on `"+de+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),D[xe]=!0,ee++)}}return U[ne]==null?pe?U[ne]===null?new d("The "+me+" `"+L+"` is marked as required "+("in `"+de+"`, but its value is `null`.")):new d("The "+me+" `"+L+"` is marked as required in "+("`"+de+"`, but its value is `undefined`.")):null:T(U,ne,de,me,L)}var ie=se.bind(null,!1);return ie.isRequired=se.bind(null,!0),ie}function y(T){function D(ee,se,ie,pe,U,ne){var de=ee[se],me=V(de);if(me!==T){var L=K(de);return new d("Invalid "+pe+" `"+U+"` of type "+("`"+L+"` supplied to `"+ie+"`, expected ")+("`"+T+"`."),{expectedType:T})}return null}return E(D)}function j(){return E(o)}function k(T){function D(ee,se,ie,pe,U){if(typeof T!="function")return new d("Property `"+U+"` of component `"+ie+"` has invalid PropType notation inside arrayOf.");var ne=ee[se];if(!Array.isArray(ne)){var de=V(ne);return new d("Invalid "+pe+" `"+U+"` of type "+("`"+de+"` supplied to `"+ie+"`, expected an array."))}for(var me=0;me<ne.length;me++){var L=T(ne,me,ie,pe,U+"["+me+"]",n);if(L instanceof Error)return L}return null}return E(D)}function v(){function T(D,ee,se,ie,pe){var U=D[ee];if(!s(U)){var ne=V(U);return new d("Invalid "+ie+" `"+pe+"` of type "+("`"+ne+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return E(T)}function S(){function T(D,ee,se,ie,pe){var U=D[ee];if(!e.isValidElementType(U)){var ne=V(U);return new d("Invalid "+ie+" `"+pe+"` of type "+("`"+ne+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return E(T)}function _(T){function D(ee,se,ie,pe,U){if(!(ee[se]instanceof T)){var ne=T.name||h,de=oe(ee[se]);return new d("Invalid "+pe+" `"+U+"` of type "+("`"+de+"` supplied to `"+ie+"`, expected ")+("instance of `"+ne+"`."))}return null}return E(D)}function M(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function D(ee,se,ie,pe,U){for(var ne=ee[se],de=0;de<T.length;de++)if(w(ne,T[de]))return null;var me=JSON.stringify(T,function(Y,z){var xe=K(z);return xe==="symbol"?String(z):z});return new d("Invalid "+pe+" `"+U+"` of value `"+String(ne)+"` "+("supplied to `"+ie+"`, expected one of "+me+"."))}return E(D)}function B(T){function D(ee,se,ie,pe,U){if(typeof T!="function")return new d("Property `"+U+"` of component `"+ie+"` has invalid PropType notation inside objectOf.");var ne=ee[se],de=V(ne);if(de!=="object")return new d("Invalid "+pe+" `"+U+"` of type "+("`"+de+"` supplied to `"+ie+"`, expected an object."));for(var me in ne)if(r(ne,me)){var L=T(ne,me,ie,pe,U+"."+me,n);if(L instanceof Error)return L}return null}return E(D)}function q(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var D=0;D<T.length;D++){var ee=T[D];if(typeof ee!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+te(ee)+" at index "+D+"."),o}function se(ie,pe,U,ne,de){for(var me=[],L=0;L<T.length;L++){var Y=T[L],z=Y(ie,pe,U,ne,de,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&me.push(z.data.expectedType)}var xe=me.length>0?", expected one of type ["+me.join(", ")+"]":"";return new d("Invalid "+ne+" `"+de+"` supplied to "+("`"+U+"`"+xe+"."))}return E(se)}function p(){function T(D,ee,se,ie,pe){return N(D[ee])?null:new d("Invalid "+ie+" `"+pe+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return E(T)}function R(T,D,ee,se,ie){return new d((T||"React class")+": "+D+" type `"+ee+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ie+"`.")}function $(T){function D(ee,se,ie,pe,U){var ne=ee[se],de=V(ne);if(de!=="object")return new d("Invalid "+pe+" `"+U+"` of type `"+de+"` "+("supplied to `"+ie+"`, expected `object`."));for(var me in T){var L=T[me];if(typeof L!="function")return R(ie,pe,U,me,K(L));var Y=L(ne,me,ie,pe,U+"."+me,n);if(Y)return Y}return null}return E(D)}function G(T){function D(ee,se,ie,pe,U){var ne=ee[se],de=V(ne);if(de!=="object")return new d("Invalid "+pe+" `"+U+"` of type `"+de+"` "+("supplied to `"+ie+"`, expected `object`."));var me=t({},ee[se],T);for(var L in me){var Y=T[L];if(r(T,L)&&typeof Y!="function")return R(ie,pe,U,L,K(Y));if(!Y)return new d("Invalid "+pe+" `"+U+"` key `"+L+"` supplied to `"+ie+"`.\nBad object: "+JSON.stringify(ee[se],null," ")+`
20
- Valid keys: `+JSON.stringify(Object.keys(T),null," "));var z=Y(ne,L,ie,pe,U+"."+L,n);if(z)return z}return null}return E(D)}function N(T){switch(typeof T){case"number":case"string":case"undefined":return!0;case"boolean":return!T;case"object":if(Array.isArray(T))return T.every(N);if(T===null||s(T))return!0;var D=m(T);if(D){var ee=D.call(T),se;if(D!==T.entries){for(;!(se=ee.next()).done;)if(!N(se.value))return!1}else for(;!(se=ee.next()).done;){var ie=se.value;if(ie&&!N(ie[1]))return!1}}else return!1;return!0;default:return!1}}function re(T,D){return T==="symbol"?!0:D?D["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&D instanceof Symbol:!1}function V(T){var D=typeof T;return Array.isArray(T)?"array":T instanceof RegExp?"object":re(D,T)?"symbol":D}function K(T){if(typeof T>"u"||T===null)return""+T;var D=V(T);if(D==="object"){if(T instanceof Date)return"date";if(T instanceof RegExp)return"regexp"}return D}function te(T){var D=K(T);switch(D){case"array":case"object":return"an "+D;case"boolean":case"date":case"regexp":return"a "+D;default:return D}}function oe(T){return!T.constructor||!T.constructor.name?h:T.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},xi}var gi,Ja;function Mc(){if(Ja)return gi;Ja=1;var e=ca();function t(){}function n(){}return n.resetWarningCache=t,gi=function(){function r(o,s,c,u,f,m){if(m!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},gi}var eo;function zc(){if(eo)return vr.exports;if(eo=1,process.env.NODE_ENV!=="production"){var e=Cs(),t=!0;vr.exports=Ic()(e.isElement,t)}else vr.exports=Mc()();return vr.exports}var Bc=zc();const b=la(Bc);function Es(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Es(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function He(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Es(e))&&(r&&(r+=" "),r+=t);return r}function Kn(e,t,n=void 0){const r={};for(const i in e){const a=e[i];let o="",s=!0;for(let c=0;c<a.length;c+=1){const u=a[c];u&&(o+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(o+=" "+n[u]))}r[i]=o}return r}function Gt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Pe(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Gt(7));return e.charAt(0).toUpperCase()+e.slice(1)}var wr={exports:{}},Ce={};/**
19
+ */var mi,Za;function Nc(){if(Za)return mi;Za=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(o).map(function(h){return o[h]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(h){u[h]=h}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return mi=i()?Object.assign:function(a,o){for(var s,c=r(a),u,h=1;h<arguments.length;h++){s=Object(arguments[h]);for(var m in s)t.call(s,m)&&(c[m]=s[m]);if(e){u=e(s);for(var d=0;d<u.length;d++)n.call(s,u[d])&&(c[u[d]]=s[u[d]])}}return c},mi}var xi,Xa;function da(){if(Xa)return xi;Xa=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xi=e,xi}var gi,Ja;function ks(){return Ja||(Ja=1,gi=Function.call.bind(Object.prototype.hasOwnProperty)),gi}var yi,eo;function Lc(){if(eo)return yi;eo=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=da(),n={},r=ks();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,c,u){if(process.env.NODE_ENV!=="production"){for(var h in a)if(r(a,h)){var m;try{if(typeof a[h]!="function"){var d=Error((c||"React class")+": "+s+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}m=a[h](o,h,c,s,null,t)}catch(b){m=b}if(m&&!(m instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in n)){n[m.message]=!0;var g=u?u():"";e("Failed "+s+" type: "+m.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},yi=i,yi}var vi,to;function Vc(){if(to)return vi;to=1;var e=js(),t=Nc(),n=da(),r=ks(),i=Lc(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return vi=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function m(C){var M=C&&(u&&C[u]||C[h]);if(typeof M=="function")return M}var d="<<anonymous>>",g={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:k(),arrayOf:j,element:v(),elementType:S(),instanceOf:P,node:p(),objectOf:I,oneOf:z,oneOfType:B,shape:$,exact:Z};function b(C,M){return C===M?C!==0||1/C===1/M:C!==C&&M!==M}function f(C,M){this.message=C,this.data=M&&typeof M=="object"?M:{},this.stack=""}f.prototype=Error.prototype;function E(C){if(process.env.NODE_ENV!=="production")var M={},ne=0;function se(pe,H,ie,de,me,q,G){if(de=de||d,q=q||ie,G!==n){if(c){var L=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 L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var xe=de+":"+ie;!M[xe]&&ne<3&&(a("You are manually calling a React.PropTypes validation function for the `"+q+"` prop on `"+de+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[xe]=!0,ne++)}}return H[ie]==null?pe?H[ie]===null?new f("The "+me+" `"+q+"` is marked as required "+("in `"+de+"`, but its value is `null`.")):new f("The "+me+" `"+q+"` is marked as required in "+("`"+de+"`, but its value is `undefined`.")):null:C(H,ie,de,me,q)}var ae=se.bind(null,!1);return ae.isRequired=se.bind(null,!0),ae}function y(C){function M(ne,se,ae,pe,H,ie){var de=ne[se],me=V(de);if(me!==C){var q=Q(de);return new f("Invalid "+pe+" `"+H+"` of type "+("`"+q+"` supplied to `"+ae+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return E(M)}function k(){return E(o)}function j(C){function M(ne,se,ae,pe,H){if(typeof C!="function")return new f("Property `"+H+"` of component `"+ae+"` has invalid PropType notation inside arrayOf.");var ie=ne[se];if(!Array.isArray(ie)){var de=V(ie);return new f("Invalid "+pe+" `"+H+"` of type "+("`"+de+"` supplied to `"+ae+"`, expected an array."))}for(var me=0;me<ie.length;me++){var q=C(ie,me,ae,pe,H+"["+me+"]",n);if(q instanceof Error)return q}return null}return E(M)}function v(){function C(M,ne,se,ae,pe){var H=M[ne];if(!s(H)){var ie=V(H);return new f("Invalid "+ae+" `"+pe+"` of type "+("`"+ie+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return E(C)}function S(){function C(M,ne,se,ae,pe){var H=M[ne];if(!e.isValidElementType(H)){var ie=V(H);return new f("Invalid "+ae+" `"+pe+"` of type "+("`"+ie+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return E(C)}function P(C){function M(ne,se,ae,pe,H){if(!(ne[se]instanceof C)){var ie=C.name||d,de=K(ne[se]);return new f("Invalid "+pe+" `"+H+"` of type "+("`"+de+"` supplied to `"+ae+"`, expected ")+("instance of `"+ie+"`."))}return null}return E(M)}function z(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function M(ne,se,ae,pe,H){for(var ie=ne[se],de=0;de<C.length;de++)if(b(ie,C[de]))return null;var me=JSON.stringify(C,function(G,L){var xe=Q(L);return xe==="symbol"?String(L):L});return new f("Invalid "+pe+" `"+H+"` of value `"+String(ie)+"` "+("supplied to `"+ae+"`, expected one of "+me+"."))}return E(M)}function I(C){function M(ne,se,ae,pe,H){if(typeof C!="function")return new f("Property `"+H+"` of component `"+ae+"` has invalid PropType notation inside objectOf.");var ie=ne[se],de=V(ie);if(de!=="object")return new f("Invalid "+pe+" `"+H+"` of type "+("`"+de+"` supplied to `"+ae+"`, expected an object."));for(var me in ie)if(r(ie,me)){var q=C(ie,me,ae,pe,H+"."+me,n);if(q instanceof Error)return q}return null}return E(M)}function B(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var M=0;M<C.length;M++){var ne=C[M];if(typeof ne!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(ne)+" at index "+M+"."),o}function se(ae,pe,H,ie,de){for(var me=[],q=0;q<C.length;q++){var G=C[q],L=G(ae,pe,H,ie,de,n);if(L==null)return null;L.data&&r(L.data,"expectedType")&&me.push(L.data.expectedType)}var xe=me.length>0?", expected one of type ["+me.join(", ")+"]":"";return new f("Invalid "+ie+" `"+de+"` supplied to "+("`"+H+"`"+xe+"."))}return E(se)}function p(){function C(M,ne,se,ae,pe){return N(M[ne])?null:new f("Invalid "+ae+" `"+pe+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return E(C)}function R(C,M,ne,se,ae){return new f((C||"React class")+": "+M+" type `"+ne+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ae+"`.")}function $(C){function M(ne,se,ae,pe,H){var ie=ne[se],de=V(ie);if(de!=="object")return new f("Invalid "+pe+" `"+H+"` of type `"+de+"` "+("supplied to `"+ae+"`, expected `object`."));for(var me in C){var q=C[me];if(typeof q!="function")return R(ae,pe,H,me,Q(q));var G=q(ie,me,ae,pe,H+"."+me,n);if(G)return G}return null}return E(M)}function Z(C){function M(ne,se,ae,pe,H){var ie=ne[se],de=V(ie);if(de!=="object")return new f("Invalid "+pe+" `"+H+"` of type `"+de+"` "+("supplied to `"+ae+"`, expected `object`."));var me=t({},ne[se],C);for(var q in me){var G=C[q];if(r(C,q)&&typeof G!="function")return R(ae,pe,H,q,Q(G));if(!G)return new f("Invalid "+pe+" `"+H+"` key `"+q+"` supplied to `"+ae+"`.\nBad object: "+JSON.stringify(ne[se],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(C),null," "));var L=G(ie,q,ae,pe,H+"."+q,n);if(L)return L}return null}return E(M)}function N(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(N);if(C===null||s(C))return!0;var M=m(C);if(M){var ne=M.call(C),se;if(M!==C.entries){for(;!(se=ne.next()).done;)if(!N(se.value))return!1}else for(;!(se=ne.next()).done;){var ae=se.value;if(ae&&!N(ae[1]))return!1}}else return!1;return!0;default:return!1}}function re(C,M){return C==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function V(C){var M=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":re(M,C)?"symbol":M}function Q(C){if(typeof C>"u"||C===null)return""+C;var M=V(C);if(M==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return M}function W(C){var M=Q(C);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function K(C){return!C.constructor||!C.constructor.name?d:C.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},vi}var bi,no;function qc(){if(no)return bi;no=1;var e=da();function t(){}function n(){}return n.resetWarningCache=t,bi=function(){function r(o,s,c,u,h,m){if(m!==e){var d=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 d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},bi}var ro;function Wc(){if(ro)return wr.exports;if(ro=1,process.env.NODE_ENV!=="production"){var e=js(),t=!0;wr.exports=Vc()(e.isElement,t)}else wr.exports=qc()();return wr.exports}var Uc=Wc();const w=pa(Uc);function Os(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Os(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function He(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Os(e))&&(r&&(r+=" "),r+=t);return r}function Gn(e,t,n=void 0){const r={};for(const i in e){const a=e[i];let o="",s=!0;for(let c=0;c<a.length;c+=1){const u=a[c];u&&(o+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(o+=" "+n[u]))}r[i]=o}return r}function Xt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Pe(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Xt(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Cr={exports:{}},Te={};/**
21
21
  * @license React
22
22
  * react-is.production.js
23
23
  *
@@ -25,7 +25,7 @@ Valid keys: `+JSON.stringify(Object.keys(T),null," "));var z=Y(ne,L,ie,pe,U+"."
25
25
  *
26
26
  * This source code is licensed under the MIT license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
- */var to;function Nc(){if(to)return Ce;to=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function w(d){if(typeof d=="object"&&d!==null){var E=d.$$typeof;switch(E){case e:switch(d=d.type,d){case n:case i:case r:case c:case u:case h:return d;default:switch(d=d&&d.$$typeof,d){case o:case s:case m:case f:return d;case a:return d;default:return E}}case t:return E}}}return Ce.ContextConsumer=a,Ce.ContextProvider=o,Ce.Element=e,Ce.ForwardRef=s,Ce.Fragment=n,Ce.Lazy=m,Ce.Memo=f,Ce.Portal=t,Ce.Profiler=i,Ce.StrictMode=r,Ce.Suspense=c,Ce.SuspenseList=u,Ce.isContextConsumer=function(d){return w(d)===a},Ce.isContextProvider=function(d){return w(d)===o},Ce.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===e},Ce.isForwardRef=function(d){return w(d)===s},Ce.isFragment=function(d){return w(d)===n},Ce.isLazy=function(d){return w(d)===m},Ce.isMemo=function(d){return w(d)===f},Ce.isPortal=function(d){return w(d)===t},Ce.isProfiler=function(d){return w(d)===i},Ce.isStrictMode=function(d){return w(d)===r},Ce.isSuspense=function(d){return w(d)===c},Ce.isSuspenseList=function(d){return w(d)===u},Ce.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===n||d===i||d===r||d===c||d===u||typeof d=="object"&&d!==null&&(d.$$typeof===m||d.$$typeof===f||d.$$typeof===o||d.$$typeof===a||d.$$typeof===s||d.$$typeof===g||d.getModuleId!==void 0)},Ce.typeOf=w,Ce}var Te={};/**
28
+ */var io;function Hc(){if(io)return Te;io=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),d=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function b(f){if(typeof f=="object"&&f!==null){var E=f.$$typeof;switch(E){case e:switch(f=f.type,f){case n:case i:case r:case c:case u:case d:return f;default:switch(f=f&&f.$$typeof,f){case o:case s:case m:case h:return f;case a:return f;default:return E}}case t:return E}}}return Te.ContextConsumer=a,Te.ContextProvider=o,Te.Element=e,Te.ForwardRef=s,Te.Fragment=n,Te.Lazy=m,Te.Memo=h,Te.Portal=t,Te.Profiler=i,Te.StrictMode=r,Te.Suspense=c,Te.SuspenseList=u,Te.isContextConsumer=function(f){return b(f)===a},Te.isContextProvider=function(f){return b(f)===o},Te.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===e},Te.isForwardRef=function(f){return b(f)===s},Te.isFragment=function(f){return b(f)===n},Te.isLazy=function(f){return b(f)===m},Te.isMemo=function(f){return b(f)===h},Te.isPortal=function(f){return b(f)===t},Te.isProfiler=function(f){return b(f)===i},Te.isStrictMode=function(f){return b(f)===r},Te.isSuspense=function(f){return b(f)===c},Te.isSuspenseList=function(f){return b(f)===u},Te.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===n||f===i||f===r||f===c||f===u||typeof f=="object"&&f!==null&&(f.$$typeof===m||f.$$typeof===h||f.$$typeof===o||f.$$typeof===a||f.$$typeof===s||f.$$typeof===g||f.getModuleId!==void 0)},Te.typeOf=b,Te}var Ee={};/**
29
29
  * @license React
30
30
  * react-is.development.js
31
31
  *
@@ -33,23 +33,23 @@ Valid keys: `+JSON.stringify(Object.keys(T),null," "));var z=Y(ne,L,ie,pe,U+"."
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var no;function Lc(){return no||(no=1,process.env.NODE_ENV!=="production"&&function(){function e(d){if(typeof d=="object"&&d!==null){var E=d.$$typeof;switch(E){case t:switch(d=d.type,d){case r:case a:case i:case u:case f:case g:return d;default:switch(d=d&&d.$$typeof,d){case s:case c:case h:case m:return d;case o:return d;default:return E}}case n:return E}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),w=Symbol.for("react.client.reference");Te.ContextConsumer=o,Te.ContextProvider=s,Te.Element=t,Te.ForwardRef=c,Te.Fragment=r,Te.Lazy=h,Te.Memo=m,Te.Portal=n,Te.Profiler=a,Te.StrictMode=i,Te.Suspense=u,Te.SuspenseList=f,Te.isContextConsumer=function(d){return e(d)===o},Te.isContextProvider=function(d){return e(d)===s},Te.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},Te.isForwardRef=function(d){return e(d)===c},Te.isFragment=function(d){return e(d)===r},Te.isLazy=function(d){return e(d)===h},Te.isMemo=function(d){return e(d)===m},Te.isPortal=function(d){return e(d)===n},Te.isProfiler=function(d){return e(d)===a},Te.isStrictMode=function(d){return e(d)===i},Te.isSuspense=function(d){return e(d)===u},Te.isSuspenseList=function(d){return e(d)===f},Te.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===a||d===i||d===u||d===f||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===m||d.$$typeof===s||d.$$typeof===o||d.$$typeof===c||d.$$typeof===w||d.getModuleId!==void 0)},Te.typeOf=e}()),Te}var ro;function Vc(){return ro||(ro=1,process.env.NODE_ENV==="production"?wr.exports=Nc():wr.exports=Lc()),wr.exports}var Mr=Vc();function Et(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function js(e){if(J.isValidElement(e)||Mr.isValidElementType(e)||!Et(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=js(e[n])}),t}function at(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Et(e)&&Et(t)&&Object.keys(t).forEach(i=>{J.isValidElement(t[i])||Mr.isValidElementType(t[i])?r[i]=t[i]:Et(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Et(e[i])?r[i]=at(e[i],t[i],n):n.clone?r[i]=Et(t[i])?js(t[i]):t[i]:r[i]=t[i]}),r}function nr(e,t){return t?at(e,t,{clone:!1}):e}const Jt=process.env.NODE_ENV!=="production"?b.oneOfType([b.number,b.string,b.object,b.array]):{};function qc(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var o,s;const a=/min-width:\s*([0-9.]+)/;return+(((o=r.match(a))==null?void 0:o[1])||0)-+(((s=i.match(a))==null?void 0:s[1])||0)});return n.length?n.reduce((r,i)=>{const a=t[i];return delete r[i],r[i]=a,r},{...t}):t}function Wc(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Uc(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
37
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Gt(18,`(${t})`));return null}const[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function Hc(e){const t=(a,o)=>a.replace("@media",o?`@container ${o}`:"@container");function n(a,o){a.up=(...s)=>t(e.breakpoints.up(...s),o),a.down=(...s)=>t(e.breakpoints.down(...s),o),a.between=(...s)=>t(e.breakpoints.between(...s),o),a.only=(...s)=>t(e.breakpoints.only(...s),o),a.not=(...s)=>{const c=t(e.breakpoints.not(...s),o);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},i=a=>(n(r,a),r);return n(i),{...e,containerQueries:i}}const Xr={xs:0,sm:600,md:900,lg:1200,xl:1536},io={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Xr[e]}px)`},Yc={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Xr[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Dt(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||io;return t.reduce((o,s,c)=>(o[a.up(a.keys[c])]=n(t[c]),o),{})}if(typeof t=="object"){const a=r.breakpoints||io;return Object.keys(t).reduce((o,s)=>{if(Wc(a.keys,s)){const c=Uc(r.containerQueries?r:Yc,s);c&&(o[c]=n(t[s],s))}else if(Object.keys(a.values||Xr).includes(s)){const c=a.up(s);o[c]=n(t[s],s)}else{const c=s;o[c]=t[c]}return o},{})}return n(t)}function Kc(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const a=e.up(i);return r[a]={},r},{}))||{}}function Qc(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Jr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function zr(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Jr(e,n)||r,t&&(i=t(i,r,e)),i}function ze(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=o=>{if(o[t]==null)return null;const s=o[t],c=o.theme,u=Jr(c,r)||{};return Dt(o,s,m=>{let h=zr(u,i,m);return m===h&&typeof m=="string"&&(h=zr(u,i,`${t}${m==="default"?"":Pe(m)}`,m)),n===!1?h:{[n]:h}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:Jt}:{},a.filterProps=[t],a}function Gc(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Zc={m:"margin",p:"padding"},Xc={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ao={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Jc=Gc(e=>{if(e.length>2)if(ao[e])e=ao[e];else return[e];const[t,n]=e.split(""),r=Zc[t],i=Xc[n]||"";return Array.isArray(i)?i.map(a=>r+a):[r+i]}),ei=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],eu=[...ei,...ti];function dr(e,t,n,r){const i=Jr(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${a}.`),typeof i=="string"?i.startsWith("var(")&&a===0?0:i.startsWith("var(")&&a===1?i:`calc(${a} * ${i})`:i*a):Array.isArray(i)?a=>{if(typeof a=="string")return a;const o=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>i.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${o} > ${i.length-1}, you need to add the missing values.`].join(`
36
+ */var ao;function Yc(){return ao||(ao=1,process.env.NODE_ENV!=="production"&&function(){function e(f){if(typeof f=="object"&&f!==null){var E=f.$$typeof;switch(E){case t:switch(f=f.type,f){case r:case a:case i:case u:case h:case g:return f;default:switch(f=f&&f.$$typeof,f){case s:case c:case d:case m:return f;case o:return f;default:return E}}case n:return E}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");Ee.ContextConsumer=o,Ee.ContextProvider=s,Ee.Element=t,Ee.ForwardRef=c,Ee.Fragment=r,Ee.Lazy=d,Ee.Memo=m,Ee.Portal=n,Ee.Profiler=a,Ee.StrictMode=i,Ee.Suspense=u,Ee.SuspenseList=h,Ee.isContextConsumer=function(f){return e(f)===o},Ee.isContextProvider=function(f){return e(f)===s},Ee.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===t},Ee.isForwardRef=function(f){return e(f)===c},Ee.isFragment=function(f){return e(f)===r},Ee.isLazy=function(f){return e(f)===d},Ee.isMemo=function(f){return e(f)===m},Ee.isPortal=function(f){return e(f)===n},Ee.isProfiler=function(f){return e(f)===a},Ee.isStrictMode=function(f){return e(f)===i},Ee.isSuspense=function(f){return e(f)===u},Ee.isSuspenseList=function(f){return e(f)===h},Ee.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===r||f===a||f===i||f===u||f===h||typeof f=="object"&&f!==null&&(f.$$typeof===d||f.$$typeof===m||f.$$typeof===s||f.$$typeof===o||f.$$typeof===c||f.$$typeof===b||f.getModuleId!==void 0)},Ee.typeOf=e}()),Ee}var oo;function Kc(){return oo||(oo=1,process.env.NODE_ENV==="production"?Cr.exports=Hc():Cr.exports=Yc()),Cr.exports}var Nr=Kc();function Et(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Fs(e){if(te.isValidElement(e)||Nr.isValidElementType(e)||!Et(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Fs(e[n])}),t}function at(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Et(e)&&Et(t)&&Object.keys(t).forEach(i=>{te.isValidElement(t[i])||Nr.isValidElementType(t[i])?r[i]=t[i]:Et(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Et(e[i])?r[i]=at(e[i],t[i],n):n.clone?r[i]=Et(t[i])?Fs(t[i]):t[i]:r[i]=t[i]}),r}function ar(e,t){return t?at(e,t,{clone:!1}):e}const tn=process.env.NODE_ENV!=="production"?w.oneOfType([w.number,w.string,w.object,w.array]):{};function Qc(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var o,s;const a=/min-width:\s*([0-9.]+)/;return+(((o=r.match(a))==null?void 0:o[1])||0)-+(((s=i.match(a))==null?void 0:s[1])||0)});return n.length?n.reduce((r,i)=>{const a=t[i];return delete r[i],r[i]=a,r},{...t}):t}function Gc(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Zc(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
37
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Xt(18,`(${t})`));return null}const[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function Xc(e){const t=(a,o)=>a.replace("@media",o?`@container ${o}`:"@container");function n(a,o){a.up=(...s)=>t(e.breakpoints.up(...s),o),a.down=(...s)=>t(e.breakpoints.down(...s),o),a.between=(...s)=>t(e.breakpoints.between(...s),o),a.only=(...s)=>t(e.breakpoints.only(...s),o),a.not=(...s)=>{const c=t(e.breakpoints.not(...s),o);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},i=a=>(n(r,a),r);return n(i),{...e,containerQueries:i}}const ti={xs:0,sm:600,md:900,lg:1200,xl:1536},so={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ti[e]}px)`},Jc={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ti[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Mt(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||so;return t.reduce((o,s,c)=>(o[a.up(a.keys[c])]=n(t[c]),o),{})}if(typeof t=="object"){const a=r.breakpoints||so;return Object.keys(t).reduce((o,s)=>{if(Gc(a.keys,s)){const c=Zc(r.containerQueries?r:Jc,s);c&&(o[c]=n(t[s],s))}else if(Object.keys(a.values||ti).includes(s)){const c=a.up(s);o[c]=n(t[s],s)}else{const c=s;o[c]=t[c]}return o},{})}return n(t)}function eu(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const a=e.up(i);return r[a]={},r},{}))||{}}function tu(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function ni(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Lr(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=ni(e,n)||r,t&&(i=t(i,r,e)),i}function ze(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=o=>{if(o[t]==null)return null;const s=o[t],c=o.theme,u=ni(c,r)||{};return Mt(o,s,m=>{let d=Lr(u,i,m);return m===d&&typeof m=="string"&&(d=Lr(u,i,`${t}${m==="default"?"":Pe(m)}`,m)),n===!1?d:{[n]:d}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:tn}:{},a.filterProps=[t],a}function nu(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const ru={m:"margin",p:"padding"},iu={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},lo={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},au=nu(e=>{if(e.length>2)if(lo[e])e=lo[e];else return[e];const[t,n]=e.split(""),r=ru[t],i=iu[n]||"";return Array.isArray(i)?i.map(a=>r+a):[r+i]}),ri=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],ii=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],ou=[...ri,...ii];function mr(e,t,n,r){const i=ni(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${a}.`),typeof i=="string"?i.startsWith("var(")&&a===0?0:i.startsWith("var(")&&a===1?i:`calc(${a} * ${i})`:i*a):Array.isArray(i)?a=>{if(typeof a=="string")return a;const o=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>i.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${o} > ${i.length-1}, you need to add the missing values.`].join(`
38
38
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
39
39
  `)));const s=i[o];return a>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
40
- `)),()=>{})}function ua(e){return dr(e,"spacing",8,"spacing")}function fr(e,t){return typeof t=="string"||t==null?t:e(t)}function tu(e,t){return n=>e.reduce((r,i)=>(r[i]=fr(t,n),r),{})}function nu(e,t,n,r){if(!t.includes(n))return null;const i=Jc(n),a=tu(i,r),o=e[n];return Dt(e,o,a)}function ks(e,t){const n=ua(e.theme);return Object.keys(e).map(r=>nu(e,t,r,n)).reduce(nr,{})}function _e(e){return ks(e,ei)}_e.propTypes=process.env.NODE_ENV!=="production"?ei.reduce((e,t)=>(e[t]=Jt,e),{}):{};_e.filterProps=ei;function De(e){return ks(e,ti)}De.propTypes=process.env.NODE_ENV!=="production"?ti.reduce((e,t)=>(e[t]=Jt,e),{}):{};De.filterProps=ti;process.env.NODE_ENV!=="production"&&eu.reduce((e,t)=>(e[t]=Jt,e),{});function ni(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(a=>{r[a]=i}),r),{}),n=r=>Object.keys(r).reduce((i,a)=>t[a]?nr(i,t[a](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function ft(e){return typeof e!="number"?e:`${e}px solid`}function ht(e,t){return ze({prop:e,themeKey:"borders",transform:t})}const ru=ht("border",ft),iu=ht("borderTop",ft),au=ht("borderRight",ft),ou=ht("borderBottom",ft),su=ht("borderLeft",ft),lu=ht("borderColor"),cu=ht("borderTopColor"),uu=ht("borderRightColor"),pu=ht("borderBottomColor"),du=ht("borderLeftColor"),fu=ht("outline",ft),hu=ht("outlineColor"),ri=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=dr(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:fr(t,r)});return Dt(e,e.borderRadius,n)}return null};ri.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Jt}:{};ri.filterProps=["borderRadius"];ni(ru,iu,au,ou,su,lu,cu,uu,pu,du,ri,fu,hu);const ii=e=>{if(e.gap!==void 0&&e.gap!==null){const t=dr(e.theme,"spacing",8,"gap"),n=r=>({gap:fr(t,r)});return Dt(e,e.gap,n)}return null};ii.propTypes=process.env.NODE_ENV!=="production"?{gap:Jt}:{};ii.filterProps=["gap"];const ai=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=dr(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:fr(t,r)});return Dt(e,e.columnGap,n)}return null};ai.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Jt}:{};ai.filterProps=["columnGap"];const oi=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=dr(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:fr(t,r)});return Dt(e,e.rowGap,n)}return null};oi.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Jt}:{};oi.filterProps=["rowGap"];const mu=ze({prop:"gridColumn"}),xu=ze({prop:"gridRow"}),gu=ze({prop:"gridAutoFlow"}),yu=ze({prop:"gridAutoColumns"}),vu=ze({prop:"gridAutoRows"}),bu=ze({prop:"gridTemplateColumns"}),wu=ze({prop:"gridTemplateRows"}),Su=ze({prop:"gridTemplateAreas"}),Cu=ze({prop:"gridArea"});ni(ii,ai,oi,mu,xu,gu,yu,vu,bu,wu,Su,Cu);function Pn(e,t){return t==="grey"?t:e}const Tu=ze({prop:"color",themeKey:"palette",transform:Pn}),Eu=ze({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Pn}),ju=ze({prop:"backgroundColor",themeKey:"palette",transform:Pn});ni(Tu,Eu,ju);function it(e){return e<=1&&e!==0?`${e*100}%`:e}const ku=ze({prop:"width",transform:it}),pa=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,a,o,s,c;const r=((o=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:o[n])||Xr[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:it(n)}};return Dt(e,e.maxWidth,t)}return null};pa.filterProps=["maxWidth"];const Ou=ze({prop:"minWidth",transform:it}),Fu=ze({prop:"height",transform:it}),Au=ze({prop:"maxHeight",transform:it}),$u=ze({prop:"minHeight",transform:it});ze({prop:"size",cssProperty:"width",transform:it});ze({prop:"size",cssProperty:"height",transform:it});const Ru=ze({prop:"boxSizing"});ni(ku,pa,Ou,Fu,Au,$u,Ru);const hr={border:{themeKey:"borders",transform:ft},borderTop:{themeKey:"borders",transform:ft},borderRight:{themeKey:"borders",transform:ft},borderBottom:{themeKey:"borders",transform:ft},borderLeft:{themeKey:"borders",transform:ft},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ft},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ri},color:{themeKey:"palette",transform:Pn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Pn},backgroundColor:{themeKey:"palette",transform:Pn},p:{style:De},pt:{style:De},pr:{style:De},pb:{style:De},pl:{style:De},px:{style:De},py:{style:De},padding:{style:De},paddingTop:{style:De},paddingRight:{style:De},paddingBottom:{style:De},paddingLeft:{style:De},paddingX:{style:De},paddingY:{style:De},paddingInline:{style:De},paddingInlineStart:{style:De},paddingInlineEnd:{style:De},paddingBlock:{style:De},paddingBlockStart:{style:De},paddingBlockEnd:{style:De},m:{style:_e},mt:{style:_e},mr:{style:_e},mb:{style:_e},ml:{style:_e},mx:{style:_e},my:{style:_e},margin:{style:_e},marginTop:{style:_e},marginRight:{style:_e},marginBottom:{style:_e},marginLeft:{style:_e},marginX:{style:_e},marginY:{style:_e},marginInline:{style:_e},marginInlineStart:{style:_e},marginInlineEnd:{style:_e},marginBlock:{style:_e},marginBlockStart:{style:_e},marginBlockEnd:{style:_e},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ii},rowGap:{style:oi},columnGap:{style:ai},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:it},maxWidth:{style:pa},minWidth:{transform:it},height:{transform:it},maxHeight:{transform:it},minHeight:{transform:it},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Pu(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function _u(e,t){return typeof e=="function"?e(t):e}function Du(){function e(n,r,i,a){const o={[n]:r,theme:i},s=a[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:m}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=Jr(i,u)||{};return m?m(o):Dt(o,r,w=>{let d=zr(h,f,w);return w===d&&typeof w=="string"&&(d=zr(h,f,`${n}${w==="default"?"":Pe(w)}`,w)),c===!1?d:{[c]:d}})}function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const a=i.unstable_sxConfig??hr;function o(s){let c=s;if(typeof s=="function")c=s(i);else if(typeof s!="object")return s;if(!c)return null;const u=Kc(i.breakpoints),f=Object.keys(u);let m=u;return Object.keys(c).forEach(h=>{const g=_u(c[h],i);if(g!=null)if(typeof g=="object")if(a[h])m=nr(m,e(h,g,i,a));else{const w=Dt({theme:i},g,d=>({[h]:d}));Pu(w,g)?m[h]=t({sx:g,theme:i}):m=nr(m,w)}else m=nr(m,e(h,g,i,a))}),qc(i,Qc(f,m))}return Array.isArray(r)?r.map(o):o(r)}return t}const Hn=Du();Hn.filterProps=["sx"];const Iu=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??hr;return Object.keys(e).forEach(i=>{n[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function Mu(e){const{sx:t,...n}=e,{systemProps:r,otherProps:i}=Iu(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...o)=>{const s=t(...o);return Et(s)?{...r,...s}:r}:a={...r,...t},{...i,sx:a}}function zu(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Bu={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Nu(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Lu=/[A-Z]|^ms/g,Vu=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Os=function(t){return t.charCodeAt(1)===45},oo=function(t){return t!=null&&typeof t!="boolean"},yi=Nu(function(e){return Os(e)?e:e.replace(Lu,"-$&").toLowerCase()}),so=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Vu,function(r,i,a){return Yt={name:i,styles:a,next:Yt},i})}return Bu[t]!==1&&!Os(t)&&typeof n=="number"&&n!==0?n+"px":n};function Br(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Yt={name:i.name,styles:i.styles,next:Yt},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Yt={name:o.name,styles:o.styles,next:Yt},o=o.next;var s=a.styles+";";return s}return qu(e,t,n)}}var c=n;return c}function qu(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Br(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;oo(s)&&(r+=yi(a)+":"+so(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var c=0;c<o.length;c++)oo(o[c])&&(r+=yi(a)+":"+so(a,o[c])+";");else{var u=Br(e,t,o);switch(a){case"animation":case"animationName":{r+=yi(a)+":"+u+";";break}default:r+=a+"{"+u+"}"}}}return r}var lo=/label:\s*([^\s;{]+)\s*(;|$)/g,Yt;function Wu(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";Yt=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=Br(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Br(n,t,e[s]),r){var c=a;i+=c[s]}lo.lastIndex=0;for(var u="",f;(f=lo.exec(i))!==null;)u+="-"+f[1];var m=zu(i)+u;return{name:m,styles:i,next:Yt}}/**
40
+ `)),()=>{})}function fa(e){return mr(e,"spacing",8,"spacing")}function xr(e,t){return typeof t=="string"||t==null?t:e(t)}function su(e,t){return n=>e.reduce((r,i)=>(r[i]=xr(t,n),r),{})}function lu(e,t,n,r){if(!t.includes(n))return null;const i=au(n),a=su(i,r),o=e[n];return Mt(e,o,a)}function As(e,t){const n=fa(e.theme);return Object.keys(e).map(r=>lu(e,t,r,n)).reduce(ar,{})}function De(e){return As(e,ri)}De.propTypes=process.env.NODE_ENV!=="production"?ri.reduce((e,t)=>(e[t]=tn,e),{}):{};De.filterProps=ri;function _e(e){return As(e,ii)}_e.propTypes=process.env.NODE_ENV!=="production"?ii.reduce((e,t)=>(e[t]=tn,e),{}):{};_e.filterProps=ii;process.env.NODE_ENV!=="production"&&ou.reduce((e,t)=>(e[t]=tn,e),{});function ai(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(a=>{r[a]=i}),r),{}),n=r=>Object.keys(r).reduce((i,a)=>t[a]?ar(i,t[a](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function ft(e){return typeof e!="number"?e:`${e}px solid`}function ht(e,t){return ze({prop:e,themeKey:"borders",transform:t})}const cu=ht("border",ft),uu=ht("borderTop",ft),pu=ht("borderRight",ft),du=ht("borderBottom",ft),fu=ht("borderLeft",ft),hu=ht("borderColor"),mu=ht("borderTopColor"),xu=ht("borderRightColor"),gu=ht("borderBottomColor"),yu=ht("borderLeftColor"),vu=ht("outline",ft),bu=ht("outlineColor"),oi=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=mr(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:xr(t,r)});return Mt(e,e.borderRadius,n)}return null};oi.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:tn}:{};oi.filterProps=["borderRadius"];ai(cu,uu,pu,du,fu,hu,mu,xu,gu,yu,oi,vu,bu);const si=e=>{if(e.gap!==void 0&&e.gap!==null){const t=mr(e.theme,"spacing",8,"gap"),n=r=>({gap:xr(t,r)});return Mt(e,e.gap,n)}return null};si.propTypes=process.env.NODE_ENV!=="production"?{gap:tn}:{};si.filterProps=["gap"];const li=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=mr(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:xr(t,r)});return Mt(e,e.columnGap,n)}return null};li.propTypes=process.env.NODE_ENV!=="production"?{columnGap:tn}:{};li.filterProps=["columnGap"];const ci=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=mr(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:xr(t,r)});return Mt(e,e.rowGap,n)}return null};ci.propTypes=process.env.NODE_ENV!=="production"?{rowGap:tn}:{};ci.filterProps=["rowGap"];const wu=ze({prop:"gridColumn"}),Su=ze({prop:"gridRow"}),Cu=ze({prop:"gridAutoFlow"}),Tu=ze({prop:"gridAutoColumns"}),Eu=ze({prop:"gridAutoRows"}),ju=ze({prop:"gridTemplateColumns"}),ku=ze({prop:"gridTemplateRows"}),Ou=ze({prop:"gridTemplateAreas"}),Fu=ze({prop:"gridArea"});ai(si,li,ci,wu,Su,Cu,Tu,Eu,ju,ku,Ou,Fu);function _n(e,t){return t==="grey"?t:e}const Au=ze({prop:"color",themeKey:"palette",transform:_n}),$u=ze({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:_n}),Ru=ze({prop:"backgroundColor",themeKey:"palette",transform:_n});ai(Au,$u,Ru);function it(e){return e<=1&&e!==0?`${e*100}%`:e}const Pu=ze({prop:"width",transform:it}),ha=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,a,o,s,c;const r=((o=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:o[n])||ti[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:it(n)}};return Mt(e,e.maxWidth,t)}return null};ha.filterProps=["maxWidth"];const Du=ze({prop:"minWidth",transform:it}),_u=ze({prop:"height",transform:it}),Mu=ze({prop:"maxHeight",transform:it}),Iu=ze({prop:"minHeight",transform:it});ze({prop:"size",cssProperty:"width",transform:it});ze({prop:"size",cssProperty:"height",transform:it});const zu=ze({prop:"boxSizing"});ai(Pu,ha,Du,_u,Mu,Iu,zu);const gr={border:{themeKey:"borders",transform:ft},borderTop:{themeKey:"borders",transform:ft},borderRight:{themeKey:"borders",transform:ft},borderBottom:{themeKey:"borders",transform:ft},borderLeft:{themeKey:"borders",transform:ft},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ft},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:oi},color:{themeKey:"palette",transform:_n},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:_n},backgroundColor:{themeKey:"palette",transform:_n},p:{style:_e},pt:{style:_e},pr:{style:_e},pb:{style:_e},pl:{style:_e},px:{style:_e},py:{style:_e},padding:{style:_e},paddingTop:{style:_e},paddingRight:{style:_e},paddingBottom:{style:_e},paddingLeft:{style:_e},paddingX:{style:_e},paddingY:{style:_e},paddingInline:{style:_e},paddingInlineStart:{style:_e},paddingInlineEnd:{style:_e},paddingBlock:{style:_e},paddingBlockStart:{style:_e},paddingBlockEnd:{style:_e},m:{style:De},mt:{style:De},mr:{style:De},mb:{style:De},ml:{style:De},mx:{style:De},my:{style:De},margin:{style:De},marginTop:{style:De},marginRight:{style:De},marginBottom:{style:De},marginLeft:{style:De},marginX:{style:De},marginY:{style:De},marginInline:{style:De},marginInlineStart:{style:De},marginInlineEnd:{style:De},marginBlock:{style:De},marginBlockStart:{style:De},marginBlockEnd:{style:De},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:si},rowGap:{style:ci},columnGap:{style:li},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:it},maxWidth:{style:ha},minWidth:{transform:it},height:{transform:it},maxHeight:{transform:it},minHeight:{transform:it},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Bu(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Nu(e,t){return typeof e=="function"?e(t):e}function Lu(){function e(n,r,i,a){const o={[n]:r,theme:i},s=a[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:h,style:m}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const d=ni(i,u)||{};return m?m(o):Mt(o,r,b=>{let f=Lr(d,h,b);return b===f&&typeof b=="string"&&(f=Lr(d,h,`${n}${b==="default"?"":Pe(b)}`,b)),c===!1?f:{[c]:f}})}function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const a=i.unstable_sxConfig??gr;function o(s){let c=s;if(typeof s=="function")c=s(i);else if(typeof s!="object")return s;if(!c)return null;const u=eu(i.breakpoints),h=Object.keys(u);let m=u;return Object.keys(c).forEach(d=>{const g=Nu(c[d],i);if(g!=null)if(typeof g=="object")if(a[d])m=ar(m,e(d,g,i,a));else{const b=Mt({theme:i},g,f=>({[d]:f}));Bu(b,g)?m[d]=t({sx:g,theme:i}):m=ar(m,b)}else m=ar(m,e(d,g,i,a))}),Qc(i,tu(h,m))}return Array.isArray(r)?r.map(o):o(r)}return t}const Kn=Lu();Kn.filterProps=["sx"];const Vu=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??gr;return Object.keys(e).forEach(i=>{n[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function qu(e){const{sx:t,...n}=e,{systemProps:r,otherProps:i}=Vu(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...o)=>{const s=t(...o);return Et(s)?{...r,...s}:r}:a={...r,...t},{...i,sx:a}}function Wu(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Uu={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Hu(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Yu=/[A-Z]|^ms/g,Ku=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$s=function(t){return t.charCodeAt(1)===45},co=function(t){return t!=null&&typeof t!="boolean"},wi=Hu(function(e){return $s(e)?e:e.replace(Yu,"-$&").toLowerCase()}),uo=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Ku,function(r,i,a){return Qt={name:i,styles:a,next:Qt},i})}return Uu[t]!==1&&!$s(t)&&typeof n=="number"&&n!==0?n+"px":n};function Vr(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Qt={name:i.name,styles:i.styles,next:Qt},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Qt={name:o.name,styles:o.styles,next:Qt},o=o.next;var s=a.styles+";";return s}return Qu(e,t,n)}}var c=n;return c}function Qu(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Vr(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;co(s)&&(r+=wi(a)+":"+uo(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var c=0;c<o.length;c++)co(o[c])&&(r+=wi(a)+":"+uo(a,o[c])+";");else{var u=Vr(e,t,o);switch(a){case"animation":case"animationName":{r+=wi(a)+":"+u+";";break}default:r+=a+"{"+u+"}"}}}return r}var po=/label:\s*([^\s;{]+)\s*(;|$)/g,Qt;function Gu(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";Qt=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=Vr(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Vr(n,t,e[s]),r){var c=a;i+=c[s]}po.lastIndex=0;for(var u="",h;(h=po.exec(i))!==null;)u+="-"+h[1];var m=Wu(i)+u;return{name:m,styles:i,next:Qt}}/**
41
41
  * @mui/styled-engine v7.1.1
42
42
  *
43
43
  * @license MIT
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
- */function Uu(e,t){const n=Hl(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const i=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
47
- `)):r.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function Hu(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const co=[];function uo(e){return co[0]=e,Wu(co)}const Yu=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Ku(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,a=Yu(t),o=Object.keys(a);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,g){const w=o.indexOf(g);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(w!==-1&&typeof t[o[w]]=="number"?t[o[w]]:g)-r/100}${n})`}function f(h){return o.indexOf(h)+1<o.length?u(h,o[o.indexOf(h)+1]):s(h)}function m(h){const g=o.indexOf(h);return g===0?s(o[1]):g===o.length-1?c(o[g]):u(h,o[o.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:o,values:a,up:s,down:c,between:u,only:f,not:m,unit:n,...i}}const Qu={borderRadius:4};function Fs(e=8,t=ua({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(a=>{const o=t(a);return typeof o=="number"?`${o}px`:o}).join(" "));return n.mui=!0,n}function Gu(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function da(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=Ku(n),c=Fs(i);let u=at({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...Qu,...a}},o);return u=Hc(u),u.applyStyles=Gu,u=t.reduce((f,m)=>at(f,m),u),u.unstable_sxConfig={...hr,...o==null?void 0:o.unstable_sxConfig},u.unstable_sx=function(m){return Hn({sx:m,theme:this})},u}function Zu(e){return Object.keys(e).length===0}function Xu(e=null){const t=J.useContext(Xt.ThemeContext);return!t||Zu(t)?e:t}const Ju=da();function ep(e=Ju){return Xu(e)}const po=e=>e,tp=()=>{let e=po;return{configure(t){e=t},generate(t){return e(t)},reset(){e=po}}},np=tp(),rp={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function en(e,t,n="Mui"){const r=rp[t];return r?`${n}-${r}`:`${np.generate(e)}-${t}`}function bn(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=en(e,i,n)}),r}function As(e,t=""){return e.displayName||e.name||t}function fo(e,t,n){const r=As(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function ip(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return As(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Mr.ForwardRef:return fo(e,e.render,"ForwardRef");case Mr.Memo:return fo(e,e.type,"memo");default:return}}}function $s(e){const{variants:t,...n}=e,r={variants:t,style:uo(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=uo(i.style))}),r}const ap=da();function vi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function op(e){return e?(t,n)=>n[e]:null}function sp(e,t,n){e.theme=pp(e.theme)?n:e.theme[t]||e.theme}function Or(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>Or(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:i,...a}=n;r=a}return Rs(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function Rs(e,t,n=[]){var i;let r;e:for(let a=0;a<t.length;a+=1){const o=t[a];if(typeof o.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!o.props(r))continue}else for(const s in o.props)if(e[s]!==o.props[s]&&((i=e.ownerState)==null?void 0:i[s])!==o.props[s])continue e;typeof o.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(o.style(r))):n.push(o.style)}return n}function lp(e={}){const{themeId:t,defaultTheme:n=ap,rootShouldForwardProp:r=vi,slotShouldForwardProp:i=vi}=e;function a(s){sp(s,t,n)}return(s,c={})=>{Hu(s,S=>S.filter(_=>_!==Hn));const{name:u,slot:f,skipVariantsResolver:m,skipSx:h,overridesResolver:g=op(Ps(f)),...w}=c,d=m!==void 0?m:f&&f!=="Root"&&f!=="root"||!1,E=h||!1;let y=vi;f==="Root"||f==="root"?y=r:f?y=i:dp(s)&&(y=void 0);const j=Uu(s,{shouldForwardProp:y,label:up(u,f),...w}),k=S=>{if(S.__emotion_real===S)return S;if(typeof S=="function")return function(M){return Or(M,S)};if(Et(S)){const _=$s(S);return _.variants?function(B){return Or(B,_)}:_.style}return S},v=(...S)=>{const _=[],M=S.map(k),B=[];if(_.push(a),u&&g&&B.push(function($){var V,K;const N=(K=(V=$.theme.components)==null?void 0:V[u])==null?void 0:K.styleOverrides;if(!N)return null;const re={};for(const te in N)re[te]=Or($,N[te]);return g($,re)}),u&&!d&&B.push(function($){var re,V;const G=$.theme,N=(V=(re=G==null?void 0:G.components)==null?void 0:re[u])==null?void 0:V.variants;return N?Rs($,N):null}),E||B.push(Hn),Array.isArray(M[0])){const R=M.shift(),$=new Array(_.length).fill(""),G=new Array(B.length).fill("");let N;N=[...$,...R,...G],N.raw=[...$,...R.raw,...G],_.unshift(N)}const q=[..._,...M,...B],p=j(...q);return s.muiName&&(p.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(p.displayName=cp(u,f,s)),p};return j.withConfig&&(v.withConfig=j.withConfig),v}}function cp(e,t,n){return e?`${e}${Pe(t||"")}`:`Styled(${ip(n)})`}function up(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Ps(t||"Root")}`),n}function pp(e){for(const t in e)return!1;return!0}function dp(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ps(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function qi(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]={...e[i],...n[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],o=t[i];if(!o)n[i]=a||{};else if(!a)n[i]=o;else{n[i]={...o};for(const s in a)if(Object.prototype.hasOwnProperty.call(a,s)){const c=s;n[i][c]=qi(a[c],o[c])}}}else n[i]===void 0&&(n[i]=e[i])}return n}const fp=typeof window<"u"?J.useLayoutEffect:J.useEffect;function hp(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function fa(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),hp(e,t,n)}function mp(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Zt(e){if(e.type)return e;if(e.charAt(0)==="#")return Zt(mp(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
48
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Gt(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
49
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Gt(10,i))}else r=r.split(",");return r=r.map(a=>parseFloat(a)),{type:n,values:r,colorSpace:i}}const xp=e=>{const t=Zt(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Xn=(e,t)=>{try{return xp(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function si(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function _s(e){e=Zt(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(u,f=(u+n/30)%12)=>i-a*Math.max(Math.min(f-3,9-f,1),-1);let s="rgb";const c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(s+="a",c.push(t[3])),si({type:s,values:c})}function Wi(e){e=Zt(e);let t=e.type==="hsl"||e.type==="hsla"?Zt(_s(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function ho(e,t){const n=Wi(e),r=Wi(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function ot(e,t){return e=Zt(e),t=fa(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,si(e)}function Sr(e,t,n){try{return ot(e,t)}catch{return e}}function ha(e,t){if(e=Zt(e),t=fa(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return si(e)}function ke(e,t,n){try{return ha(e,t)}catch{return e}}function ma(e,t){if(e=Zt(e),t=fa(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return si(e)}function Oe(e,t,n){try{return ma(e,t)}catch{return e}}function gp(e,t=.15){return Wi(e)>.5?ha(e,t):ma(e,t)}function Cr(e,t,n){try{return gp(e,t)}catch{return e}}const yp=J.createContext(void 0);process.env.NODE_ENV!=="production"&&(b.node,b.object);function vp(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?qi(i.defaultProps,r):!i.styleOverrides&&!i.variants?qi(i,r):r}function bp({props:e,name:t}){const n=J.useContext(yp);return vp({props:e,name:t,theme:{components:n}})}const mo={theme:void 0};function wp(e){let t,n;return function(i){let a=t;return(a===void 0||i.theme!==n)&&(mo.theme=i.theme,a=$s(e(mo)),t=a,n=i.theme),a}}function Sp(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const xo=(e,t,n,r=[])=>{let i=e;t.forEach((a,o)=>{o===t.length-1?Array.isArray(i)?i[Number(a)]=n:i&&typeof i=="object"&&(i[a]=n):i&&typeof i=="object"&&(i[a]||(i[a]=r.includes(a)?[]:{}),i=i[a])})},Cp=(e,t,n)=>{function r(i,a=[],o=[]){Object.entries(i).forEach(([s,c])=>{(!n||n&&!n([...a,s]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...a,s],Array.isArray(c)?[...o,s]:o):t([...a,s],c,o))})}r(e)},Tp=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function bi(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return Cp(e,(s,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(s,c))){const f=`--${n?`${n}-`:""}${s.join("-")}`,m=Tp(s,c);Object.assign(i,{[f]:m}),xo(a,s,`var(${f})`,u),xo(o,s,`var(${f}, ${m})`,u)}},s=>s[0]==="vars"),{css:i,vars:a,varsWithDefaults:o}}function Ep(e,t={}){const{getSelector:n=E,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:a={},components:o,defaultColorScheme:s="light",...c}=e,{vars:u,css:f,varsWithDefaults:m}=bi(c,t);let h=m;const g={},{[s]:w,...d}=a;if(Object.entries(d||{}).forEach(([k,v])=>{const{vars:S,css:_,varsWithDefaults:M}=bi(v,t);h=at(h,M),g[k]={css:_,vars:S}}),w){const{css:k,vars:v,varsWithDefaults:S}=bi(w,t);h=at(h,S),g[s]={css:k,vars:v}}function E(k,v){var _,M;let S=i;if(i==="class"&&(S=".%s"),i==="data"&&(S="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(S=`[${i}="%s"]`),k){if(S==="media")return e.defaultColorScheme===k?":root":{[`@media (prefers-color-scheme: ${((M=(_=a[k])==null?void 0:_.palette)==null?void 0:M.mode)||k})`]:{":root":v}};if(S)return e.defaultColorScheme===k?`:root, ${S.replace("%s",String(k))}`:S.replace("%s",String(k))}return":root"}return{vars:h,generateThemeVars:()=>{let k={...u};return Object.entries(g).forEach(([,{vars:v}])=>{k=at(k,v)}),k},generateStyleSheets:()=>{var B,q;const k=[],v=e.defaultColorScheme||"light";function S(p,R){Object.keys(R).length&&k.push(typeof p=="string"?{[p]:{...R}}:p)}S(n(void 0,{...f}),f);const{[v]:_,...M}=g;if(_){const{css:p}=_,R=(q=(B=a[v])==null?void 0:B.palette)==null?void 0:q.mode,$=!r&&R?{colorScheme:R,...p}:{...p};S(n(v,{...$}),$)}return Object.entries(M).forEach(([p,{css:R}])=>{var N,re;const $=(re=(N=a[p])==null?void 0:N.palette)==null?void 0:re.mode,G=!r&&$?{colorScheme:$,...R}:{...R};S(n(p,{...G}),G)}),k}}}function jp(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const ar={black:"#000",white:"#fff"},kp={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},En={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},jn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Gn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},kn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},On={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Fn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Ds(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ar.white,default:ar.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Op=Ds();function Is(){return{text:{primary:ar.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ar.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const go=Is();function yo(e,t,n,r){const i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=ma(e.main,i):t==="dark"&&(e.dark=ha(e.main,a)))}function Fp(e="light"){return e==="dark"?{main:kn[200],light:kn[50],dark:kn[400]}:{main:kn[700],light:kn[400],dark:kn[800]}}function Ap(e="light"){return e==="dark"?{main:En[200],light:En[50],dark:En[400]}:{main:En[500],light:En[300],dark:En[700]}}function $p(e="light"){return e==="dark"?{main:jn[500],light:jn[300],dark:jn[700]}:{main:jn[700],light:jn[400],dark:jn[800]}}function Rp(e="light"){return e==="dark"?{main:On[400],light:On[300],dark:On[700]}:{main:On[700],light:On[500],dark:On[900]}}function Pp(e="light"){return e==="dark"?{main:Fn[400],light:Fn[300],dark:Fn[700]}:{main:Fn[800],light:Fn[500],dark:Fn[900]}}function _p(e="light"){return e==="dark"?{main:Gn[400],light:Gn[300],dark:Gn[700]}:{main:"#ed6c02",light:Gn[500],dark:Gn[900]}}function xa(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,a=e.primary||Fp(t),o=e.secondary||Ap(t),s=e.error||$p(t),c=e.info||Rp(t),u=e.success||Pp(t),f=e.warning||_p(t);function m(d){const E=ho(d,go.text.primary)>=n?go.text.primary:Op.text.primary;if(process.env.NODE_ENV!=="production"){const y=ho(d,E);y<3&&console.error([`MUI: The contrast ratio of ${y}:1 for ${E} on ${d}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
50
- `))}return E}const h=({color:d,name:E,mainShade:y=500,lightShade:j=300,darkShade:k=700})=>{if(d={...d},!d.main&&d[y]&&(d.main=d[y]),!d.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${E?` (${E})`:""} provided to augmentColor(color) is invalid.
51
- The color object needs to have a \`main\` property or a \`${y}\` property.`:Gt(11,E?` (${E})`:"",y));if(typeof d.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${E?` (${E})`:""} provided to augmentColor(color) is invalid.
52
- \`color.main\` should be a string, but \`${JSON.stringify(d.main)}\` was provided instead.
46
+ */function Zu(e,t){const n=Xl(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const i=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
47
+ `)):r.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function Xu(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const fo=[];function ho(e){return fo[0]=e,Gu(fo)}const Ju=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function ep(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,a=Ju(t),o=Object.keys(a);function s(d){return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${n})`}function c(d){return`@media (max-width:${(typeof t[d]=="number"?t[d]:d)-r/100}${n})`}function u(d,g){const b=o.indexOf(g);return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${n}) and (max-width:${(b!==-1&&typeof t[o[b]]=="number"?t[o[b]]:g)-r/100}${n})`}function h(d){return o.indexOf(d)+1<o.length?u(d,o[o.indexOf(d)+1]):s(d)}function m(d){const g=o.indexOf(d);return g===0?s(o[1]):g===o.length-1?c(o[g]):u(d,o[o.indexOf(d)+1]).replace("@media","@media not all and")}return{keys:o,values:a,up:s,down:c,between:u,only:h,not:m,unit:n,...i}}const tp={borderRadius:4};function Rs(e=8,t=fa({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(a=>{const o=t(a);return typeof o=="number"?`${o}px`:o}).join(" "));return n.mui=!0,n}function np(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function ma(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=ep(n),c=Rs(i);let u=at({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...tp,...a}},o);return u=Xc(u),u.applyStyles=np,u=t.reduce((h,m)=>at(h,m),u),u.unstable_sxConfig={...gr,...o==null?void 0:o.unstable_sxConfig},u.unstable_sx=function(m){return Kn({sx:m,theme:this})},u}function rp(e){return Object.keys(e).length===0}function ip(e=null){const t=te.useContext(en.ThemeContext);return!t||rp(t)?e:t}const ap=ma();function op(e=ap){return ip(e)}const mo=e=>e,sp=()=>{let e=mo;return{configure(t){e=t},generate(t){return e(t)},reset(){e=mo}}},lp=sp(),cp={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 nn(e,t,n="Mui"){const r=cp[t];return r?`${n}-${r}`:`${lp.generate(e)}-${t}`}function Sn(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=nn(e,i,n)}),r}function Ps(e,t=""){return e.displayName||e.name||t}function xo(e,t,n){const r=Ps(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function up(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Ps(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Nr.ForwardRef:return xo(e,e.render,"ForwardRef");case Nr.Memo:return xo(e,e.type,"memo");default:return}}}function Ds(e){const{variants:t,...n}=e,r={variants:t,style:ho(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=ho(i.style))}),r}const pp=ma();function Si(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function dp(e){return e?(t,n)=>n[e]:null}function fp(e,t,n){e.theme=gp(e.theme)?n:e.theme[t]||e.theme}function Ar(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>Ar(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:i,...a}=n;r=a}return _s(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function _s(e,t,n=[]){var i;let r;e:for(let a=0;a<t.length;a+=1){const o=t[a];if(typeof o.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!o.props(r))continue}else for(const s in o.props)if(e[s]!==o.props[s]&&((i=e.ownerState)==null?void 0:i[s])!==o.props[s])continue e;typeof o.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(o.style(r))):n.push(o.style)}return n}function hp(e={}){const{themeId:t,defaultTheme:n=pp,rootShouldForwardProp:r=Si,slotShouldForwardProp:i=Si}=e;function a(s){fp(s,t,n)}return(s,c={})=>{Xu(s,S=>S.filter(P=>P!==Kn));const{name:u,slot:h,skipVariantsResolver:m,skipSx:d,overridesResolver:g=dp(Ms(h)),...b}=c,f=m!==void 0?m:h&&h!=="Root"&&h!=="root"||!1,E=d||!1;let y=Si;h==="Root"||h==="root"?y=r:h?y=i:yp(s)&&(y=void 0);const k=Zu(s,{shouldForwardProp:y,label:xp(u,h),...b}),j=S=>{if(S.__emotion_real===S)return S;if(typeof S=="function")return function(z){return Ar(z,S)};if(Et(S)){const P=Ds(S);return P.variants?function(I){return Ar(I,P)}:P.style}return S},v=(...S)=>{const P=[],z=S.map(j),I=[];if(P.push(a),u&&g&&I.push(function($){var V,Q;const N=(Q=(V=$.theme.components)==null?void 0:V[u])==null?void 0:Q.styleOverrides;if(!N)return null;const re={};for(const W in N)re[W]=Ar($,N[W]);return g($,re)}),u&&!f&&I.push(function($){var re,V;const Z=$.theme,N=(V=(re=Z==null?void 0:Z.components)==null?void 0:re[u])==null?void 0:V.variants;return N?_s($,N):null}),E||I.push(Kn),Array.isArray(z[0])){const R=z.shift(),$=new Array(P.length).fill(""),Z=new Array(I.length).fill("");let N;N=[...$,...R,...Z],N.raw=[...$,...R.raw,...Z],P.unshift(N)}const B=[...P,...z,...I],p=k(...B);return s.muiName&&(p.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(p.displayName=mp(u,h,s)),p};return k.withConfig&&(v.withConfig=k.withConfig),v}}function mp(e,t,n){return e?`${e}${Pe(t||"")}`:`Styled(${up(n)})`}function xp(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Ms(t||"Root")}`),n}function gp(e){for(const t in e)return!1;return!0}function yp(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ms(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Hi(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]={...e[i],...n[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],o=t[i];if(!o)n[i]=a||{};else if(!a)n[i]=o;else{n[i]={...o};for(const s in a)if(Object.prototype.hasOwnProperty.call(a,s)){const c=s;n[i][c]=Hi(a[c],o[c])}}}else n[i]===void 0&&(n[i]=e[i])}return n}const vp=typeof window<"u"?te.useLayoutEffect:te.useEffect;function bp(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function xa(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),bp(e,t,n)}function wp(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Jt(e){if(e.type)return e;if(e.charAt(0)==="#")return Jt(wp(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
48
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Xt(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
49
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Xt(10,i))}else r=r.split(",");return r=r.map(a=>parseFloat(a)),{type:n,values:r,colorSpace:i}}const Sp=e=>{const t=Jt(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},tr=(e,t)=>{try{return Sp(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function ui(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Is(e){e=Jt(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(u,h=(u+n/30)%12)=>i-a*Math.max(Math.min(h-3,9-h,1),-1);let s="rgb";const c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(s+="a",c.push(t[3])),ui({type:s,values:c})}function Yi(e){e=Jt(e);let t=e.type==="hsl"||e.type==="hsla"?Jt(Is(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function go(e,t){const n=Yi(e),r=Yi(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function ot(e,t){return e=Jt(e),t=xa(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ui(e)}function Tr(e,t,n){try{return ot(e,t)}catch{return e}}function ga(e,t){if(e=Jt(e),t=xa(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ui(e)}function ke(e,t,n){try{return ga(e,t)}catch{return e}}function ya(e,t){if(e=Jt(e),t=xa(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ui(e)}function Oe(e,t,n){try{return ya(e,t)}catch{return e}}function Cp(e,t=.15){return Yi(e)>.5?ga(e,t):ya(e,t)}function Er(e,t,n){try{return Cp(e,t)}catch{return e}}const Tp=te.createContext(void 0);process.env.NODE_ENV!=="production"&&(w.node,w.object);function Ep(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?Hi(i.defaultProps,r):!i.styleOverrides&&!i.variants?Hi(i,r):r}function jp({props:e,name:t}){const n=te.useContext(Tp);return Ep({props:e,name:t,theme:{components:n}})}const yo={theme:void 0};function kp(e){let t,n;return function(i){let a=t;return(a===void 0||i.theme!==n)&&(yo.theme=i.theme,a=Ds(e(yo)),t=a,n=i.theme),a}}function Op(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const vo=(e,t,n,r=[])=>{let i=e;t.forEach((a,o)=>{o===t.length-1?Array.isArray(i)?i[Number(a)]=n:i&&typeof i=="object"&&(i[a]=n):i&&typeof i=="object"&&(i[a]||(i[a]=r.includes(a)?[]:{}),i=i[a])})},Fp=(e,t,n)=>{function r(i,a=[],o=[]){Object.entries(i).forEach(([s,c])=>{(!n||n&&!n([...a,s]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...a,s],Array.isArray(c)?[...o,s]:o):t([...a,s],c,o))})}r(e)},Ap=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Ci(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return Fp(e,(s,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(s,c))){const h=`--${n?`${n}-`:""}${s.join("-")}`,m=Ap(s,c);Object.assign(i,{[h]:m}),vo(a,s,`var(${h})`,u),vo(o,s,`var(${h}, ${m})`,u)}},s=>s[0]==="vars"),{css:i,vars:a,varsWithDefaults:o}}function $p(e,t={}){const{getSelector:n=E,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:a={},components:o,defaultColorScheme:s="light",...c}=e,{vars:u,css:h,varsWithDefaults:m}=Ci(c,t);let d=m;const g={},{[s]:b,...f}=a;if(Object.entries(f||{}).forEach(([j,v])=>{const{vars:S,css:P,varsWithDefaults:z}=Ci(v,t);d=at(d,z),g[j]={css:P,vars:S}}),b){const{css:j,vars:v,varsWithDefaults:S}=Ci(b,t);d=at(d,S),g[s]={css:j,vars:v}}function E(j,v){var P,z;let S=i;if(i==="class"&&(S=".%s"),i==="data"&&(S="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(S=`[${i}="%s"]`),j){if(S==="media")return e.defaultColorScheme===j?":root":{[`@media (prefers-color-scheme: ${((z=(P=a[j])==null?void 0:P.palette)==null?void 0:z.mode)||j})`]:{":root":v}};if(S)return e.defaultColorScheme===j?`:root, ${S.replace("%s",String(j))}`:S.replace("%s",String(j))}return":root"}return{vars:d,generateThemeVars:()=>{let j={...u};return Object.entries(g).forEach(([,{vars:v}])=>{j=at(j,v)}),j},generateStyleSheets:()=>{var I,B;const j=[],v=e.defaultColorScheme||"light";function S(p,R){Object.keys(R).length&&j.push(typeof p=="string"?{[p]:{...R}}:p)}S(n(void 0,{...h}),h);const{[v]:P,...z}=g;if(P){const{css:p}=P,R=(B=(I=a[v])==null?void 0:I.palette)==null?void 0:B.mode,$=!r&&R?{colorScheme:R,...p}:{...p};S(n(v,{...$}),$)}return Object.entries(z).forEach(([p,{css:R}])=>{var N,re;const $=(re=(N=a[p])==null?void 0:N.palette)==null?void 0:re.mode,Z=!r&&$?{colorScheme:$,...R}:{...R};S(n(p,{...Z}),Z)}),j}}}function Rp(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const lr={black:"#000",white:"#fff"},Pp={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"},kn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},On={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Jn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Fn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},An={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},$n={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function zs(){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:lr.white,default:lr.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 Dp=zs();function Bs(){return{text:{primary:lr.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:lr.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 bo=Bs();function wo(e,t,n,r){const i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=ya(e.main,i):t==="dark"&&(e.dark=ga(e.main,a)))}function _p(e="light"){return e==="dark"?{main:Fn[200],light:Fn[50],dark:Fn[400]}:{main:Fn[700],light:Fn[400],dark:Fn[800]}}function Mp(e="light"){return e==="dark"?{main:kn[200],light:kn[50],dark:kn[400]}:{main:kn[500],light:kn[300],dark:kn[700]}}function Ip(e="light"){return e==="dark"?{main:On[500],light:On[300],dark:On[700]}:{main:On[700],light:On[400],dark:On[800]}}function zp(e="light"){return e==="dark"?{main:An[400],light:An[300],dark:An[700]}:{main:An[700],light:An[500],dark:An[900]}}function Bp(e="light"){return e==="dark"?{main:$n[400],light:$n[300],dark:$n[700]}:{main:$n[800],light:$n[500],dark:$n[900]}}function Np(e="light"){return e==="dark"?{main:Jn[400],light:Jn[300],dark:Jn[700]}:{main:"#ed6c02",light:Jn[500],dark:Jn[900]}}function va(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,a=e.primary||_p(t),o=e.secondary||Mp(t),s=e.error||Ip(t),c=e.info||zp(t),u=e.success||Bp(t),h=e.warning||Np(t);function m(f){const E=go(f,bo.text.primary)>=n?bo.text.primary:Dp.text.primary;if(process.env.NODE_ENV!=="production"){const y=go(f,E);y<3&&console.error([`MUI: The contrast ratio of ${y}:1 for ${E} on ${f}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
50
+ `))}return E}const d=({color:f,name:E,mainShade:y=500,lightShade:k=300,darkShade:j=700})=>{if(f={...f},!f.main&&f[y]&&(f.main=f[y]),!f.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${E?` (${E})`:""} provided to augmentColor(color) is invalid.
51
+ The color object needs to have a \`main\` property or a \`${y}\` property.`:Xt(11,E?` (${E})`:"",y));if(typeof f.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${E?` (${E})`:""} provided to augmentColor(color) is invalid.
52
+ \`color.main\` should be a string, but \`${JSON.stringify(f.main)}\` was provided instead.
53
53
 
54
54
  Did you intend to use one of the following approaches?
55
55
 
@@ -61,18 +61,18 @@ const theme1 = createTheme({ palette: {
61
61
 
62
62
  const theme2 = createTheme({ palette: {
63
63
  primary: { main: green[500] },
64
- } });`:Gt(12,E?` (${E})`:"",JSON.stringify(d.main)));return yo(d,"light",j,r),yo(d,"dark",k,r),d.contrastText||(d.contrastText=m(d.main)),d};let g;return t==="light"?g=Ds():t==="dark"&&(g=Is()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),at({common:{...ar},mode:t,primary:h({color:a,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:f,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:u,name:"success"}),grey:kp,contrastThreshold:n,getContrastText:m,augmentColor:h,tonalOffset:r,...g},i)}function Dp(e){const t={};return Object.entries(e).forEach(r=>{const[i,a]=r;typeof a=="object"&&(t[i]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function Ip(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Mp(e){return Math.round(e*1e5)/1e5}const vo={textTransform:"uppercase"},bo='"Roboto", "Helvetica", "Arial", sans-serif';function zp(e,t){const{fontFamily:n=bo,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:u,pxToRem:f,...m}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=r/14,g=f||(E=>`${E/c*h}rem`),w=(E,y,j,k,v)=>({fontFamily:n,fontWeight:E,fontSize:g(y),lineHeight:j,...n===bo?{letterSpacing:`${Mp(k/y)}em`}:{},...v,...u}),d={h1:w(i,96,1.167,-1.5),h2:w(i,60,1.2,-.5),h3:w(a,48,1.167,0),h4:w(a,34,1.235,.25),h5:w(a,24,1.334,0),h6:w(o,20,1.6,.15),subtitle1:w(a,16,1.75,.15),subtitle2:w(o,14,1.57,.1),body1:w(a,16,1.5,.15),body2:w(a,14,1.43,.15),button:w(o,14,1.75,.4,vo),caption:w(a,12,1.66,.4),overline:w(a,12,2.66,1,vo),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return at({htmlFontSize:c,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,...d},m,{clone:!1})}const Bp=.2,Np=.14,Lp=.12;function $e(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Bp})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Np})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Lp})`].join(",")}const Vp=["none",$e(0,2,1,-1,0,1,1,0,0,1,3,0),$e(0,3,1,-2,0,2,2,0,0,1,5,0),$e(0,3,3,-2,0,3,4,0,0,1,8,0),$e(0,2,4,-1,0,4,5,0,0,1,10,0),$e(0,3,5,-1,0,5,8,0,0,1,14,0),$e(0,3,5,-1,0,6,10,0,0,1,18,0),$e(0,4,5,-2,0,7,10,1,0,2,16,1),$e(0,5,5,-3,0,8,10,1,0,3,14,2),$e(0,5,6,-3,0,9,12,1,0,3,16,2),$e(0,6,6,-3,0,10,14,1,0,4,18,3),$e(0,6,7,-4,0,11,15,1,0,4,20,3),$e(0,7,8,-4,0,12,17,2,0,5,22,4),$e(0,7,8,-4,0,13,19,2,0,5,24,4),$e(0,7,9,-4,0,14,21,2,0,5,26,4),$e(0,8,9,-5,0,15,22,2,0,6,28,5),$e(0,8,10,-5,0,16,24,2,0,6,30,5),$e(0,8,11,-5,0,17,26,2,0,6,32,5),$e(0,9,11,-5,0,18,28,2,0,7,34,6),$e(0,9,12,-6,0,19,29,2,0,7,36,6),$e(0,10,13,-6,0,20,31,3,0,8,38,7),$e(0,10,13,-6,0,21,33,3,0,8,40,7),$e(0,10,14,-6,0,22,35,3,0,8,42,7),$e(0,11,14,-7,0,23,36,3,0,9,44,8),$e(0,11,15,-7,0,24,38,3,0,9,46,8)],qp={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Wp={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function wo(e){return`${Math.round(e)}ms`}function Up(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Hp(e){const t={...qp,...e.easing},n={...Wp,...e.duration};return{getAutoHeightDuration:Up,create:(i=["all"],a={})=>{const{duration:o=n.standard,easing:s=t.easeInOut,delay:c=0,...u}=a;if(process.env.NODE_ENV!=="production"){const f=h=>typeof h=="string",m=h=>!Number.isNaN(parseFloat(h));!f(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!m(o)&&!f(o)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),f(s)||console.error('MUI: Argument "easing" must be a string.'),!m(c)&&!f(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
65
- `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof o=="string"?o:wo(o)} ${s} ${typeof c=="string"?c:wo(c)}`).join(",")},...e,easing:t,duration:n}}const Yp={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Kp(e){return Et(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ms(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let a=0;a<i.length;a++){const[o,s]=i[a];!Kp(s)||o.startsWith("unstable_")?delete r[o]:Et(s)&&(r[o]={...s},n(r[o]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
64
+ } });`:Xt(12,E?` (${E})`:"",JSON.stringify(f.main)));return wo(f,"light",k,r),wo(f,"dark",j,r),f.contrastText||(f.contrastText=m(f.main)),f};let g;return t==="light"?g=zs():t==="dark"&&(g=Bs()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),at({common:{...lr},mode:t,primary:d({color:a,name:"primary"}),secondary:d({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:d({color:s,name:"error"}),warning:d({color:h,name:"warning"}),info:d({color:c,name:"info"}),success:d({color:u,name:"success"}),grey:Pp,contrastThreshold:n,getContrastText:m,augmentColor:d,tonalOffset:r,...g},i)}function Lp(e){const t={};return Object.entries(e).forEach(r=>{const[i,a]=r;typeof a=="object"&&(t[i]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function Vp(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function qp(e){return Math.round(e*1e5)/1e5}const So={textTransform:"uppercase"},Co='"Roboto", "Helvetica", "Arial", sans-serif';function Wp(e,t){const{fontFamily:n=Co,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:u,pxToRem:h,...m}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const d=r/14,g=h||(E=>`${E/c*d}rem`),b=(E,y,k,j,v)=>({fontFamily:n,fontWeight:E,fontSize:g(y),lineHeight:k,...n===Co?{letterSpacing:`${qp(j/y)}em`}:{},...v,...u}),f={h1:b(i,96,1.167,-1.5),h2:b(i,60,1.2,-.5),h3:b(a,48,1.167,0),h4:b(a,34,1.235,.25),h5:b(a,24,1.334,0),h6:b(o,20,1.6,.15),subtitle1:b(a,16,1.75,.15),subtitle2:b(o,14,1.57,.1),body1:b(a,16,1.5,.15),body2:b(a,14,1.43,.15),button:b(o,14,1.75,.4,So),caption:b(a,12,1.66,.4),overline:b(a,12,2.66,1,So),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return at({htmlFontSize:c,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,...f},m,{clone:!1})}const Up=.2,Hp=.14,Yp=.12;function $e(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Up})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Hp})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Yp})`].join(",")}const Kp=["none",$e(0,2,1,-1,0,1,1,0,0,1,3,0),$e(0,3,1,-2,0,2,2,0,0,1,5,0),$e(0,3,3,-2,0,3,4,0,0,1,8,0),$e(0,2,4,-1,0,4,5,0,0,1,10,0),$e(0,3,5,-1,0,5,8,0,0,1,14,0),$e(0,3,5,-1,0,6,10,0,0,1,18,0),$e(0,4,5,-2,0,7,10,1,0,2,16,1),$e(0,5,5,-3,0,8,10,1,0,3,14,2),$e(0,5,6,-3,0,9,12,1,0,3,16,2),$e(0,6,6,-3,0,10,14,1,0,4,18,3),$e(0,6,7,-4,0,11,15,1,0,4,20,3),$e(0,7,8,-4,0,12,17,2,0,5,22,4),$e(0,7,8,-4,0,13,19,2,0,5,24,4),$e(0,7,9,-4,0,14,21,2,0,5,26,4),$e(0,8,9,-5,0,15,22,2,0,6,28,5),$e(0,8,10,-5,0,16,24,2,0,6,30,5),$e(0,8,11,-5,0,17,26,2,0,6,32,5),$e(0,9,11,-5,0,18,28,2,0,7,34,6),$e(0,9,12,-6,0,19,29,2,0,7,36,6),$e(0,10,13,-6,0,20,31,3,0,8,38,7),$e(0,10,13,-6,0,21,33,3,0,8,40,7),$e(0,10,14,-6,0,22,35,3,0,8,42,7),$e(0,11,14,-7,0,23,36,3,0,9,44,8),$e(0,11,15,-7,0,24,38,3,0,9,46,8)],Qp={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Gp={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function To(e){return`${Math.round(e)}ms`}function Zp(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Xp(e){const t={...Qp,...e.easing},n={...Gp,...e.duration};return{getAutoHeightDuration:Zp,create:(i=["all"],a={})=>{const{duration:o=n.standard,easing:s=t.easeInOut,delay:c=0,...u}=a;if(process.env.NODE_ENV!=="production"){const h=d=>typeof d=="string",m=d=>!Number.isNaN(parseFloat(d));!h(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!m(o)&&!h(o)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),h(s)||console.error('MUI: Argument "easing" must be a string.'),!m(c)&&!h(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
65
+ `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(h=>`${h} ${typeof o=="string"?o:To(o)} ${s} ${typeof c=="string"?c:To(c)}`).join(",")},...e,easing:t,duration:n}}const Jp={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ed(e){return Et(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ns(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let a=0;a<i.length;a++){const[o,s]=i[a];!ed(s)||o.startsWith("unstable_")?delete r[o]:Et(s)&&(r[o]={...s},n(r[o]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
66
66
 
67
67
  const theme = ${JSON.stringify(t,null,2)};
68
68
 
69
69
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
70
70
  theme.transitions = createTransitions(theme.transitions || {});
71
71
 
72
- export default theme;`}function Ui(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:c,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Gt(20));const f=xa(a),m=da(e);let h=at(m,{mixins:Ip(m.breakpoints,r),palette:f,shadows:Vp.slice(),typography:zp(f,s),transitions:Hp(o),zIndex:{...Yp}});if(h=at(h,u),h=t.reduce((g,w)=>at(g,w),h),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],w=(d,E)=>{let y;for(y in d){const j=d[y];if(g.includes(y)&&Object.keys(j).length>0){if(process.env.NODE_ENV!=="production"){const k=en("",y);console.error([`MUI: The \`${E}\` component increases the CSS specificity of the \`${y}\` internal state.`,"You can not override it like this: ",JSON.stringify(d,null,2),"",`Instead, you need to use the '&.${k}' syntax:`,JSON.stringify({root:{[`&.${k}`]:j}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
73
- `))}d[y]={}}}};Object.keys(h.components).forEach(d=>{const E=h.components[d].styleOverrides;E&&d.startsWith("Mui")&&w(E,d)})}return h.unstable_sxConfig={...hr,...u==null?void 0:u.unstable_sxConfig},h.unstable_sx=function(w){return Hn({sx:w,theme:this})},h.toRuntimeSource=Ms,h}function Qp(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Gp=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Qp(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function zs(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Bs(e){return e==="dark"?Gp:[]}function Zp(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,a=xa(t);return{palette:a,opacity:{...zs(a.mode),...n},overlays:r||Bs(a.mode),...i}}function Xp(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Jp=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],ed=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let a=i;if(i==="class"&&(a=".%s"),i==="data"&&(a="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return Jp(e.cssVarPrefix).forEach(s=>{o[s]=n[s],delete n[s]}),a==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:a?{[a.replace("%s",t)]:o,[`${r}, ${a.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(a&&a!=="media")return`${r}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace("%s",String(t))}return r};function td(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function P(e,t,n){!e[t]&&n&&(e[t]=n)}function Jn(e){return typeof e!="string"||!e.startsWith("hsl")?e:_s(e)}function Ot(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Xn(Jn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
74
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function nd(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const vt=e=>{try{return e()}catch{}},rd=(e="mui")=>Sp(e);function wi(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Zp({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...o}=Ui({...n,palette:{mode:i,...t==null?void 0:t.palette}});return e[r]={...t,palette:a,opacity:{...zs(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Bs(i)},o}function id(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:o=Xp,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,f=Object.keys(n)[0],m=r||(n.light&&f!=="light"?"light":f),h=rd(a),{[m]:g,light:w,dark:d,...E}=n,y={...E};let j=g;if((m==="dark"&&!("dark"in n)||m==="light"&&!("light"in n))&&(j=!0),!j)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:Gt(21,m));const k=wi(y,j,u,m);w&&!y.light&&wi(y,w,void 0,"light"),d&&!y.dark&&wi(y,d,void 0,"dark");let v={defaultColorScheme:m,...k,cssVarPrefix:a,colorSchemeSelector:s,rootSelector:c,getCssVar:h,colorSchemes:y,font:{...Dp(k.typography),...k.font},spacing:nd(u.spacing)};Object.keys(v.colorSchemes).forEach(q=>{const p=v.colorSchemes[q].palette,R=$=>{const G=$.split("-"),N=G[1],re=G[2];return h($,p[N][re])};if(p.mode==="light"&&(P(p.common,"background","#fff"),P(p.common,"onBackground","#000")),p.mode==="dark"&&(P(p.common,"background","#000"),P(p.common,"onBackground","#fff")),td(p,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),p.mode==="light"){P(p.Alert,"errorColor",ke(p.error.light,.6)),P(p.Alert,"infoColor",ke(p.info.light,.6)),P(p.Alert,"successColor",ke(p.success.light,.6)),P(p.Alert,"warningColor",ke(p.warning.light,.6)),P(p.Alert,"errorFilledBg",R("palette-error-main")),P(p.Alert,"infoFilledBg",R("palette-info-main")),P(p.Alert,"successFilledBg",R("palette-success-main")),P(p.Alert,"warningFilledBg",R("palette-warning-main")),P(p.Alert,"errorFilledColor",vt(()=>p.getContrastText(p.error.main))),P(p.Alert,"infoFilledColor",vt(()=>p.getContrastText(p.info.main))),P(p.Alert,"successFilledColor",vt(()=>p.getContrastText(p.success.main))),P(p.Alert,"warningFilledColor",vt(()=>p.getContrastText(p.warning.main))),P(p.Alert,"errorStandardBg",Oe(p.error.light,.9)),P(p.Alert,"infoStandardBg",Oe(p.info.light,.9)),P(p.Alert,"successStandardBg",Oe(p.success.light,.9)),P(p.Alert,"warningStandardBg",Oe(p.warning.light,.9)),P(p.Alert,"errorIconColor",R("palette-error-main")),P(p.Alert,"infoIconColor",R("palette-info-main")),P(p.Alert,"successIconColor",R("palette-success-main")),P(p.Alert,"warningIconColor",R("palette-warning-main")),P(p.AppBar,"defaultBg",R("palette-grey-100")),P(p.Avatar,"defaultBg",R("palette-grey-400")),P(p.Button,"inheritContainedBg",R("palette-grey-300")),P(p.Button,"inheritContainedHoverBg",R("palette-grey-A100")),P(p.Chip,"defaultBorder",R("palette-grey-400")),P(p.Chip,"defaultAvatarColor",R("palette-grey-700")),P(p.Chip,"defaultIconColor",R("palette-grey-700")),P(p.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),P(p.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),P(p.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),P(p.LinearProgress,"primaryBg",Oe(p.primary.main,.62)),P(p.LinearProgress,"secondaryBg",Oe(p.secondary.main,.62)),P(p.LinearProgress,"errorBg",Oe(p.error.main,.62)),P(p.LinearProgress,"infoBg",Oe(p.info.main,.62)),P(p.LinearProgress,"successBg",Oe(p.success.main,.62)),P(p.LinearProgress,"warningBg",Oe(p.warning.main,.62)),P(p.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),P(p.Slider,"primaryTrack",Oe(p.primary.main,.62)),P(p.Slider,"secondaryTrack",Oe(p.secondary.main,.62)),P(p.Slider,"errorTrack",Oe(p.error.main,.62)),P(p.Slider,"infoTrack",Oe(p.info.main,.62)),P(p.Slider,"successTrack",Oe(p.success.main,.62)),P(p.Slider,"warningTrack",Oe(p.warning.main,.62));const $=Cr(p.background.default,.8);P(p.SnackbarContent,"bg",$),P(p.SnackbarContent,"color",vt(()=>p.getContrastText($))),P(p.SpeedDialAction,"fabHoverBg",Cr(p.background.paper,.15)),P(p.StepConnector,"border",R("palette-grey-400")),P(p.StepContent,"border",R("palette-grey-400")),P(p.Switch,"defaultColor",R("palette-common-white")),P(p.Switch,"defaultDisabledColor",R("palette-grey-100")),P(p.Switch,"primaryDisabledColor",Oe(p.primary.main,.62)),P(p.Switch,"secondaryDisabledColor",Oe(p.secondary.main,.62)),P(p.Switch,"errorDisabledColor",Oe(p.error.main,.62)),P(p.Switch,"infoDisabledColor",Oe(p.info.main,.62)),P(p.Switch,"successDisabledColor",Oe(p.success.main,.62)),P(p.Switch,"warningDisabledColor",Oe(p.warning.main,.62)),P(p.TableCell,"border",Oe(Sr(p.divider,1),.88)),P(p.Tooltip,"bg",Sr(p.grey[700],.92))}if(p.mode==="dark"){P(p.Alert,"errorColor",Oe(p.error.light,.6)),P(p.Alert,"infoColor",Oe(p.info.light,.6)),P(p.Alert,"successColor",Oe(p.success.light,.6)),P(p.Alert,"warningColor",Oe(p.warning.light,.6)),P(p.Alert,"errorFilledBg",R("palette-error-dark")),P(p.Alert,"infoFilledBg",R("palette-info-dark")),P(p.Alert,"successFilledBg",R("palette-success-dark")),P(p.Alert,"warningFilledBg",R("palette-warning-dark")),P(p.Alert,"errorFilledColor",vt(()=>p.getContrastText(p.error.dark))),P(p.Alert,"infoFilledColor",vt(()=>p.getContrastText(p.info.dark))),P(p.Alert,"successFilledColor",vt(()=>p.getContrastText(p.success.dark))),P(p.Alert,"warningFilledColor",vt(()=>p.getContrastText(p.warning.dark))),P(p.Alert,"errorStandardBg",ke(p.error.light,.9)),P(p.Alert,"infoStandardBg",ke(p.info.light,.9)),P(p.Alert,"successStandardBg",ke(p.success.light,.9)),P(p.Alert,"warningStandardBg",ke(p.warning.light,.9)),P(p.Alert,"errorIconColor",R("palette-error-main")),P(p.Alert,"infoIconColor",R("palette-info-main")),P(p.Alert,"successIconColor",R("palette-success-main")),P(p.Alert,"warningIconColor",R("palette-warning-main")),P(p.AppBar,"defaultBg",R("palette-grey-900")),P(p.AppBar,"darkBg",R("palette-background-paper")),P(p.AppBar,"darkColor",R("palette-text-primary")),P(p.Avatar,"defaultBg",R("palette-grey-600")),P(p.Button,"inheritContainedBg",R("palette-grey-800")),P(p.Button,"inheritContainedHoverBg",R("palette-grey-700")),P(p.Chip,"defaultBorder",R("palette-grey-700")),P(p.Chip,"defaultAvatarColor",R("palette-grey-300")),P(p.Chip,"defaultIconColor",R("palette-grey-300")),P(p.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),P(p.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),P(p.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),P(p.LinearProgress,"primaryBg",ke(p.primary.main,.5)),P(p.LinearProgress,"secondaryBg",ke(p.secondary.main,.5)),P(p.LinearProgress,"errorBg",ke(p.error.main,.5)),P(p.LinearProgress,"infoBg",ke(p.info.main,.5)),P(p.LinearProgress,"successBg",ke(p.success.main,.5)),P(p.LinearProgress,"warningBg",ke(p.warning.main,.5)),P(p.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),P(p.Slider,"primaryTrack",ke(p.primary.main,.5)),P(p.Slider,"secondaryTrack",ke(p.secondary.main,.5)),P(p.Slider,"errorTrack",ke(p.error.main,.5)),P(p.Slider,"infoTrack",ke(p.info.main,.5)),P(p.Slider,"successTrack",ke(p.success.main,.5)),P(p.Slider,"warningTrack",ke(p.warning.main,.5));const $=Cr(p.background.default,.98);P(p.SnackbarContent,"bg",$),P(p.SnackbarContent,"color",vt(()=>p.getContrastText($))),P(p.SpeedDialAction,"fabHoverBg",Cr(p.background.paper,.15)),P(p.StepConnector,"border",R("palette-grey-600")),P(p.StepContent,"border",R("palette-grey-600")),P(p.Switch,"defaultColor",R("palette-grey-300")),P(p.Switch,"defaultDisabledColor",R("palette-grey-600")),P(p.Switch,"primaryDisabledColor",ke(p.primary.main,.55)),P(p.Switch,"secondaryDisabledColor",ke(p.secondary.main,.55)),P(p.Switch,"errorDisabledColor",ke(p.error.main,.55)),P(p.Switch,"infoDisabledColor",ke(p.info.main,.55)),P(p.Switch,"successDisabledColor",ke(p.success.main,.55)),P(p.Switch,"warningDisabledColor",ke(p.warning.main,.55)),P(p.TableCell,"border",ke(Sr(p.divider,1),.68)),P(p.Tooltip,"bg",Sr(p.grey[700],.92))}Ot(p.background,"default"),Ot(p.background,"paper"),Ot(p.common,"background"),Ot(p.common,"onBackground"),Ot(p,"divider"),Object.keys(p).forEach($=>{const G=p[$];$!=="tonalOffset"&&G&&typeof G=="object"&&(G.main&&P(p[$],"mainChannel",Xn(Jn(G.main))),G.light&&P(p[$],"lightChannel",Xn(Jn(G.light))),G.dark&&P(p[$],"darkChannel",Xn(Jn(G.dark))),G.contrastText&&P(p[$],"contrastTextChannel",Xn(Jn(G.contrastText))),$==="text"&&(Ot(p[$],"primary"),Ot(p[$],"secondary")),$==="action"&&(G.active&&Ot(p[$],"active"),G.selected&&Ot(p[$],"selected")))})}),v=t.reduce((q,p)=>at(q,p),v);const S={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:ed(v)},{vars:_,generateThemeVars:M,generateStyleSheets:B}=Ep(v,S);return v.vars=_,Object.entries(v.colorSchemes[v.defaultColorScheme]).forEach(([q,p])=>{v[q]=p}),v.generateThemeVars=M,v.generateStyleSheets=B,v.generateSpacing=function(){return Fs(u.spacing,ua(this))},v.getColorSchemeSelector=jp(s),v.spacing=v.generateSpacing(),v.shouldSkipGeneratingVar=o,v.unstable_sxConfig={...hr,...u==null?void 0:u.unstable_sxConfig},v.unstable_sx=function(p){return Hn({sx:p,theme:this})},v.toRuntimeSource=Ms,v}function So(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:xa({...n===!0?{}:n.palette,mode:t})})}function Ns(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n==null?void 0:n.mode,...o}=e,s=a||"light",c=i==null?void 0:i[s],u={...i,...n?{[s]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Ui(e,...t);let f=n;"palette"in e||u[s]&&(u[s]!==!0?f=u[s].palette:s==="dark"&&(f={mode:"dark"}));const m=Ui({...e,palette:f},...t);return m.defaultColorScheme=s,m.colorSchemes=u,m.palette.mode==="light"&&(m.colorSchemes.light={...u.light!==!0&&u.light,palette:m.palette},So(m,"dark",u.dark)),m.palette.mode==="dark"&&(m.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:m.palette},So(m,"light",u.light)),m}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),id({...o,colorSchemes:u,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Ls=Ns(),Vs="$$material";function qs(){const e=ep(Ls);return process.env.NODE_ENV!=="production"&&J.useDebugValue(e),e[Vs]||e}function ad(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const od=e=>ad(e)&&e!=="classes",lt=lp({themeId:Vs,defaultTheme:Ls,rootShouldForwardProp:od});function sd(){return Mu}const vn=wp;process.env.NODE_ENV!=="production"&&(b.node,b.object.isRequired);function wn(e){return bp(e)}function ld(e){return typeof e.main=="string"}function cd(e,t=[]){if(!ld(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Nr(e=[]){return([,t])=>t&&cd(t,e)}function ud(e){return en("MuiTypography",e)}bn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const pd={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},dd=sd(),fd=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:a,classes:o}=e,s={root:["root",a,e.align!=="inherit"&&`align${Pe(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Kn(s,ud,o)},hd=lt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Pe(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(vn(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(Nr()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Pe(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),Co={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ws=J.forwardRef(function(t,n){const{color:r,...i}=wn({props:t,name:"MuiTypography"}),a=!pd[r],o=dd({...i,...a&&{color:r}}),{align:s="inherit",className:c,component:u,gutterBottom:f=!1,noWrap:m=!1,paragraph:h=!1,variant:g="body1",variantMapping:w=Co,...d}=o,E={...o,align:s,color:r,className:c,component:u,gutterBottom:f,noWrap:m,paragraph:h,variant:g,variantMapping:w},y=u||(h?"p":w[g]||Co[g])||"span",j=fd(E);return l.jsx(hd,{as:y,ref:n,className:He(j.root,c),...d,ownerState:E,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...d.style}})});process.env.NODE_ENV!=="production"&&(Ws.propTypes={align:b.oneOf(["center","inherit","justify","left","right"]),children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),b.string]),component:b.elementType,gutterBottom:b.bool,noWrap:b.bool,paragraph:b.bool,style:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),variant:b.oneOfType([b.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),b.string]),variantMapping:b.object});const ga=J.createContext(void 0);process.env.NODE_ENV!=="production"&&(ga.displayName="FormControlContext");function md(){return J.useContext(ga)}function xd(e){return en("MuiInputAdornment",e)}const To=bn("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Eo;const gd=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Pe(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},yd=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e,s={root:["root",n&&"disablePointerEvents",i&&`position${Pe(i)}`,o,r&&"hiddenLabel",a&&`size${Pe(a)}`]};return Kn(s,xd,t)},vd=lt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:gd})(vn(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${To.positionStart}&:not(.${To.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Us=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:o="div",disablePointerEvents:s=!1,disableTypography:c=!1,position:u,variant:f,...m}=r,h=md()||{};let g=f;f&&h.variant&&process.env.NODE_ENV!=="production"&&f===h.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),h&&!g&&(g=h.variant);const w={...r,hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:s,position:u,variant:g},d=yd(w);return l.jsx(ga.Provider,{value:null,children:l.jsx(vd,{as:o,ownerState:w,className:He(d.root,a),ref:n,...m,children:typeof i=="string"&&!c?l.jsx(Ws,{color:"textSecondary",children:i}):l.jsxs(J.Fragment,{children:[u==="start"?Eo||(Eo=l.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Us.propTypes={children:b.node,classes:b.object,className:b.string,component:b.elementType,disablePointerEvents:b.bool,disableTypography:b.bool,position:b.oneOf(["end","start"]).isRequired,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),variant:b.oneOf(["filled","outlined","standard"])});function ya(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function bd(e){return en("MuiSvgIcon",e)}bn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const wd=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Pe(t)}`,`fontSize${Pe(n)}`]};return Kn(i,bd,r)},Sd=lt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Pe(n.color)}`],t[`fontSize${Pe(n.fontSize)}`]]}})(vn(({theme:e})=>{var t,n,r,i,a,o,s,c,u,f,m,h,g,w;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:d=>!d.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:o.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:c.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:f.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,d])=>d&&d.main).map(([d])=>{var E,y;return{props:{color:d},style:{color:(y=(E=(e.vars??e).palette)==null?void 0:E[d])==null?void 0:y.main}}}),{props:{color:"action"},style:{color:(h=(m=(e.vars??e).palette)==null?void 0:m.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(w=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Lr=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:o="inherit",component:s="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:m,viewBox:h="0 0 24 24",...g}=r,w=J.isValidElement(i)&&i.type==="svg",d={...r,color:o,component:s,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:h,hasSvgAsChild:w},E={};f||(E.viewBox=h);const y=wd(d);return l.jsxs(Sd,{as:s,className:He(y.root,a),focusable:"false",color:u,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:n,...E,...g,...w&&i.props,ownerState:d,children:[w?i.props.children:i,m?l.jsx("title",{children:m}):null]})});process.env.NODE_ENV!=="production"&&(Lr.propTypes={children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),b.string]),component:b.elementType,fontSize:b.oneOfType([b.oneOf(["inherit","large","medium","small"]),b.string]),htmlColor:b.string,inheritViewBox:b.bool,shapeRendering:b.string,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),titleAccess:b.string,viewBox:b.string});Lr.muiName="SvgIcon";function Je(e,t){function n(r,i){return l.jsx(Lr,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Lr.muiName,J.memo(J.forwardRef(n))}let jo=0;function Cd(e){const[t,n]=J.useState(e),r=e||t;return J.useEffect(()=>{t==null&&(jo+=1,n(`mui-${jo}`))},[t]),r}const Td={...J},ko=Td.useId;function Ed(e){if(ko!==void 0){const t=ko();return e??t}return Cd(e)}function Fr(e){const t=J.useRef(e);return fp(()=>{t.current=e}),J.useRef((...n)=>(0,t.current)(...n)).current}function Oo(...e){const t=J.useRef(void 0),n=J.useCallback(r=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const o=a,s=o(r);return typeof s=="function"?s:()=>{o(null)}}return a.current=r,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return J.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const jd=b.oneOfType([b.func,b.object]);function kd(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Od(e,t,n,r,i){const a=e[t],o=i||t;if(a==null||typeof window>"u")return null;let s;return typeof a=="function"&&!kd(a)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${r} \`${o}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Fd=ya(b.elementType,Od);function Fo(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
75
- `))}return!1}const Ao={};function Hs(e,t){const n=J.useRef(Ao);return n.current===Ao&&(n.current=e(t)),n}class Vr{constructor(){Qn(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new Vr}static use(){const t=Hs(Vr.create).current,[n,r]=J.useState(!1);return t.shouldMount=n,t.setShouldMount=r,J.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=$d(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function Ad(){return Vr.use()}function $d(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hi.apply(null,arguments)}function Rd(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yi(e,t){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Yi(e,t)}function Pd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yi(e,t)}const $o=I.createContext(null);function _d(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function va(e,t){var n=function(a){return t&&I.isValidElement(a)?t(a):a},r=Object.create(null);return e&&I.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function Dd(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var u=r[c][o];s[r[c][o]]=n(u)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function on(e,t,n){return n[t]!=null?n[t]:e.props[t]}function Id(e,t){return va(e.children,function(n){return I.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:on(n,"appear",e),enter:on(n,"enter",e),exit:on(n,"exit",e)})})}function Md(e,t,n){var r=va(e.children),i=Dd(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if(I.isValidElement(o)){var s=a in t,c=a in r,u=t[a],f=I.isValidElement(u)&&!u.props.in;c&&(!s||f)?i[a]=I.cloneElement(o,{onExited:n.bind(null,o),in:!0,exit:on(o,"exit",e),enter:on(o,"enter",e)}):!c&&s&&!f?i[a]=I.cloneElement(o,{in:!1}):c&&s&&I.isValidElement(u)&&(i[a]=I.cloneElement(o,{onExited:n.bind(null,o),in:u.props.in,exit:on(o,"exit",e),enter:on(o,"enter",e)}))}}),i}var zd=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Bd={component:"div",childFactory:function(t){return t}},ba=function(e){Pd(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var o=a.handleExited.bind(_d(a));return a.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},a}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,a){var o=a.children,s=a.handleExited,c=a.firstRender;return{children:c?Id(i,s):Md(i,o,s),firstRender:!1}},n.handleExited=function(i,a){var o=va(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(s){var c=Hi({},s.children);return delete c[i.key],{children:c}}))},n.render=function(){var i=this.props,a=i.component,o=i.childFactory,s=Rd(i,["component","childFactory"]),c=this.state.contextValue,u=zd(this.state.children).map(o);return delete s.appear,delete s.enter,delete s.exit,a===null?I.createElement($o.Provider,{value:c},u):I.createElement($o.Provider,{value:c},I.createElement(a,s,u))},t}(I.Component);ba.propTypes=process.env.NODE_ENV!=="production"?{component:b.any,children:b.node,appear:b.bool,enter:b.bool,exit:b.bool,childFactory:b.func}:{};ba.defaultProps=Bd;const Nd=[];function Ld(e){J.useEffect(e,Nd)}class wa{constructor(){Qn(this,"currentId",null);Qn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Qn(this,"disposeEffect",()=>this.clear)}static create(){return new wa}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Vd(){const e=Hs(wa.create).current;return Ld(e.disposeEffect),e}function Ys(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:u}=e,[f,m]=J.useState(!1),h=He(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},w=He(n.child,f&&n.childLeaving,r&&n.childPulsate);return!s&&!f&&m(!0),J.useEffect(()=>{if(!s&&c!=null){const d=setTimeout(c,u);return()=>{clearTimeout(d)}}},[c,s,u]),l.jsx("span",{className:h,style:g,children:l.jsx("span",{className:w})})}process.env.NODE_ENV!=="production"&&(Ys.propTypes={classes:b.object.isRequired,className:b.string,in:b.bool,onExited:b.func,pulsate:b.bool,rippleSize:b.number,rippleX:b.number,rippleY:b.number,timeout:b.number.isRequired});const dt=bn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ki=550,qd=80,Wd=Xt.keyframes`
72
+ export default theme;`}function Ki(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:c,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Xt(20));const h=va(a),m=ma(e);let d=at(m,{mixins:Vp(m.breakpoints,r),palette:h,shadows:Kp.slice(),typography:Wp(h,s),transitions:Xp(o),zIndex:{...Jp}});if(d=at(d,u),d=t.reduce((g,b)=>at(g,b),d),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(f,E)=>{let y;for(y in f){const k=f[y];if(g.includes(y)&&Object.keys(k).length>0){if(process.env.NODE_ENV!=="production"){const j=nn("",y);console.error([`MUI: The \`${E}\` component increases the CSS specificity of the \`${y}\` internal state.`,"You can not override it like this: ",JSON.stringify(f,null,2),"",`Instead, you need to use the '&.${j}' syntax:`,JSON.stringify({root:{[`&.${j}`]:k}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
73
+ `))}f[y]={}}}};Object.keys(d.components).forEach(f=>{const E=d.components[f].styleOverrides;E&&f.startsWith("Mui")&&b(E,f)})}return d.unstable_sxConfig={...gr,...u==null?void 0:u.unstable_sxConfig},d.unstable_sx=function(b){return Kn({sx:b,theme:this})},d.toRuntimeSource=Ns,d}function td(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 nd=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=td(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ls(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Vs(e){return e==="dark"?nd:[]}function rd(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,a=va(t);return{palette:a,opacity:{...Ls(a.mode),...n},overlays:r||Vs(a.mode),...i}}function id(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 ad=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],od=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let a=i;if(i==="class"&&(a=".%s"),i==="data"&&(a="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return ad(e.cssVarPrefix).forEach(s=>{o[s]=n[s],delete n[s]}),a==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:a?{[a.replace("%s",t)]:o,[`${r}, ${a.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(a&&a!=="media")return`${r}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace("%s",String(t))}return r};function sd(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function _(e,t,n){!e[t]&&n&&(e[t]=n)}function nr(e){return typeof e!="string"||!e.startsWith("hsl")?e:Is(e)}function Ot(e,t){`${t}Channel`in e||(e[`${t}Channel`]=tr(nr(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 ld(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const vt=e=>{try{return e()}catch{}},cd=(e="mui")=>Op(e);function Ti(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=rd({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...o}=Ki({...n,palette:{mode:i,...t==null?void 0:t.palette}});return e[r]={...t,palette:a,opacity:{...Ls(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Vs(i)},o}function ud(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:o=id,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,h=Object.keys(n)[0],m=r||(n.light&&h!=="light"?"light":h),d=cd(a),{[m]:g,light:b,dark:f,...E}=n,y={...E};let k=g;if((m==="dark"&&!("dark"in n)||m==="light"&&!("light"in n))&&(k=!0),!k)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:Xt(21,m));const j=Ti(y,k,u,m);b&&!y.light&&Ti(y,b,void 0,"light"),f&&!y.dark&&Ti(y,f,void 0,"dark");let v={defaultColorScheme:m,...j,cssVarPrefix:a,colorSchemeSelector:s,rootSelector:c,getCssVar:d,colorSchemes:y,font:{...Lp(j.typography),...j.font},spacing:ld(u.spacing)};Object.keys(v.colorSchemes).forEach(B=>{const p=v.colorSchemes[B].palette,R=$=>{const Z=$.split("-"),N=Z[1],re=Z[2];return d($,p[N][re])};if(p.mode==="light"&&(_(p.common,"background","#fff"),_(p.common,"onBackground","#000")),p.mode==="dark"&&(_(p.common,"background","#000"),_(p.common,"onBackground","#fff")),sd(p,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),p.mode==="light"){_(p.Alert,"errorColor",ke(p.error.light,.6)),_(p.Alert,"infoColor",ke(p.info.light,.6)),_(p.Alert,"successColor",ke(p.success.light,.6)),_(p.Alert,"warningColor",ke(p.warning.light,.6)),_(p.Alert,"errorFilledBg",R("palette-error-main")),_(p.Alert,"infoFilledBg",R("palette-info-main")),_(p.Alert,"successFilledBg",R("palette-success-main")),_(p.Alert,"warningFilledBg",R("palette-warning-main")),_(p.Alert,"errorFilledColor",vt(()=>p.getContrastText(p.error.main))),_(p.Alert,"infoFilledColor",vt(()=>p.getContrastText(p.info.main))),_(p.Alert,"successFilledColor",vt(()=>p.getContrastText(p.success.main))),_(p.Alert,"warningFilledColor",vt(()=>p.getContrastText(p.warning.main))),_(p.Alert,"errorStandardBg",Oe(p.error.light,.9)),_(p.Alert,"infoStandardBg",Oe(p.info.light,.9)),_(p.Alert,"successStandardBg",Oe(p.success.light,.9)),_(p.Alert,"warningStandardBg",Oe(p.warning.light,.9)),_(p.Alert,"errorIconColor",R("palette-error-main")),_(p.Alert,"infoIconColor",R("palette-info-main")),_(p.Alert,"successIconColor",R("palette-success-main")),_(p.Alert,"warningIconColor",R("palette-warning-main")),_(p.AppBar,"defaultBg",R("palette-grey-100")),_(p.Avatar,"defaultBg",R("palette-grey-400")),_(p.Button,"inheritContainedBg",R("palette-grey-300")),_(p.Button,"inheritContainedHoverBg",R("palette-grey-A100")),_(p.Chip,"defaultBorder",R("palette-grey-400")),_(p.Chip,"defaultAvatarColor",R("palette-grey-700")),_(p.Chip,"defaultIconColor",R("palette-grey-700")),_(p.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),_(p.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),_(p.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),_(p.LinearProgress,"primaryBg",Oe(p.primary.main,.62)),_(p.LinearProgress,"secondaryBg",Oe(p.secondary.main,.62)),_(p.LinearProgress,"errorBg",Oe(p.error.main,.62)),_(p.LinearProgress,"infoBg",Oe(p.info.main,.62)),_(p.LinearProgress,"successBg",Oe(p.success.main,.62)),_(p.LinearProgress,"warningBg",Oe(p.warning.main,.62)),_(p.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),_(p.Slider,"primaryTrack",Oe(p.primary.main,.62)),_(p.Slider,"secondaryTrack",Oe(p.secondary.main,.62)),_(p.Slider,"errorTrack",Oe(p.error.main,.62)),_(p.Slider,"infoTrack",Oe(p.info.main,.62)),_(p.Slider,"successTrack",Oe(p.success.main,.62)),_(p.Slider,"warningTrack",Oe(p.warning.main,.62));const $=Er(p.background.default,.8);_(p.SnackbarContent,"bg",$),_(p.SnackbarContent,"color",vt(()=>p.getContrastText($))),_(p.SpeedDialAction,"fabHoverBg",Er(p.background.paper,.15)),_(p.StepConnector,"border",R("palette-grey-400")),_(p.StepContent,"border",R("palette-grey-400")),_(p.Switch,"defaultColor",R("palette-common-white")),_(p.Switch,"defaultDisabledColor",R("palette-grey-100")),_(p.Switch,"primaryDisabledColor",Oe(p.primary.main,.62)),_(p.Switch,"secondaryDisabledColor",Oe(p.secondary.main,.62)),_(p.Switch,"errorDisabledColor",Oe(p.error.main,.62)),_(p.Switch,"infoDisabledColor",Oe(p.info.main,.62)),_(p.Switch,"successDisabledColor",Oe(p.success.main,.62)),_(p.Switch,"warningDisabledColor",Oe(p.warning.main,.62)),_(p.TableCell,"border",Oe(Tr(p.divider,1),.88)),_(p.Tooltip,"bg",Tr(p.grey[700],.92))}if(p.mode==="dark"){_(p.Alert,"errorColor",Oe(p.error.light,.6)),_(p.Alert,"infoColor",Oe(p.info.light,.6)),_(p.Alert,"successColor",Oe(p.success.light,.6)),_(p.Alert,"warningColor",Oe(p.warning.light,.6)),_(p.Alert,"errorFilledBg",R("palette-error-dark")),_(p.Alert,"infoFilledBg",R("palette-info-dark")),_(p.Alert,"successFilledBg",R("palette-success-dark")),_(p.Alert,"warningFilledBg",R("palette-warning-dark")),_(p.Alert,"errorFilledColor",vt(()=>p.getContrastText(p.error.dark))),_(p.Alert,"infoFilledColor",vt(()=>p.getContrastText(p.info.dark))),_(p.Alert,"successFilledColor",vt(()=>p.getContrastText(p.success.dark))),_(p.Alert,"warningFilledColor",vt(()=>p.getContrastText(p.warning.dark))),_(p.Alert,"errorStandardBg",ke(p.error.light,.9)),_(p.Alert,"infoStandardBg",ke(p.info.light,.9)),_(p.Alert,"successStandardBg",ke(p.success.light,.9)),_(p.Alert,"warningStandardBg",ke(p.warning.light,.9)),_(p.Alert,"errorIconColor",R("palette-error-main")),_(p.Alert,"infoIconColor",R("palette-info-main")),_(p.Alert,"successIconColor",R("palette-success-main")),_(p.Alert,"warningIconColor",R("palette-warning-main")),_(p.AppBar,"defaultBg",R("palette-grey-900")),_(p.AppBar,"darkBg",R("palette-background-paper")),_(p.AppBar,"darkColor",R("palette-text-primary")),_(p.Avatar,"defaultBg",R("palette-grey-600")),_(p.Button,"inheritContainedBg",R("palette-grey-800")),_(p.Button,"inheritContainedHoverBg",R("palette-grey-700")),_(p.Chip,"defaultBorder",R("palette-grey-700")),_(p.Chip,"defaultAvatarColor",R("palette-grey-300")),_(p.Chip,"defaultIconColor",R("palette-grey-300")),_(p.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),_(p.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),_(p.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),_(p.LinearProgress,"primaryBg",ke(p.primary.main,.5)),_(p.LinearProgress,"secondaryBg",ke(p.secondary.main,.5)),_(p.LinearProgress,"errorBg",ke(p.error.main,.5)),_(p.LinearProgress,"infoBg",ke(p.info.main,.5)),_(p.LinearProgress,"successBg",ke(p.success.main,.5)),_(p.LinearProgress,"warningBg",ke(p.warning.main,.5)),_(p.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),_(p.Slider,"primaryTrack",ke(p.primary.main,.5)),_(p.Slider,"secondaryTrack",ke(p.secondary.main,.5)),_(p.Slider,"errorTrack",ke(p.error.main,.5)),_(p.Slider,"infoTrack",ke(p.info.main,.5)),_(p.Slider,"successTrack",ke(p.success.main,.5)),_(p.Slider,"warningTrack",ke(p.warning.main,.5));const $=Er(p.background.default,.98);_(p.SnackbarContent,"bg",$),_(p.SnackbarContent,"color",vt(()=>p.getContrastText($))),_(p.SpeedDialAction,"fabHoverBg",Er(p.background.paper,.15)),_(p.StepConnector,"border",R("palette-grey-600")),_(p.StepContent,"border",R("palette-grey-600")),_(p.Switch,"defaultColor",R("palette-grey-300")),_(p.Switch,"defaultDisabledColor",R("palette-grey-600")),_(p.Switch,"primaryDisabledColor",ke(p.primary.main,.55)),_(p.Switch,"secondaryDisabledColor",ke(p.secondary.main,.55)),_(p.Switch,"errorDisabledColor",ke(p.error.main,.55)),_(p.Switch,"infoDisabledColor",ke(p.info.main,.55)),_(p.Switch,"successDisabledColor",ke(p.success.main,.55)),_(p.Switch,"warningDisabledColor",ke(p.warning.main,.55)),_(p.TableCell,"border",ke(Tr(p.divider,1),.68)),_(p.Tooltip,"bg",Tr(p.grey[700],.92))}Ot(p.background,"default"),Ot(p.background,"paper"),Ot(p.common,"background"),Ot(p.common,"onBackground"),Ot(p,"divider"),Object.keys(p).forEach($=>{const Z=p[$];$!=="tonalOffset"&&Z&&typeof Z=="object"&&(Z.main&&_(p[$],"mainChannel",tr(nr(Z.main))),Z.light&&_(p[$],"lightChannel",tr(nr(Z.light))),Z.dark&&_(p[$],"darkChannel",tr(nr(Z.dark))),Z.contrastText&&_(p[$],"contrastTextChannel",tr(nr(Z.contrastText))),$==="text"&&(Ot(p[$],"primary"),Ot(p[$],"secondary")),$==="action"&&(Z.active&&Ot(p[$],"active"),Z.selected&&Ot(p[$],"selected")))})}),v=t.reduce((B,p)=>at(B,p),v);const S={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:od(v)},{vars:P,generateThemeVars:z,generateStyleSheets:I}=$p(v,S);return v.vars=P,Object.entries(v.colorSchemes[v.defaultColorScheme]).forEach(([B,p])=>{v[B]=p}),v.generateThemeVars=z,v.generateStyleSheets=I,v.generateSpacing=function(){return Rs(u.spacing,fa(this))},v.getColorSchemeSelector=Rp(s),v.spacing=v.generateSpacing(),v.shouldSkipGeneratingVar=o,v.unstable_sxConfig={...gr,...u==null?void 0:u.unstable_sxConfig},v.unstable_sx=function(p){return Kn({sx:p,theme:this})},v.toRuntimeSource=Ns,v}function Eo(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:va({...n===!0?{}:n.palette,mode:t})})}function qs(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n==null?void 0:n.mode,...o}=e,s=a||"light",c=i==null?void 0:i[s],u={...i,...n?{[s]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Ki(e,...t);let h=n;"palette"in e||u[s]&&(u[s]!==!0?h=u[s].palette:s==="dark"&&(h={mode:"dark"}));const m=Ki({...e,palette:h},...t);return m.defaultColorScheme=s,m.colorSchemes=u,m.palette.mode==="light"&&(m.colorSchemes.light={...u.light!==!0&&u.light,palette:m.palette},Eo(m,"dark",u.dark)),m.palette.mode==="dark"&&(m.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:m.palette},Eo(m,"light",u.light)),m}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),ud({...o,colorSchemes:u,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Ws=qs(),Us="$$material";function Hs(){const e=op(Ws);return process.env.NODE_ENV!=="production"&&te.useDebugValue(e),e[Us]||e}function pd(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const dd=e=>pd(e)&&e!=="classes",lt=hp({themeId:Us,defaultTheme:Ws,rootShouldForwardProp:dd});function fd(){return qu}const wn=kp;process.env.NODE_ENV!=="production"&&(w.node,w.object.isRequired);function Cn(e){return jp(e)}function hd(e){return typeof e.main=="string"}function md(e,t=[]){if(!hd(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function qr(e=[]){return([,t])=>t&&md(t,e)}function xd(e){return nn("MuiTypography",e)}Sn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const gd={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},yd=fd(),vd=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:a,classes:o}=e,s={root:["root",a,e.align!=="inherit"&&`align${Pe(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Gn(s,xd,o)},bd=lt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Pe(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(wn(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(qr()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Pe(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),jo={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ys=te.forwardRef(function(t,n){const{color:r,...i}=Cn({props:t,name:"MuiTypography"}),a=!gd[r],o=yd({...i,...a&&{color:r}}),{align:s="inherit",className:c,component:u,gutterBottom:h=!1,noWrap:m=!1,paragraph:d=!1,variant:g="body1",variantMapping:b=jo,...f}=o,E={...o,align:s,color:r,className:c,component:u,gutterBottom:h,noWrap:m,paragraph:d,variant:g,variantMapping:b},y=u||(d?"p":b[g]||jo[g])||"span",k=vd(E);return l.jsx(bd,{as:y,ref:n,className:He(k.root,c),...f,ownerState:E,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...f.style}})});process.env.NODE_ENV!=="production"&&(Ys.propTypes={align:w.oneOf(["center","inherit","justify","left","right"]),children:w.node,classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),w.string]),component:w.elementType,gutterBottom:w.bool,noWrap:w.bool,paragraph:w.bool,style:w.object,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),variant:w.oneOfType([w.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),w.string]),variantMapping:w.object});const ba=te.createContext(void 0);process.env.NODE_ENV!=="production"&&(ba.displayName="FormControlContext");function wd(){return te.useContext(ba)}function Sd(e){return nn("MuiInputAdornment",e)}const ko=Sn("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Oo;const Cd=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Pe(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},Td=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e,s={root:["root",n&&"disablePointerEvents",i&&`position${Pe(i)}`,o,r&&"hiddenLabel",a&&`size${Pe(a)}`]};return Gn(s,Sd,t)},Ed=lt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Cd})(wn(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${ko.positionStart}&:not(.${ko.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Ks=te.forwardRef(function(t,n){const r=Cn({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:o="div",disablePointerEvents:s=!1,disableTypography:c=!1,position:u,variant:h,...m}=r,d=wd()||{};let g=h;h&&d.variant&&process.env.NODE_ENV!=="production"&&h===d.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),d&&!g&&(g=d.variant);const b={...r,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:s,position:u,variant:g},f=Td(b);return l.jsx(ba.Provider,{value:null,children:l.jsx(Ed,{as:o,ownerState:b,className:He(f.root,a),ref:n,...m,children:typeof i=="string"&&!c?l.jsx(Ys,{color:"textSecondary",children:i}):l.jsxs(te.Fragment,{children:[u==="start"?Oo||(Oo=l.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Ks.propTypes={children:w.node,classes:w.object,className:w.string,component:w.elementType,disablePointerEvents:w.bool,disableTypography:w.bool,position:w.oneOf(["end","start"]).isRequired,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),variant:w.oneOf(["filled","outlined","standard"])});function wa(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function jd(e){return nn("MuiSvgIcon",e)}Sn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const kd=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Pe(t)}`,`fontSize${Pe(n)}`]};return Gn(i,jd,r)},Od=lt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Pe(n.color)}`],t[`fontSize${Pe(n.fontSize)}`]]}})(wn(({theme:e})=>{var t,n,r,i,a,o,s,c,u,h,m,d,g,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:f=>!f.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:o.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:c.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((h=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:h.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,f])=>f&&f.main).map(([f])=>{var E,y;return{props:{color:f},style:{color:(y=(E=(e.vars??e).palette)==null?void 0:E[f])==null?void 0:y.main}}}),{props:{color:"action"},style:{color:(d=(m=(e.vars??e).palette)==null?void 0:m.action)==null?void 0:d.active}},{props:{color:"disabled"},style:{color:(b=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Wr=te.forwardRef(function(t,n){const r=Cn({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:o="inherit",component:s="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:h=!1,titleAccess:m,viewBox:d="0 0 24 24",...g}=r,b=te.isValidElement(i)&&i.type==="svg",f={...r,color:o,component:s,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:d,hasSvgAsChild:b},E={};h||(E.viewBox=d);const y=kd(f);return l.jsxs(Od,{as:s,className:He(y.root,a),focusable:"false",color:u,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:n,...E,...g,...b&&i.props,ownerState:f,children:[b?i.props.children:i,m?l.jsx("title",{children:m}):null]})});process.env.NODE_ENV!=="production"&&(Wr.propTypes={children:w.node,classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),w.string]),component:w.elementType,fontSize:w.oneOfType([w.oneOf(["inherit","large","medium","small"]),w.string]),htmlColor:w.string,inheritViewBox:w.bool,shapeRendering:w.string,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),titleAccess:w.string,viewBox:w.string});Wr.muiName="SvgIcon";function Ye(e,t){function n(r,i){return l.jsx(Wr,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Wr.muiName,te.memo(te.forwardRef(n))}let Fo=0;function Fd(e){const[t,n]=te.useState(e),r=e||t;return te.useEffect(()=>{t==null&&(Fo+=1,n(`mui-${Fo}`))},[t]),r}const Ad={...te},Ao=Ad.useId;function $d(e){if(Ao!==void 0){const t=Ao();return e??t}return Fd(e)}function $r(e){const t=te.useRef(e);return vp(()=>{t.current=e}),te.useRef((...n)=>(0,t.current)(...n)).current}function $o(...e){const t=te.useRef(void 0),n=te.useCallback(r=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const o=a,s=o(r);return typeof s=="function"?s:()=>{o(null)}}return a.current=r,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return te.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const Rd=w.oneOfType([w.func,w.object]);function Pd(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Dd(e,t,n,r,i){const a=e[t],o=i||t;if(a==null||typeof window>"u")return null;let s;return typeof a=="function"&&!Pd(a)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${r} \`${o}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const _d=wa(w.elementType,Dd);function Ro(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
75
+ `))}return!1}const Po={};function Qs(e,t){const n=te.useRef(Po);return n.current===Po&&(n.current=e(t)),n}class Ur{constructor(){Xn(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 Ur}static use(){const t=Qs(Ur.create).current,[n,r]=te.useState(!1);return t.shouldMount=n,t.setShouldMount=r,te.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=Id(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function Md(){return Ur.use()}function Id(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function Qi(){return Qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qi.apply(null,arguments)}function zd(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Gi(e,t){return Gi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Gi(e,t)}function Bd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Gi(e,t)}const Do=D.createContext(null);function Nd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sa(e,t){var n=function(a){return t&&D.isValidElement(a)?t(a):a},r=Object.create(null);return e&&D.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function Ld(e,t){e=e||{},t=t||{};function n(h){return h in t?t[h]:e[h]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var u=r[c][o];s[r[c][o]]=n(u)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function ln(e,t,n){return n[t]!=null?n[t]:e.props[t]}function Vd(e,t){return Sa(e.children,function(n){return D.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:ln(n,"appear",e),enter:ln(n,"enter",e),exit:ln(n,"exit",e)})})}function qd(e,t,n){var r=Sa(e.children),i=Ld(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if(D.isValidElement(o)){var s=a in t,c=a in r,u=t[a],h=D.isValidElement(u)&&!u.props.in;c&&(!s||h)?i[a]=D.cloneElement(o,{onExited:n.bind(null,o),in:!0,exit:ln(o,"exit",e),enter:ln(o,"enter",e)}):!c&&s&&!h?i[a]=D.cloneElement(o,{in:!1}):c&&s&&D.isValidElement(u)&&(i[a]=D.cloneElement(o,{onExited:n.bind(null,o),in:u.props.in,exit:ln(o,"exit",e),enter:ln(o,"enter",e)}))}}),i}var Wd=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Ud={component:"div",childFactory:function(t){return t}},Ca=function(e){Bd(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var o=a.handleExited.bind(Nd(a));return a.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},a}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,a){var o=a.children,s=a.handleExited,c=a.firstRender;return{children:c?Vd(i,s):qd(i,o,s),firstRender:!1}},n.handleExited=function(i,a){var o=Sa(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(s){var c=Qi({},s.children);return delete c[i.key],{children:c}}))},n.render=function(){var i=this.props,a=i.component,o=i.childFactory,s=zd(i,["component","childFactory"]),c=this.state.contextValue,u=Wd(this.state.children).map(o);return delete s.appear,delete s.enter,delete s.exit,a===null?D.createElement(Do.Provider,{value:c},u):D.createElement(Do.Provider,{value:c},D.createElement(a,s,u))},t}(D.Component);Ca.propTypes=process.env.NODE_ENV!=="production"?{component:w.any,children:w.node,appear:w.bool,enter:w.bool,exit:w.bool,childFactory:w.func}:{};Ca.defaultProps=Ud;const Hd=[];function Yd(e){te.useEffect(e,Hd)}class Ta{constructor(){Xn(this,"currentId",null);Xn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Xn(this,"disposeEffect",()=>this.clear)}static create(){return new Ta}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Kd(){const e=Qs(Ta.create).current;return Yd(e.disposeEffect),e}function Gs(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:u}=e,[h,m]=te.useState(!1),d=He(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},b=He(n.child,h&&n.childLeaving,r&&n.childPulsate);return!s&&!h&&m(!0),te.useEffect(()=>{if(!s&&c!=null){const f=setTimeout(c,u);return()=>{clearTimeout(f)}}},[c,s,u]),l.jsx("span",{className:d,style:g,children:l.jsx("span",{className:b})})}process.env.NODE_ENV!=="production"&&(Gs.propTypes={classes:w.object.isRequired,className:w.string,in:w.bool,onExited:w.func,pulsate:w.bool,rippleSize:w.number,rippleX:w.number,rippleY:w.number,timeout:w.number.isRequired});const dt=Sn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Zi=550,Qd=80,Gd=en.keyframes`
76
76
  0% {
77
77
  transform: scale(0);
78
78
  opacity: 0.1;
@@ -82,7 +82,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
82
82
  transform: scale(1);
83
83
  opacity: 0.3;
84
84
  }
85
- `,Ud=Xt.keyframes`
85
+ `,Zd=en.keyframes`
86
86
  0% {
87
87
  opacity: 1;
88
88
  }
@@ -90,7 +90,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
90
90
  100% {
91
91
  opacity: 0;
92
92
  }
93
- `,Hd=Xt.keyframes`
93
+ `,Xd=en.keyframes`
94
94
  0% {
95
95
  transform: scale(1);
96
96
  }
@@ -102,15 +102,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
102
102
  100% {
103
103
  transform: scale(1);
104
104
  }
105
- `,Yd=lt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Kd=lt(Ys,{name:"MuiTouchRipple",slot:"Ripple"})`
105
+ `,Jd=lt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),ef=lt(Gs,{name:"MuiTouchRipple",slot:"Ripple"})`
106
106
  opacity: 0;
107
107
  position: absolute;
108
108
 
109
109
  &.${dt.rippleVisible} {
110
110
  opacity: 0.3;
111
111
  transform: scale(1);
112
- animation-name: ${Wd};
113
- animation-duration: ${Ki}ms;
112
+ animation-name: ${Gd};
113
+ animation-duration: ${Zi}ms;
114
114
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
115
115
  }
116
116
 
@@ -129,8 +129,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
129
129
 
130
130
  & .${dt.childLeaving} {
131
131
  opacity: 0;
132
- animation-name: ${Ud};
133
- animation-duration: ${Ki}ms;
132
+ animation-name: ${Zd};
133
+ animation-duration: ${Zi}ms;
134
134
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
135
135
  }
136
136
 
@@ -139,13 +139,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
139
139
  /* @noflip */
140
140
  left: 0px;
141
141
  top: 0;
142
- animation-name: ${Hd};
142
+ animation-name: ${Xd};
143
143
  animation-duration: 2500ms;
144
144
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
145
145
  animation-iteration-count: infinite;
146
146
  animation-delay: 200ms;
147
147
  }
148
- `,Ks=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:o,...s}=r,[c,u]=J.useState([]),f=J.useRef(0),m=J.useRef(null);J.useEffect(()=>{m.current&&(m.current(),m.current=null)},[c]);const h=J.useRef(!1),g=Vd(),w=J.useRef(null),d=J.useRef(null),E=J.useCallback(v=>{const{pulsate:S,rippleX:_,rippleY:M,rippleSize:B,cb:q}=v;u(p=>[...p,l.jsx(Kd,{classes:{ripple:He(a.ripple,dt.ripple),rippleVisible:He(a.rippleVisible,dt.rippleVisible),ripplePulsate:He(a.ripplePulsate,dt.ripplePulsate),child:He(a.child,dt.child),childLeaving:He(a.childLeaving,dt.childLeaving),childPulsate:He(a.childPulsate,dt.childPulsate)},timeout:Ki,pulsate:S,rippleX:_,rippleY:M,rippleSize:B},f.current)]),f.current+=1,m.current=q},[a]),y=J.useCallback((v={},S={},_=()=>{})=>{const{pulsate:M=!1,center:B=i||S.pulsate,fakeElement:q=!1}=S;if((v==null?void 0:v.type)==="mousedown"&&h.current){h.current=!1;return}(v==null?void 0:v.type)==="touchstart"&&(h.current=!0);const p=q?null:d.current,R=p?p.getBoundingClientRect():{width:0,height:0,left:0,top:0};let $,G,N;if(B||v===void 0||v.clientX===0&&v.clientY===0||!v.clientX&&!v.touches)$=Math.round(R.width/2),G=Math.round(R.height/2);else{const{clientX:re,clientY:V}=v.touches&&v.touches.length>0?v.touches[0]:v;$=Math.round(re-R.left),G=Math.round(V-R.top)}if(B)N=Math.sqrt((2*R.width**2+R.height**2)/3),N%2===0&&(N+=1);else{const re=Math.max(Math.abs((p?p.clientWidth:0)-$),$)*2+2,V=Math.max(Math.abs((p?p.clientHeight:0)-G),G)*2+2;N=Math.sqrt(re**2+V**2)}v!=null&&v.touches?w.current===null&&(w.current=()=>{E({pulsate:M,rippleX:$,rippleY:G,rippleSize:N,cb:_})},g.start(qd,()=>{w.current&&(w.current(),w.current=null)})):E({pulsate:M,rippleX:$,rippleY:G,rippleSize:N,cb:_})},[i,E,g]),j=J.useCallback(()=>{y({},{pulsate:!0})},[y]),k=J.useCallback((v,S)=>{if(g.clear(),(v==null?void 0:v.type)==="touchend"&&w.current){w.current(),w.current=null,g.start(0,()=>{k(v,S)});return}w.current=null,u(_=>_.length>0?_.slice(1):_),m.current=S},[g]);return J.useImperativeHandle(n,()=>({pulsate:j,start:y,stop:k}),[j,y,k]),l.jsx(Yd,{className:He(dt.root,a.root,o),ref:d,...s,children:l.jsx(ba,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(Ks.propTypes={center:b.bool,classes:b.object,className:b.string});function Qd(e){return en("MuiButtonBase",e)}const Gd=bn("MuiButtonBase",["root","disabled","focusVisible"]),Zd=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=Kn({root:["root",t&&"disabled",n&&"focusVisible"]},Qd,i);return n&&r&&(o.root+=` ${r}`),o},Xd=lt("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Gd.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Qs=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:o,className:s,component:c="button",disabled:u=!1,disableRipple:f=!1,disableTouchRipple:m=!1,focusRipple:h=!1,focusVisibleClassName:g,LinkComponent:w="a",onBlur:d,onClick:E,onContextMenu:y,onDragLeave:j,onFocus:k,onFocusVisible:v,onKeyDown:S,onKeyUp:_,onMouseDown:M,onMouseLeave:B,onMouseUp:q,onTouchEnd:p,onTouchMove:R,onTouchStart:$,tabIndex:G=0,TouchRippleProps:N,touchRippleRef:re,type:V,...K}=r,te=J.useRef(null),oe=Ad(),T=Oo(oe.ref,re),[D,ee]=J.useState(!1);u&&D&&ee(!1),J.useImperativeHandle(i,()=>({focusVisible:()=>{ee(!0),te.current.focus()}}),[]);const se=oe.shouldMount&&!f&&!u;J.useEffect(()=>{D&&h&&!f&&oe.pulsate()},[f,h,D,oe]);const ie=Ft(oe,"start",M,m),pe=Ft(oe,"stop",y,m),U=Ft(oe,"stop",j,m),ne=Ft(oe,"stop",q,m),de=Ft(oe,"stop",le=>{D&&le.preventDefault(),B&&B(le)},m),me=Ft(oe,"start",$,m),L=Ft(oe,"stop",p,m),Y=Ft(oe,"stop",R,m),z=Ft(oe,"stop",le=>{Fo(le.target)||ee(!1),d&&d(le)},!1),xe=Fr(le=>{te.current||(te.current=le.currentTarget),Fo(le.target)&&(ee(!0),v&&v(le)),k&&k(le)}),je=()=>{const le=te.current;return c&&c!=="button"&&!(le.tagName==="A"&&le.href)},Ve=Fr(le=>{h&&!le.repeat&&D&&le.key===" "&&oe.stop(le,()=>{oe.start(le)}),le.target===le.currentTarget&&je()&&le.key===" "&&le.preventDefault(),S&&S(le),le.target===le.currentTarget&&je()&&le.key==="Enter"&&!u&&(le.preventDefault(),E&&E(le))}),jt=Fr(le=>{h&&le.key===" "&&D&&!le.defaultPrevented&&oe.stop(le,()=>{oe.pulsate(le)}),_&&_(le),E&&le.target===le.currentTarget&&je()&&le.key===" "&&!le.defaultPrevented&&E(le)});let Be=c;Be==="button"&&(K.href||K.to)&&(Be=w);const Ye={};Be==="button"?(Ye.type=V===void 0?"button":V,Ye.disabled=u):(!K.href&&!K.to&&(Ye.role="button"),u&&(Ye["aria-disabled"]=u));const mt=Oo(n,te),et={...r,centerRipple:a,component:c,disabled:u,disableRipple:f,disableTouchRipple:m,focusRipple:h,tabIndex:G,focusVisible:D},kt=Zd(et);return l.jsxs(Xd,{as:Be,className:He(kt.root,s),ownerState:et,onBlur:z,onClick:E,onContextMenu:pe,onFocus:xe,onKeyDown:Ve,onKeyUp:jt,onMouseDown:ie,onMouseLeave:de,onMouseUp:ne,onDragLeave:U,onTouchEnd:L,onTouchMove:Y,onTouchStart:me,ref:mt,tabIndex:u?-1:G,type:V,...Ye,...K,children:[o,se?l.jsx(Ks,{ref:T,center:a,...N}):null]})});function Ft(e,t,n,r=!1){return Fr(i=>(n&&n(i),r||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(Qs.propTypes={action:jd,centerRipple:b.bool,children:b.node,classes:b.object,className:b.string,component:Fd,disabled:b.bool,disableRipple:b.bool,disableTouchRipple:b.bool,focusRipple:b.bool,focusVisibleClassName:b.string,href:b.any,LinkComponent:b.elementType,onBlur:b.func,onClick:b.func,onContextMenu:b.func,onDragLeave:b.func,onFocus:b.func,onFocusVisible:b.func,onKeyDown:b.func,onKeyUp:b.func,onMouseDown:b.func,onMouseLeave:b.func,onMouseUp:b.func,onTouchEnd:b.func,onTouchMove:b.func,onTouchStart:b.func,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),tabIndex:b.number,TouchRippleProps:b.object,touchRippleRef:b.oneOfType([b.func,b.shape({current:b.shape({pulsate:b.func.isRequired,start:b.func.isRequired,stop:b.func.isRequired})})]),type:b.oneOfType([b.oneOf(["button","reset","submit"]),b.string])});function Jd(e){return en("MuiCircularProgress",e)}bn("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const It=44,Qi=Xt.keyframes`
148
+ `,Zs=te.forwardRef(function(t,n){const r=Cn({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:o,...s}=r,[c,u]=te.useState([]),h=te.useRef(0),m=te.useRef(null);te.useEffect(()=>{m.current&&(m.current(),m.current=null)},[c]);const d=te.useRef(!1),g=Kd(),b=te.useRef(null),f=te.useRef(null),E=te.useCallback(v=>{const{pulsate:S,rippleX:P,rippleY:z,rippleSize:I,cb:B}=v;u(p=>[...p,l.jsx(ef,{classes:{ripple:He(a.ripple,dt.ripple),rippleVisible:He(a.rippleVisible,dt.rippleVisible),ripplePulsate:He(a.ripplePulsate,dt.ripplePulsate),child:He(a.child,dt.child),childLeaving:He(a.childLeaving,dt.childLeaving),childPulsate:He(a.childPulsate,dt.childPulsate)},timeout:Zi,pulsate:S,rippleX:P,rippleY:z,rippleSize:I},h.current)]),h.current+=1,m.current=B},[a]),y=te.useCallback((v={},S={},P=()=>{})=>{const{pulsate:z=!1,center:I=i||S.pulsate,fakeElement:B=!1}=S;if((v==null?void 0:v.type)==="mousedown"&&d.current){d.current=!1;return}(v==null?void 0:v.type)==="touchstart"&&(d.current=!0);const p=B?null:f.current,R=p?p.getBoundingClientRect():{width:0,height:0,left:0,top:0};let $,Z,N;if(I||v===void 0||v.clientX===0&&v.clientY===0||!v.clientX&&!v.touches)$=Math.round(R.width/2),Z=Math.round(R.height/2);else{const{clientX:re,clientY:V}=v.touches&&v.touches.length>0?v.touches[0]:v;$=Math.round(re-R.left),Z=Math.round(V-R.top)}if(I)N=Math.sqrt((2*R.width**2+R.height**2)/3),N%2===0&&(N+=1);else{const re=Math.max(Math.abs((p?p.clientWidth:0)-$),$)*2+2,V=Math.max(Math.abs((p?p.clientHeight:0)-Z),Z)*2+2;N=Math.sqrt(re**2+V**2)}v!=null&&v.touches?b.current===null&&(b.current=()=>{E({pulsate:z,rippleX:$,rippleY:Z,rippleSize:N,cb:P})},g.start(Qd,()=>{b.current&&(b.current(),b.current=null)})):E({pulsate:z,rippleX:$,rippleY:Z,rippleSize:N,cb:P})},[i,E,g]),k=te.useCallback(()=>{y({},{pulsate:!0})},[y]),j=te.useCallback((v,S)=>{if(g.clear(),(v==null?void 0:v.type)==="touchend"&&b.current){b.current(),b.current=null,g.start(0,()=>{j(v,S)});return}b.current=null,u(P=>P.length>0?P.slice(1):P),m.current=S},[g]);return te.useImperativeHandle(n,()=>({pulsate:k,start:y,stop:j}),[k,y,j]),l.jsx(Jd,{className:He(dt.root,a.root,o),ref:f,...s,children:l.jsx(Ca,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(Zs.propTypes={center:w.bool,classes:w.object,className:w.string});function tf(e){return nn("MuiButtonBase",e)}const nf=Sn("MuiButtonBase",["root","disabled","focusVisible"]),rf=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=Gn({root:["root",t&&"disabled",n&&"focusVisible"]},tf,i);return n&&r&&(o.root+=` ${r}`),o},af=lt("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${nf.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Xs=te.forwardRef(function(t,n){const r=Cn({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:o,className:s,component:c="button",disabled:u=!1,disableRipple:h=!1,disableTouchRipple:m=!1,focusRipple:d=!1,focusVisibleClassName:g,LinkComponent:b="a",onBlur:f,onClick:E,onContextMenu:y,onDragLeave:k,onFocus:j,onFocusVisible:v,onKeyDown:S,onKeyUp:P,onMouseDown:z,onMouseLeave:I,onMouseUp:B,onTouchEnd:p,onTouchMove:R,onTouchStart:$,tabIndex:Z=0,TouchRippleProps:N,touchRippleRef:re,type:V,...Q}=r,W=te.useRef(null),K=Md(),C=$o(K.ref,re),[M,ne]=te.useState(!1);u&&M&&ne(!1),te.useImperativeHandle(i,()=>({focusVisible:()=>{ne(!0),W.current.focus()}}),[]);const se=K.shouldMount&&!h&&!u;te.useEffect(()=>{M&&d&&!h&&K.pulsate()},[h,d,M,K]);const ae=Ft(K,"start",z,m),pe=Ft(K,"stop",y,m),H=Ft(K,"stop",k,m),ie=Ft(K,"stop",B,m),de=Ft(K,"stop",le=>{M&&le.preventDefault(),I&&I(le)},m),me=Ft(K,"start",$,m),q=Ft(K,"stop",p,m),G=Ft(K,"stop",R,m),L=Ft(K,"stop",le=>{Ro(le.target)||ne(!1),f&&f(le)},!1),xe=$r(le=>{W.current||(W.current=le.currentTarget),Ro(le.target)&&(ne(!0),v&&v(le)),j&&j(le)}),je=()=>{const le=W.current;return c&&c!=="button"&&!(le.tagName==="A"&&le.href)},Ve=$r(le=>{d&&!le.repeat&&M&&le.key===" "&&K.stop(le,()=>{K.start(le)}),le.target===le.currentTarget&&je()&&le.key===" "&&le.preventDefault(),S&&S(le),le.target===le.currentTarget&&je()&&le.key==="Enter"&&!u&&(le.preventDefault(),E&&E(le))}),jt=$r(le=>{d&&le.key===" "&&M&&!le.defaultPrevented&&K.stop(le,()=>{K.pulsate(le)}),P&&P(le),E&&le.target===le.currentTarget&&je()&&le.key===" "&&!le.defaultPrevented&&E(le)});let Be=c;Be==="button"&&(Q.href||Q.to)&&(Be=b);const Ke={};Be==="button"?(Ke.type=V===void 0?"button":V,Ke.disabled=u):(!Q.href&&!Q.to&&(Ke.role="button"),u&&(Ke["aria-disabled"]=u));const mt=$o(n,W),et={...r,centerRipple:a,component:c,disabled:u,disableRipple:h,disableTouchRipple:m,focusRipple:d,tabIndex:Z,focusVisible:M},kt=rf(et);return l.jsxs(af,{as:Be,className:He(kt.root,s),ownerState:et,onBlur:L,onClick:E,onContextMenu:pe,onFocus:xe,onKeyDown:Ve,onKeyUp:jt,onMouseDown:ae,onMouseLeave:de,onMouseUp:ie,onDragLeave:H,onTouchEnd:q,onTouchMove:G,onTouchStart:me,ref:mt,tabIndex:u?-1:Z,type:V,...Ke,...Q,children:[o,se?l.jsx(Zs,{ref:C,center:a,...N}):null]})});function Ft(e,t,n,r=!1){return $r(i=>(n&&n(i),r||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(Xs.propTypes={action:Rd,centerRipple:w.bool,children:w.node,classes:w.object,className:w.string,component:_d,disabled:w.bool,disableRipple:w.bool,disableTouchRipple:w.bool,focusRipple:w.bool,focusVisibleClassName:w.string,href:w.any,LinkComponent:w.elementType,onBlur:w.func,onClick:w.func,onContextMenu:w.func,onDragLeave:w.func,onFocus:w.func,onFocusVisible:w.func,onKeyDown:w.func,onKeyUp:w.func,onMouseDown:w.func,onMouseLeave:w.func,onMouseUp:w.func,onTouchEnd:w.func,onTouchMove:w.func,onTouchStart:w.func,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),tabIndex:w.number,TouchRippleProps:w.object,touchRippleRef:w.oneOfType([w.func,w.shape({current:w.shape({pulsate:w.func.isRequired,start:w.func.isRequired,stop:w.func.isRequired})})]),type:w.oneOfType([w.oneOf(["button","reset","submit"]),w.string])});function of(e){return nn("MuiCircularProgress",e)}Sn("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const zt=44,Xi=en.keyframes`
149
149
  0% {
150
150
  transform: rotate(0deg);
151
151
  }
@@ -153,7 +153,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
153
153
  100% {
154
154
  transform: rotate(360deg);
155
155
  }
156
- `,Gi=Xt.keyframes`
156
+ `,Ji=en.keyframes`
157
157
  0% {
158
158
  stroke-dasharray: 1px, 200px;
159
159
  stroke-dashoffset: 0;
@@ -168,16 +168,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
168
168
  stroke-dasharray: 1px, 200px;
169
169
  stroke-dashoffset: -126px;
170
170
  }
171
- `,ef=typeof Qi!="string"?Xt.css`
172
- animation: ${Qi} 1.4s linear infinite;
173
- `:null,tf=typeof Gi!="string"?Xt.css`
174
- animation: ${Gi} 1.4s ease-in-out infinite;
175
- `:null,nf=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,a={root:["root",n,`color${Pe(r)}`],svg:["svg"],circle:["circle",`circle${Pe(n)}`,i&&"circleDisableShrink"]};return Kn(a,Jd,t)},rf=lt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Pe(n.color)}`]]}})(vn(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:ef||{animation:`${Qi} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Nr()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),af=lt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),of=lt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Pe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(vn(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:tf||{animation:`${Gi} 1.4s ease-in-out infinite`}}]}))),Gs=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:o=!1,size:s=40,style:c,thickness:u=3.6,value:f=0,variant:m="indeterminate",...h}=r,g={...r,color:a,disableShrink:o,size:s,thickness:u,value:f,variant:m},w=nf(g),d={},E={},y={};if(m==="determinate"){const j=2*Math.PI*((It-u)/2);d.strokeDasharray=j.toFixed(3),y["aria-valuenow"]=Math.round(f),d.strokeDashoffset=`${((100-f)/100*j).toFixed(3)}px`,E.transform="rotate(-90deg)"}return l.jsx(rf,{className:He(w.root,i),style:{width:s,height:s,...E,...c},ownerState:g,ref:n,role:"progressbar",...y,...h,children:l.jsx(af,{className:w.svg,ownerState:g,viewBox:`${It/2} ${It/2} ${It} ${It}`,children:l.jsx(of,{className:w.circle,style:d,ownerState:g,cx:It,cy:It,r:(It-u)/2,fill:"none",strokeWidth:u})})})});process.env.NODE_ENV!=="production"&&(Gs.propTypes={classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","primary","secondary","error","info","success","warning"]),b.string]),disableShrink:ya(b.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:b.oneOfType([b.number,b.string]),style:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),thickness:b.number,value:b.number,variant:b.oneOf(["determinate","indeterminate"])});function sf(e){return en("MuiIconButton",e)}const Ro=bn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),lf=e=>{const{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e,s={root:["root",o&&"loading",n&&"disabled",r!=="default"&&`color${Pe(r)}`,i&&`edge${Pe(i)}`,`size${Pe(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Kn(s,sf,t)},cf=lt(Qs,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${Pe(n.color)}`],n.edge&&t[`edge${Pe(n.edge)}`],t[`size${Pe(n.size)}`]]}})(vn(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ot(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),vn(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Nr()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Nr()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ot((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Ro.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Ro.loading}`]:{color:"transparent"}}))),uf=lt("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Ar=J.forwardRef(function(t,n){const r=wn({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:o,color:s="default",disabled:c=!1,disableFocusRipple:u=!1,size:f="medium",id:m,loading:h=null,loadingIndicator:g,...w}=r,d=Ed(m),E=g??l.jsx(Gs,{"aria-labelledby":d,color:"inherit",size:16}),y={...r,edge:i,color:s,disabled:c,disableFocusRipple:u,loading:h,loadingIndicator:E,size:f},j=lf(y);return l.jsxs(cf,{id:h?d:m,className:He(j.root,o),centerRipple:!0,focusRipple:!u,disabled:c||h,ref:n,...w,ownerState:y,children:[typeof h=="boolean"&&l.jsx("span",{className:j.loadingWrapper,style:{display:"contents"},children:l.jsx(uf,{className:j.loadingIndicator,ownerState:y,children:h&&E})}),a]})});process.env.NODE_ENV!=="production"&&(Ar.propTypes={children:ya(b.node,e=>J.Children.toArray(e.children).some(n=>J.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
176
- `)):null),classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),b.string]),disabled:b.bool,disableFocusRipple:b.bool,disableRipple:b.bool,edge:b.oneOf(["end","start",!1]),id:b.string,loading:b.bool,loadingIndicator:b.node,size:b.oneOfType([b.oneOf(["small","medium","large"]),b.string]),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});const Po=Je(l.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),_o=Je(l.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),pf=Je(l.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),Sa=Je(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),qr=Je(l.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),df=Je(l.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),he={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},Do=e=>{const t=e.replace("#",""),n=parseInt(t.length===3?t.split("").map(r=>r+r).join(""):t,16);return{r:n>>16&255,g:n>>8&255,b:n&255}},ff=(e,t,n)=>"#"+[e,t,n].map(r=>{const i=Math.round(Math.min(255,Math.max(0,r))).toString(16);return i.length===1?"0"+i:i}).join(""),At=(e,t,n)=>{const r=Do(e),i=Do(t);return ff(r.r+(i.r-r.r)*n,r.g+(i.g-r.g)*n,r.b+(i.b-r.b)*n)},li=e=>{const t="#FFFFFF",n="#000000";return{50:At(t,e,.08),100:At(t,e,.16),200:At(t,e,.28),300:At(t,e,.4),400:At(t,e,.55),500:e,600:At(e,n,.1),700:At(e,n,.2),800:At(e,n,.3),900:At(e,n,.42)}},hf=li(he.primary.main),mf=li(he.secondary.main),$r=li(he.text.primary),Zs=e=>li(e),xf={primary:he.primary.main,secondary:he.secondary.main,textPrimary:he.text.primary,textSecondary:he.text.secondary,divider:he.divider,background:he.background},gf="#111827";function yf(e){const t=e.palette.text.primary;return typeof t=="string"?t:gf}function mr(){const e=qs(),t=e.palette.mode,n=yf(e),r=e.palette.background.paper,i=e.palette.divider,a=e.palette.text.secondary,o=e.palette.error.main;return I.useMemo(()=>{const s=Zs(n);return{paper:r,divider:i,textPrimary:n,textSecondary:a,errorMain:o,neutral50:s[50],outlineDefault:ot(s[300],.5),outlineHover:s[300],outlineFocus:s[400]}},[t,n,r,i,a,o])}const Xs="#244061";function vf(){return Ns({palette:{mode:"light",primary:{main:Xs,light:"#0a8a4f",dark:"#0d9c5a"},success:{main:"#10B981"},warning:{main:"#F59E0B"},error:{main:"#D40824"},info:{main:"#3B82F6"},text:{primary:"#1A1A1A",secondary:"rgba(0, 0, 0, 0.6)"},background:{default:"#fafafa",paper:"#ffffff"},divider:"#e2e8f0"},typography:{fontFamily:'"Inter", sans-serif',h1:{fontSize:"24px",fontWeight:700,lineHeight:1.3,letterSpacing:"-0.01em"},h2:{fontSize:"20px",fontWeight:600,lineHeight:1.35,letterSpacing:"-0.005em"},h3:{fontSize:"18px",fontWeight:600,lineHeight:1.4},h4:{fontSize:"18px",fontWeight:600,lineHeight:1.35,letterSpacing:"-0.005em"},h5:{fontSize:"15px",fontWeight:500,lineHeight:1.4},h6:{fontSize:"13px",fontWeight:500,lineHeight:1.5},body1:{fontSize:"14px",fontWeight:400,lineHeight:1.6,letterSpacing:"0.01em"},body2:{fontSize:"13px",fontWeight:400,lineHeight:1.6,letterSpacing:"0.01em"},subtitle1:{fontSize:"14px",fontWeight:500,lineHeight:1.5},subtitle2:{fontSize:"13px",fontWeight:500,lineHeight:1.5},caption:{fontSize:"12px",fontWeight:400,lineHeight:1.5,letterSpacing:"0.02em"},overline:{fontSize:"11px",fontWeight:500,lineHeight:1.5,letterSpacing:"0.08em",textTransform:"uppercase"},button:{fontSize:"14px",fontWeight:500,lineHeight:1.2,letterSpacing:"0.01em"},allVariants:{fontFamily:'"Inter", sans-serif'}},shape:{borderRadius:6},spacing:8})}const rt=({hasError:e,sx:t,labelText:n,labelVariant:r="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:o="#E6E8EC",endorsementColor:s="#111827",endorsementRadius:c="6px",endorsementHeight:u=28,endorsementPaddingX:f="8px",inputTestId:m,labelTestId:h,errorTestId:g,...w})=>{var k,v;const d=mr(),E=!!n,y=a?l.jsx(x.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:u,paddingLeft:f,paddingRight:f,borderRadius:c,backgroundColor:o,color:s,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,j={...w.InputProps,endAdornment:y||i?l.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[y||i,(k=w.InputProps)==null?void 0:k.endAdornment]}):(v=w.InputProps)==null?void 0:v.endAdornment};return l.jsxs(x.Box,{children:[E&&l.jsx(x.Typography,{variant:r,"data-testid":h,sx:{color:d.textPrimary,mb:.5,fontWeight:500},children:n}),l.jsx(x.TextField,{fullWidth:!0,size:"small",...w,InputProps:j,label:E?void 0:w.label,inputProps:{...w.inputProps,...m?{"data-testid":m}:{}},FormHelperTextProps:{...w.FormHelperTextProps,...g?{"data-testid":g}:{}},InputLabelProps:{...w.InputLabelProps,...h&&!E?{"data-testid":h}:{}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:d.paper,borderRadius:"8px","& fieldset":{borderColor:d.outlineDefault},"&:hover fieldset":{borderColor:d.outlineHover},"&.Mui-focused fieldset":{borderColor:d.outlineFocus},"&.Mui-error fieldset":{borderColor:d.errorMain}},"& .MuiInputBase-input":{color:d.textPrimary},"& .MuiFormLabel-root":{color:d.textSecondary},"& .MuiFormLabel-root.Mui-focused":{color:d.textPrimary},"& .MuiFormHelperText-root":{color:e?d.errorMain:d.textSecondary},...t}})]})},ci=({labelText:e,label:t,options:n,loading:r,helperText:i,size:a="small",labelVariant:o="subtitle2",placeholder:s,value:c,sx:u,inputTestId:f,labelTestId:m,errorTestId:h,optionTestId:g,...w})=>{const d=mr(),E=I.useId(),y=c==null||c===""||Array.isArray(c)&&c.length===0,j=k=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...k,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:d.textSecondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!w.error,variant:"outlined",children:[e&&l.jsx(x.Typography,{variant:o,"data-testid":m,sx:{color:d.textPrimary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(x.InputLabel,{id:E,shrink:!y||!!s,"data-testid":m,sx:{color:d.textSecondary,"&.Mui-focused":{color:d.textPrimary},"&.Mui-error":{color:d.errorMain}},children:t}),l.jsx(x.Select,{...w,value:c,labelId:t?E:void 0,label:t,displayEmpty:!0,input:l.jsx(x.OutlinedInput,{label:t,inputProps:f?{"data-testid":f}:void 0}),IconComponent:j,renderValue:k=>{const v=k;if(y)return l.jsx("span",{style:{color:d.textSecondary},children:s??""});const S=n.find(_=>_.value===v);return(S==null?void 0:S.label)??String(v)},endAdornment:r?l.jsx(x.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${d.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:d.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:d.textPrimary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:d.outlineDefault},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:d.outlineHover},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:d.outlineFocus},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:d.errorMain},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...u},children:r?l.jsx(x.MenuItem,{disabled:!0,children:l.jsx(x.CircularProgress,{size:16})}):n.map(k=>l.jsx(x.MenuItem,{value:k.value,"data-testid":g?g(k.value):void 0,sx:{backgroundColor:d.paper,color:d.textPrimary,fontSize:14,mx:1,"&:hover":{backgroundColor:d.neutral50,borderRadius:"4px"},"&.Mui-selected":{backgroundColor:d.neutral50,borderRadius:"4px"}},children:k.label},k.value))}),i&&l.jsx(x.FormHelperText,{"data-testid":h,children:i})]})},Js=({id:e,options:t,value:n,multiple:r,label:i,labelText:a,placeholder:o,onChange:s,labelVariant:c="subtitle2",disabled:u,loading:f,error:m,helperText:h,onOpen:g,noOptionsText:w,sx:d,inputTestId:E,labelTestId:y,errorTestId:j,optionTestId:k})=>{const v=mr(),S=_=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",..._,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:v.textSecondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(x.Box,{children:[a&&l.jsx(x.Typography,{variant:c,"data-testid":y,sx:{color:v.textPrimary,mb:.5,fontWeight:500},children:a}),l.jsx(x.Autocomplete,{id:e,options:t,value:n,multiple:r,size:"small",popupIcon:l.jsx(S,{}),disabled:u,loading:f,onOpen:g,noOptionsText:w,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${v.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:v.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:v.outlineDefault},"&:hover fieldset":{borderColor:v.outlineHover},"&.Mui-focused fieldset":{borderColor:v.outlineFocus},"&.Mui-error fieldset":{borderColor:v.errorMain}},"& .MuiInputBase-input":{color:v.textPrimary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:v.textSecondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...d},getOptionLabel:_=>typeof _=="string"?_:(_==null?void 0:_.label)??"",isOptionEqualToValue:(_,M)=>((_==null?void 0:_.value)??_)===((M==null?void 0:M.value)??M),renderOption:(_,M,{selected:B})=>{const{key:q,...p}=_,R=typeof M=="string"?M:(M==null?void 0:M.value)??(M==null?void 0:M.id)??(M==null?void 0:M.label)??"";return l.jsxs(x.Box,{component:"li",...p,"data-testid":k?k(R):void 0,sx:{backgroundColor:v.paper,color:v.textPrimary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:v.neutral50},"&.Mui-focused":{backgroundColor:v.neutral50},...B?{backgroundColor:v.neutral50}:{}},children:[r&&l.jsx(x.Checkbox,{checked:B}),l.jsx(x.Typography,{variant:"body2",sx:{color:v.textPrimary,fontSize:14},children:typeof M=="string"?M:M.label})]},q)},renderInput:_=>l.jsx(x.TextField,{..._,label:i,placeholder:o,size:"small",error:m,helperText:h,inputProps:{..._.inputProps,...E?{"data-testid":E}:{}},FormHelperTextProps:j?{"data-testid":j}:void 0,InputLabelProps:{shrink:!!n||!!o,sx:{color:v.textSecondary,"&.Mui-focused":{color:v.textPrimary},"&.Mui-error":{color:v.errorMain}},...y&&!a?{"data-testid":y}:{}},InputProps:{..._.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[f?l.jsx(x.CircularProgress,{size:20}):null,_.InputProps.endAdornment]})}}),onChange:(_,M)=>s(M)})]})},_t=({label:e,checked:t,disabled:n,onChange:r,sx:i,inputTestId:a,labelTestId:o})=>l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:t,disabled:n,onChange:(s,c)=>r(c),inputProps:a?{"data-testid":a}:void 0}),label:e,"data-testid":o,sx:s=>({"& .MuiFormControlLabel-label":{color:s.palette.text.primary,fontSize:14},...i})}),el=({labelText:e,label:t,value:n=[],options:r,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:c,error:u,groupPadding:f=1.5,itemGap:m=1,disabled:h=!1})=>{const g=typeof i=="number"&&i>0,w=g?i:12,d=i===!0,E=i===!1&&!g,y=(j,k)=>{const v=Array.isArray(n)?[...n]:[];k?v.includes(j)||a([...v,j]):a(v.filter(S=>S!==j))};return l.jsxs(x.FormControl,{error:u,disabled:h,sx:j=>{var k;return{display:"flex",flexDirection:"column",px:j.spacing(f),borderRadius:((k=j.shape)==null?void 0:k.borderRadius)||8,mx:-2.5,backgroundColor:j.palette.background.paper}},children:[o==="top"&&e&&l.jsx(x.Typography,{variant:s,sx:j=>({color:j.palette.text.primary,mb:.5,fontSize:j.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:j=>({color:j.palette.text.secondary,mb:.5,mx:1,fontSize:j.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:j.palette.text.primary},"&.Mui-error":{color:j.palette.error.main}}),children:t}),g&&l.jsx(x.Box,{sx:j=>({display:"grid",gridTemplateColumns:`repeat(${w}, 1fr)`,gap:j.spacing(m),mt:0}),children:r.map(j=>{const k=Array.isArray(n)&&n.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:k,onChange:v=>y(j.value,v.target.checked),disabled:h,sx:v=>({color:v.palette.text.secondary,"&.Mui-checked":{color:v.palette.primary.main}})}),label:j.label,sx:v=>({m:0,"& .MuiFormControlLabel-label":{color:v.palette.text.primary,fontSize:12}})},String(j.value))})}),d&&l.jsx(x.Box,{sx:j=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:j.spacing(m),alignItems:"center",mt:0}),children:r.map(j=>{const k=Array.isArray(n)&&n.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:k,onChange:v=>y(j.value,v.target.checked),disabled:h,sx:v=>({color:v.palette.text.secondary,"&.Mui-checked":{color:v.palette.primary.main}})}),label:j.label,sx:v=>({m:0,"& .MuiFormControlLabel-label":{color:v.palette.text.primary,fontSize:12}})},String(j.value))})}),E&&l.jsx(x.Box,{sx:j=>({display:"flex",flexDirection:"column",gap:j.spacing(m),alignItems:"flex-start",mt:0}),children:r.map(j=>{const k=Array.isArray(n)&&n.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:k,onChange:v=>y(j.value,v.target.checked),disabled:h,sx:v=>({color:v.palette.text.secondary,"&.Mui-checked":{color:v.palette.primary.main}})}),label:j.label,sx:v=>({m:0,"& .MuiFormControlLabel-label":{color:v.palette.text.primary,fontSize:12}})},String(j.value))})}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]})},Wr=({label:e,checked:t,disabled:n,onChange:r,sx:i})=>l.jsx(x.FormControlLabel,{control:l.jsx(x.Switch,{checked:t,disabled:n,onChange:(a,o)=>r(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),sn=({labelText:e,label:t,value:n,options:r,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:c,error:u,groupPadding:f=1.5,itemGap:m=1})=>l.jsxs(x.FormControl,{error:u,sx:h=>{var g;return{display:"flex",flexDirection:"column",px:h.spacing(f),borderRadius:((g=h.shape)==null?void 0:g.borderRadius)||8,mx:-2.5,backgroundColor:h.palette.background.paper}},children:[o==="top"&&e&&l.jsx(x.Typography,{variant:s,sx:h=>({color:h.palette.text.primary,mb:.5,fontSize:h.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:h=>({color:h.palette.text.secondary,mb:.5,mx:1,fontSize:h.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:h.palette.text.primary},"&.Mui-error":{color:h.palette.error.main}}),children:t}),l.jsx(x.RadioGroup,{row:i,value:n,onChange:h=>a(h.target.value),sx:h=>({display:"flex",flexDirection:i?"row":"column",gap:h.spacing(m),alignItems:i?"center":"flex-start"}),children:r.map(h=>l.jsx(x.FormControlLabel,{value:h.value,control:l.jsx(x.Radio,{size:"small",sx:g=>({color:g.palette.text.secondary,"&.Mui-checked":{color:g.palette.primary.main}})}),label:l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:h.label}),h.description&&l.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:h.description})]}),sx:{m:0,gap:0,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(h.value)))}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]});$n.extend(Kl);const Ur="DD-MM-YYYY";function Ca(e){return(e||Ur).replace(/-/g,"/")}const Ta=({labelPosition:e="inner",labelVariant:t="subtitle2",label:n,sx:r,inputTestId:i,labelTestId:a,errorTestId:o,value:s,onChange:c,onBlur:u,dateFormat:f=Ur,minDate:m,maxDate:h,disabled:g,error:w,helperText:d,fullWidth:E=!0,size:y="small",placeholder:j,inputProps:k})=>{const v=m??(k==null?void 0:k.min),S=h??(k==null?void 0:k.max),_=f||Ur,M=j??Ca(_),B=s?$n(s,"YYYY-MM-DD",!0):null,q=B!=null&&B.isValid()?B:null,p=R=>{const $=R&&R.isValid()?R.format("YYYY-MM-DD"):"";c==null||c($)};return l.jsxs(x.Box,{children:[e==="top"&&n&&l.jsx(x.Typography,{variant:t,"data-testid":a,sx:{color:"#111827",mb:.5},children:n}),l.jsx(Yl.DatePicker,{format:_,value:q,disabled:g,minDate:v&&$n(v,"YYYY-MM-DD",!0).isValid()?$n(v,"YYYY-MM-DD",!0):void 0,maxDate:S&&$n(S,"YYYY-MM-DD",!0).isValid()?$n(S,"YYYY-MM-DD",!0):void 0,onChange:p,onClose:u,slots:{textField:rt},slotProps:{textField:{fullWidth:E,size:y,label:e==="inner"?n:void 0,error:w,helperText:d,placeholder:M,labelTestId:e==="inner"?a:void 0,inputTestId:i,errorTestId:o,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...r}}}})]})},tl=({labelText:e,labelVariant:t="subtitle2",hasError:n,sx:r,label:i,inputTestId:a,labelTestId:o,errorTestId:s,...c})=>{const u=mr(),f=!!e;return l.jsxs(x.Box,{children:[f&&l.jsx(x.Typography,{variant:t,"data-testid":o,sx:{color:u.textPrimary,mb:.5,fontWeight:500},children:e}),l.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...c,label:f?void 0:i,inputProps:{...c.inputProps,...a?{"data-testid":a}:{}},FormHelperTextProps:{...c.FormHelperTextProps,...s?{"data-testid":s}:{}},InputLabelProps:{...c.InputLabelProps,...o&&!f?{"data-testid":o}:{}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:u.paper,borderRadius:"8px","& fieldset":{borderColor:u.outlineDefault},"&:hover fieldset":{borderColor:u.outlineHover},"&.Mui-focused fieldset":{borderColor:u.outlineFocus},"&.Mui-error fieldset":{borderColor:u.errorMain}},"& .MuiInputBase-input":{color:u.textPrimary,fontSize:14},"& .MuiFormLabel-root":{color:u.textSecondary},"& .MuiFormLabel-root.Mui-focused":{color:u.textPrimary},"& .MuiFormHelperText-root":{color:n?u.errorMain:u.textSecondary},...r}})]})},nl=({title:e,subtitle:t,actions:n,align:r="left",sx:i})=>l.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:r},children:[e&&l.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:16,fontWeight:500,lineHeight:1.3}),children:e}),t&&l.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:500}),children:t})]}),n&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:n})]}),er=Je(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),rl=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:l.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_5814_24904",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function il({items:e,getId:t,onReorder:n,header:r,disabled:i,sx:a,getText:o,showIndex:s=!0,showLeftIcon:c=!0,renderItem:u,chipText:f,helperText:m,emptyStateText:h,emptyStateButtonText:g="Add Phase",onEmptyStateButtonClick:w,emptyStateSx:d}){const[E,y]=I.useState(null),[j,k]=I.useState(null),v=p=>R=>{if(!i){y(p),R.dataTransfer.effectAllowed="move";try{R.dataTransfer.setData("text/plain",String(t(e[p])))}catch{}}},S=p=>R=>{i||(R.preventDefault(),k(p),R.dataTransfer.dropEffect="move")},_=p=>R=>{if(i)return;if(R.preventDefault(),E===null||E===p){y(null),k(null);return}const $=[...e],[G]=$.splice(E,1);$.splice(p,0,G),y(null),k(null),n($)},M=()=>{y(null),k(null)},B=e.length===0,q=B&&(h||w!==void 0);return l.jsxs(x.Box,{role:"list",sx:p=>({display:"flex",flexDirection:"column",gap:p.spacing(1),...a}),children:[r,!B&&l.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),q?l.jsxs(x.Box,{sx:p=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:p.spacing(4),backgroundColor:p.palette.mode==="dark"?"#000000":he.background.paper,border:`2px dashed ${p.palette.mode==="dark"?"#FFFFFF":he.divider}`,borderRadius:"8px",textAlign:"center",...d}),children:[h&&l.jsx(x.Typography,{variant:"body1",sx:p=>({color:p.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:w?2:0,maxWidth:"400px"}),children:h}),w&&l.jsx(x.Button,{variant:"outlined",startIcon:l.jsx(er,{}),onClick:w,disabled:i,sx:p=>({mt:h?0:2,backgroundColor:p.palette.mode==="dark"?`${p.palette.primary.main}1A`:`${p.palette.primary.main}0D`,borderColor:p.palette.primary.main,color:p.palette.primary.main,"&:hover":{backgroundColor:p.palette.mode==="dark"?`${p.palette.primary.main}33`:`${p.palette.primary.main}1A`,borderColor:p.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:g})]}):e.map((p,R)=>{const $=E===R,G=j===R&&E!==null&&E!==R;return l.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:v(R),onDragOver:S(R),onDrop:_(R),onDragEnd:M,sx:N=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${G?N.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:N.spacing(1),opacity:$?.6:1,boxShadow:G?`0 0 0 2px ${N.palette.primary.main}33`:"none"}),children:u?u(p,$):l.jsxs(x.Box,{sx:N=>({display:"flex",alignItems:"center",gap:N.spacing(1),minWidth:0}),children:[c&&l.jsx(rl,{}),s&&l.jsxs(x.Typography,{variant:"body2",sx:N=>({fontWeight:600,fontSize:14,color:`${N.palette.text.primary}`,flex:"0 0 auto"}),children:[R+1,"."]}),(()=>{const N=typeof f=="function"?f(p,R):f;return N?l.jsx(x.Chip,{label:N,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(x.Typography,{variant:"body2",sx:N=>({fontSize:12,fontWeight:500,color:`${N.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:o?o(p):""})]})},String(t(p)))}),!B&&m?typeof m=="string"?l.jsx(x.Typography,{variant:"caption",sx:p=>({color:`${p.palette.text.primary}60`}),children:m}):m:null]})}const bf=lt(x.StepConnector)(({theme:e})=>{const t=e.palette.divider||"#E8E8E8",n=e.palette.primary.main;return{[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:t,transition:"border-color 0.3s ease"},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:n}}}),wf=({items:e,activeIndex:t=1,onStepClick:n,sx:r,completedSteps:i})=>{const a=qs(),o=a.palette.primary.main,s=a.palette.text.primary,c=a.palette.divider,u=a.palette.action&&a.palette.action.disabledBackground||"#E8E8E8",f=m=>{const{active:h,completed:g,icon:w}=m;return g?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${o}`,borderRadius:"50%",backgroundColor:o,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(Sa,{sx:{fontSize:16,fontWeight:600}})}):h?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${o}`,backgroundColor:ot(o,.2),color:o,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:w}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:u,color:s,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:w})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(bf,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:s,fontWeight:500},"& .MuiStep-root":{cursor:n?"pointer":"default"},...r},children:e.map((m,h)=>{const g=Array.isArray(i)&&i.length>0?i.includes(h):h<t;return l.jsxs(x.Step,{onClick:()=>n==null?void 0:n(h),completed:g,children:[l.jsx(x.StepLabel,{StepIconComponent:f,children:l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:h===t?o:s},children:m.label})}),h!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:c}})]},h)})})},Ea=({colorKey:e="primary",colorHex:t,tone:n="soft",bgAlpha:r=.12,borderAlpha:i=.24,sx:a,...o})=>l.jsx(x.Chip,{...o,sx:s=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${ot(t||s.palette.text.primary,.5)}`,backgroundColor:ot(t||s.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||s.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Sf=lt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:he.primary.main}})),Cf=({items:e,activeIndex:t=1,onStepClick:n,sx:r})=>{const[i,a]=I.useState(null),o=s=>{const{active:c,completed:u,icon:f}=s;return u?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${he.primary.main}`,borderRadius:"50%",backgroundColor:he.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(Sa,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${he.primary.main}`,backgroundColor:ot(he.primary.main,.2),color:he.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:f}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:he.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:f})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Sf,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:he.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:n?"pointer":"default"},...r},children:e.map((s,c)=>l.jsxs(x.Step,{onMouseEnter:()=>a(c),onMouseLeave:()=>a(null),onClick:()=>n==null?void 0:n(c),completed:c<t,children:[l.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(x.StepLabel,{StepIconComponent:o,children:[l.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:c===t?he.primary.main:he.text.primary},children:s.label}),l.jsx(Ea,{size:"small",colorHex:c<t?he.success.main:c===t?"#973B00":he.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${he.text.primary}60`,mt:.5,width:"80%"},children:s.description})]}),i===c&&l.jsx(x.Button,{sx:{display:c>t?"none":"block"},variant:c<t?"outlined":"contained",size:"small",color:"primary",children:c<t?"Edit":c===t?"Complete":""})]}),c!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:he.divider}})]},c))})},Tf=Je(l.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Ef=({variant:e="list",title:t,subtitle:n,text:r,items:i=[],icon:a,colorHex:o,sx:s})=>{const c=o||he.info.main,u=ot(c,.08),f=ot(c,.08),m=a??l.jsx(Tf,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:u,border:`1px solid ${f}`,boxShadow:"none",...s},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:m}),l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:r})]}):e==="inline"?l.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:u,border:`1px solid ${f}`,boxShadow:"none",...s},children:l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:r})}):e==="listWithHeader"?l.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:u,border:`1px solid ${f}`,...s},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),n&&l.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:n}),l.jsx(x.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:c,my:-.5}},children:i.map((h,g)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:h})},g))})]}):l.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:u,border:`0.5px solid ${f}`,boxShadow:"none",...s},children:l.jsx(x.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:c,my:-.5}},children:i.map((h,g)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:h})},g))})})},Io=e=>e==null?[]:Array.isArray(e)?e:[e],al=({value:e,onChange:t,items:n,ariaLabel:r,sx:i,tabSx:a})=>{const o=[{alignItems:"center",borderRadius:"6px",p:"10px",backgroundColor:"#FFFFFF","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"}},...Io(i)];return l.jsxs(x.Box,{children:[l.jsx(x.Tabs,{value:e,onChange:(s,c)=>t(c),"aria-label":r||"Fin tabs",sx:o,children:n.map((s,c)=>{const u=typeof s.value=="string"||typeof s.value=="number"?s.value:c;return l.jsx(x.Tab,{value:u,disabled:s.disabled,label:l.jsx(x.Typography,{variant:"body2",children:s.label}),sx:[f=>({px:2,textTransform:"none",color:f.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#FFFFFF","&:hover":{backgroundColor:f.palette.action.hover},"&.Mui-selected":{color:f.palette.common.white,borderColor:f.palette.primary.main,backgroundColor:f.palette.primary.main,fontWeight:600}}),...Io(a)]},String(u))})}),n.map((s,c)=>{const u=typeof s.value=="string"||typeof s.value=="number"?s.value:c,f=s.content??(typeof s.value=="object"?s.value:null);return f&&e===u?l.jsx(x.Box,{sx:{mt:1},children:f},`panel-${u}`):null})]})},jf=Je(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),ol=({name:e,columns:t,initialRow:n,addLabel:r,maxRows:i,hideAddWhenMax:a,disableAddWhenMax:o=!0,showEmptyState:s=!0,rowDeletable:c=!0,control:u,sx:f,addActions:m,emptyTitle:h="No items configured",emptySubtitle:g="Click 'Add' to get started.",emptyCardSx:w,setValue:d,rowSelectionMode:E,rowSelectionKey:y,dateFormat:j})=>{const{fields:k,append:v,remove:S}=Ee.useFieldArray({control:u,name:e}),M=!(typeof i=="number"?k.length>=i:!1),B=I.useMemo(()=>{if(y)return y;const V=t.find(K=>K.type==="rowSelect");return V==null?void 0:V.key},[t,y]),q=Ee.useWatch({control:u,name:e})||[],p=I.useMemo(()=>{if(!B)return{};const V={};return q.forEach((K,te)=>{V[te]=!!(K!=null&&K[B])}),V},[q,B]),R=I.useCallback(V=>p[V]===!0,[p]),$=I.useCallback((V,K)=>{if(!d||!B)return;const te=`${e}.${V}.${B}`;E==="single"&&K&&q.forEach((oe,T)=>{if(T!==V){const D=`${e}.${T}.${B}`;d(D,!1,{shouldDirty:!0})}}),d(te,K,{shouldDirty:!0})},[e,B,E,d,q]),G=V=>{const K={...V||n};t.forEach(te=>{te.value!==void 0&&K[te.key]===void 0&&(K[te.key]=typeof te.value=="function"?te.value(K,k.length):te.value)}),v(K)};I.useEffect(()=>{!s&&k.length===0&&M&&G()},[s,k.length,M]);const N=I.useMemo(()=>t.reduce((K,te)=>{if(te.width==="auto"||te.width===void 0)return K+120;const oe=typeof te.width=="number"?te.width:typeof te.width=="string"&&parseInt(te.width)||160;return K+oe},0)+(c?100:0),[t,c]),re=V=>V.width==="auto"||V.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof V.width=="number"?{width:`${V.width}px`,minWidth:`${V.width}px`,maxWidth:`${V.width}px`}:typeof V.width=="string"?{width:V.width,minWidth:V.width}:{width:"160px",minWidth:"160px"};return l.jsx(x.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"visible",...f},children:k.length===0&&s?l.jsxs(x.Box,{sx:V=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:ot(V.palette.primary.main,.4),backgroundColor:ot(V.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...w}),children:[l.jsx(x.Typography,{variant:"subtitle1",sx:V=>({color:V.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:h}),l.jsx(x.Typography,{variant:"body2",sx:V=>({color:V.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:g}),Array.isArray(m)&&m.length>0?m.map((V,K)=>l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(er,{}),sx:{mr:1,mt:1},onClick:()=>G(V.template),disabled:!M&&o,style:{display:!M&&a?"none":void 0},children:V.label},`empty-add-${K}`)):r&&l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(er,{}),onClick:()=>G(),disabled:!M&&o,style:{display:!M&&a?"none":void 0},children:r})]}):l.jsxs(l.Fragment,{children:[l.jsx(x.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(m)&&m.length>0?m.map((V,K)=>l.jsx(x.Button,{variant:K===0?"contained":"outlined",size:"small",startIcon:l.jsx(er,{}),onClick:()=>G(V.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:K===0?"#04502d":void 0}},disabled:!M&&o,style:{display:!M&&a?"none":void 0},children:V.label},`add-${K}`)):r&&l.jsx(x.Button,{variant:"contained",size:"small",startIcon:l.jsx(er,{}),onClick:()=>G(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},disabled:!M&&o,style:{display:!M&&a?"none":void 0},children:r})}),l.jsx(x.Box,{sx:{width:"100%",overflowX:"auto",overflowY:"auto",maxHeight:"600px","&::-webkit-scrollbar":{height:"8px",width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px","&:hover":{backgroundColor:"#555"}}},children:l.jsx(x.TableContainer,{sx:{width:"100%",minWidth:"100%"},children:l.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${N||650}px`},children:[l.jsx(x.TableHead,{children:l.jsxs(x.TableRow,{children:[t.map(V=>l.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,...re(V)},children:V.header},V.key)),c&&l.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,width:100,textAlign:"center"},children:"Actions"})]})}),l.jsx(x.TableBody,{children:k.map((V,K)=>{const te=R(K),oe=E&&!te;return l.jsxs(x.TableRow,{children:[t.map(T=>{var pe;const D=`${e}.${K}.${T.key}`,ee=T.type==="rowSelect"||T.key===B,se=ee?!1:oe?!0:typeof T.disabled=="function"?T.disabled(V,K):!!T.disabled;if(T.type==="index"){const U=T.indexFormat?T.indexFormat(K):`#${K+1}`;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((pe=T.cellSx)==null?void 0:pe.textAlign)||"center",...re(T),...T.cellSx},children:U},T.key)}if(T.value!==void 0&&T.editable===!1){const U=typeof T.value=="function"?T.value(V,K):T.value;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...re(T),...T.cellSx},children:U},T.key)}const ie=T.endorsementText?typeof T.endorsementText=="function"?T.endorsementText(V,K):T.endorsementText:void 0;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...re(T),...T.cellSx},children:T.type==="rowSelect"||ee&&T.type==="checkbox"?l.jsx(Ee.Controller,{name:D,control:u,defaultValue:!1,render:({field:U})=>l.jsx(_t,{label:"",checked:!!U.value,disabled:!1,onChange:ne=>{U.onChange(ne),$(K,ne)},sx:T.sx})}):T.type==="checkbox"?l.jsx(Ee.Controller,{name:D,control:u,render:({field:U})=>l.jsx(_t,{label:"",checked:!!U.value,disabled:se,onChange:U.onChange,sx:T.sx})}):T.type==="select"?l.jsx(Ee.Controller,{name:D,control:u,render:({field:U})=>l.jsx(ci,{...U,fullWidth:!0,disabled:se,options:T.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...T.sx},helperText:T.helperText,required:T.required})}):T.type==="date"?l.jsx(Ee.Controller,{name:D,control:u,defaultValue:T.value!==void 0?typeof T.value=="function"?T.value(V,K):T.value:void 0,render:({field:U})=>(I.useEffect(()=>{if(d&&(U.value===void 0||U.value===null||U.value==="")&&T.value!==void 0){const ne=typeof T.value=="function"?T.value(V,K):T.value;d(D,ne,{shouldValidate:!1})}},[D,U.value,T.value,V,K,d]),l.jsx(Ta,{name:U.name,value:U.value,onChange:U.onChange,onBlur:U.onBlur,fullWidth:!0,disabled:se,size:"small",dateFormat:T.dateFormat??j,placeholder:T.placeholder||Ca(T.dateFormat??j??"DD-MM-YYYY"),sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...T.sx},helperText:T.helperText,required:T.required}))}):l.jsx(Ee.Controller,{name:D,control:u,defaultValue:T.value!==void 0?typeof T.value=="function"?T.value(V,K):T.value:void 0,render:({field:U})=>(I.useEffect(()=>{if(d&&(U.value===void 0||U.value===null||U.value==="")&&T.value!==void 0){const ne=typeof T.value=="function"?T.value(V,K):T.value;d(D,ne,{shouldValidate:!1})}},[D,U.value,T.value,V,K,d]),l.jsx(rt,{...U,fullWidth:!0,type:T.type==="number"?"number":"text",placeholder:T.placeholder,disabled:se,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...T.sx},helperText:T.helperText,required:T.required,endorsementText:ie,endorsementBg:T.endorsementBg,endorsementColor:T.endorsementColor,endorsementRadius:T.endorsementRadius,endorsementHeight:T.endorsementHeight,endorsementPaddingX:T.endorsementPaddingX,inputProps:{...T.type==="number"?{min:T.min,max:T.max,step:T.step}:{minLength:T.minLength,maxLength:T.maxLength,pattern:T.pattern}}}))})},T.key)}),c&&l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>S(K),sx:{width:"20px",height:"20px"},children:l.jsx(jf,{sx:{fontSize:"20px"}})})})]},V.id)})})]})})})]})})},sl=({name:e,control:t,items:n,sx:r,cardSx:i})=>l.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...r},children:n.map(a=>{const o=!!a.leftAction,s=!!a.rightAction,c=!!(a.header||a.chipText),u=a.leftAction,f=a.rightAction;return l.jsxs(x.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[o&&u&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Ee.Controller,{name:u.name,control:t,defaultValue:!1,render:({field:m})=>l.jsx(_t,{label:u.label||"",checked:!!m.value,onChange:m.onChange,sx:{margin:0}})})}),c&&l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:o||s?1:"none",ml:o?1:0},children:[a.header&&l.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.jsx(x.Box,{sx:{bgcolor:"rgba(26,26,26,0.1)",px:1.5,py:.375,borderRadius:"4px",fontSize:"12px",color:"rgba(26,26,26,0.8)"},children:a.chipText})]}),s&&f&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Ee.Controller,{name:f.name,control:t,defaultValue:!1,render:({field:m})=>l.jsx(Wr,{label:f.label,checked:!!m.value,onChange:m.onChange,sx:{margin:0}})})}),!o&&!s&&!c&&l.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),ll=Je(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Si=Je(l.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),kf=[{label:"Interest-only",value:"interest-only"},{label:"Principal moratorium",value:"principal-moratorium"},{label:"EMI",value:"emi"},{label:"Equal-principal",value:"equal-principal"},{label:"Balloon",value:"balloon"},{label:"Bullet",value:"bullet"},{label:"Step-up/Down",value:"step-up-down"},{label:"Seasonal skips",value:"seasonal-skips"},{label:"Custom fixed installment",value:"custom-fixed"},{label:"Full payment holiday (no billing)",value:"payment-holiday"}],Ci=[{label:"Accrue & capitalize at end of phase",value:"accrue-capitalize"},{label:"Accrue & bill in first period after phase",value:"accrue-bill-next"},{label:"Accrue & forgive at phase end",value:"accrue-forgive"}],Of=({phase:e,index:t,onUpdate:n,onDelete:r,months:i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],disabled:a=!1,sx:o})=>{const[s,c]=I.useState(e.seasonalMonths||[]),u=h=>{const g=s.includes(h)?s.filter(w=>w!==h):[...s,h];c(g),n(e.id,{seasonalMonths:g})},f=(()=>{const h=e.min||0;return h<0?"Min cannot be negative.":Number.isInteger(h)?null:"Use whole periods."})(),m=(()=>{const h=e.min||0,g=e.max||0;return Number.isInteger(g)?g<h?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(x.Card,{sx:{border:"2px solid",borderColor:he.divider,position:"relative",...o},children:l.jsxs(x.CardContent,{sx:{p:2},children:[l.jsxs(x.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(x.Box,{children:l.jsx(rl,{})}),l.jsx(Ea,{label:t+1,size:"small"})]}),l.jsx(x.IconButton,{onClick:()=>r(e.id),disabled:a,sx:{color:he.error.main,"&:hover":{bgcolor:$r[50]}},size:"small",children:l.jsx(ll,{fontSize:"small"})})]}),l.jsx(x.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(x.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(x.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx(ci,{labelText:"Phase type",value:e.type,onChange:h=>n(e.id,{type:h.target.value}),options:kf,disabled:a})}),l.jsxs(x.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(x.Typography,{variant:"caption",sx:{fontSize:"12px",color:he.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(rt,{type:"number",value:e.priority||5,onChange:h=>{const g=parseInt(h.target.value)||5;n(e.id,{priority:Math.min(9,Math.max(1,g))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(rt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:h=>{const g=parseInt(h.target.value)||0;n(e.id,{min:g,...e.lockLength?{max:g}:{}})},inputProps:{min:0},disabled:a,error:!!f,helperText:f||void 0})}),l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(rt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:h=>n(e.id,{max:parseInt(h.target.value)||0}),inputProps:{min:0},disabled:a||e.lockLength,error:!!m&&!e.lockLength,helperText:e.lockLength?"Locked to Min":m||void 0,sx:e.lockLength?{opacity:.5}:{}})})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:3},children:[l.jsx(_t,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:h=>n(e.id,{lockLength:h,...h?{max:e.min}:{}}),disabled:a}),l.jsx(_t,{label:"Residual fill",checked:e.residualFill||!1,onChange:h=>n(e.id,{residualFill:h}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(Si,{sx:{fontSize:14,color:he.text.secondary,cursor:"help"}})})]}),l.jsx(sn,{value:e.interestPolicy||"accrue-capitalize",onChange:h=>n(e.id,{interestPolicy:h}),options:Ci,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(sn,{value:e.balloonType||"percent",onChange:h=>n(e.id,{balloonType:h}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(rt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:h=>n(e.id,{balloonAmount:parseFloat(h.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(rt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:h=>n(e.id,{balloonPercent:parseFloat(h.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(rt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:h=>n(e.id,{stepPercent:parseFloat(h.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(rt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:h=>n(e.id,{stepEveryN:parseInt(h.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(x.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(h=>l.jsx(x.Chip,{label:h,size:"small",onClick:()=>!a&&u(h),sx:{cursor:a?"default":"pointer",bgcolor:s.includes(h)?he.primary.main:"transparent",color:s.includes(h)?he.primary.contrastText:he.text.primary,border:`1px solid ${he.divider}`,"&:hover":{bgcolor:s.includes(h)?$r[600]:$r[50]}}},h))})]}),l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(Si,{sx:{fontSize:14,color:he.text.secondary,cursor:"help"}})})]}),l.jsx(sn,{value:e.interestPolicy||"accrue-capitalize",onChange:h=>n(e.id,{interestPolicy:h}),options:Ci,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(rt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:h=>n(e.id,{customAmount:parseFloat(h.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(Si,{sx:{fontSize:14,color:he.text.secondary,cursor:"help"}})})]}),l.jsx(sn,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:h=>n(e.id,{holidayInterestTreatment:h}),options:Ci,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};function cl(e,t){return{field:`${e}-field-${t}`,label:`${e}-label-${t}`,input:`${e}-input-${t}`,error:`${e}-error-${t}`,section:`${e}-section-${t}`,upload:`${e}-upload-${t}`,preview:`${e}-preview-${t}`,remove:`${e}-remove-${t}`,replace:`${e}-replace-${t}`,option:n=>`${e}-option-${t}-${String(n)}`,submit:`${e}-submit`,cancel:`${e}-cancel`}}function ul(e,t){if(!e||!t.name)return null;const n=t.automation;if(n!=null&&n.skip)return null;const r=cl(e,t.name);return{field:(n==null?void 0:n.fieldTestId)||r.field,label:(n==null?void 0:n.labelTestId)||r.label,input:t.testId||(n==null?void 0:n.inputTestId)||r.input,error:(n==null?void 0:n.errorTestId)||r.error,section:r.section,upload:r.upload,preview:r.preview,remove:r.remove,replace:r.replace,option:r.option}}async function pl(e,t,n,r){try{const{endpoint:i,method:a="GET",valueField:o="value",labelField:s="label",headers:c={},params:u={},body:f,transform:m,passThroughFields:h}=e;let g=i;if(t&&!i.startsWith("http")&&(g=`${t}${i.startsWith("/")?i:`/${i}`}`),r){const v=/\{([^}]+)\}/g;g=g.replace(v,(S,_)=>{const M=r[_];return M!=null?encodeURIComponent(String(M)):""}),g=g.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const w=new URLSearchParams;Object.entries(u).forEach(([v,S])=>{S!=null&&w.append(v,String(S))}),w.toString()&&(g+=`${g.includes("?")?"&":"?"}${w.toString()}`);try{const v=/^https?:\/\//i.test(g),S=new URL(g,v?void 0:"http://local.placeholder"),_=Array.from(S.searchParams.entries());for(const[M,B]of _)(B===""||B==="undefined"||B==="null")&&S.searchParams.delete(M);v?g=S.toString():g=S.pathname+(S.search?S.search:""),g=g.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const d={"Content-Type":"application/json",...n,...c},E={method:a,headers:d};(a==="POST"||a==="PUT")&&f&&(E.body=JSON.stringify(f));const y=await fetch(g,E);if(!y.ok)throw new Error(`API request failed: ${y.status} ${y.statusText}`);const j=await y.json();if(m)return m(Array.isArray(j)?j:j.data||j);const k=Array.isArray(j)?j:j.data||j;if(!Array.isArray(k))throw new Error("API response is not an array");return k.map(v=>{const S={label:v[s]||v.name||v.title||String(v[o]||""),value:v[o]||v.id||v.value||""},_=Array.isArray(h)?h:void 0;if(Array.isArray(_))for(const M of _)v[M]!==void 0&&(S[M]=v[M]);return S})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function dl(e,t,n,r,i=!1){const a=I.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!r)return null;const s=r[e.dependsOn];return s!==void 0?s:null},[e==null?void 0:e.dependsOn,r]),o=I.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,r?JSON.stringify(r):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,r]);return $c({queryKey:o,queryFn:()=>{if(!e)throw new Error("API config is required");return pl(e,t,n,r)},enabled:!!i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:s=>Math.min(1e3*2**s,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function rn(e){return!!(e.apiConfig||e.api_endpoint)}function ja(e){return e.apiConfig?e.apiConfig:e.api_endpoint?{endpoint:e.api_endpoint,method:e.api_method||"GET",valueField:e.value_field||"value",labelField:e.label_field||"label",dependsOn:e.depends_on,conditional:e.conditional}:null}function Ff(e,t){const n=ja(e);if(!(n!=null&&n.conditional)&&!e.conditional)return!0;if(n!=null&&n.dependsOn||e.depends_on){const r=(n==null?void 0:n.dependsOn)||e.depends_on;if(r){const i=t[r];return i!=null&&i!==""}}return!0}const ka=({field:e,control:t,errors:n,baseUrl:r,apiHeaders:i,formData:a,setValue:o,testIdPrefix:s,dateFormat:c})=>{const u=n[e.name],f=!!u,m=I.useMemo(()=>ul(s,e),[s,e]),h=I.useMemo(()=>m?{inputTestId:m.input,labelTestId:m.label,errorTestId:m.error,optionTestId:m.option}:{},[m]),[g,w]=I.useState(!1),d=I.useRef(!1),[E,y]=I.useState(!1),[j,k]=I.useState(!1),[v,S]=I.useState(!1),_=I.useRef(null),M=I.useRef(null),B=()=>{var z;const L=e.required;if(typeof L=="function")try{return!!L(a||{})}catch{return!1}if(L!==void 0)return!!L;const Y=(z=e.validation)==null?void 0:z.required;if(typeof Y=="function")try{return!!Y(a||{})}catch{return!1}return Y!==void 0?!!Y:!1},q=L=>B()?`${L} *`:L,p=()=>{if(e.value!==void 0){if(typeof e.value=="function")try{return e.value(a||{})}catch{return""}return e.value}return e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:""},R=I.useRef(void 0);I.useEffect(()=>{const L=e.value;if(typeof L!="function"||!o)return;let Y;try{Y=L(a||{})}catch{return}const z=a?a[e.name]:void 0;if(R.current===void 0&&(R.current=Y),z===void 0||z===R.current)try{o(e.name,Y,{shouldValidate:!0,shouldDirty:!1}),R.current=Y}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((L,Y)=>({...L,[Y]:a[Y]}),{}):a||{}),e.name]);const $=I.useMemo(()=>{const L=ja(e);return L&&Array.isArray(e.passThroughFields)&&(L.passThroughFields=e.passThroughFields),L},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),G=I.useRef(null),N=$!=null&&$.dependsOn?a==null?void 0:a[$.dependsOn]:null;I.useEffect(()=>{$!=null&&$.dependsOn&&(G.current=N)},[$==null?void 0:$.dependsOn,N]);const re=I.useMemo(()=>{const L=e.showWhen;if(typeof L=="function")try{return!!L(a||{})}catch{return!0}if(L&&typeof L=="object"){const Y=L.field,z=L.equals,xe=L.in,je=Y?(a||{})[Y]:void 0;if(Y&&typeof z<"u")return je===z;if(Y&&Array.isArray(xe))return xe.includes(je)}return!0},[e.showWhen,a]),V=I.useCallback(()=>{const L=e.dynamicEndorsement;if(typeof L=="function")try{return L(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),K=I.useCallback(()=>{const L=e.endAdornment,Y=e.endAdornmentSwitch,z=e.endAdornmentCheckbox;if(Y)return l.jsx(Ee.Controller,{name:Y,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:xe})=>l.jsx(x.Switch,{checked:xe.value||!1,onChange:je=>{xe.onChange(je.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(je.target.checked,a,o)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(z)return l.jsx(Ee.Controller,{name:z,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:xe})=>l.jsx(_t,{label:"",checked:xe.value||!1,onChange:xe.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof L=="function")try{return L(a||{},{control:t,setValue:o})}catch{return}return L},[e,a,t,o]),te=I.useMemo(()=>!!(g&&rn(e)&&(!($!=null&&$.dependsOn)||N)),[g,e,$==null?void 0:$.dependsOn,N]),oe=I.useMemo(()=>{const L={};if(!a)return L;const Y=($==null?void 0:$.endpoint)||(e==null?void 0:e.api_endpoint);if(Y&&typeof Y=="string"){const z=Y.match(/\{([^}]+)\}/g)||[];for(const xe of z){const je=xe.slice(1,-1),Ve=a[je];Ve!==void 0&&(L[je]=Ve)}}if($!=null&&$.dependsOn){const z=$.dependsOn,xe=a[z];xe!==void 0&&(L[z]=xe)}return L},[$==null?void 0:$.endpoint,e==null?void 0:e.api_endpoint,$==null?void 0:$.dependsOn,a]),{data:T=[],isLoading:D,error:ee}=dl($,r,i,oe,te),se=I.useCallback(()=>{rn(e)&&!d.current&&(d.current=!0,w(!0))},[e]),ie=I.useCallback(()=>{rn(e)&&!d.current&&(d.current=!0,w(!0))},[e]);I.useEffect(()=>{if(rn(e)&&!d.current){const L=a==null?void 0:a[e.name];L!=null&&L!==""&&(d.current=!0,w(!0))}},[e,a]),I.useEffect(()=>{rn(e)&&($!=null&&$.dependsOn)&&(N!=null&&`${N}`!=""?(d.current=!0,w(!0)):(d.current=!1,w(!1)))},[$==null?void 0:$.dependsOn,N]);const pe=I.useCallback(L=>{if(typeof L=="function")try{const Y=L(a||{});return pe(Y)}catch{return[]}return L?Array.isArray(L)?L.map(Y=>{if(Y&&typeof Y=="object"){const z=Y.value??Y.id??Y.key??void 0,xe=Y.label??Y.name??Y.title??(z!==void 0?String(z):"");return{label:String(xe??""),value:String(z??xe??"")}}return{label:String(Y),value:String(Y)}}):typeof L=="object"?Object.keys(L).map(Y=>({value:String(Y),label:String(L[Y])})):[]:[]},[a]),U=I.useCallback(()=>rn(e)?Array.isArray(T)?T:[]:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?pe(e.options):[],[e,T,pe]),ne=()=>{var L,Y,z,xe,je,Ve;switch(e.type){case"title":return l.jsx(x.Typography,{variant:e.variant||"h4",component:"h1",color:e.color,align:e.align||"left",sx:{mb:3,fontWeight:600,...e.sx},children:e.label});case"section":return l.jsx(x.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left","data-testid":m==null?void 0:m.section,sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const jt=e.actionName,Be=e.actionComponent,Ye=e.actionLabel,mt=F=>l.jsx(nl,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:F??e.actions}),et=F=>{if(e.cardWrap){const W={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(x.Card,{sx:W,...e.cardProps,children:F})}return F};return et(jt&&Be?l.jsx(Ee.Controller,{name:jt,control:t,defaultValue:e.value??!1,render:({field:F})=>mt(Be==="switch"?l.jsx(Wr,{label:Ye,checked:!!F.value,onChange:F.onChange}):l.jsx(_t,{label:Ye||"",checked:!!F.value,onChange:F.onChange}))}):mt());case"tabs":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((Y=(L=e.items)==null?void 0:L[0])==null?void 0:Y.value)=="string"||typeof((xe=(z=e.items)==null?void 0:z[0])==null?void 0:xe.value)=="number"?(Ve=(je=e.items)==null?void 0:je[0])==null?void 0:Ve.value:0),render:({field:F})=>{const A=e.items||[],W=A.map((H,Q)=>({label:H.label,value:typeof H.value=="string"||typeof H.value=="number"?H.value:Q,content:H.content,disabled:H.disabled})),Z=F.value,ce=(()=>{if(typeof Z=="string"||typeof Z=="number"){const H=A.findIndex((Q,ge)=>typeof Q.value=="string"||typeof Q.value=="number"?Q.value===Z:ge===Z);return H>=0?H:0}return Number(Z)||0})(),fe=A[ce]||{};return l.jsxs(x.Box,{children:[l.jsx(al,{value:F.value,onChange:F.onChange,items:W,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(fe.fields)&&fe.fields.length>0&&(()=>{const H=fe.fields,Q=[];let ge=[];for(const Ae of H)Ae.type==="section"&&ge.length>0?(Q.push(ge),ge=[Ae]):ge.push(Ae);ge.length>0&&Q.push(ge);const Fe={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1};return l.jsx(x.Box,{sx:{mt:1},children:Q.map((Ae,qe)=>{const Me=Ae.find(tt=>tt.type==="section"),Ke=(Me==null?void 0:Me.cardWrap)!==!1,ae=l.jsx(l.Fragment,{children:Ae.map(tt=>{const nt=tt.showWhen;if(nt)try{if(typeof nt=="function"){if(!nt(a||{}))return null}else if(typeof nt=="object"){const Tn=nt.field,$a=nt.equals,Ra=nt.in,Pa=Tn?(a||{})[Tn]:void 0;if(Tn&&typeof $a<"u"&&Pa!==$a||Tn&&Array.isArray(Ra)&&!Ra.includes(Pa))return null}}catch{}const Cn=Math.min(Math.max(tt.col??12,1),12);return l.jsx(x.Box,{sx:{gridColumn:`span ${Cn}`},children:l.jsx(ka,{field:tt,control:t,errors:n,baseUrl:r,apiHeaders:i,formData:a,setValue:o,testIdPrefix:s})},tt.name)})});return Ke?l.jsx(x.Card,{sx:{...Fe,...(Me==null?void 0:Me.cardSx)||{}},...(Me==null?void 0:Me.cardProps)||{},children:ae},`tab-group-${qe}`):l.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:ae},`tab-group-${qe}`)})})})()]})}});case"grid":const kt=e.defaultRows||[];return l.jsx(x.Box,{children:l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:kt.length>0?kt:p()||[],render:()=>l.jsx(ol,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,showEmptyState:e.showEmptyState,maxRows:e.maxRows,hideAddWhenMax:e.hideAddWhenMax,disableAddWhenMax:e.disableAddWhenMax,rowDeletable:e.rowDeletable!==!1,control:t,setValue:o,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey,dateFormat:c})})});case"listcards":return l.jsx(sl,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:e.items||[],render:({field:F})=>{const A=e,W=F.value||A.items||[],Z=typeof A.getId=="function"?A.getId:typeof A.getId=="string"?H=>H[A.getId]:H=>H.id??H._id??H.key??String(H),ce=typeof A.getText=="function"?A.getText:typeof A.getText=="string"?H=>H[A.getText]??String(H):H=>H.text??H.label??H.name??H.title??String(H),fe=(()=>{if(typeof A.chipText=="function")return A.chipText;if(typeof A.chipText=="string")return W.length>0&&W[0]&&A.chipText in W[0]?(H,Q)=>H[A.chipText]??void 0:A.chipText})();return l.jsx(il,{items:W,getId:Z,onReorder:H=>{F.onChange(H)},header:A.header,disabled:e.disabled,sx:A.sx,chipText:fe,helperText:A.helperText||(f?u==null?void 0:u.message:void 0),getText:ce,showIndex:A.showIndex!==!1,showLeftIcon:A.showLeftIcon!==!1,renderItem:A.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>e.type==="textarea"?l.jsx(tl,{...F,...h,labelText:e.labelPosition==="top"?q(e.label):void 0,label:e.labelPosition!=="top"?q(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:f,helperText:(u==null?void 0:u.message)||e.helperText}):l.jsx(rt,{...F,...h,id:e.id,labelText:e.labelPosition==="top"?q(e.label):void 0,label:e.labelPosition!=="top"?q(e.label):void 0,endAdornment:K(),endorsementText:V(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?E?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:f,helperText:(u==null?void 0:u.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(Us,{position:"end",children:l.jsx(Ar,{"aria-label":"toggle password visibility",onClick:()=>y(A=>!A),edge:"end",children:E?l.jsx(_o,{}):l.jsx(Po,{})})})}:void 0})});case"number":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(rt,{...F,...h,id:e.id,labelText:e.labelPosition==="top"?q(e.label):void 0,label:e.labelPosition!=="top"?q(e.label):void 0,endAdornment:K(),endorsementText:V(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:f,helperText:(u==null?void 0:u.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const le=U();return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>{const A=typeof e.disabled=="function"?!!e.disabled(a||{}):!!e.disabled,W=e.disableWhenEmptyOptions===!0&&Array.isArray(le)&&le.length===0,Z=A||W||D,ce=F.value,fe=(()=>{if(Array.isArray(le)&&le.length>0){const H=le.find(Q=>String(Q==null?void 0:Q.value)===String(ce));return H?H.value:ce}return ce})();return l.jsx(ci,{...h,labelText:e.labelPosition==="top"?q(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?q(e.label):void 0,labelVariant:e.labelVariant,value:fe,onChange:F.onChange,options:le,disabled:Z,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?q(e.label):void 0):e.placeholder,loading:D,error:f||!!ee,helperText:(u==null?void 0:u.message)||(ee==null?void 0:ee.message)||e.helperText,onOpen:se})}});case"checkbox":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(_t,{...h,label:q(e.label),checked:!!F.value,disabled:e.disabled,onChange:F.onChange})});case"toggle":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(sn,{label:q(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:F.value,options:e.options||[],row:!0,onChange:F.onChange})});case"radio":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(sn,{label:q(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:F.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:F.onChange})});case"checkboxGroup":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p()||[],render:({field:F})=>l.jsx(el,{label:q(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(F.value)?F.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:F.onChange,disabled:e.disabled})});case"switch":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(Wr,{label:q(e.label),checked:!!F.value,disabled:e.disabled,onChange:F.onChange})});case"autocomplete":const ct=U(),O=!!((typeof e.disabled=="function"?e.disabled(a||{},{options:ct,isLoading:D,error:ee}):e.disabled)||e.disableWhenEmptyOptions===!0&&Array.isArray(ct)&&ct.length===0||D||$!=null&&$.dependsOn&&!N);return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>{const A=F.value,W=e.multiple===!0,Z=($==null?void 0:$.valueField)||e.value_field||"value",ce=H=>{if(H!=null){if(typeof H=="string"||typeof H=="number")return H;if(typeof H=="object"){if(H[Z]!==void 0)return H[Z];if(H.value!==void 0)return H.value;if(H.id!==void 0)return H.id}}},fe=(()=>{if(W)return(Array.isArray(A)?A:[]).map(Q=>{const ge=String(typeof Q=="object"?ce(Q):Q);return ct.find(Ae=>{const qe=ce(Ae);return qe!==void 0&&String(qe)===ge})||null}).filter(Boolean);{if(A==null||A==="")return null;const H=String(typeof A=="object"?ce(A):A),Q=ct.find(ge=>{const Fe=ce(ge);return Fe!==void 0&&String(Fe)===H});return Q||null}})();return l.jsx(Js,{...h,id:e.id,options:ct,value:fe,multiple:W,labelText:e.labelPosition==="top"?q(e.label):void 0,label:e.labelPosition!=="top"?q(e.label):void 0,placeholder:O&&($!=null&&$.dependsOn)&&!N?`Please select ${$.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:O,loading:D,error:f||!!ee,helperText:(u==null?void 0:u.message)||(ee==null?void 0:ee.message)||e.helperText||"",onOpen:ie,noOptionsText:O&&($!=null&&$.dependsOn)&&!N?`Please select ${$.dependsOn.replace(/_/g," ")} first`:D?"Fetching data...":g&&!D&&ct.length===0?"No options available":"Click to load options",onChange:H=>{const Q=($==null?void 0:$.valueField)||e.value_field||"value";if(W){const Fe=(Array.isArray(H)?H:[]).map(Ae=>typeof Ae=="object"&&(Ae[Q]||Ae.value||Ae.id)||Ae);F.onChange(Fe)}else{let ge;H&&typeof H=="object"?ge=H[Q]||H.value||H.id||H:ge=H,F.onChange(ge);const Fe=e.selectedAssignments;if(Fe&&H&&typeof H=="object")for(const[Ae,qe]of Object.entries(Fe)){const Me=H[qe];if(Me!==void 0&&typeof o=="function")try{o(Ae,Me,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":{const F=e.dateFormat??c;return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>l.jsx(Ta,{name:A.name,value:A.value,onChange:A.onChange,onBlur:A.onBlur,...h,id:e.name,label:q(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:f,helperText:u==null?void 0:u.message,dateFormat:F,minDate:e.minDate,maxDate:e.maxDate})})}case"image":return l.jsx(Ee.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>{const A=F.value||e.defaultValue||e.src;if(A){const Q=e.imageUploaded||{},ge=Q.previewText||"Preview",Fe=Q.removeText||"Remove",Ae=Q.saveText||"Save logo",qe=Q.showSave!==void 0?Q.showSave:!!(e.onSave||Q.saveText),Me=()=>{if(S(!0),typeof e.onPreview=="function")try{e.onPreview(A)}catch{}},Ke=()=>{F.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},ae=()=>{typeof e.onSave=="function"&&e.onSave({url:A,file:M.current||void 0})},tt=nt=>{const Cn=nt.target.files&&nt.target.files[0];if(Cn){if(typeof e.onFileSelected=="function")try{e.onFileSelected(Cn)}catch{}try{const Tn=URL.createObjectURL(Cn);F.onChange(Tn)}catch{}M.current=Cn,S(!1)}};return l.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...Q.cardSx},children:[l.jsx("input",{type:"file",ref:_,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:tt}),l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...Q.thumbnailSx},children:l.jsx("img",{src:A,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(x.Box,{sx:{flexGrow:1},children:[l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...Q.fileNameSx},children:typeof A=="string"?A.split("/").pop():"Selected image"}),l.jsx(x.Typography,{sx:{fontSize:"10px",...Q.fileMetaSx},children:"Image selected"})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[l.jsx(x.Button,{type:"button",sx:{...Q.previewButtonSx},variant:"outlined",onClick:Me,startIcon:l.jsx(Po,{}),"data-testid":m==null?void 0:m.preview,children:ge}),l.jsx(x.Button,{variant:"outlined",color:"error",onClick:Ke,sx:{...Q.removeButtonSx},startIcon:l.jsx(_o,{}),"data-testid":m==null?void 0:m.remove,children:Fe}),qe&&l.jsx(x.Button,{variant:"contained",onClick:ae,sx:{...Q.saveButtonSx},children:Ae})]})]}),l.jsxs(x.Dialog,{open:v,onClose:()=>S(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(x.DialogTitle,{children:Q.previewTitle||"Image preview"}),l.jsx(x.DialogContent,{children:l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:l.jsx("img",{src:A,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(x.DialogActions,{children:[l.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var nt;return(nt=_.current)==null?void 0:nt.click()},"data-testid":m==null?void 0:m.replace,children:Q.replaceText||"Replace logo"}),l.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>S(!1),children:Q.closeText||"Close"})]})]})]})}const W=e.imagePlaceholder||{},Z=W.icon||"upload",ce=_,fe=()=>{var Q;try{(Q=ce.current)==null||Q.click()}catch{}},H=Q=>{const ge=Q.target.files&&Q.target.files[0];if(ge){typeof e.onFileSelected=="function"&&e.onFileSelected(ge);try{const Fe=URL.createObjectURL(ge);F.onChange(Fe)}catch{}M.current=ge}};return l.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...W.sx},children:[l.jsx("input",{type:"file",ref:ce,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:H}),l.jsx(Ar,{sx:{borderRadius:"8px",...W.iconSx},children:Z==="image"?l.jsx(df,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(qr,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...W.titleSx},children:W.title||"Drag & Drop the image here"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...W.subtitleSx},children:W.subtitle||""}),l.jsx(x.Button,{onClick:fe,sx:{my:2,...W.buttonSx},startIcon:l.jsx(qr,{}),variant:"contained",disabled:e.disabled,"data-testid":m==null?void 0:m.upload,children:W.buttonText||"Upload File"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...W.helperTextSx},children:W.helperText||e.helperText||""})]})}});case"component":return l.jsx(x.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:o})}catch{try{return e.render({control:t,formData:a,setValue:o})}catch{return e.render()}}})():e.render:e.content});default:return null}},de=I.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),me=I.useCallback(async()=>{try{const L=a?a[e.name]:void 0;let Y="";L==null?Y="":Array.isArray(L)?Y=L.join(", "):typeof L=="object"?Y=JSON.stringify(L):Y=String(L),await navigator.clipboard.writeText(Y),k(!0),window.setTimeout(()=>k(!1),1200)}catch{}},[a,e.name]);return l.jsxs(x.Box,{"data-testid":m==null?void 0:m.field,sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(x.Box,{sx:{flexGrow:1},children:re?ne():null}),de&&l.jsx(Ar,{"aria-label":`copy ${e.label||e.name}`,onClick:me,size:"small",children:j?l.jsx(Sa,{fontSize:"small"}):l.jsx(pf,{fontSize:"small"})})]})};var Ti,Mo;function Af(){if(Mo)return Ti;Mo=1;function e(y){this._maxSize=y,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(y){return this._values[y]},e.prototype.set=function(y,j){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=j};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,s=new e(o),c=new e(o),u=new e(o);Ti={Cache:e,split:m,normalizePath:f,setter:function(y){var j=f(y);return c.get(y)||c.set(y,function(v,S){for(var _=0,M=j.length,B=v;_<M-1;){var q=j[_];if(q==="__proto__"||q==="constructor"||q==="prototype")return v;B=B[j[_++]]}B[j[_]]=S})},getter:function(y,j){var k=f(y);return u.get(y)||u.set(y,function(S){for(var _=0,M=k.length;_<M;)if(S!=null||!j)S=S[k[_++]];else return;return S})},join:function(y){return y.reduce(function(j,k){return j+(g(k)||n.test(k)?"["+k+"]":(j?".":"")+k)},"")},forEach:function(y,j,k){h(Array.isArray(y)?y:m(y),j,k)}};function f(y){return s.get(y)||s.set(y,m(y).map(function(j){return j.replace(a,"$2")}))}function m(y){return y.match(t)||[""]}function h(y,j,k){var v=y.length,S,_,M,B;for(_=0;_<v;_++)S=y[_],S&&(E(S)&&(S='"'+S+'"'),B=g(S),M=!B&&/^\d+$/.test(S),j.call(k,S,B,M,_,y))}function g(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function w(y){return y.match(r)&&!y.match(n)}function d(y){return i.test(y)}function E(y){return!g(y)&&(w(y)||d(y))}return Ti}var gn=Af(),Ei,zo;function $f(){if(zo)return Ei;zo=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=f=>f.match(e)||[],n=f=>f[0].toUpperCase()+f.slice(1),r=(f,m)=>t(f).join(m).toLowerCase(),i=f=>t(f).reduce((m,h)=>`${m}${m?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return Ei={words:t,upperFirst:n,camelCase:i,pascalCase:f=>n(i(f)),snakeCase:f=>r(f,"_"),kebabCase:f=>r(f,"-"),sentenceCase:f=>n(r(f," ")),titleCase:f=>t(f).map(n).join(" ")},Ei}var ji=$f(),Tr={exports:{}},Bo;function Rf(){if(Bo)return Tr.exports;Bo=1,Tr.exports=function(i){return e(t(i),i)},Tr.exports.array=e;function e(i,a){var o=i.length,s=new Array(o),c={},u=o,f=n(a),m=r(i);for(a.forEach(function(g){if(!m.has(g[0])||!m.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)c[u]||h(i[u],u,new Set);return s;function h(g,w,d){if(d.has(g)){var E;try{E=", node was:"+JSON.stringify(g)}catch{E=""}throw new Error("Cyclic dependency"+E)}if(!m.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!c[w]){c[w]=!0;var y=f.get(g)||new Set;if(y=Array.from(y),w=y.length){d.add(g);do{var j=y[--w];h(j,m.get(j),d)}while(w);d.delete(g)}s[--o]=g}}}function t(i){for(var a=new Set,o=0,s=i.length;o<s;o++){var c=i[o];a.add(c[0]),a.add(c[1])}return Array.from(a)}function n(i){for(var a=new Map,o=0,s=i.length;o<s;o++){var c=i[o];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[1])}return a}function r(i){for(var a=new Map,o=0,s=i.length;o<s;o++)a.set(i[o],o);return a}return Tr.exports}var Pf=Rf();const _f=la(Pf),Df=Object.prototype.toString,If=Error.prototype.toString,Mf=RegExp.prototype.toString,zf=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Bf=/^Symbol\((.*)\)(.*)$/;function Nf(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function No(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Nf(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return zf.call(e).replace(Bf,"Symbol($1)");const r=Df.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+If.call(e)+"]":r==="RegExp"?Mf.call(e):null}function Qt(e,t){let n=No(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let a=No(this[r],t);return a!==null?a:i},2)}function fl(e){return e==null?[]:[].concat(e)}let hl,ml,xl,Lf=/\$\{\s*(\w+)\s*\}/g;hl=Symbol.toStringTag;class Lo{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[hl]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],fl(t).forEach(a=>{if(Xe.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}ml=Symbol.hasInstance;xl=Symbol.toStringTag;class Xe extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(Lf,(i,a)=>Qt(n[a])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,a){const o=new Lo(t,n,r,i);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[xl]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Xe)}static[ml](t){return Lo[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let wt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Qt(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Qt(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Qt(n,!0)}\``+i}},Qe={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},zt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Zi={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Xi={isValue:"${path} field must be ${value}"},Rr={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Vf={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},qf={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Qt(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Qt(n,!0)}\``}return Xe.formatError(wt.notType,e)}};Object.assign(Object.create(null),{mixed:wt,string:Qe,number:zt,date:Zi,object:Rr,array:Vf,boolean:Xi,tuple:qf});const Oa=e=>e&&e.__isYupSchema__;class Hr{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:a}=n,o=typeof r=="function"?r:(...s)=>s.every(c=>c===r);return new Hr(t,(s,c)=>{var u;let f=o(...s)?i:a;return(u=f==null?void 0:f(c))!=null?u:c})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(a=>a.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!Oa(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Er={context:"$",value:"."};function Yr(e,t){return new tn(e,t)}class tn{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Er.context,this.isValue=this.key[0]===Er.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Er.context:this.isValue?Er.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&gn.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}tn.prototype.__isYupRef=!0;const yt=e=>e==null;function An(e){function t({value:n,path:r="",options:i,originalValue:a,schema:o},s,c){const{name:u,test:f,params:m,message:h,skipAbsent:g}=e;let{parent:w,context:d,abortEarly:E=o.spec.abortEarly,disableStackTrace:y=o.spec.disableStackTrace}=i;function j(R){return tn.isRef(R)?R.getValue(n,w,d):R}function k(R={}){const $=Object.assign({value:n,originalValue:a,label:o.spec.label,path:R.path||r,spec:o.spec,disableStackTrace:R.disableStackTrace||y},m,R.params);for(const N of Object.keys($))$[N]=j($[N]);const G=new Xe(Xe.formatError(R.message||h,$),n,$.path,R.type||u,$.disableStackTrace);return G.params=$,G}const v=E?s:c;let S={path:r,parent:w,type:u,from:i.from,createError:k,resolve:j,options:i,originalValue:a,schema:o};const _=R=>{Xe.isError(R)?v(R):R?c(null):v(k())},M=R=>{Xe.isError(R)?v(R):s(R)};if(g&&yt(n))return _(!0);let q;try{var p;if(q=f.call(S,n,S),typeof((p=q)==null?void 0:p.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(q).then(_,M)}}catch(R){M(R);return}_(q)}return t.OPTIONS=e,t}function Wf(e,t,n,r=n){let i,a,o;return t?(gn.forEach(t,(s,c,u)=>{let f=c?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:i,value:n});let m=e.type==="tuple",h=u?parseInt(f,10):0;if(e.innerType||m){if(m&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&h>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[h],e=m?e.spec.types[h]:e.innerType}if(!u){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[f],e=e.fields[f]}a=f,o=c?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class Kr extends Set{describe(){const t=[];for(const n of this.values())t.push(tn.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Kr(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Rn(e,t=new Map){if(Oa(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Rn(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Rn(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Rn(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Rn(i,t)}else throw Error(`Unable to clone ${e}`);return n}class st{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Kr,this._blacklist=new Kr,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(wt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Rn(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,a)=>a.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,a;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",a=r._cast(t,n);if(n.assert!==!1&&!r.isType(a)){if(i&&yt(a))return a;let o=Qt(t),s=Qt(a);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
171
+ `,sf=typeof Xi!="string"?en.css`
172
+ animation: ${Xi} 1.4s linear infinite;
173
+ `:null,lf=typeof Ji!="string"?en.css`
174
+ animation: ${Ji} 1.4s ease-in-out infinite;
175
+ `:null,cf=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,a={root:["root",n,`color${Pe(r)}`],svg:["svg"],circle:["circle",`circle${Pe(n)}`,i&&"circleDisableShrink"]};return Gn(a,of,t)},uf=lt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Pe(n.color)}`]]}})(wn(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:sf||{animation:`${Xi} 1.4s linear infinite`}},...Object.entries(e.palette).filter(qr()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),pf=lt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),df=lt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Pe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(wn(({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:lf||{animation:`${Ji} 1.4s ease-in-out infinite`}}]}))),Js=te.forwardRef(function(t,n){const r=Cn({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:o=!1,size:s=40,style:c,thickness:u=3.6,value:h=0,variant:m="indeterminate",...d}=r,g={...r,color:a,disableShrink:o,size:s,thickness:u,value:h,variant:m},b=cf(g),f={},E={},y={};if(m==="determinate"){const k=2*Math.PI*((zt-u)/2);f.strokeDasharray=k.toFixed(3),y["aria-valuenow"]=Math.round(h),f.strokeDashoffset=`${((100-h)/100*k).toFixed(3)}px`,E.transform="rotate(-90deg)"}return l.jsx(uf,{className:He(b.root,i),style:{width:s,height:s,...E,...c},ownerState:g,ref:n,role:"progressbar",...y,...d,children:l.jsx(pf,{className:b.svg,ownerState:g,viewBox:`${zt/2} ${zt/2} ${zt} ${zt}`,children:l.jsx(df,{className:b.circle,style:f,ownerState:g,cx:zt,cy:zt,r:(zt-u)/2,fill:"none",strokeWidth:u})})})});process.env.NODE_ENV!=="production"&&(Js.propTypes={classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["inherit","primary","secondary","error","info","success","warning"]),w.string]),disableShrink:wa(w.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:w.oneOfType([w.number,w.string]),style:w.object,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),thickness:w.number,value:w.number,variant:w.oneOf(["determinate","indeterminate"])});function ff(e){return nn("MuiIconButton",e)}const _o=Sn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),hf=e=>{const{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e,s={root:["root",o&&"loading",n&&"disabled",r!=="default"&&`color${Pe(r)}`,i&&`edge${Pe(i)}`,`size${Pe(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Gn(s,ff,t)},mf=lt(Xs,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${Pe(n.color)}`],n.edge&&t[`edge${Pe(n.edge)}`],t[`size${Pe(n.size)}`]]}})(wn(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ot(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),wn(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(qr()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(qr()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ot((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${_o.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${_o.loading}`]:{color:"transparent"}}))),xf=lt("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Rr=te.forwardRef(function(t,n){const r=Cn({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:o,color:s="default",disabled:c=!1,disableFocusRipple:u=!1,size:h="medium",id:m,loading:d=null,loadingIndicator:g,...b}=r,f=$d(m),E=g??l.jsx(Js,{"aria-labelledby":f,color:"inherit",size:16}),y={...r,edge:i,color:s,disabled:c,disableFocusRipple:u,loading:d,loadingIndicator:E,size:h},k=hf(y);return l.jsxs(mf,{id:d?f:m,className:He(k.root,o),centerRipple:!0,focusRipple:!u,disabled:c||d,ref:n,...b,ownerState:y,children:[typeof d=="boolean"&&l.jsx("span",{className:k.loadingWrapper,style:{display:"contents"},children:l.jsx(xf,{className:k.loadingIndicator,ownerState:y,children:d&&E})}),a]})});process.env.NODE_ENV!=="production"&&(Rr.propTypes={children:wa(w.node,e=>te.Children.toArray(e.children).some(n=>te.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
176
+ `)):null),classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),w.string]),disabled:w.bool,disableFocusRipple:w.bool,disableRipple:w.bool,edge:w.oneOf(["end","start",!1]),id:w.string,loading:w.bool,loadingIndicator:w.node,size:w.oneOfType([w.oneOf(["small","medium","large"]),w.string]),sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object])});const Mo=Ye(l.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),Io=Ye(l.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),gf=Ye(l.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),Ea=Ye(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Hr=Ye(l.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),yf=Ye(l.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),he={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},zo=e=>{const t=e.replace("#",""),n=parseInt(t.length===3?t.split("").map(r=>r+r).join(""):t,16);return{r:n>>16&255,g:n>>8&255,b:n&255}},vf=(e,t,n)=>"#"+[e,t,n].map(r=>{const i=Math.round(Math.min(255,Math.max(0,r))).toString(16);return i.length===1?"0"+i:i}).join(""),At=(e,t,n)=>{const r=zo(e),i=zo(t);return vf(r.r+(i.r-r.r)*n,r.g+(i.g-r.g)*n,r.b+(i.b-r.b)*n)},pi=e=>{const t="#FFFFFF",n="#000000";return{50:At(t,e,.08),100:At(t,e,.16),200:At(t,e,.28),300:At(t,e,.4),400:At(t,e,.55),500:e,600:At(e,n,.1),700:At(e,n,.2),800:At(e,n,.3),900:At(e,n,.42)}},bf=pi(he.primary.main),wf=pi(he.secondary.main),Pr=pi(he.text.primary),el=e=>pi(e),Sf={primary:he.primary.main,secondary:he.secondary.main,textPrimary:he.text.primary,textSecondary:he.text.secondary,divider:he.divider,background:he.background},Cf="#111827";function Tf(e){const t=e.palette.text.primary;return typeof t=="string"?t:Cf}function Zn(){const e=Hs(),t=e.palette.mode,n=Tf(e),r=e.palette.background.paper,i=e.palette.divider,a=e.palette.text.secondary,o=e.palette.error.main;return D.useMemo(()=>{const s=el(n);return{paper:r,divider:i,textPrimary:n,textSecondary:a,errorMain:o,neutral50:s[50],outlineDefault:ot(s[300],.5),outlineHover:s[300],outlineFocus:s[400]}},[t,n,r,i,a,o])}const tl="#244061";function Ef(){return qs({palette:{mode:"light",primary:{main:tl,light:"#0a8a4f",dark:"#0d9c5a"},success:{main:"#10B981"},warning:{main:"#F59E0B"},error:{main:"#D40824"},info:{main:"#3B82F6"},text:{primary:"#1A1A1A",secondary:"rgba(0, 0, 0, 0.6)"},background:{default:"#fafafa",paper:"#ffffff"},divider:"#e2e8f0"},typography:{fontFamily:'"Inter", sans-serif',h1:{fontSize:"24px",fontWeight:700,lineHeight:1.3,letterSpacing:"-0.01em"},h2:{fontSize:"20px",fontWeight:600,lineHeight:1.35,letterSpacing:"-0.005em"},h3:{fontSize:"18px",fontWeight:600,lineHeight:1.4},h4:{fontSize:"18px",fontWeight:600,lineHeight:1.35,letterSpacing:"-0.005em"},h5:{fontSize:"15px",fontWeight:500,lineHeight:1.4},h6:{fontSize:"13px",fontWeight:500,lineHeight:1.5},body1:{fontSize:"14px",fontWeight:400,lineHeight:1.6,letterSpacing:"0.01em"},body2:{fontSize:"13px",fontWeight:400,lineHeight:1.6,letterSpacing:"0.01em"},subtitle1:{fontSize:"14px",fontWeight:500,lineHeight:1.5},subtitle2:{fontSize:"13px",fontWeight:500,lineHeight:1.5},caption:{fontSize:"12px",fontWeight:400,lineHeight:1.5,letterSpacing:"0.02em"},overline:{fontSize:"11px",fontWeight:500,lineHeight:1.5,letterSpacing:"0.08em",textTransform:"uppercase"},button:{fontSize:"14px",fontWeight:500,lineHeight:1.2,letterSpacing:"0.01em"},allVariants:{fontFamily:'"Inter", sans-serif'}},shape:{borderRadius:6},spacing:8})}const rt=({hasError:e,sx:t,labelText:n,labelVariant:r="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:o="#E6E8EC",endorsementColor:s="#111827",endorsementRadius:c="6px",endorsementHeight:u=28,endorsementPaddingX:h="8px",inputTestId:m,labelTestId:d,errorTestId:g,...b})=>{var j,v;const f=Zn(),E=!!n,y=a?l.jsx(x.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:u,paddingLeft:h,paddingRight:h,borderRadius:c,backgroundColor:o,color:s,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,k={...b.InputProps,endAdornment:y||i?l.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[y||i,(j=b.InputProps)==null?void 0:j.endAdornment]}):(v=b.InputProps)==null?void 0:v.endAdornment};return l.jsxs(x.Box,{children:[E&&l.jsx(x.Typography,{variant:r,"data-testid":d,sx:{color:f.textPrimary,mb:.5,fontWeight:500},children:n}),l.jsx(x.TextField,{fullWidth:!0,size:"small",...b,InputProps:k,label:E?void 0:b.label,inputProps:{...b.inputProps,...m?{"data-testid":m}:{}},FormHelperTextProps:{...b.FormHelperTextProps,...g?{"data-testid":g}:{}},InputLabelProps:{...b.InputLabelProps,...d&&!E?{"data-testid":d}:{}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:f.paper,borderRadius:"8px","& fieldset":{borderColor:f.outlineDefault},"&:hover fieldset":{borderColor:f.outlineHover},"&.Mui-focused fieldset":{borderColor:f.outlineFocus},"&.Mui-error fieldset":{borderColor:f.errorMain}},"& .MuiInputBase-input":{color:f.textPrimary},"& .MuiFormLabel-root":{color:f.textSecondary},"& .MuiFormLabel-root.Mui-focused":{color:f.textPrimary},"& .MuiFormHelperText-root":{color:e?f.errorMain:f.textSecondary},...t}})]})},jf=Ye(l.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");function It(e){return String(e??"").replace(/\D+/g,"")}function Dt(e){return It(e).replace(/^0+/,"")||It(e)}function nl(e){const t=String(e??"");if(!t)return{leadingDigits:"",xCount:0,totalLen:0};const n=t.match(/^[0-9]+/),r=n?n[0]:"",i=(t.match(/X/gi)||[]).length,a=r.length+i;return{leadingDigits:r,xCount:i,totalLen:a}}function Dr(e,t={}){let n=It(e);if(!n)return"";const r=Dt(t.dialCode);r&&n.startsWith(r)&&n.length>r.length&&(n=n.slice(r.length));const{leadingDigits:i,xCount:a,totalLen:o}=nl(t.storeFormat);if(i&&!n.startsWith(i)&&(a>0&&n.length===a||o>0&&n.length===o-i.length?n=i+n:o===0&&i==="0"&&!n.startsWith("0")&&(n="0"+n)),o>0&&n.length>o&&(n=n.slice(-o),i&&!n.startsWith(i)&&a>0)){const s=n.slice(-a);n=i+s}return n}function rl(e,t={}){var a,o;const n=(o=(a=t.dialCodes)==null?void 0:a[0])==null?void 0:o.dial_code,r=Dt(t.dialCode)||Dt(n)||"",i=It(e);return{dialCode:r,national:i}}function kf(e,t={}){const n=String(e??"");if(!n)return{valid:!0};if(t.pattern&&!(typeof t.pattern=="string"?new RegExp(t.pattern):t.pattern).test(n))return{valid:!1,message:t.message||"Invalid mobile number"};if(t.prefixes&&t.prefixes.length>0){const r=It(n);if(!t.prefixes.some(a=>{const o=It(a);return o.length>0&&r.startsWith(o)}))return{valid:!1,message:t.message||"Invalid mobile number prefix"}}return{valid:!0}}const il=({id:e,value:t,onChange:n,onBlur:r,labelText:i,label:a,labelVariant:o="subtitle2",placeholder:s="Enter phone number",disabled:c,hasError:u,helperText:h,dialCodes:m=[],defaultDialCode:d,storeFormat:g,phoneExamples:b,name:f,inputTestId:E,labelTestId:y,errorTestId:k})=>{const j=Zn(),v=!!i,S=D.useMemo(()=>{if(Array.isArray(m)&&m.length>0)return m.map(K=>({dial_code:Dt(K.dial_code),label:K.label,iso:K.iso})).filter(K=>K.dial_code);const W=Dt(d);return W?[{dial_code:W}]:[]},[m,d]),[P,z]=D.useState(()=>{var W;return Dt(d)||((W=S[0])==null?void 0:W.dial_code)||""}),[I,B]=D.useState("");D.useEffect(()=>{var K;const W=Dt(d)||((K=S[0])==null?void 0:K.dial_code)||"";W&&W!==P&&z(W)},[d,S]),D.useEffect(()=>{const W=rl(t,{dialCode:P,dialCodes:S});B(K=>K===W.national?K:W.national||"")},[t,P,S]);const p=D.useCallback((W,K)=>{n&&n(Dr(W,{dialCode:K,storeFormat:g}))},[n,g]),R=D.useCallback(W=>{const K=String(W).trim().startsWith("+"),C=It(W);if(K||P&&C.startsWith(P)&&C.length>P.length+3){const M=Dr(W,{dialCode:P,storeFormat:g});B(M),n==null||n(M);return}B(C),p(C,P)},[P,g,n,p]),$=D.useCallback(()=>{const W=Dr(I,{dialCode:P,storeFormat:g});W!==I&&B(W),n&&W!==It(t)&&n(W),r==null||r()},[I,P,g,n,r,t]),Z=D.useCallback(W=>{const K=Dt(W);z(K),p(I,K)},[I,p]),N=!h&&(b!=null&&b.length)?`e.g. ${b[0]}`:void 0,re=h||N,V=!c&&S.length>0,Q=l.jsxs(x.InputAdornment,{position:"start",sx:{mr:0,ml:.5},children:[l.jsx(x.Select,{value:P||"",onChange:W=>Z(String(W.target.value)),disabled:!V,variant:"standard",disableUnderline:!0,IconComponent:jf,displayEmpty:!0,renderValue:W=>W?`+${W}`:"+—",inputProps:{"aria-label":"Country dial code",...E?{"data-testid":`${E}.dial`}:{}},sx:{minWidth:72,fontSize:14,color:j.textPrimary,"& .MuiSelect-select":{py:.5,pr:"20px !important",pl:.5},"& .MuiSelect-icon":{color:j.textSecondary,right:0}},MenuProps:{PaperProps:{sx:{maxHeight:280,borderRadius:"8px"}}},children:S.map(W=>{const K=W.label||W.iso?`${W.label||W.iso} (+${W.dial_code})`:`+${W.dial_code}`;return l.jsx(x.MenuItem,{value:W.dial_code,dense:!0,children:K},W.dial_code)})}),l.jsx(x.Divider,{orientation:"vertical",flexItem:!0,sx:{mx:1,borderColor:j.outlineHover,alignSelf:"center",height:20}})]});return l.jsxs(x.Box,{children:[v&&l.jsx(x.Typography,{variant:o,"data-testid":y,sx:{color:j.textPrimary,mb:.5,fontWeight:500},children:i}),l.jsx(x.TextField,{id:e,name:f,fullWidth:!0,size:"small",type:"tel",value:I,onChange:W=>R(W.target.value),onBlur:$,placeholder:s,disabled:c,error:!!u,helperText:re,label:v?void 0:a,inputProps:{inputMode:"tel",...E?{"data-testid":E}:{}},FormHelperTextProps:k?{"data-testid":k}:void 0,InputProps:{startAdornment:Q},sx:{"& .MuiOutlinedInput-root":{backgroundColor:c?j.neutral50:j.paper,borderRadius:"8px","& fieldset":{borderColor:j.outlineDefault},"&:hover fieldset":{borderColor:j.outlineHover},"&.Mui-focused fieldset":{borderColor:j.outlineFocus},"&.Mui-error fieldset":{borderColor:j.errorMain}},"& .MuiInputBase-input":{color:j.textPrimary},"& .MuiFormLabel-root":{color:j.textSecondary},"& .MuiFormLabel-root.Mui-focused":{color:j.textPrimary},"& .MuiFormHelperText-root":{color:u?j.errorMain:j.textSecondary}}})]})},di=({labelText:e,label:t,options:n,loading:r,helperText:i,size:a="small",labelVariant:o="subtitle2",placeholder:s,value:c,sx:u,inputTestId:h,labelTestId:m,errorTestId:d,optionTestId:g,...b})=>{const f=Zn(),E=D.useId(),y=c==null||c===""||Array.isArray(c)&&c.length===0,k=j=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...j,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:f.textSecondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!b.error,variant:"outlined",children:[e&&l.jsx(x.Typography,{variant:o,"data-testid":m,sx:{color:f.textPrimary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(x.InputLabel,{id:E,shrink:!y||!!s,"data-testid":m,sx:{color:f.textSecondary,"&.Mui-focused":{color:f.textPrimary},"&.Mui-error":{color:f.errorMain}},children:t}),l.jsx(x.Select,{...b,value:c,labelId:t?E:void 0,label:t,displayEmpty:!0,input:l.jsx(x.OutlinedInput,{label:t,inputProps:h?{"data-testid":h}:void 0}),IconComponent:k,renderValue:j=>{const v=j;if(y)return l.jsx("span",{style:{color:f.textSecondary},children:s??""});const S=n.find(P=>P.value===v);return(S==null?void 0:S.label)??String(v)},endAdornment:r?l.jsx(x.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${f.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:f.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:f.textPrimary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:f.outlineDefault},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:f.outlineHover},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:f.outlineFocus},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:f.errorMain},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...u},children:r?l.jsx(x.MenuItem,{disabled:!0,children:l.jsx(x.CircularProgress,{size:16})}):n.map(j=>l.jsx(x.MenuItem,{value:j.value,"data-testid":g?g(j.value):void 0,sx:{backgroundColor:f.paper,color:f.textPrimary,fontSize:14,mx:1,"&:hover":{backgroundColor:f.neutral50,borderRadius:"4px"},"&.Mui-selected":{backgroundColor:f.neutral50,borderRadius:"4px"}},children:j.label},j.value))}),i&&l.jsx(x.FormHelperText,{"data-testid":d,children:i})]})},al=({id:e,options:t,value:n,multiple:r,label:i,labelText:a,placeholder:o,onChange:s,labelVariant:c="subtitle2",disabled:u,loading:h,error:m,helperText:d,onOpen:g,noOptionsText:b,sx:f,inputTestId:E,labelTestId:y,errorTestId:k,optionTestId:j})=>{const v=Zn(),S=P=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...P,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:v.textSecondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(x.Box,{children:[a&&l.jsx(x.Typography,{variant:c,"data-testid":y,sx:{color:v.textPrimary,mb:.5,fontWeight:500},children:a}),l.jsx(x.Autocomplete,{id:e,options:t,value:n,multiple:r,size:"small",popupIcon:l.jsx(S,{}),disabled:u,loading:h,onOpen:g,noOptionsText:b,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${v.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:v.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:v.outlineDefault},"&:hover fieldset":{borderColor:v.outlineHover},"&.Mui-focused fieldset":{borderColor:v.outlineFocus},"&.Mui-error fieldset":{borderColor:v.errorMain}},"& .MuiInputBase-input":{color:v.textPrimary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:v.textSecondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...f},getOptionLabel:P=>typeof P=="string"?P:(P==null?void 0:P.label)??"",isOptionEqualToValue:(P,z)=>((P==null?void 0:P.value)??P)===((z==null?void 0:z.value)??z),renderOption:(P,z,{selected:I})=>{const{key:B,...p}=P,R=typeof z=="string"?z:(z==null?void 0:z.value)??(z==null?void 0:z.id)??(z==null?void 0:z.label)??"";return l.jsxs(x.Box,{component:"li",...p,"data-testid":j?j(R):void 0,sx:{backgroundColor:v.paper,color:v.textPrimary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:v.neutral50},"&.Mui-focused":{backgroundColor:v.neutral50},...I?{backgroundColor:v.neutral50}:{}},children:[r&&l.jsx(x.Checkbox,{checked:I}),l.jsx(x.Typography,{variant:"body2",sx:{color:v.textPrimary,fontSize:14},children:typeof z=="string"?z:z.label})]},B)},renderInput:P=>l.jsx(x.TextField,{...P,label:i,placeholder:o,size:"small",error:m,helperText:d,inputProps:{...P.inputProps,...E?{"data-testid":E}:{}},FormHelperTextProps:k?{"data-testid":k}:void 0,InputLabelProps:{shrink:!!n||!!o,sx:{color:v.textSecondary,"&.Mui-focused":{color:v.textPrimary},"&.Mui-error":{color:v.errorMain}},...y&&!a?{"data-testid":y}:{}},InputProps:{...P.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[h?l.jsx(x.CircularProgress,{size:20}):null,P.InputProps.endAdornment]})}}),onChange:(P,z)=>s(z)})]})},_t=({label:e,checked:t,disabled:n,onChange:r,sx:i,inputTestId:a,labelTestId:o})=>l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:t,disabled:n,onChange:(s,c)=>r(c),inputProps:a?{"data-testid":a}:void 0}),label:e,"data-testid":o,sx:s=>({"& .MuiFormControlLabel-label":{color:s.palette.text.primary,fontSize:14},...i})}),ol=({labelText:e,label:t,value:n=[],options:r,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:c,error:u,groupPadding:h=1.5,itemGap:m=1,disabled:d=!1})=>{const g=typeof i=="number"&&i>0,b=g?i:12,f=i===!0,E=i===!1&&!g,y=(k,j)=>{const v=Array.isArray(n)?[...n]:[];j?v.includes(k)||a([...v,k]):a(v.filter(S=>S!==k))};return l.jsxs(x.FormControl,{error:u,disabled:d,sx:k=>{var j;return{display:"flex",flexDirection:"column",px:k.spacing(h),borderRadius:((j=k.shape)==null?void 0:j.borderRadius)||8,mx:-2.5,backgroundColor:k.palette.background.paper}},children:[o==="top"&&e&&l.jsx(x.Typography,{variant:s,sx:k=>({color:k.palette.text.primary,mb:.5,fontSize:k.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:k=>({color:k.palette.text.secondary,mb:.5,mx:1,fontSize:k.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:k.palette.text.primary},"&.Mui-error":{color:k.palette.error.main}}),children:t}),g&&l.jsx(x.Box,{sx:k=>({display:"grid",gridTemplateColumns:`repeat(${b}, 1fr)`,gap:k.spacing(m),mt:0}),children:r.map(k=>{const j=Array.isArray(n)&&n.includes(k.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:j,onChange:v=>y(k.value,v.target.checked),disabled:d,sx:v=>({color:v.palette.text.secondary,"&.Mui-checked":{color:v.palette.primary.main}})}),label:k.label,sx:v=>({m:0,"& .MuiFormControlLabel-label":{color:v.palette.text.primary,fontSize:12}})},String(k.value))})}),f&&l.jsx(x.Box,{sx:k=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:k.spacing(m),alignItems:"center",mt:0}),children:r.map(k=>{const j=Array.isArray(n)&&n.includes(k.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:j,onChange:v=>y(k.value,v.target.checked),disabled:d,sx:v=>({color:v.palette.text.secondary,"&.Mui-checked":{color:v.palette.primary.main}})}),label:k.label,sx:v=>({m:0,"& .MuiFormControlLabel-label":{color:v.palette.text.primary,fontSize:12}})},String(k.value))})}),E&&l.jsx(x.Box,{sx:k=>({display:"flex",flexDirection:"column",gap:k.spacing(m),alignItems:"flex-start",mt:0}),children:r.map(k=>{const j=Array.isArray(n)&&n.includes(k.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:j,onChange:v=>y(k.value,v.target.checked),disabled:d,sx:v=>({color:v.palette.text.secondary,"&.Mui-checked":{color:v.palette.primary.main}})}),label:k.label,sx:v=>({m:0,"& .MuiFormControlLabel-label":{color:v.palette.text.primary,fontSize:12}})},String(k.value))})}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]})},Yr=({label:e,checked:t,disabled:n,onChange:r,sx:i})=>l.jsx(x.FormControlLabel,{control:l.jsx(x.Switch,{checked:t,disabled:n,onChange:(a,o)=>r(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),cn=({labelText:e,label:t,value:n,options:r,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:c,error:u,groupPadding:h=1.5,itemGap:m=1})=>l.jsxs(x.FormControl,{error:u,sx:d=>{var g;return{display:"flex",flexDirection:"column",px:d.spacing(h),borderRadius:((g=d.shape)==null?void 0:g.borderRadius)||8,mx:-2.5,backgroundColor:d.palette.background.paper}},children:[o==="top"&&e&&l.jsx(x.Typography,{variant:s,sx:d=>({color:d.palette.text.primary,mb:.5,fontSize:d.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:d=>({color:d.palette.text.secondary,mb:.5,mx:1,fontSize:d.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:d.palette.text.primary},"&.Mui-error":{color:d.palette.error.main}}),children:t}),l.jsx(x.RadioGroup,{row:i,value:n,onChange:d=>a(d.target.value),sx:d=>({display:"flex",flexDirection:i?"row":"column",gap:d.spacing(m),alignItems:i?"center":"flex-start"}),children:r.map(d=>l.jsx(x.FormControlLabel,{value:d.value,control:l.jsx(x.Radio,{size:"small",sx:g=>({color:g.palette.text.secondary,"&.Mui-checked":{color:g.palette.primary.main}})}),label:l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:d.label}),d.description&&l.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:d.description})]}),sx:{m:0,gap:0,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(d.value)))}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]});Pn.extend(ec);const Kr="DD-MM-YYYY";function ja(e){return(e||Kr).replace(/-/g,"/")}const ka=({labelPosition:e="inner",labelVariant:t="subtitle2",label:n,sx:r,inputTestId:i,labelTestId:a,errorTestId:o,value:s,onChange:c,onBlur:u,dateFormat:h=Kr,minDate:m,maxDate:d,disabled:g,error:b,helperText:f,fullWidth:E=!0,size:y="small",placeholder:k,inputProps:j})=>{const v=m??(j==null?void 0:j.min),S=d??(j==null?void 0:j.max),P=h||Kr,z=k??ja(P),I=s?Pn(s,"YYYY-MM-DD",!0):null,B=I!=null&&I.isValid()?I:null,p=R=>{const $=R&&R.isValid()?R.format("YYYY-MM-DD"):"";c==null||c($)};return l.jsxs(x.Box,{children:[e==="top"&&n&&l.jsx(x.Typography,{variant:t,"data-testid":a,sx:{color:"#111827",mb:.5},children:n}),l.jsx(Jl.DatePicker,{format:P,value:B,disabled:g,minDate:v&&Pn(v,"YYYY-MM-DD",!0).isValid()?Pn(v,"YYYY-MM-DD",!0):void 0,maxDate:S&&Pn(S,"YYYY-MM-DD",!0).isValid()?Pn(S,"YYYY-MM-DD",!0):void 0,onChange:p,onClose:u,slots:{textField:rt},slotProps:{textField:{fullWidth:E,size:y,label:e==="inner"?n:void 0,error:b,helperText:f,placeholder:z,labelTestId:e==="inner"?a:void 0,inputTestId:i,errorTestId:o,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...r}}}})]})},sl=({labelText:e,labelVariant:t="subtitle2",hasError:n,sx:r,label:i,inputTestId:a,labelTestId:o,errorTestId:s,...c})=>{const u=Zn(),h=!!e;return l.jsxs(x.Box,{children:[h&&l.jsx(x.Typography,{variant:t,"data-testid":o,sx:{color:u.textPrimary,mb:.5,fontWeight:500},children:e}),l.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...c,label:h?void 0:i,inputProps:{...c.inputProps,...a?{"data-testid":a}:{}},FormHelperTextProps:{...c.FormHelperTextProps,...s?{"data-testid":s}:{}},InputLabelProps:{...c.InputLabelProps,...o&&!h?{"data-testid":o}:{}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:u.paper,borderRadius:"8px","& fieldset":{borderColor:u.outlineDefault},"&:hover fieldset":{borderColor:u.outlineHover},"&.Mui-focused fieldset":{borderColor:u.outlineFocus},"&.Mui-error fieldset":{borderColor:u.errorMain}},"& .MuiInputBase-input":{color:u.textPrimary,fontSize:14},"& .MuiFormLabel-root":{color:u.textSecondary},"& .MuiFormLabel-root.Mui-focused":{color:u.textPrimary},"& .MuiFormHelperText-root":{color:n?u.errorMain:u.textSecondary},...r}})]})},ll=({title:e,subtitle:t,actions:n,align:r="left",sx:i})=>l.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:r},children:[e&&l.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:16,fontWeight:500,lineHeight:1.3}),children:e}),t&&l.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:500}),children:t})]}),n&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:n})]}),rr=Ye(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),cl=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:l.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_5814_24904",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function ul({items:e,getId:t,onReorder:n,header:r,disabled:i,sx:a,getText:o,showIndex:s=!0,showLeftIcon:c=!0,renderItem:u,chipText:h,helperText:m,emptyStateText:d,emptyStateButtonText:g="Add Phase",onEmptyStateButtonClick:b,emptyStateSx:f}){const[E,y]=D.useState(null),[k,j]=D.useState(null),v=p=>R=>{if(!i){y(p),R.dataTransfer.effectAllowed="move";try{R.dataTransfer.setData("text/plain",String(t(e[p])))}catch{}}},S=p=>R=>{i||(R.preventDefault(),j(p),R.dataTransfer.dropEffect="move")},P=p=>R=>{if(i)return;if(R.preventDefault(),E===null||E===p){y(null),j(null);return}const $=[...e],[Z]=$.splice(E,1);$.splice(p,0,Z),y(null),j(null),n($)},z=()=>{y(null),j(null)},I=e.length===0,B=I&&(d||b!==void 0);return l.jsxs(x.Box,{role:"list",sx:p=>({display:"flex",flexDirection:"column",gap:p.spacing(1),...a}),children:[r,!I&&l.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),B?l.jsxs(x.Box,{sx:p=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:p.spacing(4),backgroundColor:p.palette.mode==="dark"?"#000000":he.background.paper,border:`2px dashed ${p.palette.mode==="dark"?"#FFFFFF":he.divider}`,borderRadius:"8px",textAlign:"center",...f}),children:[d&&l.jsx(x.Typography,{variant:"body1",sx:p=>({color:p.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:b?2:0,maxWidth:"400px"}),children:d}),b&&l.jsx(x.Button,{variant:"outlined",startIcon:l.jsx(rr,{}),onClick:b,disabled:i,sx:p=>({mt:d?0:2,backgroundColor:p.palette.mode==="dark"?`${p.palette.primary.main}1A`:`${p.palette.primary.main}0D`,borderColor:p.palette.primary.main,color:p.palette.primary.main,"&:hover":{backgroundColor:p.palette.mode==="dark"?`${p.palette.primary.main}33`:`${p.palette.primary.main}1A`,borderColor:p.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:g})]}):e.map((p,R)=>{const $=E===R,Z=k===R&&E!==null&&E!==R;return l.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:v(R),onDragOver:S(R),onDrop:P(R),onDragEnd:z,sx:N=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${Z?N.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:N.spacing(1),opacity:$?.6:1,boxShadow:Z?`0 0 0 2px ${N.palette.primary.main}33`:"none"}),children:u?u(p,$):l.jsxs(x.Box,{sx:N=>({display:"flex",alignItems:"center",gap:N.spacing(1),minWidth:0}),children:[c&&l.jsx(cl,{}),s&&l.jsxs(x.Typography,{variant:"body2",sx:N=>({fontWeight:600,fontSize:14,color:`${N.palette.text.primary}`,flex:"0 0 auto"}),children:[R+1,"."]}),(()=>{const N=typeof h=="function"?h(p,R):h;return N?l.jsx(x.Chip,{label:N,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(x.Typography,{variant:"body2",sx:N=>({fontSize:12,fontWeight:500,color:`${N.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:o?o(p):""})]})},String(t(p)))}),!I&&m?typeof m=="string"?l.jsx(x.Typography,{variant:"caption",sx:p=>({color:`${p.palette.text.primary}60`}),children:m}):m:null]})}const Of=lt(x.StepConnector)(({theme:e})=>{const t=e.palette.divider||"#E8E8E8",n=e.palette.primary.main;return{[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:t,transition:"border-color 0.3s ease"},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:n}}}),Ff=({items:e,activeIndex:t=1,onStepClick:n,sx:r,completedSteps:i})=>{const a=Hs(),o=a.palette.primary.main,s=a.palette.text.primary,c=a.palette.divider,u=a.palette.action&&a.palette.action.disabledBackground||"#E8E8E8",h=m=>{const{active:d,completed:g,icon:b}=m;return g?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${o}`,borderRadius:"50%",backgroundColor:o,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(Ea,{sx:{fontSize:16,fontWeight:600}})}):d?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${o}`,backgroundColor:ot(o,.2),color:o,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:b}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:u,color:s,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:b})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Of,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:s,fontWeight:500},"& .MuiStep-root":{cursor:n?"pointer":"default"},...r},children:e.map((m,d)=>{const g=Array.isArray(i)&&i.length>0?i.includes(d):d<t;return l.jsxs(x.Step,{onClick:()=>n==null?void 0:n(d),completed:g,children:[l.jsx(x.StepLabel,{StepIconComponent:h,children:l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:d===t?o:s},children:m.label})}),d!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:c}})]},d)})})},Oa=({colorKey:e="primary",colorHex:t,tone:n="soft",bgAlpha:r=.12,borderAlpha:i=.24,sx:a,...o})=>l.jsx(x.Chip,{...o,sx:s=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${ot(t||s.palette.text.primary,.5)}`,backgroundColor:ot(t||s.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||s.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Af=lt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:he.primary.main}})),$f=({items:e,activeIndex:t=1,onStepClick:n,sx:r})=>{const[i,a]=D.useState(null),o=s=>{const{active:c,completed:u,icon:h}=s;return u?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${he.primary.main}`,borderRadius:"50%",backgroundColor:he.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(Ea,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${he.primary.main}`,backgroundColor:ot(he.primary.main,.2),color:he.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:h}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:he.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:h})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Af,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:he.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:n?"pointer":"default"},...r},children:e.map((s,c)=>l.jsxs(x.Step,{onMouseEnter:()=>a(c),onMouseLeave:()=>a(null),onClick:()=>n==null?void 0:n(c),completed:c<t,children:[l.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(x.StepLabel,{StepIconComponent:o,children:[l.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:c===t?he.primary.main:he.text.primary},children:s.label}),l.jsx(Oa,{size:"small",colorHex:c<t?he.success.main:c===t?"#973B00":he.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${he.text.primary}60`,mt:.5,width:"80%"},children:s.description})]}),i===c&&l.jsx(x.Button,{sx:{display:c>t?"none":"block"},variant:c<t?"outlined":"contained",size:"small",color:"primary",children:c<t?"Edit":c===t?"Complete":""})]}),c!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:he.divider}})]},c))})},Rf=Ye(l.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Pf=({variant:e="list",title:t,subtitle:n,text:r,items:i=[],icon:a,colorHex:o,sx:s})=>{const c=o||he.info.main,u=ot(c,.08),h=ot(c,.08),m=a??l.jsx(Rf,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:u,border:`1px solid ${h}`,boxShadow:"none",...s},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:m}),l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:r})]}):e==="inline"?l.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:u,border:`1px solid ${h}`,boxShadow:"none",...s},children:l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:r})}):e==="listWithHeader"?l.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:u,border:`1px solid ${h}`,...s},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),n&&l.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:n}),l.jsx(x.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:c,my:-.5}},children:i.map((d,g)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:d})},g))})]}):l.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:u,border:`0.5px solid ${h}`,boxShadow:"none",...s},children:l.jsx(x.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:c,my:-.5}},children:i.map((d,g)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:d})},g))})})},Bo=e=>e==null?[]:Array.isArray(e)?e:[e],pl=({value:e,onChange:t,items:n,ariaLabel:r,sx:i,tabSx:a})=>{const o=[{alignItems:"center",borderRadius:"6px",p:"10px",backgroundColor:"#FFFFFF","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"}},...Bo(i)];return l.jsxs(x.Box,{children:[l.jsx(x.Tabs,{value:e,onChange:(s,c)=>t(c),"aria-label":r||"Fin tabs",sx:o,children:n.map((s,c)=>{const u=typeof s.value=="string"||typeof s.value=="number"?s.value:c;return l.jsx(x.Tab,{value:u,disabled:s.disabled,label:l.jsx(x.Typography,{variant:"body2",children:s.label}),sx:[h=>({px:2,textTransform:"none",color:h.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#FFFFFF","&:hover":{backgroundColor:h.palette.action.hover},"&.Mui-selected":{color:h.palette.common.white,borderColor:h.palette.primary.main,backgroundColor:h.palette.primary.main,fontWeight:600}}),...Bo(a)]},String(u))})}),n.map((s,c)=>{const u=typeof s.value=="string"||typeof s.value=="number"?s.value:c,h=s.content??(typeof s.value=="object"?s.value:null);return h&&e===u?l.jsx(x.Box,{sx:{mt:1},children:h},`panel-${u}`):null})]})},Df=Ye(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),dl=({name:e,columns:t,initialRow:n,addLabel:r,maxRows:i,hideAddWhenMax:a,disableAddWhenMax:o=!0,showEmptyState:s=!0,rowDeletable:c=!0,control:u,sx:h,addActions:m,emptyTitle:d="No items configured",emptySubtitle:g="Click 'Add' to get started.",emptyCardSx:b,setValue:f,rowSelectionMode:E,rowSelectionKey:y,dateFormat:k})=>{const{fields:j,append:v,remove:S}=Ce.useFieldArray({control:u,name:e}),z=!(typeof i=="number"?j.length>=i:!1),I=D.useMemo(()=>{if(y)return y;const V=t.find(Q=>Q.type==="rowSelect");return V==null?void 0:V.key},[t,y]),B=Ce.useWatch({control:u,name:e})||[],p=D.useMemo(()=>{if(!I)return{};const V={};return B.forEach((Q,W)=>{V[W]=!!(Q!=null&&Q[I])}),V},[B,I]),R=D.useCallback(V=>p[V]===!0,[p]),$=D.useCallback((V,Q)=>{if(!f||!I)return;const W=`${e}.${V}.${I}`;E==="single"&&Q&&B.forEach((K,C)=>{if(C!==V){const M=`${e}.${C}.${I}`;f(M,!1,{shouldDirty:!0})}}),f(W,Q,{shouldDirty:!0})},[e,I,E,f,B]),Z=V=>{const Q={...V||n};t.forEach(W=>{W.value!==void 0&&Q[W.key]===void 0&&(Q[W.key]=typeof W.value=="function"?W.value(Q,j.length):W.value)}),v(Q)};D.useEffect(()=>{!s&&j.length===0&&z&&Z()},[s,j.length,z]);const N=D.useMemo(()=>t.reduce((Q,W)=>{if(W.width==="auto"||W.width===void 0)return Q+120;const K=typeof W.width=="number"?W.width:typeof W.width=="string"&&parseInt(W.width)||160;return Q+K},0)+(c?100:0),[t,c]),re=V=>V.width==="auto"||V.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof V.width=="number"?{width:`${V.width}px`,minWidth:`${V.width}px`,maxWidth:`${V.width}px`}:typeof V.width=="string"?{width:V.width,minWidth:V.width}:{width:"160px",minWidth:"160px"};return l.jsx(x.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"visible",...h},children:j.length===0&&s?l.jsxs(x.Box,{sx:V=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:ot(V.palette.primary.main,.4),backgroundColor:ot(V.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...b}),children:[l.jsx(x.Typography,{variant:"subtitle1",sx:V=>({color:V.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:d}),l.jsx(x.Typography,{variant:"body2",sx:V=>({color:V.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:g}),Array.isArray(m)&&m.length>0?m.map((V,Q)=>l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(rr,{}),sx:{mr:1,mt:1},onClick:()=>Z(V.template),disabled:!z&&o,style:{display:!z&&a?"none":void 0},children:V.label},`empty-add-${Q}`)):r&&l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(rr,{}),onClick:()=>Z(),disabled:!z&&o,style:{display:!z&&a?"none":void 0},children:r})]}):l.jsxs(l.Fragment,{children:[l.jsx(x.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(m)&&m.length>0?m.map((V,Q)=>l.jsx(x.Button,{variant:Q===0?"contained":"outlined",size:"small",startIcon:l.jsx(rr,{}),onClick:()=>Z(V.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:Q===0?"#04502d":void 0}},disabled:!z&&o,style:{display:!z&&a?"none":void 0},children:V.label},`add-${Q}`)):r&&l.jsx(x.Button,{variant:"contained",size:"small",startIcon:l.jsx(rr,{}),onClick:()=>Z(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},disabled:!z&&o,style:{display:!z&&a?"none":void 0},children:r})}),l.jsx(x.Box,{sx:{width:"100%",overflowX:"auto",overflowY:"auto",maxHeight:"600px","&::-webkit-scrollbar":{height:"8px",width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px","&:hover":{backgroundColor:"#555"}}},children:l.jsx(x.TableContainer,{sx:{width:"100%",minWidth:"100%"},children:l.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${N||650}px`},children:[l.jsx(x.TableHead,{children:l.jsxs(x.TableRow,{children:[t.map(V=>l.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,...re(V)},children:V.header},V.key)),c&&l.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,width:100,textAlign:"center"},children:"Actions"})]})}),l.jsx(x.TableBody,{children:j.map((V,Q)=>{const W=R(Q),K=E&&!W;return l.jsxs(x.TableRow,{children:[t.map(C=>{var pe;const M=`${e}.${Q}.${C.key}`,ne=C.type==="rowSelect"||C.key===I,se=ne?!1:K?!0:typeof C.disabled=="function"?C.disabled(V,Q):!!C.disabled;if(C.type==="index"){const H=C.indexFormat?C.indexFormat(Q):`#${Q+1}`;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((pe=C.cellSx)==null?void 0:pe.textAlign)||"center",...re(C),...C.cellSx},children:H},C.key)}if(C.value!==void 0&&C.editable===!1){const H=typeof C.value=="function"?C.value(V,Q):C.value;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...re(C),...C.cellSx},children:H},C.key)}const ae=C.endorsementText?typeof C.endorsementText=="function"?C.endorsementText(V,Q):C.endorsementText:void 0;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...re(C),...C.cellSx},children:C.type==="rowSelect"||ne&&C.type==="checkbox"?l.jsx(Ce.Controller,{name:M,control:u,defaultValue:!1,render:({field:H})=>l.jsx(_t,{label:"",checked:!!H.value,disabled:!1,onChange:ie=>{H.onChange(ie),$(Q,ie)},sx:C.sx})}):C.type==="checkbox"?l.jsx(Ce.Controller,{name:M,control:u,render:({field:H})=>l.jsx(_t,{label:"",checked:!!H.value,disabled:se,onChange:H.onChange,sx:C.sx})}):C.type==="select"?l.jsx(Ce.Controller,{name:M,control:u,render:({field:H})=>l.jsx(di,{...H,fullWidth:!0,disabled:se,options:C.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...C.sx},helperText:C.helperText,required:C.required})}):C.type==="date"?l.jsx(Ce.Controller,{name:M,control:u,defaultValue:C.value!==void 0?typeof C.value=="function"?C.value(V,Q):C.value:void 0,render:({field:H})=>(D.useEffect(()=>{if(f&&(H.value===void 0||H.value===null||H.value==="")&&C.value!==void 0){const ie=typeof C.value=="function"?C.value(V,Q):C.value;f(M,ie,{shouldValidate:!1})}},[M,H.value,C.value,V,Q,f]),l.jsx(ka,{name:H.name,value:H.value,onChange:H.onChange,onBlur:H.onBlur,fullWidth:!0,disabled:se,size:"small",dateFormat:C.dateFormat??k,placeholder:C.placeholder||ja(C.dateFormat??k??"DD-MM-YYYY"),sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...C.sx},helperText:C.helperText,required:C.required}))}):l.jsx(Ce.Controller,{name:M,control:u,defaultValue:C.value!==void 0?typeof C.value=="function"?C.value(V,Q):C.value:void 0,render:({field:H})=>(D.useEffect(()=>{if(f&&(H.value===void 0||H.value===null||H.value==="")&&C.value!==void 0){const ie=typeof C.value=="function"?C.value(V,Q):C.value;f(M,ie,{shouldValidate:!1})}},[M,H.value,C.value,V,Q,f]),l.jsx(rt,{...H,fullWidth:!0,type:C.type==="number"?"number":"text",placeholder:C.placeholder,disabled:se,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...C.sx},helperText:C.helperText,required:C.required,endorsementText:ae,endorsementBg:C.endorsementBg,endorsementColor:C.endorsementColor,endorsementRadius:C.endorsementRadius,endorsementHeight:C.endorsementHeight,endorsementPaddingX:C.endorsementPaddingX,inputProps:{...C.type==="number"?{min:C.min,max:C.max,step:C.step}:{minLength:C.minLength,maxLength:C.maxLength,pattern:C.pattern}}}))})},C.key)}),c&&l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>S(Q),sx:{width:"20px",height:"20px"},children:l.jsx(Df,{sx:{fontSize:"20px"}})})})]},V.id)})})]})})})]})})},fl=({name:e,control:t,items:n,sx:r,cardSx:i})=>l.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...r},children:n.map(a=>{const o=!!a.leftAction,s=!!a.rightAction,c=!!(a.header||a.chipText),u=a.leftAction,h=a.rightAction;return l.jsxs(x.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[o&&u&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Ce.Controller,{name:u.name,control:t,defaultValue:!1,render:({field:m})=>l.jsx(_t,{label:u.label||"",checked:!!m.value,onChange:m.onChange,sx:{margin:0}})})}),c&&l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:o||s?1:"none",ml:o?1:0},children:[a.header&&l.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.jsx(x.Box,{sx:{bgcolor:"rgba(26,26,26,0.1)",px:1.5,py:.375,borderRadius:"4px",fontSize:"12px",color:"rgba(26,26,26,0.8)"},children:a.chipText})]}),s&&h&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Ce.Controller,{name:h.name,control:t,defaultValue:!1,render:({field:m})=>l.jsx(Yr,{label:h.label,checked:!!m.value,onChange:m.onChange,sx:{margin:0}})})}),!o&&!s&&!c&&l.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),hl=Ye(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Ei=Ye(l.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),_f=[{label:"Interest-only",value:"interest-only"},{label:"Principal moratorium",value:"principal-moratorium"},{label:"EMI",value:"emi"},{label:"Equal-principal",value:"equal-principal"},{label:"Balloon",value:"balloon"},{label:"Bullet",value:"bullet"},{label:"Step-up/Down",value:"step-up-down"},{label:"Seasonal skips",value:"seasonal-skips"},{label:"Custom fixed installment",value:"custom-fixed"},{label:"Full payment holiday (no billing)",value:"payment-holiday"}],ji=[{label:"Accrue & capitalize at end of phase",value:"accrue-capitalize"},{label:"Accrue & bill in first period after phase",value:"accrue-bill-next"},{label:"Accrue & forgive at phase end",value:"accrue-forgive"}],Mf=({phase:e,index:t,onUpdate:n,onDelete:r,months:i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],disabled:a=!1,sx:o})=>{const[s,c]=D.useState(e.seasonalMonths||[]),u=d=>{const g=s.includes(d)?s.filter(b=>b!==d):[...s,d];c(g),n(e.id,{seasonalMonths:g})},h=(()=>{const d=e.min||0;return d<0?"Min cannot be negative.":Number.isInteger(d)?null:"Use whole periods."})(),m=(()=>{const d=e.min||0,g=e.max||0;return Number.isInteger(g)?g<d?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(x.Card,{sx:{border:"2px solid",borderColor:he.divider,position:"relative",...o},children:l.jsxs(x.CardContent,{sx:{p:2},children:[l.jsxs(x.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(x.Box,{children:l.jsx(cl,{})}),l.jsx(Oa,{label:t+1,size:"small"})]}),l.jsx(x.IconButton,{onClick:()=>r(e.id),disabled:a,sx:{color:he.error.main,"&:hover":{bgcolor:Pr[50]}},size:"small",children:l.jsx(hl,{fontSize:"small"})})]}),l.jsx(x.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(x.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(x.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx(di,{labelText:"Phase type",value:e.type,onChange:d=>n(e.id,{type:d.target.value}),options:_f,disabled:a})}),l.jsxs(x.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(x.Typography,{variant:"caption",sx:{fontSize:"12px",color:he.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(rt,{type:"number",value:e.priority||5,onChange:d=>{const g=parseInt(d.target.value)||5;n(e.id,{priority:Math.min(9,Math.max(1,g))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(rt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:d=>{const g=parseInt(d.target.value)||0;n(e.id,{min:g,...e.lockLength?{max:g}:{}})},inputProps:{min:0},disabled:a,error:!!h,helperText:h||void 0})}),l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(rt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:d=>n(e.id,{max:parseInt(d.target.value)||0}),inputProps:{min:0},disabled:a||e.lockLength,error:!!m&&!e.lockLength,helperText:e.lockLength?"Locked to Min":m||void 0,sx:e.lockLength?{opacity:.5}:{}})})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:3},children:[l.jsx(_t,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:d=>n(e.id,{lockLength:d,...d?{max:e.min}:{}}),disabled:a}),l.jsx(_t,{label:"Residual fill",checked:e.residualFill||!1,onChange:d=>n(e.id,{residualFill:d}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(Ei,{sx:{fontSize:14,color:he.text.secondary,cursor:"help"}})})]}),l.jsx(cn,{value:e.interestPolicy||"accrue-capitalize",onChange:d=>n(e.id,{interestPolicy:d}),options:ji,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(cn,{value:e.balloonType||"percent",onChange:d=>n(e.id,{balloonType:d}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(rt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:d=>n(e.id,{balloonAmount:parseFloat(d.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(rt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:d=>n(e.id,{balloonPercent:parseFloat(d.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(rt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:d=>n(e.id,{stepPercent:parseFloat(d.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(rt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:d=>n(e.id,{stepEveryN:parseInt(d.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(x.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(d=>l.jsx(x.Chip,{label:d,size:"small",onClick:()=>!a&&u(d),sx:{cursor:a?"default":"pointer",bgcolor:s.includes(d)?he.primary.main:"transparent",color:s.includes(d)?he.primary.contrastText:he.text.primary,border:`1px solid ${he.divider}`,"&:hover":{bgcolor:s.includes(d)?Pr[600]:Pr[50]}}},d))})]}),l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(Ei,{sx:{fontSize:14,color:he.text.secondary,cursor:"help"}})})]}),l.jsx(cn,{value:e.interestPolicy||"accrue-capitalize",onChange:d=>n(e.id,{interestPolicy:d}),options:ji,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(rt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:d=>n(e.id,{customAmount:parseFloat(d.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(Ei,{sx:{fontSize:14,color:he.text.secondary,cursor:"help"}})})]}),l.jsx(cn,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:d=>n(e.id,{holidayInterestTreatment:d}),options:ji,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:he.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};function ml(e,t){return{field:`${e}-field-${t}`,label:`${e}-label-${t}`,input:`${e}-input-${t}`,error:`${e}-error-${t}`,section:`${e}-section-${t}`,upload:`${e}-upload-${t}`,preview:`${e}-preview-${t}`,remove:`${e}-remove-${t}`,replace:`${e}-replace-${t}`,option:n=>`${e}-option-${t}-${String(n)}`,submit:`${e}-submit`,cancel:`${e}-cancel`}}function xl(e,t){if(!e||!t.name)return null;const n=t.automation;if(n!=null&&n.skip)return null;const r=ml(e,t.name);return{field:(n==null?void 0:n.fieldTestId)||r.field,label:(n==null?void 0:n.labelTestId)||r.label,input:t.testId||(n==null?void 0:n.inputTestId)||r.input,error:(n==null?void 0:n.errorTestId)||r.error,section:r.section,upload:r.upload,preview:r.preview,remove:r.remove,replace:r.replace,option:r.option}}async function gl(e,t,n,r){try{const{endpoint:i,method:a="GET",valueField:o="value",labelField:s="label",headers:c={},params:u={},body:h,transform:m,passThroughFields:d}=e;let g=i;if(t&&!i.startsWith("http")&&(g=`${t}${i.startsWith("/")?i:`/${i}`}`),r){const v=/\{([^}]+)\}/g;g=g.replace(v,(S,P)=>{const z=r[P];return z!=null?encodeURIComponent(String(z)):""}),g=g.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const b=new URLSearchParams;Object.entries(u).forEach(([v,S])=>{S!=null&&b.append(v,String(S))}),b.toString()&&(g+=`${g.includes("?")?"&":"?"}${b.toString()}`);try{const v=/^https?:\/\//i.test(g),S=new URL(g,v?void 0:"http://local.placeholder"),P=Array.from(S.searchParams.entries());for(const[z,I]of P)(I===""||I==="undefined"||I==="null")&&S.searchParams.delete(z);v?g=S.toString():g=S.pathname+(S.search?S.search:""),g=g.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const f={"Content-Type":"application/json",...n,...c},E={method:a,headers:f};(a==="POST"||a==="PUT")&&h&&(E.body=JSON.stringify(h));const y=await fetch(g,E);if(!y.ok)throw new Error(`API request failed: ${y.status} ${y.statusText}`);const k=await y.json();if(m)return m(Array.isArray(k)?k:k.data||k);const j=Array.isArray(k)?k:k.data||k;if(!Array.isArray(j))throw new Error("API response is not an array");return j.map(v=>{const S={label:v[s]||v.name||v.title||String(v[o]||""),value:v[o]||v.id||v.value||""},P=Array.isArray(d)?d:void 0;if(Array.isArray(P))for(const z of P)v[z]!==void 0&&(S[z]=v[z]);return S})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function yl(e,t,n,r,i=!1){const a=D.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!r)return null;const s=r[e.dependsOn];return s!==void 0?s:null},[e==null?void 0:e.dependsOn,r]),o=D.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,r?JSON.stringify(r):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,r]);return Ic({queryKey:o,queryFn:()=>{if(!e)throw new Error("API config is required");return gl(e,t,n,r)},enabled:!!i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:s=>Math.min(1e3*2**s,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function on(e){return!!(e.apiConfig||e.api_endpoint)}function Fa(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 If(e,t){const n=Fa(e);if(!(n!=null&&n.conditional)&&!e.conditional)return!0;if(n!=null&&n.dependsOn||e.depends_on){const r=(n==null?void 0:n.dependsOn)||e.depends_on;if(r){const i=t[r];return i!=null&&i!==""}}return!0}const Aa=({field:e,control:t,errors:n,baseUrl:r,apiHeaders:i,formData:a,setValue:o,testIdPrefix:s,dateFormat:c})=>{const u=n[e.name],h=!!u,m=D.useMemo(()=>xl(s,e),[s,e]),d=D.useMemo(()=>m?{inputTestId:m.input,labelTestId:m.label,errorTestId:m.error,optionTestId:m.option}:{},[m]),[g,b]=D.useState(!1),f=D.useRef(!1),[E,y]=D.useState(!1),[k,j]=D.useState(!1),[v,S]=D.useState(!1),P=D.useRef(null),z=D.useRef(null),I=()=>{var L;const q=e.required;if(typeof q=="function")try{return!!q(a||{})}catch{return!1}if(q!==void 0)return!!q;const G=(L=e.validation)==null?void 0:L.required;if(typeof G=="function")try{return!!G(a||{})}catch{return!1}return G!==void 0?!!G:!1},B=q=>I()?`${q} *`:q,p=()=>{if(e.value!==void 0){if(typeof e.value=="function")try{return e.value(a||{})}catch{return""}return e.value}return e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:""},R=D.useRef(void 0);D.useEffect(()=>{const q=e.value;if(typeof q!="function"||!o)return;let G;try{G=q(a||{})}catch{return}const L=a?a[e.name]:void 0;if(R.current===void 0&&(R.current=G),L===void 0||L===R.current)try{o(e.name,G,{shouldValidate:!0,shouldDirty:!1}),R.current=G}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((q,G)=>({...q,[G]:a[G]}),{}):a||{}),e.name]);const $=D.useMemo(()=>{const q=Fa(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]),Z=D.useRef(null),N=$!=null&&$.dependsOn?a==null?void 0:a[$.dependsOn]:null;D.useEffect(()=>{$!=null&&$.dependsOn&&(Z.current=N)},[$==null?void 0:$.dependsOn,N]);const re=D.useMemo(()=>{const q=e.showWhen;if(typeof q=="function")try{return!!q(a||{})}catch{return!0}if(q&&typeof q=="object"){const G=q.field,L=q.equals,xe=q.in,je=G?(a||{})[G]:void 0;if(G&&typeof L<"u")return je===L;if(G&&Array.isArray(xe))return xe.includes(je)}return!0},[e.showWhen,a]),V=D.useCallback(()=>{const q=e.dynamicEndorsement;if(typeof q=="function")try{return q(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),Q=D.useCallback(()=>{const q=e.endAdornment,G=e.endAdornmentSwitch,L=e.endAdornmentCheckbox;if(G)return l.jsx(Ce.Controller,{name:G,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:xe})=>l.jsx(x.Switch,{checked:xe.value||!1,onChange:je=>{xe.onChange(je.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(je.target.checked,a,o)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(L)return l.jsx(Ce.Controller,{name:L,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:xe})=>l.jsx(_t,{label:"",checked:xe.value||!1,onChange:xe.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof q=="function")try{return q(a||{},{control:t,setValue:o})}catch{return}return q},[e,a,t,o]),W=D.useMemo(()=>!!(g&&on(e)&&(!($!=null&&$.dependsOn)||N)),[g,e,$==null?void 0:$.dependsOn,N]),K=D.useMemo(()=>{const q={};if(!a)return q;const G=($==null?void 0:$.endpoint)||(e==null?void 0:e.api_endpoint);if(G&&typeof G=="string"){const L=G.match(/\{([^}]+)\}/g)||[];for(const xe of L){const je=xe.slice(1,-1),Ve=a[je];Ve!==void 0&&(q[je]=Ve)}}if($!=null&&$.dependsOn){const L=$.dependsOn,xe=a[L];xe!==void 0&&(q[L]=xe)}return q},[$==null?void 0:$.endpoint,e==null?void 0:e.api_endpoint,$==null?void 0:$.dependsOn,a]),{data:C=[],isLoading:M,error:ne}=yl($,r,i,K,W),se=D.useCallback(()=>{on(e)&&!f.current&&(f.current=!0,b(!0))},[e]),ae=D.useCallback(()=>{on(e)&&!f.current&&(f.current=!0,b(!0))},[e]);D.useEffect(()=>{if(on(e)&&!f.current){const q=a==null?void 0:a[e.name];q!=null&&q!==""&&(f.current=!0,b(!0))}},[e,a]),D.useEffect(()=>{on(e)&&($!=null&&$.dependsOn)&&(N!=null&&`${N}`!=""?(f.current=!0,b(!0)):(f.current=!1,b(!1)))},[$==null?void 0:$.dependsOn,N]);const pe=D.useCallback(q=>{if(typeof q=="function")try{const G=q(a||{});return pe(G)}catch{return[]}return q?Array.isArray(q)?q.map(G=>{if(G&&typeof G=="object"){const L=G.value??G.id??G.key??void 0,xe=G.label??G.name??G.title??(L!==void 0?String(L):"");return{label:String(xe??""),value:String(L??xe??"")}}return{label:String(G),value:String(G)}}):typeof q=="object"?Object.keys(q).map(G=>({value:String(G),label:String(q[G])})):[]:[]},[a]),H=D.useCallback(()=>on(e)?Array.isArray(C)?C:[]:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?pe(e.options):[],[e,C,pe]),ie=()=>{var q,G,L,xe,je,Ve;switch(e.type){case"title":return l.jsx(x.Typography,{variant:e.variant||"h4",component:"h1",color:e.color,align:e.align||"left",sx:{mb:3,fontWeight:600,...e.sx},children:e.label});case"section":return l.jsx(x.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left","data-testid":m==null?void 0:m.section,sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const jt=e.actionName,Be=e.actionComponent,Ke=e.actionLabel,mt=A=>l.jsx(ll,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:A??e.actions}),et=A=>{if(e.cardWrap){const U={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(x.Card,{sx:U,...e.cardProps,children:A})}return A};return et(jt&&Be?l.jsx(Ce.Controller,{name:jt,control:t,defaultValue:e.value??!1,render:({field:A})=>mt(Be==="switch"?l.jsx(Yr,{label:Ke,checked:!!A.value,onChange:A.onChange}):l.jsx(_t,{label:Ke||"",checked:!!A.value,onChange:A.onChange}))}):mt());case"tabs":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((G=(q=e.items)==null?void 0:q[0])==null?void 0:G.value)=="string"||typeof((xe=(L=e.items)==null?void 0:L[0])==null?void 0:xe.value)=="number"?(Ve=(je=e.items)==null?void 0:je[0])==null?void 0:Ve.value:0),render:({field:A})=>{const F=e.items||[],U=F.map((Y,X)=>({label:Y.label,value:typeof Y.value=="string"||typeof Y.value=="number"?Y.value:X,content:Y.content,disabled:Y.disabled})),J=A.value,ce=(()=>{if(typeof J=="string"||typeof J=="number"){const Y=F.findIndex((X,ge)=>typeof X.value=="string"||typeof X.value=="number"?X.value===J:ge===J);return Y>=0?Y:0}return Number(J)||0})(),fe=F[ce]||{};return l.jsxs(x.Box,{children:[l.jsx(pl,{value:A.value,onChange:A.onChange,items:U,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(fe.fields)&&fe.fields.length>0&&(()=>{const Y=fe.fields,X=[];let ge=[];for(const Ae of Y)Ae.type==="section"&&ge.length>0?(X.push(ge),ge=[Ae]):ge.push(Ae);ge.length>0&&X.push(ge);const Fe={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1};return l.jsx(x.Box,{sx:{mt:1},children:X.map((Ae,qe)=>{const Ie=Ae.find(tt=>tt.type==="section"),Qe=(Ie==null?void 0:Ie.cardWrap)!==!1,oe=l.jsx(l.Fragment,{children:Ae.map(tt=>{const nt=tt.showWhen;if(nt)try{if(typeof nt=="function"){if(!nt(a||{}))return null}else if(typeof nt=="object"){const jn=nt.field,Da=nt.equals,_a=nt.in,Ma=jn?(a||{})[jn]:void 0;if(jn&&typeof Da<"u"&&Ma!==Da||jn&&Array.isArray(_a)&&!_a.includes(Ma))return null}}catch{}const En=Math.min(Math.max(tt.col??12,1),12);return l.jsx(x.Box,{sx:{gridColumn:`span ${En}`},children:l.jsx(Aa,{field:tt,control:t,errors:n,baseUrl:r,apiHeaders:i,formData:a,setValue:o,testIdPrefix:s})},tt.name)})});return Qe?l.jsx(x.Card,{sx:{...Fe,...(Ie==null?void 0:Ie.cardSx)||{}},...(Ie==null?void 0:Ie.cardProps)||{},children:oe},`tab-group-${qe}`):l.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:oe},`tab-group-${qe}`)})})})()]})}});case"grid":const kt=e.defaultRows||[];return l.jsx(x.Box,{children:l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:kt.length>0?kt:p()||[],render:()=>l.jsx(dl,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,showEmptyState:e.showEmptyState,maxRows:e.maxRows,hideAddWhenMax:e.hideAddWhenMax,disableAddWhenMax:e.disableAddWhenMax,rowDeletable:e.rowDeletable!==!1,control:t,setValue:o,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey,dateFormat:c})})});case"listcards":return l.jsx(fl,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:e.items||[],render:({field:A})=>{const F=e,U=A.value||F.items||[],J=typeof F.getId=="function"?F.getId:typeof F.getId=="string"?Y=>Y[F.getId]:Y=>Y.id??Y._id??Y.key??String(Y),ce=typeof F.getText=="function"?F.getText:typeof F.getText=="string"?Y=>Y[F.getText]??String(Y):Y=>Y.text??Y.label??Y.name??Y.title??String(Y),fe=(()=>{if(typeof F.chipText=="function")return F.chipText;if(typeof F.chipText=="string")return U.length>0&&U[0]&&F.chipText in U[0]?(Y,X)=>Y[F.chipText]??void 0:F.chipText})();return l.jsx(ul,{items:U,getId:J,onReorder:Y=>{A.onChange(Y)},header:F.header,disabled:e.disabled,sx:F.sx,chipText:fe,helperText:F.helperText||(h?u==null?void 0:u.message:void 0),getText:ce,showIndex:F.showIndex!==!1,showLeftIcon:F.showLeftIcon!==!1,renderItem:F.renderItem})}});case"mobile":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>{const F=e;return l.jsx(il,{...A,...d,id:e.id,name:e.name,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:h,helperText:(u==null?void 0:u.message)||F.helperText,dialCodes:F.dialCodes,defaultDialCode:F.defaultDialCode,mobilePrefixes:F.mobilePrefixes,storeFormat:F.storeFormat,phoneExamples:F.phoneExamples})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>e.type==="textarea"?l.jsx(sl,{...A,...d,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:h,helperText:(u==null?void 0:u.message)||e.helperText}):l.jsx(rt,{...A,...d,id:e.id,labelText:e.labelPosition==="top"?B(e.label):void 0,label:e.labelPosition!=="top"?B(e.label):void 0,endAdornment:Q(),endorsementText:V(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?E?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:h,helperText:(u==null?void 0:u.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(Ks,{position:"end",children:l.jsx(Rr,{"aria-label":"toggle password visibility",onClick:()=>y(F=>!F),edge:"end",children:E?l.jsx(Io,{}):l.jsx(Mo,{})})})}:void 0})});case"number":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>l.jsx(rt,{...A,...d,id:e.id,labelText:e.labelPosition==="top"?B(e.label):void 0,label:e.labelPosition!=="top"?B(e.label):void 0,endAdornment:Q(),endorsementText:V(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:h,helperText:(u==null?void 0:u.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const le=H();return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>{const F=typeof e.disabled=="function"?!!e.disabled(a||{}):!!e.disabled,U=e.disableWhenEmptyOptions===!0&&Array.isArray(le)&&le.length===0,J=F||U||M,ce=A.value,fe=(()=>{if(Array.isArray(le)&&le.length>0){const Y=le.find(X=>String(X==null?void 0:X.value)===String(ce));return Y?Y.value:ce}return ce})();return l.jsx(di,{...d,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:fe,onChange:A.onChange,options:le,disabled:J,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?B(e.label):void 0):e.placeholder,loading:M,error:h||!!ne,helperText:(u==null?void 0:u.message)||(ne==null?void 0:ne.message)||e.helperText,onOpen:se})}});case"checkbox":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>l.jsx(_t,{...d,label:B(e.label),checked:!!A.value,disabled:e.disabled,onChange:A.onChange})});case"toggle":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>l.jsx(cn,{label:B(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:A.value,options:e.options||[],row:!0,onChange:A.onChange})});case"radio":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>l.jsx(cn,{label:B(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:A.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:A.onChange})});case"checkboxGroup":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p()||[],render:({field:A})=>l.jsx(ol,{label:B(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(A.value)?A.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:A.onChange,disabled:e.disabled})});case"switch":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>l.jsx(Yr,{label:B(e.label),checked:!!A.value,disabled:e.disabled,onChange:A.onChange})});case"autocomplete":const ct=H(),O=!!((typeof e.disabled=="function"?e.disabled(a||{},{options:ct,isLoading:M,error:ne}):e.disabled)||e.disableWhenEmptyOptions===!0&&Array.isArray(ct)&&ct.length===0||M||$!=null&&$.dependsOn&&!N);return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>{const F=A.value,U=e.multiple===!0,J=($==null?void 0:$.valueField)||e.value_field||"value",ce=Y=>{if(Y!=null){if(typeof Y=="string"||typeof Y=="number")return Y;if(typeof Y=="object"){if(Y[J]!==void 0)return Y[J];if(Y.value!==void 0)return Y.value;if(Y.id!==void 0)return Y.id}}},fe=(()=>{if(U)return(Array.isArray(F)?F:[]).map(X=>{const ge=String(typeof X=="object"?ce(X):X);return ct.find(Ae=>{const qe=ce(Ae);return qe!==void 0&&String(qe)===ge})||null}).filter(Boolean);{if(F==null||F==="")return null;const Y=String(typeof F=="object"?ce(F):F),X=ct.find(ge=>{const Fe=ce(ge);return Fe!==void 0&&String(Fe)===Y});return X||null}})();return l.jsx(al,{...d,id:e.id,options:ct,value:fe,multiple:U,labelText:e.labelPosition==="top"?B(e.label):void 0,label:e.labelPosition!=="top"?B(e.label):void 0,placeholder:O&&($!=null&&$.dependsOn)&&!N?`Please select ${$.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:O,loading:M,error:h||!!ne,helperText:(u==null?void 0:u.message)||(ne==null?void 0:ne.message)||e.helperText||"",onOpen:ae,noOptionsText:O&&($!=null&&$.dependsOn)&&!N?`Please select ${$.dependsOn.replace(/_/g," ")} first`:M?"Fetching data...":g&&!M&&ct.length===0?"No options available":"Click to load options",onChange:Y=>{const X=($==null?void 0:$.valueField)||e.value_field||"value";if(U){const Fe=(Array.isArray(Y)?Y:[]).map(Ae=>typeof Ae=="object"&&(Ae[X]||Ae.value||Ae.id)||Ae);A.onChange(Fe)}else{let ge;Y&&typeof Y=="object"?ge=Y[X]||Y.value||Y.id||Y:ge=Y,A.onChange(ge);const Fe=e.selectedAssignments;if(Fe&&Y&&typeof Y=="object")for(const[Ae,qe]of Object.entries(Fe)){const Ie=Y[qe];if(Ie!==void 0&&typeof o=="function")try{o(Ae,Ie,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":{const A=e.dateFormat??c;return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:F})=>l.jsx(ka,{name:F.name,value:F.value,onChange:F.onChange,onBlur:F.onBlur,...d,id:e.name,label:B(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:h,helperText:u==null?void 0:u.message,dateFormat:A,minDate:e.minDate,maxDate:e.maxDate})})}case"image":return l.jsx(Ce.Controller,{name:e.name,control:t,defaultValue:p(),render:({field:A})=>{const F=A.value||e.defaultValue||e.src;if(F){const X=e.imageUploaded||{},ge=X.previewText||"Preview",Fe=X.removeText||"Remove",Ae=X.saveText||"Save logo",qe=X.showSave!==void 0?X.showSave:!!(e.onSave||X.saveText),Ie=()=>{if(S(!0),typeof e.onPreview=="function")try{e.onPreview(F)}catch{}},Qe=()=>{A.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},oe=()=>{typeof e.onSave=="function"&&e.onSave({url:F,file:z.current||void 0})},tt=nt=>{const En=nt.target.files&&nt.target.files[0];if(En){if(typeof e.onFileSelected=="function")try{e.onFileSelected(En)}catch{}try{const jn=URL.createObjectURL(En);A.onChange(jn)}catch{}z.current=En,S(!1)}};return l.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...X.cardSx},children:[l.jsx("input",{type:"file",ref:P,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:tt}),l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...X.thumbnailSx},children:l.jsx("img",{src:F,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(x.Box,{sx:{flexGrow:1},children:[l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...X.fileNameSx},children:typeof F=="string"?F.split("/").pop():"Selected image"}),l.jsx(x.Typography,{sx:{fontSize:"10px",...X.fileMetaSx},children:"Image selected"})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[l.jsx(x.Button,{type:"button",sx:{...X.previewButtonSx},variant:"outlined",onClick:Ie,startIcon:l.jsx(Mo,{}),"data-testid":m==null?void 0:m.preview,children:ge}),l.jsx(x.Button,{variant:"outlined",color:"error",onClick:Qe,sx:{...X.removeButtonSx},startIcon:l.jsx(Io,{}),"data-testid":m==null?void 0:m.remove,children:Fe}),qe&&l.jsx(x.Button,{variant:"contained",onClick:oe,sx:{...X.saveButtonSx},children:Ae})]})]}),l.jsxs(x.Dialog,{open:v,onClose:()=>S(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(x.DialogTitle,{children:X.previewTitle||"Image preview"}),l.jsx(x.DialogContent,{children:l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:l.jsx("img",{src:F,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(x.DialogActions,{children:[l.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var nt;return(nt=P.current)==null?void 0:nt.click()},"data-testid":m==null?void 0:m.replace,children:X.replaceText||"Replace logo"}),l.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>S(!1),children:X.closeText||"Close"})]})]})]})}const U=e.imagePlaceholder||{},J=U.icon||"upload",ce=P,fe=()=>{var X;try{(X=ce.current)==null||X.click()}catch{}},Y=X=>{const ge=X.target.files&&X.target.files[0];if(ge){typeof e.onFileSelected=="function"&&e.onFileSelected(ge);try{const Fe=URL.createObjectURL(ge);A.onChange(Fe)}catch{}z.current=ge}};return l.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...U.sx},children:[l.jsx("input",{type:"file",ref:ce,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Y}),l.jsx(Rr,{sx:{borderRadius:"8px",...U.iconSx},children:J==="image"?l.jsx(yf,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(Hr,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...U.titleSx},children:U.title||"Drag & Drop the image here"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...U.subtitleSx},children:U.subtitle||""}),l.jsx(x.Button,{onClick:fe,sx:{my:2,...U.buttonSx},startIcon:l.jsx(Hr,{}),variant:"contained",disabled:e.disabled,"data-testid":m==null?void 0:m.upload,children:U.buttonText||"Upload File"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...U.helperTextSx},children:U.helperText||e.helperText||""})]})}});case"component":return l.jsx(x.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:o})}catch{try{return e.render({control:t,formData:a,setValue:o})}catch{return e.render()}}})():e.render:e.content});default:return null}},de=D.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),me=D.useCallback(async()=>{try{const q=a?a[e.name]:void 0;let G="";q==null?G="":Array.isArray(q)?G=q.join(", "):typeof q=="object"?G=JSON.stringify(q):G=String(q),await navigator.clipboard.writeText(G),j(!0),window.setTimeout(()=>j(!1),1200)}catch{}},[a,e.name]);return l.jsxs(x.Box,{"data-testid":m==null?void 0:m.field,sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(x.Box,{sx:{flexGrow:1},children:re?ie():null}),de&&l.jsx(Rr,{"aria-label":`copy ${e.label||e.name}`,onClick:me,size:"small",children:k?l.jsx(Ea,{fontSize:"small"}):l.jsx(gf,{fontSize:"small"})})]})};var ki,No;function zf(){if(No)return ki;No=1;function e(y){this._maxSize=y,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(y){return this._values[y]},e.prototype.set=function(y,k){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=k};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,s=new e(o),c=new e(o),u=new e(o);ki={Cache:e,split:m,normalizePath:h,setter:function(y){var k=h(y);return c.get(y)||c.set(y,function(v,S){for(var P=0,z=k.length,I=v;P<z-1;){var B=k[P];if(B==="__proto__"||B==="constructor"||B==="prototype")return v;I=I[k[P++]]}I[k[P]]=S})},getter:function(y,k){var j=h(y);return u.get(y)||u.set(y,function(S){for(var P=0,z=j.length;P<z;)if(S!=null||!k)S=S[j[P++]];else return;return S})},join:function(y){return y.reduce(function(k,j){return k+(g(j)||n.test(j)?"["+j+"]":(k?".":"")+j)},"")},forEach:function(y,k,j){d(Array.isArray(y)?y:m(y),k,j)}};function h(y){return s.get(y)||s.set(y,m(y).map(function(k){return k.replace(a,"$2")}))}function m(y){return y.match(t)||[""]}function d(y,k,j){var v=y.length,S,P,z,I;for(P=0;P<v;P++)S=y[P],S&&(E(S)&&(S='"'+S+'"'),I=g(S),z=!I&&/^\d+$/.test(S),k.call(j,S,I,z,P,y))}function g(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function b(y){return y.match(r)&&!y.match(n)}function f(y){return i.test(y)}function E(y){return!g(y)&&(b(y)||f(y))}return ki}var vn=zf(),Oi,Lo;function Bf(){if(Lo)return Oi;Lo=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=h=>h.match(e)||[],n=h=>h[0].toUpperCase()+h.slice(1),r=(h,m)=>t(h).join(m).toLowerCase(),i=h=>t(h).reduce((m,d)=>`${m}${m?d[0].toUpperCase()+d.slice(1).toLowerCase():d.toLowerCase()}`,"");return Oi={words:t,upperFirst:n,camelCase:i,pascalCase:h=>n(i(h)),snakeCase:h=>r(h,"_"),kebabCase:h=>r(h,"-"),sentenceCase:h=>n(r(h," ")),titleCase:h=>t(h).map(n).join(" ")},Oi}var Fi=Bf(),jr={exports:{}},Vo;function Nf(){if(Vo)return jr.exports;Vo=1,jr.exports=function(i){return e(t(i),i)},jr.exports.array=e;function e(i,a){var o=i.length,s=new Array(o),c={},u=o,h=n(a),m=r(i);for(a.forEach(function(g){if(!m.has(g[0])||!m.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)c[u]||d(i[u],u,new Set);return s;function d(g,b,f){if(f.has(g)){var E;try{E=", node was:"+JSON.stringify(g)}catch{E=""}throw new Error("Cyclic dependency"+E)}if(!m.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!c[b]){c[b]=!0;var y=h.get(g)||new Set;if(y=Array.from(y),b=y.length){f.add(g);do{var k=y[--b];d(k,m.get(k),f)}while(b);f.delete(g)}s[--o]=g}}}function t(i){for(var a=new Set,o=0,s=i.length;o<s;o++){var c=i[o];a.add(c[0]),a.add(c[1])}return Array.from(a)}function n(i){for(var a=new Map,o=0,s=i.length;o<s;o++){var c=i[o];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[1])}return a}function r(i){for(var a=new Map,o=0,s=i.length;o<s;o++)a.set(i[o],o);return a}return jr.exports}var Lf=Nf();const Vf=pa(Lf),qf=Object.prototype.toString,Wf=Error.prototype.toString,Uf=RegExp.prototype.toString,Hf=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Yf=/^Symbol\((.*)\)(.*)$/;function Kf(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function qo(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Kf(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return Hf.call(e).replace(Yf,"Symbol($1)");const r=qf.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+Wf.call(e)+"]":r==="RegExp"?Uf.call(e):null}function Zt(e,t){let n=qo(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let a=qo(this[r],t);return a!==null?a:i},2)}function vl(e){return e==null?[]:[].concat(e)}let bl,wl,Sl,Qf=/\$\{\s*(\w+)\s*\}/g;bl=Symbol.toStringTag;class Wo{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[bl]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],vl(t).forEach(a=>{if(Je.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}wl=Symbol.hasInstance;Sl=Symbol.toStringTag;class Je extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(Qf,(i,a)=>Zt(n[a])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,a){const o=new Wo(t,n,r,i);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Sl]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Je)}static[wl](t){return Wo[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let wt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Zt(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Zt(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Zt(n,!0)}\``+i}},Ge={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"},Nt={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"},ea={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},ta={isValue:"${path} field must be ${value}"},_r={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Gf={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"},Zf={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Zt(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Zt(n,!0)}\``}return Je.formatError(wt.notType,e)}};Object.assign(Object.create(null),{mixed:wt,string:Ge,number:Nt,date:ea,object:_r,array:Gf,boolean:ta,tuple:Zf});const $a=e=>e&&e.__isYupSchema__;class Qr{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:a}=n,o=typeof r=="function"?r:(...s)=>s.every(c=>c===r);return new Qr(t,(s,c)=>{var u;let h=o(...s)?i:a;return(u=h==null?void 0:h(c))!=null?u:c})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(a=>a.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!$a(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const kr={context:"$",value:"."};function Gr(e,t){return new rn(e,t)}class rn{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===kr.context,this.isValue=this.key[0]===kr.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?kr.context:this.isValue?kr.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&vn.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}rn.prototype.__isYupRef=!0;const yt=e=>e==null;function Rn(e){function t({value:n,path:r="",options:i,originalValue:a,schema:o},s,c){const{name:u,test:h,params:m,message:d,skipAbsent:g}=e;let{parent:b,context:f,abortEarly:E=o.spec.abortEarly,disableStackTrace:y=o.spec.disableStackTrace}=i;function k(R){return rn.isRef(R)?R.getValue(n,b,f):R}function j(R={}){const $=Object.assign({value:n,originalValue:a,label:o.spec.label,path:R.path||r,spec:o.spec,disableStackTrace:R.disableStackTrace||y},m,R.params);for(const N of Object.keys($))$[N]=k($[N]);const Z=new Je(Je.formatError(R.message||d,$),n,$.path,R.type||u,$.disableStackTrace);return Z.params=$,Z}const v=E?s:c;let S={path:r,parent:b,type:u,from:i.from,createError:j,resolve:k,options:i,originalValue:a,schema:o};const P=R=>{Je.isError(R)?v(R):R?c(null):v(j())},z=R=>{Je.isError(R)?v(R):s(R)};if(g&&yt(n))return P(!0);let B;try{var p;if(B=h.call(S,n,S),typeof((p=B)==null?void 0:p.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(B).then(P,z)}}catch(R){z(R);return}P(B)}return t.OPTIONS=e,t}function Xf(e,t,n,r=n){let i,a,o;return t?(vn.forEach(t,(s,c,u)=>{let h=c?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:i,value:n});let m=e.type==="tuple",d=u?parseInt(h,10):0;if(e.innerType||m){if(m&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=m?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[h])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[h],e=e.fields[h]}a=h,o=c?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class Zr extends Set{describe(){const t=[];for(const n of this.values())t.push(rn.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Zr(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Dn(e,t=new Map){if($a(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Dn(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Dn(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Dn(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Dn(i,t)}else throw Error(`Unable to clone ${e}`);return n}class st{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Zr,this._blacklist=new Zr,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(wt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Dn(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,a)=>a.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,a;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",a=r._cast(t,n);if(n.assert!==!1&&!r.isType(a)){if(i&&yt(a))return a;let o=Zt(t),s=Zt(a);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
177
177
 
178
178
  attempted value: ${o}
179
- `+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=n,c=t;s||(c=this._cast(c,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:a,value:c,originalValue:o,options:n,tests:u},r,f=>{if(f.length)return i(f,c);this.runTests({path:a,value:c,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:a,value:o,originalValue:s,path:c,options:u}=t,f=d=>{i||(i=!0,n(d,o))},m=d=>{i||(i=!0,r(d,o))},h=a.length,g=[];if(!h)return m([]);let w={value:o,originalValue:s,path:c,options:u,schema:this};for(let d=0;d<a.length;d++){const E=a[d];E(w,f,function(j){j&&(Array.isArray(j)?g.push(...j):g.push(j)),--h<=0&&m(g)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:a,options:o}){const s=t??n;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof s=="number";let u=r[s];const f=Object.assign({},o,{strict:!0,parent:r,value:u,originalValue:a[s],key:void 0,[c?"index":"key"]:s,path:c||s.includes(".")?`${i||""}[${c?s:`"${s}"`}]`:(i?`${i}.`:"")+t});return(m,h,g)=>this.resolve(f)._validate(u,f,h,g)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),a=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,n,(c,u)=>{Xe.isError(c)&&(c.value=u),s(c)},(c,u)=>{c.length?s(new Xe(c,u,void 0,void 0,a)):o(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),a,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(s,c)=>{throw Xe.isError(s)&&(s.value=c),s},(s,c)=>{if(s.length)throw new Xe(s,t,void 0,void 0,o);a=c}),a}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Xe.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Xe.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Rn(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=An({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=An({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=wt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=wt.notNull){return this.nullability(!1,t)}required(t=wt.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=wt.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=An(n),a=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=fl(t).map(a=>new tn(a));return i.forEach(a=>{a.isSibling&&r.deps.push(a.key)}),r.conditions.push(typeof n=="function"?new Hr(i,n):Hr.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=An({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=wt.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=An({message:n,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),r}notOneOf(t,n=wt.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=An({message:n,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:a,nullable:o}=n.spec;return{meta:i,label:r,optional:a,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,u,f)=>f.findIndex(m=>m.name===c.name)===u)}}}st.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])st.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:a,schema:o}=Wf(this,t,n,r.context);return o[e](i&&i[a],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])st.prototype[e]=st.prototype.oneOf;for(const e of["not","nope"])st.prototype[e]=st.prototype.notOneOf;const Uf=()=>!0;function gl(e){return new yl(e)}class yl extends st{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Uf},t))}}gl.prototype=yl.prototype;function vl(){return new bl}class bl extends st{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=Xi.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return yt(n)||n===!0}})}isFalse(t=Xi.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return yt(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}vl.prototype=bl.prototype;const Hf=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Yf(e){const t=Ji(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function Ji(e){var t,n;const r=Hf.exec(e);return r?{year:$t(r[1]),month:$t(r[2],1)-1,day:$t(r[3],1),hour:$t(r[4]),minute:$t(r[5]),second:$t(r[6]),millisecond:r[7]?$t(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:$t(r[10]),minuteOffset:$t(r[11])}:null}function $t(e,t=0){return Number(e)||t}let Kf=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Qf=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Gf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Zf="^\\d{4}-\\d{2}-\\d{2}",Xf="\\d{2}:\\d{2}:\\d{2}",Jf="(([+-]\\d{2}(:?\\d{2})?)|Z)",eh=new RegExp(`${Zf}T${Xf}(\\.\\d+)?${Jf}$`),th=e=>yt(e)||e===e.trim(),nh={}.toString();function tr(){return new wl}class wl extends st{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===nh?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||wt.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Qe.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Qe.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Qe.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,a;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:a}=n:i=n),this.test({name:a||"matches",message:i||Qe.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=Qe.email){return this.matches(Kf,{name:"email",message:t,excludeEmptyString:!0})}url(t=Qe.url){return this.matches(Qf,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Qe.uuid){return this.matches(Gf,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(eh,{name:"datetime",message:n||Qe.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Qe.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:a=>{if(!a||r)return!0;const o=Ji(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||Qe.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=Ji(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Qe.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:th})}lowercase(t=Qe.lowercase){return this.transform(n=>yt(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>yt(n)||n===n.toLowerCase()})}uppercase(t=Qe.uppercase){return this.transform(n=>yt(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>yt(n)||n===n.toUpperCase()})}}tr.prototype=wl.prototype;let rh=e=>e!=+e;function Sl(){return new Cl}class Cl extends st{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!rh(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return r.isType(i)||i===null?i:parseFloat(i)})})}min(t,n=zt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=zt.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=zt.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=zt.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=zt.positive){return this.moreThan(0,t)}negative(t=zt.negative){return this.lessThan(0,t)}integer(t=zt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>yt(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(i=>yt(i)?i:Math[t](i))}}Sl.prototype=Cl.prototype;let Tl=new Date(""),ih=e=>Object.prototype.toString.call(e)==="[object Date]";function Fa(){return new xr}class xr extends st{constructor(){super({type:"date",check(t){return ih(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=Yf(t),isNaN(t)?xr.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(tn.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=Zi.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=Zi.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}xr.INVALID_DATE=Tl;Fa.prototype=xr.prototype;Fa.INVALID_DATE=Tl;function ah(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let c=gn.split(o)[0];r.add(c),i.has(`${s}-${c}`)||n.push([s,c])}for(const o of Object.keys(e)){let s=e[o];r.add(o),tn.isRef(s)&&s.isSibling?a(s.path,o):Oa(s)&&"deps"in s&&s.deps.forEach(c=>a(c,o))}return _f.array(Array.from(r),n).reverse()}function Vo(e,t){let n=1/0;return e.some((r,i)=>{var a;if((a=t.path)!=null&&a.includes(r))return n=i,!0}),n}function El(e){return(t,n)=>Vo(e,t)-Vo(e,n)}const oh=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function Pr(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Pr(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Pr(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Pr)}):"optional"in e?e.optional():e}const sh=(e,t)=>{const n=[...gn.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=gn.getter(gn.join(n),!0)(e);return!!(i&&r in i)};let qo=e=>Object.prototype.toString.call(e)==="[object Object]";function Wo(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const lh=El([]);function jl(e){return new kl(e)}class kl extends st{constructor(t){super({type:"object",check(n){return qo(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=lh,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let a=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(m=>!this._nodes.includes(m))),c={},u=Object.assign({},n,{parent:c,__validating:n.__validating||!1}),f=!1;for(const m of s){let h=a[m],g=m in i;if(h){let w,d=i[m];u.path=(n.path?`${n.path}.`:"")+m,h=h.resolve({value:d,context:n.context,parent:c});let E=h instanceof st?h.spec:void 0,y=E==null?void 0:E.strict;if(E!=null&&E.strip){f=f||m in i;continue}w=!n.__validating||!y?h.cast(i[m],u):i[m],w!==void 0&&(c[m]=w)}else g&&!o&&(c[m]=i[m]);(g!==m in c||c[m]!==i[m])&&(f=!0)}return f?c:i}_validate(t,n={},r,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:o},...a],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(c,u)=>{if(!s||!qo(u)){i(c,u);return}o=o||u;let f=[];for(let m of this._nodes){let h=this.fields[m];!h||tn.isRef(h)||f.push(h.asNestedTest({options:n,key:m,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:n},r,m=>{i(m.sort(this._sortErrors).concat(c),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,a]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?a:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const a=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=a&&"getDefault"in a?a.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=ah(t,n),r._sortErrors=El(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return Pr(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=gn.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return sh(a,t)&&(o=Object.assign({},a),r||delete o[t],o[n]=i(a)),o})}json(){return this.transform(oh)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Rr.exact,test(n){if(n==null)return!0;const r=Wo(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Rr.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const a=Wo(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Rr.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(ji.camelCase)}snakeCase(){return this.transformKeys(ji.snakeCase)}constantCase(){return this.transformKeys(t=>ji.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[a,o]of Object.entries(n.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),r.fields[a]=o.describe(s)}return r}}jl.prototype=kl.prototype;const Ol=e=>{const t={};return e.forEach(n=>{var o,s,c;let r;switch(n.type){case"text":case"textarea":case"tel":r=tr(),n.validation?r=nn(r,n,"string"):(n.minLength&&(r=r.min(n.minLength,`${n.label} must be at least ${n.minLength} characters`)),n.maxLength&&(r=r.max(n.maxLength,`${n.label} must be at most ${n.maxLength} characters`)),n.pattern&&(r=r.test("pattern",`${n.label} format is invalid`,u=>u?new RegExp(n.pattern).test(u):!0)));break;case"email":r=tr().email(((o=n.validation)==null?void 0:o.message)||`${n.label} must be a valid email address`),n.validation&&(r=nn(r,n,"string"));break;case"password":r=tr(),n.validation?r=nn(r,n,"string"):(n.minLength&&(r=r.min(n.minLength,`${n.label} must be at least ${n.minLength} characters`)),n.maxLength&&(r=r.max(n.maxLength,`${n.label} must be at most ${n.maxLength} characters`)),n.pattern&&(r=r.test("pattern",`${n.label} format is invalid`,u=>u?new RegExp(n.pattern).test(u):!0)));break;case"number":if(r=Sl().transform((u,f)=>f===""||f===null?void 0:u).nullable().typeError(`${n.label} must be a number`),n.validation)r=nn(r,n,"number");else{if(n.min!==void 0){const u=typeof n.min=="object"&&n.min!==null&&"field"in n.min,f=u?Yr(n.min.field):n.min,m=u&&n.min.message?n.min.message:`${n.label} must be at least ${u?"the minimum value":n.min}`;r=r.min(f,m)}if(n.max!==void 0){const u=typeof n.max=="object"&&n.max!==null&&"field"in n.max,f=u?Yr(n.max.field):n.max,m=u&&n.max.message?n.max.message:`${n.label} must be at most ${u?"the maximum value":n.max}`;r=r.max(f,m)}}break;case"select":r=tr(),n.validation&&(r=nn(r,n,"string"));break;case"checkbox":r=vl(),n.validation&&(r=nn(r,n,"boolean"));break;case"date":r=Fa().typeError(`${n.label} must be a valid date`),n.validation?r=nn(r,n,"date"):(n.minDate&&(r=r.min(new Date(n.minDate),`${n.label} must be after ${n.minDate}`)),n.maxDate&&(r=r.max(new Date(n.maxDate),`${n.label} must be before ${n.maxDate}`)));break;default:r=gl()}const i=((s=n.validation)==null?void 0:s.required)!==void 0?n.validation.required:n.required;if(typeof i=="function"?!1:!!i){const u=((c=n.validation)==null?void 0:c.message)||`${n.label} is required`;r=r.required(u)}t[n.name]=r}),jl().shape(t)},nn=(e,t,n,r)=>{const i=t.validation;if(!i)return e;if(n==="string"){if(i.minLength!==void 0){const a=i.message||`${t.label} must be at least ${i.minLength} characters`;e=e.min(i.minLength,a)}if(i.maxLength!==void 0){const a=i.message||`${t.label} must be at most ${i.maxLength} characters`;e=e.max(i.maxLength,a)}}if(n==="number"){if(i.min!==void 0)if(typeof i.min=="object"&&"field"in i.min){const a=Yr(i.min.field),o=i.min.message||i.message||`${t.label} must be at least the value of ${i.min.field}`;e=e.min(a,o)}else{const a=i.message||`${t.label} must be at least ${i.min}`;e=e.min(i.min,a)}if(i.max!==void 0)if(typeof i.max=="object"&&"field"in i.max){const a=Yr(i.max.field),o=i.max.message||i.message||`${t.label} must be at most the value of ${i.max.field}`;e=e.max(a,o)}else{const a=i.message||`${t.label} must be at most ${i.max}`;e=e.max(i.max,a)}}if(i.pattern){const a=typeof i.pattern=="string"?new RegExp(i.pattern):i.pattern,o=i.message||`${t.label} format is invalid`;e=e.test("pattern",o,s=>s?a.test(s):!0)}return i.custom&&(e=e.test("custom",i.message||`${t.label} is invalid`,function(a){const o=this.parent||{},s=i.custom(a,o);return typeof s=="boolean"?s:!1})),e},Fl=({currentStep:e,totalSteps:t,onStepChange:n,stepTitles:r=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const o=I.useMemo(()=>Array.from({length:t},(f,m)=>m+1),[t]),s=I.useMemo(()=>Math.round(e/t*100),[e,t]),c=f=>r[f-1]||`Step ${f}`,u=f=>f===e||a.includes(f)||f===e+1&&a.includes(e);return l.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:o.map((f,m)=>{const h=f===e,g=f<e||a.includes(f),w=h||g?"primary.main":"#8F97A4";return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[l.jsxs(x.Box,{onClick:()=>u(f)&&n(f),sx:{display:"flex",alignItems:"center",cursor:u(f)?"pointer":"default"},children:[l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:h||g?"2px solid":"1px solid",borderColor:h||g?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:d=>h||g?ot(d.palette.primary.main,.2):"transparent",mr:.5,color:w,fontWeight:h||g?600:500,fontSize:"12px"},children:f}),i&&l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:w},children:c(f)})]}),m<o.length-1&&l.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:f<e?"primary.main":"#DFE3E8"}})]},f)})}),l.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${s}% complete`})]}),l.jsx(x.LinearProgress,{variant:"determinate",value:s,sx:{height:4,borderRadius:"50px",backgroundColor:f=>f.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Al=({buttons:e,disabled:t=!1,testIdPrefix:n})=>{const r=c=>{c.onClick&&c.onClick()},i=e.filter(c=>c.position==="left"||!c.position),a=e.filter(c=>c.position==="center"),o=e.filter(c=>c.position==="right"),s=(c,u)=>{const f=(c.text||"").toLowerCase(),m=c.type==="submit"||f.includes("submit")||f.includes("save")||f.includes("next"),h=c.position==="left"||f.includes("cancel")||f.includes("back")||f.includes("draft"),g=c.type?c.type:m?"submit":"button",w=h?"outlined":"contained",d=c.disabled||t,E=f.includes("cancel")||f.includes("back"),y=n?m?`${n}-submit`:E?`${n}-cancel`:void 0:void 0,j=k=>k&&["primary","secondary","error","info","success","warning"].includes(k)?k:"primary";return l.jsxs(x.Button,{type:g,variant:w,color:j(c.color),size:c.size||"large",disabled:d,onClick:c.onClick?()=>r(c):void 0,"data-testid":y,sx:c.sx,children:[c.loading&&l.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),c.text]},`${c.text}-${u}`)};return l.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((c,u)=>s(c,u))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((c,u)=>s(c,u))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:o.map((c,u)=>s(c,u))})]})},ch=({config:e,onSubmit:t,onStepChange:n,currentStep:r=1,totalSteps:i=1,isMultiStep:a=!1,formData:o})=>{const{buttons:s,position:c="right",layout:u="horizontal",spacing:f=2,sx:m}=e,h=y=>{let j="button",k="contained";return y.type?j=y.type:y.text.toLowerCase().includes("submit")||y.text.toLowerCase().includes("save")||y.text.toLowerCase().includes("next")?j="submit":(y.text.toLowerCase().includes("reset")||y.text.toLowerCase().includes("clear"))&&(j="reset"),(y.text.toLowerCase().includes("cancel")||y.text.toLowerCase().includes("back")||y.text.toLowerCase().includes("draft"))&&(k="outlined"),{buttonType:j,buttonVariant:k}},g=y=>["primary","secondary","error","warning","info","success"].includes(y||"")?y:"primary",w=y=>{const{buttonType:j}=h(y);y.onClick?y.onClick():j==="submit"&&t?t(o):a&&n&&(y.text.toLowerCase().includes("next")?n(r+1,i):(y.text.toLowerCase().includes("back")||y.text.toLowerCase().includes("previous"))&&n(r-1,i))},d=(y,j)=>{const{buttonType:k,buttonVariant:v}=h(y),S=g(y.color);return l.jsx(x.Button,{type:k,variant:v,color:S,size:y.size||"medium",disabled:y.disabled,onClick:()=>w(y),sx:y.sx,children:y.text},j)},E=()=>{const y={display:"flex",gap:f,...m};switch(c){case"left":return{...y,justifyContent:"flex-start"};case"center":return{...y,justifyContent:"center"};case"right":return{...y,justifyContent:"flex-end"};case"space-between":return{...y,justifyContent:"space-between"};default:return{...y,justifyContent:"flex-end"}}};return u==="vertical"?l.jsx(x.Box,{sx:E(),children:s.map((y,j)=>l.jsx(x.Box,{sx:{width:"100%"},children:d(y,j)},j))}):l.jsx(x.Box,{sx:E(),children:l.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:s.map((y,j)=>d(y,j))})})},$l=(e,t)=>{const n=e==null?void 0:e.showWhen;if(n){if(typeof n=="function")try{return!!n(t||{})}catch{return!0}if(n&&typeof n=="object"){const r=n.field,i=n.equals,a=n.in,o=r?(t||{})[r]:void 0;if(r&&typeof i<"u")return o===i;if(r&&Array.isArray(a))return a.includes(o)}}return!0},_r=(e,t)=>{const n=[];for(const r of e)if($l(r,t)&&(n.push(r),r.type==="tabs"&&r.items)){const i=r.items||[],a=(t||{})[r.name],o=(()=>{if(typeof a=="string"||typeof a=="number"){const c=i.findIndex((u,f)=>typeof u.value=="string"||typeof u.value=="number"?u.value===a:f===a);return c>=0?c:0}return Number(a)||0})(),s=i[o]||{};Array.isArray(s.fields)&&n.push(..._r(s.fields,t))}return n},uh=new hc({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),ph=e=>l.jsx(vc,{client:uh,children:l.jsx(dh,{...e})}),dh=({id:e,theme:t,fields:n,onSubmit:r,onChange:i,submitButtonText:a="Submit",onSubmitClick:o,defaultValues:s,showSubmitButton:c=!0,buttons:u,buttonGroup:f,stickyButtons:m,stickyButtonsSx:h,fixedButtons:g,fixedButtonsSx:w,formCardWrap:d,formCardSx:E,formCardProps:y,baseUrl:j,apiHeaders:k,stepNavigationProps:v,testIdPrefix:S,dateFormat:_})=>{var le,ct;const M=[...new Set(n.map(O=>O.step).filter(O=>O!=null&&O>0))].sort((O,F)=>(O||0)-(F||0)),B=M.length>1,q=M.length||1,[p,R]=I.useState(1),$=B?n.filter(O=>O.step===p):n,G=I.useCallback(O=>{const F=[];for(const A of O)if(F.push(A),A.type==="tabs"&&A.items)for(const W of A.items||[])Array.isArray(W.fields)&&F.push(...G(W.fields));return F},[]),{control:N,handleSubmit:re,formState:{errors:V},watch:K,setValue:te,resetField:oe,trigger:T}=Ee.useForm({resolver:I.useCallback((O,F,A)=>{const Z=_r(B?$:n,O),ce=Ol(Z);return Gl(ce)(O,F,A)},[B,$,n]),mode:"onChange",defaultValues:s}),D=K(),ee=I.useRef({});I.useEffect(()=>{const O=[];for(const F of n){const A=F.depends_on;A&&typeof F.name=="string"&&O.push({dependentField:F.name,dependencyName:A})}if(O.length!==0)for(const{dependentField:F,dependencyName:A}of O){const W=ee.current[A],Z=D==null?void 0:D[A];if(W!==Z)try{oe(F)}catch{}ee.current[A]=Z}},[n,D,oe]);const se=I.useRef(i);I.useEffect(()=>{se.current=i},[i]);const ie=I.useMemo(()=>{try{return JSON.stringify(D)}catch{return String(Date.now())}},[D]),pe=I.useRef(null);I.useEffect(()=>{se.current&&pe.current!==ie&&(pe.current=ie,se.current(D))},[ie]);const U=async()=>{if(!B)return!0;const O=n.filter(A=>A.step===p);for(const A of O)if(typeof A.required=="function"?!!A.required(D):!!A.required){const Z=D[A.name];let ce=!0;if(A.type==="checkbox"?ce=Z===!0:Array.isArray(Z)?ce=Z.length>0:ce=Z!=null&&Z!=="",!ce)return!1}return await T()?!0:Object.keys(V).filter(W=>O.some(Z=>Z.name===W)).map(W=>{const Z=V[W];return typeof(Z==null?void 0:Z.message)=="string"?Z.message:`${W} is invalid`}).length===0},ne=I.useMemo(()=>{if(!B)return!0;const O=n.filter(A=>A.step===p);for(const A of O)if(typeof A.required=="function"?!!A.required(D):!!A.required){const Z=D[A.name];let ce=!0;if(A.type==="checkbox"?ce=Z===!0:Array.isArray(Z)?ce=Z.length>0:ce=Z!=null&&Z!=="",!ce)return!1}return Object.keys(V).filter(A=>O.some(W=>W.name===A)).length===0},[B,p,n,D,V]),de=I.useCallback((O,F)=>$l(O,F),[]),me=I.useCallback(O=>{const F=[];for(const A of O)if(F.push(A),A.type==="tabs"&&A.items)for(const W of A.items||[])Array.isArray(W.fields)&&F.push(...me(W.fields));return F},[]),L=I.useCallback((O,F)=>_r(O,F),[]),Y=I.useMemo(()=>{if(B)return ne;const O=_r(n,D);for(const W of O){if(!de(W,D))continue;if(typeof W.required=="function"?!!W.required(D):!!W.required){const ce=D[W.name];let fe=!0;if(W.type==="checkbox"?fe=ce===!0:fe=ce!=null&&ce!==""&&!(Array.isArray(ce)&&ce.length===0),!fe)return!1}}const F=new Set(O.map(W=>W.name));return Object.keys(V).filter(W=>F.has(W)).length===0},[B,ne,n,D,V,L,de]),z=async O=>{O<1||O>q||O>p&&B&&!await U()||R(O)},xe=async O=>{if(B&&p<q){console.warn("Form submission attempted on non-final step");return}const A=(W=>{const Z={...W||{}},ce=me(n);for(const fe of ce){if(!fe||!fe.name)continue;const H=Z[fe.name];if(fe.type==="dragdroplist"&&Array.isArray(H)){const Q=fe,ge=Q.serialize;if(!ge)continue;const Fe=H,Ae=typeof Q.getId=="function"?Q.getId:typeof Q.getId=="string"?ae=>ae==null?void 0:ae[Q.getId]:ae=>(ae==null?void 0:ae.id)??(ae==null?void 0:ae._id)??(ae==null?void 0:ae.key)??String(ae),qe=typeof Q.getText=="function"?Q.getText:typeof Q.getText=="string"?ae=>(ae==null?void 0:ae[Q.getText])??String(ae):ae=>(ae==null?void 0:ae.text)??(ae==null?void 0:ae.label)??(ae==null?void 0:ae.name)??(ae==null?void 0:ae.title)??String(ae),Me=(()=>{if(typeof Q.chipText=="function")return Q.chipText;if(typeof Q.chipText=="string")return(ae,tt)=>ae==null?void 0:ae[Q.chipText]})();let Ke=H;typeof ge=="function"?Ke=Fe.map((ae,tt)=>ge(ae,tt)):ge==="ids"?Ke=Fe.map(ae=>Ae(ae)):ge==="text"?Ke=Fe.map(ae=>qe(ae)):ge==="chips"?Ke=Fe.map((ae,tt)=>(typeof Me=="function"?Me(ae,tt):void 0)??""):ge&&typeof ge=="object"&&"field"in ge&&(Ke=Fe.map(ae=>ae==null?void 0:ae[ge.field])),Z[fe.name]=Ke}}return Z})(O);o&&o(A),r(A)},je=async O=>{O&&(O.preventDefault(),O.stopPropagation()),B&&p<q&&await U()&&z(p+1)},Ve=O=>{O&&(O.preventDefault(),O.stopPropagation()),B&&p>1&&z(p-1)},jt=O=>{const F=O.col??12,A=O.xs!==void 0?O.xs:12,W=O.sm!==void 0?O.sm:F,Z=O.md!==void 0?O.md:F,ce=O.lg!==void 0?O.lg:Z,fe=O.xl!==void 0?O.xl:ce;return{xs:A,sm:W,md:Z,lg:ce,xl:fe}},Be=t?x.createTheme({palette:{primary:{main:t.primaryColor||"#1976d2"},secondary:{main:t.secondaryColor||"#dc004e"},background:{default:t.backgroundColor||"#ffffff"},text:{primary:t.textColor||"#000000"}},shape:{borderRadius:t.borderRadius||4},spacing:t.spacing||8,typography:{fontFamily:((le=t.typography)==null?void 0:le.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((ct=t.typography)==null?void 0:ct.fontSize)=="number"?t.typography.fontSize:14}}):void 0,Ye=()=>{const O=g?{position:"fixed",left:0,right:0,bottom:0,background:"#FFFFFF",pt:2,px:2,pb:2,zIndex:1300,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.08)",...w}:m?{position:"sticky",bottom:0,background:"#FFFFFF",pt:2,pb:2,zIndex:1200,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.04)",...h}:void 0;if(f&&f.buttons&&f.buttons.length>0){const F={...f,buttons:f.buttons.map(A=>{const W=(A.text||"").toLowerCase(),Z=A.type==="submit"||W.includes("submit")||W.includes("save")||W.includes("finish")||W.includes("complete"),ce=W.includes("next");let fe=!1;return B?(Z||ce)&&(fe=!ne):Z&&(fe=!Y),{...A,disabled:A.disabled||fe}})};return l.jsx(x.Box,{sx:{mt:3,...O||{}},children:l.jsx(ch,{config:F,onSubmit:xe,onStepChange:z,currentStep:p,totalSteps:q,isMultiStep:B,formData:D})})}if(u&&u.length>0){const F=u.map(A=>{const W=(A.text||"").toLowerCase(),Z=A.type==="submit"||W.includes("submit")||W.includes("save")||W.includes("finish")||W.includes("complete"),ce=W.includes("next");let fe=!1;return B?(Z||ce)&&(fe=!ne):Z&&(fe=!Y),{...A,disabled:A.disabled||fe}});return l.jsx(x.Box,{sx:O,children:l.jsx(Al,{buttons:F,testIdPrefix:S})})}return c?l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end",...O||{}},children:l.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[B&&p>1&&l.jsx(x.Button,{type:"button",variant:"outlined",onClick:Ve,children:"Previous"}),B?p<q?l.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!ne,onClick:je,children:"Next"}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!ne,children:a}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!Y,"data-testid":S?`${S}-submit`:void 0,children:a})]})}):null},mt=I.useMemo(()=>{const O=[];let F=[];for(const A of $)A.type==="section"&&F.length>0?(O.push(F),F=[A]):F.push(A);return F.length>0&&O.push(F),O},[$]),et=l.jsxs(x.Box,{component:"form",onSubmit:O=>{if(B&&p<q){O.preventDefault(),O.stopPropagation(),ne&&je();return}re(xe)(O)},id:e,onKeyDown:O=>{O.key==="Enter"&&B&&p<q&&(O.preventDefault(),ne&&je())},sx:{pb:g?10:void 0},children:[B&&l.jsx(Fl,{currentStep:p,totalSteps:q,onStepChange:z,stepTitles:v==null?void 0:v.stepTitles,showStepTitles:(v==null?void 0:v.showStepTitles)!==!1}),mt.map((O,F)=>{const A=O.find(H=>H.type==="section");if(A&&!de(A,D))return null;const W=(A==null?void 0:A.cardWrap)!==!1,Z={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},ce={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},fe=l.jsx(l.Fragment,{children:O.map(H=>{if(!de(H,D))return null;const Q=jt(H);return l.jsx(x.Box,{sx:{gridColumn:{xs:`span ${Q.xs}`,sm:`span ${Q.sm}`,md:`span ${Q.md}`,lg:`span ${Q.lg}`,xl:`span ${Q.xl}`}},children:l.jsx(ka,{field:H,control:N,errors:V,baseUrl:j,apiHeaders:k,formData:D,setValue:te,testIdPrefix:S,dateFormat:_})},H.name)})});return W?l.jsx(x.Card,{sx:{...Z,...(A==null?void 0:A.cardSx)||{}},...(A==null?void 0:A.cardProps)||{},children:fe},`group-${F}`):l.jsx(x.Box,{sx:ce,children:fe},`group-${F}`)}),Ye()]}),kt=d?l.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...E},...y,children:et}):et;return Be?l.jsx(x.ThemeProvider,{theme:Be,children:kt}):kt},fh=({src:e,alt:t,width:n="100%",height:r="auto",style:i,className:a,onClick:o})=>l.jsx(x.Box,{sx:{textAlign:"center"},children:l.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:n,height:r,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:o?"pointer":"default",...i},className:a,onClick:o,onError:s=>{s.currentTarget.src="/placeholder-image.png"}})});function Sn(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(f){try{u(r.next(f))}catch(m){o(m)}}function c(f){try{u(r.throw(f))}catch(m){o(m)}}function u(f){f.done?a(f.value):i(f.value).then(s,c)}u((r=r.apply(e,t||[])).next())})}const hh=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Yn(e,t,n){const r=mh(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&Uo(r,"path",a),Uo(r,"relativePath",a),r}function mh(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=hh.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Uo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const xh=[".DS_Store","Thumbs.db"];function gh(e){return Sn(this,void 0,void 0,function*(){return Qr(e)&&yh(e.dataTransfer)?Sh(e.dataTransfer,e.type):vh(e)?bh(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?wh(e):[]})}function yh(e){return Qr(e)}function vh(e){return Qr(e)&&Qr(e.target)}function Qr(e){return typeof e=="object"&&e!==null}function bh(e){return ea(e.target.files).map(t=>Yn(t))}function wh(e){return Sn(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Yn(n))})}function Sh(e,t){return Sn(this,void 0,void 0,function*(){if(e.items){const n=ea(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(Ch));return Ho(Rl(r))}return Ho(ea(e.files).map(n=>Yn(n)))})}function Ho(e){return e.filter(t=>xh.indexOf(t.name)===-1)}function ea(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function Ch(e){if(typeof e.webkitGetAsEntry!="function")return Yo(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Pl(t):Yo(e,t)}function Rl(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Rl(n):[n]],[])}function Yo(e,t){return Sn(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const o=yield a.getFile();return o.handle=a,Yn(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Yn(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function Th(e){return Sn(this,void 0,void 0,function*(){return e.isDirectory?Pl(e):Eh(e)})}function Pl(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function a(){t.readEntries(o=>Sn(this,void 0,void 0,function*(){if(o.length){const s=Promise.all(o.map(Th));i.push(s),a()}else try{const s=yield Promise.all(i);n(s)}catch(s){r(s)}}),o=>{r(o)})}a()})}function Eh(e){return Sn(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=Yn(r,e.fullPath);t(i)},r=>{n(r)})})})}var jr={},Ko;function jh(){return Ko||(Ko=1,jr.__esModule=!0,jr.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}),jr}var kh=jh();const ki=la(kh);function Qo(e){return Ah(e)||Fh(e)||Dl(e)||Oh()}function Oh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
180
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ah(e){if(Array.isArray(e))return ta(e)}function Go(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Go(Object(n),!0).forEach(function(r){_l(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Go(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function or(e,t){return Ph(e)||Rh(e,t)||Dl(e,t)||$h()}function $h(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
181
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dl(e,t){if(e){if(typeof e=="string")return ta(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ta(e,t)}}function ta(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rh(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Ph(e){if(Array.isArray(e))return e}var _h=typeof ki=="function"?ki:ki.default,Dh="file-invalid-type",Ih="file-too-large",Mh="file-too-small",zh="too-many-files",Bh=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:Dh,message:"File type must be ".concat(r)}},Xo=function(t){return{code:Ih,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Jo=function(t){return{code:Mh,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Nh={code:zh,message:"Too many files"};function Il(e,t){var n=e.type==="application/x-moz-file"||_h(e,t);return[n,n?null:Bh(t)]}function Ml(e,t,n){if(an(e.size))if(an(t)&&an(n)){if(e.size>n)return[!1,Xo(n)];if(e.size<t)return[!1,Jo(t)]}else{if(an(t)&&e.size<t)return[!1,Jo(t)];if(an(n)&&e.size>n)return[!1,Xo(n)]}return[!0,null]}function an(e){return e!=null}function Lh(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(c){var u=Il(c,n),f=or(u,1),m=f[0],h=Ml(c,r,i),g=or(h,1),w=g[0],d=s?s(c):null;return m&&w&&!d})}function Gr(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function kr(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function es(e){e.preventDefault()}function Vh(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function qh(e){return e.indexOf("Edge/")!==-1}function Wh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Vh(e)||qh(e)}function bt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!Gr(r)&&s&&s.apply(void 0,[r].concat(a)),Gr(r)})}}function Uh(){return"showOpenFilePicker"in window}function Hh(e){if(an(e)){var t=Object.entries(e).filter(function(n){var r=or(n,2),i=r[0],a=r[1],o=!0;return zl(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(Bl))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=or(r,2),a=i[0],o=i[1];return Zo(Zo({},n),{},_l({},a,o))},{});return[{description:"Files",accept:t}]}return e}function Yh(e){if(an(e))return Object.entries(e).reduce(function(t,n){var r=or(n,2),i=r[0],a=r[1];return[].concat(Qo(t),[i],Qo(a))},[]).filter(function(t){return zl(t)||Bl(t)}).join(",")}function Kh(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Qh(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function zl(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Bl(e){return/^.*\.[\w]+$/.test(e)}var Gh=["children"],Zh=["open"],Xh=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Jh=["refKey","onChange","onClick"];function em(e){return rm(e)||nm(e)||Nl(e)||tm()}function tm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
182
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nm(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rm(e){if(Array.isArray(e))return na(e)}function Oi(e,t){return om(e)||am(e,t)||Nl(e,t)||im()}function im(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
183
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nl(e,t){if(e){if(typeof e=="string")return na(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return na(e,t)}}function na(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function am(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function om(e){if(Array.isArray(e))return e}function ts(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ts(Object(n),!0).forEach(function(r){ra(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ts(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ra(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zr(e,t){if(e==null)return{};var n=sm(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sm(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Aa=I.forwardRef(function(e,t){var n=e.children,r=Zr(e,Gh),i=Vl(r),a=i.open,o=Zr(i,Zh);return I.useImperativeHandle(t,function(){return{open:a}},[a]),I.createElement(I.Fragment,null,n(Re(Re({},o),{},{open:a})))});Aa.displayName="Dropzone";var Ll={disabled:!1,getFilesFromEvent:gh,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Aa.defaultProps=Ll;Aa.propTypes={children:b.func,accept:b.objectOf(b.arrayOf(b.string)),multiple:b.bool,preventDropOnDocument:b.bool,noClick:b.bool,noKeyboard:b.bool,noDrag:b.bool,noDragEventsBubbling:b.bool,minSize:b.number,maxSize:b.number,maxFiles:b.number,disabled:b.bool,getFilesFromEvent:b.func,onFileDialogCancel:b.func,onFileDialogOpen:b.func,useFsAccessApi:b.bool,autoFocus:b.bool,onDragEnter:b.func,onDragLeave:b.func,onDragOver:b.func,onDrop:b.func,onDropAccepted:b.func,onDropRejected:b.func,onError:b.func,validator:b.func};var ia={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Vl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Re(Re({},Ll),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,c=t.maxFiles,u=t.onDragEnter,f=t.onDragLeave,m=t.onDragOver,h=t.onDrop,g=t.onDropAccepted,w=t.onDropRejected,d=t.onFileDialogCancel,E=t.onFileDialogOpen,y=t.useFsAccessApi,j=t.autoFocus,k=t.preventDropOnDocument,v=t.noClick,S=t.noKeyboard,_=t.noDrag,M=t.noDragEventsBubbling,B=t.onError,q=t.validator,p=I.useMemo(function(){return Yh(n)},[n]),R=I.useMemo(function(){return Hh(n)},[n]),$=I.useMemo(function(){return typeof E=="function"?E:ns},[E]),G=I.useMemo(function(){return typeof d=="function"?d:ns},[d]),N=I.useRef(null),re=I.useRef(null),V=I.useReducer(lm,ia),K=Oi(V,2),te=K[0],oe=K[1],T=te.isFocused,D=te.isFileDialogActive,ee=I.useRef(typeof window<"u"&&window.isSecureContext&&y&&Uh()),se=function(){!ee.current&&D&&setTimeout(function(){if(re.current){var F=re.current.files;F.length||(oe({type:"closeDialog"}),G())}},300)};I.useEffect(function(){return window.addEventListener("focus",se,!1),function(){window.removeEventListener("focus",se,!1)}},[re,D,G,ee]);var ie=I.useRef([]),pe=function(F){N.current&&N.current.contains(F.target)||(F.preventDefault(),ie.current=[])};I.useEffect(function(){return k&&(document.addEventListener("dragover",es,!1),document.addEventListener("drop",pe,!1)),function(){k&&(document.removeEventListener("dragover",es),document.removeEventListener("drop",pe))}},[N,k]),I.useEffect(function(){return!r&&j&&N.current&&N.current.focus(),function(){}},[N,j,r]);var U=I.useCallback(function(O){B?B(O):console.error(O)},[B]),ne=I.useCallback(function(O){O.preventDefault(),O.persist(),et(O),ie.current=[].concat(em(ie.current),[O.target]),kr(O)&&Promise.resolve(i(O)).then(function(F){if(!(Gr(O)&&!M)){var A=F.length,W=A>0&&Lh({files:F,accept:p,minSize:o,maxSize:a,multiple:s,maxFiles:c,validator:q}),Z=A>0&&!W;oe({isDragAccept:W,isDragReject:Z,isDragActive:!0,type:"setDraggedFiles"}),u&&u(O)}}).catch(function(F){return U(F)})},[i,u,U,M,p,o,a,s,c,q]),de=I.useCallback(function(O){O.preventDefault(),O.persist(),et(O);var F=kr(O);if(F&&O.dataTransfer)try{O.dataTransfer.dropEffect="copy"}catch{}return F&&m&&m(O),!1},[m,M]),me=I.useCallback(function(O){O.preventDefault(),O.persist(),et(O);var F=ie.current.filter(function(W){return N.current&&N.current.contains(W)}),A=F.indexOf(O.target);A!==-1&&F.splice(A,1),ie.current=F,!(F.length>0)&&(oe({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),kr(O)&&f&&f(O))},[N,f,M]),L=I.useCallback(function(O,F){var A=[],W=[];O.forEach(function(Z){var ce=Il(Z,p),fe=Oi(ce,2),H=fe[0],Q=fe[1],ge=Ml(Z,o,a),Fe=Oi(ge,2),Ae=Fe[0],qe=Fe[1],Me=q?q(Z):null;if(H&&Ae&&!Me)A.push(Z);else{var Ke=[Q,qe];Me&&(Ke=Ke.concat(Me)),W.push({file:Z,errors:Ke.filter(function(ae){return ae})})}}),(!s&&A.length>1||s&&c>=1&&A.length>c)&&(A.forEach(function(Z){W.push({file:Z,errors:[Nh]})}),A.splice(0)),oe({acceptedFiles:A,fileRejections:W,isDragReject:W.length>0,type:"setFiles"}),h&&h(A,W,F),W.length>0&&w&&w(W,F),A.length>0&&g&&g(A,F)},[oe,s,p,o,a,c,h,g,w,q]),Y=I.useCallback(function(O){O.preventDefault(),O.persist(),et(O),ie.current=[],kr(O)&&Promise.resolve(i(O)).then(function(F){Gr(O)&&!M||L(F,O)}).catch(function(F){return U(F)}),oe({type:"reset"})},[i,L,U,M]),z=I.useCallback(function(){if(ee.current){oe({type:"openDialog"}),$();var O={multiple:s,types:R};window.showOpenFilePicker(O).then(function(F){return i(F)}).then(function(F){L(F,null),oe({type:"closeDialog"})}).catch(function(F){Kh(F)?(G(F),oe({type:"closeDialog"})):Qh(F)?(ee.current=!1,re.current?(re.current.value=null,re.current.click()):U(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):U(F)});return}re.current&&(oe({type:"openDialog"}),$(),re.current.value=null,re.current.click())},[oe,$,G,y,L,U,R,s]),xe=I.useCallback(function(O){!N.current||!N.current.isEqualNode(O.target)||(O.key===" "||O.key==="Enter"||O.keyCode===32||O.keyCode===13)&&(O.preventDefault(),z())},[N,z]),je=I.useCallback(function(){oe({type:"focus"})},[]),Ve=I.useCallback(function(){oe({type:"blur"})},[]),jt=I.useCallback(function(){v||(Wh()?setTimeout(z,0):z())},[v,z]),Be=function(F){return r?null:F},Ye=function(F){return S?null:Be(F)},mt=function(F){return _?null:Be(F)},et=function(F){M&&F.stopPropagation()},kt=I.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=O.refKey,A=F===void 0?"ref":F,W=O.role,Z=O.onKeyDown,ce=O.onFocus,fe=O.onBlur,H=O.onClick,Q=O.onDragEnter,ge=O.onDragOver,Fe=O.onDragLeave,Ae=O.onDrop,qe=Zr(O,Xh);return Re(Re(ra({onKeyDown:Ye(bt(Z,xe)),onFocus:Ye(bt(ce,je)),onBlur:Ye(bt(fe,Ve)),onClick:Be(bt(H,jt)),onDragEnter:mt(bt(Q,ne)),onDragOver:mt(bt(ge,de)),onDragLeave:mt(bt(Fe,me)),onDrop:mt(bt(Ae,Y)),role:typeof W=="string"&&W!==""?W:"presentation"},A,N),!r&&!S?{tabIndex:0}:{}),qe)}},[N,xe,je,Ve,jt,ne,de,me,Y,S,_,r]),le=I.useCallback(function(O){O.stopPropagation()},[]),ct=I.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=O.refKey,A=F===void 0?"ref":F,W=O.onChange,Z=O.onClick,ce=Zr(O,Jh),fe=ra({accept:p,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Be(bt(W,Y)),onClick:Be(bt(Z,le)),tabIndex:-1},A,re);return Re(Re({},fe),ce)}},[re,n,s,Y,r]);return Re(Re({},te),{},{isFocused:T&&!r,getRootProps:kt,getInputProps:ct,rootRef:N,inputRef:re,open:Be(z)})}function lm(e,t){switch(t.type){case"focus":return Re(Re({},e),{},{isFocused:!0});case"blur":return Re(Re({},e),{},{isFocused:!1});case"openDialog":return Re(Re({},ia),{},{isFileDialogActive:!0});case"closeDialog":return Re(Re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Re(Re({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Re(Re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Re({},ia);default:return e}}function ns(){}const cm=Je(l.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),rs=Je(l.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),um=Je(l.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),ql=({file:e,onRemove:t})=>{const n=()=>e.file.type.startsWith("image/")?l.jsx(um,{}):e.file.type.includes("pdf")?l.jsx(rs,{}):l.jsx(rs,{}),r=()=>{switch(e.status){case"success":return l.jsx(cm,{color:"success"});case"uploading":return l.jsx(x.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const o=1024,s=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(a)/Math.log(o));return parseFloat((a/Math.pow(o,c)).toFixed(2))+" "+s[c]};return l.jsxs(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[n(),r()]}),l.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[l.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),l.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),l.jsx(x.Tooltip,{title:"Remove file",children:l.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:l.jsx(ll,{})})})]})},pm=({config:e,value:t=[],onChange:n,onSubmit:r,disabled:i=!1,className:a,style:o,title:s,subtitle:c,buttonText:u,fileSupportedText:f})=>{const[m,h]=I.useState(t),[g,w]=I.useState([]),[d,E]=I.useState(!1),[y,j]=I.useState(!1),[k,v]=I.useState([]),S=I.useRef(null);I.useEffect(()=>{h(t)},[t]);const _=I.useCallback(N=>{var V,K;return((V=e==null?void 0:e.fileTypes)==null?void 0:V.some(te=>{if(te.includes("*")){const oe=te.split("/")[0];return N.type.startsWith(oe)}return N.type===te}))?e!=null&&e.maxSize&&N.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${N.type} is not allowed. Allowed types: ${(K=e==null?void 0:e.fileTypes)==null?void 0:K.join(", ")}`},[e]),M=I.useCallback(async N=>{console.log("handleFiles called with:",N.length,"files"),E(!0);const re=[],V=[];try{for(const te of N){let oe=null;if(e!=null&&e.multiple&&m.some(D=>D.file.name===te.name&&D.file.size===te.size&&D.file.lastModified===te.lastModified)){V.push(`${te.name}: File already exists`);continue}if(oe=_(te),!oe&&(e!=null&&e.customValidation))try{const T=e.customValidation(te);T instanceof Promise?oe=await T:oe=T}catch(T){oe=`Custom validation failed: ${T instanceof Error?T.message:"Unknown error"}`}if(oe)V.push(`${te.name}: ${oe}`);else{const T={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:te,preview:te.type.startsWith("image/")?URL.createObjectURL(te):void 0,progress:0,status:"pending",uploadedAt:new Date};re.push(T)}}const K=e!=null&&e.multiple?[...m,...re]:re;h(K),n==null||n(K),V.length>0?(v(V),w(V)):(v([]),w([]))}catch(K){const te=`Unexpected error: ${K instanceof Error?K.message:"Unknown error"}`;v([te]),w([te])}},[m,e==null?void 0:e.multiple,_,e==null?void 0:e.customValidation,n]),B=I.useCallback(N=>{E(!0);const re=m.filter(V=>V.id!==N);h(re),n==null||n(re),v([]),S.current&&(S.current.value="")},[m,n]),q=I.useCallback(()=>{if(e!=null&&e.required&&m.length===0){w([`${e.title} is required`]);return}v([]),j(!0);const N=m.filter(re=>re.status!=="error");r==null||r(N)},[m,r,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:p,getInputProps:R,isDragActive:$}=Vl({onDrop:M,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});I.useEffect(()=>{if(!d)return;const N=[],re=[...k,...N];re.length>0?w(re):w([])},[m,e==null?void 0:e.required,e==null?void 0:e.title,d,y,k]);const G=()=>{var N;switch(((N=e==null?void 0:e.submitButton)==null?void 0:N.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return l.jsxs(x.Box,{className:a,style:o,children:[l.jsxs(x.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&l.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&l.jsx(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),I.createElement(x.Card,{...p(),key:`dropzone-${m.length}`,sx:{border:"1px dashed",borderColor:$?"primary.main":"#CCCCCC",backgroundColor:$?"action.hover":"#F5F5F5",boxShadow:"none",p:3,textAlign:"center",cursor:i?"not-allowed":"pointer",transition:"all 0.2s ease","&:hover":{borderColor:i?"grey.300":"primary.main",backgroundColor:i?"background.paper":"action.hover"}}},l.jsx("input",{...R(),ref:S}),l.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:l.jsx(qr,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:s}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:c}),l.jsx(x.Button,{onClick:()=>{var N;return(N=S.current)==null?void 0:N.click()},sx:{my:2},startIcon:l.jsx(qr,{}),variant:"contained",children:u}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:f})),g.length>0&&l.jsx(x.Alert,{severity:"error",sx:{mt:2},children:g.map((N,re)=>l.jsx(x.Typography,{variant:"body2",children:N},re))}),m.length>0&&l.jsxs(x.Box,{sx:{mt:2},children:[l.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",m.length,")"]}),m.map(N=>l.jsx(ql,{file:N,onRemove:B},N.id))]}),(e==null?void 0:e.helperText)&&l.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:G()},children:l.jsx(x.Button,{variant:"contained",onClick:q,disabled:i||e.submitButton.disabled||m.length===0,startIcon:e.submitButton.loading?l.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Al;exports.DEFAULT_DATE_FORMAT=Ur;exports.DocumentUpload=pm;exports.FINFLOW_FRONTEND_DEFAULT_PRIMARY=Xs;exports.FieldRenderer=ka;exports.FilePreview=ql;exports.FinAutocomplete=Js;exports.FinCheckbox=_t;exports.FinCheckboxGroup=el;exports.FinChip=Ea;exports.FinCustomizedVerticalStepper=Cf;exports.FinDateField=Ta;exports.FinDragDropList=il;exports.FinEditableGrid=ol;exports.FinForm=ph;exports.FinInfoCard=Ef;exports.FinListCards=sl;exports.FinPhaseCard=Of;exports.FinRadioGroup=sn;exports.FinSelect=ci;exports.FinSwitch=Wr;exports.FinTabs=al;exports.FinTextField=rt;exports.FinTextarea=tl;exports.FinUiHeader=nl;exports.FinVerticalStepper=wf;exports.ImageComponent=fh;exports.StepNavigation=Fl;exports.brand=xf;exports.buildFinformTestIds=cl;exports.createFinflowFrontendMirrorTheme=vf;exports.createNeutralToneScale=Zs;exports.dateFormatToPlaceholder=Ca;exports.fetchApiData=pl;exports.finflowPalette=he;exports.generateSchema=Ol;exports.getApiConfig=ja;exports.hasApiConfig=rn;exports.neutral=$r;exports.primary=hf;exports.resolveFieldTestIds=ul;exports.secondary=mf;exports.shouldShowField=Ff;exports.useApiData=dl;exports.useFinInputTokens=mr;
179
+ `+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=n,c=t;s||(c=this._cast(c,Object.assign({assert:!1},n)));let u=[];for(let h of Object.values(this.internalTests))h&&u.push(h);this.runTests({path:a,value:c,originalValue:o,options:n,tests:u},r,h=>{if(h.length)return i(h,c);this.runTests({path:a,value:c,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:a,value:o,originalValue:s,path:c,options:u}=t,h=f=>{i||(i=!0,n(f,o))},m=f=>{i||(i=!0,r(f,o))},d=a.length,g=[];if(!d)return m([]);let b={value:o,originalValue:s,path:c,options:u,schema:this};for(let f=0;f<a.length;f++){const E=a[f];E(b,h,function(k){k&&(Array.isArray(k)?g.push(...k):g.push(k)),--d<=0&&m(g)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:a,options:o}){const s=t??n;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof s=="number";let u=r[s];const h=Object.assign({},o,{strict:!0,parent:r,value:u,originalValue:a[s],key:void 0,[c?"index":"key"]:s,path:c||s.includes(".")?`${i||""}[${c?s:`"${s}"`}]`:(i?`${i}.`:"")+t});return(m,d,g)=>this.resolve(h)._validate(u,h,d,g)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),a=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,n,(c,u)=>{Je.isError(c)&&(c.value=u),s(c)},(c,u)=>{c.length?s(new Je(c,u,void 0,void 0,a)):o(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),a,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(s,c)=>{throw Je.isError(s)&&(s.value=c),s},(s,c)=>{if(s.length)throw new Je(s,t,void 0,void 0,o);a=c}),a}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Je.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Je.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Dn(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Rn({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Rn({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=wt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=wt.notNull){return this.nullability(!1,t)}required(t=wt.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=wt.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Rn(n),a=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=vl(t).map(a=>new rn(a));return i.forEach(a=>{a.isSibling&&r.deps.push(a.key)}),r.conditions.push(typeof n=="function"?new Qr(i,n):Qr.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Rn({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=wt.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Rn({message:n,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),r}notOneOf(t,n=wt.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Rn({message:n,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:a,nullable:o}=n.spec;return{meta:i,label:r,optional:a,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,u,h)=>h.findIndex(m=>m.name===c.name)===u)}}}st.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])st.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:a,schema:o}=Xf(this,t,n,r.context);return o[e](i&&i[a],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])st.prototype[e]=st.prototype.oneOf;for(const e of["not","nope"])st.prototype[e]=st.prototype.notOneOf;const Jf=()=>!0;function Cl(e){return new Tl(e)}class Tl extends st{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Jf},t))}}Cl.prototype=Tl.prototype;function El(){return new jl}class jl extends st{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=ta.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return yt(n)||n===!0}})}isFalse(t=ta.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return yt(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}El.prototype=jl.prototype;const eh=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function th(e){const t=na(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function na(e){var t,n;const r=eh.exec(e);return r?{year:$t(r[1]),month:$t(r[2],1)-1,day:$t(r[3],1),hour:$t(r[4]),minute:$t(r[5]),second:$t(r[6]),millisecond:r[7]?$t(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:$t(r[10]),minuteOffset:$t(r[11])}:null}function $t(e,t=0){return Number(e)||t}let nh=/^[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])?)*$/,rh=/^((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,ih=/^(?:[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,ah="^\\d{4}-\\d{2}-\\d{2}",oh="\\d{2}:\\d{2}:\\d{2}",sh="(([+-]\\d{2}(:?\\d{2})?)|Z)",lh=new RegExp(`${ah}T${oh}(\\.\\d+)?${sh}$`),ch=e=>yt(e)||e===e.trim(),uh={}.toString();function ir(){return new kl}class kl extends st{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===uh?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||wt.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Ge.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Ge.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Ge.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,a;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:a}=n:i=n),this.test({name:a||"matches",message:i||Ge.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=Ge.email){return this.matches(nh,{name:"email",message:t,excludeEmptyString:!0})}url(t=Ge.url){return this.matches(rh,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Ge.uuid){return this.matches(ih,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(lh,{name:"datetime",message:n||Ge.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Ge.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:a=>{if(!a||r)return!0;const o=na(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||Ge.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=na(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Ge.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:ch})}lowercase(t=Ge.lowercase){return this.transform(n=>yt(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>yt(n)||n===n.toLowerCase()})}uppercase(t=Ge.uppercase){return this.transform(n=>yt(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>yt(n)||n===n.toUpperCase()})}}ir.prototype=kl.prototype;let ph=e=>e!=+e;function Ol(){return new Fl}class Fl extends st{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!ph(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return r.isType(i)||i===null?i:parseFloat(i)})})}min(t,n=Nt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Nt.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Nt.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=Nt.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=Nt.positive){return this.moreThan(0,t)}negative(t=Nt.negative){return this.lessThan(0,t)}integer(t=Nt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>yt(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(i=>yt(i)?i:Math[t](i))}}Ol.prototype=Fl.prototype;let Al=new Date(""),dh=e=>Object.prototype.toString.call(e)==="[object Date]";function Ra(){return new yr}class yr extends st{constructor(){super({type:"date",check(t){return dh(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=th(t),isNaN(t)?yr.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(rn.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=ea.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=ea.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}yr.INVALID_DATE=Al;Ra.prototype=yr.prototype;Ra.INVALID_DATE=Al;function fh(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let c=vn.split(o)[0];r.add(c),i.has(`${s}-${c}`)||n.push([s,c])}for(const o of Object.keys(e)){let s=e[o];r.add(o),rn.isRef(s)&&s.isSibling?a(s.path,o):$a(s)&&"deps"in s&&s.deps.forEach(c=>a(c,o))}return Vf.array(Array.from(r),n).reverse()}function Uo(e,t){let n=1/0;return e.some((r,i)=>{var a;if((a=t.path)!=null&&a.includes(r))return n=i,!0}),n}function $l(e){return(t,n)=>Uo(e,t)-Uo(e,n)}const hh=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function Mr(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Mr(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Mr(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Mr)}):"optional"in e?e.optional():e}const mh=(e,t)=>{const n=[...vn.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=vn.getter(vn.join(n),!0)(e);return!!(i&&r in i)};let Ho=e=>Object.prototype.toString.call(e)==="[object Object]";function Yo(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const xh=$l([]);function Rl(e){return new Pl(e)}class Pl extends st{constructor(t){super({type:"object",check(n){return Ho(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=xh,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let a=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(m=>!this._nodes.includes(m))),c={},u=Object.assign({},n,{parent:c,__validating:n.__validating||!1}),h=!1;for(const m of s){let d=a[m],g=m in i;if(d){let b,f=i[m];u.path=(n.path?`${n.path}.`:"")+m,d=d.resolve({value:f,context:n.context,parent:c});let E=d instanceof st?d.spec:void 0,y=E==null?void 0:E.strict;if(E!=null&&E.strip){h=h||m in i;continue}b=!n.__validating||!y?d.cast(i[m],u):i[m],b!==void 0&&(c[m]=b)}else g&&!o&&(c[m]=i[m]);(g!==m in c||c[m]!==i[m])&&(h=!0)}return h?c:i}_validate(t,n={},r,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:o},...a],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(c,u)=>{if(!s||!Ho(u)){i(c,u);return}o=o||u;let h=[];for(let m of this._nodes){let d=this.fields[m];!d||rn.isRef(d)||h.push(d.asNestedTest({options:n,key:m,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:h,value:u,originalValue:o,options:n},r,m=>{i(m.sort(this._sortErrors).concat(c),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,a]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?a:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const a=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=a&&"getDefault"in a?a.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=fh(t,n),r._sortErrors=$l(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return Mr(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=vn.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return mh(a,t)&&(o=Object.assign({},a),r||delete o[t],o[n]=i(a)),o})}json(){return this.transform(hh)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||_r.exact,test(n){if(n==null)return!0;const r=Yo(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=_r.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const a=Yo(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=_r.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(Fi.camelCase)}snakeCase(){return this.transformKeys(Fi.snakeCase)}constantCase(){return this.transformKeys(t=>Fi.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[a,o]of Object.entries(n.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),r.fields[a]=o.describe(s)}return r}}Rl.prototype=Pl.prototype;const Dl=e=>{const t={};return e.forEach(n=>{var o,s,c;let r;switch(n.type){case"text":case"textarea":case"tel":case"mobile":r=ir(),n.validation?r=an(r,n,"string"):(n.minLength&&(r=r.min(n.minLength,`${n.label} must be at least ${n.minLength} characters`)),n.maxLength&&(r=r.max(n.maxLength,`${n.label} must be at most ${n.maxLength} characters`)),n.pattern&&(r=r.test("pattern",`${n.label} format is invalid`,u=>u?new RegExp(n.pattern).test(u):!0)));break;case"email":r=ir().email(((o=n.validation)==null?void 0:o.message)||`${n.label} must be a valid email address`),n.validation&&(r=an(r,n,"string"));break;case"password":r=ir(),n.validation?r=an(r,n,"string"):(n.minLength&&(r=r.min(n.minLength,`${n.label} must be at least ${n.minLength} characters`)),n.maxLength&&(r=r.max(n.maxLength,`${n.label} must be at most ${n.maxLength} characters`)),n.pattern&&(r=r.test("pattern",`${n.label} format is invalid`,u=>u?new RegExp(n.pattern).test(u):!0)));break;case"number":if(r=Ol().transform((u,h)=>h===""||h===null?void 0:u).nullable().typeError(`${n.label} must be a number`),n.validation)r=an(r,n,"number");else{if(n.min!==void 0){const u=typeof n.min=="object"&&n.min!==null&&"field"in n.min,h=u?Gr(n.min.field):n.min,m=u&&n.min.message?n.min.message:`${n.label} must be at least ${u?"the minimum value":n.min}`;r=r.min(h,m)}if(n.max!==void 0){const u=typeof n.max=="object"&&n.max!==null&&"field"in n.max,h=u?Gr(n.max.field):n.max,m=u&&n.max.message?n.max.message:`${n.label} must be at most ${u?"the maximum value":n.max}`;r=r.max(h,m)}}break;case"select":r=ir(),n.validation&&(r=an(r,n,"string"));break;case"checkbox":r=El(),n.validation&&(r=an(r,n,"boolean"));break;case"date":r=Ra().typeError(`${n.label} must be a valid date`),n.validation?r=an(r,n,"date"):(n.minDate&&(r=r.min(new Date(n.minDate),`${n.label} must be after ${n.minDate}`)),n.maxDate&&(r=r.max(new Date(n.maxDate),`${n.label} must be before ${n.maxDate}`)));break;default:r=Cl()}const i=((s=n.validation)==null?void 0:s.required)!==void 0?n.validation.required:n.required;if(typeof i=="function"?!1:!!i){const u=((c=n.validation)==null?void 0:c.message)||`${n.label} is required`;r=r.required(u)}t[n.name]=r}),Rl().shape(t)},an=(e,t,n,r)=>{const i=t.validation;if(!i)return e;if(n==="string"){if(i.minLength!==void 0){const a=i.message||`${t.label} must be at least ${i.minLength} characters`;e=e.min(i.minLength,a)}if(i.maxLength!==void 0){const a=i.message||`${t.label} must be at most ${i.maxLength} characters`;e=e.max(i.maxLength,a)}}if(n==="number"){if(i.min!==void 0)if(typeof i.min=="object"&&"field"in i.min){const a=Gr(i.min.field),o=i.min.message||i.message||`${t.label} must be at least the value of ${i.min.field}`;e=e.min(a,o)}else{const a=i.message||`${t.label} must be at least ${i.min}`;e=e.min(i.min,a)}if(i.max!==void 0)if(typeof i.max=="object"&&"field"in i.max){const a=Gr(i.max.field),o=i.max.message||i.message||`${t.label} must be at most the value of ${i.max.field}`;e=e.max(a,o)}else{const a=i.message||`${t.label} must be at most ${i.max}`;e=e.max(i.max,a)}}if(i.pattern){const a=typeof i.pattern=="string"?new RegExp(i.pattern):i.pattern,o=i.message||`${t.label} format is invalid`;e=e.test("pattern",o,s=>s?a.test(s):!0)}return i.custom&&(e=e.test("custom",i.message||`${t.label} is invalid`,function(a){const o=this.parent||{},s=i.custom(a,o);return typeof s=="boolean"?s:!1})),e},_l=({currentStep:e,totalSteps:t,onStepChange:n,stepTitles:r=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const o=D.useMemo(()=>Array.from({length:t},(h,m)=>m+1),[t]),s=D.useMemo(()=>Math.round(e/t*100),[e,t]),c=h=>r[h-1]||`Step ${h}`,u=h=>h===e||a.includes(h)||h===e+1&&a.includes(e);return l.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:o.map((h,m)=>{const d=h===e,g=h<e||a.includes(h),b=d||g?"primary.main":"#8F97A4";return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[l.jsxs(x.Box,{onClick:()=>u(h)&&n(h),sx:{display:"flex",alignItems:"center",cursor:u(h)?"pointer":"default"},children:[l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:d||g?"2px solid":"1px solid",borderColor:d||g?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:f=>d||g?ot(f.palette.primary.main,.2):"transparent",mr:.5,color:b,fontWeight:d||g?600:500,fontSize:"12px"},children:h}),i&&l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:b},children:c(h)})]}),m<o.length-1&&l.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:h<e?"primary.main":"#DFE3E8"}})]},h)})}),l.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${s}% complete`})]}),l.jsx(x.LinearProgress,{variant:"determinate",value:s,sx:{height:4,borderRadius:"50px",backgroundColor:h=>h.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Ml=({buttons:e,disabled:t=!1,testIdPrefix:n})=>{const r=c=>{c.onClick&&c.onClick()},i=e.filter(c=>c.position==="left"||!c.position),a=e.filter(c=>c.position==="center"),o=e.filter(c=>c.position==="right"),s=(c,u)=>{const h=(c.text||"").toLowerCase(),m=c.type==="submit"||h.includes("submit")||h.includes("save")||h.includes("next"),d=c.position==="left"||h.includes("cancel")||h.includes("back")||h.includes("draft"),g=c.type?c.type:m?"submit":"button",b=d?"outlined":"contained",f=c.disabled||t,E=h.includes("cancel")||h.includes("back"),y=n?m?`${n}-submit`:E?`${n}-cancel`:void 0:void 0,k=j=>j&&["primary","secondary","error","info","success","warning"].includes(j)?j:"primary";return l.jsxs(x.Button,{type:g,variant:b,color:k(c.color),size:c.size||"large",disabled:f,onClick:c.onClick?()=>r(c):void 0,"data-testid":y,sx:c.sx,children:[c.loading&&l.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),c.text]},`${c.text}-${u}`)};return l.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((c,u)=>s(c,u))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((c,u)=>s(c,u))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:o.map((c,u)=>s(c,u))})]})},gh=({config:e,onSubmit:t,onStepChange:n,currentStep:r=1,totalSteps:i=1,isMultiStep:a=!1,formData:o})=>{const{buttons:s,position:c="right",layout:u="horizontal",spacing:h=2,sx:m}=e,d=y=>{let k="button",j="contained";return y.type?k=y.type:y.text.toLowerCase().includes("submit")||y.text.toLowerCase().includes("save")||y.text.toLowerCase().includes("next")?k="submit":(y.text.toLowerCase().includes("reset")||y.text.toLowerCase().includes("clear"))&&(k="reset"),(y.text.toLowerCase().includes("cancel")||y.text.toLowerCase().includes("back")||y.text.toLowerCase().includes("draft"))&&(j="outlined"),{buttonType:k,buttonVariant:j}},g=y=>["primary","secondary","error","warning","info","success"].includes(y||"")?y:"primary",b=y=>{const{buttonType:k}=d(y);y.onClick?y.onClick():k==="submit"&&t?t(o):a&&n&&(y.text.toLowerCase().includes("next")?n(r+1,i):(y.text.toLowerCase().includes("back")||y.text.toLowerCase().includes("previous"))&&n(r-1,i))},f=(y,k)=>{const{buttonType:j,buttonVariant:v}=d(y),S=g(y.color);return l.jsx(x.Button,{type:j,variant:v,color:S,size:y.size||"medium",disabled:y.disabled,onClick:()=>b(y),sx:y.sx,children:y.text},k)},E=()=>{const y={display:"flex",gap:h,...m};switch(c){case"left":return{...y,justifyContent:"flex-start"};case"center":return{...y,justifyContent:"center"};case"right":return{...y,justifyContent:"flex-end"};case"space-between":return{...y,justifyContent:"space-between"};default:return{...y,justifyContent:"flex-end"}}};return u==="vertical"?l.jsx(x.Box,{sx:E(),children:s.map((y,k)=>l.jsx(x.Box,{sx:{width:"100%"},children:f(y,k)},k))}):l.jsx(x.Box,{sx:E(),children:l.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:s.map((y,k)=>f(y,k))})})},Il=(e,t)=>{const n=e==null?void 0:e.showWhen;if(n){if(typeof n=="function")try{return!!n(t||{})}catch{return!0}if(n&&typeof n=="object"){const r=n.field,i=n.equals,a=n.in,o=r?(t||{})[r]:void 0;if(r&&typeof i<"u")return o===i;if(r&&Array.isArray(a))return a.includes(o)}}return!0},Ir=(e,t)=>{const n=[];for(const r of e)if(Il(r,t)&&(n.push(r),r.type==="tabs"&&r.items)){const i=r.items||[],a=(t||{})[r.name],o=(()=>{if(typeof a=="string"||typeof a=="number"){const c=i.findIndex((u,h)=>typeof u.value=="string"||typeof u.value=="number"?u.value===a:h===a);return c>=0?c:0}return Number(a)||0})(),s=i[o]||{};Array.isArray(s.fields)&&n.push(...Ir(s.fields,t))}return n},yh=new bc({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),vh=e=>l.jsx(Ec,{client:yh,children:l.jsx(bh,{...e})}),bh=({id:e,theme:t,fields:n,onSubmit:r,onChange:i,submitButtonText:a="Submit",onSubmitClick:o,defaultValues:s,showSubmitButton:c=!0,buttons:u,buttonGroup:h,stickyButtons:m,stickyButtonsSx:d,fixedButtons:g,fixedButtonsSx:b,formCardWrap:f,formCardSx:E,formCardProps:y,baseUrl:k,apiHeaders:j,stepNavigationProps:v,testIdPrefix:S,dateFormat:P})=>{var le,ct;const z=[...new Set(n.map(O=>O.step).filter(O=>O!=null&&O>0))].sort((O,A)=>(O||0)-(A||0)),I=z.length>1,B=z.length||1,[p,R]=D.useState(1),$=I?n.filter(O=>O.step===p):n,Z=D.useCallback(O=>{const A=[];for(const F of O)if(A.push(F),F.type==="tabs"&&F.items)for(const U of F.items||[])Array.isArray(U.fields)&&A.push(...Z(U.fields));return A},[]),{control:N,handleSubmit:re,formState:{errors:V},watch:Q,setValue:W,resetField:K,trigger:C}=Ce.useForm({resolver:D.useCallback((O,A,F)=>{const J=Ir(I?$:n,O),ce=Dl(J);return nc(ce)(O,A,F)},[I,$,n]),mode:"onChange",defaultValues:s}),M=Q(),ne=D.useRef({});D.useEffect(()=>{const O=[];for(const A of n){const F=A.depends_on;F&&typeof A.name=="string"&&O.push({dependentField:A.name,dependencyName:F})}if(O.length!==0)for(const{dependentField:A,dependencyName:F}of O){const U=ne.current[F],J=M==null?void 0:M[F];if(U!==J)try{K(A)}catch{}ne.current[F]=J}},[n,M,K]);const se=D.useRef(i);D.useEffect(()=>{se.current=i},[i]);const ae=D.useMemo(()=>{try{return JSON.stringify(M)}catch{return String(Date.now())}},[M]),pe=D.useRef(null);D.useEffect(()=>{se.current&&pe.current!==ae&&(pe.current=ae,se.current(M))},[ae]);const H=async()=>{if(!I)return!0;const O=n.filter(F=>F.step===p);for(const F of O)if(typeof F.required=="function"?!!F.required(M):!!F.required){const J=M[F.name];let ce=!0;if(F.type==="checkbox"?ce=J===!0:Array.isArray(J)?ce=J.length>0:ce=J!=null&&J!=="",!ce)return!1}return await C()?!0:Object.keys(V).filter(U=>O.some(J=>J.name===U)).map(U=>{const J=V[U];return typeof(J==null?void 0:J.message)=="string"?J.message:`${U} is invalid`}).length===0},ie=D.useMemo(()=>{if(!I)return!0;const O=n.filter(F=>F.step===p);for(const F of O)if(typeof F.required=="function"?!!F.required(M):!!F.required){const J=M[F.name];let ce=!0;if(F.type==="checkbox"?ce=J===!0:Array.isArray(J)?ce=J.length>0:ce=J!=null&&J!=="",!ce)return!1}return Object.keys(V).filter(F=>O.some(U=>U.name===F)).length===0},[I,p,n,M,V]),de=D.useCallback((O,A)=>Il(O,A),[]),me=D.useCallback(O=>{const A=[];for(const F of O)if(A.push(F),F.type==="tabs"&&F.items)for(const U of F.items||[])Array.isArray(U.fields)&&A.push(...me(U.fields));return A},[]),q=D.useCallback((O,A)=>Ir(O,A),[]),G=D.useMemo(()=>{if(I)return ie;const O=Ir(n,M);for(const U of O){if(!de(U,M))continue;if(typeof U.required=="function"?!!U.required(M):!!U.required){const ce=M[U.name];let fe=!0;if(U.type==="checkbox"?fe=ce===!0:fe=ce!=null&&ce!==""&&!(Array.isArray(ce)&&ce.length===0),!fe)return!1}}const A=new Set(O.map(U=>U.name));return Object.keys(V).filter(U=>A.has(U)).length===0},[I,ie,n,M,V,q,de]),L=async O=>{O<1||O>B||O>p&&I&&!await H()||R(O)},xe=async O=>{if(I&&p<B){console.warn("Form submission attempted on non-final step");return}const F=(U=>{const J={...U||{}},ce=me(n);for(const fe of ce){if(!fe||!fe.name)continue;const Y=J[fe.name];if(fe.type==="dragdroplist"&&Array.isArray(Y)){const X=fe,ge=X.serialize;if(!ge)continue;const Fe=Y,Ae=typeof X.getId=="function"?X.getId:typeof X.getId=="string"?oe=>oe==null?void 0:oe[X.getId]:oe=>(oe==null?void 0:oe.id)??(oe==null?void 0:oe._id)??(oe==null?void 0:oe.key)??String(oe),qe=typeof X.getText=="function"?X.getText:typeof X.getText=="string"?oe=>(oe==null?void 0:oe[X.getText])??String(oe):oe=>(oe==null?void 0:oe.text)??(oe==null?void 0:oe.label)??(oe==null?void 0:oe.name)??(oe==null?void 0:oe.title)??String(oe),Ie=(()=>{if(typeof X.chipText=="function")return X.chipText;if(typeof X.chipText=="string")return(oe,tt)=>oe==null?void 0:oe[X.chipText]})();let Qe=Y;typeof ge=="function"?Qe=Fe.map((oe,tt)=>ge(oe,tt)):ge==="ids"?Qe=Fe.map(oe=>Ae(oe)):ge==="text"?Qe=Fe.map(oe=>qe(oe)):ge==="chips"?Qe=Fe.map((oe,tt)=>(typeof Ie=="function"?Ie(oe,tt):void 0)??""):ge&&typeof ge=="object"&&"field"in ge&&(Qe=Fe.map(oe=>oe==null?void 0:oe[ge.field])),J[fe.name]=Qe}}return J})(O);o&&o(F),r(F)},je=async O=>{O&&(O.preventDefault(),O.stopPropagation()),I&&p<B&&await H()&&L(p+1)},Ve=O=>{O&&(O.preventDefault(),O.stopPropagation()),I&&p>1&&L(p-1)},jt=O=>{const A=O.col??12,F=O.xs!==void 0?O.xs:12,U=O.sm!==void 0?O.sm:A,J=O.md!==void 0?O.md:A,ce=O.lg!==void 0?O.lg:J,fe=O.xl!==void 0?O.xl:ce;return{xs:F,sm:U,md:J,lg:ce,xl:fe}},Be=t?x.createTheme({palette:{primary:{main:t.primaryColor||"#1976d2"},secondary:{main:t.secondaryColor||"#dc004e"},background:{default:t.backgroundColor||"#ffffff"},text:{primary:t.textColor||"#000000"}},shape:{borderRadius:t.borderRadius||4},spacing:t.spacing||8,typography:{fontFamily:((le=t.typography)==null?void 0:le.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((ct=t.typography)==null?void 0:ct.fontSize)=="number"?t.typography.fontSize:14}}):void 0,Ke=()=>{const O=g?{position:"fixed",left:0,right:0,bottom:0,background:"#FFFFFF",pt:2,px:2,pb:2,zIndex:1300,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.08)",...b}:m?{position:"sticky",bottom:0,background:"#FFFFFF",pt:2,pb:2,zIndex:1200,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.04)",...d}:void 0;if(h&&h.buttons&&h.buttons.length>0){const A={...h,buttons:h.buttons.map(F=>{const U=(F.text||"").toLowerCase(),J=F.type==="submit"||U.includes("submit")||U.includes("save")||U.includes("finish")||U.includes("complete"),ce=U.includes("next");let fe=!1;return I?(J||ce)&&(fe=!ie):J&&(fe=!G),{...F,disabled:F.disabled||fe}})};return l.jsx(x.Box,{sx:{mt:3,...O||{}},children:l.jsx(gh,{config:A,onSubmit:xe,onStepChange:L,currentStep:p,totalSteps:B,isMultiStep:I,formData:M})})}if(u&&u.length>0){const A=u.map(F=>{const U=(F.text||"").toLowerCase(),J=F.type==="submit"||U.includes("submit")||U.includes("save")||U.includes("finish")||U.includes("complete"),ce=U.includes("next");let fe=!1;return I?(J||ce)&&(fe=!ie):J&&(fe=!G),{...F,disabled:F.disabled||fe}});return l.jsx(x.Box,{sx:O,children:l.jsx(Ml,{buttons:A,testIdPrefix:S})})}return c?l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end",...O||{}},children:l.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[I&&p>1&&l.jsx(x.Button,{type:"button",variant:"outlined",onClick:Ve,children:"Previous"}),I?p<B?l.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!ie,onClick:je,children:"Next"}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!ie,children:a}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!G,"data-testid":S?`${S}-submit`:void 0,children:a})]})}):null},mt=D.useMemo(()=>{const O=[];let A=[];for(const F of $)F.type==="section"&&A.length>0?(O.push(A),A=[F]):A.push(F);return A.length>0&&O.push(A),O},[$]),et=l.jsxs(x.Box,{component:"form",onSubmit:O=>{if(I&&p<B){O.preventDefault(),O.stopPropagation(),ie&&je();return}re(xe)(O)},id:e,onKeyDown:O=>{O.key==="Enter"&&I&&p<B&&(O.preventDefault(),ie&&je())},sx:{pb:g?10:void 0},children:[I&&l.jsx(_l,{currentStep:p,totalSteps:B,onStepChange:L,stepTitles:v==null?void 0:v.stepTitles,showStepTitles:(v==null?void 0:v.showStepTitles)!==!1}),mt.map((O,A)=>{const F=O.find(Y=>Y.type==="section");if(F&&!de(F,M))return null;const U=(F==null?void 0:F.cardWrap)!==!1,J={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},ce={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},fe=l.jsx(l.Fragment,{children:O.map(Y=>{if(!de(Y,M))return null;const X=jt(Y);return l.jsx(x.Box,{sx:{gridColumn:{xs:`span ${X.xs}`,sm:`span ${X.sm}`,md:`span ${X.md}`,lg:`span ${X.lg}`,xl:`span ${X.xl}`}},children:l.jsx(Aa,{field:Y,control:N,errors:V,baseUrl:k,apiHeaders:j,formData:M,setValue:W,testIdPrefix:S,dateFormat:P})},Y.name)})});return U?l.jsx(x.Card,{sx:{...J,...(F==null?void 0:F.cardSx)||{}},...(F==null?void 0:F.cardProps)||{},children:fe},`group-${A}`):l.jsx(x.Box,{sx:ce,children:fe},`group-${A}`)}),Ke()]}),kt=f?l.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...E},...y,children:et}):et;return Be?l.jsx(x.ThemeProvider,{theme:Be,children:kt}):kt},wh=({src:e,alt:t,width:n="100%",height:r="auto",style:i,className:a,onClick:o})=>l.jsx(x.Box,{sx:{textAlign:"center"},children:l.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:n,height:r,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:o?"pointer":"default",...i},className:a,onClick:o,onError:s=>{s.currentTarget.src="/placeholder-image.png"}})});function Tn(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(h){try{u(r.next(h))}catch(m){o(m)}}function c(h){try{u(r.throw(h))}catch(m){o(m)}}function u(h){h.done?a(h.value):i(h.value).then(s,c)}u((r=r.apply(e,t||[])).next())})}const Sh=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 Qn(e,t,n){const r=Ch(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&Ko(r,"path",a),Ko(r,"relativePath",a),r}function Ch(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=Sh.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Ko(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Th=[".DS_Store","Thumbs.db"];function Eh(e){return Tn(this,void 0,void 0,function*(){return Xr(e)&&jh(e.dataTransfer)?Ah(e.dataTransfer,e.type):kh(e)?Oh(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Fh(e):[]})}function jh(e){return Xr(e)}function kh(e){return Xr(e)&&Xr(e.target)}function Xr(e){return typeof e=="object"&&e!==null}function Oh(e){return ra(e.target.files).map(t=>Qn(t))}function Fh(e){return Tn(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Qn(n))})}function Ah(e,t){return Tn(this,void 0,void 0,function*(){if(e.items){const n=ra(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map($h));return Qo(zl(r))}return Qo(ra(e.files).map(n=>Qn(n)))})}function Qo(e){return e.filter(t=>Th.indexOf(t.name)===-1)}function ra(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function $h(e){if(typeof e.webkitGetAsEntry!="function")return Go(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Bl(t):Go(e,t)}function zl(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?zl(n):[n]],[])}function Go(e,t){return Tn(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const o=yield a.getFile();return o.handle=a,Qn(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Qn(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function Rh(e){return Tn(this,void 0,void 0,function*(){return e.isDirectory?Bl(e):Ph(e)})}function Bl(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function a(){t.readEntries(o=>Tn(this,void 0,void 0,function*(){if(o.length){const s=Promise.all(o.map(Rh));i.push(s),a()}else try{const s=yield Promise.all(i);n(s)}catch(s){r(s)}}),o=>{r(o)})}a()})}function Ph(e){return Tn(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=Qn(r,e.fullPath);t(i)},r=>{n(r)})})})}var Or={},Zo;function Dh(){return Zo||(Zo=1,Or.__esModule=!0,Or.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}),Or}var _h=Dh();const Ai=pa(_h);function Xo(e){return zh(e)||Ih(e)||Ll(e)||Mh()}function Mh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
180
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ih(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zh(e){if(Array.isArray(e))return ia(e)}function Jo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function es(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jo(Object(n),!0).forEach(function(r){Nl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jo(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cr(e,t){return Lh(e)||Nh(e,t)||Ll(e,t)||Bh()}function Bh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
181
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ll(e,t){if(e){if(typeof e=="string")return ia(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ia(e,t)}}function ia(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nh(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Lh(e){if(Array.isArray(e))return e}var Vh=typeof Ai=="function"?Ai:Ai.default,qh="file-invalid-type",Wh="file-too-large",Uh="file-too-small",Hh="too-many-files",Yh=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:qh,message:"File type must be ".concat(r)}},ts=function(t){return{code:Wh,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ns=function(t){return{code:Uh,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Kh={code:Hh,message:"Too many files"};function Vl(e,t){var n=e.type==="application/x-moz-file"||Vh(e,t);return[n,n?null:Yh(t)]}function ql(e,t,n){if(sn(e.size))if(sn(t)&&sn(n)){if(e.size>n)return[!1,ts(n)];if(e.size<t)return[!1,ns(t)]}else{if(sn(t)&&e.size<t)return[!1,ns(t)];if(sn(n)&&e.size>n)return[!1,ts(n)]}return[!0,null]}function sn(e){return e!=null}function Qh(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(c){var u=Vl(c,n),h=cr(u,1),m=h[0],d=ql(c,r,i),g=cr(d,1),b=g[0],f=s?s(c):null;return m&&b&&!f})}function Jr(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Fr(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 rs(e){e.preventDefault()}function Gh(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Zh(e){return e.indexOf("Edge/")!==-1}function Xh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Gh(e)||Zh(e)}function bt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!Jr(r)&&s&&s.apply(void 0,[r].concat(a)),Jr(r)})}}function Jh(){return"showOpenFilePicker"in window}function em(e){if(sn(e)){var t=Object.entries(e).filter(function(n){var r=cr(n,2),i=r[0],a=r[1],o=!0;return Wl(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(Ul))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=cr(r,2),a=i[0],o=i[1];return es(es({},n),{},Nl({},a,o))},{});return[{description:"Files",accept:t}]}return e}function tm(e){if(sn(e))return Object.entries(e).reduce(function(t,n){var r=cr(n,2),i=r[0],a=r[1];return[].concat(Xo(t),[i],Xo(a))},[]).filter(function(t){return Wl(t)||Ul(t)}).join(",")}function nm(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function rm(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Wl(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Ul(e){return/^.*\.[\w]+$/.test(e)}var im=["children"],am=["open"],om=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],sm=["refKey","onChange","onClick"];function lm(e){return pm(e)||um(e)||Hl(e)||cm()}function cm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
182
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function um(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pm(e){if(Array.isArray(e))return aa(e)}function $i(e,t){return hm(e)||fm(e,t)||Hl(e,t)||dm()}function dm(){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 Hl(e,t){if(e){if(typeof e=="string")return aa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aa(e,t)}}function aa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fm(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function hm(e){if(Array.isArray(e))return e}function is(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?is(Object(n),!0).forEach(function(r){oa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):is(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ei(e,t){if(e==null)return{};var n=mm(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mm(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Pa=D.forwardRef(function(e,t){var n=e.children,r=ei(e,im),i=Kl(r),a=i.open,o=ei(i,am);return D.useImperativeHandle(t,function(){return{open:a}},[a]),D.createElement(D.Fragment,null,n(Re(Re({},o),{},{open:a})))});Pa.displayName="Dropzone";var Yl={disabled:!1,getFilesFromEvent:Eh,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};Pa.defaultProps=Yl;Pa.propTypes={children:w.func,accept:w.objectOf(w.arrayOf(w.string)),multiple:w.bool,preventDropOnDocument:w.bool,noClick:w.bool,noKeyboard:w.bool,noDrag:w.bool,noDragEventsBubbling:w.bool,minSize:w.number,maxSize:w.number,maxFiles:w.number,disabled:w.bool,getFilesFromEvent:w.func,onFileDialogCancel:w.func,onFileDialogOpen:w.func,useFsAccessApi:w.bool,autoFocus:w.bool,onDragEnter:w.func,onDragLeave:w.func,onDragOver:w.func,onDrop:w.func,onDropAccepted:w.func,onDropRejected:w.func,onError:w.func,validator:w.func};var sa={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Kl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Re(Re({},Yl),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,c=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,d=t.onDrop,g=t.onDropAccepted,b=t.onDropRejected,f=t.onFileDialogCancel,E=t.onFileDialogOpen,y=t.useFsAccessApi,k=t.autoFocus,j=t.preventDropOnDocument,v=t.noClick,S=t.noKeyboard,P=t.noDrag,z=t.noDragEventsBubbling,I=t.onError,B=t.validator,p=D.useMemo(function(){return tm(n)},[n]),R=D.useMemo(function(){return em(n)},[n]),$=D.useMemo(function(){return typeof E=="function"?E:as},[E]),Z=D.useMemo(function(){return typeof f=="function"?f:as},[f]),N=D.useRef(null),re=D.useRef(null),V=D.useReducer(xm,sa),Q=$i(V,2),W=Q[0],K=Q[1],C=W.isFocused,M=W.isFileDialogActive,ne=D.useRef(typeof window<"u"&&window.isSecureContext&&y&&Jh()),se=function(){!ne.current&&M&&setTimeout(function(){if(re.current){var A=re.current.files;A.length||(K({type:"closeDialog"}),Z())}},300)};D.useEffect(function(){return window.addEventListener("focus",se,!1),function(){window.removeEventListener("focus",se,!1)}},[re,M,Z,ne]);var ae=D.useRef([]),pe=function(A){N.current&&N.current.contains(A.target)||(A.preventDefault(),ae.current=[])};D.useEffect(function(){return j&&(document.addEventListener("dragover",rs,!1),document.addEventListener("drop",pe,!1)),function(){j&&(document.removeEventListener("dragover",rs),document.removeEventListener("drop",pe))}},[N,j]),D.useEffect(function(){return!r&&k&&N.current&&N.current.focus(),function(){}},[N,k,r]);var H=D.useCallback(function(O){I?I(O):console.error(O)},[I]),ie=D.useCallback(function(O){O.preventDefault(),O.persist(),et(O),ae.current=[].concat(lm(ae.current),[O.target]),Fr(O)&&Promise.resolve(i(O)).then(function(A){if(!(Jr(O)&&!z)){var F=A.length,U=F>0&&Qh({files:A,accept:p,minSize:o,maxSize:a,multiple:s,maxFiles:c,validator:B}),J=F>0&&!U;K({isDragAccept:U,isDragReject:J,isDragActive:!0,type:"setDraggedFiles"}),u&&u(O)}}).catch(function(A){return H(A)})},[i,u,H,z,p,o,a,s,c,B]),de=D.useCallback(function(O){O.preventDefault(),O.persist(),et(O);var A=Fr(O);if(A&&O.dataTransfer)try{O.dataTransfer.dropEffect="copy"}catch{}return A&&m&&m(O),!1},[m,z]),me=D.useCallback(function(O){O.preventDefault(),O.persist(),et(O);var A=ae.current.filter(function(U){return N.current&&N.current.contains(U)}),F=A.indexOf(O.target);F!==-1&&A.splice(F,1),ae.current=A,!(A.length>0)&&(K({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Fr(O)&&h&&h(O))},[N,h,z]),q=D.useCallback(function(O,A){var F=[],U=[];O.forEach(function(J){var ce=Vl(J,p),fe=$i(ce,2),Y=fe[0],X=fe[1],ge=ql(J,o,a),Fe=$i(ge,2),Ae=Fe[0],qe=Fe[1],Ie=B?B(J):null;if(Y&&Ae&&!Ie)F.push(J);else{var Qe=[X,qe];Ie&&(Qe=Qe.concat(Ie)),U.push({file:J,errors:Qe.filter(function(oe){return oe})})}}),(!s&&F.length>1||s&&c>=1&&F.length>c)&&(F.forEach(function(J){U.push({file:J,errors:[Kh]})}),F.splice(0)),K({acceptedFiles:F,fileRejections:U,isDragReject:U.length>0,type:"setFiles"}),d&&d(F,U,A),U.length>0&&b&&b(U,A),F.length>0&&g&&g(F,A)},[K,s,p,o,a,c,d,g,b,B]),G=D.useCallback(function(O){O.preventDefault(),O.persist(),et(O),ae.current=[],Fr(O)&&Promise.resolve(i(O)).then(function(A){Jr(O)&&!z||q(A,O)}).catch(function(A){return H(A)}),K({type:"reset"})},[i,q,H,z]),L=D.useCallback(function(){if(ne.current){K({type:"openDialog"}),$();var O={multiple:s,types:R};window.showOpenFilePicker(O).then(function(A){return i(A)}).then(function(A){q(A,null),K({type:"closeDialog"})}).catch(function(A){nm(A)?(Z(A),K({type:"closeDialog"})):rm(A)?(ne.current=!1,re.current?(re.current.value=null,re.current.click()):H(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."))):H(A)});return}re.current&&(K({type:"openDialog"}),$(),re.current.value=null,re.current.click())},[K,$,Z,y,q,H,R,s]),xe=D.useCallback(function(O){!N.current||!N.current.isEqualNode(O.target)||(O.key===" "||O.key==="Enter"||O.keyCode===32||O.keyCode===13)&&(O.preventDefault(),L())},[N,L]),je=D.useCallback(function(){K({type:"focus"})},[]),Ve=D.useCallback(function(){K({type:"blur"})},[]),jt=D.useCallback(function(){v||(Xh()?setTimeout(L,0):L())},[v,L]),Be=function(A){return r?null:A},Ke=function(A){return S?null:Be(A)},mt=function(A){return P?null:Be(A)},et=function(A){z&&A.stopPropagation()},kt=D.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=O.refKey,F=A===void 0?"ref":A,U=O.role,J=O.onKeyDown,ce=O.onFocus,fe=O.onBlur,Y=O.onClick,X=O.onDragEnter,ge=O.onDragOver,Fe=O.onDragLeave,Ae=O.onDrop,qe=ei(O,om);return Re(Re(oa({onKeyDown:Ke(bt(J,xe)),onFocus:Ke(bt(ce,je)),onBlur:Ke(bt(fe,Ve)),onClick:Be(bt(Y,jt)),onDragEnter:mt(bt(X,ie)),onDragOver:mt(bt(ge,de)),onDragLeave:mt(bt(Fe,me)),onDrop:mt(bt(Ae,G)),role:typeof U=="string"&&U!==""?U:"presentation"},F,N),!r&&!S?{tabIndex:0}:{}),qe)}},[N,xe,je,Ve,jt,ie,de,me,G,S,P,r]),le=D.useCallback(function(O){O.stopPropagation()},[]),ct=D.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=O.refKey,F=A===void 0?"ref":A,U=O.onChange,J=O.onClick,ce=ei(O,sm),fe=oa({accept:p,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Be(bt(U,G)),onClick:Be(bt(J,le)),tabIndex:-1},F,re);return Re(Re({},fe),ce)}},[re,n,s,G,r]);return Re(Re({},W),{},{isFocused:C&&!r,getRootProps:kt,getInputProps:ct,rootRef:N,inputRef:re,open:Be(L)})}function xm(e,t){switch(t.type){case"focus":return Re(Re({},e),{},{isFocused:!0});case"blur":return Re(Re({},e),{},{isFocused:!1});case"openDialog":return Re(Re({},sa),{},{isFileDialogActive:!0});case"closeDialog":return Re(Re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Re(Re({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Re(Re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Re({},sa);default:return e}}function as(){}const gm=Ye(l.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),os=Ye(l.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),ym=Ye(l.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),Ql=({file:e,onRemove:t})=>{const n=()=>e.file.type.startsWith("image/")?l.jsx(ym,{}):e.file.type.includes("pdf")?l.jsx(os,{}):l.jsx(os,{}),r=()=>{switch(e.status){case"success":return l.jsx(gm,{color:"success"});case"uploading":return l.jsx(x.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const o=1024,s=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(a)/Math.log(o));return parseFloat((a/Math.pow(o,c)).toFixed(2))+" "+s[c]};return l.jsxs(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[n(),r()]}),l.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[l.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),l.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),l.jsx(x.Tooltip,{title:"Remove file",children:l.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:l.jsx(hl,{})})})]})},vm=({config:e,value:t=[],onChange:n,onSubmit:r,disabled:i=!1,className:a,style:o,title:s,subtitle:c,buttonText:u,fileSupportedText:h})=>{const[m,d]=D.useState(t),[g,b]=D.useState([]),[f,E]=D.useState(!1),[y,k]=D.useState(!1),[j,v]=D.useState([]),S=D.useRef(null);D.useEffect(()=>{d(t)},[t]);const P=D.useCallback(N=>{var V,Q;return((V=e==null?void 0:e.fileTypes)==null?void 0:V.some(W=>{if(W.includes("*")){const K=W.split("/")[0];return N.type.startsWith(K)}return N.type===W}))?e!=null&&e.maxSize&&N.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${N.type} is not allowed. Allowed types: ${(Q=e==null?void 0:e.fileTypes)==null?void 0:Q.join(", ")}`},[e]),z=D.useCallback(async N=>{console.log("handleFiles called with:",N.length,"files"),E(!0);const re=[],V=[];try{for(const W of N){let K=null;if(e!=null&&e.multiple&&m.some(M=>M.file.name===W.name&&M.file.size===W.size&&M.file.lastModified===W.lastModified)){V.push(`${W.name}: File already exists`);continue}if(K=P(W),!K&&(e!=null&&e.customValidation))try{const C=e.customValidation(W);C instanceof Promise?K=await C:K=C}catch(C){K=`Custom validation failed: ${C instanceof Error?C.message:"Unknown error"}`}if(K)V.push(`${W.name}: ${K}`);else{const C={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:W,preview:W.type.startsWith("image/")?URL.createObjectURL(W):void 0,progress:0,status:"pending",uploadedAt:new Date};re.push(C)}}const Q=e!=null&&e.multiple?[...m,...re]:re;d(Q),n==null||n(Q),V.length>0?(v(V),b(V)):(v([]),b([]))}catch(Q){const W=`Unexpected error: ${Q instanceof Error?Q.message:"Unknown error"}`;v([W]),b([W])}},[m,e==null?void 0:e.multiple,P,e==null?void 0:e.customValidation,n]),I=D.useCallback(N=>{E(!0);const re=m.filter(V=>V.id!==N);d(re),n==null||n(re),v([]),S.current&&(S.current.value="")},[m,n]),B=D.useCallback(()=>{if(e!=null&&e.required&&m.length===0){b([`${e.title} is required`]);return}v([]),k(!0);const N=m.filter(re=>re.status!=="error");r==null||r(N)},[m,r,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:p,getInputProps:R,isDragActive:$}=Kl({onDrop:z,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});D.useEffect(()=>{if(!f)return;const N=[],re=[...j,...N];re.length>0?b(re):b([])},[m,e==null?void 0:e.required,e==null?void 0:e.title,f,y,j]);const Z=()=>{var N;switch(((N=e==null?void 0:e.submitButton)==null?void 0:N.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return l.jsxs(x.Box,{className:a,style:o,children:[l.jsxs(x.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&l.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&l.jsx(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),D.createElement(x.Card,{...p(),key:`dropzone-${m.length}`,sx:{border:"1px dashed",borderColor:$?"primary.main":"#CCCCCC",backgroundColor:$?"action.hover":"#F5F5F5",boxShadow:"none",p:3,textAlign:"center",cursor:i?"not-allowed":"pointer",transition:"all 0.2s ease","&:hover":{borderColor:i?"grey.300":"primary.main",backgroundColor:i?"background.paper":"action.hover"}}},l.jsx("input",{...R(),ref:S}),l.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:l.jsx(Hr,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:s}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:c}),l.jsx(x.Button,{onClick:()=>{var N;return(N=S.current)==null?void 0:N.click()},sx:{my:2},startIcon:l.jsx(Hr,{}),variant:"contained",children:u}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:h})),g.length>0&&l.jsx(x.Alert,{severity:"error",sx:{mt:2},children:g.map((N,re)=>l.jsx(x.Typography,{variant:"body2",children:N},re))}),m.length>0&&l.jsxs(x.Box,{sx:{mt:2},children:[l.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",m.length,")"]}),m.map(N=>l.jsx(Ql,{file:N,onRemove:I},N.id))]}),(e==null?void 0:e.helperText)&&l.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:Z()},children:l.jsx(x.Button,{variant:"contained",onClick:B,disabled:i||e.submitButton.disabled||m.length===0,startIcon:e.submitButton.loading?l.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Ml;exports.DEFAULT_DATE_FORMAT=Kr;exports.DocumentUpload=vm;exports.FINFLOW_FRONTEND_DEFAULT_PRIMARY=tl;exports.FieldRenderer=Aa;exports.FilePreview=Ql;exports.FinAutocomplete=al;exports.FinCheckbox=_t;exports.FinCheckboxGroup=ol;exports.FinChip=Oa;exports.FinCustomizedVerticalStepper=$f;exports.FinDateField=ka;exports.FinDragDropList=ul;exports.FinEditableGrid=dl;exports.FinForm=vh;exports.FinInfoCard=Pf;exports.FinListCards=fl;exports.FinMobileField=il;exports.FinPhaseCard=Mf;exports.FinRadioGroup=cn;exports.FinSelect=di;exports.FinSwitch=Yr;exports.FinTabs=pl;exports.FinTextField=rt;exports.FinTextarea=sl;exports.FinUiHeader=ll;exports.FinVerticalStepper=Ff;exports.ImageComponent=wh;exports.StepNavigation=_l;exports.brand=Sf;exports.buildFinformTestIds=ml;exports.createFinflowFrontendMirrorTheme=Ef;exports.createNeutralToneScale=el;exports.dateFormatToPlaceholder=ja;exports.digitsOnly=It;exports.fetchApiData=gl;exports.finflowPalette=he;exports.generateSchema=Dl;exports.getApiConfig=Fa;exports.hasApiConfig=on;exports.neutral=Pr;exports.normalizeDialCode=Dt;exports.normalizePhoneToStoreFormat=Dr;exports.parsePhoneDisplayParts=rl;exports.parseStoreFormat=nl;exports.primary=bf;exports.resolveFieldTestIds=xl;exports.secondary=wf;exports.shouldShowField=If;exports.useApiData=yl;exports.useFinInputTokens=Zn;exports.validatePhone=kf;