@applica-software-guru/react-admin 1.5.297 → 1.5.298
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/.gitattributes +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +1 -1
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.es.js +37 -35
- package/dist/react-admin.es.js.gz +0 -0
- package/dist/react-admin.umd.js +1 -1
- package/dist/react-admin.umd.js.gz +0 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
package/dist/react-admin.cjs.js
CHANGED
|
@@ -213,5 +213,5 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
213
213
|
|
|
214
214
|
attempted value: ${a}
|
|
215
215
|
`+(c!==a?`result of cast: ${c}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,s)=>s.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:s,originalValue:a=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:s,value:u,originalValue:a,options:n,tests:d},r,h=>{if(h.length)return o(h,u);this.runTests({path:s,value:u,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:s,value:a,originalValue:c,path:u,options:d}=t,h=C=>{o||(o=!0,n(C,a))},g=C=>{o||(o=!0,r(C,a))},m=s.length,v=[];if(!m)return g([]);let y={value:a,originalValue:c,path:u,options:d,schema:this};for(let C=0;C<s.length;C++){const w=s[C];w(y,h,function(M){M&&(Array.isArray(M)?v.push(...M):v.push(M)),--m<=0&&g(v)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:s,options:a}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const h=Object.assign({},a,{strict:!0,parent:r,value:d,originalValue:s[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${o||""}[${u?c:`"${c}"`}]`:(o?`${o}.`:"")+t});return(g,m,v)=>this.resolve(h)._validate(d,h,m,v)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,c)=>o._validate(t,n,(u,d)=>{Sn.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new Sn(u,d,void 0,void 0,s)):a(d)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),s,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw Sn.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new Sn(c,t,void 0,void 0,a);s=u}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Sn.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Sn.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):As(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=as({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=as({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Fr.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Fr.notNull){return this.nullability(!1,t)}required(t=Fr.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=Fr.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=as(n),s=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(a=>!(a.OPTIONS.name===n.name&&(s||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=M2(t).map(s=>new Ni(s));return o.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Gu(o,n):Gu.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=as({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=Fr.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=as({message:n,name:"oneOf",skipAbsent:!0,test(o){let s=this.schema._whitelist,a=s.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:a}})}}),r}notOneOf(t,n=Fr.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=as({message:n,name:"notOneOf",test(o){let s=this.schema._blacklist,a=s.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(s).join(", "),resolved:a}}):!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:o,optional:s,nullable:a}=n.spec;return{meta:o,label:r,optional:s,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,h)=>h.findIndex(g=>g.name===u.name)===d)}}}hr.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])hr.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:s,schema:a}=RZ(this,t,n,r.context);return a[e](o&&o[s],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])hr.prototype[e]=hr.prototype.oneOf;for(const e of["not","nope"])hr.prototype[e]=hr.prototype.notOneOf;const MZ=()=>!0;function D2(e){return new _2(e)}class _2 extends hr{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:MZ},t))}}D2.prototype=_2.prototype;const kZ=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function FZ(e){const t=Zh(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 Zh(e){var t,n;const r=kZ.exec(e);return r?{year:ro(r[1]),month:ro(r[2],1)-1,day:ro(r[3],1),hour:ro(r[4]),minute:ro(r[5]),second:ro(r[6]),millisecond:r[7]?ro(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:ro(r[10]),minuteOffset:ro(r[11])}:null}function ro(e,t=0){return Number(e)||t}let LZ=/^[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])?)*$/,DZ=/^((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,_Z=/^(?:[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,BZ="^\\d{4}-\\d{2}-\\d{2}",NZ="\\d{2}:\\d{2}:\\d{2}",VZ="(([+-]\\d{2}(:?\\d{2})?)|Z)",WZ=new RegExp(`${BZ}T${NZ}(\\.\\d+)?${VZ}$`),$Z=e=>ao(e)||e===e.trim(),zZ={}.toString();function lo(){return new B2}class B2 extends hr{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 o=t!=null&&t.toString?t.toString():t;return o===zZ?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Fr.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=An.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=An.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=An.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,o,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:s}=n:o=n),this.test({name:s||"matches",message:o||An.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=An.email){return this.matches(LZ,{name:"email",message:t,excludeEmptyString:!0})}url(t=An.url){return this.matches(DZ,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=An.uuid){return this.matches(_Z,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(WZ,{name:"datetime",message:n||An.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||An.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const a=Zh(s);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||An.datetime_precision,params:{precision:o},skipAbsent:!0,test:s=>{if(!s||o==null)return!0;const a=Zh(s);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=An.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:$Z})}lowercase(t=An.lowercase){return this.transform(n=>ao(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ao(n)||n===n.toLowerCase()})}uppercase(t=An.uppercase){return this.transform(n=>ao(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ao(n)||n===n.toUpperCase()})}}lo.prototype=B2.prototype;let UZ=e=>e!=+e;function N2(){return new V2}class V2 extends hr{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!UZ(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=ko.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=ko.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=ko.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=ko.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=ko.positive){return this.moreThan(0,t)}negative(t=ko.negative){return this.lessThan(0,t)}integer(t=ko.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>ao(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(o=>ao(o)?o:Math[t](o))}}N2.prototype=V2.prototype;let HZ=new Date(""),GZ=e=>Object.prototype.toString.call(e)==="[object Date]";class Hd extends hr{constructor(){super({type:"date",check(t){return GZ(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=FZ(t),isNaN(t)?Hd.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Ni.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=Kh.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=Kh.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}Hd.INVALID_DATE=HZ;Hd.prototype;function qZ(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,c])=>`${a}-${c}`));function s(a,c){let u=Pi.split(a)[0];r.add(u),o.has(`${c}-${u}`)||n.push([c,u])}for(const a of Object.keys(e)){let c=e[a];r.add(a),Ni.isRef(c)&&c.isSibling?s(c.path,a):o0(c)&&"deps"in c&&c.deps.forEach(u=>s(u,a))}return xZ.array(Array.from(r),n).reverse()}function dC(e,t){let n=1/0;return e.some((r,o)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=o,!0}),n}function W2(e){return(t,n)=>dC(e,t)-dC(e,n)}const YZ=(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 uu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=uu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=uu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(uu)}):"optional"in e?e.optional():e}const KZ=(e,t)=>{const n=[...Pi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=Pi.getter(Pi.join(n),!0)(e);return!!(o&&r in o)};let fC=e=>Object.prototype.toString.call(e)==="[object Object]";function XZ(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const ZZ=W2([]);function i0(e){return new $2(e)}class $2 extends hr{constructor(t){super({type:"object",check(n){return fC(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=ZZ,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let s=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(o).filter(g=>!this._nodes.includes(g))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),h=!1;for(const g of c){let m=s[g],v=g in o;if(m){let y,C=o[g];d.path=(n.path?`${n.path}.`:"")+g,m=m.resolve({value:C,context:n.context,parent:u});let w=m instanceof hr?m.spec:void 0,E=w==null?void 0:w.strict;if(w!=null&&w.strip){h=h||g in o;continue}y=!n.__validating||!E?m.cast(o[g],d):o[g],y!==void 0&&(u[g]=y)}else v&&!a&&(u[g]=o[g]);(v!==g in u||u[g]!==o[g])&&(h=!0)}return h?u:o}_validate(t,n={},r,o){let{from:s=[],originalValue:a=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:a},...s],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(u,d)=>{if(!c||!fC(d)){o(u,d);return}a=a||d;let h=[];for(let g of this._nodes){let m=this.fields[g];!m||Ni.isRef(m)||h.push(m.asNestedTest({options:n,key:g,parent:d,parentPath:n.path,originalParent:a}))}this.runTests({tests:h,value:d,originalValue:a,options:n},r,g=>{o(g.sort(this._sortErrors).concat(u),d)})})}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[o,s]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?s:a}return n.withMutation(o=>o.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 o;const s=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=qZ(t,n),r._sortErrors=W2(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}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 uu(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,o])=>t.includes(r)&&t.includes(o)))}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 o=Pi.getter(t,!0);return this.transform(s=>{if(!s)return s;let a=s;return KZ(s,t)&&(a=Object.assign({},s),r||delete a[t],a[n]=o(s)),a})}json(){return this.transform(YZ)}noUnknown(t=!0,n=Xh.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const s=XZ(this.schema,o);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Xh.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(Qp.camelCase)}snakeCase(){return this.transformKeys(Qp.snakeCase)}constantCase(){return this.transformKeys(t=>Qp.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,a]of Object.entries(n.fields)){var o;let c=t;(o=c)!=null&&o.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[s]})),r.fields[s]=a.describe(c)}return r}}i0.prototype=$2.prototype;const pC=D2().test("function","Invalid function",e=>Z.isFunction(e));var Lo,Ei,Fa;class z2{constructor(){to(this,Ei);to(this,Lo,[])}get(t){if(lo().required().validateSync(t),wa(this,Ei,Fa).call(this)){const n=localStorage.getItem(t);return Z.isNil(n)?null:JSON.parse(n)}else return null}set(t,n){return lo().required().validateSync(t),wa(this,Ei,Fa).call(this)?(localStorage.setItem(t,JSON.stringify(n)),n):null}watch(t,n){lo().required().validateSync(t),pC.validateSync(n),wa(this,Ei,Fa).call(this)&&(Cn(this,Lo).push({key:t,callback:n}),window.addEventListener("storage",r=>{r.storageArea===localStorage&&r.key===t&&n(this.get(t))}))}unwatch(t,n){lo().required().validateSync(t),pC.optional().default(Z.identity).validateSync(n),wa(this,Ei,Fa).call(this)&&(n!==void 0?Io(this,Lo,Z.reject(Cn(this,Lo),r=>r.key===t&&r.callback===n)):Io(this,Lo,Z.reject(Cn(this,Lo),r=>r.key===t)))}}Lo=new WeakMap,Ei=new WeakSet,Fa=function(){return typeof window<"u"};function Yu(e={},t=[],n={}){const{isEmpty:r=Z.isEmpty}=n;return!Z.some(t,o=>r((e??{})[o.locale]))}function U2(e={},t=[],n={}){const{isEmpty:r=Z.isEmpty}=n;return Z.some(t,o=>!r((e??{})[o.locale]))}function s0(e,t,n){if(!Z.isPlainObject(e)||t===void 0)return;const r=Z.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let s=e[String(t)];if(s===void 0&&o){const a=Z.isArray(r.fallbackLocales)&&!Z.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];s=Z.chain(a).map(c=>e[String(c)]).reject(Z.isUndefined).first().value(),s===void 0&&(s=Z.chain(e).values().first().value())}return s}function Gd(e=[],t){const n=Z.isArray(e)?e:[e],r=Z.filter(n,o=>T.isValidElement(o));Z.each(r,o=>{var s;t(o),Gd(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}var H2={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Tn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",a="second",c="minute",u="hour",d="day",h="week",g="month",m="quarter",v="year",y="date",C="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(X){var K=["th","st","nd","rd"],W=X%100;return"["+X+(K[(W-20)%10]||K[W]||K[0])+"]"}},I=function(X,K,W){var te=String(X);return!te||te.length>=K?X:""+Array(K+1-te.length).join(W)+X},j={s:I,z:function(X){var K=-X.utcOffset(),W=Math.abs(K),te=Math.floor(W/60),V=W%60;return(K<=0?"+":"-")+I(te,2,"0")+":"+I(V,2,"0")},m:function X(K,W){if(K.date()<W.date())return-X(W,K);var te=12*(W.year()-K.year())+(W.month()-K.month()),V=K.clone().add(te,g),ee=W-V<0,N=K.clone().add(te+(ee?-1:1),g);return+(-(te+(W-V)/(ee?V-N:N-V))||0)},a:function(X){return X<0?Math.ceil(X)||0:Math.floor(X)},p:function(X){return{M:g,y:v,w:h,d,D:y,h:u,m:c,s:a,ms:s,Q:m}[X]||String(X||"").toLowerCase().replace(/s$/,"")},u:function(X){return X===void 0}},O="en",F={};F[O]=M;var k="$isDayjsObject",$=function(X){return X instanceof se||!(!X||!X[k])},G=function X(K,W,te){var V;if(!K)return O;if(typeof K=="string"){var ee=K.toLowerCase();F[ee]&&(V=ee),W&&(F[ee]=W,V=ee);var N=K.split("-");if(!V&&N.length>1)return X(N[0])}else{var q=K.name;F[q]=K,V=q}return!te&&V&&(O=V),V||!te&&O},Q=function(X,K){if($(X))return X.clone();var W=typeof K=="object"?K:{};return W.date=X,W.args=arguments,new se(W)},U=j;U.l=G,U.i=$,U.w=function(X,K){return Q(X,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var se=function(){function X(W){this.$L=G(W.locale,null,!0),this.parse(W),this.$x=this.$x||W.x||{},this[k]=!0}var K=X.prototype;return K.parse=function(W){this.$d=function(te){var V=te.date,ee=te.utc;if(V===null)return new Date(NaN);if(U.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var N=V.match(w);if(N){var q=N[2]-1||0,ce=(N[7]||"0").substring(0,3);return ee?new Date(Date.UTC(N[1],q,N[3]||1,N[4]||0,N[5]||0,N[6]||0,ce)):new Date(N[1],q,N[3]||1,N[4]||0,N[5]||0,N[6]||0,ce)}}return new Date(V)}(W),this.init()},K.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},K.$utils=function(){return U},K.isValid=function(){return this.$d.toString()!==C},K.isSame=function(W,te){var V=Q(W);return this.startOf(te)<=V&&V<=this.endOf(te)},K.isAfter=function(W,te){return Q(W)<this.startOf(te)},K.isBefore=function(W,te){return this.endOf(te)<Q(W)},K.$g=function(W,te,V){return U.u(W)?this[te]:this.set(V,W)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(W,te){var V=this,ee=!!U.u(te)||te,N=U.p(W),q=function(ye,Ce){var Ee=U.w(V.$u?Date.UTC(V.$y,Ce,ye):new Date(V.$y,Ce,ye),V);return ee?Ee:Ee.endOf(d)},ce=function(ye,Ce){return U.w(V.toDate()[ye].apply(V.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(Ce)),V)},pe=this.$W,fe=this.$M,he=this.$D,me="set"+(this.$u?"UTC":"");switch(N){case v:return ee?q(1,0):q(31,11);case g:return ee?q(1,fe):q(0,fe+1);case h:var Ae=this.$locale().weekStart||0,xe=(pe<Ae?pe+7:pe)-Ae;return q(ee?he-xe:he+(6-xe),fe);case d:case y:return ce(me+"Hours",0);case u:return ce(me+"Minutes",1);case c:return ce(me+"Seconds",2);case a:return ce(me+"Milliseconds",3);default:return this.clone()}},K.endOf=function(W){return this.startOf(W,!1)},K.$set=function(W,te){var V,ee=U.p(W),N="set"+(this.$u?"UTC":""),q=(V={},V[d]=N+"Date",V[y]=N+"Date",V[g]=N+"Month",V[v]=N+"FullYear",V[u]=N+"Hours",V[c]=N+"Minutes",V[a]=N+"Seconds",V[s]=N+"Milliseconds",V)[ee],ce=ee===d?this.$D+(te-this.$W):te;if(ee===g||ee===v){var pe=this.clone().set(y,1);pe.$d[q](ce),pe.init(),this.$d=pe.set(y,Math.min(this.$D,pe.daysInMonth())).$d}else q&&this.$d[q](ce);return this.init(),this},K.set=function(W,te){return this.clone().$set(W,te)},K.get=function(W){return this[U.p(W)]()},K.add=function(W,te){var V,ee=this;W=Number(W);var N=U.p(te),q=function(fe){var he=Q(ee);return U.w(he.date(he.date()+Math.round(fe*W)),ee)};if(N===g)return this.set(g,this.$M+W);if(N===v)return this.set(v,this.$y+W);if(N===d)return q(1);if(N===h)return q(7);var ce=(V={},V[c]=r,V[u]=o,V[a]=n,V)[N]||1,pe=this.$d.getTime()+W*ce;return U.w(pe,this)},K.subtract=function(W,te){return this.add(-1*W,te)},K.format=function(W){var te=this,V=this.$locale();if(!this.isValid())return V.invalidDate||C;var ee=W||"YYYY-MM-DDTHH:mm:ssZ",N=U.z(this),q=this.$H,ce=this.$m,pe=this.$M,fe=V.weekdays,he=V.months,me=V.meridiem,Ae=function(Ce,Ee,ue,Xe){return Ce&&(Ce[Ee]||Ce(te,ee))||ue[Ee].slice(0,Xe)},xe=function(Ce){return U.s(q%12||12,Ce,"0")},ye=me||function(Ce,Ee,ue){var Xe=Ce<12?"AM":"PM";return ue?Xe.toLowerCase():Xe};return ee.replace(E,function(Ce,Ee){return Ee||function(ue){switch(ue){case"YY":return String(te.$y).slice(-2);case"YYYY":return U.s(te.$y,4,"0");case"M":return pe+1;case"MM":return U.s(pe+1,2,"0");case"MMM":return Ae(V.monthsShort,pe,he,3);case"MMMM":return Ae(he,pe);case"D":return te.$D;case"DD":return U.s(te.$D,2,"0");case"d":return String(te.$W);case"dd":return Ae(V.weekdaysMin,te.$W,fe,2);case"ddd":return Ae(V.weekdaysShort,te.$W,fe,3);case"dddd":return fe[te.$W];case"H":return String(q);case"HH":return U.s(q,2,"0");case"h":return xe(1);case"hh":return xe(2);case"a":return ye(q,ce,!0);case"A":return ye(q,ce,!1);case"m":return String(ce);case"mm":return U.s(ce,2,"0");case"s":return String(te.$s);case"ss":return U.s(te.$s,2,"0");case"SSS":return U.s(te.$ms,3,"0");case"Z":return N}return null}(Ce)||N.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(W,te,V){var ee,N=this,q=U.p(te),ce=Q(W),pe=(ce.utcOffset()-this.utcOffset())*r,fe=this-ce,he=function(){return U.m(N,ce)};switch(q){case v:ee=he()/12;break;case g:ee=he();break;case m:ee=he()/3;break;case h:ee=(fe-pe)/6048e5;break;case d:ee=(fe-pe)/864e5;break;case u:ee=fe/o;break;case c:ee=fe/r;break;case a:ee=fe/n;break;default:ee=fe}return V?ee:U.a(ee)},K.daysInMonth=function(){return this.endOf(g).$D},K.$locale=function(){return F[this.$L]},K.locale=function(W,te){if(!W)return this.$L;var V=this.clone(),ee=G(W,te,!0);return ee&&(V.$L=ee),V},K.clone=function(){return U.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},X}(),ae=se.prototype;return Q.prototype=ae,[["$ms",s],["$s",a],["$m",c],["$H",u],["$W",d],["$M",g],["$y",v],["$D",y]].forEach(function(X){ae[X[1]]=function(K){return this.$g(K,X[0],X[1])}}),Q.extend=function(X,K){return X.$i||(X(K,se,Q),X.$i=!0),Q},Q.locale=G,Q.isDayjs=$,Q.unix=function(X){return Q(1e3*X)},Q.en=F[O],Q.Ls=F,Q.p={},Q})})(H2);var G2=H2.exports;const Or=go(G2);function q2(e){const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Or().hour(n).minute(r)}const La=new z2;function QZ(e,t,n){return function(r){const o=Z.isFunction(r)?r(t):r;return La.set(e,o),n(o),o}}function a0(e,t){var u;lo().required().validateSync(e);const[n,r]=T.useState(La.get(e)??t),o=T.useRef(t),s=Z.isEqual(o.current,t)?o.current:t,a=T.useRef(),c=a.current;return T.useEffect(()=>{r(La.get(e)??s)},[e,s,r]),T.useEffect(()=>{function d(h){r(h)}return La.watch(e,d),()=>{La.unwatch(e,d)}},[e,r]),(e!==(c==null?void 0:c.key)||!Z.isEqual(n,c==null?void 0:c.value))&&(a.current={key:e,value:n,setter:QZ(e,n,r)}),[n,((u=a.current)==null?void 0:u.setter)??Z.noop]}function Y2(e){const[t]=ne.useLocaleState();return e!==void 0?String(e):t}function JZ(e,t){const n=Y2(t==null?void 0:t.locale);return s0(e,n,t)}function eQ(e){const t=Y2(e==null?void 0:e.locale);return T.useCallback(r=>s0(r,t,e),[t,e])}function K2(e){if(!Z.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=T.useState(e);return T.useEffect(()=>{Z.isEqual(e,t)||n(e)},[e,t]),t}function Qs(){const[e,t]=T.useState(null),n=!!e,r=T.useCallback(a=>t((a==null?void 0:a.currentTarget)??null),[t]),o=T.useCallback(()=>t(null),[t]),s=T.useCallback(a=>{n?o():r(a)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:s}}function tQ(e,t){const[n,r]=T.useState({width:1,height:1}),o=e.current;return T.useEffect(()=>{function s(){var d;let c=0,u=0;switch(t){case"client":c=(o==null?void 0:o.clientWidth)??0,u=(o==null?void 0:o.clientHeight)??0;break;case"offset":c=(o==null?void 0:o.offsetWidth)??0,u=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":c=(o==null?void 0:o.scrollWidth)??0,u=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const h=((d=e.current)==null?void 0:d.getBoundingClientRect())??{width:0,height:0};c=h.width,u=h.height;break}}r({width:c,height:u})}const a=new ResizeObserver(s);return Z.isEmpty(e==null?void 0:e.current)||(a.observe(e==null?void 0:e.current),s()),()=>{a.disconnect()}},[o,t,e]),n}function l0(e){const t=L.useRecordContext(),n=L.useTranslate(),r=L.useResourceContext(),o=t!=null&&t.id?"edit":"create";return T.useMemo(()=>{if(e===!1)return;const a=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(a,{_:a}),...t})},[o,t,r,n,e])}function X2(){const{mode:e}=mn(),t=window.matchMedia("(prefers-color-scheme: dark)"),[n,r]=T.useState(()=>e==="auto"?t.matches?"dark":"light":e),o=T.useRef(n);return T.useEffect(()=>{function s(){const c=t.matches?"dark":"light";c!==o.current&&(r(c),o.current=c)}s();const a=t;return a.addEventListener("change",s),()=>{a.removeEventListener("change",s)}},[t]),n}function kr(){throw new Error("Method must be implemented")}const Z2={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2,setFontFamily:kr,setMenuOrientation:kr,setMiniDrawer:kr,setContainer:kr,setMode:kr,setPresetColor:kr,setThemeDirection:kr,setAppDefaultPath:kr,setDrawerWidth:kr,setHorizontalMaxItems:kr,isVerticalLayout:e=>!1,isHorizontalLayout:e=>!1};function nQ(e){return e==="vertical"}function rQ(e){return e==="horizontal"}const c0=T.createContext(Z2);function Qh({initialConfig:e,children:t}){const[n,r]=a0("theme-config",{...Z2,...e});function o(y){r(C=>({...C,fontFamily:y}))}function s(y){r(C=>({...C,menuOrientation:y}))}function a(y){r(C=>({...C,miniDrawer:y}))}function c(y){r(C=>({...C,container:y}))}function u(y){r(C=>({...C,mode:y}))}function d(y){r(C=>({...C,presetColor:y}))}function h(y){r(C=>({...C,themeDirection:y}))}function g(y){r(C=>({...C,appDefaultPath:y}))}function m(y){r(C=>({...C,drawerWidth:y}))}function v(y){r(C=>({...C,horizontalMaxItems:y}))}return f.jsx(c0.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:s,setMiniDrawer:a,setContainer:c,setMode:u,setPresetColor:d,setThemeDirection:h,setAppDefaultPath:g,setDrawerWidth:m,setHorizontalMaxItems:v,isVerticalLayout:nQ,isHorizontalLayout:rQ},children:t})}function u0(){return T.useContext(c0)}function mn(){return u0()}const oQ=Al(L.Toolbar,{slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end",position:"initial !important","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}}));function Zo(e){return f.jsx(oQ,{...e})}function Q2({children:e,spacing:t,defaultValues:n,...r}){const{spacing:o}=mn();return f.jsx(sQ,{defaultValues:n,spacing:t||o,children:f.jsx(A.Grid,{container:!0,...r,spacing:t||o,children:e})})}function iQ({children:e,content:t=!0,title:n,subheader:r=null,secondary:o=null,toolbar:s=!1,lg:a=12,md:c=12,sm:u=12,xs:d=12,...h}){const g=L.useTranslate(),m=L.useResourceContext(),{cardTitle:v,cardSubheader:y}=T.useMemo(()=>{const C=n||`resources.${m}.title`;return{cardTitle:g(C,{_:C}),cardSubheader:r!==null?g(r,{_:r}):null}},[m,r,n,g]);return f.jsx(A.Grid,{item:!0,...h,lg:a,md:c,sm:u,xs:d,children:f.jsx(En,{content:t,title:v,subheader:y,secondary:o,divider:!0,children:f.jsxs(f.Fragment,{children:[e,s===!0?f.jsx(Zo,{children:f.jsx(L.SaveButton,{})}):s]})})})}const sQ=de(L.Form,{slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*1.25),padding:0,minHeight:"unset"},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingRight:"0 !important",paddingLeft:"0 !important",paddingBottom:"0 !important"}}));Q2.Section=iQ;const aQ=Al(L.SimpleForm,{slot:"Root"})(({theme:e})=>({[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}}));function J2({title:e,modal:t=!1,content:n=!1,subheader:r=null,toolbar:o=f.jsx(Zo,{children:f.jsx(L.SaveButton,{type:"button"})}),secondary:s=f.jsx(Ho,{children:f.jsx(L.DeleteWithConfirmButton,{})}),sx:a,...c}){const u=l0(e),d=L.useRecordContext(),h=om();return f.jsx(En,{content:n,title:u,subheader:r,secondary:d!=null&&d.id?s:null,sx:{...a,"& .MuiToolbar-root":{paddingLeft:h.spacing(2.5),paddingRight:h.spacing(2.5),paddingBottom:h.spacing(2.5),paddingTop:t?h.spacing(2.5):0,borderTop:t?`1px solid ${h.palette.divider}`:void 0}},border:!t,divider:!0,children:f.jsx(aQ,{toolbar:o,...c})})}const eT={openDialogs:[],getCurrentDialog:()=>null,openDialog:(e,t)=>{throw new Error(`openDialog not yet ready for: ${e}, ${t}`)},closeDialog:(e,t)=>{throw new Error(`closeDialog not yet ready for: ${e}, ${t}`)}},tT=T.createContext(eT);function lQ(e){const[t,n]=T.useState(eT);function r(a,c){n(u=>({...u,openDialogs:[...u.openDialogs,a]})),c&&c()}function o(a,c){n(u=>({...u,openDialogs:u.openDialogs.filter(d=>d!==a)})),c&&c()}function s(){return t.openDialogs.length>0?t.openDialogs[t.openDialogs.length-1]:null}return f.jsx(tT.Provider,{value:{...t,openDialog:r,closeDialog:o,getCurrentDialog:s},children:e.children})}function nT(){const e=T.useContext(tT);if(e===void 0)throw new Error("useAppState must be used within an AppStateProvider");return e}function d0(){return nT()}function rT({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,fullWidth:c,...u}){const d=Zt.useTheme(),{getCurrentDialog:h}=d0(),{source:g,resource:m,isRequired:v}=u,{getFieldState:y,formState:C}=Pn.useFormContext(),{error:w}=y(g,C),E=h();return f.jsxs(A.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:w?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},width:c?"100%":"auto",...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(A.InputLabel,{error:!!w,sx:{borderBottom:a?`1px solid ${d.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:f.jsx(L.FieldTitle,{label:e,source:g,resource:E||m,isRequired:v})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r?f.jsx(A.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!w,children:r}):null]})}const cQ=de(L.ArrayInput,{slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}}));function uQ({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s}){return f.jsx(rT,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:s==null?void 0:s.fullWidth,children:f.jsx(cQ,{source:n,label:!1,...s})})}function dQ({canEdit:e=!0,canDelete:t=!0,canClone:n=!1}){return!e&&!t&&!n?null:f.jsxs(Ho,{children:[e?f.jsx(L.EditButton,{}):null,t?f.jsx(L.DeleteWithConfirmButton,{}):null,n?f.jsx(L.CloneButton,{}):null]})}const hC=de("div",{overridesResolver:(e,t)=>t.root})({display:"inline-block"}),fQ=de("ul")({display:"inline-block"});function pQ(e){var h;const{className:t,emptyText:n,source:r,title:o,...s}=e,a=ne.useRecordContext(e),c=ut.get(a,r),u=ne.useTranslate();if(!c)return n?f.jsx(A.Typography,{component:"span",variant:"body2",className:t,...s,children:n?u(n,{_:n}):null}):f.jsx(hC,{className:t,...s});if(Array.isArray(c))return f.jsx(fQ,{className:t,...s,children:c.map((g,m)=>{var y;const v=o instanceof String?(y=ut.get(g,o))==null?void 0:y.toString():o;return f.jsx("li",{children:v},m)})});const d=o instanceof String?(h=ut.get(a,o))==null?void 0:h.toString():o;return f.jsx(hC,{className:t,...s,children:d})}function oT({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",resource:s,...a}){const[c,u]=T.useState(null),d=L.useRecordContext(a),h=L.useDataProvider(),g=L.useResourceContext(),m=L.useNotify(),v=T.useCallback(async w=>{w.preventDefault(),w.stopPropagation(),m("ra.notification.download",{type:"info"});const E=ut.get(d,a==null?void 0:a.source),M=(s||g).replace("entities/",""),I=e||(d==null?void 0:d.id),j=await h.getFile(`/attachments/${M}/${I}/${t||(a==null?void 0:a.source)}/${(E==null?void 0:E.id)||(d==null?void 0:d.id)}`),O=document.createElement("a");O.href=j,O.download=ut.get(d,(a==null?void 0:a.title)||(a==null?void 0:a.source)),O.click()},[h,d,e,g,s,t,a==null?void 0:a.source,a==null?void 0:a.title,m]),y=T.useMemo(()=>({...d,[a==null?void 0:a.source]:(d==null?void 0:d.src)||ut.get(d,a==null?void 0:a.source),[a==null?void 0:a.title]:(d==null?void 0:d.title)||ut.get(d,(a==null?void 0:a.title)||(a==null?void 0:a.source))}),[d,a==null?void 0:a.source,a==null?void 0:a.title]),C=L.useTranslate();return T.useEffect(()=>{!d||!(d!=null&&d.userId)||r===!1||h.getOne(o,{id:d==null?void 0:d.userId}).then(({data:w})=>u(w)).catch(()=>u(null))},[d,h,o,r]),f.jsx(pQ,{...a,disabled:n,record:y,onClick:v,title:f.jsxs(A.Box,{sx:{cursor:"pointer"},children:[f.jsx(A.Typography,{variant:"subtitle1",children:ut.get(y,(a==null?void 0:a.title)||(a==null?void 0:a.source))}),f.jsxs(A.Typography,{variant:"caption",color:"secondary",children:[ut.get(y,"sizeDescription"),r&&c?" | ":null,r&&c?C("ra.attachment.info",{user:c==null?void 0:c.name,created:Or(y==null?void 0:y.createdAt).format("DD/MM/YYYY HH:mm")}):null]})]})})}const hQ=de(L.ImageField,{slot:"root"})(()=>({}));function iT(e){const t=`_${e==null?void 0:e.source}`;return f.jsx(hQ,{...e,source:t})}function sT({width:e=150,height:t=150,circle:n=!1,justify:r="flex-start",record:o,sx:s,...a}){const c=T.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5,...s}),[e,t,n,s]),u=L.useRecordContext(),d=o||u;return f.jsx(iT,{sx:h=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${h.palette.divider}`,objectFit:"cover !important",...c,minWidth:c.width,minHeight:c.height}}),...a,record:d})}var gQ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Tn,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],o=n%100;return"["+n+(r[(o-20)%10]||r[o]||r[0])+"]"}}})})(gQ);var mQ={exports:{}};(function(e,t){(function(n,r){e.exports=r(G2)})(Tn,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),s={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(a){return a+"º"}};return o.default.locale(s,null,!0),s})})(mQ);var aT={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Tn,function(){return function(n,r,o){n=n||{};var s=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function c(d,h,g,m){return s.fromToBase(d,h,g,m)}o.en.relativeTime=a,s.fromToBase=function(d,h,g,m,v){for(var y,C,w,E=g.$locale().relativeTime||a,M=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],I=M.length,j=0;j<I;j+=1){var O=M[j];O.d&&(y=m?o(d).diff(g,O.d,!0):g.diff(d,O.d,!0));var F=(n.rounding||Math.round)(Math.abs(y));if(w=y>0,F<=O.r||!O.r){F<=1&&j>0&&(O=M[j-1]);var k=E[O.l];v&&(F=v(""+F)),C=typeof k=="string"?k.replace("%d",F):k(F,h,O.l,w);break}}if(h)return C;var $=w?E.future:E.past;return typeof $=="function"?$(C):$.replace("%s",C)},s.to=function(d,h){return c(d,h,this,!0)},s.from=function(d,h){return c(d,h,this)};var u=function(d){return d.$u?o.utc():o()};s.toNow=function(d){return this.to(u(this),d)},s.fromNow=function(d){return this.from(u(this),d)}}})})(aT);var vQ=aT.exports;const yQ=go(vQ);Or.extend(yQ);function lT(e){const t=L.useRecordContext(e),[n]=L.useLocaleState(),r=T.useMemo(()=>Or(ut.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return f.jsxs(f.Fragment,{children:[f.jsx(L.DateField,{record:t,source:e.source,showTime:!0}),f.jsx("br",{}),f.jsx(A.Typography,{variant:"caption",color:"textSecondary",children:r})]})}const bQ=de(L.DateField,{slot:"Root"})(()=>({}));function xQ({variant:e="body1",...t}){return f.jsx(bQ,{...t,variant:e})}const CQ=de(L.EmailField,{slot:"Root"})(()=>({}));function wQ({variant:e="body1",...t}){return f.jsx(CQ,{...t,variant:e})}const AQ=de(L.FileField,{slot:"root"})(()=>({}));function cT({...e}){const t=L.useRecordContext(e),n=T.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=ut.get(t,`_${e==null?void 0:e.source}`,ut.get(t,e==null?void 0:e.source)),s=ut.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),a=document.createElement("a");a.href=o,a.download=s,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return f.jsx(AQ,{...e,record:t,onClick:n})}function SQ({variant:e="body1",...t}){return f.jsx(L.FunctionField,{...t,variant:e})}const TQ=de(L.TextField,{slot:"Root"})(()=>({}));function uT({variant:e="body1",...t}){return f.jsx(TQ,{...t,variant:e})}function EQ(e){const t=A.useTheme(),n=ne.useLocales(),{source:r=""}=e,s=ne.useRecordContext(e)[r],a=!Yu(s,n),c=Pr(e,{flex:1}),[u]=ne.useLocaleState(),d=T.useMemo(()=>a?f.jsx(ze.FlagFilled,{style:{color:t.palette.warning.main}}):f.jsx(ze.FlagOutlined,{}),[a,t.palette.warning.main]),h=T.useMemo(()=>f.jsx(A.Stack,{children:Z.map(n,(g,m)=>f.jsx(A.Typography,{children:`${g.locale.toUpperCase()}: ${(s??{})[g.locale]??""}`},m))}),[s,n]);return f.jsx(kd,{title:h,arrow:!1,children:f.jsxs(A.Stack,{alignItems:"center",direction:"row",gap:1,children:[d,f.jsx(uT,{...e,source:`${r}.${u}`,sx:c})]})})}const IQ=de("div")(({theme:e,fullWidth:t})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:t?"100%":"auto",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}}));function OQ({source:e,defaultValue:t=" ",...n}){const r=L.useRecordContext(n),o=ut.get(r,e,t);return f.jsx(A.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})}function PQ({title:e,children:t}){return t==null?null:typeof e=="string"||e===!0?f.jsx(A.Tooltip,{title:e,placement:"top",children:t}):t}function jQ({label:e,source:t,defaultValue:n=" ",children:r=f.jsx(OQ,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...s}){const a=T.Children.only(r),{getCurrentDialog:c}=nT(),u=L.useRecordContext(s),d=L.useResourceContext(s),h=c(),g=T.useMemo(()=>o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?ut.get(u,o,o):o,[u,o]),m=Pr(s,{width:s!=null&&s.fullWidth?"100%":"auto"});return f.jsx(PQ,{title:g,children:f.jsxs(f.Fragment,{children:[f.jsx(A.InputLabel,{sx:{pt:1},children:f.jsx(L.FieldTitle,{label:e,source:t,resource:h||d})}),f.jsx(IQ,{...s,children:T.isValidElement(a)?T.cloneElement(a,{...a.props,source:t,record:u,defaultValue:n,resource:h||d,sx:m}):null})]})})}function RQ({children:e=null,className:t=""}){return f.jsx("div",{className:t,children:e})}const MQ=Al(RQ,{slot:"root"})(({theme:e,bulkActionButtons:t})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,"&>div:first-of-type":{alignItems:"center","& form":{padding:e.spacing(2.5)},"& .MuiToolbar-root":{alignItems:"center",padding:"0 !important",marginTop:e.spacing(1),[e.breakpoints.up("sm")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),width:`calc(100% - ${e.spacing(4)})`},[e.breakpoints.down("md")]:{marginTop:0,display:"contents"}}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:t===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 26px)"},"& .RaBulkActionsToolbar-toolbar":{borderRadius:0,"& > .RaBulkActionsToolbar-title":{alignItems:"center"},[e.breakpoints.down("sm")]:{paddingLeft:e.spacing(3)}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`}},"& .MuiTablePagination-toolbar":{marginTop:"0 !important",marginBottom:"0 !important"},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0}}));function dT(e){return f.jsx(MQ,{...e,children:f.jsx(L.ReferenceManyField,{pagination:f.jsx(L.Pagination,{}),...e})})}function kQ({source:e,...t}){const n=L.useRecordContext(t),r=ut.get(n,e,0),o=r/1024,s=o/1024,a=s/1024,c=a>1?`${a.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return f.jsx(A.Typography,{component:"span",variant:"body1",...t,children:c})}function ln({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,...c}){const u=$t(),{getCurrentDialog:d}=d0(),{source:h,resource:g,isRequired:m}=c,{fieldState:{invalid:v}}=L.useInput(c),y=d();return f.jsxs(A.Stack,{spacing:1,sx:{width:c!=null&&c.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{pb:0,color:v?u.palette.error.main:u.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(A.InputLabel,{error:v===!0,sx:{borderBottom:a?`1px solid ${u.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:f.jsx(L.FieldTitle,{label:e,source:h,resource:y||g,isRequired:m})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...c,label:n==="legend"?e:!1}):t,r?f.jsx(A.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:v===!0,children:r}):null]})}function FQ(e){return e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{}}const LQ=de(L.FileInput,{slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...FQ(e)}));function DQ({children:e=f.jsx(oT,{title:"name",source:"path"}),multiple:t=!1,disabled:n=!1,type:r="attachment",...o}){const s=L.useRecordContext(o),a=o==null?void 0:o.source,c=s==null?void 0:s.id;return L.useInput({source:`__${r}__${o==null?void 0:o.source}`,defaultValue:o==null?void 0:o.source}),f.jsx(ln,{...o,disabled:n,children:f.jsx(LQ,{type:r,multiple:t,disabled:n,children:T.cloneElement(e,{entityId:c,property:a,...e.props})})})}const _Q=de(L.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall:has(.MuiChip-root)":{paddingBottom:"4px"},"& .MuiAutocomplete-tag":{margin:"0px 4px 4px 0px"}}));function BQ({size:e="small",...t}){return f.jsx(ln,{...t,children:f.jsx(_Q,{size:e})})}const NQ=de(L.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}}));function VQ({size:e="small",...t}){const{perPage:n,...r}=t;return f.jsx(ln,{...r,children:f.jsx(NQ,{size:e})})}const WQ=de(L.BooleanInput,{slot:"Root"})(()=>({marginTop:"0 !important"}));function $Q({...e}){const t=Zt.useTheme();return f.jsx(ln,{...e,children:f.jsx(WQ,{sx:{"& .MuiFormControlLabel-root":{marginLeft:"0 !important",marginRight:"0 !important"},"& .MuiSwitch-root":{margin:"0 !important",marginTop:e.display==="legend"?0:`${t.spacing(1)} !important`}}})})}const zQ=4,UQ=de(L.DateInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function HQ(e){const[t,n]=T.useState(""),r=T.useCallback(o=>{const s=o.target.value;Or(s).year().toString().length>zQ?o.target.value=t:n(s)},[t]);return f.jsx(ln,{...e,children:f.jsx(UQ,{...e,onInput:r})})}const GQ=de(L.DateTimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function qQ(e){return f.jsx(ln,{...e,children:f.jsx(GQ,{})})}const YQ=de(L.FileInput,{slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}}));function KQ({children:e=f.jsx(cT,{source:"",title:""}),title:t,...n}){const r=Pn.useWatch({name:n.source}),o=L.useRecordContext(n),{source:s}=n,a=T.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const c=ut.get(o,s);if(c){const u=c.split("__");return u.length>0?u[u.length-1]:c}return c},[o,s,r]);return f.jsx(ln,{...n,children:f.jsx(YQ,{children:T.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||ut.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||ut.get(o,`_${s}`),[t||s]:a}})})})}function XQ({children:e=f.jsx(sT,{}),title:t,multiple:n=!1,...r}){const o=Pn.useWatch({name:r.source}),s=L.useRecordContext(r),{source:a}=r;return L.useInput({source:`__image__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),f.jsx(ln,{...r,multiple:n,children:f.jsx(L.ImageInput,{accept:"image/*",children:T.cloneElement(e,{...e.props,title:t,source:a,record:{...s,[a]:(o==null?void 0:o.title)||ut.get(s,a),[`_${a}`]:(o==null?void 0:o.src)||ut.get(s,`_${a}`)}})})})}function Er(e){return f.jsx(ln,{...e,children:f.jsx(L.TextInput,{})})}const ZQ={vertical:"bottom",horizontal:"right"},QQ={vertical:"top",horizontal:"right"};function JQ({requiredAtLeastOneLocale:e,requiredLocale:t,validate:n,required:r,...o}){const{source:s}=o,a=ne.useLocales(),c=T.useCallback((F="ra.validation.required",k="ra.validation.required_locale")=>$=>{if(e&&!t&&!U2($,a))return F;if(t&&(!Z.has($,t)||Z.isEmpty(Z.get($,t))))return{message:k,args:{locale:t}};if(!e&&r&&!Yu($,a))return F},[e,t,a,r]),u=T.useMemo(()=>ne.composeValidators(n,c()),[n,c]),{fieldState:d}=ne.useInput({...o,validate:u}),{error:h}=d,g=Pn.useWatch({name:s}),m=!Yu(g,a),[v]=ne.useLocaleState(),[y,C]=T.useState(v),[w,E]=T.useState(null),M=!!w,I=T.useCallback(F=>E(M?null:F.currentTarget),[M,E]),j=T.useCallback(()=>E(null),[E]),O=T.useMemo(()=>Z.map(a,(F,k)=>f.jsx(A.MenuItem,{onClick:()=>{C(F.locale),j()},children:f.jsx(A.ListItemText,{primary:`${F.locale.toUpperCase()}: ${(g??{})[F.locale]??""}`})},k)),[a,C,j,g]);return f.jsx(ln,{...o,validate:u,helperText:h!=null&&h.message?f.jsx(ne.ValidationError,{error:h==null?void 0:h.message}):o==null?void 0:o.helperText,children:f.jsx(f.Fragment,{children:f.jsxs(A.Box,{flex:1,children:[Z.map(a,(F,k)=>f.jsx(Er,{...o,source:`${s}.${F.locale}`,sx:{width:"100%",display:F.locale===y?"inline-flex":"none"},label:!1,helperText:!1,required:!1,InputProps:{endAdornment:f.jsx(A.Chip,{label:f.jsx(A.Typography,{variant:"button",children:y}),size:"small",onClick:I,color:m?"warning":void 0})}},k)),f.jsx(A.Menu,{anchorEl:w,open:M,anchorOrigin:ZQ,transformOrigin:QQ,onClose:j,children:O})]})})})}const eJ=de(L.NumberInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function tJ(e){return f.jsx(ln,{...e,children:f.jsx(eJ,{})})}const nJ=de(L.RadioButtonGroupInput,{slot:"root"})(()=>({marginTop:"0 !important","& .MuiFormControlLabel-root":{marginLeft:-8}}));function rJ(e){return f.jsx(ln,{...e,children:f.jsx(nJ,{})})}function oJ({source:e,minWidth:t=300,children:n}){const r=L.useResourceContext(),o=L.useRecordContext(),[s,a]=T.useState(ut.get(o,e,"")),[c,u]=T.useState(!1),d=T.useCallback(y=>a(y.target.value),[]),h=L.useDataProvider(),g=T.useCallback(y=>{y.key==="Enter"&&(u(!0),h.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,h,r,o,e]),m=T.useCallback(()=>{ut.get(o,e)!==s&&(u(!0),h.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,h,r,e,o]),v=T.useCallback(y=>{u(!0),h.update(r,{id:o.id,data:{...o,[e]:y,_changed:e},previousData:o}).then(()=>u(!1))},[h,r,e,o]);return T.useEffect(()=>a(ut.get(o,e)),[o,e]),n?T.cloneElement(n,{...n.props,source:e,value:s,onChange:v}):f.jsx(A.TextField,{value:s,disabled:c,onChange:d,onKeyPress:g,onBlur:m,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})}function iJ({children:e,...t}){const n=T.Children.only(e);return f.jsx(L.ReferenceArrayInput,{...t,children:T.cloneElement(n,{...t,source:n.props.source||t.source})})}function sJ({children:e,...t}){const n=T.Children.only(e);return f.jsx(L.ReferenceInput,{...t,children:T.cloneElement(n,{...t,source:n.props.source||t.source})})}function aJ({reference:e,target:t,children:n,filters:r,actions:o,...s}){return f.jsx(L.ResourceContextProvider,{value:e,children:f.jsx(dT,{perPage:5,pagination:f.jsx(L.Pagination,{}),...s,reference:e,target:t,children:f.jsxs(f.Fragment,{children:[f.jsx(L.ListToolbar,{filters:r,actions:o}),n]})})})}const lJ=de(L.SearchInput,{slot:"root"})(()=>({}));function cJ(e){return f.jsx(lJ,{...e})}const uJ=de(L.SelectArrayInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiFormLabel-root.MuiInputLabel-root":{marginTop:"-3px"},"& .MuiInputLabel-root.MuiInputLabel-shrink":{marginTop:0},"& .MuiOutlinedInput-input:has(.MuiChip-root)":{paddingTop:"4px",paddingBottom:"6px",paddingLeft:"6px"}}));function dJ({optionText:e="name",optionValue:t="id",...n}){return f.jsx(ln,{...n,children:f.jsx(uJ,{optionText:e,optionValue:t,options:{autoWidth:!1}})})}const fJ=de(L.SelectInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1||e===null?0:"auto"}}));function pJ(e){return f.jsx(ln,{...e,children:f.jsx(fJ,{})})}function hJ({multiline:e=!1,...t}){var u,d;const n=L.useTranslate(),r=L.maxLength(t==null?void 0:t.maxLength,"app.input.max_length_error"),o=(d=(u=Pn.useController({name:t==null?void 0:t.source}))==null?void 0:u.field)==null?void 0:d.value;let s=t.helperText,a=t.validate;a?Array.isArray(a)&&a.indexOf(r)===-1&&a.push(r):a=[r];const c=n("app.input.max_length_info",{count:(o==null?void 0:o.length)||0,max:t==null?void 0:t.maxLength});return t!=null&&t.maxLength&&(s=s&&s.length>0?`${c} - ${n(s)}`:c),f.jsx(Er,{...t,validate:a,helperText:s,multiline:e,inputProps:{maxLength:t==null?void 0:t.maxLength}})}function gJ(e){if(!e)return"";const t=q2(e);return t?t.format("HH:mm"):""}function mJ(e){return e}const vJ=de(L.TimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function yJ({parse:e=mJ,format:t=gJ,...n}){return f.jsx(ln,{...n,children:f.jsx(vJ,{parse:e,format:t,...n})})}function f0({onSuccess:e,firstAccess:t}){const{spacing:n}=mn(),[r,o]=T.useState(!1),s=ne.useAuthProvider(),a=ne.useTranslate(),c=ne.useNotify(),u=T.useCallback(d=>{const{oldPassword:h,newPassword:g}=d;o(!0),s==null||s.changePassword(h,g).then(()=>{c("ra.auth.password_changed"),e()}).catch(m=>{c((m==null?void 0:m.message)||(m==null?void 0:m.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e,c]);return f.jsx(ne.ResourceContextProvider,{value:"user/change-password",children:f.jsx(ne.EditContextProvider,{value:{record:{},resource:"user/change-password",save:u},children:f.jsx(J2,{onSubmit:u,toolbar:f.jsx(Zo,{children:f.jsx(L.SaveButton,{disabled:r})}),children:f.jsxs(A.Grid,{container:!0,spacing:n,children:[t===!0&&f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.Alert,{severity:"warning",children:[f.jsx(A.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),f.jsx(A.Grid,{item:!0,xs:12,children:f.jsx(Er,{source:"oldPassword",type:"password",validate:ne.required()})}),f.jsx(A.Grid,{item:!0,xs:12,children:f.jsx(Er,{source:"newPassword",type:"password",validate:ne.required()})})]})})})})}const fT=T.createContext({});function bJ(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=L.useResourceContext(),o=L.useDataProvider(),{search:s}=Ri.useLocation(),a=`${r}/new`,c=T.useCallback(()=>{if(!t||!Z.isFunction(o.get))return Promise.resolve({});const m={};return new URLSearchParams(s??"").forEach((v,y)=>{m[y]=v}),o.get(a,m).then(v=>v.data).then(v=>{const{responseCode:y,value:C}=v;return y==="ok"?C:Promise.reject(v)})},[t,s,o,a]),u=T.useMemo(()=>Z.chain(n).extend({queryKey:[r,s],queryFn:c}).value(),[r,s,c,n]),{data:d,isLoading:h}=Ts.useQuery(u),g=Z.omit(e,["useDefaults"]);return h?f.jsx(A.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:f.jsx(A.CircularProgress,{})}):f.jsx(fT.Provider,{value:d??{},children:f.jsx(L.Create,{...g,children:e.children})})}const xJ=de(bJ,{slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main":{marginTop:0},"& .RaCreate-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaCreate-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaCreate-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function CJ(){return T.useContext(fT)}const wJ=de(L.Edit,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaEdit-main":{marginTop:0},"& .RaEdit-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaEdit-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function AJ(e){return f.jsx(wJ,{...e})}const SJ=de(A.CardHeader)(({theme:e})=>({marginTop:e.spacing(2.5),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),TJ=de(A.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`}));function EJ({title:e,divider:t=!0,variant:n="h5"}){const r=L.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsx(SJ,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t?f.jsx(TJ,{}):null]})}function Jh(e){return e.id??e.label}function pT(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function IJ(e){return Z.map(e,"id")}function Ku(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function hT(e,t){const n=e!==void 0?Ku(e):0;return Z.chain(t).filter(o=>e!==void 0?pT(e,o.id):!0).filter(o=>Ku(o.id)===n+1).value()}function OJ(e,t){var s;const n=Z.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return Z.extend(n,{formRootPath:o});case"setSyncWithLocation":return Z.extend(n,{syncWithLocation:o});case"setErrorCount":return Z.extend(n,{errorCount:o});case"setActiveItem":return Z.includes(IJ(e.items),o)?Z.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return Z.extend(n,{items:Z.chain(n.items).clone().reject(c=>c.id===a).concat([o]).orderBy(c=>c.index).value()})}case"removeItem":{const a=Z.isString(o)?o:o.id,c=Z.chain(n.items).clone().reject(u=>u.id===a).value();return Z.extend(n,{items:c}),n.activeItem===a&&Z.extend(n,{activeItem:((s=Z.first(c))==null?void 0:s.id)??void 0}),n}default:return n}}const PJ={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},gT=T.createContext(void 0);function mT(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=Ri.useLocation(),[s,a]=T.useReducer(OJ,Z.cloneDeep(PJ)),{formRootPath:c,items:u}=s,d=T.useMemo(()=>({state:s,dispatch:a}),[s,a]);return T.useEffect(()=>{const h=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&h.push(r);const g=Z.chain(h).map(v=>Ri.matchPath(v,o)).reject(v=>v===null).first().value(),m=g==null?void 0:g.pathnameBase;m!==void 0&&m!==c&&a({type:"setFormRootPath",payload:m})},[o,c,r]),T.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),T.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),T.useEffect(()=>{var h;if(t&&c!==void 0){let g=o.replace(c,"").replace(new RegExp(/^\/?/),"");Z.isEmpty(g)&&(g=((h=Z.chain(u).filter(m=>hT(m.id,u).length===0).orderBy([m=>Ku(m.id),m=>m.index]).first().value())==null?void 0:h.id)??void 0),a({type:"setActiveItem",payload:g})}},[a,c,o,u,t]),f.jsx(gT.Provider,{value:d,children:e.children})}function vT(){const e=T.useContext(gT);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Pl(){return vT().state}function p0(){return vT().dispatch}function yT(){return Pl().formRootPath}function bT(){return Pl().activeItem}function xT(){return Pl().items}function CT(){return Pl().syncWithLocation}function wT(){return Pl().errorCount}function AT(){const e=p0();return T.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function ST(){const e=p0();return T.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function TT(){const e=p0();return T.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}const jJ=de(A.Grid,{name:"LongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root.RaToolbar-desktopToolbar":{marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,paddingTop:e.spacing(2.5),paddingBottom:e.spacing(2.5),[e.breakpoints.down("sm")]:{width:"auto !important",marginRight:0}},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingLeft:"0 !important",paddingRight:"0 !important",paddingBottom:"0 !important"},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function ET(e){const{spacing:t}=mn(),{spacing:n=t}=e,r=Z.omit(e,["spacing"]);return f.jsx(L.Form,{...r,className:"LongFormView",children:f.jsx(jJ,{container:!0,spacing:n*2,children:e.children})})}function IT(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=Z.omit(e,["disposition"]);return f.jsx(A.Grid,{...n,item:!0,...t,children:e.children})}function OT(e){const t=bT();return t===void 0?!1:e===t||pT(e,t)}function PT(e){const t=xT();return T.useMemo(()=>hT(e,t),[t,e])}function RJ(){const e=yT(),{search:t}=Ri.useLocation(),n=Ri.useNavigate();return T.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n,t])}function jT(){const e=PT();return f.jsx(A.Card,{variant:"outlined",children:f.jsx(A.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:Z.map(e,(t,n)=>f.jsx(h0,{...t},n))})})}function h0(e){const t=ne.useTranslate()??Z.identity,n=RT(e),{selected:r,label:o,icon:s,onClick:a,badge:c,items:u,isGroup:d,level:h,errors:g=0}=n,{spacing:m}=mn(),[v,y]=T.useState(r),C=T.useCallback(M=>{y(!v),a(M)},[a,v]),w=s!==void 0,E=Z.omit(e,["label","icon","selected","badge"]);return T.useEffect(()=>{r&&!v&&y(r)},[r,v,y]),f.jsxs(f.Fragment,{children:[f.jsx(A.ListItem,{...E,disablePadding:!0,children:f.jsxs(A.ListItemButton,{selected:r?!d:null,onClick:C,sx:{pl:m*h},children:[w?f.jsx(A.ListItemIcon,{children:s}):null,f.jsx(A.ListItemText,{inset:!w,primary:g===0?t(o):f.jsx(A.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),c?f.jsx(A.ListItemAvatar,{children:f.jsx(Ou,{type:"filled",size:"xs",color:c.color??"default",children:c.content})}):null,d?v?f.jsx(gn.ExpandLess,{}):f.jsx(gn.ExpandMore,{}):null]})}),d?f.jsx(A.Collapse,{in:v,timeout:"auto",children:f.jsx(A.List,{children:Z.map(u,(M,I)=>f.jsx(h0,{...M},I))})}):null]})}function RT(e){const{id:t}=e,n=OT(t),r=Ku(t),o=RJ(),s=CT(),a=AT(),c=PT(t),u=!Z.isEmpty(c),d=T.useCallback(g=>{u||(s?o(e.id):a(e.id)),Z.isFunction(e.onClick)&&e.onClick(g)},[a,o,e,s,u]);return T.useMemo(()=>({...e,selected:n,onClick:d,items:c,isGroup:u,level:r}),[e,n,d,c,u,r])}var MJ=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},MT=e=>e.firstChild?e.firstChild.offsetParent===e:!0,kJ=(e,t)=>{let n=e,r=0;MT(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},FJ=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},il=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?il="sticky":CSS.supports("position","-webkit-sticky")&&(il="-webkit-sticky"));var Xu=!1;try{const e=Object.defineProperty({},"passive",{get(){Xu={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var Jp=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),a=o(s()),c=()=>{Object.assign(a,o(s())),n()};return window.addEventListener("resize",c,Xu),r.push(()=>window.removeEventListener("resize",c)),a}else{const s=o(t.getBoundingClientRect()),a=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},c=new ResizeObserver(a);return c.observe(t),r.push(()=>c.disconnect()),s}},LJ=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},DJ=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,a=MJ(e);let c=!1;const u=()=>{c||requestAnimationFrame(()=>{const k=g();k!==I&&j(k),c=!1}),c=!0};let d=a===window?window.scrollY:a.scrollTop;const h=k=>{const{offsetTop:$,height:G}=v,{naturalTop:Q}=w,{height:U}=E;return k+$+G>=Q+U+M+o},g=()=>{const{height:k}=v,{height:$}=E;return $+s+o<=k?3:h(d)?1:2},m=a!==window&&MT(a),v=Jp({el:a,onChange:u,unsubs:t,measure:({height:k,top:$})=>({height:k,offsetTop:m?$:0})}),y=FJ(e),C=y===window?{top:0,bottom:0}:LJ(y),w=Jp({el:y,onChange:u,unsubs:t,measure:({height:k})=>({height:k-C.top-C.bottom,naturalTop:y===window?0:kJ(y,a)+C.top+v.offsetTop})}),E=Jp({el:e,onChange:u,unsubs:t,measure:({height:k})=>({height:k})});let M=0,I=g();const j=k=>{const $=I;if(I=k,$===2&&(M=-1),k===3){e.style.position=il,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:G,offsetTop:Q}=v,{height:U,naturalTop:se}=w,{height:ae}=E;if(k===2)if(e.style.position="relative",M=$===0?Math.max(0,Q+d-se+s):Math.max(0,Q+d+G-(se+ae+o)),r){const X=Math.max(0,U-ae-M);e.style.bottom=`${X}px`}else e.style.top=`${M}px`;else e.style.position=il,k===1?r?e.style.bottom=`${o}px`:e.style.top=`${G-ae-o}px`:r?e.style.bottom=`${G-ae-o}px`:e.style.top=`${s}px`};j(I);const O=k=>{if(k===d)return;const $=k-d;if(d=k,I===3)return;const{offsetTop:G,height:Q}=v,{naturalTop:U,height:se}=w,{height:ae}=E;if($>0)if(I===0){if(k+G+s>U){const X=Math.max(0,G+d-U+s);k+G+Q<=U+ae+X+o?j(2):j(1)}}else I===2&&h(k)&&j(1);else if(I===1){if(G+k+Q<U+se+o){const X=Math.max(0,G+d+Q-(U+ae+o));G+k+s>=U+X?j(2):j(0)}}else I===2&&G+k+s<U+M&&j(0)},F=a===window?()=>O(window.scrollY):()=>O(a.scrollTop);a.addEventListener("scroll",F,Xu),a.addEventListener("mousewheel",F,Xu),t.push(()=>a.removeEventListener("scroll",F),()=>a.removeEventListener("mousewheel",F))},_J=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=T.useState(null);return T.useEffect(()=>{if(!r||!il)return;const s=[];return DJ(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(a=>a())}},[r,t,e,n]),o},BJ=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:a}=e,c=_J({offsetTop:t,offsetBottom:n,bottom:r});return f.jsx("div",{className:s,style:a,ref:c,children:o})},NJ=BJ,kT=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(kT||{});function FT(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=Z.omit(e,["sticky","disposition","spacing"]),s=t?NJ:A.Box,a=T.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return f.jsx(A.Grid,{...o,item:!0,...n,children:f.jsx(s,{...a,children:f.jsx(A.Stack,{spacing:r,children:e.children})})})}function LT(e){return f.jsx(f.Fragment,{children:e.children})}function DT(e){const{children:t}=e;return T.useMemo(()=>{const r={top:[],bottom:[]};return T.Children.forEach(t,o=>{if(T.isValidElement(o)&&(o==null?void 0:o.type)===LT){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function _T(e){const{errors:t}=Pn.useFormState(),n=wT(),{label:r,icon:o,badge:s,index:a=0,children:c}=e,u=Jh(e),d=ST(),h=TT(),g=OT(u),m=[];n&&(e.sources!==void 0?m.push(...e.sources):Gd(c,y=>{var C;((C=y==null?void 0:y.props)==null?void 0:C.source)!==void 0&&m.push(y.props.source)}));const v=Z.chain(m).uniq().map(y=>Z.get(t,y)).reject(y=>y===void 0).value().length;return T.useEffect(()=>{d({id:u,index:a,label:r,icon:o,badge:s,errors:v})},[d,h,r,o,u,s,a,v]),T.useEffect(()=>()=>{h(u)},[u,h]),f.jsx(A.Box,{display:g?"unset":"none",children:e.children})}function BT(e){const t=g0(e),n=Jh(e);return f.jsx(_T,{...e,id:n,children:T.Children.map(t,r=>{const o=Jh(r.props);return T.cloneElement(r,{id:`${n}.${o}`})})})}function NT(e){return f.jsx(_T,{...e})}function g0(e){const{children:t}=e;return T.useMemo(()=>Z.chain(T.Children.toArray(t)).filter(r=>T.isValidElement(r)&&((r==null?void 0:r.type)===NT||(r==null?void 0:r.type)===BT)).map((r,o)=>T.cloneElement(r,{index:o})).value(),[t])}function VJ(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=Z.pick(e,["syncWithLocation","errorCount"]),s=Z.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:c}=DT(e),u=g0(e);return f.jsx(mT,{...o,children:f.jsxs(ET,{...s,spacing:r,children:[f.jsxs(FT,{disposition:t,spacing:r,children:[a,f.jsx(jT,{}),c]}),f.jsx(IT,{disposition:n,children:u})]})})}const kt=VJ;kt.BaseForm=ET;kt.Content=IT;kt.Provider=mT;kt.useItems=xT;kt.useSyncWithLocation=CT;kt.useErrorCount=wT;kt.useFormRootPath=yT;kt.useActiveItem=bT;kt.useSetActiveItem=AT;kt.useAddItem=ST;kt.useRemoveItem=TT;kt.Sidebar=FT;kt.SidebarSection=LT;kt.SidebarSectionPosition=kT;kt.useSidebarChildren=DT;kt.NavMenu=jT;kt.NavMenuItem=h0;kt.useNavMenuItem=RT;kt.Tab=NT;kt.Group=BT;kt.useBaseItemChildren=g0;const WJ=de(L.Show,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}}));function $J(e){return f.jsx(WJ,{...e})}const zJ=de(L.SimpleFormIterator,{root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}}));function UJ(e){return f.jsx(zJ,{...e})}const HJ=Al(L.TabbedForm,{slot:"Root"})(({theme:e})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:0},[e.breakpoints.down("sm")]:{paddingBottom:0,"& .MuiTableContainer-root":{paddingBottom:e.spacing(1)}}}));function GJ({children:e}){return f.jsx(f.Fragment,{children:e})}function m0(e){const{title:t,modal:n,content:r,subheader:o,secondary:s=f.jsx(Ho,{children:f.jsx(L.DeleteWithConfirmButton,{})}),sx:a,noPadding:c,toolbar:u=f.jsx(Zo,{children:f.jsx(L.SaveButton,{type:"button"})}),...d}=e,h=l0(t),g=A.useTheme();return f.jsx(En,{title:h,modal:n,content:r,subheader:o,secondary:s,sx:{...a,"& .MuiTabs-root":{m:2.5,mb:0},"& .tabbed-form > .MuiDivider-root":{ml:2.5,mr:2.5},"& .MuiToolbar-root.RaToolbar-desktopToolbar":{paddingTop:n?g.spacing(2.5):0},"& .MuiToolbar-root":{padding:g.spacing(2.5),borderTop:n?`1px solid ${g.palette.divider}`:void 0}},border:!n,divider:!0,children:f.jsx(HJ,{toolbar:u,component:c?GJ:void 0,...d})})}function qJ({children:e,...t}){return f.jsx(L.TabbedForm.Tab,{...t,children:f.jsx(A.Box,{sx:{width:"100%",p:2.5},children:e})})}m0.Tab=L.TabbedForm.Tab;m0.TabStack=qJ;function v0(e){const{label:t,disableAdd:n,onClick:r,inset:o}=e,s=A.useTheme(),a=s.palette.mode==="dark"?s.palette.grey.A400:s.palette.grey.A800,c=s.palette.mode==="light"?"#000000":"#FFFFFF";return f.jsxs(A.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:o?{p:2.5}:{pt:2},children:[t!==!1&&f.jsx(A.Typography,{children:t}),!n&&(T.isValidElement(e==null?void 0:e.customButton)?T.cloneElement(e==null?void 0:e.customButton,{onClick:r}):f.jsx(A.IconButton,{color:"secondary",sx:{border:`1px solid ${a}`},onClick:r,children:f.jsx(ze.PlusCircleOutlined,{style:{color:c}})}))]})}const y0=T.createContext(void 0);function VT(){return T.useContext(y0)}function Zu(e){const{children:t}=e,{item:n,index:r}=VT(),[o,s]=T.useState(!1),{update:a}=L.useArrayInput(),c=L.useTranslate(),u=T.useCallback(d=>(s(!1),a(r,d),Promise.resolve()),[r,a]);return f.jsxs(f.Fragment,{children:[f.jsx(A.Button,{color:"primary",onClick:()=>s(!0),sx:{justifyContent:"flex-start"},children:c("ra.action.edit")}),f.jsx(A.Dialog,{open:o,onClose:()=>s(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(L.EditContextProvider,{value:{record:n,save:u},children:t})})]})}function WT({source:e,children:t}){const n=T.Children.only(t),{getValues:r}=Pn.useFormContext(),o=L.useRecordContext({record:r()});return T.isValidElement(n)?T.cloneElement(n,{source:e,record:o}):null}function b0(e){const{label:t,disableAdd:n,inset:r,source:o,template:s}=e,[a,c]=T.useState(!1),{append:u}=L.useArrayInput(),d=T.useCallback(()=>{c(g=>!g)},[c]),h=T.useCallback(g=>(c(!1),u(g),Promise.resolve()),[c,u]);return f.jsxs(f.Fragment,{children:[T.cloneElement(f.jsx(v0,{}),{label:t,source:o,disableAdd:n,template:s,onClick:d,inset:r}),f.jsx(A.Dialog,{open:a,onClose:d,maxWidth:"xs",children:f.jsx(ne.CreateContextProvider,{value:{save:h},children:e.children})})]})}const x0=T.createContext(void 0);function $T(){return T.useContext(x0)}const zT=_.forwardRef((e,t)=>{const{children:n,disabled:r,disableRemove:o=!1,index:s,member:a,resource:c,record:u}=e,d=L.useTranslate(),[h,g]=_.useState(!1),{total:m,remove:v}=$T(),y=_.useCallback(()=>{g(!1),v(s)},[s,v]),C=T.useMemo(()=>({index:s,total:m,item:u,remove:()=>v(s)}),[s,m,v,u]),w=T.useMemo(()=>T.Children.map(n,E=>T.isValidElement(E)&&(E==null?void 0:E.type)===Zu&&_.isValidElement(E)?E:null),[n]);return f.jsxs(y0.Provider,{value:C,children:[T.Children.map(n,(E,M)=>{if(E.type===Zu||!T.isValidElement(E))return null;const{source:I,...j}=E.props;return f.jsx(A.TableCell,{children:T.cloneElement(E,{source:I?`${a}.${I}`:a,index:I?void 0:M,resource:c,disabled:r,...j,label:""})})}),!o&&f.jsx(A.TableCell,{children:f.jsx(A.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:f.jsxs(Ho,{horizontal:!0,children:[f.jsx(A.Button,{onClick:()=>g(!0),color:"error",sx:{justifyContent:"flex-start"},children:d("ra.action.delete")}),w]})})}),o&&w?f.jsx(A.TableCell,{children:f.jsx(A.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:f.jsx(Ho,{horizontal:!0,children:w})})}):null,n.length>0&&f.jsx(L.Confirm,{isOpen:h,title:d("ra.action.remove_item"),content:d("ra.message.remove_item"),onConfirm:y,onClose:()=>g(!1)})]})});function YJ(e){var te,V;const{children:t,resource:n,source:r,label:o,disableAdd:s=!1,disableRemove:a=!1,enableClearAll:c=!1,className:u,empty:d,template:h={},addButton:g=f.jsx(v0,{}),inset:m,sx:v}=e,[y,C]=T.useState(!1),{fields:w,remove:E,replace:M,append:I}=L.useArrayInput(e),{resetField:j}=Pn.useFormContext(),O=$t(),F=ne.useTranslate(),k=T.useRef(h||{}),$=ne.useTranslateLabel(),G=T.useCallback(ee=>{E(ee)},[E]);if(w.length>0){const{...ee}=w[0];k.current=ee;for(const N in k.current)k.current[N]=null}const Q=T.useCallback((ee=void 0)=>{let N=ee;ee==null&&(N=k.current,T.Children.count(t)===1&&_.isValidElement(T.Children.only(t))&&!T.Children.only(t).props.source&&T.Children.map(t,ce=>_.isValidElement(ce)&&ce.type!==ne.FormDataConsumer).some(Boolean)?N="":(N=N||{},T.Children.forEach(t,ce=>{_.isValidElement(ce)&&ce.type!==ne.FormDataConsumer&&ce.props.source&&(N[ce.props.source]=ce.props.defaultValue??null)})));const q={...N,...h};I(q),j(`${r}.${w.length}`,{defaultValue:N})},[I,t,j,r,w.length,h]);function U(ee){return N=>{Q(),ee&&ee(N)}}const se=T.useCallback(()=>{M([]),C(!1)},[M]),ae=T.useMemo(()=>({total:w.length,remove:G,source:r}),[w.length,G,r]),X=O.palette.mode==="dark"?O.palette.grey.A400:O.palette.grey.A800,K=w.length>0&&c,W=m===!0?{borderRadius:0,borderBottom:`1px solid ${O.palette.divider}`}:{mt:2,border:`1px solid ${X}`,boxShadow:O.customShadows.z0};return w?f.jsx(x0.Provider,{value:ae,children:f.jsxs("div",{className:u,children:[_.cloneElement(g,{label:o,source:r,disableAdd:s,template:h,onClick:(g==null?void 0:g.type)!==b0?U((V=(te=e==null?void 0:e.addButton)==null?void 0:te.props)==null?void 0:V.onClick):void 0,inset:m}),f.jsx(A.TableContainer,{component:A.Paper,sx:{...W,boxShadow:O.customShadows.z0,...v},children:f.jsxs(A.Table,{size:"small",children:[f.jsx(A.TableHead,{sx:m===!0?{}:{borderTop:0,borderBottom:`1px solid ${X}`},children:f.jsxs(A.TableRow,{children:[T.Children.map(t,(ee,N)=>{if(ee.type===Zu||!_.isValidElement(ee))return null;const q=f.jsx(A.Typography,{display:"flex",variant:"subtitle1",color:"text.primary",textTransform:"none",children:$({...ee.props,resource:n})});return f.jsx(A.TableCell,{children:ee.props.title?f.jsx(kd,{title:ee.props.title,arrow:!0,children:q}):q},N)}),!a&&K?f.jsx(A.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:f.jsx(Ho,{horizontal:!0,children:f.jsx(A.Typography,{color:"error",onClick:()=>C(!0),children:F("ra.action.delete")})})},"actions"):f.jsx(A.TableCell,{},"empty_actions")]})}),f.jsxs(A.TableBody,{children:[w.length===0&&f.jsx(A.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:f.jsx(A.TableCell,{colSpan:4+(a?0:1),align:"center",children:d||f.jsx(A.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),w.length>0&&w.map((ee,N)=>f.jsx(A.TableRow,{sx:{borderBottom:0},children:f.jsx(zT,{disableRemove:a,index:N,member:`${r}.${N}`,onRemoveField:G,record:w&&w[N]||{},resource:n,source:r,children:t})},ee.id))]})]})}),w.length>0&&f.jsx(L.Confirm,{isOpen:y,title:F("ra.action.clear_array_input"),content:F("ra.message.clear_array_input"),onConfirm:se,onClose:()=>C(!1)})]})}):null}const KJ=de(YJ,{slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8.25)})`}},[e.breakpoints.down("sm")]:{"& .MuiTableRow-root:last-child":{borderBottom:0}}})),qd=KJ;qd.CreateButton=b0;qd.EditButton=Zu;qd.Field=WT;const UT=T.createContext(void 0);function Yd(){const e=T.useContext(UT);if(!e)throw new Error("useWizardFormContext must be used within a WizardFormProvider");return e}function XJ({value:e,children:t}){return f.jsx(UT.Provider,{value:e,children:t})}function ZJ({cancelButton:e,...t}){const{hasNextStep:n,hasPreviousStep:r,goToNextStep:o,goToPreviousStep:s}=Yd(),a=ne.useTranslate(),{handleSubmit:c}=Pn.useFormContext(),u=T.useCallback(()=>{o()},[o]);return f.jsxs(Zo,{...t,children:[f.jsx(A.Box,{sx:{"& .MuiButtonBase-root":{ml:0}},children:e?T.cloneElement(e):null}),f.jsx(A.Box,{sx:{flex:"1 1 auto"}}),r()&&f.jsx(A.Button,{variant:"text",color:"primary",onClick:s,children:a("ra.action.back")}),n()?f.jsx(A.Button,{variant:"contained",color:"primary",onClick:c(u),children:a("ra.action.next")}):f.jsx(L.SaveButton,{})]})}const QJ=A.styled(A.Stepper,{shouldForwardProp:e=>e!=="isHorizontal"})(({theme:e,isHorizontal:t})=>({paddingBottom:e.spacing(2),display:"flex",justifyContent:t?"space-between":"flex-start",".MuiStep-root":{flex:t?1:"none",maxWidth:t?"none":"100%",display:"flex",justifyContent:t?"center":"flex-start"},".MuiStepConnector-line.MuiStepConnector-lineVertical":{minHeight:12},".MuiStepConnector-vertical":{marginLeft:14.5},".MuiStepConnector-horizontal":{marginLeft:-10}})),JJ=A.styled(A.Box)(({theme:e,ownerState:t})=>({backgroundColor:t.error?e.palette.error.main:t.completed||t.active?e.palette.primary.main:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[400],zIndex:1,color:e.palette.common.white,width:30,height:30,display:"flex",borderRadius:"50%",justifyContent:"center",alignItems:"center"}));function eee({completed:e,active:t,error:n,icon:r,className:o}){return f.jsx(JJ,{ownerState:{completed:e,active:t,error:n},className:o,children:n?"!":r})}function tee({isHorizontal:e,setCurrentStep:t,stepFields:n}){const{currentStep:r,steps:o}=Yd(),{errors:s}=Pn.useFormState();function a(c){c<=r&&t(c)}return f.jsx(QJ,{activeStep:r,orientation:e?"horizontal":"vertical",isHorizontal:e,sx:{p:3,mt:1},children:o.map((c,u)=>{const d=n[u].some(m=>Z.get(s,m)),{label:h,icon:g}=c.props;return f.jsx(A.Step,{children:f.jsx(A.StepLabel,{StepIconComponent:eee,error:d,icon:g,onClick:()=>a(u),style:{cursor:u<=r?"pointer":"default"},children:e?null:h})},u)})})}function nee({title:e,subheader:t,secondary:n,toolbar:r,progress:o,isSmall:s,modal:a,sx:c,setCurrentStep:u}){const{currentStep:d,steps:h}=Yd(),g=L.useTranslate(),m=A.useTheme(),v=s||a,y=T.useMemo(()=>r?T.Children.toArray(r.props.children).find(w=>{var E;return T.isValidElement(w)&&w.type===A.Button&&((E=w.props)==null?void 0:E.children)===g("ra.action.cancel")}):null,[r,g]),C=h.map(w=>{const E=[],{sources:M}=w.props;return M!==void 0?E.push(...M):Gd(w,I=>{var j;((j=I==null?void 0:I.props)==null?void 0:j.source)!==void 0&&E.push(I.props.source)}),E});return f.jsxs(A.Grid,{container:!0,spacing:2,sx:c,children:[f.jsx(A.Grid,{item:!0,xl:a?12:2,lg:a?12:3,md:a?12:3,sm:a?12:4,xs:12,children:o||f.jsx(tee,{isHorizontal:v,setCurrentStep:u,stepFields:C})}),a?f.jsx(A.Divider,{sx:{width:"100%"}}):null,f.jsx(A.Grid,{item:!0,xl:a?12:10,lg:a?12:9,md:a?12:9,sm:a?12:8,xs:12,sx:{paddingTop:a?"0 !important":null},children:f.jsxs(En,{title:e||h[d].props.label,subheader:t,secondary:n,border:!a,divider:!0,children:[f.jsx(A.Box,{children:h[d]}),f.jsx(A.Box,{sx:{"& .MuiToolbar-root":{paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:m.spacing(2)}},children:r&&!y?r:f.jsx(ZJ,{cancelButton:y})})]})})]})}const ree=A.styled(L.Form,{shouldForwardProp:e=>e!=="modal"})(({theme:e,modal:t})=>({[e.breakpoints.down("sm")]:t?{}:{paddingBottom:`${e.spacing(2.5)}`}}));function HT({children:e,toolbar:t,progress:n,title:r,subheader:o=null,secondary:s=null,sx:a,modal:c=!1,...u}){const[d,h]=T.useState(0),g=T.Children.toArray(e),m=A.useMediaQuery(M=>M.breakpoints.down("sm"));function v(){return d<g.length-1}function y(){return d>0}function C(){h(M=>Math.min(M+1,g.length-1))}function w(){h(M=>Math.max(M-1,0))}const E={currentStep:d,steps:g,hasNextStep:v,hasPreviousStep:y,goToNextStep:C,goToPreviousStep:w};return f.jsx(XJ,{value:E,children:f.jsx(ree,{...u,modal:c,children:f.jsx(nee,{title:r,subheader:o,secondary:s,modal:c,sx:a,toolbar:t,progress:n,isSmall:m,setCurrentStep:h})})})}function oee({children:e}){return f.jsx(f.Fragment,{children:e})}HT.Step=oee;function iee(e,t){const n=Z.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=Z.chain(n.media).clone().extend(o).value();return Z.extend(n,{media:s})}case"updateDrawer":{const s=Z.chain(n.drawer).clone().extend(o).value();return Z.extend(n,{drawer:s})}case"updateLogo":{const s=Z.chain(n.logo).clone().extend(o).value();return Z.extend(n,{logo:s})}case"updateNotifications":{const s=Z.chain(n.notifications).clone().extend(o).value();return Z.extend(n,{notifications:s})}case"updateTheme":{const s=Z.chain(n.theme).clone().extend(o).value();return Z.extend(n,{theme:s})}default:return n}}const see={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},GT=T.createContext(void 0);function qT(e){var G;const t=ne.useAuthProvider(),n=ne.useGetIdentity(),r=A.useTheme(),o=A.useMediaQuery(r.breakpoints.down("md")),s=A.useMediaQuery(r.breakpoints.down("lg")),a=A.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:c,isHorizontalLayout:u,themeDirection:d,drawerWidth:h}=u0(),g=u(d)&&!s,{drawerOpen:m,openDrawer:v}=$d(),y=T.useCallback(()=>{v(!m)},[m,v]),[C,w]=T.useState(!1),[E,M]=T.useReducer(iee,Z.chain(see).clone().merge({drawer:{open:!c||m}}).value()),I=T.useCallback(()=>w(!1),[]),j=T.useMemo(()=>({state:E,dispatch:M}),[E,M]),{logoIcon:O,logoMain:F,enableNotification:k,notification:$}=e;return T.useEffect(()=>{M({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:a,horizontal:g}})},[o,s,a,g]),T.useEffect(()=>{M({type:"updateDrawer",payload:{open:m,width:h,handleDrawerToggle:y}})},[m,h,y]),T.useEffect(()=>{c||v(!a)},[a,c]),T.useEffect(()=>{M({type:"updateLogo",payload:{main:F,icon:O}})},[O,F]),T.useEffect(()=>{M({type:"updateNotifications",payload:{enable:k,resource:$??"entities/notification"}})},[k,$]),T.useEffect(()=>{M({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),T.useEffect(()=>{if(!t.isImpersonating){console.warn("authProvider does not contain a method called isImpersonating",t);return}t==null||t.isImpersonating().then(Q=>{var U;w(!Q&&((U=n==null?void 0:n.data)==null?void 0:U.needToChangePassword)===!0)})},[(G=n==null?void 0:n.data)==null?void 0:G.needToChangePassword,t]),f.jsxs(GT.Provider,{value:j,children:[f.jsx(A.Dialog,{open:C,maxWidth:"xs",fullWidth:!0,children:f.jsx(f0,{onSuccess:I,firstAccess:!0})}),e.children]})}function YT(e){return T.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:a}=t;return f.jsx(qT,{logoIcon:r,logoMain:o,enableNotification:s,notification:a,children:f.jsx(e,{ref:n,...t})})})}function C0(){const e=T.useContext(GT);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function aee(){return C0().dispatch}function Js(){return C0().state}function Yn(){return Js().media}function Vi(){return Js().drawer}function KT(){return Js().logo}function Kd(){return Js().notifications}function lee(){return Js().theme}function XT(e){const{width:t}=Vi(),{horizontal:n}=Yn(),{container:r}=mn(),[o,s]=T.useState(null);function a(u,d){s(d)}const c=$t();return f.jsx(WY,{onError:a,fallbackRender:({error:u,resetErrorBoundary:d})=>f.jsx(Qm,{error:u,errorComponent:e.error,errorInfo:o,resetErrorBoundary:d}),children:f.jsx(T.Suspense,{fallback:f.jsx(r2,{}),children:f.jsxs(A.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[f.jsx(A.Toolbar,{sx:{mt:n?8:"inherit"}})," ",f.jsx(A.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column",[c.breakpoints.down("sm")]:{px:"12px"}},children:e.children})]})})})}const ZT=de(A.Box,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({...e.mixins.toolbar,display:"flex",alignItems:"center",justifyContent:t?"flex-start":"center",paddingLeft:e.spacing(t?3:0)}));function QT({isIcon:e,sx:t,to:n,logoIcon:r,logoMain:o}){const{appDefaultPath:s}=mn();return f.jsx(A.ButtonBase,{disableRipple:!0,component:ct.Link,to:n||s,sx:t,children:e?r:o})}function JT(e){const t=A.useTheme(),{horizontal:n}=Yn(),{open:r}=Vi(),{icon:o,main:s}=KT(),a=Pr(e,{minHeight:n?"unset":"60px",width:n?{xs:"100%",lg:"424px"}:"inherit",paddingTop:n?{xs:"10px",lg:"0"}:"8px",paddingBottom:n?{xs:"18px",lg:"0"}:"8px",paddingLeft:n?{xs:"24px",lg:"0"}:r?"24px":0});return f.jsx(ZT,{theme:t,open:r,sx:a,children:f.jsx(QT,{to:"/",isIcon:!r,sx:{width:r?"auto":35,height:35},logoMain:s,logoIcon:o})})}function gC(e,t){return{width:t,borderRight:`1px solid ${e.palette.divider}`,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden",boxShadow:e.palette.mode==="dark"?e.customShadows.z1:"none"}}function mC(e){return{transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:e.spacing(7.5),borderRight:"none",boxShadow:e.customShadows.z1}}const cee=de(A.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=mn();return{width:n,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...gC(e,n),"& .MuiDrawer-paper":gC(e,n)},...!t&&{...mC(e),"& .MuiDrawer-paper":mC(e)}}});var Se={},eg={exports:{}};(function(e,t){(function(n,r){var o="1.0.39",s="",a="?",c="function",u="undefined",d="object",h="string",g="major",m="model",v="name",y="type",C="vendor",w="version",E="architecture",M="console",I="mobile",j="tablet",O="smarttv",F="wearable",k="embedded",$=500,G="Amazon",Q="Apple",U="ASUS",se="BlackBerry",ae="Browser",X="Chrome",K="Edge",W="Firefox",te="Google",V="Huawei",ee="LG",N="Microsoft",q="Motorola",ce="Opera",pe="Samsung",fe="Sharp",he="Sony",me="Xiaomi",Ae="Zebra",xe="Facebook",ye="Chromium OS",Ce="Mac OS",Ee=" Browser",ue=function(ke,Fe){var Ie={};for(var be in ke)Fe[be]&&Fe[be].length%2===0?Ie[be]=Fe[be].concat(ke[be]):Ie[be]=ke[be];return Ie},Xe=function(ke){for(var Fe={},Ie=0;Ie<ke.length;Ie++)Fe[ke[Ie].toUpperCase()]=ke[Ie];return Fe},ge=function(ke,Fe){return typeof ke===h?Ke(Fe).indexOf(Ke(ke))!==-1:!1},Ke=function(ke){return ke.toLowerCase()},Jt=function(ke){return typeof ke===h?ke.replace(/[^\d\.]/g,s).split(".")[0]:r},St=function(ke,Fe){if(typeof ke===h)return ke=ke.replace(/^\s\s*/,s),typeof Fe===u?ke:ke.substring(0,$)},gt=function(ke,Fe){for(var Ie=0,be,ft,Nt,_e,Oe,qt;Ie<Fe.length&&!Oe;){var Xn=Fe[Ie],xr=Fe[Ie+1];for(be=ft=0;be<Xn.length&&!Oe&&Xn[be];)if(Oe=Xn[be++].exec(ke),Oe)for(Nt=0;Nt<xr.length;Nt++)qt=Oe[++ft],_e=xr[Nt],typeof _e===d&&_e.length>0?_e.length===2?typeof _e[1]==c?this[_e[0]]=_e[1].call(this,qt):this[_e[0]]=_e[1]:_e.length===3?typeof _e[1]===c&&!(_e[1].exec&&_e[1].test)?this[_e[0]]=qt?_e[1].call(this,qt,_e[2]):r:this[_e[0]]=qt?qt.replace(_e[1],_e[2]):r:_e.length===4&&(this[_e[0]]=qt?_e[3].call(this,qt.replace(_e[1],_e[2])):r):this[_e]=qt||r;Ie+=2}},Fn=function(ke,Fe){for(var Ie in Fe)if(typeof Fe[Ie]===d&&Fe[Ie].length>0){for(var be=0;be<Fe[Ie].length;be++)if(ge(Fe[Ie][be],ke))return Ie===a?r:Ie}else if(ge(Fe[Ie],ke))return Ie===a?r:Ie;return Fe.hasOwnProperty("*")?Fe["*"]:ke},Tt={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},mt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ht={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[v,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[v,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[v,w],[/opios[\/ ]+([\w\.]+)/i],[w,[v,ce+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[w,[v,ce+" GX"]],[/\bopr\/([\w\.]+)/i],[w,[v,ce]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[w,[v,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[v,w],[/quark(?:pc)?\/([-\w\.]+)/i],[w,[v,"Quark"]],[/\bddg\/([\w\.]+)/i],[w,[v,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[v,"UC"+ae]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[w,[v,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[v,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[v,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[v,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[w,[v,"Smart Lenovo "+ae]],[/(avast|avg)\/([\w\.]+)/i],[[v,/(.+)/,"$1 Secure "+ae],w],[/\bfocus\/([\w\.]+)/i],[w,[v,W+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[v,ce+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[v,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[v,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[v,ce+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[v,"MIUI "+ae]],[/fxios\/([-\w\.]+)/i],[w,[v,W]],[/\bqihu|(qi?ho?o?|360)browser/i],[[v,"360"+Ee]],[/\b(qq)\/([\w\.]+)/i],[[v,/(.+)/,"$1Browser"],w],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[v,/(.+)/,"$1"+Ee],w],[/samsungbrowser\/([\w\.]+)/i],[w,[v,pe+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[v,/_/g," "],w],[/metasr[\/ ]?([\d\.]+)/i],[w,[v,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[v,"Sogou Mobile"],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[v,w],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[v],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[v,xe],w],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[v,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[v,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[v,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[v,X+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[v,X+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[v,"Android "+ae]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[v,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[v,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,v],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[v,[w,Fn,Tt]],[/(webkit|khtml)\/([\w\.]+)/i],[v,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[v,"Netscape"],w],[/(wolvic)\/([\w\.]+)/i],[v,w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[v,W+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[v,[w,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[v,[w,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[E,"amd64"]],[/(ia32(?=;))/i],[[E,Ke]],[/((?:i[346]|x)86)[;\)]/i],[[E,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[E,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[E,"armhf"]],[/windows (ce|mobile); ppc;/i],[[E,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[E,/ower/,s,Ke]],[/(sun4\w)[;\)]/i],[[E,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[E,Ke]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[m,[C,pe],[y,j]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[m,[C,pe],[y,I]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[m,[C,Q],[y,I]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[C,Q],[y,j]],[/(macintosh);/i],[m,[C,Q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[m,[C,fe],[y,I]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[m,[C,V],[y,j]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[m,[C,V],[y,I]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[m,/_/g," "],[C,me],[y,I]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[m,/_/g," "],[C,me],[y,j]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[m,[C,"OPPO"],[y,I]],[/\b(opd2\d{3}a?) bui/i],[m,[C,"OPPO"],[y,j]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[m,[C,"Vivo"],[y,I]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[m,[C,"Realme"],[y,I]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[m,[C,q],[y,I]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[m,[C,q],[y,j]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[m,[C,ee],[y,j]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[m,[C,ee],[y,I]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[m,[C,"Lenovo"],[y,j]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[m,/_/g," "],[C,"Nokia"],[y,I]],[/(pixel c)\b/i],[m,[C,te],[y,j]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[m,[C,te],[y,I]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[C,he],[y,I]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[m,"Xperia Tablet"],[C,he],[y,j]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[m,[C,"OnePlus"],[y,I]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[m,[C,G],[y,j]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[m,/(.+)/g,"Fire Phone $1"],[C,G],[y,I]],[/(playbook);[-\w\),; ]+(rim)/i],[m,C,[y,j]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[m,[C,se],[y,I]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[m,[C,U],[y,j]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[m,[C,U],[y,I]],[/(nexus 9)/i],[m,[C,"HTC"],[y,j]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[C,[m,/_/g," "],[y,I]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[m,[C,"TCL"],[y,j]],[/(itel) ((\w+))/i],[[C,Ke],m,[y,Fn,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[m,[C,"Acer"],[y,j]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[m,[C,"Meizu"],[y,I]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[m,[C,"Ulefone"],[y,I]],[/droid.+; (a(?:015|06[35]|142p?))/i],[m,[C,"Nothing"],[y,I]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[C,m,[y,I]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[C,m,[y,j]],[/(surface duo)/i],[m,[C,N],[y,j]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[m,[C,"Fairphone"],[y,I]],[/(u304aa)/i],[m,[C,"AT&T"],[y,I]],[/\bsie-(\w*)/i],[m,[C,"Siemens"],[y,I]],[/\b(rct\w+) b/i],[m,[C,"RCA"],[y,j]],[/\b(venue[\d ]{2,7}) b/i],[m,[C,"Dell"],[y,j]],[/\b(q(?:mv|ta)\w+) b/i],[m,[C,"Verizon"],[y,j]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[m,[C,"Barnes & Noble"],[y,j]],[/\b(tm\d{3}\w+) b/i],[m,[C,"NuVision"],[y,j]],[/\b(k88) b/i],[m,[C,"ZTE"],[y,j]],[/\b(nx\d{3}j) b/i],[m,[C,"ZTE"],[y,I]],[/\b(gen\d{3}) b.+49h/i],[m,[C,"Swiss"],[y,I]],[/\b(zur\d{3}) b/i],[m,[C,"Swiss"],[y,j]],[/\b((zeki)?tb.*\b) b/i],[m,[C,"Zeki"],[y,j]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[C,"Dragon Touch"],m,[y,j]],[/\b(ns-?\w{0,9}) b/i],[m,[C,"Insignia"],[y,j]],[/\b((nxa|next)-?\w{0,9}) b/i],[m,[C,"NextBook"],[y,j]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[C,"Voice"],m,[y,I]],[/\b(lvtel\-)?(v1[12]) b/i],[[C,"LvTel"],m,[y,I]],[/\b(ph-1) /i],[m,[C,"Essential"],[y,I]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[m,[C,"Envizen"],[y,j]],[/\b(trio[-\w\. ]+) b/i],[m,[C,"MachSpeed"],[y,j]],[/\btu_(1491) b/i],[m,[C,"Rotor"],[y,j]],[/(shield[\w ]+) b/i],[m,[C,"Nvidia"],[y,j]],[/(sprint) (\w+)/i],[C,m,[y,I]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[C,N],[y,I]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[C,Ae],[y,j]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[C,Ae],[y,I]],[/smart-tv.+(samsung)/i],[C,[y,O]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[C,pe],[y,O]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[C,ee],[y,O]],[/(apple) ?tv/i],[C,[m,Q+" TV"],[y,O]],[/crkey/i],[[m,X+"cast"],[C,te],[y,O]],[/droid.+aft(\w+)( bui|\))/i],[m,[C,G],[y,O]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[m,[C,fe],[y,O]],[/(bravia[\w ]+)( bui|\))/i],[m,[C,he],[y,O]],[/(mitv-\w{5}) bui/i],[m,[C,me],[y,O]],[/Hbbtv.*(technisat) (.*);/i],[C,m,[y,O]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[C,St],[m,St],[y,O]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[y,O]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[C,m,[y,M]],[/droid.+; (shield) bui/i],[m,[C,"Nvidia"],[y,M]],[/(playstation [345portablevi]+)/i],[m,[C,he],[y,M]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[m,[C,N],[y,M]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[m,[C,pe],[y,F]],[/((pebble))app/i],[C,m,[y,F]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[m,[C,Q],[y,F]],[/droid.+; (glass) \d/i],[m,[C,te],[y,F]],[/droid.+; (wt63?0{2,3})\)/i],[m,[C,Ae],[y,F]],[/(quest( \d| pro)?)/i],[m,[C,xe],[y,F]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[C,[y,k]],[/(aeobc)\b/i],[m,[C,G],[y,k]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[m,[y,I]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[m,[y,j]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[y,j]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[y,I]],[/(android[-\w\. ]{0,9});.+buil/i],[m,[C,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[v,K+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[v,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[v,w],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,v]],os:[[/microsoft (windows) (vista|xp)/i],[v,w],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[v,[w,Fn,mt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,Fn,mt],[v,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[v,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[v,Ce],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,v],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[v,w],[/\(bb(10);/i],[w,[v,se]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[w,[v,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[v,W+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[v,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[v,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[v,X+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[v,ye],w],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[v,w],[/(sunos) ?([\w\.\d]*)/i],[[v,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[v,w]]},vt=function(ke,Fe){if(typeof ke===d&&(Fe=ke,ke=r),!(this instanceof vt))return new vt(ke,Fe).getResult();var Ie=typeof n!==u&&n.navigator?n.navigator:r,be=ke||(Ie&&Ie.userAgent?Ie.userAgent:s),ft=Ie&&Ie.userAgentData?Ie.userAgentData:r,Nt=Fe?ue(Ht,Fe):Ht,_e=Ie&&Ie.userAgent==be;return this.getBrowser=function(){var Oe={};return Oe[v]=r,Oe[w]=r,gt.call(Oe,be,Nt.browser),Oe[g]=Jt(Oe[w]),_e&&Ie&&Ie.brave&&typeof Ie.brave.isBrave==c&&(Oe[v]="Brave"),Oe},this.getCPU=function(){var Oe={};return Oe[E]=r,gt.call(Oe,be,Nt.cpu),Oe},this.getDevice=function(){var Oe={};return Oe[C]=r,Oe[m]=r,Oe[y]=r,gt.call(Oe,be,Nt.device),_e&&!Oe[y]&&ft&&ft.mobile&&(Oe[y]=I),_e&&Oe[m]=="Macintosh"&&Ie&&typeof Ie.standalone!==u&&Ie.maxTouchPoints&&Ie.maxTouchPoints>2&&(Oe[m]="iPad",Oe[y]=j),Oe},this.getEngine=function(){var Oe={};return Oe[v]=r,Oe[w]=r,gt.call(Oe,be,Nt.engine),Oe},this.getOS=function(){var Oe={};return Oe[v]=r,Oe[w]=r,gt.call(Oe,be,Nt.os),_e&&!Oe[v]&&ft&&ft.platform&&ft.platform!="Unknown"&&(Oe[v]=ft.platform.replace(/chrome os/i,ye).replace(/macos/i,Ce)),Oe},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return be},this.setUA=function(Oe){return be=typeof Oe===h&&Oe.length>$?St(Oe,$):Oe,this},this.setUA(be),this};vt.VERSION=o,vt.BROWSER=Xe([v,w,g]),vt.CPU=Xe([E]),vt.DEVICE=Xe([m,C,y,M,I,O,j,F,k]),vt.ENGINE=vt.OS=Xe([v,w]),e.exports&&(t=e.exports=vt),t.UAParser=vt;var Bt=typeof n!==u&&(n.jQuery||n.Zepto);if(Bt&&!Bt.ua){var Et=new vt;Bt.ua=Et.getResult(),Bt.ua.get=function(){return Et.getUA()},Bt.ua.set=function(ke){Et.setUA(ke);var Fe=Et.getResult();for(var Ie in Fe)Bt.ua[Ie]=Fe[Ie]}}})(typeof window=="object"?window:Tn)})(eg,eg.exports);var uee=eg.exports;Object.defineProperty(Se,"__esModule",{value:!0});function dee(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var an=T,ht=dee(an),eE=uee,Qo=new eE,cn=Qo.getBrowser(),fee=Qo.getCPU(),Kn=Qo.getDevice(),w0=Qo.getEngine(),Jo=Qo.getOS(),jl=Qo.getUA(),tE=function(t){return Qo.setUA(t)},Rl=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new eE(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(o){return n.setUA(o)}}},nE=Object.freeze({ClientUAInstance:Qo,browser:cn,cpu:fee,device:Kn,engine:w0,os:Jo,ua:jl,setUa:tE,parseUserAgent:Rl});function vC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function pee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vC(Object(n),!0).forEach(function(r){vee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ha(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ha=function(t){return typeof t}:Ha=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ha(e)}function hee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mee(e,t,n){return t&&gee(e.prototype,t),e}function vee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tg(){return tg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tg.apply(this,arguments)}function yee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rg(e,t)}function ng(e){return ng=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ng(e)}function rg(e,t){return rg=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},rg(e,t)}function bee(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function br(e,t){if(e==null)return{};var n=bee(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function du(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xee(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return du(e)}function Cee(e,t){return wee(e)||Aee(e,t)||See(e,t)||Tee()}function wee(e){if(Array.isArray(e))return e}function Aee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,c;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){s=!0,c=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function See(e,t){if(e){if(typeof e=="string")return yC(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 yC(e,t)}}function yC(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 Tee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
216
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var sn={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},kn={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},ea={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},Eee={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},Iee=function(t){switch(t){case sn.Mobile:return{isMobile:!0};case sn.Tablet:return{isTablet:!0};case sn.SmartTv:return{isSmartTV:!0};case sn.Console:return{isConsole:!0};case sn.Wearable:return{isWearable:!0};case sn.Browser:return{isBrowser:!0};case sn.Embedded:return{isEmbedded:!0};default:return Eee}},Oee=function(t){return tE(t)},Le=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},A0=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},S0=function(t){var n=A0();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},Pee=function(t,n,r,o,s){return{isBrowser:t,browserMajorVersion:Le(n.major),browserFullVersion:Le(n.version),browserName:Le(n.name),engineName:Le(r.name),engineVersion:Le(r.version),osName:Le(o.name),osVersion:Le(o.version),userAgent:Le(s)}},bC=function(t,n,r,o){return pee({},t,{vendor:Le(n.vendor),model:Le(n.model),os:Le(r.name),osVersion:Le(r.version),ua:Le(o)})},jee=function(t,n,r,o){return{isSmartTV:t,engineName:Le(n.name),engineVersion:Le(n.version),osName:Le(r.name),osVersion:Le(r.version),userAgent:Le(o)}},Ree=function(t,n,r,o){return{isConsole:t,engineName:Le(n.name),engineVersion:Le(n.version),osName:Le(r.name),osVersion:Le(r.version),userAgent:Le(o)}},Mee=function(t,n,r,o){return{isWearable:t,engineName:Le(n.name),engineVersion:Le(n.version),osName:Le(r.name),osVersion:Le(r.version),userAgent:Le(o)}},kee=function(t,n,r,o,s){return{isEmbedded:t,vendor:Le(n.vendor),model:Le(n.model),engineName:Le(r.name),engineVersion:Le(r.version),osName:Le(o.name),osVersion:Le(o.version),userAgent:Le(s)}};function Fee(e){var t=e?Rl(e):nE,n=t.device,r=t.browser,o=t.engine,s=t.os,a=t.ua,c=Iee(n.type),u=c.isBrowser,d=c.isMobile,h=c.isTablet,g=c.isSmartTV,m=c.isConsole,v=c.isWearable,y=c.isEmbedded;if(u)return Pee(u,r,o,s,a);if(g)return jee(g,o,s,a);if(m)return Ree(m,o,s,a);if(d||h)return bC(c,n,s,a);if(v)return Mee(v,o,s,a);if(y)return kee(y,n,o,s,a)}var rE=function(t){var n=t.type;return n===sn.Mobile},oE=function(t){var n=t.type;return n===sn.Tablet},iE=function(t){var n=t.type;return n===sn.Mobile||n===sn.Tablet},sE=function(t){var n=t.type;return n===sn.SmartTv},Qu=function(t){var n=t.type;return n===sn.Browser},aE=function(t){var n=t.type;return n===sn.Wearable},lE=function(t){var n=t.type;return n===sn.Console},cE=function(t){var n=t.type;return n===sn.Embedded},uE=function(t){var n=t.vendor;return Le(n)},dE=function(t){var n=t.model;return Le(n)},fE=function(t){var n=t.type;return Le(n,"browser")},pE=function(t){var n=t.name;return n===ea.Android},hE=function(t){var n=t.name;return n===ea.Windows},gE=function(t){var n=t.name;return n===ea.MAC_OS},mE=function(t){var n=t.name;return n===ea.WindowsPhone},vE=function(t){var n=t.name;return n===ea.IOS},yE=function(t){var n=t.version;return Le(n)},bE=function(t){var n=t.name;return Le(n)},xE=function(t){var n=t.name;return n===kn.Chrome},CE=function(t){var n=t.name;return n===kn.Firefox},wE=function(t){var n=t.name;return n===kn.Chromium},Ju=function(t){var n=t.name;return n===kn.Edge},AE=function(t){var n=t.name;return n===kn.Yandex},SE=function(t){var n=t.name;return n===kn.Safari||n===kn.MobileSafari},TE=function(t){var n=t.name;return n===kn.MobileSafari},EE=function(t){var n=t.name;return n===kn.Opera},IE=function(t){var n=t.name;return n===kn.InternetExplorer||n===kn.Ie},OE=function(t){var n=t.name;return n===kn.MIUI},PE=function(t){var n=t.name;return n===kn.SamsungBrowser},jE=function(t){var n=t.version;return Le(n)},RE=function(t){var n=t.major;return Le(n)},ME=function(t){var n=t.name;return Le(n)},kE=function(t){var n=t.name;return Le(n)},FE=function(t){var n=t.version;return Le(n)},LE=function(){var t=A0(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},Ps=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},DE=function(){var t=A0();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},Dr=function(){return S0("iPad")},_E=function(){return S0("iPhone")},BE=function(){return S0("iPod")},NE=function(t){return Le(t)};function VE(e){var t=e||nE,n=t.device,r=t.browser,o=t.os,s=t.engine,a=t.ua;return{isSmartTV:sE(n),isConsole:lE(n),isWearable:aE(n),isEmbedded:cE(n),isMobileSafari:TE(r)||Dr(),isChromium:wE(r),isMobile:iE(n)||Dr(),isMobileOnly:rE(n),isTablet:oE(n)||Dr(),isBrowser:Qu(n),isDesktop:Qu(n),isAndroid:pE(o),isWinPhone:mE(o),isIOS:vE(o)||Dr(),isChrome:xE(r),isFirefox:CE(r),isSafari:SE(r),isOpera:EE(r),isIE:IE(r),osVersion:yE(o),osName:bE(o),fullBrowserVersion:jE(r),browserVersion:RE(r),browserName:ME(r),mobileVendor:uE(n),mobileModel:dE(n),engineName:kE(s),engineVersion:FE(s),getUA:NE(a),isEdge:Ju(r)||Ps(a),isYandex:AE(r),deviceType:fE(n),isIOS13:DE(),isIPad13:Dr(),isIPhone13:_E(),isIPod13:BE(),isElectron:LE(),isEdgeChromium:Ps(a),isLegacyEdge:Ju(r)&&!Ps(a),isWindows:hE(o),isMacOs:gE(o),isMIUI:OE(r),isSamsungBrowser:PE(r)}}var WE=sE(Kn),$E=lE(Kn),zE=aE(Kn),Lee=cE(Kn),Dee=TE(cn)||Dr(),_ee=wE(cn),Xd=iE(Kn)||Dr(),UE=rE(Kn),HE=oE(Kn)||Dr(),GE=Qu(Kn),Bee=Qu(Kn),qE=pE(Jo),YE=mE(Jo),KE=vE(Jo)||Dr(),Nee=xE(cn),Vee=CE(cn),Wee=SE(cn),$ee=EE(cn),XE=IE(cn),zee=yE(Jo),Uee=bE(Jo),Hee=jE(cn),Gee=RE(cn),qee=ME(cn),Yee=uE(Kn),Kee=dE(Kn),Xee=kE(w0),Zee=FE(w0),Qee=NE(jl),Jee=Ju(cn)||Ps(jl),ete=AE(cn),tte=fE(Kn),nte=DE(),rte=Dr(),ote=_E(),ite=BE(),ste=LE(),ate=Ps(jl),lte=Ju(cn)&&!Ps(jl),cte=hE(Jo),ute=gE(Jo),dte=OE(cn),fte=PE(cn),pte=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=Rl(t),r=n.device,o=n.browser,s=n.os,a=n.engine,c=n.ua;return VE({device:r,browser:o,os:s,engine:a,ua:c})},hte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return qE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},gte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return GE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},mte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return XE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},vte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return KE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},yte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return Xd?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},bte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return HE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},xte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return YE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},Cte=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=br(t,["renderWithFragment","children","viewClassName","style"]);return UE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},wte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return WE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},Ate=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return $E?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},Ste=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return zE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},Tte=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,s=br(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",s,r):null};function Ete(e){return function(t){yee(n,t);function n(r){var o;return hee(this,n),o=xee(this,ng(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(du(o)),o.onOrientationChange=o.onOrientationChange.bind(du(o)),o.onPageLoad=o.onPageLoad.bind(du(o)),o.state={isLandscape:!1,isPortrait:!1},o}return mee(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var o=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:o===0,isLandscape:o===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":Ha(window))!==void 0&&Xd&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return ht.createElement(e,tg({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(ht.Component)}function Ite(){var e=an.useState(function(){var s=window.innerWidth>window.innerHeight?90:0;return{isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"}}),t=Cee(e,2),n=t[0],r=t[1],o=an.useCallback(function(){var s=window.innerWidth>window.innerHeight?90:0,a={isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return an.useEffect(function(){return(typeof window>"u"?"undefined":Ha(window))!==void 0&&Xd&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),n}function ZE(e){var t=e||window.navigator.userAgent;return Rl(t)}function Ote(e){var t=e||window.navigator.userAgent,n=ZE(t),r=VE(n);return[r,n]}Se.AndroidView=hte;Se.BrowserTypes=kn;var Pte=Se.BrowserView=gte;Se.ConsoleView=Ate;Se.CustomView=Tte;Se.IEView=mte;Se.IOSView=vte;Se.MobileOnlyView=Cte;var jte=Se.MobileView=yte;Se.OsTypes=ea;Se.SmartTVView=wte;Se.TabletView=bte;Se.WearableView=Ste;Se.WinPhoneView=xte;Se.browserName=qee;Se.browserVersion=Gee;Se.deviceDetect=Fee;Se.deviceType=tte;Se.engineName=Xee;Se.engineVersion=Zee;Se.fullBrowserVersion=Hee;Se.getSelectorsByUserAgent=pte;Se.getUA=Qee;Se.isAndroid=qE;Se.isBrowser=GE;Se.isChrome=Nee;Se.isChromium=_ee;Se.isConsole=$E;Se.isDesktop=Bee;Se.isEdge=Jee;Se.isEdgeChromium=ate;Se.isElectron=ste;Se.isEmbedded=Lee;Se.isFirefox=Vee;Se.isIE=XE;Se.isIOS=KE;Se.isIOS13=nte;Se.isIPad13=rte;Se.isIPhone13=ote;Se.isIPod13=ite;Se.isLegacyEdge=lte;Se.isMIUI=dte;Se.isMacOs=ute;Se.isMobile=Xd;Se.isMobileOnly=UE;Se.isMobileSafari=Dee;Se.isOpera=$ee;Se.isSafari=Wee;Se.isSamsungBrowser=fte;Se.isSmartTV=WE;Se.isTablet=HE;Se.isWearable=zE;Se.isWinPhone=YE;Se.isWindows=cte;Se.isYandex=ete;Se.mobileModel=Kee;Se.mobileVendor=Yee;Se.osName=Uee;Se.osVersion=zee;Se.parseUserAgent=Rl;Se.setUserAgent=Oee;Se.useDeviceData=ZE;Se.useDeviceSelectors=Ote;Se.useMobileOrientation=Ite;Se.withOrientationChange=Ete;var Rte=typeof global=="object"&&global&&global.Object===Object&&global,Mte=typeof self=="object"&&self&&self.Object===Object&&self,QE=Rte||Mte||Function("return this")(),ed=QE.Symbol,JE=Object.prototype,kte=JE.hasOwnProperty,Fte=JE.toString,Ra=ed?ed.toStringTag:void 0;function Lte(e){var t=kte.call(e,Ra),n=e[Ra];try{e[Ra]=void 0;var r=!0}catch{}var o=Fte.call(e);return r&&(t?e[Ra]=n:delete e[Ra]),o}var Dte=Object.prototype,_te=Dte.toString;function Bte(e){return _te.call(e)}var Nte="[object Null]",Vte="[object Undefined]",xC=ed?ed.toStringTag:void 0;function Wte(e){return e==null?e===void 0?Vte:Nte:xC&&xC in Object(e)?Lte(e):Bte(e)}function $te(e){return e!=null&&typeof e=="object"}var zte="[object Symbol]";function Ute(e){return typeof e=="symbol"||$te(e)&&Wte(e)==zte}var Hte=/\s/;function Gte(e){for(var t=e.length;t--&&Hte.test(e.charAt(t)););return t}var qte=/^\s+/;function Yte(e){return e&&e.slice(0,Gte(e)+1).replace(qte,"")}function td(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var CC=NaN,Kte=/^[-+]0x[0-9a-f]+$/i,Xte=/^0b[01]+$/i,Zte=/^0o[0-7]+$/i,Qte=parseInt;function wC(e){if(typeof e=="number")return e;if(Ute(e))return CC;if(td(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=td(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Yte(e);var n=Xte.test(e);return n||Zte.test(e)?Qte(e.slice(2),n?2:8):Kte.test(e)?CC:+e}var eh=function(){return QE.Date.now()},Jte="Expected a function",ene=Math.max,tne=Math.min;function fu(e,t,n){var r,o,s,a,c,u,d=0,h=!1,g=!1,m=!0;if(typeof e!="function")throw new TypeError(Jte);t=wC(t)||0,td(n)&&(h=!!n.leading,g="maxWait"in n,s=g?ene(wC(n.maxWait)||0,t):s,m="trailing"in n?!!n.trailing:m);function v(F){var k=r,$=o;return r=o=void 0,d=F,a=e.apply($,k),a}function y(F){return d=F,c=setTimeout(E,t),h?v(F):a}function C(F){var k=F-u,$=F-d,G=t-k;return g?tne(G,s-$):G}function w(F){var k=F-u,$=F-d;return u===void 0||k>=t||k<0||g&&$>=s}function E(){var F=eh();if(w(F))return M(F);c=setTimeout(E,C(F))}function M(F){return c=void 0,m&&r?v(F):(r=o=void 0,a)}function I(){c!==void 0&&clearTimeout(c),d=0,r=u=o=c=void 0}function j(){return c===void 0?a:M(eh())}function O(){var F=eh(),k=w(F);if(r=arguments,o=this,u=F,k){if(c===void 0)return y(u);if(g)return clearTimeout(c),c=setTimeout(E,t),v(u)}return c===void 0&&(c=setTimeout(E,t)),a}return O.cancel=I,O.flush=j,O}var nne="Expected a function";function rne(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(nne);return td(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),fu(e,t,{leading:r,maxWait:t,trailing:o})}var Ss=function(){return Ss=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ss.apply(this,arguments)};function eI(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function tI(e){return!e||!e.ownerDocument?document:e.ownerDocument}var nI=function(e){var t={},n=Array.prototype.reduce.call(e,function(r,o){var s=o.name.match(/data-simplebar-(.+)/);if(s){var a=s[1].replace(/\W+(.)/g,function(c,u){return u.toUpperCase()});switch(o.value){case"true":r[a]=!0;break;case"false":r[a]=!1;break;case void 0:r[a]=!0;break;default:r[a]=o.value}}return r},t);return n};function rI(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function oI(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function iI(e){return".".concat(e.split(" ").join("."))}var T0=!!(typeof window<"u"&&window.document&&window.document.createElement),one=Object.freeze({__proto__:null,addClasses:rI,canUseDOM:T0,classNamesToQuery:iI,getElementDocument:tI,getElementWindow:eI,getOptions:nI,removeClasses:oI}),hs=null,AC=null;T0&&window.addEventListener("resize",function(){AC!==window.devicePixelRatio&&(AC=window.devicePixelRatio,hs=null)});function SC(){if(hs===null){if(typeof document>"u")return hs=0,hs;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),hs=n}return hs}var Po=eI,th=tI,ine=nI,jo=rI,Ro=oI,wn=iI,Kc=function(){function e(t,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var o=Po(r.el);r.scrollXTicking||(o.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(o.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,jo(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){Ro(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(jo(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){Ro(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(o){r.mouseX=o.clientX,r.mouseY=o.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(o){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var s,a;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(s=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(a=r.isWithinBounds(r.axis.y.track.rect)),(s||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(s&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(o,"x"):r.onTrackClick(o,"x")),a&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(o,"y"):r.onTrackClick(o,"y"))))}},this.drag=function(o){var s,a,c,u,d,h,g,m,v,y,C;if(!(!r.draggedAxis||!r.contentWrapperEl)){var w,E=r.axis[r.draggedAxis].track,M=(a=(s=E.rect)===null||s===void 0?void 0:s[r.axis[r.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,I=r.axis[r.draggedAxis].scrollbar,j=(u=(c=r.contentWrapperEl)===null||c===void 0?void 0:c[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&u!==void 0?u:0,O=parseInt((h=(d=r.elStyles)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&h!==void 0?h:"0px",10);o.preventDefault(),o.stopPropagation(),r.draggedAxis==="y"?w=o.pageY:w=o.pageX;var F=w-((m=(g=E.rect)===null||g===void 0?void 0:g[r.axis[r.draggedAxis].offsetAttr])!==null&&m!==void 0?m:0)-r.axis[r.draggedAxis].dragOffset;F=r.draggedAxis==="x"&&r.isRtl?((y=(v=E.rect)===null||v===void 0?void 0:v[r.axis[r.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-I.size-F:F;var k=F/(M-I.size),$=k*(j-O);r.draggedAxis==="x"&&r.isRtl&&($=!((C=e.getRtlHelpers())===null||C===void 0)&&C.isScrollingToNegative?-$:$),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=$}},this.onEndDrag=function(o){r.isDragging=!1;var s=th(r.el),a=Po(r.el);o.preventDefault(),o.stopPropagation(),Ro(r.el,r.classNames.dragging),r.onStopScrolling(),s.removeEventListener("mousemove",r.drag,!0),s.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=a.setTimeout(function(){s.removeEventListener("click",r.preventClick,!0),s.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=Ss(Ss({},e.defaultOptions),n),this.classNames=Ss(Ss({},e.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=rne(this._onMouseMove,64),this.onWindowResize=fu(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=fu(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=fu(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=t.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var o=e.getOffset(n),s=e.getOffset(r);n.scrollLeft=-999;var a=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:o.left!==s.left,isScrollingToNegative:s.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:SC()}catch{return SC()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=th(t),o=Po(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){T0&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,n;this.wrapperEl=this.el.querySelector(wn(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(wn(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(wn(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(wn(this.classNames.offset)),this.maskEl=this.el.querySelector(wn(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,wn(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(wn(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(wn(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(wn(this.classNames.track)).concat(wn(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(wn(this.classNames.track)).concat(wn(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(wn(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(wn(this.classNames.scrollbar)))||null,this.options.autoHide||(jo(this.axis.x.scrollbar.el,this.classNames.visible),jo(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=Po(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var o=!1,s=r.ResizeObserver||ResizeObserver;this.resizeObserver=new s(function(){o&&r.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){o=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=Po(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1||n>0,s=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,c=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var u=this.contentEl.scrollHeight,d=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=o?"".concat(n||d,"px"):"auto",this.placeholderEl.style.height="".concat(u,"px");var h=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&d>n,this.axis.y.isOverflowing=u>h,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=c==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var g=this.axis.x.isOverflowing?this.scrollbarWidth:0,m=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&d>s-m,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>h-g,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var n,r;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var o=this.contentEl[this.axis[t].scrollSizeAttr],s=(r=(n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])!==null&&r!==void 0?r:0,a=s/o,c;return c=Math.max(~~(a*s),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(c=Math.min(c,this.options.scrollbarMaxSize)),c},e.prototype.positionScrollbar=function(t){var n,r,o;t===void 0&&(t="y");var s=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!s.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],c=((n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])||0,u=parseInt(this.elStyles[this.axis[t].sizeAttr],10),d=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];d=t==="x"&&this.isRtl&&(!((r=e.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-d:d,t==="x"&&this.isRtl&&(d=!((o=e.getRtlHelpers())===null||o===void 0)&&o.isScrollingToNegative?d:-d);var h=d/(a-u),g=~~((c-s.size)*h);g=t==="x"&&this.isRtl?-g+(c-s.size):g,s.el.style.transform=t==="x"?"translate3d(".concat(g,"px, 0, 0)"):"translate3d(0, ".concat(g,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var n=this.axis[t].track.el,r=this.axis[t].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(jo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(Ro(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var n=this.axis[t];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(t),jo(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?jo(n.scrollbar.el,this.classNames.hover):Ro(n.scrollbar.el,this.classNames.hover)):(Ro(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),Ro(this.axis[t].track.el,this.classNames.hover),Ro(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,n){var r;n===void 0&&(n="y"),this.isDragging=!0;var o=th(this.el),s=Po(this.el),a=this.axis[n].scrollbar,c=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=c-(((r=a.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,jo(this.el,this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(s.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var r=this,o,s,a,c;n===void 0&&(n="y");var u=this.axis[n];if(!(!this.options.clickOnTrack||!u.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var d=Po(this.el);this.axis[n].scrollbar.rect=u.scrollbar.el.getBoundingClientRect();var h=this.axis[n].scrollbar,g=(s=(o=h.rect)===null||o===void 0?void 0:o[this.axis[n].offsetAttr])!==null&&s!==void 0?s:0,m=parseInt((c=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[n].sizeAttr])!==null&&c!==void 0?c:"0px",10),v=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],y=n==="y"?this.mouseY-g:this.mouseX-g,C=y<0?-1:1,w=C===-1?v-m:v+m,E=40,M=function(){r.contentWrapperEl&&(C===-1?v>w&&(v-=E,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=v,d.requestAnimationFrame(M)):v<w&&(v+=E,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=v,d.requestAnimationFrame(M)))};M()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Po(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,n){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(o){return r.call(o,n)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=ine,e.helpers=one,e}(),$n=function(){return $n=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},$n.apply(this,arguments)};function sne(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var sI=_.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,s=sne(e,["children","scrollableNodeProps"]),a=_.useRef(),c=_.useRef(),u=_.useRef(),d={},h={};Object.keys(s).forEach(function(v){Object.prototype.hasOwnProperty.call(Kc.defaultOptions,v)?d[v]=s[v]:h[v]=s[v]});var g=$n($n({},Kc.defaultOptions.classNames),d.classNames),m=$n($n({},o),{className:"".concat(g.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":d.ariaLabel||Kc.defaultOptions.ariaLabel});return _.useEffect(function(){var v;return c.current=m.ref?m.ref.current:c.current,a.current&&(v=new Kc(a.current,$n($n($n({},d),c.current&&{scrollableNode:c.current}),u.current&&{contentNode:u.current})),typeof t=="function"?t(v):t&&(t.current=v)),function(){v==null||v.unMount(),v=null,typeof t=="function"&&t(null)}},[]),_.createElement("div",$n({"data-simplebar":"init",ref:a},h),_.createElement("div",{className:g.wrapper},_.createElement("div",{className:g.heightAutoObserverWrapperEl},_.createElement("div",{className:g.heightAutoObserverEl})),_.createElement("div",{className:g.mask},_.createElement("div",{className:g.offset},typeof n=="function"?n({scrollableNodeRef:c,scrollableNodeProps:$n($n({},m),{ref:c}),contentNodeRef:u,contentNodeProps:{className:g.contentEl,ref:u}}):_.createElement("div",$n({},m),_.createElement("div",{className:g.contentEl},n)))),_.createElement("div",{className:g.placeholder})),_.createElement("div",{className:"".concat(g.track," simplebar-horizontal")},_.createElement("div",{className:g.scrollbar})),_.createElement("div",{className:"".concat(g.track," simplebar-vertical")},_.createElement("div",{className:g.scrollbar})))});sI.displayName="SimpleBar";const ane=de(Pte)({flexGrow:1,height:"100%",overflow:"hidden"}),lne=de(sI)(({theme:e})=>({maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:tt(e.palette.grey[500],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-track.simplebar-vertical":{width:10},"& .simplebar-track.simplebar-horizontal .simplebar-scrollbar":{height:6},"& .simplebar-mask":{zIndex:"inherit"}}));function aI({children:e,sx:t,...n}){return f.jsxs(f.Fragment,{children:[f.jsx(ane,{children:f.jsx(lne,{timeout:500,clickOnTrack:!1,sx:t,...n,children:e})}),f.jsx(jte,{children:f.jsx(A.Box,{sx:{overflowX:"auto",...t},...n,children:e})})]})}function lI(e){const t=A.useTheme(),n=Pr(e,{flexShrink:{md:0},zIndex:1200}),{downLg:r}=Yn(),{open:o,handleDrawerToggle:s,width:a}=Vi(),c=r?A.Drawer:cee,u=document.body,d=T.useMemo(()=>r?{container:u,variant:"temporary",onClose:s,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",lg:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:a,borderRight:`1px solid ${t.palette.divider}`,backgroundImage:"none",boxShadow:"inherit",overflow:"auto"}}}:{variant:"permanent"},[r,u,s,a,t.palette.divider]);return f.jsx(A.Box,{component:"nav",sx:n,"aria-label":"mailbox folders",children:f.jsxs(c,{...d,open:o,children:[f.jsx(JT,{}),f.jsx(aI,{sx:{"& .simplebar-content":{display:"flex",flexDirection:"column"}},children:e.children})]})})}function E0(e){const{name:t,version:n,copy:r="© Applica Software Guru for"}=e;return f.jsx(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",flexGrow:1,height:"auto",sx:{pt:1},children:f.jsxs(A.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}const cI=de(A.AppBar,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=mn();return{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...!t&&{width:`calc(100% - ${e.spacing(7.5)})`},...t&&{marginLeft:n,width:`calc(100% - ${n}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}}),uI=T.forwardRef(function(t,n){const r=Pr(t,{color:"text.primary"},{defaults:!0});return f.jsx(A.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),cne=T.forwardRef(function(t,n){const r=Pr(t,{color:"text.primary"},{defaults:!0});return f.jsx(Od,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),ta=T.forwardRef(function(t,n){const r=Pr(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return f.jsx(A.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function dI({onClick:e=void 0}){const{open:t,anchorEl:n,handleClose:r,handleToggle:o}=Qs(),[s,a]=ne.useLocaleState(),c=ne.useLocales();if(c.length===0)return null;function u(d){if(e){e(d,r);return}a(d),r()}return f.jsxs(f.Fragment,{children:[f.jsx(uI,{value:"locale",onClick:o,sx:{minWidth:"auto"},children:f.jsxs(A.Stack,{direction:"row",spacing:.5,children:[f.jsx(A.Typography,{variant:"body1",children:s.toUpperCase()}),t?f.jsx(ze.CaretUpOutlined,{}):f.jsx(ze.CaretDownOutlined,{})]})}),f.jsx(A.Menu,{id:"menu-appbar",anchorEl:n,keepMounted:!0,open:t,onClose:r,children:c.map((d,h)=>f.jsx(A.MenuItem,{onClick:()=>u(d.locale),children:d.name},h))})]})}const une={ml:{xs:0,lg:-2}};function fI(){const{open:e,handleDrawerToggle:t}=Vi();return f.jsx(ta,{value:"drawer","aria-label":"open drawer",sx:une,onChange:t,selected:e,children:e?f.jsx(ze.MenuFoldOutlined,{}):f.jsx(ze.MenuUnfoldOutlined,{})})}function pI(e){const t=T.useRef(),n=A.useTheme(),{downLg:r,horizontal:o}=Yn(),{open:s,width:a}=Vi(),c=r?A.AppBar:cI,d={position:"fixed",color:"inherit",elevation:0,sx:Pr(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}})};return r||Z.extend(d,{open:s}),f.jsx(c,{ref:t,...d,children:f.jsxs(A.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx(fI,{}),e.children]})})}function dne(e){const t=A.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:a}=Kd(),c=ne.useNotify(),u=ne.useRedirect(),[d]=ne.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:Or().toISOString()}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(u(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{c("resources.notifications.messages.readed.error","warning")}}),h=T.useCallback(()=>d(),[d]),[g]=ne.useLocaleState(),m=T.useMemo(()=>Or(n.created).locale(g).fromNow(),[n,g]);return f.jsx(A.ListItem,{disablePadding:!0,divider:s,children:f.jsxs(A.ListItemButton,{selected:o,onClick:h,children:[f.jsx(A.ListItemAvatar,{children:f.jsx(A.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(ze.MessageOutlined,{})})}),f.jsx(A.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),f.jsx(A.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(A.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:m,primaryTypographyProps:{variant:"caption"}})]})})}const fne={width:36,height:36,fontSize:"1rem"},pne={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function hI(){const{enable:e}=Kd();return e?f.jsx(hne,{}):null}function hne(){const e=ne.useTranslate(),t=A.useTheme(),n=ne.useRefresh(),r=ne.useNotify(),{downMd:o}=Yn(),{resource:s}=Kd(),[a,c]=T.useState([]),{data:u,isLoading:d}=ne.useGetList(s,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),h=a.filter(M=>M.readed===null).length,{open:g,anchorEl:m,handleClose:v,handleToggle:y}=Qs();T.useEffect(()=>{!d&&u&&c(u??[])},[u,d]);const C=a.filter(M=>!M.readed).map(M=>M.id),[w]=ne.useUpdateMany(s,{ids:C,data:{readed:Or().toISOString()}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),E=T.useCallback(()=>{w()},[w]);return f.jsxs(f.Fragment,{children:[f.jsx(ta,{value:"notifications",selected:g,onChange:y,children:f.jsx(A.Badge,{badgeContent:h,color:"primary",children:f.jsx(ze.BellOutlined,{})})}),f.jsx(A.Popper,{placement:o?"bottom":"bottom-end",open:g,anchorEl:m,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:M})=>f.jsx(Uo,{type:"grow",position:o?"top":"top-right",in:g,...M,children:f.jsx(A.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(A.ClickAwayListener,{onClickAway:v,children:f.jsxs(En,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:h>0&&f.jsx(A.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:E,children:f.jsx(Od,{color:"success",size:"small",children:f.jsx(ze.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(A.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":fne,"& .MuiListItemSecondaryAction-root":{...pne,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((I,j)=>f.jsx(dne,{selected:h>0,notification:I,onClick:v,divider:j<a.length-1},I.id))}),f.jsx(A.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${s}`,LinkComponent:ct.Link,onClick:v,children:f.jsx(A.ListItemText,{primary:f.jsx(A.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),f.jsx(A.Divider,{})]})})})})})]})}function gne(){const[e,t]=T.useState(!1),n=T.useCallback(()=>t(!1),[t]),r=T.useCallback(()=>t(!0),[t]),o=ne.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsxs(A.ListItemButton,{onClick:r,children:[f.jsx(A.ListItemIcon,{children:f.jsx(gn.Key,{})}),f.jsx(A.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(A.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(f0,{onSuccess:n})})]})}function mne(){const e=ne.useLogout(),t=ne.useTranslate();return f.jsx(f.Fragment,{children:f.jsxs(A.ListItemButton,{onClick:e,children:[f.jsx(A.ListItemIcon,{children:f.jsx(gn.LogoutOutlined,{})}),f.jsx(A.ListItemText,{primary:t("ra.auth.logout")})]})})}function vne(){const e=ne.useTranslate(),t=ne.useAuthProvider(),n=T.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t]),[r,o]=T.useState(!1);return T.useEffect(()=>{if(!t.isImpersonating){console.warn("The authProvider does not support the isImpersonating feature",t);return}t.isImpersonating().then(s=>o(s))},[t,o]),r?f.jsx(f.Fragment,{children:f.jsxs(A.ListItemButton,{onClick:n,children:[f.jsx(A.ListItemIcon,{children:f.jsx(gn.LogoutOutlined,{})}),f.jsx(A.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null}function gI(){var m;const e=A.useTheme(),t=ne.useDataProvider(),{identity:n}=ne.useGetIdentity(),r=n!==void 0&&n.image&&n.image!==null&&n.image!=="",[o,s]=T.useState(null),{open:a,anchorEl:c,handleToggle:u,handleClose:d}=Qs(),h=ne.useLogout(),g=T.useCallback(()=>{h()},[h]);return T.useEffect(()=>{r&&t.getFile("/profile/me/image").then(v=>s(v))},[t,r]),f.jsxs(f.Fragment,{children:[f.jsx(ta,{sx:{p:.25,width:"auto"},onClick:u,value:"profile",selected:a,children:f.jsxs(A.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Ou,{alt:(m=n==null?void 0:n.name)==null?void 0:m.toUpperCase(),src:o,size:"xs"}),f.jsx(A.Typography,{variant:"subtitle1",children:n==null?void 0:n.name})]})}),f.jsx(Om,{placement:"bottom-end",open:a,anchorEl:c,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:v})=>{var y;return f.jsx(Uo,{type:"grow",position:"top-right",in:a,...v,children:f.jsx(A.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(A.ClickAwayListener,{onClickAway:d,children:f.jsxs(En,{elevation:0,border:!1,content:!1,children:[f.jsx(A.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(A.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(A.Grid,{item:!0,children:f.jsxs(A.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Ou,{alt:"profile user",src:o,sx:{width:32,height:32}}),f.jsxs(A.Stack,{children:[f.jsx(A.Typography,{variant:"h6",children:n==null?void 0:n.name}),f.jsx(A.Typography,{variant:"body2",color:"textSecondary",children:(y=n==null?void 0:n.roles)==null?void 0:y.map(C=>C.name.replace("ROLE_","")).join(",")})]})]})}),f.jsx(A.Grid,{item:!0,children:f.jsx(A.Tooltip,{title:"Logout",children:f.jsx(Od,{size:"large",sx:{color:"text.primary"},onClick:g,children:f.jsx(ze.LogoutOutlined,{})})})})]})}),f.jsx(A.Grid,{container:!0,children:f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(gne,{}),f.jsx(mne,{}),f.jsx(vne,{})]})})})]})})})})}})]})}function mI(e){const t=$t(),{downMd:n}=Yn(),{open:r,anchorEl:o,handleToggle:s,handleClose:a}=Qs();return n?f.jsxs(f.Fragment,{children:[f.jsx(ta,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:f.jsx(ze.MoreOutlined,{})}),f.jsx(A.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:c})=>f.jsx(Uo,{type:"fade",in:r,...c,children:f.jsx(A.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(A.ClickAwayListener,{onClickAway:a,children:f.jsx(A.AppBar,{color:"inherit",children:f.jsx(A.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})}function vI(e){return f.jsx(A.Box,{...e,flex:1})}function yI(e){const t=A.useTheme(),n=A.useScrollTrigger({disableHysteresis:!0,threshold:0}),{container:r}=mn();return t.shadows[4]=t.customShadows.z1,f.jsx(A.AppBar,{elevation:n?4:0,sx:{top:60,bgcolor:t.palette.background.paper,width:"100%",height:62,justifyContent:"center",borderTop:`1px solid ${t.palette.divider}`,borderBottom:`1px solid ${t.palette.divider}`,zIndex:1098,color:t.palette.grey[500]},children:f.jsx(A.Container,{maxWidth:r?"xl":!1,children:f.jsx(A.Box,{sx:{display:"flex",alignItems:"center"},children:e.children})})})}function bI(e){const{horizontal:t}=Yn();return t?f.jsx(yI,{children:e.children}):f.jsx(lI,{children:e.children})}function Ga({item:e,level:t}){const n=$t(),{horizontal:r,downLg:o}=Yn(),{drawerOpen:s,openItem:a,activeItem:c,openDrawer:u}=ol();let d="_self";e.target&&(d="_blank");const h=(e==null?void 0:e.external)!==!1?{component:T.forwardRef((E,M)=>f.jsx(ct.Link,{...E,to:e.url,target:d,ref:M}))}:{component:"a",href:e.url,target:d},g=e.icon,m=e.icon?f.jsx(g,{style:{fontSize:s?"1rem":"1.25rem"}}):!1,v=a.findIndex(E=>E===e.id)>-1,{pathname:y}=ct.useLocation();T.useEffect(()=>{y.endsWith(e.url)&&c([e.id])},[y]);const C=n.palette.mode==="dark"?"grey.400":"text.primary",w=n.palette.mode==="dark"&&s?"text.primary":"primary.main";return f.jsx(f.Fragment,{children:r?f.jsxs(A.ListItemButton,{...h,disabled:e.disabled,selected:v,sx:{zIndex:1201,...s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{bgcolor:"transparent",color:w,"&:hover":{color:w,bgcolor:"transparent"}}},...!s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[m?f.jsx(A.ListItemIcon,{sx:{minWidth:36,...!s&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!s&&v&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:m}):null,!m&&f.jsx(A.ListItemIcon,{sx:{color:v?"primary.main":"secondary.main",...!s&&{borderRadius:1.5,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!s&&v&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:f.jsx(bm,{size:4,color:v?"primary":"secondary"})}),f.jsx(A.ListItemText,{primary:f.jsx(A.Typography,{variant:"h6",color:"inherit",children:e.title})}),(s||!s&&t!==1)&&e.chip?f.jsx(A.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?f.jsx(A.Avatar,{children:e.chip.avatar}):null}):null]}):f.jsxs(A.ListItemButton,{...h,disabled:e.disabled,selected:v,sx:{zIndex:1201,pl:s?`${t*28}px`:1.5,py:!s&&t===1?1.25:1,...s&&{"&:hover":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter",borderRight:`2px solid ${n.palette.primary.main}`,color:w,"&:hover":{color:w,bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"}}},...!s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},...o&&{onClick:()=>u(!1)},children:[m?f.jsx(A.ListItemIcon,{sx:{minWidth:28,color:v?w:C,...!s&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:n.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!s&&v&&{bgcolor:n.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:n.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:m}):null,s||!s&&t!==1?f.jsx(A.ListItemText,{primary:f.jsx(A.Typography,{variant:"h6",sx:{color:v?w:C},children:e.title})}):null,(s||!s&&t!==1)&&e.chip?f.jsx(A.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?f.jsx(A.Avatar,{children:e.chip.avatar}):null}):null]})})}const TC=de(A.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:38,left:-5,width:10,height:10,backgroundColor:e.palette.background.paper,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderLeft:`1px solid ${e.palette.grey.A800}`,borderBottom:`1px solid ${e.palette.grey.A800}`}}));function qa({menu:e,level:t,parentId:n,setSelectedItems:r,selectedItems:o,setSelectedLevel:s,selectedLevel:a}){var V;const c=$t(),{activeItem:u}=ol(),{horizontal:d}=Yn(),{drawerOpen:h}=ol(),g=ct.useNavigate(),[m,v]=T.useState(!1),[y,C]=T.useState(null),[w,E]=T.useState(null);function M(ee){E(null),s(t),h?(v(!m),C(y?null:e.id),r(y?"":e.id),e.url&&g(`${e.url}`)):E(ee==null?void 0:ee.currentTarget)}function I(){h||e.url&&g(`${e.url}`)}function j(ee){E(ee==null?void 0:ee.currentTarget)}function O(){v(!1),C(null),E(null)}T.useMemo(()=>{y===o?t===1&&v(!0):t===a&&(v(!1),C(null))},[o,t,y,a]);const{pathname:F}=ct.useLocation(),k=!!w;function $(ee,N){ee.forEach(q=>{q.url===F&&(v(!0),C(N))})}T.useEffect(()=>{v(!1),C(null),k&&E(null),e.children&&e.children.forEach(ee=>{var N;(N=ee.children)!=null&&N.length&&$(ee.children,e.id),ee.url===F&&(C(e.id),v(!0)),F.includes(ee.url)&&(C(e.id),v(!0))})},[F,e.children]),T.useEffect(()=>{e.url===F&&y!==e.id&&(u([e.id]),C(e.id),E(null),v(!0))},[F,e,y,u]);const G=(V=e.children)==null?void 0:V.map(ee=>{switch(ee.type){case"collapse":return f.jsx(qa,{setSelectedItems:r,setSelectedLevel:s,selectedLevel:a,selectedItems:o,menu:ee,level:t+1,parentId:n},ee.id);case"item":return f.jsx(Ga,{item:ee,level:t+1},ee.id);default:return f.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Collapse or Item"},ee.id)}}),Q=y===e.id,U=t===1?f.jsx(ze.BorderOutlined,{style:{fontSize:"1rem"}}):!1,se=e.icon,ae=e.icon?f.jsx(se,{style:{fontSize:h?"1rem":"1.25rem"}}):U,X=c.palette.mode==="dark"?"grey.400":"text.primary",K=c.palette.mode==="dark"&&h?c.palette.text.primary:c.palette.primary.main,W=k?`collapse-pop-${e.id}`:void 0,te={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"};return f.jsx(f.Fragment,{children:d?f.jsx(f.Fragment,{children:f.jsxs(A.ListItemButton,{id:`boundary-${W}`,disableRipple:!0,selected:Q,onMouseEnter:j,onMouseLeave:O,onClick:j,"aria-describedby":W,sx:{"&.Mui-selected":{bgcolor:"transparent"}},children:[f.jsxs(A.Box,{onClick:I,sx:te,children:[ae?f.jsx(A.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,color:c.palette.secondary.dark},children:ae}):null,!ae&&t!==1&&f.jsx(A.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,bgcolor:"transparent","&:hover":{bgcolor:"transparent"}},children:f.jsx(bm,{size:4,color:Q?"primary":"secondary"})}),f.jsx(A.ListItemText,{primary:f.jsx(A.Typography,{variant:"body1",color:"inherit",sx:{my:"auto"},children:e.title})}),k?f.jsx(ze.RightOutlined,{}):f.jsx(ze.DownOutlined,{})]}),w?f.jsx(TC,{id:W,open:k,anchorEl:w,placement:"right-start",style:{zIndex:2001},modifiers:[{name:"offset",options:{offset:[-10,0]}}],children:({TransitionProps:ee})=>f.jsx(Uo,{in:k,...ee,children:f.jsx(A.Paper,{sx:{overflow:"hidden",mt:1.5,py:.5,boxShadow:c.shadows[8],backgroundImage:"none"},children:f.jsx(A.ClickAwayListener,{onClickAway:O,children:f.jsx(A.Box,{children:G})})})})}):null]})}):f.jsxs(f.Fragment,{children:[f.jsxs(A.ListItemButton,{disableRipple:!0,selected:y===e.id,...!h&&{onMouseEnter:M,onMouseLeave:O},onClick:M,sx:{pl:h?`${t*28}px`:1.5,py:!h&&t===1?1.25:1,...h&&{"&:hover":{bgcolor:c.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:"transparent",color:K,"&:hover":{color:K,bgcolor:c.palette.mode==="dark"?"divider":"transparent"}}},...!h&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[ae?f.jsx(A.ListItemIcon,{onClick:I,sx:{minWidth:28,color:y===e.id?"primary.main":X,...!h&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:c.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!h&&y===e.id&&{bgcolor:c.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:c.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:ae}):null,h||!h&&t!==1?f.jsx(A.ListItemText,{primary:f.jsx(A.Typography,{variant:"h6",color:y===e.id?"primary":X,children:e.title}),secondary:e.caption?f.jsx(A.Typography,{variant:"caption",color:"secondary",children:e.caption}):null}):null,h||!h&&t!==1?k||m?f.jsx(ze.UpOutlined,{style:{fontSize:"0.625rem",marginLeft:1,color:c.palette.primary.main}}):f.jsx(ze.DownOutlined,{style:{fontSize:"0.625rem",marginLeft:1}}):null,!h&&f.jsx(TC,{open:k,anchorEl:w,placement:"right-start",style:{zIndex:2001},popperOptions:{modifiers:[{name:"offset",options:{offset:[-12,1]}}]},children:({TransitionProps:ee})=>f.jsx(Uo,{in:k,...ee,children:f.jsx(A.Paper,{sx:{overflow:"hidden",mt:1.5,boxShadow:c.customShadows.z1,backgroundImage:"none",border:`1px solid ${c.palette.divider}`},children:f.jsx(A.ClickAwayListener,{onClickAway:O,children:f.jsx(A.Box,{children:G})})})})})]}),h?f.jsx(A.Collapse,{in:m,timeout:"auto",unmountOnExit:!0,children:f.jsx(A.List,{sx:{p:0},children:G})}):null]})})}const yne=de(A.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:5,left:32,width:12,height:12,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderWidth:"6px",borderStyle:"solid",borderColor:`${e.palette.background.paper} transparent transparent ${e.palette.background.paper}`}}));function xI({item:e,lastItem:t,remItems:n,lastItemId:r,setSelectedItems:o,selectedItems:s,setSelectedLevel:a,selectedLevel:c}){var W,te;const u=$t(),d=L.useTranslate(),{pathname:h}={pathname:""},{horizontal:g,downLg:m}=Yn(),v=ol(),{drawerOpen:y,selectedID:C,activeID:w}=v,[E,M]=T.useState(null),[I,j]=T.useState(e),O=!!E;T.useEffect(()=>{if(t)if(e.id===r){const V={...e},ee=n.map(N=>N.elements);V.children=ee.flat(1),j(V)}else j(e)},[e,t,m]);function F(V,ee){V.forEach(N=>{var q;(q=N.children)!=null&&q.length&&F(N.children,I.id),N.url===h&&w(ee)})}function k(V){(V.children?V.children:[]).forEach(N=>{var q;(q=N.children)!=null&&q.length&&F(N.children,I.id),N.url===h&&w(I.id)})}T.useEffect(()=>{k(I),O&&M(null)},[h,I]);function $(V){O||M(V==null?void 0:V.currentTarget)}function G(){M(null)}const Q=I==null?void 0:I.icon,U=I!=null&&I.icon?f.jsx(Q,{style:{fontSize:20,stroke:"1.5",color:C===I.id?u.palette.primary.main:u.palette.secondary.dark}}):null,se=(W=e.children)==null?void 0:W.map(V=>{switch(V.type){case"collapse":return f.jsx(qa,{menu:V,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s,level:1,parentId:I.id},V.id);case"item":return f.jsx(Ga,{item:V,level:1},V.id);default:return f.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},V.id)}}),ae=n.map((V,ee)=>{var N;return f.jsxs(T.Fragment,{children:[V.title?f.jsx(A.Typography,{variant:"caption",sx:{pl:2},children:V.title}):null,(N=V==null?void 0:V.elements)==null?void 0:N.map(q=>{switch(q.type){case"collapse":return f.jsx(qa,{menu:q,level:1,parentId:I.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s},q.id);case"item":return f.jsx(Ga,{item:q,level:1},q.id);default:return f.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},q.id)}})]},ee)}),X=(te=I.children)==null?void 0:te.map(V=>{switch(V.type){case"collapse":return f.jsx(qa,{menu:V,level:1,parentId:I.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s},V.id);case"item":return f.jsx(Ga,{item:V,level:1},V.id);default:return f.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},V.id)}}),K=O?`group-pop-${e.id}`:void 0;return f.jsx(f.Fragment,{children:g?f.jsx(A.List,{children:f.jsxs(A.ListItemButton,{selected:C===I.id,sx:{p:1,my:.5,mr:1,display:"flex",alignItems:"center",backgroundColor:"inherit","&.Mui-selected":{bgcolor:"transparent"}},onMouseEnter:$,onClick:$,onMouseLeave:G,"aria-describedby":K,children:[U?f.jsx(A.ListItemIcon,{sx:{minWidth:28},children:I.id===r?f.jsx(ze.DownOutlined,{style:{fontSize:20,stroke:"1.5"}}):U}):null,f.jsx(A.ListItemText,{sx:{mr:1},primary:f.jsx(A.Typography,{variant:"body1",color:C===I.id?u.palette.primary.main:u.palette.secondary.dark,children:I.id===r?d("ra.actions.more"):I.title})}),O?f.jsx(ze.DownOutlined,{style:{fontSize:16,stroke:"1.5"}}):f.jsx(ze.RightOutlined,{style:{fontSize:16,stroke:"1.5"}}),E?f.jsx(yne,{id:K,open:O,anchorEl:E,placement:"bottom-start",style:{zIndex:2001},children:({TransitionProps:V})=>f.jsx(Uo,{in:O,...V,children:f.jsx(A.Paper,{sx:{mt:.5,py:1.25,boxShadow:u.shadows[8],backgroundImage:"none"},children:f.jsx(A.ClickAwayListener,{onClickAway:G,children:f.jsx(A.Box,{sx:{maxHeight:"calc(100vh - 170px)",overflowY:"auto","&::-webkit-scrollbar":{opacity:0,width:4,"&:hover":{opacity:.7}},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:u.palette.divider,borderRadius:4}},children:I.id!==r?X:ae})})})})}):null]})}):f.jsx(A.List,{subheader:e.title&&y?f.jsxs(A.Box,{sx:{pl:3,mb:1.5},children:[f.jsx(A.Typography,{variant:"subtitle2",color:u.palette.mode==="dark"?"textSecondary":"text.secondary",children:e.title}),e.caption?f.jsx(A.Typography,{variant:"caption",color:"secondary",children:e.caption}):null]}):null,sx:{mt:y&&e.title?1.5:0,py:0,zIndex:0},children:se})})}function CI(e){const{horizontal:t}=Yn(),{open:n}=Vi(),r=Pr(e,{pt:n?t?0:2:0,"& > ul:first-of-type":{mt:0},display:t?{xs:"block",lg:"flex"}:"block"});return f.jsx(A.Box,{sx:r,children:e.children})}function wI(e){const{horizontal:t}=Yn(),{menu:n,isLoading:r}=Jm(),[o,s]=T.useState(""),[a,c]=T.useState(0),{horizontalMaxItems:u}=mn(),d=t?u:void 0;let h=r?0:(n??[]).length-1,g=[],m;return!r&&d&&d<(n??[]).length&&(m=(n??[])[d-1].id,h=d-1,g=(n??[]).slice(d-1,(n??[]).length).map(v=>({title:v.title,elements:v.children,icon:v.icon}))),f.jsx(CI,{...e,children:!r&&Z.map((n??[]).slice(0,h+1),v=>{const{type:y}=v;switch(y){case"group":return f.jsx(xI,{item:v,setSelectedItems:s,setSelectedLevel:c,selectedLevel:a,selectedItems:o,lastItem:d,remItems:g,lastItemId:m},v.id);default:return f.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Navigation Group"},v.id)}})})}function bne({open:e,anchorEl:t,handleClose:n,theme:r,mode:o,toggleThemeMode:s}){const a=ne.useTranslate();return f.jsx(Om,{placement:"bottom-end",open:e,anchorEl:t,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:c})=>f.jsx(Uo,{type:"grow",position:"top-right",in:e,...c,children:f.jsx(A.Paper,{sx:{boxShadow:r.customShadows.z1,minWidth:200,[r.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(A.ClickAwayListener,{onClickAway:n,children:f.jsx(En,{elevation:0,border:!1,content:!1,children:f.jsxs(A.List,{children:[f.jsxs(A.ListItemButton,{selected:o==="light",onClick:()=>s("light"),children:[f.jsx(ze.SunOutlined,{}),f.jsx(A.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.light")})]}),f.jsxs(A.ListItemButton,{selected:o==="dark",onClick:()=>s("dark"),children:[f.jsx(ze.MoonOutlined,{}),f.jsx(A.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.dark")})]}),f.jsxs(A.ListItemButton,{selected:o==="auto",onClick:()=>s("auto"),children:[f.jsx(gn.Brightness6,{}),f.jsx(A.Typography,{variant:"subtitle1",ml:1,textTransform:"none",children:a("ra.preferences.theme.auto")})]})]})})})})})})}function AI(){const e=A.useTheme(),{mode:t,setMode:n}=mn(),{open:r,anchorEl:o,handleToggle:s,handleClose:a}=Qs(),c=T.useCallback(d=>{n(d)},[n]),u=T.useCallback(()=>{switch(t){case"light":return f.jsx(ze.SunOutlined,{});case"dark":return f.jsx(ze.MoonOutlined,{});default:return f.jsx(gn.Brightness6,{})}},[t]);return f.jsxs(ta,{value:"theme-mode","aria-label":"toggle mode",onClick:s,selected:!1,children:[f.jsx(u,{}),r?f.jsx(bne,{open:r,anchorEl:o,handleClose:a,theme:e,mode:t,toggleThemeMode:c}):null]})}const SI=T.forwardRef((e,t)=>{const n=Pr(e,{display:"flex",width:"100%"});return f.jsx(A.Box,{ref:t,...e,sx:n,children:e.children})});function I0({source:e="paper"}){const{mode:t}=mn(),n=A.useTheme();return T.useEffect(()=>{var o;const r=Z.get(n.palette.background,e);(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",r)},[t,n,e]),null}const TI=YT(function(t){const{name:n,version:r,enableThemeToggler:o,enableNotification:s,enableLocaleSwitcher:a}=t,{isLoading:c,navigation:u,breadcrumbs:d}=O2();return f.jsxs(SI,{children:[f.jsxs(pI,{children:[f.jsx(vI,{}),a?f.jsx(dI,{}):null,o?f.jsx(AI,{}):null,f.jsx(I0,{}),f.jsx(e2,{}),s?f.jsx(hI,{}):null,f.jsx(mI,{children:f.jsx(gI,{})})]}),f.jsx(bI,{children:f.jsx(wI,{})}),f.jsxs(XT,{error:t.error,children:[!c&&f.jsx(oS,{titleBottom:!0,mode:"breadcrumbs",navigation:u,breadcrumbs:d,card:!1,divider:!1,icon:!0,icons:!0}),t.children,f.jsx(ct.Outlet,{}),f.jsx(E0,{name:n,version:r,copy:t==null?void 0:t.copy})]})]})}),xne=de("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}}));function EI(){return f.jsx(xne,{children:f.jsx(A.LinearProgress,{color:"primary"})})}function Cne(e){return t=>f.jsx(T.Suspense,{fallback:f.jsx(EI,{}),children:f.jsx(e,{...t})})}function O0({title:e}){return f.jsxs(A.Stack,{direction:"row",children:[f.jsx(A.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",f.jsx(A.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]})}const wne=de(L.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}}));function II(e){return f.jsx(wne,{...e})}var sl=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(sl||{});const OI=lo().required(),PI=lo().oneOf(Object.values(sl));function Ane(e){var E;const t=Ts.useQueryClient(),[n,r]=T.useState(!1),[o,s]=T.useState(()=>()=>Promise.resolve()),a=ne.useGetIdentity(),c=(E=a==null?void 0:a.data)==null?void 0:E.email,u=ne.useDataProvider(),d=T.useCallback(()=>c?u.get("onboarding").then(M=>{var I;return(I=M==null?void 0:M.data)==null?void 0:I.value}):Promise.reject(),[u,c]),{data:h,isLoading:g,isError:m}=Ts.useQuery({queryKey:["GET","onboarding",c],queryFn:d,staleTime:24*60*60*1e3,retry:c!==void 0}),[v,y]=T.useState(()=>()=>Promise.resolve()),w=Ts.useMutation({mutationFn:v}).mutateAsync;return T.useEffect(()=>{function M(){const I=Z.chain(h??{}).clone().extend({[e]:Date.now()}).value();return u.post("onboarding",I).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}y(()=>M)},[u,h,e,t,c]),T.useEffect(()=>{r(Z.isNil((h??{})[e]))},[h,e,r]),T.useEffect(()=>{s(()=>()=>w())},[w]),{loading:g,error:m,onboardingRequired:n,acknowledgeOnboarding:o}}function Sne(e){const[t,n]=a0("onboarding",{}),[r,o]=T.useState(!1),[s,a]=T.useState(()=>()=>Promise.resolve());return T.useEffect(()=>{o(Z.isNil((t??{})[e]))},[t,e,o]),T.useEffect(()=>{a(()=>()=>(n(c=>Z.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:s}}function Tne(){return{onboardingRequired:!1,acknowledgeOnboarding:T.useRef(()=>Promise.resolve()).current}}function jI(e,t){i0({mode:PI,topic:OI}).validateSync({mode:e,topic:t});const n=Ane(t),r=Sne(t),o=Tne();switch(e){case sl.USER:return n.loading?o:n.error?r:Z.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case sl.BROWSER:return r;default:return o}}var js=(e=>(e.RESTART="RESTART",e.SET_SHOW="SET_SHOW",e.REGISTER_TIP="REGISTER_TIP",e.UNREGISTER_TIP="UNREGISTER_TIP",e.DISMISS_TIP="DISMISS_TIP",e.SET_ON_COMPLETE="SET_ON_COMPLETE",e))(js||{});function Ene(e,t){var o;const n=Z.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:s}=t;return Z.extend(n,{show:s})}case"REGISTER_TIP":{const{payload:s}=t,{id:a}=s,c=Z.chain(n.tips).clone().reject(h=>h.id===a).value(),u=Z.find(n.tips,{id:a}),d=Z.chain(u??{}).clone().extend(s).value();return c.push(d),Z.extend(n,{tips:Z.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:s}=t,a=Z.isString(s)?s:s.id,c=Z.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return Z.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:s}=t,a=Z.isString(s)?s:s.id,c=Z.chain(n.tips).reject(m=>m.id===a).value(),u=Z.find(n.tips,{id:a});if(Z.isNil(u))return n;const d=Z.chain(u).clone().extend({dismissed:!0}).value();c.push(d);const h=((o=Z.chain(c).reject(m=>m.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&Z.chain(c).reject(m=>m.step<h).reject(m=>m.dismissed??!1).isEmpty().value()&&e.onComplete(),Z.extend(n,{tips:Z.sortBy(c,["step"]),currentStep:h})}case"SET_ON_COMPLETE":{const{payload:s}=t;return Z.extend(n,{onComplete:s})}case"RESTART":{const s=Z.chain(n.tips).clone().map(a=>Z.omit(a,"dismissed")).value();return Z.extend(n,{tips:s,currentStep:0})}default:return n}}const P0=T.createContext(void 0);function Ine(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=jI(t,n),[s,a]=T.useReducer(Ene,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),c=T.useMemo(()=>({state:s,dispatch:a}),[s,a]);return T.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),T.useEffect(()=>{function u(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:u})},[o,a]),f.jsx(P0.Provider,{value:c,children:e.children})}function RI(){const e=T.useContext(P0);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function One(){return RI().state}function MI(){return RI().dispatch}function kI(e){i0({id:lo().required(),step:N2().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:s,currentStep:a}=One(),c=Z.find(s,{id:t}),{dismissed:u}=c??{},d=MI(),h=T.useCallback(()=>{d({type:js.DISMISS_TIP,payload:t})},[d,t]);return T.useEffect(()=>{(Z.isNil(c)||n!==(c==null?void 0:c.step))&&d({type:js.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c,d]),T.useEffect(()=>()=>{d({type:js.UNREGISTER_TIP,payload:t})},[t,d]),{tip:Z.chain(c??e).clone().extend({open:o&&!Z.isNil(c)&&a===n&&!u}).value(),dismiss:h}}function Pne(){const e=MI();return T.useCallback(()=>{e({type:js.RESTART})},[e])}function jne(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:s,dismiss:a}=kI({id:t,step:n,completeOnboarding:o}),{open:c}=s,u=Z.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(kd,{...u,arrow:!0,open:c,title:f.jsxs(A.Stack,{gap:1,children:[f.jsx(A.Typography,{children:r}),f.jsx(A.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const Rne=A.styled(jne)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${A.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${A.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${A.tooltipClasses.arrow}`]:{color:r.main}}}),j0=T.memo(e=>{const{page:t,rowsPerPage:n,count:r,onPageChange:o,size:s="small",className:a,...c}=e,u=ne.useTranslate(),d=Math.ceil(r/n)||1;if(d===1)return f.jsx(EC,{className:a});function h(g,m,v){return g==="page"?v?u("ra.navigation.current_page",{page:m,_:`page ${m}`}):u("ra.navigation.page",{page:m,_:`Go to page ${m}`}):u(`ra.navigation.${g}`,{_:`Go to ${g} page`})}return f.jsx(EC,{className:a,children:f.jsx(A.Pagination,{size:s,count:d,page:t+1,onChange:(g,m)=>o(g,m-1),...kne(c),getItemAriaLabel:h})})});j0.propTypes={count:x.number.isRequired,onPageChange:x.func.isRequired,page:x.number.isRequired,rowsPerPage:x.number.isRequired,color:x.oneOf(["primary","secondary","standard"]),size:x.oneOf(["small","medium","large"])};const Mne="RaPaginationActions",EC=de("div",{name:Mne,overridesResolver:e=>e.root})(()=>({flexShrink:0,ml:4}));function kne({nextIconButtonProps:e,backIconButtonProps:t,slotProps:n,...r}){return r}const R0=T.memo(e=>{const{rowsPerPageOptions:t=Fne,actions:n,limit:r=null,...o}=e,{isLoading:s,hasNextPage:a,page:c,perPage:u,total:d,setPage:h,setPerPage:g}=ne.useListPaginationContext(e),m=ne.useTranslate(),v=A.useMediaQuery(k=>k.breakpoints.down("md")),[y,C]=T.useState(c-1),w=T.useMemo(()=>d!=null?Math.ceil(d/u):void 0,[u,d]),E=T.useCallback(ut.debounce(k=>{h(k+1)},500),[h]),M=T.useCallback((k,$)=>{var U,se;if(!k)return;if(k.preventDefault(),$<0||w!==void 0&&$>w-1)throw new Error(m("ra.navigation.page_out_of_boundaries",{page:$+1}));const G=(((U=k.target.dataset)==null?void 0:U.testid)||((se=k.target.classList)==null?void 0:se.value))??"",Q=G.includes("MuiPaginationItem-previousNext")||G.includes("NavigateBeforeIcon")||G.includes("NavigateNextIcon")||G.includes("KeyboardArrowLeftIcon")||G.includes("KeyboardArrowRightIcon");C($),Q?E($):h($+1)},[E,h,m,w]),I=T.useCallback(k=>{g(Number(k.target.value))},[g]),j=T.useCallback(({from:k,to:$,count:G})=>G===-1&&a?m("ra.navigation.partial_page_range_info",{offsetBegin:k,offsetEnd:$,_:"%{from}-%{to} of more than %{to}"}):m("ra.navigation.page_range_info",{offsetBegin:k,offsetEnd:$,total:G===-1?$:G,_:"%{from}-%{to} of %{count === -1 ? to : count}"}),[m,a]),O=T.useCallback(k=>m(`ra.navigation.${k}`,{_:`Go to ${k} page`}),[m]);if(s)return f.jsx(A.Toolbar,{variant:"dense"});if(d===0||c<1||w!==void 0&&c>w)return r!=null&&process.env.NODE_ENV==="development"&&console.warn("The Pagination limit prop is deprecated. Empty state should be handled by the component displaying data (Datagrid, SimpleList)."),null;if(v)return f.jsx(A.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:M,rowsPerPageOptions:Lne,component:"span",labelDisplayedRows:j,...ne.sanitizeListRestProps(o)});const F=n||(!s&&d!=null?j0:void 0);return f.jsx(A.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:M,onRowsPerPageChange:I,ActionsComponent:F,nextIconButtonProps:{disabled:!a},component:"span",labelRowsPerPage:m("ra.navigation.page_rows_per_page"),labelDisplayedRows:j,getItemAriaLabel:O,rowsPerPageOptions:t,...ne.sanitizeListRestProps(o)})});R0.propTypes={actions:ne.ComponentPropType,limit:x.element,rowsPerPageOptions:x.arrayOf(x.oneOfType([x.number,x.shape({label:x.string.isRequired,value:x.number.isRequired})]))};const Fne=[5,10,25,50],Lne=[];function FI({children:e}){const t=ct.useLocation(),{pathname:n}=t;return T.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),f.jsx(f.Fragment,{children:e})}const Dne=de("div")({width:"100%",overflowX:"auto",display:"block"});function _ne({shadow:e,children:t,...n}){return f.jsx(En,{content:!1,border:!1,shadow:e,boxShadow:!0,...n,children:t})}function LI({title:e}){return f.jsx(A.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substring(0,1).toUpperCase()})}const Bne="RaButton";function Nne(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}const Vne=de(A.Button,{name:Bne,overridesResolver:(e,t)=>t.root})({"&.MuiButton-sizeSmall":{lineHeight:1.5}});function Ml(e){const{disableIconOnly:t=!1,label:n,children:r,className:o,color:s,size:a,disabled:c,alignIcon:u,to:d,...h}=e,g=L.useTranslate(),m=Nne(d);if(t){const v=n?g(n,{_:n}):void 0;return f.jsx(Vne,{className:o,color:s,size:a,"aria-label":v,disabled:c,startIcon:u==="left"&&r?r:void 0,endIcon:u==="right"&&r?r:void 0,...m,...h,children:v})}return f.jsx(L.Button,{...e})}function DI(e){const{className:t,icon:n=Wne,label:r="ra.action.create",resource:o,scrollToTop:s=!0,variant:a,to:c,state:u={},disableFloatingButton:d=!1,...h}=e,g=ne.useResourceContext(e),m=ne.useCreatePath(),v=ne.useTranslate(),y=A.useMediaQuery(E=>E.breakpoints.down("md")),C=ZS({},$ne.get(String(s)),u),w=qne(c);return!d&&y?f.jsx(zne,{component:ct.Link,to:m({resource:g,type:"create"}),state:C,color:"primary",className:nt(rd.floating,t),"aria-label":r?v(r):"ra.action.create",...h,...w,children:n}):f.jsx(Une,{component:ct.Link,to:m({resource:g,type:"create"}),state:C,className:nt(rd.root,t),label:r,variant:a,...h,...w,children:n})}const Wne=f.jsx(Rm,{}),$ne=new Map([["true",{_scrollToTop:!0}],["false",{}]]);DI.propTypes={resource:x.string,className:x.string,icon:x.element,label:x.string};const nd="RaCreateButton",rd={root:`${nd}-root`,floating:`${nd}-floating`},zne=de(A.Fab,{name:nd,overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${rd.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),Une=de(Ml,{name:nd,overridesResolver:(e,t)=>t.root})({});function Hne(e,t){return e.resource===t.resource&&e.label===t.label&&e.translate===t.translate&&e.disabled===t.disabled&&Du(e.to,t.to)&&Du(e.state,t.state)}const Gne=_.memo(DI,Hne);function qne(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}function M0(e,t){const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]}function Yne(e,t){return e&&e.data?{data:M0(e.data,t),total:e.total+1}:e}function Kne(e,t){return e&&e.length>0?M0(e,t):e}function Xne(e,t){return e&&e.data?{...e,data:M0(e.data,t),total:e.total+1}:e}function Zne(e){const{disableFloatingButton:t,label:n="ra.action.create",startIcon:r=f.jsx(ze.PlusCircleOutlined,{}),...o}=e,s=T.useCallback(a=>{var c;a.preventDefault(),(c=e==null?void 0:e.onClick)==null||c.call(e)},[e]);return t?f.jsx(Ml,{...o,onClick:s,label:n,children:r}):f.jsx(CY,{...e,onClick:s,label:n,children:r})}function Qne(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=Pn.useFormContext(),o=ne.useTranslate(),s=T.useCallback(a=>{a.preventDefault(),a.stopPropagation(),r(c=>t(c,n))()},[r,t,n]);return f.jsx(A.Button,{onClick:s,color:"primary",variant:"contained",size:"medium",children:o("ra.action.save")})}function Jne(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,onSubmit:s,mutationOptions:a,scroll:c="body",...u}=e,d=Ts.useQueryClient(),h=ne.useResourceContext(),g=ne.useTranslate(),m=T.Children.only(t),[v,y]=T.useState(!1),C=ne.useNotify(),w=T.useCallback(()=>y(!0),[]),E=T.useCallback(()=>y(!1),[]),M=T.useCallback((I,j,O)=>{var $,G;const k=Date.now();d.setQueryData([h,"getOne",{id:I.id}],I),d.setQueriesData([h,"getList"],Q=>Xne(Q,I),{updatedAt:k}),d.setQueriesData([h,"getMany"],Q=>Kne(Q,I),{updatedAt:k}),d.setQueriesData([h,"getManyReference"],Q=>Yne(Q,I),{updatedAt:k}),E(),C("ra.notification.created",{messageArgs:{smart_count:1}}),(G=($=e==null?void 0:e.mutationOptions)==null?void 0:$.onSuccess)==null||G.call($,I,j,O)},[E,C,e.mutationOptions,d,h]);return f.jsxs(f.Fragment,{children:[f.jsx(Zne,{...u,onClick:w}),f.jsx(A.Dialog,{open:v,scroll:c,onClose:E,maxWidth:n,fullWidth:r,fullScreen:o,children:f.jsx(A.DialogContent,{sx:{m:0,p:0},children:f.jsx(ne.CreateBase,{...e,mutationOptions:{...a,onSuccess:M},children:T.isValidElement(m)?T.cloneElement(m,{...m.props,modal:!0,toolbar:f.jsxs(Zo,{children:[f.jsx(A.Button,{variant:"text",size:"medium",onClick:E,children:g("ra.action.cancel")}),s?f.jsx(Qne,{onSubmit:s,closeDialog:E}):f.jsx(Xm,{type:"button"})]})}):null})})})]})}function ere(e){const t=T.useCallback(n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e==null?void 0:e.onClick)==null||r.call(e)},[e]);return f.jsx(i2,{...e,onClick:t})}function tre(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=Pn.useFormContext(),o=T.useCallback(s=>{s.preventDefault(),s.stopPropagation(),r(a=>t(a,n))()},[r,t,n]);return f.jsx(Ml,{disableIconOnly:!0,onClick:o,color:"primary",variant:"contained",size:"medium",label:"ra.action.save"})}function nre(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,mutationOptions:s,onSubmit:a,scroll:c="body",...u}=e,d=ne.useNotify(),[h,g]=T.useState(!1),m=T.Children.only(t),v=T.useCallback(()=>g(!0),[]),y=T.useCallback(()=>g(!1),[]),C=T.useCallback((E,M,I)=>{var j,O;y(),d("ra.notification.updated",{messageArgs:{smart_count:1},undoable:(e==null?void 0:e.mutationMode)==="undoable"}),(O=(j=e==null?void 0:e.mutationOptions)==null?void 0:j.onSuccess)==null||O.call(j,E,M,I)},[y,d,e.mutationOptions,e.mutationMode]),w=ne.useRecordContext();return f.jsxs(f.Fragment,{children:[f.jsx(ere,{...u,onClick:v}),f.jsx(A.Dialog,{open:h,scroll:c,onClose:y,fullWidth:r,maxWidth:n,fullScreen:o,keepMounted:!1,children:f.jsx(A.DialogContent,{sx:{m:0,p:0},children:f.jsx(ne.EditBase,{...e,id:w.id,mutationMode:"pessimistic",mutationOptions:{...s,onSuccess:C},children:T.isValidElement(m)?T.cloneElement(m,{...m.props,modal:!0,toolbar:f.jsxs(Zo,{children:[f.jsx(Ml,{disableIconOnly:!0,variant:"text",size:"medium",onClick:y,label:"ra.action.cancel"}),a?f.jsx(tre,{onSubmit:a,closeDialog:y}):f.jsx(Xm,{type:"button"})]})}):null})})})]})}function rre({label:e="ra.auth.sign_in",...t}){const n=L.useRecordContext(),[r,o]=T.useState(!1),s=L.useAuthProvider(),a=T.useCallback(c=>{c.stopPropagation(),c.preventDefault(),o(!0),s.impersonate(n==null?void 0:n.id).then(()=>{o(!1),document.location.href="/"})},[s,n==null?void 0:n.id]);return f.jsx(L.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:f.jsx(gn.VpnKey,{})})}function ore({source:e,label:t,variant:n="body1",record:r,spaceBottom:o,spaceTop:s,component:a,leftIcon:c,rightIcon:u,button:d,buttonProps:h,...g}){const{getCurrentDialog:m}=d0(),v=ne.useResourceContext(g),y=m(),C=ne.useRecordContext(),w=r||C,E=ut.get(w,e||"");return f.jsxs(A.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:M=>({pt:1,pb:1,borderBottom:`1px solid ${M.palette.divider}`,...o&&{mb:2},...s&&{mt:2}}),children:[f.jsxs(A.Stack,{direction:"row",alignItems:"start",children:[c?T.isValidElement(c)?T.cloneElement(c,{style:Xc}):T.createElement(c,{style:Xc}):null,f.jsx(ne.FieldTitle,{label:t,source:e,resource:y||v})]}),f.jsxs(A.Stack,{direction:"row",alignItems:"center",children:[a?T.isValidElement(a)?T.cloneElement(a,{record:w,resource:v,value:E}):T.createElement(a,{source:e,record:w,resource:v,value:E}):f.jsx(A.Typography,{variant:n,children:E}),u?T.isValidElement(u)?T.cloneElement(u,{style:Xc}):T.createElement(u,{style:Xc}):null,d?f.jsx(A.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...h,children:d}):null]})]})}const Xc={width:"1.5rem",alignSelf:"center"};function _I(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:a,selectedIds:c=[],onUnselectItems:u}=ne.useListContext(e),d=ne.useTranslate(),h=T.useCallback(()=>{u()},[u]);return f.jsx(ire,{className:r,children:f.jsxs(A.Toolbar,{"data-test":"bulk-actions-toolbar",className:nt(Tr.toolbar,{[Tr.collapsed]:c.length===0}),...ne.sanitizeListRestProps(o),children:[f.jsxs("div",{className:Tr.title,children:[f.jsx(A.IconButton,{className:Tr.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:h,size:"small",children:f.jsx(gn.Close,{fontSize:"small"})}),f.jsx(A.Typography,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:c.length})})]}),f.jsx(L.TopToolbar,{className:Tr.topToolbar,children:T.Children.map(n,g=>T.isValidElement(g)?T.cloneElement(g,{filterValues:s,resource:a,selectedIds:c}):null)})]})})}const Ci="RaBulkActionsToolbar",Tr={toolbar:`${Ci}-toolbar`,topToolbar:`${Ci}-topToolbar`,buttons:`${Ci}-buttons`,collapsed:`${Ci}-collapsed`,title:`${Ci}-title`,icon:`${Ci}-icon`},ire=de("div",{name:Ci,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${Tr.toolbar}`]:{position:"absolute",left:0,right:0,zIndex:3,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.text.primary,justifyContent:"space-between",backgroundColor:e.palette.mode==="light"?Oh(e.palette.primary.light,.8):e.palette.primary.dark,minHeight:e.spacing(6),height:e.spacing(6),transform:`translateY(-${e.spacing(6)})`,transition:`${e.transitions.create("height")}, ${e.transitions.create("min-height")}, ${e.transitions.create("transform")}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},[`& .${Tr.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${Tr.buttons}`]:{},[`& .${Tr.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${Tr.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${Tr.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),nh={p:0,m:0},IC={p:2,m:0,borderRadius:0,width:"100%"};function sre(e){const{children:t}=e,[n,r]=_.useState(null);function o(y){r(y.currentTarget)}function s(){r(null)}const a=A.useMediaQuery(y=>y.breakpoints.down("md")),{filterValues:c,resource:u,selectedIds:d=[],onUnselectItems:h}=L.useListContext(e),g=!!n&&d!==void 0&&d.length>0,m=g?"simple-popover":void 0,v=_.useCallback(()=>{h(),r(null)},[h,r]);return f.jsx(A.Fade,{in:d!==void 0&&d.length>0,children:f.jsxs(A.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[f.jsx(A.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),f.jsx(A.Popover,{id:m,open:g,anchorEl:n,onClose:s,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:f.jsxs(A.List,{sx:nh,children:[f.jsx(A.ListItem,{sx:nh,children:f.jsx(L.Button,{onClick:v,sx:IC,label:"ra.action.unselect",startIcon:f.jsx(Gh,{}),children:f.jsx(Gh,{})})}),_.Children.map(t,y=>{var C;return f.jsx(A.ListItem,{sx:nh,children:_.isValidElement(y)?_.cloneElement(y,{filterValues:c,resource:u,selectedIds:d,sx:IC,...(C=y.props)!=null&&C.popover?{closePopover:s}:{}}):null})})]})})]})})}const BI=T.createContext({});BI.displayName="DatagridContext";function are({children:e,value:t}){return f.jsx(BI.Provider,{value:t,children:e})}const OC=f.jsx(L.BulkDeleteButton,{}),NI=_.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?L.PureDatagridBody:L.DatagridBody,header:o=L.DatagridHeader,children:s,className:a,empty:c=ure,expand:u,bulkActionsToolbar:d=!1,bulkActionButtons:h=OC,hover:g,isRowSelectable:m,isRowExpandable:v,resource:y,rowClick:C,rowSx:w,rowStyle:E,size:M="small",sx:I,expandSingle:j=!1,...O}=e,{sort:F,data:k,isLoading:$,onSelect:G,onToggleItem:Q,selectedIds:U,setSort:se,total:ae}=ne.useListContext(e),X=!!h,K=T.useMemo(()=>({isRowExpandable:v,expandSingle:j}),[v,j]),W=T.useRef(null);T.useEffect(()=>{(!U||U.length===0)&&(W.current=null)},[JSON.stringify(U)]);const te=T.useCallback((V,ee)=>{const N=k.map(ce=>ce.id),q=N.indexOf(W.current);if(W.current=ee.target.checked?V:null,ee.shiftKey&&q!==-1){const ce=N.indexOf(V),pe=N.slice(Math.min(q,ce),Math.max(q,ce)+1),fe=ee.target.checked?jX(U,pe):HX(U,pe);G(m?fe.filter(he=>m(k.find(me=>me.id===he))):fe)}else Q(V)},[k,m,G,Q,U]);return $===!0?f.jsx(L.DatagridLoading,{className:a,expand:u,hasBulkActions:X,nbChildren:_.Children.count(s),size:M}):k==null||k.length===0||ae===0?c||null:f.jsx(are,{value:K,children:f.jsxs(L.DatagridRoot,{sx:I,className:nt(L.DatagridClasses.root,a),children:[d!=null&&T.isValidElement(d)?T.cloneElement(d,{selectedIds:U,total:ae}):h!==!1?f.jsx(_I,{children:T.isValidElement(h)?h:OC}):null,f.jsx("div",{className:L.DatagridClasses.tableWrapper,children:f.jsxs(A.Table,{ref:t,className:L.DatagridClasses.table,size:M,...cre(O),children:[PC(o,{children:s,sort:F,data:k,hasExpand:!!u,hasBulkActions:X,isRowSelectable:m,onSelect:G,resource:y,selectedIds:U,setSort:se},s),PC(r,{expand:u,rowClick:C,data:k,hasBulkActions:X,hover:g,onToggleItem:te,resource:y,rowSx:w,rowStyle:E,selectedIds:U,isRowSelectable:m},s)]})})]})})});function PC(e,t,n){return T.isValidElement(e)?T.cloneElement(e,t,n):T.createElement(e,t,n)}const lre=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"];function cre(e){return Object.keys(ne.sanitizeListRestProps(e)).filter(t=>!lre.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{})}NI.displayName="Datagrid";const ure=f.jsx(L.ListNoResults,{}),dre=de(NI,{slot:"root"})(({theme:e})=>({"& .RaBulkActionsToolbar-toolbar":{height:48},"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",backgroundColor:"inherit !important",textTransform:"none",fontSize:e.typography.subtitle1.fontSize}}));function fre(e){return f.jsx(dre,{...e})}const pre=de("div")(({theme:e})=>({padding:e.spacing(2)}));function hre({actions:e,className:t,...n}){const{hasCreate:r}=ne.useResourceDefinition(n),o=ne.useResourceContext(n),s=ne.useTranslate(),a=ne.useGetResourceLabel(),c=s(`resources.${o}.forcedCaseName`,{smart_count:0,_:a(o,0)}),u=s("ra.page.empty",{name:c}),d=s("ra.page.invite");return f.jsxs(gre,{className:t,children:[f.jsxs("div",{className:ji.message,children:[f.jsx(gn.Inbox,{className:ji.icon}),f.jsx(A.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${o}.empty`,{_:u})}),r?f.jsx(A.Typography,{variant:"body1",children:s(`resources.${o}.invite`,{_:d})}):null]}),f.jsx(pre,{className:ji.toolbar,children:e})]})}const pu="ApplicaEmpty",ji={message:`${pu}-message`,icon:`${pu}-icon`,toolbar:`${pu}-toolbar`},gre=de("span",{name:pu,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${ji.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${ji.icon}`]:{width:"9em",height:"9em"},[`& .${ji.toolbar}`]:{textAlign:"center",marginTop:"2em"}})),mre=f.jsx(L.ListActions,{}),vre=f.jsx(L.Pagination,{}),yre=f.jsx(L.Empty,{}),bre=A.Card;function xre(e){const{actions:t=mre,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:a,pagination:c=vre,children:u,className:d,component:h=bre,title:g,empty:m=yre,...v}=e,{defaultTitle:y,data:C,error:w,isLoading:E,filterValues:M,resource:I}=ne.useListContext(e),j=$t(),O=_.isValidElement(n);if(!u||!C&&E&&s)return null;function F(){return f.jsxs("div",{className:_r.main,style:{border:O?"1px solid":"none",borderRadius:O?4:0,borderColor:O?j.palette.mode==="dark"?j.palette.divider:j.palette.grey.A800:"transparent",backgroundColor:O?j.palette.background.paper:"transparent"},children:[r||t?f.jsx(L.ListToolbar,{className:_r.actions,filters:r,actions:t,hasCreate:a}):null,!w&&f.jsx(h,{className:_r.content,children:o&&u&&_.isValidElement(u)?T.cloneElement(u,{bulkActionButtons:o}):u}),w?f.jsx(Qm,{error:w,resetErrorBoundary:null}):c!==!1&&c]})}function k(){return m!==!1&&T.cloneElement(m,{className:_r.noResults,hasCreate:a})}const $=!E&&(C==null?void 0:C.length)===0&&!Object.keys(M).length&&m!==!1;return f.jsxs(wre,{className:nt("list-page",d),...v,children:[f.jsx(L.Title,{title:g,defaultTitle:y,preferenceKey:`${I}.list.title`}),$?k():F(),O?f.jsx(Cre,{aside:n}):null]})}function Cre({aside:e}){var r;const t=((r=e==null?void 0:e.props)==null?void 0:r.order)??-1,n=$t();return f.jsx(A.Card,{className:_r.asideCard,sx:{order:t,mr:t===-1?2:0,ml:t!==-1?2:0,width:200,border:"1px solid",borderRadius:1,borderColor:n.palette.mode==="dark"?n.palette.divider:n.palette.grey.A800,backgroundColor:n.palette.background.paper,backgroundImage:"none"},children:f.jsx(A.CardContent,{sx:{pt:1},children:T.cloneElement(e,{})})})}const gs="RaList",_r={main:`${gs}-main`,content:`${gs}-content`,actions:`${gs}-actions`,noResults:`${gs}-noResults`,asideCard:`${gs}-asideCard`},wre=de("div",{name:gs,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${_r.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${_r.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${_r.actions}`]:{},[`& .${_r.noResults}`]:{},[`& .${_r.asideCard}`]:{[e.breakpoints.down("md")]:{display:"none"},[`& .${L.SavedQueriesListClasses.floatingIcon}`]:{fontSize:"1.125rem"},[`& .${L.SavedQueriesListClasses.floatingTooltip}`]:{top:"-1.2em"},"& form":{marginTop:e.spacing(2)}}}));function Are({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=Sre,filterDefaultValues:s,perPage:a=10,queryOptions:c,resource:u,sort:d,storeKey:h,...g}){return f.jsx(ne.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:s,perPage:a,queryOptions:c,resource:u,sort:d,storeKey:h,children:f.jsx(xre,{...g})})}const Sre={},Tre=Al(Are,{slot:"root"})(({theme:e})=>({"& .RaList-main":{overflowX:"auto","& .RaBulkActionsToolbar-toolbar":{height:36,top:42,paddingTop:16,"& .RaBulkActionsToolbar-title":{alignItems:"end","& .MuiTypography-root":{alignSelf:"center"}}},"& .MuiToolbar-root":{"& form":{padding:e.spacing(2),paddingBottom:e.spacing(2),alignItems:"flex-start"}},"& .MuiButton-root":{margin:0},"& .RaList-actions":{minHeight:80,alignItems:"center",padding:e.spacing(2.5),[e.breakpoints.down("sm")]:{flexDirection:"row"},"& form":{alignItems:"center",minHeight:"auto",paddingBottom:0,rowGap:e.spacing(2.5)},"& .RaFilterForm-filterFormInput":{margin:0,"& .MuiInputLabel-root":{paddingTop:0},"& .MuiFormControl-root":{marginTop:0},"& .ra-input":{alignSelf:"center",marginTop:0},[e.breakpoints.down("sm")]:{"&>.MuiStack-root":{width:"100%","&>div:not(.MuiStack-root)":{width:"100%"}}}},"& .RaFilterFormInput-hideButton":{margin:"0 !important",alignSelf:"center"},"& > .MuiToolbar-root":{flex:"unset",padding:0,alignSelf:"center",minHeight:"fit-content",[e.breakpoints.down("sm")]:{paddingBottom:e.spacing(2)}}},"& .RaList-content":{borderRadius:0,"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}}));function Ere(e){const t=e.aside?T.Fragment:En;return f.jsx(t,{...!e.aside&&{content:!1},children:f.jsx(Tre,{...e,pagination:f.jsx(R0,{})})})}function Ire(){const e=L.useRefresh(),t=L.useNotify(),n=L.useResourceContext(),r=L.useUnselectAll(n),{selectedIds:o,data:s}=L.useListContext(),a=L.useRecordContext(),c=o.map(g=>s.find(m=>m.id===g)),[u,{isLoading:d}]=L.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Or().toISOString()},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),r()},onError:()=>t("ra.notification.readed_error",{type:"warning"}),onFailure:()=>t("ra.notification.readed_error",{type:"warning"})}),h=T.useCallback(()=>{u()},[u]);return f.jsx(L.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:h,children:f.jsx(gn.Email,{})})}function Ore(){const e=L.useRefresh(),t=L.useNotify(),n=L.useResourceContext(),r=L.useUnselectAll(n),{selectedIds:o,data:s}=L.useListContext(),a=L.useRecordContext(),c=o.map(g=>s.find(m=>m.id===g)).concat([a]),[u,{isLoading:d}]=L.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:null},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),r()},onFailure:()=>t("resources.notifications.messages.unreaded.error",{type:"warning"})}),h=T.useCallback(()=>{u()},[u]);return f.jsx(L.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:h,children:f.jsx(gn.Drafts,{})})}function Pre(e){const t=L.useRecordContext(e),n=L.useResourceContext(e),r=L.useRedirect(),o=L.useNotify(),s=L.useTranslate(),[a]=L.useLocaleState(),c=T.useMemo(()=>t!=null&&t.readed?Or(t==null?void 0:t.readed).locale(a).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,a]),[u]=L.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Or().toISOString()}},{onSuccess:()=>{t!=null&&t.resource&&(t!=null&&t.resource.startsWith("/")?r(t==null?void 0:t.resource):document.location.href=t==null?void 0:t.resource)},onError:()=>{o("ra.notification.readed_error",{type:"warning"})}}),d=T.useCallback(()=>u(),[u]);return f.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[f.jsx(A.Typography,{variant:"subtitle1",children:f.jsxs(A.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),f.jsx(A.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),c?f.jsx(A.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:s("ra.notification.readed",{readed:c})}):null]})}function jre({...e}){const t=A.useTheme(),{mode:n,colorize:r,density:o}=T.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?A.darken:A.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]);function s(a){return{backgroundColor:a!=null&&a.readed?r(t.palette.secondary[n],o):r(t.palette.primary[n],o)}}return f.jsxs(L.Datagrid,{...e,rowSx:s,children:[f.jsx(Pre,{source:"notification",sortable:!1}),f.jsx(lT,{source:"created"}),f.jsxs(Ho,{children:[f.jsx(Ire,{}),f.jsx(Ore,{})]})]})}const Rre=de(L.SimpleList,{name:"ApplicaSimpleList",slot:"root"})(({theme:e})=>({padding:e.spacing(1),paddingTop:0,paddingBottom:0}));function Mre({children:e}){const t=$t();return f.jsx(En,{sx:{maxWidth:{xs:400,lg:475},margin:{xs:2.5,md:3},"& > *":{flexGrow:1,flexBasis:"50%"}},content:!1,border:!1,boxShadow:!0,shadow:t.customShadows.z1,children:f.jsx(A.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})}function Zd({version:e,name:t,copy:n,children:r,logo:o,background:s=Fd,footer:a=!0}){return f.jsxs(A.Box,{children:[f.jsx(I0,{source:"default"}),T.isValidElement(s)?s:T.createElement(s),f.jsxs(A.Grid,{container:!0,direction:"column",justifyContent:"flex-end",children:[f.jsx(A.Grid,{item:!0,xs:12,sx:{ml:3},children:o||f.jsx(O0,{title:t})}),f.jsxs(A.Grid,{item:!0,xs:12,children:[f.jsx(A.Grid,{item:!0,xs:12,container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:{xs:"calc(100vh - 210px)",sm:"calc(100vh - 134px)",md:"calc(100vh - 112px)"}},children:f.jsx(A.Grid,{item:!0,children:f.jsx(Mre,{children:r})})}),a?f.jsx(A.Grid,{item:!0,sx:{pb:1,position:"absolute",bottom:0,ml:2},children:f.jsx(E0,{name:t,copy:n,version:e})}):null]})]})]})}function kre({name:e,copy:t,logo:n,version:r,background:o}){const s=ne.useTranslate(),a=ne.useAuthProvider(),c=ne.useNotify(),u=ct.useNavigate(),{token:d}=ct.useParams();return T.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(d).then(()=>{c("ra.auth.activate_success",{type:"info"}),Z.delay(()=>u("/login"),1e3)}).catch(h=>{c(h,{type:"error"}),Z.delay(()=>u("/login"),1e3)})},[d,a,c,u]),f.jsx(Zd,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(A.Grid,{container:!0,spacing:3,children:[f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(A.Typography,{variant:"h3",children:s("ra.auth.activate")}),f.jsx(A.Typography,{component:ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:s("ra.auth.back_to_login")})]})}),f.jsx(A.Grid,{item:!0,xs:12,children:s("ra.auth.activate_pending")})]})})}function VI(){const e=T.useCallback(()=>location.reload(),[]);return f.jsx(A.Container,{children:f.jsxs(A.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[f.jsx("img",{alt:"Error",src:AS,style:{width:"100%",maxWidth:450}}),f.jsx(A.Typography,{variant:"h2",children:"Ops! An error occurred..."}),f.jsx(A.Typography,{children:"We're fixing the problem. Please try again later."}),f.jsx(A.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}function WI({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:s=!1,redirectTo:a,background:c=f.jsx(Fd,{})}){const[u,d]=ne.useSafeSetState(!1),h=ne.useLogin(),g=ne.useTranslate(),m=ne.useNotify(),v=ne.useCheckAuth(),y=ct.useNavigate();T.useEffect(()=>{v({},!1).then(()=>{y("/")}).catch(()=>{})},[v,y]);function C(w){d(!0),h(w,a).then(()=>{d(!1)}).catch(E=>{d(!1),m(typeof E=="string"?E:typeof E>"u"||!E.message?"ra.auth.sign_in_error":E.message,{type:"error",messageArgs:{_:typeof E=="string"?E:E&&E.message?E.message:void 0}})})}return f.jsx(Zd,{name:t,version:e,copy:n,logo:r,background:c,children:f.jsxs(A.Grid,{container:!0,spacing:3,children:[f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(A.Typography,{variant:"h3",children:"Login"}),s?f.jsx(A.Typography,{component:ct.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:g("ra.auth.register")}):null]})}),f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(ne.Form,{onSubmit:C,children:[f.jsxs(A.Grid,{container:!0,children:[f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(Er,{autoFocus:!0,source:"username",label:g("ra.auth.username"),autoComplete:"username",validate:ne.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(Er,{source:"password",label:g("ra.auth.password"),type:"password",autoComplete:"current-password",validate:ne.required(),placeholder:g("ra.auth.password_placeholder"),fullWidth:!0})})]}),o?f.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(A.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:f.jsx(A.Link,{variant:"h6",component:ct.Link,to:"/recover",color:"text.primary",children:g("ra.auth.forgot_password")})})}):null,f.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(A.Button,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0,children:u?f.jsx(A.CircularProgress,{size:19,thickness:3}):g("ra.auth.sign_in")})})]})})]})})}function Fre({name:e,copy:t,logo:n,version:r,background:o}){const[s,a]=T.useState(!1),c=ne.useTranslate(),u=ne.useRedirect(),d=ne.useNotify(),h=ne.useAuthProvider();function g({email:m}){a(!0),h.recover(m).then(v=>{const y=`ra.auth.recover_${v.responseCode}`,C=v.responseCode==="ok"?"info":"error";d(y,{type:C}),u("/login")}).catch(v=>{d((v==null?void 0:v.message)||(v==null?void 0:v.toString()),{type:"error"})}).finally(()=>a(!1))}return f.jsx(Zd,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(A.Grid,{container:!0,spacing:3,children:[f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(A.Typography,{variant:"h3",children:c("ra.auth.recover.title")}),f.jsx(A.Typography,{component:ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.back_to_login")})]})}),f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(L.Form,{onSubmit:g,children:[f.jsx(A.Grid,{container:!0,children:f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Er,{source:"email",validate:[ne.required(),ne.email()]})})}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:f.jsx(A.Typography,{variant:"caption",children:c("ra.auth.recover.inbox_help")})}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(A.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(A.CircularProgress,{size:19,thickness:3}):c("ra.auth.recover")})})]})})]})})}function Lre({name:e,copy:t,version:n,logo:r,background:o}){const[s,a]=T.useState(!1),c=ne.useTranslate(),u=ne.useRedirect(),d=ne.useNotify(),h=ne.useAuthProvider();function g(m){a(!0),h.register(m).then(v=>{const y=`ra.auth.register_${v.responseCode}`,C=v.responseCode==="ok"?"info":"error";d(y,{type:C}),u("/login")}).catch(v=>{d(v,{type:"error"})}).finally(()=>a(!1))}return f.jsx(Zd,{name:e,copy:t,logo:r,background:o,version:n,children:f.jsxs(A.Grid,{container:!0,spacing:3,children:[f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(A.Typography,{variant:"h3",children:c("ra.auth.register.title")}),f.jsx(A.Typography,{component:ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.already_have_account")})]})}),f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(L.Form,{onSubmit:g,children:[f.jsxs(A.Grid,{container:!0,children:[f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Er,{source:"name",label:c("ra.register.name"),validate:ne.required()})}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Er,{source:"email",type:"email",validate:[ne.required(),ne.email()]})}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Er,{source:"password",type:"password",validate:ne.required()})})]}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(A.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(A.CircularProgress,{size:19,thickness:3}):c("ra.auth.create_account")})})]})})]})})}function Dre(e){return{MuiAccordion:{defaultProps:{disableGutters:!0,square:!0,elevation:0},styleOverrides:{root:{border:`1px solid ${e.palette.secondary.light}`,"&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-disabled":{backgroundColor:e.palette.secondary.lighter}}}}}}function _re(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function Bre(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:f.jsx(ze.RightOutlined,{style:{fontSize:"0.75rem"}})},styleOverrides:{root:{backgroundColor:t.secondary.lighter,flexDirection:"row-reverse",minHeight:46},expandIconWrapper:{"&.Mui-expanded":{transform:"rotate(90deg)"}},content:{marginTop:n(1.25),marginBottom:n(1.25),marginLeft:n(1)}}}}}function pi({color:e,theme:t}){const n=Qt(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:tt(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function Nre(e){const t=pi({color:"primary",theme:e});return{MuiAlert:{styleOverrides:{root:{color:e.palette.text.primary,fontSize:"0.875rem"},icon:{fontSize:"1rem"},message:{padding:0,marginTop:3},filled:{color:e.palette.grey[0]},border:{padding:"10px 16px",border:"1px solid",...t,"&.MuiAlert-borderPrimary":pi({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":pi({color:"secondary",theme:e}),"&.MuiAlert-borderError":pi({color:"error",theme:e}),"&.MuiAlert-borderSuccess":pi({color:"success",theme:e}),"&.MuiAlert-borderInfo":pi({color:"info",theme:e}),"&.MuiAlert-borderWarning":pi({color:"warning",theme:e})},action:{"& .MuiButton-root":{padding:2,height:"auto",fontSize:"0.75rem",marginTop:-2},"& .MuiIconButton-root":{width:"auto",height:"auto",padding:2,marginRight:6,"& .MuiSvgIcon-root":{fontSize:"1rem"}}}}}}}function Vre(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function Wre(e){var t;return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},popper:{border:`1px solid ${e.palette.mode==="dark"?(t=e.palette.dark)==null?void 0:t.main:e.palette.grey[100]}`},clearIndicator:{width:"auto",height:"auto"}}}}}function hi({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function $re(e){const t=hi({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":hi({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":hi({color:"secondary",theme:e}),"&.MuiBadge-colorError":hi({color:"error",theme:e}),"&.MuiBadge-colorInfo":hi({color:"info",theme:e}),"&.MuiBadge-colorSuccess":hi({color:"success",theme:e}),"&.MuiBadge-colorWarning":hi({color:"warning",theme:e})}}}}}function Ze({variant:e,color:t,theme:n}){const r=Qt(n,t),{lighter:o,main:s,dark:a,contrastText:c}=r,u=`${t}Button`,d=Us(n,u),h={"&::after":{boxShadow:`0 0 5px 5px ${tt(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${tt(s,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...h};case"shadow":return{color:c,backgroundColor:s,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:a},...h};case"outlined":return{borderColor:s,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...h};case"dashed":return{color:s,borderColor:s,backgroundColor:o,"&:hover":{color:a,borderColor:a},...h};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...h}}}function zre(e){const t=Ze({variant:"dashed",color:"primary",theme:e}),n=Ze({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":Ze({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":Ze({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":Ze({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":Ze({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":Ze({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":Ze({variant:"dashed",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},shadow:{...n,"&.MuiButton-shadowPrimary":Ze({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":Ze({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":Ze({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":Ze({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":Ze({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":Ze({variant:"shadow",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},containedPrimary:Ze({variant:"contained",color:"primary",theme:e}),containedSecondary:Ze({variant:"contained",color:"secondary",theme:e}),containedError:Ze({variant:"contained",color:"error",theme:e}),containedSuccess:Ze({variant:"contained",color:"success",theme:e}),containedInfo:Ze({variant:"contained",color:"info",theme:e}),containedWarning:Ze({variant:"contained",color:"warning",theme:e}),outlinedPrimary:Ze({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:Ze({variant:"outlined",color:"secondary",theme:e}),outlinedError:Ze({variant:"outlined",color:"error",theme:e}),outlinedSuccess:Ze({variant:"outlined",color:"success",theme:e}),outlinedInfo:Ze({variant:"outlined",color:"info",theme:e}),outlinedWarning:Ze({variant:"outlined",color:"warning",theme:e}),textPrimary:Ze({variant:"text",color:"primary",theme:e}),textSecondary:Ze({variant:"text",color:"secondary",theme:e}),textError:Ze({variant:"text",color:"error",theme:e}),textSuccess:Ze({variant:"text",color:"success",theme:e}),textInfo:Ze({variant:"text",color:"info",theme:e}),textWarning:Ze({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function Ure(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function Hre(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function Gre(){return{MuiCard:{styleOverrides:{root:{boxShadow:"none"}}}}}function qre(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function ls({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function Yre(e){switch(e){case"small":return{size:16,fontSize:1,position:1};case"large":return{size:24,fontSize:1.6,position:2};case"medium":default:return{size:20,fontSize:1.35,position:2}}}function rh(e){const t=Yre(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function Kre(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:f.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:f.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(ze.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:f.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(ze.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...rh("small")},"&.size-medium":{...rh("medium")},"&.size-large":{...rh("large")}},colorPrimary:ls({color:"primary",theme:e}),colorSecondary:ls({color:"secondary",theme:e}),colorSuccess:ls({color:"success",theme:e}),colorWarning:ls({color:"warning",theme:e}),colorInfo:ls({color:"info",theme:e}),colorError:ls({color:"error",theme:e})}}}}function cs({color:e,theme:t}){const n=Qt(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Wn({color:e,theme:t}){const n=Qt(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function Xre(e){const t=Wn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":cs({color:"primary",theme:e}),"&.MuiChip-colorSecondary":cs({color:"secondary",theme:e}),"&.MuiChip-colorError":cs({color:"error",theme:e}),"&.MuiChip-colorInfo":cs({color:"info",theme:e}),"&.MuiChip-colorSuccess":cs({color:"success",theme:e}),"&.MuiChip-colorWarning":cs({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":Wn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":Wn({color:"secondary",theme:e}),"&.MuiChip-lightError":Wn({color:"error",theme:e}),"&.MuiChip-lightInfo":Wn({color:"info",theme:e}),"&.MuiChip-lightSuccess":Wn({color:"success",theme:e}),"&.MuiChip-lightWarning":Wn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":Wn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":Wn({color:"secondary",theme:e}),"&.MuiChip-combinedError":Wn({color:"error",theme:e}),"&.MuiChip-combinedInfo":Wn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":Wn({color:"success",theme:e}),"&.MuiChip-combinedWarning":Wn({color:"warning",theme:e})}}}}}function Zre(e){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:tt("#000",.7)},"& .MuiCardContent-root":{[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}},"& .MuiPaper-root:has(.tabbed-form)":{overflowY:"unset",width:"100%"}}}}}}function Qre(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function Jre(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function us({color:e,theme:t}){const n=Qt(t,e),{main:r,dark:o,contrastText:s}=n,a=`${e}Button`,c=Us(t,a);return{color:s,backgroundColor:r,boxShadow:c,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${tt(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${tt(r,.9)}`}}}function eoe(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":us({color:"primary",theme:e}),"&.MuiFab-secondary":us({color:"secondary",theme:e}),"&.Mui-error":us({color:"error",theme:e}),"&.MuiFab-success":us({color:"success",theme:e}),"&.MuiFab-info":us({color:"info",theme:e}),"&.MuiFab-warning":us({color:"warning",theme:e}),"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}}}}}}function toe(e){return{MuiIconButton:{styleOverrides:{root:{borderRadius:4},sizeLarge:{width:e.spacing(5.5),height:e.spacing(5.5),fontSize:"1.25rem"},sizeMedium:{width:e.spacing(4.5),height:e.spacing(4.5),fontSize:"1rem"},sizeSmall:{width:e.spacing(3.75),height:e.spacing(3.75),fontSize:"0.75rem"},sizeExtraSmall:{width:e.spacing(2.6875),height:e.spacing(2.6875),fontSize:"0.625rem"}}}}}function noe(e){return{MuiInputBase:{styleOverrides:{}}}}function roe(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1.3em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function ooe(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function ioe(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function soe(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function aoe(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function loe(e){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function coe(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function gi({variant:e,theme:t}){const n=Qt(t,e),{light:r}=n,o=Us(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function uoe(e){return{MuiOutlinedInput:{styleOverrides:{input:{padding:"10.5px 14px 10.5px 12px"},notchedOutline:{borderColor:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[300]},root:{...gi({variant:"primary",theme:e}),"&.Mui-error":{...gi({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:gi({variant:"secondary",theme:e}),colorError:gi({variant:"error",theme:e}),colorWarning:gi({variant:"warning",theme:e}),colorInfo:gi({variant:"info",theme:e}),colorSuccess:gi({variant:"success",theme:e})}}}}function doe(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function At({variant:e,color:t,theme:n}){const r=Qt(n,t),{lighter:o,light:s,dark:a,main:c,contrastText:u}=r,d={"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:u,backgroundColor:c,"&:hover":{backgroundColor:s},...d};case"outlined":return{borderColor:c,"&:hover":{backgroundColor:o,borderColor:s},...d};case"text":default:return{color:c,"&:hover":{backgroundColor:c,color:o},...d}}}function foe(e){return{MuiPaginationItem:{styleOverrides:{root:{"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},text:{"&.Mui-selected":{backgroundColor:"transparent",fontSize:"1rem",fontWeight:500,"&.MuiPaginationItem-textPrimary":At({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":At({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":At({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":At({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":At({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":At({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":At({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":At({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":At({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":At({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":At({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":At({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":At({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":At({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":At({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":At({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":At({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":At({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":At({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":At({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":At({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":At({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":At({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":At({variant:"outlined",color:"warning",theme:e})}}}}}}function poe(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function ds({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o,dark:s}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function hoe(e){switch(e){case"small":return{size:16,dotSize:8,position:3};case"large":return{size:24,dotSize:12,position:5};case"medium":default:return{size:20,dotSize:10,position:4}}}function oh(e){const t=hoe(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function goe(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:f.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:f.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:f.jsx(A.Box,{className:"dot",sx:{width:8,height:8,backgroundColor:"inherit",borderRadius:"50%",position:"absolute",top:3,left:3}})})},styleOverrides:{root:{color:t.secondary[300],"&.size-small":{...oh("small")},"&.size-medium":{...oh("medium")},"&.size-large":{...oh("large")}},colorPrimary:ds({color:"primary",theme:e}),colorSecondary:ds({color:"secondary",theme:e}),colorSuccess:ds({color:"success",theme:e}),colorWarning:ds({color:"warning",theme:e}),colorInfo:ds({color:"info",theme:e}),colorError:ds({color:"error",theme:e})}}}}function fs({color:e,theme:t}){const n=Qt(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function moe(e){return{MuiSlider:{styleOverrides:{track:{height:"1px"},thumb:{width:14,height:14,border:`2px solid ${e.palette.primary.main}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-thumbColorPrimary":fs({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":fs({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":fs({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":fs({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":fs({color:"info",theme:e}),"&.MuiSlider-thumbColorError":fs({color:"error",theme:e})},mark:{width:4,height:4,borderRadius:"50%",border:`1px solid ${e.palette.secondary.light}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-markActive":{opacity:1,borderColor:"inherit",borderWidth:2}},rail:{color:e.palette.secondary.light},root:{"&.Mui-disabled":{".MuiSlider-rail":{opacity:.25},".MuiSlider-track":{color:e.palette.secondary.lighter},".MuiSlider-thumb":{border:`2px solid ${e.palette.secondary.lighter}`}}},valueLabel:{backgroundColor:e.palette.grey[600],color:e.palette.grey[0]}}}}}function voe(e){switch(e){case"small":return{width:28,height:16,base:12,thumb:10,trackRadius:8};case"large":return{width:60,height:28,base:32,thumb:22,trackRadius:24};case"medium":default:return{width:44,height:22,base:22,thumb:16,trackRadius:16}}}function ih(e,t){const n=voe(t);return{width:n.width,height:n.height,"& .MuiSwitch-switchBase":{padding:3,"&.Mui-checked":{transform:`translateX(${n.base}px)`}},"& .MuiSwitch-thumb":{width:n.thumb,height:n.thumb},"& .MuiSwitch-track":{borderRadius:n.trackRadius}}}function yoe(e){return{MuiSwitch:{styleOverrides:{track:{opacity:1,backgroundColor:e.palette.secondary[400],boxSizing:"border-box"},thumb:{borderRadius:"50%",transition:e.transitions.create(["width"],{duration:200})},switchBase:{"&.Mui-checked":{color:"#fff","& + .MuiSwitch-track":{opacity:1},"&.Mui-disabled":{color:e.palette.background.paper}},"&.Mui-disabled":{color:e.palette.background.paper,"+.MuiSwitch-track":{opacity:.3}}},root:{color:e.palette.text.primary,padding:0,margin:8,display:"flex","& ~ .MuiFormControlLabel-label":{margin:6},...ih(e,"medium")},sizeLarge:{...ih(e,"large")},sizeSmall:{...ih(e,"small")}}}}}function boe(e){return{MuiTab:{styleOverrides:{root:{minHeight:46,color:e.palette.text.primary,borderRadius:4,"&:hover":{backgroundColor:e.palette.primary.lighter+60,color:e.palette.primary.main},"&:focus-visible":{borderRadius:4,outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:-3}}}}}}function xoe(e){const t={"&:hover":{backgroundColor:e.palette.secondary.lighter}};return{MuiTableBody:{styleOverrides:{root:{"&.striped .MuiTableRow-root":{"&:nth-of-type(even)":{backgroundColor:e.palette.grey[50]},...t},"& .MuiTableRow-root":{...t}}}}}}function Coe(e){const t={"&:not(:last-of-type)":{position:"relative","&:after":{position:"absolute",content:'""',backgroundColor:e.palette.divider,width:1,height:"calc(100% - 30px)",right:0,top:16}}};return{MuiTableCell:{styleOverrides:{root:{fontSize:"0.875rem",padding:12,borderColor:e.palette.divider},sizeSmall:{padding:8},head:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",...t},footer:{fontSize:"0.75rem",textTransform:"uppercase",...t}}}}}function woe(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function Aoe(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function Soe(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function Toe(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function Eoe(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function Ioe(e){return{MuiToggleButton:{styleOverrides:{root:{"&.Mui-disabled":{borderColor:e.palette.divider,color:e.palette.text.disabled},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}}}}}}function Ooe(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function Poe(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function joe(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function Roe(e){return ut.merge(Dre(e),_re(e),Bre(e),Nre(e),Vre(),Wre(e),$re(e),zre(e),Ure(),Hre(),Gre(),qre(),Kre(e),Xre(e),Zre(e),Qre(e),Jre(),eoe(e),toe(e),noe(),roe(e),ooe(),ioe(),soe(e),aoe(e),loe(),coe(),uoe(e),doe(),foe(e),poe(e),goe(e),moe(e),yoe(e),boe(e),xoe(e),Coe(e),woe(e),Aoe(e),Soe(),Toe(),Eoe(),Ioe(e),Ooe(e),Poe(),joe())}function Moe(e){const{blue:t,red:n,gold:r,cyan:o,green:s,grey:a}=e,c={0:a[0],50:a[1],100:a[2],200:a[3],300:a[4],400:a[5],500:a[6],600:a[7],700:a[8],800:a[9],900:a[10],A50:a[15],A100:a[11],A200:a[12],A400:a[13],A700:a[14],A800:a[16]},u="#fff";return{primary:{lighter:t[0],100:t[1],200:t[2],light:t[3],400:t[4],main:t[5],dark:t[6],700:t[7],darker:t[8],900:t[9],contrastText:u},secondary:{lighter:c[100],100:c[100],200:c[200],light:c[300],400:c[400],main:c[500],600:c[600],dark:c[700],800:c[800],darker:c[900],A100:c[0],A200:c.A400,A300:c.A700,contrastText:c[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:u},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:c[100]},info:{lighter:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:u},success:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:u},grey:c}}function koe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],c=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],u=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(s=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],c=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],u=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Foe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Loe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Doe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function _oe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Boe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Noe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Voe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Woe(e,t,n){switch(t){case"theme1":return koe(e,n);case"theme2":return Foe(e,n);case"theme3":return Loe(e,n);case"theme4":return Doe(e,n);case"theme5":return _oe(e,n);case"theme6":return Boe(e,n);case"theme7":return Noe(e,n);case"theme8":return Voe(e,n);default:return Moe(e)}}var og=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];og.primary=og[5];var ig=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];ig.primary=ig[5];var sg=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];sg.primary=sg[5];var ag=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];ag.primary=ag[5];var lg=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];lg.primary=lg[5];var cg=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];cg.primary=cg[5];var ug=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];ug.primary=ug[5];var dg=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];dg.primary=dg[5];var fg=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];fg.primary=fg[5];var pg=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];pg.primary=pg[5];var hg=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];hg.primary=hg[5];var gg=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];gg.primary=gg[5];var mg=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];mg.primary=mg[5];var $oe={red:og,volcano:ig,orange:sg,gold:ag,yellow:lg,lime:cg,green:ug,cyan:dg,blue:fg,geekblue:pg,purple:hg,magenta:gg,grey:mg},vg=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];vg.primary=vg[5];var yg=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];yg.primary=yg[5];var bg=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];bg.primary=bg[5];var xg=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];xg.primary=xg[5];var Cg=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];Cg.primary=Cg[5];var wg=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];wg.primary=wg[5];var Ag=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];Ag.primary=Ag[5];var Sg=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];Sg.primary=Sg[5];var Tg=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];Tg.primary=Tg[5];var Eg=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];Eg.primary=Eg[5];var Ig=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];Ig.primary=Ig[5];var Og=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];Og.primary=Og[5];var Pg=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];Pg.primary=Pg[5];var zoe={red:vg,volcano:yg,orange:bg,gold:xg,yellow:Cg,lime:wg,green:Ag,cyan:Sg,blue:Tg,geekblue:Eg,purple:Ig,magenta:Og,grey:Pg};function Uoe(e,t){const n=e==="dark"?zoe:$oe;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...o,...s];const a=Woe(n,t,e);return lm({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?tt(a.grey[900],.87):a.grey[700],secondary:e==="dark"?tt(a.grey[900],.45):a.grey[500],disabled:e==="dark"?tt(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?tt(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})}function Hoe(e){return{button:e.palette.mode==="dark"?"0 2px 0 rgb(0 0 0 / 5%)":"0 2px #0000000b",text:"0 -1px 0 rgb(0 0 0 / 12%)",z0:"none",z1:e.palette.mode==="dark"?"0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)":`0px 1px 4px ${tt(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${tt(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${tt(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${tt(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${tt(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${tt(e.palette.info.main,.2)}`,success:`0 0 0 2px ${tt(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${tt(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${tt(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${tt(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${tt(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${tt(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${tt(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${tt(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${tt(e.palette.grey[500],.2)}`}}function Goe(e){return{htmlFontSize:16,fontFamily:e,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:600,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:600,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{lineHeight:1.66},button:{textTransform:"capitalize"}}}function k0({themeOverrides:e,children:t}){const n=mn(),{themeDirection:r,mode:o,presetColor:s,fontFamily:a}=n,c=X2(),u=T.useMemo(()=>o==="auto"?c:o,[o,c]),d=T.useMemo(()=>Uoe(u,s),[u,s]),h=T.useMemo(()=>Goe(a),[a]),g=T.useMemo(()=>Hoe(d),[d]),m=T.useMemo(()=>Z.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:d.palette,customShadows:g,typography:h,components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:d.spacing(2.6875),height:d.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(d):e),[r,d,h,g,e]),v=lm(m),y=Z.cloneDeep(v.components??{});return v.components=Z.merge(Roe(v),y),f.jsx(A.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(JA,{theme:v,children:[f.jsx(A.CssBaseline,{enableColorScheme:!0}),t]})})}function qoe({children:e,theme:t,...n}){return f.jsx(L.CoreAdminContext,{...n,children:f.jsx(k0,{themeOverrides:t,children:f.jsx(FI,{children:e})})})}function $I(e){const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:s,disableTelemetry:a,history:c,i18nProvider:u,layout:d,loading:h,loginPage:g,authCallbackPage:m,menu:v,notification:y,queryClient:C,requireAuth:w,store:E=L.localStorageStore(),ready:M,theme:I,title:j="React Admin"}=e;return f.jsx(qoe,{authProvider:t,dataProvider:s,i18nProvider:u,store:E,history:c,queryClient:C,theme:I,children:f.jsx(L.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:v,catchAll:n,title:j,loading:h,loginPage:g,authCallbackPage:m,notification:y,requireAuth:w,ready:M,children:r})})}class zI{constructor({catch:t,display:n,log:r,error:o}){Ca(this,"catch");Ca(this,"display");Ca(this,"log");Ca(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}var al,ll,Rs;class Yoe{constructor(t){to(this,al);to(this,ll);to(this,Rs,new Set);const{apiUrl:n}=t??{};if(!Z.isString(n)||Z.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");Io(this,ll,n),Io(this,al,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var c;const{message:n,filename:r,lineno:o,colno:s}=t,a=`${n}${r}${o}${s}`;Cn(this,Rs).has(a)||(Cn(this,Rs).add(a),fetch(`${Cn(this,ll)}/ui/error-log`,{method:"PUT",headers:Cn(this,al),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(c=t.error)==null?void 0:c.stack})}).catch(u=>{console.warn("Unable to send error to server",u),Cn(this,Rs).delete(a)}))}}al=new WeakMap,ll=new WeakMap,Rs=new WeakMap;function Koe({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new zI({catch:s!=null,display:!1,log:s!=null,error:s}),...o}){const s=_.useMemo(()=>o.errorHandler?o.errorHandler:new Yoe({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=_.useCallback(function(u,...d){var g;if(!u)return!1;const h=r(u instanceof ErrorEvent?u:(g=u==null?void 0:u.toString())==null?void 0:g.replace(/%s/g,()=>d.shift()));return h.isCatched()||(h.logError()&&(u instanceof ErrorEvent?s.handle(u):s.handle(new ErrorEvent("window.onerror",{error:u,message:u.toString()}))),h.displayError()&&a.apply(console,arguments)),!1},[r,s,a]);return _.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c,a]),!0}var cl,ul,Ii;class Xoe{constructor(t){to(this,cl);to(this,ul);to(this,Ii,[]);const{apiUrl:n}=t??{};if(!Z.isString(n)||Z.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");Io(this,ul,n),Io(this,cl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!Z.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!Z.isString(n)||Z.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!Z.isString(r)||Z.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!Z.some(Cn(this,Ii),o=>Z.isEqual(o,{code:n,lang:r}))){Cn(this,Ii).push({code:n,lang:r}),fetch(`${Cn(this,ul)}/i18n/message`,{method:"put",headers:Cn(this,cl),body:JSON.stringify({code:n,lang:r,text:n})}).then(o=>o.json()).then(()=>{console.log(`[MissingMessageHandler] handleMessage: created message for lang ${r} and code ${n}`)}).catch(o=>{console.error(o),Io(this,Ii,Z.reject(Cn(this,Ii),s=>Z.isEqual(s,{code:n,lang:r})))});return}}}cl=new WeakMap,ul=new WeakMap,Ii=new WeakMap;function UI(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,s=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),c=new Xoe({apiUrl:t});function u(){return fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(g=>g.json()).catch(()=>Promise.resolve(s))}function d(){return fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(g=>g.json()).then(g=>g.reduce((m,v)=>({...m,[v.lang]:{...m[v.lang]||{},[v.code]:v.text}}),{}))}function h(g,m,v){return r||console.error(`Warning: Missing translation for key: "${g}"`),o&&(Z.isString(g)?g.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${g}`):c.handleMessage({code:g,lang:v}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),g}return Promise.all([u(),d()]).then(g=>{const[m,v]=g;function y(C){return Z.get(v,C,{})}return jC(y,n,m,{allowMissing:r||o,onMissingKey:h})})}function Zoe(e){const{defaultLocale:t,path:n}=e,r=[{locale:t,name:t}],o=new Headers({Accept:"application/json","Content-Type":"application/json"});function s(){return fetch(`${n}/languages.json`,{headers:o,method:"get"}).then(c=>c.json()).catch(()=>Promise.resolve(r))}function a(){return fetch(`${n}/messages.json`,{headers:o,method:"get"}).then(c=>c.json()).then(c=>c.reduce((u,d)=>({...u,[d.lang]:{...u[d.lang]||{},[d.code]:d.text}}),{}))}return Promise.all([s(),a()]).then(c=>{const[u,d]=c;function h(g){return Z.get(d,g,{})}return jC(h,t,u,{allowMissing:!0})})}function Qoe({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})}){const[r,o]=T.useState({loading:!0,languages:null});return T.useEffect(()=>{const s=new Headers;s.append("Accept","application/json"),s.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:s}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r}function HI(e){const[t,n]=T.useState(),r=K2(e);return T.useEffect(()=>{if(e.customProvider!==void 0){e.customProvider.then(n);return}UI(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r,e==null?void 0:e.customProvider]),t}const Joe=new Ts.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function eie({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:s,logoIcon:a,loginPage:c=f.jsx(WI,{version:"0.0.0",name:"Applica",redirectTo:"/",background:f.jsx(Fd,{})}),menu:u,name:d,copy:h,version:g="0.0.0",dataProvider:m,authProvider:v,i18nProvider:y,errorHandler:C,error:w,enableNotification:E=!1,enableRegistration:M=!1,enablePasswordRecover:I=!1,enableThemeToggler:j=!1,enableLocaleSwitcher:O=!1,queryClient:F=Joe,background:k,notificationAPI:$="entities/notification",...G}){Koe({apiUrl:n,errorHandler:C,catcherFn:ae=>{const X=ae==null?void 0:ae.toString(),W=["Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.","Support for defaultProps will be removed from function components in a future major release.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>.","Missing translation for key:","HttpError: "].some(V=>X==null?void 0:X.includes(V));return new zI({catch:W,display:!W,log:!W&&o===!0,error:X})}});const Q=T.useMemo(()=>T.isValidElement(c)?T.cloneElement(c,{name:d,copy:h,logo:s,version:g,background:k,enableRegistration:M,enablePasswordRecover:I}):c,[c,d,g,h,k,s,M,I]),U=T.useMemo(()=>ae=>{const X=d?f.jsx(O0,{title:d}):s,K=d?f.jsx(LI,{title:d}):a;return f.jsx(TI,{...ae,name:d,copy:h,version:g,logoMain:X,logoIcon:K,notification:$,enableThemeToggler:j,enableNotification:E,enableLocaleSwitcher:O,error:w})},[s,a,d,h,g,w,$,E,j,O]),se=HI({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o,customProvider:y});return se===void 0?f.jsx(f.Fragment,{}):se.error?f.jsx(Qh,{initialConfig:t,children:f.jsx(k0,{themeOverrides:e,children:f.jsx(VI,{})})}):f.jsx(lQ,{children:f.jsx(I2,{menu:u,children:f.jsx(Qh,{initialConfig:t,children:f.jsx($I,{theme:e,layout:U,notification:II,queryClient:F,dataProvider:m,authProvider:v,i18nProvider:se,loginPage:Q,...G})})})})}Object.defineProperty(exports,"ArrayField",{enumerable:!0,get:()=>L.ArrayField});Object.defineProperty(exports,"ArrayInputContext",{enumerable:!0,get:()=>L.ArrayInputContext});Object.defineProperty(exports,"BooleanField",{enumerable:!0,get:()=>L.BooleanField});Object.defineProperty(exports,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>L.BulkDeleteWithConfirmButton});Object.defineProperty(exports,"ChipField",{enumerable:!0,get:()=>L.ChipField});Object.defineProperty(exports,"Confirm",{enumerable:!0,get:()=>L.Confirm});Object.defineProperty(exports,"CreateContextProvider",{enumerable:!0,get:()=>L.CreateContextProvider});Object.defineProperty(exports,"CustomRoutes",{enumerable:!0,get:()=>L.CustomRoutes});Object.defineProperty(exports,"DeleteWithConfirmButton",{enumerable:!0,get:()=>L.DeleteWithConfirmButton});Object.defineProperty(exports,"DeleteWithUndoButton",{enumerable:!0,get:()=>L.DeleteWithUndoButton});Object.defineProperty(exports,"EditButton",{enumerable:!0,get:()=>L.EditButton});Object.defineProperty(exports,"EditContextProvider",{enumerable:!0,get:()=>L.EditContextProvider});Object.defineProperty(exports,"FieldTitle",{enumerable:!0,get:()=>L.FieldTitle});Object.defineProperty(exports,"FilterButton",{enumerable:!0,get:()=>L.FilterButton});Object.defineProperty(exports,"FilterList",{enumerable:!0,get:()=>L.FilterList});Object.defineProperty(exports,"FilterListItem",{enumerable:!0,get:()=>L.FilterListItem});Object.defineProperty(exports,"FilterLiveSearch",{enumerable:!0,get:()=>L.FilterLiveSearch});Object.defineProperty(exports,"Form",{enumerable:!0,get:()=>L.Form});Object.defineProperty(exports,"FormDataConsumer",{enumerable:!0,get:()=>L.FormDataConsumer});Object.defineProperty(exports,"HttpError",{enumerable:!0,get:()=>L.HttpError});Object.defineProperty(exports,"I18nContextProvider",{enumerable:!0,get:()=>L.I18nContextProvider});Object.defineProperty(exports,"ListBase",{enumerable:!0,get:()=>L.ListBase});Object.defineProperty(exports,"ListToolbar",{enumerable:!0,get:()=>L.ListToolbar});Object.defineProperty(exports,"LoadingIndicator",{enumerable:!0,get:()=>L.LoadingIndicator});Object.defineProperty(exports,"RaSimpleFormIterator",{enumerable:!0,get:()=>L.SimpleFormIterator});Object.defineProperty(exports,"RecordContextProvider",{enumerable:!0,get:()=>L.RecordContextProvider});Object.defineProperty(exports,"ReferenceArrayField",{enumerable:!0,get:()=>L.ReferenceArrayField});Object.defineProperty(exports,"ReferenceField",{enumerable:!0,get:()=>L.ReferenceField});Object.defineProperty(exports,"Resource",{enumerable:!0,get:()=>L.Resource});Object.defineProperty(exports,"ResourceContextProvider",{enumerable:!0,get:()=>L.ResourceContextProvider});Object.defineProperty(exports,"SaveButton",{enumerable:!0,get:()=>L.SaveButton});Object.defineProperty(exports,"SavedQueriesList",{enumerable:!0,get:()=>L.SavedQueriesList});Object.defineProperty(exports,"SimpleFormIteratorContext",{enumerable:!0,get:()=>L.SimpleFormIteratorContext});Object.defineProperty(exports,"SimpleShowLayout",{enumerable:!0,get:()=>L.SimpleShowLayout});Object.defineProperty(exports,"SingleFieldList",{enumerable:!0,get:()=>L.SingleFieldList});Object.defineProperty(exports,"TabbedFormTabs",{enumerable:!0,get:()=>L.TabbedFormTabs});Object.defineProperty(exports,"TopToolbar",{enumerable:!0,get:()=>L.TopToolbar});Object.defineProperty(exports,"UrlField",{enumerable:!0,get:()=>L.UrlField});Object.defineProperty(exports,"ValidationError",{enumerable:!0,get:()=>L.ValidationError});Object.defineProperty(exports,"choices",{enumerable:!0,get:()=>L.choices});Object.defineProperty(exports,"email",{enumerable:!0,get:()=>L.email});Object.defineProperty(exports,"maxLength",{enumerable:!0,get:()=>L.maxLength});Object.defineProperty(exports,"maxValue",{enumerable:!0,get:()=>L.maxValue});Object.defineProperty(exports,"minLength",{enumerable:!0,get:()=>L.minLength});Object.defineProperty(exports,"minValue",{enumerable:!0,get:()=>L.minValue});Object.defineProperty(exports,"number",{enumerable:!0,get:()=>L.number});Object.defineProperty(exports,"regex",{enumerable:!0,get:()=>L.regex});Object.defineProperty(exports,"required",{enumerable:!0,get:()=>L.required});Object.defineProperty(exports,"useArrayInput",{enumerable:!0,get:()=>L.useArrayInput});Object.defineProperty(exports,"useAuthProvider",{enumerable:!0,get:()=>L.useAuthProvider});Object.defineProperty(exports,"useChoices",{enumerable:!0,get:()=>L.useChoices});Object.defineProperty(exports,"useChoicesContext",{enumerable:!0,get:()=>L.useChoicesContext});Object.defineProperty(exports,"useCreate",{enumerable:!0,get:()=>L.useCreate});Object.defineProperty(exports,"useCreateContext",{enumerable:!0,get:()=>L.useCreateContext});Object.defineProperty(exports,"useCreateController",{enumerable:!0,get:()=>L.useCreateController});Object.defineProperty(exports,"useCreateSuggestionContext",{enumerable:!0,get:()=>L.useCreateSuggestionContext});Object.defineProperty(exports,"useDataProvider",{enumerable:!0,get:()=>L.useDataProvider});Object.defineProperty(exports,"useEditContext",{enumerable:!0,get:()=>L.useEditContext});Object.defineProperty(exports,"useEditController",{enumerable:!0,get:()=>L.useEditController});Object.defineProperty(exports,"useGetIdentity",{enumerable:!0,get:()=>L.useGetIdentity});Object.defineProperty(exports,"useGetList",{enumerable:!0,get:()=>L.useGetList});Object.defineProperty(exports,"useGetMany",{enumerable:!0,get:()=>L.useGetMany});Object.defineProperty(exports,"useGetManyReference",{enumerable:!0,get:()=>L.useGetManyReference});Object.defineProperty(exports,"useGetOne",{enumerable:!0,get:()=>L.useGetOne});Object.defineProperty(exports,"useInput",{enumerable:!0,get:()=>L.useInput});Object.defineProperty(exports,"useListContext",{enumerable:!0,get:()=>L.useListContext});Object.defineProperty(exports,"useListController",{enumerable:!0,get:()=>L.useListController});Object.defineProperty(exports,"useLocaleState",{enumerable:!0,get:()=>L.useLocaleState});Object.defineProperty(exports,"useLocales",{enumerable:!0,get:()=>L.useLocales});Object.defineProperty(exports,"useNotify",{enumerable:!0,get:()=>L.useNotify});Object.defineProperty(exports,"usePermissions",{enumerable:!0,get:()=>L.usePermissions});Object.defineProperty(exports,"useRecordContext",{enumerable:!0,get:()=>L.useRecordContext});Object.defineProperty(exports,"useRefresh",{enumerable:!0,get:()=>L.useRefresh});Object.defineProperty(exports,"useRemoveFromStore",{enumerable:!0,get:()=>L.useRemoveFromStore});Object.defineProperty(exports,"useResetStore",{enumerable:!0,get:()=>L.useResetStore});Object.defineProperty(exports,"useResourceContext",{enumerable:!0,get:()=>L.useResourceContext});Object.defineProperty(exports,"useResourceDefinition",{enumerable:!0,get:()=>L.useResourceDefinition});Object.defineProperty(exports,"useResourceDefinitions",{enumerable:!0,get:()=>L.useResourceDefinitions});Object.defineProperty(exports,"useShowContext",{enumerable:!0,get:()=>L.useShowContext});Object.defineProperty(exports,"useShowController",{enumerable:!0,get:()=>L.useShowController});Object.defineProperty(exports,"useSimpleFormIterator",{enumerable:!0,get:()=>L.useSimpleFormIterator});Object.defineProperty(exports,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>L.useSimpleFormIteratorItem});Object.defineProperty(exports,"useStore",{enumerable:!0,get:()=>L.useStore});Object.defineProperty(exports,"useStoreContext",{enumerable:!0,get:()=>L.useStoreContext});Object.defineProperty(exports,"useTranslate",{enumerable:!0,get:()=>L.useTranslate});Object.defineProperty(exports,"useTranslateLabel",{enumerable:!0,get:()=>L.useTranslateLabel});Object.defineProperty(exports,"useUnselect",{enumerable:!0,get:()=>L.useUnselect});Object.defineProperty(exports,"useUnselectAll",{enumerable:!0,get:()=>L.useUnselectAll});Object.defineProperty(exports,"useUpdate",{enumerable:!0,get:()=>L.useUpdate});Object.defineProperty(exports,"useUpdateMany",{enumerable:!0,get:()=>L.useUpdateMany});Object.defineProperty(exports,"withLifecycleCallbacks",{enumerable:!0,get:()=>L.withLifecycleCallbacks});exports.ActionsField=dQ;exports.ActionsMenu=Ho;exports.ActivatePage=kre;exports.AddTableRow=v0;exports.Admin=$I;exports.AnimateButton=g9;exports.AppBarStyled=cI;exports.ApplicaAdmin=eie;exports.ArrayInput=uQ;exports.AttachmentField=oT;exports.AttachmentInput=DQ;exports.AuthBackground=Fd;exports.AutocompleteArrayInput=BQ;exports.AutocompleteInput=VQ;exports.Avatar=Ou;exports.BooleanInput=$Q;exports.Breadcrumbs=oS;exports.BulkActionsToolbar=_I;exports.BulkFloatingActionsToolbar=sre;exports.Button=Ml;exports.CardForm=Q2;exports.ChangePasswordForm=f0;exports.CircularWithLabel=wN;exports.CircularWithPath=AN;exports.CoverField=sT;exports.Create=xJ;exports.CreateButton=Gne;exports.CreateButtonClasses=rd;exports.CreateInDialogButton=Jne;exports.Datagrid=fre;exports.DateAgoField=lT;exports.DateField=xQ;exports.DateInput=HQ;exports.DateTimeInput=qQ;exports.Dot=bm;exports.Drawer=lI;exports.DrawerHeader=JT;exports.DrawerHeaderStyled=ZT;exports.DrawerToggle=fI;exports.Edit=AJ;exports.EditInDialogButton=nre;exports.EmailField=wQ;exports.Empty=hre;exports.EmptyClasses=ji;exports.Error=Qm;exports.Field=WT;exports.FileField=cT;exports.FileInput=KQ;exports.Footer=E0;exports.FormHeader=EJ;exports.FunctionField=SQ;exports.GenericErrorPage=VI;exports.Header=pI;exports.HeaderButton=uI;exports.HeaderIconButton=cne;exports.HeaderNotification=hI;exports.HeaderProfile=gI;exports.HeaderSpacer=vI;exports.HeaderToggleButton=ta;exports.HorizontalBar=yI;exports.IconButton=Od;exports.ImageField=iT;exports.ImageInput=XQ;exports.ImpersonateUserButton=rre;exports.LabeledArrayInput=rT;exports.LabeledInput=ln;exports.Layout=TI;exports.LayoutContent=XT;exports.LayoutProvider=qT;exports.LayoutWrapper=SI;exports.LinearWithIcon=SN;exports.LinearWithLabel=TN;exports.List=Ere;exports.ListItem=ore;exports.Loadable=Cne;exports.Loader=EI;exports.LoadingButton=yN;exports.LocalStorage=z2;exports.LocaleButton=dI;exports.LocalizedTextField=EQ;exports.LocalizedTextInput=JQ;exports.LoginPage=WI;exports.Logo=QT;exports.LongForm=kt;exports.MainCard=En;exports.MainIcon=O0;exports.MenuConfigProvider=I2;exports.MenuPopover=wS;exports.NavCollapse=qa;exports.NavGroup=xI;exports.NavItem=Ga;exports.NavList=CI;exports.NavMenu=bI;exports.Navigation=wI;exports.Notification=II;exports.NotificationList=jre;exports.NumberInput=tJ;exports.OnboardingActionType=js;exports.OnboardingContext=P0;exports.OnboardingModes=sl;exports.OnboardingProvider=Ine;exports.OnboardingTip=Rne;exports.Pagination=R0;exports.PaginationActions=j0;exports.PopupTransition=CN;exports.RadioButtonGroupInput=rJ;exports.ReadonlyField=jQ;exports.RecordInput=oJ;exports.RecoverPage=Fre;exports.ReferenceArrayInput=iJ;exports.ReferenceInput=sJ;exports.ReferenceManyField=dT;exports.ReferenceManyInput=aJ;exports.RegisterPage=Lre;exports.ResponsiveSection=mI;exports.ScrollTop=FI;exports.ScrollX=Dne;exports.SearchInput=cJ;exports.SelectArrayInput=dJ;exports.SelectInput=pJ;exports.ShadowBox=_ne;exports.Show=$J;exports.SimpleBar=aI;exports.SimpleForm=J2;exports.SimpleFormIterator=UJ;exports.SimpleList=Rre;exports.SizeField=kQ;exports.SmallIcon=LI;exports.SmartTextInput=hJ;exports.StyledArrow=xS;exports.TabbedForm=m0;exports.TableCreateButton=b0;exports.TableFormIterator=qd;exports.TableFormIteratorContext=x0;exports.TableFormIteratorItem=zT;exports.TableFormIteratorItemContext=y0;exports.TextField=uT;exports.TextInput=Er;exports.ThemeColor=I0;exports.ThemeContext=c0;exports.ThemeCustomizationProvider=k0;exports.ThemeProvider=Qh;exports.ThemeToggler=AI;exports.TimeInput=yJ;exports.Toolbar=Zo;exports.Tooltip=kd;exports.Transitions=Uo;exports.WizardForm=HT;exports.createI18nProvider=UI;exports.createJsonI18nProvider=Zoe;exports.getLocalizedValue=s0;exports.getPosition=CS;exports.getThemeColor=Qt;exports.getThemeShadow=Us;exports.localizedValueHasAllLocales=Yu;exports.localizedValueHasAtLeastOneLocale=U2;exports.onboardingModesSchema=PI;exports.onboardingTopicSchema=OI;exports.parseTime=q2;exports.useBreadcrumbs=O2;exports.useGetLocalizedValue=eQ;exports.useI18nLanguages=Qoe;exports.useI18nProvider=HI;exports.useLayoutContext=C0;exports.useLayoutDispatch=aee;exports.useLayoutDrawerState=Vi;exports.useLayoutLogoState=KT;exports.useLayoutMediaState=Yn;exports.useLayoutNotificationsState=Kd;exports.useLayoutState=Js;exports.useLayoutThemeState=lee;exports.useLocalStorage=a0;exports.useLocalizedValue=JZ;exports.useMemoizedObject=K2;exports.useMenu=Jm;exports.useMenuConfig=ol;exports.useMenuContext=$d;exports.useOnboardingDataProvider=jI;exports.useOnboardingTip=kI;exports.usePopoverState=Qs;exports.useRefDimensions=tQ;exports.useResourceDefaultValues=CJ;exports.useResourceTitle=l0;exports.useRestartOnboarding=Pne;exports.useSx=Pr;exports.useSystemTheme=X2;exports.useTableFormIterator=$T;exports.useTableFormIteratorItem=VT;exports.useThemeConfig=mn;exports.useThemeContext=u0;exports.useWizardFormContext=Yd;exports.uuid=tZ;exports.walkChildren=Gd;exports.withLayoutProvider=YT;
|
|
216
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var sn={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},kn={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},ea={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},Eee={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},Iee=function(t){switch(t){case sn.Mobile:return{isMobile:!0};case sn.Tablet:return{isTablet:!0};case sn.SmartTv:return{isSmartTV:!0};case sn.Console:return{isConsole:!0};case sn.Wearable:return{isWearable:!0};case sn.Browser:return{isBrowser:!0};case sn.Embedded:return{isEmbedded:!0};default:return Eee}},Oee=function(t){return tE(t)},Le=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},A0=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},S0=function(t){var n=A0();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},Pee=function(t,n,r,o,s){return{isBrowser:t,browserMajorVersion:Le(n.major),browserFullVersion:Le(n.version),browserName:Le(n.name),engineName:Le(r.name),engineVersion:Le(r.version),osName:Le(o.name),osVersion:Le(o.version),userAgent:Le(s)}},bC=function(t,n,r,o){return pee({},t,{vendor:Le(n.vendor),model:Le(n.model),os:Le(r.name),osVersion:Le(r.version),ua:Le(o)})},jee=function(t,n,r,o){return{isSmartTV:t,engineName:Le(n.name),engineVersion:Le(n.version),osName:Le(r.name),osVersion:Le(r.version),userAgent:Le(o)}},Ree=function(t,n,r,o){return{isConsole:t,engineName:Le(n.name),engineVersion:Le(n.version),osName:Le(r.name),osVersion:Le(r.version),userAgent:Le(o)}},Mee=function(t,n,r,o){return{isWearable:t,engineName:Le(n.name),engineVersion:Le(n.version),osName:Le(r.name),osVersion:Le(r.version),userAgent:Le(o)}},kee=function(t,n,r,o,s){return{isEmbedded:t,vendor:Le(n.vendor),model:Le(n.model),engineName:Le(r.name),engineVersion:Le(r.version),osName:Le(o.name),osVersion:Le(o.version),userAgent:Le(s)}};function Fee(e){var t=e?Rl(e):nE,n=t.device,r=t.browser,o=t.engine,s=t.os,a=t.ua,c=Iee(n.type),u=c.isBrowser,d=c.isMobile,h=c.isTablet,g=c.isSmartTV,m=c.isConsole,v=c.isWearable,y=c.isEmbedded;if(u)return Pee(u,r,o,s,a);if(g)return jee(g,o,s,a);if(m)return Ree(m,o,s,a);if(d||h)return bC(c,n,s,a);if(v)return Mee(v,o,s,a);if(y)return kee(y,n,o,s,a)}var rE=function(t){var n=t.type;return n===sn.Mobile},oE=function(t){var n=t.type;return n===sn.Tablet},iE=function(t){var n=t.type;return n===sn.Mobile||n===sn.Tablet},sE=function(t){var n=t.type;return n===sn.SmartTv},Qu=function(t){var n=t.type;return n===sn.Browser},aE=function(t){var n=t.type;return n===sn.Wearable},lE=function(t){var n=t.type;return n===sn.Console},cE=function(t){var n=t.type;return n===sn.Embedded},uE=function(t){var n=t.vendor;return Le(n)},dE=function(t){var n=t.model;return Le(n)},fE=function(t){var n=t.type;return Le(n,"browser")},pE=function(t){var n=t.name;return n===ea.Android},hE=function(t){var n=t.name;return n===ea.Windows},gE=function(t){var n=t.name;return n===ea.MAC_OS},mE=function(t){var n=t.name;return n===ea.WindowsPhone},vE=function(t){var n=t.name;return n===ea.IOS},yE=function(t){var n=t.version;return Le(n)},bE=function(t){var n=t.name;return Le(n)},xE=function(t){var n=t.name;return n===kn.Chrome},CE=function(t){var n=t.name;return n===kn.Firefox},wE=function(t){var n=t.name;return n===kn.Chromium},Ju=function(t){var n=t.name;return n===kn.Edge},AE=function(t){var n=t.name;return n===kn.Yandex},SE=function(t){var n=t.name;return n===kn.Safari||n===kn.MobileSafari},TE=function(t){var n=t.name;return n===kn.MobileSafari},EE=function(t){var n=t.name;return n===kn.Opera},IE=function(t){var n=t.name;return n===kn.InternetExplorer||n===kn.Ie},OE=function(t){var n=t.name;return n===kn.MIUI},PE=function(t){var n=t.name;return n===kn.SamsungBrowser},jE=function(t){var n=t.version;return Le(n)},RE=function(t){var n=t.major;return Le(n)},ME=function(t){var n=t.name;return Le(n)},kE=function(t){var n=t.name;return Le(n)},FE=function(t){var n=t.version;return Le(n)},LE=function(){var t=A0(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},Ps=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},DE=function(){var t=A0();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},Dr=function(){return S0("iPad")},_E=function(){return S0("iPhone")},BE=function(){return S0("iPod")},NE=function(t){return Le(t)};function VE(e){var t=e||nE,n=t.device,r=t.browser,o=t.os,s=t.engine,a=t.ua;return{isSmartTV:sE(n),isConsole:lE(n),isWearable:aE(n),isEmbedded:cE(n),isMobileSafari:TE(r)||Dr(),isChromium:wE(r),isMobile:iE(n)||Dr(),isMobileOnly:rE(n),isTablet:oE(n)||Dr(),isBrowser:Qu(n),isDesktop:Qu(n),isAndroid:pE(o),isWinPhone:mE(o),isIOS:vE(o)||Dr(),isChrome:xE(r),isFirefox:CE(r),isSafari:SE(r),isOpera:EE(r),isIE:IE(r),osVersion:yE(o),osName:bE(o),fullBrowserVersion:jE(r),browserVersion:RE(r),browserName:ME(r),mobileVendor:uE(n),mobileModel:dE(n),engineName:kE(s),engineVersion:FE(s),getUA:NE(a),isEdge:Ju(r)||Ps(a),isYandex:AE(r),deviceType:fE(n),isIOS13:DE(),isIPad13:Dr(),isIPhone13:_E(),isIPod13:BE(),isElectron:LE(),isEdgeChromium:Ps(a),isLegacyEdge:Ju(r)&&!Ps(a),isWindows:hE(o),isMacOs:gE(o),isMIUI:OE(r),isSamsungBrowser:PE(r)}}var WE=sE(Kn),$E=lE(Kn),zE=aE(Kn),Lee=cE(Kn),Dee=TE(cn)||Dr(),_ee=wE(cn),Xd=iE(Kn)||Dr(),UE=rE(Kn),HE=oE(Kn)||Dr(),GE=Qu(Kn),Bee=Qu(Kn),qE=pE(Jo),YE=mE(Jo),KE=vE(Jo)||Dr(),Nee=xE(cn),Vee=CE(cn),Wee=SE(cn),$ee=EE(cn),XE=IE(cn),zee=yE(Jo),Uee=bE(Jo),Hee=jE(cn),Gee=RE(cn),qee=ME(cn),Yee=uE(Kn),Kee=dE(Kn),Xee=kE(w0),Zee=FE(w0),Qee=NE(jl),Jee=Ju(cn)||Ps(jl),ete=AE(cn),tte=fE(Kn),nte=DE(),rte=Dr(),ote=_E(),ite=BE(),ste=LE(),ate=Ps(jl),lte=Ju(cn)&&!Ps(jl),cte=hE(Jo),ute=gE(Jo),dte=OE(cn),fte=PE(cn),pte=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=Rl(t),r=n.device,o=n.browser,s=n.os,a=n.engine,c=n.ua;return VE({device:r,browser:o,os:s,engine:a,ua:c})},hte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return qE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},gte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return GE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},mte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return XE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},vte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return KE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},yte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return Xd?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},bte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return HE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},xte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return YE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},Cte=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=br(t,["renderWithFragment","children","viewClassName","style"]);return UE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},wte=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return WE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},Ate=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return $E?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},Ste=function(t){var n=t.renderWithFragment,r=t.children,o=br(t,["renderWithFragment","children"]);return zE?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",o,r):null},Tte=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,s=br(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?ht.createElement(an.Fragment,null,r):ht.createElement("div",s,r):null};function Ete(e){return function(t){yee(n,t);function n(r){var o;return hee(this,n),o=xee(this,ng(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(du(o)),o.onOrientationChange=o.onOrientationChange.bind(du(o)),o.onPageLoad=o.onPageLoad.bind(du(o)),o.state={isLandscape:!1,isPortrait:!1},o}return mee(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var o=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:o===0,isLandscape:o===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":Ha(window))!==void 0&&Xd&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return ht.createElement(e,tg({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(ht.Component)}function Ite(){var e=an.useState(function(){var s=window.innerWidth>window.innerHeight?90:0;return{isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"}}),t=Cee(e,2),n=t[0],r=t[1],o=an.useCallback(function(){var s=window.innerWidth>window.innerHeight?90:0,a={isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return an.useEffect(function(){return(typeof window>"u"?"undefined":Ha(window))!==void 0&&Xd&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),n}function ZE(e){var t=e||window.navigator.userAgent;return Rl(t)}function Ote(e){var t=e||window.navigator.userAgent,n=ZE(t),r=VE(n);return[r,n]}Se.AndroidView=hte;Se.BrowserTypes=kn;var Pte=Se.BrowserView=gte;Se.ConsoleView=Ate;Se.CustomView=Tte;Se.IEView=mte;Se.IOSView=vte;Se.MobileOnlyView=Cte;var jte=Se.MobileView=yte;Se.OsTypes=ea;Se.SmartTVView=wte;Se.TabletView=bte;Se.WearableView=Ste;Se.WinPhoneView=xte;Se.browserName=qee;Se.browserVersion=Gee;Se.deviceDetect=Fee;Se.deviceType=tte;Se.engineName=Xee;Se.engineVersion=Zee;Se.fullBrowserVersion=Hee;Se.getSelectorsByUserAgent=pte;Se.getUA=Qee;Se.isAndroid=qE;Se.isBrowser=GE;Se.isChrome=Nee;Se.isChromium=_ee;Se.isConsole=$E;Se.isDesktop=Bee;Se.isEdge=Jee;Se.isEdgeChromium=ate;Se.isElectron=ste;Se.isEmbedded=Lee;Se.isFirefox=Vee;Se.isIE=XE;Se.isIOS=KE;Se.isIOS13=nte;Se.isIPad13=rte;Se.isIPhone13=ote;Se.isIPod13=ite;Se.isLegacyEdge=lte;Se.isMIUI=dte;Se.isMacOs=ute;Se.isMobile=Xd;Se.isMobileOnly=UE;Se.isMobileSafari=Dee;Se.isOpera=$ee;Se.isSafari=Wee;Se.isSamsungBrowser=fte;Se.isSmartTV=WE;Se.isTablet=HE;Se.isWearable=zE;Se.isWinPhone=YE;Se.isWindows=cte;Se.isYandex=ete;Se.mobileModel=Kee;Se.mobileVendor=Yee;Se.osName=Uee;Se.osVersion=zee;Se.parseUserAgent=Rl;Se.setUserAgent=Oee;Se.useDeviceData=ZE;Se.useDeviceSelectors=Ote;Se.useMobileOrientation=Ite;Se.withOrientationChange=Ete;var Rte=typeof global=="object"&&global&&global.Object===Object&&global,Mte=typeof self=="object"&&self&&self.Object===Object&&self,QE=Rte||Mte||Function("return this")(),ed=QE.Symbol,JE=Object.prototype,kte=JE.hasOwnProperty,Fte=JE.toString,Ra=ed?ed.toStringTag:void 0;function Lte(e){var t=kte.call(e,Ra),n=e[Ra];try{e[Ra]=void 0;var r=!0}catch{}var o=Fte.call(e);return r&&(t?e[Ra]=n:delete e[Ra]),o}var Dte=Object.prototype,_te=Dte.toString;function Bte(e){return _te.call(e)}var Nte="[object Null]",Vte="[object Undefined]",xC=ed?ed.toStringTag:void 0;function Wte(e){return e==null?e===void 0?Vte:Nte:xC&&xC in Object(e)?Lte(e):Bte(e)}function $te(e){return e!=null&&typeof e=="object"}var zte="[object Symbol]";function Ute(e){return typeof e=="symbol"||$te(e)&&Wte(e)==zte}var Hte=/\s/;function Gte(e){for(var t=e.length;t--&&Hte.test(e.charAt(t)););return t}var qte=/^\s+/;function Yte(e){return e&&e.slice(0,Gte(e)+1).replace(qte,"")}function td(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var CC=NaN,Kte=/^[-+]0x[0-9a-f]+$/i,Xte=/^0b[01]+$/i,Zte=/^0o[0-7]+$/i,Qte=parseInt;function wC(e){if(typeof e=="number")return e;if(Ute(e))return CC;if(td(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=td(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Yte(e);var n=Xte.test(e);return n||Zte.test(e)?Qte(e.slice(2),n?2:8):Kte.test(e)?CC:+e}var eh=function(){return QE.Date.now()},Jte="Expected a function",ene=Math.max,tne=Math.min;function fu(e,t,n){var r,o,s,a,c,u,d=0,h=!1,g=!1,m=!0;if(typeof e!="function")throw new TypeError(Jte);t=wC(t)||0,td(n)&&(h=!!n.leading,g="maxWait"in n,s=g?ene(wC(n.maxWait)||0,t):s,m="trailing"in n?!!n.trailing:m);function v(F){var k=r,$=o;return r=o=void 0,d=F,a=e.apply($,k),a}function y(F){return d=F,c=setTimeout(E,t),h?v(F):a}function C(F){var k=F-u,$=F-d,G=t-k;return g?tne(G,s-$):G}function w(F){var k=F-u,$=F-d;return u===void 0||k>=t||k<0||g&&$>=s}function E(){var F=eh();if(w(F))return M(F);c=setTimeout(E,C(F))}function M(F){return c=void 0,m&&r?v(F):(r=o=void 0,a)}function I(){c!==void 0&&clearTimeout(c),d=0,r=u=o=c=void 0}function j(){return c===void 0?a:M(eh())}function O(){var F=eh(),k=w(F);if(r=arguments,o=this,u=F,k){if(c===void 0)return y(u);if(g)return clearTimeout(c),c=setTimeout(E,t),v(u)}return c===void 0&&(c=setTimeout(E,t)),a}return O.cancel=I,O.flush=j,O}var nne="Expected a function";function rne(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(nne);return td(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),fu(e,t,{leading:r,maxWait:t,trailing:o})}var Ss=function(){return Ss=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ss.apply(this,arguments)};function eI(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function tI(e){return!e||!e.ownerDocument?document:e.ownerDocument}var nI=function(e){var t={},n=Array.prototype.reduce.call(e,function(r,o){var s=o.name.match(/data-simplebar-(.+)/);if(s){var a=s[1].replace(/\W+(.)/g,function(c,u){return u.toUpperCase()});switch(o.value){case"true":r[a]=!0;break;case"false":r[a]=!1;break;case void 0:r[a]=!0;break;default:r[a]=o.value}}return r},t);return n};function rI(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function oI(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function iI(e){return".".concat(e.split(" ").join("."))}var T0=!!(typeof window<"u"&&window.document&&window.document.createElement),one=Object.freeze({__proto__:null,addClasses:rI,canUseDOM:T0,classNamesToQuery:iI,getElementDocument:tI,getElementWindow:eI,getOptions:nI,removeClasses:oI}),hs=null,AC=null;T0&&window.addEventListener("resize",function(){AC!==window.devicePixelRatio&&(AC=window.devicePixelRatio,hs=null)});function SC(){if(hs===null){if(typeof document>"u")return hs=0,hs;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),hs=n}return hs}var Po=eI,th=tI,ine=nI,jo=rI,Ro=oI,wn=iI,Kc=function(){function e(t,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var o=Po(r.el);r.scrollXTicking||(o.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(o.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,jo(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){Ro(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(jo(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){Ro(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(o){r.mouseX=o.clientX,r.mouseY=o.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(o){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var s,a;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(s=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(a=r.isWithinBounds(r.axis.y.track.rect)),(s||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(s&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(o,"x"):r.onTrackClick(o,"x")),a&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(o,"y"):r.onTrackClick(o,"y"))))}},this.drag=function(o){var s,a,c,u,d,h,g,m,v,y,C;if(!(!r.draggedAxis||!r.contentWrapperEl)){var w,E=r.axis[r.draggedAxis].track,M=(a=(s=E.rect)===null||s===void 0?void 0:s[r.axis[r.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,I=r.axis[r.draggedAxis].scrollbar,j=(u=(c=r.contentWrapperEl)===null||c===void 0?void 0:c[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&u!==void 0?u:0,O=parseInt((h=(d=r.elStyles)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&h!==void 0?h:"0px",10);o.preventDefault(),o.stopPropagation(),r.draggedAxis==="y"?w=o.pageY:w=o.pageX;var F=w-((m=(g=E.rect)===null||g===void 0?void 0:g[r.axis[r.draggedAxis].offsetAttr])!==null&&m!==void 0?m:0)-r.axis[r.draggedAxis].dragOffset;F=r.draggedAxis==="x"&&r.isRtl?((y=(v=E.rect)===null||v===void 0?void 0:v[r.axis[r.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-I.size-F:F;var k=F/(M-I.size),$=k*(j-O);r.draggedAxis==="x"&&r.isRtl&&($=!((C=e.getRtlHelpers())===null||C===void 0)&&C.isScrollingToNegative?-$:$),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=$}},this.onEndDrag=function(o){r.isDragging=!1;var s=th(r.el),a=Po(r.el);o.preventDefault(),o.stopPropagation(),Ro(r.el,r.classNames.dragging),r.onStopScrolling(),s.removeEventListener("mousemove",r.drag,!0),s.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=a.setTimeout(function(){s.removeEventListener("click",r.preventClick,!0),s.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=Ss(Ss({},e.defaultOptions),n),this.classNames=Ss(Ss({},e.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=rne(this._onMouseMove,64),this.onWindowResize=fu(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=fu(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=fu(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=t.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var o=e.getOffset(n),s=e.getOffset(r);n.scrollLeft=-999;var a=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:o.left!==s.left,isScrollingToNegative:s.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:SC()}catch{return SC()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=th(t),o=Po(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){T0&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,n;this.wrapperEl=this.el.querySelector(wn(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(wn(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(wn(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(wn(this.classNames.offset)),this.maskEl=this.el.querySelector(wn(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,wn(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(wn(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(wn(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(wn(this.classNames.track)).concat(wn(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(wn(this.classNames.track)).concat(wn(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(wn(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(wn(this.classNames.scrollbar)))||null,this.options.autoHide||(jo(this.axis.x.scrollbar.el,this.classNames.visible),jo(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=Po(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var o=!1,s=r.ResizeObserver||ResizeObserver;this.resizeObserver=new s(function(){o&&r.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){o=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=Po(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1||n>0,s=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,c=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var u=this.contentEl.scrollHeight,d=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=o?"".concat(n||d,"px"):"auto",this.placeholderEl.style.height="".concat(u,"px");var h=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&d>n,this.axis.y.isOverflowing=u>h,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=c==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var g=this.axis.x.isOverflowing?this.scrollbarWidth:0,m=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&d>s-m,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>h-g,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var n,r;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var o=this.contentEl[this.axis[t].scrollSizeAttr],s=(r=(n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])!==null&&r!==void 0?r:0,a=s/o,c;return c=Math.max(~~(a*s),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(c=Math.min(c,this.options.scrollbarMaxSize)),c},e.prototype.positionScrollbar=function(t){var n,r,o;t===void 0&&(t="y");var s=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!s.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],c=((n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])||0,u=parseInt(this.elStyles[this.axis[t].sizeAttr],10),d=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];d=t==="x"&&this.isRtl&&(!((r=e.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-d:d,t==="x"&&this.isRtl&&(d=!((o=e.getRtlHelpers())===null||o===void 0)&&o.isScrollingToNegative?d:-d);var h=d/(a-u),g=~~((c-s.size)*h);g=t==="x"&&this.isRtl?-g+(c-s.size):g,s.el.style.transform=t==="x"?"translate3d(".concat(g,"px, 0, 0)"):"translate3d(0, ".concat(g,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var n=this.axis[t].track.el,r=this.axis[t].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(jo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(Ro(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var n=this.axis[t];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(t),jo(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?jo(n.scrollbar.el,this.classNames.hover):Ro(n.scrollbar.el,this.classNames.hover)):(Ro(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),Ro(this.axis[t].track.el,this.classNames.hover),Ro(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,n){var r;n===void 0&&(n="y"),this.isDragging=!0;var o=th(this.el),s=Po(this.el),a=this.axis[n].scrollbar,c=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=c-(((r=a.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,jo(this.el,this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(s.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var r=this,o,s,a,c;n===void 0&&(n="y");var u=this.axis[n];if(!(!this.options.clickOnTrack||!u.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var d=Po(this.el);this.axis[n].scrollbar.rect=u.scrollbar.el.getBoundingClientRect();var h=this.axis[n].scrollbar,g=(s=(o=h.rect)===null||o===void 0?void 0:o[this.axis[n].offsetAttr])!==null&&s!==void 0?s:0,m=parseInt((c=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[n].sizeAttr])!==null&&c!==void 0?c:"0px",10),v=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],y=n==="y"?this.mouseY-g:this.mouseX-g,C=y<0?-1:1,w=C===-1?v-m:v+m,E=40,M=function(){r.contentWrapperEl&&(C===-1?v>w&&(v-=E,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=v,d.requestAnimationFrame(M)):v<w&&(v+=E,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=v,d.requestAnimationFrame(M)))};M()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Po(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,n){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(o){return r.call(o,n)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=ine,e.helpers=one,e}(),$n=function(){return $n=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},$n.apply(this,arguments)};function sne(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var sI=_.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,s=sne(e,["children","scrollableNodeProps"]),a=_.useRef(),c=_.useRef(),u=_.useRef(),d={},h={};Object.keys(s).forEach(function(v){Object.prototype.hasOwnProperty.call(Kc.defaultOptions,v)?d[v]=s[v]:h[v]=s[v]});var g=$n($n({},Kc.defaultOptions.classNames),d.classNames),m=$n($n({},o),{className:"".concat(g.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":d.ariaLabel||Kc.defaultOptions.ariaLabel});return _.useEffect(function(){var v;return c.current=m.ref?m.ref.current:c.current,a.current&&(v=new Kc(a.current,$n($n($n({},d),c.current&&{scrollableNode:c.current}),u.current&&{contentNode:u.current})),typeof t=="function"?t(v):t&&(t.current=v)),function(){v==null||v.unMount(),v=null,typeof t=="function"&&t(null)}},[]),_.createElement("div",$n({"data-simplebar":"init",ref:a},h),_.createElement("div",{className:g.wrapper},_.createElement("div",{className:g.heightAutoObserverWrapperEl},_.createElement("div",{className:g.heightAutoObserverEl})),_.createElement("div",{className:g.mask},_.createElement("div",{className:g.offset},typeof n=="function"?n({scrollableNodeRef:c,scrollableNodeProps:$n($n({},m),{ref:c}),contentNodeRef:u,contentNodeProps:{className:g.contentEl,ref:u}}):_.createElement("div",$n({},m),_.createElement("div",{className:g.contentEl},n)))),_.createElement("div",{className:g.placeholder})),_.createElement("div",{className:"".concat(g.track," simplebar-horizontal")},_.createElement("div",{className:g.scrollbar})),_.createElement("div",{className:"".concat(g.track," simplebar-vertical")},_.createElement("div",{className:g.scrollbar})))});sI.displayName="SimpleBar";const ane=de(Pte)({flexGrow:1,height:"100%",overflow:"hidden"}),lne=de(sI)(({theme:e})=>({maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:tt(e.palette.grey[500],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-track.simplebar-vertical":{width:10},"& .simplebar-track.simplebar-horizontal .simplebar-scrollbar":{height:6},"& .simplebar-mask":{zIndex:"inherit"}}));function aI({children:e,sx:t,...n}){return f.jsxs(f.Fragment,{children:[f.jsx(ane,{children:f.jsx(lne,{timeout:500,clickOnTrack:!1,sx:t,...n,children:e})}),f.jsx(jte,{children:f.jsx(A.Box,{sx:{overflowX:"auto",...t},...n,children:e})})]})}function lI(e){const t=A.useTheme(),n=Pr(e,{flexShrink:{md:0},zIndex:1200}),{downLg:r}=Yn(),{open:o,handleDrawerToggle:s,width:a}=Vi(),c=r?A.Drawer:cee,u=document.body,d=T.useMemo(()=>r?{container:u,variant:"temporary",onClose:s,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",lg:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:a,borderRight:`1px solid ${t.palette.divider}`,backgroundImage:"none",boxShadow:"inherit",overflow:"auto"}}}:{variant:"permanent"},[r,u,s,a,t.palette.divider]);return f.jsx(A.Box,{component:"nav",sx:n,"aria-label":"mailbox folders",children:f.jsxs(c,{...d,open:o,children:[f.jsx(JT,{}),f.jsx(aI,{sx:{"& .simplebar-content":{display:"flex",flexDirection:"column"}},children:e.children})]})})}function E0(e){const{name:t,version:n,copy:r="© Applica Software Guru for"}=e;return f.jsx(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",flexGrow:1,height:"auto",sx:{pt:1},children:f.jsxs(A.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}const cI=de(A.AppBar,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=mn();return{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...!t&&{width:`calc(100% - ${e.spacing(7.5)})`},...t&&{marginLeft:n,width:`calc(100% - ${n}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}}),uI=T.forwardRef(function(t,n){const r=Pr(t,{color:"text.primary"},{defaults:!0});return f.jsx(A.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),cne=T.forwardRef(function(t,n){const r=Pr(t,{color:"text.primary"},{defaults:!0});return f.jsx(Od,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),ta=T.forwardRef(function(t,n){const r=Pr(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return f.jsx(A.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function dI({onClick:e=void 0}){const{open:t,anchorEl:n,handleClose:r,handleToggle:o}=Qs(),[s,a]=ne.useLocaleState(),c=ne.useLocales();if(c.length===0)return null;function u(d){if(e){e(d,r);return}a(d),r()}return f.jsxs(f.Fragment,{children:[f.jsx(uI,{value:"locale",onClick:o,sx:{minWidth:"auto"},children:f.jsxs(A.Stack,{direction:"row",spacing:.5,children:[f.jsx(A.Typography,{variant:"body1",children:s.toUpperCase()}),t?f.jsx(ze.CaretUpOutlined,{}):f.jsx(ze.CaretDownOutlined,{})]})}),f.jsx(A.Menu,{id:"menu-appbar",anchorEl:n,keepMounted:!0,open:t,onClose:r,children:c.map((d,h)=>f.jsx(A.MenuItem,{onClick:()=>u(d.locale),children:d.name},h))})]})}const une={ml:{xs:0,lg:-2}};function fI(){const{open:e,handleDrawerToggle:t}=Vi();return f.jsx(ta,{value:"drawer","aria-label":"open drawer",sx:une,onChange:t,selected:e,children:e?f.jsx(ze.MenuFoldOutlined,{}):f.jsx(ze.MenuUnfoldOutlined,{})})}function pI(e){const t=T.useRef(),n=A.useTheme(),{downLg:r,horizontal:o}=Yn(),{open:s,width:a}=Vi(),c=r?A.AppBar:cI,d={position:"fixed",color:"inherit",elevation:0,sx:Pr(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}})};return r||Z.extend(d,{open:s}),f.jsx(c,{ref:t,...d,children:f.jsxs(A.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx(fI,{}),e.children]})})}function dne(e){const t=A.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:a}=Kd(),c=ne.useNotify(),u=ne.useRedirect(),[d]=ne.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:Or().toISOString()}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(u(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{c("resources.notifications.messages.readed.error","warning")}}),h=T.useCallback(()=>d(),[d]),[g]=ne.useLocaleState(),m=T.useMemo(()=>Or(n.created).locale(g).fromNow(),[n,g]);return f.jsx(A.ListItem,{disablePadding:!0,divider:s,children:f.jsxs(A.ListItemButton,{selected:o,onClick:h,children:[f.jsx(A.ListItemAvatar,{children:f.jsx(A.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(ze.MessageOutlined,{})})}),f.jsx(A.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),f.jsx(A.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(A.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:m,primaryTypographyProps:{variant:"caption"}})]})})}const fne={width:36,height:36,fontSize:"1rem"},pne={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function hI(){const{enable:e}=Kd();return e?f.jsx(hne,{}):null}function hne(){const e=ne.useTranslate(),t=A.useTheme(),n=ne.useRefresh(),r=ne.useNotify(),{downMd:o}=Yn(),{resource:s}=Kd(),[a,c]=T.useState([]),{data:u,isLoading:d}=ne.useGetList(s,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),h=a.filter(M=>M.readed===null).length,{open:g,anchorEl:m,handleClose:v,handleToggle:y}=Qs();T.useEffect(()=>{!d&&u&&c(u??[])},[u,d]);const C=a.filter(M=>!M.readed).map(M=>M.id),[w]=ne.useUpdateMany(s,{ids:C,data:{readed:Or().toISOString()}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),E=T.useCallback(()=>{w()},[w]);return f.jsxs(f.Fragment,{children:[f.jsx(ta,{value:"notifications",selected:g,onChange:y,children:f.jsx(A.Badge,{badgeContent:h,color:"primary",children:f.jsx(ze.BellOutlined,{})})}),f.jsx(A.Popper,{placement:o?"bottom":"bottom-end",open:g,anchorEl:m,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:M})=>f.jsx(Uo,{type:"grow",position:o?"top":"top-right",in:g,...M,children:f.jsx(A.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(A.ClickAwayListener,{onClickAway:v,children:f.jsxs(En,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:h>0&&f.jsx(A.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:E,children:f.jsx(Od,{color:"success",size:"small",children:f.jsx(ze.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(A.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":fne,"& .MuiListItemSecondaryAction-root":{...pne,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((I,j)=>f.jsx(dne,{selected:h>0,notification:I,onClick:v,divider:j<a.length-1},I.id))}),f.jsx(A.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${s}`,LinkComponent:ct.Link,onClick:v,children:f.jsx(A.ListItemText,{primary:f.jsx(A.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),f.jsx(A.Divider,{})]})})})})})]})}function gne(){const[e,t]=T.useState(!1),n=T.useCallback(()=>t(!1),[t]),r=T.useCallback(()=>t(!0),[t]),o=ne.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsxs(A.ListItemButton,{onClick:r,children:[f.jsx(A.ListItemIcon,{children:f.jsx(gn.Key,{})}),f.jsx(A.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(A.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(f0,{onSuccess:n})})]})}function mne(){const e=ne.useLogout(),t=ne.useTranslate();return f.jsx(f.Fragment,{children:f.jsxs(A.ListItemButton,{onClick:e,children:[f.jsx(A.ListItemIcon,{children:f.jsx(gn.LogoutOutlined,{})}),f.jsx(A.ListItemText,{primary:t("ra.auth.logout")})]})})}function vne(){const e=ne.useTranslate(),t=ne.useAuthProvider(),n=T.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t]),[r,o]=T.useState(!1);return T.useEffect(()=>{if(!t.isImpersonating){console.warn("The authProvider does not support the isImpersonating feature",t);return}t.isImpersonating().then(s=>o(s))},[t,o]),r?f.jsx(f.Fragment,{children:f.jsxs(A.ListItemButton,{onClick:n,children:[f.jsx(A.ListItemIcon,{children:f.jsx(gn.LogoutOutlined,{})}),f.jsx(A.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null}function gI(){var m;const e=A.useTheme(),t=ne.useDataProvider(),{identity:n}=ne.useGetIdentity(),r=n!==void 0&&n.image&&n.image!==null&&n.image!=="",[o,s]=T.useState(null),{open:a,anchorEl:c,handleToggle:u,handleClose:d}=Qs(),h=ne.useLogout(),g=T.useCallback(()=>{h()},[h]);return T.useEffect(()=>{r&&t.getFile("/profile/me/image").then(v=>s(v))},[t,r]),f.jsxs(f.Fragment,{children:[f.jsx(ta,{sx:{p:.25,width:"auto"},onClick:u,value:"profile",selected:a,children:f.jsxs(A.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Ou,{alt:(m=n==null?void 0:n.name)==null?void 0:m.toUpperCase(),src:o,size:"xs"}),f.jsx(A.Typography,{variant:"subtitle1",children:n==null?void 0:n.name})]})}),f.jsx(Om,{placement:"bottom-end",open:a,anchorEl:c,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:v})=>{var y;return f.jsx(Uo,{type:"grow",position:"top-right",in:a,...v,children:f.jsx(A.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(A.ClickAwayListener,{onClickAway:d,children:f.jsxs(En,{elevation:0,border:!1,content:!1,children:[f.jsx(A.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(A.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(A.Grid,{item:!0,children:f.jsxs(A.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Ou,{alt:"profile user",src:o,sx:{width:32,height:32}}),f.jsxs(A.Stack,{children:[f.jsx(A.Typography,{variant:"h6",children:n==null?void 0:n.name}),f.jsx(A.Typography,{variant:"body2",color:"textSecondary",children:(y=n==null?void 0:n.roles)==null?void 0:y.map(C=>C.name.replace("ROLE_","")).join(",")})]})]})}),f.jsx(A.Grid,{item:!0,children:f.jsx(A.Tooltip,{title:"Logout",children:f.jsx(Od,{size:"large",sx:{color:"text.primary"},onClick:g,children:f.jsx(ze.LogoutOutlined,{})})})})]})}),f.jsx(A.Grid,{container:!0,children:f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(gne,{}),f.jsx(mne,{}),f.jsx(vne,{})]})})})]})})})})}})]})}function mI(e){const t=$t(),{downMd:n}=Yn(),{open:r,anchorEl:o,handleToggle:s,handleClose:a}=Qs();return n?f.jsxs(f.Fragment,{children:[f.jsx(ta,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:f.jsx(ze.MoreOutlined,{})}),f.jsx(A.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:c})=>f.jsx(Uo,{type:"fade",in:r,...c,children:f.jsx(A.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(A.ClickAwayListener,{onClickAway:a,children:f.jsx(A.AppBar,{color:"inherit",children:f.jsx(A.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})}function vI(e){return f.jsx(A.Box,{...e,flex:1})}function yI(e){const t=A.useTheme(),n=A.useScrollTrigger({disableHysteresis:!0,threshold:0}),{container:r}=mn();return t.shadows[4]=t.customShadows.z1,f.jsx(A.AppBar,{elevation:n?4:0,sx:{top:60,bgcolor:t.palette.background.paper,width:"100%",height:62,justifyContent:"center",borderTop:`1px solid ${t.palette.divider}`,borderBottom:`1px solid ${t.palette.divider}`,zIndex:1098,color:t.palette.grey[500]},children:f.jsx(A.Container,{maxWidth:r?"xl":!1,children:f.jsx(A.Box,{sx:{display:"flex",alignItems:"center"},children:e.children})})})}function bI(e){const{horizontal:t}=Yn();return t?f.jsx(yI,{children:e.children}):f.jsx(lI,{children:e.children})}function Ga({item:e,level:t}){const n=$t(),{horizontal:r,downLg:o}=Yn(),{drawerOpen:s,openItem:a,activeItem:c,openDrawer:u}=ol();let d="_self";e.target&&(d="_blank");const h=(e==null?void 0:e.external)!==!1?{component:T.forwardRef((E,M)=>f.jsx(ct.Link,{...E,to:e.url,target:d,ref:M}))}:{component:"a",href:e.url,target:d},g=e.icon,m=e.icon?f.jsx(g,{style:{fontSize:s?"1rem":"1.25rem"}}):!1,v=a.findIndex(E=>E===e.id)>-1,{pathname:y}=ct.useLocation();T.useEffect(()=>{y.endsWith(e.url)&&c([e.id])},[y]);const C=n.palette.mode==="dark"?"grey.400":"text.primary",w=n.palette.mode==="dark"&&s?"text.primary":"primary.main";return f.jsx(f.Fragment,{children:r?f.jsxs(A.ListItemButton,{...h,disabled:e.disabled,selected:v,sx:{zIndex:1201,...s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{bgcolor:"transparent",color:w,"&:hover":{color:w,bgcolor:"transparent"}}},...!s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[m?f.jsx(A.ListItemIcon,{sx:{minWidth:36,...!s&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!s&&v&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:m}):null,!m&&f.jsx(A.ListItemIcon,{sx:{color:v?"primary.main":"secondary.main",...!s&&{borderRadius:1.5,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!s&&v&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:f.jsx(bm,{size:4,color:v?"primary":"secondary"})}),f.jsx(A.ListItemText,{primary:f.jsx(A.Typography,{variant:"h6",color:"inherit",children:e.title})}),(s||!s&&t!==1)&&e.chip?f.jsx(A.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?f.jsx(A.Avatar,{children:e.chip.avatar}):null}):null]}):f.jsxs(A.ListItemButton,{...h,disabled:e.disabled,selected:v,sx:{zIndex:1201,pl:s?`${t*28}px`:1.5,py:!s&&t===1?1.25:1,...s&&{"&:hover":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter",borderRight:`2px solid ${n.palette.primary.main}`,color:w,"&:hover":{color:w,bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"}}},...!s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},...o&&{onClick:()=>u(!1)},children:[m?f.jsx(A.ListItemIcon,{sx:{minWidth:28,color:v?w:C,...!s&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:n.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!s&&v&&{bgcolor:n.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:n.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:m}):null,s||!s&&t!==1?f.jsx(A.ListItemText,{primary:f.jsx(A.Typography,{variant:"h6",sx:{color:v?w:C},children:e.title})}):null,(s||!s&&t!==1)&&e.chip?f.jsx(A.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?f.jsx(A.Avatar,{children:e.chip.avatar}):null}):null]})})}const TC=de(A.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:38,left:-5,width:10,height:10,backgroundColor:e.palette.background.paper,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderLeft:`1px solid ${e.palette.grey.A800}`,borderBottom:`1px solid ${e.palette.grey.A800}`}}));function qa({menu:e,level:t,parentId:n,setSelectedItems:r,selectedItems:o,setSelectedLevel:s,selectedLevel:a}){var V;const c=$t(),{activeItem:u}=ol(),{horizontal:d}=Yn(),{drawerOpen:h}=ol(),g=ct.useNavigate(),[m,v]=T.useState(!1),[y,C]=T.useState(null),[w,E]=T.useState(null);function M(ee){E(null),s(t),h?(v(!m),C(y?null:e.id),r(y?"":e.id),e.url&&g(`${e.url}`)):E(ee==null?void 0:ee.currentTarget)}function I(){h||e.url&&g(`${e.url}`)}function j(ee){E(ee==null?void 0:ee.currentTarget)}function O(){v(!1),C(null),E(null)}T.useMemo(()=>{y===o?t===1&&v(!0):t===a&&(v(!1),C(null))},[o,t,y,a]);const{pathname:F}=ct.useLocation(),k=!!w;function $(ee,N){ee.forEach(q=>{q.url===F&&(v(!0),C(N))})}T.useEffect(()=>{v(!1),C(null),k&&E(null),e.children&&e.children.forEach(ee=>{var N;(N=ee.children)!=null&&N.length&&$(ee.children,e.id),ee.url===F&&(C(e.id),v(!0)),F.includes(ee.url)&&(C(e.id),v(!0))})},[F,e.children]),T.useEffect(()=>{e.url===F&&y!==e.id&&(u([e.id]),C(e.id),E(null),v(!0))},[F,e,y,u]);const G=(V=e.children)==null?void 0:V.map(ee=>{switch(ee.type){case"collapse":return f.jsx(qa,{setSelectedItems:r,setSelectedLevel:s,selectedLevel:a,selectedItems:o,menu:ee,level:t+1,parentId:n},ee.id);case"item":return f.jsx(Ga,{item:ee,level:t+1},ee.id);default:return f.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Collapse or Item"},ee.id)}}),Q=y===e.id,U=t===1?f.jsx(ze.BorderOutlined,{style:{fontSize:"1rem"}}):!1,se=e.icon,ae=e.icon?f.jsx(se,{style:{fontSize:h?"1rem":"1.25rem"}}):U,X=c.palette.mode==="dark"?"grey.400":"text.primary",K=c.palette.mode==="dark"&&h?c.palette.text.primary:c.palette.primary.main,W=k?`collapse-pop-${e.id}`:void 0,te={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"};return f.jsx(f.Fragment,{children:d?f.jsx(f.Fragment,{children:f.jsxs(A.ListItemButton,{id:`boundary-${W}`,disableRipple:!0,selected:Q,onMouseEnter:j,onMouseLeave:O,onClick:j,"aria-describedby":W,sx:{"&.Mui-selected":{bgcolor:"transparent"}},children:[f.jsxs(A.Box,{onClick:I,sx:te,children:[ae?f.jsx(A.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,color:c.palette.secondary.dark},children:ae}):null,!ae&&t!==1&&f.jsx(A.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,bgcolor:"transparent","&:hover":{bgcolor:"transparent"}},children:f.jsx(bm,{size:4,color:Q?"primary":"secondary"})}),f.jsx(A.ListItemText,{primary:f.jsx(A.Typography,{variant:"body1",color:"inherit",sx:{my:"auto"},children:e.title})}),k?f.jsx(ze.RightOutlined,{}):f.jsx(ze.DownOutlined,{})]}),w?f.jsx(TC,{id:W,open:k,anchorEl:w,placement:"right-start",style:{zIndex:2001},modifiers:[{name:"offset",options:{offset:[-10,0]}}],children:({TransitionProps:ee})=>f.jsx(Uo,{in:k,...ee,children:f.jsx(A.Paper,{sx:{overflow:"hidden",mt:1.5,py:.5,boxShadow:c.shadows[8],backgroundImage:"none"},children:f.jsx(A.ClickAwayListener,{onClickAway:O,children:f.jsx(A.Box,{children:G})})})})}):null]})}):f.jsxs(f.Fragment,{children:[f.jsxs(A.ListItemButton,{disableRipple:!0,selected:y===e.id,...!h&&{onMouseEnter:M,onMouseLeave:O},onClick:M,sx:{pl:h?`${t*28}px`:1.5,py:!h&&t===1?1.25:1,...h&&{"&:hover":{bgcolor:c.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:"transparent",color:K,"&:hover":{color:K,bgcolor:c.palette.mode==="dark"?"divider":"transparent"}}},...!h&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[ae?f.jsx(A.ListItemIcon,{onClick:I,sx:{minWidth:28,color:y===e.id?"primary.main":X,...!h&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:c.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!h&&y===e.id&&{bgcolor:c.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:c.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:ae}):null,h||!h&&t!==1?f.jsx(A.ListItemText,{primary:f.jsx(A.Typography,{variant:"h6",color:y===e.id?"primary":X,children:e.title}),secondary:e.caption?f.jsx(A.Typography,{variant:"caption",color:"secondary",children:e.caption}):null}):null,h||!h&&t!==1?k||m?f.jsx(ze.UpOutlined,{style:{fontSize:"0.625rem",marginLeft:1,color:c.palette.primary.main}}):f.jsx(ze.DownOutlined,{style:{fontSize:"0.625rem",marginLeft:1}}):null,!h&&f.jsx(TC,{open:k,anchorEl:w,placement:"right-start",style:{zIndex:2001},popperOptions:{modifiers:[{name:"offset",options:{offset:[-12,1]}}]},children:({TransitionProps:ee})=>f.jsx(Uo,{in:k,...ee,children:f.jsx(A.Paper,{sx:{overflow:"hidden",mt:1.5,boxShadow:c.customShadows.z1,backgroundImage:"none",border:`1px solid ${c.palette.divider}`},children:f.jsx(A.ClickAwayListener,{onClickAway:O,children:f.jsx(A.Box,{children:G})})})})})]}),h?f.jsx(A.Collapse,{in:m,timeout:"auto",unmountOnExit:!0,children:f.jsx(A.List,{sx:{p:0},children:G})}):null]})})}const yne=de(A.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:5,left:32,width:12,height:12,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderWidth:"6px",borderStyle:"solid",borderColor:`${e.palette.background.paper} transparent transparent ${e.palette.background.paper}`}}));function xI({item:e,lastItem:t,remItems:n,lastItemId:r,setSelectedItems:o,selectedItems:s,setSelectedLevel:a,selectedLevel:c}){var W,te;const u=$t(),d=L.useTranslate(),{pathname:h}={pathname:""},{horizontal:g,downLg:m}=Yn(),v=ol(),{drawerOpen:y,selectedID:C,activeID:w}=v,[E,M]=T.useState(null),[I,j]=T.useState(e),O=!!E;T.useEffect(()=>{if(t)if(e.id===r){const V={...e},ee=n.map(N=>N.elements);V.children=ee.flat(1),j(V)}else j(e)},[e,t,m]);function F(V,ee){V.forEach(N=>{var q;(q=N.children)!=null&&q.length&&F(N.children,I.id),N.url===h&&w(ee)})}function k(V){(V.children?V.children:[]).forEach(N=>{var q;(q=N.children)!=null&&q.length&&F(N.children,I.id),N.url===h&&w(I.id)})}T.useEffect(()=>{k(I),O&&M(null)},[h,I]);function $(V){O||M(V==null?void 0:V.currentTarget)}function G(){M(null)}const Q=I==null?void 0:I.icon,U=I!=null&&I.icon?f.jsx(Q,{style:{fontSize:20,stroke:"1.5",color:C===I.id?u.palette.primary.main:u.palette.secondary.dark}}):null,se=(W=e.children)==null?void 0:W.map(V=>{switch(V.type){case"collapse":return f.jsx(qa,{menu:V,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s,level:1,parentId:I.id},V.id);case"item":return f.jsx(Ga,{item:V,level:1},V.id);default:return f.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},V.id)}}),ae=n.map((V,ee)=>{var N;return f.jsxs(T.Fragment,{children:[V.title?f.jsx(A.Typography,{variant:"caption",sx:{pl:2},children:V.title}):null,(N=V==null?void 0:V.elements)==null?void 0:N.map(q=>{switch(q.type){case"collapse":return f.jsx(qa,{menu:q,level:1,parentId:I.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s},q.id);case"item":return f.jsx(Ga,{item:q,level:1},q.id);default:return f.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},q.id)}})]},ee)}),X=(te=I.children)==null?void 0:te.map(V=>{switch(V.type){case"collapse":return f.jsx(qa,{menu:V,level:1,parentId:I.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s},V.id);case"item":return f.jsx(Ga,{item:V,level:1},V.id);default:return f.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},V.id)}}),K=O?`group-pop-${e.id}`:void 0;return f.jsx(f.Fragment,{children:g?f.jsx(A.List,{children:f.jsxs(A.ListItemButton,{selected:C===I.id,sx:{p:1,my:.5,mr:1,display:"flex",alignItems:"center",backgroundColor:"inherit","&.Mui-selected":{bgcolor:"transparent"}},onMouseEnter:$,onClick:$,onMouseLeave:G,"aria-describedby":K,children:[U?f.jsx(A.ListItemIcon,{sx:{minWidth:28},children:I.id===r?f.jsx(ze.DownOutlined,{style:{fontSize:20,stroke:"1.5"}}):U}):null,f.jsx(A.ListItemText,{sx:{mr:1},primary:f.jsx(A.Typography,{variant:"body1",color:C===I.id?u.palette.primary.main:u.palette.secondary.dark,children:I.id===r?d("ra.actions.more"):I.title})}),O?f.jsx(ze.DownOutlined,{style:{fontSize:16,stroke:"1.5"}}):f.jsx(ze.RightOutlined,{style:{fontSize:16,stroke:"1.5"}}),E?f.jsx(yne,{id:K,open:O,anchorEl:E,placement:"bottom-start",style:{zIndex:2001},children:({TransitionProps:V})=>f.jsx(Uo,{in:O,...V,children:f.jsx(A.Paper,{sx:{mt:.5,py:1.25,boxShadow:u.shadows[8],backgroundImage:"none"},children:f.jsx(A.ClickAwayListener,{onClickAway:G,children:f.jsx(A.Box,{sx:{maxHeight:"calc(100vh - 170px)",overflowY:"auto","&::-webkit-scrollbar":{opacity:0,width:4,"&:hover":{opacity:.7}},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:u.palette.divider,borderRadius:4}},children:I.id!==r?X:ae})})})})}):null]})}):f.jsx(A.List,{subheader:e.title&&y?f.jsxs(A.Box,{sx:{pl:3,mb:1.5},children:[f.jsx(A.Typography,{variant:"subtitle2",color:u.palette.mode==="dark"?"textSecondary":"text.secondary",children:e.title}),e.caption?f.jsx(A.Typography,{variant:"caption",color:"secondary",children:e.caption}):null]}):null,sx:{mt:y&&e.title?1.5:0,py:0,zIndex:0},children:se})})}function CI(e){const{horizontal:t}=Yn(),{open:n}=Vi(),r=Pr(e,{pt:n?t?0:2:0,"& > ul:first-of-type":{mt:0},display:t?{xs:"block",lg:"flex"}:"block"});return f.jsx(A.Box,{sx:r,children:e.children})}function wI(e){const{horizontal:t}=Yn(),{menu:n,isLoading:r}=Jm(),[o,s]=T.useState(""),[a,c]=T.useState(0),{horizontalMaxItems:u}=mn(),d=t?u:void 0;let h=r?0:(n??[]).length-1,g=[],m;return!r&&d&&d<(n??[]).length&&(m=(n??[])[d-1].id,h=d-1,g=(n??[]).slice(d-1,(n??[]).length).map(v=>({title:v.title,elements:v.children,icon:v.icon}))),f.jsx(CI,{...e,children:!r&&Z.map((n??[]).slice(0,h+1),v=>{const{type:y}=v;switch(y){case"group":return f.jsx(xI,{item:v,setSelectedItems:s,setSelectedLevel:c,selectedLevel:a,selectedItems:o,lastItem:d,remItems:g,lastItemId:m},v.id);default:return f.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Navigation Group"},v.id)}})})}function bne({open:e,anchorEl:t,handleClose:n,theme:r,mode:o,toggleThemeMode:s}){const a=ne.useTranslate();return f.jsx(Om,{placement:"bottom-end",open:e,anchorEl:t,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:c})=>f.jsx(Uo,{type:"grow",position:"top-right",in:e,...c,children:f.jsx(A.Paper,{sx:{boxShadow:r.customShadows.z1,minWidth:200,[r.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(A.ClickAwayListener,{onClickAway:n,children:f.jsx(En,{elevation:0,border:!1,content:!1,children:f.jsxs(A.List,{children:[f.jsxs(A.ListItemButton,{selected:o==="light",onClick:()=>s("light"),children:[f.jsx(ze.SunOutlined,{}),f.jsx(A.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.light")})]}),f.jsxs(A.ListItemButton,{selected:o==="dark",onClick:()=>s("dark"),children:[f.jsx(ze.MoonOutlined,{}),f.jsx(A.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.dark")})]}),f.jsxs(A.ListItemButton,{selected:o==="auto",onClick:()=>s("auto"),children:[f.jsx(gn.Brightness6,{}),f.jsx(A.Typography,{variant:"subtitle1",ml:1,textTransform:"none",children:a("ra.preferences.theme.auto")})]})]})})})})})})}function AI(){const e=A.useTheme(),{mode:t,setMode:n}=mn(),{open:r,anchorEl:o,handleToggle:s,handleClose:a}=Qs(),c=T.useCallback(d=>{n(d)},[n]),u=T.useCallback(()=>{switch(t){case"light":return f.jsx(ze.SunOutlined,{});case"dark":return f.jsx(ze.MoonOutlined,{});default:return f.jsx(gn.Brightness6,{})}},[t]);return f.jsxs(ta,{value:"theme-mode","aria-label":"toggle mode",onClick:s,selected:!1,children:[f.jsx(u,{}),r?f.jsx(bne,{open:r,anchorEl:o,handleClose:a,theme:e,mode:t,toggleThemeMode:c}):null]})}const SI=T.forwardRef((e,t)=>{const n=Pr(e,{display:"flex",width:"100%"});return f.jsx(A.Box,{ref:t,...e,sx:n,children:e.children})});function I0({source:e="paper"}){const{mode:t}=mn(),n=A.useTheme();return T.useEffect(()=>{var o;const r=Z.get(n.palette.background,e);(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",r)},[t,n,e]),null}const TI=YT(function(t){const{name:n,version:r,enableThemeToggler:o,enableNotification:s,enableLocaleSwitcher:a}=t,{isLoading:c,navigation:u,breadcrumbs:d}=O2();return f.jsxs(SI,{children:[f.jsxs(pI,{children:[f.jsx(vI,{}),a?f.jsx(dI,{}):null,o?f.jsx(AI,{}):null,f.jsx(I0,{}),f.jsx(e2,{}),s?f.jsx(hI,{}):null,f.jsx(mI,{children:f.jsx(gI,{})})]}),f.jsx(bI,{children:f.jsx(wI,{})}),f.jsxs(XT,{error:t.error,children:[!c&&f.jsx(oS,{titleBottom:!0,mode:"breadcrumbs",navigation:u,breadcrumbs:d,card:!1,divider:!1,icon:!0,icons:!0}),t.children,f.jsx(ct.Outlet,{}),f.jsx(E0,{name:n,version:r,copy:t==null?void 0:t.copy})]})]})}),xne=de("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}}));function EI(){return f.jsx(xne,{children:f.jsx(A.LinearProgress,{color:"primary"})})}function Cne(e){return t=>f.jsx(T.Suspense,{fallback:f.jsx(EI,{}),children:f.jsx(e,{...t})})}function O0({title:e}){return f.jsxs(A.Stack,{direction:"row",children:[f.jsx(A.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",f.jsx(A.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]})}const wne=de(L.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}}));function II(e){return f.jsx(wne,{...e})}var sl=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(sl||{});const OI=lo().required(),PI=lo().oneOf(Object.values(sl));function Ane(e){var E;const t=Ts.useQueryClient(),[n,r]=T.useState(!1),[o,s]=T.useState(()=>()=>Promise.resolve()),a=ne.useGetIdentity(),c=(E=a==null?void 0:a.data)==null?void 0:E.email,u=ne.useDataProvider(),d=T.useCallback(()=>c?u.get("onboarding").then(M=>{var I;return(I=M==null?void 0:M.data)==null?void 0:I.value}):Promise.reject(),[u,c]),{data:h,isLoading:g,isError:m}=Ts.useQuery({queryKey:["GET","onboarding",c],queryFn:d,staleTime:24*60*60*1e3,retry:c!==void 0}),[v,y]=T.useState(()=>()=>Promise.resolve()),w=Ts.useMutation({mutationFn:v}).mutateAsync;return T.useEffect(()=>{function M(){const I=Z.chain(h??{}).clone().extend({[e]:Date.now()}).value();return u.post("onboarding",I).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}y(()=>M)},[u,h,e,t,c]),T.useEffect(()=>{r(Z.isNil((h??{})[e]))},[h,e,r]),T.useEffect(()=>{s(()=>()=>w())},[w]),{loading:g,error:m,onboardingRequired:n,acknowledgeOnboarding:o}}function Sne(e){const[t,n]=a0("onboarding",{}),[r,o]=T.useState(!1),[s,a]=T.useState(()=>()=>Promise.resolve());return T.useEffect(()=>{o(Z.isNil((t??{})[e]))},[t,e,o]),T.useEffect(()=>{a(()=>()=>(n(c=>Z.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:s}}function Tne(){return{onboardingRequired:!1,acknowledgeOnboarding:T.useRef(()=>Promise.resolve()).current}}function jI(e,t){i0({mode:PI,topic:OI}).validateSync({mode:e,topic:t});const n=Ane(t),r=Sne(t),o=Tne();switch(e){case sl.USER:return n.loading?o:n.error?r:Z.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case sl.BROWSER:return r;default:return o}}var js=(e=>(e.RESTART="RESTART",e.SET_SHOW="SET_SHOW",e.REGISTER_TIP="REGISTER_TIP",e.UNREGISTER_TIP="UNREGISTER_TIP",e.DISMISS_TIP="DISMISS_TIP",e.SET_ON_COMPLETE="SET_ON_COMPLETE",e))(js||{});function Ene(e,t){var o;const n=Z.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:s}=t;return Z.extend(n,{show:s})}case"REGISTER_TIP":{const{payload:s}=t,{id:a}=s,c=Z.chain(n.tips).clone().reject(h=>h.id===a).value(),u=Z.find(n.tips,{id:a}),d=Z.chain(u??{}).clone().extend(s).value();return c.push(d),Z.extend(n,{tips:Z.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:s}=t,a=Z.isString(s)?s:s.id,c=Z.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return Z.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:s}=t,a=Z.isString(s)?s:s.id,c=Z.chain(n.tips).reject(m=>m.id===a).value(),u=Z.find(n.tips,{id:a});if(Z.isNil(u))return n;const d=Z.chain(u).clone().extend({dismissed:!0}).value();c.push(d);const h=((o=Z.chain(c).reject(m=>m.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&Z.chain(c).reject(m=>m.step<h).reject(m=>m.dismissed??!1).isEmpty().value()&&e.onComplete(),Z.extend(n,{tips:Z.sortBy(c,["step"]),currentStep:h})}case"SET_ON_COMPLETE":{const{payload:s}=t;return Z.extend(n,{onComplete:s})}case"RESTART":{const s=Z.chain(n.tips).clone().map(a=>Z.omit(a,"dismissed")).value();return Z.extend(n,{tips:s,currentStep:0})}default:return n}}const P0=T.createContext(void 0);function Ine(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=jI(t,n),[s,a]=T.useReducer(Ene,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),c=T.useMemo(()=>({state:s,dispatch:a}),[s,a]);return T.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),T.useEffect(()=>{function u(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:u})},[o,a]),f.jsx(P0.Provider,{value:c,children:e.children})}function RI(){const e=T.useContext(P0);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function One(){return RI().state}function MI(){return RI().dispatch}function kI(e){i0({id:lo().required(),step:N2().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:s,currentStep:a}=One(),c=Z.find(s,{id:t}),{dismissed:u}=c??{},d=MI(),h=T.useCallback(()=>{d({type:js.DISMISS_TIP,payload:t})},[d,t]);return T.useEffect(()=>{(Z.isNil(c)||n!==(c==null?void 0:c.step))&&d({type:js.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c,d]),T.useEffect(()=>()=>{d({type:js.UNREGISTER_TIP,payload:t})},[t,d]),{tip:Z.chain(c??e).clone().extend({open:o&&!Z.isNil(c)&&a===n&&!u}).value(),dismiss:h}}function Pne(){const e=MI();return T.useCallback(()=>{e({type:js.RESTART})},[e])}function jne(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:s,dismiss:a}=kI({id:t,step:n,completeOnboarding:o}),{open:c}=s,u=Z.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(kd,{...u,arrow:!0,open:c,title:f.jsxs(A.Stack,{gap:1,children:[f.jsx(A.Typography,{children:r}),f.jsx(A.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const Rne=A.styled(jne)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${A.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${A.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${A.tooltipClasses.arrow}`]:{color:r.main}}}),j0=T.memo(e=>{const{page:t,rowsPerPage:n,count:r,onPageChange:o,size:s="small",className:a,...c}=e,u=ne.useTranslate(),d=Math.ceil(r/n)||1;if(d===1)return f.jsx(EC,{className:a});function h(g,m,v){return g==="page"?v?u("ra.navigation.current_page",{page:m,_:`page ${m}`}):u("ra.navigation.page",{page:m,_:`Go to page ${m}`}):u(`ra.navigation.${g}`,{_:`Go to ${g} page`})}return f.jsx(EC,{className:a,children:f.jsx(A.Pagination,{size:s,count:d,page:t+1,onChange:(g,m)=>o(g,m-1),...kne(c),getItemAriaLabel:h})})});j0.propTypes={count:x.number.isRequired,onPageChange:x.func.isRequired,page:x.number.isRequired,rowsPerPage:x.number.isRequired,color:x.oneOf(["primary","secondary","standard"]),size:x.oneOf(["small","medium","large"])};const Mne="RaPaginationActions",EC=de("div",{name:Mne,overridesResolver:e=>e.root})(()=>({flexShrink:0,ml:4}));function kne({nextIconButtonProps:e,backIconButtonProps:t,slotProps:n,...r}){return r}const R0=T.memo(e=>{const{rowsPerPageOptions:t=Fne,actions:n,limit:r=null,...o}=e,{isLoading:s,hasNextPage:a,page:c,perPage:u,total:d,setPage:h,setPerPage:g}=ne.useListPaginationContext(e),m=ne.useTranslate(),v=A.useMediaQuery(k=>k.breakpoints.down("md")),[y,C]=T.useState(c-1),w=T.useMemo(()=>d!=null?Math.ceil(d/u):void 0,[u,d]),E=T.useCallback(ut.debounce(k=>{h(k+1)},500),[h]),M=T.useCallback((k,$)=>{var U,se;if(!k)return;if(k.preventDefault(),$<0||w!==void 0&&$>w-1)throw new Error(m("ra.navigation.page_out_of_boundaries",{page:$+1}));const G=(((U=k.target.dataset)==null?void 0:U.testid)||((se=k.target.classList)==null?void 0:se.value))??"",Q=G.includes("MuiPaginationItem-previousNext")||G.includes("NavigateBeforeIcon")||G.includes("NavigateNextIcon")||G.includes("KeyboardArrowLeftIcon")||G.includes("KeyboardArrowRightIcon");C($),Q?E($):h($+1)},[E,h,m,w]),I=T.useCallback(k=>{g(Number(k.target.value))},[g]),j=T.useCallback(({from:k,to:$,count:G})=>G===-1&&a?m("ra.navigation.partial_page_range_info",{offsetBegin:k,offsetEnd:$,_:"%{from}-%{to} of more than %{to}"}):m("ra.navigation.page_range_info",{offsetBegin:k,offsetEnd:$,total:G===-1?$:G,_:"%{from}-%{to} of %{count === -1 ? to : count}"}),[m,a]),O=T.useCallback(k=>m(`ra.navigation.${k}`,{_:`Go to ${k} page`}),[m]);if(s)return f.jsx(A.Toolbar,{variant:"dense"});if(d===0||c<1||w!==void 0&&c>w)return r!=null&&process.env.NODE_ENV==="development"&&console.warn("The Pagination limit prop is deprecated. Empty state should be handled by the component displaying data (Datagrid, SimpleList)."),null;if(v)return f.jsx(A.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:M,rowsPerPageOptions:Lne,component:"span",labelDisplayedRows:j,...ne.sanitizeListRestProps(o)});const F=n||(!s&&d!=null?j0:void 0);return f.jsx(A.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:M,onRowsPerPageChange:I,ActionsComponent:F,nextIconButtonProps:{disabled:!a},component:"span",labelRowsPerPage:m("ra.navigation.page_rows_per_page"),labelDisplayedRows:j,getItemAriaLabel:O,rowsPerPageOptions:t,...ne.sanitizeListRestProps(o)})});R0.propTypes={actions:ne.ComponentPropType,limit:x.element,rowsPerPageOptions:x.arrayOf(x.oneOfType([x.number,x.shape({label:x.string.isRequired,value:x.number.isRequired})]))};const Fne=[5,10,25,50],Lne=[];function FI({children:e}){const t=ct.useLocation(),{pathname:n}=t;return T.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),f.jsx(f.Fragment,{children:e})}const Dne=de("div")({width:"100%",overflowX:"auto",display:"block"});function _ne({shadow:e,children:t,...n}){return f.jsx(En,{content:!1,border:!1,shadow:e,boxShadow:!0,...n,children:t})}function LI({title:e}){return f.jsx(A.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substring(0,1).toUpperCase()})}const Bne="RaButton";function Nne(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}const Vne=de(A.Button,{name:Bne,overridesResolver:(e,t)=>t.root})({"&.MuiButton-sizeSmall":{lineHeight:1.5}});function Ml(e){const{disableIconOnly:t=!1,label:n,children:r,className:o,color:s,size:a,disabled:c,alignIcon:u,to:d,...h}=e,g=L.useTranslate(),m=Nne(d);if(t){const v=n?g(n,{_:n}):void 0;return f.jsx(Vne,{className:o,color:s,size:a,"aria-label":v,disabled:c,startIcon:u==="left"&&r?r:void 0,endIcon:u==="right"&&r?r:void 0,...m,...h,children:v})}return f.jsx(L.Button,{...e})}function DI(e){const{className:t,icon:n=Wne,label:r="ra.action.create",resource:o,scrollToTop:s=!0,variant:a,to:c,state:u={},disableFloatingButton:d=!1,...h}=e,g=ne.useResourceContext(e),m=ne.useCreatePath(),v=ne.useTranslate(),y=A.useMediaQuery(E=>E.breakpoints.down("md")),C=ZS({},$ne.get(String(s)),u),w=qne(c);return!d&&y?f.jsx(zne,{component:ct.Link,to:m({resource:g,type:"create"}),state:C,color:"primary",className:nt(rd.floating,t),"aria-label":r?v(r):"ra.action.create",...h,...w,children:n}):f.jsx(Une,{component:ct.Link,to:m({resource:g,type:"create"}),state:C,className:nt(rd.root,t),label:r,variant:a,...h,...w,children:n})}const Wne=f.jsx(Rm,{}),$ne=new Map([["true",{_scrollToTop:!0}],["false",{}]]);DI.propTypes={resource:x.string,className:x.string,icon:x.element,label:x.string};const nd="RaCreateButton",rd={root:`${nd}-root`,floating:`${nd}-floating`},zne=de(A.Fab,{name:nd,overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${rd.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),Une=de(Ml,{name:nd,overridesResolver:(e,t)=>t.root})({});function Hne(e,t){return e.resource===t.resource&&e.label===t.label&&e.translate===t.translate&&e.disabled===t.disabled&&Du(e.to,t.to)&&Du(e.state,t.state)}const Gne=_.memo(DI,Hne);function qne(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}function M0(e,t){const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]}function Yne(e,t){return e&&e.data?{data:M0(e.data,t),total:e.total+1}:e}function Kne(e,t){return e&&e.length>0?M0(e,t):e}function Xne(e,t){return e&&e.data?{...e,data:M0(e.data,t),total:e.total+1}:e}function Zne(e){const{disableFloatingButton:t,label:n="ra.action.create",startIcon:r=f.jsx(ze.PlusCircleOutlined,{}),...o}=e,s=T.useCallback(a=>{var c;a.preventDefault(),(c=e==null?void 0:e.onClick)==null||c.call(e)},[e]);return t?f.jsx(Ml,{...o,onClick:s,label:n,children:r}):f.jsx(CY,{...e,onClick:s,label:n,children:r})}function Qne(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=Pn.useFormContext(),o=ne.useTranslate(),s=T.useCallback(a=>{a.preventDefault(),a.stopPropagation(),r(c=>t(c,n))()},[r,t,n]);return f.jsx(A.Button,{onClick:s,color:"primary",variant:"contained",size:"medium",children:o("ra.action.save")})}function Jne(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,onSubmit:s,mutationOptions:a,scroll:c="body",...u}=e,d=Ts.useQueryClient(),h=ne.useResourceContext(),g=ne.useTranslate(),m=T.Children.only(t),[v,y]=T.useState(!1),C=ne.useNotify(),w=T.useCallback(()=>y(!0),[]),E=T.useCallback(()=>y(!1),[]),M=T.useCallback((I,j,O)=>{var $,G;const k=Date.now();d.setQueryData([h,"getOne",{id:I.id}],I),d.setQueriesData([h,"getList"],Q=>Xne(Q,I),{updatedAt:k}),d.setQueriesData([h,"getMany"],Q=>Kne(Q,I),{updatedAt:k}),d.setQueriesData([h,"getManyReference"],Q=>Yne(Q,I),{updatedAt:k}),E(),C("ra.notification.created",{messageArgs:{smart_count:1}}),(G=($=e==null?void 0:e.mutationOptions)==null?void 0:$.onSuccess)==null||G.call($,I,j,O)},[E,C,e.mutationOptions,d,h]);return f.jsxs(f.Fragment,{children:[f.jsx(Zne,{...u,onClick:w}),f.jsx(A.Dialog,{open:v,scroll:c,onClose:E,maxWidth:n,fullWidth:r,fullScreen:o,children:f.jsx(A.DialogContent,{sx:{m:0,p:0},children:f.jsx(ne.CreateBase,{...e,mutationOptions:{...a,onSuccess:M},children:T.isValidElement(m)?T.cloneElement(m,{...m.props,modal:!0,toolbar:f.jsxs(Zo,{children:[f.jsx(A.Button,{variant:"text",size:"medium",onClick:E,children:g("ra.action.cancel")}),s?f.jsx(Qne,{onSubmit:s,closeDialog:E}):f.jsx(Xm,{type:"button"})]})}):null})})})]})}function ere(e){const t=T.useCallback(n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e==null?void 0:e.onClick)==null||r.call(e)},[e]);return f.jsx(i2,{...e,onClick:t})}function tre(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=Pn.useFormContext(),o=T.useCallback(s=>{s.preventDefault(),s.stopPropagation(),r(a=>t(a,n))()},[r,t,n]);return f.jsx(Ml,{disableIconOnly:!0,onClick:o,color:"primary",variant:"contained",size:"medium",label:"ra.action.save"})}function nre(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,mutationOptions:s,onSubmit:a,scroll:c="body",...u}=e,d=ne.useNotify(),[h,g]=T.useState(!1),m=T.Children.only(t),v=T.useCallback(()=>g(!0),[]),y=T.useCallback(()=>g(!1),[]),C=T.useCallback((E,M,I)=>{var j,O;y(),d("ra.notification.updated",{messageArgs:{smart_count:1},undoable:(e==null?void 0:e.mutationMode)==="undoable"}),(O=(j=e==null?void 0:e.mutationOptions)==null?void 0:j.onSuccess)==null||O.call(j,E,M,I)},[y,d,e.mutationOptions,e.mutationMode]),w=ne.useRecordContext();return f.jsxs(f.Fragment,{children:[f.jsx(ere,{...u,onClick:v}),f.jsx(A.Dialog,{open:h,scroll:c,onClose:y,fullWidth:r,maxWidth:n,fullScreen:o,keepMounted:!1,children:f.jsx(A.DialogContent,{sx:{m:0,p:0},children:f.jsx(ne.EditBase,{...e,id:w.id,mutationMode:"pessimistic",mutationOptions:{...s,onSuccess:C},children:T.isValidElement(m)?T.cloneElement(m,{...m.props,modal:!0,toolbar:f.jsxs(Zo,{children:[f.jsx(Ml,{disableIconOnly:!0,variant:"text",size:"medium",onClick:y,label:"ra.action.cancel"}),a?f.jsx(tre,{onSubmit:a,closeDialog:y}):f.jsx(Xm,{type:"button"})]})}):null})})})]})}function rre({label:e="ra.auth.sign_in",...t}){const n=L.useRecordContext(),[r,o]=T.useState(!1),s=L.useAuthProvider(),a=T.useCallback(c=>{c.stopPropagation(),c.preventDefault(),o(!0),s.impersonate(n==null?void 0:n.id).then(()=>{o(!1),document.location.href="/"})},[s,n==null?void 0:n.id]);return f.jsx(L.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:f.jsx(gn.VpnKey,{})})}function ore({source:e,label:t,variant:n="body1",record:r,spaceBottom:o,spaceTop:s,component:a,leftIcon:c,rightIcon:u,button:d,buttonProps:h,...g}){const{getCurrentDialog:m}=d0(),v=ne.useResourceContext(g),y=m(),C=ne.useRecordContext(),w=r||C,E=ut.get(w,e||"");return f.jsxs(A.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:M=>({pt:1,pb:1,borderBottom:`1px solid ${M.palette.divider}`,...o&&{mb:2},...s&&{mt:2}}),children:[f.jsxs(A.Stack,{direction:"row",alignItems:"start",children:[c?T.isValidElement(c)?T.cloneElement(c,{style:Xc}):T.createElement(c,{style:Xc}):null,f.jsx(ne.FieldTitle,{label:t,source:e,resource:y||v})]}),f.jsxs(A.Stack,{direction:"row",alignItems:"center",children:[a?T.isValidElement(a)?T.cloneElement(a,{record:w,resource:v,value:E}):T.createElement(a,{source:e,record:w,resource:v,value:E}):f.jsx(A.Typography,{variant:n,children:E}),u?T.isValidElement(u)?T.cloneElement(u,{style:Xc}):T.createElement(u,{style:Xc}):null,d?f.jsx(A.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...h,children:d}):null]})]})}const Xc={width:"1.5rem",alignSelf:"center"};function _I(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:a,selectedIds:c=[],onUnselectItems:u}=ne.useListContext(e),d=ne.useTranslate(),h=T.useCallback(()=>{u()},[u]);return f.jsx(ire,{className:r,children:f.jsxs(A.Toolbar,{"data-test":"bulk-actions-toolbar",className:nt(Tr.toolbar,{[Tr.collapsed]:c.length===0}),...ne.sanitizeListRestProps(o),children:[f.jsxs("div",{className:Tr.title,children:[f.jsx(A.IconButton,{className:Tr.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:h,size:"small",children:f.jsx(gn.Close,{fontSize:"small"})}),f.jsx(A.Typography,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:c.length})})]}),f.jsx(L.TopToolbar,{className:Tr.topToolbar,children:T.Children.map(n,g=>T.isValidElement(g)?T.cloneElement(g,{filterValues:s,resource:a,selectedIds:c}):null)})]})})}const Ci="RaBulkActionsToolbar",Tr={toolbar:`${Ci}-toolbar`,topToolbar:`${Ci}-topToolbar`,buttons:`${Ci}-buttons`,collapsed:`${Ci}-collapsed`,title:`${Ci}-title`,icon:`${Ci}-icon`},ire=de("div",{name:Ci,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${Tr.toolbar}`]:{position:"absolute",left:0,right:0,zIndex:3,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.text.primary,justifyContent:"space-between",backgroundColor:e.palette.mode==="light"?Oh(e.palette.primary.light,.8):e.palette.primary.dark,minHeight:e.spacing(6),height:e.spacing(6),transform:`translateY(-${e.spacing(6)})`,transition:`${e.transitions.create("height")}, ${e.transitions.create("min-height")}, ${e.transitions.create("transform")}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},[`& .${Tr.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${Tr.buttons}`]:{},[`& .${Tr.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${Tr.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${Tr.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),nh={p:0,m:0},IC={p:2,m:0,borderRadius:0,width:"100%"};function sre(e){const{children:t}=e,[n,r]=_.useState(null);function o(y){r(y.currentTarget)}function s(){r(null)}const a=A.useMediaQuery(y=>y.breakpoints.down("md")),{filterValues:c,resource:u,selectedIds:d=[],onUnselectItems:h}=L.useListContext(e),g=!!n&&d!==void 0&&d.length>0,m=g?"simple-popover":void 0,v=_.useCallback(()=>{h(),r(null)},[h,r]);return f.jsx(A.Fade,{in:d!==void 0&&d.length>0,children:f.jsxs(A.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[f.jsx(A.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),f.jsx(A.Popover,{id:m,open:g,anchorEl:n,onClose:s,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:f.jsxs(A.List,{sx:nh,children:[f.jsx(A.ListItem,{sx:nh,children:f.jsx(L.Button,{onClick:v,sx:IC,label:"ra.action.unselect",startIcon:f.jsx(Gh,{}),children:f.jsx(Gh,{})})}),_.Children.map(t,y=>{var C;return f.jsx(A.ListItem,{sx:nh,children:_.isValidElement(y)?_.cloneElement(y,{filterValues:c,resource:u,selectedIds:d,sx:IC,...(C=y.props)!=null&&C.popover?{closePopover:s}:{}}):null})})]})})]})})}const BI=T.createContext({});BI.displayName="DatagridContext";function are({children:e,value:t}){return f.jsx(BI.Provider,{value:t,children:e})}const OC=f.jsx(L.BulkDeleteButton,{}),NI=_.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?L.PureDatagridBody:L.DatagridBody,header:o=L.DatagridHeader,children:s,className:a,empty:c=ure,expand:u,bulkActionsToolbar:d=!1,bulkActionButtons:h=OC,hover:g,isRowSelectable:m,isRowExpandable:v,resource:y,rowClick:C,rowSx:w,rowStyle:E,size:M="small",sx:I,expandSingle:j=!1,...O}=e,{sort:F,data:k,isLoading:$,onSelect:G,onToggleItem:Q,selectedIds:U,setSort:se,total:ae}=ne.useListContext(e),X=!!h,K=T.useMemo(()=>({isRowExpandable:v,expandSingle:j}),[v,j]),W=T.useRef(null);T.useEffect(()=>{(!U||U.length===0)&&(W.current=null)},[JSON.stringify(U)]);const te=T.useCallback((V,ee)=>{const N=k.map(ce=>ce.id),q=N.indexOf(W.current);if(W.current=ee.target.checked?V:null,ee.shiftKey&&q!==-1){const ce=N.indexOf(V),pe=N.slice(Math.min(q,ce),Math.max(q,ce)+1),fe=ee.target.checked?jX(U,pe):HX(U,pe);G(m?fe.filter(he=>m(k.find(me=>me.id===he))):fe)}else Q(V)},[k,m,G,Q,U]);return $===!0?f.jsx(L.DatagridLoading,{className:a,expand:u,hasBulkActions:X,nbChildren:_.Children.count(s),size:M}):k==null||k.length===0||ae===0?c||null:f.jsx(are,{value:K,children:f.jsxs(L.DatagridRoot,{sx:I,className:nt(L.DatagridClasses.root,a),children:[d!=null&&T.isValidElement(d)?T.cloneElement(d,{selectedIds:U,total:ae}):h!==!1?f.jsx(_I,{children:T.isValidElement(h)?h:OC}):null,f.jsx("div",{className:L.DatagridClasses.tableWrapper,children:f.jsxs(A.Table,{ref:t,className:L.DatagridClasses.table,size:M,...cre(O),children:[PC(o,{children:s,sort:F,data:k,hasExpand:!!u,hasBulkActions:X,isRowSelectable:m,onSelect:G,resource:y,selectedIds:U,setSort:se},s),PC(r,{expand:u,rowClick:C,data:k,hasBulkActions:X,hover:g,onToggleItem:te,resource:y,rowSx:w,rowStyle:E,selectedIds:U,isRowSelectable:m},s)]})})]})})});function PC(e,t,n){return T.isValidElement(e)?T.cloneElement(e,t,n):T.createElement(e,t,n)}const lre=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"];function cre(e){return Object.keys(ne.sanitizeListRestProps(e)).filter(t=>!lre.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{})}NI.displayName="Datagrid";const ure=f.jsx(L.ListNoResults,{}),dre=de(NI,{slot:"root"})(({theme:e})=>({"& .RaBulkActionsToolbar-toolbar":{height:48},"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",backgroundColor:"inherit !important",textTransform:"none",fontSize:e.typography.subtitle1.fontSize}}));function fre(e){return f.jsx(dre,{...e})}const pre=de("div")(({theme:e})=>({padding:e.spacing(2)}));function hre({actions:e,className:t,...n}){const{hasCreate:r}=ne.useResourceDefinition(n),o=ne.useResourceContext(n),s=ne.useTranslate(),a=ne.useGetResourceLabel(),c=s(`resources.${o}.forcedCaseName`,{smart_count:0,_:a(o,0)}),u=s("ra.page.empty",{name:c}),d=s("ra.page.invite");return f.jsxs(gre,{className:t,children:[f.jsxs("div",{className:ji.message,children:[f.jsx(gn.Inbox,{className:ji.icon}),f.jsx(A.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${o}.empty`,{_:u})}),r?f.jsx(A.Typography,{variant:"body1",children:s(`resources.${o}.invite`,{_:d})}):null]}),f.jsx(pre,{className:ji.toolbar,children:e})]})}const pu="ApplicaEmpty",ji={message:`${pu}-message`,icon:`${pu}-icon`,toolbar:`${pu}-toolbar`},gre=de("span",{name:pu,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${ji.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${ji.icon}`]:{width:"9em",height:"9em"},[`& .${ji.toolbar}`]:{textAlign:"center",marginTop:"2em"}})),mre=f.jsx(L.ListActions,{}),vre=f.jsx(L.Pagination,{}),yre=f.jsx(L.Empty,{}),bre=A.Card;function xre(e){const{actions:t=mre,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:a,pagination:c=vre,children:u,className:d,component:h=bre,title:g,empty:m=yre,...v}=e,{defaultTitle:y,data:C,error:w,isLoading:E,filterValues:M,resource:I}=ne.useListContext(e),j=$t(),O=_.isValidElement(n);if(!u||!C&&E&&s)return null;function F(){return f.jsxs("div",{className:_r.main,style:{border:O?"1px solid":"none",borderRadius:O?4:0,borderColor:O?j.palette.mode==="dark"?j.palette.divider:j.palette.grey.A800:"transparent",backgroundColor:O?j.palette.background.paper:"transparent"},children:[r||t?f.jsx(L.ListToolbar,{className:_r.actions,filters:r,actions:t,hasCreate:a}):null,!w&&f.jsx(h,{className:_r.content,children:o&&u&&_.isValidElement(u)?T.cloneElement(u,{bulkActionButtons:o}):u}),w?f.jsx(Qm,{error:w,resetErrorBoundary:null}):c!==!1&&c]})}function k(){return m!==!1&&T.cloneElement(m,{className:_r.noResults,hasCreate:a})}const $=!E&&(C==null?void 0:C.length)===0&&!Object.keys(M).length&&m!==!1;return f.jsxs(wre,{className:nt("list-page",d),...v,children:[f.jsx(L.Title,{title:g,defaultTitle:y,preferenceKey:`${I}.list.title`}),$?k():F(),O?f.jsx(Cre,{aside:n}):null]})}function Cre({aside:e}){var r;const t=((r=e==null?void 0:e.props)==null?void 0:r.order)??-1,n=$t();return f.jsx(A.Card,{className:_r.asideCard,sx:{order:t,mr:t===-1?2:0,ml:t!==-1?2:0,width:200,border:"1px solid",borderRadius:1,borderColor:n.palette.mode==="dark"?n.palette.divider:n.palette.grey.A800,backgroundColor:n.palette.background.paper,backgroundImage:"none"},children:f.jsx(A.CardContent,{sx:{pt:1},children:T.cloneElement(e,{})})})}const gs="RaList",_r={main:`${gs}-main`,content:`${gs}-content`,actions:`${gs}-actions`,noResults:`${gs}-noResults`,asideCard:`${gs}-asideCard`},wre=de("div",{name:gs,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${_r.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${_r.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${_r.actions}`]:{},[`& .${_r.noResults}`]:{},[`& .${_r.asideCard}`]:{[e.breakpoints.down("md")]:{display:"none"},[`& .${L.SavedQueriesListClasses.floatingIcon}`]:{fontSize:"1.125rem"},[`& .${L.SavedQueriesListClasses.floatingTooltip}`]:{top:"-1.2em"},"& form":{marginTop:e.spacing(2)}}}));function Are({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=Sre,filterDefaultValues:s,perPage:a=10,queryOptions:c,resource:u,sort:d,storeKey:h,...g}){return f.jsx(ne.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:s,perPage:a,queryOptions:c,resource:u,sort:d,storeKey:h,children:f.jsx(xre,{...g})})}const Sre={},Tre=Al(Are,{slot:"root"})(({theme:e})=>({"& .RaList-main":{overflowX:"auto","& .RaBulkActionsToolbar-toolbar":{height:36,top:42,paddingTop:16,"& .RaBulkActionsToolbar-title":{alignItems:"end","& .MuiTypography-root":{alignSelf:"center"}}},"& .MuiToolbar-root":{"& form":{padding:e.spacing(2),paddingBottom:e.spacing(2),alignItems:"flex-start"}},"& .MuiButton-root":{margin:0},"& .RaList-actions":{minHeight:80,alignItems:"center",padding:e.spacing(2.5),[e.breakpoints.down("sm")]:{flexDirection:"row"},"& form":{alignItems:"center",minHeight:"auto",paddingBottom:0,rowGap:e.spacing(2.5)},"& .RaFilterForm-filterFormInput":{margin:0,"& .MuiInputLabel-root":{paddingTop:0},"& .MuiFormControl-root":{marginTop:0},"& .ra-input":{alignSelf:"center",marginTop:0},[e.breakpoints.down("sm")]:{"&>.MuiStack-root":{width:"100%","&>div:not(.MuiStack-root)":{width:"100%"}}}},"& .RaFilterFormInput-hideButton":{margin:"0 !important",alignSelf:"center"},"& > .MuiToolbar-root":{flex:"unset",padding:0,alignSelf:"center",minHeight:"fit-content",[e.breakpoints.down("sm")]:{paddingBottom:e.spacing(2)}}},"& .RaList-content":{borderRadius:0,"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}}));function Ere(e){const t=e.aside?T.Fragment:En;return f.jsx(t,{...!e.aside&&{content:!1},children:f.jsx(Tre,{...e,pagination:f.jsx(R0,{})})})}function Ire(){const e=L.useRefresh(),t=L.useNotify(),n=L.useResourceContext(),r=L.useUnselectAll(n),{selectedIds:o,data:s}=L.useListContext(),a=L.useRecordContext(),c=o.map(g=>s.find(m=>m.id===g)),[u,{isLoading:d}]=L.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Or().toISOString()},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),r()},onError:()=>t("ra.notification.readed_error",{type:"warning"}),onFailure:()=>t("ra.notification.readed_error",{type:"warning"})}),h=T.useCallback(()=>{u()},[u]);return f.jsx(L.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:h,children:f.jsx(gn.Email,{})})}function Ore(){const e=L.useRefresh(),t=L.useNotify(),n=L.useResourceContext(),r=L.useUnselectAll(n),{selectedIds:o,data:s}=L.useListContext(),a=L.useRecordContext(),c=o.map(g=>s.find(m=>m.id===g)).concat([a]),[u,{isLoading:d}]=L.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:null},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),r()},onFailure:()=>t("resources.notifications.messages.unreaded.error",{type:"warning"})}),h=T.useCallback(()=>{u()},[u]);return f.jsx(L.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:h,children:f.jsx(gn.Drafts,{})})}function Pre(e){const t=L.useRecordContext(e),n=L.useResourceContext(e),r=L.useRedirect(),o=L.useNotify(),s=L.useTranslate(),[a]=L.useLocaleState(),c=T.useMemo(()=>t!=null&&t.readed?Or(t==null?void 0:t.readed).locale(a).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,a]),[u]=L.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Or().toISOString()}},{onSuccess:()=>{t!=null&&t.resource&&(t!=null&&t.resource.startsWith("/")?r(t==null?void 0:t.resource):document.location.href=t==null?void 0:t.resource)},onError:()=>{o("ra.notification.readed_error",{type:"warning"})}}),d=T.useCallback(()=>u(),[u]);return f.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[f.jsx(A.Typography,{variant:"subtitle1",children:f.jsxs(A.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),f.jsx(A.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),c?f.jsx(A.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:s("ra.notification.readed",{readed:c})}):null]})}function jre({...e}){const t=A.useTheme(),{mode:n,colorize:r,density:o}=T.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?A.darken:A.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]);function s(a){return{backgroundColor:a!=null&&a.readed?r(t.palette.secondary[n],o):r(t.palette.primary[n],o)}}return f.jsxs(L.Datagrid,{...e,rowSx:s,children:[f.jsx(Pre,{source:"notification",sortable:!1}),f.jsx(lT,{source:"created"}),f.jsxs(Ho,{children:[f.jsx(Ire,{}),f.jsx(Ore,{})]})]})}const Rre=de(L.SimpleList,{name:"ApplicaSimpleList",slot:"root"})(({theme:e})=>({padding:e.spacing(1),paddingTop:0,paddingBottom:0}));function Mre({children:e}){const t=$t();return f.jsx(En,{sx:{maxWidth:{xs:400,lg:475},margin:{xs:2.5,md:3},"& > *":{flexGrow:1,flexBasis:"50%"}},content:!1,border:!1,boxShadow:!0,shadow:t.customShadows.z1,children:f.jsx(A.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})}function Zd({version:e,name:t,copy:n,children:r,logo:o,background:s=Fd,footer:a=!0}){return f.jsxs(A.Box,{children:[f.jsx(I0,{source:"default"}),T.isValidElement(s)?s:T.createElement(s),f.jsxs(A.Grid,{container:!0,direction:"column",justifyContent:"flex-end",children:[f.jsx(A.Grid,{item:!0,xs:12,sx:{ml:3},children:o||f.jsx(O0,{title:t})}),f.jsxs(A.Grid,{item:!0,xs:12,children:[f.jsx(A.Grid,{item:!0,xs:12,container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:{xs:"calc(100vh - 210px)",sm:"calc(100vh - 134px)",md:"calc(100vh - 112px)"}},children:f.jsx(A.Grid,{item:!0,children:f.jsx(Mre,{children:r})})}),a?f.jsx(A.Grid,{item:!0,sx:{pb:1,position:"absolute",bottom:0,ml:2},children:f.jsx(E0,{name:t,copy:n,version:e})}):null]})]})]})}function kre({name:e,copy:t,logo:n,version:r,background:o}){const s=ne.useTranslate(),a=ne.useAuthProvider(),c=ne.useNotify(),u=ct.useNavigate(),{token:d}=ct.useParams();return T.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(d).then(()=>{c("ra.auth.activate_success",{type:"info"}),Z.delay(()=>u("/login"),1e3)}).catch(h=>{c(h,{type:"error"}),Z.delay(()=>u("/login"),1e3)})},[d,a,c,u]),f.jsx(Zd,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(A.Grid,{container:!0,spacing:3,children:[f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(A.Typography,{variant:"h3",children:s("ra.auth.activate")}),f.jsx(A.Typography,{component:ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:s("ra.auth.back_to_login")})]})}),f.jsx(A.Grid,{item:!0,xs:12,children:s("ra.auth.activate_pending")})]})})}function VI(){const e=T.useCallback(()=>location.reload(),[]);return f.jsx(A.Container,{children:f.jsxs(A.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[f.jsx("img",{alt:"Error",src:AS,style:{width:"100%",maxWidth:450}}),f.jsx(A.Typography,{variant:"h2",children:"Ops! An error occurred..."}),f.jsx(A.Typography,{children:"We're fixing the problem. Please try again later."}),f.jsx(A.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}function WI({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:s=!1,redirectTo:a,background:c=f.jsx(Fd,{})}){const[u,d]=ne.useSafeSetState(!1),h=ne.useLogin(),g=ne.useTranslate(),m=ne.useNotify(),v=ne.useCheckAuth(),y=ct.useNavigate();T.useEffect(()=>{v({},!1).then(()=>{y("/")}).catch(()=>{})},[v,y]);function C(w){d(!0),h(w,a).then(()=>{d(!1)}).catch(E=>{d(!1),m(typeof E=="string"?E:typeof E>"u"||!E.message?"ra.auth.sign_in_error":E.message,{type:"error",messageArgs:{_:typeof E=="string"?E:E&&E.message?E.message:void 0}})})}return f.jsx(Zd,{name:t,version:e,copy:n,logo:r,background:c,children:f.jsxs(A.Grid,{container:!0,spacing:3,children:[f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(A.Typography,{variant:"h3",children:"Login"}),s?f.jsx(A.Typography,{component:ct.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:g("ra.auth.register")}):null]})}),f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(ne.Form,{onSubmit:C,children:[f.jsxs(A.Grid,{container:!0,children:[f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(Er,{autoFocus:!0,source:"username",label:g("ra.auth.username"),autoComplete:"username",validate:ne.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(Er,{source:"password",label:g("ra.auth.password"),type:"password",autoComplete:"current-password",validate:ne.required(),placeholder:g("ra.auth.password_placeholder"),fullWidth:!0})})]}),o?f.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(A.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:f.jsx(A.Link,{variant:"h6",component:ct.Link,to:"/recover",color:"text.primary",children:g("ra.auth.forgot_password")})})}):null,f.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(A.Button,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0,children:u?f.jsx(A.CircularProgress,{size:19,thickness:3}):g("ra.auth.sign_in")})})]})})]})})}function Fre({name:e,copy:t,logo:n,version:r,background:o}){const[s,a]=T.useState(!1),c=ne.useTranslate(),u=ne.useRedirect(),d=ne.useNotify(),h=ne.useAuthProvider();function g({email:m}){a(!0),h.recover(m).then(v=>{const y=`ra.auth.recover_${v.responseCode}`,C=v.responseCode==="ok"?"info":"error";d(y,{type:C}),u("/login")}).catch(v=>{d((v==null?void 0:v.message)||(v==null?void 0:v.toString()),{type:"error"})}).finally(()=>a(!1))}return f.jsx(Zd,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(A.Grid,{container:!0,spacing:3,children:[f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(A.Typography,{variant:"h3",children:c("ra.auth.recover.title")}),f.jsx(A.Typography,{component:ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.back_to_login")})]})}),f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(L.Form,{onSubmit:g,children:[f.jsx(A.Grid,{container:!0,children:f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Er,{source:"email",validate:[ne.required(),ne.email()]})})}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:f.jsx(A.Typography,{variant:"caption",children:c("ra.auth.recover.inbox_help")})}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(A.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(A.CircularProgress,{size:19,thickness:3}):c("ra.auth.recover")})})]})})]})})}function Lre({name:e,copy:t,version:n,logo:r,background:o}){const[s,a]=T.useState(!1),c=ne.useTranslate(),u=ne.useRedirect(),d=ne.useNotify(),h=ne.useAuthProvider();function g(m){a(!0),h.register(m).then(v=>{const y=`ra.auth.register_${v.responseCode}`,C=v.responseCode==="ok"?"info":"error";d(y,{type:C}),u("/login")}).catch(v=>{d(v,{type:"error"})}).finally(()=>a(!1))}return f.jsx(Zd,{name:e,copy:t,logo:r,background:o,version:n,children:f.jsxs(A.Grid,{container:!0,spacing:3,children:[f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(A.Typography,{variant:"h3",children:c("ra.auth.register.title")}),f.jsx(A.Typography,{component:ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.already_have_account")})]})}),f.jsx(A.Grid,{item:!0,xs:12,children:f.jsxs(L.Form,{onSubmit:g,children:[f.jsxs(A.Grid,{container:!0,children:[f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Er,{source:"name",label:c("ra.register.name"),validate:ne.required()})}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Er,{source:"email",type:"email",validate:[ne.required(),ne.email()]})}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Er,{source:"password",type:"password",validate:ne.required()})})]}),f.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(A.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(A.CircularProgress,{size:19,thickness:3}):c("ra.auth.create_account")})})]})})]})})}function Dre(e){return{MuiAccordion:{defaultProps:{disableGutters:!0,square:!0,elevation:0},styleOverrides:{root:{border:`1px solid ${e.palette.secondary.light}`,"&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-disabled":{backgroundColor:e.palette.secondary.lighter}}}}}}function _re(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function Bre(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:f.jsx(ze.RightOutlined,{style:{fontSize:"0.75rem"}})},styleOverrides:{root:{backgroundColor:t.secondary.lighter,flexDirection:"row-reverse",minHeight:46},expandIconWrapper:{"&.Mui-expanded":{transform:"rotate(90deg)"}},content:{marginTop:n(1.25),marginBottom:n(1.25),marginLeft:n(1)}}}}}function pi({color:e,theme:t}){const n=Qt(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:tt(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function Nre(e){const t=pi({color:"primary",theme:e});return{MuiAlert:{styleOverrides:{root:{color:e.palette.text.primary,fontSize:"0.875rem"},icon:{fontSize:"1rem"},message:{padding:0,marginTop:3},filled:{color:e.palette.grey[0]},border:{padding:"10px 16px",border:"1px solid",...t,"&.MuiAlert-borderPrimary":pi({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":pi({color:"secondary",theme:e}),"&.MuiAlert-borderError":pi({color:"error",theme:e}),"&.MuiAlert-borderSuccess":pi({color:"success",theme:e}),"&.MuiAlert-borderInfo":pi({color:"info",theme:e}),"&.MuiAlert-borderWarning":pi({color:"warning",theme:e})},action:{"& .MuiButton-root":{padding:2,height:"auto",fontSize:"0.75rem",marginTop:-2},"& .MuiIconButton-root":{width:"auto",height:"auto",padding:2,marginRight:6,"& .MuiSvgIcon-root":{fontSize:"1rem"}}}}}}}function Vre(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function Wre(e){var t;return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},popper:{border:`1px solid ${e.palette.mode==="dark"?(t=e.palette.dark)==null?void 0:t.main:e.palette.grey[100]}`},clearIndicator:{width:"auto",height:"auto"}}}}}function hi({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function $re(e){const t=hi({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":hi({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":hi({color:"secondary",theme:e}),"&.MuiBadge-colorError":hi({color:"error",theme:e}),"&.MuiBadge-colorInfo":hi({color:"info",theme:e}),"&.MuiBadge-colorSuccess":hi({color:"success",theme:e}),"&.MuiBadge-colorWarning":hi({color:"warning",theme:e})}}}}}function Ze({variant:e,color:t,theme:n}){const r=Qt(n,t),{lighter:o,main:s,dark:a,contrastText:c}=r,u=`${t}Button`,d=Us(n,u),h={"&::after":{boxShadow:`0 0 5px 5px ${tt(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${tt(s,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...h};case"shadow":return{color:c,backgroundColor:s,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:a},...h};case"outlined":return{borderColor:s,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...h};case"dashed":return{color:s,borderColor:s,backgroundColor:o,"&:hover":{color:a,borderColor:a},...h};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...h}}}function zre(e){const t=Ze({variant:"dashed",color:"primary",theme:e}),n=Ze({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":Ze({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":Ze({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":Ze({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":Ze({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":Ze({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":Ze({variant:"dashed",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},shadow:{...n,"&.MuiButton-shadowPrimary":Ze({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":Ze({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":Ze({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":Ze({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":Ze({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":Ze({variant:"shadow",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},containedPrimary:Ze({variant:"contained",color:"primary",theme:e}),containedSecondary:Ze({variant:"contained",color:"secondary",theme:e}),containedError:Ze({variant:"contained",color:"error",theme:e}),containedSuccess:Ze({variant:"contained",color:"success",theme:e}),containedInfo:Ze({variant:"contained",color:"info",theme:e}),containedWarning:Ze({variant:"contained",color:"warning",theme:e}),outlinedPrimary:Ze({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:Ze({variant:"outlined",color:"secondary",theme:e}),outlinedError:Ze({variant:"outlined",color:"error",theme:e}),outlinedSuccess:Ze({variant:"outlined",color:"success",theme:e}),outlinedInfo:Ze({variant:"outlined",color:"info",theme:e}),outlinedWarning:Ze({variant:"outlined",color:"warning",theme:e}),textPrimary:Ze({variant:"text",color:"primary",theme:e}),textSecondary:Ze({variant:"text",color:"secondary",theme:e}),textError:Ze({variant:"text",color:"error",theme:e}),textSuccess:Ze({variant:"text",color:"success",theme:e}),textInfo:Ze({variant:"text",color:"info",theme:e}),textWarning:Ze({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function Ure(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function Hre(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function Gre(){return{MuiCard:{styleOverrides:{root:{boxShadow:"none"}}}}}function qre(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function ls({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function Yre(e){switch(e){case"small":return{size:16,fontSize:1,position:1};case"large":return{size:24,fontSize:1.6,position:2};case"medium":default:return{size:20,fontSize:1.35,position:2}}}function rh(e){const t=Yre(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function Kre(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:f.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:f.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(ze.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:f.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(ze.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...rh("small")},"&.size-medium":{...rh("medium")},"&.size-large":{...rh("large")}},colorPrimary:ls({color:"primary",theme:e}),colorSecondary:ls({color:"secondary",theme:e}),colorSuccess:ls({color:"success",theme:e}),colorWarning:ls({color:"warning",theme:e}),colorInfo:ls({color:"info",theme:e}),colorError:ls({color:"error",theme:e})}}}}function cs({color:e,theme:t}){const n=Qt(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Wn({color:e,theme:t}){const n=Qt(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function Xre(e){const t=Wn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":cs({color:"primary",theme:e}),"&.MuiChip-colorSecondary":cs({color:"secondary",theme:e}),"&.MuiChip-colorError":cs({color:"error",theme:e}),"&.MuiChip-colorInfo":cs({color:"info",theme:e}),"&.MuiChip-colorSuccess":cs({color:"success",theme:e}),"&.MuiChip-colorWarning":cs({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":Wn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":Wn({color:"secondary",theme:e}),"&.MuiChip-lightError":Wn({color:"error",theme:e}),"&.MuiChip-lightInfo":Wn({color:"info",theme:e}),"&.MuiChip-lightSuccess":Wn({color:"success",theme:e}),"&.MuiChip-lightWarning":Wn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":Wn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":Wn({color:"secondary",theme:e}),"&.MuiChip-combinedError":Wn({color:"error",theme:e}),"&.MuiChip-combinedInfo":Wn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":Wn({color:"success",theme:e}),"&.MuiChip-combinedWarning":Wn({color:"warning",theme:e})}}}}}function Zre(e){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:tt("#000",.7)},"& .MuiCardContent-root":{[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}},"& .MuiPaper-root:has(.tabbed-form)":{overflowY:"unset",width:"100%"}}}}}}function Qre(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function Jre(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function us({color:e,theme:t}){const n=Qt(t,e),{main:r,dark:o,contrastText:s}=n,a=`${e}Button`,c=Us(t,a);return{color:s,backgroundColor:r,boxShadow:c,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${tt(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${tt(r,.9)}`}}}function eoe(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":us({color:"primary",theme:e}),"&.MuiFab-secondary":us({color:"secondary",theme:e}),"&.Mui-error":us({color:"error",theme:e}),"&.MuiFab-success":us({color:"success",theme:e}),"&.MuiFab-info":us({color:"info",theme:e}),"&.MuiFab-warning":us({color:"warning",theme:e}),"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}}}}}}function toe(e){return{MuiIconButton:{styleOverrides:{root:{borderRadius:4},sizeLarge:{width:e.spacing(5.5),height:e.spacing(5.5),fontSize:"1.25rem"},sizeMedium:{width:e.spacing(4.5),height:e.spacing(4.5),fontSize:"1rem"},sizeSmall:{width:e.spacing(3.75),height:e.spacing(3.75),fontSize:"0.75rem"},sizeExtraSmall:{width:e.spacing(2.6875),height:e.spacing(2.6875),fontSize:"0.625rem"}}}}}function noe(e){return{MuiInputBase:{styleOverrides:{}}}}function roe(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1.3em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function ooe(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function ioe(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function soe(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function aoe(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function loe(e){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function coe(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function gi({variant:e,theme:t}){const n=Qt(t,e),{light:r}=n,o=Us(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function uoe(e){return{MuiOutlinedInput:{styleOverrides:{input:{padding:"10.5px 14px 10.5px 12px"},notchedOutline:{borderColor:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[300]},root:{...gi({variant:"primary",theme:e}),"&.Mui-error":{...gi({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:gi({variant:"secondary",theme:e}),colorError:gi({variant:"error",theme:e}),colorWarning:gi({variant:"warning",theme:e}),colorInfo:gi({variant:"info",theme:e}),colorSuccess:gi({variant:"success",theme:e})}}}}function doe(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function At({variant:e,color:t,theme:n}){const r=Qt(n,t),{lighter:o,light:s,dark:a,main:c,contrastText:u}=r,d={"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:u,backgroundColor:c,"&:hover":{backgroundColor:s},...d};case"outlined":return{borderColor:c,"&:hover":{backgroundColor:o,borderColor:s},...d};case"text":default:return{color:c,"&:hover":{backgroundColor:c,color:o},...d}}}function foe(e){return{MuiPaginationItem:{styleOverrides:{root:{"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},text:{"&.Mui-selected":{backgroundColor:"transparent",fontSize:"1rem",fontWeight:500,"&.MuiPaginationItem-textPrimary":At({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":At({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":At({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":At({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":At({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":At({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":At({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":At({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":At({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":At({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":At({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":At({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":At({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":At({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":At({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":At({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":At({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":At({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":At({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":At({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":At({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":At({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":At({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":At({variant:"outlined",color:"warning",theme:e})}}}}}}function poe(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function ds({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o,dark:s}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function hoe(e){switch(e){case"small":return{size:16,dotSize:8,position:3};case"large":return{size:24,dotSize:12,position:5};case"medium":default:return{size:20,dotSize:10,position:4}}}function oh(e){const t=hoe(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function goe(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:f.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:f.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:f.jsx(A.Box,{className:"dot",sx:{width:8,height:8,backgroundColor:"inherit",borderRadius:"50%",position:"absolute",top:3,left:3}})})},styleOverrides:{root:{color:t.secondary[300],"&.size-small":{...oh("small")},"&.size-medium":{...oh("medium")},"&.size-large":{...oh("large")}},colorPrimary:ds({color:"primary",theme:e}),colorSecondary:ds({color:"secondary",theme:e}),colorSuccess:ds({color:"success",theme:e}),colorWarning:ds({color:"warning",theme:e}),colorInfo:ds({color:"info",theme:e}),colorError:ds({color:"error",theme:e})}}}}function fs({color:e,theme:t}){const n=Qt(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function moe(e){return{MuiSlider:{styleOverrides:{track:{height:"1px"},thumb:{width:14,height:14,border:`2px solid ${e.palette.primary.main}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-thumbColorPrimary":fs({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":fs({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":fs({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":fs({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":fs({color:"info",theme:e}),"&.MuiSlider-thumbColorError":fs({color:"error",theme:e})},mark:{width:4,height:4,borderRadius:"50%",border:`1px solid ${e.palette.secondary.light}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-markActive":{opacity:1,borderColor:"inherit",borderWidth:2}},rail:{color:e.palette.secondary.light},root:{"&.Mui-disabled":{".MuiSlider-rail":{opacity:.25},".MuiSlider-track":{color:e.palette.secondary.lighter},".MuiSlider-thumb":{border:`2px solid ${e.palette.secondary.lighter}`}}},valueLabel:{backgroundColor:e.palette.grey[600],color:e.palette.grey[0]}}}}}function voe(e){switch(e){case"small":return{width:28,height:16,base:12,thumb:10,trackRadius:8};case"large":return{width:60,height:28,base:32,thumb:22,trackRadius:24};case"medium":default:return{width:44,height:22,base:22,thumb:16,trackRadius:16}}}function ih(e,t){const n=voe(t);return{width:n.width,height:n.height,"& .MuiSwitch-switchBase":{padding:3,"&.Mui-checked":{transform:`translateX(${n.base}px)`}},"& .MuiSwitch-thumb":{width:n.thumb,height:n.thumb},"& .MuiSwitch-track":{borderRadius:n.trackRadius}}}function yoe(e){return{MuiSwitch:{styleOverrides:{track:{opacity:1,backgroundColor:e.palette.secondary[400],boxSizing:"border-box"},thumb:{borderRadius:"50%",transition:e.transitions.create(["width"],{duration:200})},switchBase:{"&.Mui-checked":{color:"#fff","& + .MuiSwitch-track":{opacity:1},"&.Mui-disabled":{color:e.palette.background.paper}},"&.Mui-disabled":{color:e.palette.background.paper,"+.MuiSwitch-track":{opacity:.3}}},root:{color:e.palette.text.primary,padding:0,margin:8,display:"flex","& ~ .MuiFormControlLabel-label":{margin:6},...ih(e,"medium")},sizeLarge:{...ih(e,"large")},sizeSmall:{...ih(e,"small")}}}}}function boe(e){return{MuiTab:{styleOverrides:{root:{minHeight:46,color:e.palette.text.primary,borderRadius:4,"&:hover":{backgroundColor:e.palette.primary.lighter+60,color:e.palette.primary.main},"&:focus-visible":{borderRadius:4,outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:-3}}}}}}function xoe(e){const t={"&:hover":{backgroundColor:e.palette.secondary.lighter}};return{MuiTableBody:{styleOverrides:{root:{"&.striped .MuiTableRow-root":{"&:nth-of-type(even)":{backgroundColor:e.palette.grey[50]},...t},"& .MuiTableRow-root":{...t}}}}}}function Coe(e){const t={"&:not(:last-of-type)":{position:"relative","&:after":{position:"absolute",content:'""',backgroundColor:e.palette.divider,width:1,height:"calc(100% - 30px)",right:0,top:16}}};return{MuiTableCell:{styleOverrides:{root:{fontSize:"0.875rem",padding:12,borderColor:e.palette.divider},sizeSmall:{padding:8},head:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",...t},footer:{fontSize:"0.75rem",textTransform:"uppercase",...t}}}}}function woe(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function Aoe(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function Soe(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function Toe(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function Eoe(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function Ioe(e){return{MuiToggleButton:{styleOverrides:{root:{"&.Mui-disabled":{borderColor:e.palette.divider,color:e.palette.text.disabled},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}}}}}}function Ooe(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function Poe(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function joe(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function Roe(e){return ut.merge(Dre(e),_re(e),Bre(e),Nre(e),Vre(),Wre(e),$re(e),zre(e),Ure(),Hre(),Gre(),qre(),Kre(e),Xre(e),Zre(e),Qre(e),Jre(),eoe(e),toe(e),noe(),roe(e),ooe(),ioe(),soe(e),aoe(e),loe(),coe(),uoe(e),doe(),foe(e),poe(e),goe(e),moe(e),yoe(e),boe(e),xoe(e),Coe(e),woe(e),Aoe(e),Soe(),Toe(),Eoe(),Ioe(e),Ooe(e),Poe(),joe())}function Moe(e){const{blue:t,red:n,gold:r,cyan:o,green:s,grey:a}=e,c={0:a[0],50:a[1],100:a[2],200:a[3],300:a[4],400:a[5],500:a[6],600:a[7],700:a[8],800:a[9],900:a[10],A50:a[15],A100:a[11],A200:a[12],A400:a[13],A700:a[14],A800:a[16]},u="#fff";return{primary:{lighter:t[0],100:t[1],200:t[2],light:t[3],400:t[4],main:t[5],dark:t[6],700:t[7],darker:t[8],900:t[9],contrastText:u},secondary:{lighter:c[100],100:c[100],200:c[200],light:c[300],400:c[400],main:c[500],600:c[600],dark:c[700],800:c[800],darker:c[900],A100:c[0],A200:c.A400,A300:c.A700,contrastText:c[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:u},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:c[100]},info:{lighter:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:u},success:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:u},grey:c}}function koe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],c=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],u=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(s=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],c=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],u=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Foe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Loe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Doe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function _oe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Boe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Noe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Voe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Woe(e,t,n){switch(t){case"theme1":return koe(e,n);case"theme2":return Foe(e,n);case"theme3":return Loe(e,n);case"theme4":return Doe(e,n);case"theme5":return _oe(e,n);case"theme6":return Boe(e,n);case"theme7":return Noe(e,n);case"theme8":return Voe(e,n);default:return Moe(e)}}var og=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];og.primary=og[5];var ig=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];ig.primary=ig[5];var sg=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];sg.primary=sg[5];var ag=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];ag.primary=ag[5];var lg=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];lg.primary=lg[5];var cg=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];cg.primary=cg[5];var ug=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];ug.primary=ug[5];var dg=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];dg.primary=dg[5];var fg=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];fg.primary=fg[5];var pg=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];pg.primary=pg[5];var hg=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];hg.primary=hg[5];var gg=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];gg.primary=gg[5];var mg=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];mg.primary=mg[5];var $oe={red:og,volcano:ig,orange:sg,gold:ag,yellow:lg,lime:cg,green:ug,cyan:dg,blue:fg,geekblue:pg,purple:hg,magenta:gg,grey:mg},vg=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];vg.primary=vg[5];var yg=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];yg.primary=yg[5];var bg=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];bg.primary=bg[5];var xg=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];xg.primary=xg[5];var Cg=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];Cg.primary=Cg[5];var wg=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];wg.primary=wg[5];var Ag=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];Ag.primary=Ag[5];var Sg=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];Sg.primary=Sg[5];var Tg=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];Tg.primary=Tg[5];var Eg=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];Eg.primary=Eg[5];var Ig=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];Ig.primary=Ig[5];var Og=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];Og.primary=Og[5];var Pg=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];Pg.primary=Pg[5];var zoe={red:vg,volcano:yg,orange:bg,gold:xg,yellow:Cg,lime:wg,green:Ag,cyan:Sg,blue:Tg,geekblue:Eg,purple:Ig,magenta:Og,grey:Pg};function Uoe(e,t){const n=e==="dark"?zoe:$oe;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...o,...s];const a=Woe(n,t,e);return lm({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?tt(a.grey[900],.87):a.grey[700],secondary:e==="dark"?tt(a.grey[900],.45):a.grey[500],disabled:e==="dark"?tt(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?tt(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})}function Hoe(e){return{button:e.palette.mode==="dark"?"0 2px 0 rgb(0 0 0 / 5%)":"0 2px #0000000b",text:"0 -1px 0 rgb(0 0 0 / 12%)",z0:"none",z1:e.palette.mode==="dark"?"0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)":`0px 1px 4px ${tt(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${tt(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${tt(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${tt(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${tt(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${tt(e.palette.info.main,.2)}`,success:`0 0 0 2px ${tt(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${tt(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${tt(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${tt(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${tt(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${tt(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${tt(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${tt(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${tt(e.palette.grey[500],.2)}`}}function Goe(e){return{htmlFontSize:16,fontFamily:e,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:600,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:600,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{lineHeight:1.66},button:{textTransform:"capitalize"}}}function k0({themeOverrides:e,children:t}){const n=mn(),{themeDirection:r,mode:o,presetColor:s,fontFamily:a}=n,c=X2(),u=T.useMemo(()=>o==="auto"?c:o,[o,c]),d=T.useMemo(()=>Uoe(u,s),[u,s]),h=T.useMemo(()=>Goe(a),[a]),g=T.useMemo(()=>Hoe(d),[d]),m=T.useMemo(()=>Z.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:d.palette,customShadows:g,typography:h,components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:d.spacing(2.6875),height:d.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(d):e),[r,d,h,g,e]),v=lm(m),y=Z.cloneDeep(v.components??{});return v.components=Z.merge(Roe(v),y),f.jsx(A.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(JA,{theme:v,children:[f.jsx(A.CssBaseline,{enableColorScheme:!0}),t]})})}function qoe({children:e,theme:t,...n}){return f.jsx(L.CoreAdminContext,{...n,children:f.jsx(k0,{themeOverrides:t,children:f.jsx(FI,{children:e})})})}function $I(e){const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:s,disableTelemetry:a,history:c,i18nProvider:u,layout:d,loading:h,loginPage:g,authCallbackPage:m,menu:v,notification:y,queryClient:C,requireAuth:w,store:E=L.localStorageStore(),ready:M,theme:I,title:j="React Admin"}=e;return f.jsx(qoe,{authProvider:t,dataProvider:s,i18nProvider:u,store:E,history:c,queryClient:C,theme:I,children:f.jsx(L.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:v,catchAll:n,title:j,loading:h,loginPage:g,authCallbackPage:m,notification:y,requireAuth:w,ready:M,children:r})})}class zI{constructor({catch:t,display:n,log:r,error:o}){Ca(this,"catch");Ca(this,"display");Ca(this,"log");Ca(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}var al,ll,Rs;class Yoe{constructor(t){to(this,al);to(this,ll);to(this,Rs,new Set);const{apiUrl:n}=t??{};if(!Z.isString(n)||Z.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");Io(this,ll,n),Io(this,al,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var c;const{message:n,filename:r,lineno:o,colno:s}=t,a=`${n}${r}${o}${s}`;Cn(this,Rs).has(a)||(Cn(this,Rs).add(a),fetch(`${Cn(this,ll)}/ui/error-log`,{method:"PUT",headers:Cn(this,al),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(c=t.error)==null?void 0:c.stack})}).catch(u=>{console.warn("Unable to send error to server",u),Cn(this,Rs).delete(a)}))}}al=new WeakMap,ll=new WeakMap,Rs=new WeakMap;function Koe({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new zI({catch:s!=null,display:!1,log:s!=null,error:s}),...o}){const s=_.useMemo(()=>o.errorHandler?o.errorHandler:new Yoe({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=_.useCallback(function(u,...d){var g;if(!u)return!1;const h=r(u instanceof ErrorEvent?u:(g=u==null?void 0:u.toString())==null?void 0:g.replace(/%s/g,()=>d.shift()));return h.isCatched()||(h.logError()&&(u instanceof ErrorEvent?s.handle(u):s.handle(new ErrorEvent("window.onerror",{error:u,message:u.toString()}))),h.displayError()&&a.apply(console,arguments)),!1},[r,s,a]);return _.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c,a]),!0}var cl,ul,Ii;class Xoe{constructor(t){to(this,cl);to(this,ul);to(this,Ii,[]);const{apiUrl:n}=t??{};if(!Z.isString(n)||Z.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");Io(this,ul,n),Io(this,cl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!Z.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!Z.isString(n)||Z.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!Z.isString(r)||Z.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!Z.some(Cn(this,Ii),o=>Z.isEqual(o,{code:n,lang:r}))){Cn(this,Ii).push({code:n,lang:r}),fetch(`${Cn(this,ul)}/i18n/message`,{method:"put",headers:Cn(this,cl),body:JSON.stringify({code:n,lang:r,text:n})}).then(o=>o.json()).then(()=>{console.log(`[MissingMessageHandler] handleMessage: created message for lang ${r} and code ${n}`)}).catch(o=>{console.error(o),Io(this,Ii,Z.reject(Cn(this,Ii),s=>Z.isEqual(s,{code:n,lang:r})))});return}}}cl=new WeakMap,ul=new WeakMap,Ii=new WeakMap;function UI(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,s=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),c=new Xoe({apiUrl:t});function u(){return fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(g=>g.json()).catch(()=>Promise.resolve(s))}function d(){return fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(g=>g.json()).then(g=>g.reduce((m,v)=>({...m,[v.lang]:{...m[v.lang]||{},[v.code]:v.text}}),{}))}function h(g,m,v){return r||console.error(`Warning: Missing translation for key: "${g}"`),o&&(Z.isString(g)?g.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${g}`):c.handleMessage({code:g,lang:v}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),g}return Promise.all([u(),d()]).then(g=>{const[m,v]=g;function y(C){return Z.get(v,C,{})}return jC(y,n,m,{allowMissing:r||o,onMissingKey:h})})}function Zoe(e){const{defaultLocale:t,path:n}=e,r=[{locale:t,name:t}],o=new Headers({Accept:"application/json","Content-Type":"application/json"});function s(){return fetch(`${n}/languages.json`,{headers:o,method:"get"}).then(c=>c.json()).catch(()=>Promise.resolve(r))}function a(){return fetch(`${n}/messages.json`,{headers:o,method:"get"}).then(c=>c.json()).then(c=>c.reduce((u,d)=>({...u,[d.lang]:{...u[d.lang]||{},[d.code]:d.text}}),{}))}return Promise.all([s(),a()]).then(c=>{const[u,d]=c;function h(g){return Z.get(d,g,{})}return jC(h,t,u,{allowMissing:!0})})}function Qoe({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})}){const[r,o]=T.useState({loading:!0,languages:null});return T.useEffect(()=>{const s=new Headers;s.append("Accept","application/json"),s.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:s}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r}function HI(e){const[t,n]=T.useState(),r=K2(e);return T.useEffect(()=>{if(e.customProvider!==void 0){e.customProvider.then(n);return}UI(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r,e==null?void 0:e.customProvider]),t}const Joe=new Ts.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function eie({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:s,logoIcon:a,loginPage:c=f.jsx(WI,{version:"0.0.0",name:"Applica",redirectTo:"/",background:f.jsx(Fd,{})}),menu:u,name:d,copy:h,version:g="0.0.0",dataProvider:m,authProvider:v,i18nProvider:y,errorHandler:C,error:w,enableNotification:E=!1,enableRegistration:M=!1,enablePasswordRecover:I=!1,enableThemeToggler:j=!1,enableLocaleSwitcher:O=!1,queryClient:F=Joe,background:k,notificationAPI:$="entities/notification",...G}){Koe({apiUrl:n,errorHandler:C,catcherFn:ae=>{const X=ae==null?void 0:ae.toString(),W=["Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.","Support for defaultProps will be removed from function components in a future major release.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>.","Missing translation for key:","HttpError: "].some(V=>X==null?void 0:X.includes(V));return new zI({catch:W,display:!W,log:!W&&o===!0,error:X})}});const Q=T.useMemo(()=>T.isValidElement(c)?T.cloneElement(c,{name:d,copy:h,logo:s,version:g,background:k,enableRegistration:M,enablePasswordRecover:I}):c,[c,d,g,h,k,s,M,I]),U=T.useMemo(()=>ae=>{const X=d?f.jsx(O0,{title:d}):s,K=d?f.jsx(LI,{title:d}):a;return f.jsx(TI,{...ae,name:d,copy:h,version:g,logoMain:X,logoIcon:K,notification:$,enableThemeToggler:j,enableNotification:E,enableLocaleSwitcher:O,error:w})},[s,a,d,h,g,w,$,E,j,O]),se=HI({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o,customProvider:y});return se===void 0?f.jsx(f.Fragment,{}):se.error?f.jsx(Qh,{initialConfig:t,children:f.jsx(k0,{themeOverrides:e,children:f.jsx(VI,{})})}):f.jsx(lQ,{children:f.jsx(I2,{menu:u,children:f.jsx(Qh,{initialConfig:t,children:f.jsx($I,{theme:e,layout:U,notification:II,queryClient:F,dataProvider:m,authProvider:v,i18nProvider:se,loginPage:Q,...G})})})})}Object.defineProperty(exports,"ArrayField",{enumerable:!0,get:()=>L.ArrayField});Object.defineProperty(exports,"ArrayInputContext",{enumerable:!0,get:()=>L.ArrayInputContext});Object.defineProperty(exports,"BooleanField",{enumerable:!0,get:()=>L.BooleanField});Object.defineProperty(exports,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>L.BulkDeleteWithConfirmButton});Object.defineProperty(exports,"ChipField",{enumerable:!0,get:()=>L.ChipField});Object.defineProperty(exports,"Confirm",{enumerable:!0,get:()=>L.Confirm});Object.defineProperty(exports,"CreateContextProvider",{enumerable:!0,get:()=>L.CreateContextProvider});Object.defineProperty(exports,"CustomRoutes",{enumerable:!0,get:()=>L.CustomRoutes});Object.defineProperty(exports,"DeleteWithConfirmButton",{enumerable:!0,get:()=>L.DeleteWithConfirmButton});Object.defineProperty(exports,"DeleteWithUndoButton",{enumerable:!0,get:()=>L.DeleteWithUndoButton});Object.defineProperty(exports,"EditButton",{enumerable:!0,get:()=>L.EditButton});Object.defineProperty(exports,"EditContextProvider",{enumerable:!0,get:()=>L.EditContextProvider});Object.defineProperty(exports,"FieldTitle",{enumerable:!0,get:()=>L.FieldTitle});Object.defineProperty(exports,"FilterButton",{enumerable:!0,get:()=>L.FilterButton});Object.defineProperty(exports,"FilterList",{enumerable:!0,get:()=>L.FilterList});Object.defineProperty(exports,"FilterListItem",{enumerable:!0,get:()=>L.FilterListItem});Object.defineProperty(exports,"FilterLiveSearch",{enumerable:!0,get:()=>L.FilterLiveSearch});Object.defineProperty(exports,"Form",{enumerable:!0,get:()=>L.Form});Object.defineProperty(exports,"FormDataConsumer",{enumerable:!0,get:()=>L.FormDataConsumer});Object.defineProperty(exports,"HttpError",{enumerable:!0,get:()=>L.HttpError});Object.defineProperty(exports,"I18nContextProvider",{enumerable:!0,get:()=>L.I18nContextProvider});Object.defineProperty(exports,"ListBase",{enumerable:!0,get:()=>L.ListBase});Object.defineProperty(exports,"ListToolbar",{enumerable:!0,get:()=>L.ListToolbar});Object.defineProperty(exports,"LoadingIndicator",{enumerable:!0,get:()=>L.LoadingIndicator});Object.defineProperty(exports,"RaSimpleFormIterator",{enumerable:!0,get:()=>L.SimpleFormIterator});Object.defineProperty(exports,"RecordContextProvider",{enumerable:!0,get:()=>L.RecordContextProvider});Object.defineProperty(exports,"ReferenceArrayField",{enumerable:!0,get:()=>L.ReferenceArrayField});Object.defineProperty(exports,"ReferenceField",{enumerable:!0,get:()=>L.ReferenceField});Object.defineProperty(exports,"Resource",{enumerable:!0,get:()=>L.Resource});Object.defineProperty(exports,"ResourceContextProvider",{enumerable:!0,get:()=>L.ResourceContextProvider});Object.defineProperty(exports,"SaveButton",{enumerable:!0,get:()=>L.SaveButton});Object.defineProperty(exports,"SavedQueriesList",{enumerable:!0,get:()=>L.SavedQueriesList});Object.defineProperty(exports,"SimpleFormIteratorContext",{enumerable:!0,get:()=>L.SimpleFormIteratorContext});Object.defineProperty(exports,"SimpleShowLayout",{enumerable:!0,get:()=>L.SimpleShowLayout});Object.defineProperty(exports,"SingleFieldList",{enumerable:!0,get:()=>L.SingleFieldList});Object.defineProperty(exports,"TabbedFormTabs",{enumerable:!0,get:()=>L.TabbedFormTabs});Object.defineProperty(exports,"TopToolbar",{enumerable:!0,get:()=>L.TopToolbar});Object.defineProperty(exports,"UrlField",{enumerable:!0,get:()=>L.UrlField});Object.defineProperty(exports,"ValidationError",{enumerable:!0,get:()=>L.ValidationError});Object.defineProperty(exports,"choices",{enumerable:!0,get:()=>L.choices});Object.defineProperty(exports,"email",{enumerable:!0,get:()=>L.email});Object.defineProperty(exports,"maxLength",{enumerable:!0,get:()=>L.maxLength});Object.defineProperty(exports,"maxValue",{enumerable:!0,get:()=>L.maxValue});Object.defineProperty(exports,"minLength",{enumerable:!0,get:()=>L.minLength});Object.defineProperty(exports,"minValue",{enumerable:!0,get:()=>L.minValue});Object.defineProperty(exports,"number",{enumerable:!0,get:()=>L.number});Object.defineProperty(exports,"regex",{enumerable:!0,get:()=>L.regex});Object.defineProperty(exports,"required",{enumerable:!0,get:()=>L.required});Object.defineProperty(exports,"useArrayInput",{enumerable:!0,get:()=>L.useArrayInput});Object.defineProperty(exports,"useAuthProvider",{enumerable:!0,get:()=>L.useAuthProvider});Object.defineProperty(exports,"useChoices",{enumerable:!0,get:()=>L.useChoices});Object.defineProperty(exports,"useChoicesContext",{enumerable:!0,get:()=>L.useChoicesContext});Object.defineProperty(exports,"useCreate",{enumerable:!0,get:()=>L.useCreate});Object.defineProperty(exports,"useCreateContext",{enumerable:!0,get:()=>L.useCreateContext});Object.defineProperty(exports,"useCreateController",{enumerable:!0,get:()=>L.useCreateController});Object.defineProperty(exports,"useCreateSuggestionContext",{enumerable:!0,get:()=>L.useCreateSuggestionContext});Object.defineProperty(exports,"useDataProvider",{enumerable:!0,get:()=>L.useDataProvider});Object.defineProperty(exports,"useDeleteMany",{enumerable:!0,get:()=>L.useDeleteMany});Object.defineProperty(exports,"useEditContext",{enumerable:!0,get:()=>L.useEditContext});Object.defineProperty(exports,"useEditController",{enumerable:!0,get:()=>L.useEditController});Object.defineProperty(exports,"useGetIdentity",{enumerable:!0,get:()=>L.useGetIdentity});Object.defineProperty(exports,"useGetList",{enumerable:!0,get:()=>L.useGetList});Object.defineProperty(exports,"useGetMany",{enumerable:!0,get:()=>L.useGetMany});Object.defineProperty(exports,"useGetManyReference",{enumerable:!0,get:()=>L.useGetManyReference});Object.defineProperty(exports,"useGetOne",{enumerable:!0,get:()=>L.useGetOne});Object.defineProperty(exports,"useInput",{enumerable:!0,get:()=>L.useInput});Object.defineProperty(exports,"useListContext",{enumerable:!0,get:()=>L.useListContext});Object.defineProperty(exports,"useListController",{enumerable:!0,get:()=>L.useListController});Object.defineProperty(exports,"useLocaleState",{enumerable:!0,get:()=>L.useLocaleState});Object.defineProperty(exports,"useLocales",{enumerable:!0,get:()=>L.useLocales});Object.defineProperty(exports,"useNotify",{enumerable:!0,get:()=>L.useNotify});Object.defineProperty(exports,"usePermissions",{enumerable:!0,get:()=>L.usePermissions});Object.defineProperty(exports,"useRecordContext",{enumerable:!0,get:()=>L.useRecordContext});Object.defineProperty(exports,"useRefresh",{enumerable:!0,get:()=>L.useRefresh});Object.defineProperty(exports,"useRemoveFromStore",{enumerable:!0,get:()=>L.useRemoveFromStore});Object.defineProperty(exports,"useResetStore",{enumerable:!0,get:()=>L.useResetStore});Object.defineProperty(exports,"useResourceContext",{enumerable:!0,get:()=>L.useResourceContext});Object.defineProperty(exports,"useResourceDefinition",{enumerable:!0,get:()=>L.useResourceDefinition});Object.defineProperty(exports,"useResourceDefinitions",{enumerable:!0,get:()=>L.useResourceDefinitions});Object.defineProperty(exports,"useSafeSetState",{enumerable:!0,get:()=>L.useSafeSetState});Object.defineProperty(exports,"useShowContext",{enumerable:!0,get:()=>L.useShowContext});Object.defineProperty(exports,"useShowController",{enumerable:!0,get:()=>L.useShowController});Object.defineProperty(exports,"useSimpleFormIterator",{enumerable:!0,get:()=>L.useSimpleFormIterator});Object.defineProperty(exports,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>L.useSimpleFormIteratorItem});Object.defineProperty(exports,"useStore",{enumerable:!0,get:()=>L.useStore});Object.defineProperty(exports,"useStoreContext",{enumerable:!0,get:()=>L.useStoreContext});Object.defineProperty(exports,"useTranslate",{enumerable:!0,get:()=>L.useTranslate});Object.defineProperty(exports,"useTranslateLabel",{enumerable:!0,get:()=>L.useTranslateLabel});Object.defineProperty(exports,"useUnselect",{enumerable:!0,get:()=>L.useUnselect});Object.defineProperty(exports,"useUnselectAll",{enumerable:!0,get:()=>L.useUnselectAll});Object.defineProperty(exports,"useUpdate",{enumerable:!0,get:()=>L.useUpdate});Object.defineProperty(exports,"useUpdateMany",{enumerable:!0,get:()=>L.useUpdateMany});Object.defineProperty(exports,"withLifecycleCallbacks",{enumerable:!0,get:()=>L.withLifecycleCallbacks});exports.ActionsField=dQ;exports.ActionsMenu=Ho;exports.ActivatePage=kre;exports.AddTableRow=v0;exports.Admin=$I;exports.AnimateButton=g9;exports.AppBarStyled=cI;exports.ApplicaAdmin=eie;exports.ArrayInput=uQ;exports.AttachmentField=oT;exports.AttachmentInput=DQ;exports.AuthBackground=Fd;exports.AutocompleteArrayInput=BQ;exports.AutocompleteInput=VQ;exports.Avatar=Ou;exports.BooleanInput=$Q;exports.Breadcrumbs=oS;exports.BulkActionsToolbar=_I;exports.BulkFloatingActionsToolbar=sre;exports.Button=Ml;exports.CardForm=Q2;exports.ChangePasswordForm=f0;exports.CircularWithLabel=wN;exports.CircularWithPath=AN;exports.CoverField=sT;exports.Create=xJ;exports.CreateButton=Gne;exports.CreateButtonClasses=rd;exports.CreateInDialogButton=Jne;exports.Datagrid=fre;exports.DateAgoField=lT;exports.DateField=xQ;exports.DateInput=HQ;exports.DateTimeInput=qQ;exports.Dot=bm;exports.Drawer=lI;exports.DrawerHeader=JT;exports.DrawerHeaderStyled=ZT;exports.DrawerToggle=fI;exports.Edit=AJ;exports.EditInDialogButton=nre;exports.EmailField=wQ;exports.Empty=hre;exports.EmptyClasses=ji;exports.Error=Qm;exports.Field=WT;exports.FileField=cT;exports.FileInput=KQ;exports.Footer=E0;exports.FormHeader=EJ;exports.FunctionField=SQ;exports.GenericErrorPage=VI;exports.Header=pI;exports.HeaderButton=uI;exports.HeaderIconButton=cne;exports.HeaderNotification=hI;exports.HeaderProfile=gI;exports.HeaderSpacer=vI;exports.HeaderToggleButton=ta;exports.HorizontalBar=yI;exports.IconButton=Od;exports.ImageField=iT;exports.ImageInput=XQ;exports.ImpersonateUserButton=rre;exports.LabeledArrayInput=rT;exports.LabeledInput=ln;exports.Layout=TI;exports.LayoutContent=XT;exports.LayoutProvider=qT;exports.LayoutWrapper=SI;exports.LinearWithIcon=SN;exports.LinearWithLabel=TN;exports.List=Ere;exports.ListItem=ore;exports.Loadable=Cne;exports.Loader=EI;exports.LoadingButton=yN;exports.LocalStorage=z2;exports.LocaleButton=dI;exports.LocalizedTextField=EQ;exports.LocalizedTextInput=JQ;exports.LoginPage=WI;exports.Logo=QT;exports.LongForm=kt;exports.MainCard=En;exports.MainIcon=O0;exports.MenuConfigProvider=I2;exports.MenuPopover=wS;exports.NavCollapse=qa;exports.NavGroup=xI;exports.NavItem=Ga;exports.NavList=CI;exports.NavMenu=bI;exports.Navigation=wI;exports.Notification=II;exports.NotificationList=jre;exports.NumberInput=tJ;exports.OnboardingActionType=js;exports.OnboardingContext=P0;exports.OnboardingModes=sl;exports.OnboardingProvider=Ine;exports.OnboardingTip=Rne;exports.Pagination=R0;exports.PaginationActions=j0;exports.PopupTransition=CN;exports.RadioButtonGroupInput=rJ;exports.ReadonlyField=jQ;exports.RecordInput=oJ;exports.RecoverPage=Fre;exports.ReferenceArrayInput=iJ;exports.ReferenceInput=sJ;exports.ReferenceManyField=dT;exports.ReferenceManyInput=aJ;exports.RegisterPage=Lre;exports.ResponsiveSection=mI;exports.ScrollTop=FI;exports.ScrollX=Dne;exports.SearchInput=cJ;exports.SelectArrayInput=dJ;exports.SelectInput=pJ;exports.ShadowBox=_ne;exports.Show=$J;exports.SimpleBar=aI;exports.SimpleForm=J2;exports.SimpleFormIterator=UJ;exports.SimpleList=Rre;exports.SizeField=kQ;exports.SmallIcon=LI;exports.SmartTextInput=hJ;exports.StyledArrow=xS;exports.TabbedForm=m0;exports.TableCreateButton=b0;exports.TableFormIterator=qd;exports.TableFormIteratorContext=x0;exports.TableFormIteratorItem=zT;exports.TableFormIteratorItemContext=y0;exports.TextField=uT;exports.TextInput=Er;exports.ThemeColor=I0;exports.ThemeContext=c0;exports.ThemeCustomizationProvider=k0;exports.ThemeProvider=Qh;exports.ThemeToggler=AI;exports.TimeInput=yJ;exports.Toolbar=Zo;exports.Tooltip=kd;exports.Transitions=Uo;exports.WizardForm=HT;exports.createI18nProvider=UI;exports.createJsonI18nProvider=Zoe;exports.getLocalizedValue=s0;exports.getPosition=CS;exports.getThemeColor=Qt;exports.getThemeShadow=Us;exports.localizedValueHasAllLocales=Yu;exports.localizedValueHasAtLeastOneLocale=U2;exports.onboardingModesSchema=PI;exports.onboardingTopicSchema=OI;exports.parseTime=q2;exports.useBreadcrumbs=O2;exports.useGetLocalizedValue=eQ;exports.useI18nLanguages=Qoe;exports.useI18nProvider=HI;exports.useLayoutContext=C0;exports.useLayoutDispatch=aee;exports.useLayoutDrawerState=Vi;exports.useLayoutLogoState=KT;exports.useLayoutMediaState=Yn;exports.useLayoutNotificationsState=Kd;exports.useLayoutState=Js;exports.useLayoutThemeState=lee;exports.useLocalStorage=a0;exports.useLocalizedValue=JZ;exports.useMemoizedObject=K2;exports.useMenu=Jm;exports.useMenuConfig=ol;exports.useMenuContext=$d;exports.useOnboardingDataProvider=jI;exports.useOnboardingTip=kI;exports.usePopoverState=Qs;exports.useRefDimensions=tQ;exports.useResourceDefaultValues=CJ;exports.useResourceTitle=l0;exports.useRestartOnboarding=Pne;exports.useSx=Pr;exports.useSystemTheme=X2;exports.useTableFormIterator=$T;exports.useTableFormIteratorItem=VT;exports.useThemeConfig=mn;exports.useThemeContext=u0;exports.useWizardFormContext=Yd;exports.uuid=tZ;exports.walkChildren=Gd;exports.withLayoutProvider=YT;
|
|
217
217
|
//# sourceMappingURL=react-admin.cjs.js.map
|