@entropic-bond/crud-panel 4.3.1 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,75 +1,25 @@
1
- (function(Re,de){typeof exports=="object"&&typeof module<"u"?de(exports):typeof define=="function"&&define.amd?define(["exports"],de):(Re=typeof globalThis<"u"?globalThis:Re||self,de(Re["entropic-bond-crud-panel"]={}))})(this,function(Re){"use strict";class de{constructor(){this.subscribers=new Set}subscribe(t){return this.subscribers.add(t),()=>this.unsubscribe(t)}unsubscribe(t){this.subscribers.delete(t)}notify(t){this.subscribers.forEach(i=>i(t))}get subscribersCount(){return this.subscribers.size}}const H=[];for(let r=0;r<256;++r)H.push((r+256).toString(16).slice(1));function Nt(r,t=0){return(H[r[t+0]]+H[r[t+1]]+H[r[t+2]]+H[r[t+3]]+"-"+H[r[t+4]]+H[r[t+5]]+"-"+H[r[t+6]]+H[r[t+7]]+"-"+H[r[t+8]]+H[r[t+9]]+"-"+H[r[t+10]]+H[r[t+11]]+H[r[t+12]]+H[r[t+13]]+H[r[t+14]]+H[r[t+15]]).toLowerCase()}let et;const kt=new Uint8Array(16);function Dt(){if(!et){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");et=crypto.getRandomValues.bind(crypto)}return et(kt)}const Mt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ut={randomUUID:Mt};function $t(r,t,i){var f;if(ut.randomUUID&&!r)return ut.randomUUID();r=r||{};const c=r.random??((f=r.rng)==null?void 0:f.call(r))??Dt();if(c.length<16)throw new Error("Random bytes length must be >= 16");return c[6]=c[6]&15|64,c[8]=c[8]&63|128,Nt(c)}var xt=Object.defineProperty,Yt=(r,t,i,f)=>{for(var c=void 0,g=r.length-1,S;g>=0;g--)(S=r[g])&&(c=S(t,i,c)||c);return c&&xt(t,i,c),c},Y;const at=(Y=class{static registerFactory(r,t,i){this._factoryMap[r]={factory:t,annotation:i}}static classFactory(r){if(!r)throw new Error("You should provide a class name.");if(!this._factoryMap[r])throw new Error(`You should register class ${r} prior to use.`);return this._factoryMap[r].factory}static registeredClasses(){return Object.keys(this._factoryMap)}static classesExtending(r){return Object.entries(this._factoryMap).filter(([,t])=>new t.factory instanceof r).map(([t])=>t)}static annotations(r){if(r instanceof Y?r=r.className:typeof r=="string"||(r=new r().className),!this._factoryMap[r])throw new Error(`You should register class ${r} prior to use.`);return this._factoryMap[r].annotation}constructor(r=$t()){this._id=r}get className(){return this.__className}setId(r){this._id=r}get id(){return this._id}afterDeserialize(){}beforeSerialize(){}getPersistentProperties(){return this._persistentProperties?this._persistentProperties.map(r=>({...r,name:r.name.slice(1)})):[]}getPropInfo(r){const t=this.getPersistentProperties().find(i=>i.name===r);if(!t)throw new Error(`Property "${r}" has not been registered.`);return t}isRequired(r){return this.getPropInfo(r).validator!=null}isPropValueValid(r){const t=this.getPropInfo(r);return t.validator?t.validator(this[t.name],t,this):!0}clone(r){const t=r.toObject();return delete t.id,this.fromObject(t)}fromObject(r){return this.fromObj(r),this.afterDeserialize(),this}fromObj(r){return this._persistentProperties?(this._persistentProperties.forEach(t=>{const i=this.removeUnderscore(t),f=r[i];f!=null&&(this[t.name]=this.fromDeepObject(f))}),this):this}toObject(){const r={},t=this.toObj(r);return this.pushDocument(r,this.className,t),{...t,__rootCollections:r}}toObj(r){if(!this._persistentProperties)return{};this.beforeSerialize();const t={};if(!this.className)throw new Error("You should register this class prior to streaming it.");return this._persistentProperties.forEach(i=>{const f=this[i.name],c=this.removeUnderscore(i);f!=null&&(i.isReference?t[c]=this.toReferenceObj(i,r):t[c]=this.toDeepObj(f,r),i.searchableArray&&(t[Y.searchableArrayNameFor(c)]=f.map(g=>g.id)))}),t.__className=this.className,t}static searchableArrayNameFor(r){return`__${r}_searchable`}fromDeepObject(r){if(r==null)return r;if(Array.isArray(r))return r.map(t=>this.fromDeepObject(t));if(r.__documentReference){const t=r,i=Y.createInstance(t);return i.__documentReference=r.__documentReference,i}if(r.__className)return Y.createInstance(r);if(typeof r=="object"){const t={};return Object.entries(r).forEach(([i,f])=>t[i]=this.fromDeepObject(f)),t}return r}toDeepObj(r,t){if(r!=null){if(Array.isArray(r))return r.map(i=>this.toDeepObj(i,t));if(r.__documentReference)return r;if(r instanceof Y)return r.toObj(t);if(typeof r=="object"){const i={};return Object.entries(r).forEach(([f,c])=>i[f]=this.toDeepObj(c,t)),i}return r}}static collectionPath(r,t){let i;return typeof t.storeInCollection=="function"?i=t.storeInCollection(r,t):i=t.storeInCollection??r.className,i}toReferenceObj(r,t){var i;const f=this[r.name];return Array.isArray(f)?f.map(c=>{var g;return r.isPureReference||this.pushDocument(t,Y.collectionPath(c,r),c),this.buildRefObject(c,Y.collectionPath(c,r),(g=r.cachedPropsConfig)==null?void 0:g.cachedProps)}):(r.isPureReference||this.pushDocument(t,Y.collectionPath(f,r),f),this.buildRefObject(f,Y.collectionPath(f,r),(i=r.cachedPropsConfig)==null?void 0:i.cachedProps))}buildRefObject(r,t,i){const f=i==null?void 0:i.reduce((c,g)=>(r[g]!==void 0&&(c[g]=r[g]),c),{});return{id:r.id,__className:r.className||r.__className,__documentReference:{storedInCollection:t},...f}}pushDocument(r,t,i){if("__documentReference"in i&&i.__documentReference)return;r[t]||(r[t]=[]);const f=this.toDeepObj(i,r);r[t].push(f)}removeUnderscore(r){return r.name.slice(1)}static createReference(r){const t=Y.createInstance(r);return t.__documentReference=r.__documentReference||{storedInCollection:t.className},t}static createInstance(r){if(typeof r=="string")return new(Y.classFactory(r));try{return new(Y.classFactory(r.__className))().fromObject(r)}catch(t){const i=Object.entries(r).filter(([f,c])=>c!=null&&typeof c!="function").map(([f,c])=>`${f}: ${c}`).join(`,
1
+ (function(se,Q){typeof exports=="object"&&typeof module<"u"?Q(exports):typeof define=="function"&&define.amd?define(["exports"],Q):(se=typeof globalThis<"u"?globalThis:se||self,Q(se["entropic-bond-crud-panel"]={}))})(this,function(se){"use strict";class Q{constructor(){this.subscribers=new Set}subscribe(t){return this.subscribers.add(t),()=>this.unsubscribe(t)}unsubscribe(t){this.subscribers.delete(t)}notify(t){this.subscribers.forEach(s=>s(t))}get subscribersCount(){return this.subscribers.size}}const j=[];for(let n=0;n<256;++n)j.push((n+256).toString(16).slice(1));function it(n,t=0){return(j[n[t+0]]+j[n[t+1]]+j[n[t+2]]+j[n[t+3]]+"-"+j[n[t+4]]+j[n[t+5]]+"-"+j[n[t+6]]+j[n[t+7]]+"-"+j[n[t+8]]+j[n[t+9]]+"-"+j[n[t+10]]+j[n[t+11]]+j[n[t+12]]+j[n[t+13]]+j[n[t+14]]+j[n[t+15]]).toLowerCase()}let Ae;const ut=new Uint8Array(16);function at(){if(!Ae){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ae=crypto.getRandomValues.bind(crypto)}return Ae(ut)}const ct=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Me={randomUUID:ct};function lt(n,t,s){n=n||{};const a=n.random??n.rng?.()??at();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,it(a)}function ft(n,t,s){return Me.randomUUID&&!n?Me.randomUUID():lt(n)}var dt=Object.defineProperty,ht=(n,t,s,a)=>{for(var c=void 0,p=n.length-1,O;p>=0;p--)(O=n[p])&&(c=O(t,s,c)||c);return c&&dt(t,s,c),c},k;const Ie=(k=class{static registerFactory(n,t,s,a=!1){this._factoryMap[n]={factory:t,annotation:s,isLegacy:a}}static classFactory(n){if(!n)throw new Error("You should provide a class name.");if(!this._factoryMap[n])throw new Error(`You should register class ${n} prior to use.`);return this._factoryMap[n].factory}static registeredClasses(){return Object.entries(this._factoryMap).filter(([,n])=>!n.isLegacy).map(([n])=>n)}static registeredClassesAndLegacyNames(){return Object.keys(this._factoryMap)}static classesExtending(n){return Object.entries(this._factoryMap).filter(([,t])=>new t.factory instanceof n&&!t.isLegacy).map(([t])=>t)}static annotations(n){if(n instanceof k?n=n.className:typeof n=="string"||(n=new n().className),!this._factoryMap[n])throw new Error(`You should register class ${n} prior to use.`);return this._factoryMap[n].annotation}constructor(n=ft()){this._id=n}get className(){return this.__className}setId(n){this._id=n}get id(){return this._id}afterDeserialize(){}beforeSerialize(){}getPersistentProperties(){return this._persistentProperties?this._persistentProperties.map(n=>({...n,name:n.name.slice(1)})):[]}getPropInfo(n){const t=this.getPersistentProperties().find(s=>s.name===n);if(!t)throw new Error(`Property "${n}" has not been registered.`);return t}isRequired(n){return this.getPropInfo(n).validator!=null}isPropValueValid(n){const t=this.getPropInfo(n);return t.validator?t.validator(this[t.name],t,this):!0}clone(n){const t=n.toObject();return delete t.id,this.fromObject(t)}fromObject(n){return this.fromObj(n),this.afterDeserialize(),this}fromObj(n){return this._persistentProperties?(this._persistentProperties.forEach(t=>{const s=this.removeUnderscore(t),a=n[s];a!=null&&(this[t.name]=this.fromDeepObject(a))}),this):this}toObject(){const n={},t=this.toObj(n);return this.pushDocument(n,this.className,t),{...t,__rootCollections:n}}toObj(n){if(!this._persistentProperties)return{};this.beforeSerialize();const t={};if(!this.className)throw new Error(`You should register \`${this.constructor.name||this.toString()||"this"}\` class prior to streaming it.`);return this._persistentProperties.forEach(s=>{const a=this[s.name],c=this.removeUnderscore(s);a!=null&&(s.isReference?t[c]=this.toReferenceObj(s,n):t[c]=this.toDeepObj(a,n),s.searchableArray&&(t[k.searchableArrayNameFor(c)]=a.map(p=>p.id)))}),t.__className=this.className,t}static searchableArrayNameFor(n){return`__${n}_searchable`}fromDeepObject(n){if(n==null)return n;if(Array.isArray(n))return n.map(t=>this.fromDeepObject(t));if(n.__documentReference){const t=n,s=k.createInstance(t);return s.__documentReference=n.__documentReference,s}if(n.__className)return k.createInstance(n);if(typeof n=="object"){const t={};return Object.entries(n).forEach(([s,a])=>t[s]=this.fromDeepObject(a)),t}return n}toDeepObj(n,t){if(n!=null){if(Array.isArray(n))return n.map(s=>this.toDeepObj(s,t));if(n.__documentReference)return n;if(n instanceof k)return n.toObj(t);if(typeof n=="object"){const s={};return Object.entries(n).forEach(([a,c])=>s[a]=this.toDeepObj(c,t)),s}return n}}static collectionPath(n,t){let s;return typeof t.storeInCollection=="function"?s=t.storeInCollection(n,t):s=t.storeInCollection??n.className,s}toReferenceObj(n,t){const s=this[n.name];return Array.isArray(s)?s.map(a=>(n.isPureReference||this.pushDocument(t,k.collectionPath(a,n),a),this.buildRefObject(a,k.collectionPath(a,n),n.cachedPropsConfig?.cachedProps))):(n.isPureReference||this.pushDocument(t,k.collectionPath(s,n),s),this.buildRefObject(s,k.collectionPath(s,n),n.cachedPropsConfig?.cachedProps))}buildRefObject(n,t,s){const a=s?.reduce((c,p)=>(n[p]!==void 0&&(c[p]=n[p]),c),{});return{id:n.id,__className:n.className||n.__className,__documentReference:{storedInCollection:t},...a}}pushDocument(n,t,s){if("__documentReference"in s&&s.__documentReference)return;n[t]||(n[t]=[]);const a=this.toDeepObj(s,n);n[t].push(a)}removeUnderscore(n){return n.name.slice(1)}static createReference(n){const t=k.createInstance(n);return t.__documentReference=n.__documentReference||{storedInCollection:t.className},t}static createInstance(n){if(typeof n=="string")return new(k.classFactory(n));try{return new(k.classFactory(n.__className))().fromObject(n)}catch(t){const s=Object.entries(n).filter(([a,c])=>c!=null&&typeof c!="function").map(([a,c])=>`${a}: ${c}`).join(`,
2
2
  `);throw new Error(`${t}
3
3
  -----> Class name not found in object:
4
4
  {
5
- ${i}
5
+ ${s}
6
6
  }
7
- `)}}static propInfo(r,t){return Y.createInstance(r).getPropInfo(t)}static getSystemRegisteredReferencesWithCachedProps(){return Y.registeredClasses().reduce((r,t)=>{const i=Y.createInstance(t).getPersistentProperties().filter(f=>{var c;return(c=f.cachedPropsConfig)==null?void 0:c.cachedProps});return i.length>0&&(r[t]=i),r},{})}},Y._factoryMap={},Y);Yt([$e],at.prototype,"_id");let ct=at;function $e(r,t){return Ht()(r,t)}function Ht(r){return function(t,i){Object.getOwnPropertyDescriptor(t,"_persistentProperties")||(t._persistentProperties?t._persistentProperties=[...t._persistentProperties]:t._persistentProperties=[]);const f=t._persistentProperties.find(c=>c.name===i);f?Object.assign(f,r):t._persistentProperties.push({name:i,...r})}}function Ut(r,t){return i=>{ct.registerFactory(r,i,t),i.prototype.__className=r}}const lt=class Ue{static registerCloudStorage(t,i){Ue._cloudStorageFactoryMap[t]=i}static createInstance(t){const i=Ue._cloudStorageFactoryMap[t];if(!i)throw new Error(`You should register the ${t} cloud storage provider prior to use it`);return i()}get className(){return this.__className}static useCloudStorage(t){Ue._defaultCloudStorage=t}static get defaultCloudStorage(){if(!Ue._defaultCloudStorage)throw new Error("You should define a default cloud storage provider prior to use it");return Ue._defaultCloudStorage}};lt._cloudStorageFactoryMap={};let Ie=lt;function It(r,t){return Ie.registerCloudStorage(r,t),i=>{i.prototype.__className=r}}var qt=(r,t,i,f)=>{for(var c=t,g=r.length-1,S;g>=0;g--)(S=r[g])&&(c=S(c)||c);return c};let tt=class extends Ie{constructor(r=""){super(),this._simulateDelay=0,this._pendingPromises=[],this.mockFileSystem={},this._pathToMockFiles=r}simulateDelay(r){return this._simulateDelay=r,this}resolveWithDelay(r){if(this._simulateDelay<=0)return Promise.resolve(r);const t=new Promise(i=>{setTimeout(()=>i(r),this._simulateDelay)});return this._pendingPromises.push(t),t.finally(()=>this._pendingPromises=this._pendingPromises.filter(i=>i===t)),t}save(r,t){const i=r;this._onProgress&&this._onProgress(0,100),this.mockFileSystem[r]=JSON.stringify(t),this._onProgress&&this._onProgress(100,100);const f=t instanceof File?t.name:i;return this.resolveWithDelay(f)}uploadControl(){return{resume:()=>{},pause:()=>{},cancel:()=>{},onProgress:r=>this._onProgress=r}}getUrl(r){return Promise.resolve(this._pathToMockFiles+r)}delete(r){return delete this.mockFileSystem[r],this.resolveWithDelay()}};tt=qt([It("MockCloudStorage",()=>new tt)],tt);var Lt=Object.defineProperty,Wt=Object.getOwnPropertyDescriptor,xe=(r,t,i,f)=>{for(var c=f>1?void 0:f?Wt(t,i):t,g=r.length-1,S;g>=0;g--)(S=r[g])&&(c=(f?S(t,i,c):S(c))||c);return f&&c&&Lt(t,i,c),c};let Oe=class extends ct{constructor(){super(...arguments),this._onChange=new de}async save({data:r,fileName:t,progress:i,cloudStorageProvider:f}={}){const c=r||this._pendingData;c&&(this._reference&&await this.delete(),this.provider=f||Ie.defaultCloudStorage,this._originalFileName=t||(c instanceof File?c.name:void 0),this._reference=await this.provider.save(this.id,c,i),this._url=await this.provider.getUrl(this._reference),this._pendingData=void 0,this._onChange.notify({event:0,storedFile:this}))}uploadControl(){return this.provider.uploadControl()}async delete(){if(!this._reference)throw new Error("Cannot delete a not stored file");await this.provider.delete(this._reference),this._reference=void 0,this._url=void 0,this._onChange.notify({event:2,storedFile:this})}set provider(r){this._provider=r,this._cloudStorageProviderName=r.className}get provider(){if(!this._provider)try{this._provider=Ie.createInstance(this._cloudStorageProviderName)}catch{this._provider=Ie.defaultCloudStorage}return this._provider}get url(){return this._url}get mimeType(){return this._mimeType}setDataToStore(r){return this._pendingData=r,this._originalFileName=r instanceof File?r.name:void 0,this._mimeType=r instanceof Blob?r.type:void 0,this._onChange.notify({event:1,pendingData:r,storedFile:this}),this}get originalFileName(){return this._originalFileName}onChange(r){return this._onChange.subscribe(r)}};xe([$e],Oe.prototype,"_reference",2),xe([$e],Oe.prototype,"_url",2),xe([$e],Oe.prototype,"_cloudStorageProviderName",2),xe([$e],Oe.prototype,"_originalFileName",2),xe([$e],Oe.prototype,"_mimeType",2),Oe=xe([Ut("StoredFile")],Oe);function zt(r,t="-"){if(!r)return"";const i=r.slice(1).replace(/( |[A-Z])/g,f=>f===" "?"-":t+f[0].toLowerCase());return r[0].toLocaleLowerCase()+i.replace(/--/g,"-")}class Vt{constructor(){this._debug=!1,this._stages={},this._onProgress=new de}notifyBusy(t,i){this.pushStage({name:i??"",progress:t?0:1,total:1})}pushStage(t){this._stages[t.name]=t;const i=Object.values(this._stages).reduce((f,c,g,S)=>f+c.progress/c.total/S.length,0);this._onProgress.notify({busy:i<1,overallProgress:i,stages:this._stages}),i>=1&&(this._stages={}),this.debug&&console.log(`ProgressController ${t.name}: Progress: ${t.progress} Stages: ${t.total}`)}onProgress(t){return this._onProgress.subscribe(t)}set debug(t){this._debug=t}get debug(){return this._debug}}const he=class he{constructor(t){this.progressController=new Vt,this.onChangeHdl=new de,this.onErrorHdl=new de,this.validator={},this.setDocument(t||this.createDocument())}allRequiredPropertiesFilled(){return this.nonFilledRequiredProperties.length<=0&&this.validateGlobal()}get nonFilledRequiredProperties(){return this.requiredProperties.filter(t=>this.validateProp(t))}get requiredProperties(){if(!this.document)throw new Error(he.errorMessages.missedDocument);const t=this.document.getPersistentProperties().filter(f=>this.document.isRequired(f.name)).map(f=>f.name);return[...new Set(t.concat(Object.keys(this.validator)))]}addValidator(t,i,f){this.validator[t]={func:i,errorMessage:f}}removeValidator(t){delete this.validator[t]}addGlobalValidator(t,i){this.globalValidator={func:t,errorMessage:i}}removeGlobalValidator(){this.globalValidator=void 0}failedValidationError(t){var f,c,g;if(t)return(f=this.validator[t])==null?void 0:f.errorMessage;const i=this.nonFilledRequiredProperties[0];return i?(c=this.validator[i])==null?void 0:c.errorMessage:(g=this.globalValidator)==null?void 0:g.errorMessage}validateProp(t){if(!this.document)throw new Error(he.errorMessages.missedDocument);const i=this.document[t];return this.validator[t]?!this.validator[t].func(i):!this.document.isPropValueValid(t)}validateGlobal(){if(!this.document)throw new Error(he.errorMessages.missedDocument);return this.globalValidator?this.globalValidator.func(this.document):!0}storeDoc(){if(!this.document)throw new Error(he.errorMessages.missedDocument);return this.model.save(this.document)}deleteDoc(){if(!this.document)throw new Error(he.errorMessages.missedDocument);return this.model.delete(this.document.id)}queryDocs(t){let i=this.model.find();return t&&(i=i.limit(t)),i}findDocs(t){}async setFilter(t){return this._filter=t,this.onChangeHdl.notify({action:"filterChange"}),this}resetFilter(){return this._filter=void 0,this.onChangeHdl.notify({action:"filterChange"}),this}onChange(t){return this.onChangeHdl.subscribe(t)}onError(t){return this.onErrorHdl.subscribe(t)}notifyChange(t){this.onChangeHdl.notify(t)}newDocument(){return this.setDocument(this.createDocument())}async storeDocument(){const t="Saving main document";try{this.progressController.notifyBusy(!0,t),await this.storeDoc(),this.onChangeHdl.notify({documentCollection:await this.documentCollection(),action:"saved"})}catch(i){if(this.onChangeHdl.notify({error:this.errorToError(i)}),this.onErrorHdl.notify(this.errorToError(i)),this.throwOnError)throw i}finally{this.progressController.notifyBusy(!1,t)}}async deleteDocument(){const t="Delete main document";try{this.progressController.notifyBusy(!0,t),await this.deleteDoc(),this.onChangeHdl.notify({documentCollection:await this.documentCollection(),action:"deleted"})}catch(i){if(this.onChangeHdl.notify({error:this.errorToError(i)}),this.onErrorHdl.notify(this.errorToError(i)),this.throwOnError)throw i}finally{this.progressController.notifyBusy(!1,t)}}async documentCollection(t){const i="Retrieving document collection";let f=[];try{this.progressController.notifyBusy(!0,i);const c=this.findDocs(t);c?f=await c:f=await this.queryDocs(t).get()}catch(c){if(this.onChangeHdl.notify({error:this.errorToError(c)}),this.onErrorHdl.notify(this.errorToError(c)),this.throwOnError)throw c}finally{this.progressController.notifyBusy(!1,i)}return f}filter(t){return t.filter(i=>{var f;return((f=this._filter)==null?void 0:f.call(this,i))??!0})}onProgress(t){return this.progressController.onProgress(t)}get model(){return this.getModel()}setDocument(t){return this._document!==t&&(this.unsubscribeDocument&&this.unsubscribeDocument(),t&&(this.unsubscribeDocument=t.onChange(i=>this.onChangeHdl.notify({documentProps:i}))),this._document=t,this.onChangeHdl.notify({documentChanged:this._document})),this}set document(t){this.setDocument(t)}get document(){return this._document}managedThrow(t){if(this.onChangeHdl.notify({error:this.errorToError(t)}),this.onErrorHdl.notify(this.errorToError(t)),this.throwOnError)throw this.errorToError(t)}errorToError(t){return t instanceof Error?t:typeof t=="string"?new Error(t):"code"in t?new Error(t.code):"message"in t?new Error(t.error):new Error(JSON.stringify(t))}get throwOnError(){return this.onErrorHdl.subscribersCount===0}};he.errorMessages={missedDocument:"No document to save"};let rt=he;var Fe={exports:{}},qe={};/**
8
- * @license React
9
- * react-jsx-runtime.production.js
10
- *
11
- * Copyright (c) Meta Platforms, Inc. and affiliates.
12
- *
13
- * This source code is licensed under the MIT license found in the
14
- * LICENSE file in the root directory of this source tree.
15
- */var ft;function Bt(){if(ft)return qe;ft=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(f,c,g){var S=null;if(g!==void 0&&(S=""+g),c.key!==void 0&&(S=""+c.key),"key"in c){g={};for(var M in c)M!=="key"&&(g[M]=c[M])}else g=c;return c=g.ref,{$$typeof:r,type:f,key:S,ref:c!==void 0?c:null,props:g}}return qe.Fragment=t,qe.jsx=i,qe.jsxs=i,qe}var Le={},Ge={exports:{}},R={};/**
16
- * @license React
17
- * react.production.js
18
- *
19
- * Copyright (c) Meta Platforms, Inc. and affiliates.
20
- *
21
- * This source code is licensed under the MIT license found in the
22
- * LICENSE file in the root directory of this source tree.
23
- */var dt;function Ft(){if(dt)return R;dt=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),S=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),V=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ee=Symbol.iterator;function pe(s){return s===null||typeof s!="object"?null:(s=ee&&s[ee]||s["@@iterator"],typeof s=="function"?s:null)}var ie={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ue=Object.assign,te={};function B(s,a,_){this.props=s,this.context=a,this.refs=te,this.updater=_||ie}B.prototype.isReactComponent={},B.prototype.setState=function(s,a){if(typeof s!="object"&&typeof s!="function"&&s!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,s,a,"setState")},B.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,"forceUpdate")};function ae(){}ae.prototype=B.prototype;function re(s,a,_){this.props=s,this.context=a,this.refs=te,this.updater=_||ie}var me=re.prototype=new ae;me.constructor=re,ue(me,B.prototype),me.isPureReactComponent=!0;var ge=Array.isArray,k={H:null,A:null,T:null,S:null},oe=Object.prototype.hasOwnProperty;function ve(s,a,_,y,w,A){return _=A.ref,{$$typeof:r,type:s,key:a,ref:_!==void 0?_:null,props:A}}function Te(s,a){return ve(s.type,a,void 0,void 0,void 0,s.props)}function L(s){return typeof s=="object"&&s!==null&&s.$$typeof===r}function Se(s){var a={"=":"=0",":":"=2"};return"$"+s.replace(/[=:]/g,function(_){return a[_]})}var ye=/\/+/g;function ce(s,a){return typeof s=="object"&&s!==null&&s.key!=null?Se(""+s.key):a.toString(36)}function ne(){}function Ee(s){switch(s.status){case"fulfilled":return s.value;case"rejected":throw s.reason;default:switch(typeof s.status=="string"?s.then(ne,ne):(s.status="pending",s.then(function(a){s.status==="pending"&&(s.status="fulfilled",s.value=a)},function(a){s.status==="pending"&&(s.status="rejected",s.reason=a)})),s.status){case"fulfilled":return s.value;case"rejected":throw s.reason}}throw s}function Q(s,a,_,y,w){var A=typeof s;(A==="undefined"||A==="boolean")&&(s=null);var b=!1;if(s===null)b=!0;else switch(A){case"bigint":case"string":case"number":b=!0;break;case"object":switch(s.$$typeof){case r:case t:b=!0;break;case q:return b=s._init,Q(b(s._payload),a,_,y,w)}}if(b)return w=w(s),b=y===""?"."+ce(s,0):y,ge(w)?(_="",b!=null&&(_=b.replace(ye,"$&/")+"/"),Q(w,a,_,"",function(_e){return _e})):w!=null&&(L(w)&&(w=Te(w,_+(w.key==null||s&&s.key===w.key?"":(""+w.key).replace(ye,"$&/")+"/")+b)),a.push(w)),1;b=0;var W=y===""?".":y+":";if(ge(s))for(var D=0;D<s.length;D++)y=s[D],A=W+ce(y,D),b+=Q(y,a,_,A,w);else if(D=pe(s),typeof D=="function")for(s=D.call(s),D=0;!(y=s.next()).done;)y=y.value,A=W+ce(y,D++),b+=Q(y,a,_,A,w);else if(A==="object"){if(typeof s.then=="function")return Q(Ee(s),a,_,y,w);throw a=String(s),Error("Objects are not valid as a React child (found: "+(a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.")}return b}function F(s,a,_){if(s==null)return s;var y=[],w=0;return Q(s,y,"","",function(A){return a.call(_,A,w++)}),y}function le(s){if(s._status===-1){var a=s._result;a=a(),a.then(function(_){(s._status===0||s._status===-1)&&(s._status=1,s._result=_)},function(_){(s._status===0||s._status===-1)&&(s._status=2,s._result=_)}),s._status===-1&&(s._status=0,s._result=a)}if(s._status===1)return s._result.default;throw s._result}var Ye=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)};function j(){}return R.Children={map:F,forEach:function(s,a,_){F(s,function(){a.apply(this,arguments)},_)},count:function(s){var a=0;return F(s,function(){a++}),a},toArray:function(s){return F(s,function(a){return a})||[]},only:function(s){if(!L(s))throw Error("React.Children.only expected to receive a single React element child.");return s}},R.Component=B,R.Fragment=i,R.Profiler=c,R.PureComponent=re,R.StrictMode=f,R.Suspense=I,R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,R.act=function(){throw Error("act(...) is not supported in production builds of React.")},R.cache=function(s){return function(){return s.apply(null,arguments)}},R.cloneElement=function(s,a,_){if(s==null)throw Error("The argument must be a React element, but you passed "+s+".");var y=ue({},s.props),w=s.key,A=void 0;if(a!=null)for(b in a.ref!==void 0&&(A=void 0),a.key!==void 0&&(w=""+a.key),a)!oe.call(a,b)||b==="key"||b==="__self"||b==="__source"||b==="ref"&&a.ref===void 0||(y[b]=a[b]);var b=arguments.length-2;if(b===1)y.children=_;else if(1<b){for(var W=Array(b),D=0;D<b;D++)W[D]=arguments[D+2];y.children=W}return ve(s.type,w,void 0,void 0,A,y)},R.createContext=function(s){return s={$$typeof:S,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null},s.Provider=s,s.Consumer={$$typeof:g,_context:s},s},R.createElement=function(s,a,_){var y,w={},A=null;if(a!=null)for(y in a.key!==void 0&&(A=""+a.key),a)oe.call(a,y)&&y!=="key"&&y!=="__self"&&y!=="__source"&&(w[y]=a[y]);var b=arguments.length-2;if(b===1)w.children=_;else if(1<b){for(var W=Array(b),D=0;D<b;D++)W[D]=arguments[D+2];w.children=W}if(s&&s.defaultProps)for(y in b=s.defaultProps,b)w[y]===void 0&&(w[y]=b[y]);return ve(s,A,void 0,void 0,null,w)},R.createRef=function(){return{current:null}},R.forwardRef=function(s){return{$$typeof:M,render:s}},R.isValidElement=L,R.lazy=function(s){return{$$typeof:q,_payload:{_status:-1,_result:s},_init:le}},R.memo=function(s,a){return{$$typeof:V,type:s,compare:a===void 0?null:a}},R.startTransition=function(s){var a=k.T,_={};k.T=_;try{var y=s(),w=k.S;w!==null&&w(_,y),typeof y=="object"&&y!==null&&typeof y.then=="function"&&y.then(j,Ye)}catch(A){Ye(A)}finally{k.T=a}},R.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},R.use=function(s){return k.H.use(s)},R.useActionState=function(s,a,_){return k.H.useActionState(s,a,_)},R.useCallback=function(s,a){return k.H.useCallback(s,a)},R.useContext=function(s){return k.H.useContext(s)},R.useDebugValue=function(){},R.useDeferredValue=function(s,a){return k.H.useDeferredValue(s,a)},R.useEffect=function(s,a){return k.H.useEffect(s,a)},R.useId=function(){return k.H.useId()},R.useImperativeHandle=function(s,a,_){return k.H.useImperativeHandle(s,a,_)},R.useInsertionEffect=function(s,a){return k.H.useInsertionEffect(s,a)},R.useLayoutEffect=function(s,a){return k.H.useLayoutEffect(s,a)},R.useMemo=function(s,a){return k.H.useMemo(s,a)},R.useOptimistic=function(s,a){return k.H.useOptimistic(s,a)},R.useReducer=function(s,a,_){return k.H.useReducer(s,a,_)},R.useRef=function(s){return k.H.useRef(s)},R.useState=function(s){return k.H.useState(s)},R.useSyncExternalStore=function(s,a,_){return k.H.useSyncExternalStore(s,a,_)},R.useTransition=function(){return k.H.useTransition()},R.version="19.0.0",R}var We={exports:{}};/**
24
- * @license React
25
- * react.development.js
26
- *
27
- * Copyright (c) Meta Platforms, Inc. and affiliates.
28
- *
29
- * This source code is licensed under the MIT license found in the
30
- * LICENSE file in the root directory of this source tree.
31
- */We.exports;var ht;function Gt(){return ht||(ht=1,function(r,t){process.env.NODE_ENV!=="production"&&function(){function i(e,n){Object.defineProperty(g.prototype,e,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",n[0],n[1])}})}function f(e){return e===null||typeof e!="object"?null:(e=Ve&&e[Ve]||e["@@iterator"],typeof e=="function"?e:null)}function c(e,n){e=(e=e.constructor)&&(e.displayName||e.name)||"ReactClass";var u=e+"."+n;Be[u]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",n,e),Be[u]=!0)}function g(e,n,u){this.props=e,this.context=n,this.refs=h,this.updater=u||o}function S(){}function M(e,n,u){this.props=e,this.context=n,this.refs=h,this.updater=u||o}function I(e){return""+e}function V(e){try{I(e);var n=!1}catch{n=!0}if(n){n=console;var u=n.error,l=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return u.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",l),I(e)}}function q(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===C?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case W:return"Portal";case He:return"Profiler";case _e:return"StrictMode";case be:return"Suspense";case Ne:return"SuspenseList"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Pe:return(e.displayName||"Context")+".Provider";case je:return(e._context.displayName||"Context")+".Consumer";case Ae:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ke:return n=e.displayName||null,n!==null?n:q(e.type)||"Memo";case we:n=e._payload,e=e._init;try{return q(e(n))}catch{}}return null}function ee(e){return typeof e=="string"||typeof e=="function"||e===D||e===He||e===_e||e===be||e===Ne||e===Ke||typeof e=="object"&&e!==null&&(e.$$typeof===we||e.$$typeof===ke||e.$$typeof===Pe||e.$$typeof===je||e.$$typeof===Ae||e.$$typeof===U||e.getModuleId!==void 0)}function pe(){}function ie(){if(G===0){Ce=console.log,Z=console.info,De=console.warn,X=console.error,yt=console.group,Et=console.groupCollapsed,_t=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}function ue(){if(G--,G===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:d({},e,{value:Ce}),info:d({},e,{value:Z}),warn:d({},e,{value:De}),error:d({},e,{value:X}),group:d({},e,{value:yt}),groupCollapsed:d({},e,{value:Et}),groupEnd:d({},e,{value:_t})})}0>G&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function te(e){if(ot===void 0)try{throw Error()}catch(u){var n=u.stack.trim().match(/\n( *(at )?)/);ot=n&&n[1]||"",bt=-1<u.stack.indexOf(`
32
- at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
33
- `+ot+e+bt}function B(e,n){if(!e||nt)return"";var u=st.get(e);if(u!==void 0)return u;nt=!0,u=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var l=null;l=E.H,E.H=null,ie();try{var p={DetermineComponentFrameRoot:function(){try{if(n){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(fe){var Ze=fe}Reflect.construct(e,[],se)}else{try{se.call()}catch(fe){Ze=fe}e.call(se.prototype)}}else{try{throw Error()}catch(fe){Ze=fe}(se=e())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(fe){if(fe&&Ze&&typeof fe.stack=="string")return[fe.stack,Ze.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=p.DetermineComponentFrameRoot(),P=m[0],T=m[1];if(P&&T){var $=P.split(`
34
- `),z=T.split(`
35
- `);for(m=v=0;v<$.length&&!$[v].includes("DetermineComponentFrameRoot");)v++;for(;m<z.length&&!z[m].includes("DetermineComponentFrameRoot");)m++;if(v===$.length||m===z.length)for(v=$.length-1,m=z.length-1;1<=v&&0<=m&&$[v]!==z[m];)m--;for(;1<=v&&0<=m;v--,m--)if($[v]!==z[m]){if(v!==1||m!==1)do if(v--,m--,0>m||$[v]!==z[m]){var Me=`
36
- `+$[v].replace(" at new "," at ");return e.displayName&&Me.includes("<anonymous>")&&(Me=Me.replace("<anonymous>",e.displayName)),typeof e=="function"&&st.set(e,Me),Me}while(1<=v&&0<=m);break}}}finally{nt=!1,E.H=l,ue(),Error.prepareStackTrace=u}return $=($=e?e.displayName||e.name:"")?te($):"",typeof e=="function"&&st.set(e,$),$}function ae(e){if(e==null)return"";if(typeof e=="function"){var n=e.prototype;return B(e,!(!n||!n.isReactComponent))}if(typeof e=="string")return te(e);switch(e){case be:return te("Suspense");case Ne:return te("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case Ae:return e=B(e.render,!1),e;case ke:return ae(e.type);case we:n=e._payload,e=e._init;try{return ae(e(n))}catch{}}return""}function re(){var e=E.A;return e===null?null:e.getOwner()}function me(e){if(J.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return!1}return e.key!==void 0}function ge(e,n){function u(){wt||(wt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n))}u.isReactWarning=!0,Object.defineProperty(e,"key",{get:u,configurable:!0})}function k(){var e=q(this.type);return Rt[e]||(Rt[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function oe(e,n,u,l,p,v){return u=v.ref,e={$$typeof:b,type:e,key:n,props:v,_owner:p},(u!==void 0?u:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:k}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function ve(e,n){return n=oe(e.type,n,void 0,void 0,e._owner,e.props),n._store.validated=e._store.validated,n}function Te(e,n){if(typeof e=="object"&&e&&e.$$typeof!==Jt){if(N(e))for(var u=0;u<e.length;u++){var l=e[u];L(l)&&Se(l,n)}else if(L(e))e._store&&(e._store.validated=1);else if(u=f(e),typeof u=="function"&&u!==e.entries&&(u=u.call(e),u!==e))for(;!(e=u.next()).done;)L(e.value)&&Se(e.value,n)}}function L(e){return typeof e=="object"&&e!==null&&e.$$typeof===b}function Se(e,n){if(e._store&&!e._store.validated&&e.key==null&&(e._store.validated=1,n=ye(n),!Ot[n])){Ot[n]=!0;var u="";e&&e._owner!=null&&e._owner!==re()&&(u=null,typeof e._owner.tag=="number"?u=q(e._owner.type):typeof e._owner.name=="string"&&(u=e._owner.name),u=" It was passed a child from "+u+".");var l=E.getCurrentStack;E.getCurrentStack=function(){var p=ae(e.type);return l&&(p+=l()||""),p},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',n,u),E.getCurrentStack=l}}function ye(e){var n="",u=re();return u&&(u=q(u.type))&&(n=`
37
-
38
- Check the render method of \``+u+"`."),n||(e=q(e))&&(n=`
39
-
40
- Check the top-level render call using <`+e+">."),n}function ce(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(u){return n[u]})}function ne(e,n){return typeof e=="object"&&e!==null&&e.key!=null?(V(e.key),ce(""+e.key)):n.toString(36)}function Ee(){}function Q(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Ee,Ee):(e.status="pending",e.then(function(n){e.status==="pending"&&(e.status="fulfilled",e.value=n)},function(n){e.status==="pending"&&(e.status="rejected",e.reason=n)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function F(e,n,u,l,p){var v=typeof e;(v==="undefined"||v==="boolean")&&(e=null);var m=!1;if(e===null)m=!0;else switch(v){case"bigint":case"string":case"number":m=!0;break;case"object":switch(e.$$typeof){case b:case W:m=!0;break;case we:return m=e._init,F(m(e._payload),n,u,l,p)}}if(m){m=e,p=p(m);var P=l===""?"."+ne(m,0):l;return N(p)?(u="",P!=null&&(u=P.replace(St,"$&/")+"/"),F(p,n,u,"",function($){return $})):p!=null&&(L(p)&&(p.key!=null&&(m&&m.key===p.key||V(p.key)),u=ve(p,u+(p.key==null||m&&m.key===p.key?"":(""+p.key).replace(St,"$&/")+"/")+P),l!==""&&m!=null&&L(m)&&m.key==null&&m._store&&!m._store.validated&&(u._store.validated=2),p=u),n.push(p)),1}if(m=0,P=l===""?".":l+":",N(e))for(var T=0;T<e.length;T++)l=e[T],v=P+ne(l,T),m+=F(l,n,u,v,p);else if(T=f(e),typeof T=="function")for(T===e.entries&&(Tt||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Tt=!0),e=T.call(e),T=0;!(l=e.next()).done;)l=l.value,v=P+ne(l,T++),m+=F(l,n,u,v,p);else if(v==="object"){if(typeof e.then=="function")return F(Q(e),n,u,l,p);throw n=String(e),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}return m}function le(e,n,u){if(e==null)return e;var l=[],p=0;return F(e,l,"","",function(v){return n.call(u,v,p++)}),l}function Ye(e){if(e._status===-1){var n=e._result;n=n(),n.then(function(u){(e._status===0||e._status===-1)&&(e._status=1,e._result=u)},function(u){(e._status===0||e._status===-1)&&(e._status=2,e._result=u)}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return n=e._result,n===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
+ `)}}static propInfo(n,t){return k.createInstance(n).getPropInfo(t)}static getSystemRegisteredReferencesWithCachedProps(){return k.registeredClassesAndLegacyNames().reduce((n,t)=>{const s=k.createInstance(t).getPersistentProperties().filter(a=>a.cachedPropsConfig?.cachedProps);return s.length>0&&(n[t]=s),n},{})}},k._factoryMap={},k);ht([de],Ie.prototype,"_id");let Le=Ie;function de(n,t){return pt()(n,t)}function pt(n){return function(t,s){Object.getOwnPropertyDescriptor(t,"_persistentProperties")||(t._persistentProperties?t._persistentProperties=[...t._persistentProperties]:t._persistentProperties=[]);const a=t._persistentProperties.find(c=>c.name===s);a?Object.assign(a,n):t._persistentProperties.push({name:s,...n})}}function mt(n,t){return s=>{Le.registerFactory(n,s,t),s.prototype.__className=n}}const Ye=class _e{static registerCloudStorage(t,s){_e._cloudStorageFactoryMap[t]=s}static createInstance(t){const s=_e._cloudStorageFactoryMap[t];if(!s)throw new Error(`You should register the ${t} cloud storage provider prior to use it`);return s()}get className(){return this.__className}static useCloudStorage(t){_e._defaultCloudStorage=t}static get defaultCloudStorage(){if(!_e._defaultCloudStorage)throw new Error("You should define a default cloud storage provider prior to use it");return _e._defaultCloudStorage}};Ye._cloudStorageFactoryMap={};let ye=Ye;function _t(n,t){return ye.registerCloudStorage(n,t),s=>{s.prototype.__className=n}}var yt=(n,t,s,a)=>{for(var c=t,p=n.length-1,O;p>=0;p--)(O=n[p])&&(c=O(c)||c);return c};let ke=class extends ye{constructor(n=""){super(),this._simulateDelay=0,this._pendingPromises=[],this.mockFileSystem={},this._pathToMockFiles=n}simulateDelay(n){return this._simulateDelay=n,this}resolveWithDelay(n){if(this._simulateDelay<=0)return Promise.resolve(n);const t=new Promise(s=>{setTimeout(()=>s(n),this._simulateDelay)});return this._pendingPromises.push(t),t.finally(()=>this._pendingPromises=this._pendingPromises.filter(s=>s===t)),t}save(n,t){const s=n;this._onProgress&&this._onProgress(0,100),this.mockFileSystem[n]=JSON.stringify(t),this._onProgress&&this._onProgress(100,100);const a=t instanceof File?t.name:s;return this.resolveWithDelay(a)}uploadControl(){return{resume:()=>{},pause:()=>{},cancel:()=>{},onProgress:n=>this._onProgress=n}}getUrl(n){return Promise.resolve(this._pathToMockFiles+n)}delete(n){return delete this.mockFileSystem[n],this.resolveWithDelay()}};ke=yt([_t("MockCloudStorage",()=>new ke)],ke);var gt=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,he=(n,t,s,a)=>{for(var c=a>1?void 0:a?vt(t,s):t,p=n.length-1,O;p>=0;p--)(O=n[p])&&(c=(a?O(t,s,c):O(c))||c);return a&&c&&gt(t,s,c),c};let ie=class extends Le{constructor(){super(...arguments),this._onChange=new Q}async save({data:n,fileName:t,progress:s,cloudStorageProvider:a}={}){const c=n||this._pendingData;c&&(this._reference&&await this.delete(),this.provider=a||ye.defaultCloudStorage,this._originalFileName=t||(c instanceof File?c.name:void 0),this._reference=await this.provider.save(this.id,c,s),this._url=await this.provider.getUrl(this._reference),this._pendingData=void 0,this._onChange.notify({event:0,storedFile:this}))}uploadControl(){return this.provider.uploadControl()}async delete(){if(!this._reference)throw new Error("Cannot delete a not stored file");await this.provider.delete(this._reference),this._reference=void 0,this._url=void 0,this._onChange.notify({event:2,storedFile:this})}set provider(n){this._provider=n,this._cloudStorageProviderName=n.className}get provider(){if(!this._provider)try{this._provider=ye.createInstance(this._cloudStorageProviderName)}catch{this._provider=ye.defaultCloudStorage}return this._provider}get url(){return this._url}get mimeType(){return this._mimeType}setDataToStore(n){return this._pendingData=n,this._originalFileName=n instanceof File?n.name:void 0,this._mimeType=n instanceof Blob?n.type:void 0,this._onChange.notify({event:1,pendingData:n,storedFile:this}),this}get originalFileName(){return this._originalFileName}onChange(n){return this._onChange.subscribe(n)}};he([de],ie.prototype,"_reference",2),he([de],ie.prototype,"_url",2),he([de],ie.prototype,"_cloudStorageProviderName",2),he([de],ie.prototype,"_originalFileName",2),he([de],ie.prototype,"_mimeType",2),ie=he([mt("StoredFile")],ie);function Et(n,t="-"){if(!n)return"";const s=n.slice(1).replace(/( |[A-Z])/g,a=>a===" "?"-":t+a[0].toLowerCase());return n[0].toLocaleLowerCase()+s.replace(/--/g,"-")}class bt{constructor(){this._debug=!1,this._stages={},this._onProgress=new Q}notifyBusy(t,s){this.pushStage({name:s??"",progress:t?0:1,total:1})}pushStage(t){this._stages[t.name]=t;const s=Object.values(this._stages).reduce((a,c,p,O)=>a+c.progress/c.total/O.length,0);this._onProgress.notify({busy:s<1,overallProgress:s,stages:this._stages}),s>=1&&(this._stages={}),this.debug&&console.log(`ProgressController ${t.name}: Progress: ${t.progress} Stages: ${t.total}`)}onProgress(t){return this._onProgress.subscribe(t)}set debug(t){this._debug=t}get debug(){return this._debug}}const X=class X{constructor(t){this.progressController=new bt,this.onChangeHdl=new Q,this.onErrorHdl=new Q,this.validator={},this.setDocument(t||this.createDocument())}allRequiredPropertiesFilled(){return this.nonFilledRequiredProperties.length<=0&&this.validateGlobal()}get nonFilledRequiredProperties(){return this.requiredProperties.filter(t=>this.validateProp(t))}get requiredProperties(){if(!this.document)throw new Error(X.errorMessages.missedDocument);const t=this.document.getPersistentProperties().filter(a=>this.document.isRequired(a.name)).map(a=>a.name);return[...new Set(t.concat(Object.keys(this.validator)))]}addValidator(t,s,a){this.validator[t]={func:s,errorMessage:a}}removeValidator(t){delete this.validator[t]}addGlobalValidator(t,s){this.globalValidator={func:t,errorMessage:s}}removeGlobalValidator(){this.globalValidator=void 0}failedValidationError(t){if(t)return this.validator[t]?.errorMessage;const s=this.nonFilledRequiredProperties[0];return s?this.validator[s]?.errorMessage:this.globalValidator?.errorMessage}validateProp(t){if(!this.document)throw new Error(X.errorMessages.missedDocument);const s=this.document[t];return this.validator[t]?!this.validator[t].func(s):!this.document.isPropValueValid(t)}validateGlobal(){if(!this.document)throw new Error(X.errorMessages.missedDocument);return this.globalValidator?this.globalValidator.func(this.document):!0}storeDoc(){if(!this.document)throw new Error(X.errorMessages.missedDocument);return this.model.save(this.document)}deleteDoc(){if(!this.document)throw new Error(X.errorMessages.missedDocument);return this.model.delete(this.document.id)}queryDocs(t){let s=this.model.find();return t&&(s=s.limit(t)),s}findDocs(t){}async setFilter(t){return this._filter=t,this.onChangeHdl.notify({action:"filterChange"}),this}resetFilter(){return this._filter=void 0,this.onChangeHdl.notify({action:"filterChange"}),this}onChange(t){return this.onChangeHdl.subscribe(t)}onError(t){return this.onErrorHdl.subscribe(t)}notifyChange(t){this.onChangeHdl.notify(t)}newDocument(){return this.setDocument(this.createDocument())}async storeDocument(){const t="Saving main document";try{this.progressController.notifyBusy(!0,t),await this.storeDoc(),this.onChangeHdl.notify({documentCollection:await this.documentCollection(),action:"saved"})}catch(s){if(this.onChangeHdl.notify({error:this.errorToError(s)}),this.onErrorHdl.notify(this.errorToError(s)),this.throwOnError)throw s}finally{this.progressController.notifyBusy(!1,t)}}async deleteDocument(){const t="Delete main document";try{this.progressController.notifyBusy(!0,t),await this.deleteDoc(),this.onChangeHdl.notify({documentCollection:await this.documentCollection(),action:"deleted"})}catch(s){if(this.onChangeHdl.notify({error:this.errorToError(s)}),this.onErrorHdl.notify(this.errorToError(s)),this.throwOnError)throw s}finally{this.progressController.notifyBusy(!1,t)}}async documentCollection(t){const s="Retrieving document collection";let a=[];try{this.progressController.notifyBusy(!0,s);const c=this.findDocs(t);c?a=await c:a=await this.queryDocs(t).get()}catch(c){if(this.onChangeHdl.notify({error:this.errorToError(c)}),this.onErrorHdl.notify(this.errorToError(c)),this.throwOnError)throw c}finally{this.onChangeHdl.notify({documentCollection:a}),this.progressController.notifyBusy(!1,s)}return a}filter(t){return t.filter(s=>this._filter?.(s)??!0)}onProgress(t){return this.progressController.onProgress(t)}get model(){return this.getModel()}setDocument(t){return this._document!==t&&(this.unsubscribeDocument&&this.unsubscribeDocument(),t&&(this.unsubscribeDocument=t.onChange(s=>this.onChangeHdl.notify({documentProps:s}))),this._document=t,this.onChangeHdl.notify({documentChanged:this._document})),this}set document(t){this.setDocument(t)}get document(){return this._document}managedThrow(t){if(this.onChangeHdl.notify({error:this.errorToError(t)}),this.onErrorHdl.notify(this.errorToError(t)),this.throwOnError)throw this.errorToError(t)}errorToError(t){return t instanceof Error?t:typeof t=="string"?new Error(t):"code"in t?new Error(t.code):"message"in t?new Error(t.error):new Error(JSON.stringify(t))}get throwOnError(){return this.onErrorHdl.subscribersCount===0}};X.errorMessages={missedDocument:"No document to save"};let je=X;var Re={exports:{}},ge={};var Ue;function wt(){if(Ue)return ge;Ue=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(a,c,p){var O=null;if(p!==void 0&&(O=""+p),c.key!==void 0&&(O=""+c.key),"key"in c){p={};for(var P in c)P!=="key"&&(p[P]=c[P])}else p=c;return c=p.ref,{$$typeof:n,type:a,key:O,ref:c!==void 0?c:null,props:p}}return ge.Fragment=t,ge.jsx=s,ge.jsxs=s,ge}var ve={},Ce={exports:{}},_={};var He;function Rt(){if(He)return _;He=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),O=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),V=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),$=Symbol.iterator;function H(r){return r===null||typeof r!="object"?null:(r=$&&r[$]||r["@@iterator"],typeof r=="function"?r:null)}var K={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ue=Object.assign,J={};function W(r,i,f){this.props=r,this.context=i,this.refs=J,this.updater=f||K}W.prototype.isReactComponent={},W.prototype.setState=function(r,i){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,i,"setState")},W.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function Z(){}Z.prototype=W.prototype;function ae(r,i,f){this.props=r,this.context=i,this.refs=J,this.updater=f||K}var ee=ae.prototype=new Z;ee.constructor=ae,ue(ee,W.prototype),ee.isPureReactComponent=!0;var F=Array.isArray;function ce(){}var R={H:null,A:null,T:null,S:null},pe=Object.prototype.hasOwnProperty;function N(r,i,f){var d=f.ref;return{$$typeof:n,type:r,key:i,ref:d!==void 0?d:null,props:f}}function te(r,i){return N(r.type,i,r.props)}function le(r){return typeof r=="object"&&r!==null&&r.$$typeof===n}function C(r){var i={"=":"=0",":":"=2"};return"$"+r.replace(/[=:]/g,function(f){return i[f]})}var re=/\/+/g;function z(r,i){return typeof r=="object"&&r!==null&&r.key!=null?C(""+r.key):i.toString(36)}function q(r){switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:switch(typeof r.status=="string"?r.then(ce,ce):(r.status="pending",r.then(function(i){r.status==="pending"&&(r.status="fulfilled",r.value=i)},function(i){r.status==="pending"&&(r.status="rejected",r.reason=i)})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}}throw r}function M(r,i,f,d,g){var w=typeof r;(w==="undefined"||w==="boolean")&&(r=null);var m=!1;if(r===null)m=!0;else switch(w){case"bigint":case"string":case"number":m=!0;break;case"object":switch(r.$$typeof){case n:case t:m=!0;break;case L:return m=r._init,M(m(r._payload),i,f,d,g)}}if(m)return g=g(r),m=d===""?"."+z(r,0):d,F(g)?(f="",m!=null&&(f=m.replace(re,"$&/")+"/"),M(g,i,f,"",function(G){return G})):g!=null&&(le(g)&&(g=te(g,f+(g.key==null||r&&r.key===g.key?"":(""+g.key).replace(re,"$&/")+"/")+m)),i.push(g)),1;m=0;var A=d===""?".":d+":";if(F(r))for(var S=0;S<r.length;S++)d=r[S],w=A+z(d,S),m+=M(d,i,f,w,g);else if(S=H(r),typeof S=="function")for(r=S.call(r),S=0;!(d=r.next()).done;)d=d.value,w=A+z(d,S++),m+=M(d,i,f,w,g);else if(w==="object"){if(typeof r.then=="function")return M(q(r),i,f,d,g);throw i=String(r),Error("Objects are not valid as a React child (found: "+(i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.")}return m}function x(r,i,f){if(r==null)return r;var d=[],g=0;return M(r,d,"","",function(w){return i.call(f,w,g++)}),d}function ne(r){if(r._status===-1){var i=r._result;i=i(),i.then(function(f){(r._status===0||r._status===-1)&&(r._status=1,r._result=f)},function(f){(r._status===0||r._status===-1)&&(r._status=2,r._result=f)}),r._status===-1&&(r._status=0,r._result=i)}if(r._status===1)return r._result.default;throw r._result}var B=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},fe={map:x,forEach:function(r,i,f){x(r,function(){i.apply(this,arguments)},f)},count:function(r){var i=0;return x(r,function(){i++}),i},toArray:function(r){return x(r,function(i){return i})||[]},only:function(r){if(!le(r))throw Error("React.Children.only expected to receive a single React element child.");return r}};return _.Activity=Y,_.Children=fe,_.Component=W,_.Fragment=s,_.Profiler=c,_.PureComponent=ae,_.StrictMode=a,_.Suspense=D,_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,_.__COMPILER_RUNTIME={__proto__:null,c:function(r){return R.H.useMemoCache(r)}},_.cache=function(r){return function(){return r.apply(null,arguments)}},_.cacheSignal=function(){return null},_.cloneElement=function(r,i,f){if(r==null)throw Error("The argument must be a React element, but you passed "+r+".");var d=ue({},r.props),g=r.key;if(i!=null)for(w in i.key!==void 0&&(g=""+i.key),i)!pe.call(i,w)||w==="key"||w==="__self"||w==="__source"||w==="ref"&&i.ref===void 0||(d[w]=i[w]);var w=arguments.length-2;if(w===1)d.children=f;else if(1<w){for(var m=Array(w),A=0;A<w;A++)m[A]=arguments[A+2];d.children=m}return N(r.type,g,d)},_.createContext=function(r){return r={$$typeof:O,_currentValue:r,_currentValue2:r,_threadCount:0,Provider:null,Consumer:null},r.Provider=r,r.Consumer={$$typeof:p,_context:r},r},_.createElement=function(r,i,f){var d,g={},w=null;if(i!=null)for(d in i.key!==void 0&&(w=""+i.key),i)pe.call(i,d)&&d!=="key"&&d!=="__self"&&d!=="__source"&&(g[d]=i[d]);var m=arguments.length-2;if(m===1)g.children=f;else if(1<m){for(var A=Array(m),S=0;S<m;S++)A[S]=arguments[S+2];g.children=A}if(r&&r.defaultProps)for(d in m=r.defaultProps,m)g[d]===void 0&&(g[d]=m[d]);return N(r,w,g)},_.createRef=function(){return{current:null}},_.forwardRef=function(r){return{$$typeof:P,render:r}},_.isValidElement=le,_.lazy=function(r){return{$$typeof:L,_payload:{_status:-1,_result:r},_init:ne}},_.memo=function(r,i){return{$$typeof:V,type:r,compare:i===void 0?null:i}},_.startTransition=function(r){var i=R.T,f={};R.T=f;try{var d=r(),g=R.S;g!==null&&g(f,d),typeof d=="object"&&d!==null&&typeof d.then=="function"&&d.then(ce,B)}catch(w){B(w)}finally{i!==null&&f.types!==null&&(i.types=f.types),R.T=i}},_.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},_.use=function(r){return R.H.use(r)},_.useActionState=function(r,i,f){return R.H.useActionState(r,i,f)},_.useCallback=function(r,i){return R.H.useCallback(r,i)},_.useContext=function(r){return R.H.useContext(r)},_.useDebugValue=function(){},_.useDeferredValue=function(r,i){return R.H.useDeferredValue(r,i)},_.useEffect=function(r,i){return R.H.useEffect(r,i)},_.useEffectEvent=function(r){return R.H.useEffectEvent(r)},_.useId=function(){return R.H.useId()},_.useImperativeHandle=function(r,i,f){return R.H.useImperativeHandle(r,i,f)},_.useInsertionEffect=function(r,i){return R.H.useInsertionEffect(r,i)},_.useLayoutEffect=function(r,i){return R.H.useLayoutEffect(r,i)},_.useMemo=function(r,i){return R.H.useMemo(r,i)},_.useOptimistic=function(r,i){return R.H.useOptimistic(r,i)},_.useReducer=function(r,i,f){return R.H.useReducer(r,i,f)},_.useRef=function(r){return R.H.useRef(r)},_.useState=function(r){return R.H.useState(r)},_.useSyncExternalStore=function(r,i,f){return R.H.useSyncExternalStore(r,i,f)},_.useTransition=function(){return R.H.useTransition()},_.version="19.2.1",_}var Ee={exports:{}};Ee.exports;var Fe;function Ct(){return Fe||(Fe=1,function(n,t){process.env.NODE_ENV!=="production"&&function(){function s(e,o){Object.defineProperty(p.prototype,e,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",o[0],o[1])}})}function a(e){return e===null||typeof e!="object"?null:(e=Ve&&e[Ve]||e["@@iterator"],typeof e=="function"?e:null)}function c(e,o){e=(e=e.constructor)&&(e.displayName||e.name)||"ReactClass";var u=e+"."+o;Be[u]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",o,e),Be[u]=!0)}function p(e,o,u){this.props=e,this.context=o,this.refs=De,this.updater=u||Ge}function O(){}function P(e,o,u){this.props=e,this.context=o,this.refs=De,this.updater=u||Ge}function D(){}function V(e){return""+e}function L(e){try{V(e);var o=!1}catch{o=!0}if(o){o=console;var u=o.error,l=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return u.call(o,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",l),V(e)}}function Y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===St?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case r:return"Fragment";case f:return"Profiler";case i:return"StrictMode";case m:return"Suspense";case A:return"SuspenseList";case ze:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case fe:return"Portal";case g:return e.displayName||"Context";case d:return(e._context.displayName||"Context")+".Consumer";case w:var o=e.render;return e=e.displayName,e||(e=o.displayName||o.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case S:return o=e.displayName||null,o!==null?o:Y(e.type)||"Memo";case G:o=e._payload,e=e._init;try{return Y(e(o))}catch{}}return null}function $(e){if(e===r)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===G)return"<...>";try{var o=Y(e);return o?"<"+o+">":"<...>"}catch{return"<...>"}}function H(){var e=v.A;return e===null?null:e.getOwner()}function K(){return Error("react-stack-top-frame")}function ue(e){if(Te.call(e,"key")){var o=Object.getOwnPropertyDescriptor(e,"key").get;if(o&&o.isReactWarning)return!1}return e.key!==void 0}function J(e,o){function u(){Je||(Je=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",o))}u.isReactWarning=!0,Object.defineProperty(e,"key",{get:u,configurable:!0})}function W(){var e=Y(this.type);return et[e]||(et[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function Z(e,o,u,l,h,E){var y=u.ref;return e={$$typeof:B,type:e,key:o,props:u,_owner:l},(y!==void 0?y:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:W}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:h}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:E}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function ae(e,o){return o=Z(e.type,o,e.props,e._owner,e._debugStack,e._debugTask),e._store&&(o._store.validated=e._store.validated),o}function ee(e){F(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===G&&(e._payload.status==="fulfilled"?F(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function F(e){return typeof e=="object"&&e!==null&&e.$$typeof===B}function ce(e){var o={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(u){return o[u]})}function R(e,o){return typeof e=="object"&&e!==null&&e.key!=null?(L(e.key),ce(""+e.key)):o.toString(36)}function pe(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(D,D):(e.status="pending",e.then(function(o){e.status==="pending"&&(e.status="fulfilled",e.value=o)},function(o){e.status==="pending"&&(e.status="rejected",e.reason=o)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function N(e,o,u,l,h){var E=typeof e;(E==="undefined"||E==="boolean")&&(e=null);var y=!1;if(e===null)y=!0;else switch(E){case"bigint":case"string":case"number":y=!0;break;case"object":switch(e.$$typeof){case B:case fe:y=!0;break;case G:return y=e._init,N(y(e._payload),o,u,l,h)}}if(y){y=e,h=h(y);var T=l===""?"."+R(y,0):l;return Xe(h)?(u="",T!=null&&(u=T.replace(rt,"$&/")+"/"),N(h,o,u,"",function(oe){return oe})):h!=null&&(F(h)&&(h.key!=null&&(y&&y.key===h.key||L(h.key)),u=ae(h,u+(h.key==null||y&&y.key===h.key?"":(""+h.key).replace(rt,"$&/")+"/")+T),l!==""&&y!=null&&F(y)&&y.key==null&&y._store&&!y._store.validated&&(u._store.validated=2),h=u),o.push(h)),1}if(y=0,T=l===""?".":l+":",Xe(e))for(var b=0;b<e.length;b++)l=e[b],E=T+R(l,b),y+=N(l,o,u,E,h);else if(b=a(e),typeof b=="function")for(b===e.entries&&(tt||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),tt=!0),e=b.call(e),b=0;!(l=e.next()).done;)l=l.value,E=T+R(l,b++),y+=N(l,o,u,E,h);else if(E==="object"){if(typeof e.then=="function")return N(pe(e),o,u,l,h);throw o=String(e),Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.")}return y}function te(e,o,u){if(e==null)return e;var l=[],h=0;return N(e,l,"","",function(E){return o.call(u,E,h++)}),l}function le(e){if(e._status===-1){var o=e._ioInfo;o!=null&&(o.start=o.end=performance.now()),o=e._result;var u=o();if(u.then(function(h){if(e._status===0||e._status===-1){e._status=1,e._result=h;var E=e._ioInfo;E!=null&&(E.end=performance.now()),u.status===void 0&&(u.status="fulfilled",u.value=h)}},function(h){if(e._status===0||e._status===-1){e._status=2,e._result=h;var E=e._ioInfo;E!=null&&(E.end=performance.now()),u.status===void 0&&(u.status="rejected",u.reason=h)}}),o=e._ioInfo,o!=null){o.value=u;var l=u.displayName;typeof l=="string"&&(o.name=l)}e._status===-1&&(e._status=0,e._result=u)}if(e._status===1)return o=e._result,o===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
41
8
 
42
9
  Your code should look like:
43
10
  const MyComponent = lazy(() => import('./MyComponent'))
44
11
 
45
- Did you accidentally put curly braces around the import?`,n),"default"in n||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
12
+ Did you accidentally put curly braces around the import?`,o),"default"in o||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
46
13
 
47
14
  Your code should look like:
48
- const MyComponent = lazy(() => import('./MyComponent'))`,n),n.default;throw e._result}function j(){var e=E.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
15
+ const MyComponent = lazy(() => import('./MyComponent'))`,o),o.default;throw e._result}function C(){var e=v.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
49
16
  1. You might have mismatching versions of React and the renderer (such as React DOM)
50
17
  2. You might be breaking the Rules of Hooks
51
18
  3. You might have more than one copy of React in the same app
52
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function s(){}function a(e){if(Qe===null)try{var n=("require"+Math.random()).slice(0,7);Qe=(r&&r[n]).call(r,"timers").setImmediate}catch{Qe=function(l){Pt===!1&&(Pt=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var p=new MessageChannel;p.port1.onmessage=l,p.port2.postMessage(void 0)}}return Qe(e)}function _(e){return 1<e.length&&typeof AggregateError=="function"?new AggregateError(e):e[0]}function y(e,n){n!==Xe-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Xe=n}function w(e,n,u){var l=E.actQueue;if(l!==null)if(l.length!==0)try{A(l),a(function(){return w(e,n,u)});return}catch(p){E.thrownErrors.push(p)}else E.actQueue=null;0<E.thrownErrors.length?(l=_(E.thrownErrors),E.thrownErrors.length=0,u(l)):n(e)}function A(e){if(!it){it=!0;var n=0;try{for(;n<e.length;n++){var u=e[n];do{E.didUsePromise=!1;var l=u(!1);if(l!==null){if(E.didUsePromise){e[n]=u,e.splice(0,n);return}u=l}else break}while(!0)}e.length=0}catch(p){e.splice(0,n+1),E.thrownErrors.push(p)}finally{it=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var b=Symbol.for("react.transitional.element"),W=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),_e=Symbol.for("react.strict_mode"),He=Symbol.for("react.profiler"),je=Symbol.for("react.consumer"),Pe=Symbol.for("react.context"),Ae=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),Ne=Symbol.for("react.suspense_list"),ke=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),Ke=Symbol.for("react.offscreen"),Ve=Symbol.iterator,Be={},o={isMounted:function(){return!1},enqueueForceUpdate:function(e){c(e,"forceUpdate")},enqueueReplaceState:function(e){c(e,"replaceState")},enqueueSetState:function(e){c(e,"setState")}},d=Object.assign,h={};Object.freeze(h),g.prototype.isReactComponent={},g.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var O={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},x;for(x in O)O.hasOwnProperty(x)&&i(x,O[x]);S.prototype=g.prototype,O=M.prototype=new S,O.constructor=M,d(O,g.prototype),O.isPureReactComponent=!0;var N=Array.isArray,C=Symbol.for("react.client.reference"),E={H:null,A:null,T:null,S:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null},J=Object.prototype.hasOwnProperty,U=Symbol.for("react.client.reference"),G=0,Ce,Z,De,X,yt,Et,_t;pe.__reactDisabledLog=!0;var ot,bt,nt=!1,st=new(typeof WeakMap=="function"?WeakMap:Map),Jt=Symbol.for("react.client.reference"),wt,Ct,Rt={},Ot={},Tt=!1,St=/\/+/g,jt=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Pt=!1,Qe=null,Xe=0,Je=!1,it=!1,At=typeof queueMicrotask=="function"?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:a;t.Children={map:le,forEach:function(e,n,u){le(e,function(){n.apply(this,arguments)},u)},count:function(e){var n=0;return le(e,function(){n++}),n},toArray:function(e){return le(e,function(n){return n})||[]},only:function(e){if(!L(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=g,t.Fragment=D,t.Profiler=He,t.PureComponent=M,t.StrictMode=_e,t.Suspense=be,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,t.act=function(e){var n=E.actQueue,u=Xe;Xe++;var l=E.actQueue=n!==null?n:[],p=!1;try{var v=e()}catch(T){E.thrownErrors.push(T)}if(0<E.thrownErrors.length)throw y(n,u),e=_(E.thrownErrors),E.thrownErrors.length=0,e;if(v!==null&&typeof v=="object"&&typeof v.then=="function"){var m=v;return At(function(){p||Je||(Je=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(T,$){p=!0,m.then(function(z){if(y(n,u),u===0){try{A(l),a(function(){return w(z,T,$)})}catch(se){E.thrownErrors.push(se)}if(0<E.thrownErrors.length){var Me=_(E.thrownErrors);E.thrownErrors.length=0,$(Me)}}else T(z)},function(z){y(n,u),0<E.thrownErrors.length&&(z=_(E.thrownErrors),E.thrownErrors.length=0),$(z)})}}}var P=v;if(y(n,u),u===0&&(A(l),l.length!==0&&At(function(){p||Je||(Je=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),E.actQueue=null),0<E.thrownErrors.length)throw e=_(E.thrownErrors),E.thrownErrors.length=0,e;return{then:function(T,$){p=!0,u===0?(E.actQueue=l,a(function(){return w(P,T,$)})):T(P)}}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cloneElement=function(e,n,u){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var l=d({},e.props),p=e.key,v=e._owner;if(n!=null){var m;e:{if(J.call(n,"ref")&&(m=Object.getOwnPropertyDescriptor(n,"ref").get)&&m.isReactWarning){m=!1;break e}m=n.ref!==void 0}m&&(v=re()),me(n)&&(V(n.key),p=""+n.key);for(P in n)!J.call(n,P)||P==="key"||P==="__self"||P==="__source"||P==="ref"&&n.ref===void 0||(l[P]=n[P])}var P=arguments.length-2;if(P===1)l.children=u;else if(1<P){m=Array(P);for(var T=0;T<P;T++)m[T]=arguments[T+2];l.children=m}for(l=oe(e.type,p,void 0,void 0,v,l),p=2;p<arguments.length;p++)Te(arguments[p],l.type);return l},t.createContext=function(e){return e={$$typeof:Pe,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:je,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},t.createElement=function(e,n,u){if(ee(e))for(var l=2;l<arguments.length;l++)Te(arguments[l],e);else{if(l="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null)var p="null";else N(e)?p="array":e!==void 0&&e.$$typeof===b?(p="<"+(q(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):p=typeof e;console.error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",p,l)}var v;if(l={},p=null,n!=null)for(v in Ct||!("__self"in n)||"key"in n||(Ct=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),me(n)&&(V(n.key),p=""+n.key),n)J.call(n,v)&&v!=="key"&&v!=="__self"&&v!=="__source"&&(l[v]=n[v]);var m=arguments.length-2;if(m===1)l.children=u;else if(1<m){for(var P=Array(m),T=0;T<m;T++)P[T]=arguments[T+2];Object.freeze&&Object.freeze(P),l.children=P}if(e&&e.defaultProps)for(v in m=e.defaultProps,m)l[v]===void 0&&(l[v]=m[v]);return p&&ge(l,typeof e=="function"?e.displayName||e.name||"Unknown":e),oe(e,p,void 0,void 0,re(),l)},t.createRef=function(){var e={current:null};return Object.seal(e),e},t.forwardRef=function(e){e!=null&&e.$$typeof===ke?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?console.error("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",e.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),e!=null&&e.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var n={$$typeof:Ae,render:e},u;return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return u},set:function(l){u=l,e.name||e.displayName||(Object.defineProperty(e,"name",{value:l}),e.displayName=l)}}),n},t.isValidElement=L,t.lazy=function(e){return{$$typeof:we,_payload:{_status:-1,_result:e},_init:Ye}},t.memo=function(e,n){ee(e)||console.error("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e),n={$$typeof:ke,type:e,compare:n===void 0?null:n};var u;return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return u},set:function(l){u=l,e.name||e.displayName||(Object.defineProperty(e,"name",{value:l}),e.displayName=l)}}),n},t.startTransition=function(e){var n=E.T,u={};E.T=u,u._updatedFibers=new Set;try{var l=e(),p=E.S;p!==null&&p(u,l),typeof l=="object"&&l!==null&&typeof l.then=="function"&&l.then(s,jt)}catch(v){jt(v)}finally{n===null&&u._updatedFibers&&(e=u._updatedFibers.size,u._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),E.T=n}},t.unstable_useCacheRefresh=function(){return j().useCacheRefresh()},t.use=function(e){return j().use(e)},t.useActionState=function(e,n,u){return j().useActionState(e,n,u)},t.useCallback=function(e,n){return j().useCallback(e,n)},t.useContext=function(e){var n=j();return e.$$typeof===je&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),n.useContext(e)},t.useDebugValue=function(e,n){return j().useDebugValue(e,n)},t.useDeferredValue=function(e,n){return j().useDeferredValue(e,n)},t.useEffect=function(e,n){return j().useEffect(e,n)},t.useId=function(){return j().useId()},t.useImperativeHandle=function(e,n,u){return j().useImperativeHandle(e,n,u)},t.useInsertionEffect=function(e,n){return j().useInsertionEffect(e,n)},t.useLayoutEffect=function(e,n){return j().useLayoutEffect(e,n)},t.useMemo=function(e,n){return j().useMemo(e,n)},t.useOptimistic=function(e,n){return j().useOptimistic(e,n)},t.useReducer=function(e,n,u){return j().useReducer(e,n,u)},t.useRef=function(e){return j().useRef(e)},t.useState=function(e){return j().useState(e)},t.useSyncExternalStore=function(e,n,u){return j().useSyncExternalStore(e,n,u)},t.useTransition=function(){return j().useTransition()},t.version="19.0.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()}(We,We.exports)),We.exports}var pt;function mt(){return pt||(pt=1,process.env.NODE_ENV==="production"?Ge.exports=Ft():Ge.exports=Gt()),Ge.exports}/**
53
- * @license React
54
- * react-jsx-runtime.development.js
55
- *
56
- * Copyright (c) Meta Platforms, Inc. and affiliates.
57
- *
58
- * This source code is licensed under the MIT license found in the
59
- * LICENSE file in the root directory of this source tree.
60
- */var gt;function Kt(){return gt||(gt=1,process.env.NODE_ENV!=="production"&&function(){function r(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===Ye?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case oe:return"Fragment";case k:return"Portal";case Te:return"Profiler";case ve:return"StrictMode";case ce:return"Suspense";case ne:return"SuspenseList"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case Se:return(o.displayName||"Context")+".Provider";case L:return(o._context.displayName||"Context")+".Consumer";case ye:var d=o.render;return o=o.displayName,o||(o=d.displayName||d.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case Ee:return d=o.displayName||null,d!==null?d:r(o.type)||"Memo";case Q:d=o._payload,o=o._init;try{return r(o(d))}catch{}}return null}function t(o){return""+o}function i(o){try{t(o);var d=!1}catch{d=!0}if(d){d=console;var h=d.error,O=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return h.call(d,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",O),t(o)}}function f(){}function c(){if(w===0){A=console.log,b=console.info,W=console.warn,D=console.error,_e=console.group,He=console.groupCollapsed,je=console.groupEnd;var o={configurable:!0,enumerable:!0,value:f,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}w++}function g(){if(w--,w===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:a({},o,{value:A}),info:a({},o,{value:b}),warn:a({},o,{value:W}),error:a({},o,{value:D}),group:a({},o,{value:_e}),groupCollapsed:a({},o,{value:He}),groupEnd:a({},o,{value:je})})}0>w&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function S(o){if(Pe===void 0)try{throw Error()}catch(h){var d=h.stack.trim().match(/\n( *(at )?)/);Pe=d&&d[1]||"",Ae=-1<h.stack.indexOf(`
61
- at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
62
- `+Pe+o+Ae}function M(o,d){if(!o||be)return"";var h=Ne.get(o);if(h!==void 0)return h;be=!0,h=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var O=null;O=j.H,j.H=null,c();try{var x={DetermineComponentFrameRoot:function(){try{if(d){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(X){var De=X}Reflect.construct(o,[],Z)}else{try{Z.call()}catch(X){De=X}o.call(Z.prototype)}}else{try{throw Error()}catch(X){De=X}(Z=o())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(X){if(X&&De&&typeof X.stack=="string")return[X.stack,De.stack]}return[null,null]}};x.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var N=Object.getOwnPropertyDescriptor(x.DetermineComponentFrameRoot,"name");N&&N.configurable&&Object.defineProperty(x.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=x.DetermineComponentFrameRoot(),E=C[0],J=C[1];if(E&&J){var U=E.split(`
63
- `),G=J.split(`
64
- `);for(C=N=0;N<U.length&&!U[N].includes("DetermineComponentFrameRoot");)N++;for(;C<G.length&&!G[C].includes("DetermineComponentFrameRoot");)C++;if(N===U.length||C===G.length)for(N=U.length-1,C=G.length-1;1<=N&&0<=C&&U[N]!==G[C];)C--;for(;1<=N&&0<=C;N--,C--)if(U[N]!==G[C]){if(N!==1||C!==1)do if(N--,C--,0>C||U[N]!==G[C]){var Ce=`
65
- `+U[N].replace(" at new "," at ");return o.displayName&&Ce.includes("<anonymous>")&&(Ce=Ce.replace("<anonymous>",o.displayName)),typeof o=="function"&&Ne.set(o,Ce),Ce}while(1<=N&&0<=C);break}}}finally{be=!1,j.H=O,g(),Error.prepareStackTrace=h}return U=(U=o?o.displayName||o.name:"")?S(U):"",typeof o=="function"&&Ne.set(o,U),U}function I(o){if(o==null)return"";if(typeof o=="function"){var d=o.prototype;return M(o,!(!d||!d.isReactComponent))}if(typeof o=="string")return S(o);switch(o){case ce:return S("Suspense");case ne:return S("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case ye:return o=M(o.render,!1),o;case Ee:return I(o.type);case Q:d=o._payload,o=o._init;try{return I(o(d))}catch{}}return""}function V(){var o=j.A;return o===null?null:o.getOwner()}function q(o){if(s.call(o,"key")){var d=Object.getOwnPropertyDescriptor(o,"key").get;if(d&&d.isReactWarning)return!1}return o.key!==void 0}function ee(o,d){function h(){we||(we=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",d))}h.isReactWarning=!0,Object.defineProperty(o,"key",{get:h,configurable:!0})}function pe(){var o=r(this.type);return Ke[o]||(Ke[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function ie(o,d,h,O,x,N){return h=N.ref,o={$$typeof:ge,type:o,key:d,props:N,_owner:x},(h!==void 0?h:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:pe}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function ue(o,d,h,O,x,N){if(typeof o=="string"||typeof o=="function"||o===oe||o===Te||o===ve||o===ce||o===ne||o===F||typeof o=="object"&&o!==null&&(o.$$typeof===Q||o.$$typeof===Ee||o.$$typeof===Se||o.$$typeof===L||o.$$typeof===ye||o.$$typeof===_||o.getModuleId!==void 0)){var C=d.children;if(C!==void 0)if(O)if(y(C)){for(O=0;O<C.length;O++)te(C[O],o);Object.freeze&&Object.freeze(C)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else te(C,o)}else C="",(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),o===null?O="null":y(o)?O="array":o!==void 0&&o.$$typeof===ge?(O="<"+(r(o.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):O=typeof o,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,C);if(s.call(d,"key")){C=r(o);var E=Object.keys(d).filter(function(U){return U!=="key"});O=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",Ve[C+O]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
19
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function re(){v.asyncTransitions--}function z(e){if(Oe===null)try{var o=("require"+Math.random()).slice(0,7);Oe=(n&&n[o]).call(n,"timers").setImmediate}catch{Oe=function(l){ot===!1&&(ot=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var h=new MessageChannel;h.port1.onmessage=l,h.port2.postMessage(void 0)}}return Oe(e)}function q(e){return 1<e.length&&typeof AggregateError=="function"?new AggregateError(e):e[0]}function M(e,o){o!==Pe-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Pe=o}function x(e,o,u){var l=v.actQueue;if(l!==null)if(l.length!==0)try{ne(l),z(function(){return x(e,o,u)});return}catch(h){v.thrownErrors.push(h)}else v.actQueue=null;0<v.thrownErrors.length?(l=q(v.thrownErrors),v.thrownErrors.length=0,u(l)):o(e)}function ne(e){if(!Ne){Ne=!0;var o=0;try{for(;o<e.length;o++){var u=e[o];do{v.didUsePromise=!1;var l=u(!1);if(l!==null){if(v.didUsePromise){e[o]=u,e.splice(0,o);return}u=l}else break}while(!0)}e.length=0}catch(h){e.splice(0,o+1),v.thrownErrors.push(h)}finally{Ne=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var B=Symbol.for("react.transitional.element"),fe=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),g=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ze=Symbol.for("react.activity"),Ve=Symbol.iterator,Be={},Ge={isMounted:function(){return!1},enqueueForceUpdate:function(e){c(e,"forceUpdate")},enqueueReplaceState:function(e){c(e,"replaceState")},enqueueSetState:function(e){c(e,"setState")}},Qe=Object.assign,De={};Object.freeze(De),p.prototype.isReactComponent={},p.prototype.setState=function(e,o){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,o,"setState")},p.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var U={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(we in U)U.hasOwnProperty(we)&&s(we,U[we]);O.prototype=p.prototype,U=P.prototype=new O,U.constructor=P,Qe(U,p.prototype),U.isPureReactComponent=!0;var Xe=Array.isArray,St=Symbol.for("react.client.reference"),v={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Te=Object.prototype.hasOwnProperty,Ke=console.createTask?console.createTask:function(){return null};U={react_stack_bottom_frame:function(e){return e()}};var Je,Ze,et={},At=U.react_stack_bottom_frame.bind(U,K)(),kt=Ke($(K)),tt=!1,rt=/\/+/g,nt=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ot=!1,Oe=null,Pe=0,Se=!1,Ne=!1,st=typeof queueMicrotask=="function"?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:z;U=Object.freeze({__proto__:null,c:function(e){return C().useMemoCache(e)}});var we={map:te,forEach:function(e,o,u){te(e,function(){o.apply(this,arguments)},u)},count:function(e){var o=0;return te(e,function(){o++}),o},toArray:function(e){return te(e,function(o){return o})||[]},only:function(e){if(!F(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=ze,t.Children=we,t.Component=p,t.Fragment=r,t.Profiler=f,t.PureComponent=P,t.StrictMode=i,t.Suspense=m,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=v,t.__COMPILER_RUNTIME=U,t.act=function(e){var o=v.actQueue,u=Pe;Pe++;var l=v.actQueue=o!==null?o:[],h=!1;try{var E=e()}catch(b){v.thrownErrors.push(b)}if(0<v.thrownErrors.length)throw M(o,u),e=q(v.thrownErrors),v.thrownErrors.length=0,e;if(E!==null&&typeof E=="object"&&typeof E.then=="function"){var y=E;return st(function(){h||Se||(Se=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(b,oe){h=!0,y.then(function(me){if(M(o,u),u===0){try{ne(l),z(function(){return x(me,b,oe)})}catch(Dt){v.thrownErrors.push(Dt)}if(0<v.thrownErrors.length){var jt=q(v.thrownErrors);v.thrownErrors.length=0,oe(jt)}}else b(me)},function(me){M(o,u),0<v.thrownErrors.length&&(me=q(v.thrownErrors),v.thrownErrors.length=0),oe(me)})}}}var T=E;if(M(o,u),u===0&&(ne(l),l.length!==0&&st(function(){h||Se||(Se=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),v.actQueue=null),0<v.thrownErrors.length)throw e=q(v.thrownErrors),v.thrownErrors.length=0,e;return{then:function(b,oe){h=!0,u===0?(v.actQueue=l,z(function(){return x(T,b,oe)})):b(T)}}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.captureOwnerStack=function(){var e=v.getCurrentStack;return e===null?null:e()},t.cloneElement=function(e,o,u){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var l=Qe({},e.props),h=e.key,E=e._owner;if(o!=null){var y;e:{if(Te.call(o,"ref")&&(y=Object.getOwnPropertyDescriptor(o,"ref").get)&&y.isReactWarning){y=!1;break e}y=o.ref!==void 0}y&&(E=H()),ue(o)&&(L(o.key),h=""+o.key);for(T in o)!Te.call(o,T)||T==="key"||T==="__self"||T==="__source"||T==="ref"&&o.ref===void 0||(l[T]=o[T])}var T=arguments.length-2;if(T===1)l.children=u;else if(1<T){y=Array(T);for(var b=0;b<T;b++)y[b]=arguments[b+2];l.children=y}for(l=Z(e.type,h,l,E,e._debugStack,e._debugTask),h=2;h<arguments.length;h++)ee(arguments[h]);return l},t.createContext=function(e){return e={$$typeof:g,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:d,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},t.createElement=function(e,o,u){for(var l=2;l<arguments.length;l++)ee(arguments[l]);l={};var h=null;if(o!=null)for(b in Ze||!("__self"in o)||"key"in o||(Ze=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),ue(o)&&(L(o.key),h=""+o.key),o)Te.call(o,b)&&b!=="key"&&b!=="__self"&&b!=="__source"&&(l[b]=o[b]);var E=arguments.length-2;if(E===1)l.children=u;else if(1<E){for(var y=Array(E),T=0;T<E;T++)y[T]=arguments[T+2];Object.freeze&&Object.freeze(y),l.children=y}if(e&&e.defaultProps)for(b in E=e.defaultProps,E)l[b]===void 0&&(l[b]=E[b]);h&&J(l,typeof e=="function"?e.displayName||e.name||"Unknown":e);var b=1e4>v.recentlyCreatedOwnerStacks++;return Z(e,h,l,H(),b?Error("react-stack-top-frame"):At,b?Ke($(e)):kt)},t.createRef=function(){var e={current:null};return Object.seal(e),e},t.forwardRef=function(e){e!=null&&e.$$typeof===S?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?console.error("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",e.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),e!=null&&e.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var o={$$typeof:w,render:e},u;return Object.defineProperty(o,"displayName",{enumerable:!1,configurable:!0,get:function(){return u},set:function(l){u=l,e.name||e.displayName||(Object.defineProperty(e,"name",{value:l}),e.displayName=l)}}),o},t.isValidElement=F,t.lazy=function(e){e={_status:-1,_result:e};var o={$$typeof:G,_payload:e,_init:le},u={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return e._ioInfo=u,o._debugInfo=[{awaited:u}],o},t.memo=function(e,o){e==null&&console.error("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e),o={$$typeof:S,type:e,compare:o===void 0?null:o};var u;return Object.defineProperty(o,"displayName",{enumerable:!1,configurable:!0,get:function(){return u},set:function(l){u=l,e.name||e.displayName||(Object.defineProperty(e,"name",{value:l}),e.displayName=l)}}),o},t.startTransition=function(e){var o=v.T,u={};u._updatedFibers=new Set,v.T=u;try{var l=e(),h=v.S;h!==null&&h(u,l),typeof l=="object"&&l!==null&&typeof l.then=="function"&&(v.asyncTransitions++,l.then(re,re),l.then(D,nt))}catch(E){nt(E)}finally{o===null&&u._updatedFibers&&(e=u._updatedFibers.size,u._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),o!==null&&u.types!==null&&(o.types!==null&&o.types!==u.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),o.types=u.types),v.T=o}},t.unstable_useCacheRefresh=function(){return C().useCacheRefresh()},t.use=function(e){return C().use(e)},t.useActionState=function(e,o,u){return C().useActionState(e,o,u)},t.useCallback=function(e,o){return C().useCallback(e,o)},t.useContext=function(e){var o=C();return e.$$typeof===d&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),o.useContext(e)},t.useDebugValue=function(e,o){return C().useDebugValue(e,o)},t.useDeferredValue=function(e,o){return C().useDeferredValue(e,o)},t.useEffect=function(e,o){return e==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),C().useEffect(e,o)},t.useEffectEvent=function(e){return C().useEffectEvent(e)},t.useId=function(){return C().useId()},t.useImperativeHandle=function(e,o,u){return C().useImperativeHandle(e,o,u)},t.useInsertionEffect=function(e,o){return e==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),C().useInsertionEffect(e,o)},t.useLayoutEffect=function(e,o){return e==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),C().useLayoutEffect(e,o)},t.useMemo=function(e,o){return C().useMemo(e,o)},t.useOptimistic=function(e,o){return C().useOptimistic(e,o)},t.useReducer=function(e,o,u){return C().useReducer(e,o,u)},t.useRef=function(e){return C().useRef(e)},t.useState=function(e){return C().useState(e)},t.useSyncExternalStore=function(e,o,u){return C().useSyncExternalStore(e,o,u)},t.useTransition=function(){return C().useTransition()},t.version="19.2.1",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()}(Ee,Ee.exports)),Ee.exports}var qe;function xe(){return qe||(qe=1,process.env.NODE_ENV==="production"?Ce.exports=Rt():Ce.exports=Ct()),Ce.exports}var $e;function Tt(){return $e||($e=1,process.env.NODE_ENV!=="production"&&function(){function n(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===le?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case J:return"Fragment";case Z:return"Profiler";case W:return"StrictMode";case ce:return"Suspense";case R:return"SuspenseList";case te:return"Activity"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case ue:return"Portal";case ee:return r.displayName||"Context";case ae:return(r._context.displayName||"Context")+".Consumer";case F:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case pe:return i=r.displayName||null,i!==null?i:n(r.type)||"Memo";case N:i=r._payload,r=r._init;try{return n(r(i))}catch{}}return null}function t(r){return""+r}function s(r){try{t(r);var i=!1}catch{i=!0}if(i){i=console;var f=i.error,d=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return f.call(i,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",d),t(r)}}function a(r){if(r===J)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===N)return"<...>";try{var i=n(r);return i?"<"+i+">":"<...>"}catch{return"<...>"}}function c(){var r=C.A;return r===null?null:r.getOwner()}function p(){return Error("react-stack-top-frame")}function O(r){if(re.call(r,"key")){var i=Object.getOwnPropertyDescriptor(r,"key").get;if(i&&i.isReactWarning)return!1}return r.key!==void 0}function P(r,i){function f(){M||(M=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",i))}f.isReactWarning=!0,Object.defineProperty(r,"key",{get:f,configurable:!0})}function D(){var r=n(this.type);return x[r]||(x[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),r=this.props.ref,r!==void 0?r:null}function V(r,i,f,d,g,w){var m=f.ref;return r={$$typeof:K,type:r,key:i,props:f,_owner:d},(m!==void 0?m:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:D}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:g}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:w}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function L(r,i,f,d,g,w){var m=i.children;if(m!==void 0)if(d)if(z(m)){for(d=0;d<m.length;d++)Y(m[d]);Object.freeze&&Object.freeze(m)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Y(m);if(re.call(i,"key")){m=n(r);var A=Object.keys(i).filter(function(G){return G!=="key"});d=0<A.length?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}",fe[m+d]||(A=0<A.length?"{"+A.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
66
20
  let props = %s;
67
21
  <%s {...props} />
68
22
  React keys must be passed directly to JSX without using spread:
69
23
  let props = %s;
70
- <%s key={someKey} {...props} />`,O,C,E,C),Ve[C+O]=!0)}if(C=null,h!==void 0&&(i(h),C=""+h),q(d)&&(i(d.key),C=""+d.key),"key"in d){h={};for(var J in d)J!=="key"&&(h[J]=d[J])}else h=d;return C&&ee(h,typeof o=="function"?o.displayName||o.name||"Unknown":o),ie(o,C,N,x,V(),h)}function te(o,d){if(typeof o=="object"&&o&&o.$$typeof!==ke){if(y(o))for(var h=0;h<o.length;h++){var O=o[h];B(O)&&ae(O,d)}else if(B(o))o._store&&(o._store.validated=1);else if(o===null||typeof o!="object"?h=null:(h=le&&o[le]||o["@@iterator"],h=typeof h=="function"?h:null),typeof h=="function"&&h!==o.entries&&(h=h.call(o),h!==o))for(;!(o=h.next()).done;)B(o.value)&&ae(o.value,d)}}function B(o){return typeof o=="object"&&o!==null&&o.$$typeof===ge}function ae(o,d){if(o._store&&!o._store.validated&&o.key==null&&(o._store.validated=1,d=re(d),!Be[d])){Be[d]=!0;var h="";o&&o._owner!=null&&o._owner!==V()&&(h=null,typeof o._owner.tag=="number"?h=r(o._owner.type):typeof o._owner.name=="string"&&(h=o._owner.name),h=" It was passed a child from "+h+".");var O=j.getCurrentStack;j.getCurrentStack=function(){var x=I(o.type);return O&&(x+=O()||""),x},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',d,h),j.getCurrentStack=O}}function re(o){var d="",h=V();return h&&(h=r(h.type))&&(d=`
71
-
72
- Check the render method of \``+h+"`."),d||(o=r(o))&&(d=`
73
-
74
- Check the top-level render call using <`+o+">."),d}var me=mt(),ge=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),oe=Symbol.for("react.fragment"),ve=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),Se=Symbol.for("react.context"),ye=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),Ee=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),le=Symbol.iterator,Ye=Symbol.for("react.client.reference"),j=me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,s=Object.prototype.hasOwnProperty,a=Object.assign,_=Symbol.for("react.client.reference"),y=Array.isArray,w=0,A,b,W,D,_e,He,je;f.__reactDisabledLog=!0;var Pe,Ae,be=!1,Ne=new(typeof WeakMap=="function"?WeakMap:Map),ke=Symbol.for("react.client.reference"),we,Ke={},Ve={},Be={};Le.Fragment=oe,Le.jsx=function(o,d,h,O,x){return ue(o,d,h,!1,O,x)},Le.jsxs=function(o,d,h,O,x){return ue(o,d,h,!0,O,x)}}()),Le}var vt;function Qt(){return vt||(vt=1,process.env.NODE_ENV==="production"?Fe.exports=Bt():Fe.exports=Kt()),Fe.exports}var K=Qt(),ze=mt();class Xt extends ze.Component{constructor(t){super(t),this.unfilteredDocuments=[],this.state={documents:[],mode:0}}async componentDidMount(){const{controller:t}=this.props;this.unsubscriber=t.onChange(i=>{i.documentCollection&&(this.unfilteredDocuments=i.documentCollection,this.setState({documents:t.filter(this.unfilteredDocuments)})),i.action==="filterChange"?this.setState({documents:t.filter(this.unfilteredDocuments)}):this.setState({})}),this.unfilteredDocuments=await t.documentCollection(),this.setState({documents:t.filter(this.unfilteredDocuments)})}componentWillUnmount(){var t;(t=this.unsubscriber)==null||t.call(this)}newDocument(){this.props.controller.newDocument(),this.setState({mode:1})}editDocument(t){this.props.controller.setDocument(t),this.setState({mode:2})}async storeDocument(t){const{controller:i,layout:f}=this.props;i.setDocument(t),await i.storeDocument(),f==="formAndItems"?this.newDocument():this.setState({mode:0})}invokeContentViewChild(t){const{children:i,layout:f,controller:c}=this.props,{mode:g}=this.state,S=f!=="formAndItems";if(!c.document)return;const M={controller:c,submitButtonCaption:g==2?t==null?void 0:t.updateButtonLabel:t==null?void 0:t.addButtonLabel,onSubmit:I=>this.storeDocument(I),onCancel:S?()=>this.setState({mode:0}):()=>this.newDocument()};return typeof i[0]=="function"?ze.cloneElement(i[0](M),{key:c.document.id}):ze.cloneElement(i[0],{key:c.document.id,...M})}invokeDetailViewChild(t){const{children:i,controller:f}=this.props,c={document:t,onSelect:g=>this.editDocument(g),onDelete:g=>f.setDocument(g).deleteDocument()};return typeof i[1]=="function"?ze.cloneElement(i[1](c),{key:t.id}):ze.cloneElement(i[1],{key:t.id,...c})}render(){var ie;const{mode:t,documents:i}=this.state,{className:f,cardAddButton:c,controller:g}=this.props,S=zt((ie=g.document)==null?void 0:ie.className);let M=this.props.labels||{};const I=this.props.layout||"itemsAlways";typeof M=="function"&&(M=M(g));const{addNewDocumentLabel:V,singularDocumentInCollectionCaption:q,documentsInCollectionCaption:ee,noDocumentsFoundLabel:pe}=M;return K.jsxs("div",{className:`crud-panel ${S} ${f||""}`,children:[t===0&&I!=="formAndItems"&&!c&&K.jsx("div",{className:"header",children:this.props.header?typeof this.props.header=="function"?this.props.header(g,()=>this.newDocument(),M):this.props.header:K.jsx("button",{onClick:()=>this.newDocument(),children:V})}),(I==="formAndItems"||t===1||t===2)&&K.jsx("div",{className:"content-panel",children:this.invokeContentViewChild(M)}),(I==="itemsAlways"||I==="formAndItems"||t===0)&&K.jsxs("div",{className:"collection-panel",children:[(i==null?void 0:i.length)>0&&K.jsx("h3",{children:i.length>1?ee:q||ee}),K.jsxs("div",{className:"documents",children:[c&&K.jsxs("div",{className:"crud-card card-add-button clickable",onClick:()=>this.newDocument(),children:[K.jsx("div",{className:"button-element",children:c}),K.jsx("div",{className:"add-label",children:V})]}),i!=null&&i.length?i.map(ue=>this.invokeDetailViewChild(ue)):K.jsx("p",{children:pe})]})]}),K.jsx("div",{className:"footer",children:this.props.footer&&typeof this.props.footer=="function"?this.props.footer(g,()=>this.newDocument(),M):this.props.footer})]})}}Re.CrudController=rt,Re.CrudPanel=Xt,Object.defineProperty(Re,Symbol.toStringTag,{value:"Module"})});
24
+ <%s key={someKey} {...props} />`,d,m,A,m),fe[m+d]=!0)}if(m=null,f!==void 0&&(s(f),m=""+f),O(i)&&(s(i.key),m=""+i.key),"key"in i){f={};for(var S in i)S!=="key"&&(f[S]=i[S])}else f=i;return m&&P(f,typeof r=="function"?r.displayName||r.name||"Unknown":r),V(r,m,f,c(),g,w)}function Y(r){$(r)?r._store&&(r._store.validated=1):typeof r=="object"&&r!==null&&r.$$typeof===N&&(r._payload.status==="fulfilled"?$(r._payload.value)&&r._payload.value._store&&(r._payload.value._store.validated=1):r._store&&(r._store.validated=1))}function $(r){return typeof r=="object"&&r!==null&&r.$$typeof===K}var H=xe(),K=Symbol.for("react.transitional.element"),ue=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),ae=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),le=Symbol.for("react.client.reference"),C=H.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=Object.prototype.hasOwnProperty,z=Array.isArray,q=console.createTask?console.createTask:function(){return null};H={react_stack_bottom_frame:function(r){return r()}};var M,x={},ne=H.react_stack_bottom_frame.bind(H,p)(),B=q(a(p)),fe={};ve.Fragment=J,ve.jsx=function(r,i,f){var d=1e4>C.recentlyCreatedOwnerStacks++;return L(r,i,f,!1,d?Error("react-stack-top-frame"):ne,d?q(a(r)):B)},ve.jsxs=function(r,i,f){var d=1e4>C.recentlyCreatedOwnerStacks++;return L(r,i,f,!0,d?Error("react-stack-top-frame"):ne,d?q(a(r)):B)}}()),ve}var We;function Ot(){return We||(We=1,process.env.NODE_ENV==="production"?Re.exports=wt():Re.exports=Tt()),Re.exports}var I=Ot(),be=xe();class Pt extends be.Component{constructor(t){super(t),this.unfilteredDocuments=[],this.state={documents:[],mode:0}}async componentDidMount(){const{controller:t}=this.props;this.unsubscriber=t.onChange(s=>{s.documentCollection&&(this.unfilteredDocuments=s.documentCollection,this.setState({documents:t.filter(this.unfilteredDocuments)})),s.action==="filterChange"?this.setState({documents:t.filter(this.unfilteredDocuments)}):this.setState({})}),this.unfilteredDocuments=await t.documentCollection(),this.setState({documents:t.filter(this.unfilteredDocuments)})}componentWillUnmount(){this.unsubscriber?.()}newDocument(){this.props.controller.newDocument(),this.setState({mode:1})}editDocument(t){this.props.controller.setDocument(t),this.setState({mode:2})}async storeDocument(t){const{controller:s,layout:a}=this.props;s.setDocument(t),await s.storeDocument(),a==="formAndItems"?this.newDocument():this.setState({mode:0})}invokeContentViewChild(t){const{children:s,layout:a,controller:c}=this.props,{mode:p}=this.state,O=a!=="formAndItems";if(!c.document)return;const P={controller:c,submitButtonCaption:p==2?t?.updateButtonLabel:t?.addButtonLabel,onSubmit:D=>this.storeDocument(D),onCancel:O?()=>this.setState({mode:0}):()=>this.newDocument()};return typeof s[0]=="function"?be.cloneElement(s[0](P),{key:c.document.id}):be.cloneElement(s[0],{key:c.document.id,...P})}invokeDetailViewChild(t){const{children:s,controller:a}=this.props,c={document:t,onSelect:p=>this.editDocument(p),onDelete:p=>a.setDocument(p).deleteDocument()};return typeof s[1]=="function"?be.cloneElement(s[1](c),{key:t.id}):be.cloneElement(s[1],{key:t.id,...c})}render(){const{mode:t,documents:s}=this.state,{className:a,cardAddButton:c,controller:p}=this.props,O=Et(p.document?.className);let P=this.props.labels||{};const D=this.props.layout||"itemsAlways";typeof P=="function"&&(P=P(p));const{addNewDocumentLabel:V,singularDocumentInCollectionCaption:L,documentsInCollectionCaption:Y,noDocumentsFoundLabel:$}=P;return I.jsxs("div",{className:`crud-panel ${O} ${a||""}`,children:[t===0&&D!=="formAndItems"&&!c&&I.jsx("div",{className:"header",children:this.props.header?typeof this.props.header=="function"?this.props.header(p,()=>this.newDocument(),P):this.props.header:I.jsx("button",{onClick:()=>this.newDocument(),children:V})}),(D==="formAndItems"||t===1||t===2)&&I.jsx("div",{className:"content-panel",children:this.invokeContentViewChild(P)}),(D==="itemsAlways"||D==="formAndItems"||t===0)&&I.jsxs("div",{className:"collection-panel",children:[s?.length>0&&I.jsx("h3",{children:s.length>1?Y:L||Y}),I.jsxs("div",{className:"documents",children:[c&&I.jsxs("div",{className:"crud-card card-add-button clickable",onClick:()=>this.newDocument(),children:[I.jsx("div",{className:"button-element",children:c}),I.jsx("div",{className:"add-label",children:V})]}),s?.length?s.map(H=>this.invokeDetailViewChild(H)):I.jsx("p",{children:$})]})]}),I.jsx("div",{className:"footer",children:this.props.footer&&typeof this.props.footer=="function"?this.props.footer(p,()=>this.newDocument(),P):this.props.footer})]})}}se.CrudController=je,se.CrudPanel=Pt,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
75
25
  //# sourceMappingURL=entropic-bond-crud-panel.umd.cjs.map